schematex 0.2.5 → 0.3.0
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 +4 -3
- package/dist/ai/ai-sdk.cjs +10 -10
- package/dist/ai/ai-sdk.d.cts +2 -2
- package/dist/ai/ai-sdk.d.ts +2 -2
- package/dist/ai/ai-sdk.js +5 -5
- package/dist/ai/index.cjs +13 -13
- package/dist/ai/index.d.cts +3 -3
- package/dist/ai/index.d.ts +3 -3
- package/dist/ai/index.js +5 -5
- package/dist/{api-bQZ98gkJ.d.cts → api-BuFilDQB.d.cts} +1 -1
- package/dist/{api-bQZ98gkJ.d.ts → api-BuFilDQB.d.ts} +1 -1
- package/dist/browser.cjs +7 -7
- package/dist/browser.d.cts +2 -2
- package/dist/browser.d.ts +2 -2
- package/dist/browser.js +5 -5
- package/dist/{chunk-UAGSCTYI.cjs → chunk-3FKS4KQK.cjs} +22 -6
- package/dist/chunk-3FKS4KQK.cjs.map +1 -0
- package/dist/{chunk-4S2WILLW.cjs → chunk-K2SOC3XF.cjs} +5 -3
- package/dist/chunk-K2SOC3XF.cjs.map +1 -0
- package/dist/{chunk-LR4X4ZRG.js → chunk-NB56L5QK.js} +18 -14
- package/dist/chunk-NB56L5QK.js.map +1 -0
- package/dist/{chunk-VPKCW4PB.js → chunk-NNU4RGT3.js} +2820 -20
- package/dist/chunk-NNU4RGT3.js.map +1 -0
- package/dist/{chunk-E65ITQXV.cjs → chunk-NZH4GWE6.cjs} +18 -14
- package/dist/chunk-NZH4GWE6.cjs.map +1 -0
- package/dist/{chunk-DPQYGWCT.cjs → chunk-SQKLKBBK.cjs} +32 -5
- package/dist/chunk-SQKLKBBK.cjs.map +1 -0
- package/dist/{chunk-J2LVOWVY.js → chunk-TYCHEOQX.js} +22 -6
- package/dist/chunk-TYCHEOQX.js.map +1 -0
- package/dist/{chunk-MR5HU5WU.js → chunk-VLMK7MQK.js} +30 -3
- package/dist/chunk-VLMK7MQK.js.map +1 -0
- package/dist/{chunk-MSYBSOU2.cjs → chunk-XTATRNUN.cjs} +2824 -22
- package/dist/chunk-XTATRNUN.cjs.map +1 -0
- package/dist/{chunk-PGALHQFF.js → chunk-XZNPAD6E.js} +5 -3
- package/dist/chunk-XZNPAD6E.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.cjs +6 -6
- package/dist/diagrams/ecomap/index.d.cts +1 -1
- package/dist/diagrams/ecomap/index.d.ts +1 -1
- package/dist/diagrams/ecomap/index.js +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.cjs +7 -7
- package/dist/diagrams/flowchart/index.d.cts +2 -2
- package/dist/diagrams/flowchart/index.d.ts +2 -2
- package/dist/diagrams/flowchart/index.js +1 -1
- 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-DcU88F9i.d.ts → index-CUwp4GXI.d.ts} +1 -1
- package/dist/{index-BTZEka65.d.cts → index-ivhNGsyU.d.cts} +1 -1
- package/dist/index.cjs +19 -11
- package/dist/index.d.cts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +4 -4
- package/dist/react.cjs +5 -5
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +4 -4
- package/dist/{types-C4LnMEcB.d.cts → types-Bl-Pn7Wj.d.cts} +1 -1
- package/dist/{types-C4LnMEcB.d.ts → types-Bl-Pn7Wj.d.ts} +1 -1
- package/package.json +2 -2
- package/dist/chunk-4S2WILLW.cjs.map +0 -1
- package/dist/chunk-DPQYGWCT.cjs.map +0 -1
- package/dist/chunk-E65ITQXV.cjs.map +0 -1
- package/dist/chunk-J2LVOWVY.js.map +0 -1
- package/dist/chunk-LR4X4ZRG.js.map +0 -1
- package/dist/chunk-MR5HU5WU.js.map +0 -1
- package/dist/chunk-MSYBSOU2.cjs.map +0 -1
- package/dist/chunk-PGALHQFF.js.map +0 -1
- package/dist/chunk-UAGSCTYI.cjs.map +0 -1
- package/dist/chunk-VPKCW4PB.js.map +0 -1
package/README.md
CHANGED
|
@@ -29,12 +29,13 @@
|
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
32
|
-
**Schematex** is the open-source rendering engine for the diagrams professionals actually use — medical, electrical, legal, and analytical.
|
|
32
|
+
**Schematex** is the open-source rendering engine for the diagrams professionals actually use — medical, electrical, legal, and analytical. 22 diagram families across six domains:
|
|
33
33
|
|
|
34
34
|
- 👪 **Relationships** — genograms, ecomaps, pedigrees, sociograms, phylogenetic trees
|
|
35
|
-
- ⚡ **Electrical & Industrial** — ladder logic, single-line diagrams, circuit schematics, logic gates, timing, block diagrams
|
|
35
|
+
- ⚡ **Electrical & Industrial** — ladder logic, single-line diagrams, circuit schematics, logic gates, timing, block diagrams, **P&ID** (ISA-5.1)
|
|
36
36
|
- 🏢 **Corporate & Legal** — entity structures, cap tables
|
|
37
37
|
- 🐟 **Causality & Analysis** — fishbone / Ishikawa, decision trees (Howard-Raiffa EV · CART/sklearn · taxonomy)
|
|
38
|
+
- 🔄 **Behavior modeling** — UML 2.5 / Harel **state diagrams** (Mermaid-compatible superset)
|
|
38
39
|
- 📅 **Timelines** — proportional / equidistant / log axis · swimlane · gantt · lollipop · BC dates · geological Ma scale
|
|
39
40
|
|
|
40
41
|
Mermaid draws generic flowcharts. Schematex draws the diagrams doctors, engineers, and lawyers actually use — a genogram a genetic counselor accepts clinically, ladder logic that maps 1:1 to IEC 61131-3, a cap table that survives a Series A review.
|
|
@@ -70,7 +71,7 @@ import { render } from 'schematex/genogram';
|
|
|
70
71
|
|
|
71
72
|
## Gallery
|
|
72
73
|
|
|
73
|
-
|
|
74
|
+
22 diagram types, one unified pipeline. **Try any of these live at [schematex.dev/playground](https://schematex.dev/playground).**
|
|
74
75
|
|
|
75
76
|
### 👪 Genogram — *McGoldrick family-systems standard*
|
|
76
77
|
|
package/dist/ai/ai-sdk.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkSQKLKBBK_cjs = require('../chunk-SQKLKBBK.cjs');
|
|
4
|
+
require('../chunk-XTATRNUN.cjs');
|
|
5
5
|
require('../chunk-A5D2IMOX.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-K2SOC3XF.cjs');
|
|
7
7
|
require('../chunk-MCFQAUQV.cjs');
|
|
8
8
|
require('../chunk-B6INLQBU.cjs');
|
|
9
9
|
require('../chunk-3YZ6FPQW.cjs');
|
|
10
10
|
require('../chunk-ZNOD4VZT.cjs');
|
|
11
11
|
require('../chunk-5AEN2PLB.cjs');
|
|
12
12
|
require('../chunk-QSQX77S2.cjs');
|
|
13
|
-
require('../chunk-
|
|
13
|
+
require('../chunk-3FKS4KQK.cjs');
|
|
14
14
|
require('../chunk-MJGDP3CS.cjs');
|
|
15
|
-
require('../chunk-
|
|
15
|
+
require('../chunk-NZH4GWE6.cjs');
|
|
16
16
|
require('../chunk-B37IKTI7.cjs');
|
|
17
17
|
require('../chunk-X7RPFTTR.cjs');
|
|
18
18
|
require('../chunk-COLTVQWR.cjs');
|
|
@@ -28,7 +28,7 @@ var schematexTools = {
|
|
|
28
28
|
listDiagrams: ai.tool({
|
|
29
29
|
description: "List every Schematex diagram type with a tagline, 'use when' hint, domain cluster, and authoritative standard. Call this first to discover what's available.",
|
|
30
30
|
inputSchema: zod.z.object({}),
|
|
31
|
-
execute: async () =>
|
|
31
|
+
execute: async () => chunkSQKLKBBK_cjs.listDiagrams()
|
|
32
32
|
}),
|
|
33
33
|
getSyntax: ai.tool({
|
|
34
34
|
description: "Return a compact syntax reference for one diagram type \u2014 rules, grammar (EBNF), and inline examples. Trimmed for LLM consumption (~2,000\u20134,000 tokens). Call after listDiagrams once you've chosen a type.",
|
|
@@ -37,7 +37,7 @@ var schematexTools = {
|
|
|
37
37
|
"Diagram type id from listDiagrams (e.g. 'genogram', 'sld', 'fishbone')."
|
|
38
38
|
)
|
|
39
39
|
}),
|
|
40
|
-
execute: async ({ type }) =>
|
|
40
|
+
execute: async ({ type }) => chunkSQKLKBBK_cjs.getSyntax(type)
|
|
41
41
|
}),
|
|
42
42
|
getExamples: ai.tool({
|
|
43
43
|
description: "Return curated real-world DSL examples for a diagram type, each with scenario notes and tags. Use as few-shot context before generating DSL.",
|
|
@@ -47,7 +47,7 @@ var schematexTools = {
|
|
|
47
47
|
preferFeatured: zod.z.boolean().optional().describe("Rank featured examples first."),
|
|
48
48
|
maxComplexity: zod.z.number().int().min(1).max(5).optional().describe("Only return examples with complexity <= this value (1=simplest).")
|
|
49
49
|
}),
|
|
50
|
-
execute: async (args) =>
|
|
50
|
+
execute: async (args) => chunkSQKLKBBK_cjs.getExamples(args.type, {
|
|
51
51
|
limit: args.limit,
|
|
52
52
|
preferFeatured: args.preferFeatured,
|
|
53
53
|
maxComplexity: args.maxComplexity
|
|
@@ -61,7 +61,7 @@ var schematexTools = {
|
|
|
61
61
|
),
|
|
62
62
|
dsl: zod.z.string().describe("The DSL source text to validate.")
|
|
63
63
|
}),
|
|
64
|
-
execute: async ({ type, dsl }) =>
|
|
64
|
+
execute: async ({ type, dsl }) => chunkSQKLKBBK_cjs.validateDsl(type, dsl)
|
|
65
65
|
}),
|
|
66
66
|
renderDsl: ai.tool({
|
|
67
67
|
description: "Render Schematex DSL to an SVG string. Returns { ok: true, svg } or { ok: false, errors }. Use when the caller needs the actual diagram output, not just validation.",
|
|
@@ -76,7 +76,7 @@ var schematexTools = {
|
|
|
76
76
|
dsl,
|
|
77
77
|
theme,
|
|
78
78
|
padding
|
|
79
|
-
}) =>
|
|
79
|
+
}) => chunkSQKLKBBK_cjs.renderDsl(type, dsl, { theme, padding })
|
|
80
80
|
})
|
|
81
81
|
};
|
|
82
82
|
|
package/dist/ai/ai-sdk.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as ai from 'ai';
|
|
2
2
|
import { DiagramListItem, GetSyntaxResult, GetExamplesResult, ValidateDslResult, RenderDslResult } from './index.cjs';
|
|
3
|
-
import '../api-
|
|
4
|
-
import '../types-
|
|
3
|
+
import '../api-BuFilDQB.cjs';
|
|
4
|
+
import '../types-Bl-Pn7Wj.cjs';
|
|
5
5
|
|
|
6
6
|
declare const schematexTools: {
|
|
7
7
|
readonly listDiagrams: ai.Tool<{}, DiagramListItem[]>;
|
package/dist/ai/ai-sdk.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as ai from 'ai';
|
|
2
2
|
import { DiagramListItem, GetSyntaxResult, GetExamplesResult, ValidateDslResult, RenderDslResult } from './index.js';
|
|
3
|
-
import '../api-
|
|
4
|
-
import '../types-
|
|
3
|
+
import '../api-BuFilDQB.js';
|
|
4
|
+
import '../types-Bl-Pn7Wj.js';
|
|
5
5
|
|
|
6
6
|
declare const schematexTools: {
|
|
7
7
|
readonly listDiagrams: ai.Tool<{}, DiagramListItem[]>;
|
package/dist/ai/ai-sdk.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { renderDsl, validateDsl, getExamples, getSyntax, listDiagrams } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
import { renderDsl, validateDsl, getExamples, getSyntax, listDiagrams } from '../chunk-VLMK7MQK.js';
|
|
2
|
+
import '../chunk-NNU4RGT3.js';
|
|
3
3
|
import '../chunk-FCGHV6ZK.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-XZNPAD6E.js';
|
|
5
5
|
import '../chunk-UGCUNADI.js';
|
|
6
6
|
import '../chunk-U6L3FAML.js';
|
|
7
7
|
import '../chunk-FE6GAUNW.js';
|
|
8
8
|
import '../chunk-M5B2UUNW.js';
|
|
9
9
|
import '../chunk-ZNDIGQJD.js';
|
|
10
10
|
import '../chunk-JDTB7IKL.js';
|
|
11
|
-
import '../chunk-
|
|
11
|
+
import '../chunk-TYCHEOQX.js';
|
|
12
12
|
import '../chunk-H2OEUBPO.js';
|
|
13
|
-
import '../chunk-
|
|
13
|
+
import '../chunk-NB56L5QK.js';
|
|
14
14
|
import '../chunk-OC22GGQN.js';
|
|
15
15
|
import '../chunk-YQANC7HQ.js';
|
|
16
16
|
import '../chunk-RP5UATRA.js';
|
package/dist/ai/index.cjs
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkSQKLKBBK_cjs = require('../chunk-SQKLKBBK.cjs');
|
|
4
|
+
require('../chunk-XTATRNUN.cjs');
|
|
5
5
|
require('../chunk-A5D2IMOX.cjs');
|
|
6
|
-
require('../chunk-
|
|
6
|
+
require('../chunk-K2SOC3XF.cjs');
|
|
7
7
|
require('../chunk-MCFQAUQV.cjs');
|
|
8
8
|
require('../chunk-B6INLQBU.cjs');
|
|
9
9
|
require('../chunk-3YZ6FPQW.cjs');
|
|
10
10
|
require('../chunk-ZNOD4VZT.cjs');
|
|
11
11
|
require('../chunk-5AEN2PLB.cjs');
|
|
12
12
|
require('../chunk-QSQX77S2.cjs');
|
|
13
|
-
require('../chunk-
|
|
13
|
+
require('../chunk-3FKS4KQK.cjs');
|
|
14
14
|
require('../chunk-MJGDP3CS.cjs');
|
|
15
|
-
require('../chunk-
|
|
15
|
+
require('../chunk-NZH4GWE6.cjs');
|
|
16
16
|
require('../chunk-B37IKTI7.cjs');
|
|
17
17
|
require('../chunk-X7RPFTTR.cjs');
|
|
18
18
|
require('../chunk-COLTVQWR.cjs');
|
|
@@ -26,35 +26,35 @@ require('../chunk-HDKDQAEQ.cjs');
|
|
|
26
26
|
|
|
27
27
|
Object.defineProperty(exports, "DIAGRAM_REGISTRY", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkSQKLKBBK_cjs.DIAGRAM_REGISTRY; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "getAllDiagramTypes", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkSQKLKBBK_cjs.getAllDiagramTypes; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "getDiagramMeta", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkSQKLKBBK_cjs.getDiagramMeta; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "getExamples", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkSQKLKBBK_cjs.getExamples; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "getSyntax", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkSQKLKBBK_cjs.getSyntax; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "listDiagrams", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkSQKLKBBK_cjs.listDiagrams; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "renderDsl", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkSQKLKBBK_cjs.renderDsl; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "validateDsl", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkSQKLKBBK_cjs.validateDsl; }
|
|
58
58
|
});
|
|
59
59
|
//# sourceMappingURL=index.cjs.map
|
|
60
60
|
//# sourceMappingURL=index.cjs.map
|
package/dist/ai/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SchematexConfig } from '../api-
|
|
2
|
-
import { q as DiagramType } from '../types-
|
|
1
|
+
import { S as SchematexConfig } from '../api-BuFilDQB.cjs';
|
|
2
|
+
import { q as DiagramType } from '../types-Bl-Pn7Wj.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Diagram registry — metadata for every diagram type Schematex supports.
|
|
@@ -8,7 +8,7 @@ import { q as DiagramType } from '../types-C4LnMEcB.cjs';
|
|
|
8
8
|
* are tuned to help the model pick the right type for a user request.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
type DiagramCluster = "relationships" | "electrical-industrial" | "corporate-legal" | "causality-analysis" | "generic" | "strategy" | "knowledge";
|
|
11
|
+
type DiagramCluster = "relationships" | "electrical-industrial" | "corporate-legal" | "causality-analysis" | "generic" | "strategy" | "knowledge" | "behavior-modeling";
|
|
12
12
|
interface DiagramMeta {
|
|
13
13
|
/** Canonical type id — matches `DiagramType` and plugin keys. */
|
|
14
14
|
type: DiagramType;
|
package/dist/ai/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SchematexConfig } from '../api-
|
|
2
|
-
import { q as DiagramType } from '../types-
|
|
1
|
+
import { S as SchematexConfig } from '../api-BuFilDQB.js';
|
|
2
|
+
import { q as DiagramType } from '../types-Bl-Pn7Wj.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Diagram registry — metadata for every diagram type Schematex supports.
|
|
@@ -8,7 +8,7 @@ import { q as DiagramType } from '../types-C4LnMEcB.js';
|
|
|
8
8
|
* are tuned to help the model pick the right type for a user request.
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
type DiagramCluster = "relationships" | "electrical-industrial" | "corporate-legal" | "causality-analysis" | "generic" | "strategy" | "knowledge";
|
|
11
|
+
type DiagramCluster = "relationships" | "electrical-industrial" | "corporate-legal" | "causality-analysis" | "generic" | "strategy" | "knowledge" | "behavior-modeling";
|
|
12
12
|
interface DiagramMeta {
|
|
13
13
|
/** Canonical type id — matches `DiagramType` and plugin keys. */
|
|
14
14
|
type: DiagramType;
|
package/dist/ai/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export { DIAGRAM_REGISTRY, getAllDiagramTypes, getDiagramMeta, getExamples, getSyntax, listDiagrams, renderDsl, validateDsl } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { DIAGRAM_REGISTRY, getAllDiagramTypes, getDiagramMeta, getExamples, getSyntax, listDiagrams, renderDsl, validateDsl } from '../chunk-VLMK7MQK.js';
|
|
2
|
+
import '../chunk-NNU4RGT3.js';
|
|
3
3
|
import '../chunk-FCGHV6ZK.js';
|
|
4
|
-
import '../chunk-
|
|
4
|
+
import '../chunk-XZNPAD6E.js';
|
|
5
5
|
import '../chunk-UGCUNADI.js';
|
|
6
6
|
import '../chunk-U6L3FAML.js';
|
|
7
7
|
import '../chunk-FE6GAUNW.js';
|
|
8
8
|
import '../chunk-M5B2UUNW.js';
|
|
9
9
|
import '../chunk-ZNDIGQJD.js';
|
|
10
10
|
import '../chunk-JDTB7IKL.js';
|
|
11
|
-
import '../chunk-
|
|
11
|
+
import '../chunk-TYCHEOQX.js';
|
|
12
12
|
import '../chunk-H2OEUBPO.js';
|
|
13
|
-
import '../chunk-
|
|
13
|
+
import '../chunk-NB56L5QK.js';
|
|
14
14
|
import '../chunk-OC22GGQN.js';
|
|
15
15
|
import '../chunk-YQANC7HQ.js';
|
|
16
16
|
import '../chunk-RP5UATRA.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
interface SchematexConfig {
|
|
2
|
-
type?: "genogram" | "ecomap" | "pedigree" | "phylo" | "sociogram" | "timing" | "logic" | "circuit" | "blockdiagram" | "ladder" | "sld" | "entity" | "fishbone" | "venn" | "flowchart" | "mindmap" | "matrix" | "orgchart" | "decisiontree" | "timeline";
|
|
2
|
+
type?: "genogram" | "ecomap" | "pedigree" | "phylo" | "sociogram" | "timing" | "logic" | "circuit" | "blockdiagram" | "ladder" | "sld" | "entity" | "fishbone" | "venn" | "flowchart" | "mindmap" | "matrix" | "orgchart" | "decisiontree" | "timeline" | "state" | "pid";
|
|
3
3
|
width?: number;
|
|
4
4
|
height?: number;
|
|
5
5
|
padding?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
interface SchematexConfig {
|
|
2
|
-
type?: "genogram" | "ecomap" | "pedigree" | "phylo" | "sociogram" | "timing" | "logic" | "circuit" | "blockdiagram" | "ladder" | "sld" | "entity" | "fishbone" | "venn" | "flowchart" | "mindmap" | "matrix" | "orgchart" | "decisiontree" | "timeline";
|
|
2
|
+
type?: "genogram" | "ecomap" | "pedigree" | "phylo" | "sociogram" | "timing" | "logic" | "circuit" | "blockdiagram" | "ladder" | "sld" | "entity" | "fishbone" | "venn" | "flowchart" | "mindmap" | "matrix" | "orgchart" | "decisiontree" | "timeline" | "state" | "pid";
|
|
3
3
|
width?: number;
|
|
4
4
|
height?: number;
|
|
5
5
|
padding?: number;
|
package/dist/browser.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkXTATRNUN_cjs = require('./chunk-XTATRNUN.cjs');
|
|
4
4
|
require('./chunk-A5D2IMOX.cjs');
|
|
5
|
-
require('./chunk-
|
|
5
|
+
require('./chunk-K2SOC3XF.cjs');
|
|
6
6
|
require('./chunk-MCFQAUQV.cjs');
|
|
7
7
|
require('./chunk-B6INLQBU.cjs');
|
|
8
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-
|
|
12
|
+
require('./chunk-3FKS4KQK.cjs');
|
|
13
13
|
require('./chunk-MJGDP3CS.cjs');
|
|
14
|
-
require('./chunk-
|
|
14
|
+
require('./chunk-NZH4GWE6.cjs');
|
|
15
15
|
require('./chunk-B37IKTI7.cjs');
|
|
16
16
|
require('./chunk-X7RPFTTR.cjs');
|
|
17
17
|
require('./chunk-COLTVQWR.cjs');
|
|
@@ -23,7 +23,7 @@ require('./chunk-HDKDQAEQ.cjs');
|
|
|
23
23
|
|
|
24
24
|
// src/browser.ts
|
|
25
25
|
function renderToElement(text, config) {
|
|
26
|
-
const svgString =
|
|
26
|
+
const svgString = chunkXTATRNUN_cjs.render(text, config);
|
|
27
27
|
const parser = new DOMParser();
|
|
28
28
|
const doc = parser.parseFromString(svgString, "image/svg+xml");
|
|
29
29
|
const el = doc.documentElement;
|
|
@@ -34,12 +34,12 @@ function renderToElement(text, config) {
|
|
|
34
34
|
return el;
|
|
35
35
|
}
|
|
36
36
|
function renderToContainer(text, container, config) {
|
|
37
|
-
container.innerHTML =
|
|
37
|
+
container.innerHTML = chunkXTATRNUN_cjs.render(text, config);
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
Object.defineProperty(exports, "render", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkXTATRNUN_cjs.render; }
|
|
43
43
|
});
|
|
44
44
|
exports.renderToContainer = renderToContainer;
|
|
45
45
|
exports.renderToElement = renderToElement;
|
package/dist/browser.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SchematexConfig } from './api-
|
|
2
|
-
export { r as render } from './api-
|
|
1
|
+
import { S as SchematexConfig } from './api-BuFilDQB.cjs';
|
|
2
|
+
export { r as render } from './api-BuFilDQB.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Browser-specific utilities for Schematex.
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as SchematexConfig } from './api-
|
|
2
|
-
export { r as render } from './api-
|
|
1
|
+
import { S as SchematexConfig } from './api-BuFilDQB.js';
|
|
2
|
+
export { r as render } from './api-BuFilDQB.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Browser-specific utilities for Schematex.
|
package/dist/browser.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { render } from './chunk-
|
|
2
|
-
export { render } from './chunk-
|
|
1
|
+
import { render } from './chunk-NNU4RGT3.js';
|
|
2
|
+
export { render } from './chunk-NNU4RGT3.js';
|
|
3
3
|
import './chunk-FCGHV6ZK.js';
|
|
4
|
-
import './chunk-
|
|
4
|
+
import './chunk-XZNPAD6E.js';
|
|
5
5
|
import './chunk-UGCUNADI.js';
|
|
6
6
|
import './chunk-U6L3FAML.js';
|
|
7
7
|
import './chunk-FE6GAUNW.js';
|
|
8
8
|
import './chunk-M5B2UUNW.js';
|
|
9
9
|
import './chunk-ZNDIGQJD.js';
|
|
10
10
|
import './chunk-JDTB7IKL.js';
|
|
11
|
-
import './chunk-
|
|
11
|
+
import './chunk-TYCHEOQX.js';
|
|
12
12
|
import './chunk-H2OEUBPO.js';
|
|
13
|
-
import './chunk-
|
|
13
|
+
import './chunk-NB56L5QK.js';
|
|
14
14
|
import './chunk-OC22GGQN.js';
|
|
15
15
|
import './chunk-YQANC7HQ.js';
|
|
16
16
|
import './chunk-RP5UATRA.js';
|
|
@@ -1417,8 +1417,8 @@ function layoutFlowchart(ast) {
|
|
|
1417
1417
|
const hasClusters = ast.subgraphs.length > 0;
|
|
1418
1418
|
const CLUSTER_OVERHEAD_TITLE = hasClusters ? CLUSTER_GEO.pad + CLUSTER_GEO.titleH : 0;
|
|
1419
1419
|
const CLUSTER_OVERHEAD_SIDE = hasClusters ? CLUSTER_GEO.pad : 0;
|
|
1420
|
-
const extraTopPad = isHorizontal ?
|
|
1421
|
-
const extraLeftPad = isHorizontal ? CLUSTER_OVERHEAD_TITLE : CLUSTER_OVERHEAD_SIDE;
|
|
1420
|
+
const extraTopPad = !isHorizontal && dir !== "BT" ? CLUSTER_OVERHEAD_TITLE : CLUSTER_OVERHEAD_SIDE;
|
|
1421
|
+
const extraLeftPad = isHorizontal && dir !== "RL" ? CLUSTER_OVERHEAD_TITLE : CLUSTER_OVERHEAD_SIDE;
|
|
1422
1422
|
const topLevelOf = (sgId) => {
|
|
1423
1423
|
let cur = sgId;
|
|
1424
1424
|
let safety = 32;
|
|
@@ -1509,8 +1509,8 @@ function layoutFlowchart(ast) {
|
|
|
1509
1509
|
});
|
|
1510
1510
|
}
|
|
1511
1511
|
}
|
|
1512
|
-
const extraRightPad = isHorizontal ?
|
|
1513
|
-
const extraBottomPad = isHorizontal ?
|
|
1512
|
+
const extraRightPad = isHorizontal && dir === "RL" ? CLUSTER_OVERHEAD_TITLE : CLUSTER_OVERHEAD_SIDE;
|
|
1513
|
+
const extraBottomPad = !isHorizontal && dir === "BT" ? CLUSTER_OVERHEAD_TITLE : CLUSTER_OVERHEAD_SIDE;
|
|
1514
1514
|
const canvasW = maxX - minX + 2 * padding + extraLeftPad + extraRightPad;
|
|
1515
1515
|
const lastLayer = layerCenterY.length - 1;
|
|
1516
1516
|
const canvasH = lastLayer >= 0 ? layerCenterY[lastLayer] + layerHeights[lastLayer] / 2 + padding + extraBottomPad : 2 * padding;
|
|
@@ -1553,6 +1553,22 @@ function layoutFlowchart(ast) {
|
|
|
1553
1553
|
if (!isHorizontal) dummyCenter.set(id, p);
|
|
1554
1554
|
else dummyCenter.set(id, { x: p.y, y: p.x });
|
|
1555
1555
|
}
|
|
1556
|
+
if (dir === "BT" || dir === "RL") {
|
|
1557
|
+
const flipY = dir === "BT";
|
|
1558
|
+
const flipX = dir === "RL";
|
|
1559
|
+
for (const n of outNodes) {
|
|
1560
|
+
if (flipY) n.y = outHeight - n.y - n.height;
|
|
1561
|
+
if (flipX) n.x = outWidth - n.x - n.width;
|
|
1562
|
+
}
|
|
1563
|
+
for (const c of nodeCenter.values()) {
|
|
1564
|
+
if (flipY) c.y = outHeight - c.y;
|
|
1565
|
+
if (flipX) c.x = outWidth - c.x;
|
|
1566
|
+
}
|
|
1567
|
+
for (const c of dummyCenter.values()) {
|
|
1568
|
+
if (flipY) c.y = outHeight - c.y;
|
|
1569
|
+
if (flipX) c.x = outWidth - c.x;
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1556
1572
|
const outEdges = updatedEdges.map((le) => {
|
|
1557
1573
|
const chain = le.chain.length > 0 ? le.chain : [le.from, le.to];
|
|
1558
1574
|
const points = [];
|
|
@@ -2029,5 +2045,5 @@ exports.layoutFlowchart = layoutFlowchart;
|
|
|
2029
2045
|
exports.parseFlowchart = parseFlowchart;
|
|
2030
2046
|
exports.renderFlowchart = renderFlowchart;
|
|
2031
2047
|
exports.renderFlowchartAST = renderFlowchartAST;
|
|
2032
|
-
//# sourceMappingURL=chunk-
|
|
2033
|
-
//# sourceMappingURL=chunk-
|
|
2048
|
+
//# sourceMappingURL=chunk-3FKS4KQK.cjs.map
|
|
2049
|
+
//# sourceMappingURL=chunk-3FKS4KQK.cjs.map
|