schematex 0.2.3 → 0.2.4

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.
Files changed (41) hide show
  1. package/dist/ai/ai-sdk.cjs +9 -9
  2. package/dist/ai/ai-sdk.js +4 -4
  3. package/dist/ai/index.cjs +12 -12
  4. package/dist/ai/index.js +4 -4
  5. package/dist/browser.cjs +6 -6
  6. package/dist/browser.js +4 -4
  7. package/dist/{chunk-MOU5QRZY.cjs → chunk-DPQYGWCT.cjs} +5 -5
  8. package/dist/{chunk-MOU5QRZY.cjs.map → chunk-DPQYGWCT.cjs.map} +1 -1
  9. package/dist/{chunk-2BM3HJSK.js → chunk-H2OEUBPO.js} +5 -3
  10. package/dist/chunk-H2OEUBPO.js.map +1 -0
  11. package/dist/{chunk-SN7NTZI6.js → chunk-J2LVOWVY.js} +171 -20
  12. package/dist/chunk-J2LVOWVY.js.map +1 -0
  13. package/dist/{chunk-6LZJTAA3.cjs → chunk-MJGDP3CS.cjs} +5 -3
  14. package/dist/chunk-MJGDP3CS.cjs.map +1 -0
  15. package/dist/{chunk-4QP37LD3.js → chunk-MR5HU5WU.js} +3 -3
  16. package/dist/{chunk-4QP37LD3.js.map → chunk-MR5HU5WU.js.map} +1 -1
  17. package/dist/{chunk-QXIGHMH2.cjs → chunk-MSYBSOU2.cjs} +6 -6
  18. package/dist/{chunk-QXIGHMH2.cjs.map → chunk-MSYBSOU2.cjs.map} +1 -1
  19. package/dist/{chunk-Z3DE6S64.cjs → chunk-UAGSCTYI.cjs} +171 -20
  20. package/dist/chunk-UAGSCTYI.cjs.map +1 -0
  21. package/dist/{chunk-S3RBKJM5.js → chunk-VPKCW4PB.js} +4 -4
  22. package/dist/{chunk-S3RBKJM5.js.map → chunk-VPKCW4PB.js.map} +1 -1
  23. package/dist/diagrams/flowchart/index.cjs +7 -7
  24. package/dist/diagrams/flowchart/index.d.cts +1 -1
  25. package/dist/diagrams/flowchart/index.d.ts +1 -1
  26. package/dist/diagrams/flowchart/index.js +1 -1
  27. package/dist/diagrams/genogram/index.cjs +8 -8
  28. package/dist/diagrams/genogram/index.js +1 -1
  29. package/dist/{index-lsSaw3E0.d.cts → index-BTZEka65.d.cts} +10 -1
  30. package/dist/{index-C97K-kuw.d.ts → index-DcU88F9i.d.ts} +10 -1
  31. package/dist/index.cjs +9 -9
  32. package/dist/index.d.cts +1 -1
  33. package/dist/index.d.ts +1 -1
  34. package/dist/index.js +3 -3
  35. package/dist/react.cjs +4 -4
  36. package/dist/react.js +3 -3
  37. package/package.json +1 -1
  38. package/dist/chunk-2BM3HJSK.js.map +0 -1
  39. package/dist/chunk-6LZJTAA3.cjs.map +0 -1
  40. package/dist/chunk-SN7NTZI6.js.map +0 -1
  41. package/dist/chunk-Z3DE6S64.cjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkZ3DE6S64_cjs = require('../../chunk-Z3DE6S64.cjs');
3
+ var chunkUAGSCTYI_cjs = require('../../chunk-UAGSCTYI.cjs');
4
4
  require('../../chunk-D7EHZFK4.cjs');
5
5
  require('../../chunk-HDKDQAEQ.cjs');
6
6
 
@@ -8,27 +8,27 @@ require('../../chunk-HDKDQAEQ.cjs');
8
8
 
