BlockSuite API Documentation / @blocksuite/store / BlockModel
Class: BlockModel<Props, PropsSignal>
Extends
PropsSignal
Extended by
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:261
Properties
[modelLabel]
[modelLabel]:
Props
Defined in
packages/framework/store/src/schema/base.ts:226
childMap
childMap:
ReadonlySignal
<Map
<string
,number
>>
Defined in
packages/framework/store/src/schema/base.ts:204
created
created:
Slot
<void
>
Defined in
packages/framework/store/src/schema/base.ts:211
deleted
deleted:
Slot
<void
>
Defined in
packages/framework/store/src/schema/base.ts:213
flavour
flavour:
string
Defined in
packages/framework/store/src/schema/base.ts:215
id
id:
string
Defined in
packages/framework/store/src/schema/base.ts:217
isEmpty
isEmpty:
ReadonlySignal
<boolean
>
Defined in
packages/framework/store/src/schema/base.ts:219
keys
keys:
string
[]
Defined in
packages/framework/store/src/schema/base.ts:223
mutex()?
optional
mutex: (cb
) =>void
Parameters
• cb
Returns
void
Defined in
packages/framework/store/src/schema/base.ts:228
page
page:
Doc
Deprecated
use doc instead
Defined in
packages/framework/store/src/schema/base.ts:187
pop()
pop: (
prop
) =>void
Parameters
• prop: keyof Props
& string
Returns
void
Defined in
packages/framework/store/src/schema/base.ts:230
propsUpdated
propsUpdated:
Slot
<object
>
Type declaration
key
key:
string
Defined in
packages/framework/store/src/schema/base.ts:232
role
role:
"root"
|"hub"
|"content"
Defined in
packages/framework/store/src/schema/base.ts:234
stash()
stash: (
prop
) =>void
Parameters
• prop: keyof Props
& string
Returns
void
Defined in
packages/framework/store/src/schema/base.ts:236
text?
optional
text:Text
Defined in
packages/framework/store/src/schema/base.ts:239
version
version:
number
Defined in
packages/framework/store/src/schema/base.ts:241
yBlock
yBlock:
YBlock
Defined in
packages/framework/store/src/schema/base.ts:243
Accessors
children
get
children():BlockModel
<object
,SignaledProps
<object
>>[]
Returns
BlockModel
<object
, SignaledProps
<object
>>[]
Defined in
packages/framework/store/src/schema/base.ts:245
doc
get
doc():Doc
set
doc(doc
):void
Parameters
• doc: Doc
Returns
Defined in
packages/framework/store/src/schema/base.ts:249
parent
get
parent():null
|BlockModel
<object
,SignaledProps
<object
>>
Returns
null
| BlockModel
<object
, SignaledProps
<object
>>
Defined in
packages/framework/store/src/schema/base.ts:257
Methods
[dispose]()
[dispose]():
void
Returns
void
Defined in
packages/framework/store/src/schema/base.ts:296
dispose()
dispose():
void
Returns
void
Defined in
packages/framework/store/src/schema/base.ts:279
firstChild()
firstChild():
null
|BlockModel
<object
,SignaledProps
<object
>>
Returns
null
| BlockModel
<object
, SignaledProps
<object
>>
Defined in
packages/framework/store/src/schema/base.ts:285
lastChild()
lastChild():
null
|BlockModel
<object
,SignaledProps
<object
>>
Returns
null
| BlockModel
<object
, SignaledProps
<object
>>
Defined in
packages/framework/store/src/schema/base.ts:289