@vessel-dsp/core 0.6.3 → 0.6.5
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/README.md +11 -3
- package/dist/editor/commands.d.ts +13 -13
- package/dist/editor/commands.d.ts.map +1 -1
- package/dist/editor/commands.js +44 -29
- package/dist/editor/commands.js.map +1 -1
- package/dist/editor/factory.d.ts +1 -1
- package/dist/editor/factory.d.ts.map +1 -1
- package/dist/editor/factory.js +51 -51
- package/dist/editor/factory.js.map +1 -1
- package/dist/editor/history.d.ts +7 -7
- package/dist/editor/history.d.ts.map +1 -1
- package/dist/editor/history.js +20 -12
- package/dist/editor/history.js.map +1 -1
- package/dist/editor/index.d.ts +8 -8
- package/dist/editor/index.d.ts.map +1 -1
- package/dist/editor/index.js +4 -4
- package/dist/editor/index.js.map +1 -1
- package/dist/editor/layout.d.ts +1 -1
- package/dist/editor/layout.d.ts.map +1 -1
- package/dist/editor/layout.js +11 -6
- package/dist/editor/layout.js.map +1 -1
- package/dist/formats/circuit-json/serializer.d.ts +15 -15
- package/dist/formats/circuit-json/serializer.d.ts.map +1 -1
- package/dist/formats/circuit-json/serializer.js +486 -394
- package/dist/formats/circuit-json/serializer.js.map +1 -1
- package/dist/formats/document.d.ts +6 -6
- package/dist/formats/document.d.ts.map +1 -1
- package/dist/formats/document.js +112 -92
- package/dist/formats/document.js.map +1 -1
- package/dist/formats/interchange/parser.d.ts +1 -1
- package/dist/formats/interchange/parser.d.ts.map +1 -1
- package/dist/formats/interchange/parser.js +483 -286
- package/dist/formats/interchange/parser.js.map +1 -1
- package/dist/formats/interchange/serializer.d.ts +1 -1
- package/dist/formats/interchange/serializer.d.ts.map +1 -1
- package/dist/formats/interchange/serializer.js +59 -28
- package/dist/formats/interchange/serializer.js.map +1 -1
- package/dist/formats/ltspice/catalog.d.ts +1 -1
- package/dist/formats/ltspice/catalog.d.ts.map +1 -1
- package/dist/formats/ltspice/catalog.js +150 -48
- package/dist/formats/ltspice/catalog.js.map +1 -1
- package/dist/formats/ltspice/encoding.js +12 -40
- package/dist/formats/ltspice/encoding.js.map +1 -1
- package/dist/formats/ltspice/parser.d.ts +1 -1
- package/dist/formats/ltspice/parser.d.ts.map +1 -1
- package/dist/formats/ltspice/parser.js +122 -75
- package/dist/formats/ltspice/parser.js.map +1 -1
- package/dist/formats/ltspice/serializer.d.ts +1 -1
- package/dist/formats/ltspice/serializer.d.ts.map +1 -1
- package/dist/formats/ltspice/serializer.js +69 -47
- package/dist/formats/ltspice/serializer.js.map +1 -1
- package/dist/formats/schx/catalog.d.ts +1 -1
- package/dist/formats/schx/catalog.d.ts.map +1 -1
- package/dist/formats/schx/catalog.js +499 -254
- package/dist/formats/schx/catalog.js.map +1 -1
- package/dist/formats/schx/parser.d.ts +1 -1
- package/dist/formats/schx/parser.d.ts.map +1 -1
- package/dist/formats/schx/parser.js +40 -38
- package/dist/formats/schx/parser.js.map +1 -1
- package/dist/formats/schx/runtime-descriptors.d.ts +1 -1
- package/dist/formats/schx/runtime-descriptors.d.ts.map +1 -1
- package/dist/formats/schx/runtime-descriptors.js +239 -201
- package/dist/formats/schx/runtime-descriptors.js.map +1 -1
- package/dist/formats/schx/serializer.d.ts +2 -2
- package/dist/formats/schx/serializer.d.ts.map +1 -1
- package/dist/formats/schx/serializer.js +106 -106
- package/dist/formats/schx/serializer.js.map +1 -1
- package/dist/formats/schx/transforms.d.ts +1 -1
- package/dist/formats/schx/transforms.d.ts.map +1 -1
- package/dist/formats/schx/transforms.js +16 -8
- package/dist/formats/schx/transforms.js.map +1 -1
- package/dist/formats/spice/parser.d.ts +1 -1
- package/dist/formats/spice/parser.d.ts.map +1 -1
- package/dist/formats/spice/parser.js +105 -56
- package/dist/formats/spice/parser.js.map +1 -1
- package/dist/formats/spice/serializer.d.ts +1 -1
- package/dist/formats/spice/serializer.js +14 -12
- package/dist/formats/spice/serializer.js.map +1 -1
- package/dist/index.d.ts +47 -46
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +32 -31
- package/dist/index.js.map +1 -1
- package/dist/model/connectivity.d.ts +1 -1
- package/dist/model/connectivity.d.ts.map +1 -1
- package/dist/model/connectivity.js +22 -7
- package/dist/model/connectivity.js.map +1 -1
- package/dist/model/netlist.d.ts +3 -3
- package/dist/model/netlist.d.ts.map +1 -1
- package/dist/model/netlist.js +117 -100
- package/dist/model/netlist.js.map +1 -1
- package/dist/model/properties.d.ts +1 -1
- package/dist/model/properties.d.ts.map +1 -1
- package/dist/model/properties.js +16 -16
- package/dist/model/properties.js.map +1 -1
- package/dist/model/quantity.d.ts +1 -1
- package/dist/model/quantity.d.ts.map +1 -1
- package/dist/model/quantity.js +35 -35
- package/dist/model/quantity.js.map +1 -1
- package/dist/model/types.d.ts +72 -37
- package/dist/model/types.d.ts.map +1 -1
- package/dist/model/types.js +1 -1
- package/dist/model/types.js.map +1 -1
- package/dist/model/validation.d.ts +5 -5
- package/dist/model/validation.d.ts.map +1 -1
- package/dist/model/validation.js +763 -315
- package/dist/model/validation.js.map +1 -1
- package/dist/model/wires.d.ts +1 -1
- package/dist/model/wires.d.ts.map +1 -1
- package/dist/model/wires.js +4 -1
- package/dist/model/wires.js.map +1 -1
- package/dist/panel/extract.d.ts +2 -2
- package/dist/panel/extract.d.ts.map +1 -1
- package/dist/panel/extract.js +376 -216
- package/dist/panel/extract.js.map +1 -1
- package/dist/panel/index.d.ts +7 -5
- package/dist/panel/index.d.ts.map +1 -1
- package/dist/panel/index.js +5 -4
- package/dist/panel/index.js.map +1 -1
- package/dist/panel/knobs.d.ts +4 -4
- package/dist/panel/knobs.d.ts.map +1 -1
- package/dist/panel/knobs.js +1 -1
- package/dist/panel/knobs.js.map +1 -1
- package/dist/panel/placement.d.ts +27 -0
- package/dist/panel/placement.d.ts.map +1 -0
- package/dist/panel/placement.js +91 -0
- package/dist/panel/placement.js.map +1 -0
- package/dist/panel/protocol.d.ts +1 -1
- package/dist/panel/protocol.d.ts.map +1 -1
- package/dist/panel/protocol.js +32 -23
- package/dist/panel/protocol.js.map +1 -1
- package/dist/panel/types.d.ts +26 -18
- package/dist/panel/types.d.ts.map +1 -1
- package/dist/panel/types.js.map +1 -1
- package/dist/preview/bounds.d.ts +1 -1
- package/dist/preview/bounds.d.ts.map +1 -1
- package/dist/preview/bounds.js +3 -3
- package/dist/preview/bounds.js.map +1 -1
- package/dist/preview/box-layout.d.ts +2 -2
- package/dist/preview/box-layout.js.map +1 -1
- package/dist/preview/colors.d.ts +1 -1
- package/dist/preview/colors.js +35 -35
- package/dist/preview/colors.js.map +1 -1
- package/dist/preview/hanging.d.ts +1 -1
- package/dist/preview/hanging.d.ts.map +1 -1
- package/dist/preview/hanging.js +4 -1
- package/dist/preview/hanging.js.map +1 -1
- package/dist/preview/junctions.d.ts +1 -1
- package/dist/preview/junctions.d.ts.map +1 -1
- package/dist/preview/junctions.js.map +1 -1
- package/dist/preview/label-layout.d.ts.map +1 -1
- package/dist/preview/label-layout.js +4 -4
- package/dist/preview/label-layout.js.map +1 -1
- package/dist/preview/ports.d.ts +1 -1
- package/dist/preview/ports.d.ts.map +1 -1
- package/dist/preview/ports.js +2 -1
- package/dist/preview/ports.js.map +1 -1
- package/dist/preview/renderable-wires.d.ts +1 -1
- package/dist/preview/renderable-wires.d.ts.map +1 -1
- package/dist/preview/renderable-wires.js +3 -1
- package/dist/preview/renderable-wires.js.map +1 -1
- package/dist/preview/routing.d.ts +1 -1
- package/dist/preview/routing.js +1 -1
- package/dist/preview/routing.js.map +1 -1
- package/dist/preview/snap.d.ts +1 -1
- package/dist/preview/snap.d.ts.map +1 -1
- package/dist/preview/snap.js +11 -3
- package/dist/preview/snap.js.map +1 -1
- package/dist/preview/symbols/svg-content.d.ts.map +1 -1
- package/dist/preview/symbols/svg-content.js +200 -50
- package/dist/preview/symbols/svg-content.js.map +1 -1
- package/dist/preview/symbols.d.ts +2 -2
- package/dist/preview/symbols.d.ts.map +1 -1
- package/dist/preview/symbols.js +100 -97
- package/dist/preview/symbols.js.map +1 -1
- package/dist/preview/wire-chains.d.ts +1 -1
- package/dist/preview/wire-chains.d.ts.map +1 -1
- package/dist/preview/wire-chains.js.map +1 -1
- package/dist/profiles.d.ts +600 -0
- package/dist/profiles.d.ts.map +1 -0
- package/dist/profiles.js +118 -0
- package/dist/profiles.js.map +1 -0
- package/package.json +54 -54
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ParsedQuantity, PropertyObject, PropertyValue } from
|
|
1
|
+
import type { ParsedQuantity, PropertyObject, PropertyValue } from "./types";
|
|
2
2
|
export declare function isParsedQuantity(value: unknown): value is ParsedQuantity;
|
|
3
3
|
export declare function isPropertyObject(value: PropertyValue | undefined): value is PropertyObject;
|
|
4
4
|
export declare function propertyStringValue(value: PropertyValue | undefined): string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"properties.d.ts","sourceRoot":"","sources":["../../src/model/properties.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,
|
|
1
|
+
{"version":3,"file":"properties.d.ts","sourceRoot":"","sources":["../../src/model/properties.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CASxE;AAED,wBAAgB,gBAAgB,CAC/B,KAAK,EAAE,aAAa,GAAG,SAAS,GAC9B,KAAK,IAAI,cAAc,CAIzB;AAED,wBAAgB,mBAAmB,CAClC,KAAK,EAAE,aAAa,GAAG,SAAS,GAC9B,MAAM,GAAG,IAAI,CAcf;AAED,wBAAgB,qBAAqB,CACpC,KAAK,EAAE,aAAa,GAAG,SAAS,GAC9B,cAAc,GAAG,IAAI,CAkBvB;AAED,wBAAgB,oBAAoB,CACnC,KAAK,EAAE,aAAa,GAAG,SAAS,GAC9B,MAAM,GAAG,SAAS,CAmBpB;AAED,wBAAgB,oBAAoB,CACnC,KAAK,EAAE,aAAa,GAAG,SAAS,GAC9B,OAAO,GAAG,SAAS,CAerB;AAED,wBAAgB,+BAA+B,CAC9C,KAAK,EAAE,aAAa,GAClB,MAAM,GAAG,IAAI,CAMf"}
|
package/dist/model/properties.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { parseQuantity } from
|
|
1
|
+
import { parseQuantity } from "./quantity.js";
|
|
2
2
|
export function isParsedQuantity(value) {
|
|
3
3
|
if (!isUnknownRecord(value)) {
|
|
4
4
|
return false;
|
|
5
5
|
}
|
|
6
|
-
return typeof value[
|
|
7
|
-
typeof value[
|
|
8
|
-
typeof value[
|
|
6
|
+
return (typeof value["raw"] === "string" &&
|
|
7
|
+
typeof value["value"] === "number" &&
|
|
8
|
+
typeof value["unit"] === "string");
|
|
9
9
|
}
|
|
10
10
|
export function isPropertyObject(value) {
|
|
11
|
-
return isUnknownRecord(value) && !Array.isArray(value) && !isParsedQuantity(value);
|
|
11
|
+
return (isUnknownRecord(value) && !Array.isArray(value) && !isParsedQuantity(value));
|
|
12
12
|
}
|
|
13
13
|
export function propertyStringValue(value) {
|
|
14
14
|
if (value === undefined || value === null) {
|
|
15
15
|
return null;
|
|
16
16
|
}
|
|
17
|
-
if (typeof value ===
|
|
17
|
+
if (typeof value === "string") {
|
|
18
18
|
return value;
|
|
19
19
|
}
|
|
20
|
-
if (typeof value ===
|
|
20
|
+
if (typeof value === "number" || typeof value === "boolean") {
|
|
21
21
|
return String(value);
|
|
22
22
|
}
|
|
23
23
|
if (isParsedQuantity(value)) {
|
|
@@ -32,14 +32,14 @@ export function propertyQuantityValue(value) {
|
|
|
32
32
|
if (isParsedQuantity(value)) {
|
|
33
33
|
return value;
|
|
34
34
|
}
|
|
35
|
-
if (typeof value ===
|
|
35
|
+
if (typeof value === "string") {
|
|
36
36
|
return parseQuantity(value);
|
|
37
37
|
}
|
|
38
|
-
if (typeof value ===
|
|
38
|
+
if (typeof value === "number") {
|
|
39
39
|
return {
|
|
40
40
|
raw: String(value),
|
|
41
41
|
value,
|
|
42
|
-
unit:
|
|
42
|
+
unit: "",
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
return null;
|
|
@@ -48,13 +48,13 @@ export function propertyNumericValue(value) {
|
|
|
48
48
|
if (value === undefined || value === null) {
|
|
49
49
|
return undefined;
|
|
50
50
|
}
|
|
51
|
-
if (typeof value ===
|
|
51
|
+
if (typeof value === "number") {
|
|
52
52
|
return Number.isFinite(value) ? value : undefined;
|
|
53
53
|
}
|
|
54
54
|
if (isParsedQuantity(value)) {
|
|
55
55
|
return Number.isFinite(value.value) ? value.value : undefined;
|
|
56
56
|
}
|
|
57
|
-
if (typeof value ===
|
|
57
|
+
if (typeof value === "string") {
|
|
58
58
|
const trimmed = value.trim();
|
|
59
59
|
if (!/^[+-]?(?:\d+\.?\d*|\.\d+)(?:e[+-]?\d+)?$/i.test(trimmed)) {
|
|
60
60
|
return undefined;
|
|
@@ -68,14 +68,14 @@ export function propertyBooleanValue(value) {
|
|
|
68
68
|
if (value === undefined || value === null) {
|
|
69
69
|
return undefined;
|
|
70
70
|
}
|
|
71
|
-
if (typeof value ===
|
|
71
|
+
if (typeof value === "boolean") {
|
|
72
72
|
return value;
|
|
73
73
|
}
|
|
74
74
|
const text = propertyStringValue(value)?.trim().toLowerCase();
|
|
75
|
-
if (text ===
|
|
75
|
+
if (text === "true" || text === "1" || text === "yes") {
|
|
76
76
|
return true;
|
|
77
77
|
}
|
|
78
|
-
if (text ===
|
|
78
|
+
if (text === "false" || text === "0" || text === "no") {
|
|
79
79
|
return false;
|
|
80
80
|
}
|
|
81
81
|
return undefined;
|
|
@@ -88,6 +88,6 @@ export function propertyValueForSourceAttribute(value) {
|
|
|
88
88
|
return null;
|
|
89
89
|
}
|
|
90
90
|
function isUnknownRecord(value) {
|
|
91
|
-
return typeof value ===
|
|
91
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
92
92
|
}
|
|
93
93
|
//# sourceMappingURL=properties.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../src/model/properties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,MAAM,UAAU,gBAAgB,CAAC,KAAc;
|
|
1
|
+
{"version":3,"file":"properties.js","sourceRoot":"","sources":["../../src/model/properties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAG3C,MAAM,UAAU,gBAAgB,CAAC,KAAc;IAC9C,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;QAC7B,OAAO,KAAK,CAAC;IACd,CAAC;IACD,OAAO,CACN,OAAO,KAAK,CAAC,KAAK,CAAC,KAAK,QAAQ;QAChC,OAAO,KAAK,CAAC,OAAO,CAAC,KAAK,QAAQ;QAClC,OAAO,KAAK,CAAC,MAAM,CAAC,KAAK,QAAQ,CACjC,CAAC;AACH,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC/B,KAAgC;IAEhC,OAAO,CACN,eAAe,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAC3E,CAAC;AACH,CAAC;AAED,MAAM,UAAU,mBAAmB,CAClC,KAAgC;IAEhC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAC3C,OAAO,IAAI,CAAC;IACb,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAO,KAAK,CAAC;IACd,CAAC;IACD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,SAAS,EAAE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S,eAAe,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC7E,CAAC"}
|
package/dist/model/quantity.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quantity.d.ts","sourceRoot":"","sources":["../../src/model/quantity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"quantity.d.ts","sourceRoot":"","sources":["../../src/model/quantity.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAkE9C,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,GAAG,IAAI,CAmClE"}
|
package/dist/model/quantity.js
CHANGED
|
@@ -3,8 +3,8 @@ const SI_PREFIXES = {
|
|
|
3
3
|
p: 1e-12,
|
|
4
4
|
n: 1e-9,
|
|
5
5
|
u: 1e-6,
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
µ: 1e-6, // MICRO SIGN
|
|
7
|
+
μ: 1e-6, // GREEK SMALL LETTER MU — LiveSPICE writes "μF" with this codepoint
|
|
8
8
|
m: 1e-3,
|
|
9
9
|
k: 1e3,
|
|
10
10
|
K: 1e3,
|
|
@@ -17,39 +17,39 @@ const SHORTHAND_MARKERS = {
|
|
|
17
17
|
p: { multiplier: 1e-12 },
|
|
18
18
|
n: { multiplier: 1e-9 },
|
|
19
19
|
u: { multiplier: 1e-6 },
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
µ: { multiplier: 1e-6 },
|
|
21
|
+
μ: { multiplier: 1e-6 },
|
|
22
22
|
m: { multiplier: 1e-3 },
|
|
23
23
|
k: { multiplier: 1e3 },
|
|
24
24
|
K: { multiplier: 1e3 },
|
|
25
25
|
M: { multiplier: 1e6 },
|
|
26
26
|
G: { multiplier: 1e9 },
|
|
27
27
|
T: { multiplier: 1e12 },
|
|
28
|
-
R: { multiplier: 1, impliedUnit:
|
|
29
|
-
r: { multiplier: 1, impliedUnit:
|
|
28
|
+
R: { multiplier: 1, impliedUnit: "Ω" },
|
|
29
|
+
r: { multiplier: 1, impliedUnit: "Ω" },
|
|
30
30
|
};
|
|
31
31
|
const UNIT_ALIASES = {
|
|
32
|
-
F:
|
|
33
|
-
f:
|
|
34
|
-
H:
|
|
35
|
-
h:
|
|
36
|
-
V:
|
|
37
|
-
v:
|
|
38
|
-
A:
|
|
39
|
-
a:
|
|
40
|
-
W:
|
|
41
|
-
w:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
ohm:
|
|
45
|
-
Ohm:
|
|
46
|
-
OHM:
|
|
47
|
-
ohms:
|
|
48
|
-
Hz:
|
|
49
|
-
HZ:
|
|
50
|
-
hz:
|
|
51
|
-
s:
|
|
52
|
-
S:
|
|
32
|
+
F: "F",
|
|
33
|
+
f: "F",
|
|
34
|
+
H: "H",
|
|
35
|
+
h: "H",
|
|
36
|
+
V: "V",
|
|
37
|
+
v: "V",
|
|
38
|
+
A: "A",
|
|
39
|
+
a: "A",
|
|
40
|
+
W: "W",
|
|
41
|
+
w: "W",
|
|
42
|
+
Ω: "Ω", // GREEK CAPITAL LETTER OMEGA — canonical form
|
|
43
|
+
Ω: "Ω", // OHM SIGN — LiveSPICE writes "Ω" with this codepoint; canonicalize
|
|
44
|
+
ohm: "Ω",
|
|
45
|
+
Ohm: "Ω",
|
|
46
|
+
OHM: "Ω",
|
|
47
|
+
ohms: "Ω",
|
|
48
|
+
Hz: "Hz",
|
|
49
|
+
HZ: "Hz",
|
|
50
|
+
hz: "Hz",
|
|
51
|
+
s: "s",
|
|
52
|
+
S: "s",
|
|
53
53
|
};
|
|
54
54
|
const QUANTITY_REGEX = /^([+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:[eE][+-]?\d+)?)([A-Za-zµμΩΩ]*)$/;
|
|
55
55
|
const SHORTHAND_QUANTITY_REGEX = /^([+-]?\d+)([fFpPnNuUµμmMkKGTRr])(\d+)([A-Za-zµμΩΩ]*)$/;
|
|
@@ -59,7 +59,7 @@ export function parseQuantity(input) {
|
|
|
59
59
|
if (raw.length === 0) {
|
|
60
60
|
return null;
|
|
61
61
|
}
|
|
62
|
-
const compact = raw.replace(/\s+/g,
|
|
62
|
+
const compact = raw.replace(/\s+/g, "");
|
|
63
63
|
const shorthand = parseShorthandQuantity(raw, compact);
|
|
64
64
|
if (shorthand !== null) {
|
|
65
65
|
return shorthand;
|
|
@@ -69,7 +69,7 @@ export function parseQuantity(input) {
|
|
|
69
69
|
return null;
|
|
70
70
|
}
|
|
71
71
|
const numStr = match[1];
|
|
72
|
-
const suffix = match[2] ??
|
|
72
|
+
const suffix = match[2] ?? "";
|
|
73
73
|
if (numStr === undefined) {
|
|
74
74
|
return null;
|
|
75
75
|
}
|
|
@@ -92,7 +92,7 @@ function parseShorthandQuantity(raw, compact) {
|
|
|
92
92
|
const whole = match[1];
|
|
93
93
|
const marker = match[2];
|
|
94
94
|
const fractional = match[3];
|
|
95
|
-
const trailingUnit = match[4] ??
|
|
95
|
+
const trailingUnit = match[4] ?? "";
|
|
96
96
|
if (whole === undefined || marker === undefined || fractional === undefined) {
|
|
97
97
|
return null;
|
|
98
98
|
}
|
|
@@ -106,8 +106,8 @@ function parseShorthandQuantity(raw, compact) {
|
|
|
106
106
|
}
|
|
107
107
|
const aliasedTrailingUnit = UNIT_ALIASES[trailingUnit];
|
|
108
108
|
const unit = trailingUnit.length > 0
|
|
109
|
-
? aliasedTrailingUnit ?? trailingUnit
|
|
110
|
-
: markerDef.impliedUnit ??
|
|
109
|
+
? (aliasedTrailingUnit ?? trailingUnit)
|
|
110
|
+
: (markerDef.impliedUnit ?? "");
|
|
111
111
|
return {
|
|
112
112
|
raw,
|
|
113
113
|
value: value * markerDef.multiplier,
|
|
@@ -116,7 +116,7 @@ function parseShorthandQuantity(raw, compact) {
|
|
|
116
116
|
}
|
|
117
117
|
function parseSuffix(suffix) {
|
|
118
118
|
if (suffix.length === 0) {
|
|
119
|
-
return { multiplier: 1, unit:
|
|
119
|
+
return { multiplier: 1, unit: "" };
|
|
120
120
|
}
|
|
121
121
|
// SPICE convention: "Meg" / "MEG" / "meg" = 1e6, distinct from milli "m".
|
|
122
122
|
// Match before the single-char prefix loop so "meg" doesn't get read as milli + "eg".
|
|
@@ -124,7 +124,7 @@ function parseSuffix(suffix) {
|
|
|
124
124
|
if (megMatch) {
|
|
125
125
|
const rest = suffix.slice(megMatch[0].length);
|
|
126
126
|
if (rest.length === 0) {
|
|
127
|
-
return { multiplier: 1e6, unit:
|
|
127
|
+
return { multiplier: 1e6, unit: "" };
|
|
128
128
|
}
|
|
129
129
|
const restUnit = UNIT_ALIASES[rest];
|
|
130
130
|
return { multiplier: 1e6, unit: restUnit ?? rest };
|
|
@@ -134,7 +134,7 @@ function parseSuffix(suffix) {
|
|
|
134
134
|
const prefixMultiplier = SI_PREFIXES[first];
|
|
135
135
|
if (prefixMultiplier !== undefined) {
|
|
136
136
|
if (rest.length === 0) {
|
|
137
|
-
return { multiplier: prefixMultiplier, unit:
|
|
137
|
+
return { multiplier: prefixMultiplier, unit: "" };
|
|
138
138
|
}
|
|
139
139
|
const restUnit = UNIT_ALIASES[rest];
|
|
140
140
|
if (restUnit !== undefined) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quantity.js","sourceRoot":"","sources":["../../src/model/quantity.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAqC;
|
|
1
|
+
{"version":3,"file":"quantity.js","sourceRoot":"","sources":["../../src/model/quantity.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,GAAqC;IACrD,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,IAAI,EAAE,aAAa;IACtB,CAAC,EAAE,I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EAAE,CAAC;QACnD,CAAC;QACD,MAAM,QAAQ,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;QACpC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;YAC5B,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;QACzD,CAAC;IACF,CAAC;IAED,MAAM,QAAQ,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC;IACtC,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC5B,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;IAC1C,CAAC;IAED,OAAO,EAAE,UAAU,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;AACxC,CAAC"}
|
package/dist/model/types.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export type ParsedQuantity = Readonly<{
|
|
|
8
8
|
value: number;
|
|
9
9
|
unit: string;
|
|
10
10
|
}>;
|
|
11
|
-
export type ComponentKind =
|
|
11
|
+
export type ComponentKind = "resistor" | "capacitor" | "inductor" | "diode" | "led" | "bjt" | "jfet" | "mosfet" | "opamp" | "ota" | "triode" | "pentode" | "tube-diode" | "transformer" | "potentiometer" | "variable-resistor" | "switch" | "optocoupler" | "voltage-source" | "current-source" | "battery" | "ground" | "rail" | "jack" | "bbd" | "delay-ic" | "power-amp" | "regulator" | "analog-switch" | "flipflop" | "ic" | "label" | "named-wire" | "port" | "unsupported";
|
|
12
12
|
export type Terminal = Readonly<{
|
|
13
13
|
name: string;
|
|
14
14
|
position: Point;
|
|
@@ -37,11 +37,17 @@ export type DocumentMetadata = Readonly<{
|
|
|
37
37
|
description: string;
|
|
38
38
|
partNumber: string;
|
|
39
39
|
}>;
|
|
40
|
+
/**
|
|
41
|
+
* Portable source metadata carried by the document itself.
|
|
42
|
+
*
|
|
43
|
+
* Keep artifact-private provenance ledgers, packet-local paths, source hashes,
|
|
44
|
+
* and source-trace evidence in the consuming project's catalog or packet docs.
|
|
45
|
+
*/
|
|
40
46
|
export type DocumentSource = Readonly<Record<string, string>>;
|
|
41
|
-
export type ControlInterfaceRole =
|
|
42
|
-
export type ControlInterfaceConnector =
|
|
43
|
-
export type ControlInterfaceAssignmentHint =
|
|
44
|
-
export type ControlInterfacePolarity =
|
|
47
|
+
export type ControlInterfaceRole = "external-control" | "tempo-tap" | "trigger" | "reset" | "sampler-trigger" | "expression" | "unknown";
|
|
48
|
+
export type ControlInterfaceConnector = "1/4-inch-mono-ts" | "1/4-inch-trs" | "3.5mm-mono-ts" | "3.5mm-trs" | "proprietary" | "unknown";
|
|
49
|
+
export type ControlInterfaceAssignmentHint = "momentary" | "latching" | "momentary-or-latching" | "continuous";
|
|
50
|
+
export type ControlInterfacePolarity = "normally-open" | "normally-closed" | "expression" | "unknown";
|
|
45
51
|
export type ControlInterfaceBinding = Readonly<{
|
|
46
52
|
sourceComponentId?: string;
|
|
47
53
|
controlId?: string;
|
|
@@ -61,7 +67,7 @@ export type ControlInterface = Readonly<{
|
|
|
61
67
|
binding?: ControlInterfaceBinding;
|
|
62
68
|
description?: string;
|
|
63
69
|
}>;
|
|
64
|
-
export type CircuitDocumentDeviceKind =
|
|
70
|
+
export type CircuitDocumentDeviceKind = "audio-pedal" | "control-accessory" | "utility" | "unknown";
|
|
65
71
|
export type CircuitDocumentDevice = Readonly<{
|
|
66
72
|
id?: string;
|
|
67
73
|
version?: number;
|
|
@@ -70,7 +76,7 @@ export type CircuitDocumentDevice = Readonly<{
|
|
|
70
76
|
model?: string;
|
|
71
77
|
audioProcessing?: boolean;
|
|
72
78
|
}>;
|
|
73
|
-
export type ControlOutputSwitchMode =
|
|
79
|
+
export type ControlOutputSwitchMode = "momentary" | "latching";
|
|
74
80
|
export type ControlOutput = Readonly<{
|
|
75
81
|
id: string;
|
|
76
82
|
name: string;
|
|
@@ -89,14 +95,25 @@ export type ControlContext = Readonly<{
|
|
|
89
95
|
role: string;
|
|
90
96
|
description?: string;
|
|
91
97
|
}>;
|
|
98
|
+
export type ControlApplicabilityPredicate = Readonly<{
|
|
99
|
+
allOf?: readonly string[];
|
|
100
|
+
anyOf?: readonly string[];
|
|
101
|
+
}>;
|
|
102
|
+
export type ControlGroupMember = Readonly<{
|
|
103
|
+
controlId: string;
|
|
104
|
+
order?: number;
|
|
105
|
+
appliesWhen?: ControlApplicabilityPredicate;
|
|
106
|
+
description?: string;
|
|
107
|
+
}>;
|
|
92
108
|
export type ControlGroup = Readonly<{
|
|
93
109
|
id: string;
|
|
94
110
|
name: string;
|
|
95
111
|
role: string;
|
|
96
112
|
contextIds?: readonly string[];
|
|
97
113
|
description?: string;
|
|
114
|
+
members?: readonly ControlGroupMember[];
|
|
98
115
|
}>;
|
|
99
|
-
export type DeviceInterfaceControlKind =
|
|
116
|
+
export type DeviceInterfaceControlKind = "knob" | "slider" | "switch" | "selector" | "footswitch" | "led" | "jack";
|
|
100
117
|
export type DeviceInterfaceBinding = Readonly<{
|
|
101
118
|
componentId: string;
|
|
102
119
|
controlId?: string;
|
|
@@ -104,10 +121,6 @@ export type DeviceInterfaceBinding = Readonly<{
|
|
|
104
121
|
property?: string;
|
|
105
122
|
externalInterfaceId?: string;
|
|
106
123
|
}>;
|
|
107
|
-
export type ControlApplicabilityPredicate = Readonly<{
|
|
108
|
-
allOf?: readonly string[];
|
|
109
|
-
anyOf?: readonly string[];
|
|
110
|
-
}>;
|
|
111
124
|
export type DeviceInterfaceControl = Readonly<{
|
|
112
125
|
id: string;
|
|
113
126
|
label: string;
|
|
@@ -122,18 +135,18 @@ export type DeviceInterfaceControl = Readonly<{
|
|
|
122
135
|
export type DeviceInterface = Readonly<{
|
|
123
136
|
controls: readonly DeviceInterfaceControl[];
|
|
124
137
|
}>;
|
|
125
|
-
export type PanelGridIndexing =
|
|
126
|
-
export type PanelRowOrder =
|
|
127
|
-
export type PanelColumnOrder =
|
|
138
|
+
export type PanelGridIndexing = "one-based" | "zero-based";
|
|
139
|
+
export type PanelRowOrder = "top-to-bottom" | "bottom-to-top";
|
|
140
|
+
export type PanelColumnOrder = "left-to-right" | "right-to-left";
|
|
128
141
|
export type PanelGridLayout = Readonly<{
|
|
129
|
-
kind:
|
|
142
|
+
kind: "stompbox-grid";
|
|
130
143
|
rows: number;
|
|
131
144
|
columns: number;
|
|
132
145
|
indexing: PanelGridIndexing;
|
|
133
146
|
rowOrder?: PanelRowOrder;
|
|
134
147
|
columnOrder?: PanelColumnOrder;
|
|
135
148
|
}>;
|
|
136
|
-
export type PanelControlKind =
|
|
149
|
+
export type PanelControlKind = "knob" | "slider" | "switch" | "selector" | "footswitch" | "led" | "jack";
|
|
137
150
|
export type PanelGridPosition = Readonly<{
|
|
138
151
|
row: number;
|
|
139
152
|
column: number;
|
|
@@ -189,11 +202,24 @@ export type PanelElementPhysicalPlacement = VdspBuildDataObject & Readonly<{
|
|
|
189
202
|
drillDiameterMm?: number;
|
|
190
203
|
partProfileId?: string;
|
|
191
204
|
locked?: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* Groups peer placement elements that share one physical part occupying a
|
|
207
|
+
* single mounting hole — e.g. the stacked sections of a concentric pot.
|
|
208
|
+
* Every element in a mount group references the same `partProfileId` and
|
|
209
|
+
* `centerMm`; each names a distinct `surface` of that part.
|
|
210
|
+
*/
|
|
211
|
+
mountId?: string;
|
|
212
|
+
/**
|
|
213
|
+
* Which surface of a multi-surface part this element occupies (e.g. a
|
|
214
|
+
* concentric pot's stacked dial id such as `lower`/`upper`, declared by the
|
|
215
|
+
* part profile). Only meaningful together with `mountId`.
|
|
216
|
+
*/
|
|
217
|
+
surface?: string;
|
|
192
218
|
}>;
|
|
193
|
-
export type BuildIntent =
|
|
194
|
-
export type BuildCompleteness =
|
|
219
|
+
export type BuildIntent = "diy-build-artifact" | "schema-review-sample";
|
|
220
|
+
export type BuildCompleteness = "complete-selected-build" | "partial-offboard-wiring";
|
|
195
221
|
export type BuildScope = VdspBuildDataObject & Readonly<{
|
|
196
|
-
schema:
|
|
222
|
+
schema: "build-scope/v1";
|
|
197
223
|
intent?: BuildIntent;
|
|
198
224
|
completeness?: BuildCompleteness;
|
|
199
225
|
selectedBoardId?: string;
|
|
@@ -217,7 +243,7 @@ export type MechanicalBuildMetadata = VdspBuildDataObject & Readonly<{
|
|
|
217
243
|
keepoutRectsMm?: readonly VdspBuildDataObject[];
|
|
218
244
|
}>;
|
|
219
245
|
}>;
|
|
220
|
-
export type BuildBomRefKind =
|
|
246
|
+
export type BuildBomRefKind = "component" | "device-interface-control" | "panel-element" | "board" | "freeform-build-item";
|
|
221
247
|
export type BuildBomRef = VdspBuildDataObject & Readonly<{
|
|
222
248
|
kind: BuildBomRefKind;
|
|
223
249
|
componentId?: string;
|
|
@@ -236,7 +262,7 @@ export type BuildBomItem = VdspBuildDataObject & Readonly<{
|
|
|
236
262
|
sku?: string;
|
|
237
263
|
}>;
|
|
238
264
|
export type BuildBom = VdspBuildDataObject & Readonly<{
|
|
239
|
-
schema:
|
|
265
|
+
schema: "build-bom/v1";
|
|
240
266
|
items: readonly BuildBomItem[];
|
|
241
267
|
}>;
|
|
242
268
|
export type BuildPartProfile = VdspBuildDataObject & Readonly<{
|
|
@@ -244,7 +270,7 @@ export type BuildPartProfile = VdspBuildDataObject & Readonly<{
|
|
|
244
270
|
kind?: string;
|
|
245
271
|
}>;
|
|
246
272
|
export type BuildPartProfileCatalog = VdspBuildDataObject & Readonly<{
|
|
247
|
-
schema:
|
|
273
|
+
schema: "part-profile-catalog/v1";
|
|
248
274
|
resolution?: string;
|
|
249
275
|
units?: string;
|
|
250
276
|
profiles: readonly BuildPartProfile[];
|
|
@@ -254,14 +280,14 @@ export type BoardFootprint = VdspBuildDataObject & Readonly<{
|
|
|
254
280
|
boardApplicability?: BoardApplicability;
|
|
255
281
|
}>;
|
|
256
282
|
export type BoardFootprintCatalog = VdspBuildDataObject & Readonly<{
|
|
257
|
-
schema:
|
|
283
|
+
schema: "board-footprint-catalog/v1";
|
|
258
284
|
resolution?: string;
|
|
259
285
|
units?: string;
|
|
260
286
|
footprints: readonly BoardFootprint[];
|
|
261
287
|
}>;
|
|
262
|
-
export type OffBoardWiringCoverage =
|
|
263
|
-
export type OffBoardWiringHarnessStatus =
|
|
264
|
-
export type OffBoardWiringEndpointKind =
|
|
288
|
+
export type OffBoardWiringCoverage = "selected-build-complete" | "representative-selected-build-endpoints";
|
|
289
|
+
export type OffBoardWiringHarnessStatus = "complete" | "partial" | "candidate";
|
|
290
|
+
export type OffBoardWiringEndpointKind = "panel-component-terminal" | "board-terminal" | "power-terminal" | "footswitch-terminal" | "free-wire-label";
|
|
265
291
|
export type OffBoardWiringEndpoint = VdspBuildDataObject & Readonly<{
|
|
266
292
|
id: string;
|
|
267
293
|
kind: OffBoardWiringEndpointKind;
|
|
@@ -273,12 +299,12 @@ export type OffBoardWiringEndpoint = VdspBuildDataObject & Readonly<{
|
|
|
273
299
|
label?: string;
|
|
274
300
|
}>;
|
|
275
301
|
export type BoardNetRef = VdspBuildDataObject & Readonly<{
|
|
276
|
-
source:
|
|
302
|
+
source: "board-netlist";
|
|
277
303
|
boardId?: string;
|
|
278
304
|
netId: string;
|
|
279
305
|
}>;
|
|
280
306
|
export type CanonicalCircuitNetRef = VdspBuildDataObject & Readonly<{
|
|
281
|
-
source:
|
|
307
|
+
source: "canonical-circuit";
|
|
282
308
|
member?: ComponentTerminalRef;
|
|
283
309
|
}>;
|
|
284
310
|
export type OffBoardSignalRef = BoardNetRef | CanonicalCircuitNetRef | VdspBuildDataObject;
|
|
@@ -303,14 +329,14 @@ export type OffBoardWiringHarness = VdspBuildDataObject & Readonly<{
|
|
|
303
329
|
connections: readonly OffBoardWiringConnection[];
|
|
304
330
|
}>;
|
|
305
331
|
export type OffBoardWiringPlan = VdspBuildDataObject & Readonly<{
|
|
306
|
-
schema:
|
|
332
|
+
schema: "offboard-wiring/v1";
|
|
307
333
|
source?: string;
|
|
308
334
|
coverage?: OffBoardWiringCoverage;
|
|
309
335
|
harnesses: readonly OffBoardWiringHarness[];
|
|
310
336
|
}>;
|
|
311
|
-
export type BoardFamily =
|
|
312
|
-
export type BoardKind =
|
|
313
|
-
export type BoardSubtype =
|
|
337
|
+
export type BoardFamily = "prototype-board" | "fabricated-board";
|
|
338
|
+
export type BoardKind = "stripboard" | "perfboard" | "breadboard-pattern" | "pcb";
|
|
339
|
+
export type BoardSubtype = "veroboard" | "isolated-pad" | "solderable-half-breadboard" | "single-sided-through-hole" | "two-layer-through-hole";
|
|
314
340
|
export type BoardApplicability = VdspBuildDataObject & Readonly<{
|
|
315
341
|
family: BoardFamily;
|
|
316
342
|
kind: BoardKind;
|
|
@@ -321,8 +347,8 @@ export type ComponentTerminalRef = VdspBuildDataObject & Readonly<{
|
|
|
321
347
|
terminalName: string;
|
|
322
348
|
}>;
|
|
323
349
|
export type BoardSourceCircuitHash = VdspBuildDataObject & Readonly<{
|
|
324
|
-
schema:
|
|
325
|
-
hashAlgorithm:
|
|
350
|
+
schema: "canonical-circuit-facts-hash/v1";
|
|
351
|
+
hashAlgorithm: "sha256";
|
|
326
352
|
hash: string;
|
|
327
353
|
}>;
|
|
328
354
|
export type BoardHole = VdspBuildDataObject & Readonly<{
|
|
@@ -375,14 +401,14 @@ export type BoardRoute = VdspBuildDataObject & Readonly<{
|
|
|
375
401
|
drills?: readonly VdspBuildDataObject[];
|
|
376
402
|
}>;
|
|
377
403
|
export type BoardReview = VdspBuildDataObject & Readonly<{
|
|
378
|
-
status?:
|
|
404
|
+
status?: "buildable" | "candidate" | "stale" | string;
|
|
379
405
|
reviewedBy?: string;
|
|
380
406
|
reviewedAt?: string;
|
|
381
407
|
notes?: string;
|
|
382
408
|
}>;
|
|
383
409
|
export type BoardRealization = VdspBuildDataObject & Readonly<{
|
|
384
410
|
id: string;
|
|
385
|
-
schema:
|
|
411
|
+
schema: "circuit-board/v1";
|
|
386
412
|
family: BoardFamily;
|
|
387
413
|
kind: BoardKind;
|
|
388
414
|
subtype?: BoardSubtype;
|
|
@@ -404,6 +430,15 @@ export type Warning = Readonly<{
|
|
|
404
430
|
componentId?: string;
|
|
405
431
|
wireId?: string;
|
|
406
432
|
}>;
|
|
433
|
+
/**
|
|
434
|
+
* Normalized source-visible circuit document.
|
|
435
|
+
*
|
|
436
|
+
* Hosts can render this graph as an inspectable schematic and lower it into
|
|
437
|
+
* their own simulator/runtime. Runtime lowering may replace source-visible
|
|
438
|
+
* sections with compact MNA, reusable kernels, or macro DSP, but the document
|
|
439
|
+
* should preserve the user-facing schematic/control semantics needed to audit
|
|
440
|
+
* that mapping.
|
|
441
|
+
*/
|
|
407
442
|
export type CircuitDocument = Readonly<{
|
|
408
443
|
metadata: DocumentMetadata;
|
|
409
444
|
source?: DocumentSource;
|