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

@polyxd/ds-kit

v0.4.6

Published

Shared parts of building a Polyxd design-system pack, and the polyxd command: pack, check, studio push, dev

Readme

@polyxd/ds-kit

The polyxd command, and the shared parts of building a Polyxd design-system pack: reading CSS custom properties, converting values to DTCG, writing the tiers and the manifest.

npx polyxd pack ./src/tokens.css                  # a pack from your tokens, plus a mapping to correct
npx polyxd check ./ds-acme/manifest.json          # the pack against the semantic token contract
npx polyxd studio push ./ --to https://studio.polyxd.com/api/w/acme
npx polyxd dev ./screens                          # preview the documents in a folder as you edit them

polyxd dev

A local preview for people who write Polyxd documents in their editor.

npx polyxd dev [dir] [--port 4310] [--theme material3] [--data <file.json>] [--pack <manifest.json|theme.css>] [--verify] [--open]

It watches dir (default: the current folder) for documents: a JSON file with specVersion and components, or an intent-shaped file with a document inside (the document and its data are used). A document without embedded data takes <name>.data.json beside it, else the file given with --data. Packs, registries, reports and other JSON are ignored.

The page at http://localhost:4310/ lists the documents with a dot for the static check (green clean, amber warnings, red errors), renders the selected one with the real renderer, and lets you switch between all built-in packs (plus one of yours with --pack), light and dark, phone, tablet and desktop widths with a draggable edge, and density. Beside the surface: the static check's issues, run in the page with @polyxd/spec/browser against the data (a binding that reads nothing is a warning); the document JSON with a copy button; the data, and the data as edited in the surface; and a log of the actions the surface dispatches, with their context resolved. Save any file and the surface reloads in place, keeping your selection and controls.

--verify adds a button that runs the full verifier for the selected document (13 packs × light/dark × 390/1100 with axe and the layout check) and streams its output into the panel. It needs @polyxd/verifier installed (npm install -D @polyxd/verifier playwright && npx playwright install chromium).

The renderer comes from @polyxd/react/preview, a single script and stylesheet with React, the renderer, the validator and every theme, so nothing is built on your side. Everything else is Node: http, fs.watch, and server-sent events.

Library

import { cssVars, resolveVars, length, duration, bezier, shadowLayers, writePack } from "@polyxd/ds-kit";
import { inferMapping } from "@polyxd/ds-kit/infer";

cssVars reads every custom property under the selectors you choose, resolveVars follows var() references, the converters turn CSS values into DTCG dimensions, durations, easings and shadows, and writePack writes the tiers, the manifest and a package.json. inferMapping guesses which of your variables fill which contract tokens, from their names and, failing that, by measuring them; polyxd pack is built on it.

Docs · Polyxd · Source