BlockSuite API Documentation / @blocksuite/store / DocCollectionMeta
Class: DocCollectionMeta
Constructors
new DocCollectionMeta()
new DocCollectionMeta(
doc
):DocCollectionMeta
Parameters
• doc: BlockSuiteDoc
Returns
Source
packages/framework/store/src/store/meta.ts:111
Properties
_prevDocs
private
_prevDocs:Set
<string
>
Source
packages/framework/store/src/store/meta.ts:91
_proxy
protected
readonly
_proxy:DocCollectionMetaState
Source
packages/framework/store/src/store/meta.ts:97
_yMap
protected
readonly
_yMap:Map
<undefined
|string
|number
|unknown
[] |Record
<string
,number
> |DocsPropertiesMeta
>
Source
packages/framework/store/src/store/meta.ts:93
commonFieldsUpdated
commonFieldsUpdated:
Slot
<void
>
Source
packages/framework/store/src/store/meta.ts:109
doc
readonly
doc:BlockSuiteDoc
Source
packages/framework/store/src/store/meta.ts:101
docMetaAdded
docMetaAdded:
Slot
<string
>
Source
packages/framework/store/src/store/meta.ts:103
docMetaRemoved
docMetaRemoved:
Slot
<string
>
Source
packages/framework/store/src/store/meta.ts:105
docMetaUpdated
docMetaUpdated:
Slot
<void
>
Source
packages/framework/store/src/store/meta.ts:107
id
readonly
id:string
='meta'
Source
packages/framework/store/src/store/meta.ts:99
Accessors
avatar
get
avatar():undefined
|string
Returns
undefined
| string
Source
packages/framework/store/src/store/meta.ts:49
blockVersions
get
blockVersions():undefined
|Record
<string
,number
>
Returns
undefined
| Record
<string
, number
>
Source
packages/framework/store/src/store/meta.ts:53
docMetas
get
docMetas():DocMeta
[]
Returns
DocMeta
[]
Source
packages/framework/store/src/store/meta.ts:65
docs
get
docs():undefined
|unknown
[]
Returns
undefined
| unknown
[]
Source
packages/framework/store/src/store/meta.ts:41
hasVersion
get
hasVersion():boolean
Returns
boolean
Source
packages/framework/store/src/store/meta.ts:72
name
get
name():undefined
|string
Returns
undefined
| string
Source
packages/framework/store/src/store/meta.ts:45
pageVersion
get
pageVersion():undefined
|number
Returns
undefined
| number
Source
packages/framework/store/src/store/meta.ts:61
properties
get
properties():DocsPropertiesMeta
Returns
Source
packages/framework/store/src/store/meta.ts:79
workspaceVersion
get
workspaceVersion():undefined
|number
Returns
undefined
| number
Source
packages/framework/store/src/store/meta.ts:57
yDocs
get
yDocs():Array
<unknown
>
Returns
Array
<unknown
>
Source
packages/framework/store/src/store/meta.ts:37
Methods
_handleCommonFieldsEvent()
private
_handleCommonFieldsEvent():void
Returns
void
Source
packages/framework/store/src/store/meta.ts:140
_handleDocCollectionMetaEvents()
private
_handleDocCollectionMetaEvents(events
):void
Parameters
• events: YEvent
<Text
| Array
<unknown
> | Map
<unknown
>>[]
Returns
void
Source
packages/framework/store/src/store/meta.ts:144
_handleDocMetaEvent()
private
_handleDocMetaEvent():void
Returns
void
Source
packages/framework/store/src/store/meta.ts:118
addDocMeta()
addDocMeta(
doc
,index
?):void
Parameters
• doc: DocMeta
• index?: number
Returns
void
Source
packages/framework/store/src/store/meta.ts:187
getDocMeta()
getDocMeta(
id
):undefined
|DocMeta
Parameters
• id: string
Returns
undefined
| DocMeta
Source
packages/framework/store/src/store/meta.ts:183
initialize()
initialize():
void
Returns
void
Source
packages/framework/store/src/store/meta.ts:165
removeDocMeta()
removeDocMeta(
id
):void
Parameters
• id: string
Returns
void
Source
packages/framework/store/src/store/meta.ts:222
setAvatar()
setAvatar(
avatar
):void
Parameters
• avatar: string
Returns
void
Source
packages/framework/store/src/store/meta.ts:177
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:204
setName()
setName(
name
):void
Parameters
• name: string
Returns
void
Source
packages/framework/store/src/store/meta.ts:171
setProperties()
setProperties(
meta
):void
Parameters
• meta: DocsPropertiesMeta
Returns
void
Source
packages/framework/store/src/store/meta.ts:338
updateVersion()
updateVersion(
collection
):void
Parameters
• collection: DocCollection
Returns
void
Source
packages/framework/store/src/store/meta.ts:265
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:280
writeVersion()
Internal
writeVersion(
collection
):void
Only for doc initialization
Parameters
• collection: DocCollection
Returns
void
Source
packages/framework/store/src/store/meta.ts:239