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

@freecodexyz/design-tokens

v0.1.0

Published

Platform-neutral design tokens for the FCF design system, in DTCG format.

Readme

@freecodexyz/design-tokens

The design decisions, as platform-neutral DTCG JSON, compiled to every format the organisation consumes.

pnpm add @freecodexyz/design-tokens

Outputs

| File | For | | ---------------------- | ------------------------------------------------------------ | | tokens.css | The custom properties, with every theme block. What products load. | | tokens.scss | $fcf-* variables, !default. Compiled values — light theme only. | | tokens.map.scss | The same as one flat Sass map. | | tokens.js / .d.ts | A typed map of token name → var(--fcf-…). | | tokens.json | Resolved values, nested. | | tokens.resolved.json | Resolved values, flat, with types and descriptions. For tooling. | | tokens.dtcg.json | The merged DTCG source. For design tools. |

Using them

In CSS — load tokens.css (or all of @freecodexyz/design-system-css) and read the properties:

.thing { color: var(--fcf-color-fg-muted); }

In JavaScript — the export is a map of references, not values, so it tracks the active theme:

import { token } from '@freecodexyz/design-tokens'

token.colorBgCanvas  // 'var(--fcf-color-bg-canvas)'

For the resolved value at build time — a contrast check, a docs table — use tokens.resolved.json. Do not use it for anything that renders: it is the light theme, frozen.

The tiers

primitive/  ramps, scales, curves. The only literals in the system.
semantic/   roles: color.bg.canvas, text.heading-1.size, radius.control
component/  button.accent.background, field.border-focus, table.row-hover
themes/     dark, three accents, two radius variants

Components consume semantic or component tokens. A component that reaches into a primitive cannot be re-themed, which is the whole point of the split.

semantic/accent.json is a thin alias layer that every accent-driven token points at — which is why an accent theme is eleven lines and works in both themes. See RFC 0001.

Building

pnpm build   # runs Style Dictionary; output is committed

CI fails if the committed output does not match a fresh build.

Two custom transforms live in build/hooks.mjs: duration/css, because DTCG duration objects have no built-in CSS handler, and dimension/fluid, which turns a $extensions descriptor into a clamp() interpolating across the system's single viewport range.

Guarantees

test/contrast.test.ts asserts, against the emitted tokens.css, that every foreground/background pair the system permits meets WCAG AA — in both themes and all four accents — and that the accent families share one lightness ladder, so swapping an accent cannot change contrast.