UNPKG

aura-glass

Version:

A comprehensive glassmorphism design system for React applications with 142+ production-ready components

135 lines 4.39 kB
/** * AI-Powered Personalization Engine * Advanced machine learning system for adaptive user experience personalization */ export interface UserInteraction { id: string; timestamp: number; type: 'click' | 'hover' | 'scroll' | 'focus' | 'type' | 'gesture' | 'voice' | 'gaze'; target: string; context: string; duration: number; position?: { x: number; y: number; }; metadata?: Record<string, any>; } export interface BehaviorPattern { id: string; name: string; confidence: number; frequency: number; contexts: string[]; temporal: { timeOfDay: number[]; dayOfWeek: number[]; seasonality?: number; }; triggers: string[]; outcomes: string[]; } export interface PersonalizationProfile { userId: string; created: number; lastUpdated: number; confidence: number; uiPreferences: { colorScheme: 'light' | 'dark' | 'auto' | 'custom'; animationSpeed: number; density: 'compact' | 'comfortable' | 'spacious'; complexity: 'simple' | 'standard' | 'advanced'; fontScale: number; }; interactionStyle: { primaryInput: 'mouse' | 'touch' | 'keyboard' | 'voice' | 'gaze' | 'gesture'; preferredGestures: string[]; clickPressure: number; hoverDelay: number; doubleClickSpeed: number; scrollSensitivity: number; }; contentPreferences: { informationDensity: 'minimal' | 'moderate' | 'detailed'; explanationLevel: 'brief' | 'standard' | 'comprehensive'; examplePreference: boolean; visualPreference: boolean; progressIndicators: boolean; }; temporalPatterns: { mostActiveHours: number[]; peakPerformanceTime: number; preferredSessionDuration: number; breakFrequency: number; }; cognitiveProfile: { processingSpeed: number; workingMemoryCapacity: number; attentionSpan: number; multitaskingPreference: boolean; interruptionTolerance: number; }; } export interface PersonalizationRecommendation { type: 'ui' | 'content' | 'interaction' | 'workflow'; component: string; recommendation: string; confidence: number; reasoning: string[]; expectedImpact: number; testable: boolean; } declare class AIPersonalizationEngine { private interactions; private patterns; private profiles; private models; private featureCache; addInteraction(interaction: UserInteraction): void; private extractFeatures; private incrementalLearning; private updateBehaviorPatterns; generatePersonalizationProfile(userId: string): PersonalizationProfile; private analyzeUIPreferences; private analyzeInteractionStyle; private analyzeContentPreferences; private analyzeTemporalPatterns; private analyzeCognitiveProfile; generateRecommendations(userId: string): PersonalizationRecommendation[]; predictBehavior(context: string, currentTime?: number): { action: string; probability: number; }[]; private countSequentialPatterns; private calculateAveragePosition; private calculatePositionVariance; private calculateContextSwitchRate; private calculateHourDistribution; private calculateOverallConfidence; private updateModelsIncremental; } declare const aiPersonalizationEngine: AIPersonalizationEngine; export declare const useAIPersonalization: (userId: string) => { profile: PersonalizationProfile | null; recommendations: PersonalizationRecommendation[]; isLearning: boolean; recordInteraction: (interaction: Omit<UserInteraction, "id" | "timestamp">) => void; updateProfile: () => void; predictBehavior: (context: string) => { action: string; probability: number; }[]; }; export declare const useInteractionRecording: (componentId: string, userId: string) => { startInteraction: (type: UserInteraction["type"], context?: string) => { type: "type" | "click" | "focus" | "scroll" | "hover" | "gesture" | "voice" | "gaze"; target: string; context: string; }; endInteraction: (interactionStart: any, position?: { x: number; y: number; }) => void; }; export default aiPersonalizationEngine; //# sourceMappingURL=aiPersonalization.d.ts.map