sldeditor 0.25.0 → 0.26.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.
@@ -1 +1 @@
1
- {"version":3,"file":"AnnotationLayer.d.ts","sourceRoot":"","sources":["../../src/canvas/AnnotationLayer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAkBH,wBAAgB,eAAe,4CAmI9B"}
1
+ {"version":3,"file":"AnnotationLayer.d.ts","sourceRoot":"","sources":["../../src/canvas/AnnotationLayer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAkBH,wBAAgB,eAAe,4CAoI9B"}
@@ -1 +1 @@
1
- {"version":3,"file":"CanvasSvg.d.ts","sourceRoot":"","sources":["../../src/canvas/CanvasSvg.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA6DH,wBAAgB,SAAS,4CA+SxB"}
1
+ {"version":3,"file":"CanvasSvg.d.ts","sourceRoot":"","sources":["../../src/canvas/CanvasSvg.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA8DH,wBAAgB,SAAS,4CAgTxB"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Corner grips that resize the selected symbol — the same gesture every
3
+ * drawing tool uses. Drag any corner and the symbol grows or shrinks
4
+ * continuously (no steps), with wires, terminals and its label following live.
5
+ * Near 100% the size catches on 100% so the original size is easy to get back
6
+ * to.
7
+ *
8
+ * The size follows the pointer's distance from the OPPOSITE corner, like
9
+ * resizing a box anywhere else — the full diagonal gives every corner the same,
10
+ * fine-grained feel. (Measuring from the placement anchor instead was the first
11
+ * attempt: a transformer's anchor sits at its bottom pin, a few units from the
12
+ * bottom corners, so a 40-pixel drag there jumped straight to 400%.) The
13
+ * symbol itself still grows about its anchor, so it stays in its column and
14
+ * its pins stay on the wiring it already lines up with.
15
+ *
16
+ * Single-target, like the annotation grips: a multi-selection shows none.
17
+ * Pointer events are captured by the grip itself; the grips reuse
18
+ * `.ole-annotation-handle`, which SelectTool already ignores, so grabbing one
19
+ * never starts a move or clears the selection.
20
+ *
21
+ * The drag goes through `previewPlacement` and closes with `endGesture`, so
22
+ * the whole drag is ONE undo entry and Escape-less cancels (pointercancel)
23
+ * roll back to the size it had.
24
+ */
25
+ export declare function ElementScaleHandles(): import("react/jsx-runtime").JSX.Element | null;
26
+ //# sourceMappingURL=ElementScaleHandles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ElementScaleHandles.d.ts","sourceRoot":"","sources":["../../src/canvas/ElementScaleHandles.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAYH,wBAAgB,mBAAmB,mDAuDlC"}
@@ -1,6 +1,32 @@
1
1
  import { ViewportApi } from './useViewport';
2
2
  /**
3
- * Fit all rendered elements to the viewport with padding. Falls back to a
3
+ * Everything that is *drawn*, as opposed to editor chrome (selection halos,
4
+ * handles, previews, ghosts): devices, buses, junctions and terminals (all
5
+ * tagged `data-element-id`), wires, element label blocks, wire labels and
6
+ * free annotations (title blocks, frames, legends, tables).
7
+ *
8
+ * The fit used to match `[data-element-id]` alone, so a drawing whose
9
+ * annotations reach far past its devices was framed at a fraction of its
10
+ * extent — and the canvas disagreed with the export frame, which has always
11
+ * counted labels and annotations (`computeContentBbox` in export-image.ts).
12
+ * A layer that adds a new kind of drawn object must tag it with one of these
13
+ * attributes (or extend this list) for Fit view to see it.
14
+ */
15
+ export declare const FIT_CONTENT_SELECTOR: string;
16
+ export interface ScreenBounds {
17
+ left: number;
18
+ top: number;
19
+ right: number;
20
+ bottom: number;
21
+ }
22
+ /**
23
+ * Union of client rects, skipping degenerate (0×0) ones — unmeasured or
24
+ * empty nodes. A horizontal wire is 0 tall but still counts. Null when
25
+ * nothing measurable remains.
26
+ */
27
+ export declare function unionRects(rects: Iterable<Pick<DOMRect, 'left' | 'top' | 'right' | 'bottom' | 'width' | 'height'>>): ScreenBounds | null;
28
+ /**
29
+ * Fit the whole rendered drawing to the viewport with padding. Falls back to a
4
30
  * centered 100% reset when the canvas is empty. Returns false if the
5
31
  * viewport / canvas isn't ready yet.
6
32
  */
@@ -1 +1 @@
1
- {"version":3,"file":"fit-to-content.d.ts","sourceRoot":"","sources":["../../src/canvas/fit-to-content.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAejD;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAKtC;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAyC7E;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAOvC"}
1
+ {"version":3,"file":"fit-to-content.d.ts","sourceRoot":"","sources":["../../src/canvas/fit-to-content.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAOjD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,oBAAoB,QAMrB,CAAC;AAEb,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC,CAAC,GACvF,YAAY,GAAG,IAAI,CAarB;AAUD;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,OAAO,CAKtC;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAiC7E;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAOvC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PropertyPanel.d.ts","sourceRoot":"","sources":["../../src/components/PropertyPanel.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAoCH,wBAAgB,aAAa,mDAiG5B"}
1
+ {"version":3,"file":"PropertyPanel.d.ts","sourceRoot":"","sources":["../../src/components/PropertyPanel.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAsCH,wBAAgB,aAAa,mDAiG5B"}
@@ -100,7 +100,7 @@ declare const base: {
100
100
  readonly 'view.zoomIn': "放大";
101
101
  readonly 'view.zoomInHint': "按预设档位放大;也可滚轮 ↑ 或 ⌘+";
102
102
  readonly 'view.fit': "适配视图";
103
- readonly 'view.fitHint': "自动缩放并居中所有元件";
103
+ readonly 'view.fitHint': "自动缩放并居中,显示整张图纸";
104
104
  readonly 'view.gridHide': "隐藏网格";
105
105
  readonly 'view.gridShow': "显示网格";
106
106
  readonly 'view.gridHotkey': "G";
@@ -353,7 +353,7 @@ declare const base: {
353
353
  readonly 'view.zoomIn': "Zoom in";
354
354
  readonly 'view.zoomInHint': "Step zoom in; also wheel ↑ or ⌘+";
355
355
  readonly 'view.fit': "Fit view";
356
- readonly 'view.fitHint': "Auto-zoom and center all elements";
356
+ readonly 'view.fitHint': "Auto-zoom and center the whole drawing";
357
357
  readonly 'view.gridHide': "Hide grid";
358
358
  readonly 'view.gridShow': "Show grid";
359
359
  readonly 'view.gridHotkey': "G";
@@ -617,7 +617,7 @@ export declare const messages: {
617
617
  readonly 'view.zoomIn': "放大";
618
618
  readonly 'view.zoomInHint': "按预设档位放大;也可滚轮 ↑ 或 ⌘+";
619
619
  readonly 'view.fit': "适配视图";
620
- readonly 'view.fitHint': "自动缩放并居中所有元件";
620
+ readonly 'view.fitHint': "自动缩放并居中,显示整张图纸";
621
621
  readonly 'view.gridHide': "隐藏网格";
622
622
  readonly 'view.gridShow': "显示网格";
623
623
  readonly 'view.gridHotkey': "G";
@@ -870,7 +870,7 @@ export declare const messages: {
870
870
  readonly 'view.zoomIn': "Zoom in";
871
871
  readonly 'view.zoomInHint': "Step zoom in; also wheel ↑ or ⌘+";
872
872
  readonly 'view.fit': "Fit view";
873
- readonly 'view.fitHint': "Auto-zoom and center all elements";
873
+ readonly 'view.fitHint': "Auto-zoom and center the whole drawing";
874
874
  readonly 'view.gridHide': "Hide grid";
875
875
  readonly 'view.gridShow': "Show grid";
876
876
  readonly 'view.gridHotkey': "G";