import type { CSSProperties, MouseEvent, ReactNode, WheelEvent } from 'react'; import type { EventModifierKeys } from '../context/KeyModifierContext.js'; type AdvanceOmit = T extends any ? Omit : never; export type BaseDetectBrushingOptions = AdvanceOmit; type Step = 'initial' | 'start' | 'end' | 'brushing'; export type BrushAxis = 'X' | 'Y' | 'XY'; export interface BrushTrackerData extends EventModifierKeys { step: Step; startX: number; endX: number; startY: number; endY: number; mouseButton: MouseButton; } type MouseButton = 'main' | 'secondary' | 'unknown'; export interface BrushCoordination { startX: number; endX: number; startY: number; endY: number; } export declare function useBrushDetectionOptions(): BaseDetectBrushingOptions; export declare function useBrushTracker(): BrushTrackerData; interface Position { x: number; y: number; } export type ClickOptions = MouseEvent & Position; export type OnClick = (element: ClickOptions) => void; export type { OnClick as OnDoubleClick }; export type ZoomOptions = Pick & Position & { invertScroll?: boolean; isBidirectionalZoom: boolean; }; export type OnZoom = (options: ZoomOptions) => void; export type OnBrush = (state: BrushTrackerData) => void; interface BrushTrackerProps { children: ReactNode; className?: string; style?: CSSProperties; onBrushEnd?: OnBrush; onBrush?: OnBrush; onZoom?: OnZoom; onDoubleClick?: OnClick; onClick?: OnClick; noPropagation?: boolean; brushDetectionOptions?: BaseDetectBrushingOptions; clickTriggerMode?: 'native' | 'debounced'; } export declare function BrushTracker(options: BrushTrackerProps): import("react/jsx-runtime").JSX.Element; interface DetectBrushingResult extends BrushCoordination { type: BrushAxis; scaleX: number; scaleY: number; directionX: number; directionY: number; xThreshold: number; yThreshold: number; } interface DetectBrushingThreshold { /** Width in pixels */ width: number; /** Height in pixels */ height: number; /** * Threshold as a percentage of width and height (value between 0 and 1). * @default 0.02 */ threshold?: number; thresholdFormat: 'relative'; } interface DetectBrushingThresholdSize { /** Width in pixels */ width: number; /** Height in pixels */ height: number; /** * Threshold size in pixels. * @default 80 */ thresholdSize?: number; thresholdFormat: 'fixed'; } type BrushDetectionThresholdAxis = 'both' | 'x' | 'y'; type DetectBrushingOptions = { thresholdAxis?: BrushDetectionThresholdAxis; } & (DetectBrushingThreshold | DetectBrushingThresholdSize); export declare function detectBrushing(coordination: BrushCoordination, options: DetectBrushingOptions): DetectBrushingResult; //# sourceMappingURL=BrushTracker.d.ts.map