BlockSuite API Documentation / @blocksuite/store / Space
Class: Space<State>
Extended by
Type parameters
• State extends Record<string, unknown> = Record<string, any>
Constructors
new Space(id, rootDoc, awarenessStore)
new Space<
State>(id,rootDoc,awarenessStore):Space<State>
Parameters
• id: string
• rootDoc: BlockSuiteDoc
• awarenessStore: AwarenessStore<BlockSuiteFlags>
Returns
Space<State>
Source
packages/framework/store/src/workspace/space.ts:31
Properties
_loaded
private_loaded:boolean
Source
packages/framework/store/src/workspace/space.ts:20
_onLoadSlot
private_onLoadSlot:Slot<void>
Source
packages/framework/store/src/workspace/space.ts:22
_yBlocks
protectedreadonly_yBlocks:Map<State[keyofState]>
Source
packages/framework/store/src/workspace/space.ts:29
_ySpaceDoc
protectedreadonly_ySpaceDoc:Doc
Used for convenient access to the underlying Yjs map, can be used interchangeably with ySpace
Source
packages/framework/store/src/workspace/space.ts:28
awarenessStore
readonlyawarenessStore:AwarenessStore<BlockSuiteFlags>
Source
packages/framework/store/src/workspace/space.ts:18
id
readonlyid:string
Source
packages/framework/store/src/workspace/space.ts:16
rootDoc
readonlyrootDoc:BlockSuiteDoc
Source
packages/framework/store/src/workspace/space.ts:17
Accessors
loaded
getloaded():boolean
Returns
boolean
Source
packages/framework/store/src/workspace/space.ts:49
spaceDoc
getspaceDoc():Doc
Returns
Source
packages/framework/store/src/workspace/space.ts:53
yBlocks
getyBlocks():Map<State[keyofState]>
Returns
Map<State[keyof State]>
Source
packages/framework/store/src/workspace/space.ts:45
Methods
_initSubDoc()
private_initSubDoc():Doc
Returns
Source
packages/framework/store/src/workspace/space.ts:78
_onSubdocEvent()
private_onSubdocEvent(__namedParameters):void
Parameters
• __namedParameters: Object
• __namedParameters.loaded: Set<Doc>
Returns
void
Source
packages/framework/store/src/workspace/space.ts:95
clear()
clear():
void
Returns
void
Source
packages/framework/store/src/workspace/space.ts:74
destroy()
destroy():
void
Returns
void
Source
packages/framework/store/src/workspace/space.ts:68
load()
load():
Space<State>
Returns
Space<State>
Source
packages/framework/store/src/workspace/space.ts:57
remove()
remove():
void
Returns
void
Source
packages/framework/store/src/workspace/space.ts:63
transact()
transact(
fn,shouldTransact):void
If shouldTransact is false, the transaction will not be push to the history stack.
Parameters
• fn: () => void
• shouldTransact: boolean= true
Returns
void
Source
packages/framework/store/src/workspace/space.ts:110
Generated using TypeDoc and typedoc-plugin-markdown.