Skip to content

v0.2.0

Choose a tag to compare

@olibaron olibaron released this 01 Sep 17:16
· 23 commits to main since this release

Fixed

Diagrams are no longer handed a source the engine cannot lay out.

A fence renders on every delta while it streams, so the engine sees the diagram grow one keystroke at a time. Nearly every diagram type copes: it draws what it has, or it throws and the render path catches that and keeps the frame it already had.

The data-driven types do neither. Given a row that is still being typed they lay out successfully against a range that is empty or backwards:

  • a gantt before its first task, or while its last task is half-written, produces NaN coordinates and negative bar widths
  • a pie before its first slice produces an infinite viewBox

There is no failure to catch, so the browser reported each one for every keystroke of the fence.

Those frames are now held back and the last good diagram stays on screen. Diagrams still build progressively — only the frames the engine cannot draw are skipped.

Verified against mermaid over every character prefix of both fixtures: no prefix producing NaN, infinite or negative geometry gets through, while 43 gantt and 17 pie intermediate frames still draw.

Compatibility

No prop, type or export signature changes. Consumers upgrade without edits.