/** * Shared, dependency-free protocol for server- and client-managed document * head elements. Keeping normalization and identity here prevents hydration * from making different decisions than the SSR collector. */ export declare const HEAD_PROVENANCE_ATTRIBUTE = "data-vf-head"; export declare const HEAD_LEGACY_MANAGED_ATTRIBUTE = "data-veryfront-managed"; export declare const HEAD_CONTENT_HASH_ATTRIBUTE = "data-vf-hash"; export declare const HEAD_REACT_MANAGED_ATTRIBUTE = "data-vf-react-head"; export declare const HEAD_REACT_OWNER_ATTRIBUTE = "data-vf-react-head-owner"; export declare const HEAD_ROUTE_MANAGED_ATTRIBUTE = "data-vf-route-head"; export declare const HEAD_SERVER_COMMIT_ATTRIBUTE = "data-vf-server-head-commit"; export declare const HEAD_SHELL_PROVENANCE_ATTRIBUTE = "data-vf-shell-head"; export declare const HEAD_SSR_PAYLOAD_ATTRIBUTE = "data-vf-ssr-head"; export declare const HEAD_MANAGER_RETIRE_SYMBOL: unique symbol; /** Request-level limits shared by SSR collection and client route handoff. */ export declare const MAX_MANAGED_HEAD_ENTRIES = 128; export declare const MAX_MANAGED_HEAD_BYTES: number; export declare const MAX_MANAGED_HEAD_PAYLOAD_BYTES: number; export type ManagedHeadContentMode = "text" | "html"; export type ManagedHeadAttribute = readonly [name: string, value: string]; export interface ManagedHeadDescriptor { readonly tagName: string; readonly attributes: readonly ManagedHeadAttribute[]; readonly content?: string; readonly contentMode: ManagedHeadContentMode; readonly signature: string; readonly singletonKey?: string; /** * Every stable identity alias for a script. Both `id` and `src` matter: * scripts intersecting on either alias represent the same executable slot. */ readonly scriptKeys: readonly string[]; } export interface ManagedHeadTransportEntry { readonly tagName: string; readonly attributes: readonly (readonly [string, string])[]; readonly content?: string; } export declare const BOOLEAN_HEAD_ATTRIBUTES: Set; export declare function isHeadFrameworkAttribute(name: string): boolean; export declare function isSingletonHeadMetaKey(key: string | undefined): boolean; export declare function isSingletonHeadLinkRel(rel: string | undefined): boolean; export declare function headMetaSingletonKeyFromRecord(meta: Readonly>): string | undefined; export declare function headLinkSingletonKeyFromRecord(link: Readonly>): string | undefined; export declare function normalizeManagedHeadString(value: string): string; export declare function readManagedHeadContent(props: Readonly>): { content?: string; isRawHTML: boolean; } | null; export declare function normalizeManagedHeadAttributes(tagName: string, props: Readonly>, ambientNonce?: string): readonly ManagedHeadAttribute[] | null; export declare function descriptorFromHeadProps(rawTagName: string, props: Readonly>, ambientNonce?: string): ManagedHeadDescriptor | null; /** * Normalizes a collector/frontmatter head record through the same bounded * protocol used for React props. `contentProperty` identifies inline * script/style text and is never emitted as an HTML attribute. */ export declare function descriptorFromManagedHeadRecord(rawTagName: string, record: Readonly>, options?: { readonly contentProperty?: string; readonly ambientNonce?: string; }): ManagedHeadDescriptor | null; export declare function scriptIdentityKeysFromRecord(script: Readonly>): readonly string[]; export declare function headScriptKeysIntersect(left: readonly string[], right: readonly string[]): boolean; /** * Page/layout aggregation contract shared with the SSR collector. * Singletons are last-wins in the first slot, repeatables preserve order, and * executable scripts are first-wins when any stable identity alias intersects. */ export declare function aggregateManagedHeadDescriptors(descriptors: readonly ManagedHeadDescriptor[]): ManagedHeadDescriptor[]; export declare function managedHeadDescriptorBytes(descriptor: ManagedHeadDescriptor): number; export declare function assertManagedHeadDescriptorBudget(descriptors: readonly ManagedHeadDescriptor[]): void; export declare function managedHeadDescriptorToTransportEntry(descriptor: ManagedHeadDescriptor): ManagedHeadTransportEntry; export declare function descriptorFromManagedHeadTransportEntry(entry: unknown, ambientNonce?: string): ManagedHeadDescriptor; export declare function serializeManagedHeadPayload(descriptors: readonly ManagedHeadDescriptor[]): string; export interface ManagedHeadPayloadInspection { readonly descriptors: ManagedHeadDescriptor[]; readonly entryCount: number; readonly descriptorBytes: number; readonly payloadBytes: number; } export declare function inspectManagedHeadPayload(payload: string, ambientNonce?: string): ManagedHeadPayloadInspection; export declare function deserializeManagedHeadPayload(payload: string, ambientNonce?: string): ManagedHeadDescriptor[]; export declare function escapeManagedHeadRawText(content: string, tagName: string): string; export declare function managedHeadContentHash(content: string): string; //# sourceMappingURL=managed-head-protocol.d.ts.map