@albedo/ui-theme (0.2.0)
Installation
@albedo:registry=https://git.reaperofveriod.nl/api/packages/ReaperOfVeriod/npm/npm install @albedo/ui-theme@0.2.0"@albedo/ui-theme": "0.2.0"About this package
@albedo/ui-theme
Shared color theme model for Albedo (the desktop app) and its collection server dashboard. Importing this package keeps their palettes from drifting.
Contents
-
Palette/CustomThemetypes +THEME_PRESETS(8 built-in presets). -
applyTheme(palette)— flattens a palette into--ed-*CSS custom properties on:root. -
serializeTheme/parseTheme— the copy/paste wire format:albedo-theme:1:{"name":"…","palette":{…12 hex slots…}}. -
theme.css— the shared:rootdesign tokens (import.or./theme.css): the twelve palette slots, the fonts, and the derived--ui-*tokens.The
--ui-*tokens arecolor-mixderivations of the twelve slots, not palette entries.applyThemecannot write a thirteenth slot, so anything the interface needs beyond the twelve has to be derived or it will not follow a theme. They recompute on their own when a palette is applied — nothing in the runtime needs to know they exist, and they must not be added toPalette.
Publishing (Gitea npm registry)
npm run build
npm publish --registry https://git.reaperofveriod.nl/api/packages/ReaperOfVeriod/npm/
Consuming apps add to .npmrc:
@albedo:registry=https://git.reaperofveriod.nl/api/packages/ReaperOfVeriod/npm/
Dependencies
Development Dependencies
| ID | Version |
|---|---|
| typescript | ^5.5.0 |