aura-glass
Version:
A comprehensive glassmorphism design system for React applications with 142+ production-ready components
108 lines • 3.46 kB
TypeScript
import { ReactNode } from "react";
interface GlassTheme {
id: string;
name: string;
colors: {
primary: string;
secondary: string;
accent: string;
background: string;
surface: string;
text: string;
};
glass: {
blur: number;
opacity: number;
borderRadius: string;
};
animations: {
duration: number;
easing: string;
};
metadata: {
sentiment: string;
context: string;
created: Date;
};
}
interface ContentSentiment {
sentiment: string;
intensity: number;
confidence: number;
keywords: string[];
emotions: Record<string, number>;
}
interface ContentContext {
type: string;
category: string;
urgency: string;
readability: number;
complexity: string;
length: string;
timeOfDay: string;
season: string;
}
interface UserBehavior {
preferredIntensity: number;
preferredContrast: number;
readingTime: number;
deviceType: string;
accessibilityNeeds: {
highContrast: boolean;
reducedMotion: boolean;
largerText: boolean;
};
engagementLevel: number;
returnRate: number;
}
interface AIThemeConfig {
adaptToSentiment: boolean;
adaptToContext: boolean;
adaptToTime: boolean;
adaptToSeason: boolean;
adaptToBehavior: boolean;
enableABTesting: boolean;
accessibilityFirst: boolean;
performanceMode: boolean;
}
interface AIGlassThemeContextType {
currentTheme: GlassTheme | null;
isGenerating: boolean;
generationError: string | null;
aiConfig: AIThemeConfig;
updateAIConfig: (config: Partial<AIThemeConfig>) => void;
generateTheme: (content: string, context?: Partial<ContentContext>) => Promise<GlassTheme>;
generateThemeFromSentiment: (sentiment: ContentSentiment, context?: Partial<ContentContext>) => Promise<GlassTheme>;
themeHistory: GlassTheme[];
favoriteThemes: GlassTheme[];
addToFavorites: (theme: GlassTheme) => void;
removeFromFavorites: (themeId: string) => void;
userBehavior: UserBehavior;
updateUserBehavior: (behavior: Partial<UserBehavior>) => void;
trackInteraction: (themeId: string, engagement: number, satisfaction: number) => void;
performanceMode: boolean;
setPerformanceMode: (enabled: boolean) => void;
accessibilityMode: boolean;
setAccessibilityMode: (enabled: boolean) => void;
clearCache: () => void;
exportAIData: () => string;
importAIData: (data: string) => boolean;
}
interface AIGlassThemeProviderProps {
children: ReactNode;
initialConfig?: Partial<AIThemeConfig>;
storageKey?: string;
enableAnalytics?: boolean;
className?: string;
"data-testid"?: string;
}
export declare function AIGlassThemeProvider({ children, initialConfig, storageKey, enableAnalytics, className, "data-testid": dataTestId, }: AIGlassThemeProviderProps): import("react/jsx-runtime").JSX.Element;
export declare function useAIGlassTheme(): AIGlassThemeContextType;
export declare function useSmartTheme(): {
generateFromContent: (content: string) => Promise<GlassTheme>;
generateFromArticle: (title: string, body: string, category?: string) => Promise<GlassTheme>;
recordEngagement: (engagement: number, satisfaction?: number) => void;
currentTheme: GlassTheme | null;
};
export default AIGlassThemeProvider;
//# sourceMappingURL=AIGlassThemeProvider.d.ts.map