schematex 0.4.3 → 0.5.2

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 (98) hide show
  1. package/README.md +36 -7
  2. package/dist/ai/ai-sdk.cjs +19 -13
  3. package/dist/ai/ai-sdk.cjs.map +1 -1
  4. package/dist/ai/ai-sdk.d.cts +4 -3
  5. package/dist/ai/ai-sdk.d.ts +4 -3
  6. package/dist/ai/ai-sdk.js +15 -9
  7. package/dist/ai/ai-sdk.js.map +1 -1
  8. package/dist/ai/index.cjs +16 -12
  9. package/dist/ai/index.d.cts +20 -153
  10. package/dist/ai/index.d.ts +20 -153
  11. package/dist/ai/index.js +4 -4
  12. package/dist/api-C5SECOxZ.d.cts +69 -0
  13. package/dist/api-Cr_MxttI.d.ts +69 -0
  14. package/dist/browser.cjs +24 -6
  15. package/dist/browser.cjs.map +1 -1
  16. package/dist/browser.d.cts +12 -3
  17. package/dist/browser.d.ts +12 -3
  18. package/dist/browser.js +14 -6
  19. package/dist/browser.js.map +1 -1
  20. package/dist/{chunk-SMXU3KYA.cjs → chunk-4QPDZJAL.cjs} +6337 -120
  21. package/dist/chunk-4QPDZJAL.cjs.map +1 -0
  22. package/dist/{chunk-N3SLYVNW.cjs → chunk-HK56GQQP.cjs} +751 -80
  23. package/dist/chunk-HK56GQQP.cjs.map +1 -0
  24. package/dist/{chunk-KWQTF6ZL.js → chunk-OK5ZS3LU.js} +6330 -119
  25. package/dist/chunk-OK5ZS3LU.js.map +1 -0
  26. package/dist/{chunk-2Z543TC3.cjs → chunk-QMTWG6JL.cjs} +1297 -1151
  27. package/dist/chunk-QMTWG6JL.cjs.map +1 -0
  28. package/dist/{chunk-VITE3MZQ.cjs → chunk-QTNPMIO2.cjs} +99 -5
  29. package/dist/chunk-QTNPMIO2.cjs.map +1 -0
  30. package/dist/{chunk-6IGSKU6D.js → chunk-UFTYX73U.js} +99 -5
  31. package/dist/chunk-UFTYX73U.js.map +1 -0
  32. package/dist/{chunk-J7JWMQD5.js → chunk-VCH7RI5H.js} +1297 -1151
  33. package/dist/chunk-VCH7RI5H.js.map +1 -0
  34. package/dist/{chunk-UBTKM2TB.js → chunk-VKPCR7BG.js} +751 -81
  35. package/dist/chunk-VKPCR7BG.js.map +1 -0
  36. package/dist/diagrams/blockdiagram/index.d.cts +1 -1
  37. package/dist/diagrams/blockdiagram/index.d.ts +1 -1
  38. package/dist/diagrams/circuit/index.cjs +7 -7
  39. package/dist/diagrams/circuit/index.d.cts +1 -1
  40. package/dist/diagrams/circuit/index.d.ts +1 -1
  41. package/dist/diagrams/circuit/index.js +1 -1
  42. package/dist/diagrams/ecomap/index.d.cts +1 -1
  43. package/dist/diagrams/ecomap/index.d.ts +1 -1
  44. package/dist/diagrams/entity/index.d.cts +1 -1
  45. package/dist/diagrams/entity/index.d.ts +1 -1
  46. package/dist/diagrams/fishbone/index.d.cts +1 -1
  47. package/dist/diagrams/fishbone/index.d.ts +1 -1
  48. package/dist/diagrams/flowchart/index.cjs +7 -7
  49. package/dist/diagrams/flowchart/index.d.cts +2 -2
  50. package/dist/diagrams/flowchart/index.d.ts +2 -2
  51. package/dist/diagrams/flowchart/index.js +1 -1
  52. package/dist/diagrams/genogram/index.d.cts +1 -1
  53. package/dist/diagrams/genogram/index.d.ts +1 -1
  54. package/dist/diagrams/ladder/index.d.cts +1 -1
  55. package/dist/diagrams/ladder/index.d.ts +1 -1
  56. package/dist/diagrams/logic/index.d.cts +1 -1
  57. package/dist/diagrams/logic/index.d.ts +1 -1
  58. package/dist/diagrams/orgchart/index.d.cts +1 -1
  59. package/dist/diagrams/orgchart/index.d.ts +1 -1
  60. package/dist/diagrams/pedigree/index.d.cts +1 -1
  61. package/dist/diagrams/pedigree/index.d.ts +1 -1
  62. package/dist/diagrams/phylo/index.d.cts +1 -1
  63. package/dist/diagrams/phylo/index.d.ts +1 -1
  64. package/dist/diagrams/sld/index.d.cts +1 -1
  65. package/dist/diagrams/sld/index.d.ts +1 -1
  66. package/dist/diagrams/sociogram/index.d.cts +1 -1
  67. package/dist/diagrams/sociogram/index.d.ts +1 -1
  68. package/dist/diagrams/timing/index.d.cts +1 -1
  69. package/dist/diagrams/timing/index.d.ts +1 -1
  70. package/dist/diagrams/venn/index.d.cts +1 -1
  71. package/dist/diagrams/venn/index.d.ts +1 -1
  72. package/dist/{index-DYpJXJcy.d.cts → index-BD2yDfQM.d.cts} +1 -1
  73. package/dist/{index-BeUVaQiD.d.ts → index-C30zQWZI.d.ts} +1 -1
  74. package/dist/index.cjs +35 -11
  75. package/dist/index.d.cts +10 -4
  76. package/dist/index.d.ts +10 -4
  77. package/dist/index.js +3 -3
  78. package/dist/react.cjs +8 -10
  79. package/dist/react.cjs.map +1 -1
  80. package/dist/react.d.cts +3 -2
  81. package/dist/react.d.ts +3 -2
  82. package/dist/react.js +8 -10
  83. package/dist/react.js.map +1 -1
  84. package/dist/tools-BHWaJPOl.d.ts +153 -0
  85. package/dist/tools-DlpuE76u.d.cts +153 -0
  86. package/dist/{types-DKdo-Ua_.d.cts → types-WTr9W5Ud.d.cts} +3 -3
  87. package/dist/{types-DKdo-Ua_.d.ts → types-WTr9W5Ud.d.ts} +3 -3
  88. package/package.json +2 -2
  89. package/dist/api-BIj9t4Oc.d.cts +0 -22
  90. package/dist/api-BIj9t4Oc.d.ts +0 -22
  91. package/dist/chunk-2Z543TC3.cjs.map +0 -1
  92. package/dist/chunk-6IGSKU6D.js.map +0 -1
  93. package/dist/chunk-J7JWMQD5.js.map +0 -1
  94. package/dist/chunk-KWQTF6ZL.js.map +0 -1
  95. package/dist/chunk-N3SLYVNW.cjs.map +0 -1
  96. package/dist/chunk-SMXU3KYA.cjs.map +0 -1
  97. package/dist/chunk-UBTKM2TB.js.map +0 -1
  98. package/dist/chunk-VITE3MZQ.cjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { B as BlockAST, D as DiagramPlugin } from '../../types-DKdo-Ua_.cjs';
