import type { ThemeController, ThemeName } from './ThemeProvider.js'; /** The mutable selection a `ThemeController` reads from and writes to. */ export interface ThemeState { name: ThemeName; following: boolean; /** * Global text-scale multiplier applied on top of the theme's `--text-*` * ramp. Orthogonal to `name`: a theme switch / `toggle()` leaves it * untouched, so a user-chosen scale persists across appearance changes. * `1` = the default ramp. * * This is an IN-APP preference (e.g. a "text size" setting inside the * app). The OS text-size setting is separate: the native host feeds it * into the engine (`LynxViewBuilder.fontScale` / `updateFontScale`, see * #766), which scales every `font-size` — including this ramp's literal * px — so the two compose multiplicatively. Do NOT seed this from * `useFontScale()`; that would apply the OS scale twice. */ fontScale: number; } /** * Coerce a font-scale input to a valid positive, finite multiplier. Rejects * `NaN`, `±Infinity`, and non-positive values — which would otherwise emit * invalid CSS (`NaNpx`, negative font sizes) and break `fontScale === 1` * comparisons — by returning `fallback` instead. */ export declare function normalizeFontScale(value: unknown, fallback?: number): number; /** * Build a `ThemeController` over a given state object. Used for both the global * singleton (below) and each nested ``'s local state — same * behaviour, different backing store. `followSystem()` only flips the flag; the * owning provider's follow effect performs the re-apply. */ export declare function makeThemeController(state: ThemeState): ThemeController; /** * The backing signal for the global theme. Read/written by the root * `` and shared with `themeController`; not part of the public * API. * @internal */ export declare const globalThemeState: import("@sigx/reactivity").Signal; /** * The global theme controller — the headless handle. Import and call from * anywhere (no `` ancestor required); `useTheme()`'s default * factory returns this same instance, and the root `` provides * it to its subtree. `StatusBarSync` binds to it so the OS bars always follow * the global/screen theme, never a content sub-scope. */ export declare const themeController: ThemeController; //# sourceMappingURL=theme-state.d.ts.map