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

v0.3.1

Published

Astro 6 integration with adaptive directives

Readme

@czap/astro

Astro 6 integration that compiles your boundary definitions at build time and activates their state evaluators on the client.

Install this directly when your site is built on Astro 6 — this is the integration most LiteShip projects install first. The other @czap/* runtime packages arrive with it.

Install

pnpm add @czap/astro @czap/core 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

// astro.config.mjs
import { defineConfig } from 'astro/config';
import { integration as czap } from '@czap/astro';

export default defineConfig({ integrations: [czap()] });

// src/boundaries.ts — a boundary names where one state becomes the next
import { Boundary } from '@czap/core';

export const viewport = Boundary.make({
  input: 'viewport.width',
  at: [[0, 'stacked'], [768, 'split']],
  hysteresis: 20, // 20px of grace so the state doesn't flicker
});
---
// src/pages/index.astro
import Satellite from '@czap/astro/Satellite';
import { viewport } from '../boundaries.js';
---
<Satellite boundary={viewport}>
  <section>Resize the window.</section>
</Satellite>

Drag the window edge across 768px: the wrapper's data-czap-state attribute flips between stacked and split for your CSS to key on. No client:* attribute needed — the integration's injected boot script activates the evaluator.

czap({ middleware: true }) auto-wires capability detection, so the common case needs no src/middleware.ts; it populates a typed Astro.locals.czap.tiers.{tier,motion,design} (no cast). Boundaries can also bind live audio.amplitude / audio.beat signals (driveAudioFromAnalyser from @czap/astro/runtime), and the dev boundary inspector ships as an Astro dev-toolbar app (toggle from the toolbar icon).

Where it sits

The host integration most apps touch: it registers @czap/vite (build-time boundary scanning and CSS), injects @czap/detect's device-tier probe, and rigs the client directives backed by @czap/web (DOM morphing, SSE, LLM streams) and @czap/worker (off-thread evaluation), with @czap/edge supplying SSR tier detection for the optional middleware. Boundary authoring itself lives in @czap/core; Cloudflare deploys add @czap/cloudflare on top. See the package surfaces map for the full layout.

If it does nothing

If data-czap-state never changes on resize, the boot script was never injected — confirm czap() is in integrations in astro.config.mjs. Astro's own client:visible / client:idle directives do not wire the evaluator; Satellite (or satelliteAttrs(...) spread onto any element) emits the data-czap-directive="satellite" marker the boot scanner looks for.

Docs


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