/** * Velo Plot - Theme Editor Module * * Provides a visual theme editor for customizing chart appearance: * - Color pickers for all theme elements * - Live preview * - Theme export/import * - Preset theme gallery * * @module theme-editor */ export type EditorTheme = Record; export interface ThemeEditorOptions { /** Base theme to start from */ baseTheme?: EditorTheme | string; /** Enable live preview (default: true) */ livePreview?: boolean; /** Show advanced options (default: false) */ showAdvanced?: boolean; /** Custom CSS class for the editor */ className?: string; /** Callback when theme changes */ onChange?: (theme: EditorTheme) => void; /** Callback when export is requested */ onExport?: (theme: EditorTheme, json: string) => void; } export interface ThemePreset { /** Preset name */ name: string; /** Description */ description?: string; /** Theme configuration */ theme: EditorTheme; /** Preview colors (for UI) */ previewColors?: string[]; /** Tags for filtering */ tags?: string[]; } export interface ColorGroup { /** Group label */ label: string; /** Group description */ description?: string; /** Color properties in this group */ colors: ColorProperty[]; } export interface ColorProperty { /** Property key path (e.g., 'background', 'axis.color') */ key: string; /** Display label */ label: string; /** Description/tooltip */ description?: string; /** Current value */ value: string; /** Default value */ defaultValue?: string; } export declare const THEME_PRESETS: ThemePreset[]; export declare class ThemeEditor { private container; private options; private currentTheme; private element; constructor(container: HTMLElement, options?: ThemeEditorOptions); /** * Get current theme */ getTheme(): EditorTheme; /** * Set theme */ setTheme(theme: EditorTheme | string): void; /** * Update a specific theme property */ updateProperty(key: string, value: string): void; /** * Export theme as JSON */ exportTheme(): string; /** * Import theme from JSON */ importTheme(json: string): void; /** * Get theme preset by name */ getPreset(name: string): ThemePreset | undefined; /** * Apply a preset */ applyPreset(name: string): void; /** * Get all available presets */ getPresets(): ThemePreset[]; /** * Destroy the editor */ destroy(): void; private resolveTheme; private setNestedValue; private getNestedValue; private notifyChange; private render; private generateHTML; private normalizeColor; private attachEventListeners; } /** * Create a theme editor instance */ export declare function createThemeEditor(container: HTMLElement, options?: ThemeEditorOptions): ThemeEditor; /** * Get a preset theme by name */ export declare function getPresetTheme(name: string): EditorTheme | undefined; /** * Get all preset names */ export declare function getPresetNames(): string[];