UNPKG

fluid-dnd

Version:

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

67 lines (66 loc) 4.06 kB
import { Direction } from '..'; import { BeforeMargin, AfterMargin, BorderWidth, PaddingBefore, Before, Translate, Coordinate, ElementPosition, ElementScroll, WindowScroll } 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 draggableIsCompleteOutside: (draggable: Element, droppable: 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 getRect: (element: Element) => DOMRect; export declare const getDistanceValue: (direction: Direction, translation: Translate) => readonly [number, "width" | "height"]; export declare const getAxisValue: (direction: Direction, coordinate: Coordinate) => number; export declare const getBorderBeforeWidthValue: (direction: Direction, element: Element) => number; export declare const getBeforeMarginValue: (direction: Direction, element: Element | null) => number; export declare const getBeforeMargin: (direction: Direction, element: Element | null) => number; export declare const getAfterMargin: (direction: Direction, element: Element | null) => number; export declare const getBefore: (direction: Direction, elementPosition: ElementPosition) => number; export declare const getScrollElementValue: (direction: Direction, element: ElementScroll) => readonly [number, "scrollLeft" | "scrollTop"]; export declare const getScrollValue: (direction: Direction, elementScroll: WindowScroll) => number; export declare const getInnerDistance: (direction: Direction, innerElement: { innerWidth: number; innerHeight: number; }) => number; export declare const getPageValue: (direction: Direction, event: { pageX: number; pageY: number; }) => number; export declare const getOffsetValue: (direction: Direction, event: { offsetX: number; offsetY: number; }) => number; export declare const getPropByDirection: (direction: Direction) => { readonly beforeMargin: "marginTop" | "marginLeft"; readonly afterMargin: "marginBottom" | "marginRight"; readonly borderBeforeWidth: "borderTopWidth" | "borderLeftWidth"; readonly before: "left" | "top"; 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 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 getNearestParentPositionWithTranslate: (element: Element, direction: Direction) => number; export declare const isSameNode: (element1: Element | null | undefined, element2: Element | null) => boolean | undefined; export declare const hasTransform: (element: HTMLElement | null) => boolean | null;