Skip to content

BlockSuite API Documentation / @blocksuite/store / BlockModel

Class: BlockModel<Props>

Extends

  • Props

Type parameters

Props extends object = object

Constructors

new BlockModel(undefined)

new BlockModel<Props>(): BlockModel<Props>

Returns

BlockModel<Props>

Inherited from

MagicProps()<Props>.constructor

Source

packages/framework/store/src/schema/base.ts:166

Properties

childrenUpdated

childrenUpdated: Slot<void>

Source

packages/framework/store/src/schema/base.ts:193


created

created: Slot<void>

Source

packages/framework/store/src/schema/base.ts:190


deleted

deleted: Slot<void>

Source

packages/framework/store/src/schema/base.ts:191


flavour

flavour: string

Source

packages/framework/store/src/schema/base.ts:177


id

id: string

Source

packages/framework/store/src/schema/base.ts:180


keys

keys: string[]

Source

packages/framework/store/src/schema/base.ts:182


page

page: Page

Source

packages/framework/store/src/schema/base.ts:179


pop

pop: (prop) => void

Parameters

prop: keyof Props & string

Returns

void

Source

packages/framework/store/src/schema/base.ts:185


propsUpdated

propsUpdated: Slot<Object>

Type declaration

key

key: string

Source

packages/framework/store/src/schema/base.ts:192


role

role: "root" | "hub" | "content"

Source

packages/framework/store/src/schema/base.ts:178


stash

stash: (prop) => void

Parameters

prop: keyof Props & string

Returns

void

Source

packages/framework/store/src/schema/base.ts:184


text?

text?: Text

Source

packages/framework/store/src/schema/base.ts:188


version

version: number

Source

packages/framework/store/src/schema/base.ts:176


yBlock

yBlock: YBlock

Source

packages/framework/store/src/schema/base.ts:181

Accessors

childMap

get childMap(): Map<string, number>

Returns

Map<string, number>

Source

packages/framework/store/src/schema/base.ts:195


children

get children(): BlockModel<object>[]

Returns

BlockModel<object>[]

Source

packages/framework/store/src/schema/base.ts:202

Methods

clone()

clone(): this

Returns

this

Source

packages/framework/store/src/schema/base.ts:249


dispose()

dispose(): void

Returns

void

Source

packages/framework/store/src/schema/base.ts:242


firstChild()

firstChild(): null | BlockModel<object>

Returns

null | BlockModel<object>

Source

packages/framework/store/src/schema/base.ts:224


isEmpty()

isEmpty(): boolean

Returns

boolean

Source

packages/framework/store/src/schema/base.ts:220


lastChild()

lastChild(): null | BlockModel<object>

Returns

null | BlockModel<object>

Source

packages/framework/store/src/schema/base.ts:228


lastItem()

lastItem(): null | BlockModel<object>

Returns

null | BlockModel<object>

Source

packages/framework/store/src/schema/base.ts:235


Generated using TypeDoc and typedoc-plugin-markdown.