drawui-core 0.3.4 → 0.3.5

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
@@ -176,6 +176,8 @@ interface LineShape extends BaseShape {
176
176
  type: 'line';
177
177
  points: Vec2[];
178
178
  connectionType?: ConnectionType;
179
+ /** 用户手工调节过的中间折点(世界坐标),见 ArrowShape.userPoints */
180
+ userPoints?: Vec2[];
179
181
  }
180
182
  type ConnectionType = 'straight' | 'polyline' | 'orthogonal' | 'curve';
181
183
  /** 生成点位创建上下文:from 为源点(生成点位),to 为目标落点 */
@@ -242,6 +244,14 @@ interface ArrowShape extends BaseShape {
242
244
  connectionType?: ConnectionType;
243
245
  arrowHead?: ArrowHeadType;
244
246
  dashed?: boolean;
247
+ /**
248
+ * 用户手工调节过的中间折点(**世界坐标**,不含两端)。
249
+ *
250
+ * 飞书式「选中连线 → 拖动线段上的手柄调整走线位置」写的就是它:
251
+ * 存在时走线 = 起点 → userPoints… → 终点(每一段仍是正交的),
252
+ * 两端依旧跟随绑定(拖动图形后两端自动跟上,中间保持用户摆好的位置)。
253
+ */
254
+ userPoints?: Vec2[];
245
255
  }