9
9
  Object.defineProperty(exports, "FC_CONST", {
10
10
  enumerable: true,
11
- get: function () { return chunkZ3DE6S64_cjs.FC_CONST; }
11
+ get: function () { return chunkUAGSCTYI_cjs.FC_CONST; }
12
12
  });
13
13
  Object.defineProperty(exports, "flowchart", {
14
14
  enumerable: true,
15
- get: function () { return chunkZ3DE6S64_cjs.flowchart; }
15
+ get: function () { return chunkUAGSCTYI_cjs.flowchart; }
16
16
  });
17
17
  Object.defineProperty(exports, "layoutFlowchart", {
18
18
  enumerable: true,
19
- get: function () { return chunkZ3DE6S64_cjs.layoutFlowchart; }
19
+ get: function () { return chunkUAGSCTYI_cjs.layoutFlowchart; }
20
20
  });
21
21
  Object.defineProperty(exports, "parseFlowchart", {
22
22
  enumerable: true,
23
- get: function () { return chunkZ3DE6S64_cjs.parseFlowchart; }
23
+ get: function () { return chunkUAGSCTYI_cjs.parseFlowchart; }
24
24
  });
25
25
  Object.defineProperty(exports, "renderFlowchart", {
26
26
  enumerable: true,
27
- get: function () { return chunkZ3DE6S64_cjs.renderFlowchart; }
27
+ get: function () { return chunkUAGSCTYI_cjs.renderFlowchart; }
28
28
  });
29
29
  Object.defineProperty(exports, "renderFlowchartAST", {
30
30
  enumerable: true,
31
- get: function () { return chunkZ3DE6S64_cjs.renderFlowchartAST; }
31
+ get: function () { return chunkUAGSCTYI_cjs.renderFlowchartAST; }
32
32
  });
33
33
  //# sourceMappingURL=index.cjs.map
34
34
  //# sourceMappingURL=index.cjs.map
@@ -1,2 +1,2 @@
1
1
  import '../../types-C4LnMEcB.cjs';
2
- export { F as FC_CONST, g as flowchart, n as layoutFlowchart, p as parseFlowchart, o as renderFlowchart, q as renderFlowchartAST } from '../../index-lsSaw3E0.cjs';
2
+ export { F as FC_CONST, g as flowchart, n as layoutFlowchart, p as parseFlowchart, o as renderFlowchart, q as renderFlowchartAST } from '../../index-BTZEka65.cjs';
@@ -1,2 +1,2 @@
1
1
  import '../../types-C4LnMEcB.js';
2
- export { F as FC_CONST, g as flowchart, n as layoutFlowchart, p as parseFlowchart, o as renderFlowchart, q as renderFlowchartAST } from '../../index-C97K-kuw.js';
2
+ export { F as FC_CONST, g as flowchart, n as layoutFlowchart, p as parseFlowchart, o as renderFlowchart, q as renderFlowchartAST } from '../../index-DcU88F9i.js';
@@ -1,4 +1,4 @@
1
- export { FC_CONST, flowchart, layoutFlowchart, parseFlowchart, renderFlowchart, renderFlowchartAST } from '../../chunk-SN7NTZI6.js';
1
+ export { FC_CONST, flowchart, layoutFlowchart, parseFlowchart, renderFlowchart, renderFlowchartAST } from '../../chunk-J2LVOWVY.js';
2
2
  import '../../chunk-2VNMKOUO.js';
3
3
  import '../../chunk-KLJEK547.js';
4
4
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk6LZJTAA3_cjs = require('../../chunk-6LZJTAA3.cjs');
3
+ var chunkMJGDP3CS_cjs = require('../../chunk-MJGDP3CS.cjs');
4
4
  require('../../chunk-ULYRO2KY.cjs');
5
5
  require('../../chunk-D7EHZFK4.cjs');
6
6
  require('../../chunk-HDKDQAEQ.cjs');
@@ -9,31 +9,31 @@ require('../../chunk-HDKDQAEQ.cjs');
9
9
 
10
10
  Object.defineProperty(exports, "ParseError", {
11
11
  enumerable: true,
12
- get: function () { return chunk6LZJTAA3_cjs.ParseError; }
12
+ get: function () { return chunkMJGDP3CS_cjs.ParseError; }
13
13
  });
