BlockSuite API Documentation / @blocksuite/blocks / BlocksUtils
Variable: BlocksUtils
const
BlocksUtils:Object
Type declaration
Point
Point: typeof
Point
deserializeXYWH
deserializeXYWH: (
xywh
) =>XYWH
Parameters
• xywh: string
Returns
XYWH
isCanvasElement
isCanvasElement: (
selectable
) =>selectable is CanvasElement
Parameters
• selectable: null
| EdgelessModel
Returns
selectable is CanvasElement
matchFlavours
matchFlavours: <
Key
>(model
,expected
) =>model is BlockModels[Key[number]]
Type parameters
• Key extends keyof BlockModels
[]
Parameters
• model: null
| BlockModel
<object
>
• expected: Key
Returns
model is BlockModels[Key[number]]
mindMap
mindMap:
Object
mindMap.changeText
mindMap.changeText: (
id
,text
,service
) =>void
Parameters
• id: string
• text: string
• service: EdgelessPageService
Returns
void
mindMap.createNode
mindMap.createNode: (
text
,service
,connector
?) =>string
Parameters
• text: string
• service: EdgelessPageService
• connector?: Connector
Returns
string
mindMap.drawInEdgeless
mindMap.drawInEdgeless: (
service
,mindMap
,ops
?) =>void
=drawMindMap
Parameters
• service: EdgelessPageService
• mindMap: TreeNode
• ops?: Object
• ops.rootId?: string
• ops.x?: number
• ops.y?: number
Returns
void
mindMap.layout
mindMap.layout:
Object
mindMap.layout.bottom
mindMap.layout.bottom:
Layout
=bottomLayout
mindMap.layout.left
mindMap.layout.left:
Layout
=leftLayout
mindMap.layout.leftRight
mindMap.layout.leftRight:
Layout
=leftRightLayout
mindMap.layout.right
mindMap.layout.right:
Layout
=rightLayout
mindMap.layout.top
mindMap.layout.top:
Layout
=topLayout
mindMap.layout.topBottom
mindMap.layout.topBottom:
Layout
=topBottomLayout
mindMap.layoutInEdgeless
mindMap.layoutInEdgeless: (
service
,mindMap
,ops
?) =>void
=layoutMindMap
Parameters
• service: EdgelessPageService
• mindMap: TreeNodeWithId
• ops?: Object
• ops.rootId?: string
• ops.x?: number
• ops.y?: number
Returns
void
splitElements
splitElements: (
elements
) =>Object
Parameters
• elements: EdgelessModel
[]
Returns
Object
frames
frames:
FrameBlockModel
[]images
images:
ImageBlockModel
[]notes
notes:
NoteBlockModel
[]shapes
shapes:
CanvasElement
[]
Source
packages/blocks/src/index.ts:118
Generated using TypeDoc and typedoc-plugin-markdown.