UNPKG

fluid-dnd

Version:

An agnostic drag and drop library to sort all kind of lists. With current support for vue 3 and svelte

45 lines (44 loc) 2.45 kB
import { Direction } from ".."; import { BeforeMargin, AfterMargin, BorderWidth, PaddingBefore, Before } from "../../../index"; export declare const getWindowScroll: () => { scrollX: number; scrollY: number; }; export declare const parseFloatEmpty: (value: string) => number; export declare const parseIntEmpty: (value: string | null) => number; export declare const getTransform: (element: Element) => { x: number; y: number; }; export declare const draggableIsOutside: (draggable: Element, droppable: Element) => boolean; export declare const hasIntersection: (element1: Element, element2: Element) => boolean; export declare const getValueFromProperty: (element: HTMLElement | Element | undefined | null, property: PaddingBefore | BorderWidth | BeforeMargin | AfterMargin | Before) => number; export declare const getScrollElement: (element: HTMLElement) => { scrollLeft: number; scrollTop: number; }; export declare const getPropByDirection: (direction: Direction) => { readonly beforeMargin: "marginTop" | "marginLeft"; readonly afterMargin: "marginBottom" | "marginRight"; readonly borderBeforeWidth: "borderTopWidth" | "borderLeftWidth"; readonly before: "left" | "top"; readonly after: "right" | "down"; readonly gap: "columnGap" | "rowGap"; readonly distance: "width" | "height"; readonly axis: "x" | "y"; readonly offset: "offsetX" | "offsetY"; readonly scroll: "scrollX" | "scrollY"; readonly scrollElement: "scrollLeft" | "scrollTop"; readonly page: "pageX" | "pageY"; readonly inner: "innerWidth" | "innerHeight"; readonly offsetElement: "offsetLeft" | "offsetTop"; readonly scrollDistance: "scrollWidth" | "scrollHeight"; readonly clientDistance: "clientWidth" | "clientHeight"; readonly paddingBefore: "paddingLeft" | "paddingTop"; readonly getRect: (element: Element) => DOMRect; }; export declare const getSiblings: (current: HTMLElement, parent: HTMLElement) => readonly [Element[], number, HTMLElement]; export declare const getGroupDroppables: (currentDroppable: HTMLElement, droppableGroup?: string) => Element[]; export declare const getParentDraggableChildren: (parent: HTMLElement) => Element[]; export declare const getSiblingsByParent: (current: HTMLElement, parent: HTMLElement) => readonly [Element[], number, HTMLElement]; export declare const getNearestFixedParentPosition: (element: Element, direction: Direction) => number;