25 lines
880 B
Plaintext
25 lines
880 B
Plaintext
import type { Active, UniqueIdentifier } from '@dnd-kit/core';
|
|
import type { Transition } from '@dnd-kit/utilities';
|
|
export declare type SortableTransition = Pick<Transition, 'easing' | 'duration'>;
|
|
export declare type AnimateLayoutChanges = (args: {
|
|
active: Active | null;
|
|
containerId: UniqueIdentifier;
|
|
isDragging: boolean;
|
|
isSorting: boolean;
|
|
id: UniqueIdentifier;
|
|
index: number;
|
|
items: UniqueIdentifier[];
|
|
previousItems: UniqueIdentifier[];
|
|
previousContainerId: UniqueIdentifier;
|
|
newIndex: number;
|
|
transition: SortableTransition | null;
|
|
wasDragging: boolean;
|
|
}) => boolean;
|
|
export interface NewIndexGetterArguments {
|
|
id: UniqueIdentifier;
|
|
items: UniqueIdentifier[];
|
|
activeIndex: number;
|
|
overIndex: number;
|
|
}
|
|
export declare type NewIndexGetter = (args: NewIndexGetterArguments) => number;
|