export declare const ACTIVE_FRAME_SCROLL_SURFACE_SELECTOR = "[data-pygmalion-frame-scroll-surface=\"true\"]"; export type FrameScrollSource = 'frame' | 'frame-element' | 'embedded-document' | 'embedded-element'; export interface FrameScrollTargetOption { id: string; label: string; source: FrameScrollSource; /** Omitted only for the application document's root viewport. */ selector: string | null; } export interface FrameScrollMetrics { available: boolean; source: FrameScrollSource | null; targetId: string | null; targetLabel: string | null; selector: string | null; targets: readonly FrameScrollTargetOption[]; left: number; top: number; maxLeft: number; maxTop: number; clientWidth: number; clientHeight: number; scrollWidth: number; scrollHeight: number; } export declare const EMPTY_FRAME_SCROLL_METRICS: Readonly; export interface ResolvedFrameScrollTarget extends FrameScrollTargetOption { element: Element; } /** Produces a selector that the capture document can replay without editor ids. */ export declare function frameScrollReplaySelector(element: Element, root: ParentNode): string | null; /** Resolves a chosen viewport, or the mounted surface with the most overflow. */ export declare function resolveActiveFrameScrollTarget(document: Document, targetId?: string): ResolvedFrameScrollTarget | null; export declare function readActiveFrameScrollMetrics(document: Document, targetId?: string): FrameScrollMetrics; export declare function frameScrollMetricsEqual(left: Readonly, right: Readonly): boolean; /** Moves one mounted scroll surface immediately and returns its resulting metrics. */ export declare function scrollActiveFrameTo(document: Document, position: { left?: number; top?: number; }, targetId?: string): FrameScrollMetrics; /** Observes the selected root or nested scroll surface across live remounts. */ export declare function observeActiveFrameScroll(document: Document, onChange: (metrics: FrameScrollMetrics) => void, targetId?: string): () => void;