feedlet-widget
Version:
Lightweight JavaScript widget for capturing user feedback and exit-intent surveys
42 lines (41 loc) • 1.08 kB
TypeScript
interface ThemeColors {
primary: string;
secondary: string;
surface: string;
overlay: string;
textPrimary: string;
textSecondary: string;
textTertiary: string;
border: string;
borderLight: string;
accent: string;
accentHover: string;
accentActive: string;
success: string;
error: string;
warning: string;
shadow: string;
backdropFilter: string;
}
export declare class ThemeManager {
private currentTheme;
private listeners;
private mediaQuery;
private mutationObserver;
constructor();
private detectInitialTheme;
private detectWebsiteTheme;
private isColorDark;
private isColorLight;
private parseColor;
private setupListeners;
private handleThemeChange;
private notifyListeners;
getCurrentTheme(): 'light' | 'dark';
onThemeChange(callback: (theme: 'light' | 'dark') => void): () => void;
getThemeColors(accentColor?: string): ThemeColors;
private adjustColor;
applyCSSVariables(accentColor?: string): void;
destroy(): void;
}
export {};