drawui-core 0.4.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -18,7 +18,7 @@ interface ShapeStyle {
18
18
  /** 描边色透明度(0-1),缺省为 1;与 strokeColor 叠加使用 */
19
19
  strokeOpacity?: number;
20
20
  }
21
- type ShapeType = 'rectangle' | 'rounded-rectangle' | 'circle' | 'ellipse' | 'diamond' | 'triangle' | 'hexagon' | 'parallelogram' | 'trapezoid' | 'pentagon' | 'octagon' | 'star' | 'cylinder' | 'cloud' | 'heart' | 'block-arrow-right' | 'block-arrow-left' | 'block-arrow-up' | 'block-arrow-down' | 'block-arrow-double' | 'right-triangle' | 'cross' | 'speech-rect' | 'speech-round' | 'cube' | 'sector' | 'delay' | 'predefined-process' | 'document' | 'stadium' | 'class-catalog' | 'chevron' | 'brace-left' | 'brace-right' | 'envelope' | 'checkbox' | 'sticky-note' | 'triangular-pyramid' | 'quadrangular-pyramid' | 'cuboid' | 'sphere' | 'ellipsoid' | 'pie' | 'hollow-pie' | 'uml-class' | 'uml-interface' | 'mind-map' | 'icon' | 'line' | 'arrow' | 'text' | 'draw';
21
+ type ShapeType = 'rectangle' | 'rounded-rectangle' | 'circle' | 'ellipse' | 'diamond' | 'triangle' | 'hexagon' | 'parallelogram' | 'trapezoid' | 'pentagon' | 'octagon' | 'star' | 'cylinder' | 'cloud' | 'heart' | 'block-arrow-right' | 'block-arrow-left' | 'block-arrow-up' | 'block-arrow-down' | 'block-arrow-double' | 'right-triangle' | 'cross' | 'speech-rect' | 'speech-round' | 'cube' | 'sector' | 'delay' | 'predefined-process' | 'document' | 'stadium' | 'class-catalog' | 'chevron' | 'brace-left' | 'brace-right' | 'envelope' | 'checkbox' | 'sticky-note' | 'triangular-pyramid' | 'quadrangular-pyramid' | 'cuboid' | 'sphere' | 'ellipsoid' | 'pie' | 'hollow-pie' | 'uml-class' | 'uml-interface' | 'mind-map' | 'table' | 'icon' | 'line' | 'arrow' | 'text' | 'draw';
22
22
  interface BaseShape {
23
23
  id: string;
24
24
  type: ShapeType;
@@ -32,7 +32,20 @@ interface BaseShape {
32
32
  highlightColor?: string;
33
33
  /** 文字高亮背景透明度(0-1),缺省为 1 */
34
34
  highlightOpacity?: number;
35
+ /** 锁定:不可选中/拖动/缩放/删除(右键菜单可解锁) */
36
+ locked?: boolean;
37
+ /** 水平翻转(围绕自身中心镜像;文字/连线等不适用,见 isFlippableShapeType) */
38
+ flipX?: boolean;
39
+ /** 垂直翻转(围绕自身中心镜像) */
40
+ flipY?: boolean;
41
+ /**
42
+ * 分组 id:同一组的图形「同进同退」——点选任一成员即选中整组(一起拖动/删除/改变层级),
43
+ * 组锁定时整组都不可选中、不可拖动,等同于给多个图形绑了一把锁。
44
+ */
45
+ groupId?: string;
35
46
  }
47
+ /** 该类型的图形是否支持水平/垂直翻转(右键菜单据此禁用) */
48
+ declare function isFlippableShapeType(type: ShapeType): boolean;
36
49
  interface RectangleShape extends BaseShape {
37
50
  type: 'rectangle';
38
51
  width: number;
@@ -159,7 +172,7 @@ interface PathShape extends BaseShape {
159
172
  width: number;
160
173
  height: number;
161
174
  }
162
- type UmlVisibility = '+' | '-' | '#' | '~';
175
+ type UmlVisibility = '+' | '-' | '#' | '~' | '';
163
176
  interface UmlAttribute {
164
177
  id: string;
165
178
  visibility: UmlVisibility;
@@ -330,8 +343,38 @@ interface MindMapShape extends BaseShape {
330
343
  height: number;
331
344
  root: MindMapNode;
332
345
  }
333
- type Shape = RectangleShape | RoundedRectangleShape | CircleShape | EllipseShape | DiamondShape | TriangleShape | HexagonShape | ParallelogramShape | TrapezoidShape | PentagonShape | OctagonShape | StarShape | CylinderShape | CloudShape | HeartShape | BlockArrowShape | StadiumShape | StickyNoteShape | IconShape | PathShape | UmlClassShape | UmlInterfaceShape | LineShape | ArrowShape | TextShape | DrawShape | MindMapShape;
334
- type ToolType = 'select' | 'hand' | 'rectangle' | 'rounded-rectangle' | 'circle' | 'ellipse' | 'diamond' | 'triangle' | 'hexagon' | 'parallelogram' | 'trapezoid' | 'pentagon' | 'octagon' | 'star' | 'cylinder' | 'cloud' | 'heart' | 'block-arrow-right' | 'block-arrow-left' | 'block-arrow-up' | 'block-arrow-down' | 'block-arrow-double' | 'right-triangle' | 'cross' | 'speech-rect' | 'speech-round' | 'cube' | 'sector' | 'delay' | 'predefined-process' | 'document' | 'stadium' | 'class-catalog' | 'chevron' | 'brace-left' | 'brace-right' | 'envelope' | 'checkbox' | 'sticky-note' | 'triangular-pyramid' | 'quadrangular-pyramid' | 'cuboid' | 'sphere' | 'ellipsoid' | 'pie' | 'hollow-pie' | 'uml-class' | 'uml-interface' | 'line' | 'arrow' | 'text' | 'draw' | 'pen' | 'highlighter' | 'eraser' | 'mind-map' | 'icon';
346
+ /**
347
+ * 表格单元格:合并模型见 `table.ts` —— 只有合并区域的**左上角锚点**携带
348
+ * `rowSpan/colSpan`,区域内其余格子是被覆盖格(数据保持空 `{text:''}`,
349
+ * 渲染/命中时跳过,点击映射回锚点)。
350
+ */
351
+ interface TableCell {
352
+ text: string;
353
+ textColor?: string;
354
+ fontSize?: number;
355
+ bold?: boolean;
356
+ /** 单元格底色(缺省透明,透出表格 style.fillColor) */
357
+ fillColor?: string;
358
+ align?: 'left' | 'center' | 'right';
359
+ rowSpan?: number;
360
+ colSpan?: number;
361
+ }
362
+ /**
363
+ * 表格:(x,y) 为中心 + width/height(与矩形一致),但宽高恒等于
364
+ * colWidths/rowHeights 之和(见 table.ts),行列结构由纯函数操作。
365
+ */
366
+ interface TableShape extends BaseShape {
367
+ type: 'table';
368
+ /** 恒等于 colWidths / rowHeights 之和,写回时同步 */
369
+ width: number;
370
+ height: number;
371
+ colWidths: number[];
372
+ rowHeights: number[];
373
+ /** cells[row][col] */
374
+ cells: TableCell[][];
375
+ }
376
+ type Shape = RectangleShape | RoundedRectangleShape | CircleShape | EllipseShape | DiamondShape | TriangleShape | HexagonShape | ParallelogramShape | TrapezoidShape | PentagonShape | OctagonShape | StarShape | CylinderShape | CloudShape | HeartShape | BlockArrowShape | StadiumShape | StickyNoteShape | IconShape | PathShape | UmlClassShape | UmlInterfaceShape | LineShape | ArrowShape | TextShape | DrawShape | MindMapShape | TableShape;
377
+ type ToolType = 'select' | 'hand' | 'rectangle' | 'rounded-rectangle' | 'circle' | 'ellipse' | 'diamond' | 'triangle' | 'hexagon' | 'parallelogram' | 'trapezoid' | 'pentagon' | 'octagon' | 'star' | 'cylinder' | 'cloud' | 'heart' | 'block-arrow-right' | 'block-arrow-left' | 'block-arrow-up' | 'block-arrow-down' | 'block-arrow-double' | 'right-triangle' | 'cross' | 'speech-rect' | 'speech-round' | 'cube' | 'sector' | 'delay' | 'predefined-process' | 'document' | 'stadium' | 'class-catalog' | 'chevron' | 'brace-left' | 'brace-right' | 'envelope' | 'checkbox' | 'sticky-note' | 'triangular-pyramid' | 'quadrangular-pyramid' | 'cuboid' | 'sphere' | 'ellipsoid' | 'pie' | 'hollow-pie' | 'uml-class' | 'uml-interface' | 'line' | 'arrow' | 'text' | 'draw' | 'pen' | 'highlighter' | 'eraser' | 'mind-map' | 'table' | 'icon';
335
378
  interface CameraState {
336
379
  x: number;
337
380
  y: number;
@@ -638,6 +681,40 @@ declare const zhCN: {
638
681
  readonly 'mindmap.expand': "展开";
639
682
  readonly 'mindmap.close': "关闭编辑";
640
683
  readonly 'mindmap.more': "更多设置";
684
+ readonly 'tool.table': "表格";
685
+ readonly 'toolbar.table': "表格";
686
+ readonly 'shape.table': "表格";
687
+ readonly 'table.insertRow': "插入行";
688
+ readonly 'table.deleteRow': "删除行";
689
+ readonly 'table.insertCol': "插入列";
690
+ readonly 'table.deleteCol': "删除列";
691
+ readonly 'table.merge': "合并单元格";
692
+ readonly 'table.split': "拆分单元格";
693
+ readonly 'table.insertRowAbove': "在上方插入行";
694
+ readonly 'table.insertRowBelow': "在下方插入行";
695
+ readonly 'table.insertColLeft': "在左侧插入列";
696
+ readonly 'table.insertColRight': "在右侧插入列";
697
+ readonly 'table.pickHint': "拖选行列数";
698
+ readonly 'ctx.copy': "复制";
699
+ readonly 'ctx.copyAsImage': "复制为图片";
700
+ readonly 'ctx.paste': "粘贴";
701
+ readonly 'ctx.duplicate': "创建副本";
702
+ readonly 'ctx.layer': "层级";
703
+ readonly 'ctx.bringToFront': "置于顶层";
704
+ readonly 'ctx.bringForward': "上移一层";
705
+ readonly 'ctx.sendBackward': "下移一层";
706
+ readonly 'ctx.sendToBack': "置于底层";
707
+ readonly 'ctx.copyStyle': "复制样式";
708
+ readonly 'ctx.pasteStyle': "粘贴样式";
709
+ readonly 'ctx.flipH': "水平翻转";
710
+ readonly 'ctx.flipV': "垂直翻转";
711
+ readonly 'ctx.rotate': "旋转";
712
+ readonly 'ctx.group': "成组";
713
+ readonly 'ctx.ungroup': "解组";
714
+ readonly 'ctx.lock': "锁定";
715
+ readonly 'ctx.unlock': "解锁";
716
+ readonly 'ctx.unlockGroup': "解锁本组";
717
+ readonly 'ctx.delete': "删除";
641
718
  readonly 'toolbar.icon': "图标";
642
719
  readonly 'icon.search': "搜索图标";
643
720
  readonly 'icon.empty': "没有匹配的图标";
@@ -754,6 +831,8 @@ declare class Editor {
754
831
  private mindMapEditingShapeId;
755
832
  private mindMapSelectedNode;
756
833
  private mindMapHoverNode;
834
+ private tableSelection;
835
+ private tableEditing;
757
836
  private renderScheduled;
758
837
  private pointerIsDown;
759
838
  private notifyScheduled;
@@ -771,6 +850,9 @@ declare class Editor {
771
850
  private stickyNoteColor;
772
851
  /** 连续插入图标时的错开计数(避免每次都叠在同一处) */
773
852
  private iconInsertSeq;
853
+ private clipboardShapes;
854
+ private pasteSeq;
855
+ private copiedStyle;
774
856
  constructor(canvas: HTMLCanvasElement, options?: EditorOptions);
775
857
  private setupEventListeners;
776
858
  /** 窗口失焦(切页签/alt-tab):按下状态与一切瞬态预览都作废,避免"卡住" */
@@ -806,11 +888,55 @@ declare class Editor {
806
888
  private screenToPage;
807
889
  private addShape;
808
890
  private updateShape;
891
+ /**
892
+ * 表格尺寸变化时保持「左上角」不动:行高变化向下伸缩、列宽变化向右伸缩,
893
+ * 避免整表在画布上向两边跳。返回新的中心坐标(已按旋转角换算)。
894
+ */
895
+ private tableTopLeftAnchored;
896
+ /** 写回表格数据(cells/rowHeights/colWidths),并同步尺寸与中心(左上角不动) */
897
+ private writeTable;
898
+ /** 行高不够显示单元格文字时自动增高(只增不减) */
899
+ private autoGrowTableRows;
809
900
  private updateBoundArrows;
810
901
  private getBindingPosition;
811
902
  private deleteShape;
812
- private selectShape;
813
- private selectShapes;
903
+ /**
904
+ * 选中图形(additive=true 时切换选中态);id 为空串清空选中。右键菜单/外部控制用。
905
+ * ⚠️ 组感知:点任一成员都会选中它所属的整组(同组的绑行为一致),additive 时整组一起加减。
906
+ */
907
+ selectShape(id: string, additive: boolean): void;
908
+ /** 整体替换选中集(右键菜单/外部控制用);框选结果同样按组扩张 */
909
+ selectShapes(ids: string[]): void;
910
+ /** 某图形所在的整组 id 列表(不在组里就只有它自己) */
911
+ private getGroupMembers;
912
+ /** 选中集是否恰好是完整的一个组(返回 groupId,否则 null) */
913
+ getSelectedGroupId(): string | null;
914
+ /** 选中集里是否包含成组图形(用于右键菜单显示「解组」) */
915
+ hasSelectedGroup(): boolean;
916
+ /** 取某个组的所有成员 id(含锁定的成员) */
917
+ private groupMemberIds;
918
+ /**
919
+ * 成组:把选中图形绑成一个整体,并整组锁定(同飞书「组合后不再被选中」的观感,
920
+ * 用户想改动先解锁,解锁后整组仍同进同退:点任一成员 = 选中整组一起拖)。
921
+ * @returns 新建的 groupId;选中不足 2 个时返回 null
922
+ */
923
+ groupSelected(): string | null;
924
+ /**
925
+ * 解组:清掉这些图形的组标记并顺带解锁(整组一起解,即使只选中了组内一部分成员)。
926
+ * @returns 是否确实解掉了组
927
+ */
928
+ ungroupSelected(): boolean;
929
+ /** 解掉指定 gid 的组(内部统一入口,含 locked 清理) */
930
+ ungroupIds(groupIds: string[]): boolean;
931
+ /** 整组锁定/解锁(groupId 相同的图形一起改) */
932
+ setGroupLocked(groupId: string, locked: boolean): boolean;
933
+ /**
934
+ * 无视「组/锁定」直接选中一个图形(仅供右键菜单:右键命中锁定的组成员要能把整组选上,
935
+ * 否则用户没有任何入口把组解锁)。普通点选一律走 selectShape。
936
+ */
937
+ selectShapeRaw(id: string): void;
938
+ /** 选中集里任一成员所属的组 id(右键菜单「解锁本组」用) */
939
+ getGroupIdOfSelected(): string | null;
814
940
  private setBrushRect;
815
941
  /** 设置对齐参考线(由工具在拖拽过程中调用) */
816
942
  private setSnapGuides;
@@ -872,6 +998,51 @@ declare class Editor {
872
998
  }): void;
873
999
  /** 批量更新选中线条/箭头的连线类型 */
874
1000
  updateConnectionType(connectionType: ConnectionType): void;
1001
+ /** 获取选中的图形(按画布层级顺序,即 shapes 数组顺序) */
1002
+ getSelectedShapes(): Shape[];
1003
+ /** 是否正处于就地编辑(编辑文字/表格/思维导图节点) */
1004
+ isEditing(): boolean;
1005
+ /** 删除选中的图形(锁定的图形跳过),返回是否有删除 */
1006
+ deleteSelected(): boolean;
1007
+ /** 复制选中的图形到内部剪贴板(锁定的图形跳过) */
1008
+ copySelected(): boolean;
1009
+ /** 内部剪贴板里是否有可粘贴的内容 */
1010
+ hasClipboard(): boolean;
1011
+ /** 深拷贝一批图形并生成新 id、平移 offset(连线的世界坐标 points / 手工折点同步平移) */
1012
+ private cloneWithOffset;
1013
+ /** 粘贴内部剪贴板:副本阶梯偏移并选中,一步撤销 */
1014
+ paste(): boolean;
1015
+ /** 在原位创建选中图形的副本(偏移一点并选中副本),一步撤销 */
1016
+ duplicateSelected(): boolean;
1017
+ /** 把选中的图形导出为 PNG 并写入系统剪贴板(透明背景),返回是否成功 */
1018
+ copySelectedAsImage(): Promise<boolean>;
1019
+ /** 复制第一个选中图形的样式(边框/填充/文字色/字号) */
1020
+ copyStyle(): boolean;
1021
+ /** 是否已经复制过样式(右键菜单「粘贴样式」的可用条件) */
1022
+ hasCopiedStyle(): boolean;
1023
+ /** 把复制的样式粘贴到所有选中图形(一步撤销) */
1024
+ pasteStyle(): boolean;
1025
+ /**
1026
+ * 水平/垂直翻转选中的图形(围绕各自中心镜像,toggle 语义)。
1027
+ * 文字/连线/表格/UML/思维导图/便签不支持翻转(isFlippableShapeType),会被跳过。
1028
+ */
1029
+ flipSelected(axis: 'horizontal' | 'vertical'): boolean;
1030
+ /** 选中图形旋转 90°(clockwise=false 为逆时针),一步撤销 */
1031
+ rotateSelected90(clockwise?: boolean): boolean;
1032
+ /** 锁定/解锁选中图形;锁定后自动取消选中(锁定图形不可选中) */
1033
+ setSelectedShapesLocked(locked: boolean): boolean;
1034
+ /** 锁定/解锁指定图形(右键锁定的图形时用它解锁,图形不必在选中集里) */
1035
+ setShapeLocked(id: string, locked: boolean): boolean;
1036
+ /** 某个图形是否被锁定 */
1037
+ isShapeLocked(id: string): boolean;
1038
+ /** 置于顶层:选中的图形整体移到最上面(保持它们之间的相对顺序) */
1039
+ bringToFront(): boolean;
1040
+ /** 置于底层:选中的图形整体移到最下面 */
1041
+ sendToBack(): boolean;
1042
+ /** 上移一层:每个选中图形与它上面相邻的非选中图形交换 */
1043
+ bringForward(): boolean;
1044
+ /** 下移一层:每个选中图形与它下面相邻的非选中图形交换 */
1045
+ sendBackward(): boolean;
875
1046
  /** 批量更新选中箭头的箭头类型 */
876
1047
  updateArrowHeadType(arrowHead: ArrowHeadType): void;
877
1048
  /**
@@ -969,6 +1140,107 @@ declare class Editor {
969
1140
  deleteMindMapNode(shapeId: string, nodeId: string): void;
970
1141
  /** 折叠/展开指定节点 */
971
1142
  toggleMindMapCollapse(shapeId: string, nodeId: string): void;
1143
+ /** 获取选中的表格(恰好选中一个时) */
1144
+ getSelectedTable(): TableShape | null;
1145
+ private getTableById;
1146
+ /** 读取表格某格(只读引用,勿修改) */
1147
+ getTableCell(shapeId: string, row: number, col: number): TableCell | null;
1148
+ /** 页面坐标下的表格单元格命中(被覆盖格映射回锚点) */
1149
+ getTableAtPoint(point: Vec2): {
1150
+ shapeId: string;
1151
+ row: number;
1152
+ col: number;
1153
+ } | null;
1154
+ /** 屏幕坐标(画布左上角为原点)下的表格单元格命中 */
1155
+ getTableAtScreenPoint(screenPoint: Vec2): {
1156
+ shapeId: string;
1157
+ row: number;
1158
+ col: number;
1159
+ } | null;
1160
+ /**
1161
+ * 拖拽框选用:把页面坐标解析成某表格内的行列;**超出表格时 clamp 到边缘行列**
1162
+ * (拖到表格外 = 选中整行/整列)。指针不在该表格附近时也照样给出边缘格,不再返回 null。
1163
+ */
1164
+ getTableCellAtPointClamped(shapeId: string, point: Vec2): {
1165
+ row: number;
1166
+ col: number;
1167
+ } | null;
1168
+ /** 指针是否落在表格左上角的「拖动把手」上(只有它能移动整表) */
1169
+ isTableMoveHandleHit(shapeId: string, point: Vec2): boolean;
1170
+ /** 表格某格(缺省整表)在屏幕上的矩形(左上角 + 尺寸),用于就地编辑定位 */
1171
+ getTableScreenRect(shapeId: string, row?: number, col?: number): {
1172
+ x: number;
1173
+ y: number;
1174
+ width: number;
1175
+ height: number;
1176
+ } | null;
1177
+ /** 当前单元格选区 */
1178
+ getTableSelection(): {
1179
+ shapeId: string;
1180
+ anchor: {
1181
+ row: number;
1182
+ col: number;
1183
+ };
1184
+ focus: {
1185
+ row: number;
1186
+ col: number;
1187
+ };
1188
+ } | null;
1189
+ /** 选中表格的一个单元格(extend=true 时从原锚点扩展选区到该格) */
1190
+ selectTableCell(shapeId: string, row: number, col: number, extend?: boolean): void;
1191
+ /** 当前正在编辑的单元格(null = 未在编辑) */
1192
+ getTableEditing(): {
1193
+ shapeId: string;
1194
+ row: number;
1195
+ col: number;
1196
+ } | null;
1197
+ /** 进入单元格编辑态(双击单元格触发) */
1198
+ beginTableEdit(shapeId: string, row: number, col: number): void;
1199
+ /** 退出单元格编辑态 */
1200
+ exitTableEdit(): void;
1201
+ /** 更新单元格内容/样式。commit=false 时只应用不写历史(就地编辑逐键调用)。 */
1202
+ updateTableCell(shapeId: string, row: number, col: number, patch: Partial<TableCell>, commit?: boolean): void;
1203
+ /** 往视口中心插入一张 rows×cols 的空表(工具栏「表格」面板用) */
1204
+ insertTable(rows?: number, cols?: number): string | undefined;
1205
+ /** 在指定行(缺省选区行)下方插入一行 */
1206
+ insertTableRow(shapeId: string, at?: number): void;
1207
+ /** 在指定列(缺省选区列)右侧插入一列 */
1208
+ insertTableColumn(shapeId: string, at?: number): void;
1209
+ /** 删除指定行(缺省选区行);仅剩一行时不删 */
1210
+ deleteTableRow(shapeId: string, at?: number): void;
1211
+ /** 删除指定列(缺省选区列);仅剩一列时不删 */
1212
+ deleteTableColumn(shapeId: string, at?: number): void;
1213
+ /**
1214
+ * 当前选区覆盖的行列范围(clamp 后);无选区或不属于该表时返回 null。
1215
+ * ⚠️ 结果会**扩张到完整包住所有相交的合并区**(对齐飞书:选区永远吸附整块),
1216
+ * 这样高亮、合并、拆分、删除行列看到的是同一个范围。
1217
+ */
1218
+ private getTableSelRange;
1219
+ /**
1220
+ * 相对当前选区插入一行:above = 选区首行之上,below = 选区末行之下。
1221
+ * 插入后选区落到新行(沿用原列范围),便于连续向上/向下插入。
1222
+ */
1223
+ insertTableRowRelative(shapeId: string, position: 'above' | 'below'): void;
1224
+ /** 相对当前选区插入一列:left = 选区首列之左,right = 选区末列之右。插入后选区落到新列 */
1225
+ insertTableColumnRelative(shapeId: string, position: 'left' | 'right'): void;
1226
+ /**
1227
+ * 删除选区覆盖的全部行(一次历史记录);至少保留一行,全选时不做任何事。
1228
+ * 删除后选区收敛到删除位置所在行(同列范围)。
1229
+ */
1230
+ deleteTableRowsInSelection(shapeId: string): void;
1231
+ /** 删除选区覆盖的全部列(一次历史记录);至少保留一列 */
1232
+ deleteTableColsInSelection(shapeId: string): void;
1233
+ /** 行列删除后把选区/编辑格收敛到剩余范围内 */
1234
+ private clampTableSelectionAfterDelete;
1235
+ /** 合并当前选区(单格时无操作)。范围含已合并区时按扩张后的完整范围合并 */
1236
+ mergeTableCells(shapeId?: string): void;
1237
+ /**
1238
+ * 拆分当前选区里的**所有**合并区(飞书式:选中合并区的任意部分即可整体还原)。
1239
+ * 选区里没有合并区时无操作。
1240
+ */
1241
+ splitTableCells(shapeId?: string): void;
1242
+ /** 拆分指定格所在的合并区域(保留旧入口:用于「就点这一格」的调用方) */
1243
+ splitTableCell(shapeId?: string): void;
972
1244
  /** 给指定 UML 类追加一条属性 */
973
1245
  addUmlAttribute(shapeId: string): void;
974
1246
  /** 给指定 UML(类图或接口)追加一条方法 */
@@ -1018,6 +1290,18 @@ declare class Editor {
1018
1290
  getCamera(): Camera;
1019
1291
  /** 指针是否处于按下状态(拖拽/画线/框选中) */
1020
1292
  isPointerDown(): boolean;
1293
+ /**
1294
+ * 该图形画在画布上的文字**是否没显示全**(被省略号截断)。
1295
+ * UI 用它在「文字显示不全」时才弹出全文提示块 —— 显示得下就不打扰用户。
1296
+ */
1297
+ isShapeTextTruncated(shapeId: string): boolean;
1298
+ /** UML 的某一行文字是否没显示全(提示块显示条件;字号/加粗按该行实际绘制用的值取) */
1299
+ isUmlRowTextTruncated(row: {
1300
+ shape: UmlClassShape | UmlInterfaceShape;
1301
+ section: 'className' | 'attribute' | 'method';
1302
+ rowIndex: number;
1303
+ text: string;
1304
+ }): boolean;
1021
1305
  /** 当前画布内容的包围盒(世界坐标,含留白),导出时用于确定画布尺寸与视口 */
1022
1306
  getContentBounds(padding?: number): {
1023
1307
  x: number;
@@ -1203,6 +1487,22 @@ declare class Renderer {
1203
1487
  private showGrid;
1204
1488
  /** 文本排版缓存:避免每帧对每个字符做 measureText */
1205
1489
  private textLayoutCache;
1490
+ /** 当前表格单元格选区(由 Editor 每帧写入),用于在画布上画选区高亮 */
1491
+ private tableSelection;
1492
+ /** 写入表格单元格选区(null = 无) */
1493
+ setTableSelection(sel: {
1494
+ shapeId: string;
1495
+ anchor: {
1496
+ row: number;
1497
+ col: number;
1498
+ };
1499
+ focus: {
1500
+ row: number;
1501
+ col: number;
1502
+ };
1503
+ } | null): void;
1504
+ /** 当前悬停的图形 id(由每帧 render 写入),仅用于表格拖动把手等提示性绘制 */
1505
+ private hoverShapeId;
1206
1506
  private static readonly TEXT_CACHE_LIMIT;
1207
1507
  constructor(canvas: HTMLCanvasElement, dpr?: number);
1208
1508
  resize(width: number, height: number): void;
@@ -1238,6 +1538,8 @@ declare class Renderer {
1238
1538
  */
1239
1539
  private drawGrid;
1240
1540
  private drawShape;
1541
+ /** 表格左上角的六点拖动把手(尺寸恒定屏幕像素) */
1542
+ private drawTableMoveHandle;
1241
1543
  private applyStyle;
1242
1544
  private drawRectangle;
1243
1545
  private drawRoundedRectangle;
@@ -1270,6 +1572,14 @@ declare class Renderer {
1270
1572
  */
1271
1573
  private drawIcon;
1272
1574
  private drawUmlClass;
1575
+ /**
1576
+ * 表格:整表背景 + 单元格底色 + 内部网格线(被合并区域跨过的边界段断开)
1577
+ * + 外边框(跟随图形样式)+ 单元格文字(超出省略)。
1578
+ */
1579
+ private drawTable;
1580
+ /** 画一条带缺口的网格线(gaps 为沿线区间,区间内不画) */
1581
+ private drawSegmentsWithGaps;
1582
+ private strokeGridSegment;
1273
1583
  /**
1274
1584
  * UML 接口:标题显示为 `<<${className}>>`,仅方法段,无属性段,只有一条分隔线。
1275
1585
  */
@@ -1389,12 +1699,23 @@ declare class Renderer {
1389
1699
  /**
1390
1700
  * 获取文本的显示行(换行 + 截断),结果按 shape/文本/尺寸缓存,
1391
1701
  * 避免每帧渲染都对文本逐字符 measureText。
1702
+ * cacheKeyExtra:同一图形内不同字体(如表格单元格加粗/字号)要分开缓存时传入。
1392
1703
  */
1393
1704
  private getDisplayLines;
1394
1705
  private drawShapeText;
1395
1706
  private getTextBounds;
1396
1707
  private wrapLine;
1397
1708
  private truncateLine;
1709
+ /**
1710
+ * 画在画布上的文字是否被截断(有内容没显示全)。
1711
+ * 与 drawShapeText / drawText 用**同一套** bounds 与换行规则,所以判定结果
1712
+ * 和用户看到的一致:UI 上用它在「文字显示不全」时才弹出全文提示。
1713
+ */
1714
+ isShapeTextTruncated(shape: Shape): boolean;
1715
+ /** 换行后的行数是否超过可见行数(超过 = 画的时候会截断并加省略号) */
1716
+ private isTextTruncated;
1717
+ /** UML 的某一行是否被省略号截断(与 drawUmlClass / drawUmlInterface 的 ellipsize 同规则) */
1718
+ isUmlRowTextTruncated(shape: Shape, text: string, fontSize: number, bold?: boolean): boolean;
1398
1719
  /** 连接点句柄 → 外法向(页面坐标单位向量;规则见 docking.ts) */
1399
1720
  private static readonly HANDLE_NORMALS;
1400
1721
  /**
@@ -1449,6 +1770,16 @@ declare class Renderer {
1449
1770
  private drawArrowHeads;
1450
1771
  private drawText;
1451
1772
  private drawFreehand;
1773
+ /**
1774
+ * 锁定标记:图形右上角画一枚小挂锁(尺寸按屏幕像素恒定),
1775
+ * 独立于选中态 —— 锁定的图形通常选不中,得靠这枚锁告诉用户「它为什么点不动」。
1776
+ */
1777
+ private drawLockBadge;
1778
+ /**
1779
+ * 组外框:选中集恰好是一个完整的组(且不止一个成员)时,给整组描一圈虚线,
1780
+ * 提示「这些图形是绑在一起的」。整组锁定的成员画不到(成员不可选),不需要外框。
1781
+ */
1782
+ private drawGroupFrames;
1452
1783
  private drawSelectionOutline;
1453
1784
  private drawSelectionHandles;
1454
1785
  /**
@@ -1656,6 +1987,8 @@ interface ToolContext {
1656
1987
  } | null;
1657
1988
  /** 选中思维导图节点(不进入编辑态) */
1658
1989
  selectMindMapNode(shapeId: string, nodeId: string): void;
1990
+ /** 选中表格单元格(extend = 从原锚点扩展)—— 表格内拖拽框选走这里 */
1991
+ selectTableCell(shapeId: string, row: number, col: number, extend?: boolean): void;
1659
1992
  }
1660
1993
  declare abstract class Tool {
1661
1994
  abstract type: ToolType;
@@ -1685,6 +2018,8 @@ declare abstract class Tool {
1685
2018
  declare class SelectTool extends Tool {
1686
2019
  type: ToolType;
1687
2020
  private state;
2021
+ /** 正在框选的表格 id(表格内拖拽框选单元格,拖到表外自动扩成整行/整列) */
2022
+ private cellSelectShapeId;
1688
2023
  private translatingState;
1689
2024
  private resizingState;
1690
2025
  private generatingState;
@@ -1715,6 +2050,14 @@ declare class SelectTool extends Tool {
1715
2050
  /** 把生成点位打包成创建上下文(from 为源点,to 为目标落点) */
1716
2051
  private genContext;
1717
2052
  onPointerDown(point: Vec2, event: PointerEvent): void;
2053
+ /**
2054
+ * 命中「表格左上角拖动把手」的表格。把手画在表格包围盒之外、普通 hitTest 命中不到,
2055
+ * 所以这里单独判定;落点上若有别的图形则不抢(避免盖住别人的点击)。
2056
+ */
2057
+ private findTableMoveHandleAt;
2058
+ /** 记录「移动选中图形」的起始状态(按住拖动把手/图形本体都用这一份) */
2059
+ private beginTranslating;
2060
+ private captureTranslatingStart;
1718
2061
  onPointerMove(point: Vec2, event: PointerEvent): void;
1719
2062
  onPointerUp(point: Vec2, _event: PointerEvent): void;
1720
2063
  /**
@@ -1920,12 +2263,22 @@ declare function calcUmlClassSize(className: string, attributes: UmlAttribute[],
1920
2263
  };
1921
2264
  declare class ShapeTool extends Tool {
1922
2265
  type: ShapeType;
2266
+ /** 按下点(页面坐标);null = 未按下 */
2267
+ private pressPoint;
2268
+ /** 本次按下的图形 id(按下即生成默认尺寸,拖动只改它的大小) */
2269
+ private draftId;
2270
+ /** 是否已进入拖拽状态(超过阈值) */
2271
+ private dragging;
1923
2272
  constructor(context: ToolContext, shapeType: ShapeType);
1924
2273
  onPointerDown(point: Vec2, _event: PointerEvent): void;
1925
- onPointerMove(_point: Vec2, _event: PointerEvent): void;
2274
+ onPointerMove(point: Vec2, event: PointerEvent): void;
1926
2275
  onPointerUp(_point: Vec2, _event: PointerEvent): void;
1927
- onKeyDown(_event: KeyboardEvent): void;
2276
+ onKeyDown(event: KeyboardEvent): void;
1928
2277
  onKeyUp(_event: KeyboardEvent): void;
2278
+ /** 拖拽生成中 = 一次未结束的交互(指针丢失时编辑器会来收尾) */
2279
+ hasTransientState(): boolean;
2280
+ /** 丢事件自愈:保持图形当前尺寸落定(历史点在按下时已记),清掉拖拽状态 */
2281
+ cancelTransient(): boolean;
1929
2282
  getCursor(point: Vec2): string | null;
1930
2283
  }
1931
2284
 
@@ -2046,4 +2399,169 @@ declare function countMindMapNodes(root: MindMapNode): number;
2046
2399
  */
2047
2400
  declare function layoutMindMap(root: MindMapNode): MindMapLayoutResult;
2048
2401
 
2049
- export { type ArrowBinding, type ArrowHeadType, type ArrowShape, type ArrowStyle, ArrowTool, Camera, type CameraState, type CircleShape, type ConnectionType, DEFAULT_HIGHLIGHTER_COLOR, type DiamondShape, type DrawShape, type DrawuiTheme, type DrawuiThemeSelection, Editor, type EditorData, type EditorOptions, type EditorState, type EllipseShape, type ExportFormat, type ExportOptions, type FreehandMode, FreehandTool, type GenerationContext, HandTool, type HexagonShape, ICONS, ICON_CATEGORIES, ICON_CATEGORY_INK, ICON_DEFAULT_INK, ICON_DEFAULT_SIZE, ICON_GRID, type IconCategoryId, type IconDef, type IconLayer, type IconShape, LANGUAGES, type Language, type LineShape, LineTool, MINDMAP_COLORS, MINDMAP_FONT_SIZE, MINDMAP_MAX_WIDTH, MINDMAP_MIN_WIDTH, MINDMAP_NODE_HEIGHT, MIN_HANDLE_SEGMENT, MIN_JOG, Mat2d, type MessageKey, type MindMapLayoutResult, type MindMapNode, type MindMapNodePos, type MindMapShape, type OctagonShape, type ParallelogramShape, type PentagonShape, type Rect, type RectangleShape, Renderer, type RoundedRectangleShape, STICKY_FOLD_RATIO, STICKY_NOTE_COLORS, STICKY_NOTE_DEFAULT_COLOR, STICKY_TEXT_SCALE, type SegmentHandle, SelectTool, type Shape, type ShapeStyle, ShapeTool, type ShapeType, type SnapGuide, type StarShape, type StickyNoteShape, THEME, type TextShape, type ToolType, type TrapezoidShape, type TriangleShape, UML_FONT_SIZE, UML_HEADER_HEIGHT, UML_LINE_HEIGHT, UML_MIN_WIDTH, UML_PADDING_X, UML_PADDING_Y, type UiEvent, type UmlAttribute, type UmlClassShape, type UmlInterfaceShape, type UmlMethod, type UmlVisibility, Vec, type Vec2 as Vec2Type, calcUmlClassSize, cloneMindMapNode, collapseRoute, connectorSegmentHandles, countMindMapNodes, downloadBlob, exportToBlob, findMindMapNode, getContentBounds, getIcon, getLanguage, getMindMapNodeDepth, getMindMapParent, getTheme, hasIcon, hexToRgba, iconInk, iconsByCategory, isStubCorner, layoutMindMap, mindMapNodeColor, mindMapNodeSize, offsetConnectorSegment, pickSegmentHandle, pointToSegmentDistance, pruneStubBends, renderSVGString, renderToCanvas, routeToUserPoints, sameRoute, searchIcons, setLanguage, setTheme, shadeColor, subscribeLanguage, subscribeTheme, t };
2402
+ /**
2403
+ * 表格的纯数据操作(唯一实现):行列增删、合并/拆分、命中定位。
2404
+ *
2405
+ * 合并模型:**每个合并区域只有左上角格子是「锚点」**,锚点带 `rowSpan/colSpan`;
2406
+ * 区域内其余格子是被覆盖格(渲染/命中时跳过,点击时映射回锚点)。
2407
+ * 所有操作都返回新的 cells/rowHeights 数组(不可变),由 Editor 负责写回与历史。
2408
+ */
2409
+ declare const TABLE_FONT_SIZE = 14;
2410
+ /** 单元格文字与边框的内边距 */
2411
+ declare const TABLE_CELL_PADDING_X = 10;
2412
+ /** 单元格文字与上下边框的内边距(多行时用) */
2413
+ declare const TABLE_CELL_PADDING_Y = 4;
2414
+ /** 单元格多行文字的行高倍率(与图形文字换行保持一致) */
2415
+ declare const TABLE_LINE_HEIGHT_RATIO = 1.3;
2416
+ /** 行高随内容自动增高的上限行数(再多就靠裁剪+省略号) */
2417
+ declare const TABLE_MAX_AUTO_LINES = 10;
2418
+ declare const TABLE_MIN_COL_WIDTH = 40;
2419
+ declare const TABLE_MIN_ROW_HEIGHT = 24;
2420
+ declare const TABLE_DEFAULT_COL_WIDTH = 140;
2421
+ declare const TABLE_DEFAULT_ROW_HEIGHT = 36;
2422
+ /** 默认首行(表头)底色与网格线颜色 */
2423
+ declare const TABLE_HEADER_FILL = "#f1f3f5";
2424
+ /** 把手尺寸(屏幕像素,需除以 zoom 换算成本地尺寸):竖排的六点抓手 */
2425
+ declare const TABLE_MOVE_HANDLE_WIDTH = 18;
2426
+ declare const TABLE_MOVE_HANDLE_HEIGHT = 22;
2427
+ /** 把手与表格左边框的间距(屏幕像素)。
2428
+ * ⚠️ 必须贴在表格**左侧外侧、顶部对齐**:
2429
+ * - 画在表格上方会被「单元格悬浮工具条」盖住(它正好在表格上方那一带);
2430
+ * - 画在表格内侧会压住单元格第一行的文字。 */
2431
+ declare const TABLE_MOVE_HANDLE_GAP = 4;
2432
+ /** 页面坐标 → 表格本地坐标(原点 = 表格左上角;已抵消旋转) */
2433
+ declare function tableLocalPoint(t: TableShape, point: Vec2): Vec2;
2434
+ /** 本地坐标 → 页面坐标(tableLocalPoint 的逆运算) */
2435
+ declare function tablePagePoint(t: TableShape, local: Vec2): Vec2;
2436
+ /** 拖动把手的本地矩形(贴表格左边框外侧、顶部对齐,尺寸恒为屏幕像素) */
2437
+ declare function tableMoveHandleLocalRect(t: TableShape, zoom: number): {
2438
+ x: number;
2439
+ y: number;
2440
+ width: number;
2441
+ height: number;
2442
+ };
2443
+ /** 指针是否落在拖动把手上(point 为页面坐标;tol 为额外容差,屏幕像素) */
2444
+ declare function hitTableMoveHandle(t: TableShape, point: Vec2, zoom: number, tol?: number): boolean;
2445
+ /** 指针是否落在表格内部(表格内拖拽 = 框选单元格,不移动整表) */
2446
+ declare function hitTableBody(t: TableShape, point: Vec2, tol?: number): boolean;
2447
+ /**
2448
+ * 本地坐标 → 表格行列;**超出表格时 clamp 到边缘行列**(拖到表外 = 选中整行/整列)。
2449
+ * 本地坐标恰好落在边界线时归到右侧/下方的格子。
2450
+ */
2451
+ declare function tableCellAtLocalClamped(t: TableShape, local: Vec2): {
2452
+ row: number;
2453
+ col: number;
2454
+ };
2455
+ /** 选区(anchor→focus)在本地坐标下的合并矩形(用于画选区高亮) */
2456
+ declare function tableRangeLocalRect(t: TableShape, r1: number, c1: number, r2: number, c2: number): {
2457
+ x: number;
2458
+ y: number;
2459
+ width: number;
2460
+ height: number;
2461
+ };
2462
+ declare function tableTotalWidth(colWidths: number[]): number;
2463
+ declare function tableTotalHeight(rowHeights: number[]): number;
2464
+ /**
2465
+ * 单元格内多行文字第一行的「基线中心」相对单元格顶部的偏移(画布/导出共用,保证一致)。
2466
+ * - 文字整体放得下:垂直居中;
2467
+ * - 放不下(行数超出可视行数被截断):顶部对齐并留出 TABLE_CELL_PADDING_Y 内边距,
2468
+ * 这样读者能看到文字开头而不是中间被裁的片段。
2469
+ */
2470
+ declare function tableCellTextStartOffset(lineCount: number, lineHeight: number, cellHeight: number): number;
2471
+ /** 建一张空表;header=true 时首行为表头(加粗 + 浅灰底) */
2472
+ declare function createTableCells(rows: number, cols: number, header?: boolean): TableCell[][];
2473
+ /**
2474
+ * 某格文字在给定宽度下需要几行(逐字符贪心折行 + 显式 \n),
2475
+ * 与 Renderer.getDisplayLines / export.wrapText 的换行规则一致。
2476
+ */
2477
+ declare function tableCellLineCount(text: string, fontSize: number, bold: boolean, maxWidth: number): number;
2478
+ /**
2479
+ * 按内容把行高撑到够显示(只增不减,上限 TABLE_MAX_AUTO_LINES 行)。
2480
+ * 无需变化时返回 null;否则返回新的 rowHeights。
2481
+ * 合并单元格按其跨越行的总高度判断,缺口补在跨区最后一行。
2482
+ */
2483
+ declare function tableGrowRowHeights(shape: TableShape): number[] | null;
2484
+ declare function cloneTableCells(cells: TableCell[][]): TableCell[][];
2485
+ declare function cloneTable(t: TableShape): TableShape;
2486
+ /** 覆盖矩阵:covered[r][c]=true 表示该格被某个合并锚点覆盖(不渲染/不命中) */
2487
+ declare function tableCoveredMap(cells: TableCell[][]): boolean[][];
2488
+ /** 先拆掉与目标矩形相交的所有已有合并区域,再合并成一个大格 */
2489
+ declare function tableMerge(cells: TableCell[][], r1: number, c1: number, r2: number, c2: number): TableCell[][];
2490
+ /** 拆分某格所在的合并区域(无合并时原样返回) */
2491
+ declare function tableSplit(cells: TableCell[][], r: number, c: number): TableCell[][];
2492
+ /** 若 (r,c) 属于某个合并区(含被覆盖格),返回该合并区的锚点行列;否则返回自身 */
2493
+ declare function tableAnchorAt(t: TableShape, r: number, c: number): {
2494
+ row: number;
2495
+ col: number;
2496
+ };
2497
+ /**
2498
+ * 把选区扩张到「完整包住所有相交的合并区」(飞书式:选区永远吸附到整块)。
2499
+ * 迭代到稳定,因为扩张后可能又碰到新的合并区。
2500
+ */
2501
+ declare function tableExpandRangeToMerges(t: TableShape, r1: number, c1: number, r2: number, c2: number): {
2502
+ r1: number;
2503
+ c1: number;
2504
+ r2: number;
2505
+ c2: number;
2506
+ };
2507
+ /** 选区里是否含合并区(「拆分单元格」按钮的启用条件) */
2508
+ declare function tableRangeHasMerge(t: TableShape, r1: number, c1: number, r2: number, c2: number): boolean;
2509
+ /** 拆分选区里**所有**合并区(无合并时返回原 cells 引用) */
2510
+ declare function tableSplitRange(t: TableShape, r1: number, c1: number, r2: number, c2: number): TableCell[][];
2511
+ /**
2512
+ * 在 at 行之前插入一个空行;穿过该行的合并区域自动加一行跨度。
2513
+ * 新行的样式与行高沿用相邻行(上邻行;若上邻行是表头行则改用其下一行,
2514
+ * 避免在表头下方插入时把表头样式复制成两行)。
2515
+ */
2516
+ declare function tableInsertRow(cells: TableCell[][], rowHeights: number[], at: number): {
2517
+ cells: TableCell[][];
2518
+ rowHeights: number[];
2519
+ };
2520
+ /**
2521
+ * 在 at 列之前插入一个空列;穿过该列的合并区域自动加一列跨度。
2522
+ * 新列的样式与列宽沿用左邻列(在首列前插入则用原首列)。
2523
+ */
2524
+ declare function tableInsertColumn(cells: TableCell[][], colWidths: number[], at: number): {
2525
+ cells: TableCell[][];
2526
+ colWidths: number[];
2527
+ };
2528
+ /** 删除第 at 行(仅剩一行时返回 null 表示不可删);合并区域自动收缩/换锚点 */
2529
+ declare function tableDeleteRow(cells: TableCell[][], rowHeights: number[], at: number): {
2530
+ cells: TableCell[][];
2531
+ rowHeights: number[];
2532
+ } | null;
2533
+ /** 删除第 at 列(仅剩一列时返回 null 表示不可删);合并区域自动收缩/换锚点 */
2534
+ declare function tableDeleteColumn(cells: TableCell[][], colWidths: number[], at: number): {
2535
+ cells: TableCell[][];
2536
+ colWidths: number[];
2537
+ } | null;
2538
+ /** 表格内某格(含合并跨度)相对表格左上角的矩形 */
2539
+ declare function tableCellLocalRect(t: TableShape, row: number, col: number): {
2540
+ ox: number;
2541
+ oy: number;
2542
+ width: number;
2543
+ height: number;
2544
+ };
2545
+ /**
2546
+ * 表格内命中:返回该点的 (row, col)。
2547
+ * 点落在合并区域的被覆盖格上时映射回锚点;不在表格内返回 null。
2548
+ * lx/ly 为相对表格左上角的坐标。
2549
+ */
2550
+ declare function tableRowAtPoint(t: TableShape, lx: number, ly: number): {
2551
+ row: number;
2552
+ col: number;
2553
+ } | null;
2554
+
2555
+ /**
2556
+ * UML 行文字的唯一来源(画布 / SVG 导出 / 尺寸计算 / 就地基共用)。
2557
+ *
2558
+ * 约定:**预设值是要给的**(新建的类/接口自带 `+ field: string`、`+ method(param): void`),
2559
+ * 但整行就是一段普通文字,用户可以像改 input 一样把它删光(连 `+` 一起删)。
2560
+ * 删空的行在画布上什么都不画(`''`),不会自己长回预设文字。
2561
+ */
2562
+ /** 属性行:`+ name: type`;可见性被删掉就只剩 `name: type`;整行删空返回 '' */
2563
+ declare function umlAttrRowText(a: UmlAttribute): string;
2564
+ /** 方法行:`+ name(params): returnType`;同上 */
2565
+ declare function umlMethodRowText(m: UmlMethod): string;
2566
+
2567
+ export { type ArrowBinding, type ArrowHeadType, type ArrowShape, type ArrowStyle, ArrowTool, Camera, type CameraState, type CircleShape, type ConnectionType, DEFAULT_HIGHLIGHTER_COLOR, type DiamondShape, type DrawShape, type DrawuiTheme, type DrawuiThemeSelection, Editor, type EditorData, type EditorOptions, type EditorState, type EllipseShape, type ExportFormat, type ExportOptions, type FreehandMode, FreehandTool, type GenerationContext, HandTool, type HexagonShape, ICONS, ICON_CATEGORIES, ICON_CATEGORY_INK, ICON_DEFAULT_INK, ICON_DEFAULT_SIZE, ICON_GRID, type IconCategoryId, type IconDef, type IconLayer, type IconShape, LANGUAGES, type Language, type LineShape, LineTool, MINDMAP_COLORS, MINDMAP_FONT_SIZE, MINDMAP_MAX_WIDTH, MINDMAP_MIN_WIDTH, MINDMAP_NODE_HEIGHT, MIN_HANDLE_SEGMENT, MIN_JOG, Mat2d, type MessageKey, type MindMapLayoutResult, type MindMapNode, type MindMapNodePos, type MindMapShape, type OctagonShape, type ParallelogramShape, type PentagonShape, type Rect, type RectangleShape, Renderer, type RoundedRectangleShape, STICKY_FOLD_RATIO, STICKY_NOTE_COLORS, STICKY_NOTE_DEFAULT_COLOR, STICKY_TEXT_SCALE, type SegmentHandle, SelectTool, type Shape, type ShapeStyle, ShapeTool, type ShapeType, type SnapGuide, type StarShape, type StickyNoteShape, TABLE_CELL_PADDING_X, TABLE_CELL_PADDING_Y, TABLE_DEFAULT_COL_WIDTH, TABLE_DEFAULT_ROW_HEIGHT, TABLE_FONT_SIZE, TABLE_HEADER_FILL, TABLE_LINE_HEIGHT_RATIO, TABLE_MAX_AUTO_LINES, TABLE_MIN_COL_WIDTH, TABLE_MIN_ROW_HEIGHT, TABLE_MOVE_HANDLE_GAP, TABLE_MOVE_HANDLE_HEIGHT, TABLE_MOVE_HANDLE_WIDTH, THEME, type TableCell, type TableShape, type TextShape, type ToolType, type TrapezoidShape, type TriangleShape, UML_FONT_SIZE, UML_HEADER_HEIGHT, UML_LINE_HEIGHT, UML_MIN_WIDTH, UML_PADDING_X, UML_PADDING_Y, type UiEvent, type UmlAttribute, type UmlClassShape, type UmlInterfaceShape, type UmlMethod, type UmlVisibility, Vec, type Vec2 as Vec2Type, calcUmlClassSize, cloneMindMapNode, cloneTable, cloneTableCells, collapseRoute, connectorSegmentHandles, countMindMapNodes, createTableCells, downloadBlob, exportToBlob, findMindMapNode, getContentBounds, getIcon, getLanguage, getMindMapNodeDepth, getMindMapParent, getTheme, hasIcon, hexToRgba, hitTableBody, hitTableMoveHandle, iconInk, iconsByCategory, isFlippableShapeType, isStubCorner, layoutMindMap, mindMapNodeColor, mindMapNodeSize, offsetConnectorSegment, pickSegmentHandle, pointToSegmentDistance, pruneStubBends, renderSVGString, renderToCanvas, routeToUserPoints, sameRoute, searchIcons, setLanguage, setTheme, shadeColor, subscribeLanguage, subscribeTheme, t, tableAnchorAt, tableCellAtLocalClamped, tableCellLineCount, tableCellLocalRect, tableCellTextStartOffset, tableCoveredMap, tableDeleteColumn, tableDeleteRow, tableExpandRangeToMerges, tableGrowRowHeights, tableInsertColumn, tableInsertRow, tableLocalPoint, tableMerge, tableMoveHandleLocalRect, tablePagePoint, tableRangeHasMerge, tableRangeLocalRect, tableRowAtPoint, tableSplit, tableSplitRange, tableTotalHeight, tableTotalWidth, umlAttrRowText, umlMethodRowText };