agentic-mermaid 0.1.2 → 0.3.0

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 (54) hide show
  1. package/AGENT_NATIVE.md +671 -0
  2. package/CHANGELOG.md +36 -0
  3. package/Instructions_for_agents.md +89 -0
  4. package/README.md +8 -8
  5. package/assets/hero.png +0 -0
  6. package/dist/agent-core.d.ts +2 -2
  7. package/dist/agent-core.js +2 -2
  8. package/dist/agent.d.ts +2 -2
  9. package/dist/agent.js +4 -4
  10. package/dist/agentic-mermaid-mcp.js +5 -5
  11. package/dist/am.js +8 -15
  12. package/dist/browser.global.js +777 -0
  13. package/dist/{chunk-WN3YDOBG.js → chunk-3QCXO4V6.js} +4 -4
  14. package/dist/{chunk-4QECACIA.js → chunk-AVCWKYII.js} +19 -19
  15. package/dist/{chunk-WI35L7IR.js → chunk-GILQUGFK.js} +2 -2
  16. package/dist/{chunk-QKDLMOJJ.js → chunk-HFD4MALA.js} +7 -9
  17. package/dist/{chunk-CDPKJ2BQ.js → chunk-UJNY65QS.js} +2 -2
  18. package/dist/{chunk-ZYMMKQ3I.js → chunk-WHYJLDYG.js} +299 -973
  19. package/dist/{index-D54dqSdC.d.ts → index-CLwYn6Im.d.ts} +7 -4
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.js +1 -1
  22. package/dist/mcp-cli-SJVOGRA6.js +17 -0
  23. package/docs/README.md +35 -34
  24. package/docs/agent-api-cookbook.md +317 -0
  25. package/docs/agent-mutation-policy.md +104 -0
  26. package/docs/agent-workflow-examples.md +46 -0
  27. package/docs/api.md +418 -0
  28. package/docs/ascii.md +113 -0
  29. package/docs/browser.md +183 -0
  30. package/docs/code-mode-impact.md +214 -0
  31. package/docs/comparison.md +106 -0
  32. package/docs/computational-aesthetics-prototype-plan.md +252 -0
  33. package/docs/config.md +121 -0
  34. package/docs/custom-fonts.md +265 -0
  35. package/docs/custom-style-cookbook.md +275 -0
  36. package/docs/diagram-families.md +218 -0
  37. package/docs/features.md +154 -0
  38. package/docs/fork-differences.md +166 -0
  39. package/docs/getting-started.md +182 -0
  40. package/docs/issue-derived-test-cases.md +163 -0
  41. package/docs/mcp-code-mode-rationale.md +108 -0
  42. package/docs/mcp-http-transport.md +230 -0
  43. package/docs/mermaid-layout-complaints.md +851 -0
  44. package/docs/mutation-testing.md +285 -0
  45. package/docs/quality.md +224 -0
  46. package/docs/react.md +97 -0
  47. package/docs/style-authoring.md +336 -0
  48. package/docs/svg-semantic-contract.md +49 -0
  49. package/docs/testing-strategy.md +443 -0
  50. package/docs/theming.md +149 -0
  51. package/package.json +28 -9
  52. package/server.json +2 -2
  53. package/skills/agentic-mermaid-live-editor/SKILL.md +1 -1
  54. package/dist/mcp-cli-SBQSTJFC.js +0 -17
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  renderMermaidPNG
3
- } from "./chunk-WI35L7IR.js";
3
+ } from "./chunk-GILQUGFK.js";
4
4
  import {
5
5
  collectActionRecords,
6
6
  layoutMermaid,
7
7
  renderMermaidASCIIWithMeta,
8
8
  renderMermaidSVG
9
- } from "./chunk-4QECACIA.js";
9
+ } from "./chunk-AVCWKYII.js";
10
10
  import {
11
11
  SHARED_RENDER_OPTION_FIELDS,
12
12
  decodedSvgAttributeValue,
@@ -15,7 +15,7 @@ import {
15
15
  prepareRenderInput,
16
16
  scanSvgStartTags,
17
17
  toFinite
18
- } from "./chunk-ZYMMKQ3I.js";
18
+ } from "./chunk-WHYJLDYG.js";
19
19
 
20
20
  // src/agent/index.ts
