@mitcsutt/kiln-dnd
Version:
Kiln drag and drop: sortable lists, boards, drop zones and grid layouts with one keyboard model and one announcer, rendered through kiln-ui
18 lines (17 loc) • 849 B
TypeScript
/*! @license
* Vendored from react-grid-layout 2.3.0 (src/core/collision.ts), MIT licence.
* Copyright (c) 2016 Samuel Reed. See ./LICENSE.
* https://github.com/react-grid-layout/react-grid-layout/tree/2.3.0/src/core
*/
import type { Layout, LayoutItem } from './types.js';
/**
* Check if two layout items collide (overlap).
*
* Two items collide if their bounding boxes overlap and they are
* not the same item.
*/
export declare function collides(l1: LayoutItem, l2: LayoutItem): boolean;
/** Find the first item in the layout that collides with the given item. */
export declare function getFirstCollision(layout: Layout, layoutItem: LayoutItem): LayoutItem | undefined;
/** Find all items in the layout that collide with the given item. */
export declare function getAllCollisions(layout: Layout, layoutItem: LayoutItem): LayoutItem[];