This commit is contained in:
2
node_modules/@dnd-kit/utilities/dist/adjustment.d.ts
generated
vendored
Normal file
2
node_modules/@dnd-kit/utilities/dist/adjustment.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export declare const add: <T extends Record<U, number>, U extends string>(object: T, ...adjustments: Partial<T>[]) => T;
|
||||
export declare const subtract: <T extends Record<U, number>, U extends string>(object: T, ...adjustments: Partial<T>[]) => T;
|
||||
5
node_modules/@dnd-kit/utilities/dist/coordinates/getEventCoordinates.d.ts
generated
vendored
Normal file
5
node_modules/@dnd-kit/utilities/dist/coordinates/getEventCoordinates.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import type { Coordinates } from './types';
|
||||
/**
|
||||
* Returns the normalized x and y coordinates for mouse and touch events.
|
||||
*/
|
||||
export declare function getEventCoordinates(event: Event): Coordinates | null;
|
||||
2
node_modules/@dnd-kit/utilities/dist/coordinates/index.d.ts
generated
vendored
Normal file
2
node_modules/@dnd-kit/utilities/dist/coordinates/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export type { Coordinates } from './types';
|
||||
export { getEventCoordinates } from './getEventCoordinates';
|
||||
4
node_modules/@dnd-kit/utilities/dist/coordinates/types.d.ts
generated
vendored
Normal file
4
node_modules/@dnd-kit/utilities/dist/coordinates/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
export declare type Coordinates = {
|
||||
x: number;
|
||||
y: number;
|
||||
};
|
||||
25
node_modules/@dnd-kit/utilities/dist/css.d.ts
generated
vendored
Normal file
25
node_modules/@dnd-kit/utilities/dist/css.d.ts
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
export declare type Transform = {
|
||||
x: number;
|
||||
y: number;
|
||||
scaleX: number;
|
||||
scaleY: number;
|
||||
};
|
||||
export interface Transition {
|
||||
property: string;
|
||||
easing: string;
|
||||
duration: number;
|
||||
}
|
||||
export declare const CSS: Readonly<{
|
||||
Translate: {
|
||||
toString(transform: Transform | null): string | undefined;
|
||||
};
|
||||
Scale: {
|
||||
toString(transform: Transform | null): string | undefined;
|
||||
};
|
||||
Transform: {
|
||||
toString(transform: Transform | null): string | undefined;
|
||||
};
|
||||
Transition: {
|
||||
toString({ property, duration, easing }: Transition): string;
|
||||
};
|
||||
}>;
|
||||
1
node_modules/@dnd-kit/utilities/dist/event/hasViewportRelativeCoordinates.d.ts
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/event/hasViewportRelativeCoordinates.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function hasViewportRelativeCoordinates(event: Event): event is Event & Pick<PointerEvent, 'clientX' | 'clientY'>;
|
||||
3
node_modules/@dnd-kit/utilities/dist/event/index.d.ts
generated
vendored
Normal file
3
node_modules/@dnd-kit/utilities/dist/event/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { hasViewportRelativeCoordinates } from './hasViewportRelativeCoordinates';
|
||||
export { isKeyboardEvent } from './isKeyboardEvent';
|
||||
export { isTouchEvent } from './isTouchEvent';
|
||||
1
node_modules/@dnd-kit/utilities/dist/event/isKeyboardEvent.d.ts
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/event/isKeyboardEvent.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function isKeyboardEvent(event: Event | undefined | null): event is KeyboardEvent;
|
||||
1
node_modules/@dnd-kit/utilities/dist/event/isTouchEvent.d.ts
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/event/isTouchEvent.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function isTouchEvent(event: Event | undefined | null): event is TouchEvent;
|
||||
1
node_modules/@dnd-kit/utilities/dist/execution-context/canUseDOM.d.ts
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/execution-context/canUseDOM.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare const canUseDOM: boolean;
|
||||
1
node_modules/@dnd-kit/utilities/dist/execution-context/getOwnerDocument.d.ts
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/execution-context/getOwnerDocument.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function getOwnerDocument(target: Event['target']): Document;
|
||||
1
node_modules/@dnd-kit/utilities/dist/execution-context/getWindow.d.ts
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/execution-context/getWindow.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function getWindow(target: Event['target']): typeof window;
|
||||
3
node_modules/@dnd-kit/utilities/dist/execution-context/index.d.ts
generated
vendored
Normal file
3
node_modules/@dnd-kit/utilities/dist/execution-context/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export { canUseDOM } from './canUseDOM';
|
||||
export { getOwnerDocument } from './getOwnerDocument';
|
||||
export { getWindow } from './getWindow';
|
||||
1
node_modules/@dnd-kit/utilities/dist/focus/findFirstFocusableNode.d.ts
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/focus/findFirstFocusableNode.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function findFirstFocusableNode(element: HTMLElement): HTMLElement | null;
|
||||
1
node_modules/@dnd-kit/utilities/dist/focus/index.d.ts
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/focus/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export { findFirstFocusableNode } from './findFirstFocusableNode';
|
||||
9
node_modules/@dnd-kit/utilities/dist/hooks/index.d.ts
generated
vendored
Normal file
9
node_modules/@dnd-kit/utilities/dist/hooks/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
export { useCombinedRefs } from './useCombinedRefs';
|
||||
export { useEvent } from './useEvent';
|
||||
export { useIsomorphicLayoutEffect } from './useIsomorphicLayoutEffect';
|
||||
export { useInterval } from './useInterval';
|
||||
export { useLatestValue } from './useLatestValue';
|
||||
export { useLazyMemo } from './useLazyMemo';
|
||||
export { useNodeRef } from './useNodeRef';
|
||||
export { usePrevious } from './usePrevious';
|
||||
export { useUniqueId } from './useUniqueId';
|
||||
1
node_modules/@dnd-kit/utilities/dist/hooks/useCombinedRefs.d.ts
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/hooks/useCombinedRefs.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function useCombinedRefs<T>(...refs: ((node: T) => void)[]): (node: T) => void;
|
||||
1
node_modules/@dnd-kit/utilities/dist/hooks/useEvent.d.ts
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/hooks/useEvent.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function useEvent<T extends Function>(handler: T | undefined): (...args: any) => any;
|
||||
1
node_modules/@dnd-kit/utilities/dist/hooks/useInterval.d.ts
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/hooks/useInterval.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function useInterval(): readonly [(listener: Function, duration: number) => void, () => void];
|
||||
6
node_modules/@dnd-kit/utilities/dist/hooks/useIsomorphicLayoutEffect.d.ts
generated
vendored
Normal file
6
node_modules/@dnd-kit/utilities/dist/hooks/useIsomorphicLayoutEffect.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
import { useLayoutEffect } from 'react';
|
||||
/**
|
||||
* A hook that resolves to useEffect on the server and useLayoutEffect on the client
|
||||
* @param callback {function} Callback function that is invoked when the dependencies of the hook change
|
||||
*/
|
||||
export declare const useIsomorphicLayoutEffect: typeof useLayoutEffect;
|
||||
2
node_modules/@dnd-kit/utilities/dist/hooks/useLatestValue.d.ts
generated
vendored
Normal file
2
node_modules/@dnd-kit/utilities/dist/hooks/useLatestValue.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import type { DependencyList } from 'react';
|
||||
export declare function useLatestValue<T extends any>(value: T, dependencies?: DependencyList): import("react").MutableRefObject<T>;
|
||||
1
node_modules/@dnd-kit/utilities/dist/hooks/useLazyMemo.d.ts
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/hooks/useLazyMemo.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function useLazyMemo<T>(callback: (prevValue: T | undefined) => T, dependencies: any[]): T;
|
||||
2
node_modules/@dnd-kit/utilities/dist/hooks/useNodeRef.d.ts
generated
vendored
Normal file
2
node_modules/@dnd-kit/utilities/dist/hooks/useNodeRef.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
/// <reference types="react" />
|
||||
export declare function useNodeRef(onChange?: (newElement: HTMLElement | null, previousElement: HTMLElement | null) => void): readonly [import("react").MutableRefObject<HTMLElement | null>, (element: HTMLElement | null) => void];
|
||||
1
node_modules/@dnd-kit/utilities/dist/hooks/usePrevious.d.ts
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/hooks/usePrevious.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function usePrevious<T>(value: T): T | undefined;
|
||||
1
node_modules/@dnd-kit/utilities/dist/hooks/useUniqueId.d.ts
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/hooks/useUniqueId.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function useUniqueId(prefix: string, value?: string): string;
|
||||
11
node_modules/@dnd-kit/utilities/dist/index.d.ts
generated
vendored
Normal file
11
node_modules/@dnd-kit/utilities/dist/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
export { useCombinedRefs, useEvent, useIsomorphicLayoutEffect, useInterval, useLatestValue, useLazyMemo, useNodeRef, usePrevious, useUniqueId, } from './hooks';
|
||||
export { add, subtract } from './adjustment';
|
||||
export type { Coordinates } from './coordinates';
|
||||
export { getEventCoordinates } from './coordinates';
|
||||
export { CSS } from './css';
|
||||
export type { Transform, Transition } from './css';
|
||||
export { hasViewportRelativeCoordinates, isKeyboardEvent, isTouchEvent, } from './event';
|
||||
export { canUseDOM, getOwnerDocument, getWindow } from './execution-context';
|
||||
export { findFirstFocusableNode } from './focus';
|
||||
export { isDocument, isHTMLElement, isNode, isSVGElement, isWindow, } from './type-guards';
|
||||
export type { Arguments, DeepRequired, FirstArgument, Without } from './types';
|
||||
8
node_modules/@dnd-kit/utilities/dist/index.js
generated
vendored
Normal file
8
node_modules/@dnd-kit/utilities/dist/index.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
|
||||
'use strict'
|
||||
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
module.exports = require('./utilities.cjs.production.min.js')
|
||||
} else {
|
||||
module.exports = require('./utilities.cjs.development.js')
|
||||
}
|
||||
5
node_modules/@dnd-kit/utilities/dist/type-guards/index.d.ts
generated
vendored
Normal file
5
node_modules/@dnd-kit/utilities/dist/type-guards/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
export { isDocument } from './isDocument';
|
||||
export { isHTMLElement } from './isHTMLElement';
|
||||
export { isNode } from './isNode';
|
||||
export { isSVGElement } from './isSVGElement';
|
||||
export { isWindow } from './isWindow';
|
||||
1
node_modules/@dnd-kit/utilities/dist/type-guards/isDocument.d.ts
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/type-guards/isDocument.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function isDocument(node: Node): node is Document;
|
||||
1
node_modules/@dnd-kit/utilities/dist/type-guards/isHTMLElement.d.ts
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/type-guards/isHTMLElement.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function isHTMLElement(node: Node | Window): node is HTMLElement;
|
||||
1
node_modules/@dnd-kit/utilities/dist/type-guards/isNode.d.ts
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/type-guards/isNode.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function isNode(node: Object): node is Node;
|
||||
1
node_modules/@dnd-kit/utilities/dist/type-guards/isSVGElement.d.ts
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/type-guards/isSVGElement.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function isSVGElement(node: Node): node is SVGElement;
|
||||
1
node_modules/@dnd-kit/utilities/dist/type-guards/isWindow.d.ts
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/type-guards/isWindow.d.ts
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare function isWindow(element: Object): element is typeof window;
|
||||
6
node_modules/@dnd-kit/utilities/dist/types.d.ts
generated
vendored
Normal file
6
node_modules/@dnd-kit/utilities/dist/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export declare type Arguments<T> = T extends (...args: infer U) => any ? U : never;
|
||||
export declare type DeepRequired<T> = {
|
||||
[K in keyof T]-?: Required<T[K]>;
|
||||
};
|
||||
export declare type FirstArgument<T> = T extends (firstArg: infer U, ...args: Array<any>) => any ? U : never;
|
||||
export declare type Without<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
|
||||
361
node_modules/@dnd-kit/utilities/dist/utilities.cjs.development.js
generated
vendored
Normal file
361
node_modules/@dnd-kit/utilities/dist/utilities.cjs.development.js
generated
vendored
Normal file
@@ -0,0 +1,361 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
var react = require('react');
|
||||
|
||||
function useCombinedRefs() {
|
||||
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
refs[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
return react.useMemo(() => node => {
|
||||
refs.forEach(ref => ref(node));
|
||||
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
refs);
|
||||
}
|
||||
|
||||
// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js
|
||||
const canUseDOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
|
||||
|
||||
function isWindow(element) {
|
||||
const elementString = Object.prototype.toString.call(element);
|
||||
return elementString === '[object Window]' || // In Electron context the Window object serializes to [object global]
|
||||
elementString === '[object global]';
|
||||
}
|
||||
|
||||
function isNode(node) {
|
||||
return 'nodeType' in node;
|
||||
}
|
||||
|
||||
function getWindow(target) {
|
||||
var _target$ownerDocument, _target$ownerDocument2;
|
||||
|
||||
if (!target) {
|
||||
return window;
|
||||
}
|
||||
|
||||
if (isWindow(target)) {
|
||||
return target;
|
||||
}
|
||||
|
||||
if (!isNode(target)) {
|
||||
return window;
|
||||
}
|
||||
|
||||
return (_target$ownerDocument = (_target$ownerDocument2 = target.ownerDocument) == null ? void 0 : _target$ownerDocument2.defaultView) != null ? _target$ownerDocument : window;
|
||||
}
|
||||
|
||||
function isDocument(node) {
|
||||
const {
|
||||
Document
|
||||
} = getWindow(node);
|
||||
return node instanceof Document;
|
||||
}
|
||||
|
||||
function isHTMLElement(node) {
|
||||
if (isWindow(node)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return node instanceof getWindow(node).HTMLElement;
|
||||
}
|
||||
|
||||
function isSVGElement(node) {
|
||||
return node instanceof getWindow(node).SVGElement;
|
||||
}
|
||||
|
||||
function getOwnerDocument(target) {
|
||||
if (!target) {
|
||||
return document;
|
||||
}
|
||||
|
||||
if (isWindow(target)) {
|
||||
return target.document;
|
||||
}
|
||||
|
||||
if (!isNode(target)) {
|
||||
return document;
|
||||
}
|
||||
|
||||
if (isDocument(target)) {
|
||||
return target;
|
||||
}
|
||||
|
||||
if (isHTMLElement(target) || isSVGElement(target)) {
|
||||
return target.ownerDocument;
|
||||
}
|
||||
|
||||
return document;
|
||||
}
|
||||
|
||||
/**
|
||||
* A hook that resolves to useEffect on the server and useLayoutEffect on the client
|
||||
* @param callback {function} Callback function that is invoked when the dependencies of the hook change
|
||||
*/
|
||||
|
||||
const useIsomorphicLayoutEffect = canUseDOM ? react.useLayoutEffect : react.useEffect;
|
||||
|
||||
function useEvent(handler) {
|
||||
const handlerRef = react.useRef(handler);
|
||||
useIsomorphicLayoutEffect(() => {
|
||||
handlerRef.current = handler;
|
||||
});
|
||||
return react.useCallback(function () {
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
return handlerRef.current == null ? void 0 : handlerRef.current(...args);
|
||||
}, []);
|
||||
}
|
||||
|
||||
function useInterval() {
|
||||
const intervalRef = react.useRef(null);
|
||||
const set = react.useCallback((listener, duration) => {
|
||||
intervalRef.current = setInterval(listener, duration);
|
||||
}, []);
|
||||
const clear = react.useCallback(() => {
|
||||
if (intervalRef.current !== null) {
|
||||
clearInterval(intervalRef.current);
|
||||
intervalRef.current = null;
|
||||
}
|
||||
}, []);
|
||||
return [set, clear];
|
||||
}
|
||||
|
||||
function useLatestValue(value, dependencies) {
|
||||
if (dependencies === void 0) {
|
||||
dependencies = [value];
|
||||
}
|
||||
|
||||
const valueRef = react.useRef(value);
|
||||
useIsomorphicLayoutEffect(() => {
|
||||
if (valueRef.current !== value) {
|
||||
valueRef.current = value;
|
||||
}
|
||||
}, dependencies);
|
||||
return valueRef;
|
||||
}
|
||||
|
||||
function useLazyMemo(callback, dependencies) {
|
||||
const valueRef = react.useRef();
|
||||
return react.useMemo(() => {
|
||||
const newValue = callback(valueRef.current);
|
||||
valueRef.current = newValue;
|
||||
return newValue;
|
||||
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
[...dependencies]);
|
||||
}
|
||||
|
||||
function useNodeRef(onChange) {
|
||||
const onChangeHandler = useEvent(onChange);
|
||||
const node = react.useRef(null);
|
||||
const setNodeRef = react.useCallback(element => {
|
||||
if (element !== node.current) {
|
||||
onChangeHandler == null ? void 0 : onChangeHandler(element, node.current);
|
||||
}
|
||||
|
||||
node.current = element;
|
||||
}, //eslint-disable-next-line
|
||||
[]);
|
||||
return [node, setNodeRef];
|
||||
}
|
||||
|
||||
function usePrevious(value) {
|
||||
const ref = react.useRef();
|
||||
react.useEffect(() => {
|
||||
ref.current = value;
|
||||
}, [value]);
|
||||
return ref.current;
|
||||
}
|
||||
|
||||
let ids = {};
|
||||
function useUniqueId(prefix, value) {
|
||||
return react.useMemo(() => {
|
||||
if (value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
const id = ids[prefix] == null ? 0 : ids[prefix] + 1;
|
||||
ids[prefix] = id;
|
||||
return prefix + "-" + id;
|
||||
}, [prefix, value]);
|
||||
}
|
||||
|
||||
function createAdjustmentFn(modifier) {
|
||||
return function (object) {
|
||||
for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||||
adjustments[_key - 1] = arguments[_key];
|
||||
}
|
||||
|
||||
return adjustments.reduce((accumulator, adjustment) => {
|
||||
const entries = Object.entries(adjustment);
|
||||
|
||||
for (const [key, valueAdjustment] of entries) {
|
||||
const value = accumulator[key];
|
||||
|
||||
if (value != null) {
|
||||
accumulator[key] = value + modifier * valueAdjustment;
|
||||
}
|
||||
}
|
||||
|
||||
return accumulator;
|
||||
}, { ...object
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
const add = /*#__PURE__*/createAdjustmentFn(1);
|
||||
const subtract = /*#__PURE__*/createAdjustmentFn(-1);
|
||||
|
||||
function hasViewportRelativeCoordinates(event) {
|
||||
return 'clientX' in event && 'clientY' in event;
|
||||
}
|
||||
|
||||
function isKeyboardEvent(event) {
|
||||
if (!event) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const {
|
||||
KeyboardEvent
|
||||
} = getWindow(event.target);
|
||||
return KeyboardEvent && event instanceof KeyboardEvent;
|
||||
}
|
||||
|
||||
function isTouchEvent(event) {
|
||||
if (!event) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const {
|
||||
TouchEvent
|
||||
} = getWindow(event.target);
|
||||
return TouchEvent && event instanceof TouchEvent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the normalized x and y coordinates for mouse and touch events.
|
||||
*/
|
||||
|
||||
function getEventCoordinates(event) {
|
||||
if (isTouchEvent(event)) {
|
||||
if (event.touches && event.touches.length) {
|
||||
const {
|
||||
clientX: x,
|
||||
clientY: y
|
||||
} = event.touches[0];
|
||||
return {
|
||||
x,
|
||||
y
|
||||
};
|
||||
} else if (event.changedTouches && event.changedTouches.length) {
|
||||
const {
|
||||
clientX: x,
|
||||
clientY: y
|
||||
} = event.changedTouches[0];
|
||||
return {
|
||||
x,
|
||||
y
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if (hasViewportRelativeCoordinates(event)) {
|
||||
return {
|
||||
x: event.clientX,
|
||||
y: event.clientY
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
const CSS = /*#__PURE__*/Object.freeze({
|
||||
Translate: {
|
||||
toString(transform) {
|
||||
if (!transform) {
|
||||
return;
|
||||
}
|
||||
|
||||
const {
|
||||
x,
|
||||
y
|
||||
} = transform;
|
||||
return "translate3d(" + (x ? Math.round(x) : 0) + "px, " + (y ? Math.round(y) : 0) + "px, 0)";
|
||||
}
|
||||
|
||||
},
|
||||
Scale: {
|
||||
toString(transform) {
|
||||
if (!transform) {
|
||||
return;
|
||||
}
|
||||
|
||||
const {
|
||||
scaleX,
|
||||
scaleY
|
||||
} = transform;
|
||||
return "scaleX(" + scaleX + ") scaleY(" + scaleY + ")";
|
||||
}
|
||||
|
||||
},
|
||||
Transform: {
|
||||
toString(transform) {
|
||||
if (!transform) {
|
||||
return;
|
||||
}
|
||||
|
||||
return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(' ');
|
||||
}
|
||||
|
||||
},
|
||||
Transition: {
|
||||
toString(_ref) {
|
||||
let {
|
||||
property,
|
||||
duration,
|
||||
easing
|
||||
} = _ref;
|
||||
return property + " " + duration + "ms " + easing;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
const SELECTOR = 'a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]';
|
||||
function findFirstFocusableNode(element) {
|
||||
if (element.matches(SELECTOR)) {
|
||||
return element;
|
||||
}
|
||||
|
||||
return element.querySelector(SELECTOR);
|
||||
}
|
||||
|
||||
exports.CSS = CSS;
|
||||
exports.add = add;
|
||||
exports.canUseDOM = canUseDOM;
|
||||
exports.findFirstFocusableNode = findFirstFocusableNode;
|
||||
exports.getEventCoordinates = getEventCoordinates;
|
||||
exports.getOwnerDocument = getOwnerDocument;
|
||||
exports.getWindow = getWindow;
|
||||
exports.hasViewportRelativeCoordinates = hasViewportRelativeCoordinates;
|
||||
exports.isDocument = isDocument;
|
||||
exports.isHTMLElement = isHTMLElement;
|
||||
exports.isKeyboardEvent = isKeyboardEvent;
|
||||
exports.isNode = isNode;
|
||||
exports.isSVGElement = isSVGElement;
|
||||
exports.isTouchEvent = isTouchEvent;
|
||||
exports.isWindow = isWindow;
|
||||
exports.subtract = subtract;
|
||||
exports.useCombinedRefs = useCombinedRefs;
|
||||
exports.useEvent = useEvent;
|
||||
exports.useInterval = useInterval;
|
||||
exports.useIsomorphicLayoutEffect = useIsomorphicLayoutEffect;
|
||||
exports.useLatestValue = useLatestValue;
|
||||
exports.useLazyMemo = useLazyMemo;
|
||||
exports.useNodeRef = useNodeRef;
|
||||
exports.usePrevious = usePrevious;
|
||||
exports.useUniqueId = useUniqueId;
|
||||
//# sourceMappingURL=utilities.cjs.development.js.map
|
||||
1
node_modules/@dnd-kit/utilities/dist/utilities.cjs.development.js.map
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/utilities.cjs.development.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
2
node_modules/@dnd-kit/utilities/dist/utilities.cjs.production.min.js
generated
vendored
Normal file
2
node_modules/@dnd-kit/utilities/dist/utilities.cjs.production.min.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");const t="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function n(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function r(e){return"nodeType"in e}function o(e){var t,o;return e?n(e)?e:r(e)&&null!=(t=null==(o=e.ownerDocument)?void 0:o.defaultView)?t:window:window}function u(e){const{Document:t}=o(e);return e instanceof t}function c(e){return!n(e)&&e instanceof o(e).HTMLElement}function s(e){return e instanceof o(e).SVGElement}const i=t?e.useLayoutEffect:e.useEffect;function a(t){const n=e.useRef(t);return i(()=>{n.current=t}),e.useCallback((function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return null==n.current?void 0:n.current(...t)}),[])}let l={};function f(e){return function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.reduce((t,n)=>{const r=Object.entries(n);for(const[n,o]of r){const r=t[n];null!=r&&(t[n]=r+e*o)}return t},{...t})}}const d=f(1),p=f(-1);function x(e){return"clientX"in e&&"clientY"in e}function m(e){if(!e)return!1;const{TouchEvent:t}=o(e.target);return t&&e instanceof t}const h=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[h.Translate.toString(e),h.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:r}=e;return t+" "+n+"ms "+r}}}),b="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";exports.CSS=h,exports.add=d,exports.canUseDOM=t,exports.findFirstFocusableNode=function(e){return e.matches(b)?e:e.querySelector(b)},exports.getEventCoordinates=function(e){if(m(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return x(e)?{x:e.clientX,y:e.clientY}:null},exports.getOwnerDocument=function(e){return e?n(e)?e.document:r(e)?u(e)?e:c(e)||s(e)?e.ownerDocument:document:document:document},exports.getWindow=o,exports.hasViewportRelativeCoordinates=x,exports.isDocument=u,exports.isHTMLElement=c,exports.isKeyboardEvent=function(e){if(!e)return!1;const{KeyboardEvent:t}=o(e.target);return t&&e instanceof t},exports.isNode=r,exports.isSVGElement=s,exports.isTouchEvent=m,exports.isWindow=n,exports.subtract=p,exports.useCombinedRefs=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.useMemo(()=>e=>{n.forEach(t=>t(e))},n)},exports.useEvent=a,exports.useInterval=function(){const t=e.useRef(null);return[e.useCallback((e,n)=>{t.current=setInterval(e,n)},[]),e.useCallback(()=>{null!==t.current&&(clearInterval(t.current),t.current=null)},[])]},exports.useIsomorphicLayoutEffect=i,exports.useLatestValue=function(t,n){void 0===n&&(n=[t]);const r=e.useRef(t);return i(()=>{r.current!==t&&(r.current=t)},n),r},exports.useLazyMemo=function(t,n){const r=e.useRef();return e.useMemo(()=>{const e=t(r.current);return r.current=e,e},[...n])},exports.useNodeRef=function(t){const n=a(t),r=e.useRef(null),o=e.useCallback(e=>{e!==r.current&&(null==n||n(e,r.current)),r.current=e},[]);return[r,o]},exports.usePrevious=function(t){const n=e.useRef();return e.useEffect(()=>{n.current=t},[t]),n.current},exports.useUniqueId=function(t,n){return e.useMemo(()=>{if(n)return n;const e=null==l[t]?0:l[t]+1;return l[t]=e,t+"-"+e},[t,n])};
|
||||
//# sourceMappingURL=utilities.cjs.production.min.js.map
|
||||
1
node_modules/@dnd-kit/utilities/dist/utilities.cjs.production.min.js.map
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/utilities.cjs.production.min.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
333
node_modules/@dnd-kit/utilities/dist/utilities.esm.js
generated
vendored
Normal file
333
node_modules/@dnd-kit/utilities/dist/utilities.esm.js
generated
vendored
Normal file
@@ -0,0 +1,333 @@
|
||||
import { useMemo, useLayoutEffect, useEffect, useRef, useCallback } from 'react';
|
||||
|
||||
function useCombinedRefs() {
|
||||
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
refs[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
return useMemo(() => node => {
|
||||
refs.forEach(ref => ref(node));
|
||||
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
refs);
|
||||
}
|
||||
|
||||
// https://github.com/facebook/react/blob/master/packages/shared/ExecutionEnvironment.js
|
||||
const canUseDOM = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
|
||||
|
||||
function isWindow(element) {
|
||||
const elementString = Object.prototype.toString.call(element);
|
||||
return elementString === '[object Window]' || // In Electron context the Window object serializes to [object global]
|
||||
elementString === '[object global]';
|
||||
}
|
||||
|
||||
function isNode(node) {
|
||||
return 'nodeType' in node;
|
||||
}
|
||||
|
||||
function getWindow(target) {
|
||||
var _target$ownerDocument, _target$ownerDocument2;
|
||||
|
||||
if (!target) {
|
||||
return window;
|
||||
}
|
||||
|
||||
if (isWindow(target)) {
|
||||
return target;
|
||||
}
|
||||
|
||||
if (!isNode(target)) {
|
||||
return window;
|
||||
}
|
||||
|
||||
return (_target$ownerDocument = (_target$ownerDocument2 = target.ownerDocument) == null ? void 0 : _target$ownerDocument2.defaultView) != null ? _target$ownerDocument : window;
|
||||
}
|
||||
|
||||
function isDocument(node) {
|
||||
const {
|
||||
Document
|
||||
} = getWindow(node);
|
||||
return node instanceof Document;
|
||||
}
|
||||
|
||||
function isHTMLElement(node) {
|
||||
if (isWindow(node)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return node instanceof getWindow(node).HTMLElement;
|
||||
}
|
||||
|
||||
function isSVGElement(node) {
|
||||
return node instanceof getWindow(node).SVGElement;
|
||||
}
|
||||
|
||||
function getOwnerDocument(target) {
|
||||
if (!target) {
|
||||
return document;
|
||||
}
|
||||
|
||||
if (isWindow(target)) {
|
||||
return target.document;
|
||||
}
|
||||
|
||||
if (!isNode(target)) {
|
||||
return document;
|
||||
}
|
||||
|
||||
if (isDocument(target)) {
|
||||
return target;
|
||||
}
|
||||
|
||||
if (isHTMLElement(target) || isSVGElement(target)) {
|
||||
return target.ownerDocument;
|
||||
}
|
||||
|
||||
return document;
|
||||
}
|
||||
|
||||
/**
|
||||
* A hook that resolves to useEffect on the server and useLayoutEffect on the client
|
||||
* @param callback {function} Callback function that is invoked when the dependencies of the hook change
|
||||
*/
|
||||
|
||||
const useIsomorphicLayoutEffect = canUseDOM ? useLayoutEffect : useEffect;
|
||||
|
||||
function useEvent(handler) {
|
||||
const handlerRef = useRef(handler);
|
||||
useIsomorphicLayoutEffect(() => {
|
||||
handlerRef.current = handler;
|
||||
});
|
||||
return useCallback(function () {
|
||||
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
||||
args[_key] = arguments[_key];
|
||||
}
|
||||
|
||||
return handlerRef.current == null ? void 0 : handlerRef.current(...args);
|
||||
}, []);
|
||||
}
|
||||
|
||||
function useInterval() {
|
||||
const intervalRef = useRef(null);
|
||||
const set = useCallback((listener, duration) => {
|
||||
intervalRef.current = setInterval(listener, duration);
|
||||
}, []);
|
||||
const clear = useCallback(() => {
|
||||
if (intervalRef.current !== null) {
|
||||
clearInterval(intervalRef.current);
|
||||
intervalRef.current = null;
|
||||
}
|
||||
}, []);
|
||||
return [set, clear];
|
||||
}
|
||||
|
||||
function useLatestValue(value, dependencies) {
|
||||
if (dependencies === void 0) {
|
||||
dependencies = [value];
|
||||
}
|
||||
|
||||
const valueRef = useRef(value);
|
||||
useIsomorphicLayoutEffect(() => {
|
||||
if (valueRef.current !== value) {
|
||||
valueRef.current = value;
|
||||
}
|
||||
}, dependencies);
|
||||
return valueRef;
|
||||
}
|
||||
|
||||
function useLazyMemo(callback, dependencies) {
|
||||
const valueRef = useRef();
|
||||
return useMemo(() => {
|
||||
const newValue = callback(valueRef.current);
|
||||
valueRef.current = newValue;
|
||||
return newValue;
|
||||
}, // eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
[...dependencies]);
|
||||
}
|
||||
|
||||
function useNodeRef(onChange) {
|
||||
const onChangeHandler = useEvent(onChange);
|
||||
const node = useRef(null);
|
||||
const setNodeRef = useCallback(element => {
|
||||
if (element !== node.current) {
|
||||
onChangeHandler == null ? void 0 : onChangeHandler(element, node.current);
|
||||
}
|
||||
|
||||
node.current = element;
|
||||
}, //eslint-disable-next-line
|
||||
[]);
|
||||
return [node, setNodeRef];
|
||||
}
|
||||
|
||||
function usePrevious(value) {
|
||||
const ref = useRef();
|
||||
useEffect(() => {
|
||||
ref.current = value;
|
||||
}, [value]);
|
||||
return ref.current;
|
||||
}
|
||||
|
||||
let ids = {};
|
||||
function useUniqueId(prefix, value) {
|
||||
return useMemo(() => {
|
||||
if (value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
const id = ids[prefix] == null ? 0 : ids[prefix] + 1;
|
||||
ids[prefix] = id;
|
||||
return prefix + "-" + id;
|
||||
}, [prefix, value]);
|
||||
}
|
||||
|
||||
function createAdjustmentFn(modifier) {
|
||||
return function (object) {
|
||||
for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||||
adjustments[_key - 1] = arguments[_key];
|
||||
}
|
||||
|
||||
return adjustments.reduce((accumulator, adjustment) => {
|
||||
const entries = Object.entries(adjustment);
|
||||
|
||||
for (const [key, valueAdjustment] of entries) {
|
||||
const value = accumulator[key];
|
||||
|
||||
if (value != null) {
|
||||
accumulator[key] = value + modifier * valueAdjustment;
|
||||
}
|
||||
}
|
||||
|
||||
return accumulator;
|
||||
}, { ...object
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
const add = /*#__PURE__*/createAdjustmentFn(1);
|
||||
const subtract = /*#__PURE__*/createAdjustmentFn(-1);
|
||||
|
||||
function hasViewportRelativeCoordinates(event) {
|
||||
return 'clientX' in event && 'clientY' in event;
|
||||
}
|
||||
|
||||
function isKeyboardEvent(event) {
|
||||
if (!event) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const {
|
||||
KeyboardEvent
|
||||
} = getWindow(event.target);
|
||||
return KeyboardEvent && event instanceof KeyboardEvent;
|
||||
}
|
||||
|
||||
function isTouchEvent(event) {
|
||||
if (!event) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const {
|
||||
TouchEvent
|
||||
} = getWindow(event.target);
|
||||
return TouchEvent && event instanceof TouchEvent;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the normalized x and y coordinates for mouse and touch events.
|
||||
*/
|
||||
|
||||
function getEventCoordinates(event) {
|
||||
if (isTouchEvent(event)) {
|
||||
if (event.touches && event.touches.length) {
|
||||
const {
|
||||
clientX: x,
|
||||
clientY: y
|
||||
} = event.touches[0];
|
||||
return {
|
||||
x,
|
||||
y
|
||||
};
|
||||
} else if (event.changedTouches && event.changedTouches.length) {
|
||||
const {
|
||||
clientX: x,
|
||||
clientY: y
|
||||
} = event.changedTouches[0];
|
||||
return {
|
||||
x,
|
||||
y
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
if (hasViewportRelativeCoordinates(event)) {
|
||||
return {
|
||||
x: event.clientX,
|
||||
y: event.clientY
|
||||
};
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
const CSS = /*#__PURE__*/Object.freeze({
|
||||
Translate: {
|
||||
toString(transform) {
|
||||
if (!transform) {
|
||||
return;
|
||||
}
|
||||
|
||||
const {
|
||||
x,
|
||||
y
|
||||
} = transform;
|
||||
return "translate3d(" + (x ? Math.round(x) : 0) + "px, " + (y ? Math.round(y) : 0) + "px, 0)";
|
||||
}
|
||||
|
||||
},
|
||||
Scale: {
|
||||
toString(transform) {
|
||||
if (!transform) {
|
||||
return;
|
||||
}
|
||||
|
||||
const {
|
||||
scaleX,
|
||||
scaleY
|
||||
} = transform;
|
||||
return "scaleX(" + scaleX + ") scaleY(" + scaleY + ")";
|
||||
}
|
||||
|
||||
},
|
||||
Transform: {
|
||||
toString(transform) {
|
||||
if (!transform) {
|
||||
return;
|
||||
}
|
||||
|
||||
return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(' ');
|
||||
}
|
||||
|
||||
},
|
||||
Transition: {
|
||||
toString(_ref) {
|
||||
let {
|
||||
property,
|
||||
duration,
|
||||
easing
|
||||
} = _ref;
|
||||
return property + " " + duration + "ms " + easing;
|
||||
}
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
const SELECTOR = 'a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]';
|
||||
function findFirstFocusableNode(element) {
|
||||
if (element.matches(SELECTOR)) {
|
||||
return element;
|
||||
}
|
||||
|
||||
return element.querySelector(SELECTOR);
|
||||
}
|
||||
|
||||
export { CSS, add, canUseDOM, findFirstFocusableNode, getEventCoordinates, getOwnerDocument, getWindow, hasViewportRelativeCoordinates, isDocument, isHTMLElement, isKeyboardEvent, isNode, isSVGElement, isTouchEvent, isWindow, subtract, useCombinedRefs, useEvent, useInterval, useIsomorphicLayoutEffect, useLatestValue, useLazyMemo, useNodeRef, usePrevious, useUniqueId };
|
||||
//# sourceMappingURL=utilities.esm.js.map
|
||||
1
node_modules/@dnd-kit/utilities/dist/utilities.esm.js.map
generated
vendored
Normal file
1
node_modules/@dnd-kit/utilities/dist/utilities.esm.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user