import { FlingGestureHandlerEventPayload } from '../FlingGestureHandler'; import { ForceTouchGestureHandlerEventPayload } from '../ForceTouchGestureHandler'; import { HitSlop, CommonGestureConfig, GestureTouchEvent, GestureStateChangeEvent, GestureUpdateEvent } from '../gestureHandlerCommon'; import { GestureStateManagerType } from './gestureStateManager'; import { LongPressGestureHandlerEventPayload } from '../LongPressGestureHandler'; import { PanGestureHandlerEventPayload } from '../PanGestureHandler'; import { PinchGestureHandlerEventPayload } from '../PinchGestureHandler'; import { RotationGestureHandlerEventPayload } from '../RotationGestureHandler'; import { TapGestureHandlerEventPayload } from '../TapGestureHandler'; import { NativeViewGestureHandlerPayload } from '../NativeViewGestureHandler'; export declare type GestureType = BaseGesture> | BaseGesture> | BaseGesture | BaseGesture | BaseGesture | BaseGesture | BaseGesture | BaseGesture | BaseGesture | BaseGesture; export declare type GestureRef = number | GestureType | React.RefObject | React.RefObject; export interface BaseGestureConfig extends CommonGestureConfig, Record { ref?: React.MutableRefObject; requireToFail?: GestureRef[]; simultaneousWith?: GestureRef[]; needsPointerData?: boolean; manualActivation?: boolean; } declare type TouchEventHandlerType = (event: GestureTouchEvent, stateManager: GestureStateManagerType) => void; export declare type HandlerCallbacks> = { handlerTag: number; onBegin?: (event: GestureStateChangeEvent) => void; onStart?: (event: GestureStateChangeEvent) => void; onEnd?: (event: GestureStateChangeEvent, success: boolean) => void; onFinalize?: (event: GestureStateChangeEvent, success: boolean) => void; onUpdate?: (event: GestureUpdateEvent) => void; onTouchesDown?: TouchEventHandlerType; onTouchesMove?: TouchEventHandlerType; onTouchesUp?: TouchEventHandlerType; onTouchesCancelled?: TouchEventHandlerType; isWorklet: boolean[]; }; export declare const CALLBACK_TYPE: { readonly UNDEFINED: 0; readonly BEGAN: 1; readonly START: 2; readonly UPDATE: 3; readonly END: 4; readonly FINALIZE: 5; readonly TOUCHES_DOWN: 6; readonly TOUCHES_MOVE: 7; readonly TOUCHES_UP: 8; readonly TOUCHES_CANCELLED: 9; }; export declare type CALLBACK_TYPE = typeof CALLBACK_TYPE[keyof typeof CALLBACK_TYPE]; export declare abstract class Gesture { /** * Return array of gestures, providing the same interface for creating and updating * handlers, no matter which object was used to create gesture instance. */ abstract toGestureArray(): GestureType[]; /** * Assign handlerTag to the gesture instance and set ref.current (if a ref is set) */ abstract initialize(): void; /** * Make sure that values of properties defining relations are arrays. Do any necessary * preprocessing required to configure relations between handlers. Called just before * updating the handler on the native side. */ abstract prepare(): void; } export declare abstract class BaseGesture> extends Gesture { handlerTag: number; handlerName: string; config: BaseGestureConfig; handlers: HandlerCallbacks; private addDependency; withRef(ref: React.MutableRefObject): this; protected isWorklet(callback: TouchEventHandlerType | ((event: GestureUpdateEvent) => void) | ((event: GestureStateChangeEvent) => void)): boolean; onBegin(callback: (event: GestureStateChangeEvent) => void): this; onStart(callback: (event: GestureStateChangeEvent) => void): this; onEnd(callback: (event: GestureStateChangeEvent, success: boolean) => void): this; onFinalize(callback: (event: GestureStateChangeEvent, success: boolean) => void): this; onTouchesDown(callback: TouchEventHandlerType): this; onTouchesMove(callback: TouchEventHandlerType): this; onTouchesUp(callback: TouchEventHandlerType): this; onTouchesCancelled(callback: TouchEventHandlerType): this; enabled(enabled: boolean): this; shouldCancelWhenOutside(value: boolean): this; hitSlop(hitSlop: HitSlop): this; simultaneousWithExternalGesture(...gestures: Exclude[]): this; requireExternalGestureToFail(...gestures: Exclude[]): this; initialize(): void; toGestureArray(): GestureType[]; prepare(): void; } export declare abstract class ContinousBaseGesture> extends BaseGesture { onUpdate(callback: (event: GestureUpdateEvent) => void): this; manualActivation(manualActivation: boolean): this; } export {};