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

@czap/vite

v0.3.1

Published

Vite 8 plugin for czap CSS/shader transforms and HMR

Readme

@czap/vite

Vite plugin that compiles @token, @theme, @style, and @quantize blocks in your CSS into native CSS, and hot-updates them without a full page reload.

Install this directly when your app builds with plain Vite. If you build with Astro, install @czap/astro instead — it brings this plugin already wired.

Install

pnpm add -D @czap/vite

Requires vite >= 8 as a peer dependency.

30 seconds

// vite.config.ts
import { defineConfig } from 'vite';
import { plugin as czap } from '@czap/vite';

export default defineConfig({
  plugins: [czap()],
});
/* hero.css — heroLayout is a Boundary.make() export the plugin finds by convention */
@quantize heroLayout {
  stacked { gap: 1rem; }
  cinematic { gap: 3rem; }
}

On dev serve or build, the @quantize block is rewritten to native @container queries — one per state — and @token / @theme / @style blocks become custom properties, html[data-theme] selectors, and scoped rules. Definitions are found by convention, no listing required: boundaries.ts / *.boundaries.ts (likewise tokens.ts, themes.ts, styles.ts) next to the referencing CSS file, then at the project root. Override per kind with czap({ dirs: { boundary: 'src/defs' } }).

Where it sits

A build-time adapter — it hooks Vite's transform and HMR phases so stylesheets can reference definitions authored in TypeScript. It reads the primitive types (a boundary is named states over a numeric input; tokens, themes, and styles are named outputs) from @czap/core, compiles them to CSS through @czap/compiler, and can emit a boundary manifest in the @czap/edge shape for request-time adaptation. The definitions themselves are authored with @czap/core factories — this package only finds and compiles them. See the package surfaces map for the full layout.

If it does nothing

Browsers discard unknown at-rules, so a @quantize block whose name matches no Boundary.make() export ships zero CSS — silently in the browser. The plugin prints a terminal warning naming every file it searched; the fix is export const <name> = Boundary.make({ ... }) in one of those files, or a dirs override pointing at your definitions.

Docs


Part of LiteShip — powered by the CZAP engine (Content-Zoned Adaptive Projection), distributed as @czap/* packages.