import { onDrag } from "@liqvid/utils/interaction"; type Move = Parameters[0]; type Down = Parameters[1]; type Up = Parameters[2]; /** * Helper for implementing drag functionality, abstracting over mouse vs touch events. * @returns An event listener which should be added to both `mousedown` and `touchstart` events. */ export declare function dragHelper(move: Move, /** Callback for when dragging begins (pointer is touched). */ down?: ( /** The underlying `mousedown` or `touchstart` event */ e: MouseEvent | React.MouseEvent | React.TouchEvent | TouchEvent, /** Information about the pointer location */ hit: { /** Horizontal coordinate of pointer */ x: number; /** Vertical coordinate of pointer */ y: number; }, /** The upHandler used internally by this method */ upHandler: (e: MouseEvent | TouchEvent) => void, /** The moveHandler used internally by this method */ moveHandler: (e: MouseEvent | TouchEvent) => void) => void, /** Callback for when dragging ends (pointer is lifted). */ up?: Up): (e: MouseEvent | React.MouseEvent | React.TouchEvent | TouchEvent) => void; /** * Helper for implementing drag functionality, abstracting over mouse vs touch events. * @param innerRef Any `ref` that you want attached to the element, since this method attaches its own `ref` attribute. This is a hack around https://github.com/facebook/react/issues/2043. * @returns An object of event handlers which should be added to a React element with {...} */ export declare function dragHelperReact(move: Move, down?: Down, up?: Up, innerRef?: React.Ref): { "data-affords": string; onMouseDown: (e: MouseEvent | TouchEvent | import("react").MouseEvent | import("react").TouchEvent) => void; ref: (ref: T) => void; onTouchStart?: undefined; } | { "data-affords": string; onMouseDown: (e: MouseEvent | TouchEvent | import("react").MouseEvent | import("react").TouchEvent) => void; onTouchStart: (e: MouseEvent | TouchEvent | import("react").MouseEvent | import("react").TouchEvent) => void; ref?: undefined; }; export {};