UNPKG

aura-glass

Version:

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

57 lines 1.72 kB
import React from 'react'; export interface IntersectionOptions { threshold?: number | number[]; rootMargin?: string; root?: Element | null; triggerOnce?: boolean; skip?: boolean; delay?: number; } export interface IntersectionState { isIntersecting: boolean; intersectionRatio: number; boundingClientRect: DOMRectReadOnly | null; rootBounds: DOMRectReadOnly | null; target: Element | null; hasIntersected: boolean; } /** * Enhanced intersection observer hook with performance optimizations */ export declare function useGlassIntersection(options?: IntersectionOptions): [React.RefObject<HTMLElement>, IntersectionState]; /** * Hook for lazy loading images with intersection observer */ export declare function useGlassLazyImage(src: string, options?: IntersectionOptions & { placeholder?: string; lowQualitySrc?: string; webpSrc?: string; avifSrc?: string; }): { ref: React.RefObject<HTMLImageElement>; currentSrc: string; isLoading: boolean; isLoaded: boolean; error: string | null; }; /** * Hook for animating elements on intersection */ export declare function useGlassIntersectionAnimation(animationClass?: string, options?: IntersectionOptions): [React.RefObject<HTMLElement>, boolean]; /** * Hook for progressive content loading */ export declare function useProgressiveLoading<T>(items: T[], options?: { batchSize?: number; delay?: number; threshold?: number; }): { visibleItems: T[]; isLoading: boolean; loadedCount: number; totalCount: number; loadNext: () => void; loadAll: () => void; scrollRef: React.RefObject<HTMLElement>; }; //# sourceMappingURL=useGlassIntersection.d.ts.map