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

@priceshoes/ds-tokens

v3.0.17

Published

Price Shoes | Design System 3.0 — token pipeline (Tokens Studio → CSS/JS/iOS/Android/React Native via Style Dictionary + sd-transforms)

Readme

PS | DS 3.0 — Integración con código

Puente diseño ↔ desarrollo del Design System 3.0: pipeline de tokens (Figma como fuente de verdad → CSS/JS/iOS/Android) y Code Connect (componentes de Figma mapeados a React).

1. Pipeline de tokens

Fuente única en formato DTCG (W3C Design Tokens), construida con Style Dictionary a múltiples plataformas.

tokens/
  primitives.json        # rampas de color, spacing, radius, border, icon, opacity, breakpoint, z, tipografía
  semantic.light.json    # tokens semánticos (sys.*) → alias a primitivos (modo claro)
  semantic.dark.json     # overrides de modo oscuro
style-dictionary.config.mjs

Build:

npm install
npm run build

Genera:

build/
  css/light.css          # :root { --sys-color-... }
  css/dark.css           # [data-theme="dark"] { ... }
  js/tokens.js           # ES6 exports
  js/tokens.d.ts         # tipos TypeScript
  ios/Tokens.swift       # PSTokens (Swift)
  android/colors.xml     # + dimens.xml

Los semánticos se emiten con outputReferences, así que en CSS quedan como --sys-color-primary-interactive: var(--color-cobalt-600) — trazables al primitivo.

Sincronización desde Figma

Los tokens/*.json son la fuente versionada. Para regenerarlos desde las variables de Figma (colecciones Colors, Tokens, Spacing, Foundations, Typography) se recomienda:

  • Figma REST API (GET /v1/files/:key/variables/local, requiere plan Enterprise), o
  • El plugin Tokens Studio exportando a DTCG.

Se conecta a CI: en cada cambio publicado en Figma, regenerar tokens/*.jsonnpm run build → publicar el paquete @priceshoes/ds-tokens.

Nota: el prefijo (ps) de las variables es configurable en style-dictionary.config.mjs.

2. Componentes React

src/components/ — Button, IconButton, Input, Badge. React + Tailwind, con estilos por tokens (var(--sys-color-*)), estados con pseudo-clases y accesibilidad (focus visible, aria-*, área táctil ≥44px).

3. Code Connect

code-connect/*.figma.tsx mapean cada componente de Figma (por URL + node-id) a su componente React, con figma.enum / figma.boolean / figma.textContent para traducir variantes → props.

Componentes mapeados (10 core): Button, Icon Button, Input, Badge, Checkbox, Radio, Switch, Chip, Toast, Dropdown.

Publicar (requiere token de Figma, plan Org/Enterprise, componentes publicados):

export FIGMA_ACCESS_TOKEN=xxxx
npm run cc:publish

Tras publicar, Dev Mode muestra el snippet de React correcto por cada componente/variante seleccionada.

Estado

  • ✅ Pipeline de tokens funcionando y verificado (build multiplataforma).
  • ✅ Componentes React core (10) + Code Connect listos para publicar.
  • Adopción por el equipo de desarrollo (lo que falta para el 100%): correr figma connect publish, integrar npm run build en su CI, y consumir @priceshoes/ds-tokens / @priceshoes/ds-react en la app.

Próximo (extensión)

  • Ampliar Code Connect al resto de componentes interactivos (chip, Toast, checkbox, radio, switch, dropdown, Tabs…).
  • Añadir tokens de tipografía compuesta (text styles) y sombras al pipeline.
  • Automatizar el sync Figma → tokens.json en CI.