// Copyright 2025 The Lynx Authors. All rights reserved. // Licensed under the Apache License Version 2.0 that can be found in the // LICENSE file in the root directory of this source tree. import type { Worklet } from '@lynx-js/react/worklet-runtime/bindings'; export const GestureTypeInner = { COMPOSED: -1, PAN: 0, FLING: 1, DEFAULT: 2, TAP: 3, LONGPRESS: 4, ROTATION: 5, PINCH: 6, NATIVE: 7, } as const; export type GestureTypeInner = (typeof GestureTypeInner)[keyof typeof GestureTypeInner]; export interface GestureKind { type: GestureTypeInner; __isSerialized?: boolean; __isGesture?: boolean; } export interface ComposedGesture extends GestureKind { type: (typeof GestureTypeInner)['COMPOSED']; gestures: GestureKind[]; } export interface BaseGesture extends GestureKind { id: number; callbacks: Record; waitFor: BaseGesture[]; simultaneousWith: BaseGesture[]; continueWith: BaseGesture[]; config?: Record; } export interface GestureConfig { callbacks: { name: string; callback: Worklet; }[]; config?: Record; }