import type { ConfigurationOptions } from '../components/Config/types.ts'; import type { TextMateThemeRaw } from './create-tokenizer.ts'; import { type Theme } from './theme-schema.ts'; export declare const BASE_TOKEN_CLASS_NAME = "\u00D7"; /** Gets a normalized VS Code theme. */ export declare function getTheme(themeName?: string, themeConfig?: ConfigurationOptions['theme']): Promise; /** Generates CSS variables for all theme colors. */ export declare function getThemeColorVariables(theme: ConfigurationOptions['theme']): Promise>; /** * Fallbacks for theme colors used throughout renoun. * Each key represents a final color key, and its array is the fallback chain. */ declare const themeFallbacks: { 'activityBar.background': string[]; 'activityBar.foreground': string[]; 'panel.background': string[]; 'panel.border': string[]; 'editor.hoverHighlightBackground': { dark: string; light: string; }[]; 'editor.rangeHighlightBackground': string[]; 'editorError.foreground': { dark: string; light: string; }[]; 'editorLineNumber.foreground': string[]; 'editorLineNumber.activeForeground': string[]; 'editorHoverWidget.background': string[]; 'editorHoverWidget.foreground': string[]; 'editorHoverWidget.border': (string | { dark: string; light: string; })[]; 'scrollbarSlider.background': { dark: string; light: string; }[]; 'scrollbarSlider.hoverBackground': { dark: string; light: string; }[]; 'scrollbarSlider.activeBackground': { dark: string; light: string; }[]; }; type DotNestedObject = Key extends `${infer Head}.${infer Rest}` ? { [_ in Head]: DotNestedObject; } : { [_ in Key]: Value; }; type UnionToIntersection = (Union extends any ? (k: Union) => void : never) extends (k: infer Intersection) => void ? Intersection : never; type ThemeColorFallbacks = UnionToIntersection<{ [Key in keyof typeof themeFallbacks]: DotNestedObject; }[keyof typeof themeFallbacks]>; export type ThemeColors = { foreground: string; background: string; } & ThemeColorFallbacks; /** * Gets the configured VS Code theme colors as a nested object. * * - For a single theme, returns the actual color values. * - For multiple themes, returns a merged object (union of keys) * where each leaf is a CSS variable reference. * * Missing keys in any particular theme will result in an undefined CSS variable, * allowing for a graceful fallback. */ export declare function getThemeColors(themeConfig: ConfigurationOptions['theme']): Promise; /** * Gets the theme token variables for each theme. * * ```js * { * '[data-theme="light"] .×': { '--0': 'var(--0fg, inherit)' }, * '[data-theme="dark"] .×': { '--0': 'var(--1fg, inherit)' }, * } * ``` */ export declare function getThemeTokenVariables(themeConfig: ConfigurationOptions['theme']): Record>; /** Normalize a VS Code theme to a TextMate theme. */ export declare function normalizeTheme(theme: Theme, overrides?: Theme): TextMateThemeRaw; /** Determines if multiple themes are configured. */ export declare function hasMultipleThemes(theme: ConfigurationOptions['theme']): boolean; export {};