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

@loworbitstudio/visor-core

v0.6.0

Published

Design tokens for the Visor design system — CSS custom properties for theming.

Readme

@loworbitstudio/visor-core

CSS custom property design tokens for the Visor design system.

Installation

npm install @loworbitstudio/visor-core

Usage

Import the full token bundle in your project's entry CSS or JS:

@import "@loworbitstudio/visor-core";

Or import specific layers:

@import "@loworbitstudio/visor-core/primitives";   /* Tier 1: raw values */
@import "@loworbitstudio/visor-core/semantic";     /* Tier 2: purpose-named */
@import "@loworbitstudio/visor-core/themes/light"; /* Tier 3: light theme */
@import "@loworbitstudio/visor-core/themes/dark";  /* Tier 3: dark theme */

Then use tokens in your CSS:

.card {
  background: var(--surface-card);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--spacing-4);
}

Token Architecture

Visor tokens follow a strict 3-tier hierarchy:

Tier 1: Primitives

Raw values named by what they ARE. Never reference these directly in components — use semantic tokens instead.

--color-gray-900: #111827;
--spacing-4: 1rem;       /* 16px */
--radius-lg: 0.5rem;     /* 8px */
--font-size-base: 1rem;  /* 16px */

Tier 2: Semantic

Named by PURPOSE. Map to primitives.

--text-primary: var(--color-gray-900);
--surface-card: var(--color-white);
--border-default: var(--color-gray-200);
--component-md: var(--spacing-4);

Tier 3: Adaptive

Theme-aware tokens that switch based on the active theme class. Light theme values are set on :root. Dark theme values are applied under .theme-dark.

:root {
  --text-primary: var(--color-gray-900);
  --surface-page: var(--color-white);
}

.theme-dark {
  --text-primary: var(--color-gray-50);
  --surface-page: var(--color-gray-950);
}

To enable the dark theme, add .theme-dark to your root element:

<html class="theme-dark">

Consumer Override Mechanism

Override any token by redefining the CSS custom property. No forking required.

Override a primitive — all semantic tokens that reference it update automatically:

:root {
  /* Rebrand the accent color */
  --color-blue-500: #your-brand-color;
  --color-blue-600: #your-brand-color-dark;
}

Override a semantic token — change a specific role without touching primitives:

:root {
  /* Use a custom card background */
  --surface-card: var(--color-gray-50);
}

Override adaptive tokens per theme:

:root {
  --text-primary: #1a1a2e; /* Custom light mode text */
}

.theme-dark {
  --text-primary: #e8e8f0; /* Custom dark mode text */
}

TypeScript Support

Import token name constants for type-safe usage:

import {
  TOKEN_TEXT_PRIMARY,
  TOKEN_SURFACE_CARD,
  TOKEN_BORDER_DEFAULT,
} from "@loworbitstudio/visor-core/types"

// Use in JS (e.g., for animations or dynamic styles)
element.style.setProperty(TOKEN_TEXT_PRIMARY, "#custom-value")
const value = getComputedStyle(element).getPropertyValue(TOKEN_TEXT_PRIMARY)

Available Token Groups

| Group | Prefix | Example | |-------|--------|---------| | Primitive colors | --color-* | --color-gray-900 | | Spacing | --spacing-* | --spacing-4 (1rem / 16px) | | Border radius | --radius-* | --radius-lg | | Border widths | --border-width-* | --border-width-1 | | Font families | --font-* | --font-sans | | Font sizes | --font-size-* | --font-size-base | | Font weights | --font-weight-* | --font-weight-semibold | | Line heights | --line-height-* | --line-height-normal | | Shadows | --shadow-* | --shadow-md | | Z-index | --z-* | --z-modal | | Semantic text | --text-* | --text-primary | | Semantic surface | --surface-* | --surface-card | | Semantic border | --border-* | --border-default | | Interactive | --interactive-* | --interactive-primary-bg | | Component spacing | --component-* | --component-md | | Layout spacing | --layout-* | --layout-lg | | Typography roles | --font-body, --size-*, --weight-* | --size-heading-lg |

Development

# Generate dist/tokens.css from source
npm run build

# Validate all token references
npm run validate

# Run tests
npm run test

# Type check
npm run typecheck