BlockSuite API Documentation / @blocksuite/store / Workspace
Class: Workspace ​
Contents ​
Extends ​
WorkspaceAddonType
Constructors ​
new Workspace(storeOptions) ​
new Workspace(
storeOptions):Workspace
Parameters ​
• storeOptions: WorkspaceOptions
Returns ​
Overrides ​
WorkspaceAddonType.constructor
Source ​
packages/store/src/workspace/workspace.ts:33
Properties ​
_schema ​
protectedreadonly_schema:Schema
Source ​
packages/store/src/workspace/workspace.ts:23
_store ​
protected_store:Store
Source ​
packages/store/src/workspace/workspace.ts:21
blob ​
blob:
BlobManager
Inherited from ​
WorkspaceAddonType.blob
Source ​
packages/store/src/workspace/addon/type.ts:6
exportJSX ​
exportJSX: (
blockId?,pageId?) =>JSXElement
Parameters ​
• blockId?: string
• pageId?: string
Returns ​
JSXElement
Inherited from ​
WorkspaceAddonType.exportJSX
Source ​
packages/store/src/workspace/addon/type.ts:12
importPageSnapshot ​
importPageSnapshot: (
json,pageId) =>Promise<void>
Parameters ​
• json: unknown
• pageId: string
Returns ​
Promise<void>
Inherited from ​
WorkspaceAddonType.importPageSnapshot
Source ​
packages/store/src/workspace/addon/type.ts:11
indexer ​
indexer:
Indexer
Inherited from ​
WorkspaceAddonType.indexer
Source ​
packages/store/src/workspace/addon/type.ts:8
meta ​
meta:
WorkspaceMeta
Source ​
packages/store/src/workspace/workspace.ts:25
search ​
search: (
query) =>Map<string,string>
Parameters ​
• query: QueryContent
Returns ​
Map<string, string>
Inherited from ​
WorkspaceAddonType.search
Source ​
packages/store/src/workspace/addon/type.ts:9
slots ​
slots:
Object
Type declaration ​
pageAdded ​
pageAdded:
Slot<string>
pageRemoved ​
pageRemoved:
Slot<string>
pagesUpdated ​
pagesUpdated:
Slot<void>
Source ​
packages/store/src/workspace/workspace.ts:27
Y ​
staticY:Y=Y
Source ​
packages/store/src/workspace/workspace.ts:20
Accessors ​
awarenessStore ​
getawarenessStore():AwarenessStore<BlockSuiteFlags>
Returns ​
AwarenessStore<BlockSuiteFlags>
Source ​
packages/store/src/workspace/workspace.ts:61
doc ​
getdoc():BlockSuiteDoc
Returns ​
Source ​
packages/store/src/workspace/workspace.ts:73
id ​
getid():string
Returns ​
string
Source ​
packages/store/src/workspace/workspace.ts:43
idGenerator ​
getidGenerator():IdGenerator
Returns ​
Source ​
packages/store/src/workspace/workspace.ts:77
isEmpty ​
getisEmpty():boolean
Returns ​
boolean
Source ​
packages/store/src/workspace/workspace.ts:47
pages ​
getpages():Map<string,Page>
Returns ​
Map<string, Page>
Source ​
packages/store/src/workspace/workspace.ts:69
providers ​
getproviders():DocProvider[]
Returns ​
Source ​
packages/store/src/workspace/workspace.ts:65
schema ​
getschema():Schema
Returns ​
Source ​
packages/store/src/workspace/workspace.ts:81
Methods ​
_bindPageMetaEvents() ​
private_bindPageMetaEvents():void
Returns ​
void
Source ​
packages/store/src/workspace/workspace.ts:99
_hasPage() ​
private_hasPage(pageId):boolean
Parameters ​
• pageId: string
Returns ​
boolean
Source ​
packages/store/src/workspace/workspace.ts:89
createPage() ​
createPage(
options):Page
By default, only an empty page will be created. If the init parameter is passed, a surface, note, and paragraph block will be created in the page simultaneously.
Parameters ​
• options: string | Object= {}
Returns ​
Source ​
packages/store/src/workspace/workspace.ts:127
getPage() ​
getPage(
pageId):null|Page
Parameters ​
• pageId: string
Returns ​
null | Page
Source ​
packages/store/src/workspace/workspace.ts:93
registerProvider() ​
registerProvider(
providerCreator,id?):DocProvider
Parameters ​
• providerCreator: DocProviderCreator
• id?: string
Returns ​
Source ​
packages/store/src/workspace/workspace.ts:85
removePage() ​
removePage(
pageId):void
Parameters ​
• pageId: string
Returns ​
void
Source ​
packages/store/src/workspace/workspace.ts:163
setPageMeta() ​
setPageMeta(
pageId,props):void
Update page meta state. Note that this intentionally does not mutate page state.
Parameters ​
• pageId: string
• props: Partial<PageMeta>
Returns ​
void
Source ​
packages/store/src/workspace/workspace.ts:155
Generated using typedoc-plugin-markdown and TypeDoc