/** * dsh-tui color themes — ChatCode CLI terminal family. * * Two truecolor palettes share the legacy CLI identity: neutral charcoal and * gray surfaces, white or ink body text, orange-red brand accents, and blue * focus states. `dark-ansi` is the 16-color fallback for * terminals without truecolor. The active palette is chosen at startup by * querying the terminal background (OSC 11) — see ThemeProvider. * * `auto` is a pseudo-theme, not a palette: it resolves to `light` or `dark` * from the terminal background detected via OSC 11 (which tracks the system * theme in terminals that follow it). ThemeProvider re-runs detection every * time `auto` is selected and pushes the result through setAutoThemeBase(), * so getTheme('auto') always serves the currently detected palette. */ export type Theme = { autoAccept: string; bashBorder: string; claude: string; toolNameMutate: string; toolNameExec: string; claudeShimmer: string; claudeBlue_FOR_SYSTEM_SPINNER: string; claudeBlueShimmer_FOR_SYSTEM_SPINNER: string; permission: string; permissionShimmer: string; planMode: string; ide: string; promptBorder: string; promptBorderShimmer: string; text: string; inverseText: string; inactive: string; inactiveShimmer: string; subtle: string; suggestion: string; remember: string; background: string; success: string; error: string; warning: string; merged: string; warningShimmer: string; diffAdded: string; diffRemoved: string; diffAddedDimmed: string; diffRemovedDimmed: string; diffAddedWord: string; diffRemovedWord: string; toolCardBackground: string; toolCardBackgroundDim: string; toolDotExec: string; toolDotRead: string; toolDotWrite: string; toolDotWeb: string; toolDotTask: string; syntaxKeyword: string; syntaxString: string; syntaxComment: string; syntaxNumber: string; syntaxFunction: string; syntaxType: string; syntaxVariable: string; syntaxOperator: string; syntaxPunctuation: string; syntaxConstant: string; red_FOR_SUBAGENTS_ONLY: string; blue_FOR_SUBAGENTS_ONLY: string; green_FOR_SUBAGENTS_ONLY: string; yellow_FOR_SUBAGENTS_ONLY: string; purple_FOR_SUBAGENTS_ONLY: string; orange_FOR_SUBAGENTS_ONLY: string; pink_FOR_SUBAGENTS_ONLY: string; cyan_FOR_SUBAGENTS_ONLY: string; professionalBlue: string; chromeYellow: string; clawd_body: string; clawd_background: string; userMessageBackground: string; userMessageBackgroundHover: string; messageActionsBackground: string; selectionBg: string; bashMessageBackgroundColor: string; memoryBackgroundColor: string; rate_limit_fill: string; rate_limit_empty: string; fastMode: string; fastModeShimmer: string; briefLabelYou: string; briefLabelClaude: string; rainbow_red: string; rainbow_orange: string; rainbow_yellow: string; rainbow_green: string; rainbow_blue: string; rainbow_indigo: string; rainbow_violet: string; rainbow_red_shimmer: string; rainbow_orange_shimmer: string; rainbow_yellow_shimmer: string; rainbow_green_shimmer: string; rainbow_blue_shimmer: string; rainbow_indigo_shimmer: string; rainbow_violet_shimmer: string; subagentBullet: string; subagentDescription: string; subagentModel: string; subagentElapsed: string; subagentToolName: string; subagentStatusRunning: string; subagentStatusCompleted: string; subagentStatusFailed: string; }; /** The built-in theme names, in display order. */ export declare const THEME_NAMES: readonly ["dark", "dark-ansi", "light"]; /** * The `auto` pseudo-theme: not a palette, but a standing request to follow * the terminal background (OSC 11, which tracks the system theme in * terminals that follow it). Selectable everywhere a theme name is * (/theme, CHATCODE_CLI_TUI_THEME, ~/.chatcode-cli/tui/theme.json); getTheme() resolves it to * the last detected `light`/`dark` palette via the auto base below. */ export declare const AUTO_THEME_NAME = "auto"; /** * Record the palette `auto` should resolve to. Called by ThemeProvider * after each terminal-background detection while `auto` is active. * @param name - The detected base palette. */ export declare function setAutoThemeBase(name: 'light' | 'dark'): void; /** The palette `auto` currently resolves to (`light` or `dark`). */ export declare function getAutoThemeBase(): 'light' | 'dark'; /** * Any theme name: a built-in palette (`light`/`dark`/`dark-ansi`), a user * theme from ~/.chatcode-cli/tui/themes/.json, or a host runtime contribution. * Always resolvable to a concrete color palette via getTheme() (unknown names * fall back to `dark`). */ export type ThemeName = string; /** * Resolve a theme name to its concrete color palette. * @param themeName - The theme to resolve (built-in, `auto`, or user theme * name). * @returns The matching palette; `auto` resolves to the detected base * (light/dark), unknown names fall back to `dark`. */ export declare function getTheme(themeName: ThemeName): Theme; /** A resolver for a fully built palette. Undefined means “not mine”. */ export type ThemeResolver = (name: string) => Theme | undefined; /** * Whether the active theme's RESOLVED palette renders on a light background. * Keyed off the resolved palette's IDENTITY for the built-ins (auto resolves * to the shared light/dark instance, so this covers auto-with-light-terminal * that theme-NAME comparisons miss) and off the ink-text luminance for * custom and runtime themes (light palettes pair with dark ink). The palette's * `background` field is a badge fill, not the terminal background — never a * lightness signal. Colour-pair variants (effort ignition hues) consume this. */ export declare function isLightThemeActive(themeName: ThemeName): boolean; /** * Register the custom-theme resolver. Called once by ThemeProvider; the * resolver must return `undefined` for names it does not know so getTheme * falls back to `dark`. * @param resolver - Resolves a user theme name to a built palette. */ export declare function registerCustomThemeResolver(resolver: ThemeResolver): void; /** * Register the host runtime resolver. The returned cleanup is generation-safe: * disposing an older registration cannot clear a resolver installed later; * nested registrations restore the previous live resolver when they leave. */ export declare function registerRuntimeThemeResolver(resolver: ThemeResolver): () => void; /** Clear all runtime resolvers, primarily for isolated host teardown/tests. */ export declare function clearRuntimeThemeResolver(): void; /** * Whether a name resolves through the built-ins, static custom resolver, or * the optional runtime resolver. This deliberately remains separate from * customTheme.isThemeAvailable(), whose contract is static-file-only. */ export declare function isThemeAvailable(themeName: ThemeName): boolean; /** * Set the module-level active theme; ThemeProvider calls this once * background detection settles and on every runtime theme switch. * @param name - The theme to activate. */ export declare function setActiveThemeName(name: ThemeName): void; /** * Resolve the currently active theme for non-React rendering. * @returns The palette of the module-level active theme. */ export declare function getActiveTheme(): Theme; //# sourceMappingURL=theme.d.ts.map