/** * Returns how far to scroll in one frame when the pointer is close to the start or end edge of a scrollable area. * The speed grows as the pointer gets closer to, or goes past, the edge. * It works for both axes: pass `clientY` with the top and bottom edges, or `clientX` with the left and right ones. * @param {number} position The pointer position on the scroll axis. * @param {number} start The start edge of the area: top or left. * @param {number} end The end edge of the area: bottom or right. * @returns {number} The scroll delta in px: negative scrolls toward the start, positive toward the end, `0` doesn't scroll. */ export declare function getEdgeScrollDelta(position: number, start: number, end: number): number; /** * Returns the vertical bounds of the part of the page on screen, in client coordinates. * With pinch zoom, the visual viewport is smaller than the layout viewport that client coordinates refer to. * @param {Window} win The window of the dragged element. * @returns {{ top: number; bottom: number }} The top and bottom edges on screen. */ export declare function getVisibleViewportBounds(win: Window): { top: number; bottom: number; }; export interface DragPreview { element: HTMLElement; /** * Moves the preview so it keeps its offset from the pointer. * @param {number} clientX The horizontal pointer position. * @param {number} clientY The vertical pointer position. */ move: (clientX: number, clientY: number) => void; remove: () => void; } /** * Creates a copy of `source` that follows the pointer, in place of the drag image of HTML drag and drop. * The copy keeps the look of the source, but not its identity: ids, roles, `tabindex`, `aria-*` and `data-*` * attributes are removed, and it's `inert`, hidden from assistive technologies, and transparent to hit-testing. * @param {HTMLElement} source The element to copy, for example the drag handle. * @param {object} options The preview options. * @param {HTMLElement} options.container A positioned element to render the preview in. * @param {number} options.clientX The horizontal pointer position when the drag started. * @param {number} options.clientY The vertical pointer position when the drag started. * @param {string} options.className Space-separated classes to add to the preview. * @returns {DragPreview} The preview, already rendered at the pointer position. */ export declare function createDragPreview(source: HTMLElement, options: { container: HTMLElement; clientX: number; clientY: number; className?: string; }): DragPreview;