import { Active, DragEndEvent, DragOverEvent, DroppableContainer } from '@dnd-kit/core'; /** * Because of the interplay between `getNextCoordinates` and `collisionDetection` when handling keyboard interactions, * we store the current position in a global variable. * * More specifically, the `collisionDetection` function doesn't have access to the same context as the `getNextCoordinates` function, * meaning that the collision detection function doesn't know which droppable container is currently being "hovered" by key presses. */ export declare const WINDOW_PROPERTY_SORT_POSITION = "react-hammer_DndSort_position"; /** * Resolves the zone (if any) where the item is being dropped. * Given that "over" can be a zone or an item, we have to dig into the event to determine the correct zone. * @param event - The drag event (either DragEndEvent or DragOverEvent) * @returns The resolved drop zone, which may be null if no valid zone is found */ export declare function resolveDropZone(event: DragEndEvent | DragOverEvent): import('@dnd-kit/core').Over | DroppableContainer | null; /** * Calculates the validity of the drop event based on accepted types and custom validation. * @param params - An object containing the active drag item and the accepted types and validator function * @param params.active - The active drag item, which contains the current type and ID * @param params.acceptedTypes - An array of accepted types for the drop zone (optional) * @param params.validator - A custom validation function that takes the ID of the active item and returns a boolean * @returns boolean - true if valid, false otherwise */ export declare function calculateValidity({ active, acceptedTypes, validator, }: { active: Active | null; acceptedTypes?: string[]; validator?: (id: string | number) => boolean; }): boolean; /** * Calculates the validity of the drop event based on accepted types and custom validation. * @param params - An object containing the active drag item and the drop zone information * @param params.active - The active drag item, which contains the current type and ID * @param params.zone - The drop zone information, which may include accepted types and a custom validator function * @returns boolean - true if valid, false otherwise */ export declare function calculateZoneValidity({ active, zone, }: { active: Active | null; zone: { id: string | number; data: { current?: { acceptedTypes?: string[]; validator?: (id: string | number) => boolean; }; }; } | null; }): boolean; /** * Determines whether the drop event is valid based on the accepted types and custom validation function. * Internally resolves the drop zone. * @param event - The drag event (either DragEndEvent or DragOverEvent) * @returns boolean - true if valid, false otherwise */ export declare function calculateEventValidity(event: DragEndEvent | DragOverEvent): boolean;