Skip to content

BlockSuite API Documentation / @blocksuite/store / DocCollectionMeta

Class: DocCollectionMeta

Constructors

new DocCollectionMeta()

new DocCollectionMeta(doc): DocCollectionMeta

Parameters

doc: BlockSuiteDoc

Returns

DocCollectionMeta

Source

packages/framework/store/src/store/meta.ts:52

Properties

_prevDocs

private _prevDocs: Set<string>

Source

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


_proxy

protected readonly _proxy: DocCollectionMetaState

Source

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


_yMap

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

Source

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


commonFieldsUpdated

commonFieldsUpdated: Slot<void>

Source

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


doc

readonly doc: BlockSuiteDoc

Source

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


docMetaAdded

docMetaAdded: Slot<string>

Source

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


docMetaRemoved

docMetaRemoved: Slot<string>

Source

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


docMetaUpdated

docMetaUpdated: Slot<void>

Source

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


id

readonly id: string = 'meta'

Source

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

Accessors

avatar

get avatar(): undefined | string

Returns

undefined | string

Source

packages/framework/store/src/store/meta.ts:71


blockVersions

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

Returns

undefined | Record<string, number>

Source

packages/framework/store/src/store/meta.ts:75


docMetas

get docMetas(): DocMeta[]

Returns

DocMeta[]

Source

packages/framework/store/src/store/meta.ts:99


docs

get docs(): undefined | unknown[]

Returns

undefined | unknown[]

Source

packages/framework/store/src/store/meta.ts:63


hasVersion

get hasVersion(): boolean

Returns

boolean

Source

packages/framework/store/src/store/meta.ts:159


name

get name(): undefined | string

Returns

undefined | string

Source

packages/framework/store/src/store/meta.ts:67


pageVersion

get pageVersion(): undefined | number

Returns

undefined | number

Source

packages/framework/store/src/store/meta.ts:83


properties

get properties(): DocsPropertiesMeta

Returns

DocsPropertiesMeta

Source

packages/framework/store/src/store/meta.ts:315


workspaceVersion

get workspaceVersion(): undefined | number

Returns

undefined | number

Source

packages/framework/store/src/store/meta.ts:79


yDocs

get yDocs(): Array<unknown>

Returns

Array<unknown>

Source

packages/framework/store/src/store/meta.ts:59

Methods

_handleCommonFieldsEvent()

private _handleCommonFieldsEvent(): void

Returns

void

Source

packages/framework/store/src/store/meta.ts:290


_handleDocCollectionMetaEvents()

private _handleDocCollectionMetaEvents(events): void

Parameters

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

Returns

void

Source

packages/framework/store/src/store/meta.ts:294


_handleDocMetaEvent()

private _handleDocMetaEvent(): void

Returns

void

Source

packages/framework/store/src/store/meta.ts:268


addDocMeta()

addDocMeta(doc, index?): void

Parameters

doc: DocMeta

index?: number

Returns

void

Source

packages/framework/store/src/store/meta.ts:110


getDocMeta()

getDocMeta(id): undefined | DocMeta

Parameters

id: string

Returns

undefined | DocMeta

Source

packages/framework/store/src/store/meta.ts:106


removeDocMeta()

removeDocMeta(id): void

Parameters

id: string

Returns

void

Source

packages/framework/store/src/store/meta.ts:145


setAvatar()

setAvatar(avatar): void

Parameters

avatar: string

Returns

void

Source

packages/framework/store/src/store/meta.ts:93


setDocMeta()

Internal

setDocMeta(id, props): void

Use DocCollection.setDocMeta instead

Parameters

id: string

props: Partial<DocMeta>

Returns

void

Source

packages/framework/store/src/store/meta.ts:127


setName()

setName(name): void

Parameters

name: string

Returns

void

Source

packages/framework/store/src/store/meta.ts:87


setProperties()

setProperties(meta): void

Parameters

meta: DocsPropertiesMeta

Returns

void

Source

packages/framework/store/src/store/meta.ts:327


updateVersion()

updateVersion(collection): void

Parameters

collection: DocCollection

Returns

void

Source

packages/framework/store/src/store/meta.ts:195


validateVersion()

validateVersion(collection): void

Parameters

collection: DocCollection

Returns

void

Deprecated

Only used for legacy doc version validation

Source

packages/framework/store/src/store/meta.ts:210


writeVersion()

Internal

writeVersion(collection): void

Only for doc initialization

Parameters

collection: DocCollection

Returns

void

Source

packages/framework/store/src/store/meta.ts:169