schematex 0.9.12 → 0.9.13
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 +16 -16
- package/dist/ai/ai-sdk.js +11 -11
- package/dist/ai/index.cjs +25 -25
- package/dist/ai/index.js +12 -12
- package/dist/browser.cjs +17 -17
- package/dist/browser.js +11 -11
- package/dist/{chunk-HEGDKO2E.cjs → chunk-24YHD4YI.cjs} +3 -2
- package/dist/chunk-24YHD4YI.cjs.map +1 -0
- package/dist/{chunk-NP7N3DZG.js → chunk-2ZHP4TXP.js} +3 -3
- package/dist/{chunk-NP7N3DZG.js.map → chunk-2ZHP4TXP.js.map} +1 -1
- package/dist/{chunk-32LOZTNP.js → chunk-37WDY4G4.js} +3 -2
- package/dist/chunk-37WDY4G4.js.map +1 -0
- package/dist/{chunk-3KRL2EGN.cjs → chunk-3TGOOZ36.cjs} +13 -6
- package/dist/chunk-3TGOOZ36.cjs.map +1 -0
- package/dist/{chunk-Q5MQLUOH.js → chunk-6GVFKOSH.js} +3 -3
- package/dist/{chunk-Q5MQLUOH.js.map → chunk-6GVFKOSH.js.map} +1 -1
- package/dist/{chunk-2KTQ75LN.js → chunk-6KRSBSNT.js} +12 -7
- package/dist/chunk-6KRSBSNT.js.map +1 -0
- package/dist/{chunk-246OJILS.cjs → chunk-7DQXFTA7.cjs} +4 -4
- package/dist/{chunk-246OJILS.cjs.map → chunk-7DQXFTA7.cjs.map} +1 -1
- package/dist/{chunk-YFPDZVB7.cjs → chunk-AQENURKO.cjs} +4 -4
- package/dist/{chunk-YFPDZVB7.cjs.map → chunk-AQENURKO.cjs.map} +1 -1
- package/dist/{chunk-OGF7QM74.cjs → chunk-AWUUGDN4.cjs} +4 -4
- package/dist/{chunk-OGF7QM74.cjs.map → chunk-AWUUGDN4.cjs.map} +1 -1
- package/dist/{chunk-ZRFKIERV.js → chunk-BGFKTJBZ.js} +3 -3
- package/dist/{chunk-ZRFKIERV.js.map → chunk-BGFKTJBZ.js.map} +1 -1
- package/dist/{chunk-F5RYWDWO.cjs → chunk-CYBBBBMZ.cjs} +4 -4
- package/dist/{chunk-F5RYWDWO.cjs.map → chunk-CYBBBBMZ.cjs.map} +1 -1
- package/dist/{chunk-QC2RICQ4.cjs → chunk-F3JYKM6M.cjs} +4 -4
- package/dist/{chunk-QC2RICQ4.cjs.map → chunk-F3JYKM6M.cjs.map} +1 -1
- package/dist/{chunk-6KW7XSUR.js → chunk-GHMSKPYN.js} +3 -3
- package/dist/{chunk-6KW7XSUR.js.map → chunk-GHMSKPYN.js.map} +1 -1
- package/dist/{chunk-NB7MFQCZ.js → chunk-HZTHSNUN.js} +3 -3
- package/dist/{chunk-NB7MFQCZ.js.map → chunk-HZTHSNUN.js.map} +1 -1
- package/dist/{chunk-W4UVDMUC.js → chunk-I7UYVCKH.js} +3 -3
- package/dist/{chunk-W4UVDMUC.js.map → chunk-I7UYVCKH.js.map} +1 -1
- package/dist/{chunk-HIWJMJJB.js → chunk-ITNCO3MZ.js} +3 -3
- package/dist/{chunk-HIWJMJJB.js.map → chunk-ITNCO3MZ.js.map} +1 -1
- package/dist/{chunk-MGMR6V6N.cjs → chunk-KTAEPUAE.cjs} +24 -23
- package/dist/chunk-KTAEPUAE.cjs.map +1 -0
- package/dist/{chunk-AETIGJXP.js → chunk-KWY52MLQ.js} +3 -3
- package/dist/{chunk-AETIGJXP.js.map → chunk-KWY52MLQ.js.map} +1 -1
- package/dist/{chunk-DLXDR2E7.cjs → chunk-TIHHISCK.cjs} +4 -4
- package/dist/{chunk-DLXDR2E7.cjs.map → chunk-TIHHISCK.cjs.map} +1 -1
- package/dist/{chunk-GTCGATOL.cjs → chunk-US4QZ7J7.cjs} +4 -4
- package/dist/{chunk-GTCGATOL.cjs.map → chunk-US4QZ7J7.cjs.map} +1 -1
- package/dist/{chunk-JLLDJCLW.js → chunk-WPNMVV3U.js} +13 -12
- package/dist/{chunk-JLLDJCLW.js.map → chunk-WPNMVV3U.js.map} +1 -1
- package/dist/{chunk-YLG7S4SM.cjs → chunk-XJ5MTQLJ.cjs} +5 -5
- package/dist/{chunk-YLG7S4SM.cjs.map → chunk-XJ5MTQLJ.cjs.map} +1 -1
- package/dist/diagrams/circuit/index.cjs +8 -8
- package/dist/diagrams/circuit/index.js +1 -1
- package/dist/diagrams/ecomap/index.cjs +7 -7
- package/dist/diagrams/ecomap/index.js +2 -2
- package/dist/diagrams/fishbone/index.cjs +8 -8
- package/dist/diagrams/fishbone/index.js +2 -2
- package/dist/diagrams/flowchart/index.cjs +8 -8
- package/dist/diagrams/flowchart/index.js +2 -2
- package/dist/diagrams/genogram/index.cjs +9 -9
- package/dist/diagrams/genogram/index.js +2 -2
- package/dist/diagrams/ladder/index.cjs +6 -6
- package/dist/diagrams/ladder/index.js +2 -2
- package/dist/diagrams/pedigree/index.cjs +7 -7
- package/dist/diagrams/pedigree/index.js +2 -2
- package/dist/diagrams/sld/index.cjs +8 -8
- package/dist/diagrams/sld/index.js +2 -2
- package/dist/index.cjs +60 -60
- package/dist/index.js +14 -14
- package/dist/react.cjs +11 -11
- package/dist/react.js +10 -10
- package/package.json +1 -1
- package/dist/chunk-2KTQ75LN.js.map +0 -1
- package/dist/chunk-32LOZTNP.js.map +0 -1
- package/dist/chunk-3KRL2EGN.cjs.map +0 -1
- package/dist/chunk-HEGDKO2E.cjs.map +0 -1
- package/dist/chunk-MGMR6V6N.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkKTAEPUAE_cjs = require('./chunk-KTAEPUAE.cjs');
|
|
4
4
|
var chunkUHRNFBWY_cjs = require('./chunk-UHRNFBWY.cjs');
|
|
5
5
|
var chunkIBZKIMT5_cjs = require('./chunk-IBZKIMT5.cjs');
|
|
6
|
-
var
|
|
6
|
+
var chunk24YHD4YI_cjs = require('./chunk-24YHD4YI.cjs');
|
|
7
7
|
var chunkT55OQILI_cjs = require('./chunk-T55OQILI.cjs');
|
|
8
|
-
var
|
|
9
|
-
var
|
|
8
|
+
var chunkUS4QZ7J7_cjs = require('./chunk-US4QZ7J7.cjs');
|
|
9
|
+
var chunkAWUUGDN4_cjs = require('./chunk-AWUUGDN4.cjs');
|
|
10
10
|
var chunk4MANMKQ4_cjs = require('./chunk-4MANMKQ4.cjs');
|
|
11
|
-
var
|
|
11
|
+
var chunkAQENURKO_cjs = require('./chunk-AQENURKO.cjs');
|
|
12
12
|
var chunk3JN4762U_cjs = require('./chunk-3JN4762U.cjs');
|
|
13
|
-
var
|
|
14
|
-
var
|
|
15
|
-
var
|
|
16
|
-
var
|
|
17
|
-
require('./chunk-
|
|
13
|
+
var chunkTIHHISCK_cjs = require('./chunk-TIHHISCK.cjs');
|
|
14
|
+
var chunkCYBBBBMZ_cjs = require('./chunk-CYBBBBMZ.cjs');
|
|
15
|
+
var chunkF3JYKM6M_cjs = require('./chunk-F3JYKM6M.cjs');
|
|
16
|
+
var chunk7DQXFTA7_cjs = require('./chunk-7DQXFTA7.cjs');
|
|
17
|
+
require('./chunk-3TGOOZ36.cjs');
|
|
18
18
|
var chunkTFUVNQNA_cjs = require('./chunk-TFUVNQNA.cjs');
|
|
19
19
|
var chunkKYE7CRED_cjs = require('./chunk-KYE7CRED.cjs');
|
|
20
20
|
require('./chunk-5UCXMYE7.cjs');
|
|
@@ -35,8 +35,8 @@ function svgDoc(viewBox, css, inner) {
|
|
|
35
35
|
var CIRCUIT_CSS = ".schematex-circuit-body{stroke:#0f172a;stroke-width:1.75;fill:none;stroke-linejoin:round;stroke-linecap:round}.schematex-circuit-fill{stroke:#0f172a;stroke-width:1.5;fill:#0f172a}.schematex-circuit-wire{stroke:#0f172a;stroke-width:1.75;fill:none;stroke-linecap:square}";
|
|
36
36
|
function circuitCatalog() {
|
|
37
37
|
const merged = {
|
|
38
|
-
...
|
|
39
|
-
...
|
|
38
|
+
...chunk24YHD4YI_cjs.SYMBOLS,
|
|
39
|
+
...chunk24YHD4YI_cjs.EXTRA_SYMBOLS
|
|
40
40
|
};
|
|
41
41
|
const out = [];
|
|
42
42
|
for (const [id, def] of Object.entries(merged)) {
|
|
@@ -92,11 +92,11 @@ function sldCatalog() {
|
|
|
92
92
|
for (const type of SLD_TYPES) {
|
|
93
93
|
let inner;
|
|
94
94
|
try {
|
|
95
|
-
inner =
|
|
95
|
+
inner = chunkAWUUGDN4_cjs.renderSymbol(type);
|
|
96
96
|
} catch {
|
|
97
97
|
continue;
|
|
98
98
|
}
|
|
99
|
-
const g =
|
|
99
|
+
const g = chunkAWUUGDN4_cjs.geometryFor(type);
|
|
100
100
|
const w = Math.max(g.halfWidth, 18) + 12;
|
|
101
101
|
const top = Math.min(g.topY, -22) - 8;
|
|
102
102
|
const bot = Math.max(g.bottomY, 22) + 8;
|
|
@@ -112,10 +112,10 @@ var PID_CSS = ".lt-pid-equip{fill:#ffffff;stroke:#1d1d1d;stroke-width:1.6}.lt-pi
|
|
|
112
112
|
function pidCatalog() {
|
|
113
113
|
const out = [];
|
|
114
114
|
const pad = 12;
|
|
115
|
-
for (const [id, g] of Object.entries(
|
|
115
|
+
for (const [id, g] of Object.entries(chunkKTAEPUAE_cjs.GEOMETRY)) {
|
|
116
116
|
let inner;
|
|
117
117
|
try {
|
|
118
|
-
inner =
|
|
118
|
+
inner = chunkKTAEPUAE_cjs.renderEquip(id, "");
|
|
119
119
|
} catch {
|
|
120
120
|
continue;
|
|
121
121
|
}
|
|
@@ -133,10 +133,10 @@ function pidCatalog() {
|
|
|
133
133
|
}
|
|
134
134
|
var FC_ICON_CSS = ".sx-fc-icon{stroke:#0f172a;fill:none}.sx-fc-icon-fill{fill:#0f172a}";
|
|
135
135
|
function flowchartIconCatalog() {
|
|
136
|
-
return
|
|
136
|
+
return chunkTIHHISCK_cjs.iconNames().map((name) => ({
|
|
137
137
|
id: name,
|
|
138
138
|
label: humanize(name),
|
|
139
|
-
svg: svgDoc("-13 -13 26 26", FC_ICON_CSS,
|
|
139
|
+
svg: svgDoc("-13 -13 26 26", FC_ICON_CSS, chunkTIHHISCK_cjs.renderIcon(name))
|
|
140
140
|
})).sort((a, b) => a.label.localeCompare(b.label));
|
|
141
141
|
}
|
|
142
142
|
var LOGIC_CSS = ".schematex-logic-gate-body{fill:none;stroke:#0f172a;stroke-width:1.75;stroke-linejoin:round}.schematex-logic-bubble{fill:#ffffff;stroke:#0f172a;stroke-width:1.5}.schematex-logic-wire{stroke:#0f172a;stroke-width:1.5;fill:none;stroke-linecap:square}.schematex-logic-gate-iec-label{font:bold 13px sans-serif;fill:#0f172a}";
|
|
@@ -225,11 +225,11 @@ var NETWORK_KINDS = [
|
|
|
225
225
|
function networkCatalog() {
|
|
226
226
|
const out = [];
|
|
227
227
|
for (const kind of NETWORK_KINDS) {
|
|
228
|
-
const { w, h } =
|
|
228
|
+
const { w, h } = chunkKTAEPUAE_cjs.iconSize(kind);
|
|
229
229
|
const device = { id: kind, kind, label: humanize(kind), groups: [] };
|
|
230
230
|
let inner;
|
|
231
231
|
try {
|
|
232
|
-
inner =
|
|
232
|
+
inner = chunkKTAEPUAE_cjs.drawDeviceIcon(device, { x: 0, y: 0, w, h });
|
|
233
233
|
} catch {
|
|
234
234
|
continue;
|
|
235
235
|
}
|
|
@@ -246,7 +246,7 @@ function floorplanCatalog() {
|
|
|
246
246
|
const scale = 40;
|
|
247
247
|
const px = (m) => Math.round(m * scale * 100) / 100;
|
|
248
248
|
const out = [];
|
|
249
|
-
for (const [id, def] of Object.entries(
|
|
249
|
+
for (const [id, def] of Object.entries(chunkKTAEPUAE_cjs.FLOORPLAN_SYMBOLS)) {
|
|
250
250
|
const [mt, mr, mb, ml] = def.envelope ?? [0, 0, 0, 0];
|
|
251
251
|
const pad = 5;
|
|
252
252
|
const x0 = -px(ml) - pad;
|
|
@@ -313,127 +313,127 @@ function getSymbolCatalog(type) {
|
|
|
313
313
|
|
|
314
314
|
Object.defineProperty(exports, "bowtie", {
|
|
315
315
|
enumerable: true,
|
|
316
|
-
get: function () { return
|
|
316
|
+
get: function () { return chunkKTAEPUAE_cjs.bowtie; }
|
|
317
317
|
});
|
|
318
318
|
Object.defineProperty(exports, "causalloop", {
|
|
319
319
|
enumerable: true,
|
|
320
|
-
get: function () { return
|
|
320
|
+
get: function () { return chunkKTAEPUAE_cjs.causalloop; }
|
|
321
321
|
});
|
|
322
322
|
Object.defineProperty(exports, "comparison", {
|
|
323
323
|
enumerable: true,
|
|
324
|
-
get: function () { return
|
|
324
|
+
get: function () { return chunkKTAEPUAE_cjs.comparison; }
|
|
325
325
|
});
|
|
326
326
|
Object.defineProperty(exports, "decisiontree", {
|
|
327
327
|
enumerable: true,
|
|
328
|
-
get: function () { return
|
|
328
|
+
get: function () { return chunkKTAEPUAE_cjs.decisiontree; }
|
|
329
329
|
});
|
|
330
330
|
Object.defineProperty(exports, "epc", {
|
|
331
331
|
enumerable: true,
|
|
332
|
-
get: function () { return
|
|
332
|
+
get: function () { return chunkKTAEPUAE_cjs.epc; }
|
|
333
333
|
});
|
|
334
334
|
Object.defineProperty(exports, "eventtree", {
|
|
335
335
|
enumerable: true,
|
|
336
|
-
get: function () { return
|
|
336
|
+
get: function () { return chunkKTAEPUAE_cjs.eventtree; }
|
|
337
337
|
});
|
|
338
338
|
Object.defineProperty(exports, "faulttree", {
|
|
339
339
|
enumerable: true,
|
|
340
|
-
get: function () { return
|
|
340
|
+
get: function () { return chunkKTAEPUAE_cjs.faulttree; }
|
|
341
341
|
});
|
|
342
342
|
Object.defineProperty(exports, "floorplan", {
|
|
343
343
|
enumerable: true,
|
|
344
|
-
get: function () { return
|
|
344
|
+
get: function () { return chunkKTAEPUAE_cjs.floorplan; }
|
|
345
345
|
});
|
|
346
346
|
Object.defineProperty(exports, "fmea", {
|
|
347
347
|
enumerable: true,
|
|
348
|
-
get: function () { return
|
|
348
|
+
get: function () { return chunkKTAEPUAE_cjs.fmea; }
|
|
349
349
|
});
|
|
350
350
|
Object.defineProperty(exports, "gitgraph", {
|
|
351
351
|
enumerable: true,
|
|
352
|
-
get: function () { return
|
|
352
|
+
get: function () { return chunkKTAEPUAE_cjs.gitgraph; }
|
|
353
353
|
});
|
|
354
354
|
Object.defineProperty(exports, "idef0", {
|
|
355
355
|
enumerable: true,
|
|
356
|
-
get: function () { return
|
|
356
|
+
get: function () { return chunkKTAEPUAE_cjs.idef0; }
|
|
357
357
|
});
|
|
358
358
|
Object.defineProperty(exports, "markov", {
|
|
359
359
|
enumerable: true,
|
|
360
|
-
get: function () { return
|
|
360
|
+
get: function () { return chunkKTAEPUAE_cjs.markov; }
|
|
361
361
|
});
|
|
362
362
|
Object.defineProperty(exports, "network", {
|
|
363
363
|
enumerable: true,
|
|
364
|
-
get: function () { return
|
|
364
|
+
get: function () { return chunkKTAEPUAE_cjs.network; }
|
|
365
365
|
});
|
|
366
366
|
Object.defineProperty(exports, "parse", {
|
|
367
367
|
enumerable: true,
|
|
368
|
-
get: function () { return
|
|
368
|
+
get: function () { return chunkKTAEPUAE_cjs.parse; }
|
|
369
369
|
});
|
|
370
370
|
Object.defineProperty(exports, "parseResult", {
|
|
371
371
|
enumerable: true,
|
|
372
|
-
get: function () { return
|
|
372
|
+
get: function () { return chunkKTAEPUAE_cjs.parseResult; }
|
|
373
373
|
});
|
|
374
374
|
Object.defineProperty(exports, "pert", {
|
|
375
375
|
enumerable: true,
|
|
376
|
-
get: function () { return
|
|
376
|
+
get: function () { return chunkKTAEPUAE_cjs.pert; }
|
|
377
377
|
});
|
|
378
378
|
Object.defineProperty(exports, "petri", {
|
|
379
379
|
enumerable: true,
|
|
380
|
-
get: function () { return
|
|
380
|
+
get: function () { return chunkKTAEPUAE_cjs.petri; }
|
|
381
381
|
});
|
|
382
382
|
Object.defineProperty(exports, "pid", {
|
|
383
383
|
enumerable: true,
|
|
384
|
-
get: function () { return
|
|
384
|
+
get: function () { return chunkKTAEPUAE_cjs.pid; }
|
|
385
385
|
});
|
|
386
386
|
Object.defineProperty(exports, "playbook", {
|
|
387
387
|
enumerable: true,
|
|
388
|
-
get: function () { return
|
|
388
|
+
get: function () { return chunkKTAEPUAE_cjs.playbook; }
|
|
389
389
|
});
|
|
390
390
|
Object.defineProperty(exports, "prisma", {
|
|
391
391
|
enumerable: true,
|
|
392
|
-
get: function () { return
|
|
392
|
+
get: function () { return chunkKTAEPUAE_cjs.prisma; }
|
|
393
393
|
});
|
|
394
394
|
Object.defineProperty(exports, "rbd", {
|
|
395
395
|
enumerable: true,
|
|
396
|
-
get: function () { return
|
|
396
|
+
get: function () { return chunkKTAEPUAE_cjs.rbd; }
|
|
397
397
|
});
|
|
398
398
|
Object.defineProperty(exports, "render", {
|
|
399
399
|
enumerable: true,
|
|
400
|
-
get: function () { return
|
|
400
|
+
get: function () { return chunkKTAEPUAE_cjs.render; }
|
|
401
401
|
});
|
|
402
402
|
Object.defineProperty(exports, "renderPreview", {
|
|
403
403
|
enumerable: true,
|
|
404
|
-
get: function () { return
|
|
404
|
+
get: function () { return chunkKTAEPUAE_cjs.renderPreview; }
|
|
405
405
|
});
|
|
406
406
|
Object.defineProperty(exports, "renderResult", {
|
|
407
407
|
enumerable: true,
|
|
408
|
-
get: function () { return
|
|
408
|
+
get: function () { return chunkKTAEPUAE_cjs.renderResult; }
|
|
409
409
|
});
|
|
410
410
|
Object.defineProperty(exports, "sequence", {
|
|
411
411
|
enumerable: true,
|
|
412
|
-
get: function () { return
|
|
412
|
+
get: function () { return chunkKTAEPUAE_cjs.sequence; }
|
|
413
413
|
});
|
|
414
414
|
Object.defineProperty(exports, "state", {
|
|
415
415
|
enumerable: true,
|
|
416
|
-
get: function () { return
|
|
416
|
+
get: function () { return chunkKTAEPUAE_cjs.state; }
|
|
417
417
|
});
|
|
418
418
|
Object.defineProperty(exports, "threatmodel", {
|
|
419
419
|
enumerable: true,
|
|
420
|
-
get: function () { return
|
|
420
|
+
get: function () { return chunkKTAEPUAE_cjs.threatmodel; }
|
|
421
421
|
});
|
|
422
422
|
Object.defineProperty(exports, "timeline", {
|
|
423
423
|
enumerable: true,
|
|
424
|
-
get: function () { return
|
|
424
|
+
get: function () { return chunkKTAEPUAE_cjs.timeline; }
|
|
425
425
|
});
|
|
426
426
|
Object.defineProperty(exports, "umlclass", {
|
|
427
427
|
enumerable: true,
|
|
428
|
-
get: function () { return
|
|
428
|
+
get: function () { return chunkKTAEPUAE_cjs.umlclass; }
|
|
429
429
|
});
|
|
430
430
|
Object.defineProperty(exports, "usecase", {
|
|
431
431
|
enumerable: true,
|
|
432
|
-
get: function () { return
|
|
432
|
+
get: function () { return chunkKTAEPUAE_cjs.usecase; }
|
|
433
433
|
});
|
|
434
434
|
Object.defineProperty(exports, "welding", {
|
|
435
435
|
enumerable: true,
|
|
436
|
-
get: function () { return
|
|
436
|
+
get: function () { return chunkKTAEPUAE_cjs.welding; }
|
|
437
437
|
});
|
|
438
438
|
Object.defineProperty(exports, "orgchart", {
|
|
439
439
|
enumerable: true,
|
|
@@ -445,7 +445,7 @@ Object.defineProperty(exports, "siteplan", {
|
|
|
445
445
|
});
|
|
446
446
|
Object.defineProperty(exports, "circuit", {
|
|
447
447
|
enumerable: true,
|
|
448
|
-
get: function () { return
|
|
448
|
+
get: function () { return chunk24YHD4YI_cjs.circuit; }
|
|
449
449
|
});
|
|
450
450
|
Object.defineProperty(exports, "blockdiagram", {
|
|
451
451
|
enumerable: true,
|
|
@@ -453,11 +453,11 @@ Object.defineProperty(exports, "blockdiagram", {
|
|
|
453
453
|
});
|
|
454
454
|
Object.defineProperty(exports, "ladder", {
|
|
455
455
|
enumerable: true,
|
|
456
|
-
get: function () { return
|
|
456
|
+
get: function () { return chunkUS4QZ7J7_cjs.ladder; }
|
|
457
457
|
});
|
|
458
458
|
Object.defineProperty(exports, "sld", {
|
|
459
459
|
enumerable: true,
|
|
460
|
-
get: function () { return
|
|
460
|
+
get: function () { return chunkAWUUGDN4_cjs.sld; }
|
|
461
461
|
});
|
|
462
462
|
Object.defineProperty(exports, "entity", {
|
|
463
463
|
enumerable: true,
|
|
@@ -465,7 +465,7 @@ Object.defineProperty(exports, "entity", {
|
|
|
465
465
|
});
|
|
466
466
|
Object.defineProperty(exports, "fishbone", {
|
|
467
467
|
enumerable: true,
|
|
468
|
-
get: function () { return
|
|
468
|
+
get: function () { return chunkAQENURKO_cjs.fishbone; }
|
|
469
469
|
});
|
|
470
470
|
Object.defineProperty(exports, "venn", {
|
|
471
471
|
enumerable: true,
|
|
@@ -473,19 +473,19 @@ Object.defineProperty(exports, "venn", {
|
|
|
473
473
|
});
|
|
474
474
|
Object.defineProperty(exports, "flowchart", {
|
|
475
475
|
enumerable: true,
|
|
476
|
-
get: function () { return
|
|
476
|
+
get: function () { return chunkTIHHISCK_cjs.flowchart; }
|
|
477
477
|
});
|
|
478
478
|
Object.defineProperty(exports, "genogram", {
|
|
479
479
|
enumerable: true,
|
|
480
|
-
get: function () { return
|
|
480
|
+
get: function () { return chunkCYBBBBMZ_cjs.genogram; }
|
|
481
481
|
});
|
|
482
482
|
Object.defineProperty(exports, "ecomap", {
|
|
483
483
|
enumerable: true,
|
|
484
|
-
get: function () { return
|
|
484
|
+
get: function () { return chunkF3JYKM6M_cjs.ecomap; }
|
|
485
485
|
});
|
|
486
486
|
Object.defineProperty(exports, "pedigree", {
|
|
487
487
|
enumerable: true,
|
|
488
|
-
get: function () { return
|
|
488
|
+
get: function () { return chunk7DQXFTA7_cjs.pedigree; }
|
|
489
489
|
});
|
|
490
490
|
Object.defineProperty(exports, "phylo", {
|
|
491
491
|
enumerable: true,
|
package/dist/index.js
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { FLOORPLAN_SYMBOLS, iconSize, drawDeviceIcon, GEOMETRY, renderEquip } from './chunk-
|
|
2
|
-
export { bowtie, causalloop, comparison, decisiontree, epc, eventtree, faulttree, floorplan, fmea, gitgraph, idef0, markov, network, parse, parseResult, pert, petri, pid, playbook, prisma, rbd, render, renderPreview, renderResult, sequence, state, threatmodel, timeline, umlclass, usecase, welding } from './chunk-
|
|
1
|
+
import { FLOORPLAN_SYMBOLS, iconSize, drawDeviceIcon, GEOMETRY, renderEquip } from './chunk-WPNMVV3U.js';
|
|
2
|
+
export { bowtie, causalloop, comparison, decisiontree, epc, eventtree, faulttree, floorplan, fmea, gitgraph, idef0, markov, network, parse, parseResult, pert, petri, pid, playbook, prisma, rbd, render, renderPreview, renderResult, sequence, state, threatmodel, timeline, umlclass, usecase, welding } from './chunk-WPNMVV3U.js';
|
|
3
3
|
export { orgchart } from './chunk-EB7T5SEO.js';
|
|
4
4
|
export { siteplan } from './chunk-PGMKMIGM.js';
|
|
5
|
-
import { EXTRA_SYMBOLS, SYMBOLS } from './chunk-
|
|
6
|
-
export { circuit } from './chunk-
|
|
5
|
+
import { EXTRA_SYMBOLS, SYMBOLS } from './chunk-37WDY4G4.js';
|
|
6
|
+
export { circuit } from './chunk-37WDY4G4.js';
|
|
7
7
|
export { blockdiagram } from './chunk-P4U565XH.js';
|
|
8
|
-
export { ladder } from './chunk-
|
|
9
|
-
import { renderSymbol, geometryFor } from './chunk-
|
|
10
|
-
export { sld } from './chunk-
|
|
8
|
+
export { ladder } from './chunk-I7UYVCKH.js';
|
|
9
|
+
import { renderSymbol, geometryFor } from './chunk-6GVFKOSH.js';
|
|
10
|
+
export { sld } from './chunk-6GVFKOSH.js';
|
|
11
11
|
export { entity } from './chunk-2IRYXK4M.js';
|
|
12
|
-
export { fishbone } from './chunk-
|
|
12
|
+
export { fishbone } from './chunk-2ZHP4TXP.js';
|
|
13
13
|
export { venn } from './chunk-KUSW5I2P.js';
|
|
14
|
-
import { iconNames, renderIcon } from './chunk-
|
|
15
|
-
export { flowchart } from './chunk-
|
|
16
|
-
export { genogram } from './chunk-
|
|
17
|
-
export { ecomap } from './chunk-
|
|
18
|
-
export { pedigree } from './chunk-
|
|
19
|
-
import './chunk-
|
|
14
|
+
import { iconNames, renderIcon } from './chunk-BGFKTJBZ.js';
|
|
15
|
+
export { flowchart } from './chunk-BGFKTJBZ.js';
|
|
16
|
+
export { genogram } from './chunk-KWY52MLQ.js';
|
|
17
|
+
export { ecomap } from './chunk-HZTHSNUN.js';
|
|
18
|
+
export { pedigree } from './chunk-ITNCO3MZ.js';
|
|
19
|
+
import './chunk-6KRSBSNT.js';
|
|
20
20
|
export { phylo } from './chunk-QMJHLDGY.js';
|
|
21
21
|
export { sociogram } from './chunk-7NO5LYLL.js';
|
|
22
22
|
import './chunk-FO7BLCEW.js';
|
package/dist/react.cjs
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkKTAEPUAE_cjs = require('./chunk-KTAEPUAE.cjs');
|
|
4
4
|
require('./chunk-UHRNFBWY.cjs');
|
|
5
5
|
require('./chunk-IBZKIMT5.cjs');
|
|
6
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-24YHD4YI.cjs');
|
|
7
7
|
require('./chunk-T55OQILI.cjs');
|
|
8
|
-
require('./chunk-
|
|
9
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-US4QZ7J7.cjs');
|
|
9
|
+
require('./chunk-AWUUGDN4.cjs');
|
|
10
10
|
require('./chunk-4MANMKQ4.cjs');
|
|
11
|
-
require('./chunk-
|
|
11
|
+
require('./chunk-AQENURKO.cjs');
|
|
12
12
|
require('./chunk-3JN4762U.cjs');
|
|
13
|
-
require('./chunk-
|
|
14
|
-
require('./chunk-
|
|
15
|
-
require('./chunk-
|
|
16
|
-
require('./chunk-
|
|
17
|
-
require('./chunk-
|
|
13
|
+
require('./chunk-TIHHISCK.cjs');
|
|
14
|
+
require('./chunk-CYBBBBMZ.cjs');
|
|
15
|
+
require('./chunk-F3JYKM6M.cjs');
|
|
16
|
+
require('./chunk-7DQXFTA7.cjs');
|
|
17
|
+
require('./chunk-3TGOOZ36.cjs');
|
|
18
18
|
require('./chunk-TFUVNQNA.cjs');
|
|
19
19
|
require('./chunk-KYE7CRED.cjs');
|
|
20
20
|
require('./chunk-5UCXMYE7.cjs');
|
|
@@ -38,7 +38,7 @@ function SchematexDiagram({
|
|
|
38
38
|
onError
|
|
39
39
|
}) {
|
|
40
40
|
const svg = react.useMemo(() => {
|
|
41
|
-
const result =
|
|
41
|
+
const result = chunkKTAEPUAE_cjs.renderResult(dsl, { type, theme, fontFamily, padding });
|
|
42
42
|
if (!result.ok) {
|
|
43
43
|
onError?.(new Error(result.diagnostics[0]?.message ?? "Schematex render failed"));
|
|
44
44
|
}
|
package/dist/react.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { renderResult } from './chunk-
|
|
1
|
+
import { renderResult } from './chunk-WPNMVV3U.js';
|
|
2
2
|
import './chunk-EB7T5SEO.js';
|
|
3
3
|
import './chunk-PGMKMIGM.js';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-37WDY4G4.js';
|
|
5
5
|
import './chunk-P4U565XH.js';
|
|
6
|
-
import './chunk-
|
|
7
|
-
import './chunk-
|
|
6
|
+
import './chunk-I7UYVCKH.js';
|
|
7
|
+
import './chunk-6GVFKOSH.js';
|
|
8
8
|
import './chunk-2IRYXK4M.js';
|
|
9
|
-
import './chunk-
|
|
9
|
+
import './chunk-2ZHP4TXP.js';
|
|
10
10
|
import './chunk-KUSW5I2P.js';
|
|
11
|
-
import './chunk-
|
|
12
|
-
import './chunk-
|
|
13
|
-
import './chunk-
|
|
14
|
-
import './chunk-
|
|
15
|
-
import './chunk-
|
|
11
|
+
import './chunk-BGFKTJBZ.js';
|
|
12
|
+
import './chunk-KWY52MLQ.js';
|
|
13
|
+
import './chunk-HZTHSNUN.js';
|
|
14
|
+
import './chunk-ITNCO3MZ.js';
|
|
15
|
+
import './chunk-6KRSBSNT.js';
|
|
16
16
|
import './chunk-QMJHLDGY.js';
|
|
17
17
|
import './chunk-7NO5LYLL.js';
|
|
18
18
|
import './chunk-FO7BLCEW.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "schematex",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.13",
|
|
4
4
|
"description": "Every diagram a doctor, engineer, or lawyer would actually use. 36 industry-standard diagrams (genogram, pedigree, ladder logic, SLD, FBD, SFC, P&ID, UML class, UML use case, UML sequence, fault tree, bowtie, PRISMA, phylo, fishbone, entity structure, ...) from a text DSL. Free, fully open source, made for AI. Pure SVG, zero dependencies.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/core/dsl-preprocess.ts"],"names":[],"mappings":";AAoCA,IAAM,iBAAA,GAAoB,YAAA;AAWnB,SAAS,iBAAiB,IAAA,EAA8B;AAC7D,EAAA,MAAM,KAAA,GAAQ,IAAA,CAAK,KAAA,CAAM,OAAO,CAAA;AAChC,EAAA,IAAI,CAAA,GAAI,CAAA;AACR,EAAA,OAAO,CAAA,GAAI,MAAM,MAAA,IAAU,KAAA,CAAM,CAAC,CAAA,CAAG,IAAA,OAAW,EAAA,EAAI,CAAA,EAAA;AACpD,EAAA,IAAI,CAAA,IAAK,MAAM,MAAA,IAAU,CAAC,kBAAkB,IAAA,CAAK,KAAA,CAAM,CAAC,CAAE,CAAA,EAAG;AAC3D,IAAA,OAAO,EAAE,IAAA,EAAM,EAAC,EAAG,MAAM,IAAA,EAAK;AAAA,EAChC;AACA,EAAA,MAAM,OAAA,GAAU,CAAA;AAChB,EAAA,CAAA,EAAA;AACA,EAAA,MAAM,OAA+B,EAAC;AACtC,EAAA,OAAO,CAAA,GAAI,MAAM,MAAA,IAAU,CAAC,kBAAkB,IAAA,CAAK,KAAA,CAAM,CAAC,CAAE,CAAA,EAAG;AAC7D,IAAA,MAAM,IAAA,GAAO,MAAM,CAAC,CAAA;AACpB,IAAA,MAAM,OAAA,GAAU,KAAK,IAAA,EAAK;AAC1B,IAAA,IAAI,OAAA,KAAY,EAAA,IAAM,OAAA,CAAQ,UAAA,CAAW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"chunk-2KTQ75LN.js","sourcesContent":["/**\n * DSL preprocessing shared across all diagram parsers.\n *\n * Two cross-cutting Mermaid-compat features are normalized here so each\n * per-diagram parser sees a consistent surface:\n *\n * 1. **Frontmatter** — Mermaid allows a YAML-style block at the top of\n * the input:\n *\n * ---\n * title: My diagram\n * ---\n * flowchart TD\n * ...\n *\n * We strip the block before the parser runs and return the parsed\n * keys as a metadata bag. Parsers that already accept an inline title\n * (`flowchart TD \"...\"`, `genogram \"...\"`) can merge the frontmatter\n * title in if no inline one was provided.\n *\n * 2. **Comments** — different parsers historically supported different\n * comment markers (`#`, `//`, Mermaid's `%%`). {@link stripLineComment}\n * strips all three, respecting double-quoted regions so URLs with `//`\n * and CSS-style values containing `#` don't get truncated.\n *\n * Both helpers are intentionally narrow: they only do what every parser\n * needs. Diagram-specific lexing stays in each parser.\n */\n\nexport interface DslFrontmatter {\n /** Parsed key/value pairs from the `---` block. Empty if no block found. */\n data: Record<string, string>;\n /** Input with the frontmatter block removed, ready for the diagram parser. */\n body: string;\n}\n\nconst FRONTMATTER_DELIM = /^-{3,}\\s*$/;\n\n/**\n * Strip a Mermaid-style YAML frontmatter block from the start of `text`.\n *\n * Accepts any whitespace-only or blank lines before the opening `---`. The\n * parser is deliberately tiny: one `key: value` per line, no nesting, no\n * quoted/multiline values. Anything fancier we treat as \"not a frontmatter\n * block\" and return the original text unchanged — better to no-op than\n * to silently swallow malformed YAML.\n */\nexport function parseFrontmatter(text: string): DslFrontmatter {\n const lines = text.split(/\\r?\\n/);\n let i = 0;\n while (i < lines.length && lines[i]!.trim() === \"\") i++;\n if (i >= lines.length || !FRONTMATTER_DELIM.test(lines[i]!)) {\n return { data: {}, body: text };\n }\n const openIdx = i;\n i++;\n const data: Record<string, string> = {};\n while (i < lines.length && !FRONTMATTER_DELIM.test(lines[i]!)) {\n const line = lines[i]!;\n const trimmed = line.trim();\n if (trimmed === \"\" || trimmed.startsWith(\"#\")) {\n i++;\n continue;\n }\n const colonIdx = trimmed.indexOf(\":\");\n if (colonIdx <= 0) {\n // Malformed line inside the block — bail out, treat the whole thing\n // as not-a-frontmatter so the user sees their original input back.\n return { data: {}, body: text };\n }\n const key = trimmed.slice(0, colonIdx).trim();\n let value = trimmed.slice(colonIdx + 1).trim();\n // Strip matching surrounding quotes (single, double, or smart) without\n // pulling in the full quotes.ts helpers — frontmatter values are dumb.\n if (\n value.length >= 2 &&\n ((value.startsWith('\"') && value.endsWith('\"')) ||\n (value.startsWith(\"'\") && value.endsWith(\"'\")) ||\n (value.startsWith(\"“\") && value.endsWith(\"”\")))\n ) {\n value = value.slice(1, -1);\n }\n data[key] = value;\n i++;\n }\n if (i >= lines.length) {\n // Opened a `---` block but never closed it — leave input untouched.\n return { data: {}, body: text };\n }\n // i now points at the closing `---`; body starts on the next line.\n const body = lines.slice(i + 1).join(\"\\n\");\n // If we found an opening delim but the body is empty and data is empty,\n // it was probably just a separator someone typed. Return raw text.\n if (Object.keys(data).length === 0 && openIdx === 0) {\n return { data: {}, body: text };\n }\n return { data, body };\n}\n\n/**\n * Strip an inline comment from a line.\n *\n * Recognized markers (in order of precedence):\n * - `%%` — Mermaid's comment style\n * - `//` — C-style line comment\n * - `#` — shell/python style\n *\n * Markers inside ASCII double-quoted regions are preserved verbatim so URLs\n * (`\"https://...\"`) and CSS-color values (`\"#ff0\"`) survive. Smart-quoted\n * regions are NOT special-cased — they're rare inside attribute strings,\n * and the cost of full Unicode quote tracking for every line isn't worth\n * the protection.\n */\nexport function stripLineComment(line: string): string {\n let inQuote = false;\n for (let i = 0; i < line.length; i++) {\n const ch = line[i]!;\n if (ch === '\"') {\n // Respect a backslash escape so `\"foo\\\"\"` stays inside the quote.\n if (i > 0 && line[i - 1] === \"\\\\\") continue;\n inQuote = !inQuote;\n continue;\n }\n if (inQuote) continue;\n if (ch === \"%\" && line[i + 1] === \"%\") return line.slice(0, i);\n if (ch === \"/\" && line[i + 1] === \"/\") return line.slice(0, i);\n if (ch === \"#\") return line.slice(0, i);\n }\n return line;\n}\n\n/** Returns true if the trimmed line is blank or a pure comment. */\nexport function isBlankOrComment(line: string): boolean {\n return stripLineComment(line).trim() === \"\";\n}\n\n/** Return the first non-blank, non-comment line after comment stripping. */\nexport function firstContentLine(text: string): string | undefined {\n for (const raw of text.split(/\\r?\\n/)) {\n const line = stripLineComment(raw).trim();\n if (line !== \"\") return line;\n }\n return undefined;\n}\n"]}
|