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/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkQ7CWX6HA_cjs = require('./chunk-Q7CWX6HA.cjs');
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(chunkQ7CWX6HA_cjs.GEOMETRY)) {
114
+ for (const [id, g] of Object.entries(chunk6X7MVZZT_cjs.GEOMETRY)) {
115
115
  let inner;
116
116
  try {
117
- inner = chunkQ7CWX6HA_cjs.renderEquip(id, "");
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 } = chunkQ7CWX6HA_cjs.iconSize(kind);
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 = chunkQ7CWX6HA_cjs.drawDeviceIcon(device, { x: 0, y: 0, w, h });
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(chunkQ7CWX6HA_cjs.FLOORPLAN_SYMBOLS)) {
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 chunkQ7CWX6HA_cjs.bowtie; }
315
+ get: function () { return chunk6X7MVZZT_cjs.bowtie; }
316
316
  });
317
317
  Object.defineProperty(exports, "causalloop", {
318
318
  enumerable: true,
319
- get: function () { return chunkQ7CWX6HA_cjs.causalloop; }
319
+ get: function () { return chunk6X7MVZZT_cjs.causalloop; }
320
320
  });
321
321
  Object.defineProperty(exports, "decisiontree", {
322
322
  enumerable: true,
323
- get: function () { return chunkQ7CWX6HA_cjs.decisiontree; }
323
+ get: function () { return chunk6X7MVZZT_cjs.decisiontree; }
324
324
  });
325
325
  Object.defineProperty(exports, "epc", {
326
326
  enumerable: true,
327
- get: function () { return chunkQ7CWX6HA_cjs.epc; }
327
+ get: function () { return chunk6X7MVZZT_cjs.epc; }
328
328
  });
329
329
  Object.defineProperty(exports, "eventtree", {
330
330
  enumerable: true,
331
- get: function () { return chunkQ7CWX6HA_cjs.eventtree; }
331
+ get: function () { return chunk6X7MVZZT_cjs.eventtree; }
332
332
  });
333
333
  Object.defineProperty(exports, "faulttree", {
334
334
  enumerable: true,
335
- get: function () { return chunkQ7CWX6HA_cjs.faulttree; }
335
+ get: function () { return chunk6X7MVZZT_cjs.faulttree; }
336
336
  });
337
337
  Object.defineProperty(exports, "fmea", {
338
338
  enumerable: true,
339
- get: function () { return chunkQ7CWX6HA_cjs.fmea; }
339
+ get: function () { return chunk6X7MVZZT_cjs.fmea; }
340
340
  });
341
341
  Object.defineProperty(exports, "gitgraph", {
342
342
  enumerable: true,
343
- get: function () { return chunkQ7CWX6HA_cjs.gitgraph; }
343
+ get: function () { return chunk6X7MVZZT_cjs.gitgraph; }
344
344
  });
345
345
  Object.defineProperty(exports, "idef0", {
346
346
  enumerable: true,
347
- get: function () { return chunkQ7CWX6HA_cjs.idef0; }
347
+ get: function () { return chunk6X7MVZZT_cjs.idef0; }
348
348
  });
349
349
  Object.defineProperty(exports, "markov", {
350
350
  enumerable: true,
351
- get: function () { return chunkQ7CWX6HA_cjs.markov; }
351
+ get: function () { return chunk6X7MVZZT_cjs.markov; }
352
352
  });
353
353
  Object.defineProperty(exports, "network", {
354
354
  enumerable: true,
355
- get: function () { return chunkQ7CWX6HA_cjs.network; }
355
+ get: function () { return chunk6X7MVZZT_cjs.network; }
356
356
  });
357
357
  Object.defineProperty(exports, "parse", {
358
358
  enumerable: true,
359
- get: function () { return chunkQ7CWX6HA_cjs.parse; }
359
+ get: function () { return chunk6X7MVZZT_cjs.parse; }
360
360
  });
361
361
  Object.defineProperty(exports, "parseResult", {
362
362
  enumerable: true,
363
- get: function () { return chunkQ7CWX6HA_cjs.parseResult; }
363
+ get: function () { return chunk6X7MVZZT_cjs.parseResult; }
364
364
  });
365
365
  Object.defineProperty(exports, "pert", {
366
366
  enumerable: true,
367
- get: function () { return chunkQ7CWX6HA_cjs.pert; }
367
+ get: function () { return chunk6X7MVZZT_cjs.pert; }
368
368
  });
