schematex 0.9.5 → 0.9.7
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 +19 -0
- package/dist/ai/ai-sdk.cjs +7 -7
- package/dist/ai/ai-sdk.js +2 -2
- package/dist/ai/index.cjs +16 -16
- package/dist/ai/index.js +3 -3
- package/dist/browser.cjs +8 -8
- package/dist/browser.js +2 -2
- package/dist/{chunk-LMNWUZMD.js → chunk-3K4WCRVI.js} +560 -88
- package/dist/chunk-3K4WCRVI.js.map +1 -0
- package/dist/{chunk-Q7CWX6HA.cjs → chunk-6X7MVZZT.cjs} +560 -88
- package/dist/chunk-6X7MVZZT.cjs.map +1 -0
- package/dist/{chunk-N524SY5D.js → chunk-DVRB64CN.js} +114 -19
- package/dist/chunk-DVRB64CN.js.map +1 -0
- package/dist/{chunk-7EWP4OD7.cjs → chunk-ECHPMEZX.cjs} +116 -21
- package/dist/chunk-ECHPMEZX.cjs.map +1 -0
- package/dist/index.cjs +34 -34
- package/dist/index.js +2 -2
- package/dist/react.cjs +2 -2
- package/dist/react.js +1 -1
- package/package.json +3 -1
- package/dist/chunk-7EWP4OD7.cjs.map +0 -1
- package/dist/chunk-LMNWUZMD.js.map +0 -1
- package/dist/chunk-N524SY5D.js.map +0 -1
- package/dist/chunk-Q7CWX6HA.cjs.map +0 -1
package/README.md
CHANGED
|
@@ -511,6 +511,25 @@ task G "Launch event" duration: 2 after: E, F
|
|
|
511
511
|
|
|
512
512
|
[PERT / CPM syntax →](https://schematex.dev/docs/pert)
|
|
513
513
|
|
|
514
|
+
#### …and as a Gantt chart — *the one that computes its own critical path*
|
|
515
|
+
|
|
516
|
+
Start with the `gantt` header (sugar for `pert` + `layout: gantt`). Same scheduler — so the bars are placed from the **computed** ES/EF and the **critical path is drawn in red**, which a hand-placed Gantt (Mermaid) can't do: there you type the dates, here you type dependencies. Calendar date axis (`start:` + `calendar: continuous|5day`), sections (`lane:`), progress overlays (`progress:`), milestones, and a `today:` marker.
|
|
517
|
+
|
|
518
|
+
```
|
|
519
|
+
gantt "Website Relaunch"
|
|
520
|
+
start: 2026-07-01
|
|
521
|
+
calendar: 5day
|
|
522
|
+
task A "Discovery" duration: 5 lane: "Plan"
|
|
523
|
+
task B "Wireframes" duration: 8 after: A lane: "Design"
|
|
524
|
+
task C "Visual design" duration: 6 after: B lane: "Design" progress: 40%
|
|
525
|
+
task D "Frontend build" duration: 12 after: C lane: "Build"
|
|
526
|
+
task E "Backend API" duration: 10 after: A lane: "Build"
|
|
527
|
+
task F "Integration" duration: 5 after: D, E lane: "Build"
|
|
528
|
+
task LAUNCH "Go live" milestone after: F lane: "Build"
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+

|
|
532
|
+
|
|
514
533
|
---
|
|
515
534
|
|
|
516
535
|
### ◉ Petri net — *Murata 1989 / ISO-IEC 15909 place-transition net*
|
package/dist/ai/ai-sdk.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkECHPMEZX_cjs = require('../chunk-ECHPMEZX.cjs');
|
|
4
|
+
require('../chunk-6X7MVZZT.cjs');
|
|
5
5
|
require('../chunk-4OC3CTGE.cjs');
|
|
6
6
|
require('../chunk-4AC6I7KJ.cjs');
|
|
7
7
|
require('../chunk-C4Y24X3U.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 () => chunkECHPMEZX_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
|
+
}) => chunkECHPMEZX_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) => chunkECHPMEZX_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 }) => chunkECHPMEZX_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
|
+
}) => chunkECHPMEZX_cjs.renderDsl(type, dsl, { theme, padding })
|
|
89
89
|
})
|
|
90
90
|
};
|
|
91
91
|
|
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-DVRB64CN.js';
|
|
2
|
+
import '../chunk-3K4WCRVI.js';
|
|
3
3
|
import '../chunk-3J4DZPZC.js';
|
|
4
4
|
import '../chunk-RDYACU2G.js';
|
|
5
5
|
import '../chunk-3PH2MQGN.js';
|
package/dist/ai/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var chunkECHPMEZX_cjs = require('../chunk-ECHPMEZX.cjs');
|
|
4
|
+
require('../chunk-6X7MVZZT.cjs');
|
|
5
5
|
require('../chunk-4OC3CTGE.cjs');
|
|
6
6
|
require('../chunk-4AC6I7KJ.cjs');
|
|
7
7
|
require('../chunk-C4Y24X3U.cjs');
|
|
@@ -27,10 +27,10 @@ require('../chunk-3WNW5Y7P.cjs');
|
|
|
27
27
|
|
|
28
28
|
// src/ai/prompt-context.ts
|
|
29
29
|
function buildPromptContext(type, opts = {}) {
|
|
30
|
-
const resolved =
|
|
30
|
+
const resolved = chunkECHPMEZX_cjs.resolveDiagramType(type) ?? type;
|
|
31
31
|
const detail = opts.detail ?? "canonical";
|
|
32
32
|
const limit = opts.examples ?? 2;
|
|
33
|
-
const { type: canonical, name, standard, syntax } =
|
|
33
|
+
const { type: canonical, name, standard, syntax } = chunkECHPMEZX_cjs.getSyntax(resolved, {
|
|
34
34
|
detail
|
|
35
35
|
});
|
|
36
36
|
const parts = [
|
|
@@ -41,7 +41,7 @@ function buildPromptContext(type, opts = {}) {
|
|
|
41
41
|
];
|
|
42
42
|
let exampleCount = 0;
|
|
43
43
|
if (limit > 0) {
|
|
44
|
-
const examples =
|
|
44
|
+
const examples = chunkECHPMEZX_cjs.getExamples(canonical, {
|
|
45
45
|
preferFeatured: opts.preferFeatured ?? true,
|
|
46
46
|
limit,
|
|
47
47
|
maxComplexity: opts.maxComplexity
|
|
@@ -67,47 +67,47 @@ function buildPromptContext(type, opts = {}) {
|
|
|
67
67
|
|
|
68
68
|
Object.defineProperty(exports, "DIAGRAM_REGISTRY", {
|
|
69
69
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
70
|
+
get: function () { return chunkECHPMEZX_cjs.DIAGRAM_REGISTRY; }
|
|
71
71
|
});
|
|
72
72
|
Object.defineProperty(exports, "DIAGRAM_SINCE", {
|
|
73
73
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
74
|
+
get: function () { return chunkECHPMEZX_cjs.DIAGRAM_SINCE; }
|
|
75
75
|
});
|
|
76
76
|
Object.defineProperty(exports, "getAllDiagramTypes", {
|
|
77
77
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
78
|
+
get: function () { return chunkECHPMEZX_cjs.getAllDiagramTypes; }
|
|
79
79
|
});
|
|
80
80
|
Object.defineProperty(exports, "getDiagramMeta", {
|
|
81
81
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
82
|
+
get: function () { return chunkECHPMEZX_cjs.getDiagramMeta; }
|
|
83
83
|
});
|
|
84
84
|
Object.defineProperty(exports, "getDiagramSince", {
|
|
85
85
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
86
|
+
get: function () { return chunkECHPMEZX_cjs.getDiagramSince; }
|
|
87
87
|
});
|
|
88
88
|
Object.defineProperty(exports, "getExamples", {
|
|
89
89
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
90
|
+
get: function () { return chunkECHPMEZX_cjs.getExamples; }
|
|
91
91
|
});
|
|
92
92
|
Object.defineProperty(exports, "getSyntax", {
|
|
93
93
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
94
|
+
get: function () { return chunkECHPMEZX_cjs.getSyntax; }
|
|
95
95
|
});
|
|
96
96
|
Object.defineProperty(exports, "listDiagrams", {
|
|
97
97
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
98
|
+
get: function () { return chunkECHPMEZX_cjs.listDiagrams; }
|
|
99
99
|
});
|
|
100
100
|
Object.defineProperty(exports, "renderDsl", {
|
|
101
101
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
102
|
+
get: function () { return chunkECHPMEZX_cjs.renderDsl; }
|
|
103
103
|
});
|
|
104
104
|
Object.defineProperty(exports, "resolveDiagramType", {
|
|
105
105
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
106
|
+
get: function () { return chunkECHPMEZX_cjs.resolveDiagramType; }
|
|
107
107
|
});
|
|
108
108
|
Object.defineProperty(exports, "validateDsl", {
|
|
109
109
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
110
|
+
get: function () { return chunkECHPMEZX_cjs.validateDsl; }
|
|
111
111
|
});
|
|
112
112
|
exports.buildPromptContext = buildPromptContext;
|
|
113
113
|
//# 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-DVRB64CN.js';
|
|
2
|
+
export { DIAGRAM_REGISTRY, DIAGRAM_SINCE, getAllDiagramTypes, getDiagramMeta, getDiagramSince, getExamples, getSyntax, listDiagrams, renderDsl, resolveDiagramType, validateDsl } from '../chunk-DVRB64CN.js';
|
|
3
|
+
import '../chunk-3K4WCRVI.js';
|
|
4
4
|
import '../chunk-3J4DZPZC.js';
|
|
5
5
|
import '../chunk-RDYACU2G.js';
|
|
6
6
|
import '../chunk-3PH2MQGN.js';
|
package/dist/browser.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk6X7MVZZT_cjs = require('./chunk-6X7MVZZT.cjs');
|
|
4
4
|
require('./chunk-4OC3CTGE.cjs');
|
|
5
5
|
require('./chunk-4AC6I7KJ.cjs');
|
|
6
6
|
require('./chunk-C4Y24X3U.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(chunk6X7MVZZT_cjs.render(text, config));
|
|
30
30
|
}
|
|
31
31
|
function renderPreviewToElement(text, config) {
|
|
32
|
-
return svgStringToElement(
|
|
32
|
+
return svgStringToElement(chunk6X7MVZZT_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 = chunk6X7MVZZT_cjs.render(text, config);
|
|
46
46
|
}
|
|
47
47
|
function renderPreviewToContainer(text, container, config) {
|
|
48
|
-
container.innerHTML =
|
|
48
|
+
container.innerHTML = chunk6X7MVZZT_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 chunk6X7MVZZT_cjs.render; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "renderPreview", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunk6X7MVZZT_cjs.renderPreview; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "renderResult", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunk6X7MVZZT_cjs.renderResult; }
|
|
62
62
|
});
|
|
63
63
|
exports.renderPreviewToContainer = renderPreviewToContainer;
|
|
64
64
|
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-3K4WCRVI.js';
|
|
2
|
+
export { render, renderPreview, renderResult } from './chunk-3K4WCRVI.js';
|
|
3
3
|
import './chunk-3J4DZPZC.js';
|
|
4
4
|
import './chunk-RDYACU2G.js';
|
|
5
5
|
import './chunk-3PH2MQGN.js';
|