import { BundledThemeId } from '../../lib/themes'; /** * A theme id. * * The bundled ids are suggested by autocomplete, but any string is accepted: * define a `.theme-yourname` block with the same custom properties and it works * exactly like the built-ins. Call {@link registerTheme} so pickers, commands * and `scheme` know about it. */ export type ThemeType = BundledThemeId | (string & {}); /** A theme the shell knows about: bundled, or added with {@link registerTheme}. */ export interface IThemeInfo { id: string; label: string; shortLabel: string; description?: string; scheme: 'light' | 'dark'; } interface ThemeState { theme: ThemeType; setTheme: (theme: ThemeType) => void; /** Every known theme, bundled first then registered, for building pickers. */ themes: IThemeInfo[]; /** The current theme's `scheme`; `'light'` for an unregistered id. */ scheme: 'light' | 'dark'; } export declare const useThemeStore: import('zustand').UseBoundStore>; /** * Tell the shell about an application theme — a `.theme-` block in your * own CSS defining the same custom properties as the bundled ones. * * Registered themes appear in `useThemeStore().themes` (and so in pickers * built from it, including `ConnectedThemeSwitcher`), report their `scheme`, * and get a `theme.` command. Registering * an id again replaces it. */ export declare const registerTheme: (definition: Omit & { shortLabel?: string; }) => void; /** * The current theme's colour tokens, resolved to CSS colour strings. * * For code that draws outside CSS's reach — chart libraries, canvas, WebGL — * and so cannot write `hsl(var(--muted))`. Values are `hsl(...)` strings read * from the document's computed style, so they include an app's own overrides. */ export interface ThemeTokens { scheme: 'light' | 'dark'; background: string; foreground: string; card: string; cardForeground: string; popover: string; popoverForeground: string; primary: string; primaryForeground: string; secondary: string; secondaryForeground: string; muted: string; mutedForeground: string; accent: string; accentForeground: string; destructive: string; destructiveForeground: string; border: string; input: string; ring: string; } /** * Read the current theme's tokens. Outside React, or to re-read after * changing tokens yourself. Empty strings when there is no document. */ export declare const getThemeTokens: () => ThemeTokens; /** * {@link getThemeTokens} as a hook: re-reads, and re-renders, when the theme * changes. * * @example * ```tsx * const t = useThemeTokens(); * * ``` */ export declare const useThemeTokens: () => ThemeTokens; export {};