schematex 0.6.7 → 0.6.9

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.
Files changed (33) hide show
  1. package/README.md +101 -6
  2. package/README.zh-CN.md +783 -0
  3. package/dist/ai/ai-sdk.cjs +8 -8
  4. package/dist/ai/ai-sdk.d.cts +1 -1
  5. package/dist/ai/ai-sdk.d.ts +1 -1
  6. package/dist/ai/ai-sdk.js +3 -3
  7. package/dist/ai/index.cjs +14 -14
  8. package/dist/ai/index.js +3 -3
  9. package/dist/browser.cjs +9 -9
  10. package/dist/browser.js +3 -3
  11. package/dist/{chunk-WK36Z63Y.cjs → chunk-25TO5A4F.cjs} +5 -5
  12. package/dist/{chunk-WK36Z63Y.cjs.map → chunk-25TO5A4F.cjs.map} +1 -1
  13. package/dist/{chunk-WAKRRGAV.js → chunk-2TUZ3QJA.js} +110 -2
  14. package/dist/chunk-2TUZ3QJA.js.map +1 -0
  15. package/dist/{chunk-TRUJ4Q6V.js → chunk-3DPWFWQU.js} +41 -12
  16. package/dist/{chunk-TRUJ4Q6V.js.map → chunk-3DPWFWQU.js.map} +1 -1
  17. package/dist/{chunk-LDONE225.cjs → chunk-5IZL57YJ.cjs} +42 -13
  18. package/dist/{chunk-LDONE225.cjs.map → chunk-5IZL57YJ.cjs.map} +1 -1
  19. package/dist/{chunk-QBS4F44Q.cjs → chunk-J3EPFZPX.cjs} +110 -2
  20. package/dist/chunk-J3EPFZPX.cjs.map +1 -0
  21. package/dist/{chunk-EVEPI423.js → chunk-Q5V4LUQR.js} +3 -3
  22. package/dist/{chunk-EVEPI423.js.map → chunk-Q5V4LUQR.js.map} +1 -1
  23. package/dist/diagrams/circuit/index.cjs +8 -8
  24. package/dist/diagrams/circuit/index.d.cts +0 -9
  25. package/dist/diagrams/circuit/index.d.ts +0 -9
  26. package/dist/diagrams/circuit/index.js +1 -1
  27. package/dist/index.cjs +27 -27
  28. package/dist/index.js +4 -4
  29. package/dist/react.cjs +3 -3
  30. package/dist/react.js +2 -2
  31. package/package.json +5 -5
  32. package/dist/chunk-QBS4F44Q.cjs.map +0 -1
  33. package/dist/chunk-WAKRRGAV.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkWK36Z63Y_cjs = require('../chunk-WK36Z63Y.cjs');
4
- require('../chunk-LDONE225.cjs');
3
+ var chunk25TO5A4F_cjs = require('../chunk-25TO5A4F.cjs');
4
+ require('../chunk-5IZL57YJ.cjs');
5
5
  require('../chunk-UHPGWO77.cjs');
6
- require('../chunk-QBS4F44Q.cjs');
6
+ require('../chunk-J3EPFZPX.cjs');
7
7
  require('../chunk-SHMG7BVF.cjs');
8
8
  require('../chunk-TACTEF2N.cjs');
9
9
  require('../chunk-34O3C6OC.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 () => chunkWK36Z63Y_cjs.listDiagrams()
34
+ execute: async () => chunk25TO5A4F_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
- }) => chunkWK36Z63Y_cjs.getSyntax(type, { detail })
49
+ }) => chunk25TO5A4F_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) => chunkWK36Z63Y_cjs.getExamples(args.type, {
59
+ execute: async (args) => chunk25TO5A4F_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 }) => chunkWK36Z63Y_cjs.validateDsl(type, dsl)
73
+ execute: async ({ type, dsl }) => chunk25TO5A4F_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
- }) => chunkWK36Z63Y_cjs.renderDsl(type, dsl, { theme, padding })
88
+ }) => chunk25TO5A4F_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,7 +1,7 @@
1
- import { renderDsl, validateDsl, getExamples, getSyntax, listDiagrams } from '../chunk-EVEPI423.js';
2
- import '../chunk-TRUJ4Q6V.js';
1
+ import { renderDsl, validateDsl, getExamples, getSyntax, listDiagrams } from '../chunk-Q5V4LUQR.js';
2
+ import '../chunk-3DPWFWQU.js';
3
3
  import '../chunk-MPCSWRZC.js';
4
- import '../chunk-WAKRRGAV.js';
4
+ import '../chunk-2TUZ3QJA.js';
5
5
  import '../chunk-C7V57V6O.js';
6
6
  import '../chunk-WU2N6ZVM.js';
7
7
  import '../chunk-JTGTWBAD.js';
package/dist/ai/index.cjs CHANGED
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var chunkWK36Z63Y_cjs = require('../chunk-WK36Z63Y.cjs');
4
- require('../chunk-LDONE225.cjs');
3
+ var chunk25TO5A4F_cjs = require('../chunk-25TO5A4F.cjs');
4
+ require('../chunk-5IZL57YJ.cjs');
5
5
  require('../chunk-UHPGWO77.cjs');
