UNPKG

aura-glass

Version:

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

129 lines 3.86 kB
export interface DeviceInfo { type: 'mobile' | 'tablet' | 'desktop' | 'unknown'; os: 'ios' | 'android' | 'windows' | 'macos' | 'linux' | 'unknown'; browser: string; capabilities: DeviceCapabilities; performance: DevicePerformance; screen: ScreenInfo; input: InputCapabilities; } export interface DeviceCapabilities { touch: boolean; multiTouch: boolean; hover: boolean; pointer: boolean; gpu: boolean; webgl: boolean; webgl2: boolean; hardwareAcceleration: boolean; highDPI: boolean; vibration: boolean; geolocation: boolean; camera: boolean; microphone: boolean; speakers: boolean; bluetooth: boolean; usb: boolean; } export interface DevicePerformance { memory: number; cores: number; clockSpeed: number; battery: boolean; network: 'slow' | 'fast' | 'unknown'; storage: 'low' | 'medium' | 'high'; tier: 'low' | 'medium' | 'high' | 'ultra'; } export interface ScreenInfo { width: number; height: number; pixelRatio: number; orientation: 'portrait' | 'landscape'; colorDepth: number; refreshRate: number; touchScreen: boolean; ppi: number; } export interface InputCapabilities { keyboard: boolean; mouse: boolean; touch: boolean; stylus: boolean; gamepad: boolean; microphone: boolean; camera: boolean; } export declare const DEFAULT_DEVICE_INFO: DeviceInfo; export declare const detectDevice: () => DeviceInfo; export declare const refreshDeviceDetection: () => DeviceInfo; export declare const performanceOptimizations: { getOptimalAnimationSettings: (device: DeviceInfo) => { duration: number; easing: string; useHardwareAcceleration: boolean; useWebAnimations: boolean; }; getOptimalRenderingSettings: (device: DeviceInfo) => { useCanvas: boolean; useWebGL: boolean; pixelRatio: number; maxTextureSize: number; antialiasing: boolean; shadows: boolean; particles: number; }; getOptimalMemorySettings: (device: DeviceInfo) => { maxCacheSize: number; textureCacheSize: number; geometryCacheSize: number; shaderCacheSize: number; }; getOptimalNetworkSettings: (device: DeviceInfo) => { preloadAssets: boolean; compressTextures: boolean; useCDN: boolean; cacheStrategy: string; }; }; export declare const deviceOptimizations: { mobile: { reduceMotion: () => { prefersReducedMotion: boolean; disableParallax: boolean; simplifyAnimations: boolean; reduceParticleCount: boolean; }; optimizeTouch: () => { preventZoom: boolean; improveTapTargets: boolean; disableDoubleTapZoom: boolean; optimizeScroll: boolean; }; optimizeBattery: () => { reduceFrameRate: boolean; disableNonEssentialAnimations: boolean; optimizeRendering: boolean; }; }; tablet: { hybridInput: () => { supportTouchAndMouse: boolean; optimizeForBoth: boolean; adaptiveUI: boolean; }; }; desktop: { maximizePerformance: () => { useAdvancedShaders: boolean; enablePostProcessing: boolean; optimizeForGPU: boolean; }; }; }; export declare const adaptiveRendering: { adjustQualityForPerformance: (currentFPS: number, targetFPS: number | undefined, currentQuality: number) => number; getDetailLevel: (device: DeviceInfo) => "low" | "medium" | "high" | "ultra"; getOptimalTextureSize: (device: DeviceInfo, baseSize: number) => number; }; export { detectDevice as default }; //# sourceMappingURL=deviceCapabilities.d.ts.map