import { ReactiveController, ReactiveControllerHost } from 'lit'; import { Store } from '../store/store'; import { AnnotatorState } from '../store/store.types'; type ControllerHost = ReactiveControllerHost & EventTarget; export declare const MIN_ZOOM = 1; export declare const MAX_ZOOM = 8; /** A point relative to the viewport centre, in CSS pixels. */ export interface CenterPoint { x: number; y: number; } /** * Zoom/pan via a CSS `transform: translate() scale()` applied (by the canvas) * to the shared wrapper, so DOM pins and the Konva canvas zoom together. * Adapted from `cloudimage-hotspot/src/zoom/`. * * The transform uses `transform-origin: center`, so cursor-anchored zoom keeps * the point under the cursor fixed via: * newPan = cursorC − (newZoom / oldZoom) · (cursorC − oldPan) * where `cursorC` is measured from the viewport centre. */ export declare class ZoomController implements ReactiveController { private host; private store; private viewportSize; /** True while the user holds Space (temporary pan mode). */ panMode: boolean; constructor(host: ControllerHost, store: Store); hostDisconnected(): void; private get vp(); get zoom(): number; get isZoomed(): boolean; setViewportSize(w: number, h: number): void; setPanMode(on: boolean): void; /** Set zoom anchored at a viewport-centre-relative point (default: centre). */ zoomTo(nextZoom: number, cursor?: CenterPoint): void; /** Mouse-wheel zoom step, anchored at the cursor. */ wheelZoom(deltaY: number, cursor: CenterPoint): void; zoomIn(): void; zoomOut(): void; /** Double-click toggles between fit (1×) and 2×, anchored at the cursor. */ toggleZoom(cursor?: CenterPoint): void; /** Reset to fit-to-screen (zoom 1, centred). */ fit(): void; /** Pan by a pixel delta (no-op at fit zoom). */ panBy(dx: number, dy: number): void; /** Keep pan within bounds so the media can't be dragged fully out of view. */ private clampPan; } export {}; //# sourceMappingURL=zoom.controller.d.ts.map