import type { Position } from 'css-box-model'; import { BeforeCapture } from '../../types'; export interface EventOptions { passive?: boolean; capture?: boolean; // sometimes an event might only event want to be bound once once?: boolean; } export interface EventBinding { eventName: string; fn: (event: TEvent) => void; options?: EventOptions; } interface BeforeEventDetail { before: BeforeCapture; clientSelection: Position; } export type AnimationEventBinding = EventBinding; export type BeforeCaptureEvent = EventBinding>; export type ClipboardEventBinding = EventBinding; export type CompositionEventBinding = EventBinding; export type DragEventBinding = EventBinding; export type ErrorEventBinding = EventBinding; export type FocusEventBinding = EventBinding; export type KeyboardEventBinding = EventBinding; export type MouseEventBinding = EventBinding; export type TouchEventBinding = EventBinding; export type PointerEventBinding = EventBinding; export type TransitionEventBinding = EventBinding; export type UIEventBinding = EventBinding; export type WheelEventBinding = EventBinding; export type AnyEventBinding = | EventBinding | AnimationEventBinding | BeforeCaptureEvent | ClipboardEventBinding | CompositionEventBinding | DragEventBinding | ErrorEventBinding | FocusEventBinding | KeyboardEventBinding | MouseEventBinding | TouchEventBinding | PointerEventBinding | TransitionEventBinding | UIEventBinding | WheelEventBinding;