sldeditor 0.10.4 → 0.11.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.
@@ -5,6 +5,13 @@ export interface OneLineEditorProps {
5
5
  className?: string;
6
6
  /** Initial DiagramFile to render. Re-renders when this reference changes. */
7
7
  diagram?: DiagramFile;
8
+ /**
9
+ * Render as a view-only viewer: full pan/zoom/touch gestures and
10
+ * fit-to-content on load are preserved, but every editing interaction and
11
+ * all editing chrome are disabled. In this mode the passed `diagram` always
12
+ * wins over any persisted document, and nothing is written to storage.
13
+ */
14
+ readOnly?: boolean;
8
15
  /**
9
16
  * Force the editor's UI language. When omitted, falls back to the user's
10
17
  * previous choice (localStorage) or the browser's locale. When set, the
@@ -20,5 +27,5 @@ export interface OneLineEditorProps {
20
27
  */
21
28
  theme?: Theme;
22
29
  }
23
- export declare function OneLineEditor({ className, diagram, locale, theme }: OneLineEditorProps): import("react/jsx-runtime").JSX.Element;
30
+ export declare function OneLineEditor({ className, diagram, readOnly, locale, theme }: OneLineEditorProps): import("react/jsx-runtime").JSX.Element;
24
31
  //# sourceMappingURL=OneLineEditor.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OneLineEditor.d.ts","sourceRoot":"","sources":["../src/OneLineEditor.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAAa,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAc,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,kBAAkB,2CAoCtF"}
1
+ {"version":3,"file":"OneLineEditor.d.ts","sourceRoot":"","sources":["../src/OneLineEditor.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAAa,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChD,OAAO,EAAc,KAAK,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE3D,MAAM,WAAW,kBAAkB;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6EAA6E;IAC7E,OAAO,CAAC,EAAE,WAAW,CAAC;IACtB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,wBAAgB,aAAa,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,kBAAkB,2CAkDhG"}
@@ -1 +1 @@
1
- {"version":3,"file":"CanvasSvg.d.ts","sourceRoot":"","sources":["../../src/canvas/CanvasSvg.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA2DH,wBAAgB,SAAS,4CAkRxB"}
1
+ {"version":3,"file":"CanvasSvg.d.ts","sourceRoot":"","sources":["../../src/canvas/CanvasSvg.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA2DH,wBAAgB,SAAS,4CAoRxB"}
@@ -1 +1 @@
1
- {"version":3,"file":"PanTool.d.ts","sourceRoot":"","sources":["../../../src/canvas/tools/PanTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAQH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAyBpC,eAAO,MAAM,OAAO,EAAE,IA0JrB,CAAC"}
1
+ {"version":3,"file":"PanTool.d.ts","sourceRoot":"","sources":["../../../src/canvas/tools/PanTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAQH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAyBpC,eAAO,MAAM,OAAO,EAAE,IA2JrB,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,CAwH3C"}
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 +1 @@
1
- {"version":3,"file":"useTools.d.ts","sourceRoot":"","sources":["../../src/canvas/useTools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,wBAAgB,QAAQ,CACtB,OAAO,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,EACzC,QAAQ,EAAE,WAAW,GACpB,IAAI,CAyCN"}
1
+ {"version":3,"file":"useTools.d.ts","sourceRoot":"","sources":["../../src/canvas/useTools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAa,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIlD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,wBAAgB,QAAQ,CACtB,OAAO,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,EACzC,QAAQ,EAAE,WAAW,GACpB,IAAI,CA6CN"}
@@ -1 +1 @@
1
- {"version":3,"file":"EditorShell.d.ts","sourceRoot":"","sources":["../../src/components/EditorShell.tsx"],"names":[],"mappings":"AAsEA,wBAAgB,WAAW,4CA2B1B"}
1
+ {"version":3,"file":"EditorShell.d.ts","sourceRoot":"","sources":["../../src/components/EditorShell.tsx"],"names":[],"mappings":"AAuEA,wBAAgB,WAAW,4CAuC1B"}
@@ -1 +1 @@
1
- {"version":3,"file":"ViewToolbar.d.ts","sourceRoot":"","sources":["../../src/components/ViewToolbar.tsx"],"names":[],"mappings":"AA8TA;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,2CA8DrE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,mDAI1B"}
1
+ {"version":3,"file":"ViewToolbar.d.ts","sourceRoot":"","sources":["../../src/components/ViewToolbar.tsx"],"names":[],"mappings":"AA8TA;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,EAAE,OAAO,EAAE,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAO,2CA8DrE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,mDAQ1B"}
@@ -177,8 +177,8 @@ export declare const messages: {
177
177
  readonly 'onboard.step1.body': "切到 元件 工具(P),从左侧元件库选一种拖到画布";
178
178
  readonly 'onboard.step2.title': "拉线连接";
179
179
  readonly 'onboard.step2.body': "用 连线 工具(W)从一个引脚拖到另一个引脚;拖到空白处会自动新建接线柱";
180
- readonly 'onboard.step3.title': "需要共用排时才用母线";
181
- readonly 'onboard.step3.body': "多条回路共用一条母排时,用 母线 工具(B)画一段;普通点对点连线不需要母线";
180
+ readonly 'onboard.step3.title': "母线是共用排,不是连线";
181
+ readonly 'onboard.step3.body': "几条回路共用一排时才用 母线 工具(B)。别拿母线连两个器件——点对点直接拉线(W)就行。";
182
182
  readonly 'onboard.dismiss': "知道了";
183
183
  };
184
184
  readonly en: {
@@ -352,8 +352,8 @@ export declare const messages: {
352
352
  readonly 'onboard.step1.body': "Pick the Place tool (P) and drag a kind from the library onto the canvas";
353
353
  readonly 'onboard.step2.title': "Wire it up";
354
354
  readonly 'onboard.step2.body': "Use the Wire tool (W): drag from one pin to another — drag into empty space to drop a junction";
355
- readonly 'onboard.step3.title': "Busbars are for shared rails";
356
- readonly 'onboard.step3.body': "When several circuits share one rail, draw a busbar (B); plain point-to-point wiring needs no bus";
355
+ readonly 'onboard.step3.title': "A busbar is a shared rail, not a wire";
356
+ readonly 'onboard.step3.body': "Use the Busbar tool (B) only when several circuits share one rail. Don't use a bus to join two devices — just wire the pins (W).";
357
357
  readonly 'onboard.dismiss': "Got it";
358
358
  };
359
359
  };