first init

This commit is contained in:
Power BI Dev
2026-08-17 10:52:09 +07:00
commit 88c7c653c2
9281 changed files with 2156575 additions and 0 deletions
@@ -0,0 +1,10 @@
/// <reference types="react" />
import type { Announcements, ScreenReaderInstructions } from './types';
interface Props {
announcements?: Announcements;
container?: Element;
screenReaderInstructions?: ScreenReaderInstructions;
hiddenTextDescribedById: string;
}
export declare function Accessibility({ announcements, container, hiddenTextDescribedById, screenReaderInstructions, }: Props): JSX.Element | null;
export {};
@@ -0,0 +1,5 @@
interface Props {
disabled: boolean;
}
export declare function RestoreFocus({ disabled }: Props): null;
export {};
@@ -0,0 +1 @@
export { RestoreFocus } from './RestoreFocus';
@@ -0,0 +1,3 @@
import type { Announcements, ScreenReaderInstructions } from './types';
export declare const defaultScreenReaderInstructions: ScreenReaderInstructions;
export declare const defaultAnnouncements: Announcements;
@@ -0,0 +1,4 @@
export { Accessibility } from './Accessibility';
export { RestoreFocus } from './components';
export { defaultAnnouncements, defaultScreenReaderInstructions, } from './defaults';
export type { Announcements, ScreenReaderInstructions } from './types';
@@ -0,0 +1,15 @@
import type { Active, Over } from '../../store';
export interface Arguments {
active: Active;
over: Over | null;
}
export interface Announcements {
onDragStart({ active }: Pick<Arguments, 'active'>): string | undefined;
onDragMove?({ active, over }: Arguments): string | undefined;
onDragOver({ active, over }: Arguments): string | undefined;
onDragEnd({ active, over }: Arguments): string | undefined;
onDragCancel({ active, over }: Arguments): string | undefined;
}
export interface ScreenReaderInstructions {
draggable: string;
}
@@ -0,0 +1,37 @@
import React from 'react';
import type { Transform } from '@dnd-kit/utilities';
import type { AutoScrollOptions } from '../../hooks/utilities';
import type { SensorDescriptor } from '../../sensors';
import { CollisionDetection } from '../../utilities';
import { Modifiers } from '../../modifiers';
import type { DragStartEvent, DragCancelEvent, DragEndEvent, DragMoveEvent, DragOverEvent, DragPendingEvent, DragAbortEvent } from '../../types';
import { Announcements, ScreenReaderInstructions } from '../Accessibility';
import type { MeasuringConfiguration } from './types';
export interface Props {
id?: string;
accessibility?: {
announcements?: Announcements;
container?: Element;
restoreFocus?: boolean;
screenReaderInstructions?: ScreenReaderInstructions;
};
autoScroll?: boolean | AutoScrollOptions;
cancelDrop?: CancelDrop;
children?: React.ReactNode;
collisionDetection?: CollisionDetection;
measuring?: MeasuringConfiguration;
modifiers?: Modifiers;
sensors?: SensorDescriptor<any>[];
onDragAbort?(event: DragAbortEvent): void;
onDragPending?(event: DragPendingEvent): void;
onDragStart?(event: DragStartEvent): void;
onDragMove?(event: DragMoveEvent): void;
onDragOver?(event: DragOverEvent): void;
onDragEnd?(event: DragEndEvent): void;
onDragCancel?(event: DragCancelEvent): void;
}
export interface CancelDropArguments extends DragEndEvent {
}
export declare type CancelDrop = (args: CancelDropArguments) => boolean | Promise<boolean>;
export declare const ActiveDraggableContext: React.Context<Transform>;
export declare const DndContext: React.NamedExoticComponent<Props>;
@@ -0,0 +1,13 @@
import type { DeepRequired } from '@dnd-kit/utilities';
import type { DataRef } from '../../store/types';
import { KeyboardSensor, PointerSensor } from '../../sensors';
import type { MeasuringConfiguration } from './types';
export declare const defaultSensors: ({
sensor: typeof PointerSensor;
options: {};
} | {
sensor: typeof KeyboardSensor;
options: {};
})[];
export declare const defaultData: DataRef;
export declare const defaultMeasuringConfiguration: DeepRequired<MeasuringConfiguration>;
@@ -0,0 +1,2 @@
export { useMeasuringConfiguration } from './useMeasuringConfiguration';
export { useLayoutShiftScrollCompensation } from './useLayoutShiftScrollCompensation';
@@ -0,0 +1,14 @@
import type { ClientRect } from '../../../types';
import type { DraggableNode } from '../../../store';
import type { MeasuringFunction } from '../types';
interface Options {
activeNode: DraggableNode | null | undefined;
config: boolean | {
x: boolean;
y: boolean;
} | undefined;
initialRect: ClientRect | null;
measure: MeasuringFunction;
}
export declare function useLayoutShiftScrollCompensation({ activeNode, measure, initialRect, config, }: Options): void;
export {};
@@ -0,0 +1,3 @@
import type { DeepRequired } from '@dnd-kit/utilities';
import type { MeasuringConfiguration } from '../types';
export declare function useMeasuringConfiguration(config: MeasuringConfiguration | undefined): DeepRequired<MeasuringConfiguration>;
@@ -0,0 +1,3 @@
export { ActiveDraggableContext, DndContext } from './DndContext';
export type { CancelDrop, Props as DndContextProps } from './DndContext';
export type { DraggableMeasuring, MeasuringConfiguration } from './types';
@@ -0,0 +1,16 @@
import type { ClientRect } from '../../types';
import type { DroppableMeasuring } from '../../hooks/utilities';
export declare type MeasuringFunction = (node: HTMLElement) => ClientRect;
interface Measuring {
measure: MeasuringFunction;
}
export interface DraggableMeasuring extends Measuring {
}
export interface DragOverlayMeasuring extends Measuring {
}
export interface MeasuringConfiguration {
draggable?: Partial<DraggableMeasuring>;
droppable?: Partial<DroppableMeasuring>;
dragOverlay?: Partial<DragOverlayMeasuring>;
}
export {};
@@ -0,0 +1,3 @@
/// <reference types="react" />
import type { RegisterListener } from './types';
export declare const DndMonitorContext: import("react").Context<RegisterListener | null>;
@@ -0,0 +1,4 @@
export { DndMonitorContext } from './context';
export type { DndMonitorListener, DndMonitorEvent } from './types';
export { useDndMonitor } from './useDndMonitor';
export { useDndMonitorProvider } from './useDndMonitorProvider';
@@ -0,0 +1,16 @@
import type { DragAbortEvent, DragPendingEvent, DragStartEvent, DragCancelEvent, DragEndEvent, DragMoveEvent, DragOverEvent } from '../../types';
export interface DndMonitorListener {
onDragAbort?(event: DragAbortEvent): void;
onDragPending?(event: DragPendingEvent): void;
onDragStart?(event: DragStartEvent): void;
onDragMove?(event: DragMoveEvent): void;
onDragOver?(event: DragOverEvent): void;
onDragEnd?(event: DragEndEvent): void;
onDragCancel?(event: DragCancelEvent): void;
}
export interface DndMonitorEvent {
type: keyof DndMonitorListener;
event: DragAbortEvent | DragPendingEvent | DragStartEvent | DragMoveEvent | DragOverEvent | DragEndEvent | DragCancelEvent;
}
export declare type UnregisterListener = () => void;
export declare type RegisterListener = (listener: DndMonitorListener) => UnregisterListener;
@@ -0,0 +1,2 @@
import type { DndMonitorListener } from './types';
export declare function useDndMonitor(listener: DndMonitorListener): void;
@@ -0,0 +1,2 @@
import type { DndMonitorEvent } from './types';
export declare function useDndMonitorProvider(): readonly [({ type, event }: DndMonitorEvent) => void, (listener: any) => () => boolean];
@@ -0,0 +1,11 @@
import React from 'react';
import { Modifiers } from '../../modifiers';
import type { PositionedOverlayProps } from './components';
import type { DropAnimation } from './hooks';
export interface Props extends Pick<PositionedOverlayProps, 'adjustScale' | 'children' | 'className' | 'style' | 'transition'> {
dropAnimation?: DropAnimation | null | undefined;
modifiers?: Modifiers;
wrapperElement?: keyof JSX.IntrinsicElements;
zIndex?: number;
}
export declare const DragOverlay: React.MemoExoticComponent<({ adjustScale, children, dropAnimation: dropAnimationConfig, style, transition, modifiers, wrapperElement, className, zIndex, }: Props) => JSX.Element>;
@@ -0,0 +1,8 @@
import React from 'react';
import type { UniqueIdentifier } from '../../../../types';
export declare type Animation = (key: UniqueIdentifier, node: HTMLElement) => Promise<void> | void;
export interface Props {
animation: Animation;
children: React.ReactElement | null;
}
export declare function AnimationManager({ animation, children }: Props): JSX.Element;
@@ -0,0 +1,2 @@
export { AnimationManager } from './AnimationManager';
export type { Animation } from './AnimationManager';
@@ -0,0 +1,6 @@
import React from 'react';
interface Props {
children: React.ReactNode;
}
export declare function NullifiedContextProvider({ children }: Props): JSX.Element;
export {};
@@ -0,0 +1 @@
export { NullifiedContextProvider } from './NullifiedContextProvider';
@@ -0,0 +1,18 @@
import React from 'react';
import type { Transform } from '@dnd-kit/utilities';
import type { ClientRect, UniqueIdentifier } from '../../../../types';
declare type TransitionGetter = (activatorEvent: Event | null) => React.CSSProperties['transition'] | undefined;
export interface Props {
as: keyof JSX.IntrinsicElements;
activatorEvent: Event | null;
adjustScale?: boolean;
children?: React.ReactNode;
className?: string;
id: UniqueIdentifier;
rect: ClientRect | null;
style?: React.CSSProperties;
transition?: string | TransitionGetter;
transform: Transform;
}
export declare const PositionedOverlay: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLElement>>;
export {};
@@ -0,0 +1,2 @@
export { PositionedOverlay } from './PositionedOverlay';
export type { Props as PositionedOverlayProps } from './PositionedOverlay';
@@ -0,0 +1,5 @@
export { AnimationManager } from './AnimationManager';
export type { Animation } from './AnimationManager';
export { NullifiedContextProvider } from './NullifiedContextProvider';
export { PositionedOverlay } from './PositionedOverlay';
export type { PositionedOverlayProps } from './PositionedOverlay';
@@ -0,0 +1,3 @@
export { useDropAnimation, defaultDropAnimationConfiguration as defaultDropAnimation, defaultDropAnimationSideEffects, } from './useDropAnimation';
export type { DropAnimation, DropAnimationFunction, DropAnimationFunctionArguments, KeyframeResolver as DropAnimationKeyframeResolver, DropAnimationSideEffects, } from './useDropAnimation';
export { useKey } from './useKey';
@@ -0,0 +1,65 @@
import type { DeepRequired, Transform } from '@dnd-kit/utilities';
import type { Active, DraggableNodes, DroppableContainers } from '../../../store';
import type { ClientRect, UniqueIdentifier } from '../../../types';
import type { MeasuringConfiguration } from '../../DndContext';
interface SharedParameters {
active: {
id: UniqueIdentifier;
data: Active['data'];
node: HTMLElement;
rect: ClientRect;
};
dragOverlay: {
node: HTMLElement;
rect: ClientRect;
};
draggableNodes: DraggableNodes;
droppableContainers: DroppableContainers;
measuringConfiguration: DeepRequired<MeasuringConfiguration>;
}
export interface KeyframeResolverParameters extends SharedParameters {
transform: {
initial: Transform;
final: Transform;
};
}
export declare type KeyframeResolver = (parameters: KeyframeResolverParameters) => Keyframe[];
export interface DropAnimationOptions {
keyframes?: KeyframeResolver;
duration?: number;
easing?: string;
sideEffects?: DropAnimationSideEffects | null;
}
export declare type DropAnimation = DropAnimationFunction | DropAnimationOptions;
interface Arguments {
draggableNodes: DraggableNodes;
droppableContainers: DroppableContainers;
measuringConfiguration: DeepRequired<MeasuringConfiguration>;
config?: DropAnimation | null;
}
export interface DropAnimationFunctionArguments extends SharedParameters {
transform: Transform;
}
export declare type DropAnimationFunction = (args: DropAnimationFunctionArguments) => Promise<void> | void;
declare type CleanupFunction = () => void;
export interface DropAnimationSideEffectsParameters extends SharedParameters {
}
export declare type DropAnimationSideEffects = (parameters: DropAnimationSideEffectsParameters) => CleanupFunction | void;
declare type ExtractStringProperties<T> = {
[K in keyof T]?: T[K] extends string ? string : never;
};
declare type Styles = ExtractStringProperties<CSSStyleDeclaration>;
interface DefaultDropAnimationSideEffectsOptions {
className?: {
active?: string;
dragOverlay?: string;
};
styles?: {
active?: Styles;
dragOverlay?: Styles;
};
}
export declare const defaultDropAnimationSideEffects: (options: DefaultDropAnimationSideEffectsOptions) => DropAnimationSideEffects;
export declare const defaultDropAnimationConfiguration: Required<DropAnimationOptions>;
export declare function useDropAnimation({ config, draggableNodes, droppableContainers, measuringConfiguration, }: Arguments): (...args: any) => any;
export {};
@@ -0,0 +1,2 @@
import type { UniqueIdentifier } from '../../../types';
export declare function useKey(id: UniqueIdentifier | undefined): number | undefined;
@@ -0,0 +1,4 @@
export { DragOverlay } from './DragOverlay';
export type { Props } from './DragOverlay';
export { defaultDropAnimation, defaultDropAnimationSideEffects } from './hooks';
export type { DropAnimation, DropAnimationFunction, DropAnimationFunctionArguments, DropAnimationKeyframeResolver, DropAnimationSideEffects, } from './hooks';
+8
View File
@@ -0,0 +1,8 @@
export { defaultAnnouncements, defaultScreenReaderInstructions, } from './Accessibility';
export type { Announcements, ScreenReaderInstructions } from './Accessibility';
export { DndContext } from './DndContext';
export type { CancelDrop, DndContextProps, DraggableMeasuring, MeasuringConfiguration, } from './DndContext';
export { useDndMonitor } from './DndMonitor';
export type { DndMonitorListener } from './DndMonitor';
export { DragOverlay, defaultDropAnimation, defaultDropAnimationSideEffects, } from './DragOverlay';
export type { DropAnimation, DropAnimationFunction, DropAnimationFunctionArguments, DropAnimationKeyframeResolver, DropAnimationSideEffects, Props as DragOverlayProps, } from './DragOverlay';
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+8
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';
+4
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>;
+37
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;
};
+29
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 {};
+21
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';
@@ -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 {};
@@ -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'];
@@ -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;
@@ -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 {};
@@ -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 {};
@@ -0,0 +1,2 @@
import type { ClientRect } from '../../types';
export declare function useInitialRect(node: HTMLElement | null, measure: (node: HTMLElement) => ClientRect): ClientRect | null;
@@ -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 {};
@@ -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 {};
+2
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;
@@ -0,0 +1,2 @@
import type { ClientRect } from '../../types';
export declare function useRectDelta(rect: ClientRect | null): import("@dnd-kit/utilities/dist/coordinates/types").Coordinates;
+2
View File
@@ -0,0 +1,2 @@
import type { ClientRect } from '../../types';
export declare function useRects(elements: Element[], measure?: (element: Element) => ClientRect): ClientRect[];
@@ -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 {};
@@ -0,0 +1 @@
export declare function useScrollIntoViewIfNeeded(element: HTMLElement | null | undefined): void;
@@ -0,0 +1,2 @@
import type { Coordinates } from '../../types';
export declare function useScrollOffsets(elements: Element[]): Coordinates;
@@ -0,0 +1,2 @@
import { Coordinates } from '@dnd-kit/utilities';
export declare function useScrollOffsetsDelta(scrollOffsets: Coordinates, dependencies?: any[]): Coordinates;
@@ -0,0 +1 @@
export declare function useScrollableAncestors(node: HTMLElement | null): Element[];
@@ -0,0 +1,2 @@
import type { SensorDescriptor } from '../../sensors';
export declare function useSensorSetup(sensors: SensorDescriptor<any>[]): void;
@@ -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;
@@ -0,0 +1 @@
export declare function useWindowRect(element: typeof window | null): import("../..").ClientRect | null;
+12
View File
@@ -0,0 +1,12 @@
export { DndContext, DragOverlay, defaultAnnouncements, defaultScreenReaderInstructions, defaultDropAnimation, defaultDropAnimationSideEffects, useDndMonitor, } from './components';
export type { Announcements, CancelDrop, DndContextProps, DndMonitorListener, DndMonitorListener as DndMonitorArguments, DragOverlayProps, DropAnimation, DropAnimationFunction, DropAnimationFunctionArguments, DropAnimationKeyframeResolver, DropAnimationSideEffects, DraggableMeasuring, MeasuringConfiguration, ScreenReaderInstructions, } from './components';
export { AutoScrollActivator, MeasuringFrequency, MeasuringStrategy, TraversalOrder, useDraggable, useDndContext, useDroppable, } from './hooks';
export type { AutoScrollOptions, DraggableAttributes, DraggableSyntheticListeners, DroppableMeasuring, UseDndContextReturnValue, UseDraggableArguments, UseDroppableArguments, } from './hooks';
export { applyModifiers } from './modifiers';
export type { Modifier, Modifiers } from './modifiers';
export { KeyboardSensor, KeyboardCode, MouseSensor, PointerSensor, TouchSensor, defaultKeyboardCoordinateGetter, useSensors, useSensor, } from './sensors';
export type { Activator, Activators, PointerActivationConstraint, KeyboardCodes, KeyboardCoordinateGetter, KeyboardSensorOptions, KeyboardSensorProps, MouseSensorOptions, PointerEventHandlers, PointerSensorOptions, PointerSensorProps, Sensor, Sensors, SensorContext, SensorDescriptor, SensorHandler, SensorInstance, SensorOptions, SensorProps, SensorResponse, TouchSensorOptions, } from './sensors';
export type { Active, Data, DataRef, PublicContextDescriptor as DndContextDescriptor, DraggableNode, DroppableContainers, DroppableContainer, Over, } from './store';
export type { ClientRect, DistanceMeasurement, DragEndEvent, DragMoveEvent, DragOverEvent, DragStartEvent, DragPendingEvent, DragAbortEvent, DragCancelEvent, Translate, UniqueIdentifier, } from './types';
export { defaultCoordinates, getClientRect, getFirstCollision, getScrollableAncestors, closestCenter, closestCorners, rectIntersection, pointerWithin, } from './utilities';
export type { Collision, CollisionDescriptor, CollisionDetection, } from './utilities';
+8
View File
@@ -0,0 +1,8 @@
'use strict'
if (process.env.NODE_ENV === 'production') {
module.exports = require('./core.cjs.production.min.js')
} else {
module.exports = require('./core.cjs.development.js')
}
+3
View File
@@ -0,0 +1,3 @@
import type { FirstArgument, Transform } from '@dnd-kit/utilities';
import type { Modifiers, Modifier } from './types';
export declare function applyModifiers(modifiers: Modifiers | undefined, { transform, ...args }: FirstArgument<Modifier>): Transform;
+2
View File
@@ -0,0 +1,2 @@
export type { Modifier, Modifiers } from './types';
export { applyModifiers } from './applyModifiers';
+17
View File
@@ -0,0 +1,17 @@
import type { Transform } from '@dnd-kit/utilities';
import type { Active, Over } from '../store';
import type { ClientRect } from '../types';
export declare type Modifier = (args: {
activatorEvent: Event | null;
active: Active | null;
activeNodeRect: ClientRect | null;
draggingNodeRect: ClientRect | null;
containerNodeRect: ClientRect | null;
over: Over | null;
overlayNodeRect: ClientRect | null;
scrollableAncestors: Element[];
scrollableAncestorRects: ClientRect[];
transform: Transform;
windowRect: ClientRect | null;
}) => Transform;
export declare type Modifiers = Modifier[];
+11
View File
@@ -0,0 +1,11 @@
export declare enum EventName {
Click = "click",
DragStart = "dragstart",
Keydown = "keydown",
ContextMenu = "contextmenu",
Resize = "resize",
SelectionChange = "selectionchange",
VisibilityChange = "visibilitychange"
}
export declare function preventDefault(event: Event): void;
export declare function stopPropagation(event: Event): void;
+11
View File
@@ -0,0 +1,11 @@
export { useSensor } from './useSensor';
export { useSensors } from './useSensors';
export { AbstractPointerSensor, PointerSensor } from './pointer';
export type { AbstractPointerSensorOptions, AbstractPointerSensorProps, PointerActivationConstraint, PointerEventHandlers, PointerSensorOptions, PointerSensorProps, } from './pointer';
export { MouseSensor } from './mouse';
export type { MouseSensorOptions, MouseSensorProps } from './mouse';
export { TouchSensor } from './touch';
export type { TouchSensorOptions, TouchSensorProps } from './touch';
export { KeyboardSensor, KeyboardCode, defaultKeyboardCoordinateGetter, } from './keyboard';
export type { KeyboardCoordinateGetter, KeyboardSensorOptions, KeyboardSensorProps, KeyboardCodes, } from './keyboard';
export type { Activator, Activators, Response as SensorResponse, Sensor, Sensors, SensorActivatorFunction, SensorDescriptor, SensorContext, SensorHandler, SensorInstance, SensorOptions, SensorProps, } from './types';
@@ -0,0 +1,27 @@
import type { Activators, SensorInstance, SensorProps, SensorOptions } from '../types';
import { KeyboardCoordinateGetter, KeyboardCodes } from './types';
export interface KeyboardSensorOptions extends SensorOptions {
keyboardCodes?: KeyboardCodes;
coordinateGetter?: KeyboardCoordinateGetter;
scrollBehavior?: ScrollBehavior;
onActivation?({ event }: {
event: KeyboardEvent;
}): void;
}
export declare type KeyboardSensorProps = SensorProps<KeyboardSensorOptions>;
export declare class KeyboardSensor implements SensorInstance {
private props;
autoScrollEnabled: boolean;
private referenceCoordinates;
private listeners;
private windowListeners;
constructor(props: KeyboardSensorProps);
private attach;
private handleStart;
private handleKeyDown;
private handleMove;
private handleEnd;
private handleCancel;
private detach;
static activators: Activators<KeyboardSensorOptions>;
}
@@ -0,0 +1,3 @@
import { KeyboardCoordinateGetter, KeyboardCodes } from './types';
export declare const defaultKeyboardCodes: KeyboardCodes;
export declare const defaultKeyboardCoordinateGetter: KeyboardCoordinateGetter;
+5
View File
@@ -0,0 +1,5 @@
export { KeyboardSensor } from './KeyboardSensor';
export type { KeyboardSensorOptions, KeyboardSensorProps, } from './KeyboardSensor';
export type { KeyboardCoordinateGetter, KeyboardCodes } from './types';
export { KeyboardCode } from './types';
export { defaultKeyboardCoordinateGetter } from './defaults';
+22
View File
@@ -0,0 +1,22 @@
import type { Coordinates, UniqueIdentifier } from '../../types';
import type { SensorContext } from '../types';
export declare enum KeyboardCode {
Space = "Space",
Down = "ArrowDown",
Right = "ArrowRight",
Left = "ArrowLeft",
Up = "ArrowUp",
Esc = "Escape",
Enter = "Enter",
Tab = "Tab"
}
export declare type KeyboardCodes = {
start: KeyboardEvent['code'][];
cancel: KeyboardEvent['code'][];
end: KeyboardEvent['code'][];
};
export declare type KeyboardCoordinateGetter = (event: KeyboardEvent, args: {
active: UniqueIdentifier;
currentCoordinates: Coordinates;
context: SensorContext;
}) => Coordinates | void;
+13
View File
@@ -0,0 +1,13 @@
import type { MouseEvent } from 'react';
import type { SensorProps } from '../types';
import { AbstractPointerSensor, AbstractPointerSensorOptions } from '../pointer';
export interface MouseSensorOptions extends AbstractPointerSensorOptions {
}
export declare type MouseSensorProps = SensorProps<MouseSensorOptions>;
export declare class MouseSensor extends AbstractPointerSensor {
constructor(props: MouseSensorProps);
static activators: {
eventName: "onMouseDown";
handler: ({ nativeEvent: event }: MouseEvent, { onActivation }: MouseSensorOptions) => boolean;
}[];
}
+2
View File
@@ -0,0 +1,2 @@
export { MouseSensor } from './MouseSensor';
export type { MouseSensorOptions, MouseSensorProps } from './MouseSensor';
@@ -0,0 +1,51 @@
import type { SensorInstance, SensorProps, SensorOptions } from '../types';
import type { DistanceMeasurement } from '../../types';
interface DistanceConstraint {
distance: DistanceMeasurement;
tolerance?: DistanceMeasurement;
}
interface DelayConstraint {
delay: number;
tolerance: DistanceMeasurement;
}
interface EventDescriptor {
name: keyof DocumentEventMap;
passive?: boolean;
}
export interface PointerEventHandlers {
cancel?: EventDescriptor;
move: EventDescriptor;
end: EventDescriptor;
}
export declare type PointerActivationConstraint = DelayConstraint | DistanceConstraint | (DelayConstraint & DistanceConstraint);
export interface AbstractPointerSensorOptions extends SensorOptions {
activationConstraint?: PointerActivationConstraint;
bypassActivationConstraint?(props: Pick<AbstractPointerSensorProps, 'activeNode' | 'event' | 'options'>): boolean;
onActivation?({ event }: {
event: Event;
}): void;
}
export declare type AbstractPointerSensorProps = SensorProps<AbstractPointerSensorOptions>;
export declare class AbstractPointerSensor implements SensorInstance {
private props;
private events;
autoScrollEnabled: boolean;
private document;
private activated;
private initialCoordinates;
private timeoutId;
private listeners;
private documentListeners;
private windowListeners;
constructor(props: AbstractPointerSensorProps, events: PointerEventHandlers, listenerTarget?: Document | EventTarget);
private attach;
private detach;
private handlePending;
private handleStart;
private handleMove;
private handleEnd;
private handleCancel;
private handleKeydown;
private removeTextSelection;
}
export {};
@@ -0,0 +1,13 @@
import type { PointerEvent } from 'react';
import type { SensorProps } from '../types';
import { AbstractPointerSensor, AbstractPointerSensorOptions } from './AbstractPointerSensor';
export interface PointerSensorOptions extends AbstractPointerSensorOptions {
}
export declare type PointerSensorProps = SensorProps<PointerSensorOptions>;
export declare class PointerSensor extends AbstractPointerSensor {
constructor(props: PointerSensorProps);
static activators: {
eventName: "onPointerDown";
handler: ({ nativeEvent: event }: PointerEvent, { onActivation }: PointerSensorOptions) => boolean;
}[];
}
+4
View File
@@ -0,0 +1,4 @@
export { AbstractPointerSensor } from './AbstractPointerSensor';
export type { PointerActivationConstraint, PointerEventHandlers, AbstractPointerSensorOptions, AbstractPointerSensorProps, } from './AbstractPointerSensor';
export { PointerSensor } from './PointerSensor';
export type { PointerSensorOptions, PointerSensorProps } from './PointerSensor';
+14
View File
@@ -0,0 +1,14 @@
import type { TouchEvent } from 'react';
import { AbstractPointerSensor, PointerSensorProps, PointerSensorOptions } from '../pointer';
import type { SensorProps } from '../types';
export interface TouchSensorOptions extends PointerSensorOptions {
}
export declare type TouchSensorProps = SensorProps<TouchSensorOptions>;
export declare class TouchSensor extends AbstractPointerSensor {
constructor(props: PointerSensorProps);
static activators: {
eventName: "onTouchStart";
handler: ({ nativeEvent: event }: TouchEvent, { onActivation }: TouchSensorOptions) => boolean;
}[];
static setup(): () => void;
}
+2
View File
@@ -0,0 +1,2 @@
export { TouchSensor } from './TouchSensor';
export type { TouchSensorOptions, TouchSensorProps } from './TouchSensor';
+63
View File
@@ -0,0 +1,63 @@
import type { MutableRefObject } from 'react';
import type { Active, Over, DraggableNode, DraggableNodes, DroppableContainers, RectMap } from '../store';
import type { Coordinates, SyntheticEventName, Translate, UniqueIdentifier, ClientRect } from '../types';
import type { Collision } from '../utilities/algorithms';
import type { PointerActivationConstraint } from './pointer';
export declare enum Response {
Start = "start",
Move = "move",
End = "end"
}
export declare type SensorContext = {
activatorEvent: Event | null;
active: Active | null;
activeNode: HTMLElement | null;
collisionRect: ClientRect | null;
collisions: Collision[] | null;
draggableNodes: DraggableNodes;
draggingNode: HTMLElement | null;
draggingNodeRect: ClientRect | null;
droppableRects: RectMap;
droppableContainers: DroppableContainers;
over: Over | null;
scrollableAncestors: Element[];
scrollAdjustedTranslate: Translate | null;
};
export declare type SensorOptions = {};
export interface SensorProps<T> {
active: UniqueIdentifier;
activeNode: DraggableNode;
event: Event;
context: MutableRefObject<SensorContext>;
options: T;
onAbort(id: UniqueIdentifier): void;
onPending(id: UniqueIdentifier, constraint: PointerActivationConstraint, initialCoordinates: Coordinates, offset?: Coordinates | undefined): void;
onStart(coordinates: Coordinates): void;
onCancel(): void;
onMove(coordinates: Coordinates): void;
onEnd(): void;
}
export declare type SensorInstance = {
autoScrollEnabled: boolean;
};
export declare type SensorActivatorFunction<T> = (event: any, options: T, context: {
active: DraggableNode;
}) => boolean | undefined;
export declare type Activator<T> = {
eventName: SyntheticEventName;
handler: SensorActivatorFunction<T>;
};
export declare type Activators<T> = Activator<T>[];
declare type Teardown = () => void;
export interface Sensor<T extends Object> {
new (props: SensorProps<T>): SensorInstance;
activators: Activators<T>;
setup?(): Teardown | undefined;
}
export declare type Sensors = Sensor<any>[];
export declare type SensorDescriptor<T extends Object> = {
sensor: Sensor<T>;
options: T;
};
export declare type SensorHandler = (event: React.SyntheticEvent, active: UniqueIdentifier) => boolean | void;
export {};
+2
View File
@@ -0,0 +1,2 @@
import type { Sensor, SensorDescriptor, SensorOptions } from './types';
export declare function useSensor<T extends SensorOptions>(sensor: Sensor<T>, options?: T): SensorDescriptor<T>;
+2
View File
@@ -0,0 +1,2 @@
import type { SensorDescriptor, SensorOptions } from './types';
export declare function useSensors(...sensors: (SensorDescriptor<any> | undefined | null)[]): SensorDescriptor<SensorOptions>[];
@@ -0,0 +1,7 @@
export declare class Listeners {
private target;
private listeners;
constructor(target: EventTarget | null);
add<T extends Event>(eventName: string, handler: (event: T) => void, options?: AddEventListenerOptions | boolean): void;
removeAll: () => void;
}
@@ -0,0 +1 @@
export declare function getEventListenerTarget(target: EventTarget | null): EventTarget | Document;
@@ -0,0 +1,2 @@
import type { Coordinates, DistanceMeasurement } from '../../types';
export declare function hasExceededDistance(delta: Coordinates, measurement: DistanceMeasurement): boolean;
+3
View File
@@ -0,0 +1,3 @@
export { Listeners } from './Listeners';
export { getEventListenerTarget } from './getEventListenerTarget';
export { hasExceededDistance } from './hasExceededDistance';
+36
View File
@@ -0,0 +1,36 @@
import type { Coordinates, UniqueIdentifier } from '../types';
import type { DroppableContainer } from './types';
export declare enum Action {
DragStart = "dragStart",
DragMove = "dragMove",
DragEnd = "dragEnd",
DragCancel = "dragCancel",
DragOver = "dragOver",
RegisterDroppable = "registerDroppable",
SetDroppableDisabled = "setDroppableDisabled",
UnregisterDroppable = "unregisterDroppable"
}
export declare type Actions = {
type: Action.DragStart;
active: UniqueIdentifier;
initialCoordinates: Coordinates;
} | {
type: Action.DragMove;
coordinates: Coordinates;
} | {
type: Action.DragEnd;
} | {
type: Action.DragCancel;
} | {
type: Action.RegisterDroppable;
element: DroppableContainer;
} | {
type: Action.SetDroppableDisabled;
id: UniqueIdentifier;
key: UniqueIdentifier;
disabled: boolean;
} | {
type: Action.UnregisterDroppable;
id: UniqueIdentifier;
key: UniqueIdentifier;
};
+10
View File
@@ -0,0 +1,10 @@
import type { UniqueIdentifier } from '../types';
import type { DroppableContainer } from './types';
declare type Identifier = UniqueIdentifier | null | undefined;
export declare class DroppableContainersMap extends Map<UniqueIdentifier, DroppableContainer> {
get(id: Identifier): DroppableContainer | undefined;
toArray(): DroppableContainer[];
getEnabled(): DroppableContainer[];
getNodeFor(id: Identifier): HTMLElement | undefined;
}
export {};
+6
View File
@@ -0,0 +1,6 @@
/// <reference types="react" />
import type { InternalContextDescriptor, PublicContextDescriptor } from './types';
export declare const defaultPublicContext: PublicContextDescriptor;
export declare const defaultInternalContext: InternalContextDescriptor;
export declare const InternalContext: import("react").Context<InternalContextDescriptor>;
export declare const PublicContext: import("react").Context<PublicContextDescriptor>;
+4
View File
@@ -0,0 +1,4 @@
export { Action } from './actions';
export { PublicContext, InternalContext, defaultInternalContext, } from './context';
export { reducer, getInitialState } from './reducer';
export type { Active, Data, DataRef, DraggableElement, DraggableNode, DraggableNodes, DroppableContainer, DroppableContainers, PublicContextDescriptor, InternalContextDescriptor, RectMap, Over, State, } from './types';
+4
View File
@@ -0,0 +1,4 @@
import { Actions } from './actions';
import type { State } from './types';
export declare function getInitialState(): State;
export declare function reducer(state: State, action: Actions): State;
+98
View File
@@ -0,0 +1,98 @@
import type { MutableRefObject } from 'react';
import type { DeepRequired } from '@dnd-kit/utilities';
import type { SyntheticListeners } from '../hooks/utilities';
import type { Collision } from '../utilities/algorithms';
import type { MeasuringConfiguration } from '../components';
import type { Coordinates, ClientRect, UniqueIdentifier } from '../types';
import type { Actions } from './actions';
import type { DroppableContainersMap } from './constructors';
export interface DraggableElement {
node: DraggableNode;
id: UniqueIdentifier;
index: number;
collection: string;
disabled: boolean;
}
declare type AnyData = Record<string, any>;
export declare type Data<T = AnyData> = T & AnyData;
export declare type DataRef<T = AnyData> = MutableRefObject<Data<T> | undefined>;
export interface DroppableContainer {
id: UniqueIdentifier;
key: UniqueIdentifier;
data: DataRef;
disabled: boolean;
node: MutableRefObject<HTMLElement | null>;
rect: MutableRefObject<ClientRect | null>;
}
export interface Active {
id: UniqueIdentifier;
data: DataRef;
rect: MutableRefObject<{
initial: ClientRect | null;
translated: ClientRect | null;
}>;
}
export interface Over {
id: UniqueIdentifier;
rect: ClientRect;
disabled: boolean;
data: DataRef;
}
export declare type DraggableNode = {
id: UniqueIdentifier;
key: UniqueIdentifier;
node: MutableRefObject<HTMLElement | null>;
activatorNode: MutableRefObject<HTMLElement | null>;
data: DataRef;
};
export declare type DraggableNodes = Map<UniqueIdentifier, DraggableNode | undefined>;
export declare type DroppableContainers = DroppableContainersMap;
export declare type RectMap = Map<UniqueIdentifier, ClientRect>;
export interface State {
droppable: {
containers: DroppableContainers;
};
draggable: {
active: UniqueIdentifier | null;
initialCoordinates: Coordinates;
nodes: DraggableNodes;
translate: Coordinates;
};
}
export interface PublicContextDescriptor {
activatorEvent: Event | null;
active: Active | null;
activeNode: HTMLElement | null;
activeNodeRect: ClientRect | null;
collisions: Collision[] | null;
containerNodeRect: ClientRect | null;
draggableNodes: DraggableNodes;
droppableContainers: DroppableContainers;
droppableRects: RectMap;
over: Over | null;
dragOverlay: {
nodeRef: MutableRefObject<HTMLElement | null>;
rect: ClientRect | null;
setRef: (element: HTMLElement | null) => void;
};
scrollableAncestors: Element[];
scrollableAncestorRects: ClientRect[];
measuringConfiguration: DeepRequired<MeasuringConfiguration>;
measureDroppableContainers(ids: UniqueIdentifier[]): void;
measuringScheduled: boolean;
windowRect: ClientRect | null;
}
export interface InternalContextDescriptor {
activatorEvent: Event | null;
activators: SyntheticListeners;
active: Active | null;
activeNodeRect: ClientRect | null;
ariaDescribedById: {
draggable: string;
};
dispatch: React.Dispatch<Actions>;
draggableNodes: DraggableNodes;
over: Over | null;
measureDroppableContainers(ids: UniqueIdentifier[]): void;
}
export {};
+9
View File
@@ -0,0 +1,9 @@
import type { Coordinates } from '@dnd-kit/utilities';
export type { Coordinates };
export declare type DistanceMeasurement = number | Coordinates | Pick<Coordinates, 'x'> | Pick<Coordinates, 'y'>;
export declare type Translate = Coordinates;
export interface ScrollCoordinates {
initial: Coordinates;
current: Coordinates;
delta: Coordinates;
}
+4
View File
@@ -0,0 +1,4 @@
export declare enum Direction {
Forward = 1,
Backward = -1
}
+41
View File
@@ -0,0 +1,41 @@
import type { PointerActivationConstraint } from '../sensors';
import type { Active, Over } from '../store';
import type { Collision } from '../utilities/algorithms';
import type { Coordinates, Translate } from './coordinates';
import type { UniqueIdentifier } from '.';
interface DragEvent {
activatorEvent: Event;
active: Active;
collisions: Collision[] | null;
delta: Translate;
over: Over | null;
}
/**
* Fired if a pending drag was aborted before it started.
* Only meaningful in the context of activation constraints.
**/
export interface DragAbortEvent {
id: UniqueIdentifier;
}
/**
* Fired when a drag is about to start pending activation constraints.
* @note For pointer events, it will be fired repeatedly with updated
* coordinates when pointer is moved until the drag starts.
*/
export interface DragPendingEvent {
id: UniqueIdentifier;
constraint: PointerActivationConstraint;
initialCoordinates: Coordinates;
offset?: Coordinates | undefined;
}
export interface DragStartEvent extends Pick<DragEvent, 'active' | 'activatorEvent'> {
}
export interface DragMoveEvent extends DragEvent {
}
export interface DragOverEvent extends DragMoveEvent {
}
export interface DragEndEvent extends DragEvent {
}
export interface DragCancelEvent extends DragEndEvent {
}
export {};
+6
View File
@@ -0,0 +1,6 @@
export type { Coordinates, DistanceMeasurement, Translate, ScrollCoordinates, } from './coordinates';
export { Direction } from './direction';
export type { DragAbortEvent, DragPendingEvent, DragStartEvent, DragCancelEvent, DragEndEvent, DragMoveEvent, DragOverEvent, } from './events';
export type { UniqueIdentifier } from './other';
export type { SyntheticEventName } from './react';
export type { ClientRect } from './rect';
+1
View File
@@ -0,0 +1 @@
export declare type UniqueIdentifier = string | number;
+3
View File
@@ -0,0 +1,3 @@
/// <reference types="react" />
import type { Without } from '@dnd-kit/utilities';
export declare type SyntheticEventName = keyof Without<React.DOMAttributes<any>, 'children' | 'dangerouslySetInnerHTML'>;
+8
View File
@@ -0,0 +1,8 @@
export interface ClientRect {
width: number;
height: number;
top: number;
left: number;
right: number;
bottom: number;
}
@@ -0,0 +1,6 @@
import type { CollisionDetection } from './types';
/**
* Returns the closest rectangles from an array of rectangles to the center of a given
* rectangle.
*/
export declare const closestCenter: CollisionDetection;

Some files were not shown because too many files have changed in this diff Show More