Skip to content

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

Class: SpecStore

Constructors

new SpecStore()

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


slots

readonly slots: object

afterApply

afterApply: Slot<void>

afterMount

afterMount: Slot<void>

afterUnmount

afterUnmount: Slot<void>

beforeApply

beforeApply: Slot<void>

beforeMount

beforeMount: Slot<void>

beforeUnmount

beforeUnmount: Slot<void>

Source

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


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:113


_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:74


applySpecs()

applySpecs(specs): void

Parameters

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

Returns

void

Source

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


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:66

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:69


getView()

getView(flavour): null | BlockView<string>

Parameters

flavour: string

Returns

null | BlockView<string>

Source

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


mount()

mount(): void

Returns

void

Source

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


unmount()

unmount(): void

Returns

void

Source

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