/** Options for the long press gesture */ export interface UseLongPressOptions { /** Duration in ms before the press is considered "long". Default: `400` */ delay?: number; /** Cancel if the pointer moves beyond this distance in px. Default: `10` */ moveThreshold?: number; /** Callback on regular (short) click */ onClick?: () => void; } /** Event handlers to spread onto the target element */ export interface LongPressHandlers { onMouseDown: (e: React.MouseEvent) => void; onMouseUp: () => void; onMouseLeave: () => void; onTouchStart: (e: React.TouchEvent) => void; onTouchEnd: () => void; onTouchMove: (e: React.TouchEvent) => void; } /** * Returns event handlers that detect a long press gesture. * Spread the returned object onto the target element. * * @param {() => void} callback - Called when a long press is detected * @param {UseLongPressOptions} [options] - Gesture options * @returns {LongPressHandlers} Event handlers to spread onto the element * * @example * const longPress = useLongPress( * () => setContextMenu(true), * { delay: 600, onClick: () => navigate('/item') }, * ); * Hold for options */ export declare function useLongPress(callback: () => void, options?: UseLongPressOptions): LongPressHandlers;