type ExtractArgs = T[keyof T] extends (...args: infer A) => any ? A : any[]; type EventState> = T & { (key?: keyof T, fun?: T[keyof T]): EventState; (target?: Partial): EventState; }; type Vec2 = [x: number, y: number]; type DragDevice = 'mouse' | 'touch' | 'pointer'; interface DragState { _active: boolean; active: boolean; device: DragDevice; _value: Vec2; value: Vec2; delta: Vec2; offset: Vec2; movement: Vec2; target: El; event: Event; memo: any; isDragStart: boolean; isDragging: boolean; isDragEnd: boolean; drag(self: DragState): void; dragStart(e: Event): void; dragging(e: Event): void; dragEnd(e: Event): void; mount(target: El): void; clean(el: null): void; ref(traget: El | null): void; } type DragArg = Partial> | DragState['drag']; declare const EVENT_FOR_DRAG: { touch: { start: string; move: string; end: string; up: string; }; pointer: { start: string; move: string; end: string; up: string; }; mouse: { start: string; move: string; end: string; up: string; }; }; declare const dragEvent: (state?: Partial>) => EventState>; interface HoverState { _active: boolean; active: boolean; device: 'mouse' | 'pointer' | 'touch'; _value: Vec2; value: Vec2; delta: Vec2; offset: Vec2; movement: Vec2; event: Event; target: El; isHoverStart: boolean; isHovering: boolean; isHoverEnd: boolean; hover: (self: HoverState) => void; hoverStart(e: Event): void; hovering(e: Event): void; hoverEnd(e: Event): void; mount(target: El): void; clean(target?: El): void; ref(target: El | null): void; } type HoverArg = Partial> | HoverState['hover']; declare const EVENT_FOR_HOVER: { touch: { start: string; move: string; end: string; up: string; }; pointer: { start: string; move: string; end: string; up: string; }; mouse: { start: string; move: string; end: string; up: string; }; }; declare const hoverEvent: (state?: Partial>) => EventState>; interface KeyState { target: El | Window; pressedKey: string; code: string; event: KeyboardEvent; key(e: KeyState): void; keydown(e: KeyboardEvent): void; mount(el: El): void; clean(el: null): void; ref(el: Element | null): void; } type KeyArg = Partial> | KeyState['key']; declare const keyEvent: (state?: Partial>) => EventState>; interface ResizeState { observer: ResizeObserver | null; listener(): void; mount(el: El): void; clean(el: null): void; resize(self: ResizeState): void; ref(target: El): void; } type ResizeArg = Partial> | ResizeState['resize']; declare const resizeEvent: (state: ResizeState) => EventState>; type PinchDevice = 'mouse' | 'pointer' | 'touch' | 'wheel' | 'gesture'; interface PinchState { device: PinchDevice; active: boolean; _active: boolean; value: Vec2; _value: Vec2; delta: Vec2; offset: Vec2; movement: Vec2; initial: Vec2; origin: Vec2; _touchIds: number[]; _pointerEvents: Map; scale: number; turns: number; target: El; event: Event | null; memo: Record; timeout: number; clearTimeout: () => void; isPinchStart: boolean; isPinching: boolean; isPinchEnd: boolean; pinch: (self: PinchState) => void; pinchStart: (e: Event) => void; pinching: (e: Event) => void; pinchEnd: (e: Event) => void; mount: (target: El) => void; clean: () => void; ref: (el: El | null) => void; } type PinchArg = Partial> | PinchState['pinch']; declare const pinchDevice: (touch?: boolean) => "touch" | "pointer" | "wheel" | "gesture"; interface DistanceAngle { distance: number; angle: number; origin: Vec2; } declare const EVENT_FOR_PINCH: { touch: { start: string; move: string; end: string; cancel: string; }; pointer: { start: string; move: string; end: string; cancel: string; }; gesture: { start: string; change: string; end: string; }; }; declare const pinchEvent: (config?: Partial>) => EventState>; interface ScrollState { _active: boolean; active: boolean; _value: Vec2; value: Vec2; delta: Vec2; offset: Vec2; movement: Vec2; target: El; event: Event; memo: any; isScrollStart: boolean; isScrolling: boolean; isScrollEnd: boolean; timeout: number; clearTimeout(): void; scroll(self: ScrollState): void; scrollStart(e: Event): void; scrolling(e: Event): void; scrollEnd(e: Event): void; mount(target: El): void; clean(target: null): void; ref(traget: El | null): void; tick?: () => void; } type ScrollConfig = Partial> | ScrollState['scroll']; declare const scrollEvent: (config?: ScrollState) => EventState>; interface WheelState { _active: boolean; active: boolean; _value: Vec2; value: Vec2; delta: Vec2; offset: Vec2; movement: Vec2; target: El; event: Event; timeout: number; clearTimeout(): void; memo: any; isWheelStart: boolean; isWheeling: boolean; isWheelEnd: boolean; wheel(self: WheelState): void; wheelStart(e: Event): void; wheeling(e: Event): void; wheelEnd(e: Event): void; mount(target: El): void; clean(target: null): void; ref(traget: El | null): void; tick?: () => void; } type WheelConfig = Partial> | WheelState['wheel']; declare const wheelEvent: (config?: WheelState) => EventState>; export { type DistanceAngle, type DragArg, type DragDevice, type DragState, EVENT_FOR_DRAG, EVENT_FOR_HOVER, EVENT_FOR_PINCH, type HoverArg, type HoverState, type KeyArg, type KeyState, type PinchArg, type PinchDevice, type PinchState, type ResizeArg, type ResizeState, type ScrollConfig, type ScrollState, type WheelConfig, type WheelState, dragEvent, hoverEvent, keyEvent, pinchDevice, pinchEvent, resizeEvent, scrollEvent, wheelEvent };