ReaperOfVeriod
  • Joined on 2026-07-03

@albedo/ui-theme (0.2.0)

Published 2026-09-30 10:59:48 +00:00 by ReaperOfVeriod

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

Shared color theme model for Albedo and its web dashboard (palette presets, DOM application, copy/paste wire format).

@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 / CustomTheme types + 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 :root design tokens (import . or ./theme.css): the twelve palette slots, the fonts, and the derived --ui-* tokens.

    The --ui-* tokens are color-mix derivations of the twelve slots, not palette entries. applyTheme cannot 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 to Palette.

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
Details
npm
2026-09-30 10:59:48 +00:00
111
latest
4.5 KiB
Assets (1)
Versions (2) View all
0.2.0 2026-09-30
0.1.0 2026-09-25