import * as React from 'react'; import { State } from '../State'; import { TouchEventType } from '../TouchEventType'; import { ValueOf } from '../typeUtils'; import { PointerType } from '../PointerType'; export declare const baseGestureHandlerProps: readonly ["id", "enabled", "shouldCancelWhenOutside", "hitSlop", "cancelsTouchesInView", "userSelect", "activeCursor", "mouseButton", "enableContextMenu", "touchAction", "waitFor", "simultaneousHandlers", "blocksHandlers", "onBegan", "onFailed", "onCancelled", "onActivated", "onEnded", "onGestureEvent", "onHandlerStateChange"]; export declare const baseGestureHandlerWithDetectorProps: string[]; export interface GestureEventPayload { handlerTag: number; numberOfPointers: number; state: ValueOf; pointerType: PointerType; } export interface HandlerStateChangeEventPayload extends GestureEventPayload { oldState: ValueOf; } export type HitSlop = number | null | undefined | Partial> | Record<'width' | 'left', number> | Record<'width' | 'right', number> | Record<'height' | 'top', number> | Record<'height' | 'bottom', number>; export type UserSelect = 'none' | 'auto' | 'text'; export type ActiveCursor = 'auto' | 'default' | 'none' | 'context-menu' | 'help' | 'pointer' | 'progress' | 'wait' | 'cell' | 'crosshair' | 'text' | 'vertical-text' | 'alias' | 'copy' | 'move' | 'no-drop' | 'not-allowed' | 'grab' | 'grabbing' | 'e-resize' | 'n-resize' | 'ne-resize' | 'nw-resize' | 's-resize' | 'se-resize' | 'sw-resize' | 'w-resize' | 'ew-resize' | 'ns-resize' | 'nesw-resize' | 'nwse-resize' | 'col-resize' | 'row-resize' | 'all-scroll' | 'zoom-in' | 'zoom-out'; export declare enum MouseButton { LEFT = 1, RIGHT = 2, MIDDLE = 4, BUTTON_4 = 8, BUTTON_5 = 16, ALL = 31 } export type TouchAction = 'auto' | 'none' | 'pan-x' | 'pan-left' | 'pan-right' | 'pan-y' | 'pan-up' | 'pan-down' | 'pinch-zoom' | 'manipulation' | 'inherit' | 'initial' | 'revert' | 'revert-layer' | 'unset'; export interface GestureEvent> { nativeEvent: Readonly; } export interface HandlerStateChangeEvent> { nativeEvent: Readonly; } export type TouchData = { id: number; x: number; y: number; absoluteX: number; absoluteY: number; }; export type GestureTouchEvent = { handlerTag: number; numberOfTouches: number; state: ValueOf; eventType: TouchEventType; allTouches: TouchData[]; changedTouches: TouchData[]; pointerType: PointerType; }; export type GestureUpdateEvent> = GestureEventPayload & GestureEventPayloadT; export type GestureStateChangeEvent> = HandlerStateChangeEventPayload & GestureStateChangeEventPayloadT; export type CommonGestureConfig = { enabled?: boolean; shouldCancelWhenOutside?: boolean; hitSlop?: HitSlop; userSelect?: UserSelect; activeCursor?: ActiveCursor; mouseButton?: MouseButton; enableContextMenu?: boolean; touchAction?: TouchAction; }; export type BaseGestureHandlerProps = Record> = CommonGestureConfig & { id?: string; waitFor?: React.Ref | React.Ref[]; simultaneousHandlers?: React.Ref | React.Ref[]; blocksHandlers?: React.Ref | React.Ref[]; testID?: string; cancelsTouchesInView?: boolean; onBegan?: (event: HandlerStateChangeEvent) => void; onFailed?: (event: HandlerStateChangeEvent) => void; onCancelled?: (event: HandlerStateChangeEvent) => void; onActivated?: (event: HandlerStateChangeEvent) => void; onEnded?: (event: HandlerStateChangeEvent) => void; onGestureEvent?: (event: GestureEvent) => void; onHandlerStateChange?: (event: HandlerStateChangeEvent) => void; children?: React.ReactNode; };