Skip to content

@klad/engine@1.0.0

Choose a tag to compare

@github-actions github-actions released this 23 Jul 08:51
3e18f91

Major Changes

  • 94c71aa: First release.

    A framework-agnostic org chart for trees far too large to give a DOM node each.
    Layout and drawing happen on a <canvas> inside a Web Worker; real components
    are mounted only for the nodes that are both on screen and zoomed in far enough
    to read — about fifty at a time, pooled and reused. 5,000–50,000 nodes at
    60fps.

    • Layout — tidy tree in four orientations, RTL, per-node sizes, and a
      staged expand/collapse transition that keeps the toggled node pinned to the
      pixel it was on.
    • Your components on top — a Vue #node slot, a React render prop, or
      plain DOM. Each node's context carries its own subtree counts, precomputed
      once per tree rather than counted while drawing.
    • Navigationfocus opens the way to a node before centring on it,
      pathTo + highlight paint the route from the root, plus search, a full
      keyboard tree, a screen-reader tree, and a minimap that holds its frame
      steady across a toggle.
    • Export — SVG and PNG, drawn from the same geometry as the canvas.
    • Themeable — every colour, weight and radius the canvas uses, live
      through setTheme, with DEFAULT_THEME and DARK_THEME ready to spread.
    • Gestures — drag to pan with momentum, wheel to zoom, pinch on touch. The
      chart claims exactly the gestures it uses and leaves the rest, right-click
      included, to you.

    ESM only. TypeScript throughout.