Repository navigation
Releases: andy820621/nuxt-content-mermaid
Release list
v4.0.1
🩹 Fixes
- Keep error-slot source visible (#150). Source shown by an
#errorslot or a custom error component is no longer clipped, error content takes the full row when no diagram has rendered yet, and<code>inside rendered HTML labels stays visible. This resolves the 4.0.0 known limitation (#145). The pre-render hiding rule now applies only to a<pre>or<code>placed directly in the default slot: a fallback wrapped in another element is no longer hidden before rendering, so its box can show while its text stays transparent. The rule's selector specificity also rose, so application CSS that overrode the old rule may need a more specific selector.
💅 Refactors
- Remove versioned names from specs and Mermaid allowlists (#151)
✅ Tests
- Give browser E2E cases an explicit timeout (#153)
❤️ Contributors
- Yao Tsu Hsieh (@andy820621)
v4.0.0
⚠️ Breaking Changes
- Bundle Mermaid
~12.2.0instead of~11.17.0(#146). Mermaid 12 removesflowchart.defaultRenderer,class.defaultRenderer, andstate.defaultRendererfrom its public configuration types, so object literals report TS2353, and ignores the keys at runtime. Setlayout: 'dagre'orlayout: 'elk'inside the diagram type's section to keep the per-type choice, or at top level for every supporting diagram type. Development builds warn once per configuration source and field. - Adopt Mermaid 12's browser baseline: ES2024, Safari 17.4+, and iOS / iPadOS 17.4+ (#146). This is the package's first explicit browser floor; older browsers are outside the contract. Node.js
>=22.19.0, Nuxt^4.1.0, and@nuxt/content >=3.5.0 <4.0.0are unchanged.
🚀 Highlights
- Keep the 3.x rendering direction under Mermaid 12: module defaults select
layout: 'dagre',look: 'classic', and the default/dark theme policy, and keep mindmap oncose-bilkentand swimlane onswimlane(#146). Each default can be overridden; diagram spacing and dimensions can still change. - ELK now ships inside Mermaid and loads as a separate chunk only when a diagram selects
layout: 'elk'(#146).
🩹 Fixes
- deps: Resolve a single unhead 3 release for the website (#148)
🤖 CI
- Audit published dependencies before release (#140)
- Retry Playwright installation once (#142)
- Allow breaking-change marker in PR titles (#147)
📘 Migration
Follow the v4 migration guide and the 4.x dependency and migration contract. An application's ^3.x range does not receive Mermaid 12; install @barzhsieh/nuxt-content-mermaid@^4 to opt in.
With 4.0.0, 3.x becomes a Frozen Legacy Release: it stays installable but receives no dependency updates, compatibility expansion, features, or ordinary fixes. The three months after 4.0.0 publication form a migration assistance window for documentation, usage guidance, and 4.x defects that block migration.
Known limitation: source shown in an error slot can be clipped by existing CSS (#145). It predates Mermaid 12 and is tracked separately.
❤️ Contributors
- Yao Tsu Hsieh (@andy820621)
v3.0.5
🚀 Enhancements
- website: Establish SEO and crawler foundations (#130)
🩹 Fixes
- Handle missing page configuration during SSR (#132)
📖 Documentation
- Simplify release workflow (#128)
Upgrade notes
- After upgrading, stop the Nuxt/Docus app, remove its generated
.data/contentcache (or the configured local Content cache path), then restart or rebuild. Invalidate restored CI Content caches too. Cached markup from 3.0.4 can retain the old binding and continue causing SSR errors. - Separate inline attributes with whitespace, for example
{title="x" toolbar.title="y"}. Comma-separated attributes now preserve the original code fence. - PNG export: after a network failure, some browsers keep the failed module load, so retrying may still fail until the page is reloaded. SVG export remains available.
❤️ Contributors
- Yao Tsu Hsieh (@andy820621)
v3.0.4
v3.0.3
v3.0.2
⚠️ Breaking Changes
-
v3.0.2is the first npm-published successor tov3.0.0and carries forward thev3.0.1removal of the legacy inline Mermaid fence shorthanddisplayMode. Replace{displayMode="compact"}with Mermaid YAML config:--- config: gantt: displayMode: compact ---
Mermaid's official top-level YAML
displayModeremains accepted. Unsupported inline attributes preserve the complete original fence instead of being partially transformed.
🩹 Fixes
- release: Prepare generated Nuxt module types before the package build so
pnpm packsucceeds from a clean checkout. - release: Use
setup-node@v7without its removed dummy authentication fallback and explicitly disable dependency caching in the OIDC publishing job.
ℹ️ Release Recovery
v3.0.1was tagged but failed deterministic artifact verification beforenpm publish; no3.0.1package or GitHub Release was created. Its tag remains unchanged as the immutable record of that attempt.
❤️ Contributors
- Yao Tsu Hsieh (@andy820621)
v3.0.0
v3.0.0
⚠️ Breaking Changes
- Adopt the Nuxt 4 dependency contract: Node.js
>=22.19.0, Nuxt^4.1.0, and@nuxt/content >=3.5.0 <4.0.0are now required (6f8643e). Nuxt 3 users should remain on the frozen 2.x line. - Define the v3 configuration contract and public types (#33): rename the removed
mermaidContentalias tocontentMermaid, keepenabledin build-time module configuration, and transport only pure data through public runtime configuration. - Route configuration authored in Markdown through the
pageConfigprop (9507482). Direct component usage continues to useconfig; supplying both sources is an error. - Remove the undocumented package-root
transformMermaidCodeBlocksexport (#15). Install the module through its default export and let it own Markdown transformation.
🚀 Highlights
- Add SSR-safe, transactional Mermaid rendering so stale or failed renders cannot replace the latest successfully committed diagram (#5, #24, #35).
- Isolate configuration by Nuxt application and component invocation, with frozen runtime snapshots and deterministic recovery from reactive source conflicts (#34, #37, #40, #41).
- Make renderer selection and fallback handoff deterministic, with public diagnostics when renderer resolution fails (#49, #51, #52).
📘 Migration
Follow the v3 migration guide for configuration examples and the dependency and migration contract for the complete 3.x support policy.
❤️ Contributors
v2.2.3
🩹 Fixes
- Use relative import path and fix TS 5.9 type errors (ff62dc8)
❤️ Contributors
- BarZ andy820621@gmail.com
v2.2.2
🩹 Fixes
- Pre-bundle mermaid CJS deps for pnpm strict mode (50d258f)
- Add default export (960e7ee)
- Include missing dayjs duration plugin in optimizeDeps (b47d3fa)
🏡 Chore
- Update dependencies (607fd20)
✅ Tests
- Verify mermaid optimizeDeps injection in module setup (d190633)
❤️ Contributors
- BarZ andy820621@gmail.com
v2.2.1
🎨 Styles
- Use :where() for root and dark theme selectors in styles.css (7c33d98)
❤️ Contributors
- BarZ andy820621@gmail.com