Skip to content

BlockSuite API Documentation / @blocksuite/store / DocCollectionMeta

Class: DocCollectionMeta

Constructors

new DocCollectionMeta()

new DocCollectionMeta(doc): DocCollectionMeta

Parameters

doc: BlockSuiteDoc

Returns

DocCollectionMeta

Defined in

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

Properties

_proxy

protected readonly _proxy: DocCollectionMetaState

Defined in

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


_yMap

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

Defined in

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


commonFieldsUpdated

commonFieldsUpdated: Slot<void>

Defined in

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


doc

readonly doc: BlockSuiteDoc

Defined in

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


docMetaAdded

docMetaAdded: Slot<string>

Defined in

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


docMetaRemoved

docMetaRemoved: Slot<string>

Defined in

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


docMetaUpdated

docMetaUpdated: Slot<void>

Defined in

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


id

readonly id: string = 'meta'

Defined in

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

Accessors

avatar

get avatar(): undefined | string

Returns

undefined | string

Defined in

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


blockVersions

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

Returns

undefined | Record<string, number>

Defined in

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


docMetas

get docMetas(): DocMeta[]

Returns

DocMeta[]

Defined in

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


docs

get docs(): undefined | unknown[]

Returns

undefined | unknown[]

Defined in

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


hasVersion

get hasVersion(): boolean

Returns

boolean

Defined in

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


name

get name(): undefined | string

Returns

undefined | string

Defined in

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


pageVersion

get pageVersion(): undefined | number

Returns

undefined | number

Defined in

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


properties

get properties(): DocsPropertiesMeta

Returns

DocsPropertiesMeta

Defined in

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


workspaceVersion

get workspaceVersion(): undefined | number

Returns

undefined | number

Defined in

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


yDocs

get yDocs(): YArray<unknown>

Returns

YArray<unknown>

Defined in

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

Methods

addDocMeta()

addDocMeta(doc, index?): void

Parameters

doc: DocMeta

index?: number

Returns

void

Defined in

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


getDocMeta()

getDocMeta(id): undefined | DocMeta

Parameters

id: string

Returns

undefined | DocMeta

Defined in

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


initialize()

initialize(): void

Returns

void

Defined in

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


removeDocMeta()

removeDocMeta(id): void

Parameters

id: string

Returns

void

Defined in

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


setAvatar()

setAvatar(avatar): void

Parameters

avatar: string

Returns

void

Defined in

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


setDocMeta()

setDocMeta(id, props): void

Parameters

id: string

props: Partial<DocMeta>

Returns

void

Defined in

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


setName()

setName(name): void

Parameters

name: string

Returns

void

Defined in

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


setProperties()

setProperties(meta): void

Parameters

meta: DocsPropertiesMeta

Returns

void

Defined in

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


updateVersion()

updateVersion(collection): void

Parameters

collection: DocCollection

Returns

void

Defined in

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


validateVersion()

validateVersion(collection): void

Parameters

collection: DocCollection

Returns

void

Deprecated

Only used for legacy doc version validation

Defined in

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


writeVersion()

writeVersion(collection): void

Internal

Only for doc initialization

Parameters

collection: DocCollection

Returns

void

Defined in

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