import { Bounds } from '../types'; export interface AxisLayout { id: string; position: "left" | "right"; offset: number; } export interface InteractionCallbacks { onZoom: (bounds: Bounds, axisId?: string) => void; onPan: (deltaX: number, deltaY: number, axisId?: string) => void; onBoxZoom: (rect: { x: number; y: number; width: number; height: number; } | null) => void; onCursorMove: (x: number, y: number) => void; onCursorLeave: () => void; onPointClick?: (pixelX: number, pixelY: number, ctrlKey: boolean, shiftKey: boolean) => void; onBoxSelect?: (rect: { x: number; y: number; width: number; height: number; } | null, additive: boolean) => void; onBoxSelectUpdate?: (pixelX: number, pixelY: number) => void; onBoxSelectStart?: (pixelX: number, pixelY: number) => void; /** Called when any drag operation starts (pan, box zoom, box select) */ onDragStart?: () => void; /** Called when any drag operation ends */ onDragEnd?: () => void; /** Called on double-tap (mobile reset zoom) */ onDoubleTap?: () => void; /** Called for all raw interaction events for plugin processing */ onInteraction?: (event: import('../plugins/types').InteractionEvent) => void; } export interface PlotAreaGetter { (): { x: number; y: number; width: number; height: number; }; } export interface BoundsGetter { (axisId?: string): Bounds; } export interface AxisLayoutGetter { (): AxisLayout[]; } export type InteractionMode = 'pan' | 'boxZoom' | 'select' | 'delta' | 'peak'; export declare class InteractionManager { private container; private callbacks; private getPlotArea; private getBounds; private getAxesLayout; private isDragging; private panningAxisId?; private isBoxSelecting; private isBoxZooming; private selectionStart; private lastMousePos; private mouseDownPos; private mode; private pinchStartDistance; private pinchStartBounds; private lastTapTime; private readonly doubleTapMs; private boundWheel; private boundMouseDown; private boundMouseMove; private boundMouseUp; private boundMouseLeave; private boundTouchStart; private boundTouchMove; private boundTouchEnd; constructor(container: HTMLElement, callbacks: InteractionCallbacks, getPlotArea: PlotAreaGetter, getBounds: BoundsGetter, getAxesLayout: AxisLayoutGetter); private attachListeners; private detachListeners; /** * Set the interaction mode * @deprecated Use setMode instead. **Removed in v4.0.** */ setPanMode(enabled: boolean): void; /** * Set the interaction mode: 'pan', 'boxZoom', or 'select' */ setMode(mode: InteractionMode): void; /** * Get the current interaction mode */ getMode(): InteractionMode; private handleWheel; private handleMouseDown; private handleMouseMove; private handleMouseUp; private handleMouseLeave; private handleTouchStart; private handleTouchMove; private handleTouchEnd; destroy(): void; }