aura-glass
Version:
A comprehensive glassmorphism design system for React applications with 142+ production-ready components
97 lines • 3.06 kB
TypeScript
import React from "react";
export interface BrowserInfo {
name: string;
version: number;
engine: "webkit" | "blink" | "gecko" | "edge" | "unknown";
mobile: boolean;
touch: boolean;
supports: BrowserCapabilities;
}
export interface BrowserCapabilities {
backdropFilter: boolean;
cssGrid: boolean;
flexbox: boolean;
cssVariables: boolean;
es6: boolean;
webgl: boolean;
webgl2: boolean;
webAnimations: boolean;
intersectionObserver: boolean;
resizeObserver: boolean;
mutationObserver: boolean;
requestIdleCallback: boolean;
webWorkers: boolean;
serviceWorkers: boolean;
indexedDB: boolean;
localStorage: boolean;
sessionStorage: boolean;
webRTC: boolean;
webAudio: boolean;
canvas: boolean;
svg: boolean;
video: boolean;
audio: boolean;
}
export declare const detectBrowser: () => BrowserInfo;
export declare const detectCapabilities: () => BrowserCapabilities;
export declare const compatibilityHelpers: {
getFallbackStyles: (feature: keyof BrowserCapabilities) => Record<string, any>;
supportsGlassmorphism: () => boolean;
getAnimationLibrary: () => "web-animations" | "css-transitions" | "none";
getWebGLSupport: () => "webgl2" | "webgl" | "none";
getStorageMechanism: () => "indexeddb" | "localstorage" | "memory";
};
export declare class PolyfillManager {
private static loadedPolyfills;
static loadPolyfill(name: string, url: string): Promise<void>;
static loadRequiredPolyfills(): Promise<void>;
static isPolyfillLoaded(name: string): boolean;
}
export declare const featureDetection: {
supportsCSS: (property: string, value?: string) => boolean;
supportsJS: (feature: string) => boolean;
supportsAPI: (api: string) => boolean;
getDevicePixelRatio: () => number;
isInIframe: () => boolean;
isInWebView: () => boolean;
getConnectionQuality: () => "slow" | "fast" | "unknown";
};
export declare const browserOptimizations: {
safari: {
optimizeBackdropFilter: () => {
willChange: string;
transform: string;
} | {
willChange?: undefined;
transform?: undefined;
};
fixFlexbox: () => {
minWidth: number;
minHeight: number;
};
};
firefox: {
optimizeBackdropFilter: () => React.CSSProperties;
};
mobile: {
optimizeForTouch: () => {
WebkitTapHighlightColor: string;
WebkitTouchCallout: string;
WebkitUserSelect: string;
touchAction: string;
} | {
WebkitTapHighlightColor?: undefined;
WebkitTouchCallout?: undefined;
WebkitUserSelect?: undefined;
touchAction?: undefined;
};
optimizeAnimations: () => {
willChange: string;
transform: string;
} | {
willChange?: undefined;
transform?: undefined;
};
};
};
//# sourceMappingURL=browserCompatibility.d.ts.map