Tags: inkdropapp/mermaid
Tags
Release @inkdropapp/mermaid 0.1.4 Resolve theme variables against the diagram's own theme scope instead of always falling back to :root. A host can scope a theme's `--mermaid-*` variables to a class partway down the tree (e.g. a themed landing section); the resolution probe now mounts inside the render container so it picks up that scope, matching how the diagram itself is themed.
Release @inkdropapp/mermaid 0.1.3 Give each render a fresh id so the diagram never blanks. Mermaid's render() opens with removeExistingElements(), which deletes whatever element already carries the id it was handed. The id was generated once per component instance and reused, so every re-render began by deleting the SVG currently on screen — measured at ~20ms per keystroke in the real desktop app, and a continuous strobe in www, which has no preview debouncing. Handing Mermaid a fresh id per render leaves the visible diagram alone until its replacement is swapped in. Verified: six keystrokes, zero blank gaps.
Release @inkdropapp/mermaid 0.1.2 Keep the diagram on screen while its source is edited. The effect cleanup and the error path both cleared the container synchronously on every code change, while the replacement render is async — blanking the preview on each keystroke (measured: six keystrokes, six 20-29ms blank gaps). The rendered SVG is now replaced only once the new one is ready, and an invalid intermediate state leaves the last valid render on screen with the error alongside it. Mermaid tooltip cleanup moved to the three points that actually replace or discard the DOM it belongs to.
Release @inkdropapp/mermaid 0.1.1 Fix diagrams rendering twice on mount: the theme effect guarded its first run with a one-shot ref, which React consumed by re-running effects without a remount (StrictMode, and Suspense hide/reveal via React.lazy). The second run scheduled a real themeSwapDelayMs timer and forced a spurious re-render. Affected every consumer, including those never passing themeRevision.
PreviousNext