zombie-mermaid 2.2.6 → 3.1.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 CHANGED
@@ -18,7 +18,7 @@ Ultra-fast, fully themeable, zero DOM dependencies. A maintained fork of [`beaut
18
18
  [![CI](https://github.com/dfadler/zombie-mermaid/actions/workflows/ci.yml/badge.svg)](https://github.com/dfadler/zombie-mermaid/actions/workflows/ci.yml)
19
19
  [![codecov](https://codecov.io/gh/dfadler/zombie-mermaid/branch/main/graph/badge.svg)](https://codecov.io/gh/dfadler/zombie-mermaid)
20
20
  [![Bundle Size](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/dfadler/zombie-mermaid/main/badges/bundle-size.json)](#bundle-size)
21
- [![Socket Security](https://socket.dev/api/badge/npm/package/zombie-mermaid)](https://socket.dev/npm/package/zombie-mermaid)
21
+ [![Socket Security](https://badge.socket.dev/npm/package/zombie-mermaid)](https://socket.dev/npm/package/zombie-mermaid)
22
22
  [![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
23
23
 
24
24
  </div>
@@ -47,9 +47,12 @@ Diagrams are essential for AI-assisted programming. When you're working with an
47
47
  ### Bundle Size
48
48
 
49
49
  The **Bundle Size** badge above tracks the gzipped size of `zombie-mermaid`'s
50
- main entry point (`dist/index.js`) and updates automatically with every
51
- release — the same badge/CI-tracked pattern already backing the coverage and
52
- CI status badges. Need ASCII rendering only? `import { renderMermaidASCII }
50
+ main entry point (`dist/index.js`) together with the `@zombie-mermaid/*`
51
+ workspace packages it imports (third-party dependencies such as ELK.js are not
52
+ counted), and updates automatically with every release — the same
53
+ badge/CI-tracked pattern already backing the coverage and CI status badges.
54
+ The standalone renderer packages under [Packages](#packages) get the same
55
+ measurement for their own dependency closure. Need ASCII rendering only? `import { renderMermaidASCII }
53
56
  from 'zombie-mermaid/ascii'` skips [ELK.js](https://github.com/kieler/elkjs),
54
57
  the layout engine the SVG renderer depends on, for a substantially smaller
55
58
  bundle.
@@ -77,6 +80,8 @@ bun add zombie-mermaid
77
80
  pnpm add zombie-mermaid
78
81
  ```
79
82
 
83
+ Only need one output format? `@zombie-mermaid/ascii-renderer` and `@zombie-mermaid/svg-renderer` are published standalone — see [Packages](#packages) below.
84
+
80
85
  ## Quick Start
81
86
 
82
87
  ### SVG Output
@@ -163,7 +168,7 @@ hyperlinks — off by default, since terminal and pager support varies (see
163
168
 
164
169
  > 🧪 **Experimental — shipped to gauge interest, not a finished or best-effort implementation.** This is a first cut covering the common case; the tool surface may change based on feedback. Try it and [open an issue](https://github.com/dfadler/zombie-mermaid/issues/new) with what you'd want from it.
165
170
 
166
- `zombie-mermaid mcp` starts a [Model Context Protocol](https://modelcontextprotocol.io/) server on stdio, exposing the library's rendering as four tools: `render_mermaid_svg`, `render_mermaid_ascii`, `check_mermaid_sequence_activations`, and `fix_mermaid_sequence_activations`. Point an MCP client (Claude Desktop, Claude Code, or anything else that speaks MCP) at it to render Mermaid diagrams directly in a conversation, without shelling out to the CLI or importing the library.
171
+ `zombie-mermaid mcp` starts a [Model Context Protocol](https://modelcontextprotocol.io/) server on stdio, exposing the library's rendering as six tools: `render_mermaid_svg`, `render_mermaid_ascii`, `check_mermaid_sequence_activations`, `fix_mermaid_sequence_activations`, `list_themes`, and `list_diagram_types`. `render_mermaid_svg` also takes optional `bg`/`fg` hex color overrides (applied on top of `theme`) and an optional `outputPath` that writes the SVG to disk and returns `{ saved, size }` instead of the SVG text. `outputPath` must end in `.svg` and resolve inside the server's working directory (the directory your MCP client launched it from); its parent directory must already exist, symlinks and non-regular files are refused, and an existing `.svg` file at that path is overwritten. Point an MCP client (Claude Desktop, Claude Code, or anything else that speaks MCP) at it to render Mermaid diagrams directly in a conversation, without shelling out to the CLI or importing the library.
167
172
 
168
173
  Example Claude Desktop / Claude Code MCP server config:
169
174
 
@@ -212,6 +217,20 @@ the package.
212
217
 
213
218
  ---
214
219
 
220
+ ## Packages
221
+
222
+ This repo is a pnpm-workspace monorepo. Most consumers only need the umbrella `zombie-mermaid` package above; internally it's built from workspace packages under `packages/`, all published under the `@zombie-mermaid` npm scope and version-locked with it:
223
+
224
+ - **[`@zombie-mermaid/ascii-renderer`](packages/ascii-renderer)** — the ASCII/Unicode renderer, published standalone for anyone who wants terminal output without `svg-renderer`'s `elkjs` dependency. The exact code `zombie-mermaid/ascii` re-exports.
225
+ [![npm](https://img.shields.io/npm/v/@zombie-mermaid/ascii-renderer.svg)](https://www.npmjs.com/package/@zombie-mermaid/ascii-renderer) [![gzip size](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/dfadler/zombie-mermaid/main/badges/bundle-size-ascii-renderer.json)](#bundle-size)
226
+ - **[`@zombie-mermaid/svg-renderer`](packages/svg-renderer)** — the ELK.js-backed SVG layout and rendering engine, also published standalone.
227
+ [![npm](https://img.shields.io/npm/v/@zombie-mermaid/svg-renderer.svg)](https://www.npmjs.com/package/@zombie-mermaid/svg-renderer) [![gzip size](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/dfadler/zombie-mermaid/main/badges/bundle-size-svg-renderer.json)](#bundle-size)
228
+ - `@zombie-mermaid/core`, `@zombie-mermaid/mermaid-parser`, `@zombie-mermaid/mcp` — shared types/theming, the diagram parsers, and the MCP server implementation, respectively. Published under the scope (so the names can't be squatted) and version-locked with the rest, but internal-only: no standalone support commitment beyond backing the umbrella and the two renderer packages above.
229
+
230
+ See [docs/decisions/monorepo-conversion.md](docs/decisions/monorepo-conversion.md) for the full package-split and publish-strategy history.
231
+
232
+ ---
233
+
215
234
  ## Docs
216
235
 
217
236
  - [Guides](docs/guides/) — task-oriented walkthroughs: [browsing the samples](docs/guides/samples.md), [choosing a theme](docs/guides/theming.md), [using the HTML viewer](docs/guides/html-viewer.md)