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

@scottmallin/tokens

v0.1.1

Published

DTCG design tokens for the nova & ember demo modes, built via Style Dictionary to CSS custom properties + a NativeWind-compatible preset.

Readme

@scottmallin/tokens

Design tokens for the nova and ember demo modes, authored in DTCG (Design Tokens Community Group, 2025.10) format and built with Style Dictionary v5.

In the real system the pipeline is Figma Variables → Tokens Studio → Style Dictionary. This public demo keeps the Style Dictionary stage and ingests the exact DTCG shape a Figma export produces.

Source (DTCG)

src/tokens/
  base.tokens.json    # spacing / radius / shadow  (mode-less)
  color.tokens.json   # action / surface / text / feedback / scrim (per-mode)

The pipeline (lib/dtcg.mjs) understands the parts a raw Figma export uses that plain Style Dictionary sources don't:

  • $value / $type DTCG tokens (usesDtcg).
  • OKLCH colour objects{ colorSpace, components:[L,C,H], alpha, hex }oklch(L C H / a) (with { hex } and plain-string fallbacks; the demo authors hex for readability).
  • Dimension objects{ value, unit }0.75rem.
  • Aliases{spacing.6}, {color.primary} (resolved by Style Dictionary).
  • $extensions.mode theming — per-mode values become [data-theme] scopes.

Drop a raw Figma DTCG export straight into src/tokens/ and it builds — OKLCH, dimensions, aliases and light/dark modes included. The transforms are unit-tested in tests/dtcg.test.mjs.

Build output

pnpm --filter @scottmallin/tokens build produces:

| File | Purpose | | --- | --- | | dist/css/tokens.css | CSS custom properties, namespaced --ds-*. Mode-less tokens on :root; the default mode nova on :root (and [data-theme="nova"]), ember on [data-theme="ember"]. | | dist/nativewind/preset.cjs | A Tailwind v3-shaped preset for React Native / NativeWind. |

import '@scottmallin/tokens/css'            // web
const preset = require('@scottmallin/tokens/nativewind') // RN

Theming

A single attribute flip; the custom properties re-resolve live:

<html data-theme="ember"> … </html>

The Tailwind v4 layer (apps/playground) adopts these variables with @theme inline so utilities like bg-action-primary resolve to the current mode's value at runtime.

NativeWind is a compatibility export only — the same semantic class names exist in RN, but runtime [data-theme] swapping is a web concern. Not claimed as parity (see the root README's Known limitations).

Test

pnpm --filter @scottmallin/tokens test   # node --test, DTCG transform + mode unit tests