6
- require('../chunk-QBS4F44Q.cjs');
6
+ require('../chunk-J3EPFZPX.cjs');
7
7
  require('../chunk-SHMG7BVF.cjs');
8
8
  require('../chunk-TACTEF2N.cjs');
9
9
  require('../chunk-34O3C6OC.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 chunkWK36Z63Y_cjs.DIAGRAM_REGISTRY; }
32
+ get: function () { return chunk25TO5A4F_cjs.DIAGRAM_REGISTRY; }
33
33
  });
34
34
  Object.defineProperty(exports, "DIAGRAM_SINCE", {
35
35
  enumerable: true,
36
- get: function () { return chunkWK36Z63Y_cjs.DIAGRAM_SINCE; }
36
+ get: function () { return chunk25TO5A4F_cjs.DIAGRAM_SINCE; }
37
37
  });
38
38
  Object.defineProperty(exports, "getAllDiagramTypes", {
39
39
  enumerable: true,
40
- get: function () { return chunkWK36Z63Y_cjs.getAllDiagramTypes; }
40
+ get: function () { return chunk25TO5A4F_cjs.getAllDiagramTypes; }
41
41
  });
42
42
  Object.defineProperty(exports, "getDiagramMeta", {
43
43
  enumerable: true,
44
- get: function () { return chunkWK36Z63Y_cjs.getDiagramMeta; }
44
+ get: function () { return chunk25TO5A4F_cjs.getDiagramMeta; }
45
45
  });
46
46
  Object.defineProperty(exports, "getDiagramSince", {
47
47
  enumerable: true,
48
- get: function () { return chunkWK36Z63Y_cjs.getDiagramSince; }
48
+ get: function () { return chunk25TO5A4F_cjs.getDiagramSince; }
49
49
  });
50
50
  Object.defineProperty(exports, "getExamples", {
51
51
  enumerable: true,
52
- get: function () { return chunkWK36Z63Y_cjs.getExamples; }
52
+ get: function () { return chunk25TO5A4F_cjs.getExamples; }
53
53
  });
54
54
  Object.defineProperty(exports, "getSyntax", {
55
55
  enumerable: true,
56
- get: function () { return chunkWK36Z63Y_cjs.getSyntax; }
56
+ get: function () { return chunk25TO5A4F_cjs.getSyntax; }
57
57
  });
58
58
  Object.defineProperty(exports, "listDiagrams", {
59
59
  enumerable: true,
60
- get: function () { return chunkWK36Z63Y_cjs.listDiagrams; }
60
+ get: function () { return chunk25TO5A4F_cjs.listDiagrams; }
61
61
  });
62
62
  Object.defineProperty(exports, "renderDsl", {
63
63
  enumerable: true,
64
- get: function () { return chunkWK36Z63Y_cjs.renderDsl; }
64
+ get: function () { return chunk25TO5A4F_cjs.renderDsl; }
65
65
  });
66
66
  Object.defineProperty(exports, "resolveDiagramType", {
67
67
  enumerable: true,
68
- get: function () { return chunkWK36Z63Y_cjs.resolveDiagramType; }
68
+ get: function () { return chunk25TO5A4F_cjs.resolveDiagramType; }
69
69
  });
70
70
  Object.defineProperty(exports, "validateDsl", {
71
71
  enumerable: true,
72
- get: function () { return chunkWK36Z63Y_cjs.validateDsl; }
72
+ get: function () { return chunk25TO5A4F_cjs.validateDsl; }
73
73
  });
74
74
  //# sourceMappingURL=index.cjs.map
75
75
  //# sourceMappingURL=index.cjs.map
package/dist/ai/index.js CHANGED
@@ -1,7 +1,7 @@
1
- export { DIAGRAM_REGISTRY, DIAGRAM_SINCE, getAllDiagramTypes, getDiagramMeta, getDiagramSince, getExamples, getSyntax, listDiagrams, renderDsl, resolveDiagramType, validateDsl } from '../chunk-EVEPI423.js';
2
- import '../chunk-TRUJ4Q6V.js';
1
+ export { DIAGRAM_REGISTRY, DIAGRAM_SINCE, getAllDiagramTypes, getDiagramMeta, getDiagramSince, getExamples, getSyntax, listDiagrams, renderDsl, resolveDiagramType, validateDsl } from '../chunk-Q5V4LUQR.js';
2
+ import '../chunk-3DPWFWQU.js';
3
3
  import '../chunk-MPCSWRZC.js';
4
- import '../chunk-WAKRRGAV.js';
4
+ import '../chunk-2TUZ3QJA.js';
5
5
  import '../chunk-C7V57V6O.js';
6
6
  import '../chunk-WU2N6ZVM.js';
7
7
  import '../chunk-JTGTWBAD.js';
