schematex 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/ai-sdk.cjs +9 -9
- package/dist/ai/ai-sdk.d.cts +4 -4
- package/dist/ai/ai-sdk.d.ts +4 -4
- package/dist/ai/ai-sdk.js +4 -4
- package/dist/ai/index.cjs +15 -15
- package/dist/ai/index.d.cts +3 -3
- package/dist/ai/index.d.ts +3 -3
- package/dist/ai/index.js +4 -4
- package/dist/{api-qVDutqXH.d.cts → api-BEJTXyBA.d.cts} +1 -1
- package/dist/{api-XWHHAhQI.d.ts → api-DFrSR3lw.d.ts} +1 -1
- package/dist/browser.cjs +10 -10
- package/dist/browser.d.cts +3 -3
- package/dist/browser.d.ts +3 -3
- package/dist/browser.js +4 -4
- package/dist/{chunk-25ZON47K.cjs → chunk-4XR7X7XW.cjs} +96 -26
- package/dist/chunk-4XR7X7XW.cjs.map +1 -0
- package/dist/{chunk-LGABFD3L.js → chunk-522WB2EH.js} +2 -2
- package/dist/{chunk-LGABFD3L.js.map → chunk-522WB2EH.js.map} +1 -1
- package/dist/{chunk-7AFW2J6J.js → chunk-I2GQYOZ5.js} +94 -24
- package/dist/chunk-I2GQYOZ5.js.map +1 -0
- package/dist/{chunk-EPKIJEH7.js → chunk-MFAMNFPA.js} +63 -6
- package/dist/chunk-MFAMNFPA.js.map +1 -0
- package/dist/{chunk-P63S7P6N.js → chunk-OTSVMKII.js} +116 -3
- package/dist/chunk-OTSVMKII.js.map +1 -0
- package/dist/{chunk-ECD5XHBM.cjs → chunk-R6VX5YTJ.cjs} +2 -2
- package/dist/{chunk-ECD5XHBM.cjs.map → chunk-R6VX5YTJ.cjs.map} +1 -1
- package/dist/{chunk-YVDUEUFV.cjs → chunk-SSLNPHCL.cjs} +118 -5
- package/dist/chunk-SSLNPHCL.cjs.map +1 -0
- package/dist/{chunk-SUIDD2C5.cjs → chunk-XNCOSVNG.cjs} +63 -6
- package/dist/chunk-XNCOSVNG.cjs.map +1 -0
- package/dist/{diagnostics-DRxhodP6.d.ts → diagnostics-B-ffSEhl.d.cts} +8 -0
- package/dist/{diagnostics-DRxhodP6.d.cts → diagnostics-B-ffSEhl.d.ts} +8 -0
- package/dist/diagrams/blockdiagram/index.cjs +5 -5
- package/dist/diagrams/blockdiagram/index.d.cts +1 -1
- package/dist/diagrams/blockdiagram/index.d.ts +1 -1
- package/dist/diagrams/blockdiagram/index.js +1 -1
- package/dist/diagrams/circuit/index.d.cts +1 -1
- package/dist/diagrams/circuit/index.d.ts +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.cjs +7 -7
- package/dist/diagrams/sld/index.d.cts +1 -1
- package/dist/diagrams/sld/index.d.ts +1 -1
- package/dist/diagrams/sld/index.js +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-C7SN-FB3.d.ts → index-DPWdYfNx.d.ts} +1 -1
- package/dist/{index-BRIkOPnd.d.cts → index-S0njakQ2.d.cts} +1 -1
- package/dist/index.cjs +26 -26
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +5 -5
- package/dist/react.cjs +4 -4
- package/dist/react.d.cts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +3 -3
- package/dist/{tools-DdhP1kWY.d.cts → tools-CeGGMCs7.d.cts} +2 -2
- package/dist/{tools-BVeUNdsU.d.ts → tools-kK_enDwb.d.ts} +2 -2
- package/package.json +1 -1
- package/dist/chunk-25ZON47K.cjs.map +0 -1
- package/dist/chunk-7AFW2J6J.js.map +0 -1
- package/dist/chunk-EPKIJEH7.js.map +0 -1
- package/dist/chunk-P63S7P6N.js.map +0 -1
- package/dist/chunk-SUIDD2C5.cjs.map +0 -1
- package/dist/chunk-YVDUEUFV.cjs.map +0 -1
package/dist/ai/ai-sdk.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkSSLNPHCL_cjs = require('../chunk-SSLNPHCL.cjs');
|
|
4
|
+
require('../chunk-4XR7X7XW.cjs');
|
|
5
5
|
require('../chunk-FKJBXGWP.cjs');
|
|
6
6
|
require('../chunk-V4RO5KYY.cjs');
|
|
7
|
-
require('../chunk-
|
|
7
|
+
require('../chunk-XNCOSVNG.cjs');
|
|
8
8
|
require('../chunk-2L4YXZAZ.cjs');
|
|
9
|
-
require('../chunk-
|
|
9
|
+
require('../chunk-R6VX5YTJ.cjs');
|
|
10
10
|
require('../chunk-SBB6C4OP.cjs');
|
|
11
11
|
require('../chunk-V4GILQR6.cjs');
|
|
12
12
|
require('../chunk-HWVBHU3O.cjs');
|
|
@@ -31,7 +31,7 @@ var schematexTools = {
|
|
|
31
31
|
listDiagrams: ai.tool({
|
|
32
32
|
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.",
|
|
33
33
|
inputSchema: zod.z.object({}),
|
|
34
|
-
execute: async () =>
|
|
34
|
+
execute: async () => chunkSSLNPHCL_cjs.listDiagrams()
|
|
35
35
|
}),
|
|
36
36
|
getSyntax: ai.tool({
|
|
37
37
|
description: "Return syntax for one diagram type. Default `detail: canonical` is the compact first-shot generation path: canonical header, preferred forms, rules, and repair checks. Request `detail: reference` only for advanced forms or imported adapters after choosing a type.",
|
|
@@ -46,7 +46,7 @@ var schematexTools = {
|
|
|
46
46
|
execute: async ({
|
|
47
47
|
type,
|
|
48
48
|
detail
|
|
49
|
-
}) =>
|
|
49
|
+
}) => chunkSSLNPHCL_cjs.getSyntax(type, { detail })
|
|
50
50
|
}),
|
|
51
51
|
getExamples: ai.tool({
|
|
52
52
|
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.",
|
|
@@ -56,7 +56,7 @@ var schematexTools = {
|
|
|
56
56
|
preferFeatured: zod.z.boolean().optional().describe("Rank featured examples first."),
|
|
57
57
|
maxComplexity: zod.z.number().int().min(1).max(5).optional().describe("Only return examples with complexity <= this value (1=simplest).")
|
|
58
58
|
}),
|
|
59
|
-
execute: async (args) =>
|
|
59
|
+
execute: async (args) => chunkSSLNPHCL_cjs.getExamples(args.type, {
|
|
60
60
|
limit: args.limit,
|
|
61
61
|
preferFeatured: args.preferFeatured,
|
|
62
62
|
maxComplexity: args.maxComplexity
|
|
@@ -70,7 +70,7 @@ var schematexTools = {
|
|
|
70
70
|
),
|
|
71
71
|
dsl: zod.z.string().describe("The DSL source text to validate.")
|
|
72
72
|
}),
|
|
73
|
-
execute: async ({ type, dsl }) =>
|
|
73
|
+
execute: async ({ type, dsl }) => chunkSSLNPHCL_cjs.validateDsl(type, dsl)
|
|
74
74
|
}),
|
|
75
75
|
renderDsl: ai.tool({
|
|
76
76
|
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.",
|
|
@@ -85,7 +85,7 @@ var schematexTools = {
|
|
|
85
85
|
dsl,
|
|
86
86
|
theme,
|
|
87
87
|
padding
|
|
88
|
-
}) =>
|
|
88
|
+
}) => chunkSSLNPHCL_cjs.renderDsl(type, dsl, { theme, padding })
|
|
89
89
|
})
|
|
90
90
|
};
|
|
91
91
|
|
package/dist/ai/ai-sdk.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as ai from 'ai';
|
|
2
|
-
import { c as DiagramListItem, g as GetSyntaxResult, e as GetExamplesResult, V as ValidateDslResult, R as RenderDslResult } from '../tools-
|
|
3
|
-
import '../api-
|
|
4
|
-
import '../diagnostics-
|
|
2
|
+
import { c as DiagramListItem, g as GetSyntaxResult, e as GetExamplesResult, V as ValidateDslResult, R as RenderDslResult } from '../tools-CeGGMCs7.cjs';
|
|
3
|
+
import '../api-BEJTXyBA.cjs';
|
|
4
|
+
import '../diagnostics-B-ffSEhl.cjs';
|
|
5
5
|
|
|
6
6
|
declare const schematexTools: {
|
|
7
7
|
readonly listDiagrams: ai.Tool<{}, DiagramListItem[]>;
|
|
8
8
|
readonly getSyntax: ai.Tool<{
|
|
9
9
|
type: string;
|
|
10
|
-
detail?: "
|
|
10
|
+
detail?: "reference" | "canonical" | undefined;
|
|
11
11
|
}, GetSyntaxResult>;
|
|
12
12
|
readonly getExamples: ai.Tool<{
|
|
13
13
|
type: string;
|
package/dist/ai/ai-sdk.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as ai from 'ai';
|
|
2
|
-
import { c as DiagramListItem, g as GetSyntaxResult, e as GetExamplesResult, V as ValidateDslResult, R as RenderDslResult } from '../tools-
|
|
3
|
-
import '../api-
|
|
4
|
-
import '../diagnostics-
|
|
2
|
+
import { c as DiagramListItem, g as GetSyntaxResult, e as GetExamplesResult, V as ValidateDslResult, R as RenderDslResult } from '../tools-kK_enDwb.js';
|
|
3
|
+
import '../api-DFrSR3lw.js';
|
|
4
|
+
import '../diagnostics-B-ffSEhl.js';
|
|
5
5
|
|
|
6
6
|
declare const schematexTools: {
|
|
7
7
|
readonly listDiagrams: ai.Tool<{}, DiagramListItem[]>;
|
|
8
8
|
readonly getSyntax: ai.Tool<{
|
|
9
9
|
type: string;
|
|
10
|
-
detail?: "
|
|
10
|
+
detail?: "reference" | "canonical" | undefined;
|
|
11
11
|
}, GetSyntaxResult>;
|
|
12
12
|
readonly getExamples: ai.Tool<{
|
|
13
13
|
type: string;
|
package/dist/ai/ai-sdk.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { renderDsl, validateDsl, getExamples, getSyntax, listDiagrams } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
import { renderDsl, validateDsl, getExamples, getSyntax, listDiagrams } from '../chunk-OTSVMKII.js';
|
|
2
|
+
import '../chunk-I2GQYOZ5.js';
|
|
3
3
|
import '../chunk-RJMCWT7Z.js';
|
|
4
4
|
import '../chunk-UWA5MWCI.js';
|
|
5
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-MFAMNFPA.js';
|
|
6
6
|
import '../chunk-TWLKXV2O.js';
|
|
7
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-522WB2EH.js';
|
|
8
8
|
import '../chunk-PIV2A3HG.js';
|
|
9
9
|
import '../chunk-H4MT5TJP.js';
|
|
10
10
|
import '../chunk-HAZALB7U.js';
|
package/dist/ai/index.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkSSLNPHCL_cjs = require('../chunk-SSLNPHCL.cjs');
|
|
4
|
+
require('../chunk-4XR7X7XW.cjs');
|
|
5
5
|
require('../chunk-FKJBXGWP.cjs');
|
|
6
6
|
require('../chunk-V4RO5KYY.cjs');
|
|
7
|
-
require('../chunk-
|
|
7
|
+
require('../chunk-XNCOSVNG.cjs');
|
|
8
8
|
require('../chunk-2L4YXZAZ.cjs');
|
|
9
|
-
require('../chunk-
|
|
9
|
+
require('../chunk-R6VX5YTJ.cjs');
|
|
10
10
|
require('../chunk-SBB6C4OP.cjs');
|
|
11
11
|
require('../chunk-V4GILQR6.cjs');
|
|
12
12
|
require('../chunk-HWVBHU3O.cjs');
|
|
@@ -29,47 +29,47 @@ require('../chunk-3WNW5Y7P.cjs');
|
|
|
29
29
|
|
|
30
30
|
Object.defineProperty(exports, "DIAGRAM_REGISTRY", {
|
|
31
31
|
enumerable: true,
|
|
32
|
-
get: function () { return
|
|
32
|
+
get: function () { return chunkSSLNPHCL_cjs.DIAGRAM_REGISTRY; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "DIAGRAM_SINCE", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkSSLNPHCL_cjs.DIAGRAM_SINCE; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "getAllDiagramTypes", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkSSLNPHCL_cjs.getAllDiagramTypes; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "getDiagramMeta", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkSSLNPHCL_cjs.getDiagramMeta; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "getDiagramSince", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkSSLNPHCL_cjs.getDiagramSince; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "getExamples", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkSSLNPHCL_cjs.getExamples; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "getSyntax", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkSSLNPHCL_cjs.getSyntax; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "listDiagrams", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkSSLNPHCL_cjs.listDiagrams; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "renderDsl", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkSSLNPHCL_cjs.renderDsl; }
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "resolveDiagramType", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkSSLNPHCL_cjs.resolveDiagramType; }
|
|
69
69
|
});
|
|
70
70
|
Object.defineProperty(exports, "validateDsl", {
|
|
71
71
|
enumerable: true,
|
|
72
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkSSLNPHCL_cjs.validateDsl; }
|
|
73
73
|
});
|
|
74
74
|
//# sourceMappingURL=index.cjs.map
|
|
75
75
|
//# sourceMappingURL=index.cjs.map
|
package/dist/ai/index.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { D as DIAGRAM_REGISTRY, a as DIAGRAM_SINCE, b as DiagramCluster, c as DiagramListItem, d as DiagramMeta, E as Example, G as GetExamplesOptions, e as GetExamplesResult, f as GetSyntaxOptions, g as GetSyntaxResult, R as RenderDslResult, S as SchematexValidationError, h as SyntaxDetail, i as SyntaxDoc, V as ValidateDslResult, j as getAllDiagramTypes, k as getDiagramMeta, l as getDiagramSince, m as getExamples, n as getSyntax, o as listDiagrams, r as renderDsl, p as resolveDiagramType, v as validateDsl } from '../tools-
|
|
2
|
-
import { a as DiagramType } from '../diagnostics-
|
|
3
|
-
import '../api-
|
|
1
|
+
export { D as DIAGRAM_REGISTRY, a as DIAGRAM_SINCE, b as DiagramCluster, c as DiagramListItem, d as DiagramMeta, E as Example, G as GetExamplesOptions, e as GetExamplesResult, f as GetSyntaxOptions, g as GetSyntaxResult, R as RenderDslResult, S as SchematexValidationError, h as SyntaxDetail, i as SyntaxDoc, V as ValidateDslResult, j as getAllDiagramTypes, k as getDiagramMeta, l as getDiagramSince, m as getExamples, n as getSyntax, o as listDiagrams, r as renderDsl, p as resolveDiagramType, v as validateDsl } from '../tools-CeGGMCs7.cjs';
|
|
2
|
+
import { a as DiagramType } from '../diagnostics-B-ffSEhl.cjs';
|
|
3
|
+
import '../api-BEJTXyBA.cjs';
|
|
4
4
|
|
|
5
5
|
interface GenerationProfile {
|
|
6
6
|
/** Canonical type id from `listDiagrams()`. */
|
package/dist/ai/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { D as DIAGRAM_REGISTRY, a as DIAGRAM_SINCE, b as DiagramCluster, c as DiagramListItem, d as DiagramMeta, E as Example, G as GetExamplesOptions, e as GetExamplesResult, f as GetSyntaxOptions, g as GetSyntaxResult, R as RenderDslResult, S as SchematexValidationError, h as SyntaxDetail, i as SyntaxDoc, V as ValidateDslResult, j as getAllDiagramTypes, k as getDiagramMeta, l as getDiagramSince, m as getExamples, n as getSyntax, o as listDiagrams, r as renderDsl, p as resolveDiagramType, v as validateDsl } from '../tools-
|
|
2
|
-
import { a as DiagramType } from '../diagnostics-
|
|
3
|
-
import '../api-
|
|
1
|
+
export { D as DIAGRAM_REGISTRY, a as DIAGRAM_SINCE, b as DiagramCluster, c as DiagramListItem, d as DiagramMeta, E as Example, G as GetExamplesOptions, e as GetExamplesResult, f as GetSyntaxOptions, g as GetSyntaxResult, R as RenderDslResult, S as SchematexValidationError, h as SyntaxDetail, i as SyntaxDoc, V as ValidateDslResult, j as getAllDiagramTypes, k as getDiagramMeta, l as getDiagramSince, m as getExamples, n as getSyntax, o as listDiagrams, r as renderDsl, p as resolveDiagramType, v as validateDsl } from '../tools-kK_enDwb.js';
|
|
2
|
+
import { a as DiagramType } from '../diagnostics-B-ffSEhl.js';
|
|
3
|
+
import '../api-DFrSR3lw.js';
|
|
4
4
|
|
|
5
5
|
interface GenerationProfile {
|
|
6
6
|
/** Canonical type id from `listDiagrams()`. */
|
package/dist/ai/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { DIAGRAM_REGISTRY, DIAGRAM_SINCE, getAllDiagramTypes, getDiagramMeta, getDiagramSince, getExamples, getSyntax, listDiagrams, renderDsl, resolveDiagramType, validateDsl } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
export { DIAGRAM_REGISTRY, DIAGRAM_SINCE, getAllDiagramTypes, getDiagramMeta, getDiagramSince, getExamples, getSyntax, listDiagrams, renderDsl, resolveDiagramType, validateDsl } from '../chunk-OTSVMKII.js';
|
|
2
|
+
import '../chunk-I2GQYOZ5.js';
|
|
3
3
|
import '../chunk-RJMCWT7Z.js';
|
|
4
4
|
import '../chunk-UWA5MWCI.js';
|
|
5
|
-
import '../chunk-
|
|
5
|
+
import '../chunk-MFAMNFPA.js';
|
|
6
6
|
import '../chunk-TWLKXV2O.js';
|
|
7
|
-
import '../chunk-
|
|
7
|
+
import '../chunk-522WB2EH.js';
|
|
8
8
|
import '../chunk-PIV2A3HG.js';
|
|
9
9
|
import '../chunk-H4MT5TJP.js';
|
|
10
10
|
import '../chunk-HAZALB7U.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as SchematexParseResult, c as SchematexRenderResult } from './diagnostics-
|
|
1
|
+
import { b as SchematexParseResult, c as SchematexRenderResult } from './diagnostics-B-ffSEhl.cjs';
|
|
2
2
|
|
|
3
3
|
interface SchematexConfig {
|
|
4
4
|
type?: "genogram" | "ecomap" | "pedigree" | "phylo" | "sociogram" | "timing" | "logic" | "circuit" | "blockdiagram" | "ladder" | "sld" | "entity" | "fishbone" | "venn" | "flowchart" | "mindmap" | "matrix" | "orgchart" | "decisiontree" | "timeline" | "state" | "pid" | "erd" | "breadboard" | "bpmn" | "fbd" | "sfc" | "prisma" | "usecase" | "pert" | "sequence" | "petri" | "network";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as SchematexParseResult, c as SchematexRenderResult } from './diagnostics-
|
|
1
|
+
import { b as SchematexParseResult, c as SchematexRenderResult } from './diagnostics-B-ffSEhl.js';
|
|
2
2
|
|
|
3
3
|
interface SchematexConfig {
|
|
4
4
|
type?: "genogram" | "ecomap" | "pedigree" | "phylo" | "sociogram" | "timing" | "logic" | "circuit" | "blockdiagram" | "ladder" | "sld" | "entity" | "fishbone" | "venn" | "flowchart" | "mindmap" | "matrix" | "orgchart" | "decisiontree" | "timeline" | "state" | "pid" | "erd" | "breadboard" | "bpmn" | "fbd" | "sfc" | "prisma" | "usecase" | "pert" | "sequence" | "petri" | "network";
|
package/dist/browser.cjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk4XR7X7XW_cjs = require('./chunk-4XR7X7XW.cjs');
|
|
4
4
|
require('./chunk-FKJBXGWP.cjs');
|
|
5
5
|
require('./chunk-V4RO5KYY.cjs');
|
|
6
|
-
require('./chunk-
|
|
6
|
+
require('./chunk-XNCOSVNG.cjs');
|
|
7
7
|
require('./chunk-2L4YXZAZ.cjs');
|
|
8
|
-
require('./chunk-
|
|
8
|
+
require('./chunk-R6VX5YTJ.cjs');
|
|
9
9
|
require('./chunk-SBB6C4OP.cjs');
|
|
10
10
|
require('./chunk-V4GILQR6.cjs');
|
|
11
11
|
require('./chunk-HWVBHU3O.cjs');
|
|
@@ -26,10 +26,10 @@ require('./chunk-3WNW5Y7P.cjs');
|
|
|
26
26
|
|
|
27
27
|
// src/browser.ts
|
|
28
28
|
function renderToElement(text, config) {
|
|
29
|
-
return svgStringToElement(
|
|
29
|
+
return svgStringToElement(chunk4XR7X7XW_cjs.render(text, config));
|
|
30
30
|
}
|
|
31
31
|
function renderPreviewToElement(text, config) {
|
|
32
|
-
return svgStringToElement(
|
|
32
|
+
return svgStringToElement(chunk4XR7X7XW_cjs.renderPreview(text, config));
|
|
33
33
|
}
|
|
34
34
|
function svgStringToElement(svgString) {
|
|
35
35
|
const parser = new DOMParser();
|
|
@@ -42,23 +42,23 @@ function svgStringToElement(svgString) {
|
|
|
42
42
|
return el;
|
|
43
43
|
}
|
|
44
44
|
function renderToContainer(text, container, config) {
|
|
45
|
-
container.innerHTML =
|
|
45
|
+
container.innerHTML = chunk4XR7X7XW_cjs.render(text, config);
|
|
46
46
|
}
|
|
47
47
|
function renderPreviewToContainer(text, container, config) {
|
|
48
|
-
container.innerHTML =
|
|
48
|
+
container.innerHTML = chunk4XR7X7XW_cjs.renderPreview(text, config);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
Object.defineProperty(exports, "render", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunk4XR7X7XW_cjs.render; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "renderPreview", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunk4XR7X7XW_cjs.renderPreview; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "renderResult", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunk4XR7X7XW_cjs.renderResult; }
|
|
62
62
|
});
|
|
63
63
|
exports.renderPreviewToContainer = renderPreviewToContainer;
|
|
64
64
|
exports.renderPreviewToElement = renderPreviewToElement;
|
package/dist/browser.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as SchematexConfig } from './api-
|
|
2
|
-
export { r as render, b as renderPreview, c as renderResult } from './api-
|
|
3
|
-
import './diagnostics-
|
|
1
|
+
import { S as SchematexConfig } from './api-BEJTXyBA.cjs';
|
|
2
|
+
export { r as render, b as renderPreview, c as renderResult } from './api-BEJTXyBA.cjs';
|
|
3
|
+
import './diagnostics-B-ffSEhl.cjs';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Browser-specific utilities for Schematex.
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { S as SchematexConfig } from './api-
|
|
2
|
-
export { r as render, b as renderPreview, c as renderResult } from './api-
|
|
3
|
-
import './diagnostics-
|
|
1
|
+
import { S as SchematexConfig } from './api-DFrSR3lw.js';
|
|
2
|
+
export { r as render, b as renderPreview, c as renderResult } from './api-DFrSR3lw.js';
|
|
3
|
+
import './diagnostics-B-ffSEhl.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Browser-specific utilities for Schematex.
|
package/dist/browser.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { render, renderPreview } from './chunk-
|
|
2
|
-
export { render, renderPreview, renderResult } from './chunk-
|
|
1
|
+
import { render, renderPreview } from './chunk-I2GQYOZ5.js';
|
|
2
|
+
export { render, renderPreview, renderResult } from './chunk-I2GQYOZ5.js';
|
|
3
3
|
import './chunk-RJMCWT7Z.js';
|
|
4
4
|
import './chunk-UWA5MWCI.js';
|
|
5
|
-
import './chunk-
|
|
5
|
+
import './chunk-MFAMNFPA.js';
|
|
6
6
|
import './chunk-TWLKXV2O.js';
|
|
7
|
-
import './chunk-
|
|
7
|
+
import './chunk-522WB2EH.js';
|
|
8
8
|
import './chunk-PIV2A3HG.js';
|
|
9
9
|
import './chunk-H4MT5TJP.js';
|
|
10
10
|
import './chunk-HAZALB7U.js';
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
var chunkFKJBXGWP_cjs = require('./chunk-FKJBXGWP.cjs');
|
|
4
4
|
var chunkV4RO5KYY_cjs = require('./chunk-V4RO5KYY.cjs');
|
|
5
|
-
var
|
|
5
|
+
var chunkXNCOSVNG_cjs = require('./chunk-XNCOSVNG.cjs');
|
|
6
6
|
var chunk2L4YXZAZ_cjs = require('./chunk-2L4YXZAZ.cjs');
|
|
7
|
-
var
|
|
7
|
+
var chunkR6VX5YTJ_cjs = require('./chunk-R6VX5YTJ.cjs');
|
|
8
8
|
var chunkV4GILQR6_cjs = require('./chunk-V4GILQR6.cjs');
|
|
9
9
|
var chunkHWVBHU3O_cjs = require('./chunk-HWVBHU3O.cjs');
|
|
10
10
|
var chunkC5C5EF3W_cjs = require('./chunk-C5C5EF3W.cjs');
|
|
@@ -4357,7 +4357,8 @@ var GEOMETRY = {
|
|
|
4357
4357
|
top: { x: 0, y: -55 },
|
|
4358
4358
|
bottom: { x: 0, y: 55 },
|
|
4359
4359
|
in: { x: -45, y: -10 },
|
|
4360
|
-
out: { x:
|
|
4360
|
+
out: { x: 45, y: 10 },
|
|
4361
|
+
right: { x: 45, y: 10 }
|
|
4361
4362
|
}
|
|
4362
4363
|
},
|
|
4363
4364
|
reactor_pfr: {
|
|
@@ -5052,9 +5053,10 @@ function renderInstrument(category, letterCode, loopNumber) {
|
|
|
5052
5053
|
// src/diagrams/pid/layout.ts
|
|
5053
5054
|
var PADDING = 30;
|
|
5054
5055
|
var TITLE_AREA = 26;
|
|
5055
|
-
var EQUIP_GAP_X =
|
|
5056
|
+
var EQUIP_GAP_X = 92;
|
|
5056
5057
|
var INST_RADIUS = 14;
|
|
5057
|
-
var INST_OFFSET =
|
|
5058
|
+
var INST_OFFSET = 52;
|
|
5059
|
+
var PORT_CLEARANCE = 18;
|
|
5058
5060
|
function defaultPort(direction, equip) {
|
|
5059
5061
|
if (equip.equipType === "tank_atm" || equip.equipType === "tank_cone_roof") {
|
|
5060
5062
|
return direction === "out" ? "bottom" : "top";
|
|
@@ -5066,8 +5068,9 @@ function defaultPort(direction, equip) {
|
|
|
5066
5068
|
}
|
|
5067
5069
|
function resolveSide(port) {
|
|
5068
5070
|
if (port === "top" || port === "vapor_out" || port === "reflux") return "top";
|
|
5069
|
-
if (port === "bottom" || port === "liquid_out" || port === "bottom_return") return "bottom";
|
|
5070
|
-
if (port === "left" || port === "in" || port === "feed" || port === "tube_in"
|
|
5071
|
+
if (port === "bottom" || port === "liquid_out" || port === "bottom_return" || port === "shell_out") return "bottom";
|
|
5072
|
+
if (port === "left" || port === "in" || port === "feed" || port === "tube_in") return "left";
|
|
5073
|
+
if (port === "shell_in") return "top";
|
|
5071
5074
|
return "right";
|
|
5072
5075
|
}
|
|
5073
5076
|
function getAnchor(layoutEq, port, fallback) {
|
|
@@ -5112,12 +5115,53 @@ function manhattanPath(fromX, fromY, fromSide, toX, toY, toSide) {
|
|
|
5112
5115
|
midY: toY
|
|
5113
5116
|
};
|
|
5114
5117
|
}
|
|
5118
|
+
function sideVector(side) {
|
|
5119
|
+
switch (side) {
|
|
5120
|
+
case "left":
|
|
5121
|
+
return { x: -1, y: 0 };
|
|
5122
|
+
case "right":
|
|
5123
|
+
return { x: 1, y: 0 };
|
|
5124
|
+
case "top":
|
|
5125
|
+
return { x: 0, y: -1 };
|
|
5126
|
+
case "bottom":
|
|
5127
|
+
return { x: 0, y: 1 };
|
|
5128
|
+
}
|
|
5129
|
+
}
|
|
5130
|
+
function portStubPath(from, to, clearance = PORT_CLEARANCE) {
|
|
5131
|
+
const fv = sideVector(from.side);
|
|
5132
|
+
const tv = sideVector(to.side);
|
|
5133
|
+
const fromStub = {
|
|
5134
|
+
x: from.x + fv.x * clearance,
|
|
5135
|
+
y: from.y + fv.y * clearance,
|
|
5136
|
+
side: from.side
|
|
5137
|
+
};
|
|
5138
|
+
const toStub = {
|
|
5139
|
+
x: to.x + tv.x * clearance,
|
|
5140
|
+
y: to.y + tv.y * clearance,
|
|
5141
|
+
side: to.side
|
|
5142
|
+
};
|
|
5143
|
+
const routed = manhattanPath(fromStub.x, fromStub.y, fromStub.side, toStub.x, toStub.y, toStub.side);
|
|
5144
|
+
return {
|
|
5145
|
+
d: `M ${from.x} ${from.y} L ${fromStub.x} ${fromStub.y} ${routed.d.replace(/^M\s+[-\d.]+\s+[-\d.]+\s*/, "")} L ${to.x} ${to.y}`,
|
|
5146
|
+
midX: routed.midX,
|
|
5147
|
+
midY: routed.midY
|
|
5148
|
+
};
|
|
5149
|
+
}
|
|
5150
|
+
function lineMidpoint(ln, equipById) {
|
|
5151
|
+
const fromEq = equipById.get(ln.from.id);
|
|
5152
|
+
const toEq = equipById.get(ln.to.id);
|
|
5153
|
+
if (!fromEq || !toEq) return void 0;
|
|
5154
|
+
const from = getAnchor(fromEq, ln.from.port, "out");
|
|
5155
|
+
const to = getAnchor(toEq, ln.to.port, "in");
|
|
5156
|
+
const routed = portStubPath(from, to);
|
|
5157
|
+
return { x: routed.midX, y: routed.midY };
|
|
5158
|
+
}
|
|
5115
5159
|
function layoutPid(ast) {
|
|
5116
5160
|
const equipment = [];
|
|
5117
5161
|
const equipById = /* @__PURE__ */ new Map();
|
|
5118
5162
|
const heights = ast.equipment.map((e) => GEOMETRY[e.equipType]?.height ?? 60);
|
|
5119
5163
|
const maxH = Math.max(...heights, 0);
|
|
5120
|
-
const rowY = PADDING + TITLE_AREA + maxH / 2 +
|
|
5164
|
+
const rowY = PADDING + TITLE_AREA + maxH / 2 + 50;
|
|
5121
5165
|
let cursorX = PADDING + 40;
|
|
5122
5166
|
for (const equip of ast.equipment) {
|
|
5123
5167
|
const geo = GEOMETRY[equip.equipType] ?? { width: 60, height: 40, ports: {} };
|
|
@@ -5145,7 +5189,7 @@ function layoutPid(ast) {
|
|
|
5145
5189
|
}
|
|
5146
5190
|
const instruments = [];
|
|
5147
5191
|
const instById = /* @__PURE__ */ new Map();
|
|
5148
|
-
const crBandY = PADDING + TITLE_AREA +
|
|
5192
|
+
const crBandY = PADDING + TITLE_AREA + 28;
|
|
5149
5193
|
let crSlot = 0;
|
|
5150
5194
|
for (const inst of ast.instruments) {
|
|
5151
5195
|
let cx = 0;
|
|
@@ -5160,12 +5204,16 @@ function layoutPid(ast) {
|
|
|
5160
5204
|
cy = rowY + maxH / 2 + INST_OFFSET + INST_RADIUS;
|
|
5161
5205
|
const tgt = inst.measures ?? inst.controls ?? "";
|
|
5162
5206
|
const tgtEq = equipById.get(tgt);
|
|
5163
|
-
|
|
5207
|
+
const tgtLine = ast.lines.find((line2) => line2.id === tgt);
|
|
5208
|
+
const lineMid = tgtLine ? lineMidpoint(tgtLine, equipById) : void 0;
|
|
5209
|
+
cx = tgtEq ? tgtEq.cx : lineMid ? lineMid.x : PADDING + 80;
|
|
5164
5210
|
} else {
|
|
5165
5211
|
cy = rowY + maxH / 2 + INST_OFFSET;
|
|
5166
5212
|
const tgt = inst.measures ?? inst.controls ?? "";
|
|
5167
5213
|
const tgtEq = equipById.get(tgt);
|
|
5168
|
-
|
|
5214
|
+
const tgtLine = ast.lines.find((line2) => line2.id === tgt);
|
|
5215
|
+
const lineMid = tgtLine ? lineMidpoint(tgtLine, equipById) : void 0;
|
|
5216
|
+
cx = tgtEq ? tgtEq.cx : lineMid ? lineMid.x : PADDING + 80;
|
|
5169
5217
|
}
|
|
5170
5218
|
const lay = {
|
|
5171
5219
|
inst,
|
|
@@ -5176,6 +5224,22 @@ function layoutPid(ast) {
|
|
|
5176
5224
|
instruments.push(lay);
|
|
5177
5225
|
instById.set(inst.tag, lay);
|
|
5178
5226
|
}
|
|
5227
|
+
const targetOf = (inst) => inst.inst.measures ?? inst.inst.controls ?? "";
|
|
5228
|
+
const fieldGroups = /* @__PURE__ */ new Map();
|
|
5229
|
+
for (const inst of instruments) {
|
|
5230
|
+
if (inst.inst.category.startsWith("cr_")) continue;
|
|
5231
|
+
const target = targetOf(inst);
|
|
5232
|
+
if (!target) continue;
|
|
5233
|
+
const group2 = fieldGroups.get(target) ?? [];
|
|
5234
|
+
group2.push(inst);
|
|
5235
|
+
fieldGroups.set(target, group2);
|
|
5236
|
+
}
|
|
5237
|
+
for (const group2 of fieldGroups.values()) {
|
|
5238
|
+
if (group2.length < 2) continue;
|
|
5239
|
+
group2.forEach((inst, idx) => {
|
|
5240
|
+
inst.cx += (idx - (group2.length - 1) / 2) * (INST_RADIUS * 2 + 12);
|
|
5241
|
+
});
|
|
5242
|
+
}
|
|
5179
5243
|
const sameRow = (a, b) => Math.abs(a.cy - b.cy) < INST_RADIUS && Math.abs(a.cx - b.cx) < INST_RADIUS * 2 + 8;
|
|
5180
5244
|
const sortedByX = [...instruments].sort((a, b) => a.cx - b.cx);
|
|
5181
5245
|
for (let i = 1; i < sortedByX.length; i++) {
|
|
@@ -5220,14 +5284,7 @@ function routeLine(ln, equipById, instById) {
|
|
|
5220
5284
|
const fromAnchor = resolveAnchor(ln.from.id, ln.from.port, "out", equipById, instById);
|
|
5221
5285
|
const toAnchor = resolveAnchor(ln.to.id, ln.to.port, "in", equipById, instById);
|
|
5222
5286
|
if (!fromAnchor || !toAnchor) return void 0;
|
|
5223
|
-
const { d, midX, midY } =
|
|
5224
|
-
fromAnchor.x,
|
|
5225
|
-
fromAnchor.y,
|
|
5226
|
-
fromAnchor.side,
|
|
5227
|
-
toAnchor.x,
|
|
5228
|
-
toAnchor.y,
|
|
5229
|
-
toAnchor.side
|
|
5230
|
-
);
|
|
5287
|
+
const { d, midX, midY } = portStubPath(fromAnchor, toAnchor);
|
|
5231
5288
|
return {
|
|
5232
5289
|
line: ln,
|
|
5233
5290
|
path: d,
|
|
@@ -5263,6 +5320,7 @@ var STYLE2 = `
|
|
|
5263
5320
|
.lt-pid-capillary { stroke: #1d1d1d; stroke-width: 1.4; fill: none; stroke-dasharray: 1 5; stroke-linecap: round; }
|
|
5264
5321
|
.lt-pid-software { stroke: #6a6a6a; stroke-width: 1.3; fill: none; stroke-dasharray: 2 4; }
|
|
5265
5322
|
.lt-pid-mechanical { stroke: #1d1d1d; stroke-width: 1.4; fill: none; stroke-dasharray: 3 2 1 2; }
|
|
5323
|
+
.lt-pid-line-path { fill: none; }
|
|
5266
5324
|
|
|
5267
5325
|
.lt-pid-pneumatic-tick { stroke: #1d1d1d; stroke-width: 1.2; }
|
|
5268
5326
|
|
|
@@ -5279,14 +5337,19 @@ var STYLE2 = `
|
|
|
5279
5337
|
`;
|
|
5280
5338
|
var ARROW_ID = "lt-pid-arrow";
|
|
5281
5339
|
function lineClass(t) {
|
|
5282
|
-
|
|
5340
|
+
switch (t) {
|
|
5341
|
+
case "process_minor":
|
|
5342
|
+
return "lt-pid-process-min";
|
|
5343
|
+
default:
|
|
5344
|
+
return `lt-pid-${t.replaceAll("_", "-")}`;
|
|
5345
|
+
}
|
|
5283
5346
|
}
|
|
5284
5347
|
function renderLine(l) {
|
|
5285
5348
|
const cls = lineClass(l.line.lineType);
|
|
5286
5349
|
const parts = [
|
|
5287
5350
|
chunk3WNW5Y7P_cjs.path({
|
|
5288
5351
|
d: l.path,
|
|
5289
|
-
class: cls
|
|
5352
|
+
class: `${cls} lt-pid-line-path`,
|
|
5290
5353
|
"data-line-id": l.line.id,
|
|
5291
5354
|
"data-service": l.line.service ?? ""
|
|
5292
5355
|
})
|
|
@@ -5362,6 +5425,12 @@ function renderPidAST(ast, _config) {
|
|
|
5362
5425
|
return renderLayout2(layout);
|
|
5363
5426
|
}
|
|
5364
5427
|
function renderLayout2(layout) {
|
|
5428
|
+
const processLines = layout.lines.filter(
|
|
5429
|
+
(line2) => line2.line.lineType === "process" || line2.line.lineType === "process_minor"
|
|
5430
|
+
);
|
|
5431
|
+
const signalLines = layout.lines.filter(
|
|
5432
|
+
(line2) => line2.line.lineType !== "process" && line2.line.lineType !== "process_minor"
|
|
5433
|
+
);
|
|
5365
5434
|
const equipNodes = layout.equipment.map((eq) => {
|
|
5366
5435
|
const symbol = renderEquip(eq.equip.equipType, eq.equip.tag ?? eq.equip.id);
|
|
5367
5436
|
return chunk3WNW5Y7P_cjs.group(
|
|
@@ -5448,8 +5517,9 @@ function renderLayout2(layout) {
|
|
|
5448
5517
|
chunk3WNW5Y7P_cjs.el("style", {}, STYLE2)
|
|
5449
5518
|
]),
|
|
5450
5519
|
titleNode,
|
|
5520
|
+
chunk3WNW5Y7P_cjs.group({ class: "lt-pid-lines lt-pid-process-lines" }, processLines.map(renderLine)),
|
|
5451
5521
|
chunk3WNW5Y7P_cjs.group({ class: "lt-pid-equipment" }, equipNodes),
|
|
5452
|
-
chunk3WNW5Y7P_cjs.group({ class: "lt-pid-lines" },
|
|
5522
|
+
chunk3WNW5Y7P_cjs.group({ class: "lt-pid-lines lt-pid-signal-lines" }, signalLines.map(renderLine)),
|
|
5453
5523
|
chunk3WNW5Y7P_cjs.group({ class: "lt-pid-signals" }, autoSignals),
|
|
5454
5524
|
chunk3WNW5Y7P_cjs.group({ class: "lt-pid-instruments" }, instNodes)
|
|
5455
5525
|
]
|
|
@@ -22379,9 +22449,9 @@ var plugins = [
|
|
|
22379
22449
|
chunkST5YRTTV_cjs.timing,
|
|
22380
22450
|
chunkR66QG3XT_cjs.logic,
|
|
22381
22451
|
chunkV4RO5KYY_cjs.circuit,
|
|
22382
|
-
|
|
22452
|
+
chunkXNCOSVNG_cjs.blockdiagram,
|
|
22383
22453
|
chunk2L4YXZAZ_cjs.ladder,
|
|
22384
|
-
|
|
22454
|
+
chunkR6VX5YTJ_cjs.sld,
|
|
22385
22455
|
chunkV4GILQR6_cjs.entity,
|
|
22386
22456
|
chunkHWVBHU3O_cjs.fishbone,
|
|
22387
22457
|
chunkC5C5EF3W_cjs.venn,
|
|
@@ -22541,5 +22611,5 @@ exports.sequence = sequence;
|
|
|
22541
22611
|
exports.state = state;
|
|
22542
22612
|
exports.timeline = timeline;
|
|
22543
22613
|
exports.usecase = usecase;
|
|
22544
|
-
//# sourceMappingURL=chunk-
|
|
22545
|
-
//# sourceMappingURL=chunk-
|
|
22614
|
+
//# sourceMappingURL=chunk-4XR7X7XW.cjs.map
|
|
22615
|
+
//# sourceMappingURL=chunk-4XR7X7XW.cjs.map
|