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

@epilot/zenith-runtime

v0.3.2

Published

The runtime behind @epilot/zenith-react: one Griffel engine, one renderer instance, one insertion anchor, the Base UI primitives and the core token sheet, shared across every co-resident copy

Readme

@epilot/zenith-runtime

The runtime behind @epilot/zenith-react: styling and stylesheet coordination, and, since DECISIONS.md D13, the Base UI primitives and the core token sheet the component package would otherwise bundle into every application.

The runtime owns the Griffel renderer, deterministic class salt, insertion anchor, and document-scoped stylesheet coordination. /v1 also exports one namespace per Base UI family Zenith wraps (dialog, switch, alertDialog, …; BASE_UI_FAMILIES is the index) and tokenSheets, the core sheets by structure hash (getTokenSheet, ensureTokenSheet). Token values stay with the React package; the runtime serves the compiled sheet for the hash a package asks for. A hash means "this structure, latest values": a token value change keeps the hash and scripts/emit-shared.ts rewrites the current sheet's archived module in place. The sheets are an append-only archive (src/v1/sheets/): a structure change (a token added, removed or renamed) adds a sheet and nothing removes one, so a runtime released with it keeps serving the previous hash, as emitted, for the applications still compiled against it. A hash leaves the served set only through src/v1/token-sheets.retired.ts, by hand. The runtime also corrects what applications bring themselves: the ensureSheet it exports replaces the coloured text (light steps 11 and a11) and the solid-fill colours (steps 9 to 10, indicator, track, solid, solid-hover, contrast, on-solid) of the core and palette sheets, derived per block by scripts/emit-shared.ts into src/v1/token-corrections.generated.ts, in the CSS an application passes for those hashes with the latest build's values, so a contrast fix reaches deployed applications without a rebuild; the archive and every other token or block are never changed. src/v1/abi.test.ts pins every served family, every member and every archived hash: a release cannot drop or rename one without that pin changing in the same change.

React is a peer: the served primitives render on the consumer's React, and on nothing else. A host that serves the runtime through its import map and builds that artefact itself (a wrapper around @epilot/zenith-runtime/v1) marks react and react-dom as external, so the runtime runs on the page's single React, the import map's copy, never a bundled one, and takes react/jsx-runtime from that same React version (#116). A runtime bundled with a React of its own makes every served primitive's hooks run on a React that is not rendering, which surfaces as a minified useMemo of null; a react/jsx-runtime of another React version creates elements the page's React rejects as not valid children. The runtime says so instead of crashing: assertCompatibility takes the application's react, @epilot/zenith-react passes its own before any component renders, and either mismatch stops the application at startup with a message naming this rule. The SystemJS bundle registers react and react-dom as its only dependencies and inlines a JSX runtime shim over the host's createElement (src/system/jsx-runtime.ts), so the same artefact serves React 18 and React 19 hosts.

Most applications should not import this package directly: install @epilot/zenith-react, whose caret range on this package (for example ^0.2.0) lets the bundler resolve a compatible runtime; a consumer that bundles the runtime keeps only the families it renders. A portal may externalize @epilot/zenith-runtime/v1 only after the host serves a runtime inside that range. When what the runtime serves changes, the runtime is released and deployed by the host before any application that needs it (D13, "Release and deploy order").

bun run build          # emits the class salt and src/v1/shared.generated.ts, then the npm dist
bun run build:system   # dist/bundle.js, the artefact an import map points at
bun run test

What root-config serves. One file per runtime release, dist/bundle.js or the host's own wrapper around @epilot/zenith-runtime/v1 built as above, at an immutable, versioned URL under the one key:

{ "@epilot/zenith-runtime/v1": "<base>/bundle.js" }

Applications externalize that key alone. The per-family entries of runtime 0.2.0-next.4 (/v1/core.js, /v1/<family>.js) are not served any more; DECISIONS.md D13 ("the per-family split is reverted for 0.2.0") records why and the split configuration to revisit.

@base-ui/react is an exact devDependency, vendored into the dist like Griffel: the served primitives are part of the /v1 ABI. A Base UI major bump is a new versioned path, never a change to /v1. bun scripts/bench/shared-primitives.mjs (repository root) measures what the served primitives and sheet change for an application and for this bundle.