BlockSuite API Documentation / @blocksuite/store / BlockCollection
Class: BlockCollection
Constructors
new BlockCollection()
new BlockCollection(
__namedParameters
):BlockCollection
Parameters
• __namedParameters: DocOptions
Returns
Defined in
packages/framework/store/src/store/doc/block-collection.ts:204
Properties
_yBlocks
protected
readonly
_yBlocks:YMap
<YBlock
>
Defined in
packages/framework/store/src/store/doc/block-collection.ts:101
_ySpaceDoc
protected
readonly
_ySpaceDoc:Doc
Internal
Used for convenient access to the underlying Yjs map, can be used interchangeably with ySpace
Defined in
packages/framework/store/src/store/doc/block-collection.ts:107
awarenessStore
readonly
awarenessStore:AwarenessStore
<BlockSuiteFlags
>
Defined in
packages/framework/store/src/store/doc/block-collection.ts:109
id
readonly
id:string
Defined in
packages/framework/store/src/store/doc/block-collection.ts:111
rootDoc
readonly
rootDoc:BlockSuiteDoc
Defined in
packages/framework/store/src/store/doc/block-collection.ts:113
slots
readonly
slots:object
historyUpdated
historyUpdated:
Slot
<void
>
yBlockUpdated
yBlockUpdated:
Slot
<object
|object
>
Defined in
packages/framework/store/src/store/doc/block-collection.ts:115
Accessors
awarenessSync
get
awarenessSync():AwarenessEngine
Returns
AwarenessEngine
Defined in
packages/framework/store/src/store/doc/block-collection.ts:130
blobSync
get
blobSync():BlobEngine
Returns
BlobEngine
Defined in
packages/framework/store/src/store/doc/block-collection.ts:134
canRedo
get
canRedo():boolean
Returns
boolean
Defined in
packages/framework/store/src/store/doc/block-collection.ts:138
canUndo
get
canUndo():boolean
Returns
boolean
Defined in
packages/framework/store/src/store/doc/block-collection.ts:145
collection
get
collection():DocCollection
Returns
Defined in
packages/framework/store/src/store/doc/block-collection.ts:152
crud
get
crud():DocCRUD
Returns
DocCRUD
Defined in
packages/framework/store/src/store/doc/block-collection.ts:156
docSync
get
docSync():DocEngine
Returns
DocEngine
Defined in
packages/framework/store/src/store/doc/block-collection.ts:160
history
get
history():UndoManager
Returns
UndoManager
Defined in
packages/framework/store/src/store/doc/block-collection.ts:164
isEmpty
get
isEmpty():boolean
Returns
boolean
Defined in
packages/framework/store/src/store/doc/block-collection.ts:168
loaded
get
loaded():boolean
Returns
boolean
Defined in
packages/framework/store/src/store/doc/block-collection.ts:172
meta
get
meta():undefined
|DocMeta
Returns
undefined
| DocMeta
Defined in
packages/framework/store/src/store/doc/block-collection.ts:176
readonly
get
readonly():boolean
Returns
boolean
Defined in
packages/framework/store/src/store/doc/block-collection.ts:180
ready
get
ready():boolean
Returns
boolean
Defined in
packages/framework/store/src/store/doc/block-collection.ts:184
schema
get
schema():Schema
Returns
Defined in
packages/framework/store/src/store/doc/block-collection.ts:188
spaceDoc
get
spaceDoc():Doc
Returns
Doc
Defined in
packages/framework/store/src/store/doc/block-collection.ts:192
Text
get
Text(): typeofText
Returns
typeof Text
Defined in
packages/framework/store/src/store/doc/block-collection.ts:196
yBlocks
get
yBlocks():YMap
<YBlock
>
Returns
YMap
<YBlock
>
Defined in
packages/framework/store/src/store/doc/block-collection.ts:200
Methods
captureSync()
captureSync():
void
Capture current operations to undo stack synchronously.
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:283
clear()
clear():
void
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:287
clearQuery()
clearQuery(
query
,readonly
?):void
Parameters
• query: Query
• readonly?: boolean
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:291
destroy()
destroy():
void
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:297
dispose()
dispose():
void
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:303
generateBlockId()
generateBlockId():
string
Returns
string
Defined in
packages/framework/store/src/store/doc/block-collection.ts:312
getDoc()
getDoc(
__namedParameters
):Doc
Parameters
• __namedParameters: GetDocOptions
= {}
Returns
Defined in
packages/framework/store/src/store/doc/block-collection.ts:316
load()
load(
initFn
?):this
Parameters
• initFn?
Returns
this
Defined in
packages/framework/store/src/store/doc/block-collection.ts:338
redo()
redo():
void
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:362
remove()
remove():
void
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:370
resetHistory()
resetHistory():
void
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:375
transact()
transact(
fn
,shouldTransact
):void
If shouldTransact
is false
, the transaction will not be push to the history stack.
Parameters
• fn
• shouldTransact: boolean
= ...
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:382
undo()
undo():
void
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:399
withoutTransact()
withoutTransact(
callback
):void
Parameters
• callback
Returns
void
Defined in
packages/framework/store/src/store/doc/block-collection.ts:407