import type { IncomingMessage } from 'http';
export declare const PREVIEW_BRIDGE_SCRIPT_ID = "rivet-preview-bridge";
export declare const PREVIEW_BRIDGE_CHANNEL = "rivet-preview-bridge";
type PreviewBridgeInjectionInput = {
    method?: string;
    accept?: string | string[];
    contentType?: string | string[];
};
type PreviewBridgeInjectionOptions = {
    expectedParentOrigin?: string;
    scriptNonce?: string;
};
export declare const createPreviewBridgeScript: (options?: PreviewBridgeInjectionOptions) => string;
type PreviewBridgeCspOptions = {
    scriptNonce: string;
};
export declare const allowPreviewBridgeNonceInCsp: (csp: string, { scriptNonce }: PreviewBridgeCspOptions) => string;
/** Decides whether a proxied response should receive the isolated-preview bridge. */
export declare const shouldInjectPreviewBridge: ({ method, accept, contentType, }: PreviewBridgeInjectionInput) => boolean;
/** Adds the isolated-preview bridge to a proxied HTML document. */
export declare const injectPreviewBridge: (html: string, options?: PreviewBridgeInjectionOptions) => string;
export declare const isHtmlDocumentRequest: (req: IncomingMessage) => boolean;
export {};
//# sourceMappingURL=preview-bridge.d.ts.map