Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
42 lines
1.3 KiB
Plaintext
42 lines
1.3 KiB
Plaintext
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 {};
|