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

@zlecpl/tokens

v1.0.0

Published

Design tokens dla Zlec.pl — kolory, typografia, spacing, cienie

Readme

Zlec.pl Design Tokens

Źródło prawdy dla kolorów, spacingów, typografii i cieni aplikacji Zlec.pl.
Tokeny tworzone w Penpot (plugin Penpot Tokens) i eksportowane do W3C Design Tokens JSON.

Instalacja

npm install zlecpl-tokens

Struktura

design-tokens.json        ← Źródło (W3C format, edytuj w Penpot)
scripts/build.js          ← skrypt budujący (pure Node.js)
build/
  css/variables.css       ← CSS Custom Properties (:root + dark mode)
  scss/_tokens.scss       ← SCSS variables, map, function, mixin
  js/tokens.js            ← ES6 named exports
  js/tokens.d.ts          ← TypeScript declarations

Użycie CSS

/* import przez package exports */
@import 'zlecpl-tokens/css';

/* lub bezpośrednio */
@import 'zlecpl-tokens/build/css/variables.css';

/* Użycie */
.btn-primary {
  background: var(--zlec-brand-primary);
  border-radius: var(--zlec-radius-full);
  padding: var(--zlec-spacing-md) var(--zlec-spacing-xl);
  font-size: var(--zlec-type-size-base);
  font-weight: var(--zlec-type-weight-semibold);
  box-shadow: var(--zlec-shadow-sm);
}

Dark mode działa automatycznie przez @media (prefers-color-scheme: dark)
oraz atrybut [data-theme="dark"] na elemencie root.

Użycie SCSS

// import przez package exports
@use 'zlecpl-tokens/scss' as *;

// lub bezpośrednio
@use 'zlecpl-tokens/build/scss/tokens' as *;

// Zmienne SCSS
.btn-primary {
  background: $zlec-brand-primary;
  border-radius: $zlec-radius-full;
  padding: $zlec-spacing-md $zlec-spacing-xl;
}

// Funkcja pomocnicza (dostęp przez mapę)
.link {
  color: zlec-token('brand-primary');
}

// Mixin dark mode
@include zlec-dark-mode {
  .card {
    background: $zlec-dark-surface-bg;
    color: $zlec-dark-text-primary;
  }
}

Użycie JS / TypeScript

import { color, spacing, typography, shadow, tokens } from 'zlecpl-tokens';

// Pojedyncze wartości
const primary = color.brand.primary;   // '#E8470A'
const gap = spacing.lg;                // '16px'
const font = typography.size.base;     // '16px'

// Wszystko naraz
console.log(tokens.shadow.md);         // '0 4px 12px rgba(0,0,0,0.12)'

Regeneracja po zmianie tokenów w Penpot

  1. W Penpot → zakładka TOKENS → TOOLS → Eksportuj → pobierz JSON
  2. Zastąp design-tokens.json nowym plikiem
  3. Commit na main — CI zbuduje i skomituje pliki build/ automatycznie

Lokalnie:

node scripts/build.js

Publikacja nowej wersji na npm

  1. Zaktualizuj version w package.json
  2. Utwórz i wypchnij tag:
git tag v1.1.0
git push origin v1.1.0

GitHub Actions automatycznie opublikuje pakiet na npm (wymaga ustawionego sekretu NPM_TOKEN).