BlockSuite API Documentation / @blocksuite/store / BlockModel
Class: BlockModel<Props>
Extends
Props
Extended by
Type parameters
• Props extends object
= object
Constructors
new BlockModel()
new BlockModel<
Props
>():BlockModel
<Props
>
Returns
BlockModel
<Props
>
Inherited from
MagicProps()<Props>.constructor
Source
packages/framework/store/src/schema/base.ts:163
Properties
[modelLabel]
[modelLabel]:
Props
Source
packages/framework/store/src/schema/base.ts:175
childrenUpdated
childrenUpdated:
Slot
<void
>
Source
packages/framework/store/src/schema/base.ts:207
created
created:
Slot
<void
>
Source
packages/framework/store/src/schema/base.ts:201
deleted
deleted:
Slot
<void
>
Source
packages/framework/store/src/schema/base.ts:203
flavour
flavour:
string
Source
packages/framework/store/src/schema/base.ts:179
id
id:
string
Source
packages/framework/store/src/schema/base.ts:188
keys
keys:
string
[]
Source
packages/framework/store/src/schema/base.ts:192
page
page:
Doc
Deprecated
use doc instead
Source
packages/framework/store/src/schema/base.ts:186
pop()
pop: (
prop
) =>void
Parameters
• prop: keyof Props
& string
Returns
void
Source
packages/framework/store/src/schema/base.ts:196
propsUpdated
propsUpdated:
Slot
<object
>
Type declaration
key
key:
string
Source
packages/framework/store/src/schema/base.ts:205
role
role:
"root"
|"hub"
|"content"
Source
packages/framework/store/src/schema/base.ts:181
stash()
stash: (
prop
) =>void
Parameters
• prop: keyof Props
& string
Returns
void
Source
packages/framework/store/src/schema/base.ts:194
text?
optional
text:Text
Source
packages/framework/store/src/schema/base.ts:199
version
version:
number
Source
packages/framework/store/src/schema/base.ts:177
yBlock
yBlock:
YBlock
Source
packages/framework/store/src/schema/base.ts:190
Accessors
childMap
get
childMap():Map
<string
,number
>
Returns
Map
<string
, number
>
Source
packages/framework/store/src/schema/base.ts:217
children
get
children():BlockModel
<object
>[]
Returns
BlockModel
<object
>[]
Source
packages/framework/store/src/schema/base.ts:224
doc
get
doc():Doc
set
doc(doc
):void
Parameters
• doc: Doc
Returns
Source
packages/framework/store/src/schema/base.ts:209
Methods
dispose()
dispose():
void
Returns
void
Source
packages/framework/store/src/schema/base.ts:257
firstChild()
firstChild():
null
|BlockModel
<object
>
Returns
null
| BlockModel
<object
>
Source
packages/framework/store/src/schema/base.ts:246
isEmpty()
isEmpty():
boolean
Returns
boolean
Source
packages/framework/store/src/schema/base.ts:242
lastChild()
lastChild():
null
|BlockModel
<object
>
Returns
null
| BlockModel
<object
>
Source
packages/framework/store/src/schema/base.ts:250