BlockSuite API Documentation / @blocksuite/store / BlockModel
Class: BlockModel<Props, PropsSignal>
Extends
PropsSignal
Extended by
DatabaseBlockModel
DataViewBlockModel
EdgelessBlockModel
ParagraphBlockModel
RootBlockModel
DatabaseBlockModel
ParagraphBlockModel
RootBlockModel
Type Parameters
• Props extends object
= object
• PropsSignal extends object
= SignaledProps
<Props
>
Constructors
new BlockModel()
new BlockModel<
Props
,PropsSignal
>():BlockModel
<Props
,PropsSignal
>
Returns
BlockModel
<Props
, PropsSignal
>
Overrides
MagicProps()<PropsSignal>.constructor
Defined in
packages/framework/store/src/schema/base.ts:237
Properties
[modelLabel]
[modelLabel]:
Props
Defined in
packages/framework/store/src/schema/base.ts:204
childMap
childMap:
ReadonlySignal
<Map
<string
,number
>>
Defined in
packages/framework/store/src/schema/base.ts:182
created
created:
Slot
<void
>
Defined in
packages/framework/store/src/schema/base.ts:189
deleted
deleted:
Slot
<void
>
Defined in
packages/framework/store/src/schema/base.ts:191
flavour
flavour:
string
Defined in
packages/framework/store/src/schema/base.ts:193
id
id:
string
Defined in
packages/framework/store/src/schema/base.ts:195
isEmpty
isEmpty:
ReadonlySignal
<boolean
>
Defined in
packages/framework/store/src/schema/base.ts:197
keys
keys:
string
[]
Defined in
packages/framework/store/src/schema/base.ts:201
page
page:
Doc
Deprecated
use doc instead
Defined in
packages/framework/store/src/schema/base.ts:165
pop()
pop: (
prop
) =>void
Parameters
prop
keyof Props
& string
Returns
void
Defined in
packages/framework/store/src/schema/base.ts:206
propsUpdated
propsUpdated:
Slot
<{key
:string
; }>
Defined in
packages/framework/store/src/schema/base.ts:208
role
role:
"root"
|"hub"
|"content"
Defined in
packages/framework/store/src/schema/base.ts:210
stash()
stash: (
prop
) =>void
Parameters
prop
keyof Props
& string
Returns
void
Defined in
packages/framework/store/src/schema/base.ts:212
text?
optional
text:Text
Defined in
packages/framework/store/src/schema/base.ts:215
version
version:
number
Defined in
packages/framework/store/src/schema/base.ts:217
yBlock
yBlock:
YBlock
Defined in
packages/framework/store/src/schema/base.ts:219
Accessors
children
Get Signature
get children():
BlockModel
<object
,SignaledProps
<object
>>[]
Returns
BlockModel
<object
, SignaledProps
<object
>>[]
Defined in
packages/framework/store/src/schema/base.ts:221
doc
Get Signature
get doc():
Doc
Returns
Set Signature
set doc(
doc
):void
Parameters
doc
Returns
void
Defined in
packages/framework/store/src/schema/base.ts:225
parent
Get Signature
get parent():
null
|BlockModel
<object
,SignaledProps
<object
>>
Returns
null
| BlockModel
<object
, SignaledProps
<object
>>
Defined in
packages/framework/store/src/schema/base.ts:233
Methods
[dispose]()
[dispose]():
void
Returns
void
Defined in
packages/framework/store/src/schema/base.ts:272
dispose()
dispose():
void
Returns
void
Defined in
packages/framework/store/src/schema/base.ts:255
firstChild()
firstChild():
null
|BlockModel
<object
,SignaledProps
<object
>>
Returns
null
| BlockModel
<object
, SignaledProps
<object
>>
Defined in
packages/framework/store/src/schema/base.ts:261
lastChild()
lastChild():
null
|BlockModel
<object
,SignaledProps
<object
>>
Returns
null
| BlockModel
<object
, SignaledProps
<object
>>
Defined in
packages/framework/store/src/schema/base.ts:265