planning
All checks were successful
Publish To Prod / deploy_and_publish (push) Successful in 35s

This commit is contained in:
2024-10-14 09:15:30 +02:00
parent bcba00a730
commit 6e64e138e2
21059 changed files with 2317811 additions and 1 deletions

8
node_modules/@dnd-kit/core/dist/hooks/index.d.ts generated vendored Normal file
View File

@@ -0,0 +1,8 @@
export { useDraggable } from './useDraggable';
export type { DraggableAttributes, DraggableSyntheticListeners, UseDraggableArguments, } from './useDraggable';
export { useDndContext } from './useDndContext';
export type { UseDndContextReturnValue } from './useDndContext';
export { useDroppable } from './useDroppable';
export type { UseDroppableArguments } from './useDroppable';
export { AutoScrollActivator, MeasuringStrategy, MeasuringFrequency, TraversalOrder, } from './utilities';
export type { AutoScrollOptions, DroppableMeasuring } from './utilities';

View File

@@ -0,0 +1,4 @@
import { ContextType } from 'react';
import { PublicContext } from '../store';
export declare function useDndContext(): import("../store").PublicContextDescriptor;
export declare type UseDndContextReturnValue = ContextType<typeof PublicContext>;

View File

@@ -0,0 +1,37 @@
/// <reference types="react" />
import { Transform } from '@dnd-kit/utilities';
import { Data } from '../store';
import type { UniqueIdentifier } from '../types';
import { SyntheticListenerMap } from './utilities';
export interface UseDraggableArguments {
id: UniqueIdentifier;
data?: Data;
disabled?: boolean;
attributes?: {
role?: string;
roleDescription?: string;
tabIndex?: number;
};
}
export interface DraggableAttributes {
role: string;
tabIndex: number;
'aria-disabled': boolean;
'aria-pressed': boolean | undefined;
'aria-roledescription': string;
'aria-describedby': string;
}
export declare type DraggableSyntheticListeners = SyntheticListenerMap | undefined;
export declare function useDraggable({ id, data, disabled, attributes, }: UseDraggableArguments): {
active: import("../store").Active | null;
activatorEvent: Event | null;
activeNodeRect: import("../types").ClientRect | null;
attributes: DraggableAttributes;
isDragging: boolean;
listeners: SyntheticListenerMap | undefined;
node: import("react").MutableRefObject<HTMLElement | null>;
over: import("../store").Over | null;
setNodeRef: (element: HTMLElement | null) => void;
setActivatorNodeRef: (element: HTMLElement | null) => void;
transform: Transform | null;
};

View File

@@ -0,0 +1,29 @@
/// <reference types="react" />
import { Data } from '../store';
import type { ClientRect, UniqueIdentifier } from '../types';
interface ResizeObserverConfig {
/** Whether the ResizeObserver should be disabled entirely */
disabled?: boolean;
/** Resize events may affect the layout and position of other droppable containers.
* Specify an array of `UniqueIdentifier` of droppable containers that should also be re-measured
* when this droppable container resizes. Specifying an empty array re-measures all droppable containers.
*/
updateMeasurementsFor?: UniqueIdentifier[];
/** Represents the debounce timeout between when resize events are observed and when elements are re-measured */
timeout?: number;
}
export interface UseDroppableArguments {
id: UniqueIdentifier;
disabled?: boolean;
data?: Data;
resizeObserverConfig?: ResizeObserverConfig;
}
export declare function useDroppable({ data, disabled, id, resizeObserverConfig, }: UseDroppableArguments): {
active: import("../store").Active | null;
rect: import("react").MutableRefObject<ClientRect | null>;
isOver: boolean;
node: import("react").MutableRefObject<HTMLElement | null>;
over: import("../store").Over | null;
setNodeRef: (element: HTMLElement | null) => void;
};
export {};

View File

