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

@canvus/core

v0.1.6

Published

High-performance HTML-in-Canvas Interactive Workspace SDK

Downloads

1,147

Readme

Canvus SDK

npm version License: MIT

⚠️ Beta Release (v0.1.2): Canvus is currently in active development (public beta). APIs and configuration options may evolve before the v1.0.0 stable release.

Canvus is a headless, framework-agnostic vanilla TypeScript SDK for building visual layout editing workspaces. By separating rendering and visual handles, it enables developers to construct CMS page-builder canvases, A/B testing editors, and high-performance visual IDE tools with web-native performance.

Documentation

Demo


🚀 Key Features

  • Twin-Layer Architecture: Renders user-supplied HTML/CSS inside an isolated Shadow DOM projection layer, keeping parent editor styles untouched. An HTML5 Canvas overlay runs overlays, coordinates selections, snap lines, and resizing handles.
  • Zero Framework Dependencies: Pure TypeScript, compiling to a lightweight ESM bundle.
  • Operation-Driven State Synchronization: Exposes discrete mutations (Operation delta payloads) for visual gestures, allowing host applications to manage a unified history stack (Undo/Redo) and multiplayer collaboration.
  • Pluggable Rich Text Escape Hatch: Features a built-in plain-text editor, with a callback trigger to mount custom rich-text editors (e.g., TipTap or Quill).
  • Native Class Manipulation: Supports modifying Tailwind CSS or Bootstrap style classes directly on nodes without relying on inline CSS styling attribute overwrites.
  • requestAnimationFrame Throttled Rendering: Canvas repaints are scheduled for the next animation frame, avoiding performance bottlenecks on high-refresh-rate screens.

📦 Directory Tour

canvus/
├── demo/                   # Dev Workbench (Interactive local testing site)
├── dist/                   # Compiled SDK ESM build and type declarations
├── docs/                   # Developer documentation & Architecture Decision Records (ADRs)
├── packages/               # Workspace monorepo packages
│   ├── react/              # React bindings (@canvus/react)
│   └── react-demo/         # React Demo App
├── src/                    # SDK Core source code (TypeScript)
├── skills/                 # Custom Agent/AI skills for codebase tasks
└── package.json            # Scripts, build rules, and dependencies

For a detailed walkthrough of each source file and their individual roles, see the Architecture Guide.


🛠️ Quick Start

1. Installation

Install the core SDK:

npm install @canvus/core

Or install the React bindings:

npm install @canvus/react @canvus/core

2. Basic Usage

Vanilla TS/JS

Import and initialize a workspace in your project:

import { Workspace } from "@canvus/core";

const workspace = new Workspace(container, {
  html: '<div class="my-layout">Hello Canvus</div>',
  onChange(ops) {
    console.log("Operations:", ops);
  },
});

React

See the @canvus/react README for full instructions:

import { Canvus } from "@canvus/react";

function App() {
  return (
    <Canvus style={{ width: "100%", height: "100vh" }}>
      {/* Canvas workspace children */}
    </Canvus>
  );
}

The SDK exports all core primitives — see the API Reference for the full surface.

3. Development (Contributing)

To work on the SDK itself, clone the repo and use the local dev scripts:

git clone https://github.com/balfaro01/canvus.git
cd canvus
npm install
npm run build      # Compile TypeScript → dist/
npm run demo       # Launch workbench at http://localhost:3000

📚 Developer Guides

To understand how to integrate, configure, and extend the Canvus SDK, explore the following documentation:

  1. Architecture & Reflow Loop Guide: Twin-layer mounting, ResizeObserver integration, and the Synchronous Reflow Loop.
  2. Operation Payloads & Undo/Redo: Schema design for style, class, hierarchy, and text changes.
  3. Custom Editor Integration: Mounting TipTap/Quill rich-text editors.
  4. Layout & Insertion System: Deep-dives into Flex/Grid detection, tree hierarchy rules, and drag drop zones.
  5. Complete API Reference: Full catalog of Workspace configuration, callback hooks, and API methods.