/** * @file Dynamic HTML Streaming Engine - Main Module * @description Central export point for the Dynamic HTML Streaming Engine. * * This module provides a comprehensive streaming solution for progressive * HTML delivery in React applications. It enables: * * - Priority-based content streaming (critical, high, normal, low) * - Stream lifecycle management (start, pause, resume, abort) * - Backpressure handling with configurable strategies * - React Suspense integration * - Server-side rendering support * - Comprehensive metrics and telemetry * * @module streaming * @version 1.0.0 * @author Harbor Framework Team * * @example * ```tsx * // Setup in your app * import { StreamProvider, StreamBoundary, StreamPriority } from '@/lib/streaming'; * * function App() { * return ( * * * * * * } * > * * * * * * * * ); * } * ``` */ /** * StreamProvider - Context provider for streaming configuration * @see {@link StreamProvider} */ export { StreamProvider, useStreamContext, useOptionalStreamContext, useStreamingAvailable, useIsSSR, useStreamMetrics, useStreamEvents, withStream, StreamErrorBoundary, isServerEnvironment, isStreamingSupported, type WithStreamProps, } from './StreamProvider'; /** * StreamBoundary - Component for defining streaming boundaries * @see {@link StreamBoundary} */ export { StreamBoundary, CriticalStreamBoundary, DeferredStreamBoundary, ConditionalStreamBoundary, DefaultPlaceholder, NonStreamingFallback, createBoundaryActivationScript, createBoundaryMarker, type ConditionalStreamBoundaryProps, } from './StreamBoundary'; /** * StreamingEngine - Core streaming engine implementation * @see {@link StreamingEngine} */ export { StreamingEngine, createStreamingEngine, createChunk, calculateChecksum, createReadableStream, createChunkTransformStream, } from './streaming-engine'; /** * Streaming hooks for component integration * @see {@link useStream} * @see {@link useStreamStatus} * @see {@link useStreamPriority} * @see {@link useDeferredStream} */ export { useStream, useMultipleStreams, useAwaitStream, useStreamStatus, useExtendedStreamStatus, useStreamPriority, useExtendedStreamPriority, useCriticalPriority, useDeferredPriority, useDeferredStream, useExtendedDeferredStream, useDeferUntilVisible, useDeferUntilIdle, useDeferUntilEvent, type UseStreamOptions, type UseMultipleStreamsResult, type UseStreamStatusOptions, type StatusDetails, type UseExtendedStreamStatusResult, type UseStreamPriorityOptions, type UseExtendedStreamPriorityResult, type UseExtendedDeferredStreamResult, } from './hooks'; /** * Server-side streaming utilities * @see {@link createStreamingMiddleware} * @see {@link createServerStreamContext} */ export { createStreamingMiddleware, createServerStreamContext, createStreamingHeaders, createEarlyHints, serializeStreamState, deserializeStreamState, createHydrationScript, StreamMarkers, wrapBoundaryContent, createServerChunk, createStreamingPipeline, createFlushSchedule, createReactStreamOptions, createShellHtml, generateNonce, DEFAULT_MIDDLEWARE_OPTIONS, STREAMING_HEADERS, type StreamingRequest, type StreamingResponse, type NextFunction, type StreamingMiddleware, type PreloadResource, type FlushScheduleEntry, type RenderToStreamOptions, type ShellOptions, } from './server'; /** * Type definitions for the streaming system */ export { StreamPriority, StreamState, BackpressureStrategy, StreamErrorCode, StreamEventType, DeferReason, type StreamConfig, type EngineConfig, type StreamChunk, type StreamBoundaryData, type QueueEntry, type StreamError, createStreamError, isRetryableError, type StreamMetrics, type BoundaryMetrics, type StreamEvent, type StreamEventHandler, type StreamEventPayload, type ChunkTransformer, type TransformContext, type StreamBoundaryProps, type StreamProviderProps, type StreamContextValue, type UseStreamResult, type UseStreamStatusResult, type UseStreamPriorityResult, type UseDeferredStreamOptions, type UseDeferredStreamResult, type ServerStreamContext, type StreamingMiddlewareOptions, type SerializedStreamState, type DeepPartial, isStreamError, isStreamChunk, PRIORITY_VALUES, DEFAULT_ENGINE_CONFIG, DEFAULT_METRICS, } from './types';