admesh-ui-sdk
Version:
Beautiful, modern React components for displaying AI-powered product recommendations with citation-based conversation ads, auto-triggered widgets, floating chat, conversational interfaces, persistent sidebar, and built-in tracking. Includes zero-code SDK
83 lines • 2.44 kB
TypeScript
/**
* AdMesh Theming System
*
* Provides a controlled, platform-agnostic theming API
* Allows optional customization while maintaining consistency by default
*/
export interface AdMeshThemeConfig {
mode?: 'light' | 'dark' | 'auto';
primaryColor?: string;
accentColor?: string;
backgroundColor?: string;
textColor?: string;
borderColor?: string;
borderRadius?: string;
fontFamily?: string;
shadows?: {
sm?: string;
md?: string;
lg?: string;
xl?: string;
};
spacing?: {
xs?: string;
sm?: string;
md?: string;
lg?: string;
xl?: string;
};
customCSS?: string;
}
/**
* Default AdMesh theme configuration
* Provides consistent styling across all platforms
*/
export declare const DEFAULT_THEME: AdMeshThemeConfig;
/**
* Dark theme configuration
*/
export declare const DARK_THEME: AdMeshThemeConfig;
/**
* Merge user theme with default theme
* Ensures all required properties are present
*/
export declare const mergeTheme: (userTheme?: Partial<AdMeshThemeConfig>) => AdMeshThemeConfig;
/**
* Generate CSS custom properties (variables) from theme config
* These can be used in CSS for dynamic theming
*/
export declare const generateThemeVariables: (theme: AdMeshThemeConfig) => string;
/**
* Inject custom theme CSS into the document
* Allows runtime theme customization
*/
export declare const injectCustomTheme: (theme: AdMeshThemeConfig) => void;
/**
* Get current theme mode (light/dark)
* Respects system preference if mode is 'auto'
*/
export declare const getCurrentThemeMode: (mode?: "light" | "dark" | "auto") => "light" | "dark";
/**
* Create a theme provider hook for React components
* Manages theme state and injection
*/
export declare const createThemeProvider: (initialTheme?: Partial<AdMeshThemeConfig>) => {
theme: AdMeshThemeConfig;
updateTheme: (updates: Partial<AdMeshThemeConfig>) => AdMeshThemeConfig;
injectTheme: () => void;
getThemeVariables: () => string;
};
/**
* Detect if host platform is using a CSS framework
* Helps determine if additional style isolation is needed
*/
export declare const detectCSSFramework: () => string[];
/**
* Export theme configuration for documentation
*/
export declare const THEME_DOCUMENTATION: {
description: string;
usage: string;
properties: string[];
};
//# sourceMappingURL=themingSystem.d.ts.map