21
21
  function sharedRenderOptions(options) {
@@ -146,4 +146,4 @@ function renderMermaidWithActions(input, request) {
146
146
  export {
147
147
  renderMermaidWithActions
148
148
  };
149
- //# sourceMappingURL=chunk-WN3YDOBG.js.map
149
+ //# sourceMappingURL=chunk-3QCXO4V6.js.map
@@ -52,6 +52,7 @@ import {
52
52
  normalizeMermaidSource,
53
53
  normalizeV11Shape,
54
54
  ok,
55
+ parseAccessibilityDirective,
55
56
  parseActorLinks,
56
57
  parseClassDeclaration,
57
58
  parseClassDiagram,
@@ -92,7 +93,7 @@ import {
92
93
  visualWidth,
93
94
  wcagCssContrastRatio,
94
95
  wrapperPrefix
95
- } from "./chunk-ZYMMKQ3I.js";
96
+ } from "./chunk-WHYJLDYG.js";
96
97
 
97
98
  // src/agent/trace-log.ts
98
99
  var appendFn;
@@ -2819,26 +2820,25 @@ function collectFlowchartActions(source) {
2819
2820
  return out;
2820
2821
  }
2821
2822
  function actionSourceLines(source, maskMarkdownStrings = false) {
2822
- const out = [];
2823
2823
  const lines = source.split(/\r?\n/);
2824
- let inAccessibilityBlock = false;
2825
- let inMarkdownString = false;
2824
+ const out = [];
2826
2825
  for (let index = 0; index < lines.length; index++) {
2827
- const preserveActionText = maskMarkdownStrings && !inMarkdownString && splitFlowchartStatements(lines[index]).some((statement) => /^(?:click|href)\s+/i.test(statement.trim()));
2828
- const masked = maskMarkdownStrings && !preserveActionText ? maskMarkdownStringContent(lines[index], inMarkdownString) : { text: lines[index], open: false };
2829
- inMarkdownString = masked.open;
2830
- const text = masked.text.trim();
2831
- if (inAccessibilityBlock) {
2832
- if (text.includes("}")) inAccessibilityBlock = false;
2833
- continue;
2826
+ const directive = parseAccessibilityDirective(lines, index);
2827
+ if (directive === void 0) break;
2828
+ if (directive === null) out.push({ text: lines[index].trim(), line: index + 1 });
2829
+ else {
2830
+ if (directive.suffixLine) out.push({ text: directive.suffixLine.trim(), line: directive.endIndex + 1 });
2831
+ index = directive.endIndex;
2834
2832
  }
2835
- const block = text.match(/^accDescr\s*:?\s*\{\s*(.*)$/i);
2836
- if (block) {
2837
- if (!block[1].includes("}")) inAccessibilityBlock = true;
2838
- continue;
2839
- }
2840
- if (/^acc(?:Title|Descr)(?:\s*:|\s+)/i.test(text)) continue;
2841
- out.push({ text, line: index + 1 });
2833
+ }
2834
+ if (!maskMarkdownStrings) return out;
2835
+ let inMarkdownString = false;
2836
+ for (const sourceLine of out) {
2837
+ const preserveActionText = !inMarkdownString && splitFlowchartStatements(sourceLine.text).some((statement) => /^(?:click|href)\s+/i.test(statement.trim()));
2838
+ if (preserveActionText) continue;
2839
+ const masked = maskMarkdownStringContent(sourceLine.text, inMarkdownString);
2840
+ inMarkdownString = masked.open;
2841
+ sourceLine.text = masked.text.trim();
2842
2842
  }
2843
2843
  return out;
2844
2844
  }
@@ -4699,4 +4699,4 @@ export {
4699
4699
  layoutMermaidWithReceipt,
4700
4700
  layoutMermaid
4701
4701
  };
4702
- //# sourceMappingURL=chunk-4QECACIA.js.map
4702
+ //# sourceMappingURL=chunk-AVCWKYII.js.map
@@ -13,7 +13,7 @@ import {
13
13
  renderPngGraphicalProjection,
14
14
  snapshotHostBackendPolicy,
15
15
  snapshotResourceManifest
16
- } from "./chunk-ZYMMKQ3I.js";
16
+ } from "./chunk-WHYJLDYG.js";
17
17
 
18
18
  // src/agent/png.ts
19
19
  import { fileURLToPath } from "url";
@@ -612,4 +612,4 @@ export {
612
612
  renderMermaidPNGWithReceipt,
613
613
  createMermaidPNGRenderer
614
614
  };
615
- //# sourceMappingURL=chunk-WI35L7IR.js.map
615
+ //# sourceMappingURL=chunk-GILQUGFK.js.map
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  projectKnownRenderErrorDiagnostic,
3
3
  projectRenderErrorDiagnostic
4
- } from "./chunk-CDPKJ2BQ.js";
4
+ } from "./chunk-UJNY65QS.js";
5
5
  import {
6
6
  renderMermaidPNG,
7
7
  renderMermaidPNGWithReceipt
8
- } from "./chunk-WI35L7IR.js";
8
+ } from "./chunk-GILQUGFK.js";
9
9
  import {
10
10
  analyzeMermaid,
11
11
  analyzeMermaidSource,
@@ -31,14 +31,14 @@ import {
31
31
  renderMermaidSVGWithReceipt,
32
32
  verifyMermaid,
33
33
  verifySummary
34
- } from "./chunk-4QECACIA.js";
34
+ } from "./chunk-AVCWKYII.js";
35
35
  import {
36
36
  BUILTIN_FAMILY_METADATA,
37
+ PACKAGE_VERSION,
37
38
  ParsedDiagramFamilyMismatchError,
38
39
  RENDER_CONTRACT_VERSION,
39
40
  RENDER_OUTPUT_DESCRIPTORS,
40
41
  RenderCapabilityError,
41
- __toESM,
42
42
  architectureVisualOverridesTypeScriptDeclaration,
43
43
  asArchitecture,
44
44
  asClass,
@@ -61,7 +61,6 @@ import {
61
61
  parseRegisteredMermaid,
62
62
  pngOutputOptionsJsonSchema,
63
63
  projectNativePngOutputPolicyInput,
64
- require_package,
65
64
  resolveStyleStack,
66
65
  safeCssColor,
67
66
  safeCssFontFamily,
@@ -72,7 +71,7 @@ import {
72
71
  styleSpecTypeScriptDeclaration,
73
72
  validateJsonConfigAdmission,
74
73
  validateSerializableRenderOptions
75
- } from "./chunk-ZYMMKQ3I.js";
74
+ } from "./chunk-WHYJLDYG.js";
76
75
 
77
76
  // src/mcp/server.ts
78
77
  import { randomUUID as randomUUID2 } from "crypto";
@@ -1265,12 +1264,11 @@ function rpcError(id, code, message) {
1265
1264
  }
1266
1265
 
1267
1266
  // src/mcp/tool-surface.ts
1268
- var import_package = __toESM(require_package(), 1);
1269
1267
  function withClosedMcpInputSchema(tool) {
1270
1268
  return { ...tool, inputSchema: { ...tool.inputSchema, additionalProperties: false } };
1271
1269
  }
1272
1270
  var MCP_SERVER_NAME = "agentic-mermaid-mcp";
1273
- var MCP_SERVER_VERSION = import_package.default.version;
1271
+ var MCP_SERVER_VERSION = PACKAGE_VERSION;
1274
1272
  var PURE_COMPUTE_ANNOTATIONS = {
1275
1273
  readOnlyHint: true,
1276
1274
  destructiveHint: false,
@@ -3484,4 +3482,4 @@ export {
3484
3482
  parseMcpCliOptions,
3485
3483
  runMcpCli
3486
3484
  };
3487
- //# sourceMappingURL=chunk-QKDLMOJJ.js.map
3485
+ //# sourceMappingURL=chunk-HFD4MALA.js.map
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  AsciiWidthError,
3
3
  MermaidFamilyDetectionError
4
- } from "./chunk-ZYMMKQ3I.js";
4
+ } from "./chunk-WHYJLDYG.js";
5
5
 
6
6
  // src/render-error-diagnostic.ts
7
7
  function projectKnownRenderErrorDiagnostic(error) {
@@ -34,4 +34,4 @@ export {
34
34
  projectKnownRenderErrorDiagnostic,
35
35
  projectRenderErrorDiagnostic
36
36
  };
37
- //# sourceMappingURL=chunk-CDPKJ2BQ.js.map
37
+ //# sourceMappingURL=chunk-UJNY65QS.js.map