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/theme

v0.7.0

Published

Portable Omnidraw theme contracts, built-ins, isolated state, and scoped DOM projection.

Readme

@omnidraw/theme

Portable theme contracts, built-in definitions, pure resolution helpers, an isolated ThemeService, and explicitly scoped CSS projection for Omnidraw.

The package has no application, runtime, transport, renderer, Effect, or DOM singleton dependency. Importing JavaScript never changes a document or injects styles.

Scoped application

Import the stylesheet required by the host, mark a caller-owned element, and apply an isolated theme snapshot to that element only:

import "@omnidraw/theme/default.css";
import {
  OMNIDRAW_THEME_SCOPE_ATTRIBUTE,
  ThemeService,
  applyThemeToElement,
} from "@omnidraw/theme";

const host = document.querySelector<HTMLElement>("#app")!;
host.setAttribute(OMNIDRAW_THEME_SCOPE_ATTRIBUTE, "application");

const themes = new ThemeService();
applyThemeToElement(host, themes.getTheme());
const release = themes.subscribeThemeChange((theme) => {
  applyThemeToElement(host, theme);
});

Canvas hosts import @omnidraw/theme/canvas.css and mark each Canvas root with the same scope attribute. Every projected variable uses the --omnidraw-* namespace, and dark-mode presentation uses .omnidraw-theme-dark.

The two CSS entrypoints intentionally contain the same initial variable values, but they have different owners. default.css is the application-shell baseline and may be imported once by a product root. canvas.css is the embeddable Canvas baseline and belongs with each Canvas host, including consumers that do not use the Omnidraw application shell. Keeping separate entrypoints prevents Canvas from acquiring application CSS and permits either baseline to evolve without silently changing the other consumer surface. Import only the entrypoint owned by the host; importing both is redundant.

Release verification

bun run typecheck
bun run test
bun run build