API > @blocksuite/store > Workspace
Class: Workspace ​
Extends ​
WorkspaceAddonType
Constructors ​
constructor ​
new Workspace(
storeOptions
):Workspace
Parameters ​
Parameter | Type |
---|---|
storeOptions | WorkspaceOptions |
Returns ​
Overrides ​
WorkspaceAddonType.constructor
Defined In ​
packages/store/src/workspace/workspace.ts:33
Properties ​
_schema ​
protected
readonly
_schema:Schema
Defined In ​
packages/store/src/workspace/workspace.ts:23
_store ​
protected
_store:Store
Defined In ​
packages/store/src/workspace/workspace.ts:21
blob ​
blob:
BlobManager
Defined In ​
packages/store/src/workspace/addon/type.ts:6
Inherited from ​
WorkspaceAddonType.blob
exportJSX ​
exportJSX:
function
Parameters ​
Parameter | Type |
---|---|
blockId ? | string |
pageId ? | string |
Returns ​
JSXElement
Defined In ​
packages/store/src/workspace/addon/type.ts:12
Inherited from ​
WorkspaceAddonType.exportJSX
importPageSnapshot ​
importPageSnapshot:
function
Parameters ​
Parameter | Type |
---|---|
json | unknown |
pageId | string |
Returns ​
Promise
< void
>
Defined In ​
packages/store/src/workspace/addon/type.ts:11
Inherited from ​
WorkspaceAddonType.importPageSnapshot
indexer ​
indexer:
Indexer
Defined In ​
packages/store/src/workspace/addon/type.ts:8
Inherited from ​
WorkspaceAddonType.indexer
meta ​
meta:
WorkspaceMeta
Defined In ​
packages/store/src/workspace/workspace.ts:25
search ​
search:
function
Parameters ​
Parameter | Type |
---|---|
query | QueryContent |
Returns ​
Map
< string
, string
>
Defined In ​
packages/store/src/workspace/addon/type.ts:9
Inherited from ​
WorkspaceAddonType.search
slots ​
slots:
object
Type declaration ​
slots.pageAdded
​pageAdded:
Slot
<string
>
slots.pageRemoved
​pageRemoved:
Slot
<string
>
slots.pagesUpdated
​pagesUpdated:
Slot
<void
>
Defined In ​
packages/store/src/workspace/workspace.ts:27
Y ​
static
Y:Y
=Y
Defined In ​
packages/store/src/workspace/workspace.ts:20
Accessors ​
awarenessStore ​
get
awarenessStore():AwarenessStore
<BlockSuiteFlags
>
Defined In ​
packages/store/src/workspace/workspace.ts:61
doc ​
get
doc():BlockSuiteDoc
Defined In ​
packages/store/src/workspace/workspace.ts:73
id ​
get
id():string
Defined In ​
packages/store/src/workspace/workspace.ts:43
idGenerator ​
get
idGenerator():IdGenerator
Defined In ​
packages/store/src/workspace/workspace.ts:77
isEmpty ​
get
isEmpty():boolean
Defined In ​
packages/store/src/workspace/workspace.ts:47
pages ​
get
pages():Map
<string
,Page
>
Defined In ​
packages/store/src/workspace/workspace.ts:69
providers ​
get
providers():DocProvider
[]
Defined In ​
packages/store/src/workspace/workspace.ts:65
schema ​
get
schema():Schema
Defined In ​
packages/store/src/workspace/workspace.ts:81
Methods ​
_bindPageMetaEvents ​
private
_bindPageMetaEvents():void
Returns ​
void
Defined In ​
packages/store/src/workspace/workspace.ts:99
_hasPage ​
private
_hasPage(pageId
):boolean
Parameters ​
Parameter | Type |
---|---|
pageId | string |
Returns ​
boolean
Defined In ​
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 ​
Parameter | Type |
---|---|
options | string | {id : string ;} |
Returns ​
Defined In ​
packages/store/src/workspace/workspace.ts:127
getPage ​
getPage(
pageId
):null
|Page
Parameters ​
Parameter | Type |
---|---|
pageId | string |
Returns ​
null
| Page
Defined In ​
packages/store/src/workspace/workspace.ts:93
registerProvider ​
registerProvider(
providerCreator
,id
?):DocProvider
Parameters ​
Parameter | Type |
---|---|
providerCreator | DocProviderCreator |
id ? | string |
Returns ​
Defined In ​
packages/store/src/workspace/workspace.ts:85
removePage ​
removePage(
pageId
):void
Parameters ​
Parameter | Type |
---|---|
pageId | string |
Returns ​
void
Defined In ​
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 ​
Parameter | Type |
---|---|
pageId | string |
props | Partial < PageMeta > |
Returns ​
void
Defined In ​
packages/store/src/workspace/workspace.ts:155