sldeditor 0.20.1 → 0.22.0

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 (73) hide show
  1. package/dist/OneLineEditor.d.ts +8 -1
  2. package/dist/OneLineEditor.d.ts.map +1 -1
  3. package/dist/canvas/AnnotationDraftPreview.d.ts +1 -1
  4. package/dist/canvas/AnnotationDraftPreview.d.ts.map +1 -1
  5. package/dist/canvas/AnnotationHandles.d.ts +1 -1
  6. package/dist/canvas/AnnotationHandles.d.ts.map +1 -1
  7. package/dist/canvas/AnnotationLayer.d.ts.map +1 -1
  8. package/dist/canvas/BusLayer.d.ts.map +1 -1
  9. package/dist/canvas/ElementLayer.d.ts.map +1 -1
  10. package/dist/canvas/FreeAnnotationLayer.d.ts.map +1 -1
  11. package/dist/canvas/PlaceGhost.d.ts.map +1 -1
  12. package/dist/canvas/WireLayer.d.ts.map +1 -1
  13. package/dist/canvas/tools/EllipseTool.d.ts +3 -0
  14. package/dist/canvas/tools/EllipseTool.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/compiler/compile.d.ts.map +1 -1
  18. package/dist/compiler/index.d.ts +1 -1
  19. package/dist/compiler/index.d.ts.map +1 -1
  20. package/dist/compiler/internal-model.d.ts +16 -0
  21. package/dist/compiler/internal-model.d.ts.map +1 -1
  22. package/dist/compiler/library-index.d.ts +16 -0
  23. package/dist/compiler/library-index.d.ts.map +1 -1
  24. package/dist/components/FloatingToolbar.d.ts.map +1 -1
  25. package/dist/components/LeftPanel.d.ts.map +1 -1
  26. package/dist/components/LibraryPopover.d.ts.map +1 -1
  27. package/dist/components/PropertyPanel.d.ts.map +1 -1
  28. package/dist/components/RightPanel.d.ts.map +1 -1
  29. package/dist/hooks/use-host-actions.d.ts +28 -0
  30. package/dist/hooks/use-host-actions.d.ts.map +1 -0
  31. package/dist/i18n/locales/ar.d.ts +1 -1
  32. package/dist/i18n/locales/ar.d.ts.map +1 -1
  33. package/dist/i18n/locales/de.d.ts +1 -1
  34. package/dist/i18n/locales/de.d.ts.map +1 -1
  35. package/dist/i18n/locales/es.d.ts +1 -1
  36. package/dist/i18n/locales/es.d.ts.map +1 -1
  37. package/dist/i18n/locales/fa.d.ts +1 -1
  38. package/dist/i18n/locales/fa.d.ts.map +1 -1
  39. package/dist/i18n/locales/fr.d.ts +1 -1
  40. package/dist/i18n/locales/fr.d.ts.map +1 -1
  41. package/dist/i18n/locales/he.d.ts +1 -1
  42. package/dist/i18n/locales/he.d.ts.map +1 -1
  43. package/dist/i18n/locales/index.d.ts +9 -9
  44. package/dist/i18n/locales/ja.d.ts +1 -1
  45. package/dist/i18n/locales/ja.d.ts.map +1 -1
  46. package/dist/i18n/locales/pt.d.ts +1 -1
  47. package/dist/i18n/locales/pt.d.ts.map +1 -1
  48. package/dist/i18n/locales/ru.d.ts +1 -1
  49. package/dist/i18n/locales/ru.d.ts.map +1 -1
  50. package/dist/i18n/messages.d.ts +97 -9
  51. package/dist/i18n/messages.d.ts.map +1 -1
  52. package/dist/index.d.ts +8 -2
  53. package/dist/index.d.ts.map +1 -1
  54. package/dist/lib/annotation-geom.d.ts +34 -3
  55. package/dist/lib/annotation-geom.d.ts.map +1 -1
  56. package/dist/lib/colors.d.ts +39 -0
  57. package/dist/lib/colors.d.ts.map +1 -0
  58. package/dist/lib/custom-kind.d.ts +48 -0
  59. package/dist/lib/custom-kind.d.ts.map +1 -0
  60. package/dist/lib/export-dxf.d.ts.map +1 -1
  61. package/dist/lib/export-image.d.ts.map +1 -1
  62. package/dist/model/index.d.ts +1 -1
  63. package/dist/model/index.d.ts.map +1 -1
  64. package/dist/model/types.d.ts +87 -5
  65. package/dist/model/types.d.ts.map +1 -1
  66. package/dist/sldeditor.cjs +57 -52
  67. package/dist/sldeditor.cjs.map +1 -1
  68. package/dist/sldeditor.js +7482 -6551
  69. package/dist/sldeditor.js.map +1 -1
  70. package/dist/store/store.d.ts +14 -5
  71. package/dist/store/store.d.ts.map +1 -1
  72. package/dist/style.css +1 -1
  73. package/package.json +1 -1
