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

@financedistrict/apps-tokens

v0.5.0

Published

Framework-neutral design tokens for FD apps. Generated from Figma, consumed as Tailwind v4 CSS.

Readme

@financedistrict/apps-tokens

The single source of truth for FD design tokens. Consumed by every FD app as Tailwind v4 CSS.

How it works

Figma Variables  ──MCP read + transform──▶  src/*.css  ──Tailwind v4──▶  utility classes in each app
  • src/base.css — tier 1: primitives (raw color ramps) under :root, in OKLCH. Names like --purple-500, --gray-950. Never theme-dependent. (No --alpha-* — transparency is derived at the semantic layer, ADR-0005.)
  • src/theme.css — tier 2: semantic tokens that reference primitives, split into :root,.light { } and .dark { }, plus the Tailwind @theme registration that turns each token into a utility class. Imports base.css.
  • src/utilities.css — hand-authored Tailwind v4 @utility classes with no Figma style source (e.g. glass). Unlike base.css/theme.css, this file is not generated — it's the durable home for DS utilities that don't come from a Figma sync. References tokens from theme.css (so a consumer must load theme.css too).

base.css and theme.css are generated from Figma (file FD Products Styleguide / UI Kit) — do not hand-edit. See ADR-0003 for the naming rules and ADR-0004 for OKLCH + naming cleanup.

Regenerating from Figma

There is no headless generator — regeneration is a guided MCP session, driven by the /sync-figma-token skill (.claude/skills/sync-figma-token/), which holds the full deterministic algorithm (name transform, value/unit mapping, alpha derivation, alias resolution, and the mapping-validation check). Summary of the steps, in order:

  1. Read the 4 collections via the Figma MCP (use_figma + variable APIs): base-palette, theme-colors, theme-modes (light/dark), theme-values.
  2. Write base.css (primitives, sRGB hex under :root) and theme.css (semantic :root,.light / .dark + @theme scales), applying the naming rules: strip noise words (neutral/normal/main/gradients/effect), dedupe repeated segments, kebab-case; keep the renamed conflict tokens (fader-0X, effect-0X, data-{c}-2).
    • Alpha is derived, not baked (ADR-0005). Do not emit --alpha-* primitives. Where a semantic token needs transparency, write it as relative-color from the solid primitive: oklch(from var(--gray-950) l c h / 50%) instead of var(--alpha-gray-950-50).
  3. Convert to OKLCH: node scripts/hex-to-oklch.mjs (idempotent — safe to re-run; skips already-converted values).
  4. Pull styles: read local text / effect / paint styles → composite type @utility classes, shadow-s/shadow-xs, fader-*.
  5. Verify: npm run verify — must pass (utilities generate, golden values intact, OKLCH-only base, dark mode).
  6. If a golden value changed intentionally, update the golden list in verify/check.mjs.

Consuming in an app (Tailwind v4)

/* app's main CSS entry */
@import "tailwindcss";
@import "@financedistrict/apps-tokens/theme.css";
@import "@financedistrict/apps-tokens/utilities.css";

utilities.css adds hand-authored utilities on top of the token layer — currently just glass: a frosted surface (--surface at 90% opacity, derived via the ADR-0005 relative-color pattern, + 12px backdrop blur via --blur-md), for chrome like an app header that floats over content.

Then use semantic utilities directly — theme-switch aware via .dark:

<button
  class="bg-button-brand-primary-background text-button-brand-primary-foreground rounded-md"
>
  …
</button>
<div
  class="bg-card-background text-card-foreground border border-card-border rounded-xl"
>
  …
</div>

Token tiers

| Tier | File | Example | Use in components? | | --------- | ----------- | -------------------------------------------- | ------------------ | | Primitive | base.css | --purple-500 | ❌ never | | Semantic | theme.css | --card-foregroundtext-card-foreground | ✅ always |

Verify the build

npm run verify   # Tailwind v4 over a probe file; asserts utilities generate,
                 # golden values intact, base is OKLCH-only, dark mode works

Source collections (Figma)

base-palettebase.css. theme-colors + theme-modes (light/dark) → semantic layer in theme.css. theme-values → the @theme static scales (radius, typography). Fonts: Archivo (sans), Chakra Petch (mono).

Consuming from a zero-build prototype (CDN)

The section above (@import "@financedistrict/apps-tokens/theme.css") needs the consuming app's own Tailwind v4 build to resolve @theme/@utility into real utility classes — it won't work in a bare browser with no build step. Standalone HTML/JSX prototypes instead reference a separate, pre-compiled dist/tokens.css via a plain <link> tag. See docs/guides/standalone-prototype-consumption.md for the exact shape.