schematex 0.4.0 → 0.4.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 +7 -7
- package/dist/ai/ai-sdk.js +2 -2
- package/dist/ai/index.cjs +10 -10
- package/dist/ai/index.js +2 -2
- package/dist/browser.cjs +4 -4
- package/dist/browser.js +2 -2
- package/dist/{chunk-O2HN4WRG.cjs → chunk-DHHVYSQX.cjs} +3 -3
- package/dist/{chunk-O2HN4WRG.cjs.map → chunk-DHHVYSQX.cjs.map} +1 -1
- package/dist/{chunk-3ADSXODY.js → chunk-YTLGK5BZ.js} +1826 -20
- package/dist/chunk-YTLGK5BZ.js.map +1 -0
- package/dist/{chunk-O4RHSAHR.js → chunk-Z5NGIM4Z.js} +3 -3
- package/dist/{chunk-O4RHSAHR.js.map → chunk-Z5NGIM4Z.js.map} +1 -1
- package/dist/{chunk-7LNIBHO6.cjs → chunk-Z5UECSNM.cjs} +1828 -22
- package/dist/chunk-Z5UECSNM.cjs.map +1 -0
- package/dist/index.cjs +7 -7
- package/dist/index.js +1 -1
- package/dist/react.cjs +2 -2
- package/dist/react.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-3ADSXODY.js.map +0 -1
- package/dist/chunk-7LNIBHO6.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 chunkZ5UECSNM_cjs = require('../chunk-Z5UECSNM.cjs');
|
|
4
|
+
require('../chunk-DHHVYSQX.cjs');
|
|
5
5
|
require('../chunk-QUKVGHN4.cjs');
|
|
6
6
|
require('../chunk-2Z543TC3.cjs');
|
|
7
7
|
require('../chunk-SUIDD2C5.cjs');
|
|
@@ -29,7 +29,7 @@ var schematexTools = {
|
|
|
29
29
|
listDiagrams: ai.tool({
|
|
30
30
|
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.",
|
|
31
31
|
inputSchema: zod.z.object({}),
|
|
32
|
-
execute: async () =>
|
|
32
|
+
execute: async () => chunkZ5UECSNM_cjs.listDiagrams()
|
|
33
33
|
}),
|
|
34
34
|
getSyntax: ai.tool({
|
|
35
35
|
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.",
|
|
@@ -38,7 +38,7 @@ var schematexTools = {
|
|
|
38
38
|
"Diagram type id from listDiagrams (e.g. 'genogram', 'sld', 'fishbone')."
|
|
39
39
|
)
|
|
40
40
|
}),
|
|
41
|
-
execute: async ({ type }) =>
|
|
41
|
+
execute: async ({ type }) => chunkZ5UECSNM_cjs.getSyntax(type)
|
|
42
42
|
}),
|
|
43
43
|
getExamples: ai.tool({
|
|
44
44
|
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.",
|
|
@@ -48,7 +48,7 @@ var schematexTools = {
|
|
|
48
48
|
preferFeatured: zod.z.boolean().optional().describe("Rank featured examples first."),
|
|
49
49
|
maxComplexity: zod.z.number().int().min(1).max(5).optional().describe("Only return examples with complexity <= this value (1=simplest).")
|
|
50
50
|
}),
|
|
51
|
-
execute: async (args) =>
|
|
51
|
+
execute: async (args) => chunkZ5UECSNM_cjs.getExamples(args.type, {
|
|
52
52
|
limit: args.limit,
|
|
53
53
|
preferFeatured: args.preferFeatured,
|
|
54
54
|
maxComplexity: args.maxComplexity
|
|
@@ -62,7 +62,7 @@ var schematexTools = {
|
|
|
62
62
|
),
|
|
63
63
|
dsl: zod.z.string().describe("The DSL source text to validate.")
|
|
64
64
|
}),
|
|
65
|
-
execute: async ({ type, dsl }) =>
|
|
65
|
+
execute: async ({ type, dsl }) => chunkZ5UECSNM_cjs.validateDsl(type, dsl)
|
|
66
66
|
}),
|
|
67
67
|
renderDsl: ai.tool({
|
|
68
68
|
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.",
|
|
@@ -77,7 +77,7 @@ var schematexTools = {
|
|
|
77
77
|
dsl,
|
|
78
78
|
theme,
|
|
79
79
|
padding
|
|
80
|
-
}) =>
|
|
80
|
+
}) => chunkZ5UECSNM_cjs.renderDsl(type, dsl, { theme, padding })
|
|
81
81
|
})
|
|
82
82
|
};
|
|
83
83
|
|
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-YTLGK5BZ.js';
|
|
2
|
+
import '../chunk-Z5NGIM4Z.js';
|
|
3
3
|
import '../chunk-I55HO32M.js';
|
|
4
4
|
import '../chunk-J7JWMQD5.js';
|
|
5
5
|
import '../chunk-EPKIJEH7.js';
|
package/dist/ai/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkZ5UECSNM_cjs = require('../chunk-Z5UECSNM.cjs');
|
|
4
|
+
require('../chunk-DHHVYSQX.cjs');
|
|
5
5
|
require('../chunk-QUKVGHN4.cjs');
|
|
6
6
|
require('../chunk-2Z543TC3.cjs');
|
|
7
7
|
require('../chunk-SUIDD2C5.cjs');
|
|
@@ -27,35 +27,35 @@ require('../chunk-3WNW5Y7P.cjs');
|
|
|
27
27
|
|
|
28
28
|
Object.defineProperty(exports, "DIAGRAM_REGISTRY", {
|
|
29
29
|
enumerable: true,
|
|
30
|
-
get: function () { return
|
|
30
|
+
get: function () { return chunkZ5UECSNM_cjs.DIAGRAM_REGISTRY; }
|
|
31
31
|
});
|
|
32
32
|
Object.defineProperty(exports, "getAllDiagramTypes", {
|
|
33
33
|
enumerable: true,
|
|
34
|
-
get: function () { return
|
|
34
|
+
get: function () { return chunkZ5UECSNM_cjs.getAllDiagramTypes; }
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "getDiagramMeta", {
|
|
37
37
|
enumerable: true,
|
|
38
|
-
get: function () { return
|
|
38
|
+
get: function () { return chunkZ5UECSNM_cjs.getDiagramMeta; }
|
|
39
39
|
});
|
|
40
40
|
Object.defineProperty(exports, "getExamples", {
|
|
41
41
|
enumerable: true,
|
|
42
|
-
get: function () { return
|
|
42
|
+
get: function () { return chunkZ5UECSNM_cjs.getExamples; }
|
|
43
43
|
});
|
|
44
44
|
Object.defineProperty(exports, "getSyntax", {
|
|
45
45
|
enumerable: true,
|
|
46
|
-
get: function () { return
|
|
46
|
+
get: function () { return chunkZ5UECSNM_cjs.getSyntax; }
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "listDiagrams", {
|
|
49
49
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
50
|
+
get: function () { return chunkZ5UECSNM_cjs.listDiagrams; }
|
|
51
51
|
});
|
|
52
52
|
Object.defineProperty(exports, "renderDsl", {
|
|
53
53
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
54
|
+
get: function () { return chunkZ5UECSNM_cjs.renderDsl; }
|
|
55
55
|
});
|
|
56
56
|
Object.defineProperty(exports, "validateDsl", {
|
|
57
57
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
58
|
+
get: function () { return chunkZ5UECSNM_cjs.validateDsl; }
|
|
59
59
|
});
|
|
60
60
|
//# sourceMappingURL=index.cjs.map
|
|
61
61
|
//# sourceMappingURL=index.cjs.map
|
package/dist/ai/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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-YTLGK5BZ.js';
|
|
2
|
+
import '../chunk-Z5NGIM4Z.js';
|
|
3
3
|
import '../chunk-I55HO32M.js';
|
|
4
4
|
import '../chunk-J7JWMQD5.js';
|
|
5
5
|
import '../chunk-EPKIJEH7.js';
|
package/dist/browser.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkDHHVYSQX_cjs = require('./chunk-DHHVYSQX.cjs');
|
|
4
4
|
require('./chunk-QUKVGHN4.cjs');
|
|
5
5
|
require('./chunk-2Z543TC3.cjs');
|
|
6
6
|
require('./chunk-SUIDD2C5.cjs');
|
|
@@ -24,7 +24,7 @@ require('./chunk-3WNW5Y7P.cjs');
|
|
|
24
24
|
|
|
25
25
|
// src/browser.ts
|
|
26
26
|
function renderToElement(text, config) {
|
|
27
|
-
const svgString =
|
|
27
|
+
const svgString = chunkDHHVYSQX_cjs.render(text, config);
|
|
28
28
|
const parser = new DOMParser();
|
|
29
29
|
const doc = parser.parseFromString(svgString, "image/svg+xml");
|
|
30
30
|
const el = doc.documentElement;
|
|
@@ -35,12 +35,12 @@ function renderToElement(text, config) {
|
|
|
35
35
|
return el;
|
|
36
36
|
}
|
|
37
37
|
function renderToContainer(text, container, config) {
|
|
38
|
-
container.innerHTML =
|
|
38
|
+
container.innerHTML = chunkDHHVYSQX_cjs.render(text, config);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
Object.defineProperty(exports, "render", {
|
|
42
42
|
enumerable: true,
|
|
43
|
-
get: function () { return
|
|
43
|
+
get: function () { return chunkDHHVYSQX_cjs.render; }
|
|
44
44
|
});
|
|
45
45
|
exports.renderToContainer = renderToContainer;
|
|
46
46
|
exports.renderToElement = renderToElement;
|
package/dist/browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { render } from './chunk-
|
|
2
|
-
export { render } from './chunk-
|
|
1
|
+
import { render } from './chunk-Z5NGIM4Z.js';
|
|
2
|
+
export { render } from './chunk-Z5NGIM4Z.js';
|
|
3
3
|
import './chunk-I55HO32M.js';
|
|
4
4
|
import './chunk-J7JWMQD5.js';
|
|
5
5
|
import './chunk-EPKIJEH7.js';
|
|
@@ -12805,7 +12805,7 @@ function renderNetwork(ln) {
|
|
|
12805
12805
|
"data-wire-type": wl.wire.dataType
|
|
12806
12806
|
}));
|
|
12807
12807
|
if (wl.wire.negatedAtSink) {
|
|
12808
|
-
const m = wl.path.match(/L\s+([\d
|
|
12808
|
+
const m = wl.path.match(/L\s+([\d.-]+)\s+([\d.-]+)\s*$/);
|
|
12809
12809
|
if (m) {
|
|
12810
12810
|
const sx = parseFloat(m[1]);
|
|
12811
12811
|
const sy = parseFloat(m[2]);
|
|
@@ -13853,5 +13853,5 @@ exports.pid = pid;
|
|
|
13853
13853
|
exports.render = render;
|
|
13854
13854
|
exports.state = state;
|
|
13855
13855
|
exports.timeline = timeline;
|
|
13856
|
-
//# sourceMappingURL=chunk-
|
|
13857
|
-
//# sourceMappingURL=chunk-
|
|
13856
|
+
//# sourceMappingURL=chunk-DHHVYSQX.cjs.map
|
|
13857
|
+
//# sourceMappingURL=chunk-DHHVYSQX.cjs.map
|