Skip to content

BlockSuite API Documentation / @blocksuite/blocks / BlocksUtils

Variable: BlocksUtils

const BlocksUtils: object

Type declaration

deserializeXYWH()

deserializeXYWH: (xywh) => XYWH

Parameters

xywh: string

Returns

XYWH

isCanvasElement()

isCanvasElement: (selectable) => selectable is SurfaceModel

Parameters

selectable: null | GfxModel

Returns

selectable is SurfaceModel

matchFlavours()

matchFlavours: <Key>(model, expected) => model is BlockModels[Key[number]]

Type Parameters

Key extends keyof BlockModels[]

Parameters

model: null | BlockModel<object, SignaledProps<object>>

expected: Key

Returns

model is BlockModels[Key[number]]

Point

Point: typeof Point

splitElements()

splitElements: (elements) => object

Parameters

elements: GfxModel[]

Returns

object

edgelessTexts

edgelessTexts: EdgelessTextBlockModel[]

embedSyncedDocs

embedSyncedDocs: EmbedSyncedDocModel[]

frames

frames: FrameBlockModel[]

images

images: ImageBlockModel[]

notes

notes: NoteBlockModel[]

shapes

shapes: SurfaceModel[]

Defined in

packages/blocks/src/index.ts:116