/** * @file Progressive Enhancement Utilities * @description Utility functions and constants for progressive enhancement */ /** * Default browser capabilities for SSR */ export declare const DEFAULT_CAPABILITIES: { readonly esModules: true; readonly asyncAwait: true; readonly webGL: true; readonly webGL2: true; readonly webP: true; readonly avif: true; readonly serviceWorker: true; readonly webWorker: true; readonly sharedArrayBuffer: false; readonly intersectionObserver: true; readonly resizeObserver: true; readonly cssGrid: true; readonly containerQueries: true; readonly cssHas: true; readonly viewTransitions: true; readonly navigationAPI: true; readonly broadcastChannel: true; readonly webLocks: true; readonly storage: true; readonly indexedDB: true; readonly webAssembly: true; readonly bigInt: true; readonly proxy: true; readonly weakMap: true; readonly fetch: true; readonly streams: true; readonly modules: true; readonly dynamicImport: true; readonly topLevelAwait: true; readonly popoverAPI: true; readonly webAnimations: true; readonly idleCallback: true; readonly intl: true; }; /** * Get default capabilities */ export declare function getDefaultCapabilities(): typeof DEFAULT_CAPABILITIES; /** * Check WebP support asynchronously */ export declare function checkWebPSupport(): Promise; /** * Check AVIF support asynchronously */ export declare function checkAVIFSupport(): Promise; /** * Check async/await support */ export declare function hasAsyncAwait(): boolean; /** * Check WebGL support */ export declare function hasWebGL(): boolean; /** * Check WebGL2 support */ export declare function hasWebGL2(): boolean; /** * Create a progressive feature definition */ export declare function createFeature(id: string, config: { loader: () => Promise; dependencies?: string[]; polyfill?: () => Promise; requirements?: Array; fallback?: () => Promise; priority?: 'critical' | 'high' | 'normal' | 'low'; preload?: boolean; }): { id: string; loader: () => Promise; dependencies?: string[]; polyfill?: () => Promise; requirements?: Array; fallback?: () => Promise; priority?: 'critical' | 'high' | 'normal' | 'low'; preload?: boolean; }; /** * Browser capabilities interface */ export interface BrowserCapabilities { /** Supports ES modules */ esModules: boolean; /** Supports async/await */ asyncAwait: boolean; /** Supports WebGL */ webGL: boolean; /** Supports WebGL2 */ webGL2: boolean; /** Supports WebP images */ webP: boolean; /** Supports AVIF images */ avif: boolean; /** Supports Service Workers */ serviceWorker: boolean; /** Supports Web Workers */ webWorker: boolean; /** Supports SharedArrayBuffer */ sharedArrayBuffer: boolean; /** Supports IntersectionObserver */ intersectionObserver: boolean; /** Supports ResizeObserver */ resizeObserver: boolean; /** Supports CSS Grid */ cssGrid: boolean; /** Supports CSS Container Queries */ containerQueries: boolean; /** Supports CSS :has() */ cssHas: boolean; /** Supports View Transitions API */ viewTransitions: boolean; /** Supports Navigation API */ navigationAPI: boolean; /** Supports Popover API */ popoverAPI: boolean; /** Supports Web Animations API */ webAnimations: boolean; /** Supports requestIdleCallback */ idleCallback: boolean; /** Supports Intl API */ intl: boolean; } /** * Detect browser capabilities */ export declare function detectCapabilities(): BrowserCapabilities; /** * Get capabilities without React */ export declare function getCapabilities(): BrowserCapabilities;