# @platform-modules/ui-tokens

## 0.2.0

### Minor Changes

- 2efc47b: Rename the `ThemePackage` engine type to `PaletteSet` — it is a palette VALUES bundle (palettes + shape), not a presentation package. The word "theme" is reassigned to the presentation axis. Complete the public API rename: `validateThemePackage` → `validatePaletteSet`, `makeValidThemePackage` → `makeValidPaletteSet` (test fixture). Pre-1.0.0 clean rename, no compat alias.

### Patch Changes

- f17f1ba: Surface the pure contrast primitives `parseHex`, `relativeLuminance`, and `contrastRatio` (plus the `Rgb` type) from the `theme-engine` barrel (additive, non-breaking). Lets consumers test custom contrast thresholds (e.g. an editorial ink-on-bg floor stricter than WCAG AA) without reimplementing the WCAG math.

## 0.1.0

### Minor Changes

- 3329241: Add the `./theme-engine` subpath: typed ThemePackage token-set contract, structural validation, WCAG-AA contrast validation (Hard floor, hex-only fail-closed) at both whole-package and single-mode (`validateContrastTokens`, the override-persist seam) grain, active-theme resolution (theme × palette × mode × overrides), DOM apply, and build-time CSS emit with a prefers-color-scheme system fallback. Adds intent foreground tokens consumption; zero runtime deps preserved.
- d323ab5: Add intent foreground tokens (`success-fg` · `warning-fg` · `danger-fg` · `info-fg`) so text/icon rendered on an intent fill (Badge/Toast/Alert) is contrast-validatable as its own token pair. Each is white (`#ffffff`) on the (now accessible) intent fills.

  A11y fix to the reference fills: `success` (#2b8a3e→#237a35) and `warning` (#e67700→#b45309) were darkened — the brighter references failed WCAG AA (4.5:1) both as text on `bg`/`surface` and as a fill carrying any foreground. All four intents now pass 4.5:1 as text on bg/surface and carry a white `-fg` ≥4.5:1. `danger`/`info` unchanged (already passing).

## 0.0.2

### Patch Changes

- a95e5f1: Fix: the Tailwind v4 `@theme` adapter (`theme.css`) failed to compile in a consumer build — a comment delimiter closed early and leaked text into the `@theme` block, which the engine rejects (`@theme blocks must only contain custom properties or @keyframes`). The comment is corrected. Adds a regression test that compiles `base.css` + `theme.css` through the real Tailwind v4 engine, so a malformed `@theme` block fails the package's own test suite instead of only a downstream build.

  ui-primitives is republished so its `@platform-modules/ui-tokens` dependency range accepts the fixed release.

## 0.0.1

### Patch Changes

- 1ae2c4a: First release of the UI foundation: a themeless design-token contract (typed token unions + `--mod-*` custom properties + a Tailwind v4 `@theme` adapter) and a set of accessible, token-driven primitives (Button, Dialog, Tabs, Select) built on Radix + CVA. Lets a downstream project install the foundation and theme it through the token contract.
