import type { KanbanColumn, KanbanMove, KanbanPosition, WipLimitBehavior } from './kanban.types'; /** Where a card currently sits, or `null` if it is not on the board. */ export declare function locateCard(columns: KanbanColumn[], cardId: string): KanbanPosition | null; export declare function columnById(columns: KanbanColumn[], columnId: string): KanbanColumn | undefined; /** * Whether a move is allowed, and why not when it is refused. * * @description * Returning the reason rather than a bare boolean is what lets the board explain * itself: a drop that silently does nothing reads as a broken component, and the * announcement a screen-reader user hears has to say something more useful than * "no". */ export declare function checkMove(columns: KanbanColumn[], move: KanbanMove, behavior?: WipLimitBehavior): { allowed: true; } | { allowed: false; reason: 'locked-card' | 'locked-column' | 'wip-limit'; }; /** * Applies a move, returning new columns. * * @description * Pure, so the board stays controlled and the consumer owns persistence — and so * the trickiest part of a Kanban can be unit-tested without a DOM. * * **`to.index` is a slot in the destination column with the card already lifted * out**, not a position in the untouched list. Both drag paths compute it that * way — the pointer hit-test and the keyboard stepper each exclude the card in * flight — so the model matches them instead of quietly re-deriving it. Holding * two coordinate systems is how a card ends up one slot from where it was * released. */ export declare function applyMove(columns: KanbanColumn[], move: KanbanMove): KanbanColumn[]; /** True when a column is at or past its WIP limit. */ export declare function isOverLimit(column: KanbanColumn): boolean; export declare function isAtLimit(column: KanbanColumn): boolean; /** * Next position when the keyboard moves a held card. * * Left and right cross columns, up and down reorder. Crossing into a column * clamps to its length rather than refusing, so a card can always land * somewhere — a keyboard drag that silently does nothing is a dead end. */ export declare function stepPosition(columns: KanbanColumn[], current: KanbanPosition, direction: 'left' | 'right' | 'up' | 'down', /** The card being held is out of its column while in flight. */ heldFrom: KanbanPosition): KanbanPosition;