declare global { /** * Utility to implement dragging UI elements such as draggable elements, resize bars, etc. */ interface DragOptions { start_distance?: number; onStart?(context: DragContext): void; onMove?(context: DragContext): void; onEnd?(context: DragContext): void; } interface DragContext { start_event: PointerEvent | MouseEvent; event: PointerEvent | null; delta: { x: number; y: number; }; distance: number; } /** * Initialize a drag helper once a pointer-down event has been fired * IMPORTANT: To make it work correctly with stylus, ensure "touch-action" is set to "none" on the target element * @param e1 Initial pointer-down event * @param options Drag options */ function dragHelper(e1: PointerEvent | MouseEvent, options: DragOptions): void; } export {};