Skip to content

BlockSuite API Documentation / @blocksuite/store / WorkspaceMeta

Class: WorkspaceMeta

Constructors

new WorkspaceMeta(doc)

new WorkspaceMeta(doc): WorkspaceMeta

Parameters

doc: BlockSuiteDoc

Returns

WorkspaceMeta

Source

packages/framework/store/src/workspace/meta.ts:50

Properties

_prevDocs

private _prevDocs: Set<string>

Source

packages/framework/store/src/workspace/meta.ts:40


_proxy

protected readonly _proxy: WorkspaceMetaState

Source

packages/framework/store/src/workspace/meta.ts:48


_yMap

protected readonly _yMap: Map<undefined | string | number | unknown[] | Record<string, number> | DocsPropertiesMeta>

Source

packages/framework/store/src/workspace/meta.ts:47


commonFieldsUpdated

commonFieldsUpdated: Slot<void>

Source

packages/framework/store/src/workspace/meta.ts:45


doc

readonly doc: BlockSuiteDoc

Source

packages/framework/store/src/workspace/meta.ts:38


docMetaAdded

docMetaAdded: Slot<string>

Source

packages/framework/store/src/workspace/meta.ts:42


docMetaRemoved

docMetaRemoved: Slot<string>

Source

packages/framework/store/src/workspace/meta.ts:43


docMetaUpdated

docMetaUpdated: Slot<void>

Source

packages/framework/store/src/workspace/meta.ts:44


id

readonly id: string = 'meta'

Source

packages/framework/store/src/workspace/meta.ts:37

Accessors

avatar

get avatar(): undefined | string

Returns

undefined | string

Source

packages/framework/store/src/workspace/meta.ts:69


blockVersions

get blockVersions(): undefined | Record<string, number>

Returns

undefined | Record<string, number>

Source

packages/framework/store/src/workspace/meta.ts:73


docMetas

get docMetas(): DocMeta[]

Returns

DocMeta[]

Source

packages/framework/store/src/workspace/meta.ts:97


docs

get docs(): undefined | unknown[]

Returns

undefined | unknown[]

Source

packages/framework/store/src/workspace/meta.ts:61


hasVersion

get hasVersion(): boolean

Returns

boolean

Source

packages/framework/store/src/workspace/meta.ts:157


name

get name(): undefined | string

Returns

undefined | string

Source

packages/framework/store/src/workspace/meta.ts:65


pageVersion

get pageVersion(): undefined | number

Returns

undefined | number

Source

packages/framework/store/src/workspace/meta.ts:81


properties

get properties(): DocsPropertiesMeta

Returns

DocsPropertiesMeta

Source

packages/framework/store/src/workspace/meta.ts:313


workspaceVersion

get workspaceVersion(): undefined | number

Returns

undefined | number

Source

packages/framework/store/src/workspace/meta.ts:77


yDocs

get yDocs(): Array<unknown>

Returns

Array<unknown>

Source

packages/framework/store/src/workspace/meta.ts:57

Methods

_handleCommonFieldsEvent()

private _handleCommonFieldsEvent(): void

Returns

void

Source

packages/framework/store/src/workspace/meta.ts:288


_handleDocMetaEvent()

private _handleDocMetaEvent(): void

Returns

void

Source

packages/framework/store/src/workspace/meta.ts:266


_handleWorkspaceMetaEvents()

private _handleWorkspaceMetaEvents(events): void

Parameters

events: YEvent<Text | Array<unknown> | Map<unknown>>[]

Returns

void

Source

packages/framework/store/src/workspace/meta.ts:292


addDocMeta()

addDocMeta(doc, index?): void

Parameters

doc: DocMeta

index?: number

Returns

void

Source

packages/framework/store/src/workspace/meta.ts:108


getDocMeta()

getDocMeta(id): undefined | DocMeta

Parameters

id: string

Returns

undefined | DocMeta

Source

packages/framework/store/src/workspace/meta.ts:104


removeDocMeta()

removeDocMeta(id): void

Parameters

id: string

Returns

void

Source

packages/framework/store/src/workspace/meta.ts:143


setAvatar()

setAvatar(avatar): void

Parameters

avatar: string

Returns

void

Source

packages/framework/store/src/workspace/meta.ts:91


setDocMeta()

setDocMeta(id, props): void

Use Workspace.setDocMeta instead

Parameters

id: string

props: Partial<DocMeta>

Returns

void

Source

packages/framework/store/src/workspace/meta.ts:125


setName()

setName(name): void

Parameters

name: string

Returns

void

Source

packages/framework/store/src/workspace/meta.ts:85


setProperties()

setProperties(meta): void

Parameters

meta: DocsPropertiesMeta

Returns

void

Source

packages/framework/store/src/workspace/meta.ts:325


updateVersion()

updateVersion(workspace): void

Parameters

workspace: Workspace

Returns

void

Source

packages/framework/store/src/workspace/meta.ts:193


validateVersion()

validateVersion(workspace): void

Parameters

workspace: Workspace

Returns

void

Deprecated

Only used for legacy doc version validation

Source

packages/framework/store/src/workspace/meta.ts:208


writeVersion()

writeVersion(workspace): void

Only for doc initialization

Parameters

workspace: Workspace

Returns

void

Source

packages/framework/store/src/workspace/meta.ts:167


Generated using TypeDoc and typedoc-plugin-markdown.