14
14
  Object.defineProperty(exports, "genogram", {
15
15
  enumerable: true,
16
- get: function () { return chunk6LZJTAA3_cjs.genogram; }
16
+ get: function () { return chunkMJGDP3CS_cjs.genogram; }
17
17
  });
18
18
  Object.defineProperty(exports, "getRequiredDefs", {
19
19
  enumerable: true,
20
- get: function () { return chunk6LZJTAA3_cjs.getRequiredDefs; }
20
+ get: function () { return chunkMJGDP3CS_cjs.getRequiredDefs; }
21
21
  });
22
22
  Object.defineProperty(exports, "layoutGenogram", {
23
23
  enumerable: true,
24
- get: function () { return chunk6LZJTAA3_cjs.layoutGenogram; }
24
+ get: function () { return chunkMJGDP3CS_cjs.layoutGenogram; }
25
25
  });
26
26
  Object.defineProperty(exports, "parseGenogram", {
27
27
  enumerable: true,
28
- get: function () { return chunk6LZJTAA3_cjs.parseGenogram; }
28
+ get: function () { return chunkMJGDP3CS_cjs.parseGenogram; }
29
29
  });
30
30
  Object.defineProperty(exports, "renderGenogram", {
31
31
  enumerable: true,
32
- get: function () { return chunk6LZJTAA3_cjs.renderGenogram; }
32
+ get: function () { return chunkMJGDP3CS_cjs.renderGenogram; }
33
33
  });
34
34
  Object.defineProperty(exports, "renderIndividualSymbol", {
35
35
  enumerable: true,
36
- get: function () { return chunk6LZJTAA3_cjs.renderIndividualSymbol; }
36
+ get: function () { return chunkMJGDP3CS_cjs.renderIndividualSymbol; }
37
37
  });
38
38
  //# sourceMappingURL=index.cjs.map
39
39
  //# sourceMappingURL=index.cjs.map
@@ -1,4 +1,4 @@
1
- export { ParseError, genogram, getRequiredDefs, layoutGenogram, parseGenogram, renderGenogram, renderIndividualSymbol } from '../../chunk-2BM3HJSK.js';
1
+ export { ParseError, genogram, getRequiredDefs, layoutGenogram, parseGenogram, renderGenogram, renderIndividualSymbol } from '../../chunk-H2OEUBPO.js';
2
2
  import '../../chunk-DNZFOCV7.js';
3
3
  import '../../chunk-2VNMKOUO.js';
4
4
  import '../../chunk-KLJEK547.js';
@@ -67,10 +67,19 @@ declare const FC_CONST: {
67
67
  readonly layerSpacingY: 56;
68
68
  readonly dummyWidth: 1;
69
69
  readonly padding: 24;
70
+ /** Latin/digit avg width at 12px font. CJK uses cjkCharWidth instead. */
70
71
  readonly charWidth: 6.8;
72
+ /** Full-width glyph width at 12px (CJK ideograph, kana, hangul, fullwidth). */
73
+ readonly cjkCharWidth: 12.5;
71
74
  readonly labelHPad: 16;
72
75
  readonly minNodeWidth: 72;
73
- readonly maxLabelWidth: 220;
76
+ /**
77
+ * Cap on per-line label width. Until line-wrapping lands, this clamp is
78
+ * a soft contract: nodes never grow past this, and any overflow becomes
79
+ * the caller's problem. Set generously so common CJK sentences (≤30
80
+ * full-width chars) still fit without truncation or text overflow.
81
+ */
82
+ readonly maxLabelWidth: 420;
74
83
  readonly crossingSweepIters: 24;
75
84
  };
76
85
  declare function layoutFlowchart(ast: FlowchartAST): FlowchartLayoutResult;
