schematex 0.9.9 → 0.9.11
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/ai/ai-sdk.cjs +9 -9
- package/dist/ai/ai-sdk.d.cts +3 -3
- package/dist/ai/ai-sdk.d.ts +3 -3
- package/dist/ai/ai-sdk.js +4 -4
- package/dist/ai/index.cjs +18 -18
- package/dist/ai/index.d.cts +4 -4
- package/dist/ai/index.d.ts +4 -4
- package/dist/ai/index.js +5 -5
- package/dist/{api-D_d-JklT.d.ts → api-DAiP83-P.d.ts} +1 -1
- package/dist/{api-DnTyW-6F.d.cts → api-DecITB-t.d.cts} +1 -1
- package/dist/browser.cjs +10 -10
- package/dist/browser.d.cts +3 -3
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +4 -4
- package/dist/{chunk-IHX6J4HF.js → chunk-32LOZTNP.js} +178 -4
- package/dist/chunk-32LOZTNP.js.map +1 -0
- package/dist/{chunk-RCR4UGKV.js → chunk-4QBC4475.js} +35 -20
- package/dist/chunk-4QBC4475.js.map +1 -0
- package/dist/{chunk-OY2CXLVY.cjs → chunk-5YTFNOKY.cjs} +170 -15
- package/dist/{chunk-OY2CXLVY.cjs.map → chunk-5YTFNOKY.cjs.map} +1 -1
- package/dist/{chunk-EUN6FEGE.cjs → chunk-6ZTPWE22.cjs} +37 -22
- package/dist/chunk-6ZTPWE22.cjs.map +1 -0
- package/dist/{chunk-TXWVJAMR.cjs → chunk-HEGDKO2E.cjs} +178 -4
- package/dist/chunk-HEGDKO2E.cjs.map +1 -0
- package/dist/{chunk-T5QOVX2I.js → chunk-RU3N57OB.js} +168 -13
- package/dist/{chunk-T5QOVX2I.js.map → chunk-RU3N57OB.js.map} +1 -1
- package/dist/{chunk-MVTYPWHO.js → chunk-WTGABYFK.js} +80 -17
- package/dist/chunk-WTGABYFK.js.map +1 -0
- package/dist/{chunk-MXV3XJFH.cjs → chunk-YN7EBTWB.cjs} +80 -17
- package/dist/chunk-YN7EBTWB.cjs.map +1 -0
- package/dist/{diagnostics-D2qkBfFx.d.cts → diagnostics-Bps9pzlF.d.cts} +8 -2
- package/dist/{diagnostics-D2qkBfFx.d.ts → diagnostics-Bps9pzlF.d.ts} +8 -2
- package/dist/diagrams/blockdiagram/index.d.cts +1 -1
- package/dist/diagrams/blockdiagram/index.d.ts +1 -1
- package/dist/diagrams/circuit/index.cjs +8 -8
- package/dist/diagrams/circuit/index.d.cts +1 -1
- package/dist/diagrams/circuit/index.d.ts +1 -1
- package/dist/diagrams/circuit/index.js +1 -1
- package/dist/diagrams/ecomap/index.d.cts +1 -1
- package/dist/diagrams/ecomap/index.d.ts +1 -1
- package/dist/diagrams/entity/index.d.cts +1 -1
- package/dist/diagrams/entity/index.d.ts +1 -1
- package/dist/diagrams/fishbone/index.d.cts +1 -1
- package/dist/diagrams/fishbone/index.d.ts +1 -1
- package/dist/diagrams/flowchart/index.d.cts +2 -2
- package/dist/diagrams/flowchart/index.d.ts +2 -2
- package/dist/diagrams/genogram/index.d.cts +1 -1
- package/dist/diagrams/genogram/index.d.ts +1 -1
- package/dist/diagrams/ladder/index.d.cts +1 -1
- package/dist/diagrams/ladder/index.d.ts +1 -1
- package/dist/diagrams/logic/index.d.cts +1 -1
- package/dist/diagrams/logic/index.d.ts +1 -1
- package/dist/diagrams/orgchart/index.d.cts +1 -1
- package/dist/diagrams/orgchart/index.d.ts +1 -1
- package/dist/diagrams/pedigree/index.d.cts +1 -1
- package/dist/diagrams/pedigree/index.d.ts +1 -1
- package/dist/diagrams/phylo/index.d.cts +1 -1
- package/dist/diagrams/phylo/index.d.ts +1 -1
- package/dist/diagrams/sld/index.cjs +7 -7
- package/dist/diagrams/sld/index.d.cts +4 -1
- package/dist/diagrams/sld/index.d.ts +4 -1
- package/dist/diagrams/sld/index.js +1 -1
- package/dist/diagrams/sociogram/index.d.cts +1 -1
- package/dist/diagrams/sociogram/index.d.ts +1 -1
- package/dist/diagrams/timing/index.d.cts +1 -1
- package/dist/diagrams/timing/index.d.ts +1 -1
- package/dist/diagrams/venn/index.d.cts +1 -1
- package/dist/diagrams/venn/index.d.ts +1 -1
- package/dist/{index-D9u0YRxL.d.ts → index-F6MCisQe.d.ts} +1 -1
- package/dist/{index-JZlLiE6K.d.cts → index-fvBAmlv7.d.cts} +1 -1
- package/dist/index.cjs +43 -43
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +6 -6
- package/dist/react.cjs +4 -4
- package/dist/react.d.cts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +3 -3
- package/dist/{tools-DM0aLCbc.d.ts → tools-CdzIw2Az.d.ts} +2 -2
- package/dist/{tools-DAKYNcPv.d.cts → tools-vyVK2DHa.d.cts} +2 -2
- package/package.json +1 -1
- package/dist/chunk-EUN6FEGE.cjs.map +0 -1
- package/dist/chunk-IHX6J4HF.js.map +0 -1
- package/dist/chunk-MVTYPWHO.js.map +0 -1
- package/dist/chunk-MXV3XJFH.cjs.map +0 -1
- package/dist/chunk-RCR4UGKV.js.map +0 -1
- package/dist/chunk-TXWVJAMR.cjs.map +0 -1
|
@@ -46,32 +46,36 @@ var NODE_TYPES = /* @__PURE__ */ new Set([
|
|
|
46
46
|
"relay",
|
|
47
47
|
"surge_arrester",
|
|
48
48
|
"ground_fault",
|
|
49
|
+
"rcd",
|
|
49
50
|
"motor",
|
|
50
51
|
"load",
|
|
51
52
|
"capacitor_bank",
|
|
52
53
|
"harmonic_filter",
|
|
53
54
|
"vfd",
|
|
54
55
|
"watthour_meter",
|
|
55
|
-
"demand_meter"
|
|
56
|
+
"demand_meter",
|
|
57
|
+
"consumer_unit"
|
|
56
58
|
]);
|
|
57
59
|
var TYPE_ALIASES = {
|
|
58
60
|
mcb: "breaker",
|
|
59
61
|
mccb: "breaker",
|
|
60
62
|
miniature_circuit_breaker: "breaker",
|
|
61
|
-
rcd: "
|
|
62
|
-
rcbo: "
|
|
63
|
-
rccb: "
|
|
64
|
-
differential: "
|
|
65
|
-
diferencial: "
|
|
63
|
+
rcd: "rcd",
|
|
64
|
+
rcbo: "rcd",
|
|
65
|
+
rccb: "rcd",
|
|
66
|
+
differential: "rcd",
|
|
67
|
+
diferencial: "rcd",
|
|
66
68
|
pia: "breaker",
|
|
67
69
|
iga: "breaker",
|
|
68
70
|
main_switch: "switch_load",
|
|
69
71
|
isolator: "switch_load",
|
|
70
72
|
disconnector: "switch_load",
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
db: "consumer_unit",
|
|
74
|
+
cu: "consumer_unit",
|
|
75
|
+
consumer_unit: "consumer_unit",
|
|
76
|
+
distribution_board: "consumer_unit",
|
|
77
|
+
panel: "consumer_unit",
|
|
78
|
+
panelboard: "consumer_unit"
|
|
75
79
|
};
|
|
76
80
|
function stripComment(s) {
|
|
77
81
|
let out = "";
|
|
@@ -208,6 +212,9 @@ function parseSLDDSL(text2) {
|
|
|
208
212
|
for (const [k, v] of splitAttrs(connMatch[3])) {
|
|
209
213
|
const key = k.toLowerCase();
|
|
210
214
|
if (key === "cable") c.cable = v;
|
|
215
|
+
else if (key === "cable_csa" || key === "csa") c.cableCsa = v;
|
|
216
|
+
else if (key === "cable_length_m" || key === "length_m") c.cableLengthM = v;
|
|
217
|
+
else if (key === "cable_insulation" || key === "insulation") c.cableInsulation = v;
|
|
211
218
|
else if (key === "label") c.label = v;
|
|
212
219
|
}
|
|
213
220
|
}
|
|
@@ -310,7 +317,10 @@ function geometryFor(type) {
|
|
|
310
317
|
case "watthour_meter":
|
|
311
318
|
case "demand_meter":
|
|
312
319
|
case "ground_fault":
|
|
320
|
+
case "rcd":
|
|
313
321
|
return { halfWidth: 14, topY: -14, bottomY: 14 };
|
|
322
|
+
case "consumer_unit":
|
|
323
|
+
return { halfWidth: 52, topY: -24, bottomY: 24 };
|
|
314
324
|
case "bus":
|
|
315
325
|
return DEFAULT_GEOMETRY;
|
|
316
326
|
case "hub":
|
|
@@ -616,6 +626,37 @@ function groundFaultSymbol() {
|
|
|
616
626
|
lineEl(0, 12, 0, 14)
|
|
617
627
|
]);
|
|
618
628
|
}
|
|
629
|
+
function rcdSymbol() {
|
|
630
|
+
return group({}, [
|
|
631
|
+
el("rect", { x: -14, y: -14, width: 28, height: 28, rx: 3, class: "lt-sld-fill" }),
|
|
632
|
+
text({ x: 0, y: -1, class: "lt-sld-wdg", "text-anchor": "middle", "font-size": "8" }, "RCD"),
|
|
633
|
+
text({ x: 0, y: 9, class: "lt-sld-wdg", "text-anchor": "middle", "font-size": "7" }, "I\u0394n"),
|
|
634
|
+
lineEl(0, -14, 0, -18),
|
|
635
|
+
lineEl(0, 14, 0, 18)
|
|
636
|
+
]);
|
|
637
|
+
}
|
|
638
|
+
function consumerUnitSymbol(label) {
|
|
639
|
+
const txt = label && label.length <= 9 ? label : "DB";
|
|
640
|
+
return group({}, [
|
|
641
|
+
el("rect", {
|
|
642
|
+
x: -50,
|
|
643
|
+
y: -22,
|
|
644
|
+
width: 100,
|
|
645
|
+
height: 44,
|
|
646
|
+
rx: 4,
|
|
647
|
+
class: "lt-sld-fill",
|
|
648
|
+
"stroke-width": 2
|
|
649
|
+
}),
|
|
650
|
+
lineEl(-38, -8, 38, -8, "lt-sld-stroke-thick"),
|
|
651
|
+
lineEl(-38, 8, 38, 8, "lt-sld-stroke-thick"),
|
|
652
|
+
lineEl(-22, -15, -22, 15),
|
|
653
|
+
lineEl(0, -15, 0, 15),
|
|
654
|
+
lineEl(22, -15, 22, 15),
|
|
655
|
+
text({ x: 0, y: 4, class: "lt-sld-wdg", "text-anchor": "middle", "font-size": "10" }, txt),
|
|
656
|
+
lineEl(0, -24, 0, -22),
|
|
657
|
+
lineEl(0, 22, 0, 24)
|
|
658
|
+
]);
|
|
659
|
+
}
|
|
619
660
|
function hubSymbol(label) {
|
|
620
661
|
return group({}, [
|
|
621
662
|
el("rect", {
|
|
@@ -762,10 +803,14 @@ function renderSymbol(type, detail, standard) {
|
|
|
762
803
|
return surgeArresterSymbol();
|
|
763
804
|
case "ground_fault":
|
|
764
805
|
return groundFaultSymbol();
|
|
806
|
+
case "rcd":
|
|
807
|
+
return rcdSymbol();
|
|
765
808
|
case "watthour_meter":
|
|
766
809
|
return meterSymbol("Wh");
|
|
767
810
|
case "demand_meter":
|
|
768
811
|
return meterSymbol("D");
|
|
812
|
+
case "consumer_unit":
|
|
813
|
+
return consumerUnitSymbol(detail);
|
|
769
814
|
case "bus":
|
|
770
815
|
return "";
|
|
771
816
|
case "hub":
|
|
@@ -1143,6 +1188,9 @@ function layoutSLD(ast) {
|
|
|
1143
1188
|
to: c.to,
|
|
1144
1189
|
path: pathD,
|
|
1145
1190
|
cable: c.cable,
|
|
1191
|
+
cableCsa: c.cableCsa,
|
|
1192
|
+
cableLengthM: c.cableLengthM,
|
|
1193
|
+
cableInsulation: c.cableInsulation,
|
|
1146
1194
|
label: c.label,
|
|
1147
1195
|
midX: (fx + tx) / 2,
|
|
1148
1196
|
midY: (startY + endY) / 2
|
|
@@ -1296,6 +1344,12 @@ function renderLabels(ln) {
|
|
|
1296
1344
|
const lines = [];
|
|
1297
1345
|
if (node.rating) lines.push(node.rating);
|
|
1298
1346
|
if (node.voltage) lines.push(node.voltage);
|
|
1347
|
+
if (node.nameplate) {
|
|
1348
|
+
for (const key of ["curve", "icn", "rcd_type", "type", "sensitivity", "poles"]) {
|
|
1349
|
+
const value = node.nameplate[key] ?? node.nameplate[key.toUpperCase()];
|
|
1350
|
+
if (value) lines.push(`${key}: ${value}`);
|
|
1351
|
+
}
|
|
1352
|
+
}
|
|
1299
1353
|
if (node.deviceNumber && ln.nodeType === "relay") ;
|
|
1300
1354
|
lines.forEach((l, i) => {
|
|
1301
1355
|
pieces.push(
|
|
@@ -1389,11 +1443,17 @@ function renderSLD(ast, config) {
|
|
|
1389
1443
|
});
|
|
1390
1444
|
for (const e of layout.edges) {
|
|
1391
1445
|
inner.push(path({ d: e.path, class: "lt-sld-wire" }));
|
|
1392
|
-
|
|
1446
|
+
const cableParts = [
|
|
1447
|
+
e.cable,
|
|
1448
|
+
e.cableCsa,
|
|
1449
|
+
e.cableInsulation,
|
|
1450
|
+
e.cableLengthM ? `${e.cableLengthM} m` : void 0
|
|
1451
|
+
].filter((v) => !!v);
|
|
1452
|
+
if (cableParts.length) {
|
|
1393
1453
|
inner.push(
|
|
1394
1454
|
text(
|
|
1395
1455
|
{ x: e.midX + 6, y: e.midY - 2, class: "lt-sld-cable" },
|
|
1396
|
-
|
|
1456
|
+
cableParts.join(" \xB7 ")
|
|
1397
1457
|
)
|
|
1398
1458
|
);
|
|
1399
1459
|
}
|
|
@@ -1431,7 +1491,7 @@ function renderSLD(ast, config) {
|
|
|
1431
1491
|
if (ln.nodeType === "unknown" && ln.node.rawType) {
|
|
1432
1492
|
attrs["data-raw-type"] = ln.node.rawType;
|
|
1433
1493
|
}
|
|
1434
|
-
const detail = ln.nodeType === "hub" ? ln.node.label ?? ln.node.id : ln.nodeType === "unknown" ? ln.node.rawType : ln.node.deviceNumber;
|
|
1494
|
+
const detail = ln.nodeType === "hub" || ln.nodeType === "consumer_unit" ? ln.node.label ?? ln.node.id : ln.nodeType === "unknown" ? ln.node.rawType : ln.node.deviceNumber;
|
|
1435
1495
|
inner.push(
|
|
1436
1496
|
group(attrs, [renderSymbol(ln.nodeType, detail, ast.standard)])
|
|
1437
1497
|
);
|
|
@@ -1484,6 +1544,7 @@ var KNOWN_DEVICE_WORDS = [
|
|
|
1484
1544
|
"relay",
|
|
1485
1545
|
"surge_arrester",
|
|
1486
1546
|
"ground_fault",
|
|
1547
|
+
"rcd",
|
|
1487
1548
|
"motor",
|
|
1488
1549
|
"load",
|
|
1489
1550
|
"capacitor_bank",
|
|
@@ -1491,14 +1552,16 @@ var KNOWN_DEVICE_WORDS = [
|
|
|
1491
1552
|
"vfd",
|
|
1492
1553
|
"watthour_meter",
|
|
1493
1554
|
"demand_meter",
|
|
1555
|
+
"consumer_unit",
|
|
1494
1556
|
"mcb",
|
|
1495
1557
|
"mccb",
|
|
1496
|
-
"rcd",
|
|
1497
1558
|
"rcbo",
|
|
1498
1559
|
"rccb",
|
|
1499
1560
|
"isolator",
|
|
1500
1561
|
"disconnector",
|
|
1501
|
-
"panel"
|
|
1562
|
+
"panel",
|
|
1563
|
+
"distribution_board",
|
|
1564
|
+
"consumer_unit"
|
|
1502
1565
|
];
|
|
1503
1566
|
function lintSLD(text2) {
|
|
1504
1567
|
let ast;
|
|
@@ -1562,5 +1625,5 @@ var sld = {
|
|
|
1562
1625
|
};
|
|
1563
1626
|
|
|
1564
1627
|
export { geometryFor, layoutSLD, lintSLD, lintSLDAst, parseSLDDSL, renderSLD, renderSymbol, sld };
|
|
1565
|
-
//# sourceMappingURL=chunk-
|
|
1566
|
-
//# sourceMappingURL=chunk-
|
|
1628
|
+
//# sourceMappingURL=chunk-WTGABYFK.js.map
|
|
1629
|
+
//# sourceMappingURL=chunk-WTGABYFK.js.map
|