sldeditor 0.14.0 → 0.15.1

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.
Files changed (44) hide show
  1. package/dist/canvas/AnnotationDraftPreview.d.ts +11 -0
  2. package/dist/canvas/AnnotationDraftPreview.d.ts.map +1 -0
  3. package/dist/canvas/AnnotationHandles.d.ts +17 -0
  4. package/dist/canvas/AnnotationHandles.d.ts.map +1 -0
  5. package/dist/canvas/CanvasSvg.d.ts.map +1 -1
  6. package/dist/canvas/FreeAnnotationLayer.d.ts +16 -12
  7. package/dist/canvas/FreeAnnotationLayer.d.ts.map +1 -1
  8. package/dist/canvas/tools/LineTool.d.ts +3 -0
  9. package/dist/canvas/tools/LineTool.d.ts.map +1 -0
  10. package/dist/canvas/tools/RectTool.d.ts +3 -0
  11. package/dist/canvas/tools/RectTool.d.ts.map +1 -0
  12. package/dist/canvas/tools/SelectTool.d.ts.map +1 -1
  13. package/dist/canvas/tools/TableTool.d.ts +3 -0
  14. package/dist/canvas/tools/TableTool.d.ts.map +1 -0
  15. package/dist/canvas/tools/index.d.ts.map +1 -1
  16. package/dist/canvas/useKeyboardShortcuts.d.ts.map +1 -1
  17. package/dist/components/AnnotationEditToolbar.d.ts +15 -0
  18. package/dist/components/AnnotationEditToolbar.d.ts.map +1 -0
  19. package/dist/components/EditorShell.d.ts.map +1 -1
  20. package/dist/components/FloatingToolbar.d.ts.map +1 -1
  21. package/dist/components/PropertyPanel.d.ts.map +1 -1
  22. package/dist/components/RightPanel.d.ts.map +1 -1
  23. package/dist/i18n/messages.d.ts +72 -0
  24. package/dist/i18n/messages.d.ts.map +1 -1
  25. package/dist/index.d.ts +2 -1
  26. package/dist/index.d.ts.map +1 -1
  27. package/dist/lib/annotation-geom.d.ts +77 -0
  28. package/dist/lib/annotation-geom.d.ts.map +1 -0
  29. package/dist/lib/export-dxf.d.ts +3 -3
  30. package/dist/lib/export-dxf.d.ts.map +1 -1
  31. package/dist/lib/export-image.d.ts +3 -3
  32. package/dist/lib/export-image.d.ts.map +1 -1
  33. package/dist/model/index.d.ts +2 -1
  34. package/dist/model/index.d.ts.map +1 -1
  35. package/dist/model/types.d.ts +68 -1
  36. package/dist/model/types.d.ts.map +1 -1
  37. package/dist/sldeditor.cjs +68 -48
  38. package/dist/sldeditor.cjs.map +1 -1
  39. package/dist/sldeditor.js +7926 -6344
  40. package/dist/sldeditor.js.map +1 -1
  41. package/dist/store/store.d.ts +24 -3
  42. package/dist/store/store.d.ts.map +1 -1
  43. package/dist/style.css +1 -1
  44. package/package.json +1 -1
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Live ghost for the annotation drawing tools (rect / line / table). Reads
3
+ * `annotationDraft` from the store and renders exactly the geometry the tool
4
+ * would commit — both sides call the same `draft*` helpers in
5
+ * `lib/annotation-geom`, so the preview can never lie about the result.
6
+ *
7
+ * The table preview adds a "cols × rows" count badge near the cursor,
8
+ * mirroring word-processor table insertion.
9
+ */
10
+ export declare function AnnotationDraftPreview(): import("react/jsx-runtime").JSX.Element | null;
11
+ //# sourceMappingURL=AnnotationDraftPreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnnotationDraftPreview.d.ts","sourceRoot":"","sources":["../../src/canvas/AnnotationDraftPreview.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAYH,wBAAgB,sBAAsB,mDAgDrC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Edit handles for the selected annotation:
3
+ * - rect / table: 8 resize grips (corners + edge midpoints);
4
+ * - table: extra invisible strips over internal column/row borders that
5
+ * drag individual column widths / row heights (Excel-style);
6
+ * - line: one grip per vertex (shift = 45° constraint against its
7
+ * neighbor);
8
+ * - text: none (font size lives in the property panel).
9
+ *
10
+ * Handles capture their own pointer events (SelectTool ignores
11
+ * `.ole-annotation-handle` targets). During a drag the new geometry is
12
+ * published as `annotationPreview` — a store-ephemeral override the
13
+ * annotation layer renders instead of the model — and committed as a single
14
+ * `updateAnnotation` on release, so one drag = one undo entry.
15
+ */
16
+ export declare function AnnotationHandles(): import("react/jsx-runtime").JSX.Element | null;
17
+ //# sourceMappingURL=AnnotationHandles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnnotationHandles.d.ts","sourceRoot":"","sources":["../../src/canvas/AnnotationHandles.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA2BH,wBAAgB,iBAAiB,mDAqBhC"}
@@ -1 +1 @@
1
- {"version":3,"file":"CanvasSvg.d.ts","sourceRoot":"","sources":["../../src/canvas/CanvasSvg.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA2DH,wBAAgB,SAAS,4CAoRxB"}
1
+ {"version":3,"file":"CanvasSvg.d.ts","sourceRoot":"","sources":["../../src/canvas/CanvasSvg.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA6DH,wBAAgB,SAAS,4CAiSxB"}
@@ -1,18 +1,22 @@
1
1
  /**
2
- * Renders user-created free text annotations from `diagram.annotations`.
3
- * Each annotation is a draggable, editable note unattached to any element.
2
+ * Renders user-created free annotations from `diagram.annotations` — text
3
+ * notes, rect group-frames, lines and tables. All variants share the
4
+ * conventions established by text notes:
4
5
  *
5
- * Three render states per annotation:
6
- * 1. Idle → `<text>` painted at its position.
7
- * 2. Selected (idle) → text plus a dashed bbox halo (matches element halo).
8
- * 3. Editing → `<foreignObject>` hosting a contentEditable div;
9
- * autoselects content on entry, commits on Enter or
10
- * blur, drops empty content on commit (auto-cleanup
11
- * of empty annotations created by the text tool).
6
+ * - the wrapping group carries `data-annotation-id` for DOM hit-testing;
7
+ * - `data-selected` drives the CSS selection recolor;
8
+ * - moving is handled generically by SelectTool (drag → patch `at`).
12
9
  *
13
- * Hit-testing carries the annotation's id via `data-annotation-id` so tools
14
- * can route the gesture without React state lookups, mirroring how elements
15
- * use `data-element-id`.
10
+ * Hit semantics differ deliberately per shape:
11
+ * - text: a padded invisible rect over the block (small, harmless);
12
+ * - rect: **border only** — the interior stays click-transparent so a
13
+ * group frame never blocks selecting the devices inside it;
14
+ * - line: a fat invisible stroke band along the polyline;
15
+ * - table: the whole surface (tables are opaque objects, not overlays).
16
+ *
17
+ * While a resize/vertex handle drag is in flight, `annotationPreview`
18
+ * overrides the model annotation with the same id so the shape tracks the
19
+ * pointer without touching the undo history.
16
20
  */
17
21
  export declare function FreeAnnotationLayer(): import("react/jsx-runtime").JSX.Element | null;
18
22
  //# sourceMappingURL=FreeAnnotationLayer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FreeAnnotationLayer.d.ts","sourceRoot":"","sources":["../../src/canvas/FreeAnnotationLayer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AASH,wBAAgB,mBAAmB,mDAsBlC"}
1
+ {"version":3,"file":"FreeAnnotationLayer.d.ts","sourceRoot":"","sources":["../../src/canvas/FreeAnnotationLayer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AA2BH,wBAAgB,mBAAmB,mDAsDlC"}
@@ -0,0 +1,3 @@
1
+ import { Tool } from './types';
2
+ export declare const LineTool: Tool;
3
+ //# sourceMappingURL=LineTool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LineTool.d.ts","sourceRoot":"","sources":["../../../src/canvas/tools/LineTool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEpC,eAAO,MAAM,QAAQ,EAAE,IA+DtB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Tool } from './types';
2
+ export declare const RectTool: Tool;
3
+ //# sourceMappingURL=RectTool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RectTool.d.ts","sourceRoot":"","sources":["../../../src/canvas/tools/RectTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAMH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAEpC,eAAO,MAAM,QAAQ,EAAE,IA2DtB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectTool.d.ts","sourceRoot":"","sources":["../../../src/canvas/tools/SelectTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAkBH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AA4CpC,eAAO,MAAM,UAAU,EAAE,IAogBxB,CAAC"}
1
+ {"version":3,"file":"SelectTool.d.ts","sourceRoot":"","sources":["../../../src/canvas/tools/SelectTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AA4BH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAgDpC,eAAO,MAAM,UAAU,EAAE,IAmhBxB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Tool } from './types';
2
+ export declare const TableTool: Tool;
3
+ //# sourceMappingURL=TableTool.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableTool.d.ts","sourceRoot":"","sources":["../../../src/canvas/tools/TableTool.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAOpC,eAAO,MAAM,SAAS,EAAE,IA6DvB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/canvas/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAS5C,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAQtC,CAAC;AAEF,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/canvas/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAY5C,eAAO,MAAM,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAWtC,CAAC;AAEF,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useKeyboardShortcuts.d.ts","sourceRoot":"","sources":["../../src/canvas/useKeyboardShortcuts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgBH;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAiCvC;AAGD,wBAAgB,oBAAoB,IAAI,IAAI,CA2H3C"}
1
+ {"version":3,"file":"useKeyboardShortcuts.d.ts","sourceRoot":"","sources":["../../src/canvas/useKeyboardShortcuts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAgBH;;;;;GAKG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAyCvC;AAGD,wBAAgB,oBAAoB,IAAI,IAAI,CA4I3C"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Floating Done / Cancel controls shown while an annotation is being edited
3
+ * inline (a text note or a table cell). Gives a discoverable, mouse-driven
4
+ * way to finish editing beyond the Enter / Esc keys — the same
5
+ * follow-the-work pattern as ContextualToolbar (rAF + DOM transform, no React
6
+ * state in the hot loop).
7
+ *
8
+ * Both buttons `preventDefault` on mousedown so pressing them does not blur
9
+ * the inline editor first — otherwise the editor's own `onBlur` would commit
10
+ * before Cancel could restore the original value. The click handlers then act
11
+ * on the still-focused editor deliberately: Done blurs it (commit), Cancel
12
+ * writes the original value back and blurs (a no-op commit / delete-if-empty).
13
+ */
14
+ export declare function AnnotationEditToolbar(): import("react/jsx-runtime").JSX.Element;
15
+ //# sourceMappingURL=AnnotationEditToolbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnnotationEditToolbar.d.ts","sourceRoot":"","sources":["../../src/components/AnnotationEditToolbar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAuBH,wBAAgB,qBAAqB,4CAmHpC"}
@@ -1 +1 @@
1
- {"version":3,"file":"EditorShell.d.ts","sourceRoot":"","sources":["../../src/components/EditorShell.tsx"],"names":[],"mappings":"AAuEA,wBAAgB,WAAW,4CAuC1B"}
1
+ {"version":3,"file":"EditorShell.d.ts","sourceRoot":"","sources":["../../src/components/EditorShell.tsx"],"names":[],"mappings":"AAwEA,wBAAgB,WAAW,4CAwC1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"FloatingToolbar.d.ts","sourceRoot":"","sources":["../../src/components/FloatingToolbar.tsx"],"names":[],"mappings":"AA6KA,wBAAgB,eAAe,4CAyG9B"}
1
+ {"version":3,"file":"FloatingToolbar.d.ts","sourceRoot":"","sources":["../../src/components/FloatingToolbar.tsx"],"names":[],"mappings":"AAsPA,wBAAgB,eAAe,4CA4H9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyPanel.d.ts","sourceRoot":"","sources":["../../src/components/PropertyPanel.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAoBH,wBAAgB,aAAa,mDAyE5B"}
1
+ {"version":3,"file":"PropertyPanel.d.ts","sourceRoot":"","sources":["../../src/components/PropertyPanel.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AA+BH,wBAAgB,aAAa,mDA2E5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"RightPanel.d.ts","sourceRoot":"","sources":["../../src/components/RightPanel.tsx"],"names":[],"mappings":"AAQA,wBAAgB,UAAU,mDA4DzB"}
1
+ {"version":3,"file":"RightPanel.d.ts","sourceRoot":"","sources":["../../src/components/RightPanel.tsx"],"names":[],"mappings":"AASA,wBAAgB,UAAU,mDA+EzB"}
@@ -56,6 +56,26 @@ export declare const messages: {
56
56
  readonly 'props.nodeStats': "{terminals} 个端子 · {elements} 个元件";
57
57
  readonly 'props.selectElement': "选中 {label}";
58
58
  readonly 'props.selectWholeNode': "选中整个电气节点";
59
+ readonly 'props.annText': "文字";
60
+ readonly 'props.annRect': "矩形";
61
+ readonly 'props.annLine': "线条";
62
+ readonly 'props.annTable': "表格";
63
+ readonly 'props.annNotFound': "标注 {id} 不存在";
64
+ readonly 'props.annLabel': "标签";
65
+ readonly 'props.annLabelPlaceholder': "如:1#配电柜";
66
+ readonly 'props.annStroke': "线型";
67
+ readonly 'props.annStrokeSolid': "实线";
68
+ readonly 'props.annStrokeDashed': "虚线";
69
+ readonly 'props.annFill': "填充";
70
+ readonly 'props.annFillNone': "无";
71
+ readonly 'props.annFillTint': "浅色";
72
+ readonly 'props.annArrow': "箭头";
73
+ readonly 'props.annArrowNone': "无";
74
+ readonly 'props.annArrowEnd': "单向";
75
+ readonly 'props.annArrowBoth': "双向";
76
+ readonly 'props.annFontSize': "字号";
77
+ readonly 'props.annRows': "行数";
78
+ readonly 'props.annCols': "列数";
59
79
  readonly 'view.zoomOut': "缩小";
60
80
  readonly 'view.zoomOutHint': "按预设档位缩小;也可滚轮 ↓ 或 ⌘−";
61
81
  readonly 'view.reset': "重置到 100%";
@@ -96,6 +116,12 @@ export declare const messages: {
96
116
  readonly 'tool.placeHint': "点击画布放置;或从端子/母线拖出,同时放置并连接";
97
117
  readonly 'tool.text': "文字";
98
118
  readonly 'tool.textHint': "点击画布放置一段文字注释;双击文字可重新编辑";
119
+ readonly 'tool.rect': "矩形";
120
+ readonly 'tool.rectHint': "拖动绘制矩形 / 分组框(默认虚线);按住 Shift 画正方形";
121
+ readonly 'tool.line': "线条";
122
+ readonly 'tool.lineHint': "拖动绘制标注线;按住 Shift 按 45° 约束;箭头在属性面板设置";
123
+ readonly 'tool.table': "表格";
124
+ readonly 'tool.tableHint': "拖动扫出行列(实时显示 列×行),或单击放置默认表格;双击单元格填写";
99
125
  readonly 'mode.selectWithSel': "拖动元件移动 · 拖端子连线 · 右键打开菜单";
100
126
  readonly 'mode.selectEmpty': "点选元件 · 拖动移动 · 框选多个 · 右键打开菜单";
101
127
  readonly 'mode.pan': "拖动画布 · 滚轮缩放 · 按住空格可在其他工具下临时平移";
@@ -108,6 +134,13 @@ export declare const messages: {
108
134
  readonly 'mode.placeFromTerm': "拖到目标位置释放,新元件将连接到起点端子";
109
135
  readonly 'mode.placeNormal': "点击空白放置;或从已有端子 / 母线拖出,同时放置并连接";
110
136
  readonly 'mode.text': "点击画布放置文字;双击已有文字可编辑;选中后可拖动 / 删除";
137
+ readonly 'mode.rect': "拖动绘制矩形;Shift 正方形;释放后可拉伸并在属性面板加标签";
138
+ readonly 'mode.line': "拖动绘制线条;Shift 按 45° 约束;释放后可在属性面板加箭头";
139
+ readonly 'mode.table': "拖动扫出表格行列,或单击放置 3×3 表格;双击单元格填写内容";
140
+ readonly 'mode.annTextSel': "单击文字即可编辑 · 拖动移动 · Del 删除";
141
+ readonly 'mode.annTableSel': "单击单元格填写内容 · 拖动移动 · Del 删除";
142
+ readonly 'mode.annShapeSel': "拖动移动 · 拖动手柄缩放 · 右侧面板改样式 · Del 删除";
143
+ readonly 'mode.annEditing': "输入内容 · Enter 确认 · Esc 取消 · 或用 ✓ / ✕ 按钮";
111
144
  readonly 'mode.escSelect': "Esc 清除选择";
112
145
  readonly 'mode.escOther': "右键 / Esc 取消";
113
146
  readonly 'tool.placeNoKindTooltip': "从左侧元件库选择一个元件后点击画布放置";
@@ -128,6 +161,9 @@ export declare const messages: {
128
161
  readonly 'ctx.ariaNode': "选中节点操作";
129
162
  readonly 'ctx.ariaWire': "选中连线操作";
130
163
  readonly 'ctx.ariaElement': "选中元件操作";
164
+ readonly 'ctx.ariaEdit': "编辑操作";
165
+ readonly 'ctx.done': "完成";
166
+ readonly 'ctx.cancel': "取消";
131
167
  readonly 'ctx.rotate': "旋转 90°";
132
168
  readonly 'ctx.rotateHint': "顺时针旋转选中元件,连线随端子自动重排";
133
169
  readonly 'ctx.mirror': "水平镜像";
@@ -233,6 +269,26 @@ export declare const messages: {
233
269
  readonly 'props.nodeStats': "{terminals} terminals · {elements} elements";
234
270
  readonly 'props.selectElement': "Select {label}";
235
271
  readonly 'props.selectWholeNode': "Select whole electrical node";
272
+ readonly 'props.annText': "Text";
273
+ readonly 'props.annRect': "Rectangle";
274
+ readonly 'props.annLine': "Line";
275
+ readonly 'props.annTable': "Table";
276
+ readonly 'props.annNotFound': "Annotation {id} not found";
277
+ readonly 'props.annLabel': "Label";
278
+ readonly 'props.annLabelPlaceholder': "e.g. Panel #1";
279
+ readonly 'props.annStroke': "Stroke";
280
+ readonly 'props.annStrokeSolid': "Solid";
281
+ readonly 'props.annStrokeDashed': "Dashed";
282
+ readonly 'props.annFill': "Fill";
283
+ readonly 'props.annFillNone': "None";
284
+ readonly 'props.annFillTint': "Tint";
285
+ readonly 'props.annArrow': "Arrows";
286
+ readonly 'props.annArrowNone': "None";
287
+ readonly 'props.annArrowEnd': "End";
288
+ readonly 'props.annArrowBoth': "Both";
289
+ readonly 'props.annFontSize': "Font size";
290
+ readonly 'props.annRows': "Rows";
291
+ readonly 'props.annCols': "Columns";
236
292
  readonly 'view.zoomOut': "Zoom out";
237
293
  readonly 'view.zoomOutHint': "Step zoom out; also wheel ↓ or ⌘−";
238
294
  readonly 'view.reset': "Reset to 100%";
@@ -273,6 +329,12 @@ export declare const messages: {
273
329
  readonly 'tool.placeHint': "Click to place; or drag from a terminal/bus to place and connect";
274
330
  readonly 'tool.text': "Text";
275
331
  readonly 'tool.textHint': "Click the canvas to drop a text note; double-click an existing one to edit";
332
+ readonly 'tool.rect': "Rectangle";
333
+ readonly 'tool.rectHint': "Drag to draw a rectangle / group frame (dashed by default); Shift for a square";
334
+ readonly 'tool.line': "Line";
335
+ readonly 'tool.lineHint': "Drag to draw an annotation line; Shift snaps to 45°; arrows live in the panel";
336
+ readonly 'tool.table': "Table";
337
+ readonly 'tool.tableHint': "Drag to sweep out cols × rows (live count), or click for a default table; double-click cells to type";
276
338
  readonly 'mode.selectWithSel': "Drag elements · drag terminals to wire · right-click for menu";
277
339
  readonly 'mode.selectEmpty': "Click to pick · drag to move · marquee for multiple · right-click for menu";
278
340
  readonly 'mode.pan': "Drag the canvas · scroll to zoom · hold Space to pan in any tool";
@@ -285,6 +347,13 @@ export declare const messages: {
285
347
  readonly 'mode.placeFromTerm': "Release at the target — the new element will connect back to the source terminal";
286
348
  readonly 'mode.placeNormal': "Click empty space to place; or drag from a terminal / bus to place and connect";
287
349
  readonly 'mode.text': "Click to drop text · double-click to edit · drag selected to move · Del to remove";
350
+ readonly 'mode.rect': "Drag to draw a rectangle · Shift for square · resize and label it after release";
351
+ readonly 'mode.line': "Drag to draw a line · Shift snaps to 45° · add arrows in the panel after release";
352
+ readonly 'mode.table': "Drag to sweep out the grid, or click for a 3×3 table · double-click cells to type";
353
+ readonly 'mode.annTextSel': "Click the text to edit · drag to move · Del to remove";
354
+ readonly 'mode.annTableSel': "Click a cell to fill it in · drag to move · Del to remove";
355
+ readonly 'mode.annShapeSel': "Drag to move · drag handles to resize · restyle in the panel · Del to remove";
356
+ readonly 'mode.annEditing': "Type · Enter to confirm · Esc to cancel · or the ✓ / ✕ buttons";
288
357
  readonly 'mode.escSelect': "Esc clears selection";
289
358
  readonly 'mode.escOther': "Right-click / Esc to cancel";
290
359
  readonly 'tool.placeNoKindTooltip': "Pick a kind in the library on the left, then click the canvas";
@@ -305,6 +374,9 @@ export declare const messages: {
305
374
  readonly 'ctx.ariaNode': "Node actions";
306
375
  readonly 'ctx.ariaWire': "Wire actions";
307
376
  readonly 'ctx.ariaElement': "Element actions";
377
+ readonly 'ctx.ariaEdit': "Editing actions";
378
+ readonly 'ctx.done': "Done";
379
+ readonly 'ctx.cancel': "Cancel";
308
380
  readonly 'ctx.rotate': "Rotate 90°";
309
381
  readonly 'ctx.rotateHint': "Rotate selection clockwise; wires re-route through new terminals";
310
382
  readonly 'ctx.mirror': "Mirror horizontally";
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/i18n/messages.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,QAAQ;;;;;;;;;;;;;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M,GAAG,MAAM,OAAO,QAAQ,CAAC;AAC3C,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  export { OneLineEditor } from './OneLineEditor';
2
2
  export type { OneLineEditorProps } from './OneLineEditor';
3
3
  export type { OneLineEditorProps as SldEditorProps } from './OneLineEditor';
4
- export type { AnnotationId, Bus, BusId, BusLayout, DiagramFile, DiagramMeta, DiagramVersion, Element, ElementId, Junction, JunctionId, JunctionLayout, LibraryEntry, LibraryLabelAnchor, LibraryParamField, LibrarySource, LibraryStateField, LibraryStretchable, LibraryTerminal, NodeId, Orientation, ParamValue, PinName, Placement, TextAnnotation, TerminalRef, Wire, WireEnd, WireId, } from './model';
4
+ export type { Annotation, AnnotationFill, AnnotationId, AnnotationKind, AnnotationPatch, AnnotationStroke, Bus, BusId, BusLayout, DiagramFile, DiagramMeta, DiagramVersion, Element, ElementId, Junction, JunctionId, JunctionLayout, LibraryEntry, LibraryLabelAnchor, LibraryParamField, LibrarySource, LibraryStateField, LibraryStretchable, LibraryTerminal, LineAnnotation, LineArrow, NodeId, Orientation, ParamValue, PinName, Placement, RectAnnotation, TableAnnotation, TextAnnotation, TerminalRef, Wire, WireEnd, WireId, } from './model';
5
+ export { annotationKind, isTextAnnotation } from './model';
5
6
  export { compile, LIBRARY, getLibraryEntry, emptyInternalModel, resolvePlacement, transformPoint, transformOrientation, orientationVec, } from './compiler';
6
7
  export type { BusGeometry, ConnectivityNode, Diagnostic, InternalModel, ResolvedBus, ResolvedElement, ResolvedJunction, ResolvedPlacement, TerminalGeometry, WireRender, } from './compiler';
7
8
  export { useEditorStore } from './store';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AAEtB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAA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MAAM,YAAY,CAAC;AACpB,YAAY,EACV,WAAW,EACX,gBAAgB,EAChB,UAAU,EACV,aAAa,EACb,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,GACX,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAM3C,OAAO,EACL,eAAe,EACf,QAAQ,EACR,YAAY,EACZ,aAAa,EACb,cAAc,GACf,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACnC,YAAY,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAMrC,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAChE,YAAY,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAI/C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAKrD,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAKzE,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/D,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,77 @@
1
+ import { Annotation, LineAnnotation, TableAnnotation } from '../model';
2
+ /** Base font for text annotations, rect labels and table cells. */
3
+ export declare const ANNOTATION_FONT_SIZE = 8;
4
+ export declare const ANNOTATION_LINE_HEIGHT = 1.25;
5
+ /** SVG dash pattern used by `stroke: 'dashed'` rects and lines. */
6
+ export declare const ANNOTATION_DASH = "6 4";
7
+ /** Faint wash used by `fill: 'tint'` (foreground color at this opacity). */
8
+ export declare const TINT_OPACITY = 0.05;
9
+ /** Arrowhead geometry (world units). */
10
+ export declare const ARROW_LENGTH = 8;
11
+ export declare const ARROW_HALF_WIDTH = 3;
12
+ /** Rect label inset from the top-left corner. */
13
+ export declare const RECT_LABEL_PAD = 4;
14
+ /** Table cell text padding and default grid cell size for the table tool. */
15
+ export declare const TABLE_CELL_PAD_X = 3;
16
+ export declare const TABLE_DEFAULT_CELL_W = 60;
17
+ export declare const TABLE_DEFAULT_CELL_H = 20;
18
+ export declare const TABLE_MIN_COL_W = 16;
19
+ export declare const TABLE_MIN_ROW_H = 12;
20
+ /** Minimum committed rect size / line length; smaller gestures are ignored. */
21
+ export declare const MIN_RECT_SIZE = 10;
22
+ export declare const MIN_LINE_LEN = 10;
23
+ /**
24
+ * Heuristic block size of a text annotation (~0.55 em per char). Mirrors the
25
+ * canvas halo estimate; used for export bboxes.
26
+ */
27
+ export declare function textBlockSize(text: string, fontSize: number): [number, number];
28
+ /** Absolute vertices of a line annotation (`points` are relative to `at`). */
29
+ export declare function lineAbsPoints(ann: LineAnnotation): [number, number][];
30
+ /**
31
+ * Filled-triangle arrowheads for a polyline. Returns one triangle (3 world
32
+ * points) per requested end, oriented along the adjacent segment.
33
+ */
34
+ export declare function lineArrowHeads(pts: [number, number][], arrow: LineAnnotation['arrow']): [number, number][][];
35
+ export declare function tableSize(ann: TableAnnotation): [number, number];
36
+ /** Cumulative x-offsets of column edges: `[0, w0, w0+w1, …, total]`. */
37
+ export declare function tableColEdges(ann: TableAnnotation): number[];
38
+ /** Cumulative y-offsets of row edges: `[0, h0, h0+h1, …, total]`. */
39
+ export declare function tableRowEdges(ann: TableAnnotation): number[];
40
+ /**
41
+ * Row/col index of the world point, or null when outside the table.
42
+ */
43
+ export declare function tableCellAt(ann: TableAnnotation, world: [number, number]): [number, number] | null;
44
+ /** In-progress drag published by the rect/line/table tools. */
45
+ export interface AnnotationDraft {
46
+ kind: 'rect' | 'line' | 'table';
47
+ start: [number, number];
48
+ current: [number, number];
49
+ /** Shift held: square rects / 45°-stepped lines. */
50
+ constrain: boolean;
51
+ }
52
+ /** Normalized rect from a draft (shift → square). Never zero-sized. */
53
+ export declare function draftRect(d: AnnotationDraft): {
54
+ at: [number, number];
55
+ size: [number, number];
56
+ };
57
+ /** Line endpoint from a draft (shift → snap direction to 45° steps). */
58
+ export declare function draftLineEnd(d: AnnotationDraft): [number, number];
59
+ /** Snap `to` so the segment `from → to` lies on a 45°-multiple direction. */
60
+ export declare function constrain45(from: [number, number], to: [number, number]): [number, number];
61
+ /** Column/row counts + geometry for a table draft (Word-style grid dragger). */
62
+ export declare function draftTable(d: AnnotationDraft): {
63
+ at: [number, number];
64
+ cols: number;
65
+ rows: number;
66
+ };
67
+ /** Fresh table annotation body with uniform default cells. */
68
+ export declare function makeTableBody(cols: number, rows: number): Pick<TableAnnotation, 'colWidths' | 'rowHeights' | 'cells'>;
69
+ export interface AnnBBox {
70
+ minX: number;
71
+ minY: number;
72
+ maxX: number;
73
+ maxY: number;
74
+ }
75
+ /** World-space bbox of any annotation (text uses the width heuristic). */
76
+ export declare function annotationBBox(a: Annotation): AnnBBox;
77
+ //# sourceMappingURL=annotation-geom.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"annotation-geom.d.ts","sourceRoot":"","sources":["../../src/lib/annotation-geom.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EAEd,eAAe,EAEhB,MAAM,UAAU,CAAC;AAIlB,mEAAmE;AACnE,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C,mEAAmE;AACnE,eAAO,MAAM,eAAe,QAAQ,CAAC;AAErC,4EAA4E;AAC5E,eAAO,MAAM,YAAY,OAAO,CAAC;AAEjC,wCAAwC;AACxC,eAAO,MAAM,YAAY,IAAI,CAAC;AAC9B,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAElC,iDAAiD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1,5 @@
1
1
  import { InternalModel } from '../compiler';
2
- import { LabelMode, TextAnnotation } from '../model';
2
+ import { Annotation, LabelMode } from '../model';
3
3
  export interface DxfExportOptions {
4
4
  /** Used as the $PROJECTNAME header value when present. */
5
5
  title?: string;
@@ -7,9 +7,9 @@ export interface DxfExportOptions {
7
7
  precision?: number;
8
8
  /** Element label visibility. Mirrors `DiagramFile.meta.labelMode`. Default 'all'. */
9
9
  labelMode?: LabelMode;
10
- /** Free text annotations from `DiagramFile.annotations` — `InternalModel`
10
+ /** Free annotations from `DiagramFile.annotations` — `InternalModel`
11
11
  * doesn't carry them, so the caller passes them through. */
12
- annotations?: TextAnnotation[];
12
+ annotations?: Annotation[];
13
13
  }
14
14
  export declare function buildExportDxf(model: InternalModel, opts?: DxfExportOptions): string;
15
15
  export declare function downloadDxf(model: InternalModel, filename?: string, opts?: DxfExportOptions): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"export-dxf.d.ts","sourceRoot":"","sources":["../../src/lib/export-dxf.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAEL,KAAK,aAAa,EAEnB,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAU1D,MAAM,WAAW,gBAAgB;IAC/B,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qFAAqF;IACrF,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;iEAC6D;IAC7D,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;CAChC;AAaD,wBAAgB,cAAc,CAC5B,KAAK,EAAE,aAAa,EACpB,IAAI,GAAE,gBAAqB,GAC1B,MAAM,CAuFR;AAED,wBAAsB,WAAW,CAC/B,KAAK,EAAE,aAAa,EACpB,QAAQ,SAAgB,EACxB,IAAI,CAAC,EAAE,gBAAgB,GACtB,OAAO,CAAC,IAAI,CAAC,CAUf"}
1
+ {"version":3,"file":"export-dxf.d.ts","sourceRoot":"","sources":["../../src/lib/export-dxf.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAEL,KAAK,aAAa,EAEnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,SAAS,EAKf,MAAM,UAAU,CAAC;AAoBlB,MAAM,WAAW,gBAAgB;IAC/B,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qFAAqF;IACrF,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;iEAC6D;IAC7D,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;CAC5B;AAaD,wBAAgB,cAAc,CAC5B,KAAK,EAAE,aAAa,EACpB,IAAI,GAAE,gBAAqB,GAC1B,MAAM,CAgLR;AAED,wBAAsB,WAAW,CAC/B,KAAK,EAAE,aAAa,EACpB,QAAQ,SAAgB,EACxB,IAAI,CAAC,EAAE,gBAAgB,GACtB,OAAO,CAAC,IAAI,CAAC,CAUf"}
@@ -1,5 +1,5 @@
1
1
  import { InternalModel } from '../compiler';
2
- import { LabelMode, TextAnnotation } from '../model';
2
+ import { Annotation, LabelMode } from '../model';
3
3
  export interface ExportOptions {
4
4
  /** Title used as the suggested filename / SVG <title>. */
5
5
  title?: string;
@@ -7,9 +7,9 @@ export interface ExportOptions {
7
7
  background?: string;
8
8
  /** Element label visibility. Mirrors `DiagramFile.meta.labelMode`. Default 'all'. */
9
9
  labelMode?: LabelMode;
10
- /** Free text annotations from `DiagramFile.annotations` — `InternalModel`
10
+ /** Free annotations from `DiagramFile.annotations` — `InternalModel`
11
11
  * doesn't carry them, so the caller passes them through. */
12
- annotations?: TextAnnotation[];
12
+ annotations?: Annotation[];
13
13
  }
14
14
  export declare function buildExportSvg(model: InternalModel, opts?: ExportOptions): string;
15
15
  export declare function downloadSvg(model: InternalModel, filename?: string, opts?: ExportOptions): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"export-image.d.ts","sourceRoot":"","sources":["../../src/lib/export-image.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAsB1D,MAAM,WAAW,aAAa;IAC5B,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qFAAqF;IACrF,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;iEAC6D;IAC7D,WAAW,CAAC,EAAE,cAAc,EAAE,CAAC;CAChC;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,aAAa,EACpB,IAAI,GAAE,aAAkB,GACvB,MAAM,CAoIR;AAsID,wBAAsB,WAAW,CAC/B,KAAK,EAAE,aAAa,EACpB,QAAQ,SAAgB,EACxB,IAAI,CAAC,EAAE,aAAa,GACnB,OAAO,CAAC,IAAI,CAAC,CAMf;AAED,wBAAsB,WAAW,CAC/B,KAAK,EAAE,aAAa,EACpB,QAAQ,SAAgB,EACxB,IAAI,CAAC,EAAE,aAAa,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GACxC,OAAO,CAAC,IAAI,CAAC,CA0Bf"}
1
+ {"version":3,"file":"export-image.d.ts","sourceRoot":"","sources":["../../src/lib/export-image.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAkB,KAAK,aAAa,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAEL,KAAK,UAAU,EACf,KAAK,SAAS,EAKf,MAAM,UAAU,CAAC;AAkClB,MAAM,WAAW,aAAa;IAC5B,0DAA0D;IAC1D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qFAAqF;IACrF,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;iEAC6D;IAC7D,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;CAC5B;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,aAAa,EACpB,IAAI,GAAE,aAAkB,GACvB,MAAM,CAuIR;AA6OD,wBAAsB,WAAW,CAC/B,KAAK,EAAE,aAAa,EACpB,QAAQ,SAAgB,EACxB,IAAI,CAAC,EAAE,aAAa,GACnB,OAAO,CAAC,IAAI,CAAC,CAMf;AAED,wBAAsB,WAAW,CAC/B,KAAK,EAAE,aAAa,EACpB,QAAQ,SAAgB,EACxB,IAAI,CAAC,EAAE,aAAa,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GACxC,OAAO,CAAC,IAAI,CAAC,CA0Bf"}
@@ -1,4 +1,5 @@
1
- export type { AnnotationId, Bus, BusId, BusLayout, DiagramFile, DiagramMeta, DiagramVersion, Element, ElementId, Junction, JunctionId, JunctionLayout, LabelMode, NodeId, ParamValue, PinName, Placement, TerminalRef, TextAnnotation, Wire, WireEnd, WireId, } from './types';
1
+ export type { Annotation, AnnotationFill, AnnotationId, AnnotationKind, AnnotationPatch, AnnotationStroke, Bus, BusId, BusLayout, DiagramFile, DiagramMeta, DiagramVersion, Element, ElementId, Junction, JunctionId, JunctionLayout, LabelMode, LineAnnotation, LineArrow, NodeId, ParamValue, PinName, Placement, RectAnnotation, TableAnnotation, TerminalRef, TextAnnotation, Wire, WireEnd, WireId, } from './types';
2
+ export { annotationKind, isTextAnnotation } from './types';
2
3
  export type { LibraryEntry, LibraryTerminal, LibraryStretchable, LibraryStateField, LibraryParamField, LibraryLabelAnchor, LibrarySource, Orientation, } from './library';
3
4
  export { normalizePath } from './wire-path';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,YAAY,EACZ,GAAG,EACH,KAAK,EACL,SAAS,EACT,WAAW,EACX,WAAW,EACX,cAAc,EACd,OAAO,EACP,SAAS,EACT,QAAQ,EACR,UAAU,EACV,cAAc,EACd,SAAS,EACT,MAAM,EACN,UAAU,EACV,OAAO,EACP,SAAS,EACT,WAAW,EACX,cAAc,EACd,IAAI,EACJ,OAAO,EACP,MAAM,GACP,MAAM,SAAS,CAAC;AAEjB,YAAY,EACV,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,WAAW,GACZ,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/model/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,cAAc,EACd,YAAY,EACZ,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,GAAG,EACH,KAAK,EACL,SAAS,EACT,WAAW,EACX,WAAW,EACX,cAAc,EACd,OAAO,EACP,SAAS,EACT,QAAQ,EACR,UAAU,EACV,cAAc,EACd,SAAS,EACT,cAAc,EACd,SAAS,EACT,MAAM,EACN,UAAU,EACV,OAAO,EACP,SAAS,EACT,cAAc,EACd,eAAe,EACf,WAAW,EACX,cAAc,EACd,IAAI,EACJ,OAAO,EACP,MAAM,GACP,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAE3D,YAAY,EACV,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,WAAW,GACZ,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
@@ -35,7 +35,8 @@ export interface DiagramFile {
35
35
  wires?: Wire[];
36
36
  /** Device placements only. Bus geometry lives in `Bus.layout`. */
37
37
  layout?: Record<ElementId, Placement>;
38
- annotations?: TextAnnotation[];
38
+ /** Free annotations (text / rect / line / table). Typeless = text. */
39
+ annotations?: Annotation[];
39
40
  }
40
41
  export interface DiagramMeta {
41
42
  title?: string;
@@ -96,10 +97,76 @@ export interface Placement {
96
97
  mirror?: boolean;
97
98
  }
98
99
  export type AnnotationId = string;
100
+ /** Stroke style shared by rect / line annotations. */
101
+ export type AnnotationStroke = 'solid' | 'dashed';
102
+ /** Rect fill: `tint` is a faint foreground wash that never occludes content. */
103
+ export type AnnotationFill = 'none' | 'tint';
104
+ /** Arrowheads on a line annotation (leader / callout use). */
105
+ export type LineArrow = 'none' | 'end' | 'both';
106
+ /**
107
+ * Free annotations — decoration layered over the diagram, never part of the
108
+ * electrical model. Discriminated on `type`; a missing `type` means `text`
109
+ * (files written before rect/line/table existed carry bare text annotations).
110
+ *
111
+ * Every variant anchors at `at` so "move annotation" is uniformly "patch
112
+ * `at`" — line points are stored *relative* to `at` for the same reason.
113
+ */
99
114
  export interface TextAnnotation {
100
115
  id: AnnotationId;
116
+ type?: 'text';
101
117
  at: [number, number];
102
118
  text: string;
103
119
  fontSize?: number;
104
120
  }
121
+ /**
122
+ * Rectangle — plain box or a labeled group frame (dashed box around a
123
+ * cabinet / section). Purely decorative: it never owns the elements inside
124
+ * it, and its interior is click-transparent so content stays selectable.
125
+ */
126
+ export interface RectAnnotation {
127
+ id: AnnotationId;
128
+ type: 'rect';
129
+ at: [number, number];
130
+ size: [number, number];
131
+ /** Default `dashed` — the group-frame convention. */
132
+ stroke?: AnnotationStroke;
133
+ /** Default `none`. */
134
+ fill?: AnnotationFill;
135
+ /** Optional caption drawn inside the top-left corner. */
136
+ label?: string;
137
+ }
138
+ /** Straight/poly line, optionally arrowed (leader lines, dividers). */
139
+ export interface LineAnnotation {
140
+ id: AnnotationId;
141
+ type: 'line';
142
+ at: [number, number];
143
+ /** ≥2 vertices, relative to `at`. */
144
+ points: [number, number][];
145
+ /** Default `solid`. */
146
+ stroke?: AnnotationStroke;
147
+ /** Default `none`. */
148
+ arrow?: LineArrow;
149
+ }
150
+ /** Freehand grid table; cells are plain single-line text. */
151
+ export interface TableAnnotation {
152
+ id: AnnotationId;
153
+ type: 'table';
154
+ at: [number, number];
155
+ colWidths: number[];
156
+ rowHeights: number[];
157
+ /** `cells[row][col]`, sized `rowHeights.length × colWidths.length`. */
158
+ cells: string[][];
159
+ fontSize?: number;
160
+ }
161
+ export type Annotation = TextAnnotation | RectAnnotation | LineAnnotation | TableAnnotation;
162
+ /** `type` of an annotation with the text default applied. */
163
+ export type AnnotationKind = 'text' | 'rect' | 'line' | 'table';
164
+ export declare function annotationKind(a: Annotation): AnnotationKind;
165
+ export declare function isTextAnnotation(a: Annotation): a is TextAnnotation;
166
+ /**
167
+ * Loose patch type for `updateAnnotation` — a partial over the union of all
168
+ * variant fields (minus identity). The store merge preserves the original
169
+ * `type`, so a patch can only touch fields meaningful to that variant.
170
+ */
171
+ export type AnnotationPatch = Partial<Omit<TextAnnotation, 'id' | 'type'> & Omit<RectAnnotation, 'id' | 'type'> & Omit<LineAnnotation, 'id' | 'type'> & Omit<TableAnnotation, 'id' | 'type'>>;
105
172
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/model/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAE9C,MAAM,MAAM,cAAc,GAAG,GAAG,CAAC;AACjC,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC;AAC/B,MAAM,MAAM,OAAO,GAAG,MAAM,CAAC;AAC7B,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC;AAC5B,MAAM,MAAM,KAAK,GAAG,SAAS,CAAC;AAC9B,MAAM,MAAM,UAAU,GAAG,SAAS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