package/dist/browser.cjs CHANGED
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkLDONE225_cjs = require('./chunk-LDONE225.cjs');
3
+ var chunk5IZL57YJ_cjs = require('./chunk-5IZL57YJ.cjs');
4
4
  require('./chunk-UHPGWO77.cjs');
5
- require('./chunk-QBS4F44Q.cjs');
5
+ require('./chunk-J3EPFZPX.cjs');
6
6
  require('./chunk-SHMG7BVF.cjs');
7
7
  require('./chunk-TACTEF2N.cjs');
8
8
  require('./chunk-34O3C6OC.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(chunkLDONE225_cjs.render(text, config));
29
+ return svgStringToElement(chunk5IZL57YJ_cjs.render(text, config));
30
30
  }
31
31
  function renderPreviewToElement(text, config) {
32
- return svgStringToElement(chunkLDONE225_cjs.renderPreview(text, config));
32
+ return svgStringToElement(chunk5IZL57YJ_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 = chunkLDONE225_cjs.render(text, config);
45
+ container.innerHTML = chunk5IZL57YJ_cjs.render(text, config);
46
46
  }
47
47
  function renderPreviewToContainer(text, container, config) {
48
- container.innerHTML = chunkLDONE225_cjs.renderPreview(text, config);
48
+ container.innerHTML = chunk5IZL57YJ_cjs.renderPreview(text, config);
49
49
  }
50
50
 
51
51
  Object.defineProperty(exports, "render", {
52
52
  enumerable: true,
53
- get: function () { return chunkLDONE225_cjs.render; }
53
+ get: function () { return chunk5IZL57YJ_cjs.render; }
54
54
  });
55
55
  Object.defineProperty(exports, "renderPreview", {
56
56
  enumerable: true,
57
- get: function () { return chunkLDONE225_cjs.renderPreview; }
57
+ get: function () { return chunk5IZL57YJ_cjs.renderPreview; }
58
58
  });
59
59
  Object.defineProperty(exports, "renderResult", {
60
60
  enumerable: true,
61
- get: function () { return chunkLDONE225_cjs.renderResult; }
61
+ get: function () { return chunk5IZL57YJ_cjs.renderResult; }
62
62
  });
63
63
  exports.renderPreviewToContainer = renderPreviewToContainer;
64
64
  exports.renderPreviewToElement = renderPreviewToElement;
package/dist/browser.js CHANGED
@@ -1,7 +1,7 @@
1
- import { render, renderPreview } from './chunk-TRUJ4Q6V.js';
2
- export { render, renderPreview, renderResult } from './chunk-TRUJ4Q6V.js';
1
+ import { render, renderPreview } from './chunk-3DPWFWQU.js';
2
+ export { render, renderPreview, renderResult } from './chunk-3DPWFWQU.js';
3
3
  import './chunk-MPCSWRZC.js';
4
- import './chunk-WAKRRGAV.js';
4
+ import './chunk-2TUZ3QJA.js';
5
5
  import './chunk-C7V57V6O.js';
6
6
  import './chunk-WU2N6ZVM.js';
7
7
  import './chunk-JTGTWBAD.js';
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkLDONE225_cjs = require('./chunk-LDONE225.cjs');
3
+ var chunk5IZL57YJ_cjs = require('./chunk-5IZL57YJ.cjs');
4
4
 
5
5
  // src/ai/registry.ts
6
6
  var DIAGRAM_REGISTRY = [
@@ -3639,7 +3639,7 @@ function getExamples(type, opts = {}) {
3639
3639
  function validateDsl(type, dsl) {
3640
3640
  const resolvedType = type ? resolveDiagramType(type) : void 0;
3641
3641
  const config = type ? { type: resolvedType ?? type } : void 0;
3642
- const result = chunkLDONE225_cjs.parseResult(dsl, config);
3642
+ const result = chunk5IZL57YJ_cjs.parseResult(dsl, config);
3643
3643
  if (result.ok) {
3644
3644
  return {
3645
3645
  ok: true,
@@ -3665,7 +3665,7 @@ function renderDsl(type, dsl, options = {}) {
3665
3665
  ...options,
3666
3666
  ...type ? { type: resolvedType ?? type } : {}
3667
3667
  };
3668
- const result = chunkLDONE225_cjs.renderResult(dsl, config);
3668
+ const result = chunk5IZL57YJ_cjs.renderResult(dsl, config);
3669
3669
  if (result.ok) {
3670
3670
  return {
3671
3671
  ok: true,
@@ -3718,5 +3718,5 @@ exports.listDiagrams = listDiagrams;
3718
3718
  exports.renderDsl = renderDsl;
3719
3719
  exports.resolveDiagramType = resolveDiagramType;
3720
3720
  exports.validateDsl = validateDsl;
3721
- //# sourceMappingURL=chunk-WK36Z63Y.cjs.map
3722
- //# sourceMappingURL=chunk-WK36Z63Y.cjs.map
3721
+ //# sourceMappingURL=chunk-25TO5A4F.cjs.map
3722
+ //# sourceMappingURL=chunk-25TO5A4F.cjs.map