@eamonxg/luci-theme-tokens
v2.0.0
Published
Design-token toolkit for eamonxg's LuCI themes: OKLCH derivation engine (mix/shade/set/alpha/const), CSS emission helpers, the Aurora token model, and prebuilt dist artifacts (tokens.css, browser global, shell conf, resolved presets).
Readme
@eamonxg/luci-theme-tokens
Design-token toolkit for eamonxg's LuCI themes: an OKLCH derivation engine, CSS emission helpers, the Aurora token model, and prebuilt dist artifacts.
Entry points
/engine— the mechanism, theme-agnostic: five OKLCH operators (mix/shade/set/alpha/konst, plustoOklch) andcreateResolver, which binds aDERIVATIONSspec (your own or Aurora's) to aresolveTokens(mode, inputs)function./emit— CSS building blocks shared by theme token generators:kebab(snake_case → kebab-case),block(selector + token maps → a:root { ... }body, deliberately left unclosed for callers to extend), andthemeColors(keys → Tailwind@theme inline--color-*mappings)./aurora— the Aurora theme's own identity:DERIVATIONS/FIXED(spec),DEFAULTS(default palette),STRUCTURE/THEME_STRUCTURE(non-colour tokens),PRESETS(named palettes), andresolveTokens/resolveMode, the engine pre-bound to Aurora's spec.
dist/aurora/
Built by node build.mjs (also runs on prepublishOnly); dist/ itself is
gitignored, not committed.
| Artifact | Consumer |
|---|---|
| tokens.css | luci-theme-aurora @imports it directly as the theme's _tokens.css. |
| tokens.global.js | luci-app-aurora-config vendors it as a browser IIFE (AuroraTokens global; expects a Color global from colorjs.io) for its live-preview theme editor. |
| color-tokens.conf | Vendored by luci-app-aurora-config: the ordered shell key list its rpcd backend reads for preset/import validation. |
| presets.json | Vendored by luci-app-aurora-config: named palettes fully resolved to runtime hex, in the same key order as color-tokens.conf. |
luci-theme-shadcn doesn't
consume dist/; it imports /engine + /emit directly and binds its own
DERIVATIONS spec, independent of the Aurora model.
Versioning
Independent semver. Removing/renaming a token or changing derivation semantics is major; adding a token is minor; value tweaks are patch.
Release
Tag vX.Y.Z (matching package.json) and push — CI tests and publishes with
the repo's NPM_TOKEN secret.
Renamed from @eamonxg/aurora-tokens (≤1.3.1).