@@ -67,10 +67,19 @@ declare const FC_CONST: {
67
67
  readonly layerSpacingY: 56;
68
68
  readonly dummyWidth: 1;
69
69
  readonly padding: 24;
70
+ /** Latin/digit avg width at 12px font. CJK uses cjkCharWidth instead. */
70
71
  readonly charWidth: 6.8;
72
+ /** Full-width glyph width at 12px (CJK ideograph, kana, hangul, fullwidth). */
73
+ readonly cjkCharWidth: 12.5;
71
74
  readonly labelHPad: 16;
72
75
  readonly minNodeWidth: 72;
73
- readonly maxLabelWidth: 220;
76
+ /**
77
+ * Cap on per-line label width. Until line-wrapping lands, this clamp is
78
+ * a soft contract: nodes never grow past this, and any overflow becomes
79
+ * the caller's problem. Set generously so common CJK sentences (≤30
80
+ * full-width chars) still fit without truncation or text overflow.
81
+ */
82
+ readonly maxLabelWidth: 420;
74
83
  readonly crossingSweepIters: 24;
75
84
  };
76
85
  declare function layoutFlowchart(ast: FlowchartAST): FlowchartLayoutResult;
package/dist/index.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkQXIGHMH2_cjs = require('./chunk-QXIGHMH2.cjs');
3
+ var chunkMSYBSOU2_cjs = require('./chunk-MSYBSOU2.cjs');
4
4
  var chunkA5D2IMOX_cjs = require('./chunk-A5D2IMOX.cjs');
5
5
  var chunk4S2WILLW_cjs = require('./chunk-4S2WILLW.cjs');
6
6
  var chunkMCFQAUQV_cjs = require('./chunk-MCFQAUQV.cjs');
@@ -9,8 +9,8 @@ var chunk3YZ6FPQW_cjs = require('./chunk-3YZ6FPQW.cjs');
9
9
  var chunkZNOD4VZT_cjs = require('./chunk-ZNOD4VZT.cjs');
10
10
  var chunk5AEN2PLB_cjs = require('./chunk-5AEN2PLB.cjs');
11
11
  var chunkQSQX77S2_cjs = require('./chunk-QSQX77S2.cjs');
12
- var chunkZ3DE6S64_cjs = require('./chunk-Z3DE6S64.cjs');
13
- var chunk6LZJTAA3_cjs = require('./chunk-6LZJTAA3.cjs');
12
+ var chunkUAGSCTYI_cjs = require('./chunk-UAGSCTYI.cjs');
13
+ var chunkMJGDP3CS_cjs = require('./chunk-MJGDP3CS.cjs');
14
14
  var chunkE65ITQXV_cjs = require('./chunk-E65ITQXV.cjs');
15
15
  var chunkB37IKTI7_cjs = require('./chunk-B37IKTI7.cjs');
16
16
  var chunkX7RPFTTR_cjs = require('./chunk-X7RPFTTR.cjs');
@@ -25,19 +25,19 @@ require('./chunk-HDKDQAEQ.cjs');
25
25
 
26
26
  Object.defineProperty(exports, "decisiontree", {
27
27
  enumerable: true,
28
- get: function () { return chunkQXIGHMH2_cjs.decisiontree; }
28
+ get: function () { return chunkMSYBSOU2_cjs.decisiontree; }
29
29
  });
30
30
  Object.defineProperty(exports, "parse", {
31
31
  enumerable: true,
32
- get: function () { return chunkQXIGHMH2_cjs.parse; }
32
+ get: function () { return chunkMSYBSOU2_cjs.parse; }
33
33
  });
34
34
  Object.defineProperty(exports, "render", {
35
35
  enumerable: true,
36
- get: function () { return chunkQXIGHMH2_cjs.render; }
36
+ get: function () { return chunkMSYBSOU2_cjs.render; }
37
37
  });
38
38
  Object.defineProperty(exports, "timeline", {
39
39
  enumerable: true,
40
- get: function () { return chunkQXIGHMH2_cjs.timeline; }
40
+ get: function () { return chunkMSYBSOU2_cjs.timeline; }
41
41
  });
