/** * @file Theme utilities — color resolution and composition. */ import type { ColorValue } from '../colors/types.js'; import type { Palette } from '../effects/shimmer.js'; import type { ColorReference, Theme, ThemeColors } from './types.js'; /** * Rainbow gradient colors used for the `'rainbow'` color keyword. 10 hues — * cycles through the full color spectrum with smooth transitions. */ export declare const RAINBOW_GRADIENT: Palette; /** * Create new theme from complete specification. * * @example * ;```ts * const theme = createTheme({ * name: 'custom', * displayName: 'Custom', * colors: { * primary: [255, 100, 200], * success: 'greenBright', * error: 'redBright', * warning: 'yellowBright', * info: 'blueBright', * step: 'cyanBright', * text: 'white', * textDim: 'gray', * link: 'cyanBright', * prompt: 'primary', * }, * }) * ``` * * @param config - Theme configuration. * * @returns Theme object */ export declare function createTheme(config: Pick & Partial>): Theme; /** * Extend existing theme with custom overrides. Deep merge of colors and * effects. * * @example * ;```ts * const custom = extendTheme(SOCKET_THEME, { * name: 'custom', * colors: { primary: [255, 100, 200] }, * }) * ``` * * @param base - Base theme. * @param overrides - Custom overrides. * * @returns Extended theme */ export declare function extendTheme(base: Theme, overrides: Partial> & { colors?: Partial | undefined; }): Theme; /** * Resolve color reference to concrete value. Handles semantic keywords: * 'primary', 'secondary', 'rainbow', 'inherit' * * @example * ;```ts * resolveColor('primary', theme.colors) * resolveColor([255, 0, 0], theme.colors) * ``` * * @param value - Color reference. * @param colors - Theme palette. * * @returns Resolved color */ export declare function resolveColor(value: ColorReference | ColorValue, colors: ThemeColors): ColorValue | 'inherit' | Palette; /** * Resolve shimmer color with gradient support. * * @example * ;```ts * resolveShimmerColor('rainbow', theme) * resolveShimmerColor('primary', theme) * ``` * * @param value - Shimmer color. * @param theme - Theme context. * * @returns Resolved color */ export declare function resolveShimmerColor(value: ColorReference | ColorValue[] | undefined, theme: Theme): ColorValue | Palette | 'inherit';