@@ -1,9 +1,19 @@
1
- import { Annotation, LineAnnotation, TableAnnotation } from '../model';
1
+ import { Annotation, AnnotationStroke, AnnotationStrokeWidth, BoxAnnotation, LineAnnotation, TableAnnotation } from '../model';
2
2
  /** Base font for text annotations, rect labels and table cells. */
3
3
  export declare const ANNOTATION_FONT_SIZE = 8;
4
4
  export declare const ANNOTATION_LINE_HEIGHT = 1.25;
5
5
  /** SVG dash pattern used by `stroke: 'dashed'` rects and lines. */
6
6
  export declare const ANNOTATION_DASH = "6 4";
7
+ /** SVG dash pattern for `stroke: 'dotted'`. */
8
+ export declare const ANNOTATION_DOT = "1 3";
9
+ /**
10
+ * `stroke-dasharray` for a stroke style, or undefined for a solid line.
11
+ * Every renderer goes through this so a new style can never be added to the
12
+ * canvas and forgotten in the exporters.
13
+ */
14
+ export declare function strokeDash(style: AnnotationStroke | undefined): string | undefined;
15
+ /** Nominal stroke width, defaulting to the 1-unit hairline used until now. */
16
+ export declare function strokeW(w: AnnotationStrokeWidth | undefined): number;
7
17
  /** Faint wash used by `fill: 'tint'` (foreground color at this opacity). */
8
18
  export declare const TINT_OPACITY = 0.05;
9
19
  /** Arrowhead geometry (world units). */
@@ -17,7 +27,7 @@ export declare const TABLE_DEFAULT_CELL_W = 60;
17
27
  export declare const TABLE_DEFAULT_CELL_H = 20;
18
28
  export declare const TABLE_MIN_COL_W = 16;
19
29
  export declare const TABLE_MIN_ROW_H = 12;
20
- /** Minimum committed rect size / line length; smaller gestures are ignored. */
30
+ /** Minimum committed box size / line length; smaller gestures are ignored. */
21
31
  export declare const MIN_RECT_SIZE = 10;
22
32
  export declare const MIN_LINE_LEN = 10;
23
33
  /**
@@ -32,6 +42,27 @@ export declare function lineAbsPoints(ann: LineAnnotation): [number, number][];
32
42
  * points) per requested end, oriented along the adjacent segment.
33
43
  */
34
44
  export declare function lineArrowHeads(pts: [number, number][], arrow: LineAnnotation['arrow']): [number, number][][];