@@ -0,0 +1,21 @@
export { AutoScrollActivator, TraversalOrder, useAutoScroller, } from './useAutoScroller';
export type { Options as AutoScrollOptions } from './useAutoScroller';
export { useCachedNode } from './useCachedNode';
export { useCombineActivators } from './useCombineActivators';
export { useDroppableMeasuring, MeasuringFrequency, MeasuringStrategy, } from './useDroppableMeasuring';
export type { DroppableMeasuring } from './useDroppableMeasuring';
export { useInitialValue } from './useInitialValue';
export { useInitialRect } from './useInitialRect';
export { useRect } from './useRect';
export { useRectDelta } from './useRectDelta';
export { useResizeObserver } from './useResizeObserver';
export { useScrollableAncestors } from './useScrollableAncestors';
export { useScrollIntoViewIfNeeded } from './useScrollIntoViewIfNeeded';
export { useScrollOffsets } from './useScrollOffsets';
export { useScrollOffsetsDelta } from './useScrollOffsetsDelta';
export { useSensorSetup } from './useSensorSetup';
export { useSyntheticListeners } from './useSyntheticListeners';
export type { SyntheticListener, SyntheticListeners, SyntheticListenerMap, } from './useSyntheticListeners';
export { useRects } from './useRects';
export { useWindowRect } from './useWindowRect';
export { useDragOverlayMeasuring } from './useDragOverlayMeasuring';

View File

@@ -0,0 +1,37 @@
import type { Coordinates, ClientRect } from '../../types';
export declare type ScrollAncestorSortingFn = (ancestors: Element[]) => Element[];
export declare enum AutoScrollActivator {
Pointer = 0,
DraggableRect = 1
}
export interface Options {
acceleration?: number;
activator?: AutoScrollActivator;
canScroll?: CanScroll;
enabled?: boolean;
interval?: number;
layoutShiftCompensation?: boolean | {
x: boolean;
y: boolean;
};
order?: TraversalOrder;
threshold?: {
x: number;
y: number;
};
}
interface Arguments extends Options {
draggingRect: ClientRect | null;
enabled: boolean;
pointerCoordinates: Coordinates | null;
scrollableAncestors: Element[];
scrollableAncestorRects: ClientRect[];
delta: Coordinates;
}
export declare type CanScroll = (element: Element) => boolean;
export declare enum TraversalOrder {
TreeOrder = 0,
ReversedTreeOrder = 1
}
export declare function useAutoScroller({ acceleration, activator, canScroll, draggingRect, enabled, interval, order, pointerCoordinates, scrollableAncestors, scrollableAncestorRects, delta, threshold, }: Arguments): void;
export {};

View File

@@ -0,0 +1,3 @@
import type { DraggableNode, DraggableNodes } from '../../store';
import type { UniqueIdentifier } from '../../types';
export declare function useCachedNode(draggableNodes: DraggableNodes, id: UniqueIdentifier | null): DraggableNode['node']['current'];

View File

@@ -0,0 +1,3 @@
import type { SensorActivatorFunction, SensorDescriptor } from '../../sensors';
import type { SyntheticListener, SyntheticListeners } from './useSyntheticListeners';
export declare function useCombineActivators(sensors: SensorDescriptor<any>[], getSyntheticHandler: (handler: SensorActivatorFunction<any>, sensor: SensorDescriptor<any>) => SyntheticListener['handler']): SyntheticListeners;

View File

@@ -0,0 +1,7 @@
import type { PublicContextDescriptor } from '../../store';
import type { ClientRect } from '../../types';
interface Arguments {
measure(element: HTMLElement): ClientRect;
}
export declare function useDragOverlayMeasuring({ measure, }: Arguments): PublicContextDescriptor['dragOverlay'];
export {};

View File

