This repository was archived by the owner on Nov 13, 2026. It is now read-only.
Repository navigation
Releases
Releases · inkdropapp/mermaid
v4.0.1
Features
- New Center Diagrams setting in Preferences → Plugins → mermaid places diagrams in the middle of their code block instead of on the left. It's off by default and applies to diagrams already on screen.
Fixes
- The dot grid behind a diagram now fills its code block up to the border, and a zoomed diagram pans right up to the edge. The full-screen view does the same.
Notes
- Bundles
@inkdropapp/mermaid1.0.1. - Theme authors who pad code blocks differently set
--mermaid-card-padding(default16px) rather than thepre's padding, which diagrams replace.
@inkdropapp/mermaid@1.0.1
Features
- New
centerprop: places the drawing in the middle of its canvas instead of at the left edge. Afilldiagram is always centred. - New
--mermaid-diagram-insetcustom property: the room between the canvas edge and the drawing. The dot grid and a zoomed drawing reach the canvas edge, and the toolbar moves in by the same amount. Full-screen shells set it instead of padding themselves. - Themes can set
--mermaid-card-padding(default16px, one to four lengths) to change the inset inside a preview code block.
Fixes
- In a preview code block, the card's padding moves onto the canvas, so the dot grid fills the card up to its border instead of stopping 16px short. Print keeps the card's own padding.
- A
filldiagram fits inside the canvas padding, and a detached container is left alone.
Docs
- The README documents Pele, math, the zoom behaviour,
center,--mermaid-diagram-insetand--mermaid-card-padding.
Other
check:stylesalso checks the canvas layout: card and theme padding, print,center, zoom and pan, the toolbar position and full-screen fit.
Notes
- The diagram SVG is now
display: block, so each inline diagram is a few pixels shorter: the line gap under an inline SVG is gone.
v4.0.0
Features
- Diagrams are drawn by Pele instead of Mermaid: faster, and the plugin's diagram code shrinks from 5.16 MB (1.43 MB gzipped) to 705 kB (254 kB gzipped).
$$...$$math in labels is typeset with KaTeX, loaded only when a diagram contains math.- Zoom with Ctrl/Cmd + scroll or pinch, and drag to pan while zoomed. Inline, only diagrams shrunk to fit are zoomable; full screen zooms any diagram.
- Full screen fits the diagram in both axes, keeps your zoom when the window resizes, and the dot grid follows the diagram.
- Errors show in place, over the last good drawing while you edit.
inkdrop://note links work in diagrams.
Notes
- Bundles
@inkdropapp/mermaid1.0.0 and Pele 1.9.0. - Layout and styling differ somewhat from Mermaid's.
- Text can't be selected while zoomed in, and the cursor shows an arrow while dragging. Both come from Pele.
@inkdrop/mermaid@1.0.0
Breaking changes
- Diagrams are drawn by Pele instead of Mermaid and panzoom.
mermaidandpanzoomare no longer peer dependencies;pele1.9.0 is a dependency. usePanZoomandPanZoomControlsare replaced byuseZoomControlsandZoomControls.buildInkdropThemeVariablesis removed. The--mermaid-*tokens are mapped onto Pele's--pele-*variables instyles/mermaid.cssand stay live across theme switches.
Features
- Typeset
$$...$$math in labels with the newmathoption.createKatexMath(katex)builds a resolver from the host's KaTeX, rendering MathML in each platform's math font. - Inline, only diagrams shrunk to fit are zoomable, so diagrams that fit aren't tab stops and don't block page pinch-zoom on mobile.
- In
fillmode, the diagram fits both axes, keeps the user's zoom across resizes, and the dot grid pans and zooms with it. - Diagram errors show in place, over the last good drawing while editing.
inkdrop://links work in diagrams.
Other
- Add
check:styles, which renders every diagram type in Chromium or WebKit and checks the themed styles.
Notes
- Text can't be selected while zoomed in, and the cursor shows an arrow while dragging. Both come from Pele.
v3.1.0
Features
- Upgrade to Mermaid 12. Flowchart, state, class, sequence, ER and other diagrams now use Mermaid's new
neolook, and ELK is bundled as the default layout. - Node shadows follow the Inkdrop theme through the new
--mermaid-node-shadowvariable, in light, dark and print. - Sequence diagram actors use the themed shadow too, so it no longer disappears on light themes.
- Theme the new use case (
usecase-beta) and agentflow (agentflow-beta) diagrams.
Fixes
- Stop diagrams from rendering twice on mount.
- Keep the diagram on screen while its source is edited.
- Give each render a fresh id so the diagram never blanks.
- Resolve theme variables against the diagram's own theme scope.
Refactoring
- Split the rendering core out into
@inkdropapp/mermaid(now 0.2.0).
Docs
- Add a package README and fix the plugin manifest.
Other
- Bump dev dependencies and tidy lint errors.
- Point repository URLs at
inkdropapp/mermaid.
Notes
- The shadow and use case colours need the new variables from
@inkdropapp/css0.10.1 or later. Without them, nodes show no shadow. - Mermaid 12 requires ES2024 (Safari 17.4 / iOS 17.4).
- The plugin's Mermaid bundle grows from about 3.4 MB to 5.2 MB because ELK is now included.
@inkdrop/mermaid@0.1.5
Other
- Fix lint errors surfaced by the updated oxlint (impure
Math.randomcall during render, and host components re-created on every render) - Upgrade
typescriptto v7,mermaid,@inkdropapp/types,@types/node,@types/react,playwright,tsdown,oxfmt, andoxlint
@inkdrop/mermaid@0.1.4
Fixes
- Resolve
--mermaid-*theme variables against the diagram's own theme scope instead of always falling back to:root. A host can scope a theme's variables to a class partway down the tree (e.g. a themed section); the diagram now follows that scope.
@inkdrop/mermaid@0.1.1
First tagged release of @inkdropapp/mermaid, the host-agnostic rendering package split out of the Inkdrop plugin. Covers everything since v3.0.1.
Fixes
- Diagrams no longer render twice on mount. The theme effect guarded its first run with a one-shot ref, which assumed the effect body runs exactly once per mount. React makes no such guarantee — it re-runs effects without remounting under StrictMode, and whenever a Suspense subtree is hidden and revealed, which is what happens when a host loads the component through
React.lazy. The second run scheduled a real timer and forced a spurious re-render roughly 400ms after the diagram appeared. This affected every consumer, including those that never passthemeRevision. - Fixed an invalid
styleSheetsentry that left the plugin'spackage.jsonunparseable.
Refactoring
- Split the rendering core into
@inkdropapp/mermaidand converted the repository into a pnpm workspace (packages/mermaid+packages/plugin). The package imports no Inkdrop API — the button component, print mode and theme signal all arrive as props — so the website demo and the mobile web editor can share one implementation instead of each carrying its own port. - The full-screen viewer's stage collapsed into the shared
<MermaidDiagram fill />, with the lazy boundary kept in the host so Mermaid stays out of the eager entry chunk. - Pan/zoom now initialises via
ResizeObserver, which fires on any real size change (for example a pane leavingdisplay: none).
Docs
- Added a README for
@inkdropapp/mermaidcovering the API, the two required stylesheets and the peer dependencies. - Added a repository-root README describing the workspace layout, development and publishing.
Other
- Repository URLs now point at
inkdropapp/mermaid.
v3.0.1
v3.0.0
Features
- Add full-screen diagram viewer
- Theme diagrams via Inkdrop CSS variables (#34)
- Add dot-grid background behind diagrams
- Add pan/zoom toolbar for rendered diagrams
Fixes
- Use
useLocalConfigValueforcore.themeobservation - Use hand cursor and support ctrl/cmd zoom-out on double-click (pan/zoom)
- Re-render diagrams when the app theme changes
- Normalize
color(srgb)probe output for khroma (theme) - Hide scrollbar (style)
- Allow selecting text when holding ctrl/cmd (pan/zoom)
- Use CSS variables (style)
Docs
- Update README
Other
- Narrow inkdrop engine range to
^6.0.0