1
+ import { B as BlockAST, D as DiagramPlugin } from '../../types-WTr9W5Ud.cjs';
2
2
 
3
3
  declare function parseBlockDiagram(text: string): BlockAST;
4
4
 
@@ -1,4 +1,4 @@
1
- import { B as BlockAST, D as DiagramPlugin } from '../../types-DKdo-Ua_.js';
1
+ import { B as BlockAST, D as DiagramPlugin } from '../../types-WTr9W5Ud.js';
2
2
 
3
3
  declare function parseBlockDiagram(text: string): BlockAST;
4
4
 
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk2Z543TC3_cjs = require('../../chunk-2Z543TC3.cjs');
3
+ var chunkQMTWG6JL_cjs = require('../../chunk-QMTWG6JL.cjs');
4
4
  require('../../chunk-D7EHZFK4.cjs');
5
5
  require('../../chunk-NAGUZFXX.cjs');
6
6
  require('../../chunk-3WNW5Y7P.cjs');
@@ -9,27 +9,27 @@ require('../../chunk-3WNW5Y7P.cjs');
9
9
 
10
10
  Object.defineProperty(exports, "circuit", {
11
11
  enumerable: true,
12
- get: function () { return chunk2Z543TC3_cjs.circuit; }
12
+ get: function () { return chunkQMTWG6JL_cjs.circuit; }
13
13
  });
14
14
  Object.defineProperty(exports, "layoutCircuit", {
15
15
  enumerable: true,
16
- get: function () { return chunk2Z543TC3_cjs.layoutCircuit; }
16
+ get: function () { return chunkQMTWG6JL_cjs.layoutCircuit; }
17
17
  });
18
18
  Object.defineProperty(exports, "layoutCircuitNetlist", {
19
19
  enumerable: true,
20
- get: function () { return chunk2Z543TC3_cjs.layoutCircuitNetlist; }
20
+ get: function () { return chunkQMTWG6JL_cjs.layoutCircuitNetlist; }
21
21
  });
22
22
  Object.defineProperty(exports, "parseCircuit", {
23
23
  enumerable: true,
24
- get: function () { return chunk2Z543TC3_cjs.parseCircuit; }
24
+ get: function () { return chunkQMTWG6JL_cjs.parseCircuit; }
25
25
  });
26
26
  Object.defineProperty(exports, "parseNetlist", {
27
27
  enumerable: true,
28
- get: function () { return chunk2Z543TC3_cjs.parseNetlist; }
28
+ get: function () { return chunkQMTWG6JL_cjs.parseNetlist; }
29
29
  });
30
30
  Object.defineProperty(exports, "renderCircuit", {
31
31
  enumerable: true,
32
- get: function () { return chunk2Z543TC3_cjs.renderCircuit; }
32
+ get: function () { return chunkQMTWG6JL_cjs.renderCircuit; }
33
33
  });
34
34
  //# sourceMappingURL=index.cjs.map
35
35
  //# sourceMappingURL=index.cjs.map
@@ -1,4 +1,4 @@
1
- import { C as CircuitAST, R as RenderConfig, p as CircuitComponent, D as DiagramPlugin } from '../../types-DKdo-Ua_.cjs';
1
+ import { C as CircuitAST, R as RenderConfig, f as CircuitComponent, D as DiagramPlugin } from '../../types-WTr9W5Ud.cjs';
2
2
 
