type _LoadAndSelect = "onLoad" | "onSelect"; type _Error = "onError"; type _Scroll = "onScroll" | "onWheel"; type _Focus = "onFocus" | "onBlur"; type _Keyboard = "onKeyDown" | "onKeyUp"; type _Mouse = "onAuxClick" | "onClick" | "onDblClick" | "onContextMenu" | "onDrag" | "onDragEnd" | "onDragEnter" | "onDragExit" | "onDragLeave" | "onDragOver" | "onDragStart" | "onDrop" | "onMouseDown" | "onMouseMove" | "onMouseOut" | "onMouseOver" | "onMouseUp"; type _MouseNoCapture = "onMouseEnter" | "onMouseLeave"; type _Touch = "onTouchCancel" | "onTouchEnd"; type _TouchPassive = "onTouchMove" | "onTouchStart"; type _Pointer = "onPointerDown" | "onPointerMove" | "onPointerUp" | "onPointerCancel" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOut" | "onGotPointerCapture" | "onLostPointerCapture"; type _Animation = "onAnimationStart" | "onAnimationEnd" | "onAnimationIteration" | "onAnimationCancel"; type _Transition = "onTransitionStart" | "onTransitionEnd" | "onTransitionRun" | "onTransitionCancel"; type EventHandler = (e: E) => void; type EventType = { [K in T]?: EventHandler; }; type EventTypeCapture = EventType & { [K in T as `${K}Capture`]?: EventHandler; }; type EventTypeCapturePassive = EventTypeCapture & { [K in T as `${K}Passive`]?: EventHandler; }; type LoadAndSelectEvents = EventTypeCapture<_LoadAndSelect, Event>; type ErrorEvents = EventTypeCapture<_Error, ErrorEvent>; type ScrollEvents = EventTypeCapturePassive<_Scroll, Event>; type FocusEvents = EventTypeCapture<_Focus, Event>; type KeyboardEvents = EventTypeCapture<_Keyboard, MouseEvent>; type MouseEvents = EventTypeCapture<_Mouse, MouseEvent> & EventType<_MouseNoCapture, MouseEvent>; type TouchEvents = EventTypeCapture<_Touch, TouchEvent> & EventTypeCapturePassive<_TouchPassive, TouchEvent>; type PointerEvents = EventTypeCapture<_Pointer, PointerEvent>; type AnimationEvents = EventTypeCapture<_Animation, AnimationEvent>; type TransitionEvents = EventTypeCapture<_Transition, TransitionEvent>; export type ReactWindowEvents = LoadAndSelectEvents & ErrorEvents & ScrollEvents & FocusEvents & KeyboardEvents & MouseEvents & TouchEvents & PointerEvents & AnimationEvents & TransitionEvents; export type AttachedEvent = { userCallbacks: Record void>; handler: (e: Event) => void; options: { capture: boolean; passive: boolean; }; }; export {};