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

@sdaia-ds/tokens

v2.0.1

Published

SDAIA Design System tokens — generated from Figma Variables via Tokens Studio.

Readme

@sdaia/tokens

The SDAIA Design System tokens, generated from Figma Variables and consumed by every SDAIA-skinned product.

What this repo holds

sdaia-tokens/
├── tokens/
│   ├── tokens.json              ← Synced from Figma by Tokens Studio plugin
│   └── figma-codesyntax.json    ← Map of Figma var name → CSS var name
├── style-dictionary/
│   └── build.js                 ← Transforms tokens.json → CSS / JS / TS
├── dist/                        ← Built artifacts (committed by CI)
│   ├── tokens.css
│   ├── tokens.js
│   └── tokens.ts
├── scripts/
│   ├── validate.js              ← Sanity checks tokens before build
│   └── pull-codesyntax.md       ← How to refresh the codeSyntax map
└── .github/workflows/
    └── tokens.yml               ← CI: validate, build, publish

How the loop works

   ┌─────────────────────┐                    ┌──────────────────┐
   │  Designer in Figma  │                    │  Engineer in IDE │
   │  edits Variables    │                    │  uses tokens     │
   └──────────┬──────────┘                    └────────▲─────────┘
              │                                        │
              │  Native Figma Variables panel          │  npm install
              ▼                                        │  @sdaia/tokens
       ┌────────────────┐                       ┌──────┴───────────┐
       │ Figma Variables│ ◄── Tokens Studio ──► │ this repo (dist/)│
       │   (source of   │     plugin syncs      │   tokens.css     │
       │    truth)      │     in both           │   tokens.ts      │
       └────────────────┘     directions        └──────────────────┘
              ▲                                        ▲
              │                                        │
       Designers keep                              CI rebuilds
       editing in Figma's                          on every push
       native panel — Tokens                       to main
       Studio is just a courier

The sync rules

  1. Source of truth is Figma Variables. Always.
  2. Designers edit in Figma's native Variables panel. Not in Tokens Studio's UI.
  3. Tokens Studio is the courier only. Its only job is to sync the JSON between Figma and this repo.
  4. Engineers never edit tokens.json directly. It's a build input, not a source file.
  5. CI rebuilds dist/ on every push. Engineers consume dist/tokens.css from npm.

Designer workflow

When you change a token in Figma:

  1. Edit the variable in Figma's Variables panel (Local variables → edit value, mode, or alias).
  2. Open the Tokens Studio for Figma plugin.
  3. Click "Pull from Figma Variables" — imports your change into the plugin.
  4. Click "Push to GitHub" — opens a PR (or commits directly to main, per your repo settings).
  5. CI runs npm run validate then npm run tokens:build, commits rebuilt dist/ artifacts, and engineers can pull the update.

If a variable is renamed in Figma, you also need to refresh the codeSyntax map. See scripts/pull-codesyntax.md.

Engineer workflow

Adopting this package in a new product? Read ADOPTING.md first. It explains the four things you need to handle correctly (aliases, modes, dimension units, codeSyntax sidecar) and why you should never write a local transform over tokens.json.

npm install @sdaia/tokens

In your app's CSS entry:

@import '@sdaia/tokens/css';

Or in TypeScript:

import { tokens } from '@sdaia/tokens/ts'
const cardBg = tokens['color-bg-default']  // "var(--ds-color-bg-default)"

Modes are applied as classes on <html>:

| Class | Effect | |-------------------|---------------------| | .theme-dark | Dark theme | | .brand-private | Private brand (Indigo) | | .radius-square | Sharp corners | | .radius-rounded | Maximum rounded | | .density-reduced| Reduced motion | | .viewport-tablet| Tablet sizing | | .viewport-mobile| Mobile sizing |

Tailwind v4 utilities

tokens.css also ships a Tailwind v4 bridge — an @theme inline { … } block plus a handful of @utility text-text-* { … } rules — so the import above is all you need to use named utility classes like size-icon-lg, p-spacing-xl, rounded-radius-m, or text-text-md:

@import 'tailwindcss';
@import '@sdaia-ds/tokens/css';   /* ← bridge included automatically */

Every alias is a var(--ds-*) reference — no values are duplicated. Colour utilities don't need a bridge; use Tailwind's arbitrary-value syntax (bg-[var(--ds-color-bg-default)]).

Initial setup (one-time)

1. Tokens Studio plugin setup

  • Install "Tokens Studio for Figma" from the Figma community
  • In the plugin's Settings:
    • Sync provider: GitHub
    • Repo: your-org/sdaia-tokens
    • Branch: main
    • File path: tokens/tokens.json
    • Access token: GitHub PAT with repo scope
  • Settings → "Tokens are stored in: Variables" ← CRITICAL. Without this, Tokens Studio creates a parallel set of Figma Styles and you'll have drift.

2. Initial pull

In Tokens Studio: "Pull from Figma Variables""Push to GitHub". This creates the initial tokens/tokens.json.

3. Refresh codeSyntax map

See scripts/pull-codesyntax.md. Paste a small JS snippet into the Desktop Bridge plugin once, copy the output to tokens/figma-codesyntax.json, commit.

4. Enable GitHub Actions

The .github/workflows/tokens.yml workflow runs automatically. To publish to npm, tag a release (git tag v0.1.0 && git push --tags).

Versioning

This is a shared design contract. Apply semver strictly:

  • Patch (0.0.x) — value changes only (a color got tweaked, padding shifted by 2px)
  • Minor (0.x.0) — additive (new tokens, new modes)
  • Major (x.0.0) — breaking (token renamed, removed, or alias direction reversed)

Engineers pin a major version in their package.json. Big rewrites get a major bump and a migration note in CHANGELOG.

Pitfalls

  • Don't enable Tokens Studio's "Styles" output. Pick Variables only.
  • DTCG export drops codeSyntax. That's why we keep the sidecar map. Don't delete it.
  • Aliases can break across modes. Validate (npm run validate) catches missing alias targets.
  • Mode names are case-sensitive and must match what's in Figma's collection mode config exactly: Light, Dark, SDAIA-Core, Blue, Standard, Square, Rounded, etc.

CLI cheat sheet

| Command | What it does | |--------------------------------|-----------------------------------------------| | npm run validate | Sanity check tokens.json and codeSyntax | | npm run tokens:build | Generate dist/tokens.css, dist/tokens.js, and dist/tokens.ts | | npm run tokens:refresh-codesyntax | Print instructions for the manual codeSyntax pull | | npm version patch && npm publish | Tag a release |

Questions

Ping #design-system in Slack, or open an issue.