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:136

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[] | DocsPropertiesMeta | Record<string, number>>

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 Signature

get avatar(): undefined | string

Returns

undefined | string

Defined in

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


blockVersions

Get Signature

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

Returns

undefined | Record<string, number>

Defined in

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


docMetas

Get Signature

get docMetas(): DocMeta[]

Returns

DocMeta[]

Defined in

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


docs

Get Signature

get docs(): undefined | unknown[]

Returns

undefined | unknown[]

Defined in

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


hasVersion

Get Signature

get hasVersion(): boolean

Returns

boolean

Defined in

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


name

Get Signature

get name(): undefined | string

Returns

undefined | string

Defined in

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


pageVersion

Get Signature

get pageVersion(): undefined | number

Returns

undefined | number

Defined in

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


properties

Get Signature

get properties(): DocsPropertiesMeta

Returns

DocsPropertiesMeta

Defined in

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


workspaceVersion

Get Signature

get workspaceVersion(): undefined | number

Returns

undefined | number

Defined in

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


yDocs

Get Signature

get yDocs(): YArray<unknown>

Returns

YArray<unknown>

Defined in

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

Methods

addDocMeta()

addDocMeta(doc, index?): void

Parameters

doc

DocMeta

index?

number

Returns

void

Defined in

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


getDocMeta()

getDocMeta(id): undefined | DocMeta

Parameters

id

string

Returns

undefined | DocMeta

Defined in

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


initialize()

initialize(): void

Returns

void

Defined in

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


removeDocMeta()

removeDocMeta(id): void

Parameters

id

string

Returns

void

Defined in

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


setAvatar()

setAvatar(avatar): void

Parameters

avatar

string

Returns

void

Defined in

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


setDocMeta()

setDocMeta(id, props): void

Parameters

id

string

props

Partial<DocMeta>

Returns

void

Defined in

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


setName()

setName(name): void

Parameters

name

string

Returns

void

Defined in

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


setProperties()

setProperties(meta): void

Parameters

meta

DocsPropertiesMeta

Returns

void

Defined in

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


updateVersion()

updateVersion(collection): void

Parameters

collection

DocCollection

Returns

void

Defined in

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


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:263


writeVersion()

writeVersion(collection): void

Internal

Only for doc initialization

Parameters

collection

DocCollection

Returns

void

Defined in

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