schematex 0.8.1 → 0.8.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/dist/ai/ai-sdk.cjs +8 -8
- package/dist/ai/ai-sdk.d.cts +1 -1
- package/dist/ai/ai-sdk.d.ts +1 -1
- package/dist/ai/ai-sdk.js +3 -3
- package/dist/ai/index.cjs +14 -14
- package/dist/ai/index.js +3 -3
- package/dist/browser.cjs +9 -9
- package/dist/browser.js +3 -3
- package/dist/{chunk-YWYWVKRB.js → chunk-FLDHD4RM.js} +14 -5
- package/dist/chunk-FLDHD4RM.js.map +1 -0
- package/dist/{chunk-WNGOG4CI.js → chunk-GDZNTILD.js} +5 -3
- package/dist/chunk-GDZNTILD.js.map +1 -0
- package/dist/{chunk-Q3SJB7H3.cjs → chunk-HWNVSNDJ.cjs} +16 -7
- package/dist/chunk-HWNVSNDJ.cjs.map +1 -0
- package/dist/{chunk-KUITLG4N.cjs → chunk-LENRV7ZJ.cjs} +5 -3
- package/dist/chunk-LENRV7ZJ.cjs.map +1 -0
- package/dist/{chunk-J6AIKEVV.js → chunk-LM5X7ZNR.js} +3 -3
- package/dist/{chunk-J6AIKEVV.js.map → chunk-LM5X7ZNR.js.map} +1 -1
- package/dist/{chunk-HBQFUZBD.cjs → chunk-UGB42BGK.cjs} +4 -4
- package/dist/{chunk-HBQFUZBD.cjs.map → chunk-UGB42BGK.cjs.map} +1 -1
- package/dist/diagrams/entity/index.cjs +5 -5
- package/dist/diagrams/entity/index.js +1 -1
- package/dist/index.cjs +34 -34
- package/dist/index.js +3 -3
- package/dist/react.cjs +3 -3
- package/dist/react.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-KUITLG4N.cjs.map +0 -1
- package/dist/chunk-Q3SJB7H3.cjs.map +0 -1
- package/dist/chunk-WNGOG4CI.js.map +0 -1
- package/dist/chunk-YWYWVKRB.js.map +0 -1
package/dist/ai/ai-sdk.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkHWNVSNDJ_cjs = require('../chunk-HWNVSNDJ.cjs');
|
|
4
|
+
require('../chunk-UGB42BGK.cjs');
|
|
5
5
|
require('../chunk-Q2YRJHFB.cjs');
|
|
6
6
|
require('../chunk-JIJWGHRN.cjs');
|
|
7
7
|
require('../chunk-6L46VIXI.cjs');
|
|
8
8
|
require('../chunk-JIUC4DRS.cjs');
|
|
9
9
|
require('../chunk-AJJYWXZB.cjs');
|
|
10
|
-
require('../chunk-
|
|
10
|
+
require('../chunk-LENRV7ZJ.cjs');
|
|
11
11
|
require('../chunk-T5KHNJ67.cjs');
|
|
12
12
|
require('../chunk-YMFYPB5Y.cjs');
|
|
13
13
|
require('../chunk-DR3DDDQY.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 () => chunkHWNVSNDJ_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
|
+
}) => chunkHWNVSNDJ_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) => chunkHWNVSNDJ_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 }) => chunkHWNVSNDJ_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
|
+
}) => chunkHWNVSNDJ_cjs.renderDsl(type, dsl, { theme, padding })
|
|
89
89
|
})
|
|
90
90
|
};
|
|
91
91
|
|
package/dist/ai/ai-sdk.d.cts
CHANGED
|
@@ -7,7 +7,7 @@ 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
|
@@ -7,7 +7,7 @@ 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,11 +1,11 @@
|
|
|
1
|
-
import { renderDsl, validateDsl, getExamples, getSyntax, listDiagrams } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
import { renderDsl, validateDsl, getExamples, getSyntax, listDiagrams } from '../chunk-FLDHD4RM.js';
|
|
2
|
+
import '../chunk-LM5X7ZNR.js';
|
|
3
3
|
import '../chunk-E3CAJGJM.js';
|
|
4
4
|
import '../chunk-T3GV7OVF.js';
|
|
5
5
|
import '../chunk-DX44TBFZ.js';
|
|
6
6
|
import '../chunk-JGCKW5RS.js';
|
|
7
7
|
import '../chunk-KF3DFASA.js';
|
|
8
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-GDZNTILD.js';
|
|
9
9
|
import '../chunk-YTGOLTLJ.js';
|
|
10
10
|
import '../chunk-UOM3EDE6.js';
|
|
11
11
|
import '../chunk-HPEAE3JM.js';
|
package/dist/ai/index.cjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkHWNVSNDJ_cjs = require('../chunk-HWNVSNDJ.cjs');
|
|
4
|
+
require('../chunk-UGB42BGK.cjs');
|
|
5
5
|
require('../chunk-Q2YRJHFB.cjs');
|
|
6
6
|
require('../chunk-JIJWGHRN.cjs');
|
|
7
7
|
require('../chunk-6L46VIXI.cjs');
|
|
8
8
|
require('../chunk-JIUC4DRS.cjs');
|
|
9
9
|
require('../chunk-AJJYWXZB.cjs');
|
|
10
|
-
require('../chunk-
|
|
10
|
+
require('../chunk-LENRV7ZJ.cjs');
|
|
11
11
|
require('../chunk-T5KHNJ67.cjs');
|
|
12
12
|
require('../chunk-YMFYPB5Y.cjs');
|
|
13
13
|
require('../chunk-DR3DDDQY.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 chunkHWNVSNDJ_cjs.DIAGRAM_REGISTRY; }
|
|
33
33
|
});
|
|
34
34
|
Object.defineProperty(exports, "DIAGRAM_SINCE", {
|
|
35
35
|
enumerable: true,
|
|
36
|
-
get: function () { return
|
|
36
|
+
get: function () { return chunkHWNVSNDJ_cjs.DIAGRAM_SINCE; }
|
|
37
37
|
});
|
|
38
38
|
Object.defineProperty(exports, "getAllDiagramTypes", {
|
|
39
39
|
enumerable: true,
|
|
40
|
-
get: function () { return
|
|
40
|
+
get: function () { return chunkHWNVSNDJ_cjs.getAllDiagramTypes; }
|
|
41
41
|
});
|
|
42
42
|
Object.defineProperty(exports, "getDiagramMeta", {
|
|
43
43
|
enumerable: true,
|
|
44
|
-
get: function () { return
|
|
44
|
+
get: function () { return chunkHWNVSNDJ_cjs.getDiagramMeta; }
|
|
45
45
|
});
|
|
46
46
|
Object.defineProperty(exports, "getDiagramSince", {
|
|
47
47
|
enumerable: true,
|
|
48
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkHWNVSNDJ_cjs.getDiagramSince; }
|
|
49
49
|
});
|
|
50
50
|
Object.defineProperty(exports, "getExamples", {
|
|
51
51
|
enumerable: true,
|
|
52
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkHWNVSNDJ_cjs.getExamples; }
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "getSyntax", {
|
|
55
55
|
enumerable: true,
|
|
56
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkHWNVSNDJ_cjs.getSyntax; }
|
|
57
57
|
});
|
|
58
58
|
Object.defineProperty(exports, "listDiagrams", {
|
|
59
59
|
enumerable: true,
|
|
60
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkHWNVSNDJ_cjs.listDiagrams; }
|
|
61
61
|
});
|
|
62
62
|
Object.defineProperty(exports, "renderDsl", {
|
|
63
63
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkHWNVSNDJ_cjs.renderDsl; }
|
|
65
65
|
});
|
|
66
66
|
Object.defineProperty(exports, "resolveDiagramType", {
|
|
67
67
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkHWNVSNDJ_cjs.resolveDiagramType; }
|
|
69
69
|
});
|
|
70
70
|
Object.defineProperty(exports, "validateDsl", {
|
|
71
71
|
enumerable: true,
|
|
72
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkHWNVSNDJ_cjs.validateDsl; }
|
|
73
73
|
});
|
|
74
74
|
//# sourceMappingURL=index.cjs.map
|
|
75
75
|
//# sourceMappingURL=index.cjs.map
|
package/dist/ai/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
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-FLDHD4RM.js';
|
|
2
|
+
import '../chunk-LM5X7ZNR.js';
|
|
3
3
|
import '../chunk-E3CAJGJM.js';
|
|
4
4
|
import '../chunk-T3GV7OVF.js';
|
|
5
5
|
import '../chunk-DX44TBFZ.js';
|
|
6
6
|
import '../chunk-JGCKW5RS.js';
|
|
7
7
|
import '../chunk-KF3DFASA.js';
|
|
8
|
-
import '../chunk-
|
|
8
|
+
import '../chunk-GDZNTILD.js';
|
|
9
9
|
import '../chunk-YTGOLTLJ.js';
|
|
10
10
|
import '../chunk-UOM3EDE6.js';
|
|
11
11
|
import '../chunk-HPEAE3JM.js';
|
package/dist/browser.cjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkUGB42BGK_cjs = require('./chunk-UGB42BGK.cjs');
|
|
4
4
|
require('./chunk-Q2YRJHFB.cjs');
|
|
5
5
|
require('./chunk-JIJWGHRN.cjs');
|
|
6
6
|
require('./chunk-6L46VIXI.cjs');
|
|
7
7
|
require('./chunk-JIUC4DRS.cjs');
|
|
8
8
|
require('./chunk-AJJYWXZB.cjs');
|
|
9
|
-
require('./chunk-
|
|
9
|
+
require('./chunk-LENRV7ZJ.cjs');
|
|
10
10
|
require('./chunk-T5KHNJ67.cjs');
|
|
11
11
|
require('./chunk-YMFYPB5Y.cjs');
|
|
12
12
|
require('./chunk-DR3DDDQY.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(chunkUGB42BGK_cjs.render(text, config));
|
|
30
30
|
}
|
|
31
31
|
function renderPreviewToElement(text, config) {
|
|
32
|
-
return svgStringToElement(
|
|
32
|
+
return svgStringToElement(chunkUGB42BGK_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 = chunkUGB42BGK_cjs.render(text, config);
|
|
46
46
|
}
|
|
47
47
|
function renderPreviewToContainer(text, container, config) {
|
|
48
|
-
container.innerHTML =
|
|
48
|
+
container.innerHTML = chunkUGB42BGK_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 chunkUGB42BGK_cjs.render; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "renderPreview", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkUGB42BGK_cjs.renderPreview; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "renderResult", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkUGB42BGK_cjs.renderResult; }
|
|
62
62
|
});
|
|
63
63
|
exports.renderPreviewToContainer = renderPreviewToContainer;
|
|
64
64
|
exports.renderPreviewToElement = renderPreviewToElement;
|
package/dist/browser.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { render, renderPreview } from './chunk-
|
|
2
|
-
export { render, renderPreview, renderResult } from './chunk-
|
|
1
|
+
import { render, renderPreview } from './chunk-LM5X7ZNR.js';
|
|
2
|
+
export { render, renderPreview, renderResult } from './chunk-LM5X7ZNR.js';
|
|
3
3
|
import './chunk-E3CAJGJM.js';
|
|
4
4
|
import './chunk-T3GV7OVF.js';
|
|
5
5
|
import './chunk-DX44TBFZ.js';
|
|
6
6
|
import './chunk-JGCKW5RS.js';
|
|
7
7
|
import './chunk-KF3DFASA.js';
|
|
8
|
-
import './chunk-
|
|
8
|
+
import './chunk-GDZNTILD.js';
|
|
9
9
|
import './chunk-YTGOLTLJ.js';
|
|
10
10
|
import './chunk-UOM3EDE6.js';
|
|
11
11
|
import './chunk-HPEAE3JM.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseResult, renderResult } from './chunk-
|
|
1
|
+
import { parseResult, renderResult } from './chunk-LM5X7ZNR.js';
|
|
2
2
|
|
|
3
3
|
// src/ai/registry.ts
|
|
4
4
|
var DIAGRAM_REGISTRY = [
|
|
@@ -3771,8 +3771,17 @@ var PROFILES = {
|
|
|
3771
3771
|
type: "entity",
|
|
3772
3772
|
header: 'entity-structure "Title"',
|
|
3773
3773
|
mode: "legal entities + ownership edges",
|
|
3774
|
-
forms: [
|
|
3775
|
-
|
|
3774
|
+
forms: [
|
|
3775
|
+
'entity holdco "HoldCo" corp@US',
|
|
3776
|
+
'entity opco "OpCo" llc@DE',
|
|
3777
|
+
"holdco -> opco : 100%",
|
|
3778
|
+
'cluster "Group Name" [members: [holdco, opco]]'
|
|
3779
|
+
],
|
|
3780
|
+
prefer: [
|
|
3781
|
+
"Use `entity` declarations before ownership edges.",
|
|
3782
|
+
"Keep legal form and jurisdiction explicit when known.",
|
|
3783
|
+
'Group entities with `cluster "Name" [members: [id1, id2]]` \u2014 the members value MUST be a bracketed list.'
|
|
3784
|
+
],
|
|
3776
3785
|
avoid: ["Avoid database schema terminology; use `erd` for tables and FKs."],
|
|
3777
3786
|
repair: ["Unknown ownership endpoints need entity declarations."]
|
|
3778
3787
|
},
|
|
@@ -4554,5 +4563,5 @@ function repairHint(type) {
|
|
|
4554
4563
|
}
|
|
4555
4564
|
|
|
4556
4565
|
export { DIAGRAM_REGISTRY, DIAGRAM_SINCE, getAllDiagramTypes, getDiagramMeta, getDiagramSince, getExamples, getSyntax, listDiagrams, renderDsl, resolveDiagramType, validateDsl };
|
|
4557
|
-
//# sourceMappingURL=chunk-
|
|
4558
|
-
//# sourceMappingURL=chunk-
|
|
4566
|
+
//# sourceMappingURL=chunk-FLDHD4RM.js.map
|
|
4567
|
+
//# sourceMappingURL=chunk-FLDHD4RM.js.map
|