45
+ /**
46
+ * Centre + radii of a box-anchored ellipse. Stored as a bounding box (see
47
+ * `EllipseAnnotation`) but every renderer wants cx/cy/rx/ry, so convert in
48
+ * exactly one place.
49
+ */
50
+ export declare function ellipseGeom(ann: BoxAnnotation): {
51
+ cx: number;
52
+ cy: number;
53
+ rx: number;
54
+ ry: number;
55
+ };
56
+ /**
57
+ * Polygonal approximation of an ellipse, for writers that have no ellipse
58
+ * primitive. R12 DXF is exactly that case — `ELLIPSE` did not exist until R13,
59
+ * and emitting a post-R12 entity into an `AC1009` file is the same mistake
60
+ * that made every export blank when this writer once emitted `LWPOLYLINE`.
61
+ *
62
+ * 48 segments keeps the facets under a canvas unit for shapes up to a few
63
+ * hundred units across, which is every ellipse a user draws here.
64
+ */
65
+ export declare function ellipsePolygon(ann: BoxAnnotation, segments?: number): [number, number][];
35
66
  export declare function tableSize(ann: TableAnnotation): [number, number];
36
67
  /** Cumulative x-offsets of column edges: `[0, w0, w0+w1, …, total]`. */
37
68
  export declare function tableColEdges(ann: TableAnnotation): number[];
@@ -43,7 +74,7 @@ export declare function tableRowEdges(ann: TableAnnotation): number[];
43
74
  export declare function tableCellAt(ann: TableAnnotation, world: [number, number]): [number, number] | null;
44
75
  /** In-progress drag published by the rect/line/table tools. */
