import { default as React } from 'react'; import { ViewportAnchorProps } from './types'; /** * Extended viewport anchor props. */ export interface ExtendedViewportAnchorProps extends ViewportAnchorProps { /** Root margin for intersection observer */ rootMargin?: string; /** Whether to track position continuously */ trackContinuously?: boolean; /** Callback when element enters viewport */ onEnterViewport?: () => void; /** Callback when element exits viewport */ onExitViewport?: () => void; /** Whether to unobserve after first intersection */ triggerOnce?: boolean; } /** * A component that anchors to the viewport and tracks its position. * * @remarks * This component is useful for implementing lazy loading, * scroll animations, sticky headers, and other viewport-aware features. * * @example * ```tsx * // Basic visibility tracking * { * console.log('Visibility:', visibility); * }} * > * * * * // With sticky behavior * { * console.log('Position:', position); * }} * > *
* * * // Lazy loading trigger * loadMoreContent()} * triggerOnce * > * * * ``` */ export declare const ViewportAnchor: React.ForwardRefExoticComponent>; /** * Props for LazyLoad component. */ export interface LazyLoadProps { /** Content to load when visible */ children: React.ReactNode; /** Placeholder while not visible */ placeholder?: React.ReactNode; /** Root margin for early loading */ rootMargin?: string; /** Whether content has been loaded */ onLoad?: () => void; /** Minimum height to prevent layout shift */ minHeight?: number | string; /** Optional className */ className?: string; /** Optional style */ style?: React.CSSProperties; } /** * Lazy loading component using viewport detection. * * @example * ```tsx * } * rootMargin="200px" * onLoad={() => console.log('Loaded!')} * > * * * ``` */ export declare function LazyLoad({ children, placeholder, rootMargin, onLoad, minHeight, className, style, }: LazyLoadProps): React.JSX.Element; /** * Props for StickyHeader component. */ export interface StickyHeaderProps { children: React.ReactNode; /** Offset from top when sticky */ offset?: number; /** Z-index when sticky */ zIndex?: number; /** Callback when sticky state changes */ onStickyChange?: (isSticky: boolean) => void; /** Optional className */ className?: string; /** Optional style */ style?: React.CSSProperties; } /** * Sticky header component with state tracking. * * @example * ```tsx * console.log('Sticky:', sticky)} * > *
* * ``` */ export declare function StickyHeader({ children, offset, zIndex, onStickyChange, className, style, }: StickyHeaderProps): React.JSX.Element; /** * Props for ScrollTrigger component. */ export interface ScrollTriggerProps { /** Callback when triggered */ onTrigger: () => void; /** Threshold for triggering (0-1) */ threshold?: number; /** Root margin */ rootMargin?: string; /** Whether to trigger only once */ triggerOnce?: boolean; /** Visual indicator (optional) */ indicator?: React.ReactNode; /** Optional className */ className?: string; } /** * Scroll trigger component for infinite scroll or animations. * * @example * ```tsx * // Infinite scroll * * * // Animation trigger * setAnimate(true)} * threshold={0.5} * triggerOnce * /> * ``` */ export declare function ScrollTrigger({ onTrigger, threshold, rootMargin, triggerOnce, indicator, className, }: ScrollTriggerProps): React.JSX.Element;