import type { BoardDropLane, BoardDropTarget } from "./boardMove.ts"; export type BoardDragOrigin = { fromIndex: number; fromLaneKey: string; itemKey: string; }; export type BoardDragState = BoardDragOrigin & { /** * Where the indicator is drawn, in pixels from the top of the * target lane's list box. `null` while the pointer is over no * lane the snapshot knows about. */ indicatorOffset: number | null; target: BoardDropTarget | null; }; type LaneSnapshot = BoardDropLane & { gap: number; listTop: number; }; /** * Where the line goes for a given insertion index — the midpoint of * the gap the card would be dropped into, in the list's own * coordinates. * * Split out and exported because it is the one piece of this file * that is pure arithmetic over the snapshot, and the three cases * (before everything, between two, after everything) are exactly * where an off-by-one lives. */ export declare const getIndicatorOffset: (lane: LaneSnapshot, index: number) => number; export declare const useBoardDrag: ({ itemSelector, onDrop, }: { /** * How a registered list's draggable children are found, so a * consumer that is not a board can reuse this geometry instead * of forking it. `ReorderList` passes `[data-reorder-item]` and * registers a single lane; the default is the board's own * marker, so `Board` reads exactly as it did before this * parameter existed. * * It is a `data-` attribute on both sides rather than a class, * for the reason `BoardCard` already gives: a class is a style * and a consumer's tooling may rename it, and this is a * contract with a hit test. */ itemSelector?: string; onDrop: (origin: BoardDragOrigin, target: BoardDropTarget) => void; }) => { drag: BoardDragState | null; registerLane: (laneKey: string) => (element: HTMLElement | null) => void; startDrag: (pointerEvent: { clientX: number; clientY: number; currentTarget: EventTarget & Element; pointerId: number; }, origin: BoardDragOrigin) => void; }; export {}; //# sourceMappingURL=useBoardDrag.d.ts.map