Skip to content

BlockSuite API Documentation / @blocksuite/block-std / SpecStore

Class: SpecStore

Constructors

new SpecStore(std)

new SpecStore(std): SpecStore

Parameters

std: BlockStdScope

Returns

SpecStore

Source

packages/framework/block-std/src/spec/spec-store.ts:12

Properties

_disposables

private _disposables: DisposableGroup

Source

packages/framework/block-std/src/spec/spec-store.ts:10


_services

private _services: Map<string, BlockService<BlockModel<object>>>

Source

packages/framework/block-std/src/spec/spec-store.ts:9


_specs

private _specs: Map<string, BlockSpec<string, BlockService<BlockModel<object>>>>

Source

packages/framework/block-std/src/spec/spec-store.ts:8


std

std: BlockStdScope

Source

packages/framework/block-std/src/spec/spec-store.ts:12

Methods

_buildSpecMap()

private _buildSpecMap(specs): Map<string, BlockSpec<string, BlockService<BlockModel<object>>>>

Parameters

specs: BlockSpec<string, BlockService<BlockModel<object>>>[]

Returns

Map<string, BlockSpec<string, BlockService<BlockModel<object>>>>

Source

packages/framework/block-std/src/spec/spec-store.ts:92


_diffServices()

private _diffServices(oldSpecs, newSpecs): void

Parameters

oldSpecs: Map<string, BlockSpec<string, BlockService<BlockModel<object>>>>

newSpecs: Map<string, BlockSpec<string, BlockService<BlockModel<object>>>>

Returns

void

Source

packages/framework/block-std/src/spec/spec-store.ts:53


applySpecs()

applySpecs(specs): void

Parameters

specs: BlockSpec<string, BlockService<BlockModel<object>>>[]

Returns

void

Source

packages/framework/block-std/src/spec/spec-store.ts:29


getService()

getService(flavour)

getService<Key>(flavour): BlockServices[Key]

Type parameters

Key extends never

Parameters

flavour: Key

Returns

BlockServices[Key]

Source

packages/framework/block-std/src/spec/spec-store.ts:45

getService(flavour)

getService<Service>(flavour): Service

Type parameters

Service extends BlockService<BlockModel<object>>

Parameters

flavour: string

Returns

Service

Source

packages/framework/block-std/src/spec/spec-store.ts:48


getView()

getView(flavour): null | BlockView<string>

Parameters

flavour: string

Returns

null | BlockView<string>

Source

packages/framework/block-std/src/spec/spec-store.ts:36


mount()

mount(): void

Returns

void

Source

packages/framework/block-std/src/spec/spec-store.ts:14


unmount()

unmount(): void

Returns

void

Source

packages/framework/block-std/src/spec/spec-store.ts:20