import { Gesture } from "react-native-gesture-handler"; import { type SharedValue } from "react-native-reanimated"; import type { ChartEngineLayout } from "../core/useLiveChartEngine"; import type { ChartPadding } from "../draw/line"; import type { ReferenceLine } from "../types"; /** * Builds the per-line **drag** gesture for draggable Form-A reference lines: grab a * line near its value-Y and drag vertically to set a new value, with optional * `snap` + `bounds` clamp. Mirrors the order-ticket reticle in {@link useCrosshair} * (value↔Y via `computeValueAtY` / `computeScrubDotY`, frozen value re-projected * each frame) but per line, writing into the shared `dragValues` array the layout * and overlays read. * * The pan uses `manualActivation`: it grabs only when a touch starts within * {@link GRAB_SLOP} of a draggable line, then **owns** that touch — any drag past * {@link DRAG_ACTIVATE_PX} (in either axis) drags the line. A touch off every line * fails fast so the chart's other gestures (scrub / scroll) run everywhere else * (compose this ahead of them via `Gesture.Exclusive`). Crucially it no longer * falls through to scrub on a horizontal start, so a drag begun on a line always * wins the race rather than dropping a scrub crosshair (#163). * * Also fires the per-line drag callbacks: `onChange` (de-duped during drag), * `onCommit` (on release), and `onDragIn` / `onDragOut` (value crossing the visible * range or a `bounds`, from a drag or the axis rescaling — edge-detected each frame). */ export declare function useReferenceDrag(engine: ChartEngineLayout, padding: ChartPadding, lines: ReferenceLine[], dragValues: SharedValue, dragActive: SharedValue, enabled: boolean): { gesture: ReturnType; /** True when a touch at (x,y) would grab a draggable line — lets the scrub * gesture decline that press so it never drops a crosshair on a line (#163). */ hitTest: (x: number, y: number) => boolean; }; //# sourceMappingURL=useReferenceDrag.d.ts.map