import { ItemDescriptor, Page, PageSkeleton } from "../pageModel";
import { ItemsRepository } from "../client/itemsRepository";
import { EditorConfiguration } from "../../config/types";
import { ComponentsProviderSettings } from "../services/contentService";
import { ParheliaSettings, Site } from "../../types";
import { LayoutMode } from "../client/editContext";
import type { ApplyRichTextCommandPayload, BridgeGeometrySnapshot, BridgeSelectionSnapshot, CaptureComponentSnapshotCommandPayload, ComponentSnapshotResultEventPayload, CaptureDomCommandPayload, CaptureDomResultEventPayload, DomUpdatedEventPayload, InteractionEventPayload, PreviewGapCommandPayload, QueryGeometryCommandPayload, ScrollByCommandPayload, SerializablePageStructure } from "../bridge/protocol";
export declare const DEVICE_CHANGE_EVENT = "parhelia:device-change";
export declare const CANVAS_REFRESH_COMPLETED_EVENT = "parhelia:canvas-refresh-completed";
export type DeviceChangeEventDetail = {
    zoom?: number;
};
export declare function useViewportChangeSignal(): void;
export type BridgeGeometryQuery = QueryGeometryCommandPayload & {
    /**
     * Identifies the overlay feature contributing these text ranges (e.g.
     * "comments", "suggestions"). The editing host only remembers the most recent
     * queryGeometry payload, so PageViewerFrame merges every source's ranges into a
     * single union keyed by `source` before querying. Without `source` the payload
     * is forwarded unchanged (used for refresh/zoom re-queries).
     */
    source?: string;
};
export type PageViewContext = {
    device: string;
    setDevice: React.Dispatch<React.SetStateAction<string>>;
    zoom: number;
    setZoom: React.Dispatch<React.SetStateAction<number>>;
    scroll: number;
    setScroll: React.Dispatch<React.SetStateAction<number>>;
    fullscreen: boolean;
    setFullscreen: React.Dispatch<React.SetStateAction<boolean>>;
    editorIframe: HTMLIFrameElement | null;
    setEditorIframe: React.Dispatch<React.SetStateAction<HTMLIFrameElement | null>>;
    deviceWidth?: number;
    deviceHeight?: number;
    setDeviceWidth: React.Dispatch<React.SetStateAction<number | undefined>>;
    setDeviceHeight: React.Dispatch<React.SetStateAction<number | undefined>>;
    lockHeight: boolean;
    setLockHeight: React.Dispatch<React.SetStateAction<boolean>>;
    rotate: boolean;
    setRotate: React.Dispatch<React.SetStateAction<boolean>>;
    page?: Page;
    pageItemDescriptor?: ItemDescriptor;
    setPageSkeleton: React.Dispatch<React.SetStateAction<PageSkeleton | undefined>>;
    invalidateInsertOptionsCache: () => void;
    viewport: {
        width: number;
        height: number;
    };
    site?: Site;
    editUrl?: string;
    previewUrl?: string;
    componentsProviderSettings?: ComponentsProviderSettings;
    bridgeReady: boolean;
    setBridgeReady: React.Dispatch<React.SetStateAction<boolean>>;
    iframeSupportsRefresh: boolean;
    setIframeSupportsRefresh: React.Dispatch<React.SetStateAction<boolean>>;
    bridgeStructure?: SerializablePageStructure;
    setBridgeStructure: React.Dispatch<React.SetStateAction<SerializablePageStructure | undefined>>;
    bridgeGeometry?: BridgeGeometrySnapshot;
    setBridgeGeometry: React.Dispatch<React.SetStateAction<BridgeGeometrySnapshot | undefined>>;
    requestBridgeGeometry?: (payload: BridgeGeometryQuery) => boolean;
    requestBridgeScrollBy?: (payload: ScrollByCommandPayload) => boolean;
    requestBridgePreviewGap?: (payload: PreviewGapCommandPayload) => boolean;
    requestBridgeCaptureSnapshot?: (payload: CaptureComponentSnapshotCommandPayload) => boolean;
    requestBridgeComponentSnapshot?: (payload: CaptureComponentSnapshotCommandPayload) => Promise<ComponentSnapshotResultEventPayload>;
    requestBridgeCancelPointerDrag?: () => boolean;
    scrollViaMinimapPoint?: (clientX: number, clientY: number) => boolean;
    requestBridgeRichTextCommand?: (payload: ApplyRichTextCommandPayload) => boolean;
    requestBridgeCaptureDom?: (payload: CaptureDomCommandPayload) => Promise<CaptureDomResultEventPayload>;
    bridgeDom?: DomUpdatedEventPayload;
    setBridgeDom: React.Dispatch<React.SetStateAction<DomUpdatedEventPayload | undefined>>;
    bridgeSelection?: BridgeSelectionSnapshot;
    setBridgeSelection: React.Dispatch<React.SetStateAction<BridgeSelectionSnapshot | undefined>>;
    bridgeInteraction?: InteractionEventPayload;
    setBridgeInteraction: React.Dispatch<React.SetStateAction<InteractionEventPayload | undefined>>;
};
export declare function usePageViewContext({ pageItemDescriptor, itemsRepository, configuration, parheliaSettings, layoutMode, }: {
    pageItemDescriptor?: ItemDescriptor;
    itemsRepository?: ItemsRepository;
    configuration?: EditorConfiguration;
    parheliaSettings?: ParheliaSettings;
    layoutMode?: LayoutMode;
}): PageViewContext;
