Skip to content

Releases: n1crack/klad

v1.1.0

Choose a tag to compare

@n1crack n1crack released this 23 Jul 17:35

Navigating charts too big to see on one screen.

Added

  • isolate(id) — show one branch as if it were the whole chart. Re-roots
    the tree, so the layout, minimap, keyboard tree, search and export all follow
    the one branch. isolate(null) restores the rest.
  • fitSubtree(id) — frame one branch instead of the whole chart.
  • getView() / setView(view) — the camera, open branches, highlight and
    selection as one serialisable object. Put it in a URL, get a link to a place
    in a chart.
  • Keyboard camera — arrows pan (Shift strides), +/- zoom, f fits, 0
    resets, Home centres the root, Esc clears. The chart is now a tab stop.
    keyboard: false opts out.
  • Selectionselect(ids), getSelection(), a selectionChange event,
    and, behind selection: true, pointer selection: click, ctrl/cmd-click,
    shift-click, shift-drag for a box, alt-drag for a lasso. New selectionStroke
    theme tokens.

Changed

  • data is now the only required option. nodeSize defaults to
    { w: 180, h: 64 } (exported as DEFAULT_NODE_SIZE); label defaults to a
    node's name, label, title or id. createKlad(host, { data }) draws a
    chart.

Fixed

  • The minimap refits after isolate instead of drawing the branch squashed
    against its old corner.

Published from CI with provenance. Full notes per package in the changelogs:
@klad/core.

@klad/vue@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.

Patch Changes

  • Updated dependencies [94c71aa]
    • @klad/engine@1.0.0
    • @klad/core@1.0.0

@klad/react@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.

Patch Changes

  • Updated dependencies [94c71aa]
    • @klad/core@1.0.0

@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.

@klad/core@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.

Patch Changes

  • Updated dependencies [94c71aa]
    • @klad/engine@1.0.0