import { i as LoadingNotHandled, o as MissingServices, r as Effective, s as REC, t as QueryCache, u as VolatileNotHandled } from "./query-cache-sfUY26Qc.mjs"; import { ReactNode } from "react"; import * as ManagedRuntime from "effect/ManagedRuntime"; import * as Layer from "effect/Layer"; import { RenderToReadableStreamOptions } from "react-dom/server"; //#region src/infrastructure/server/render-to-stream.d.ts /** Options for {@link renderToStream}: `mount`'s + `react-dom/server`'s. */ interface RenderToStreamOptions extends RenderToReadableStreamOptions { /** Discharges the tree's loading obligation, exactly like the client `mount`. */ readonly loading?: ReactNode; /** * Wrap the mounted app in a document shell (``/`
`/``). The * state script is appended after everything, so the shell needs no slot for it. */ readonly shell?: (app: ReactNode) => ReactNode; } /** * Render a root REC to an HTML `ReadableStream` with the settled state embedded — * the server half of effract's hydration story. Mirrors `mount`'s signature and * compile-time checks: a missing service or an undischarged loading obligation is * a type error here too (pass `{ loading }` or put a `.suspense` in the tree — * during streaming SSR a pending query really does stream its fallback first). * * The returned stream is complete (`allReady` has resolved): every query has * settled, so the embedded state is the state the HTML was rendered from. A * `Layer` source builds a fresh runtime for the render and disposes it before * returning — per-request isolation by default, exactly like the RSC `mount`. * Pass a pre-built `ManagedRuntime` to share or pre-seed one (mutate an atom, * run an effect) — you own its lifecycle. */ declare function renderToStream