schematex 0.9.5 → 0.9.6

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 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
+ ![Website relaunch Gantt chart](examples/pert/gantt-website-relaunch.svg)
532
+
514
533
  ---
515
534
 
516
535
  ### ◉ Petri net — *Murata 1989 / ISO-IEC 15909 place-transition net*
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunk7EWP4OD7_cjs = require('../chunk-7EWP4OD7.cjs');
4
- require('../chunk-Q7CWX6HA.cjs');
3
+ var chunkHX64QWB6_cjs = require('../chunk-HX64QWB6.cjs');
4
+ require('../chunk-KH5GRKUM.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 () => chunk7EWP4OD7_cjs.listDiagrams()
34
+ execute: async () => chunkHX64QWB6_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
- }) => chunk7EWP4OD7_cjs.getSyntax(type, { detail })
49
+ }) => chunkHX64QWB6_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) => chunk7EWP4OD7_cjs.getExamples(args.type, {
59
+ execute: async (args) => chunkHX64QWB6_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 }) => chunk7EWP4OD7_cjs.validateDsl(type, dsl)
73
+ execute: async ({ type, dsl }) => chunkHX64QWB6_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
- }) => chunk7EWP4OD7_cjs.renderDsl(type, dsl, { theme, padding })
88
+ }) => chunkHX64QWB6_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-N524SY5D.js';
2
- import '../chunk-LMNWUZMD.js';
1
+ import { renderDsl, validateDsl, getExamples, getSyntax, listDiagrams } from '../chunk-CVTHUOAM.js';
2
+ import '../chunk-4W75FGWO.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 chunk7EWP4OD7_cjs = require('../chunk-7EWP4OD7.cjs');
4
- require('../chunk-Q7CWX6HA.cjs');
3
+ var chunkHX64QWB6_cjs = require('../chunk-HX64QWB6.cjs');
4
+ require('../chunk-KH5GRKUM.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 = chunk7EWP4OD7_cjs.resolveDiagramType(type) ?? type;
30
+ const resolved = chunkHX64QWB6_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 } = chunk7EWP4OD7_cjs.getSyntax(resolved, {
33
+ const { type: canonical, name, standard, syntax } = chunkHX64QWB6_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 = chunk7EWP4OD7_cjs.getExamples(canonical, {
44
+ const examples = chunkHX64QWB6_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 chunk7EWP4OD7_cjs.DIAGRAM_REGISTRY; }
70
+ get: function () { return chunkHX64QWB6_cjs.DIAGRAM_REGISTRY; }
71
71
  });
72
72
  Object.defineProperty(exports, "DIAGRAM_SINCE", {
73
73
  enumerable: true,
74
- get: function () { return chunk7EWP4OD7_cjs.DIAGRAM_SINCE; }
74
+ get: function () { return chunkHX64QWB6_cjs.DIAGRAM_SINCE; }
75
75
  });
76
76
  Object.defineProperty(exports, "getAllDiagramTypes", {
77
77
  enumerable: true,
78
- get: function () { return chunk7EWP4OD7_cjs.getAllDiagramTypes; }
78
+ get: function () { return chunkHX64QWB6_cjs.getAllDiagramTypes; }
79
79
  });
80
80
  Object.defineProperty(exports, "getDiagramMeta", {
81
81
  enumerable: true,
82
- get: function () { return chunk7EWP4OD7_cjs.getDiagramMeta; }
82
+ get: function () { return chunkHX64QWB6_cjs.getDiagramMeta; }
83
83
  });
84
84
  Object.defineProperty(exports, "getDiagramSince", {
85
85
  enumerable: true,
86
- get: function () { return chunk7EWP4OD7_cjs.getDiagramSince; }
86
+ get: function () { return chunkHX64QWB6_cjs.getDiagramSince; }
87
87
  });
88
88
  Object.defineProperty(exports, "getExamples", {
89
89
  enumerable: true,
90
- get: function () { return chunk7EWP4OD7_cjs.getExamples; }
90
+ get: function () { return chunkHX64QWB6_cjs.getExamples; }
91
91
  });
92
92
  Object.defineProperty(exports, "getSyntax", {
93
93
  enumerable: true,
94
- get: function () { return chunk7EWP4OD7_cjs.getSyntax; }
94
+ get: function () { return chunkHX64QWB6_cjs.getSyntax; }
95
95
  });
96
96
  Object.defineProperty(exports, "listDiagrams", {
97
97
  enumerable: true,
98
- get: function () { return chunk7EWP4OD7_cjs.listDiagrams; }
98
+ get: function () { return chunkHX64QWB6_cjs.listDiagrams; }
99
99
  });
100
100
  Object.defineProperty(exports, "renderDsl", {
101
101
  enumerable: true,
102
- get: function () { return chunk7EWP4OD7_cjs.renderDsl; }
102
+ get: function () { return chunkHX64QWB6_cjs.renderDsl; }
103
103
  });
104
104
  Object.defineProperty(exports, "resolveDiagramType", {
105
105
  enumerable: true,
106
- get: function () { return chunk7EWP4OD7_cjs.resolveDiagramType; }
106
+ get: function () { return chunkHX64QWB6_cjs.resolveDiagramType; }
107
107
  });
108
108
  Object.defineProperty(exports, "validateDsl", {
109
109
  enumerable: true,
110
- get: function () { return chunk7EWP4OD7_cjs.validateDsl; }
110
+ get: function () { return chunkHX64QWB6_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-N524SY5D.js';
2
- export { DIAGRAM_REGISTRY, DIAGRAM_SINCE, getAllDiagramTypes, getDiagramMeta, getDiagramSince, getExamples, getSyntax, listDiagrams, renderDsl, resolveDiagramType, validateDsl } from '../chunk-N524SY5D.js';
3
- import '../chunk-LMNWUZMD.js';
1
+ import { resolveDiagramType, getSyntax, getExamples } from '../chunk-CVTHUOAM.js';
2
+ export { DIAGRAM_REGISTRY, DIAGRAM_SINCE, getAllDiagramTypes, getDiagramMeta, getDiagramSince, getExamples, getSyntax, listDiagrams, renderDsl, resolveDiagramType, validateDsl } from '../chunk-CVTHUOAM.js';
3
+ import '../chunk-4W75FGWO.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 chunkQ7CWX6HA_cjs = require('./chunk-Q7CWX6HA.cjs');
3
+ var chunkKH5GRKUM_cjs = require('./chunk-KH5GRKUM.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(chunkQ7CWX6HA_cjs.render(text, config));
29
+ return svgStringToElement(chunkKH5GRKUM_cjs.render(text, config));
30
30
  }
31
31
  function renderPreviewToElement(text, config) {
32
- return svgStringToElement(chunkQ7CWX6HA_cjs.renderPreview(text, config));
32
+ return svgStringToElement(chunkKH5GRKUM_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 = chunkQ7CWX6HA_cjs.render(text, config);
45
+ container.innerHTML = chunkKH5GRKUM_cjs.render(text, config);
46
46
  }
47
47
  function renderPreviewToContainer(text, container, config) {
48
- container.innerHTML = chunkQ7CWX6HA_cjs.renderPreview(text, config);
48
+ container.innerHTML = chunkKH5GRKUM_cjs.renderPreview(text, config);
49
49
  }
50
50
 
51
51
  Object.defineProperty(exports, "render", {
52
52
  enumerable: true,
53
- get: function () { return chunkQ7CWX6HA_cjs.render; }
53
+ get: function () { return chunkKH5GRKUM_cjs.render; }
54
54
  });
55
55
  Object.defineProperty(exports, "renderPreview", {
56
56
  enumerable: true,
57
- get: function () { return chunkQ7CWX6HA_cjs.renderPreview; }
57
+ get: function () { return chunkKH5GRKUM_cjs.renderPreview; }
58
58
  });
59
59
  Object.defineProperty(exports, "renderResult", {
60
60
  enumerable: true,
61
- get: function () { return chunkQ7CWX6HA_cjs.renderResult; }
61
+ get: function () { return chunkKH5GRKUM_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-LMNWUZMD.js';
2
- export { render, renderPreview, renderResult } from './chunk-LMNWUZMD.js';
1
+ import { render, renderPreview } from './chunk-4W75FGWO.js';
2
+ export { render, renderPreview, renderResult } from './chunk-4W75FGWO.js';
3
3
  import './chunk-3J4DZPZC.js';
4
4
  import './chunk-RDYACU2G.js';
5
5
  import './chunk-3PH2MQGN.js';