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

v0.10.0

Published

Turn continuous signals into a few named UI states for LiteShip: evaluate boundaries, animate the transitions between states, and gate motion by device tier.

Readme

@czap/quantizer

Turns a boundary — named states over numeric thresholds — into a live state machine that emits per-state outputs (CSS, shader uniforms, ARIA attributes) when a value crosses a threshold.

Install this directly when you need live boundary evaluation outside a framework integration. If you're starting a new project, start with liteship or @czap/astro instead.

Install

pnpm add @czap/quantizer effect@beta

effect must be the Effect 4 beta (effect@beta) — a bare pnpm add effect installs 3.x and fails the peer check.

30 seconds

import { Boundary } from '@czap/core';
import { Q } from '@czap/quantizer';
import { Effect } from 'effect';

const width = Boundary.make({
  input: 'width',
  at: [[0, 'sm'], [768, 'lg']],
});

const config = Q.from(width).outputs({
  css: { sm: { display: 'block' }, lg: { display: 'grid' } },
});

const outputs = Effect.runSync(Effect.scoped(
  Effect.gen(function* () {
    const live = yield* config.create();
    live.evaluate(1024);
    return yield* live.currentOutputs;
  }),
));

console.log(outputs.css); // { display: 'grid' }

Logs { display: 'grid' } — the CSS output for the lg state that 1024 falls into. For a one-off lookup without Effect, the synchronous evaluate(boundary, value) export returns { state, index, value, crossed } directly.

Where it sits

This is a layered package between definitions and hosts: it imports Boundary, easing, and content-address utilities from @czap/core — its only @czap dependency. Compiling outputs to static CSS text for a build step is @czap/compiler's job; this package is for runtime, where the value keeps changing. See the package surfaces map for the full layout.

If it does nothing

If you pass tier to Q.from(boundary, { tier }), outputs for targets outside that motion tier are silently dropped — tier: 'none' permits only ARIA, so CSS outputs never emit and nothing warns you. Omit tier to allow all targets, or call .force('css') on the builder to override the gate per target.

Docs


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