schematex 0.8.1 → 0.8.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.
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunkQ3SJB7H3_cjs = require('../chunk-Q3SJB7H3.cjs');
4
- require('../chunk-HBQFUZBD.cjs');
3
+ var chunkHWNVSNDJ_cjs = require('../chunk-HWNVSNDJ.cjs');
4
+ require('../chunk-UGB42BGK.cjs');
5
5
  require('../chunk-Q2YRJHFB.cjs');
6
6
  require('../chunk-JIJWGHRN.cjs');
7
7
  require('../chunk-6L46VIXI.cjs');
8
8
  require('../chunk-JIUC4DRS.cjs');
9
9
  require('../chunk-AJJYWXZB.cjs');
10
- require('../chunk-KUITLG4N.cjs');
10
+ require('../chunk-LENRV7ZJ.cjs');
11
11
  require('../chunk-T5KHNJ67.cjs');
12
12
  require('../chunk-YMFYPB5Y.cjs');
13
13
  require('../chunk-DR3DDDQY.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 () => chunkQ3SJB7H3_cjs.listDiagrams()
34
+ execute: async () => chunkHWNVSNDJ_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
- }) => chunkQ3SJB7H3_cjs.getSyntax(type, { detail })
49
+ }) => chunkHWNVSNDJ_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) => chunkQ3SJB7H3_cjs.getExamples(args.type, {
59
+ execute: async (args) => chunkHWNVSNDJ_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 }) => chunkQ3SJB7H3_cjs.validateDsl(type, dsl)
73
+ execute: async ({ type, dsl }) => chunkHWNVSNDJ_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
- }) => chunkQ3SJB7H3_cjs.renderDsl(type, dsl, { theme, padding })
88
+ }) => chunkHWNVSNDJ_cjs.renderDsl(type, dsl, { theme, padding })
89
89
  })
90
90
  };
91
91
 
