@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
13 lines (12 loc) • 671 B
TypeScript
import type * as DndKit from '@dnd-kit/dom';
import type { Engine, EngineHandlers, EngineProps } from './engineTypes.js';
/** Loads the engine once per page. Call it only in the browser. */
export declare function loadEngine(): Promise<typeof DndKit>;
/**
* Pointer activation: mouse and pen start as soon as the pointer moves 5px, so a click on
* an item stays a click; touch needs a 250ms press (5px of wobble allowed), so a swipe
* still scrolls the page.
*/
export declare const TOUCH_DELAY = 250;
export declare const POINTER_DISTANCE = 5;
export declare function createEngine(dndKit: typeof DndKit, handlers: EngineHandlers, engineProps?: EngineProps): Engine;