/** * Canonical appearance / theme configuration shape. * * Every surface (web, mobile, desktop, spatial) has historically carried its * own appearance config — with drifted field names (`preset` vs * `colorPreset`, web's `SoulColorConfig` vs mobile's flat fields vs * desktop's Tauri snake_case `interior_color_preset` + `custom_soul_color`) * and different subsets of the feature set. This module is the * authoritative vocabulary. Surfaces may keep UI-internal state in their * own shapes, but anything crossing the SDK boundary — sync, import/export, * cross-surface helpers — speaks `AppearanceConfig`. * * Migration helpers are provided for the legacy shapes so each surface can * normalize on load without inventing its own migration one-offs. */ /** * The canonical appearance configuration. Narrow, descriptive, surface-agnostic. * * - `colorPreset`: opaque preset identifier — the specific string space depends * on the surface (`"moonlight"`, `"amber"`, `"rose"`, …) plus the special * value `"custom"` which means "render from `customHue` + `customSaturation`". * - `customHue`: 0-360, only meaningful when `colorPreset === "custom"`. * - `customSaturation`: 0-1, only meaningful when `colorPreset === "custom"`. * - `theme`: master light/dark/system theme. Optional because some surfaces * (web, spatial) derive it from the OS without exposing a setting. */ export interface AppearanceConfig { colorPreset: string; customHue?: number; customSaturation?: number; theme?: "light" | "dark" | "system"; } /** Default appearance — moonlight preset, no custom override, system theme. */ export declare const DEFAULT_APPEARANCE_CONFIG: AppearanceConfig; /** * Normalize any of the historical surface-specific appearance shapes onto * the canonical `AppearanceConfig`. Unknown fields are ignored. Missing * fields fall back to `DEFAULT_APPEARANCE_CONFIG`. * * Accepted legacy keys: * - web: `{preset, customHue?, customSaturation?}` (the field is * `preset`, not `colorPreset`, in `SoulColorConfig`). * - mobile: `{colorPreset, customHue, customSaturation, theme}` flat * on `MobileSettings`. * - desktop: `{interior_color_preset, custom_soul_color: {hue, saturation}}` * snake_case in the Tauri JSON config. * - spatial: `{colorPreset, customHue, customSaturation}` flat on * `SpatialSettings`. * * The function is intentionally defensive — it operates on `unknown` because * the typical caller is reading from `localStorage` / `AsyncStorage` / a * Tauri JSON config, all of which return untyped blobs. * * @permanent — never remove. Unlike a deprecated-then-sunset API symbol * (which has callers we can refactor and ship a removal for), this * migration reads persisted user data we can never crawl and rewrite. * It must keep working for every `localStorage` / `AsyncStorage` / * Tauri JSON config that has ever existed in the wild. */ export declare function migrateAppearanceConfig(raw: unknown): AppearanceConfig; //# sourceMappingURL=appearance-config.d.ts.map