Repository navigation
Releases: sametcn99/vitepress-mermaid-renderer
Releases · sametcn99/vitepress-mermaid-renderer
Release list
v1.2.2
Changed in 1.2.2
- Made
@mermaid-js/mermaid-zenumlan optional, lazily loaded plugin. It moved
fromdependenciesto an optionalpeerDependenciesentry, is marked
externalin the library build, and is imported only when azenumldiagram
is actually rendered. The published bundle no longer ships the ~1.6MB ZenUML
chunk, and a missing plugin no longer breaks other diagram types. ZenUML users
install it withnpm i @mermaid-js/mermaid-zenuml; the English, Turkish, and
Chinese advanced examples now document this requirement. - Widened the
mermaidpeer range from^11.0.0to^11.0.0 || ^12.0.0,
matching the versions the library is developed and tested against. - Added a
resetExternalDiagramRegistrationhelper (also re-exported from the
components barrel) that clears the cached external-diagram registration.
v1.2.1
Added in 1.2.1
- Added an opt-in collapsible toolbar. A new
toggleToolbarbutton collapses
and expands the remaining controls, and a newcollapsedmode option sets the
initial state. Both are configurable per display mode throughsetToolbar(). toggleToolbardefaults todisabledandcollapseddefaults toexpanded
in every mode, so existing toolbars look and behave exactly as before until
the button is explicitly enabled.- Added
toggleToolbarExpandandtoggleToolbarCollapseto the toolbar i18n
tooltip table, with English, Turkish, and Chinese documentation. - Added CSS design tokens for toolbar button geometry and colour:
--mermaid-control-text-active,--mermaid-control-button-radius,
--mermaid-control-button-padding,--mermaid-control-button-min-size, and
--mermaid-control-icon-size.
Changed in 1.2.1
- Unified the mobile and desktop toolbars into a single set of CSS rules. Mobile
no longer restyles the toolbar; it only raises--mermaid-control-padding,
--mermaid-control-gap,--mermaid-control-button-min-size, and
--mermaid-control-icon-sizefor touch. Overriding a token on
.mermaid-containernow changes both toolbars at once. - Mobile toolbar buttons are borderless like their desktop counterparts, and
their 44px touch target comes frommin-width/min-heightinstead of a
fixed 40x40 box.--mermaid-control-bordernow defaults totransparentand
applies to both modes; set it to a visible colour for outlined buttons. - Mobile toolbar icons follow
currentColorinstead of a hard-codedstroke,
so--mermaid-control-textand the hover colour apply on mobile too. - The toolbar now wraps instead of overflowing when a full button set is wider
than the diagram container. - Corrected the documented defaults for
--mermaid-control-gap,
--mermaid-spinner-duration,--mermaid-error-bg,--mermaid-error-border,
and--mermaid-error-text, which had drifted from the stylesheet.
Fixed in 1.2.1
- Fixed diagrams drifting off-center when the container was resized. The
fit-to-container baseline is now recalculated on resize without resetting the
user's zoom or pan, which also covers sidebar toggles and layout changes, not
just window resizes. - Fixed the mobile toolbar rendering below the error overlay. Its
z-indexwas
8while the error container sits at10; both toolbars now use20. - Fixed the mobile zoom-level badge being reordered to the front of the toolbar
and carrying an extra margin, so both modes read in the same order. - Removed a
flex-direction: columnrule that silently overrode the mobile
toolbar's intended row layout, along with the unused.mobile-onlyand
hover-only visibility rules.
Docs site in 1.2.1
These changes affect the documentation site only and are not part of the
published package.
- Published machine-readable agent discovery resources under
/.well-known/: an
AI catalog, an API catalog, agent skills, an OpenAPI description, OAuth and
OpenID configuration documents, and a JWKS endpoint. - Added
auth.md, an MCP Server Card, an Agent Skills index with SHA-256
digests, and an ARD capability manifest for automated discovery. - Added a WebMCP script exposing documentation search and navigation as browser
tools, plus a Markdownagent-home.mdserved from/for clients that
requesttext/markdown. - Added RFC 8288 Link headers for the API catalog, OpenAPI description,
documentation, and discovery metadata. - Added the Vercel rewrites and content-type/CORS headers backing those
resources, and advertised the AI catalog and Content Signals fromrobots.txt
and the page<head>. - Added a DNS-AID zone reference with
_index._agentsand_a2a._agentsSVCB
records and DNSSEC deployment guidance for the authoritative DNS provider.
v1.2.0
Changed in 1.2.0
- Stabilized features introduced in previous releases for a more reliable
interactive diagram experience. - Interactive diagrams now always fit and center themselves after rendering,
theme updates, and Reset View actions. - Removed the
fitToContaineroption and its runtime update event; automatic
fitting is now the standard interactive behavior. - Updated the English, Turkish, and Chinese documentation to describe automatic
fitting without a separate configuration option.
Fixed in 1.2.0
- Restored the container-centered transform origin required by the fitting
calculation, fixing diagrams that were incorrectly scaled or positioned in
1.1.32. - Fixed sluggish diagram dragging by accounting for the fitted base scale,
removing mousemove frame throttling, and stopping zoom transitions when a drag
begins.
v1.1.32
Changed
- Changed
fitToContainerto default totrue, so interactive diagrams fit and
center themselves after rendering unless explicitly disabled with
fitToContainer: false. - Updated the English, Turkish, and Chinese configuration and type documentation
to describe the new default.
v1.1.31
Added
- Added cursor-anchored wheel zoom and pinch-anchored gesture zoom in fullscreen
mode. Toolbar zoom controls now zoom around the rendered SVG center. - Added ZenUML external-diagram registration and a complete advanced example
catalog covering all 30 Mermaid diagram types supported by this package.
Fixed
- Fixed theme changes re-rendering diagrams while a zoom or pan transform was
active. Mermaid now renders at an identity transform and restores the user's
fitted view, zoom level, and pan position afterward. Fixes #14. - Fixed
fitToContainerso fitting is a base visual transform while the
toolbar's initial zoom level remains100%. User zoom and pan are preserved
across re-renders and fullscreen transitions. Fixes #15. - Fixed Reset View with
fitToContainerso it restores the unscaled100%user
view instead of the fitted and centered position. Fixes #16. - Added a short zoom transition that does not interfere with reset or fit
measurement. Fixes #17. - Corrected the Requirement and Radar examples to use Mermaid's current syntax.
Changed
- Optimized the smoke-test package setup to remove and reinstall only the local
vitepress-mermaid-rendererdependency instead of deleting all test-project
dependencies. - Expanded renderer, navigation, and end-to-end coverage for theme rerenders,
fit behavior, focal fullscreen zoom, and the advanced diagram catalog.
v1.1.30
Added in 1.1.30
- Added the opt-in
fitToContainerrenderer option. When enabled, diagrams are
scaled and centered after rendering to fit their container, including when the
option changes at runtime. The default interactive view remains unscaled at
100%. - Added fit-and-center navigation and component coverage, including geometry
edge cases and runtime renderer option updates.
Changed in 1.1.30
- Expanded the default Mermaid configuration to define natural-size
(useMaxWidth: false) settings for every supported diagram configuration
type, keeping zoom, pan, and fit-to-container behavior consistent. - Moved duplicated usage and configuration content from the README to the
documentation site, and documentedfitToContainerin English, Turkish, and
Chinese configuration and type reference pages. - Pinned the test project's Mermaid and VitePress dependencies to
^11.16.1and
^1.6.4, respectively, for reproducible smoke tests.
v1.1.29
Added
- Added static SVG rendering through
createMermaidRenderer({ static: true }).
Static diagrams remain theme-aware while omitting toolbar controls, gestures,
fullscreen, downloads, and keyboard navigation. - Added static-mode lifecycle updates so existing diagrams react when the shared
renderer switches between interactive and static output. - Added static SVG layout styles and component coverage for non-interactive
rendering.
Fixed
- Fixed the bundled TypeScript declarations so
createMermaidRenderer()uses
the public Mermaid configuration type instead of colliding with the internal
useMermaidRenderercomposable options type. - Updated the multilingual documentation and examples to match the current
renderer, toolbar, security, accessibility, and installation APIs.
Changed
- Updated Mermaid and development dependencies to their latest compatible
versions.
v1.1.28
- Updated dependencies to their latest versions.
v1.1.27
Version information was not added to CHANGELOG.md for 1.1.27.