369
369
  Object.defineProperty(exports, "petri", {
370
370
  enumerable: true,
371
- get: function () { return chunkQ7CWX6HA_cjs.petri; }
371
+ get: function () { return chunk6X7MVZZT_cjs.petri; }
372
372
  });
373
373
  Object.defineProperty(exports, "pid", {
374
374
  enumerable: true,
375
- get: function () { return chunkQ7CWX6HA_cjs.pid; }
375
+ get: function () { return chunk6X7MVZZT_cjs.pid; }
376
376
  });
377
377
  Object.defineProperty(exports, "prisma", {
378
378
  enumerable: true,
379
- get: function () { return chunkQ7CWX6HA_cjs.prisma; }
379
+ get: function () { return chunk6X7MVZZT_cjs.prisma; }
380
380
  });
381
381
  Object.defineProperty(exports, "rbd", {
382
382
  enumerable: true,
383
- get: function () { return chunkQ7CWX6HA_cjs.rbd; }
383
+ get: function () { return chunk6X7MVZZT_cjs.rbd; }
384
384
  });
385
385
  Object.defineProperty(exports, "render", {
386
386
  enumerable: true,
387
- get: function () { return chunkQ7CWX6HA_cjs.render; }
387
+ get: function () { return chunk6X7MVZZT_cjs.render; }
388
388
  });
389
389
  Object.defineProperty(exports, "renderPreview", {
390
390
  enumerable: true,
391
- get: function () { return chunkQ7CWX6HA_cjs.renderPreview; }
391
+ get: function () { return chunk6X7MVZZT_cjs.renderPreview; }
392
392
  });
393
393
  Object.defineProperty(exports, "renderResult", {
394
394
  enumerable: true,
395
- get: function () { return chunkQ7CWX6HA_cjs.renderResult; }
395
+ get: function () { return chunk6X7MVZZT_cjs.renderResult; }
396
396
  });
397
397
  Object.defineProperty(exports, "sequence", {
398
398
  enumerable: true,
399
- get: function () { return chunkQ7CWX6HA_cjs.sequence; }
399
+ get: function () { return chunk6X7MVZZT_cjs.sequence; }
400
400
  });
401
401
  Object.defineProperty(exports, "state", {
402
402
  enumerable: true,
403
- get: function () { return chunkQ7CWX6HA_cjs.state; }
403
+ get: function () { return chunk6X7MVZZT_cjs.state; }
404
404
  });
405
405
  Object.defineProperty(exports, "threatmodel", {
406
406
  enumerable: true,
407
- get: function () { return chunkQ7CWX6HA_cjs.threatmodel; }
407
+ get: function () { return chunk6X7MVZZT_cjs.threatmodel; }
408
408
  });
409
409
  Object.defineProperty(exports, "timeline", {
410
410
  enumerable: true,
411
- get: function () { return chunkQ7CWX6HA_cjs.timeline; }
411
+ get: function () { return chunk6X7MVZZT_cjs.timeline; }
412
412
  });
413
413
  Object.defineProperty(exports, "umlclass", {
414
414
  enumerable: true,
415
- get: function () { return chunkQ7CWX6HA_cjs.umlclass; }
415
+ get: function () { return chunk6X7MVZZT_cjs.umlclass; }
416
416
  });
417
417
  Object.defineProperty(exports, "usecase", {
418
418
  enumerable: true,
419
- get: function () { return chunkQ7CWX6HA_cjs.usecase; }
419
+ get: function () { return chunk6X7MVZZT_cjs.usecase; }
420
420
  });
421
421
  Object.defineProperty(exports, "welding", {
422
422
  enumerable: true,
423
- get: function () { return chunkQ7CWX6HA_cjs.welding; }
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-LMNWUZMD.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-LMNWUZMD.js';
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 chunkQ7CWX6HA_cjs = require('./chunk-Q7CWX6HA.cjs');
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 = chunkQ7CWX6HA_cjs.renderResult(dsl, { type, theme, fontFamily, padding });
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
@@ -1,4 +1,4 @@
1
- import { renderResult } from './chunk-LMNWUZMD.js';
1
+ import { renderResult } from './chunk-3K4WCRVI.js';
2
2
  import './chunk-3J4DZPZC.js';
3
3
  import './chunk-RDYACU2G.js';
4
4
  import './chunk-3PH2MQGN.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "schematex",
3
- "version": "0.9.5",
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": [