schematex 0.9.13 → 0.9.14

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.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkXJ5MTQLJ_cjs = require('../chunk-XJ5MTQLJ.cjs');
4
- require('../chunk-KTAEPUAE.cjs');
3
+ var chunk7ZABGRZZ_cjs = require('../chunk-7ZABGRZZ.cjs');
4
+ require('../chunk-V5TY3N2W.cjs');
5
5
  require('../chunk-UHRNFBWY.cjs');
6
6
  require('../chunk-IBZKIMT5.cjs');
7
7
  require('../chunk-24YHD4YI.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 () => chunkXJ5MTQLJ_cjs.listDiagrams()
35
+ execute: async () => chunk7ZABGRZZ_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
- }) => chunkXJ5MTQLJ_cjs.getSyntax(type, { detail })
50
+ }) => chunk7ZABGRZZ_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) => chunkXJ5MTQLJ_cjs.getExamples(args.type, {
60
+ execute: async (args) => chunk7ZABGRZZ_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 }) => chunkXJ5MTQLJ_cjs.validateDsl(type, dsl)
74
+ execute: async ({ type, dsl }) => chunk7ZABGRZZ_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
- }) => chunkXJ5MTQLJ_cjs.renderDsl(type, dsl, { theme, padding })
89
+ }) => chunk7ZABGRZZ_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-GHMSKPYN.js';
2
- import '../chunk-WPNMVV3U.js';
1
+ import { renderDsl, validateDsl, getExamples, getSyntax, listDiagrams } from '../chunk-2PRNDY5I.js';
2
+ import '../chunk-JG5CVYXC.js';
3
3
  import '../chunk-EB7T5SEO.js';
4
4
  import '../chunk-PGMKMIGM.js';
5
5
  import '../chunk-37WDY4G4.js';
package/dist/ai/index.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkXJ5MTQLJ_cjs = require('../chunk-XJ5MTQLJ.cjs');
4
- require('../chunk-KTAEPUAE.cjs');
3
+ var chunk7ZABGRZZ_cjs = require('../chunk-7ZABGRZZ.cjs');
4
+ require('../chunk-V5TY3N2W.cjs');
5
5
  require('../chunk-UHRNFBWY.cjs');
6
6
  require('../chunk-IBZKIMT5.cjs');
