zombie-mermaid 5.14.4 → 5.16.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.
- package/README.md +3 -3
- package/dist/ascii-layout.cjs +1 -1
- package/dist/ascii-layout.js +2 -2
- package/dist/cli.js +256 -143
- package/dist/index.cjs +1 -1
- package/dist/index.js +124 -5
- package/dist/mcp.cjs +1 -1
- package/dist/mcp.js +121 -0
- package/dist/shared/ascii-layout.d.ts +1 -1
- package/dist/{src-pkQWSY51.cjs → src-BPQE98KC.cjs} +1 -1
- package/dist/{src-CsMv6Ia1.js → src-CDuA-5JU.js} +1 -1
- package/dist/{src-MFjqatSR.js → src-MQzfxgx9.js} +1 -1
- package/dist/src-Qo65SnxX.cjs +1 -0
- package/package.json +20 -11
- package/dist/src-D4LsWkIk.cjs +0 -1
package/README.md
CHANGED
|
@@ -86,7 +86,7 @@ the SVG renderer at all (see [ASCII Output](#ascii-output)).
|
|
|
86
86
|
|
|
87
87
|
## Features
|
|
88
88
|
|
|
89
|
-
- **
|
|
89
|
+
- **19 diagram types** — Flowcharts (including State), Sequence, Class, ER, XY Charts (bar, line, combined), Architecture, C4, Pie, Quadrant charts, Gantt charts, Mindmaps, Timelines, Requirement diagrams, Kanban boards, User Journeys, Radar charts, Packets, Git graphs, and Sankey diagrams
|
|
90
90
|
- **Dual output** — SVG for rich UIs, ASCII/Unicode for terminals
|
|
91
91
|
- **Synchronous rendering** — No async, no flash. Works with React `useMemo()`
|
|
92
92
|
- **15 built-in themes** — And dead simple to add your own
|
|
@@ -152,7 +152,7 @@ registerElk(ELK)
|
|
|
152
152
|
```
|
|
153
153
|
|
|
154
154
|
Architecture diagrams (`architecture-beta`, see [Supported Diagrams](docs/diagrams.md#architecture-diagrams)) use their own grid layout (as Mermaid does), so they need no `elkjs`.
|
|
155
|
-
Sequence, pie, quadrant, xychart and C4 diagrams, and all ASCII output, need no `elkjs`
|
|
155
|
+
Sequence, pie, quadrant, gantt, xychart and C4 diagrams, and all ASCII output, need no `elkjs`
|
|
156
156
|
and no registration. Rendering a graph diagram with no `elkjs` available throws an
|
|
157
157
|
`ElkNotRegisteredError` that says how to fix it.
|
|
158
158
|
|
|
@@ -225,7 +225,7 @@ zombie-mermaid --help # Show all options
|
|
|
225
225
|
hyperlinks — off by default, since terminal and pager support varies (see
|
|
226
226
|
[ASCII terminal hyperlinks](docs/diagrams.md#ascii-terminal-hyperlinks)).
|
|
227
227
|
`--profile markdown` (with `--ascii`) emits plain ASCII characters with no color, for pasting into issues, commits and fenced blocks (the `profile` option in the library and the MCP `render_mermaid_ascii` tool).
|
|
228
|
-
`--layout mermaid` (with `--ascii`, opt-in) draws a flowchart from mermaid's own ELK layout instead of the grid renderer; the library equivalent is `renderMermaidASCIIWithLayout` from `zombie-mermaid/ascii-layout`. It needs the optional peer `elkjs-0.
|
|
228
|
+
`--layout mermaid` (with `--ascii`, opt-in) draws a flowchart from mermaid's own ELK layout instead of the grid renderer; the library equivalent is `renderMermaidASCIIWithLayout` from `zombie-mermaid/ascii-layout`. It needs the optional peer `elkjs-0.12.0` (`pnpm add elkjs-0.12.0@npm:elkjs@0.12.0`), which is loaded only when the flag is used. Diagrams with subgraphs or unmodelled shapes, non-flowchart diagrams, layout failures, and drawings that cannot fit 120 columns (`--layout mermaid-wide` / `maxCols: Infinity` keeps the wide text) fall back to the default renderer, and stderr (or the result's `fallbackReason`) says which one ran. Merged parallel edges hide edge multiplicity; results depend on mermaid 12.1.0 and elkjs 0.12.0. Not available in the MCP tool. See [known differences](docs/known-differences.md#ascii-opt-in-layout-faithful-mode---layout-mermaid).
|
|
229
229
|
|
|
230
230
|
**Output rules.** `-o` is the destination for the run's _file_ output — SVG, HTML, or PNG when `--svg`/`--html`/`--png` is given, otherwise the ASCII rendering — and `-o -` sends it to stdout instead. A recognised extension (`.svg`, `.html`/`.htm`, `.txt`, `.png`) picks the format on its own, so the flag can be dropped; an extension that contradicts an explicit flag (`--svg -o out.txt`) is an error, while unrecognised ones are simply used as given. `--svg`/`--html`/`--png` with no `-o` writes `<input stem>.svg`/`.html`/`.png` beside the input (stdin input has no name to derive from, so it must pass `-o`). Only one of `--svg`/`--html`/`--png` can be set at a time — run the command twice for more than one. ASCII always prints to the terminal when one of them is also requested (`--ascii --svg -o out.svg`), and never carries ANSI colour codes when written to a file. **An existing output file is never overwritten unless you pass `--force`/`-f`.**
|
|
231
231
|
|
package/dist/ascii-layout.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@zombie-mermaid/ascii-renderer"),t=require("@zombie-mermaid/core");async function n(n,r={}){let{layout:i,maxCols:a,...o}=r,s=t=>({text:(0,e.renderMermaidASCII)(n,o),path:`standard`,...t===void 0?{}:{fallbackReason:t}});if(i!==`mermaid`)return s();let c=(0,t.detectDiagramType)(n);if(c!==`flowchart`)return s(`not applicable to ${c} diagrams (flowcharts only)`);let l,u;try{[l,u]=await Promise.all([Promise.resolve().then(()=>require("./src-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@zombie-mermaid/ascii-renderer"),t=require("@zombie-mermaid/core");async function n(n,r={}){let{layout:i,maxCols:a,...o}=r,s=t=>({text:(0,e.renderMermaidASCII)(n,o),path:`standard`,...t===void 0?{}:{fallbackReason:t}});if(i!==`mermaid`)return s();let c=(0,t.detectDiagramType)(n);if(c!==`flowchart`)return s(`not applicable to ${c} diagrams (flowcharts only)`);let l,u;try{[l,u]=await Promise.all([Promise.resolve().then(()=>require("./src-Qo65SnxX.cjs")),Promise.resolve().then(()=>require("./src-BPQE98KC.cjs"))])}catch{return s(`elkjs 0.12.0 is not installed (pnpm add elkjs-0.12.0@npm:elkjs@0.12.0)`)}try{let e=await u.renderFlowchartAscii(n,a===void 0?void 0:{maxCols:a});return e.capped?{text:e.text,path:`layout-faithful`,note:e.note}:s(`layout-faithful output is ${e.stats.naturalCols} columns, over the ${a??u.DEFAULT_MAX_COLS}-column cap`)}catch(e){return e instanceof l.UnsupportedFlowchartError?s(`unsupported (${e.reasons.join(`; `)})`):s(`layout failed (${e instanceof Error?e.message:String(e)})`)}}exports.renderMermaidASCIIWithLayout=n;
|
package/dist/ascii-layout.js
CHANGED
|
@@ -12,9 +12,9 @@ async function n(n, r = {}) {
|
|
|
12
12
|
if (c !== "flowchart") return s(`not applicable to ${c} diagrams (flowcharts only)`);
|
|
13
13
|
let l, u;
|
|
14
14
|
try {
|
|
15
|
-
[l, u] = await Promise.all([import("./src-
|
|
15
|
+
[l, u] = await Promise.all([import("./src-CDuA-5JU.js"), import("./src-MQzfxgx9.js")]);
|
|
16
16
|
} catch {
|
|
17
|
-
return s("elkjs 0.
|
|
17
|
+
return s("elkjs 0.12.0 is not installed (pnpm add elkjs-0.12.0@npm:elkjs@0.12.0)");
|
|
18
18
|
}
|
|
19
19
|
try {
|
|
20
20
|
let e = await u.renderFlowchartAscii(n, a === void 0 ? void 0 : { maxCols: a });
|