@mermanjs/node 0.9.1 → 0.9.3

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/CHANGELOG.md CHANGED
@@ -2,6 +2,24 @@
2
2
 
3
3
  All notable changes to the `@mermanjs/node` package group will be documented in this file.
4
4
 
5
+ ## [0.9.3] - 2026-10-30
6
+
7
+ - Sequence diagrams and GitGraph tag backgrounds resolve their diagram-scoped built-in Neo shadows. Sequence viewports include box-frame strokes and restored built-in Neo shadows to prevent clipping. [#255](https://github.com/Latias94/merman/pull/255)
8
+
9
+ - Flowchart preserves percent-containing node IDs, and YAML frontmatter no longer mistakes brackets in comments or block text for nested collections. [#241](https://github.com/Latias94/merman/pull/241), [#251](https://github.com/Latias94/merman/pull/251)
10
+ - `createNodeEngine({ iconPacks })` accepts already-loaded Iconify JSON for icons scoped to that engine. The application owns loading and credentials. [#247](https://github.com/Latias94/merman/pull/247)
11
+ - Correct label sizing, configured fonts, literal text, and HTML/entity handling across SVG diagrams, including wrapped Swimlane edge labels and valid Class-note XML. Review updated output snapshots. [#245](https://github.com/Latias94/merman/pull/245), [#247](https://github.com/Latias94/merman/pull/247), [#250](https://github.com/Latias94/merman/pull/250)
12
+ - Apply Gantt `tickInterval`, Mindmap root padding and width settings, and Sequence numbering, participant visibility, and note alignment. Init directives follow Mermaid 12.1.0's filtering and merge order. [#252](https://github.com/Latias94/merman/pull/252)
13
+ - Refresh the native and WASM dependency graphs while retaining Mermaid 12.1.0, Options JSON schema 2, Node transport 1, and text-measurement protocol 1 with its 22 operations (0..21). The host literal-height extension (operation 22) is deferred; see the [host guide](../../docs/bindings/HOST_TEXT_MEASUREMENT.md) for callback limits. Native C/WASI SDK archives have separate APIs and capabilities; this package continues to provide its own SVG recipe. See the [workspace changelog](../../CHANGELOG.md). [#245](https://github.com/Latias94/merman/pull/245), [#247](https://github.com/Latias94/merman/pull/247)
14
+
15
+ ## [0.9.2] - 2026-10-22
16
+
17
+ - Host themes keep C4 boundary contents and relationships visible, color Wardley anchors, and apply a coherent ZenUML palette. Diagram-selected Mermaid palettes retain matching text and fills. [#235](https://github.com/Latias94/merman/pull/235), [issue #229](https://github.com/Latias94/merman/issues/229), [issue #230](https://github.com/Latias94/merman/issues/230), [issue #231](https://github.com/Latias94/merman/issues/231), [issue #232](https://github.com/Latias94/merman/issues/232)
18
+ - Look selectors and Block/Requirement source CSS are validated before SVG emission. SVG CSS cleanup rejects unterminated strings, comments, and URLs while preserving safe neighboring declarations. [#227](https://github.com/Latias94/merman/pull/227), [#235](https://github.com/Latias94/merman/pull/235), [#237](https://github.com/Latias94/merman/pull/237)
19
+ - Repeated Flowchart `classDef` declarations retain earlier styles, and unsupported Unicode characters preserve valid error spans and lexer progress. Malformed Pie/Info headers and empty XYChart sources behave consistently across parser and editor entrypoints. [#178](https://github.com/Latias94/merman/pull/178), [#227](https://github.com/Latias94/merman/pull/227), [#237](https://github.com/Latias94/merman/pull/237)
20
+
21
+ The existing Presentation and binding options contracts are unchanged. Review regenerated SVG and exported-image snapshots; see the [workspace changelog](../../CHANGELOG.md) for the complete maintenance release.
22
+
5
23
  ## [0.9.1] - 2026-10-18
6
24
 
7
25
  - ER diagram SVG emission reuses prepared entity geometry, avoiding false missing-size errors on larger diagrams.
package/README.md CHANGED
@@ -89,5 +89,39 @@ or transport-admission checkpoint and reports Merman's typed cancellation detail
89
89
  Use `renderSvgSync()` only for an explicitly synchronous static-site build path. It refuses to run
90
90
  while asynchronous operations are active or queued.
91
91
 
92
+ ## Loaded icon packs (unreleased)
93
+
94
+ Load Iconify pack JSON in the host and pass its text as a constructor service:
95
+
96
+ ```js
97
+ import { readFile } from "node:fs/promises";
98
+ import { createNodeEngine } from "@mermanjs/node";
99
+
100
+ const json = await readFile("./icons.json", "utf8");
101
+ const engine = await createNodeEngine({
102
+ iconPacks: [{ json, registrationName: "app" }],
103
+ });
104
+ try {
105
+ const svg = await engine.renderSvg('flowchart TD\nA@{ icon: "app:rocket", label: "Launch" }');
106
+ console.log(svg);
107
+ } finally {
108
+ await engine.dispose();
109
+ }
110
+ ```
111
+
112
+ The example assumes the pack contains `rocket`. `json` must be the loaded JSON string.
113
+ Omit `registrationName` to use the pack's prefix. A registered icon takes precedence over a
114
+ matching built-in icon in that engine. Packs are admitted once into immutable engine-local
115
+ state; changing the original array or rendering through another engine does not change it.
116
+ Per-request options preserve the installed registry.
117
+
118
+ `iconPacks` belongs to `CreateNodeEngineOptions`, separately from `bindingOptions`.
119
+ An omitted value or `[]` retains ordinary rendering. The constructor performs no network or
120
+ filesystem access. The fixed pack/content limits advertised by the `icon-registry` constructor
121
+ contract apply across native and Node-WASM. Content failures retain
122
+ `MermanOperationError.iconRegistryDetails`, and resource failures also retain
123
+ `resourceDetails`. A failed constructor publishes no engine. Dispose engines when their build
124
+ or request scope ends.
125
+
92
126
  See the [Node.js package guide](https://github.com/Latias94/merman/blob/main/platforms/node/README.md)
93
127
  for source-checkout development, package verification, and release design.