import * as preact from 'preact'; import { ComponentChildren } from 'preact'; declare const DEMO_HEADING_LEVELS: readonly [2, 3, 4, 5, 6]; type DemoHeadingLevel = (typeof DEMO_HEADING_LEVELS)[number]; interface DemoFrameProps { /** Visible accessible name for the teaching figure. */ title: string; /** Short explanation rendered directly below the title. */ description?: string; /** Figure caption rendered after the interactive body. */ caption?: ComponentChildren; /** Consumer-owned controls and visualization. */ children?: ComponentChildren; /** Optional stable root id for deep links and deterministic child ids. */ id?: string; /** Additional class on the root figure. */ className?: string; /** Reflect a consumer-owned recomputation/loading state to assistive tech. */ busy?: boolean; /** Heading depth in the surrounding document outline. Defaults to 3. */ headingLevel?: DemoHeadingLevel; } declare function DemoFrame({ title, description, caption, children, id, className, busy, headingLevel, }: DemoFrameProps): preact.JSX.Element; interface SliderProps { /** Visible label associated with the native range input. */ label: string; /** Controlled numeric value. */ value: number; min: number; max: number; /** Positive increment. Defaults to the native range-input step of 1. */ step?: number; /** Receives the parsed numeric value for every native input event. */ onValueChange: (value: number) => void; /** Optional stable input id. A hydration-stable id is generated otherwise. */ id?: string; name?: string; description?: string; disabled?: boolean; className?: string; /** Formats the visible current-value output. */ formatValue?: (value: number) => string; /** Optional spoken value text when the visible format is not descriptive. */ getValueText?: (value: number) => string; } declare function Slider(props: SliderProps): preact.JSX.Element; /** Semantic metric-card list for interactive teaching figures (#143). */ declare const STAT_CARD_TONES: readonly ["neutral", "accent", "positive", "warning"]; type StatCardTone = (typeof STAT_CARD_TONES)[number]; interface StatCardItem { /** Optional stable key. Defaults to the label, which must then be unique. */ id?: string; label: string; value: string | number; /** Optional unit rendered beside the primary value. */ unit?: string; /** Secondary explanatory line. */ detail?: string; tone?: StatCardTone; } interface StatCardsProps { items: readonly StatCardItem[]; /** Accessible name for the definition list. */ label?: string; /** Opt-in announcements for values that change independently of a control. */ live?: 'off' | 'polite'; className?: string; } declare function StatCards({ items, label, live, className, }: StatCardsProps): preact.JSX.Element; type BookTheme = 'light' | 'dark'; type ThemeColorToken = `--${string}`; type ThemeColorSpec = readonly [token: ThemeColorToken, fallback: string]; type ThemeColorMap = Readonly>; type ResolvedThemeColors = { readonly [Key in keyof T]: string; }; interface ThemeColorsSnapshot { /** Null during SSR; resolved on the first client effect. */ theme: BookTheme | null; colors: ResolvedThemeColors; /** Null until the client preference is known; animate only when explicitly false. */ reducedMotion: boolean | null; } /** * Resolve CSS custom properties and refresh after theme/motion changes. * * Keep the spec object outside the component (or otherwise stable) so its * intent is obvious and the hook does not need to re-subscribe each render. */ declare function useThemeColors(specs: T): ThemeColorsSnapshot; export { type BookTheme, DEMO_HEADING_LEVELS, DemoFrame, type DemoFrameProps, type DemoHeadingLevel, type ResolvedThemeColors, STAT_CARD_TONES, Slider, type SliderProps, type StatCardItem, type StatCardTone, StatCards, type StatCardsProps, type ThemeColorMap, type ThemeColorSpec, type ThemeColorToken, type ThemeColorsSnapshot, useThemeColors };