7
7
  require('../chunk-24YHD4YI.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 = chunkXJ5MTQLJ_cjs.resolveDiagramType(type) ?? type;
31
+ const resolved = chunk7ZABGRZZ_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 } = chunkXJ5MTQLJ_cjs.getSyntax(resolved, {
34
+ const { type: canonical, name, standard, syntax } = chunk7ZABGRZZ_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 = chunkXJ5MTQLJ_cjs.getExamples(canonical, {
45
+ const examples = chunk7ZABGRZZ_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 chunkXJ5MTQLJ_cjs.DIAGRAM_REGISTRY; }
71
+ get: function () { return chunk7ZABGRZZ_cjs.DIAGRAM_REGISTRY; }
72
72
  });
73
73
  Object.defineProperty(exports, "DIAGRAM_SINCE", {
74
74
  enumerable: true,
75
- get: function () { return chunkXJ5MTQLJ_cjs.DIAGRAM_SINCE; }
75
+ get: function () { return chunk7ZABGRZZ_cjs.DIAGRAM_SINCE; }
76
76
  });
77
77
  Object.defineProperty(exports, "getAllDiagramTypes", {
78
78
  enumerable: true,
79
- get: function () { return chunkXJ5MTQLJ_cjs.getAllDiagramTypes; }
79
+ get: function () { return chunk7ZABGRZZ_cjs.getAllDiagramTypes; }
80
80
  });
81
81
  Object.defineProperty(exports, "getDiagramMeta", {
82
82
  enumerable: true,
83
- get: function () { return chunkXJ5MTQLJ_cjs.getDiagramMeta; }
83
+ get: function () { return chunk7ZABGRZZ_cjs.getDiagramMeta; }
84
84
  });
85
85
  Object.defineProperty(exports, "getDiagramSince", {
86
86
  enumerable: true,
87
- get: function () { return chunkXJ5MTQLJ_cjs.getDiagramSince; }
87
+ get: function () { return chunk7ZABGRZZ_cjs.getDiagramSince; }
88
88
  });
89
89
  Object.defineProperty(exports, "getExamples", {
90
90
  enumerable: true,
91
- get: function () { return chunkXJ5MTQLJ_cjs.getExamples; }
91
+ get: function () { return chunk7ZABGRZZ_cjs.getExamples; }
92
92
  });
93
93
  Object.defineProperty(exports, "getSyntax", {
94
94
  enumerable: true,
95
- get: function () { return chunkXJ5MTQLJ_cjs.getSyntax; }
95
+ get: function () { return chunk7ZABGRZZ_cjs.getSyntax; }
96
96
  });
97
97
  Object.defineProperty(exports, "listDiagrams", {
98
98
  enumerable: true,
99
- get: function () { return chunkXJ5MTQLJ_cjs.listDiagrams; }
99
+ get: function () { return chunk7ZABGRZZ_cjs.listDiagrams; }
100
100
  });
101
101
  Object.defineProperty(exports, "renderDsl", {
102
102
  enumerable: true,
103
- get: function () { return chunkXJ5MTQLJ_cjs.renderDsl; }
103
+ get: function () { return chunk7ZABGRZZ_cjs.renderDsl; }
104
104
  });
105
105
  Object.defineProperty(exports, "resolveDiagramType", {
106
106
  enumerable: true,
107
- get: function () { return chunkXJ5MTQLJ_cjs.resolveDiagramType; }
107
+ get: function () { return chunk7ZABGRZZ_cjs.resolveDiagramType; }
108
108
  });
109
109
  Object.defineProperty(exports, "validateDsl", {
110
110
  enumerable: true,
111
- get: function () { return chunkXJ5MTQLJ_cjs.validateDsl; }
111
+ get: function () { return chunk7ZABGRZZ_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-GHMSKPYN.js';
2
- export { DIAGRAM_REGISTRY, DIAGRAM_SINCE, getAllDiagramTypes, getDiagramMeta, getDiagramSince, getExamples, getSyntax, listDiagrams, renderDsl, resolveDiagramType, validateDsl } from '../chunk-GHMSKPYN.js';
3
- import '../chunk-WPNMVV3U.js';
1
+ import { resolveDiagramType, getSyntax, getExamples } from '../chunk-2PRNDY5I.js';
2
+ export { DIAGRAM_REGISTRY, DIAGRAM_SINCE, getAllDiagramTypes, getDiagramMeta, getDiagramSince, getExamples, getSyntax, listDiagrams, renderDsl, resolveDiagramType, validateDsl } from '../chunk-2PRNDY5I.js';
3
+ import '../chunk-JG5CVYXC.js';
4
4
  import '../chunk-EB7T5SEO.js';
5
5
  import '../chunk-PGMKMIGM.js';
6
6
  import '../chunk-37WDY4G4.js';
package/dist/browser.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkKTAEPUAE_cjs = require('./chunk-KTAEPUAE.cjs');
3
+ var chunkV5TY3N2W_cjs = require('./chunk-V5TY3N2W.cjs');
4
4
  require('./chunk-UHRNFBWY.cjs');
5
5
  require('./chunk-IBZKIMT5.cjs');
6
6
  require('./chunk-24YHD4YI.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(chunkKTAEPUAE_cjs.render(text, config));
30
+ return svgStringToElement(chunkV5TY3N2W_cjs.render(text, config));
31
31
  }
32
32
  function renderPreviewToElement(text, config) {
33
- return svgStringToElement(chunkKTAEPUAE_cjs.renderPreview(text, config));
33
+ return svgStringToElement(chunkV5TY3N2W_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 = chunkKTAEPUAE_cjs.render(text, config);
46
+ container.innerHTML = chunkV5TY3N2W_cjs.render(text, config);
47
47
  }
48
48
  function renderPreviewToContainer(text, container, config) {
49
- container.innerHTML = chunkKTAEPUAE_cjs.renderPreview(text, config);
49
+ container.innerHTML = chunkV5TY3N2W_cjs.renderPreview(text, config);
50
50
  }
51
51
 
52
52
  Object.defineProperty(exports, "render", {
53
53
  enumerable: true,
54
- get: function () { return chunkKTAEPUAE_cjs.render; }
54
+ get: function () { return chunkV5TY3N2W_cjs.render; }
55
55
  });
56
56
  Object.defineProperty(exports, "renderPreview", {
57
57
  enumerable: true,
58
- get: function () { return chunkKTAEPUAE_cjs.renderPreview; }
58
+ get: function () { return chunkV5TY3N2W_cjs.renderPreview; }
59
59
  });
60
60
  Object.defineProperty(exports, "renderResult", {
61
61
  enumerable: true,
62
- get: function () { return chunkKTAEPUAE_cjs.renderResult; }
62
+ get: function () { return chunkV5TY3N2W_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-WPNMVV3U.js';
2
- export { render, renderPreview, renderResult } from './chunk-WPNMVV3U.js';
1
+ import { render, renderPreview } from './chunk-JG5CVYXC.js';
2
+ export { render, renderPreview, renderResult } from './chunk-JG5CVYXC.js';
3
3
  import './chunk-EB7T5SEO.js';
4
4
  import './chunk-PGMKMIGM.js';
5
5
  import './chunk-37WDY4G4.js';
@@ -1,4 +1,4 @@
1
- import { parseResult, renderResult } from './chunk-WPNMVV3U.js';
1
+ import { parseResult, renderResult } from './chunk-JG5CVYXC.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-GHMSKPYN.js.map
6769
- //# sourceMappingURL=chunk-GHMSKPYN.js.map
6768
+ //# sourceMappingURL=chunk-2PRNDY5I.js.map
6769
+ //# sourceMappingURL=chunk-2PRNDY5I.js.map