246
256
  interface TextShape extends BaseShape {
247
257
  type: 'text';
@@ -816,6 +826,7 @@ declare class Editor {
816
826
  private connectingTargetId;
817
827
  private genPreview;
818
828
  private hoverAnchorShapeId;
829
+ private hoverConnectorId;
819
830
  private eraserPoint;
820
831
  private mindMapEditingShapeId;
821
832
  private mindMapSelectedNode;
@@ -878,6 +889,13 @@ declare class Editor {
878
889
  private setGenerationPreview;
879
890
  /** 设置悬停图形(画布为其绘制四边连接锚点) */
880
891
  private setHoverAnchorShape;
892
+ /** 设置悬停连线(画布为整条线描一层高亮) */
893
+ private setHoverConnector;
894
+ /**
895
+ * 某条连线当前的真实走线(世界坐标折点)。
896
+ * 交给工具层做线段手柄的命中与拖动 —— 用的是渲染器同一套计算,保证「看到哪就能拖哪」。
897
+ */
898
+ private getConnectorRoute;
881
899
  /**
882
900
  * 清掉所有「瞬态」的交互可视化状态:连线预览、目标高亮、对齐参考线、框选、悬停锚点。
883
901
  * 这些状态只在一次交互过程中有效 —— 只要交互结束(或事件丢失)就必须清空,
@@ -1130,6 +1148,69 @@ declare class Editor {
1130
1148
  dispose(): void;
1131
1149
  }
1132
1150
 
1151
+ /**
1152
+ * 连线「手工调线段」的纯几何(飞书式交互的数学部分,不含任何画布/编辑器依赖)。
1153
+ *
1154
+ * 交互模型:选中一条连线 → 在每一段(够长的)线段的**中点**画一个小手柄 →
1155
+ * 拖动它就把这一段沿垂直方向平移,相邻的垂直段自然伸缩,整条线始终横平竖直;
1156
+ * 两端的停靠点/端点**永远不动**,必要时在端点旁补一个折点(这就是飞书里
1157
+ * 「拖中间那段会让线在两端各拐一下」的效果)。
1158
+ *
1159
+ * 结果写回 `ArrowShape.userPoints` / `LineShape.userPoints`(世界坐标,不含两端)。
1160
+ */
1161
+ /**
1162
+ * 短于这个长度的线段不生成手柄(太短的段拖不动、手柄比线还长也没意义,飞书同样会略过)。
1163
+ * 取 40:既排除「端点旁自动补出来的 24px 桩」,也放过那些只有几十像素、一拖就糊成一团的短段。
1164
+ */
1165
+ declare const MIN_HANDLE_SEGMENT = 40;
1166
+ /**
1167
+ * 台阶的最小高度(磁吸半径)。
1168
+ *
1169
+ * 拖动一段时,只要平移后的位置落进相邻水平线的这个范围内,就**直接吸回那条线**
1170
+ * (=把台阶抹平)。于是:
1171
+ * - 拖不出 1~19px 的浅台阶 —— 那种「两条平行线贴在一起」的观感就是用户说的「变成两条线段」;
1172
+ * - 已经存在的浅台阶,往基线方向一拖就自动抹平(不会出现「拖不动、回不去」);
1173
+ * - 想真正折出台阶,明确拖过这个距离即可(超过就按实际位置走,不再吸附)。
1174
+ */
1175
+ declare const MIN_JOG = 20;
1176
+ interface SegmentHandle {
1177
+ /** 线段序号:route[index] → route[index + 1] */
1178
+ index: number;
1179
+ /** 手柄中心(世界坐标)= 线段中点 */
1180
+ center: Vec2;
1181
+ /** 线段轴向:'H' 水平(可上下拖)/ 'V' 垂直(可左右拖) */
1182
+ axis: 'H' | 'V';
1183
+ /** 线段长度 */
1184
+ length: number;
1185
+ }
1186
+ /** 点到线段的最短距离(连线命中、手柄命中共用;SelectTool 也委托到这里) */
1187
+ declare function pointToSegmentDistance(point: Vec2, a: Vec2, b: Vec2): number;
1188
+ /** 一条走线(世界坐标折线)上所有可拖动的线段手柄 */
1189
+ declare function connectorSegmentHandles(route: Vec2[], minLength?: number): SegmentHandle[];
1190
+ /**
1191
+ * 命中要拖动的线段:优先「手柄中心 handleRadius 内」;没直接命中就给一次宽容 ——
1192
+ * 取离得最近的、够长可拖的那一段(点到该段距离 ≤ maxSegmentDist)。
1193
+ *
1194
+ * 这样「抓在选中连线的任意位置上」都能拖到最近的那段,也让「抓线段」优先于
1195
+ * 拖整条线/从锚点拉新线 —— 避免在连线上按一下却拉出一条新线。
1196
+ */
1197
+ declare function pickSegmentHandle(route: Vec2[], point: Vec2, handleRadius?: number, maxSegmentDist?: number): SegmentHandle | null;
1198
+ /**
1199
+ * 把第 index 段沿其垂直方向平移 delta(水平段:>0 = 向下;垂直段:>0 = 向右),
1200
+ * 返回平移后的**新走线**(首尾点保持不变)。
1201
+ *
1202
+ * 传入的 route 应当始终是「按下时的那条走线」,每次移动都从它重新算 —— 因为拖首/末段
1203
+ * 会插入折点、段序号会变,从原始走线重算才能得到稳定(不漂移)的结果。
1204
+ */
1205
+ declare function offsetConnectorSegment(route: Vec2[], index: number, delta: number): Vec2[];
1206
+ /**
1207
+ * 去掉连续重复点与共线冗余点,精简冗余拐点。
1208
+ * (唯一实现:Renderer.collapseLinePoints 与交互层写回前都调它 —— 别再各写一份)
1209
+ */
1210
+ declare function collapseRoute(pts: Vec2[]): Vec2[];
1211
+ /** 走线 → 可写回 shape 的中间折点(去掉两端) */
1212
+ declare function routeToUserPoints(route: Vec2[]): Vec2[];
1213
+
1133
1214
  interface SnapGuide {
1134
1215
  type: 'horizontal' | 'vertical';
1135
1216
  position: number;
@@ -1163,7 +1244,9 @@ declare class Renderer {
1163
1244
  /** 导出用:非 null 时先以该颜色铺满整块画布(白底等),默认不铺(透明) */
1164
1245
  background?: string | null,
1165
1246
  /** 悬停的图形 id:为其绘制四边连接锚点(飞书式悬浮提示),已选中图形由选择手柄负责 */
1166
- hoverAnchorShapeId?: string | null): void;
1247
+ hoverAnchorShapeId?: string | null,
1248
+ /** 悬停的连线 id:整条线描一层浅蓝高亮(提示「这条线可点、点开能调线段」) */
1249
+ hoverConnectorId?: string | null): void;
1167
1250
  /** 橡皮擦:半透明主色圆 + 主色描边,半径与笔刷命中范围一致(屏幕像素恒定) */
1168
1251
  private drawEraserBrush;
1169
1252
  /** 连接进行中,高亮目标图形四边中点的可连锚点 */
@@ -1206,12 +1289,8 @@ declare class Renderer {
1206
1289
  private drawUmlInterface;
1207
1290
  /** 默认拐点圆角半径(页面坐标) */
1208
1291
  private static readonly DEFAULT_CORNER_RADIUS;
1209
- /** 连线与图形之间保留的最小避障间距,避免线条贴边/粘在图形上 */
1210
- private static readonly ROUTE_CLEARANCE;
1211
1292
  /** 连接点处的垂直出线桩长度:第一段垂直脱离图形边缘,避免贴角/贴边 */
1212
1293
  private static readonly CONNECTION_LEAD;
1213
- /** 连接的源/目标图形作为障碍时使用的避让间距(足够阻挡中段折回穿过,又允许紧邻节点直连) */
1214
- private static readonly CONNECTED_PAD;
1215
1294
  /**
1216
1295
  * 思维导图:先画连线(父右缘 → 子左缘的平滑曲线),再画节点
1217
1296
  * (白底圆角矩形 + 层级色描边 + 图标/文本/左上角属性说明/折叠标记)。
@@ -1221,6 +1300,29 @@ declare class Renderer {
1221
1300
  private drawMindMapNodes;
1222
1301
  /** 按像素宽度截断文本并加省略号 */
1223
1302
  private ellipsizeText;
1303
+ /**
1304
+ * 把连线两端解析成世界坐标折点 + 停靠法向(绑定落点、auto 重选、未绑定端点的轮廓吸附)。
1305
+ * 绘制与 getConnectorRoute 共用这一份,避免两处规则漂移。
1306
+ */
1307
+ private resolveConnectorEnds;
1308
+ /**
1309
+ * 用户手工调过折点的连线:走线 = 起点 → 用户折点… → 终点(两端仍跟随绑定/端点)。
1310
+ *
1311
+ * ⚠️ 两端要先做和「两端点」时同样的近似对齐:用户是照着**对齐后**的那条线拖的手柄,
1312
+ * 折点坐标是相对对齐后的轴线算出来的;若这里用未对齐的原始端点接上,就会在两端各
1313
+ * 留下几像素的斜边(画布与导出还会各画各的)。对齐后手工折点与端点严格同轴。
1314
+ */
1315
+ private withUserPoints;
1316
+ /**
1317
+ * 连线当前的真实走线(**世界坐标**折点)。
1318
+ * 手柄命中、手柄拖动都用它 —— 与绘制同一套计算,所以「看到手柄在哪,点它就一定命中」。
1319
+ */
1320
+ getConnectorRoute(shape: Shape, shapeMap: Map<string, Shape>): Vec2[];
1321
+ /**
1322
+ * 选中连线时:在每段(够长的)线段中点画一个可拖动的小手柄(飞书式「拖线段调位置」)。
1323
+ * 拖动交互在 SelectTool 的 'dragging-segment' 状态里。
1324
+ */
1325
+ private drawSegmentHandles;
1224
1326
  private drawLine;
1225
1327
  private drawArrow;
1226
1328
  /** 选中连线 → 在线条上叠加一条高亮辅助线 */
@@ -1242,12 +1344,24 @@ declare class Renderer {
1242
1344
  private static readonly GEN_GHOST_ID;
1243
1345
  /** 与 Editor.lineStyle() 一致:预览线用最终连线的真实颜色/粗细 */
1244
1346
  private static readonly PREVIEW_LINE_STYLE;
1347
+ /**
1348
+ * 'straight' 连线的近似对齐:**只在「就是两端点」时**把近对齐拉成一条直线。
1349
+ * 一旦用户手工折过点(>2 点),绝不能拉平 —— 否则用户拖出来的折弯会被
1350
+ * 「两端 y 取平均」整条压回原来的直线,看起来就像「拖了没反应/原来的线还在」。
1351
+ */
1352
+ private straightAligned;
1353
+ /**
1354
+ * 实际用于绘制/命中的连线类型:**'straight' 但用户手工折过点 → 按 'polyline' 处理**。
1355
+ * 直线型不参与正交路由,两端停靠点又常常不在同一轴上,原样画会出现几像素的斜边;
1356
+ * 折线化后严格横平竖直(飞书拖过线段后同样变成折线型连接线)。
1357
+ */
1358
+ private effectiveConnType;
1245
1359
  /**
1246
1360
  * 判断连线两端是否水平或垂直对齐(在容差内)。
1247
1361
  * 若在容差内,强制将坐标对齐(避免 grid snapping 导致无法形成直线)。
1248
1362
  */
1249
1363
  private getAlignedPoints;
1250
- /** 生成路径点(对齐容差已在上游处理)。 */
1364
+ /** 生成路径点。近似对齐(容差内)时先拉直,再交给对应连接类型路由。 */
1251
1365
  private buildPathPoints;
1252
1366
  /**
1253
1367
  * 使用 arcTo 绘制带圆角拐点的折线。
@@ -1261,48 +1375,25 @@ declare class Renderer {
1261
1375
  private drawSnapGuides;
1262
1376
  /** 折线:与orthogonal使用相同的H-V-H路由,差异仅在渲染(sharp vs rounded)。dock 法向在首/末段加一段垂直出线桩,垂直脱离图形边缘。 */
1263
1377
  private generatePolylinePoints;
1264
- /** 直角折线:与 polyline 使用相同的 H-V-H 正交路由,仅渲染方式(sharp)不同。 */
1265
- private generateOrthogonalPoints;
1266
1378
  /**
1267
1379
  * 把折线末段掰到期望轴向('H' 水平收尾 / 'V' 垂直收尾)。
1268
- * 绕行分支(A 星网格 / 退避)给出的路径末段方向不受控,这里在末点前补一个拐点,
1269
1380
  * 保证箭头始终沿接入边法向插入(或沿出线方向收尾)。
1270
1381
  */
1271
1382
  private ensureFinalAxis;
1272
- /** 去除连续重合点与共线点,精简冗余拐点 */
1383
+ /** 去除连续重合点与共线点,精简冗余拐点(唯一实现见 connectorEdit.collapseRoute) */
1273
1384
  private collapseLinePoints;
1274
- /** 计算单段直角路由:优先无碰撞、且符合总线轴方向的 H-V-H / V-H-V 折线,必要时绕开障碍 */
1275
- private computeOrthogonalRoute;
1276
1385
  /**
1277
- * 剔除「把某个端点压在身下」的障碍。
1386
+ * 计算单段直角路由:最简单的正交折线(H-V-H / V-H-V / L 拐角)
1387
+ * —— **刻意不做避障**,允许从其它图形上穿过去。
1278
1388
  *
1279
- * 这类障碍(典型:用户把图形拖到与另一张图形重叠)无法绕开 —— 端点的落点就在它里面,
1280
- * 与其避让只会让布线变成「绕着端点打转」的怪线,还会把 A* 的终点节点封死。
1281
- * 剔除后连线可以直穿重叠图形,观测上就是「叠在一起就随他叠」,
1282
- * 同时保证端点(点位)不会被自动挪走。
1283
- */
1284
- private dropObstaclesAtEndpoints;
1285
- /**
1286
- * 在停靠偏好对应的总线轴上,从源侧向外逐点平移总线位置,返回第一条「垂直方向和
1287
- * 末段水平分支都避开所有中间障碍」的总线折线;找不到则返回 null。
1288
- * 平移的起点越靠源侧越好,这样多条同一来源的连线会用同一条紧贴源点的主干总线。
1289
- */
1290
- private findClearBus;
1291
- /** 收集连线绕行所需的障碍包围盒(转为 shape 本地坐标)。
1292
- * 将本连线之外的所有图形(含其它连线/箭头/手绘)都作为障碍;
1293
- * 连接端点所在图形使用小间距(CONNECTED_PAD),其余图形使用大间距(ROUTE_CLEARANCE)。 */
1294
- private collectRoutingObstacles;
1295
- private pointInRect;
1296
- /** 整个折线路径是否与任一障碍相交 */
1297
- private routeHitsObstacles;
1298
- /** 轴对齐线段是否与任一障碍(向外扩其 pad)相交 */
1299
- private segmentHitsObstacle;
1300
- /**
1301
- * 正交避障路由器(类飞书)。
1302
- * 用「起终点坐标 + 每个障碍物扩展边界」构造一条布线网格,再用 A* 在网格上求
1303
- * 最短避障折线(半径外扩 pad 保证不贴边)。返回不含 from、含 to 的拐点序列。
1389
+ * 为什么不做避障(2026-09-22 决定,对齐飞书):绕行会让路径在拖动时反复改形
1390
+ * (3 段 ↔ 6 段拐点来回跳),观感就是「绕来绕去」;而「挡路/重叠时直接穿过去、
1391
+ * 端点不挪窝、永远横平竖直」更可预期也更好读。实测绕行只在约 6% 的布局下触发,
1392
+ * 但它带来的「画布 ≠ 导出」与拖拽跳变是所有场景都在承受的。
1393
+ *
1394
+ * 规则与 export.dockRoutePoints 完全一致 → 画布所见即导出所得。
1304
1395
  */
1305
- private routeOrthogonalAvoidance;
1396
+ private computeOrthogonalRoute;
1306
1397
  /**
1307
1398
  * 曲线:用三次贝塞尔拼接出平滑曲线(离散化采样)。
1308
1399
  * 端点若停靠在图形上(dock.fromN/toN),控制点沿法向伸出,使曲线垂直脱离 / 垂直接入
@@ -1433,6 +1524,10 @@ interface ToolContext {
1433
1524
  setGenerationPreview(preview: GenerationPreview | null): void;
1434
1525
  /** 悬停图形 → 画布为其绘制四边连接锚点(null 清除) */
1435
1526
  setHoverAnchorShape(id: string | null): void;
1527
+ /** 悬停连线 → 画布为整条线描一层高亮(null 清除) */
1528
+ setHoverConnector(id: string | null): void;
1529
+ /** 某条连线当前的真实走线(世界坐标折点):线段手柄的命中/拖动用它,与画布绘制同一套计算 */
1530
+ getConnectorRoute(shapeId: string): Vec2[];
1436
1531
  /** 新建连线的线条样式(颜色/粗细),与最终创建的连线保持一致 */
1437
1532
  getLineStyle(): ShapeStyle;
1438
1533
  /** 拖动到空白处:创建一条浮动线条并弹出"选择新图形"菜单 */
@@ -1496,6 +1591,14 @@ declare class SelectTool extends Tool {
1496
1591
  private hoverGenPoint;
1497
1592
  /** 悬停(未按下)的图形 id:为其显示四边连接锚点,可直接从这里拖出连线 */
1498
1593
  private hoverShapeId;
1594
+ /** 悬停(未按下)的连线 id:整条线描高亮 */
1595
+ private hoverConnectorId;
1596
+ /**
1597
+ * 正在拖动某条连线的第 index 段(飞书式「拖线段调位置」)。
1598
+ * route 是**按下那一刻**的走线:每次移动都从它重新算(拖动会插入折点、段序号会变,
1599
+ * 从原始走线重算才不会累积漂移)。
1600
+ */
1601
+ private draggingSegment;
1499
1602
  private rotatingState;
1500
1603
  private draggingArrowId;
1501
1604
  private draggingTerminal;
@@ -1514,6 +1617,34 @@ declare class SelectTool extends Tool {
1514
1617
  onPointerDown(point: Vec2, event: PointerEvent): void;
1515
1618
  onPointerMove(point: Vec2, event: PointerEvent): void;
1516
1619
  onPointerUp(point: Vec2, _event: PointerEvent): void;
1620
+ /**
1621
+ * 点是否落在某条连线的**当前真实走线**上(容差 10px)。
1622
+ * 画布上看到的那条线、悬停高亮、点击命中、手柄命中全部用这一份几何 ——
1623
+ * 「看到哪就能点到哪」,不会出现悬停能亮、点击没反应。
1624
+ */
1625
+ private isPointOnConnector;
1626
+ /**
1627
+ * 悬停命中的连线 id(未选中才有高亮提示;选中的连线由线段手柄负责显示)。
1628
+ * 与点击命中同一套判定(isPointOnConnector)。
1629
+ */
1630
+ private findHoverConnector;
1631
+ /**
1632
+ * 命中已选中连线上要拖动的线段(先手柄中心 10px,再退一步「离得最近的段」14px)。
1633
+ * 这样在选中连线上任意位置按下都能拖到最近那一段,也就不会误触发「拖整条线 / 从锚点拉新线」。
1634
+ */
1635
+ private hitConnectorSegmentHandle;
1636
+ /** 拖线段时的光标:水平段能上下拖 → 上下箭头;垂直段能左右拖 → 左右箭头 */
1637
+ private segmentCursor;
1638
+ /** 拖动线段:把这一段沿垂直方向平移(相邻段自然伸缩),两端端点永不移动 */
1639
+ private handleDraggingSegment;
1640
+ /**
1641
+ * 把调整后的走线写回 shape:
1642
+ * - 绑定连线(有 start/endBinding)只写中间折点 `userPoints`,两端继续跟随绑定;
1643
+ * - 自由连线(无绑定)整条走线就是它自己的 `points`。
1644
+ * 先把走线里的重复点/共线冗余点去掉:**如果去掉后就是一条直线(≤2 点),把 userPoints 清空**,
1645
+ * 交还给自动路由 —— 这样「往基线拖、把浅台阶抹平」之后,连线是真的恢复原样,而不是留着一堆零高度折点。
1646
+ */
1647
+ private writeConnectorRoute;
1517
1648
  hasTransientState(): boolean;
1518
1649
  /**
1519
1650
  * 取消一切瞬态交互(拖拽/生成/框选/旋转/连线端点拖拽)并清掉画布上的瞬态预览。
@@ -1573,6 +1704,7 @@ declare class SelectTool extends Tool {
1573
1704
  private bindingPosition;
1574
1705
  private isPointInShape;
1575
1706
  private isPointInHexagon;
1707
+ /** 点到线段最短距离(唯一实现见 connectorEdit.pointToSegmentDistance) */
1576
1708
  private pointToLineDistance;
1577
1709
  /**
1578
1710
  * 待新建图形与源图形重叠时,把它沿「源→目标」方向推到不重叠(留一个引线距离)。
@@ -1785,4 +1917,4 @@ declare function countMindMapNodes(root: MindMapNode): number;
1785
1917
  */
1786
1918
  declare function layoutMindMap(root: MindMapNode): MindMapLayoutResult;
1787
1919
 
1788
- 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, type Language, type LineShape, LineTool, MINDMAP_COLORS, MINDMAP_FONT_SIZE, MINDMAP_MAX_WIDTH, MINDMAP_MIN_WIDTH, MINDMAP_NODE_HEIGHT, Mat2d, type MessageKey, type MindMapLayoutResult, type MindMapNode, type MindMapNodePos, type MindMapShape, type OctagonShape, type ParallelogramShape, type PentagonShape, type Rect, type RectangleShape, Renderer, type RoundedRectangleShape, SelectTool, type Shape, type ShapeStyle, ShapeTool, type ShapeType, type SnapGuide, type StarShape, 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, countMindMapNodes, downloadBlob, exportToBlob, findMindMapNode, getContentBounds, getLanguage, getMindMapNodeDepth, getMindMapParent, getTheme, hexToRgba, layoutMindMap, mindMapNodeColor, mindMapNodeSize, renderSVGString, renderToCanvas, setLanguage, setTheme, shadeColor, subscribeLanguage, subscribeTheme, t };
1920
+ 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, 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, type SegmentHandle, SelectTool, type Shape, type ShapeStyle, ShapeTool, type ShapeType, type SnapGuide, type StarShape, 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, getLanguage, getMindMapNodeDepth, getMindMapParent, getTheme, hexToRgba, layoutMindMap, mindMapNodeColor, mindMapNodeSize, offsetConnectorSegment, pickSegmentHandle, pointToSegmentDistance, renderSVGString, renderToCanvas, routeToUserPoints, setLanguage, setTheme, shadeColor, subscribeLanguage, subscribeTheme, t };