import type { AnimationInterface } from "../../animation/Drivers/AnimationDriver.js"; import type { FramerEvent } from "../../events/FramerEvent.js"; import type { ConstraintPercentage } from "../../render/types/Constraints.js"; import type { Point } from "../../render/types/Point.js"; import type { WithMouseWheelHandler, WithPanHandlers } from "./WithEvents.js"; import React from "react"; import { Animatable } from "../../animation/Animatable/Animatable.js"; import { InertialScrollAnimator } from "../../animation/Animators/InertialScrollAnimator.js"; import { MainLoopAnimationDriver } from "../../animation/Drivers/MainLoopDriver.js"; import { Rect } from "../../render/types/Rect.js"; export declare const DraggingContext: React.Context<{ dragging: boolean; }>; /** * @internal */ export type Axis = "x" | "y"; export type Handler = () => void; export type DragHandler = (draggable: Draggable) => void; export type DragEventHandler = (event: FramerEvent, draggable: Draggable) => void; /** * @internal */ export type ScrollAnimation = MainLoopAnimationDriver; export interface DragEvents { onMove: (point: Point, draggable: Draggable) => void; /** * @internal */ onDragDirectionLockStart: (axis: Axis, draggable: Draggable) => void; onDragAnimationStart: (animation: { x: AnimationInterface; y: AnimationInterface; }, draggable: Draggable) => void; onDragAnimationEnd: (animation: { x: AnimationInterface; y: AnimationInterface; }, draggable: Draggable) => void; onDragSessionStart: DragEventHandler; onDragSessionMove: DragEventHandler; onDragSessionEnd: DragEventHandler; onDragStart: DragEventHandler; onDragWillMove: DragEventHandler; onDragDidMove: DragEventHandler; onDragEnd: DragEventHandler; } export interface DraggableSpecificProps extends Partial> { momentum: boolean; momentumOptions: { friction: number; tolerance: number; }; momentumVelocityMultiplier: number; speedX: number; speedY: number; bounce: boolean; bounceOptions: { friction: number; tension: number; tolerance: number; }; directionLock: boolean; directionLockThreshold: { x: number; y: number; }; overdrag: boolean; overdragScale: number; pixelAlign: boolean; velocityTimeout: number; velocityScale: number; horizontal: boolean; vertical: boolean; constraints: Partial; mouseWheel: boolean; } export interface DraggableProps extends DraggableSpecificProps { enabled: boolean; } export interface WithDraggingComponentTypeConstraints extends WithPanHandlers, WithMouseWheelHandler { left: number | Animatable | null; top: number | Animatable | null; width: number | ConstraintPercentage | Animatable; height: number | ConstraintPercentage | Animatable; } export declare function WithDragging>(Component: React.ComponentType>>): React.ComponentClass>>; //# sourceMappingURL=WithDragging.d.ts.map