import type * as React from "react"; export interface LongPressOptions { /** Milliseconds a TOUCH must be held. Default 500. */ delay?: number; /** Pixels of travel that abandon a held touch. Default 8. */ slop?: number; /** Pixels a pressed MOUSE must travel. Default 10. */ threshold?: number; } /** Spread onto the element the press starts on. */ export interface LongPressHandlers { onPointerDown: (event: React.PointerEvent) => void; } /** * THE PRESS THAT MEANS MOVE, on a surface whose ordinary press means something * else — a sidebar row that opens, a card that expands. * * What separates the two is not one rule, because a finger and a mouse do not * agree on what deliberate looks like: * * - **touch/pen** — HOLD. A finger is already the scroll gesture, so movement * cannot be the signal; the finger must sit still long enough to say "I mean * to move this". Travel past `slop` before the delay elapses abandons the * press, so a scroll never picks a row up. * - **mouse** — MOVEMENT past `threshold`. A mouse scrolls with its wheel, so a * button held down and dragged is already unambiguous, and holding still is * not a gesture at all: people rest on the button while they read, and a * timer cannot tell that from intent. * * Only `onPointerDown` is handed back, and the rest of the gesture is watched on * the WINDOW. A surface like this always has its own `onPointerMove`/`onPointerUp` * to run, and a hook that returns those as props is asking every caller to * re-chain them by hand — miss the release and the press never ends, so the next * stray movement picks the row up long after the button came up. Nothing here is * the caller's to forget, and a release outside the element still ends the press. * * Only the primary button arms it: a right-press opens a context menu, and it * must not also pick the row up. * * Nothing is preventDefault-ed — the element keeps its own click, and a surface * whose press ALSO does something records that `onLongPress` ran and refuses the * click that follows. * * `usePointerDrag` is the other half of the pair. It CARRIES the drag — live * delta, drop position — and has no hold, so its surface gives up scrolling * (`touch-action: none`). This one only says the press means move, and leaves * the drag itself to the caller. */ export declare function useLongPress(onLongPress: () => void, options?: LongPressOptions): LongPressHandlers;