@@ -7,7 +7,7 @@ declare const schematexTools: {
7
7
  readonly listDiagrams: ai.Tool<{}, DiagramListItem[]>;
8
8
  readonly getSyntax: ai.Tool<{
9
9
  type: string;
10
- detail?: "canonical" | "reference" | undefined;
10
+ detail?: "reference" | "canonical" | undefined;
11
11
  }, GetSyntaxResult>;
12
12
  readonly getExamples: ai.Tool<{
13
13
  type: string;
@@ -7,7 +7,7 @@ declare const schematexTools: {
7
7
  readonly listDiagrams: ai.Tool<{}, DiagramListItem[]>;
8
8
  readonly getSyntax: ai.Tool<{
9
9
  type: string;
10
- detail?: "canonical" | "reference" | undefined;
10
+ detail?: "reference" | "canonical" | undefined;
11
11
  }, GetSyntaxResult>;
12
12
  readonly getExamples: ai.Tool<{
13
13
  type: string;
package/dist/ai/ai-sdk.js CHANGED
@@ -1,11 +1,11 @@
1
- import { renderDsl, validateDsl, getExamples, getSyntax, listDiagrams } from '../chunk-YWYWVKRB.js';
2
- import '../chunk-J6AIKEVV.js';
1
+ import { renderDsl, validateDsl, getExamples, getSyntax, listDiagrams } from '../chunk-FLDHD4RM.js';
2
+ import '../chunk-LM5X7ZNR.js';
3
3
  import '../chunk-E3CAJGJM.js';
4
4
  import '../chunk-T3GV7OVF.js';
5
5
  import '../chunk-DX44TBFZ.js';
6
6
  import '../chunk-JGCKW5RS.js';
7
7
  import '../chunk-KF3DFASA.js';
8
- import '../chunk-WNGOG4CI.js';
8
+ import '../chunk-GDZNTILD.js';
9
9
  import '../chunk-YTGOLTLJ.js';
10
10
  import '../chunk-UOM3EDE6.js';
11
11
  import '../chunk-HPEAE3JM.js';
package/dist/ai/index.cjs CHANGED
@@ -1,13 +1,13 @@
1
1
  'use strict';
2
2
 
3
- var chunkQ3SJB7H3_cjs = require('../chunk-Q3SJB7H3.cjs');
4
- require('../chunk-HBQFUZBD.cjs');
3
+ var chunkHWNVSNDJ_cjs = require('../chunk-HWNVSNDJ.cjs');
4
+ require('../chunk-UGB42BGK.cjs');
5
5
  require('../chunk-Q2YRJHFB.cjs');
6
6
  require('../chunk-JIJWGHRN.cjs');
7
7
  require('../chunk-6L46VIXI.cjs');
8
8
  require('../chunk-JIUC4DRS.cjs');
9
9
  require('../chunk-AJJYWXZB.cjs');
10
- require('../chunk-KUITLG4N.cjs');
10
+ require('../chunk-LENRV7ZJ.cjs');
11
11
  require('../chunk-T5KHNJ67.cjs');
12
12
  require('../chunk-YMFYPB5Y.cjs');
13
13
  require('../chunk-DR3DDDQY.cjs');
@@ -29,47 +29,47 @@ require('../chunk-3WNW5Y7P.cjs');
29
29
 
30
30
  Object.defineProperty(exports, "DIAGRAM_REGISTRY", {
31
31
  enumerable: true,
32
- get: function () { return chunkQ3SJB7H3_cjs.DIAGRAM_REGISTRY; }
32
+ get: function () { return chunkHWNVSNDJ_cjs.DIAGRAM_REGISTRY; }
33
33
  });
34
34
  Object.defineProperty(exports, "DIAGRAM_SINCE", {
35
35
  enumerable: true,
36
- get: function () { return chunkQ3SJB7H3_cjs.DIAGRAM_SINCE; }
36
+ get: function () { return chunkHWNVSNDJ_cjs.DIAGRAM_SINCE; }
37
37
  });
38
38
  Object.defineProperty(exports, "getAllDiagramTypes", {
39
39
  enumerable: true,
40
- get: function () { return chunkQ3SJB7H3_cjs.getAllDiagramTypes; }
40
+ get: function () { return chunkHWNVSNDJ_cjs.getAllDiagramTypes; }
41
41
  });
42
42
  Object.defineProperty(exports, "getDiagramMeta", {
43
43
  enumerable: true,
44
- get: function () { return chunkQ3SJB7H3_cjs.getDiagramMeta; }
44
+ get: function () { return chunkHWNVSNDJ_cjs.getDiagramMeta; }
45
45
  });
46
46
  Object.defineProperty(exports, "getDiagramSince", {
47
47
  enumerable: true,
48
- get: function () { return chunkQ3SJB7H3_cjs.getDiagramSince; }
48
+ get: function () { return chunkHWNVSNDJ_cjs.getDiagramSince; }
49
49
  });
50
50
  Object.defineProperty(exports, "getExamples", {
51
51
  enumerable: true,
52
- get: function () { return chunkQ3SJB7H3_cjs.getExamples; }
52
+ get: function () { return chunkHWNVSNDJ_cjs.getExamples; }
53
53
  });
54
54
  Object.defineProperty(exports, "getSyntax", {
55
55
  enumerable: true,
56
- get: function () { return chunkQ3SJB7H3_cjs.getSyntax; }
56
+ get: function () { return chunkHWNVSNDJ_cjs.getSyntax; }
57
57
  });
58
58
  Object.defineProperty(exports, "listDiagrams", {
59
59
  enumerable: true,
60
- get: function () { return chunkQ3SJB7H3_cjs.listDiagrams; }
60
+ get: function () { return chunkHWNVSNDJ_cjs.listDiagrams; }
61
61
  });
62
62
  Object.defineProperty(exports, "renderDsl", {
63
63
  enumerable: true,
64
- get: function () { return chunkQ3SJB7H3_cjs.renderDsl; }
64
+ get: function () { return chunkHWNVSNDJ_cjs.renderDsl; }
65
65
  });
66
66
  Object.defineProperty(exports, "resolveDiagramType", {
67
67
  enumerable: true,
68
- get: function () { return chunkQ3SJB7H3_cjs.resolveDiagramType; }
68
+ get: function () { return chunkHWNVSNDJ_cjs.resolveDiagramType; }
69
69
  });
70
70
  Object.defineProperty(exports, "validateDsl", {
71
71
  enumerable: true,
72
- get: function () { return chunkQ3SJB7H3_cjs.validateDsl; }
72
+ get: function () { return chunkHWNVSNDJ_cjs.validateDsl; }
73
73
  });
74
74
  //# sourceMappingURL=index.cjs.map
75
75
  //# sourceMappingURL=index.cjs.map
package/dist/ai/index.js CHANGED
@@ -1,11 +1,11 @@
1
- export { DIAGRAM_REGISTRY, DIAGRAM_SINCE, getAllDiagramTypes, getDiagramMeta, getDiagramSince, getExamples, getSyntax, listDiagrams, renderDsl, resolveDiagramType, validateDsl } from '../chunk-YWYWVKRB.js';
2
- import '../chunk-J6AIKEVV.js';
1
+ export { DIAGRAM_REGISTRY, DIAGRAM_SINCE, getAllDiagramTypes, getDiagramMeta, getDiagramSince, getExamples, getSyntax, listDiagrams, renderDsl, resolveDiagramType, validateDsl } from '../chunk-FLDHD4RM.js';
2
+ import '../chunk-LM5X7ZNR.js';
3
3
  import '../chunk-E3CAJGJM.js';
4
4
  import '../chunk-T3GV7OVF.js';
5
5
  import '../chunk-DX44TBFZ.js';
6
6
  import '../chunk-JGCKW5RS.js';
7
7
  import '../chunk-KF3DFASA.js';
8
- import '../chunk-WNGOG4CI.js';
8
+ import '../chunk-GDZNTILD.js';
9
9
  import '../chunk-YTGOLTLJ.js';
10
10
  import '../chunk-UOM3EDE6.js';
11
11
  import '../chunk-HPEAE3JM.js';
package/dist/browser.cjs CHANGED
@@ -1,12 +1,12 @@
1
1
  'use strict';
2
2
 
3
- var chunkHBQFUZBD_cjs = require('./chunk-HBQFUZBD.cjs');
3
+ var chunkUGB42BGK_cjs = require('./chunk-UGB42BGK.cjs');
4
4
  require('./chunk-Q2YRJHFB.cjs');
5
5
  require('./chunk-JIJWGHRN.cjs');
6
6
  require('./chunk-6L46VIXI.cjs');
7
7
  require('./chunk-JIUC4DRS.cjs');
8
8
  require('./chunk-AJJYWXZB.cjs');
9
- require('./chunk-KUITLG4N.cjs');
9
+ require('./chunk-LENRV7ZJ.cjs');
10
10
  require('./chunk-T5KHNJ67.cjs');
11
11
  require('./chunk-YMFYPB5Y.cjs');
12
12
  require('./chunk-DR3DDDQY.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(chunkHBQFUZBD_cjs.render(text, config));
29
+ return svgStringToElement(chunkUGB42BGK_cjs.render(text, config));
30
30
  }
31
31
  function renderPreviewToElement(text, config) {
32
- return svgStringToElement(chunkHBQFUZBD_cjs.renderPreview(text, config));
32
+ return svgStringToElement(chunkUGB42BGK_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 = chunkHBQFUZBD_cjs.render(text, config);
45
+ container.innerHTML = chunkUGB42BGK_cjs.render(text, config);
46
46
  }
47
47
  function renderPreviewToContainer(text, container, config) {
48
- container.innerHTML = chunkHBQFUZBD_cjs.renderPreview(text, config);
48
+ container.innerHTML = chunkUGB42BGK_cjs.renderPreview(text, config);
49
49
  }
50
50
 
51
51
  Object.defineProperty(exports, "render", {
52
52
  enumerable: true,
53
- get: function () { return chunkHBQFUZBD_cjs.render; }
53
+ get: function () { return chunkUGB42BGK_cjs.render; }
54
54
  });
55
55
  Object.defineProperty(exports, "renderPreview", {
56
56
  enumerable: true,
57
- get: function () { return chunkHBQFUZBD_cjs.renderPreview; }
57
+ get: function () { return chunkUGB42BGK_cjs.renderPreview; }
58
58
  });
59
59
  Object.defineProperty(exports, "renderResult", {
60
60
  enumerable: true,
61
- get: function () { return chunkHBQFUZBD_cjs.renderResult; }
61
+ get: function () { return chunkUGB42BGK_cjs.renderResult; }
62
62
  });
63
63
  exports.renderPreviewToContainer = renderPreviewToContainer;
64
64
  exports.renderPreviewToElement = renderPreviewToElement;
package/dist/browser.js CHANGED
@@ -1,11 +1,11 @@
1
- import { render, renderPreview } from './chunk-J6AIKEVV.js';
2
- export { render, renderPreview, renderResult } from './chunk-J6AIKEVV.js';
1
+ import { render, renderPreview } from './chunk-LM5X7ZNR.js';
2
+ export { render, renderPreview, renderResult } from './chunk-LM5X7ZNR.js';
3
3
  import './chunk-E3CAJGJM.js';
4
4
  import './chunk-T3GV7OVF.js';
5
5
  import './chunk-DX44TBFZ.js';
6
6
  import './chunk-JGCKW5RS.js';
7
7
  import './chunk-KF3DFASA.js';
8
- import './chunk-WNGOG4CI.js';
8
+ import './chunk-GDZNTILD.js';
9
9
  import './chunk-YTGOLTLJ.js';
10
10
  import './chunk-UOM3EDE6.js';
11
11
  import './chunk-HPEAE3JM.js';
@@ -1,4 +1,4 @@
1
- import { parseResult, renderResult } from './chunk-J6AIKEVV.js';
1
+ import { parseResult, renderResult } from './chunk-LM5X7ZNR.js';
2
2
 
3
3
  // src/ai/registry.ts
4
4
  var DIAGRAM_REGISTRY = [
@@ -3771,8 +3771,17 @@ var PROFILES = {
3771
3771
  type: "entity",
3772
3772
  header: 'entity-structure "Title"',
3773
3773
  mode: "legal entities + ownership edges",
3774
- forms: ['entity holdco "HoldCo" corp@US', 'entity opco "OpCo" llc@DE', "holdco -> opco : 100%"],
3775
- prefer: ["Use `entity` declarations before ownership edges.", "Keep legal form and jurisdiction explicit when known."],
3774
+ forms: [
3775
+ 'entity holdco "HoldCo" corp@US',
3776
+ 'entity opco "OpCo" llc@DE',
3777
+ "holdco -> opco : 100%",
3778
+ 'cluster "Group Name" [members: [holdco, opco]]'
3779
+ ],
3780
+ prefer: [
3781
+ "Use `entity` declarations before ownership edges.",
3782
+ "Keep legal form and jurisdiction explicit when known.",
3783
+ 'Group entities with `cluster "Name" [members: [id1, id2]]` \u2014 the members value MUST be a bracketed list.'
3784
+ ],
3776
3785
  avoid: ["Avoid database schema terminology; use `erd` for tables and FKs."],
3777
3786
  repair: ["Unknown ownership endpoints need entity declarations."]
3778
3787
  },
@@ -4554,5 +4563,5 @@ function repairHint(type) {
4554
4563
  }
4555
4564
 
4556
4565
  export { DIAGRAM_REGISTRY, DIAGRAM_SINCE, getAllDiagramTypes, getDiagramMeta, getDiagramSince, getExamples, getSyntax, listDiagrams, renderDsl, resolveDiagramType, validateDsl };
4557
- //# sourceMappingURL=chunk-YWYWVKRB.js.map
4558
- //# sourceMappingURL=chunk-YWYWVKRB.js.map
4566
+ //# sourceMappingURL=chunk-FLDHD4RM.js.map
4567
+ //# sourceMappingURL=chunk-FLDHD4RM.js.map