schematex 0.9.5 → 0.9.7
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 +19 -0
- package/dist/ai/ai-sdk.cjs +7 -7
- package/dist/ai/ai-sdk.js +2 -2
- package/dist/ai/index.cjs +16 -16
- package/dist/ai/index.js +3 -3
- package/dist/browser.cjs +8 -8
- package/dist/browser.js +2 -2
- package/dist/{chunk-LMNWUZMD.js → chunk-3K4WCRVI.js} +560 -88
- package/dist/chunk-3K4WCRVI.js.map +1 -0
- package/dist/{chunk-Q7CWX6HA.cjs → chunk-6X7MVZZT.cjs} +560 -88
- package/dist/chunk-6X7MVZZT.cjs.map +1 -0
- package/dist/{chunk-N524SY5D.js → chunk-DVRB64CN.js} +114 -19
- package/dist/chunk-DVRB64CN.js.map +1 -0
- package/dist/{chunk-7EWP4OD7.cjs → chunk-ECHPMEZX.cjs} +116 -21
- package/dist/chunk-ECHPMEZX.cjs.map +1 -0
- package/dist/index.cjs +34 -34
- package/dist/index.js +2 -2
- package/dist/react.cjs +2 -2
- package/dist/react.js +1 -1
- package/package.json +3 -1
- package/dist/chunk-7EWP4OD7.cjs.map +0 -1
- package/dist/chunk-LMNWUZMD.js.map +0 -1
- package/dist/chunk-N524SY5D.js.map +0 -1
- package/dist/chunk-Q7CWX6HA.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk6X7MVZZT_cjs = require('./chunk-6X7MVZZT.cjs');
|
|
4
4
|
var chunk4OC3CTGE_cjs = require('./chunk-4OC3CTGE.cjs');
|
|
5
5
|
var chunk4AC6I7KJ_cjs = require('./chunk-4AC6I7KJ.cjs');
|
|
6
6
|
var chunkC4Y24X3U_cjs = require('./chunk-C4Y24X3U.cjs');
|
|
@@ -111,10 +111,10 @@ var PID_CSS = ".lt-pid-equip{fill:#ffffff;stroke:#1d1d1d;stroke-width:1.6}.lt-pi
|
|
|
111
111
|
function pidCatalog() {
|
|
112
112
|
const out = [];
|
|
113
113
|
const pad = 12;
|
|
114
|
-
for (const [id, g] of Object.entries(
|
|
114
|
+
for (const [id, g] of Object.entries(chunk6X7MVZZT_cjs.GEOMETRY)) {
|
|
115
115
|
let inner;
|
|
116
116
|
try {
|
|
117
|
-
inner =
|
|
117
|
+
inner = chunk6X7MVZZT_cjs.renderEquip(id, "");
|
|
118
118
|
} catch {
|
|
119
119
|
continue;
|
|
120
120
|
}
|
|
@@ -224,11 +224,11 @@ var NETWORK_KINDS = [
|
|
|
224
224
|
function networkCatalog() {
|
|
225
225
|
const out = [];
|
|
226
226
|
for (const kind of NETWORK_KINDS) {
|
|
227
|
-
const { w, h } =
|
|
227
|
+
const { w, h } = chunk6X7MVZZT_cjs.iconSize(kind);
|
|
228
228
|
const device = { id: kind, kind, label: humanize(kind), groups: [] };
|
|
229
229
|
let inner;
|
|
230
230
|
try {
|
|
231
|
-
inner =
|
|
231
|
+
inner = chunk6X7MVZZT_cjs.drawDeviceIcon(device, { x: 0, y: 0, w, h });
|
|
232
232
|
} catch {
|
|
233
233
|
continue;
|
|
234
234
|
}
|
|
@@ -245,7 +245,7 @@ function floorplanCatalog() {
|
|
|
245
245
|
const scale = 40;
|
|
246
246
|
const px = (m) => Math.round(m * scale * 100) / 100;
|
|
247
247
|
const out = [];
|
|
248
|
-
for (const [id, def] of Object.entries(
|
|
248
|
+
for (const [id, def] of Object.entries(chunk6X7MVZZT_cjs.FLOORPLAN_SYMBOLS)) {
|
|
249
249
|
const [mt, mr, mb, ml] = def.envelope ?? [0, 0, 0, 0];
|
|
250
250
|
const pad = 5;
|
|
251
251
|
const x0 = -px(ml) - pad;
|
|
@@ -312,115 +312,115 @@ function getSymbolCatalog(type) {
|
|
|
312
312
|
|
|
313
313
|
Object.defineProperty(exports, "bowtie", {
|
|
314
314
|
enumerable: true,
|
|
315
|
-
get: function () { return
|
|
315
|
+
get: function () { return chunk6X7MVZZT_cjs.bowtie; }
|
|
316
316
|
});
|
|
317
317
|
Object.defineProperty(exports, "causalloop", {
|
|
318
318
|
enumerable: true,
|
|
319
|
-
get: function () { return
|
|
319
|
+
get: function () { return chunk6X7MVZZT_cjs.causalloop; }
|
|
320
320
|
});
|
|
321
321
|
Object.defineProperty(exports, "decisiontree", {
|
|
322
322
|
enumerable: true,
|
|
323
|
-
get: function () { return
|
|
323
|
+
get: function () { return chunk6X7MVZZT_cjs.decisiontree; }
|
|
324
324
|
});
|
|
325
325
|
Object.defineProperty(exports, "epc", {
|
|
326
326
|
enumerable: true,
|
|
327
|
-
get: function () { return
|
|
327
|
+
get: function () { return chunk6X7MVZZT_cjs.epc; }
|
|
328
328
|
});
|
|
329
329
|
Object.defineProperty(exports, "eventtree", {
|
|
330
330
|
enumerable: true,
|
|
331
|
-
get: function () { return
|
|
331
|
+
get: function () { return chunk6X7MVZZT_cjs.eventtree; }
|
|
332
332
|
});
|
|
333
333
|
Object.defineProperty(exports, "faulttree", {
|
|
334
334
|
enumerable: true,
|
|
335
|
-
get: function () { return
|
|
335
|
+
get: function () { return chunk6X7MVZZT_cjs.faulttree; }
|
|
336
336
|
});
|
|
337
337
|
Object.defineProperty(exports, "fmea", {
|
|
338
338
|
enumerable: true,
|
|
339
|
-
get: function () { return
|
|
339
|
+
get: function () { return chunk6X7MVZZT_cjs.fmea; }
|
|
340
340
|
});
|
|
341
341
|
Object.defineProperty(exports, "gitgraph", {
|
|
342
342
|
enumerable: true,
|
|
343
|
-
get: function () { return
|
|
343
|
+
get: function () { return chunk6X7MVZZT_cjs.gitgraph; }
|
|
344
344
|
});
|
|
345
345
|
Object.defineProperty(exports, "idef0", {
|
|
346
346
|
enumerable: true,
|
|
347
|
-
get: function () { return
|
|
347
|
+
get: function () { return chunk6X7MVZZT_cjs.idef0; }
|
|
348
348
|
});
|
|
349
349
|
Object.defineProperty(exports, "markov", {
|
|
350
350
|
enumerable: true,
|
|
351
|
-
get: function () { return
|
|
351
|
+
get: function () { return chunk6X7MVZZT_cjs.markov; }
|
|
352
352
|
});
|
|
353
353
|
Object.defineProperty(exports, "network", {
|
|
354
354
|
enumerable: true,
|
|
355
|
-
get: function () { return
|
|
355
|
+
get: function () { return chunk6X7MVZZT_cjs.network; }
|
|
356
356
|
});
|
|
357
357
|
Object.defineProperty(exports, "parse", {
|
|
358
358
|
enumerable: true,
|
|
359
|
-
get: function () { return
|
|
359
|
+
get: function () { return chunk6X7MVZZT_cjs.parse; }
|
|
360
360
|
});
|
|
361
361
|
Object.defineProperty(exports, "parseResult", {
|
|
362
362
|
enumerable: true,
|
|
363
|
-
get: function () { return
|
|
363
|
+
get: function () { return chunk6X7MVZZT_cjs.parseResult; }
|
|
364
364
|
});
|
|
365
365
|
Object.defineProperty(exports, "pert", {
|
|
366
366
|
enumerable: true,
|
|
367
|
-
get: function () { return
|
|
367
|
+
get: function () { return chunk6X7MVZZT_cjs.pert; }
|
|
368
368
|
});
|
|
369
369
|
Object.defineProperty(exports, "petri", {
|
|
370
370
|
enumerable: true,
|
|
371
|
-
get: function () { return
|
|
371
|
+
get: function () { return chunk6X7MVZZT_cjs.petri; }
|
|
372
372
|
});
|
|
373
373
|
Object.defineProperty(exports, "pid", {
|
|
374
374
|
enumerable: true,
|
|
375
|
-
get: function () { return
|
|
375
|
+
get: function () { return chunk6X7MVZZT_cjs.pid; }
|
|
376
376
|
});
|
|
377
377
|
Object.defineProperty(exports, "prisma", {
|
|
378
378
|
enumerable: true,
|
|
379
|
-
get: function () { return
|
|
379
|
+
get: function () { return chunk6X7MVZZT_cjs.prisma; }
|
|
380
380
|
});
|
|
381
381
|
Object.defineProperty(exports, "rbd", {
|
|
382
382
|
enumerable: true,
|
|
383
|
-
get: function () { return
|
|
383
|
+
get: function () { return chunk6X7MVZZT_cjs.rbd; }
|
|
384
384
|
});
|
|
385
385
|
Object.defineProperty(exports, "render", {
|
|
386
386
|
enumerable: true,
|
|
387
|
-
get: function () { return
|
|
387
|
+
get: function () { return chunk6X7MVZZT_cjs.render; }
|
|
388
388
|
});
|
|
389
389
|
Object.defineProperty(exports, "renderPreview", {
|
|
390
390
|
enumerable: true,
|
|
391
|
-
get: function () { return
|
|
391
|
+
get: function () { return chunk6X7MVZZT_cjs.renderPreview; }
|
|
392
392
|
});
|
|
393
393
|
Object.defineProperty(exports, "renderResult", {
|
|
394
394
|
enumerable: true,
|
|
395
|
-
get: function () { return
|
|
395
|
+
get: function () { return chunk6X7MVZZT_cjs.renderResult; }
|
|
396
396
|
});
|
|
397
397
|
Object.defineProperty(exports, "sequence", {
|
|
398
398
|
enumerable: true,
|
|
399
|
-
get: function () { return
|
|
399
|
+
get: function () { return chunk6X7MVZZT_cjs.sequence; }
|
|
400
400
|
});
|
|
401
401
|
Object.defineProperty(exports, "state", {
|
|
402
402
|
enumerable: true,
|
|
403
|
-
get: function () { return
|
|
403
|
+
get: function () { return chunk6X7MVZZT_cjs.state; }
|
|
404
404
|
});
|
|
405
405
|
Object.defineProperty(exports, "threatmodel", {
|
|
406
406
|
enumerable: true,
|
|
407
|
-
get: function () { return
|
|
407
|
+
get: function () { return chunk6X7MVZZT_cjs.threatmodel; }
|
|
408
408
|
});
|
|
409
409
|
Object.defineProperty(exports, "timeline", {
|
|
410
410
|
enumerable: true,
|
|
411
|
-
get: function () { return
|
|
411
|
+
get: function () { return chunk6X7MVZZT_cjs.timeline; }
|
|
412
412
|
});
|
|
413
413
|
Object.defineProperty(exports, "umlclass", {
|
|
414
414
|
enumerable: true,
|
|
415
|
-
get: function () { return
|
|
415
|
+
get: function () { return chunk6X7MVZZT_cjs.umlclass; }
|
|
416
416
|
});
|
|
417
417
|
Object.defineProperty(exports, "usecase", {
|
|
418
418
|
enumerable: true,
|
|
419
|
-
get: function () { return
|
|
419
|
+
get: function () { return chunk6X7MVZZT_cjs.usecase; }
|
|
420
420
|
});
|
|
421
421
|
Object.defineProperty(exports, "welding", {
|
|
422
422
|
enumerable: true,
|
|
423
|
-
get: function () { return
|
|
423
|
+
get: function () { return chunk6X7MVZZT_cjs.welding; }
|
|
424
424
|
});
|
|
425
425
|
Object.defineProperty(exports, "orgchart", {
|
|
426
426
|
enumerable: true,
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { FLOORPLAN_SYMBOLS, iconSize, drawDeviceIcon, GEOMETRY, renderEquip } from './chunk-
|
|
2
|
-
export { bowtie, causalloop, decisiontree, epc, eventtree, faulttree, fmea, gitgraph, idef0, markov, network, parse, parseResult, pert, petri, pid, prisma, rbd, render, renderPreview, renderResult, sequence, state, threatmodel, timeline, umlclass, usecase, welding } from './chunk-
|
|
1
|
+
import { FLOORPLAN_SYMBOLS, iconSize, drawDeviceIcon, GEOMETRY, renderEquip } from './chunk-3K4WCRVI.js';
|
|
2
|
+
export { bowtie, causalloop, decisiontree, epc, eventtree, faulttree, fmea, gitgraph, idef0, markov, network, parse, parseResult, pert, petri, pid, prisma, rbd, render, renderPreview, renderResult, sequence, state, threatmodel, timeline, umlclass, usecase, welding } from './chunk-3K4WCRVI.js';
|
|
3
3
|
export { orgchart } from './chunk-3J4DZPZC.js';
|
|
4
4
|
import { EXTRA_SYMBOLS, SYMBOLS } from './chunk-RDYACU2G.js';
|
|
5
5
|
export { circuit } from './chunk-RDYACU2G.js';
|
package/dist/react.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk6X7MVZZT_cjs = require('./chunk-6X7MVZZT.cjs');
|
|
4
4
|
require('./chunk-4OC3CTGE.cjs');
|
|
5
5
|
require('./chunk-4AC6I7KJ.cjs');
|
|
6
6
|
require('./chunk-C4Y24X3U.cjs');
|
|
@@ -37,7 +37,7 @@ function SchematexDiagram({
|
|
|
37
37
|
onError
|
|
38
38
|
}) {
|
|
39
39
|
const svg = react.useMemo(() => {
|
|
40
|
-
const result =
|
|
40
|
+
const result = chunk6X7MVZZT_cjs.renderResult(dsl, { type, theme, fontFamily, padding });
|
|
41
41
|
if (!result.ok) {
|
|
42
42
|
onError?.(new Error(result.diagnostics[0]?.message ?? "Schematex render failed"));
|
|
43
43
|
}
|
package/dist/react.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "schematex",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.7",
|
|
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",
|
|
@@ -132,6 +132,8 @@
|
|
|
132
132
|
"lint": "eslint src/",
|
|
133
133
|
"typecheck": "npm run build:ai && tsc --noEmit",
|
|
134
134
|
"validate:examples": "npm run build && node scripts/validate-examples.mjs",
|
|
135
|
+
"gallery": "node scripts/generate-gallery-svgs.mjs",
|
|
136
|
+
"gallery:check": "node scripts/generate-gallery-svgs.mjs && git diff --exit-code -- examples/",
|
|
135
137
|
"prepublishOnly": "npm run build && npm run typecheck"
|
|
136
138
|
},
|
|
137
139
|
"keywords": [
|