3
3
  /**
4
4
  * Top-level circuit parser. Detects two DSL modes:
@@ -1,4 +1,4 @@
1
- import { C as CircuitAST, R as RenderConfig, p as CircuitComponent, D as DiagramPlugin } from '../../types-DKdo-Ua_.js';
1
+ import { C as CircuitAST, R as RenderConfig, f as CircuitComponent, D as DiagramPlugin } from '../../types-WTr9W5Ud.js';
2
2
 
3
3
  /**
4
4
  * Top-level circuit parser. Detects two DSL modes:
@@ -1,4 +1,4 @@
1
- export { circuit, layoutCircuit, layoutCircuitNetlist, parseCircuit, parseNetlist, renderCircuit } from '../../chunk-J7JWMQD5.js';
1
+ export { circuit, layoutCircuit, layoutCircuitNetlist, parseCircuit, parseNetlist, renderCircuit } from '../../chunk-VCH7RI5H.js';
2
2
  import '../../chunk-2VNMKOUO.js';
3
3
  import '../../chunk-5IKOLUWK.js';
4
4
  import '../../chunk-SYYBKDL7.js';
@@ -1,4 +1,4 @@
1
- import { a as DiagramAST, L as LayoutConfig, b as LayoutResult, R as RenderConfig, D as DiagramPlugin } from '../../types-DKdo-Ua_.cjs';
1
+ import { a as DiagramAST, L as LayoutConfig, b as LayoutResult, R as RenderConfig, D as DiagramPlugin } from '../../types-WTr9W5Ud.cjs';
2
2
 
3
3
  declare class EcomapParseError extends Error {
4
4
  line: number;
@@ -1,4 +1,4 @@
1
- import { a as DiagramAST, L as LayoutConfig, b as LayoutResult, R as RenderConfig, D as DiagramPlugin } from '../../types-DKdo-Ua_.js';
1
+ import { a as DiagramAST, L as LayoutConfig, b as LayoutResult, R as RenderConfig, D as DiagramPlugin } from '../../types-WTr9W5Ud.js';
2
2
 
3
3
  declare class EcomapParseError extends Error {
4
4
  line: number;
@@ -1,4 +1,4 @@
1
- import { E as EntityAST, R as RenderConfig, j as EntityNode, k as EntityEdge, D as DiagramPlugin } from '../../types-DKdo-Ua_.cjs';
1
+ import { E as EntityAST, R as RenderConfig, l as EntityNode, m as EntityEdge, D as DiagramPlugin } from '../../types-WTr9W5Ud.cjs';
2
2
 
3
3
  declare function parseEntityDSL(text: string): EntityAST;
4
4
 
@@ -1,4 +1,4 @@
1
- import { E as EntityAST, R as RenderConfig, j as EntityNode, k as EntityEdge, D as DiagramPlugin } from '../../types-DKdo-Ua_.js';
1
+ import { E as EntityAST, R as RenderConfig, l as EntityNode, m as EntityEdge, D as DiagramPlugin } from '../../types-WTr9W5Ud.js';
2
2
 
3
3
  declare function parseEntityDSL(text: string): EntityAST;
4
4
 
@@ -1,4 +1,4 @@
1
- import { F as FishboneAST, D as DiagramPlugin } from '../../types-DKdo-Ua_.cjs';
1
+ import { F as FishboneAST, D as DiagramPlugin } from '../../types-WTr9W5Ud.cjs';
2
2
 
3
3
  /**
4
4
  * Fishbone DSL parser.
@@ -1,4 +1,4 @@
1
- import { F as FishboneAST, D as DiagramPlugin } from '../../types-DKdo-Ua_.js';
1
+ import { F as FishboneAST, D as DiagramPlugin } from '../../types-WTr9W5Ud.js';
2
2
 
3
3
  /**
4
4
  * Fishbone DSL parser.
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkVITE3MZQ_cjs = require('../../chunk-VITE3MZQ.cjs');
3
+ var chunkQTNPMIO2_cjs = require('../../chunk-QTNPMIO2.cjs');
4
4
  require('../../chunk-3KRL2EGN.cjs');
5
5
  require('../../chunk-D7EHZFK4.cjs');
6
6
  require('../../chunk-3WNW5Y7P.cjs');
@@ -9,27 +9,27 @@ require('../../chunk-3WNW5Y7P.cjs');
9
9
 
10
10
  Object.defineProperty(exports, "FC_CONST", {
11
11
  enumerable: true,
12
- get: function () { return chunkVITE3MZQ_cjs.FC_CONST; }
12
+ get: function () { return chunkQTNPMIO2_cjs.FC_CONST; }
13
13
  });
14
14
  Object.defineProperty(exports, "flowchart", {
15
15
  enumerable: true,
16
- get: function () { return chunkVITE3MZQ_cjs.flowchart; }
16
+ get: function () { return chunkQTNPMIO2_cjs.flowchart; }
17
17
  });
18
18
  Object.defineProperty(exports, "layoutFlowchart", {
19
19
  enumerable: true,
20
- get: function () { return chunkVITE3MZQ_cjs.layoutFlowchart; }
20
+ get: function () { return chunkQTNPMIO2_cjs.layoutFlowchart; }
21
21
  });
22
22
  Object.defineProperty(exports, "parseFlowchart", {
23
23
  enumerable: true,
24
- get: function () { return chunkVITE3MZQ_cjs.parseFlowchart; }
24
+ get: function () { return chunkQTNPMIO2_cjs.parseFlowchart; }
25
25
  });
26
26
  Object.defineProperty(exports, "renderFlowchart", {
27
27
  enumerable: true,
28
- get: function () { return chunkVITE3MZQ_cjs.renderFlowchart; }
28
+ get: function () { return chunkQTNPMIO2_cjs.renderFlowchart; }
29
29
  });
30
30
  Object.defineProperty(exports, "renderFlowchartAST", {
31
31
  enumerable: true,
32
- get: function () { return chunkVITE3MZQ_cjs.renderFlowchartAST; }
32
+ get: function () { return chunkQTNPMIO2_cjs.renderFlowchartAST; }
33
33
  });
34
34
  //# sourceMappingURL=index.cjs.map
35
35
  //# sourceMappingURL=index.cjs.map
@@ -1,2 +1,2 @@
1
- import '../../types-DKdo-Ua_.cjs';
2
- export { F as FC_CONST, g as flowchart, n as layoutFlowchart, p as parseFlowchart, o as renderFlowchart, q as renderFlowchartAST } from '../../index-DYpJXJcy.cjs';
1
+ import '../../types-WTr9W5Ud.cjs';
2
+ export { F as FC_CONST, g as flowchart, n as layoutFlowchart, p as parseFlowchart, o as renderFlowchart, q as renderFlowchartAST } from '../../index-BD2yDfQM.cjs';
@@ -1,2 +1,2 @@
1
- import '../../types-DKdo-Ua_.js';
2
- export { F as FC_CONST, g as flowchart, n as layoutFlowchart, p as parseFlowchart, o as renderFlowchart, q as renderFlowchartAST } from '../../index-BeUVaQiD.js';
1
+ import '../../types-WTr9W5Ud.js';
2
+ export { F as FC_CONST, g as flowchart, n as layoutFlowchart, p as parseFlowchart, o as renderFlowchart, q as renderFlowchartAST } from '../../index-C30zQWZI.js';
@@ -1,4 +1,4 @@
1
- export { FC_CONST, flowchart, layoutFlowchart, parseFlowchart, renderFlowchart, renderFlowchartAST } from '../../chunk-6IGSKU6D.js';
1
+ export { FC_CONST, flowchart, layoutFlowchart, parseFlowchart, renderFlowchart, renderFlowchartAST } from '../../chunk-UFTYX73U.js';
2
2
  import '../../chunk-2KTQ75LN.js';
3
3
  import '../../chunk-2VNMKOUO.js';
4
4
  import '../../chunk-SYYBKDL7.js';
@@ -1,4 +1,4 @@
1
- import { a as DiagramAST, L as LayoutConfig, b as LayoutResult, R as RenderConfig, I as Individual, D as DiagramPlugin } from '../../types-DKdo-Ua_.cjs';
1
+ import { a as DiagramAST, L as LayoutConfig, b as LayoutResult, R as RenderConfig, I as Individual, D as DiagramPlugin } from '../../types-WTr9W5Ud.cjs';
2
2
 
3
3
  declare class ParseError extends Error {
4
4
  line: number;
@@ -1,4 +1,4 @@
1
- import { a as DiagramAST, L as LayoutConfig, b as LayoutResult, R as RenderConfig, I as Individual, D as DiagramPlugin } from '../../types-DKdo-Ua_.js';
1
+ import { a as DiagramAST, L as LayoutConfig, b as LayoutResult, R as RenderConfig, I as Individual, D as DiagramPlugin } from '../../types-WTr9W5Ud.js';
2
2
 
3
3
  declare class ParseError extends Error {
4
4
  line: number;
@@ -1,4 +1,4 @@
1
- import { e as LadderAST, R as RenderConfig, f as LadderRung, g as LadderElement, D as DiagramPlugin } from '../../types-DKdo-Ua_.cjs';
1
+ import { g as LadderAST, R as RenderConfig, h as LadderRung, i as LadderElement, D as DiagramPlugin } from '../../types-WTr9W5Ud.cjs';
2
2
 
3
3
  declare function parseLadderDSL(text: string): LadderAST;
4
4
 
@@ -1,4 +1,4 @@
1
- import { e as LadderAST, R as RenderConfig, f as LadderRung, g as LadderElement, D as DiagramPlugin } from '../../types-DKdo-Ua_.js';
1
+ import { g as LadderAST, R as RenderConfig, h as LadderRung, i as LadderElement, D as DiagramPlugin } from '../../types-WTr9W5Ud.js';
2
2
 
3
3
  declare function parseLadderDSL(text: string): LadderAST;
4
4
 
@@ -1,4 +1,4 @@
1
- import { m as LogicGateAST, R as RenderConfig, D as DiagramPlugin } from '../../types-DKdo-Ua_.cjs';
1
+ import { e as LogicGateAST, R as RenderConfig, D as DiagramPlugin } from '../../types-WTr9W5Ud.cjs';
2
2
 
3
3
  declare function parseLogic(text: string): LogicGateAST;
4
4
 
@@ -1,4 +1,4 @@
1
- import { m as LogicGateAST, R as RenderConfig, D as DiagramPlugin } from '../../types-DKdo-Ua_.js';
1
+ import { e as LogicGateAST, R as RenderConfig, D as DiagramPlugin } from '../../types-WTr9W5Ud.js';
2
2
 
3
3
  declare function parseLogic(text: string): LogicGateAST;
4
4
 
@@ -1,4 +1,4 @@
1
- import { R as RenderConfig, D as DiagramPlugin } from '../../types-DKdo-Ua_.cjs';
1
+ import { R as RenderConfig, D as DiagramPlugin } from '../../types-WTr9W5Ud.cjs';
2
2
 
3
3
  type OrgchartDirection = "TD" | "LR";
4
4
  type OrgchartLayoutMode = "tree" | "list";
@@ -1,4 +1,4 @@
1
- import { R as RenderConfig, D as DiagramPlugin } from '../../types-DKdo-Ua_.js';
1
+ import { R as RenderConfig, D as DiagramPlugin } from '../../types-WTr9W5Ud.js';
2
2
 
3
3
  type OrgchartDirection = "TD" | "LR";
4
4
  type OrgchartLayoutMode = "tree" | "list";
@@ -1,4 +1,4 @@
1
- import { a as DiagramAST, L as LayoutConfig, b as LayoutResult, R as RenderConfig, D as DiagramPlugin } from '../../types-DKdo-Ua_.cjs';
1
+ import { a as DiagramAST, L as LayoutConfig, b as LayoutResult, R as RenderConfig, D as DiagramPlugin } from '../../types-WTr9W5Ud.cjs';
2
2
 
3
3
  declare class PedigreeParseError extends Error {
4
4
  line: number;
@@ -1,4 +1,4 @@
1
- import { a as DiagramAST, L as LayoutConfig, b as LayoutResult, R as RenderConfig, D as DiagramPlugin } from '../../types-DKdo-Ua_.js';
1
+ import { a as DiagramAST, L as LayoutConfig, b as LayoutResult, R as RenderConfig, D as DiagramPlugin } from '../../types-WTr9W5Ud.js';
2
2
 
3
3
  declare class PedigreeParseError extends Error {
4
4
  line: number;
@@ -1,4 +1,4 @@
1
- import { P as PhyloTreeAST, c as PhyloLayoutNode, D as DiagramPlugin } from '../../types-DKdo-Ua_.cjs';
1
+ import { P as PhyloTreeAST, c as PhyloLayoutNode, D as DiagramPlugin } from '../../types-WTr9W5Ud.cjs';
2
2
 
3
3
  declare class PhyloParseError extends Error {
4
4
  constructor(message: string);
@@ -1,4 +1,4 @@
1
- import { P as PhyloTreeAST, c as PhyloLayoutNode, D as DiagramPlugin } from '../../types-DKdo-Ua_.js';
1
+ import { P as PhyloTreeAST, c as PhyloLayoutNode, D as DiagramPlugin } from '../../types-WTr9W5Ud.js';
2
2
 
3
3
  declare class PhyloParseError extends Error {
4
4
  constructor(message: string);
@@ -1,4 +1,4 @@
1
- import { S as SLDAST, R as RenderConfig, h as SLDNode, i as SLDNodeType, D as DiagramPlugin } from '../../types-DKdo-Ua_.cjs';
1
+ import { S as SLDAST, R as RenderConfig, j as SLDNode, k as SLDNodeType, D as DiagramPlugin } from '../../types-WTr9W5Ud.cjs';
2
2
 
3
3
  declare function parseSLDDSL(text: string): SLDAST;
4
4
 
@@ -1,4 +1,4 @@
1
- import { S as SLDAST, R as RenderConfig, h as SLDNode, i as SLDNodeType, D as DiagramPlugin } from '../../types-DKdo-Ua_.js';
1
+ import { S as SLDAST, R as RenderConfig, j as SLDNode, k as SLDNodeType, D as DiagramPlugin } from '../../types-WTr9W5Ud.js';
2
2
 
3
3
  declare function parseSLDDSL(text: string): SLDAST;
4
4
 
@@ -1,4 +1,4 @@
1
- import { d as LegendOverrides, D as DiagramPlugin } from '../../types-DKdo-Ua_.cjs';
1
+ import { d as LegendOverrides, D as DiagramPlugin } from '../../types-WTr9W5Ud.cjs';
2
2
 
3
3
  type SociogramLayout = "circular" | "force-directed" | "concentric";
4
4
  type EdgeValence = "positive" | "negative" | "neutral";
@@ -1,4 +1,4 @@
1
- import { d as LegendOverrides, D as DiagramPlugin } from '../../types-DKdo-Ua_.js';
1
+ import { d as LegendOverrides, D as DiagramPlugin } from '../../types-WTr9W5Ud.js';
2
2
 
3
3
  type SociogramLayout = "circular" | "force-directed" | "concentric";
4
4
  type EdgeValence = "positive" | "negative" | "neutral";
@@ -1,4 +1,4 @@
1
- import { T as TimingAST, D as DiagramPlugin } from '../../types-DKdo-Ua_.cjs';
1
+ import { T as TimingAST, D as DiagramPlugin } from '../../types-WTr9W5Ud.cjs';
2
2
 
3
3
  declare function parseTiming(text: string): TimingAST;
4
4
 
@@ -1,4 +1,4 @@
1
- import { T as TimingAST, D as DiagramPlugin } from '../../types-DKdo-Ua_.js';
1
+ import { T as TimingAST, D as DiagramPlugin } from '../../types-WTr9W5Ud.js';
2
2
 
3
3
  declare function parseTiming(text: string): TimingAST;
4
4
 
@@ -1,4 +1,4 @@
1
- import { V as VennAST, l as VennLayoutResult, D as DiagramPlugin } from '../../types-DKdo-Ua_.cjs';
1
+ import { V as VennAST, n as VennLayoutResult, D as DiagramPlugin } from '../../types-WTr9W5Ud.cjs';
2
2
 
3
3
  /**
4
4
  * Venn / Euler DSL parser (hand-written recursive descent).
@@ -1,4 +1,4 @@
1
- import { V as VennAST, l as VennLayoutResult, D as DiagramPlugin } from '../../types-DKdo-Ua_.js';
1
+ import { V as VennAST, n as VennLayoutResult, D as DiagramPlugin } from '../../types-WTr9W5Ud.js';
2
2
 
3
3
  /**
4
4
  * Venn / Euler DSL parser (hand-written recursive descent).
@@ -1,4 +1,4 @@
1
- import { n as FlowchartAST, o as FlowchartLayoutResult, D as DiagramPlugin } from './types-DKdo-Ua_.cjs';
1
+ import { o as FlowchartAST, p as FlowchartLayoutResult, D as DiagramPlugin } from './types-WTr9W5Ud.cjs';
2
2
 
3
3
  /**
4
4
  * Flowchart DSL parser.
@@ -1,4 +1,4 @@
1
- import { n as FlowchartAST, o as FlowchartLayoutResult, D as DiagramPlugin } from './types-DKdo-Ua_.js';
1
+ import { o as FlowchartAST, p as FlowchartLayoutResult, D as DiagramPlugin } from './types-WTr9W5Ud.js';
2
2
 
3
3
  /**
4
4
  * Flowchart DSL parser.
package/dist/index.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkSMXU3KYA_cjs = require('./chunk-SMXU3KYA.cjs');
3
+ var chunk4QPDZJAL_cjs = require('./chunk-4QPDZJAL.cjs');
4
4
  var chunkQUKVGHN4_cjs = require('./chunk-QUKVGHN4.cjs');
5
- var chunk2Z543TC3_cjs = require('./chunk-2Z543TC3.cjs');
5
+ var chunkQMTWG6JL_cjs = require('./chunk-QMTWG6JL.cjs');
6
6
  var chunkSUIDD2C5_cjs = require('./chunk-SUIDD2C5.cjs');
7
7
  var chunkN7W5KZK7_cjs = require('./chunk-N7W5KZK7.cjs');
8
8
  var chunk3M6WB62Y_cjs = require('./chunk-3M6WB62Y.cjs');
@@ -10,7 +10,7 @@ require('./chunk-SBB6C4OP.cjs');
10
10
  var chunkRYVV5UVI_cjs = require('./chunk-RYVV5UVI.cjs');
11
11
  var chunkVFZOPRQP_cjs = require('./chunk-VFZOPRQP.cjs');
12
12
  var chunkBW4KGTV7_cjs = require('./chunk-BW4KGTV7.cjs');
13
- var chunkVITE3MZQ_cjs = require('./chunk-VITE3MZQ.cjs');
13
+ var chunkQTNPMIO2_cjs = require('./chunk-QTNPMIO2.cjs');
14
14
  var chunkTZTCIAYW_cjs = require('./chunk-TZTCIAYW.cjs');
15
15
  var chunkVZ5LDNHK_cjs = require('./chunk-VZ5LDNHK.cjs');
16
16
  var chunkEGSUMHCS_cjs = require('./chunk-EGSUMHCS.cjs');
@@ -28,27 +28,51 @@ require('./chunk-3WNW5Y7P.cjs');
28
28
 
29
29
  Object.defineProperty(exports, "decisiontree", {
30
30
  enumerable: true,
31
- get: function () { return chunkSMXU3KYA_cjs.decisiontree; }
31
+ get: function () { return chunk4QPDZJAL_cjs.decisiontree; }
32
32
  });
33
33
  Object.defineProperty(exports, "parse", {
34
34
  enumerable: true,
35
- get: function () { return chunkSMXU3KYA_cjs.parse; }
35
+ get: function () { return chunk4QPDZJAL_cjs.parse; }
36
+ });
37
+ Object.defineProperty(exports, "parseResult", {
38
+ enumerable: true,
39
+ get: function () { return chunk4QPDZJAL_cjs.parseResult; }
40
+ });
41
+ Object.defineProperty(exports, "pert", {
42
+ enumerable: true,
43
+ get: function () { return chunk4QPDZJAL_cjs.pert; }
36
44
  });
37
45
  Object.defineProperty(exports, "pid", {
38
46
  enumerable: true,
39
- get: function () { return chunkSMXU3KYA_cjs.pid; }
47
+ get: function () { return chunk4QPDZJAL_cjs.pid; }
48
+ });
49
+ Object.defineProperty(exports, "prisma", {
50
+ enumerable: true,
51
+ get: function () { return chunk4QPDZJAL_cjs.prisma; }
40
52
  });
41
53
  Object.defineProperty(exports, "render", {
42
54
  enumerable: true,
43
- get: function () { return chunkSMXU3KYA_cjs.render; }
55
+ get: function () { return chunk4QPDZJAL_cjs.render; }
56
+ });
57
+ Object.defineProperty(exports, "renderPreview", {
58
+ enumerable: true,
59
+ get: function () { return chunk4QPDZJAL_cjs.renderPreview; }
60
+ });
61
+ Object.defineProperty(exports, "renderResult", {
62
+ enumerable: true,
63
+ get: function () { return chunk4QPDZJAL_cjs.renderResult; }
44
64
  });
45
65
  Object.defineProperty(exports, "state", {
46
66
  enumerable: true,
47
- get: function () { return chunkSMXU3KYA_cjs.state; }
67
+ get: function () { return chunk4QPDZJAL_cjs.state; }
48
68
  });
49
69
  Object.defineProperty(exports, "timeline", {
50
70
  enumerable: true,
51
- get: function () { return chunkSMXU3KYA_cjs.timeline; }
71
+ get: function () { return chunk4QPDZJAL_cjs.timeline; }
72
+ });
73
+ Object.defineProperty(exports, "usecase", {
74
+ enumerable: true,
75
+ get: function () { return chunk4QPDZJAL_cjs.usecase; }
52
76
  });
53
77
  Object.defineProperty(exports, "orgchart", {
54
78
  enumerable: true,
@@ -56,7 +80,7 @@ Object.defineProperty(exports, "orgchart", {
56
80
  });
57
81
  Object.defineProperty(exports, "circuit", {
58
82
  enumerable: true,
59
- get: function () { return chunk2Z543TC3_cjs.circuit; }
83
+ get: function () { return chunkQMTWG6JL_cjs.circuit; }
60
84
  });
61
85
  Object.defineProperty(exports, "blockdiagram", {
62
86
  enumerable: true,
@@ -84,7 +108,7 @@ Object.defineProperty(exports, "venn", {
84
108
  });
85
109
  Object.defineProperty(exports, "flowchart", {
86
110
  enumerable: true,
87
- get: function () { return chunkVITE3MZQ_cjs.flowchart; }
111
+ get: function () { return chunkQTNPMIO2_cjs.flowchart; }
88
112
  });
89
113
  Object.defineProperty(exports, "genogram", {
90
114
  enumerable: true,
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- export { S as SchematexConfig, p as parse, r as render } from './api-BIj9t4Oc.cjs';
1
+ export { S as SchematexConfig, a as SchematexDiagnostic, b as SchematexParseResult, c as SchematexRenderResult, d as SchematexResultStatus, p as parse, e as parseResult, r as render, f as renderPreview, g as renderResult } from './api-C5SECOxZ.cjs';
2
2
  export { genogram } from './diagrams/genogram/index.cjs';
3
3
  export { ecomap } from './diagrams/ecomap/index.cjs';
4
4
  export { pedigree } from './diagrams/pedigree/index.cjs';
@@ -13,9 +13,9 @@ 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-DYpJXJcy.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-BD2yDfQM.cjs';
17
17
  export { orgchart } from './diagrams/orgchart/index.cjs';
18
- import { D as DiagramPlugin } from './types-DKdo-Ua_.cjs';
18
+ import { D as DiagramPlugin } from './types-WTr9W5Ud.cjs';
19
19
 
20
20
  declare const decisiontree: DiagramPlugin;
21
21
 
@@ -25,4 +25,10 @@ declare const state: DiagramPlugin;
25
25
 
26
26
  declare const pid: DiagramPlugin;
27
27
 
28
- export { decisiontree, pid, state, timeline };
28
+ declare const prisma: DiagramPlugin;
29
+
30
+ declare const usecase: DiagramPlugin;
31
+
32
+ declare const pert: DiagramPlugin;
33
+
34
+ export { decisiontree, pert, pid, prisma, state, timeline, usecase };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { S as SchematexConfig, p as parse, r as render } from './api-BIj9t4Oc.js';
1
+ export { S as SchematexConfig, a as SchematexDiagnostic, b as SchematexParseResult, c as SchematexRenderResult, d as SchematexResultStatus, p as parse, e as parseResult, r as render, f as renderPreview, g as renderResult } from './api-Cr_MxttI.js';
2
2
  export { genogram } from './diagrams/genogram/index.js';
3
3
  export { ecomap } from './diagrams/ecomap/index.js';
4
4
  export { pedigree } from './diagrams/pedigree/index.js';
@@ -13,9 +13,9 @@ 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-BeUVaQiD.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-C30zQWZI.js';
17
17
  export { orgchart } from './diagrams/orgchart/index.js';
18
- import { D as DiagramPlugin } from './types-DKdo-Ua_.js';
18
+ import { D as DiagramPlugin } from './types-WTr9W5Ud.js';
19
19
 
20
20
  declare const decisiontree: DiagramPlugin;
21
21
 
@@ -25,4 +25,10 @@ declare const state: DiagramPlugin;
25
25
 
26
26
  declare const pid: DiagramPlugin;
27
27
 
28
- export { decisiontree, pid, state, timeline };
28
+ declare const prisma: DiagramPlugin;
29
+
30
+ declare const usecase: DiagramPlugin;
31
+
32
+ declare const pert: DiagramPlugin;
33
+
34
+ export { decisiontree, pert, pid, prisma, state, timeline, usecase };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export { decisiontree, parse, pid, render, state, timeline } from './chunk-KWQTF6ZL.js';
1
+ export { decisiontree, parse, parseResult, pert, pid, prisma, render, renderPreview, renderResult, state, timeline, usecase } from './chunk-OK5ZS3LU.js';
2
2
  export { orgchart } from './chunk-I55HO32M.js';
3
- export { circuit } from './chunk-J7JWMQD5.js';
3
+ export { circuit } from './chunk-VCH7RI5H.js';
4
4
  export { blockdiagram } from './chunk-EPKIJEH7.js';
5
5
  export { ladder } from './chunk-IBRW3UOA.js';
6
6
  export { sld } from './chunk-6OSUNBZY.js';
@@ -8,7 +8,7 @@ import './chunk-PIV2A3HG.js';
8
8
  export { entity } from './chunk-SZK376QB.js';
9
9
  export { fishbone } from './chunk-3M6T7KB4.js';
10
10
  export { venn } from './chunk-L3CTXXVZ.js';
11
- export { flowchart } from './chunk-6IGSKU6D.js';
11
+ export { flowchart } from './chunk-UFTYX73U.js';
12
12
  export { genogram } from './chunk-VJGMEGMR.js';
13
13
  export { ecomap } from './chunk-JHDR56XO.js';
14
14
  export { pedigree } from './chunk-ZL5RB4UV.js';
package/dist/react.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkSMXU3KYA_cjs = require('./chunk-SMXU3KYA.cjs');
3
+ var chunk4QPDZJAL_cjs = require('./chunk-4QPDZJAL.cjs');
4
4
  require('./chunk-QUKVGHN4.cjs');
5
- require('./chunk-2Z543TC3.cjs');
5
+ require('./chunk-QMTWG6JL.cjs');
6
6
  require('./chunk-SUIDD2C5.cjs');
7
7
  require('./chunk-N7W5KZK7.cjs');
8
8
  require('./chunk-3M6WB62Y.cjs');
@@ -10,7 +10,7 @@ require('./chunk-SBB6C4OP.cjs');
10
10
  require('./chunk-RYVV5UVI.cjs');
11
11
  require('./chunk-VFZOPRQP.cjs');
12
12
  require('./chunk-BW4KGTV7.cjs');
13
- require('./chunk-VITE3MZQ.cjs');
13
+ require('./chunk-QTNPMIO2.cjs');
14
14
  require('./chunk-TZTCIAYW.cjs');
15
15
  require('./chunk-VZ5LDNHK.cjs');
16
16
  require('./chunk-EGSUMHCS.cjs');
@@ -37,20 +37,18 @@ function SchematexDiagram({
37
37
  onError
38
38
  }) {
39
39
  const svg = react.useMemo(() => {
40
- try {
41
- return chunkSMXU3KYA_cjs.render(dsl, { type, theme, fontFamily, padding });
42
- } catch (err) {
43
- const e = err instanceof Error ? err : new Error(String(err));
44
- onError?.(e);
45
- return null;
40
+ const result = chunk4QPDZJAL_cjs.renderResult(dsl, { type, theme, fontFamily, padding });
41
+ if (!result.ok) {
42
+ onError?.(new Error(result.diagnostics[0]?.message ?? "Schematex render failed"));
46
43
  }
44
+ return result.svg;
47
45
  }, [dsl, type, theme, fontFamily, padding]);
48
46
  return /* @__PURE__ */ jsxRuntime.jsx(
49
47
  "div",
50
48
  {
51
49
  className,
52
50
  style,
53
- dangerouslySetInnerHTML: { __html: svg ?? "" }
51
+ dangerouslySetInnerHTML: { __html: svg }
54
52
  }
55
53
  );
