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

@one-nexty/tokens

v0.2.0

Published

Design tokens de Nexty au format W3C DTCG. Agnostique : aucune dépendance à une plateforme ou un framework.

Downloads

131

Readme

@one-nexty/tokens

Source de vérité de l'identité visuelle. Ce package ne connaît aucune plateforme.

src/*.json  ──▶  build.mjs  ──▶  dist/

Sources (src/)

| Fichier | Contenu | | ----------------- | -------------------------------------------------------------- | | colors.json | Palette primitive en OKLCH (primary, secondary, neutral, green, amber, red, blue) | | semantic.json | Tokens d'usage (surface, fg, accent…) + variantes sombres | | typography.json | Familles, tailles, graisses, interlettrage | | spacing.json | Échelle d'espacement (grille 4px) + rayons | | shadows.json | Élévations |

Format W3C Design Tokens (DTCG) : chaque feuille porte $type / $value. Les tokens sémantiques référencent la palette par alias :

{ "$type": "color", "$value": "{color.primary.500}" }

Artefacts (dist/)

| Fichier | Cible | | ------------------ | -------------------------------------------------------------- | | index.js .d.ts | JS/TS — import { tokens, tokenList } from '@one-nexty/tokens' | | variables.css | Web sans Tailwind — variables --nx-* (:root et .dark) | | tokens.json | Liste plate résolue — pipeline Figma, scripts, autres langages | | react-native.js | Natif — lightTokens / darkTokens, hex et px numériques |

Deux conversions faites par le pipeline

OKLCH → hexadécimal. La palette est écrite en OKLCH ; React Native, Flutter et les clients e-mail ne le comprennent pas. build.mjs implémente la chaîne complète OKLCH → OKLab → LMS → sRGB linéaire → sRGB (matrices de Björn Ottosson, 2020) et attache un hex à chaque token couleur.

rem → px. Les dimensions sont exprimées en rem pour le web ; StyleSheet.create() n'accepte que des nombres. La conversion se fait dans le formatter natif, pas dans les sources.

Contrôle de contraste

check-contrast.mjs mesure 34 paires premier-plan / fond dans les deux thèmes et fait échouer le build sous le seuil WCAG AA (4,5:1 pour le texte, 3:1 pour les contours de composants). Il tourne automatiquement après chaque pnpm build.

Toute nouvelle combinaison de couleurs utilisée par un composant doit être ajoutée à la liste PAIRS — c'est elle qui fait foi, pas l'inspection visuelle.

Règles

  1. Un composant ne consomme jamais la palette primitive, uniquement les tokens sémantiques. Sinon le thème sombre et le rebranding deviennent impossibles.
  2. On n'édite jamais dist/ — il est gitignoré et régénéré par pnpm build.
  3. Ajouter une plateforme = ajouter un formatter dans build.mjs. Le reste du pipeline (parsing, alias, aplatissement) est déjà mutualisé.