import type { NixTemplate } from "@deijose/nix-js"; export interface StreamBoundaryOptions { /** Fallback content shown while the promise resolves. */ fallback: NixTemplate; /** Promise that resolves to a NixTemplate. */ promise: Promise; /** Renders the resolved value to a NixTemplate. */ children: (value: T) => NixTemplate; } /** Per-request boundary registry. */ interface BoundaryContext { boundaries: Map; children: (value: unknown) => NixTemplate; }>; } /** * Gets the current per-request boundary context, if any. * Used by the streaming response to collect boundaries for later resolution. */ export declare function getCurrentBoundaryContext(): BoundaryContext | undefined; /** * Runs a function within a per-request boundary context. * Used by the SSR streaming pipeline to collect boundaries. */ export declare function withBoundaryContext(fn: () => T): T; /** * Builds the fallback HTML wrapper for a boundary ID. * The fallback content is wrapped in a `
` with the boundary ID so the * browser can find it and replace it when the resolved content arrives. * * (v2.1 — Fix #4: real Suspense streaming with `