import { type RefObject } from 'react'; import type { BoardTicket } from './types'; /** Attribute the lane's cards carry so the anchor can find them again. */ export declare const TICKET_ID_ATTRIBUTE = "data-ticket-id"; /** * Keeps a scrolled lane visually still when its list changes above the viewport. * * Browsers do this themselves — it is called scroll anchoring — but the lane turns * theirs off (`overflow-anchor:none`), because leaving both on double-corrects * every insertion. So a ticket arriving from a live update is inserted above the * viewport with nothing to compensate, and the whole list slides down by a card. * * NOTE: the original reason for taking this over by hand was that Chrome skips * anchor candidates carrying a `transform`, and dnd-kit transformed every card in * the lane during a drag. Nothing transforms cards any more, so the browser's own * anchoring may well be enough now — worth testing against live updates before * deleting this and the `overflow-anchor:none` that goes with it. * * The fix is one measurement: whichever card sits at the top of the viewport, * note where it is, and after the list changes put the viewport back the same * distance from it. * * Deliberately inert at the very top of a lane (`scrollTop === 0`), matching what * browsers do — there a new ticket is meant to be seen, not scrolled away. */ export declare function useLaneScrollAnchor(scrollRef: RefObject, tickets: readonly BoardTicket[]): void; //# sourceMappingURL=use-lane-scroll-anchor.d.ts.map