/** * Make an element draggable using pointer events. * * Uses Pointer Events (not HTML5 Drag & Drop) for reliable * cross-platform behavior including touch support. * * @module bquery/dnd */ import type { DragPosition, DraggableHandle, DraggableOptions } from './types'; /** * Returns the currently active drag state, if any. * Used internally by `droppable()` to detect drag interactions. * @internal */ export declare const getActiveDrag: () => { element: HTMLElement; position: DragPosition; } | undefined; /** * Makes an element draggable using pointer events. * * Features: * - Touch and mouse support via Pointer Events * - Axis locking (`x`, `y`, or `both`) * - Bounds constraint (parent, selector, or explicit rect) * - Optional drag handle * - Ghost/clone preview during drag * - Callbacks: `onDragStart`, `onDrag`, `onDragEnd` * * @param el - The element to make draggable * @param options - Configuration options * @returns A handle with `destroy()`, `disable()`, and `enable()` methods * * @example * ```ts * import { draggable } from '@bquery/bquery/dnd'; * * const handle = draggable(document.querySelector('#box'), { * axis: 'both', * bounds: 'parent', * onDragEnd: ({ position }) => { * console.log('Dropped at', position.x, position.y); * }, * }); * * // Later: * handle.destroy(); * ``` */ export declare const draggable: (el: HTMLElement, options?: DraggableOptions) => DraggableHandle; //# sourceMappingURL=draggable.d.ts.map