import type { ServerRenderContextValue } from "./server-render-context.js"; export interface HeadMeta { name?: string; property?: string; content?: string; [key: string]: string | undefined; } export interface HeadLink { rel?: string; href?: string; [key: string]: string | undefined; } interface HeadScript { /** Inline script content */ content?: string; /** Script src URL */ src?: string; /** Script type (default: text/javascript) */ type?: string; /** Additional attributes */ [key: string]: string | undefined; } export interface HeadStyle { content: string; [key: string]: string | undefined; } export interface CollectedHead { title?: string; description?: string; metas: HeadMeta[]; links: HeadLink[]; styles: Array; /** Blocking scripts - injected at top of before CSS */ scripts: HeadScript[]; } export declare const HEAD_COLLECTOR_SYMBOL: unique symbol; type HeadCollector = (data: Partial) => void; /** * Collects metadata into the current request context. * * The shared function identity is intentional: server bundles can evaluate this * module through more than one URL, and every copy must dispatch into the same * request-scoped storage. */ export declare const collectHead: HeadCollector; export declare function runWithHeadCollector(fn: (renderContext: ServerRenderContextValue) => T | Promise, options?: { nonce?: string; }): Promise<{ result: T; head: CollectedHead; }>; export declare function getHeadCollectorContext(): CollectedHead | null; /** * Return the nonce bound to the active server render. Browser builds use the * no-op async-context polyfill, so this never exposes a nonce outside SSR. */ export declare function getHeadCollectorNonce(): string | undefined; /** * Materialize only Head payloads whose server-only commit token appears in the * completed React HTML. Tokens and payloads are bound to `head`'s render * context, so ordinary SSR markup cannot manufacture trusted head entries. */ export declare function resolveCommittedHeadRegistrations(head: CollectedHead, commitTokens: readonly string[]): CollectedHead; export declare function hasCollectedHead(): boolean; export declare function resetHeadCollector(): void; export declare function flushHeadCollector(): CollectedHead; export {}; //# sourceMappingURL=head-collector.d.ts.map