@@ -0,0 +1,27 @@
import type { DroppableContainer, RectMap } from '../../store/types';
import type { ClientRect, UniqueIdentifier } from '../../types';
interface Arguments {
dragging: boolean;
dependencies: any[];
config: DroppableMeasuring;
}
export declare enum MeasuringStrategy {
Always = 0,
BeforeDragging = 1,
WhileDragging = 2
}
export declare enum MeasuringFrequency {
Optimized = "optimized"
}
declare type MeasuringFunction = (element: HTMLElement) => ClientRect;
export interface DroppableMeasuring {
measure: MeasuringFunction;
strategy: MeasuringStrategy;
frequency: MeasuringFrequency | number;
}
export declare function useDroppableMeasuring(containers: DroppableContainer[], { dragging, dependencies, config }: Arguments): {
droppableRects: RectMap;
measureDroppableContainers: (ids?: UniqueIdentifier[]) => void;
measuringScheduled: boolean;
};
export {};

View File

@@ -0,0 +1,2 @@
import type { ClientRect } from '../../types';
export declare function useInitialRect(node: HTMLElement | null, measure: (node: HTMLElement) => ClientRect): ClientRect | null;

View File

@@ -0,0 +1,3 @@
declare type AnyFunction = (...args: any) => any;
export declare function useInitialValue<T, U extends AnyFunction | undefined = undefined>(value: T | null, computeFn?: U): U extends AnyFunction ? ReturnType<U> | null : T | null;
export {};

View File

@@ -0,0 +1,10 @@
interface Arguments {
callback: MutationCallback;
disabled?: boolean;
}
/**
* Returns a new MutationObserver instance.
* If `MutationObserver` is undefined in the execution environment, returns `undefined`.
*/
export declare function useMutationObserver({ callback, disabled }: Arguments): MutationObserver | undefined;
export {};

View File

@@ -0,0 +1,2 @@
import type { ClientRect } from '../../types';
export declare function useRect(element: HTMLElement | null, measure?: (element: HTMLElement) => ClientRect, fallbackRect?: ClientRect | null): ClientRect | null;

View File

@@ -0,0 +1,2 @@
import type { ClientRect } from '../../types';
export declare function useRectDelta(rect: ClientRect | null): import("@dnd-kit/utilities/dist/coordinates/types").Coordinates;

View File

@@ -0,0 +1,2 @@
import type { ClientRect } from '../../types';
export declare function useRects(elements: Element[], measure?: (element: Element) => ClientRect): ClientRect[];

View File

@@ -0,0 +1,10 @@
interface Arguments {
callback: ResizeObserverCallback;
disabled?: boolean;
}
/**
* Returns a new ResizeObserver instance bound to the `onResize` callback.
* If `ResizeObserver` is undefined in the execution environment, returns `undefined`.
*/
export declare function useResizeObserver({ callback, disabled }: Arguments): ResizeObserver | undefined;
export {};

View File

@@ -0,0 +1 @@
export declare function useScrollIntoViewIfNeeded(element: HTMLElement | null | undefined): void;

View File

@@ -0,0 +1,2 @@
import type { Coordinates } from '../../types';
export declare function useScrollOffsets(elements: Element[]): Coordinates;

View File

@@ -0,0 +1,2 @@
import { Coordinates } from '@dnd-kit/utilities';
export declare function useScrollOffsetsDelta(scrollOffsets: Coordinates, dependencies?: any[]): Coordinates;

View File

@@ -0,0 +1 @@
export declare function useScrollableAncestors(node: HTMLElement | null): Element[];

View File

@@ -0,0 +1,2 @@
import type { SensorDescriptor } from '../../sensors';
export declare function useSensorSetup(sensors: SensorDescriptor<any>[]): void;

View File

@@ -0,0 +1,9 @@
/// <reference types="react" />
import type { SyntheticEventName, UniqueIdentifier } from '../../types';
export declare type SyntheticListener = {
eventName: SyntheticEventName;
handler: (event: React.SyntheticEvent, id: UniqueIdentifier) => void;
};
export declare type SyntheticListeners = SyntheticListener[];
export declare type SyntheticListenerMap = Record<string, Function>;
export declare function useSyntheticListeners(listeners: SyntheticListeners, id: UniqueIdentifier): SyntheticListenerMap;

View File

@@ -0,0 +1 @@
export declare function useWindowRect(element: typeof window | null): import("../..").ClientRect | null;