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

@aplica/tokens-themes-sample

v1.0.1

Published

Aplica Design theme sample (v1.0): JSON files ready to import into Tokens Studio as a starter template. The dist/ folder holds the reference token output for this repository.

Readme

@aplica/tokens-themes-sample

Git repository name: aplica-ds/aplica-tokens-themes-sample

Sample Aplica Design themes: a ready-made design token workspace you can open in Figma with Tokens Studio (PRO), plus a reference build output under dist/. The token sets and themes mirror the multi-layer architecture produced by the Aplica Theme Engine.

Documentation in this repository is written in English.

License

This repository and the published npm package @aplica/tokens-themes-sample are licensed under the MIT License; see the LICENSE file. The upstream @aplica/aplica-theme-engine package has its own license on npm; keep that distinction in mind when copying engine sources or upgrading the generator.

Install as an npm package

Published as @aplica/tokens-themes-sample (public scope). The published tarball includes data/, dist/, utils/, plus README.md and LICENSE. It does not include theme-engine/ — clone the GitHub repository for the full snapshot.

npm install @aplica/tokens-themes-sample

Resolving paths in Node

Use import.meta.resolve (Node 20.10+ / 22), createRequire, or path.join with fileURLToPath against the package root:

import { createRequire } from 'node:module';
import path from 'node:path';

const require = createRequire(import.meta.url);
const pkgRoot = path.dirname(require.resolve('@aplica/tokens-themes-sample/package.json'));
const themesPath = path.join(pkgRoot, 'data', '$themes.json');

Subpath exports

The package exposes stable subpaths (see package.jsonexports):

  • @aplica/tokens-themes-sample/package.json
  • @aplica/tokens-themes-sample/data/* (e.g. JSON under data/)
  • @aplica/tokens-themes-sample/dist/* (compiled outputs)
  • @aplica/tokens-themes-sample/utils/* (maintenance scripts)

Tokens Studio usually syncs from a folder on disk or a Git remote, not directly from node_modules. Typical workflow: copy data/ out of the installed package, or point the plugin at a clone of this repo.

What this repository is

  1. data/ — Token Studio–oriented JSON: token sets (brand, mode, surface, semantic, dimension, foundation, styles) and theme metadata ($themes.json, $metadata.json). This is the shape you sync or import when using multi-file token storage in Tokens Studio.
  2. dist/ — Example compiled token artifacts (JSON, ESM, CJS, TypeScript declarations) produced by the theme engine pipeline, useful as a reference for apps that consume tokens outside Figma.
  3. theme-engine/ — A pinned snapshot of configuration and schema-related files aligned with the npm engine version in devDependencies. Present in the Git repo only (not shipped in the npm tarball by default).
  4. utils/ — Small maintenance scripts (for example, stripping Figma-specific IDs from $themes.json after an export).

This repo is not a full fork of the engine runtime: it is a consumable sample of generated data. The engine version is tracked for maintainers who regenerate or align with upstream.

Compatibility: Tokens Studio (PRO)

Themes in Tokens Studio (including theme groups, sources, and enabled token sets) are a PRO capability. This sample’s $themes.json is authored for that workflow.

  • Official documentation: https://docs.tokens.studio/ (themes, sync, Figma variables/styles integration).

  • After pulling tokens from a real Figma file, you may see Figma style/variable reference maps repopulated. For a clean, shareable repo state (empty reference objects, similar to data/$themes.engine.json.template), run:

    npm install
    npm run themes:clean-figma

Architecture (high level)

The Aplica Theme Engine builds a semantic, five-layer token model (brand → mode → surface → semantic → foundation), described on aplica.me. In this sample you will see that structure reflected in paths such as:

| Area | Example paths under data/ | | --- | --- | | Brand | data/brand/<theme_name>/ (_brand.json, _typography.json, …) | | Mode | data/mode/light.json, data/mode/dark.json | | Surface | data/surface/positive.json, data/surface/negative.json | | Semantic | data/semantic/default.json | | Dimension | data/dimension/normal.json, minor.json, major.json | | Foundation | data/foundation/engine/, data/foundation/sample/ | | Styles | data/foundation/**/styles/ (e.g. typography and elevation styles) |

Use $themes.json together with $metadata.json so Tokens Studio knows which token sets belong to which theme and how they combine (e.g. brand + mode + surface + semantic + dimension).

Prerequisites

  • Node.js (for npm install and utility scripts).
  • Figma with Tokens StudioPRO for full themes support as used here.

Quick start (Tokens Studio)

Exact UI steps can change with plugin versions; always cross-check with the official Tokens Studio documentation.

  1. Clone this repository or install the npm package and copy data/ to your sync root.
  2. In Tokens Studio, configure remote or multi-file storage pointing at the data/ folder.
  3. Ensure $themes.json and $metadata.json are loaded so themes resolve correctly.
  4. Open or create a Figma document and pull the token sets; switch themes using the plugin’s theme UI.

For variables and styles linking behavior, refer to Tokens Studio guides such as Variables and Tokens Studio and related sections in their docs.

npm scripts

| Script | Purpose | | --- | --- | | npm run themes:clean-figma | Resets $figmaStyleReferences, figmaVariableReferences, and $figmaVariableReferences to {} on each entry in data/$themes.json (sanitized sample, comparable to data/$themes.engine.json.template). |

Relationship to @aplica/aplica-theme-engine

@aplica/aplica-theme-engine is listed under devDependencies: it is not installed for consumers of @aplica/tokens-themes-sample (the published tarball is asset-oriented). It records which engine generation this sample was aligned with when maintaining the repo.

To regenerate or extend tokens from source configs, use the full Theme Engine workflow documented with the package and on aplica.me, then refresh data/ and dist/ according to your team’s process.

Publishing (maintainers)

  1. Ensure you are logged in to npm with a user that has publish rights on the @aplica scope.
  2. Inspect the tarball: npm pack (review the generated .tgz contents; it should match the files list in package.json).
  3. Publish: npm publish from the repository root.

Making the GitHub repository public

If the repository is still private, an owner must set visibility to public in GitHub: Settings → General → Danger zone → Change repository visibility → Public. Review the tree for secrets before doing so.

Optional: add repository topics for discovery, for example design-tokens, tokens-studio, figma, aplica-ds.

Contributing

Issues and pull requests are welcome. Keep comments and commit messages in English for consistency with the broader Aplica DS tooling ecosystem.


Links: @aplica/tokens-themes-sample (npm) · Aplica DS · @aplica/aplica-theme-engine (npm) · Tokens Studio docs