schematex 0.5.0 → 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.
- package/README.md +15 -7
- package/dist/ai/ai-sdk.cjs +18 -12
- package/dist/ai/ai-sdk.cjs.map +1 -1
- package/dist/ai/ai-sdk.d.cts +4 -3
- package/dist/ai/ai-sdk.d.ts +4 -3
- package/dist/ai/ai-sdk.js +14 -8
- package/dist/ai/ai-sdk.js.map +1 -1
- package/dist/ai/index.cjs +15 -11
- package/dist/ai/index.d.cts +20 -153
- package/dist/ai/index.d.ts +20 -153
- package/dist/ai/index.js +3 -3
- package/dist/api-C5SECOxZ.d.cts +69 -0
- package/dist/api-Cr_MxttI.d.ts +69 -0
- package/dist/browser.cjs +23 -5
- package/dist/browser.cjs.map +1 -1
- package/dist/browser.d.cts +12 -3
- package/dist/browser.d.ts +12 -3
- package/dist/browser.js +13 -5
- package/dist/browser.js.map +1 -1
- package/dist/{chunk-3YUUC6RN.cjs → chunk-4QPDZJAL.cjs} +1421 -37
- package/dist/chunk-4QPDZJAL.cjs.map +1 -0
- package/dist/{chunk-NWPCY65Z.cjs → chunk-HK56GQQP.cjs} +544 -61
- package/dist/chunk-HK56GQQP.cjs.map +1 -0
- package/dist/{chunk-GTDQAN2Z.js → chunk-OK5ZS3LU.js} +1419 -38
- package/dist/chunk-OK5ZS3LU.js.map +1 -0
- package/dist/{chunk-XRCY75UV.cjs → chunk-QMTWG6JL.cjs} +947 -916
- package/dist/chunk-QMTWG6JL.cjs.map +1 -0
- package/dist/{chunk-HUPDIRBX.js → chunk-VCH7RI5H.js} +947 -916
- package/dist/chunk-VCH7RI5H.js.map +1 -0
- package/dist/{chunk-IM4RCUHA.js → chunk-VKPCR7BG.js} +544 -62
- package/dist/chunk-VKPCR7BG.js.map +1 -0
- package/dist/diagrams/blockdiagram/index.d.cts +1 -1
- package/dist/diagrams/blockdiagram/index.d.ts +1 -1
- package/dist/diagrams/circuit/index.cjs +7 -7
- package/dist/diagrams/circuit/index.d.cts +1 -1
- package/dist/diagrams/circuit/index.d.ts +1 -1
- package/dist/diagrams/circuit/index.js +1 -1
- package/dist/diagrams/ecomap/index.d.cts +1 -1
- package/dist/diagrams/ecomap/index.d.ts +1 -1
- package/dist/diagrams/entity/index.d.cts +1 -1
- package/dist/diagrams/entity/index.d.ts +1 -1
- package/dist/diagrams/fishbone/index.d.cts +1 -1
- package/dist/diagrams/fishbone/index.d.ts +1 -1
- package/dist/diagrams/flowchart/index.d.cts +2 -2
- package/dist/diagrams/flowchart/index.d.ts +2 -2
- package/dist/diagrams/genogram/index.d.cts +1 -1
- package/dist/diagrams/genogram/index.d.ts +1 -1
- package/dist/diagrams/ladder/index.d.cts +1 -1
- package/dist/diagrams/ladder/index.d.ts +1 -1
- package/dist/diagrams/logic/index.d.cts +1 -1
- package/dist/diagrams/logic/index.d.ts +1 -1
- package/dist/diagrams/orgchart/index.d.cts +1 -1
- package/dist/diagrams/orgchart/index.d.ts +1 -1
- package/dist/diagrams/pedigree/index.d.cts +1 -1
- package/dist/diagrams/pedigree/index.d.ts +1 -1
- package/dist/diagrams/phylo/index.d.cts +1 -1
- package/dist/diagrams/phylo/index.d.ts +1 -1
- package/dist/diagrams/sld/index.d.cts +1 -1
- package/dist/diagrams/sld/index.d.ts +1 -1
- package/dist/diagrams/sociogram/index.d.cts +1 -1
- package/dist/diagrams/sociogram/index.d.ts +1 -1
- package/dist/diagrams/timing/index.d.cts +1 -1
- package/dist/diagrams/timing/index.d.ts +1 -1
- package/dist/diagrams/venn/index.d.cts +1 -1
- package/dist/diagrams/venn/index.d.ts +1 -1
- package/dist/{index-C9A0h-CB.d.cts → index-BD2yDfQM.d.cts} +1 -1
- package/dist/{index-CJai_TEZ.d.ts → index-C30zQWZI.d.ts} +1 -1
- package/dist/index.cjs +24 -12
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/react.cjs +7 -9
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +3 -2
- package/dist/react.d.ts +3 -2
- package/dist/react.js +7 -9
- package/dist/react.js.map +1 -1
- package/dist/tools-BHWaJPOl.d.ts +153 -0
- package/dist/tools-DlpuE76u.d.cts +153 -0
- package/dist/{types-BOAsqHoU.d.cts → types-WTr9W5Ud.d.cts} +2 -2
- package/dist/{types-BOAsqHoU.d.ts → types-WTr9W5Ud.d.ts} +2 -2
- package/package.json +2 -2
- package/dist/api-C5UcmT7n.d.cts +0 -22
- package/dist/api-C5UcmT7n.d.ts +0 -22
- package/dist/chunk-3YUUC6RN.cjs.map +0 -1
- package/dist/chunk-GTDQAN2Z.js.map +0 -1
- package/dist/chunk-HUPDIRBX.js.map +0 -1
- package/dist/chunk-IM4RCUHA.js.map +0 -1
- package/dist/chunk-NWPCY65Z.cjs.map +0 -1
- package/dist/chunk-XRCY75UV.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
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
|
|
12
|
+
get: function () { return chunkQMTWG6JL_cjs.circuit; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "layoutCircuit", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkQMTWG6JL_cjs.layoutCircuit; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "layoutCircuitNetlist", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkQMTWG6JL_cjs.layoutCircuitNetlist; }
|
|
21
21
|
});
|
|
22
22
|
Object.defineProperty(exports, "parseCircuit", {
|
|
23
23
|
enumerable: true,
|
|
24
|
-
get: function () { return
|
|
24
|
+
get: function () { return chunkQMTWG6JL_cjs.parseCircuit; }
|
|
25
25
|
});
|
|
26
26
|
Object.defineProperty(exports, "parseNetlist", {
|
|
27
27
|
enumerable: true,
|
|
28
|
-
get: function () { return
|
|
28
|
+
get: function () { return chunkQMTWG6JL_cjs.parseNetlist; }
|
|
29
29
|
});
|
|
30
30
|
Object.defineProperty(exports, "renderCircuit", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
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,
|
|
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,
|
|
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-
|
|
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-
|
|
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-
|
|
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,
|
|
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,
|
|
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,2 +1,2 @@
|
|
|
1
|
-
import '../../types-
|
|
2
|
-
export { F as FC_CONST, g as flowchart, n as layoutFlowchart, p as parseFlowchart, o as renderFlowchart, q as renderFlowchartAST } from '../../index-
|
|
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-
|
|
2
|
-
export { F as FC_CONST, g as flowchart, n as layoutFlowchart, p as parseFlowchart, o as renderFlowchart, q as renderFlowchartAST } from '../../index-
|
|
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
|
-
import { a as DiagramAST, L as LayoutConfig, b as LayoutResult, R as RenderConfig, I as Individual, D as DiagramPlugin } from '../../types-
|
|
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-
|
|
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 {
|
|
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 {
|
|
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 { a as DiagramAST, L as LayoutConfig, b as LayoutResult, R as RenderConfig, D as DiagramPlugin } from '../../types-
|
|
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-
|
|
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-
|
|
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-
|
|
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,
|
|
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,
|
|
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-
|
|
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-
|
|
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";
|
package/dist/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk4QPDZJAL_cjs = require('./chunk-4QPDZJAL.cjs');
|
|
4
4
|
var chunkQUKVGHN4_cjs = require('./chunk-QUKVGHN4.cjs');
|
|
5
|
-
var
|
|
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');
|
|
@@ -28,39 +28,51 @@ require('./chunk-3WNW5Y7P.cjs');
|
|
|
28
28
|
|
|
29
29
|
Object.defineProperty(exports, "decisiontree", {
|
|
30
30
|
enumerable: true,
|
|
31
|
-
get: function () { return
|
|
31
|
+
get: function () { return chunk4QPDZJAL_cjs.decisiontree; }
|
|
32
32
|
});
|
|
33
33
|
Object.defineProperty(exports, "parse", {
|
|
34
34
|
enumerable: true,
|
|
35
|
-
get: function () { return
|
|
35
|
+
get: function () { return chunk4QPDZJAL_cjs.parse; }
|
|
36
|
+
});
|
|
37
|
+
Object.defineProperty(exports, "parseResult", {
|
|
38
|
+
enumerable: true,
|
|
39
|
+
get: function () { return chunk4QPDZJAL_cjs.parseResult; }
|
|
36
40
|
});
|
|
37
41
|
Object.defineProperty(exports, "pert", {
|
|
38
42
|
enumerable: true,
|
|
39
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunk4QPDZJAL_cjs.pert; }
|
|
40
44
|
});
|
|
41
45
|
Object.defineProperty(exports, "pid", {
|
|
42
46
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
47
|
+
get: function () { return chunk4QPDZJAL_cjs.pid; }
|
|
44
48
|
});
|
|
45
49
|
Object.defineProperty(exports, "prisma", {
|
|
46
50
|
enumerable: true,
|
|
47
|
-
get: function () { return
|
|
51
|
+
get: function () { return chunk4QPDZJAL_cjs.prisma; }
|
|
48
52
|
});
|
|
49
53
|
Object.defineProperty(exports, "render", {
|
|
50
54
|
enumerable: true,
|
|
51
|
-
get: function () { return
|
|
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; }
|
|
52
64
|
});
|
|
53
65
|
Object.defineProperty(exports, "state", {
|
|
54
66
|
enumerable: true,
|
|
55
|
-
get: function () { return
|
|
67
|
+
get: function () { return chunk4QPDZJAL_cjs.state; }
|
|
56
68
|
});
|
|
57
69
|
Object.defineProperty(exports, "timeline", {
|
|
58
70
|
enumerable: true,
|
|
59
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunk4QPDZJAL_cjs.timeline; }
|
|
60
72
|
});
|
|
61
73
|
Object.defineProperty(exports, "usecase", {
|
|
62
74
|
enumerable: true,
|
|
63
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunk4QPDZJAL_cjs.usecase; }
|
|
64
76
|
});
|
|
65
77
|
Object.defineProperty(exports, "orgchart", {
|
|
66
78
|
enumerable: true,
|
|
@@ -68,7 +80,7 @@ Object.defineProperty(exports, "orgchart", {
|
|
|
68
80
|
});
|
|
69
81
|
Object.defineProperty(exports, "circuit", {
|
|
70
82
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
83
|
+
get: function () { return chunkQMTWG6JL_cjs.circuit; }
|
|
72
84
|
});
|
|
73
85
|
Object.defineProperty(exports, "blockdiagram", {
|
|
74
86
|
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-
|
|
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-
|
|
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-
|
|
18
|
+
import { D as DiagramPlugin } from './types-WTr9W5Ud.cjs';
|
|
19
19
|
|
|
20
20
|
declare const decisiontree: DiagramPlugin;
|
|
21
21
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { S as SchematexConfig, p as parse, r as render } from './api-
|
|
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-
|
|
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-
|
|
18
|
+
import { D as DiagramPlugin } from './types-WTr9W5Ud.js';
|
|
19
19
|
|
|
20
20
|
declare const decisiontree: DiagramPlugin;
|
|
21
21
|
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { decisiontree, parse, pert, pid, prisma, render, state, timeline, usecase } from './chunk-
|
|
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-
|
|
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';
|
package/dist/react.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk4QPDZJAL_cjs = require('./chunk-4QPDZJAL.cjs');
|
|
4
4
|
require('./chunk-QUKVGHN4.cjs');
|
|
5
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-QMTWG6JL.cjs');
|
|
6
6
|
require('./chunk-SUIDD2C5.cjs');
|
|
7
7
|
require('./chunk-N7W5KZK7.cjs');
|
|
8
8
|
require('./chunk-3M6WB62Y.cjs');
|
|
@@ -37,20 +37,18 @@ function SchematexDiagram({
|
|
|
37
37
|
onError
|
|
38
38
|
}) {
|
|
39
39
|
const svg = react.useMemo(() => {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
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
|
}
|
package/dist/react.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/react.tsx"],"names":["useMemo","
|
|
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-
|
|
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
|
|
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;
|
package/dist/react.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { S as SchematexConfig } from './api-
|
|
2
|
+
import { S as SchematexConfig } from './api-Cr_MxttI.js';
|
|
3
|
+
import './types-WTr9W5Ud.js';
|
|
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
|
|
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;
|
package/dist/react.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { renderResult } from './chunk-OK5ZS3LU.js';
|
|
2
2
|
import './chunk-I55HO32M.js';
|
|
3
|
-
import './chunk-
|
|
3
|
+
import './chunk-VCH7RI5H.js';
|
|
4
4
|
import './chunk-EPKIJEH7.js';
|
|
5
5
|
import './chunk-IBRW3UOA.js';
|
|
6
6
|
import './chunk-6OSUNBZY.js';
|
|
@@ -35,20 +35,18 @@ function SchematexDiagram({
|
|
|
35
35
|
onError
|
|
36
36
|
}) {
|
|
37
37
|
const svg = useMemo(() => {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
const e = err instanceof Error ? err : new Error(String(err));
|
|
42
|
-
onError?.(e);
|
|
43
|
-
return null;
|
|
38
|
+
const result = renderResult(dsl, { type, theme, fontFamily, padding });
|
|
39
|
+
if (!result.ok) {
|
|
40
|
+
onError?.(new Error(result.diagnostics[0]?.message ?? "Schematex render failed"));
|
|
44
41
|
}
|
|
42
|
+
return result.svg;
|
|
45
43
|
}, [dsl, type, theme, fontFamily, padding]);
|
|
46
44
|
return /* @__PURE__ */ jsx(
|
|
47
45
|
"div",
|
|
48
46
|
{
|
|
49
47
|
className,
|
|
50
48
|
style,
|
|
51
|
-
dangerouslySetInnerHTML: { __html: svg
|
|
49
|
+
dangerouslySetInnerHTML: { __html: svg }
|
|
52
50
|
}
|
|
53
51
|
);
|
|
54
52
|
}
|
package/dist/react.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/react.tsx"],"names":[],"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,GAAM,QAAQ,MAAM;AACxB,IAAA,
|
|
1
|
+
{"version":3,"sources":["../src/react.tsx"],"names":[],"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,GAAM,QAAQ,MAAM;AACxB,IAAA,MAAM,MAAA,GAAS,aAAa,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,uBACE,GAAA;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.js","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"]}
|