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

@omnidraw/canvas

v0.7.0

Published

Portable Solid canvas host, Cangine runtime, and optimistic document client for Omnidraw.

Readme

@omnidraw/canvas

@omnidraw/canvas is the public Solid host for the Omnidraw canvas kernel. It composes Cangine rendering with the protocol-neutral document transport from @omnidraw/canvas-contract; it does not include an API client, database, server, tenant policy, or product sidebar.

Install and compose

Install one compatible Solid core/web renderer pair together with the three public kernel packages, then import the package stylesheet once in the host bundle:

import '@omnidraw/canvas/styles.css';
import { Canvas, type TCanvasDependencies } from '@omnidraw/canvas';
import { ThemeService } from '@omnidraw/theme';

Render Canvas with a descriptor containing only id, an opaque stable host scope key, and a readonly dependency bundle. The bundle supplies document, theme, image, notification, ID, cancelable wait, diagnostics, runtime extension, and optional toolbar behavior. Changing the scope key or canvas ID serially disposes the previous runtime before the replacement starts.

Tenant-aware hosts can also provide the optional hostRetirement port. Canvas registers its idempotent async disposal with that port so the host can await complete shutdown before disconnecting tenant-scoped services.

Document transports implement snapshot, paged query, command, and event-stream operations. They must close their underlying subscription promptly when the consumer calls AsyncIterator.return(). Canvas extensions receive only the Effect-free, renderer-neutral document, widget, shell, trace, DOM, notification, and external-placement ports; Cangine never crosses that public boundary. The placement port supplies client-to-world projection, visible world bounds, viewport center, and an owner-scoped transient widget preview so an application sidebar can implement full pointer gestures without importing a renderer.

Package fonts and CSS assets are emitted below dist/; hosts do not need to copy files to /fonts or expose another workspace's source tree.

Semantic authored paint is stored with a concrete old-client fallback. The runtime keeps that authored node image separate from its theme-projected Cangine node, so a viewer theme switch changes only the projected scene revision and never the durable canvas revision. Literal paint remains stable. Cangine 0.7.0 receives only resolved concrete values. Mounted selection and path affordances update through its live appearance setters. Standard creation uses its guarded all-tool decorator, while compact-picker edits pass semantic intent to its extension-only selection mutation decorator. Cangine still plans the compatible targets and sends one finalized batch unchanged to CanvasDocumentService.

The 0.7.0 line uses @omnidraw/[email protected], the public @omnidraw/[email protected], exact [email protected] internally, and exact @omnidraw/[email protected]. The host provides one exact [email protected] and @solidjs/[email protected] pair; neither Effect nor Cangine appears in Canvas public types.

See ARCHITECTURE.md in the source repository for runtime ownership and lifecycle details.