Expand description
Pipeline orchestrator.
Pure function resolve_theme(ThemeInput) -> ThemeTokens: every
stage’s input is the previous stage’s output, no I/O, no globals.
That purity is what makes the golden-file tests stable and what
lets the CLI report each case’s effect deterministically.
Stage order matters. See §10 of the implementation brief.
Structs§
- Resolve
Report - Per-case effects recorded during a pipeline run, intended for the CLI to surface to the developer. Building this alongside the tokens means the engine’s reasoning is transparent — no separate “explain” pass that could diverge.
- Theme
Input - The client’s raw theme request.
- Theme
Tokens - The fully-resolved, safe set of tokens the UI consumes. Field
names match the
--rio-*custom properties emitted byemit.rs.
Constants§
- DEFAULT_
BRAND - Safe default brand color used when the client supplies none (Case 7). A quiet blue-gray that passes contrast against white automatically and sits in a mid lightness band so it survives a future dark mode without adjustment.
Functions§
- resolve_
theme - Top-level pipeline. Pure; same input always yields the same output.
- resolve_
theme_ with_ report - Pipeline plus per-case effect log. The CLI uses this; tests use the report fields to assert which stages fired.