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

@the_awkward_customer/tokens-component-manifest

v1.0.0-alpha.10

Published

Component-level design tokens with preserved aliases for multi-dimensional theming

Downloads

49

Readme

@the_awkward_customer/tokens-component-manifest

Component-level design tokens with preserved aliases for multi-dimensional theming.

Overview

This package contains component tokens extracted from Figma with preserved alias chains, enabling runtime resolution based on multiple dimensions (sentiment, emphasis, state, density, theme).

Installation

npm install @the_awkward_customer/tokens-component-manifest

Usage

import {
  componentManifest,
  modeConfiguration,
  buttonTokens,
  badgeTokens
} from '@the_awkward_customer/tokens-component-manifest';

// Access component tokens
console.log(buttonTokens);

// Access mode configuration
console.log(modeConfiguration.dimensions);

Building & Validation

Development Build

This package is automatically generated from Figma exports. Do not manually edit files in src/generated/.

# Full build with validation
npm run build

# Individual steps
npm run transform  # Transform Figma exports to manifest
npm run compile    # Compile TypeScript
npm run validate   # Run pre-publish validation

Pre-Publish Validation ⭐

CRITICAL: Always run validation before publishing to prevent runtime failures.

# Comprehensive validation (5 checks)
npm run validate

# Case sensitivity check only
npm run validate:case

The build process automatically runs validation. If validation fails, the build will fail.

Validation Checks

  1. Case Sensitivity ✅ - All primitive references must be lowercase
  2. Alias Resolution ⚠️ - Token aliases must resolve correctly
  3. Mode Configuration ✅ - Mode dimensions and defaults must be complete
  4. Primitive Files ⚠️ - Primitive CSS files should exist
  5. Critical Tokens ✅ - Regression tests for known issues

Exit Codes:

  • 0 - All checks passed
  • 1 - Critical failures detected

Generated Files

  • src/generated/manifest.json - Component token manifest (JSON)
  • src/generated/manifest.ts - Component token manifest (TypeScript)
  • src/generated/mode-config.json - Mode configuration (JSON)
  • src/generated/mode-config.ts - Mode configuration (TypeScript)
  • src/generated/types.ts - TypeScript type definitions
  • src/generated/component-exports.ts - Individual component token exports

Scripts

| Script | Description | |--------|-------------| | npm run build | Full build: transform + compile + validate | | npm run transform | Transform Figma exports to manifest | | npm run compile | Compile TypeScript to JavaScript | | npm run validate | Run pre-publish validation suite | | npm run validate:case | Check case sensitivity only | | npm run clean | Remove generated files |

Publishing Workflow

Before publishing a new version:

  1. Update Figma Exports (if needed)

    # Copy latest exports from figma-exports/
  2. Build and Validate

    npm run build
    # This runs: transform → compile → validate
  3. Verify Output

    # Check validation passes
    npm run validate
    
    # Visual inspection
    node ../test-scripts/inspect-primitive-refs.js
  4. Test Components

    # Run component-specific tests
    node ../test-scripts/test-badge-resolution.js
  5. Update Version

    # Edit package.json version
    # Update CHANGELOG.md
  6. Commit and Publish

    git add .
    git commit -m "chore: release v1.0.0-alpha.5"
    npm publish

Troubleshooting

Validation Failures

Case Sensitivity Issues:

❌ CASE SENSITIVITY BUG DETECTED: Reference contains uppercase
Expected: primitive.radii-radius-04

Fix: Update Figma export or check transformer normalization in scripts/generators/manifest-generator.js

Unresolved Aliases:

⚠️ WARNING: 6 unresolved aliases found

Action: This is usually acceptable if <5% of aliases are unresolved. Review with verify-external-refs.js

Build Errors

Transform fails:

  • Check Figma exports exist in figma-exports/
  • Verify export file names match expected format

Compile fails:

  • Check TypeScript errors
  • Ensure all dependencies are installed

Related Documentation

License

MIT