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 
protectedreadonly_yBlocks:YMap<YBlock>
Defined in 
packages/framework/store/src/store/doc/block-collection.ts:101
_ySpaceDoc 
protectedreadonly_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 
readonlyawarenessStore:AwarenessStore<BlockSuiteFlags>
Defined in 
packages/framework/store/src/store/doc/block-collection.ts:109
id 
readonlyid:string
Defined in 
packages/framework/store/src/store/doc/block-collection.ts:111
rootDoc 
readonlyrootDoc:BlockSuiteDoc
Defined in 
packages/framework/store/src/store/doc/block-collection.ts:113
slots 
readonlyslots:object
historyUpdated 
historyUpdated:
Slot<void>
yBlockUpdated 
yBlockUpdated:
Slot<object|object>
Defined in 
packages/framework/store/src/store/doc/block-collection.ts:115
Accessors 
awarenessSync 
getawarenessSync():AwarenessEngine
Returns 
AwarenessEngine
Defined in 
packages/framework/store/src/store/doc/block-collection.ts:130
blobSync 
getblobSync():BlobEngine
Returns 
BlobEngine
Defined in 
packages/framework/store/src/store/doc/block-collection.ts:134
canRedo 
getcanRedo():boolean
Returns 
boolean
Defined in 
packages/framework/store/src/store/doc/block-collection.ts:138
canUndo 
getcanUndo():boolean
Returns 
boolean
Defined in 
packages/framework/store/src/store/doc/block-collection.ts:145
collection 
getcollection():DocCollection
Returns 
Defined in 
packages/framework/store/src/store/doc/block-collection.ts:152
crud 
getcrud():DocCRUD
Returns 
DocCRUD
Defined in 
packages/framework/store/src/store/doc/block-collection.ts:156
docSync 
getdocSync():DocEngine
Returns 
DocEngine
Defined in 
packages/framework/store/src/store/doc/block-collection.ts:160
history 
gethistory():UndoManager
Returns 
UndoManager
Defined in 
packages/framework/store/src/store/doc/block-collection.ts:164
isEmpty 
getisEmpty():boolean
Returns 
boolean
Defined in 
packages/framework/store/src/store/doc/block-collection.ts:168
loaded 
getloaded():boolean
Returns 
boolean
Defined in 
packages/framework/store/src/store/doc/block-collection.ts:172
meta 
getmeta():undefined|DocMeta
Returns 
undefined | DocMeta
Defined in 
packages/framework/store/src/store/doc/block-collection.ts:176
readonly 
getreadonly():boolean
Returns 
boolean
Defined in 
packages/framework/store/src/store/doc/block-collection.ts:180
ready 
getready():boolean
Returns 
boolean
Defined in 
packages/framework/store/src/store/doc/block-collection.ts:184
schema 
getschema():Schema
Returns 
Defined in 
packages/framework/store/src/store/doc/block-collection.ts:188
spaceDoc 
getspaceDoc():Doc
Returns 
Doc
Defined in 
packages/framework/store/src/store/doc/block-collection.ts:192
Text 
getText(): typeofText
Returns 
typeof Text
Defined in 
packages/framework/store/src/store/doc/block-collection.ts:196
yBlocks 
getyBlocks():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