Skip to content

v0.4.0

Choose a tag to compare

@olibaron olibaron released this 02 Sep 10:14
· 13 commits to main since this release

Added

Pan and zoom a diagram in place.

A wide flowchart or a dense sequence diagram had one way to be read at size: fullscreen, which takes over the page to look at a single block. A diagram now carries its own view instead — Zoom in, Zoom out and Reset zoom and pan on the toolbar, with the wheel to zoom and dragging to pan, by mouse or by touch.

It is on by default:

<HyperMarkdown
  md={markdown}
  plugins={plugins}
  controls={{ diagram: { copy: true, fullscreen: true, panZoom: false } }}
/>

panZoom: false leaves copy and fullscreen alone; diagram: false still hides the toolbar entirely, pan and zoom with it. That switch is why controls.diagram now takes a DiagramControls rather than the BlockControls code blocks and tables share — it is the one control the others have no use for.

Three translation keys (zoomIn, zoomOut, resetView) and three icons of the same names join the overridable set.

Fixed

A list marker fades in with the words beside it. The bullet and the ordered number are drawn by the stylesheet rather than written into the document, so the word-fade pass had nothing to wrap and they arrived at full opacity next to text still fading in. They now fade on the same curve and duration.

Documentation

Translation and icon key tables now list every key, including exitFullScreen, undocumented since v0.1.9.

Compatibility

No breaking changes. Every new field is optional, and every new string and icon has a default, so existing configuration keeps working untouched.