45
76
  export interface AnnotationDraft {
46
- kind: 'rect' | 'line' | 'table';
77
+ kind: 'rect' | 'ellipse' | 'line' | 'table';
47
78
  start: [number, number];
48
79
  current: [number, number];
49
80
  /** Shift held: square rects / 45°-stepped lines. */
@@ -1 +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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;CACd;AAED,0EAA0E;AAC1E,wBAAgB,cAAc,CAAC,CAAC,EAAE,UAAU,GAAG,OAAO,CAgDrD"}
@@ -0,0 +1,39 @@
1
+ import { DiagramColor } from '../model';
2
+ export interface ColorSpec {
3
+ /** Canvas + export ink on a light background. */
4
+ light: string;
5
+ /** Canvas ink on a dark background. */
6
+ dark: string;
7
+ /**
8
+ * AutoCAD Color Index. 7 is the "use the viewport's own foreground" entry,
9
+ * which is why `default` maps to it — a default-coloured drawing keeps
10
+ * behaving the way it always has when opened in CAD.
11
+ */
12
+ aci: number;
13
+ }
14
+ export declare const NAMED_COLORS: Record<DiagramColor, ColorSpec>;
15
+ /** Palette order for pickers — `default` first, then warm → cool → neutral. */
16
+ export declare const COLOR_ORDER: DiagramColor[];
17
+ /**
18
+ * CSS class that paints an object in `c`, or `undefined` for the default.
19
+ *
20
+ * Returning `undefined` rather than a `ole-ink-default` class matters: the
21
+ * canvas already inherits theme ink through `currentColor`, so an uncoloured
22
+ * object keeps exactly the DOM it had before this feature — no extra class,
23
+ * no extra specificity fight with the selection recolor.
24
+ */
25
+ export declare function inkClass(c: DiagramColor | undefined): string | undefined;
26
+ /**
27
+ * Ink for the SVG/PNG exporters. Always the LIGHT value: an export is a
28
+ * document headed for paper, a CAD seat or an email, none of which inherit the
29
+ * editor's theme. `default` resolves to the literal `black` the exporters
30
+ * emitted before colours existed.
31
+ */
32
+ export declare function exportInk(c: DiagramColor | undefined): string;
33
+ /**
34
+ * ACI index for the DXF writer, or `undefined` when the entity should inherit
35
+ * its layer colour. Group code 62 is omitted entirely in that case, so an
36
+ * uncoloured diagram writes the same bytes it always did.
37
+ */
38
+ export declare function dxfColor(c: DiagramColor | undefined): number | undefined;
39
+ //# sourceMappingURL=colors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/lib/colors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,MAAM,WAAW,SAAS;IACxB,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;CACb;AAED,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,SAAS,CAUxD,CAAC;AAEF,+EAA+E;AAC/E,eAAO,MAAM,WAAW,EAAE,YAAY,EAOrC,CAAC;AAMF;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAExE;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,MAAM,CAE7D;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,YAAY,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAExE"}
@@ -0,0 +1,48 @@
1
+ import { LibraryEntry } from '../model';
2
+ /** Elements used across the shipped library. `g` is a grouping container. */
3
+ export declare const ALLOWED_ELEMENTS: ReadonlySet<string>;
4
+ /**
5
+ * Attributes used across the shipped library, plus `tspan`'s positioning.
6
+ * Deliberately excludes every URL-bearing and scripting attribute: no `href`,
7
+ * no `xlink:href`, no `on*`, no `style` (which can smuggle `url()`).
8
+ */
9
+ export declare const ALLOWED_ATTRS: ReadonlySet<string>;
10
+ export interface SanitizeResult {
11
+ /** The cleaned fragment. Empty when nothing survived. */
12
+ svg: string;
13
+ /** What was dropped, as `element:<name>` / `attr:<name>`, deduped. */
14
+ removed: string[];
15
+ }
16
+ /**
17
+ * Reduce a symbol fragment to the allowlisted subset.
18
+ *
19
+ * Parsed as a real document rather than filtered with regexes: markup is not a
20
+ * regular language, and the whole point of the exercise is to be right about
21
+ * markup an adversary controls.
22
+ */
23
+ export declare function sanitizeSymbolSvg(source: string): SanitizeResult;
24
+ export interface KindProblem {
25
+ field: string;
26
+ message: string;
27
+ }
28
+ /**
29
+ * Structural checks on a proposed symbol.
30
+ *
31
+ * The axis check is the one that earns its place. A two-terminal series device
32
+ * whose pins do not share a coordinate is jogged BY CONSTRUCTION: every wire
33
+ * into it, in every drawing that ever uses it, leaves at a right angle no
34
+ * matter how well the user places things. The library already carries a few
35
+ * such kinds (`ct` has both pins at x = -30) and they are the documented cause
36
+ * of the W101 warning existing at all — in the 2026-08-15→21 audit W101 was
37
+ * still present in 44 of 98 sessions at hand-off. Letting a model mint more of
38
+ * them would make that permanent rather than incidental.
39
+ *
40
+ * What is deliberately NOT checked: how far a terminal sits inside the
41
+ * viewBox. Measuring the shipped library first killed that idea — 156 of 165
42
+ * terminals sit exactly 2 units in, but `autotransformer`'s bottom pin is 12
43
+ * units in because the symbol is two stacked coils, and `luminaire`,
44
+ * `converter-bidir` and `busbar` all have legitimate centre taps. A
45
+ * boundary rule would have rejected real symbols.
46
+ */
47
+ export declare function validateCustomKind(entry: LibraryEntry): KindProblem[];
48
+ //# sourceMappingURL=custom-kind.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"custom-kind.d.ts","sourceRoot":"","sources":["../../src/lib/custom-kind.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAmB,MAAM,UAAU,CAAC;AAE9D,6EAA6E;AAC7E,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAW/C,CAAC;AAEH;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,WAAW,CAAC,MAAM,CA+B5C,CAAC;AAEH,MAAM,WAAW,cAAc;IAC7B,yDAAyD;IACzD,GAAG,EAAE,MAAM,CAAC;IACZ,sEAAsE;IACtE,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,cAAc,CAkChE;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAKD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,YAAY,GAAG,WAAW,EAAE,CAyDrE"}
@@ -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,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;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;iEAC6D;IAC7D,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;CAC5B;AAaD,wBAAgB,cAAc,CAC5B,KAAK,EAAE,aAAa,EACpB,IAAI,GAAE,gBAAqB,GAC1B,MAAM,CAkLR;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,EAEf,KAAK,SAAS,EAKf,MAAM,UAAU,CAAC;AA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a,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,EAGf,KAAK,SAAS,EAKf,MAAM,UAAU,CAAC;AAqClB,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;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;iEAC6D;IAC7D,WAAW,CAAC,EAAE,UAAU,EAAE,CAAC;CAC5B;AAED,wBAAgB,cAAc,CAC5B,KAAK,EAAE,aAAa,EACpB,IAAI,GAAE,aAAkB,GACvB,MAAM,CAuJR;AAiSD,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,4 @@
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';
1
+ export type { Annotation, AnnotationFill, AnnotationId, AnnotationKind, AnnotationPatch, AnnotationStroke, AnnotationStrokeWidth, BoxAnnotation, Bus, BusId, BusLayout, DiagramColor, DiagramFile, DiagramMeta, DiagramVersion, Element, ElementId, EllipseAnnotation, Junction, JunctionId, JunctionLayout, LabelMode, LineAnnotation, LineArrow, NodeId, ParamValue, PinName, Placement, RectAnnotation, TableAnnotation, TerminalRef, TextAnnotation, Wire, WireEnd, WireId, } from './types';
2
2
  export { annotationKind, isTextAnnotation } from './types';
3
3
  export type { LibraryEntry, LibraryTerminal, LibraryStretchable, LibraryStateField, LibraryParamField, LibraryLabelAnchor, LibrarySource, Orientation, } from './library';
4
4
  export { normalizePath } from './wire-path';
@@ -1 +1 @@
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"}
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,qBAAqB,EACrB,aAAa,EACb,GAAG,EACH,KAAK,EACL,SAAS,EACT,YAAY,EACZ,WAAW,EACX,WAAW,EACX,cAAc,EACd,OAAO,EACP,SAAS,EACT,iBAAiB,EACjB,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"}
@@ -37,6 +37,23 @@ export interface DiagramFile {
37
37
  layout?: Record<ElementId, Placement>;
38
38
  /** Free annotations (text / rect / line / table). Typeless = text. */
39
39
  annotations?: Annotation[];
40
+ /**
41
+ * Symbol definitions that live in THIS document rather than in the built-in
42
+ * library. Same `LibraryEntry` contract as a built-in, so a custom kind is a
43
+ * real device everywhere it matters: it compiles, wires up, joins
44
+ * connectivity nodes, reports diagnostics, and exports to DXF through
45
+ * exactly the paths a built-in does — no parallel rendering or export
46
+ * machinery exists for it, by design.
47
+ *
48
+ * Embedded rather than referenced on purpose. A diagram travels: public
49
+ * `/v/:id` links, forks, downloaded files. A reference would mean the
50
+ * recipient opens a drawing full of kinds they cannot resolve. A user-level
51
+ * library is a catalogue you copy FROM, never a dependency you point AT.
52
+ *
53
+ * Ids are namespaced (`custom:…`) so they cannot collide with a built-in and
54
+ * read as custom at a glance.
55
+ */
56
+ customKinds?: LibraryEntry[];
40
57
  }
41
58
  export interface DiagramMeta {
42
59
  title?: string;
@@ -65,6 +82,11 @@ export interface Element {
65
82
  note?: string;
66
83
  params?: Record<string, ParamValue>;
67
84
  state?: Record<string, ParamValue>;
85
+ /**
86
+ * Ink colour of the symbol. Purely presentational — it never reaches the
87
+ * compiler, connectivity or diagnostics. Absent = theme ink.
88
+ */
89
+ color?: DiagramColor;
68
90
  }
69
91
  export interface Bus {
70
92
  id: BusId;
@@ -73,6 +95,8 @@ export interface Bus {
73
95
  params?: Record<string, ParamValue>;
74
96
  /** If absent, auto-layout computes geometry. */
75
97
  layout?: BusLayout;
98
+ /** Ink colour. Colour-coding busbars was the single most-asked-for use. */
99
+ color?: DiagramColor;
76
100
  }
77
101
  export interface BusLayout {
78
102
  at: [number, number];
@@ -101,6 +125,8 @@ export interface Wire {
101
125
  * effect on routing or connectivity.
102
126
  */
103
127
  label?: string;
128
+ /** Ink colour. Presentational only — routing and connectivity ignore it. */
129
+ color?: DiagramColor;
104
130
  }
105
131
  export interface Placement {
106
132
  at: [number, number];
@@ -108,8 +134,25 @@ export interface Placement {
108
134
  mirror?: boolean;
109
135
  }
110
136
  export type AnnotationId = string;
111
- /** Stroke style shared by rect / line annotations. */
112
- export type AnnotationStroke = 'solid' | 'dashed';
137
+ /**
138
+ * Ink colour for anything drawn on the canvas — devices, buses, wires and
139
+ * free annotations alike.
140
+ *
141
+ * A closed set of NAMES rather than free hex, because the canvas has a dark
142
+ * theme: a literal colour cannot follow it, so a user who picked black would
143
+ * watch their drawing disappear the moment they switched. Each name resolves
144
+ * to a light/dark pair (and a DXF ACI index) in `lib/colors.ts`, so the same
145
+ * choice reads correctly in both themes and survives export to CAD.
146
+ *
147
+ * `default` deliberately means "whatever ink the theme uses" — absent is the
148
+ * same as `default`, which is why every colour field is optional and why a
149
+ * diagram written before colours existed renders byte-identically.
150
+ */
151
+ export type DiagramColor = 'default' | 'red' | 'blue' | 'green' | 'amber' | 'gray';
152
+ /** Stroke style shared by rect / ellipse / line annotations. */
153
+ export type AnnotationStroke = 'solid' | 'dashed' | 'dotted';
154
+ /** Stroke weight for shape annotations, in nominal canvas units. */
155
+ export type AnnotationStrokeWidth = 1 | 2 | 3;
113
156
  /** Rect fill: `tint` is a faint foreground wash that never occludes content. */
114
157
  export type AnnotationFill = 'none' | 'tint';
115
158
  /** Arrowheads on a line annotation (leader / callout use). */
@@ -128,6 +171,7 @@ export interface TextAnnotation {
128
171
  at: [number, number];
129
172
  text: string;
130
173
  fontSize?: number;
174
+ color?: DiagramColor;
131
175
  }
132
176
  /**
133
177
  * Rectangle — plain box or a labeled group frame (dashed box around a
@@ -141,11 +185,39 @@ export interface RectAnnotation {
141
185
  size: [number, number];
142
186
  /** Default `dashed` — the group-frame convention. */
143
187
  stroke?: AnnotationStroke;
188
+ /** Default 1. */
189
+ strokeWidth?: AnnotationStrokeWidth;
144
190
  /** Default `none`. */
145
191
  fill?: AnnotationFill;
192
+ /** Default `default` (theme ink). */
193
+ color?: DiagramColor;
146
194
  /** Optional caption drawn inside the top-left corner. */
147
195
  label?: string;
148
196
  }
197
+ /**
198
+ * Ellipse / circle — the shape the rect tool could never stand in for.
199
+ *
200
+ * Anchored by its BOUNDING BOX (`at` = top-left, `size` = w×h) rather than
201
+ * centre+radii, so every box-shaped affordance already written for rects —
202
+ * the 8 resize grips, the drag-to-draw gesture, the bbox helpers, marquee
203
+ * hit-testing — applies unchanged. Shift while drawing constrains to a circle.
204
+ */
205
+ export interface EllipseAnnotation {
206
+ id: AnnotationId;
207
+ type: 'ellipse';
208
+ at: [number, number];
209
+ size: [number, number];
210
+ /** Default `solid` — unlike a rect, an ellipse is a drawn shape, not a frame. */
211
+ stroke?: AnnotationStroke;
212
+ /** Default 1. */
213
+ strokeWidth?: AnnotationStrokeWidth;
214
+ /** Default `none`. */
215
+ fill?: AnnotationFill;
216
+ /** Default `default` (theme ink). */
217
+ color?: DiagramColor;
218
+ /** Optional caption drawn inside the top-left of the bounding box. */
219
+ label?: string;
220
+ }
149
221
  /** Straight/poly line, optionally arrowed (leader lines, dividers). */
150
222
  export interface LineAnnotation {
151
223
  id: AnnotationId;
@@ -155,6 +227,10 @@ export interface LineAnnotation {
155
227
  points: [number, number][];
156
228
  /** Default `solid`. */
157
229
  stroke?: AnnotationStroke;
230
+ /** Default 1. */
231
+ strokeWidth?: AnnotationStrokeWidth;
232
+ /** Default `default` (theme ink). */
233
+ color?: DiagramColor;
158
234
  /** Default `none`. */
159
235
  arrow?: LineArrow;
160
236
  }
@@ -168,10 +244,16 @@ export interface TableAnnotation {
168
244
  /** `cells[row][col]`, sized `rowHeights.length × colWidths.length`. */
169
245
  cells: string[][];
170
246
  fontSize?: number;
247
+ color?: DiagramColor;
171
248
  }
172
- export type Annotation = TextAnnotation | RectAnnotation | LineAnnotation | TableAnnotation;
249
+ export type Annotation = TextAnnotation | RectAnnotation | EllipseAnnotation | LineAnnotation | TableAnnotation;
173
250
  /** `type` of an annotation with the text default applied. */
174
- export type AnnotationKind = 'text' | 'rect' | 'line' | 'table';
251
+ export type AnnotationKind = 'text' | 'rect' | 'ellipse' | 'line' | 'table';
252
+ /**
253
+ * The box-anchored shapes. They share `at` + `size`, which is the whole reason
254
+ * the resize grips and bbox code can treat them as one thing.
255
+ */
256
+ export type BoxAnnotation = RectAnnotation | EllipseAnnotation;
175
257
  export declare function annotationKind(a: Annotation): AnnotationKind;
176
258
  export declare function isTextAnnotation(a: Annotation): a is TextAnnotation;
177
259
  /**
@@ -179,5 +261,5 @@ export declare function isTextAnnotation(a: Annotation): a is TextAnnotation;
179
261
  * variant fields (minus identity). The store merge preserves the original
180
262
  * `type`, so a patch can only touch fields meaningful to that variant.
181
263
  */
182
- export type AnnotationPatch = Partial<Omit<TextAnnotation, 'id' | 'type'> & Omit<RectAnnotation, 'id' | 'type'> & Omit<LineAnnotation, 'id' | 'type'> & Omit<TableAnnotation, 'id' | 'type'>>;
264
+ export type AnnotationPatch = Partial<Omit<TextAnnotation, 'id' | 'type'> & Omit<RectAnnotation, 'id' | 'type'> & Omit<EllipseAnnotation, 'id' | 'type'> & Omit<LineAnnotation, 'id' | 'type'> & Omit<TableAnnotation, 'id' | 'type'>>;
183
265
  //# 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,CAAC;AACnC,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC;AAC5B,yDAAyD;AACzD,MAAM,MAAM,WAAW,GAAG,GAAG,SAAS,IAAI,OAAO,EAAE,CAAC;AACpD;;;;;GAKG;AACH,MAAM,MAAM,OAAO,GAAG,WAAW,GAAG,KAAK,GAAG,UAAU,CAAC;AACvD,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AACnD,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,IAAI,GAAG,KAAK,CAAC;AAE7C,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,2CAA2C;IAC3C,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,oEAAoE;IACp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