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

trdr-tokens

v0.9.0

Published

Design tokens da TRDR: CSS variables, tema Tailwind v4, tipos e indice reverso.

Readme

trdr-tokens

Os design tokens da TRDR: CSS variables, tema Tailwind v4, tipos TypeScript e o índice reverso que as ferramentas de conformidade consomem.

A fonte é o Figma. Um script converte o dump de variáveis para o formato DTCG em src/**/*.tokens.json, e o build gera tudo o mais. Nada em dist/ se edita à mão.

Instalação

npm i trdr-tokens
@import "trdr-tokens/tokens.css";   /* as CSS variables, dark e light */
@import "trdr-tokens/theme.css";    /* o tema Tailwind v4, se voce usa Tailwind */
@import "trdr-tokens/index.css";    /* os dois */

O que sai do build

| Arquivo | Conteúdo | |---|---| | tokens.css | :root com o tema escuro e [data-theme="light"] com o claro. Os semânticos saem como var(--primitivo), então trocar a marca é mudar um lugar | | theme.css | @theme inline do Tailwind v4, em duas camadas: o vocabulário shadcn aliasado para tokens TRDR, e os nomes TRDR nativos | | tokens.js e tokens.d.ts | objeto tipado com autocomplete de todo nome de token | | tokens.json | catálogo com valor nos dois temas, referência, descrição e o nome shadcn correspondente | | mappings.json | índice reverso: dado um hex ou um px encontrado no código, qual token e qual utilitário usar | | designtokens.md | a documentação, gerada |

O contrato de nomes

Os nomes de CSS variable não mudam. Projetos TRDR e a skill /trdr-design já publicada dependem deles. Um gate no CI compara o build com o tokens.css que está em produção e falha em qualquer divergência não declarada.

Vocabulário

Duas camadas, ambas válidas no Tailwind.

Contrato shadcn, o preferencial: bg-background text-foreground bg-card bg-primary text-primary-foreground bg-muted text-muted-foreground bg-accent bg-destructive border-border ring-ring

Tokens TRDR nativos, para o que não tem equivalente shadcn: bg-surface-secondary text-content-tertiary border-border-subtle text-context-trading-up text-content-brand

Escalas: espaçamento p-md gap-sm; raio rounded-md; texto text-h1 a text-h7, text-b1 a text-b5, text-l2 text-l3, text-aux; família font-display (DM Sans), font-sans (Inter), font-mono (JetBrains Mono).

O text-h* traz tamanho, altura de linha, peso e tracking, mas não a família. Heading é sempre font-display text-h3.

As variáveis de fonte precisam ser declaradas pelo consumidor. tokens.css registra --font-dm-sans, --font-inter e --font-jetbrains-mono via @property com um initial-value textual, então a ausência delas não invalida --font-primary inteiro (era o que acontecia antes: IACVT, fonte cai no padrão do navegador, sem erro nenhum). Mas o @property é rede de segurança, não solução: sem a variável declarada via next/font, o texto renderiza no fallback genérico, não na família de verdade. Veja packages/ui/README.md para o bloco de next/font completo.

Regra que vale para quem consome

Semântico na interface, nunca primitivo. --color-neutral-800 diz que a cor é um cinza; --surface-secondary diz para que ela serve. Só o segundo acompanha a troca de tema e a evolução da marca. Os primitivos estão documentados para referência, não para uso.

Licença

MIT