export interface ThemeDefinition { id: string; name: string; description: string; isDark: boolean; /** Theme family for grouping light/dark variants */ family: string; } export declare const BUILT_IN_THEMES: ThemeDefinition[]; export declare function isBuiltInThemeId(id: string): boolean; /** Backwards-compat alias for older callers. Prefer `isBuiltInThemeId`. */ export declare function isValidThemeId(id: string): boolean; /** Apply a theme to a DOM element. Used client-side when the user toggles * light/dark mode and inside the editor preview pane. */ export declare function applyThemeToElement(el: HTMLElement, themeId: string, overrides?: Record): void; export declare function getThemeFromElement(el: HTMLElement): { themeId: string; overrides: Record; }; /** * Serialize a token map into a CSS rule body. Used by the SSR middleware * to inject custom-theme styles into the document head. * * Escaping rules (defense-in-depth — admins are the only writers, but * we still want a malformed token to fail closed rather than break the * page or escape the ` (which Vue/Nuxt's useHead does for us) * * @param selector — e.g. `:root[data-theme="cpub-custom-deveco"]` or just `:root` * @param tokens — map of name→value (without leading `--`) */ export declare function tokensToCss(selector: string, tokens: Record): string; /** Compute a 5-color preview swatch from a token map (for the picker card). */ export declare function previewFromTokens(tokens: Record, isDark: boolean): { bg: string; surface: string; accent: string; text: string; border: string; }; export { TOKEN_NAMES, TOKEN_SPECS, TOKEN_GROUP_LABELS, TOKEN_GROUP_ORDER, ALIAS_TOKEN_NAMES, validateTokenOverrides, tokensByGroup, getTokenSpec, } from './tokens.js'; export type { TokenSpec, TokenGroup, TokenKind } from './tokens.js'; //# sourceMappingURL=theme.d.ts.map