56
54
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/react.tsx"],"names":["useMemo","render","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCO,SAAS,gBAAA,CAAiB;AAAA,EAC/B,GAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAA;AAAA,EACA,UAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAA,EAA0B;AACxB,EAAA,MAAM,GAAA,GAAMA,cAAQ,MAAM;AACxB,IAAA,IAAI;AACF,MAAA,OAAOC,yBAAO,GAAA,EAAK,EAAE,MAAM,KAAA,EAAO,UAAA,EAAY,SAAS,CAAA;AAAA,IACzD,SAAS,GAAA,EAAK;AACZ,MAAA,MAAM,CAAA,GAAI,eAAe,KAAA,GAAQ,GAAA,GAAM,IAAI,KAAA,CAAM,MAAA,CAAO,GAAG,CAAC,CAAA;AAC5D,MAAA,OAAA,GAAU,CAAC,CAAA;AACX,MAAA,OAAO,IAAA;AAAA,IACT;AAAA,EAEF,GAAG,CAAC,GAAA,EAAK,MAAM,KAAA,EAAO,UAAA,EAAY,OAAO,CAAC,CAAA;AAE1C,EAAA,uBACEC,cAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA;AAAA,MACA,KAAA;AAAA,MAEA,uBAAA,EAAyB,EAAE,MAAA,EAAQ,GAAA,IAAO,EAAA;AAAG;AAAA,GAC/C;AAEJ","file":"react.cjs","sourcesContent":["/**\n * React component for Schematex diagrams.\n *\n * @example\n * ```tsx\n * import { SchematexDiagram } from 'schematex/react';\n *\n * <SchematexDiagram\n * dsl=\"genogram\\n alice [female]\"\n * theme=\"monochrome\"\n * className=\"my-diagram\"\n * />\n * ```\n */\n\nimport { useMemo } from \"react\";\nimport { render, type SchematexConfig } from \"./core/api\";\n\nexport interface SchematexDiagramProps {\n /** DSL text to render */\n dsl: string;\n /** Diagram type override (auto-detected from DSL if omitted) */\n type?: SchematexConfig[\"type\"];\n /** Theme name: 'default' | 'monochrome' | 'dark' */\n theme?: string;\n /** Font family override */\n fontFamily?: string;\n /** Canvas padding in px */\n padding?: number;\n /** className for the wrapper div */\n className?: string;\n /** Inline style for the wrapper div */\n style?: React.CSSProperties;\n /** Called when render throws a parse/layout error */\n onError?: (error: Error) => void;\n}\n\nexport function SchematexDiagram({\n dsl,\n type,\n theme,\n fontFamily,\n padding,\n className,\n style,\n onError,\n}: SchematexDiagramProps) {\n const svg = useMemo(() => {\n try {\n return render(dsl, { type, theme, fontFamily, padding });\n } catch (err) {\n const e = err instanceof Error ? err : new Error(String(err));\n onError?.(e);\n return null;\n }\n // onError excluded — a fresh callback shouldn't bust the memo.\n }, [dsl, type, theme, fontFamily, padding]);\n\n return (\n <div\n className={className}\n style={style}\n // SVG is generated by our own renderer — safe\n dangerouslySetInnerHTML={{ __html: svg ?? \"\" }}\n />\n );\n}\n"]}
1
+ {"version":3,"sources":["../src/react.tsx"],"names":["useMemo","renderResult","jsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCO,SAAS,gBAAA,CAAiB;AAAA,EAC/B,GAAA;AAAA,EACA,IAAA;AAAA,EACA,KAAA;AAAA,EACA,UAAA;AAAA,EACA,OAAA;AAAA,EACA,SAAA;AAAA,EACA,KAAA;AAAA,EACA;AACF,CAAA,EAA0B;AACxB,EAAA,MAAM,GAAA,GAAMA,cAAQ,MAAM;AACxB,IAAA,MAAM,MAAA,GAASC,+BAAa,GAAA,EAAK,EAAE,MAAM,KAAA,EAAO,UAAA,EAAY,SAAS,CAAA;AACrE,IAAA,IAAI,CAAC,OAAO,EAAA,EAAI;AACd,MAAA,OAAA,GAAU,IAAI,MAAM,MAAA,CAAO,WAAA,CAAY,CAAC,CAAA,EAAG,OAAA,IAAW,yBAAyB,CAAC,CAAA;AAAA,IAClF;AACA,IAAA,OAAO,MAAA,CAAO,GAAA;AAAA,EAEhB,GAAG,CAAC,GAAA,EAAK,MAAM,KAAA,EAAO,UAAA,EAAY,OAAO,CAAC,CAAA;AAE1C,EAAA,uBACEC,cAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA;AAAA,MACA,KAAA;AAAA,MAEA,uBAAA,EAAyB,EAAE,MAAA,EAAQ,GAAA;AAAI;AAAA,GACzC;AAEJ","file":"react.cjs","sourcesContent":["/**\n * React component for Schematex diagrams.\n *\n * @example\n * ```tsx\n * import { SchematexDiagram } from 'schematex/react';\n *\n * <SchematexDiagram\n * dsl=\"genogram\\n alice [female]\"\n * theme=\"monochrome\"\n * className=\"my-diagram\"\n * />\n * ```\n */\n\nimport { useMemo } from \"react\";\nimport { renderResult, type SchematexConfig } from \"./core/api\";\n\nexport interface SchematexDiagramProps {\n /** DSL text to render */\n dsl: string;\n /** Diagram type override (auto-detected from DSL if omitted) */\n type?: SchematexConfig[\"type\"];\n /** Theme name: 'default' | 'monochrome' | 'dark' */\n theme?: string;\n /** Font family override */\n fontFamily?: string;\n /** Canvas padding in px */\n padding?: number;\n /** className for the wrapper div */\n className?: string;\n /** Inline style for the wrapper div */\n style?: React.CSSProperties;\n /** Called when strict parsing/layout fails before the preview SVG fallback. */\n onError?: (error: Error) => void;\n}\n\nexport function SchematexDiagram({\n dsl,\n type,\n theme,\n fontFamily,\n padding,\n className,\n style,\n onError,\n}: SchematexDiagramProps) {\n const svg = useMemo(() => {\n const result = renderResult(dsl, { type, theme, fontFamily, padding });\n if (!result.ok) {\n onError?.(new Error(result.diagnostics[0]?.message ?? \"Schematex render failed\"));\n }\n return result.svg;\n // onError excluded — a fresh callback shouldn't bust the memo.\n }, [dsl, type, theme, fontFamily, padding]);\n\n return (\n <div\n className={className}\n style={style}\n // SVG is generated by our own renderer — safe\n dangerouslySetInnerHTML={{ __html: svg }}\n />\n );\n}\n"]}
package/dist/react.d.cts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { S as SchematexConfig } from './api-BIj9t4Oc.cjs';
2
+ import { S as SchematexConfig } from './api-C5SECOxZ.cjs';
3
+ import './types-WTr9W5Ud.cjs';
3
4
 
4
5
  interface SchematexDiagramProps {
5
6
  /** DSL text to render */
@@ -16,7 +17,7 @@ interface SchematexDiagramProps {
16
17
  className?: string;
17
18
  /** Inline style for the wrapper div */
18
19
  style?: React.CSSProperties;
19
- /** Called when render throws a parse/layout error */
20
+ /** Called when strict parsing/layout fails before the preview SVG fallback. */
20
21
  onError?: (error: Error) => void;
21
22
  }
22
23
  declare function SchematexDiagram({ dsl, type, theme, fontFamily, padding, className, style, onError, }: SchematexDiagramProps): react_jsx_runtime.JSX.Element;