sldeditor 0.6.1 → 0.8.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.
- package/dist/canvas/WireLayer.d.ts +6 -0
- package/dist/canvas/WireLayer.d.ts.map +1 -1
- package/dist/canvas/tools/WireTool.d.ts.map +1 -1
- package/dist/compiler/auto-layout.d.ts +5 -1
- package/dist/compiler/auto-layout.d.ts.map +1 -1
- package/dist/compiler/compile.d.ts.map +1 -1
- package/dist/components/OnboardingCard.d.ts +2 -1
- package/dist/components/OnboardingCard.d.ts.map +1 -1
- package/dist/i18n/messages.d.ts +12 -12
- package/dist/sldeditor.cjs +48 -48
- package/dist/sldeditor.cjs.map +1 -1
- package/dist/sldeditor.js +5319 -5147
- package/dist/sldeditor.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,6 +6,12 @@
|
|
|
6
6
|
* Each visible wire is paired with a wider invisible hit polyline. A 1px
|
|
7
7
|
* wire is too thin to comfortably click; the hit poly catches pointer
|
|
8
8
|
* events within ~8px of the line and carries the same data attributes.
|
|
9
|
+
*
|
|
10
|
+
* Crossing ≠ connecting: where two wires of *different* electrical nodes
|
|
11
|
+
* cross with no junction, the deterministically-chosen "under" wire is drawn
|
|
12
|
+
* with a small gap at the crossing so it's unambiguous they aren't joined.
|
|
13
|
+
* A junction dot (rendered separately) remains the only "connected" signal.
|
|
14
|
+
* The hit polyline is never gapped, so selection still spans the whole wire.
|
|
9
15
|
*/
|
|
10
16
|
export declare function WireLayer(): import("react/jsx-runtime").JSX.Element;
|
|
11
17
|
//# sourceMappingURL=WireLayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WireLayer.d.ts","sourceRoot":"","sources":["../../src/canvas/WireLayer.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"WireLayer.d.ts","sourceRoot":"","sources":["../../src/canvas/WireLayer.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAyDH,wBAAgB,SAAS,4CAoFxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WireTool.d.ts","sourceRoot":"","sources":["../../../src/canvas/tools/WireTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"WireTool.d.ts","sourceRoot":"","sources":["../../../src/canvas/tools/WireTool.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AASH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AA+HpC,eAAO,MAAM,QAAQ,EAAE,IAwFtB,CAAC"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Bus, BusId, Element, ElementId, LibraryEntry, Wire } from '../model';
|
|
1
|
+
import { Bus, BusId, Element, ElementId, Junction, JunctionId, LibraryEntry, Wire } from '../model';
|
|
2
2
|
import { BusGeometry, ResolvedPlacement } from './internal-model';
|
|
3
3
|
interface AutoLayoutInput {
|
|
4
4
|
/** Devices only. Buses are in `buses`. */
|
|
5
5
|
elements: Element[];
|
|
6
6
|
buses: Bus[];
|
|
7
|
+
junctions: Junction[];
|
|
7
8
|
wires: Wire[];
|
|
8
9
|
library: ReadonlyMap<string, LibraryEntry>;
|
|
9
10
|
userLayout: ReadonlyMap<ElementId, ResolvedPlacement>;
|
|
@@ -12,6 +13,9 @@ interface AutoLayoutInput {
|
|
|
12
13
|
export interface AutoLayoutOutput {
|
|
13
14
|
devices: Map<ElementId, ResolvedPlacement>;
|
|
14
15
|
buses: Map<BusId, BusGeometry>;
|
|
16
|
+
/** Auto-positioned junction points (bus-less tree layout). Explicit
|
|
17
|
+
* `Junction.layout.at` still wins downstream. */
|
|
18
|
+
junctions: Map<JunctionId, [number, number]>;
|
|
15
19
|
}
|
|
16
20
|
export declare function autoLayout(input: AutoLayoutInput): AutoLayoutOutput;
|
|
17
21
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-layout.d.ts","sourceRoot":"","sources":["../../src/compiler/auto-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,OAAO,KAAK,EACV,GAAG,EACH,KAAK,EACL,OAAO,EACP,SAAS,EACT,YAAY,EAGZ,IAAI,EAEL,MAAM,UAAU,CAAC;AAClB,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACvB,MAAM,kBAAkB,CAAC;AAsB1B,UAAU,eAAe;IACvB,0CAA0C;IAC1C,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC3C,UAAU,EAAE,WAAW,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;IACtD,aAAa,EAAE,WAAW,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,GAAG,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;IAC3C,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"auto-layout.d.ts","sourceRoot":"","sources":["../../src/compiler/auto-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,OAAO,KAAK,EACV,GAAG,EACH,KAAK,EACL,OAAO,EACP,SAAS,EACT,QAAQ,EACR,UAAU,EACV,YAAY,EAGZ,IAAI,EAEL,MAAM,UAAU,CAAC;AAClB,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACvB,MAAM,kBAAkB,CAAC;AAsB1B,UAAU,eAAe;IACvB,0CAA0C;IAC1C,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,OAAO,EAAE,WAAW,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IAC3C,UAAU,EAAE,WAAW,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;IACtD,aAAa,EAAE,WAAW,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;CAChD;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,GAAG,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC;IAC3C,KAAK,EAAE,GAAG,CAAC,KAAK,EAAE,WAAW,CAAC,CAAC;IAC/B;sDACkD;IAClD,SAAS,EAAE,GAAG,CAAC,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;CAC9C;AA8BD,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,gBAAgB,CAq7DnE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/compiler/compile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAGV,WAAW,EASZ,MAAM,UAAU,CAAC;AAKlB,OAAO,EAKL,KAAK,aAAa,EAEnB,MAAM,kBAAkB,CAAC;AAyB1B,wBAAgB,OAAO,CAAC,OAAO,EAAE,WAAW,GAAG,aAAa,
|
|
1
|
+
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/compiler/compile.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,KAAK,EAGV,WAAW,EASZ,MAAM,UAAU,CAAC;AAKlB,OAAO,EAKL,KAAK,aAAa,EAEnB,MAAM,kBAAkB,CAAC;AAyB1B,wBAAgB,OAAO,CAAC,OAAO,EAAE,WAAW,GAAG,aAAa,CA+S3D"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* First-visit onboarding card. Surfaces the canonical drawing flow:
|
|
3
|
-
*
|
|
3
|
+
* place a component → wire pins together (drag to empty space = junction) →
|
|
4
|
+
* reach for a busbar only when several circuits share one rail.
|
|
4
5
|
*
|
|
5
6
|
* Visibility: shown until the user dismisses it (persisted to localStorage),
|
|
6
7
|
* regardless of whether the canvas is empty — the card and the sample
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OnboardingCard.d.ts","sourceRoot":"","sources":["../../src/components/OnboardingCard.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"OnboardingCard.d.ts","sourceRoot":"","sources":["../../src/components/OnboardingCard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,wBAAgB,cAAc,mDAoD7B"}
|
package/dist/i18n/messages.d.ts
CHANGED
|
@@ -173,12 +173,12 @@ export declare const messages: {
|
|
|
173
173
|
readonly 'cat.grounding': "中性点接地";
|
|
174
174
|
readonly 'cat.renewable': "新能源 / 电力电子";
|
|
175
175
|
readonly 'onboard.title': "上手三步";
|
|
176
|
-
readonly 'onboard.step1.title': "
|
|
177
|
-
readonly 'onboard.step1.body': "
|
|
178
|
-
readonly 'onboard.step2.title': "
|
|
179
|
-
readonly 'onboard.step2.body': "
|
|
180
|
-
readonly 'onboard.step3.title': "
|
|
181
|
-
readonly 'onboard.step3.body': "
|
|
176
|
+
readonly 'onboard.step1.title': "放一个器件";
|
|
177
|
+
readonly 'onboard.step1.body': "切到 元件 工具(P),从左侧元件库选一种拖到画布";
|
|
178
|
+
readonly 'onboard.step2.title': "拉线连接";
|
|
179
|
+
readonly 'onboard.step2.body': "用 连线 工具(W)从一个引脚拖到另一个引脚;拖到空白处会自动新建接线柱";
|
|
180
|
+
readonly 'onboard.step3.title': "需要共用排时才用母线";
|
|
181
|
+
readonly 'onboard.step3.body': "多条回路共用一条母排时,用 母线 工具(B)画一段;普通点对点连线不需要母线";
|
|
182
182
|
readonly 'onboard.dismiss': "知道了";
|
|
183
183
|
};
|
|
184
184
|
readonly en: {
|
|
@@ -348,12 +348,12 @@ export declare const messages: {
|
|
|
348
348
|
readonly 'cat.grounding': "Grounding";
|
|
349
349
|
readonly 'cat.renewable': "Renewables / power electronics";
|
|
350
350
|
readonly 'onboard.title': "Quick start";
|
|
351
|
-
readonly 'onboard.step1.title': "
|
|
352
|
-
readonly 'onboard.step1.body': "Pick the
|
|
353
|
-
readonly 'onboard.step2.title': "
|
|
354
|
-
readonly 'onboard.step2.body': "
|
|
355
|
-
readonly 'onboard.step3.title': "
|
|
356
|
-
readonly 'onboard.step3.body': "
|
|
351
|
+
readonly 'onboard.step1.title': "Place a component";
|
|
352
|
+
readonly 'onboard.step1.body': "Pick the Place tool (P) and drag a kind from the library onto the canvas";
|
|
353
|
+
readonly 'onboard.step2.title': "Wire it up";
|
|
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";
|
|
357
357
|
readonly 'onboard.dismiss': "Got it";
|
|
358
358
|
};
|
|
359
359
|
};
|