schematex 0.9.16 → 0.9.18
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 +8 -8
- package/dist/ai/ai-sdk.js +3 -3
- package/dist/ai/index.cjs +17 -17
- package/dist/ai/index.js +4 -4
- package/dist/browser.cjs +9 -9
- package/dist/browser.js +3 -3
- package/dist/{chunk-24YHD4YI.cjs → chunk-AG4WA4NF.cjs} +9 -7
- package/dist/chunk-AG4WA4NF.cjs.map +1 -0
- package/dist/{chunk-HER5AMAO.js → chunk-DSKPJYQO.js} +3 -3
- package/dist/{chunk-HER5AMAO.js.map → chunk-DSKPJYQO.js.map} +1 -1
- package/dist/{chunk-37WDY4G4.js → chunk-FA6Y4QRS.js} +9 -7
- package/dist/chunk-FA6Y4QRS.js.map +1 -0
- package/dist/{chunk-PYXBTTM4.cjs → chunk-JWILBXGR.cjs} +5 -5
- package/dist/{chunk-PYXBTTM4.cjs.map → chunk-JWILBXGR.cjs.map} +1 -1
- package/dist/{chunk-KTZQRWXK.js → chunk-LZHLFNM3.js} +3 -4
- package/dist/{chunk-KTZQRWXK.js.map → chunk-LZHLFNM3.js.map} +1 -1
- package/dist/{chunk-W3N7EYSK.cjs → chunk-VLK5T7B7.cjs} +4 -5
- package/dist/{chunk-W3N7EYSK.cjs.map → chunk-VLK5T7B7.cjs.map} +1 -1
- package/dist/diagrams/circuit/index.cjs +8 -8
- package/dist/diagrams/circuit/index.js +1 -1
- package/dist/index.cjs +41 -41
- package/dist/index.js +4 -4
- package/dist/react.cjs +3 -3
- package/dist/react.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-24YHD4YI.cjs.map +0 -1
- package/dist/chunk-37WDY4G4.js.map +0 -1
|
@@ -1654,7 +1654,7 @@ function parseNetlist(body, title2) {
|
|
|
1654
1654
|
for (let lineIdx = 0; lineIdx < lines.length; lineIdx++) {
|
|
1655
1655
|
const raw = lines[lineIdx];
|
|
1656
1656
|
if (/^\s*\*/.test(raw)) continue;
|
|
1657
|
-
const stripped = raw.replace(
|
|
1657
|
+
const stripped = raw.replace(/[#;].*$/, "").trim();
|
|
1658
1658
|
if (!stripped) continue;
|
|
1659
1659
|
const tokens = tokenize(stripped);
|
|
1660
1660
|
if (tokens.length < 2) {
|
|
@@ -2019,12 +2019,12 @@ function parseAttrs(rest) {
|
|
|
2019
2019
|
}
|
|
2020
2020
|
function parseCircuit(text2) {
|
|
2021
2021
|
const rawLines = text2.split("\n");
|
|
2022
|
-
const firstMeaningful = rawLines.map((l) => l.replace(
|
|
2022
|
+
const firstMeaningful = rawLines.map((l) => l.replace(/[#;].*$/, "").trim()).find((l) => l.length > 0) ?? "";
|
|
2023
2023
|
if (/^circuit\b.*\bnetlist\s*$/i.test(firstMeaningful)) {
|
|
2024
2024
|
const netlistTitle = matchQuotedTitle(firstMeaningful);
|
|
2025
2025
|
let headerIdx = -1;
|
|
2026
2026
|
for (let i = 0; i < rawLines.length; i++) {
|
|
2027
|
-
const s = rawLines[i].replace(
|
|
2027
|
+
const s = rawLines[i].replace(/[#;].*$/, "").trim();
|
|
2028
2028
|
if (s.length > 0) {
|
|
2029
2029
|
headerIdx = i;
|
|
2030
2030
|
break;
|
|
@@ -2042,7 +2042,7 @@ function parseCircuit(text2) {
|
|
|
2042
2042
|
let pendingAt;
|
|
2043
2043
|
const mkId = (prefix) => `${prefix}_${autoId++}`;
|
|
2044
2044
|
for (const rawLine of lines) {
|
|
2045
|
-
const stripped = rawLine.replace(
|
|
2045
|
+
const stripped = rawLine.replace(/[#;].*$/, "").trim();
|
|
2046
2046
|
if (!stripped) continue;
|
|
2047
2047
|
if (/^circuit\b/i.test(stripped)) {
|
|
2048
2048
|
const t = matchQuotedTitle(stripped);
|
|
@@ -2141,7 +2141,9 @@ function parseCircuit(text2) {
|
|
|
2141
2141
|
const typeStr = bareMatch[1];
|
|
2142
2142
|
const norm = normalizeType(typeStr);
|
|
2143
2143
|
if (!norm) {
|
|
2144
|
-
|
|
2144
|
+
throw new CircuitParseError(
|
|
2145
|
+
`Unknown component type: "${typeStr}". For SPICE-style connectivity (Id net1 net2 [value]), start the diagram with the \`netlist\` header: circuit "..." netlist.`
|
|
2146
|
+
);
|
|
2145
2147
|
}
|
|
2146
2148
|
const rest = bareMatch[2] ?? "";
|
|
2147
2149
|
const parsed = parseAttrs(rest);
|
|
@@ -2881,5 +2883,5 @@ var circuit = {
|
|
|
2881
2883
|
};
|
|
2882
2884
|
|
|
2883
2885
|
export { EXTRA_SYMBOLS, SYMBOLS, circuit, layoutCircuit, layoutCircuitNetlist, lintCircuit, parseCircuit, parseNetlist, renderCircuit };
|
|
2884
|
-
//# sourceMappingURL=chunk-
|
|
2885
|
-
//# sourceMappingURL=chunk-
|
|
2886
|
+
//# sourceMappingURL=chunk-FA6Y4QRS.js.map
|
|
2887
|
+
//# sourceMappingURL=chunk-FA6Y4QRS.js.map
|