import { default as React, ComponentType } from 'react'; import { HydrationBoundaryProps, WithHydrationBoundaryOptions } from './types'; /** * Wraps components for selective, prioritized hydration. * * This component integrates with the HydrationScheduler to provide * controlled hydration timing based on priority, visibility, and * user interactions. * * @param props - Boundary props * @returns The boundary wrapper with children or placeholder */ export declare function HydrationBoundary({ id: providedId, children, priority, trigger, placeholder, errorFallback, onHydrationStart, onHydrationComplete, onHydrationError, ssrOnly, mediaQuery, timeout, estimatedCost, aboveTheFold, className, style, }: HydrationBoundaryProps): React.JSX.Element; /** * HOC to wrap a component with a HydrationBoundary. * * @param Component - The component to wrap * @param options - Boundary options * @returns Wrapped component with hydration boundary * * @example * ```tsx * const HydratedChart = withHydrationBoundary(Chart, { * defaultPriority: 'low', * defaultTrigger: 'visible', * placeholder: , * }); * * // Use like normal component * * * // Override boundary props as needed * * ``` */ export declare function withHydrationBoundary

(Component: ComponentType

, options?: WithHydrationBoundaryOptions

): ComponentType

>; /** * Props for LazyHydration component. */ interface LazyHydrationProps

{ /** Factory function that returns a promise resolving to the component */ factory: () => Promise<{ default: ComponentType

; }>; /** Props to pass to the lazy-loaded component */ componentProps: P; /** Hydration boundary props */ boundaryProps?: Partial; } /** * Combines React.lazy with HydrationBoundary for maximum efficiency. * * This component provides both code-splitting (via React.lazy) and * selective hydration (via HydrationBoundary). * * @example * ```tsx * import('./HeavyChart')} * componentProps={{ data: chartData }} * boundaryProps={{ * priority: 'low', * trigger: 'visible', * placeholder: , * }} * /> * ``` */ export declare function LazyHydration

({ factory, componentProps, boundaryProps, }: LazyHydrationProps

): React.JSX.Element; export type { HydrationBoundaryProps, WithHydrationBoundaryOptions, LazyHydrationProps };