/** * Queueing and replay of `data-eco-rerun` scripts after navigation. * @module */ export type PendingRerunScript = { parent: 'head' | 'body'; attributes: Array<[string, string]>; textContent: string; src: string | null; scriptId: string | null; }; /** * Collects rerun scripts from an incoming document. */ export declare function collectRerunScripts(document: Document, filter?: (script: HTMLScriptElement) => boolean): PendingRerunScript[]; /** * Returns whether a rerun script is an external ES module that needs cache busting. */ export declare function isExternalModuleRerunScript(script: PendingRerunScript): boolean; /** * Finds an existing rerun script in `root` by id or by src and inline content. */ export declare function findExistingRerunScript(root: ParentNode, script: PendingRerunScript): HTMLScriptElement | null; /** * Appends a nonce query parameter so module scripts re-execute after navigation. */ export declare function createRerunScriptUrl(src: string): string; /** * Replays queued rerun scripts after the incoming page body is in place. * * @remarks * Flushed elements keep `data-eco-rerun` so head cleanup does not treat them * as persistable inline scripts on the next navigation. */ export declare function flushPendingRerunScripts(scripts: readonly PendingRerunScript[]): void; /** @remarks Test-only reset for nonce sequencing. */ export declare function resetRerunNonceForTests(): void;