42
42
  Object.defineProperty(exports, "orgchart", {
43
43
  enumerable: true,
@@ -73,11 +73,11 @@ Object.defineProperty(exports, "venn", {
73
73
  });
74
74
  Object.defineProperty(exports, "flowchart", {
75
75
  enumerable: true,
76
- get: function () { return chunkZ3DE6S64_cjs.flowchart; }
76
+ get: function () { return chunkUAGSCTYI_cjs.flowchart; }
77
77
  });
78
78
  Object.defineProperty(exports, "genogram", {
79
79
  enumerable: true,
80
- get: function () { return chunk6LZJTAA3_cjs.genogram; }
80
+ get: function () { return chunkMJGDP3CS_cjs.genogram; }
81
81
  });
82
82
  Object.defineProperty(exports, "ecomap", {
83
83
  enumerable: true,
package/dist/index.d.cts CHANGED
@@ -13,7 +13,7 @@ export { sld } from './diagrams/sld/index.cjs';
13
13
  export { entity } from './diagrams/entity/index.cjs';
14
14
  export { fishbone } from './diagrams/fishbone/index.cjs';
15
15
  export { venn } from './diagrams/venn/index.cjs';
16
- export { B as BASE_THEMES, a as BIOLOGY_TOKENS, b as BaseTheme, c as BiologyTokens, P as PERSON_TOKENS, d as PersonTokens, R as ResolvedTheme, T as ThemeName, e as TimelineTokens, V as VENN_TOKENS, f as VennTokens, g as flowchart, r as resolveBaseTheme, h as resolveBiologyTheme, i as resolveFishboneTheme, j as resolveGenogramTheme, k as resolvePersonTheme, l as resolveTimelineTheme, m as resolveVennTheme } from './index-lsSaw3E0.cjs';
16
+ export { B as BASE_THEMES, a as BIOLOGY_TOKENS, b as BaseTheme, c as BiologyTokens, P as PERSON_TOKENS, d as PersonTokens, R as ResolvedTheme, T as ThemeName, e as TimelineTokens, V as VENN_TOKENS, f as VennTokens, g as flowchart, r as resolveBaseTheme, h as resolveBiologyTheme, i as resolveFishboneTheme, j as resolveGenogramTheme, k as resolvePersonTheme, l as resolveTimelineTheme, m as resolveVennTheme } from './index-BTZEka65.cjs';
17
17
  export { orgchart } from './diagrams/orgchart/index.cjs';
18
18
  import { D as DiagramPlugin } from './types-C4LnMEcB.cjs';
19
19
 
package/dist/index.d.ts CHANGED
@@ -13,7 +13,7 @@ export { sld } from './diagrams/sld/index.js';
13
13
  export { entity } from './diagrams/entity/index.js';
14
14
  export { fishbone } from './diagrams/fishbone/index.js';
15
15
  export { venn } from './diagrams/venn/index.js';
16
- export { B as BASE_THEMES, a as BIOLOGY_TOKENS, b as BaseTheme, c as BiologyTokens, P as PERSON_TOKENS, d as PersonTokens, R as ResolvedTheme, T as ThemeName, e as TimelineTokens, V as VENN_TOKENS, f as VennTokens, g as flowchart, r as resolveBaseTheme, h as resolveBiologyTheme, i as resolveFishboneTheme, j as resolveGenogramTheme, k as resolvePersonTheme, l as resolveTimelineTheme, m as resolveVennTheme } from './index-C97K-kuw.js';
16
+ export { B as BASE_THEMES, a as BIOLOGY_TOKENS, b as BaseTheme, c as BiologyTokens, P as PERSON_TOKENS, d as PersonTokens, R as ResolvedTheme, T as ThemeName, e as TimelineTokens, V as VENN_TOKENS, f as VennTokens, g as flowchart, r as resolveBaseTheme, h as resolveBiologyTheme, i as resolveFishboneTheme, j as resolveGenogramTheme, k as resolvePersonTheme, l as resolveTimelineTheme, m as resolveVennTheme } from './index-DcU88F9i.js';
17
17
  export { orgchart } from './diagrams/orgchart/index.js';
18
18
  import { D as DiagramPlugin } from './types-C4LnMEcB.js';
19
19
 
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { decisiontree, parse, render, timeline } from './chunk-S3RBKJM5.js';
1
+ export { decisiontree, parse, render, timeline } from './chunk-VPKCW4PB.js';
2
2
  export { orgchart } from './chunk-FCGHV6ZK.js';
3
3
  export { circuit } from './chunk-PGALHQFF.js';
4
4
  export { blockdiagram } from './chunk-UGCUNADI.js';
@@ -7,8 +7,8 @@ export { sld } from './chunk-FE6GAUNW.js';
7
7
  export { entity } from './chunk-M5B2UUNW.js';
8
8
  export { fishbone } from './chunk-ZNDIGQJD.js';
9
9
  export { venn } from './chunk-JDTB7IKL.js';
10
- export { flowchart } from './chunk-SN7NTZI6.js';
11
- export { genogram } from './chunk-2BM3HJSK.js';
10
+ export { flowchart } from './chunk-J2LVOWVY.js';
11
+ export { genogram } from './chunk-H2OEUBPO.js';
12
12
  export { ecomap } from './chunk-LR4X4ZRG.js';
13
13
  export { pedigree } from './chunk-OC22GGQN.js';
14
14
  export { phylo } from './chunk-YQANC7HQ.js';
package/dist/react.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkQXIGHMH2_cjs = require('./chunk-QXIGHMH2.cjs');
3
+ var chunkMSYBSOU2_cjs = require('./chunk-MSYBSOU2.cjs');
4
4
  require('./chunk-A5D2IMOX.cjs');
5
5
  require('./chunk-4S2WILLW.cjs');
6
6
  require('./chunk-MCFQAUQV.cjs');
@@ -9,8 +9,8 @@ require('./chunk-3YZ6FPQW.cjs');
9
9
  require('./chunk-ZNOD4VZT.cjs');
10
10
  require('./chunk-5AEN2PLB.cjs');
11
11
  require('./chunk-QSQX77S2.cjs');
12
- require('./chunk-Z3DE6S64.cjs');
13
- require('./chunk-6LZJTAA3.cjs');
12
+ require('./chunk-UAGSCTYI.cjs');
13
+ require('./chunk-MJGDP3CS.cjs');
14
14
  require('./chunk-E65ITQXV.cjs');
15
15
  require('./chunk-B37IKTI7.cjs');
16
16
  require('./chunk-X7RPFTTR.cjs');
@@ -35,7 +35,7 @@ function SchematexDiagram({
35
35
  }) {
36
36
  const svg = react.useMemo(() => {
37
37
  try {
38
- return chunkQXIGHMH2_cjs.render(dsl, { type, theme, fontFamily, padding });
38
+ return chunkMSYBSOU2_cjs.render(dsl, { type, theme, fontFamily, padding });
39
39
  } catch (err) {
40
40
  const e = err instanceof Error ? err : new Error(String(err));
41
41
  onError?.(e);
package/dist/react.js CHANGED
@@ -1,4 +1,4 @@
1
- import { render } from './chunk-S3RBKJM5.js';
1
+ import { render } from './chunk-VPKCW4PB.js';
2
2
  import './chunk-FCGHV6ZK.js';
3
3
  import './chunk-PGALHQFF.js';
4
4
  import './chunk-UGCUNADI.js';
@@ -7,8 +7,8 @@ import './chunk-FE6GAUNW.js';
7
7
  import './chunk-M5B2UUNW.js';
8
8
  import './chunk-ZNDIGQJD.js';
9
9
  import './chunk-JDTB7IKL.js';
10
- import './chunk-SN7NTZI6.js';
11
- import './chunk-2BM3HJSK.js';
10
+ import './chunk-J2LVOWVY.js';
11
+ import './chunk-H2OEUBPO.js';
12
12
  import './chunk-LR4X4ZRG.js';
13
13
  import './chunk-OC22GGQN.js';
14
14
  import './chunk-YQANC7HQ.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "schematex",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "Every diagram a doctor, engineer, or lawyer would actually use. 20 industry-standard diagrams (genogram, pedigree, ladder logic, SLD, 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",