npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@invana/canvas-designer

v0.0.11

Published

Node/Edge template designer for @invana/canvas — WYSIWYG authoring of composite node templates (drag canvas, layers, undo/redo, save/load); ships default starter templates. Optional: rendering templates needs only @invana/graph.

Readme

@invana/canvas-designer

The visual designer for @invana/canvas — design a graph visualization by editing its definition in place. Today it ships one surface: the node template designer — WYSIWYG composite-card authoring (drag elements, layers, undo/redo, save/load) that emits a FreeformStructure (pure JSON) rendered as the engine's composite shape.

Today: node template authoring (in src/templates/), headless. Planned: edge templates + the studio shell and per-surface designers for layouts / behaviours / layers (each hosting an @invana/canvas-ui editor). See roadmap.md.

Where it fits

This is the authoring layer of the card/template stack — most apps only ever render templates, which needs nothing here (just @invana/graph's FreeformStructure + compileFreeform). Install this package only when end-users should design their own node cards:

CompositeShape  (engine primitive, @invana/canvas)
   ▲ rendered by
FreeformStructure + compileFreeform  (template model, @invana/graph)
   ▲ authored by
@invana/canvas-designer     ← this package (emits FreeformStructure JSON)

Install

pnpm add @invana/canvas-designer
# peers: react, react-dom, react-hook-form, @invana/graph, @invana/ui, @invana/forms, @invana/canvas-ui

Usage

It's headless: it emits a FreeformStructure via onChange / onSubmit, and the host applies it to the live canvas.

import { NodeCardDesigner, NodeTemplateList } from '@invana/canvas-designer';

// pick a starter template, then design it
<NodeTemplateList onEdit={(t) => setTemplate(t)} /* … */ />

<NodeCardDesigner
  defaults={template}
  dataFields={FIELDS[type]}      // bindable data fields for the node type
  palette={palette}              // theme colours for the live preview
  onChange={(structure) => {
    // apply live — the designer never touches the engine itself
    canvas.update({ layers: { graph: { nodeStructureTemplates, nodeTypes } } });
  }}
/>

Exports

  • NodeCardDesigner — the WYSIWYG builder: element palette (text / rect / circle / line / image), drag canvas with themed live preview, layers panel (z-order, show/hide, delete), undo/redo (⌘/Ctrl+Z), save/load JSON.
  • NodeTemplateList — gallery of built-in starter templates (authoring presets) with live thumbnails and an edit action.
  • CardPreview / CardElementView — read-only renderers for a FreeformStructure.
  • useHistory — generic undo/redo hook (transient set vs recorded commit).
  • Field schemas + mappersCARD_FIELDS, elementFields, cardToForm / applyFormToCard, elementToForm / applyFormToElement, templateToJson / parseTemplate, newElement, etc.

Notes

  • Headless / engine-agnostic — no @invana/canvas / @invana/canvas-react / pixi.js imports; the only @invana/graph use is its types. Output is JSON via callbacks; the host applies it (canvas.update({ layers: { graph: { nodeStructureTemplates, nodeTypes } } })).
  • Property panels come from @invana/forms; shared form helpers from @invana/canvas-ui.

See the repo roadmap.md for direction and status.