/** A named CSS theme. `none` is reserved for clearing the selection. */ interface Theme { name: string; class?: string | string[]; color?: string; /** @deprecated Prefer themes.default. */ default?: boolean; } interface ThemeConfig { list: Theme[]; default?: string; clearable?: boolean; disable?: boolean; /** CSS selector; `root` is an alias for the document element. */ target?: string; /** Runs in the preview on selection changes. May return a cleanup function. */ onChange?: (theme: Theme | undefined) => void | (() => void); } type ThemesParameter = Partial | Theme[]; declare function getConfig(parameter?: ThemesParameter): ThemeConfig; /** Resolve stale URL globals safely when navigating between different theme lists. */ declare function getSelectedTheme(config: ThemeConfig, selection: unknown): Theme | undefined; declare function getThemeClasses(theme?: Theme): string[]; declare const GLOBAL_KEY = "theme"; export { GLOBAL_KEY, type Theme, type ThemeConfig, type ThemesParameter, getConfig, getSelectedTheme, getThemeClasses };