/** * The rainbow theme's per-launch roll: a seeded shuffle over a twelve-color * bright-tier spectrum that fills every palette role, the status-bar tone map * (adjacent tones in canonical on-screen order never share a color, the * row1/row2 boundary included), the panel accent ring, and full-spectrum * flow anchors with a random phase. The roll happens once per launch and * stays stable for the whole run; setting RAINBOW_SEED= pins it for * reproduction (the /theme notification prints the seed of the current roll). * * All pool colors clear AA body text (≥4.5:1) on a black terminal by a wide * margin (11-17:1); diff rows pair a bright hue with its own 22% dark tint * so the foreground stays 7.7-10.2:1 on its background. * * @module @deepseek-ai/dsh-tui/rainbow */ import type { StatusTone } from './render/status.ts'; import type { RgbTriple, ThemePalette } from './theme.ts'; /** * The bright-tier spectrum: twelve Tailwind *-300 hues covering red through * fuchsia, every one ≥11:1 on black. The roll samples this pool by shuffle; * nothing outside it is ever painted. */ export declare const RAINBOW_POOL: readonly RgbTriple[]; /** One per-launch carnival roll: everything the rainbow theme paints from. */ export interface RainbowRoll { /** The seed this roll came from (print it to reproduce). */ readonly seed: number; /** The full 15-token palette for this launch. */ readonly palette: ThemePalette; /** The four-color panel ring (random order and start). */ readonly ring: readonly RgbTriple[]; /** Status-tone → color: adjacent tones in {@link TONE_ORDER} never match. */ readonly toneColors: Readonly>; /** Full-spectrum flow anchors in hue order (a different subset every launch). */ readonly flowAnchors: readonly RgbTriple[]; /** Random phase offset into the flow lap, milliseconds. */ readonly flowPhaseMs: number; } /** Parse a RAINBOW_SEED value: a non-negative decimal uint32, else nothing. */ export declare function parseRainbowSeed(value: string | undefined): number | undefined; /** * One parsed `/rainbow` argument: empty means a fresh random roll; a * decimal uint32 pins that seed; anything else is a usage error. * @param argument - the raw text after `/rainbow`. * @returns `{ seed }`, `'random'`, or `'usage'`. */ export declare function parseRainbowArgument(argument: string): { seed: number; } | 'random' | 'usage'; /** * Build the roll for one seed: pure and deterministic, so tests pin exact * outcomes and RAINBOW_SEED reproduces a lucky launch exactly. * @param seed - the uint32 seed to roll from. * @returns the complete carnival roll. */ export declare function rollRainbow(seed: number): RainbowRoll; /** The memoized per-launch roll; computed once, stable for the whole run. */ export declare function rainbowRoll(): RainbowRoll; /** * Replace the memoized roll: omit the seed for a fresh random one, or pass * a uint32 to pin it. `/rainbow` uses this so a mid-session reroll actually * recolors; {@link setTheme}(`'rainbow'`) must run afterwards so the * palette accessor picks the new values up. * @param seed - the seed to pin, or undefined for a new random roll. * @returns the roll now in force. */ export declare function rerollRainbow(seed?: number): RainbowRoll; /** The current roll's seed as display copy (also the RAINBOW_SEED value). */ export declare function rainbowSeedLabel(): string;