import { default as React, ReactNode } from 'react'; import { StreamBoundaryProps } from './types'; /** * Default placeholder component for streaming boundaries. * * @description * A minimal placeholder with CSS animation that matches * the skeleton pattern used throughout the application. */ declare function DefaultPlaceholder(): React.ReactElement; /** * Fallback component for non-streaming environments. * * @description * Renders when streaming is not supported, providing * a graceful degradation path. */ interface NonStreamingFallbackProps { children: ReactNode; fallback?: ReactNode; } declare function NonStreamingFallback({ children, fallback, }: NonStreamingFallbackProps): React.ReactElement; /** * StreamBoundary Component * * @description * Defines a streaming boundary within the React component tree. * Content within a StreamBoundary can be streamed independently * from the rest of the page, enabling progressive HTML delivery. * * Key features: * - Priority-based streaming (critical, high, normal, low) * - Configurable defer timing for non-critical content * - Placeholder rendering during stream * - Fallback for non-streaming environments * - Integration with React Suspense * - Automatic cleanup on unmount * * Performance considerations: * - Use `priority="critical"` for above-the-fold content * - Use `deferMs` to stagger non-critical content * - Provide appropriately-sized placeholders to prevent CLS * - Keep streaming boundaries reasonably sized * * @example * ```tsx * // Navigation - stream immediately * * * * * // Hero section - high priority * } * onStreamComplete={() => analytics.track('hero_loaded')} * > * * * * // Sidebar - normal priority, slightly deferred * } * > * * * * // Footer - low priority, significantly deferred * } * > *