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

@tenancy.nz/tokens

v1.10.6

Published

Design tokens for TPS UI — synced from Figma Token Studio, compiled with Style Dictionary.

Readme

@tenancy.nz/tokens

Design tokens for TPS UI. Figma Token Studio is the source of truth — designers push/pull the single raw export in raw/tokens.json. A prebuild step fans that out into the Token Studio "pro" multi-file layout under src/, then Style Dictionary compiles one theme at a time into the artifacts the component packages consume.

Folder structure

packages/tokens/
├── raw/tokens.json           ← Token Studio sync target (single-file export)
├── scripts/split-tokens.mjs  ← prebuild: raw/tokens.json → src/ (pro layout)
├── src/                      ← generated, gitignored — one folder per theme
│   ├── $metadata.json        ← Token Studio: token-set order
│   ├── $themes.json          ← Token Studio: theme definitions
│   ├── light/{primitive,semantic,component}.json
│   └── dark/{primitive,semantic,component}.json
├── style-dictionary.config.js  ← themeConfig() factory (one instance per theme)
├── build.mjs                 ← `pnpm build` entry point
└── dist/                     ← generated, gitignored, rebuilt in CI
    ├── css/tokens.css        ← :root (light) + [data-theme="dark"] (+ light.css/dark.css)
    ├── esm/index.js          ← ESM: { light, dark } value trees
    ├── cjs/index.cjs         ← CommonJS
    └── types/index.d.ts      ← TypeScript declarations

raw/tokens.json is the only hand-off point. Everything under src/ and dist/ is machine-owned — the prebuild wipes and regenerates src/ on every build, so edit tokens in Figma Token Studio and push, not by hand.

Each theme is compiled by its own Style Dictionary instance so the identical primitive/semantic/component groups across themes don't collide. Token references ({primitive.colors.blue.Blue500}) are theme-agnostic and resolve within whichever theme is being built.

Connecting Figma Token Studio

In the Token Studio plugin → Settings → Sync add a Git provider (GitLab, to match this repo) with:

  • Branch: a dedicated branch, e.g. design-tokens, so designer pushes arrive as merge requests rather than landing on main.
  • File path: packages/tokens/raw/tokens.json
  • Token format: DTCG ($value / $type).

Push from the plugin to write the JSON here; a merge to a release branch triggers the build below.

Build

pnpm --filter @tenancy.nz/tokens build

prebuild runs scripts/split-tokens.mjs first (also available standalone as pnpm --filter @tenancy.nz/tokens split).

Consuming

Tokens are exported as clean, resolved value trees — one per theme — keyed by their Token Studio paths, ready to map into a Material UI theme:

import tokens, {light, dark} from '@tenancy.nz/tokens';

tokens.light.primitive.colors.turquoise.Turquoise500;   // "#0cc1a3"
light.semantic.text['--color--text-accent'];            // "#0cc1a3"

// MUI: feed both schemes (or map the tokens into your palette shape)
import {createTheme} from '@mui/material/styles';
const theme = createTheme({
  colorSchemes: {
    light: {palette: {primary: {main: light.semantic.text['--color--text-accent']}}},
    dark: {palette: {primary: {main: dark.semantic.text['--color--text-accent']}}},
  },
});

Or use the CSS custom properties (light under :root, dark under [data-theme="dark"]):

import '@tenancy.nz/tokens/css';