schematex 0.9.15 → 0.9.17

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 chunk3VKMRHBU_cjs = require('../chunk-3VKMRHBU.cjs');
4
- require('../chunk-O4XRVW3R.cjs');
3
+ var chunkATN2WLSL_cjs = require('../chunk-ATN2WLSL.cjs');
4
+ require('../chunk-KHIPNN35.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-CYBBBBMZ.cjs');
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 () => chunk3VKMRHBU_cjs.listDiagrams()
35
+ execute: async () => chunkATN2WLSL_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
- }) => chunk3VKMRHBU_cjs.getSyntax(type, { detail })
50
+ }) => chunkATN2WLSL_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) => chunk3VKMRHBU_cjs.getExamples(args.type, {
60
+ execute: async (args) => chunkATN2WLSL_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 }) => chunk3VKMRHBU_cjs.validateDsl(type, dsl)
74
+ execute: async ({ type, dsl }) => chunkATN2WLSL_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
- }) => chunk3VKMRHBU_cjs.renderDsl(type, dsl, { theme, padding })
89
+ }) => chunkATN2WLSL_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-LXM32NGV.js';
2
- import '../chunk-F72IQZ6O.js';
1
+ import { renderDsl, validateDsl, getExamples, getSyntax, listDiagrams } from '../chunk-HVPSY7LV.js';
2
+ import '../chunk-LUJ4IBEO.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-KWY52MLQ.js';
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 chunk3VKMRHBU_cjs = require('../chunk-3VKMRHBU.cjs');
4
- require('../chunk-O4XRVW3R.cjs');
3
+ var chunkATN2WLSL_cjs = require('../chunk-ATN2WLSL.cjs');
4
+ require('../chunk-KHIPNN35.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-CYBBBBMZ.cjs');
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 = chunk3VKMRHBU_cjs.resolveDiagramType(type) ?? type;
31
+ const resolved = chunkATN2WLSL_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 } = chunk3VKMRHBU_cjs.getSyntax(resolved, {
34
+ const { type: canonical, name, standard, syntax } = chunkATN2WLSL_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 = chunk3VKMRHBU_cjs.getExamples(canonical, {
45
+ const examples = chunkATN2WLSL_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 chunk3VKMRHBU_cjs.DIAGRAM_REGISTRY; }
71
+ get: function () { return chunkATN2WLSL_cjs.DIAGRAM_REGISTRY; }
72
72
  });
73
73
  Object.defineProperty(exports, "DIAGRAM_SINCE", {
74
74
  enumerable: true,
75
- get: function () { return chunk3VKMRHBU_cjs.DIAGRAM_SINCE; }
75
+ get: function () { return chunkATN2WLSL_cjs.DIAGRAM_SINCE; }
76
76
  });
77
77
  Object.defineProperty(exports, "getAllDiagramTypes", {
78
78
  enumerable: true,
79
- get: function () { return chunk3VKMRHBU_cjs.getAllDiagramTypes; }
79
+ get: function () { return chunkATN2WLSL_cjs.getAllDiagramTypes; }
80
80
  });
81
81
  Object.defineProperty(exports, "getDiagramMeta", {
82
82
  enumerable: true,
83
- get: function () { return chunk3VKMRHBU_cjs.getDiagramMeta; }
83
+ get: function () { return chunkATN2WLSL_cjs.getDiagramMeta; }
84
84
  });
85
85
  Object.defineProperty(exports, "getDiagramSince", {
86
86
  enumerable: true,
87
- get: function () { return chunk3VKMRHBU_cjs.getDiagramSince; }
87
+ get: function () { return chunkATN2WLSL_cjs.getDiagramSince; }
88
88
  });
89
89
  Object.defineProperty(exports, "getExamples", {
90
90
  enumerable: true,
91
- get: function () { return chunk3VKMRHBU_cjs.getExamples; }
91
+ get: function () { return chunkATN2WLSL_cjs.getExamples; }
92
92
  });
93
93
  Object.defineProperty(exports, "getSyntax", {
94
94
  enumerable: true,
95
- get: function () { return chunk3VKMRHBU_cjs.getSyntax; }
95
+ get: function () { return chunkATN2WLSL_cjs.getSyntax; }
96
96
  });
97
97
  Object.defineProperty(exports, "listDiagrams", {
98
98
  enumerable: true,
99
- get: function () { return chunk3VKMRHBU_cjs.listDiagrams; }
99
+ get: function () { return chunkATN2WLSL_cjs.listDiagrams; }
100
100
  });
101
101
  Object.defineProperty(exports, "renderDsl", {
102
102
  enumerable: true,
103
- get: function () { return chunk3VKMRHBU_cjs.renderDsl; }
103
+ get: function () { return chunkATN2WLSL_cjs.renderDsl; }
104
104
  });
105
105
  Object.defineProperty(exports, "resolveDiagramType", {
106
106
  enumerable: true,
107
- get: function () { return chunk3VKMRHBU_cjs.resolveDiagramType; }
107
+ get: function () { return chunkATN2WLSL_cjs.resolveDiagramType; }
108
108
  });
109
109
  Object.defineProperty(exports, "validateDsl", {
110
110
  enumerable: true,
111
- get: function () { return chunk3VKMRHBU_cjs.validateDsl; }
111
+ get: function () { return chunkATN2WLSL_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-LXM32NGV.js';
2
- export { DIAGRAM_REGISTRY, DIAGRAM_SINCE, getAllDiagramTypes, getDiagramMeta, getDiagramSince, getExamples, getSyntax, listDiagrams, renderDsl, resolveDiagramType, validateDsl } from '../chunk-LXM32NGV.js';
3
- import '../chunk-F72IQZ6O.js';
1
+ import { resolveDiagramType, getSyntax, getExamples } from '../chunk-HVPSY7LV.js';
2
+ export { DIAGRAM_REGISTRY, DIAGRAM_SINCE, getAllDiagramTypes, getDiagramMeta, getDiagramSince, getExamples, getSyntax, listDiagrams, renderDsl, resolveDiagramType, validateDsl } from '../chunk-HVPSY7LV.js';
3
+ import '../chunk-LUJ4IBEO.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-KWY52MLQ.js';
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 chunkO4XRVW3R_cjs = require('./chunk-O4XRVW3R.cjs');
3
+ var chunkKHIPNN35_cjs = require('./chunk-KHIPNN35.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-CYBBBBMZ.cjs');
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(chunkO4XRVW3R_cjs.render(text, config));
30
+ return svgStringToElement(chunkKHIPNN35_cjs.render(text, config));
31
31
  }
32
32
  function renderPreviewToElement(text, config) {
33
- return svgStringToElement(chunkO4XRVW3R_cjs.renderPreview(text, config));
33
+ return svgStringToElement(chunkKHIPNN35_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 = chunkO4XRVW3R_cjs.render(text, config);
46
+ container.innerHTML = chunkKHIPNN35_cjs.render(text, config);
47
47
  }
48
48
  function renderPreviewToContainer(text, container, config) {
49
- container.innerHTML = chunkO4XRVW3R_cjs.renderPreview(text, config);
49
+ container.innerHTML = chunkKHIPNN35_cjs.renderPreview(text, config);
50
50
  }
51
51
 
52
52
  Object.defineProperty(exports, "render", {
53
53
  enumerable: true,
54
- get: function () { return chunkO4XRVW3R_cjs.render; }
54
+ get: function () { return chunkKHIPNN35_cjs.render; }
55
55
  });
56
56
  Object.defineProperty(exports, "renderPreview", {
57
57
  enumerable: true,
58
- get: function () { return chunkO4XRVW3R_cjs.renderPreview; }
58
+ get: function () { return chunkKHIPNN35_cjs.renderPreview; }
59
59
  });
60
60
  Object.defineProperty(exports, "renderResult", {
61
61
  enumerable: true,
62
- get: function () { return chunkO4XRVW3R_cjs.renderResult; }
62
+ get: function () { return chunkKHIPNN35_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-F72IQZ6O.js';
2
- export { render, renderPreview, renderResult } from './chunk-F72IQZ6O.js';
1
+ import { render, renderPreview } from './chunk-LUJ4IBEO.js';
2
+ export { render, renderPreview, renderResult } from './chunk-LUJ4IBEO.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-KWY52MLQ.js';
13
+ import './chunk-LXQQNNOT.js';
14
14
  import './chunk-HZTHSNUN.js';
15
15
  import './chunk-ITNCO3MZ.js';
16
16
  import './chunk-6KRSBSNT.js';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkO4XRVW3R_cjs = require('./chunk-O4XRVW3R.cjs');
3
+ var chunkKHIPNN35_cjs = require('./chunk-KHIPNN35.cjs');
4
4
 
5
5
  // src/ai/registry.ts
6
6
  var DIAGRAM_REGISTRY = [
@@ -6689,7 +6689,7 @@ function getExamples(type, opts = {}) {
6689
6689
  function validateDsl(type, dsl) {
6690
6690
  const resolvedType = type ? resolveDiagramType(type) : void 0;
6691
6691
  const config = type ? { type: resolvedType ?? type } : void 0;
6692
- const result = chunkO4XRVW3R_cjs.parseResult(dsl, config);
6692
+ const result = chunkKHIPNN35_cjs.parseResult(dsl, config);
6693
6693
  if (result.ok) {
6694
6694
  return {
6695
6695
  ok: true,
@@ -6715,7 +6715,7 @@ function renderDsl(type, dsl, options = {}) {
6715
6715
  ...options,
6716
6716
  ...type ? { type: resolvedType ?? type } : {}
6717
6717
  };
6718
- const result = chunkO4XRVW3R_cjs.renderResult(dsl, config);
6718
+ const result = chunkKHIPNN35_cjs.renderResult(dsl, config);
6719
6719
  if (result.ok) {
6720
6720
  return {
6721
6721
  ok: true,
@@ -6777,5 +6777,5 @@ exports.listDiagrams = listDiagrams;
6777
6777
  exports.renderDsl = renderDsl;
6778
6778
  exports.resolveDiagramType = resolveDiagramType;
6779
6779
  exports.validateDsl = validateDsl;
6780
- //# sourceMappingURL=chunk-3VKMRHBU.cjs.map
6781
- //# sourceMappingURL=chunk-3VKMRHBU.cjs.map
6780
+ //# sourceMappingURL=chunk-ATN2WLSL.cjs.map
6781
+ //# sourceMappingURL=chunk-ATN2WLSL.cjs.map