schematex 0.9.14 → 0.9.16
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.js +3 -3
- package/dist/ai/index.cjs +17 -17
- package/dist/ai/index.js +4 -4
- package/dist/browser.cjs +9 -9
- package/dist/browser.js +3 -3
- package/dist/{chunk-2PRNDY5I.js → chunk-HER5AMAO.js} +3 -3
- package/dist/{chunk-2PRNDY5I.js.map → chunk-HER5AMAO.js.map} +1 -1
- package/dist/{chunk-JG5CVYXC.js → chunk-KTZQRWXK.js} +64 -14
- package/dist/chunk-KTZQRWXK.js.map +1 -0
- package/dist/{chunk-KWY52MLQ.js → chunk-LXQQNNOT.js} +21 -6
- package/dist/chunk-LXQQNNOT.js.map +1 -0
- package/dist/{chunk-CYBBBBMZ.cjs → chunk-PG7TOHPZ.cjs} +21 -6
- package/dist/chunk-PG7TOHPZ.cjs.map +1 -0
- package/dist/{chunk-7ZABGRZZ.cjs → chunk-PYXBTTM4.cjs} +5 -5
- package/dist/{chunk-7ZABGRZZ.cjs.map → chunk-PYXBTTM4.cjs.map} +1 -1
- package/dist/{chunk-V5TY3N2W.cjs → chunk-W3N7EYSK.cjs} +65 -15
- package/dist/chunk-W3N7EYSK.cjs.map +1 -0
- package/dist/diagrams/genogram/index.cjs +8 -8
- package/dist/diagrams/genogram/index.js +1 -1
- package/dist/index.cjs +39 -39
- 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-CYBBBBMZ.cjs.map +0 -1
- package/dist/chunk-JG5CVYXC.js.map +0 -1
- package/dist/chunk-KWY52MLQ.js.map +0 -1
- package/dist/chunk-V5TY3N2W.cjs.map +0 -1
package/dist/ai/ai-sdk.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkPYXBTTM4_cjs = require('../chunk-PYXBTTM4.cjs');
|
|
4
|
+
require('../chunk-W3N7EYSK.cjs');
|
|
5
5
|
require('../chunk-UHRNFBWY.cjs');
|
|
6
6
|
require('../chunk-IBZKIMT5.cjs');
|
|
7
7
|
require('../chunk-24YHD4YI.cjs');
|
|
@@ -12,7 +12,7 @@ require('../chunk-4MANMKQ4.cjs');
|
|
|
12
12
|
require('../chunk-AQENURKO.cjs');
|
|
13
13
|
require('../chunk-3JN4762U.cjs');
|
|
14
14
|
require('../chunk-TIHHISCK.cjs');
|
|
15
|
-
require('../chunk-
|
|
15
|
+
require('../chunk-PG7TOHPZ.cjs');
|
|
16
16
|
require('../chunk-F3JYKM6M.cjs');
|
|
17
17
|
require('../chunk-7DQXFTA7.cjs');
|
|
18
18
|
require('../chunk-3TGOOZ36.cjs');
|
|
@@ -32,7 +32,7 @@ var schematexTools = {
|
|
|
32
32
|
listDiagrams: ai.tool({
|
|
33
33
|
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.",
|
|
34
34
|
inputSchema: zod.z.object({}),
|
|
35
|
-
execute: async () =>
|
|
35
|
+
execute: async () => chunkPYXBTTM4_cjs.listDiagrams()
|
|
36
36
|
}),
|
|
37
37
|
getSyntax: ai.tool({
|
|
38
38
|
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.",
|
|
@@ -47,7 +47,7 @@ var schematexTools = {
|
|
|
47
47
|
execute: async ({
|
|
48
48
|
type,
|
|
49
49
|
detail
|
|
50
|
-
}) =>
|
|
50
|
+
}) => chunkPYXBTTM4_cjs.getSyntax(type, { detail })
|
|
51
51
|
}),
|
|
52
52
|
getExamples: ai.tool({
|
|
53
53
|
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.",
|
|
@@ -57,7 +57,7 @@ var schematexTools = {
|
|
|
57
57
|
preferFeatured: zod.z.boolean().optional().describe("Rank featured examples first."),
|
|
58
58
|
maxComplexity: zod.z.number().int().min(1).max(5).optional().describe("Only return examples with complexity <= this value (1=simplest).")
|
|
59
59
|
}),
|
|
60
|
-
execute: async (args) =>
|
|
60
|
+
execute: async (args) => chunkPYXBTTM4_cjs.getExamples(args.type, {
|
|
61
61
|
limit: args.limit,
|
|
62
62
|
preferFeatured: args.preferFeatured,
|
|
63
63
|
maxComplexity: args.maxComplexity
|
|
@@ -71,7 +71,7 @@ var schematexTools = {
|
|
|
71
71
|
),
|
|
72
72
|
dsl: zod.z.string().describe("The DSL source text to validate.")
|
|
73
73
|
}),
|
|
74
|
-
execute: async ({ type, dsl }) =>
|
|
74
|
+
execute: async ({ type, dsl }) => chunkPYXBTTM4_cjs.validateDsl(type, dsl)
|
|
75
75
|
}),
|
|
76
76
|
renderDsl: ai.tool({
|
|
77
77
|
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.",
|
|
@@ -86,7 +86,7 @@ var schematexTools = {
|
|
|
86
86
|
dsl,
|
|
87
87
|
theme,
|
|
88
88
|
padding
|
|
89
|
-
}) =>
|
|
89
|
+
}) => chunkPYXBTTM4_cjs.renderDsl(type, dsl, { theme, padding })
|
|
90
90
|
})
|
|
91
91
|
};
|
|
92
92
|
|
package/dist/ai/ai-sdk.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { renderDsl, validateDsl, getExamples, getSyntax, listDiagrams } from '../chunk-
|
|
2
|
-
import '../chunk-
|
|
1
|
+
import { renderDsl, validateDsl, getExamples, getSyntax, listDiagrams } from '../chunk-HER5AMAO.js';
|
|
2
|
+
import '../chunk-KTZQRWXK.js';
|
|
3
3
|
import '../chunk-EB7T5SEO.js';
|
|
4
4
|
import '../chunk-PGMKMIGM.js';
|
|
5
5
|
import '../chunk-37WDY4G4.js';
|
|
@@ -10,7 +10,7 @@ import '../chunk-2IRYXK4M.js';
|
|
|
10
10
|
import '../chunk-2ZHP4TXP.js';
|
|
11
11
|
import '../chunk-KUSW5I2P.js';
|
|
12
12
|
import '../chunk-BGFKTJBZ.js';
|
|
13
|
-
import '../chunk-
|
|
13
|
+
import '../chunk-LXQQNNOT.js';
|
|
14
14
|
import '../chunk-HZTHSNUN.js';
|
|
15
15
|
import '../chunk-ITNCO3MZ.js';
|
|
16
16
|
import '../chunk-6KRSBSNT.js';
|
package/dist/ai/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkPYXBTTM4_cjs = require('../chunk-PYXBTTM4.cjs');
|
|
4
|
+
require('../chunk-W3N7EYSK.cjs');
|
|
5
5
|
require('../chunk-UHRNFBWY.cjs');
|
|
6
6
|
require('../chunk-IBZKIMT5.cjs');
|
|
7
7
|
require('../chunk-24YHD4YI.cjs');
|
|
@@ -12,7 +12,7 @@ require('../chunk-4MANMKQ4.cjs');
|
|
|
12
12
|
require('../chunk-AQENURKO.cjs');
|
|
13
13
|
require('../chunk-3JN4762U.cjs');
|
|
14
14
|
require('../chunk-TIHHISCK.cjs');
|
|
15
|
-
require('../chunk-
|
|
15
|
+
require('../chunk-PG7TOHPZ.cjs');
|
|
16
16
|
require('../chunk-F3JYKM6M.cjs');
|
|
17
17
|
require('../chunk-7DQXFTA7.cjs');
|
|
18
18
|
require('../chunk-3TGOOZ36.cjs');
|
|
@@ -28,10 +28,10 @@ require('../chunk-3WNW5Y7P.cjs');
|
|
|
28
28
|
|
|
29
29
|
// src/ai/prompt-context.ts
|
|
30
30
|
function buildPromptContext(type, opts = {}) {
|
|
31
|
-
const resolved =
|
|
31
|
+
const resolved = chunkPYXBTTM4_cjs.resolveDiagramType(type) ?? type;
|
|
32
32
|
const detail = opts.detail ?? "canonical";
|
|
33
33
|
const limit = opts.examples ?? 2;
|
|
34
|
-
const { type: canonical, name, standard, syntax } =
|
|
34
|
+
const { type: canonical, name, standard, syntax } = chunkPYXBTTM4_cjs.getSyntax(resolved, {
|
|
35
35
|
detail
|
|
36
36
|
});
|
|
37
37
|
const parts = [
|
|
@@ -42,7 +42,7 @@ function buildPromptContext(type, opts = {}) {
|
|
|
42
42
|
];
|
|
43
43
|
let exampleCount = 0;
|
|
44
44
|
if (limit > 0) {
|
|
45
|
-
const examples =
|
|
45
|
+
const examples = chunkPYXBTTM4_cjs.getExamples(canonical, {
|
|
46
46
|
preferFeatured: opts.preferFeatured ?? true,
|
|
47
47
|
limit,
|
|
48
48
|
maxComplexity: opts.maxComplexity
|
|
@@ -68,47 +68,47 @@ function buildPromptContext(type, opts = {}) {
|
|
|
68
68
|
|
|
69
69
|
Object.defineProperty(exports, "DIAGRAM_REGISTRY", {
|
|
70
70
|
enumerable: true,
|
|
71
|
-
get: function () { return
|
|
71
|
+
get: function () { return chunkPYXBTTM4_cjs.DIAGRAM_REGISTRY; }
|
|
72
72
|
});
|
|
73
73
|
Object.defineProperty(exports, "DIAGRAM_SINCE", {
|
|
74
74
|
enumerable: true,
|
|
75
|
-
get: function () { return
|
|
75
|
+
get: function () { return chunkPYXBTTM4_cjs.DIAGRAM_SINCE; }
|
|
76
76
|
});
|
|
77
77
|
Object.defineProperty(exports, "getAllDiagramTypes", {
|
|
78
78
|
enumerable: true,
|
|
79
|
-
get: function () { return
|
|
79
|
+
get: function () { return chunkPYXBTTM4_cjs.getAllDiagramTypes; }
|
|
80
80
|
});
|
|
81
81
|
Object.defineProperty(exports, "getDiagramMeta", {
|
|
82
82
|
enumerable: true,
|
|
83
|
-
get: function () { return
|
|
83
|
+
get: function () { return chunkPYXBTTM4_cjs.getDiagramMeta; }
|
|
84
84
|
});
|
|
85
85
|
Object.defineProperty(exports, "getDiagramSince", {
|
|
86
86
|
enumerable: true,
|
|
87
|
-
get: function () { return
|
|
87
|
+
get: function () { return chunkPYXBTTM4_cjs.getDiagramSince; }
|
|
88
88
|
});
|
|
89
89
|
Object.defineProperty(exports, "getExamples", {
|
|
90
90
|
enumerable: true,
|
|
91
|
-
get: function () { return
|
|
91
|
+
get: function () { return chunkPYXBTTM4_cjs.getExamples; }
|
|
92
92
|
});
|
|
93
93
|
Object.defineProperty(exports, "getSyntax", {
|
|
94
94
|
enumerable: true,
|
|
95
|
-
get: function () { return
|
|
95
|
+
get: function () { return chunkPYXBTTM4_cjs.getSyntax; }
|
|
96
96
|
});
|
|
97
97
|
Object.defineProperty(exports, "listDiagrams", {
|
|
98
98
|
enumerable: true,
|
|
99
|
-
get: function () { return
|
|
99
|
+
get: function () { return chunkPYXBTTM4_cjs.listDiagrams; }
|
|
100
100
|
});
|
|
101
101
|
Object.defineProperty(exports, "renderDsl", {
|
|
102
102
|
enumerable: true,
|
|
103
|
-
get: function () { return
|
|
103
|
+
get: function () { return chunkPYXBTTM4_cjs.renderDsl; }
|
|
104
104
|
});
|
|
105
105
|
Object.defineProperty(exports, "resolveDiagramType", {
|
|
106
106
|
enumerable: true,
|
|
107
|
-
get: function () { return
|
|
107
|
+
get: function () { return chunkPYXBTTM4_cjs.resolveDiagramType; }
|
|
108
108
|
});
|
|
109
109
|
Object.defineProperty(exports, "validateDsl", {
|
|
110
110
|
enumerable: true,
|
|
111
|
-
get: function () { return
|
|
111
|
+
get: function () { return chunkPYXBTTM4_cjs.validateDsl; }
|
|
112
112
|
});
|
|
113
113
|
exports.buildPromptContext = buildPromptContext;
|
|
114
114
|
//# sourceMappingURL=index.cjs.map
|
package/dist/ai/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { resolveDiagramType, getSyntax, getExamples } from '../chunk-
|
|
2
|
-
export { DIAGRAM_REGISTRY, DIAGRAM_SINCE, getAllDiagramTypes, getDiagramMeta, getDiagramSince, getExamples, getSyntax, listDiagrams, renderDsl, resolveDiagramType, validateDsl } from '../chunk-
|
|
3
|
-
import '../chunk-
|
|
1
|
+
import { resolveDiagramType, getSyntax, getExamples } from '../chunk-HER5AMAO.js';
|
|
2
|
+
export { DIAGRAM_REGISTRY, DIAGRAM_SINCE, getAllDiagramTypes, getDiagramMeta, getDiagramSince, getExamples, getSyntax, listDiagrams, renderDsl, resolveDiagramType, validateDsl } from '../chunk-HER5AMAO.js';
|
|
3
|
+
import '../chunk-KTZQRWXK.js';
|
|
4
4
|
import '../chunk-EB7T5SEO.js';
|
|
5
5
|
import '../chunk-PGMKMIGM.js';
|
|
6
6
|
import '../chunk-37WDY4G4.js';
|
|
@@ -11,7 +11,7 @@ import '../chunk-2IRYXK4M.js';
|
|
|
11
11
|
import '../chunk-2ZHP4TXP.js';
|
|
12
12
|
import '../chunk-KUSW5I2P.js';
|
|
13
13
|
import '../chunk-BGFKTJBZ.js';
|
|
14
|
-
import '../chunk-
|
|
14
|
+
import '../chunk-LXQQNNOT.js';
|
|
15
15
|
import '../chunk-HZTHSNUN.js';
|
|
16
16
|
import '../chunk-ITNCO3MZ.js';
|
|
17
17
|
import '../chunk-6KRSBSNT.js';
|
package/dist/browser.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkW3N7EYSK_cjs = require('./chunk-W3N7EYSK.cjs');
|
|
4
4
|
require('./chunk-UHRNFBWY.cjs');
|
|
5
5
|
require('./chunk-IBZKIMT5.cjs');
|
|
6
6
|
require('./chunk-24YHD4YI.cjs');
|
|
@@ -11,7 +11,7 @@ require('./chunk-4MANMKQ4.cjs');
|
|
|
11
11
|
require('./chunk-AQENURKO.cjs');
|
|
12
12
|
require('./chunk-3JN4762U.cjs');
|
|
13
13
|
require('./chunk-TIHHISCK.cjs');
|
|
14
|
-
require('./chunk-
|
|
14
|
+
require('./chunk-PG7TOHPZ.cjs');
|
|
15
15
|
require('./chunk-F3JYKM6M.cjs');
|
|
16
16
|
require('./chunk-7DQXFTA7.cjs');
|
|
17
17
|
require('./chunk-3TGOOZ36.cjs');
|
|
@@ -27,10 +27,10 @@ require('./chunk-3WNW5Y7P.cjs');
|
|
|
27
27
|
|
|
28
28
|
// src/browser.ts
|
|
29
29
|
function renderToElement(text, config) {
|
|
30
|
-
return svgStringToElement(
|
|
30
|
+
return svgStringToElement(chunkW3N7EYSK_cjs.render(text, config));
|
|
31
31
|
}
|
|
32
32
|
function renderPreviewToElement(text, config) {
|
|
33
|
-
return svgStringToElement(
|
|
33
|
+
return svgStringToElement(chunkW3N7EYSK_cjs.renderPreview(text, config));
|
|
34
34
|
}
|
|
35
35
|
function svgStringToElement(svgString) {
|
|
36
36
|
const parser = new DOMParser();
|
|
@@ -43,23 +43,23 @@ function svgStringToElement(svgString) {
|
|
|
43
43
|
return el;
|
|
44
44
|
}
|
|
45
45
|
function renderToContainer(text, container, config) {
|
|
46
|
-
container.innerHTML =
|
|
46
|
+
container.innerHTML = chunkW3N7EYSK_cjs.render(text, config);
|
|
47
47
|
}
|
|
48
48
|
function renderPreviewToContainer(text, container, config) {
|
|
49
|
-
container.innerHTML =
|
|
49
|
+
container.innerHTML = chunkW3N7EYSK_cjs.renderPreview(text, config);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
Object.defineProperty(exports, "render", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkW3N7EYSK_cjs.render; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "renderPreview", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkW3N7EYSK_cjs.renderPreview; }
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "renderResult", {
|
|
61
61
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
62
|
+
get: function () { return chunkW3N7EYSK_cjs.renderResult; }
|
|
63
63
|
});
|
|
64
64
|
exports.renderPreviewToContainer = renderPreviewToContainer;
|
|
65
65
|
exports.renderPreviewToElement = renderPreviewToElement;
|
package/dist/browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { render, renderPreview } from './chunk-
|
|
2
|
-
export { render, renderPreview, renderResult } from './chunk-
|
|
1
|
+
import { render, renderPreview } from './chunk-KTZQRWXK.js';
|
|
2
|
+
export { render, renderPreview, renderResult } from './chunk-KTZQRWXK.js';
|
|
3
3
|
import './chunk-EB7T5SEO.js';
|
|
4
4
|
import './chunk-PGMKMIGM.js';
|
|
5
5
|
import './chunk-37WDY4G4.js';
|
|
@@ -10,7 +10,7 @@ import './chunk-2IRYXK4M.js';
|
|
|
10
10
|
import './chunk-2ZHP4TXP.js';
|
|
11
11
|
import './chunk-KUSW5I2P.js';
|
|
12
12
|
import './chunk-BGFKTJBZ.js';
|
|
13
|
-
import './chunk-
|
|
13
|
+
import './chunk-LXQQNNOT.js';
|
|
14
14
|
import './chunk-HZTHSNUN.js';
|
|
15
15
|
import './chunk-ITNCO3MZ.js';
|
|
16
16
|
import './chunk-6KRSBSNT.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { parseResult, renderResult } from './chunk-
|
|
1
|
+
import { parseResult, renderResult } from './chunk-KTZQRWXK.js';
|
|
2
2
|
|
|
3
3
|
// src/ai/registry.ts
|
|
4
4
|
var DIAGRAM_REGISTRY = [
|
|
@@ -6765,5 +6765,5 @@ function matchRepair(repairs, message) {
|
|
|
6765
6765
|
}
|
|
6766
6766
|
|
|
6767
6767
|
export { DIAGRAM_REGISTRY, DIAGRAM_SINCE, getAllDiagramTypes, getDiagramMeta, getDiagramSince, getExamples, getSyntax, listDiagrams, renderDsl, resolveDiagramType, validateDsl };
|
|
6768
|
-
//# sourceMappingURL=chunk-
|
|
6769
|
-
//# sourceMappingURL=chunk-
|
|
6768
|
+
//# sourceMappingURL=chunk-HER5AMAO.js.map
|
|
6769
|
+
//# sourceMappingURL=chunk-HER5AMAO.js.map
|