import { PageViewContext } from "./pageViewContext";
import type { BridgeGeometrySnapshot } from "../bridge/protocol";
import type { Page } from "../pageModel";
export declare const BRIDGE_DOM_UPDATED_EVENT = "parhelia:bridge-dom-updated";
type MiniMapFrameSlot = "primary" | "secondary";
export declare function getMiniMapFrameRenderOrder(): MiniMapFrameSlot[];
export declare function patchMiniMapFrameDocument(iframe: HTMLIFrameElement, html: string): boolean;
export declare function MiniMap({ compareView, scroll, mainViewIframeRef, pageViewContext, }: {
    compareView: boolean;
    scroll: number;
    mainViewIframeRef: React.RefObject<HTMLIFrameElement | null>;
    pageViewContext: PageViewContext;
}): import("react").JSX.Element | null;
export type BridgeMinimapMetrics = {
    viewportWidth: number;
    viewportHeight: number;
    documentHeight: number;
    scrollTop: number;
    scrollScale: number;
};
/**
 * Reads the current scroll metrics straight out of the host document when the
 * iframe is same-origin. Returns null for cross-origin hosts (or before the
 * frame is ready); callers then fall back to the bridge snapshot, which can
 * lag while refreshes are in flight.
 */
export declare function getLiveMainFrameMetrics(iframe: HTMLIFrameElement | null | undefined): {
    scrollHeight: number;
    viewportHeight: number;
    scrollTop: number;
} | null;
export declare function getBridgeMinimapMetrics(snapshot: PageViewContext["bridgeDom"], fallbackViewport: PageViewContext["viewport"], scrollOverride?: number, geometry?: BridgeGeometrySnapshot): BridgeMinimapMetrics | null;
export declare function getMinimapViewportHighlight(metrics: BridgeMinimapMetrics, scale: number): {
    top: number;
    height: number;
};
export type MiniMapSelectionRect = {
    x: number;
    y: number;
    width: number;
    height: number;
};
export type MiniMapSelectionBounds = {
    width?: number;
    height?: number;
};
export declare function getMiniMapSelectionHighlightRect(rect: MiniMapSelectionRect, bounds?: MiniMapSelectionBounds): {
    x: number;
    y: number;
    width: number;
    height: number;
};
export declare function getMiniMapSelectionRects(selection: readonly string[] | undefined, page: Page | undefined, geometry: BridgeGeometrySnapshot | undefined, scale: number): MiniMapSelectionRect[];
export declare function createBridgeMinimapHtml(html: string, geometry: BridgeGeometrySnapshot | undefined, viewportWidth: number | undefined): string;
export {};
