react-native-gesture-handler 2.27.0 → 2.27.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ReanimatedSwipeable/package.json +4 -4
- package/android/build.gradle +8 -1
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandler.kt +14 -8
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt +10 -5
- package/apple/RNGestureHandler.h +4 -0
- package/apple/RNGestureHandler.mm +41 -6
- package/jestSetup.js +22 -3
- package/lib/commonjs/ActionType.js +15 -0
- package/lib/commonjs/ActionType.js.map +1 -0
- package/lib/commonjs/Directions.js +31 -0
- package/lib/commonjs/Directions.js.map +1 -0
- package/lib/commonjs/EnableNewWebImplementation.js +40 -0
- package/lib/commonjs/EnableNewWebImplementation.js.map +1 -0
- package/lib/commonjs/GestureHandlerRootViewContext.js +10 -0
- package/lib/commonjs/GestureHandlerRootViewContext.js.map +1 -0
- package/lib/commonjs/PlatformConstants.js +9 -0
- package/lib/commonjs/PlatformConstants.js.map +1 -0
- package/lib/commonjs/PlatformConstants.web.js +12 -0
- package/lib/commonjs/PlatformConstants.web.js.map +1 -0
- package/lib/commonjs/PointerType.js +15 -0
- package/lib/commonjs/PointerType.js.map +1 -0
- package/lib/commonjs/RNGestureHandlerModule.js +12 -0
- package/lib/commonjs/RNGestureHandlerModule.js.map +1 -0
- package/lib/commonjs/RNGestureHandlerModule.web.js +95 -0
- package/lib/commonjs/RNGestureHandlerModule.web.js.map +1 -0
- package/lib/commonjs/RNGestureHandlerModule.windows.js +56 -0
- package/lib/commonjs/RNGestureHandlerModule.windows.js.map +1 -0
- package/lib/commonjs/RNRenderer.js +14 -0
- package/lib/commonjs/RNRenderer.js.map +1 -0
- package/lib/commonjs/RNRenderer.web.js +10 -0
- package/lib/commonjs/RNRenderer.web.js.map +1 -0
- package/lib/commonjs/State.js +19 -0
- package/lib/commonjs/State.js.map +1 -0
- package/lib/commonjs/TouchEventType.js +16 -0
- package/lib/commonjs/TouchEventType.js.map +1 -0
- package/lib/commonjs/components/DrawerLayout.js +548 -0
- package/lib/commonjs/components/DrawerLayout.js.map +1 -0
- package/lib/commonjs/components/GestureButtons.js +211 -0
- package/lib/commonjs/components/GestureButtons.js.map +1 -0
- package/lib/commonjs/components/GestureButtonsProps.js +6 -0
- package/lib/commonjs/components/GestureButtonsProps.js.map +1 -0
- package/lib/commonjs/components/GestureComponents.js +106 -0
- package/lib/commonjs/components/GestureComponents.js.map +1 -0
- package/lib/commonjs/components/GestureComponents.web.js +39 -0
- package/lib/commonjs/components/GestureComponents.web.js.map +1 -0
- package/lib/commonjs/components/GestureHandlerButton.js +10 -0
- package/lib/commonjs/components/GestureHandlerButton.js.map +1 -0
- package/lib/commonjs/components/GestureHandlerButton.web.js +16 -0
- package/lib/commonjs/components/GestureHandlerButton.web.js.map +1 -0
- package/lib/commonjs/components/GestureHandlerRootView.android.js +36 -0
- package/lib/commonjs/components/GestureHandlerRootView.android.js.map +1 -0
- package/lib/commonjs/components/GestureHandlerRootView.js +35 -0
- package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -0
- package/lib/commonjs/components/GestureHandlerRootView.web.js +30 -0
- package/lib/commonjs/components/GestureHandlerRootView.web.js.map +1 -0
- package/lib/commonjs/components/Pressable/Pressable.js +266 -0
- package/lib/commonjs/components/Pressable/Pressable.js.map +1 -0
- package/lib/commonjs/components/Pressable/PressableProps.js +6 -0
- package/lib/commonjs/components/Pressable/PressableProps.js.map +1 -0
- package/lib/commonjs/components/Pressable/StateMachine.js +44 -0
- package/lib/commonjs/components/Pressable/StateMachine.js.map +1 -0
- package/lib/commonjs/components/Pressable/index.js +14 -0
- package/lib/commonjs/components/Pressable/index.js.map +1 -0
- package/lib/commonjs/components/Pressable/stateDefinitions.js +87 -0
- package/lib/commonjs/components/Pressable/stateDefinitions.js.map +1 -0
- package/lib/commonjs/components/Pressable/utils.js +92 -0
- package/lib/commonjs/components/Pressable/utils.js.map +1 -0
- package/lib/commonjs/components/ReanimatedDrawerLayout.js +357 -0
- package/lib/commonjs/components/ReanimatedDrawerLayout.js.map +1 -0
- package/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeable.js +337 -0
- package/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeable.js.map +1 -0
- package/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeableProps.js +12 -0
- package/lib/commonjs/components/ReanimatedSwipeable/ReanimatedSwipeableProps.js.map +1 -0
- package/lib/commonjs/components/ReanimatedSwipeable/index.js +21 -0
- package/lib/commonjs/components/ReanimatedSwipeable/index.js.map +1 -0
- package/lib/commonjs/components/Swipeable.js +370 -0
- package/lib/commonjs/components/Swipeable.js.map +1 -0
- package/lib/commonjs/components/Text.js +60 -0
- package/lib/commonjs/components/Text.js.map +1 -0
- package/lib/commonjs/components/gestureHandlerRootHOC.js +34 -0
- package/lib/commonjs/components/gestureHandlerRootHOC.js.map +1 -0
- package/lib/commonjs/components/touchables/ExtraButtonProps.js +2 -0
- package/lib/commonjs/components/touchables/ExtraButtonProps.js.map +1 -0
- package/lib/commonjs/components/touchables/GenericTouchable.js +245 -0
- package/lib/commonjs/components/touchables/GenericTouchable.js.map +1 -0
- package/lib/commonjs/components/touchables/GenericTouchableProps.js +6 -0
- package/lib/commonjs/components/touchables/GenericTouchableProps.js.map +1 -0
- package/lib/commonjs/components/touchables/TouchableHighlight.js +93 -0
- package/lib/commonjs/components/touchables/TouchableHighlight.js.map +1 -0
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +84 -0
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +1 -0
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +13 -0
- package/lib/commonjs/components/touchables/TouchableNativeFeedback.js.map +1 -0
- package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js +6 -0
- package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js.map +1 -0
- package/lib/commonjs/components/touchables/TouchableOpacity.js +65 -0
- package/lib/commonjs/components/touchables/TouchableOpacity.js.map +1 -0
- package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +33 -0
- package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +1 -0
- package/lib/commonjs/components/touchables/index.js +35 -0
- package/lib/commonjs/components/touchables/index.js.map +1 -0
- package/lib/commonjs/components/utils.js +17 -0
- package/lib/commonjs/components/utils.js.map +1 -0
- package/lib/commonjs/findNodeHandle.js +9 -0
- package/lib/commonjs/findNodeHandle.js.map +1 -0
- package/lib/commonjs/findNodeHandle.web.js +39 -0
- package/lib/commonjs/findNodeHandle.web.js.map +1 -0
- package/lib/commonjs/getShadowNodeFromRef.js +51 -0
- package/lib/commonjs/getShadowNodeFromRef.js.map +1 -0
- package/lib/commonjs/getShadowNodeFromRef.web.js +14 -0
- package/lib/commonjs/getShadowNodeFromRef.web.js.map +1 -0
- package/lib/commonjs/ghQueueMicrotask.js +10 -0
- package/lib/commonjs/ghQueueMicrotask.js.map +1 -0
- package/lib/commonjs/handlers/FlingGestureHandler.js +31 -0
- package/lib/commonjs/handlers/FlingGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/ForceTouchGestureHandler.js +46 -0
- package/lib/commonjs/handlers/ForceTouchGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/GestureHandlerEventPayload.js +6 -0
- package/lib/commonjs/handlers/GestureHandlerEventPayload.js.map +1 -0
- package/lib/commonjs/handlers/LongPressGestureHandler.js +33 -0
- package/lib/commonjs/handlers/LongPressGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/NativeViewGestureHandler.ts +59 -0
- package/lib/commonjs/handlers/PanGestureHandler.js +112 -0
- package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/PinchGestureHandler.js +29 -0
- package/lib/commonjs/handlers/PinchGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/PressabilityDebugView.js +13 -0
- package/lib/commonjs/handlers/PressabilityDebugView.js.map +1 -0
- package/lib/commonjs/handlers/PressabilityDebugView.web.js +11 -0
- package/lib/commonjs/handlers/PressabilityDebugView.web.js.map +1 -0
- package/lib/commonjs/handlers/RotationGestureHandler.js +29 -0
- package/lib/commonjs/handlers/RotationGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/TapGestureHandler.js +33 -0
- package/lib/commonjs/handlers/TapGestureHandler.js.map +1 -0
- package/lib/commonjs/handlers/createHandler.js +393 -0
- package/lib/commonjs/handlers/createHandler.js.map +1 -0
- package/lib/commonjs/handlers/createNativeWrapper.js +78 -0
- package/lib/commonjs/handlers/createNativeWrapper.js.map +1 -0
- package/lib/commonjs/handlers/customDirectEventTypes.js +13 -0
- package/lib/commonjs/handlers/customDirectEventTypes.js.map +1 -0
- package/lib/commonjs/handlers/customDirectEventTypes.web.js +10 -0
- package/lib/commonjs/handlers/customDirectEventTypes.web.js.map +1 -0
- package/lib/commonjs/handlers/gestureHandlerCommon.js +27 -0
- package/lib/commonjs/handlers/gestureHandlerCommon.js.map +1 -0
- package/lib/commonjs/handlers/gestureHandlerTypesCompat.js +6 -0
- package/lib/commonjs/handlers/gestureHandlerTypesCompat.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js +32 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js +41 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js +67 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js +20 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/index.js +125 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/index.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js +22 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/types.js +6 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/types.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js +66 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js +143 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js +47 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js +41 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js +41 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/utils.js +143 -0
- package/lib/commonjs/handlers/gestures/GestureDetector/utils.js.map +1 -0
- package/lib/commonjs/handlers/gestures/eventReceiver.js +106 -0
- package/lib/commonjs/handlers/gestures/eventReceiver.js.map +1 -0
- package/lib/commonjs/handlers/gestures/flingGesture.js +37 -0
- package/lib/commonjs/handlers/gestures/flingGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js +80 -0
- package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/gesture.js +338 -0
- package/lib/commonjs/handlers/gestures/gesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/gestureComposition.js +90 -0
- package/lib/commonjs/handlers/gestures/gestureComposition.js.map +1 -0
- package/lib/commonjs/handlers/gestures/gestureObjects.js +132 -0
- package/lib/commonjs/handlers/gestures/gestureObjects.js.map +1 -0
- package/lib/commonjs/handlers/gestures/gestureStateManager.js +69 -0
- package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +1 -0
- package/lib/commonjs/handlers/gestures/gestureStateManager.web.js +27 -0
- package/lib/commonjs/handlers/gestures/gestureStateManager.web.js.map +1 -0
- package/lib/commonjs/handlers/gestures/hoverGesture.js +57 -0
- package/lib/commonjs/handlers/gestures/hoverGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/longPressGesture.js +46 -0
- package/lib/commonjs/handlers/gestures/longPressGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/manualGesture.js +25 -0
- package/lib/commonjs/handlers/gestures/manualGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/nativeGesture.ts +33 -0
- package/lib/commonjs/handlers/gestures/panGesture.js +197 -0
- package/lib/commonjs/handlers/gestures/panGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/pinchGesture.js +38 -0
- package/lib/commonjs/handlers/gestures/pinchGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/reanimatedWrapper.js +29 -0
- package/lib/commonjs/handlers/gestures/reanimatedWrapper.js.map +1 -0
- package/lib/commonjs/handlers/gestures/rotationGesture.js +38 -0
- package/lib/commonjs/handlers/gestures/rotationGesture.js.map +1 -0
- package/lib/commonjs/handlers/gestures/tapGesture.js +87 -0
- package/lib/commonjs/handlers/gestures/tapGesture.js.map +1 -0
- package/lib/commonjs/handlers/getNextHandlerTag.js +11 -0
- package/lib/commonjs/handlers/getNextHandlerTag.js.map +1 -0
- package/lib/commonjs/handlers/handlersRegistry.js +50 -0
- package/lib/commonjs/handlers/handlersRegistry.js.map +1 -0
- package/lib/commonjs/handlers/utils.js +69 -0
- package/lib/commonjs/handlers/utils.js.map +1 -0
- package/lib/commonjs/index.js +269 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/init.js +25 -0
- package/lib/commonjs/init.js.map +1 -0
- package/lib/commonjs/jestUtils/index.js +19 -0
- package/lib/commonjs/jestUtils/index.js.map +1 -0
- package/lib/commonjs/jestUtils/jestUtils.js +316 -0
- package/lib/commonjs/jestUtils/jestUtils.js.map +1 -0
- package/lib/commonjs/mocks/Pressable.js +13 -0
- package/lib/commonjs/mocks/Pressable.js.map +1 -0
- package/lib/commonjs/mocks/mocks.js +70 -0
- package/lib/commonjs/mocks/mocks.js.map +1 -0
- package/lib/commonjs/mountRegistry.js +37 -0
- package/lib/commonjs/mountRegistry.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.ts +26 -0
- package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.ts +22 -0
- package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.ts +6 -0
- package/lib/commonjs/typeUtils.js +2 -0
- package/lib/commonjs/typeUtils.js.map +1 -0
- package/lib/commonjs/utils.js +95 -0
- package/lib/commonjs/utils.js.map +1 -0
- package/lib/commonjs/web/Gestures.js +48 -0
- package/lib/commonjs/web/Gestures.js.map +1 -0
- package/lib/commonjs/web/constants.js +9 -0
- package/lib/commonjs/web/constants.js.map +1 -0
- package/lib/commonjs/web/detectors/RotationGestureDetector.js +124 -0
- package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +1 -0
- package/lib/commonjs/web/detectors/ScaleGestureDetector.js +111 -0
- package/lib/commonjs/web/detectors/ScaleGestureDetector.js.map +1 -0
- package/lib/commonjs/web/handlers/FlingGestureHandler.js +143 -0
- package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -0
- package/lib/commonjs/web/handlers/GestureHandler.js +687 -0
- package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -0
- package/lib/commonjs/web/handlers/HoverGestureHandler.js +45 -0
- package/lib/commonjs/web/handlers/HoverGestureHandler.js.map +1 -0
- package/lib/commonjs/web/handlers/IGestureHandler.js +2 -0
- package/lib/commonjs/web/handlers/IGestureHandler.js.map +1 -0
- package/lib/commonjs/web/handlers/LongPressGestureHandler.js +146 -0
- package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +1 -0
- package/lib/commonjs/web/handlers/ManualGestureHandler.js +38 -0
- package/lib/commonjs/web/handlers/ManualGestureHandler.js.map +1 -0
- package/lib/commonjs/web/handlers/NativeViewGestureHandler.ts +175 -0
- package/lib/commonjs/web/handlers/PanGestureHandler.js +399 -0
- package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -0
- package/lib/commonjs/web/handlers/PinchGestureHandler.js +122 -0
- package/lib/commonjs/web/handlers/PinchGestureHandler.js.map +1 -0
- package/lib/commonjs/web/handlers/RotationGestureHandler.js +129 -0
- package/lib/commonjs/web/handlers/RotationGestureHandler.js.map +1 -0
- package/lib/commonjs/web/handlers/TapGestureHandler.js +215 -0
- package/lib/commonjs/web/handlers/TapGestureHandler.js.map +1 -0
- package/lib/commonjs/web/interfaces.js +32 -0
- package/lib/commonjs/web/interfaces.js.map +1 -0
- package/lib/commonjs/web/tools/CircularBuffer.js +40 -0
- package/lib/commonjs/web/tools/CircularBuffer.js.map +1 -0
- package/lib/commonjs/web/tools/EventManager.js +94 -0
- package/lib/commonjs/web/tools/EventManager.js.map +1 -0
- package/lib/commonjs/web/tools/GestureHandlerDelegate.js +6 -0
- package/lib/commonjs/web/tools/GestureHandlerDelegate.js.map +1 -0
- package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +267 -0
- package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -0
- package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +170 -0
- package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +1 -0
- package/lib/commonjs/web/tools/InteractionManager.js +96 -0
- package/lib/commonjs/web/tools/InteractionManager.js.map +1 -0
- package/lib/commonjs/web/tools/KeyboardEventManager.js +82 -0
- package/lib/commonjs/web/tools/KeyboardEventManager.js.map +1 -0
- package/lib/commonjs/web/tools/LeastSquareSolver.js +159 -0
- package/lib/commonjs/web/tools/LeastSquareSolver.js.map +1 -0
- package/lib/commonjs/web/tools/NodeManager.js +39 -0
- package/lib/commonjs/web/tools/NodeManager.js.map +1 -0
- package/lib/commonjs/web/tools/PointerEventManager.js +189 -0
- package/lib/commonjs/web/tools/PointerEventManager.js.map +1 -0
- package/lib/commonjs/web/tools/PointerTracker.js +192 -0
- package/lib/commonjs/web/tools/PointerTracker.js.map +1 -0
- package/lib/commonjs/web/tools/Vector.js +37 -0
- package/lib/commonjs/web/tools/Vector.js.map +1 -0
- package/lib/commonjs/web/tools/VelocityTracker.js +85 -0
- package/lib/commonjs/web/tools/VelocityTracker.js.map +1 -0
- package/lib/commonjs/web/tools/WheelEventManager.js +55 -0
- package/lib/commonjs/web/tools/WheelEventManager.js.map +1 -0
- package/lib/commonjs/web/utils.js +235 -0
- package/lib/commonjs/web/utils.js.map +1 -0
- package/lib/commonjs/web_hammer/DiscreteGestureHandler.js +93 -0
- package/lib/commonjs/web_hammer/DiscreteGestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/DraggingGestureHandler.js +43 -0
- package/lib/commonjs/web_hammer/DraggingGestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/Errors.js +13 -0
- package/lib/commonjs/web_hammer/Errors.js.map +1 -0
- package/lib/commonjs/web_hammer/FlingGestureHandler.js +139 -0
- package/lib/commonjs/web_hammer/FlingGestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/GestureHandler.js +484 -0
- package/lib/commonjs/web_hammer/GestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js +45 -0
- package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/LongPressGestureHandler.js +57 -0
- package/lib/commonjs/web_hammer/LongPressGestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/NativeViewGestureHandler.ts +47 -0
- package/lib/commonjs/web_hammer/NodeManager.js +41 -0
- package/lib/commonjs/web_hammer/NodeManager.js.map +1 -0
- package/lib/commonjs/web_hammer/PanGestureHandler.js +167 -0
- package/lib/commonjs/web_hammer/PanGestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/PinchGestureHandler.js +31 -0
- package/lib/commonjs/web_hammer/PinchGestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/PressGestureHandler.js +153 -0
- package/lib/commonjs/web_hammer/PressGestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/RotationGestureHandler.js +32 -0
- package/lib/commonjs/web_hammer/RotationGestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/TapGestureHandler.js +165 -0
- package/lib/commonjs/web_hammer/TapGestureHandler.js.map +1 -0
- package/lib/commonjs/web_hammer/constants.js +51 -0
- package/lib/commonjs/web_hammer/constants.js.map +1 -0
- package/lib/commonjs/web_hammer/utils.js +32 -0
- package/lib/commonjs/web_hammer/utils.js.map +1 -0
- package/lib/module/ActionType.js +11 -0
- package/lib/module/ActionType.js.map +1 -0
- package/lib/module/Directions.js +27 -0
- package/lib/module/Directions.js.map +1 -0
- package/lib/module/EnableNewWebImplementation.js +34 -0
- package/lib/module/EnableNewWebImplementation.js.map +1 -0
- package/lib/module/GestureHandlerRootViewContext.js +5 -0
- package/lib/module/GestureHandlerRootViewContext.js.map +1 -0
- package/lib/module/PlatformConstants.js +5 -0
- package/lib/module/PlatformConstants.js.map +1 -0
- package/lib/module/PlatformConstants.web.js +8 -0
- package/lib/module/PlatformConstants.web.js.map +1 -0
- package/lib/module/PointerType.js +11 -0
- package/lib/module/PointerType.js.map +1 -0
- package/lib/module/RNGestureHandlerModule.js +8 -0
- package/lib/module/RNGestureHandlerModule.js.map +1 -0
- package/lib/module/RNGestureHandlerModule.web.js +90 -0
- package/lib/module/RNGestureHandlerModule.web.js.map +1 -0
- package/lib/module/RNGestureHandlerModule.windows.js +50 -0
- package/lib/module/RNGestureHandlerModule.windows.js.map +1 -0
- package/lib/module/RNRenderer.js +6 -0
- package/lib/module/RNRenderer.js.map +1 -0
- package/lib/module/RNRenderer.web.js +6 -0
- package/lib/module/RNRenderer.web.js.map +1 -0
- package/lib/module/State.js +15 -0
- package/lib/module/State.js.map +1 -0
- package/lib/module/TouchEventType.js +12 -0
- package/lib/module/TouchEventType.js.map +1 -0
- package/lib/module/components/DrawerLayout.js +541 -0
- package/lib/module/components/DrawerLayout.js.map +1 -0
- package/lib/module/components/GestureButtons.js +199 -0
- package/lib/module/components/GestureButtons.js.map +1 -0
- package/lib/module/components/GestureButtonsProps.js +4 -0
- package/lib/module/components/GestureButtonsProps.js.map +1 -0
- package/lib/module/components/GestureComponents.js +100 -0
- package/lib/module/components/GestureComponents.js.map +1 -0
- package/lib/module/components/GestureComponents.web.js +32 -0
- package/lib/module/components/GestureComponents.web.js.map +1 -0
- package/lib/module/components/GestureHandlerButton.js +5 -0
- package/lib/module/components/GestureHandlerButton.js.map +1 -0
- package/lib/module/components/GestureHandlerButton.web.js +11 -0
- package/lib/module/components/GestureHandlerButton.web.js.map +1 -0
- package/lib/module/components/GestureHandlerRootView.android.js +30 -0
- package/lib/module/components/GestureHandlerRootView.android.js.map +1 -0
- package/lib/module/components/GestureHandlerRootView.js +29 -0
- package/lib/module/components/GestureHandlerRootView.js.map +1 -0
- package/lib/module/components/GestureHandlerRootView.web.js +24 -0
- package/lib/module/components/GestureHandlerRootView.web.js.map +1 -0
- package/lib/module/components/Pressable/Pressable.js +260 -0
- package/lib/module/components/Pressable/Pressable.js.map +1 -0
- package/lib/module/components/Pressable/PressableProps.js +4 -0
- package/lib/module/components/Pressable/PressableProps.js.map +1 -0
- package/lib/module/components/Pressable/StateMachine.js +40 -0
- package/lib/module/components/Pressable/StateMachine.js.map +1 -0
- package/lib/module/components/Pressable/index.js +4 -0
- package/lib/module/components/Pressable/index.js.map +1 -0
- package/lib/module/components/Pressable/stateDefinitions.js +82 -0
- package/lib/module/components/Pressable/stateDefinitions.js.map +1 -0
- package/lib/module/components/Pressable/utils.js +84 -0
- package/lib/module/components/Pressable/utils.js.map +1 -0
- package/lib/module/components/ReanimatedDrawerLayout.js +352 -0
- package/lib/module/components/ReanimatedDrawerLayout.js.map +1 -0
- package/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeable.js +332 -0
- package/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeable.js.map +1 -0
- package/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeableProps.js +8 -0
- package/lib/module/components/ReanimatedSwipeable/ReanimatedSwipeableProps.js.map +1 -0
- package/lib/module/components/ReanimatedSwipeable/index.js +5 -0
- package/lib/module/components/ReanimatedSwipeable/index.js.map +1 -0
- package/lib/module/components/Swipeable.js +364 -0
- package/lib/module/components/Swipeable.js.map +1 -0
- package/lib/module/components/Text.js +55 -0
- package/lib/module/components/Text.js.map +1 -0
- package/lib/module/components/gestureHandlerRootHOC.js +28 -0
- package/lib/module/components/gestureHandlerRootHOC.js.map +1 -0
- package/lib/module/components/touchables/ExtraButtonProps.js +2 -0
- package/lib/module/components/touchables/ExtraButtonProps.js.map +1 -0
- package/lib/module/components/touchables/GenericTouchable.js +239 -0
- package/lib/module/components/touchables/GenericTouchable.js.map +1 -0
- package/lib/module/components/touchables/GenericTouchableProps.js +4 -0
- package/lib/module/components/touchables/GenericTouchableProps.js.map +1 -0
- package/lib/module/components/touchables/TouchableHighlight.js +87 -0
- package/lib/module/components/touchables/TouchableHighlight.js.map +1 -0
- package/lib/module/components/touchables/TouchableNativeFeedback.android.js +77 -0
- package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +1 -0
- package/lib/module/components/touchables/TouchableNativeFeedback.js +10 -0
- package/lib/module/components/touchables/TouchableNativeFeedback.js.map +1 -0
- package/lib/module/components/touchables/TouchableNativeFeedbackProps.js +4 -0
- package/lib/module/components/touchables/TouchableNativeFeedbackProps.js.map +1 -0
- package/lib/module/components/touchables/TouchableOpacity.js +59 -0
- package/lib/module/components/touchables/TouchableOpacity.js.map +1 -0
- package/lib/module/components/touchables/TouchableWithoutFeedback.js +27 -0
- package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +1 -0
- package/lib/module/components/touchables/index.js +7 -0
- package/lib/module/components/touchables/index.js.map +1 -0
- package/lib/module/components/utils.js +13 -0
- package/lib/module/components/utils.js.map +1 -0
- package/lib/module/findNodeHandle.js +5 -0
- package/lib/module/findNodeHandle.js.map +1 -0
- package/lib/module/findNodeHandle.web.js +35 -0
- package/lib/module/findNodeHandle.web.js.map +1 -0
- package/lib/module/getShadowNodeFromRef.js +47 -0
- package/lib/module/getShadowNodeFromRef.js.map +1 -0
- package/lib/module/getShadowNodeFromRef.web.js +10 -0
- package/lib/module/getShadowNodeFromRef.web.js.map +1 -0
- package/lib/module/ghQueueMicrotask.js +6 -0
- package/lib/module/ghQueueMicrotask.js.map +1 -0
- package/lib/module/handlers/FlingGestureHandler.js +26 -0
- package/lib/module/handlers/FlingGestureHandler.js.map +1 -0
- package/lib/module/handlers/ForceTouchGestureHandler.js +41 -0
- package/lib/module/handlers/ForceTouchGestureHandler.js.map +1 -0
- package/lib/module/handlers/GestureHandlerEventPayload.js +4 -0
- package/lib/module/handlers/GestureHandlerEventPayload.js.map +1 -0
- package/lib/module/handlers/LongPressGestureHandler.js +28 -0
- package/lib/module/handlers/LongPressGestureHandler.js.map +1 -0
- package/lib/module/handlers/NativeViewGestureHandler.ts +59 -0
- package/lib/module/handlers/PanGestureHandler.js +105 -0
- package/lib/module/handlers/PanGestureHandler.js.map +1 -0
- package/lib/module/handlers/PinchGestureHandler.js +25 -0
- package/lib/module/handlers/PinchGestureHandler.js.map +1 -0
- package/lib/module/handlers/PressabilityDebugView.js +5 -0
- package/lib/module/handlers/PressabilityDebugView.js.map +1 -0
- package/lib/module/handlers/PressabilityDebugView.web.js +7 -0
- package/lib/module/handlers/PressabilityDebugView.web.js.map +1 -0
- package/lib/module/handlers/RotationGestureHandler.js +25 -0
- package/lib/module/handlers/RotationGestureHandler.js.map +1 -0
- package/lib/module/handlers/TapGestureHandler.js +28 -0
- package/lib/module/handlers/TapGestureHandler.js.map +1 -0
- package/lib/module/handlers/createHandler.js +387 -0
- package/lib/module/handlers/createHandler.js.map +1 -0
- package/lib/module/handlers/createNativeWrapper.js +75 -0
- package/lib/module/handlers/createNativeWrapper.js.map +1 -0
- package/lib/module/handlers/customDirectEventTypes.js +5 -0
- package/lib/module/handlers/customDirectEventTypes.js.map +1 -0
- package/lib/module/handlers/customDirectEventTypes.web.js +7 -0
- package/lib/module/handlers/customDirectEventTypes.web.js.map +1 -0
- package/lib/module/handlers/gestureHandlerCommon.js +26 -0
- package/lib/module/handlers/gestureHandlerCommon.js.map +1 -0
- package/lib/module/handlers/gestureHandlerTypesCompat.js +4 -0
- package/lib/module/handlers/gestureHandlerTypesCompat.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/Wrap.js +26 -0
- package/lib/module/handlers/gestures/GestureDetector/Wrap.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js +36 -0
- package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js +62 -0
- package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js +15 -0
- package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/index.js +117 -0
- package/lib/module/handlers/gestures/GestureDetector/index.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js +18 -0
- package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/types.js +4 -0
- package/lib/module/handlers/gestures/GestureDetector/types.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js +61 -0
- package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js +139 -0
- package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js +43 -0
- package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js +37 -0
- package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js +36 -0
- package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -0
- package/lib/module/handlers/gestures/GestureDetector/utils.js +134 -0
- package/lib/module/handlers/gestures/GestureDetector/utils.js.map +1 -0
- package/lib/module/handlers/gestures/eventReceiver.js +100 -0
- package/lib/module/handlers/gestures/eventReceiver.js.map +1 -0
- package/lib/module/handlers/gestures/flingGesture.js +32 -0
- package/lib/module/handlers/gestures/flingGesture.js.map +1 -0
- package/lib/module/handlers/gestures/forceTouchGesture.js +76 -0
- package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -0
- package/lib/module/handlers/gestures/gesture.js +332 -0
- package/lib/module/handlers/gestures/gesture.js.map +1 -0
- package/lib/module/handlers/gestures/gestureComposition.js +83 -0
- package/lib/module/handlers/gestures/gestureComposition.js.map +1 -0
- package/lib/module/handlers/gestures/gestureObjects.js +129 -0
- package/lib/module/handlers/gestures/gestureObjects.js.map +1 -0
- package/lib/module/handlers/gestures/gestureStateManager.js +65 -0
- package/lib/module/handlers/gestures/gestureStateManager.js.map +1 -0
- package/lib/module/handlers/gestures/gestureStateManager.web.js +22 -0
- package/lib/module/handlers/gestures/gestureStateManager.web.js.map +1 -0
- package/lib/module/handlers/gestures/hoverGesture.js +52 -0
- package/lib/module/handlers/gestures/hoverGesture.js.map +1 -0
- package/lib/module/handlers/gestures/longPressGesture.js +41 -0
- package/lib/module/handlers/gestures/longPressGesture.js.map +1 -0
- package/lib/module/handlers/gestures/manualGesture.js +20 -0
- package/lib/module/handlers/gestures/manualGesture.js.map +1 -0
- package/lib/module/handlers/gestures/nativeGesture.ts +33 -0
- package/lib/module/handlers/gestures/panGesture.js +192 -0
- package/lib/module/handlers/gestures/panGesture.js.map +1 -0
- package/lib/module/handlers/gestures/pinchGesture.js +33 -0
- package/lib/module/handlers/gestures/pinchGesture.js.map +1 -0
- package/lib/module/handlers/gestures/reanimatedWrapper.js +26 -0
- package/lib/module/handlers/gestures/reanimatedWrapper.js.map +1 -0
- package/lib/module/handlers/gestures/rotationGesture.js +33 -0
- package/lib/module/handlers/gestures/rotationGesture.js.map +1 -0
- package/lib/module/handlers/gestures/tapGesture.js +82 -0
- package/lib/module/handlers/gestures/tapGesture.js.map +1 -0
- package/lib/module/handlers/getNextHandlerTag.js +7 -0
- package/lib/module/handlers/getNextHandlerTag.js.map +1 -0
- package/lib/module/handlers/handlersRegistry.js +39 -0
- package/lib/module/handlers/handlersRegistry.js.map +1 -0
- package/lib/module/handlers/utils.js +61 -0
- package/lib/module/handlers/utils.js.map +1 -0
- package/lib/module/index.js +31 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/init.js +19 -0
- package/lib/module/init.js.map +1 -0
- package/lib/module/jestUtils/index.js +4 -0
- package/lib/module/jestUtils/index.js.map +1 -0
- package/lib/module/jestUtils/jestUtils.js +311 -0
- package/lib/module/jestUtils/jestUtils.js.map +1 -0
- package/lib/module/mocks/Pressable.js +4 -0
- package/lib/module/mocks/Pressable.js.map +1 -0
- package/lib/module/mocks/mocks.js +64 -0
- package/lib/module/mocks/mocks.js.map +1 -0
- package/lib/module/mountRegistry.js +32 -0
- package/lib/module/mountRegistry.js.map +1 -0
- package/lib/module/specs/NativeRNGestureHandlerModule.ts +26 -0
- package/lib/module/specs/RNGestureHandlerButtonNativeComponent.ts +22 -0
- package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.ts +6 -0
- package/lib/module/typeUtils.js +2 -0
- package/lib/module/typeUtils.js.map +1 -0
- package/lib/module/utils.js +81 -0
- package/lib/module/utils.js.map +1 -0
- package/lib/module/web/Gestures.js +42 -0
- package/lib/module/web/Gestures.js.map +1 -0
- package/lib/module/web/constants.js +5 -0
- package/lib/module/web/constants.js.map +1 -0
- package/lib/module/web/detectors/RotationGestureDetector.js +119 -0
- package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -0
- package/lib/module/web/detectors/ScaleGestureDetector.js +106 -0
- package/lib/module/web/detectors/ScaleGestureDetector.js.map +1 -0
- package/lib/module/web/handlers/FlingGestureHandler.js +137 -0
- package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -0
- package/lib/module/web/handlers/GestureHandler.js +680 -0
- package/lib/module/web/handlers/GestureHandler.js.map +1 -0
- package/lib/module/web/handlers/HoverGestureHandler.js +39 -0
- package/lib/module/web/handlers/HoverGestureHandler.js.map +1 -0
- package/lib/module/web/handlers/IGestureHandler.js +2 -0
- package/lib/module/web/handlers/IGestureHandler.js.map +1 -0
- package/lib/module/web/handlers/LongPressGestureHandler.js +140 -0
- package/lib/module/web/handlers/LongPressGestureHandler.js.map +1 -0
- package/lib/module/web/handlers/ManualGestureHandler.js +32 -0
- package/lib/module/web/handlers/ManualGestureHandler.js.map +1 -0
- package/lib/module/web/handlers/NativeViewGestureHandler.ts +175 -0
- package/lib/module/web/handlers/PanGestureHandler.js +393 -0
- package/lib/module/web/handlers/PanGestureHandler.js.map +1 -0
- package/lib/module/web/handlers/PinchGestureHandler.js +116 -0
- package/lib/module/web/handlers/PinchGestureHandler.js.map +1 -0
- package/lib/module/web/handlers/RotationGestureHandler.js +123 -0
- package/lib/module/web/handlers/RotationGestureHandler.js.map +1 -0
- package/lib/module/web/handlers/TapGestureHandler.js +209 -0
- package/lib/module/web/handlers/TapGestureHandler.js.map +1 -0
- package/lib/module/web/interfaces.js +28 -0
- package/lib/module/web/interfaces.js.map +1 -0
- package/lib/module/web/tools/CircularBuffer.js +35 -0
- package/lib/module/web/tools/CircularBuffer.js.map +1 -0
- package/lib/module/web/tools/EventManager.js +89 -0
- package/lib/module/web/tools/EventManager.js.map +1 -0
- package/lib/module/web/tools/GestureHandlerDelegate.js +4 -0
- package/lib/module/web/tools/GestureHandlerDelegate.js.map +1 -0
- package/lib/module/web/tools/GestureHandlerOrchestrator.js +261 -0
- package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -0
- package/lib/module/web/tools/GestureHandlerWebDelegate.js +164 -0
- package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +1 -0
- package/lib/module/web/tools/InteractionManager.js +91 -0
- package/lib/module/web/tools/InteractionManager.js.map +1 -0
- package/lib/module/web/tools/KeyboardEventManager.js +76 -0
- package/lib/module/web/tools/KeyboardEventManager.js.map +1 -0
- package/lib/module/web/tools/LeastSquareSolver.js +154 -0
- package/lib/module/web/tools/LeastSquareSolver.js.map +1 -0
- package/lib/module/web/tools/NodeManager.js +34 -0
- package/lib/module/web/tools/NodeManager.js.map +1 -0
- package/lib/module/web/tools/PointerEventManager.js +183 -0
- package/lib/module/web/tools/PointerEventManager.js.map +1 -0
- package/lib/module/web/tools/PointerTracker.js +186 -0
- package/lib/module/web/tools/PointerTracker.js.map +1 -0
- package/lib/module/web/tools/Vector.js +32 -0
- package/lib/module/web/tools/Vector.js.map +1 -0
- package/lib/module/web/tools/VelocityTracker.js +79 -0
- package/lib/module/web/tools/VelocityTracker.js.map +1 -0
- package/lib/module/web/tools/WheelEventManager.js +49 -0
- package/lib/module/web/tools/WheelEventManager.js.map +1 -0
- package/lib/module/web/utils.js +223 -0
- package/lib/module/web/utils.js.map +1 -0
- package/lib/module/web_hammer/DiscreteGestureHandler.js +87 -0
- package/lib/module/web_hammer/DiscreteGestureHandler.js.map +1 -0
- package/lib/module/web_hammer/DraggingGestureHandler.js +37 -0
- package/lib/module/web_hammer/DraggingGestureHandler.js.map +1 -0
- package/lib/module/web_hammer/Errors.js +8 -0
- package/lib/module/web_hammer/Errors.js.map +1 -0
- package/lib/module/web_hammer/FlingGestureHandler.js +133 -0
- package/lib/module/web_hammer/FlingGestureHandler.js.map +1 -0
- package/lib/module/web_hammer/GestureHandler.js +478 -0
- package/lib/module/web_hammer/GestureHandler.js.map +1 -0
- package/lib/module/web_hammer/IndiscreteGestureHandler.js +41 -0
- package/lib/module/web_hammer/IndiscreteGestureHandler.js.map +1 -0
- package/lib/module/web_hammer/LongPressGestureHandler.js +51 -0
- package/lib/module/web_hammer/LongPressGestureHandler.js.map +1 -0
- package/lib/module/web_hammer/NativeViewGestureHandler.ts +47 -0
- package/lib/module/web_hammer/NodeManager.js +33 -0
- package/lib/module/web_hammer/NodeManager.js.map +1 -0
- package/lib/module/web_hammer/PanGestureHandler.js +162 -0
- package/lib/module/web_hammer/PanGestureHandler.js.map +1 -0
- package/lib/module/web_hammer/PinchGestureHandler.js +26 -0
- package/lib/module/web_hammer/PinchGestureHandler.js.map +1 -0
- package/lib/module/web_hammer/PressGestureHandler.js +148 -0
- package/lib/module/web_hammer/PressGestureHandler.js.map +1 -0
- package/lib/module/web_hammer/RotationGestureHandler.js +27 -0
- package/lib/module/web_hammer/RotationGestureHandler.js.map +1 -0
- package/lib/module/web_hammer/TapGestureHandler.js +160 -0
- package/lib/module/web_hammer/TapGestureHandler.js.map +1 -0
- package/lib/module/web_hammer/constants.js +46 -0
- package/lib/module/web_hammer/constants.js.map +1 -0
- package/lib/module/web_hammer/utils.js +21 -0
- package/lib/module/web_hammer/utils.js.map +1 -0
- package/lib/typescript/ActionType.d.ts +8 -0
- package/lib/typescript/ActionType.d.ts.map +1 -0
- package/lib/typescript/Directions.d.ts +15 -0
- package/lib/typescript/Directions.d.ts.map +1 -0
- package/lib/typescript/EnableNewWebImplementation.d.ts +10 -0
- package/lib/typescript/EnableNewWebImplementation.d.ts.map +1 -0
- package/lib/typescript/GestureHandlerRootViewContext.d.ts +4 -0
- package/lib/typescript/GestureHandlerRootViewContext.d.ts.map +1 -0
- package/lib/typescript/PlatformConstants.d.ts +6 -0
- package/lib/typescript/PlatformConstants.d.ts.map +1 -0
- package/lib/typescript/PlatformConstants.web.d.ts +5 -0
- package/lib/typescript/PlatformConstants.web.d.ts.map +1 -0
- package/lib/typescript/PointerType.d.ts +8 -0
- package/lib/typescript/PointerType.d.ts.map +1 -0
- package/lib/typescript/RNGestureHandlerModule.d.ts +3 -0
- package/lib/typescript/RNGestureHandlerModule.d.ts.map +1 -0
- package/lib/typescript/RNGestureHandlerModule.web.d.ts +16 -0
- package/lib/typescript/RNGestureHandlerModule.web.d.ts.map +1 -0
- package/lib/typescript/RNGestureHandlerModule.windows.d.ts +33 -0
- package/lib/typescript/RNGestureHandlerModule.windows.d.ts.map +1 -0
- package/lib/typescript/RNRenderer.d.ts +2 -0
- package/lib/typescript/RNRenderer.d.ts.map +1 -0
- package/lib/typescript/RNRenderer.web.d.ts +4 -0
- package/lib/typescript/RNRenderer.web.d.ts.map +1 -0
- package/lib/typescript/State.d.ts +10 -0
- package/lib/typescript/State.d.ts.map +1 -0
- package/lib/typescript/TouchEventType.d.ts +9 -0
- package/lib/typescript/TouchEventType.d.ts.map +1 -0
- package/lib/typescript/components/DrawerLayout.d.ts +186 -0
- package/lib/typescript/components/DrawerLayout.d.ts.map +1 -0
- package/lib/typescript/components/GestureButtons.d.ts +8 -0
- package/lib/typescript/components/GestureButtons.d.ts.map +1 -0
- package/lib/typescript/components/GestureButtonsProps.d.ts +124 -0
- package/lib/typescript/components/GestureButtonsProps.d.ts.map +1 -0
- package/lib/typescript/components/GestureComponents.d.ts +23 -0
- package/lib/typescript/components/GestureComponents.d.ts.map +1 -0
- package/lib/typescript/components/GestureComponents.web.d.ts +9 -0
- package/lib/typescript/components/GestureComponents.web.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerButton.d.ts +5 -0
- package/lib/typescript/components/GestureHandlerButton.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerButton.web.d.ts +5 -0
- package/lib/typescript/components/GestureHandlerButton.web.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerRootView.android.d.ts +7 -0
- package/lib/typescript/components/GestureHandlerRootView.android.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerRootView.d.ts +7 -0
- package/lib/typescript/components/GestureHandlerRootView.d.ts.map +1 -0
- package/lib/typescript/components/GestureHandlerRootView.web.d.ts +7 -0
- package/lib/typescript/components/GestureHandlerRootView.web.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/Pressable.d.ts +5 -0
- package/lib/typescript/components/Pressable/Pressable.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/PressableProps.d.ts +137 -0
- package/lib/typescript/components/Pressable/PressableProps.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/StateMachine.d.ts +16 -0
- package/lib/typescript/components/Pressable/StateMachine.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/index.d.ts +3 -0
- package/lib/typescript/components/Pressable/index.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/stateDefinitions.d.ts +10 -0
- package/lib/typescript/components/Pressable/stateDefinitions.d.ts.map +1 -0
- package/lib/typescript/components/Pressable/utils.d.ts +11 -0
- package/lib/typescript/components/Pressable/utils.d.ts.map +1 -0
- package/lib/typescript/components/ReanimatedDrawerLayout.d.ts +168 -0
- package/lib/typescript/components/ReanimatedDrawerLayout.d.ts.map +1 -0
- package/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeable.d.ts +6 -0
- package/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeable.d.ts.map +1 -0
- package/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeableProps.d.ts +150 -0
- package/lib/typescript/components/ReanimatedSwipeable/ReanimatedSwipeableProps.d.ts.map +1 -0
- package/lib/typescript/components/ReanimatedSwipeable/index.d.ts +3 -0
- package/lib/typescript/components/ReanimatedSwipeable/index.d.ts.map +1 -0
- package/lib/typescript/components/Swipeable.d.ts +184 -0
- package/lib/typescript/components/Swipeable.d.ts.map +1 -0
- package/lib/typescript/components/Text.d.ts +5 -0
- package/lib/typescript/components/Text.d.ts.map +1 -0
- package/lib/typescript/components/gestureHandlerRootHOC.d.ts +4 -0
- package/lib/typescript/components/gestureHandlerRootHOC.d.ts.map +1 -0
- package/lib/typescript/components/touchables/ExtraButtonProps.d.ts +8 -0
- package/lib/typescript/components/touchables/ExtraButtonProps.d.ts.map +1 -0
- package/lib/typescript/components/touchables/GenericTouchable.d.ts +56 -0
- package/lib/typescript/components/touchables/GenericTouchable.d.ts.map +1 -0
- package/lib/typescript/components/touchables/GenericTouchableProps.d.ts +17 -0
- package/lib/typescript/components/touchables/GenericTouchableProps.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableHighlight.d.ts +42 -0
- package/lib/typescript/components/touchables/TouchableHighlight.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +41 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +7 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +9 -0
- package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableOpacity.d.ts +31 -0
- package/lib/typescript/components/touchables/TouchableOpacity.d.ts.map +1 -0
- package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +15 -0
- package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts.map +1 -0
- package/lib/typescript/components/touchables/index.d.ts +8 -0
- package/lib/typescript/components/touchables/index.d.ts.map +1 -0
- package/lib/typescript/components/utils.d.ts +5 -0
- package/lib/typescript/components/utils.d.ts.map +1 -0
- package/lib/typescript/findNodeHandle.d.ts +3 -0
- package/lib/typescript/findNodeHandle.d.ts.map +1 -0
- package/lib/typescript/findNodeHandle.web.d.ts +3 -0
- package/lib/typescript/findNodeHandle.web.d.ts.map +1 -0
- package/lib/typescript/getShadowNodeFromRef.d.ts +2 -0
- package/lib/typescript/getShadowNodeFromRef.d.ts.map +1 -0
- package/lib/typescript/getShadowNodeFromRef.web.d.ts +2 -0
- package/lib/typescript/getShadowNodeFromRef.web.d.ts.map +1 -0
- package/lib/typescript/ghQueueMicrotask.d.ts +2 -0
- package/lib/typescript/ghQueueMicrotask.d.ts.map +1 -0
- package/lib/typescript/handlers/FlingGestureHandler.d.ts +39 -0
- package/lib/typescript/handlers/FlingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +45 -0
- package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts +198 -0
- package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts.map +1 -0
- package/lib/typescript/handlers/LongPressGestureHandler.d.ts +36 -0
- package/lib/typescript/handlers/LongPressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +33 -0
- package/lib/typescript/handlers/NativeViewGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/PanGestureHandler.d.ts +100 -0
- package/lib/typescript/handlers/PanGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/PinchGestureHandler.d.ts +17 -0
- package/lib/typescript/handlers/PinchGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/PressabilityDebugView.d.ts +2 -0
- package/lib/typescript/handlers/PressabilityDebugView.d.ts.map +1 -0
- package/lib/typescript/handlers/PressabilityDebugView.web.d.ts +2 -0
- package/lib/typescript/handlers/PressabilityDebugView.web.d.ts.map +1 -0
- package/lib/typescript/handlers/RotationGestureHandler.d.ts +17 -0
- package/lib/typescript/handlers/RotationGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/TapGestureHandler.d.ts +62 -0
- package/lib/typescript/handlers/TapGestureHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/createHandler.d.ts +12 -0
- package/lib/typescript/handlers/createHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/createNativeWrapper.d.ts +4 -0
- package/lib/typescript/handlers/createNativeWrapper.d.ts.map +1 -0
- package/lib/typescript/handlers/customDirectEventTypes.d.ts +2 -0
- package/lib/typescript/handlers/customDirectEventTypes.d.ts.map +1 -0
- package/lib/typescript/handlers/customDirectEventTypes.web.d.ts +3 -0
- package/lib/typescript/handlers/customDirectEventTypes.web.d.ts.map +1 -0
- package/lib/typescript/handlers/gestureHandlerCommon.d.ts +79 -0
- package/lib/typescript/handlers/gestureHandlerCommon.d.ts.map +1 -0
- package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts +53 -0
- package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts +14 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts +8 -0
- package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts +14 -0
- package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts +3 -0
- package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts +50 -0
- package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts +4 -0
- package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts +21 -0
- package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts +5 -0
- package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts +3 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts +6 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts +3 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts +4 -0
- package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts +13 -0
- package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/eventReceiver.d.ts +5 -0
- package/lib/typescript/handlers/gestures/eventReceiver.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/flingGesture.d.ts +22 -0
- package/lib/typescript/handlers/gestures/flingGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts +40 -0
- package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gesture.d.ts +218 -0
- package/lib/typescript/handlers/gestures/gesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gestureComposition.d.ts +22 -0
- package/lib/typescript/handlers/gestures/gestureComposition.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gestureObjects.d.ts +101 -0
- package/lib/typescript/handlers/gestures/gestureObjects.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.d.ts +12 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts +5 -0
- package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/hoverGesture.d.ts +28 -0
- package/lib/typescript/handlers/gestures/hoverGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/longPressGesture.d.ts +26 -0
- package/lib/typescript/handlers/gestures/longPressGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/manualGesture.d.ts +8 -0
- package/lib/typescript/handlers/gestures/manualGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/nativeGesture.d.ts +19 -0
- package/lib/typescript/handlers/gestures/nativeGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/panGesture.d.ts +91 -0
- package/lib/typescript/handlers/gestures/panGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/pinchGesture.d.ts +12 -0
- package/lib/typescript/handlers/gestures/pinchGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts +15 -0
- package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/rotationGesture.d.ts +13 -0
- package/lib/typescript/handlers/gestures/rotationGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/gestures/tapGesture.d.ts +51 -0
- package/lib/typescript/handlers/gestures/tapGesture.d.ts.map +1 -0
- package/lib/typescript/handlers/getNextHandlerTag.d.ts +2 -0
- package/lib/typescript/handlers/getNextHandlerTag.d.ts.map +1 -0
- package/lib/typescript/handlers/handlersRegistry.d.ts +15 -0
- package/lib/typescript/handlers/handlersRegistry.d.ts.map +1 -0
- package/lib/typescript/handlers/utils.d.ts +8 -0
- package/lib/typescript/handlers/utils.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +59 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/init.d.ts +3 -0
- package/lib/typescript/init.d.ts.map +1 -0
- package/lib/typescript/jestUtils/index.d.ts +2 -0
- package/lib/typescript/jestUtils/index.d.ts.map +1 -0
- package/lib/typescript/jestUtils/jestUtils.d.ts +30 -0
- package/lib/typescript/jestUtils/jestUtils.d.ts.map +1 -0
- package/lib/typescript/mocks/Pressable.d.ts +2 -0
- package/lib/typescript/mocks/Pressable.d.ts.map +1 -0
- package/lib/typescript/mocks/mocks.d.ts +47 -0
- package/lib/typescript/mocks/mocks.d.ts.map +1 -0
- package/lib/typescript/mountRegistry.d.ts +17 -0
- package/lib/typescript/mountRegistry.d.ts.map +1 -0
- package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts +15 -0
- package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts.map +1 -0
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts +17 -0
- package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts.map +1 -0
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +6 -0
- package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/typeUtils.d.ts +2 -0
- package/lib/typescript/typeUtils.d.ts.map +1 -0
- package/lib/typescript/utils.d.ts +21 -0
- package/lib/typescript/utils.d.ts.map +1 -0
- package/lib/typescript/web/Gestures.d.ts +37 -0
- package/lib/typescript/web/Gestures.d.ts.map +1 -0
- package/lib/typescript/web/constants.d.ts +3 -0
- package/lib/typescript/web/constants.d.ts.map +1 -0
- package/lib/typescript/web/detectors/RotationGestureDetector.d.ts +31 -0
- package/lib/typescript/web/detectors/RotationGestureDetector.d.ts.map +1 -0
- package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts +30 -0
- package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts.map +1 -0
- package/lib/typescript/web/handlers/FlingGestureHandler.d.ts +27 -0
- package/lib/typescript/web/handlers/FlingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/GestureHandler.d.ts +103 -0
- package/lib/typescript/web/handlers/GestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/HoverGestureHandler.d.ts +11 -0
- package/lib/typescript/web/handlers/HoverGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/IGestureHandler.d.ts +38 -0
- package/lib/typescript/web/handlers/IGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts +31 -0
- package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/ManualGestureHandler.d.ts +11 -0
- package/lib/typescript/web/handlers/ManualGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts +26 -0
- package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/PanGestureHandler.d.ts +64 -0
- package/lib/typescript/web/handlers/PanGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/PinchGestureHandler.d.ts +28 -0
- package/lib/typescript/web/handlers/PinchGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/RotationGestureHandler.d.ts +28 -0
- package/lib/typescript/web/handlers/RotationGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/handlers/TapGestureHandler.d.ts +40 -0
- package/lib/typescript/web/handlers/TapGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web/interfaces.d.ts +158 -0
- package/lib/typescript/web/interfaces.d.ts.map +1 -0
- package/lib/typescript/web/tools/CircularBuffer.d.ts +12 -0
- package/lib/typescript/web/tools/CircularBuffer.d.ts.map +1 -0
- package/lib/typescript/web/tools/EventManager.d.ts +40 -0
- package/lib/typescript/web/tools/EventManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +25 -0
- package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts.map +1 -0
- package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts +32 -0
- package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts.map +1 -0
- package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +36 -0
- package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts.map +1 -0
- package/lib/typescript/web/tools/InteractionManager.d.ts +18 -0
- package/lib/typescript/web/tools/InteractionManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/KeyboardEventManager.d.ts +14 -0
- package/lib/typescript/web/tools/KeyboardEventManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/LeastSquareSolver.d.ts +13 -0
- package/lib/typescript/web/tools/LeastSquareSolver.d.ts.map +1 -0
- package/lib/typescript/web/tools/NodeManager.d.ts +13 -0
- package/lib/typescript/web/tools/NodeManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/PointerEventManager.d.ts +20 -0
- package/lib/typescript/web/tools/PointerEventManager.d.ts.map +1 -0
- package/lib/typescript/web/tools/PointerTracker.d.ts +51 -0
- package/lib/typescript/web/tools/PointerTracker.d.ts.map +1 -0
- package/lib/typescript/web/tools/Vector.d.ts +16 -0
- package/lib/typescript/web/tools/Vector.d.ts.map +1 -0
- package/lib/typescript/web/tools/VelocityTracker.d.ts +14 -0
- package/lib/typescript/web/tools/VelocityTracker.d.ts.map +1 -0
- package/lib/typescript/web/tools/WheelEventManager.d.ts +12 -0
- package/lib/typescript/web/tools/WheelEventManager.d.ts.map +1 -0
- package/lib/typescript/web/utils.d.ts +15 -0
- package/lib/typescript/web/utils.d.ts.map +1 -0
- package/lib/typescript/web_hammer/DiscreteGestureHandler.d.ts +21 -0
- package/lib/typescript/web_hammer/DiscreteGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/DraggingGestureHandler.d.ts +16 -0
- package/lib/typescript/web_hammer/DraggingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/Errors.d.ts +4 -0
- package/lib/typescript/web_hammer/Errors.d.ts.map +1 -0
- package/lib/typescript/web_hammer/FlingGestureHandler.d.ts +44 -0
- package/lib/typescript/web_hammer/FlingGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/GestureHandler.d.ts +146 -0
- package/lib/typescript/web_hammer/GestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/IndiscreteGestureHandler.d.ts +41 -0
- package/lib/typescript/web_hammer/IndiscreteGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/LongPressGestureHandler.d.ts +39 -0
- package/lib/typescript/web_hammer/LongPressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/NativeViewGestureHandler.d.ts +8 -0
- package/lib/typescript/web_hammer/NativeViewGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/NodeManager.d.ts +8 -0
- package/lib/typescript/web_hammer/NodeManager.d.ts.map +1 -0
- package/lib/typescript/web_hammer/PanGestureHandler.d.ts +57 -0
- package/lib/typescript/web_hammer/PanGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/PinchGestureHandler.d.ts +14 -0
- package/lib/typescript/web_hammer/PinchGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/PressGestureHandler.d.ts +84 -0
- package/lib/typescript/web_hammer/PressGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/RotationGestureHandler.d.ts +14 -0
- package/lib/typescript/web_hammer/RotationGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/TapGestureHandler.d.ts +58 -0
- package/lib/typescript/web_hammer/TapGestureHandler.d.ts.map +1 -0
- package/lib/typescript/web_hammer/constants.d.ts +40 -0
- package/lib/typescript/web_hammer/constants.d.ts.map +1 -0
- package/lib/typescript/web_hammer/utils.d.ts +10 -0
- package/lib/typescript/web_hammer/utils.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/GestureButtonsProps.ts +10 -0
- package/src/components/Pressable/Pressable.tsx +20 -31
- package/src/components/Pressable/PressableProps.tsx +2 -4
- package/src/components/Pressable/StateMachine.tsx +12 -4
- package/src/components/Pressable/stateDefinitions.ts +23 -23
- package/src/components/ReanimatedSwipeable/ReanimatedSwipeable.tsx +603 -0
- package/src/components/ReanimatedSwipeable/ReanimatedSwipeableProps.ts +199 -0
- package/src/components/ReanimatedSwipeable/index.ts +6 -0
- package/src/mocks/Pressable.tsx +1 -0
- package/src/{mocks.tsx → mocks/mocks.tsx} +7 -11
- package/src/web/handlers/GestureHandler.ts +1 -0
- package/src/components/ReanimatedSwipeable.tsx +0 -811
@@ -0,0 +1,239 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
import * as React from 'react';
|
4
|
+
import { Component } from 'react';
|
5
|
+
import { Animated, Platform } from 'react-native';
|
6
|
+
import { State } from '../../State';
|
7
|
+
import { BaseButton } from '../GestureButtons';
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
9
|
+
/**
|
10
|
+
* Each touchable is a states' machine which preforms transitions.
|
11
|
+
* On very beginning (and on the very end or recognition) touchable is
|
12
|
+
* UNDETERMINED. Then it moves to BEGAN. If touchable recognizes that finger
|
13
|
+
* travel outside it transits to special MOVED_OUTSIDE state. Gesture recognition
|
14
|
+
* finishes in UNDETERMINED state.
|
15
|
+
*/
|
16
|
+
export const TOUCHABLE_STATE = {
|
17
|
+
UNDETERMINED: 0,
|
18
|
+
BEGAN: 1,
|
19
|
+
MOVED_OUTSIDE: 2
|
20
|
+
};
|
21
|
+
|
22
|
+
// TODO: maybe can be better
|
23
|
+
// TODO: all clearTimeout have ! added, maybe they shouldn't ?
|
24
|
+
|
25
|
+
/**
|
26
|
+
* GenericTouchable is not intented to be used as it is.
|
27
|
+
* Should be treated as a source for the rest of touchables
|
28
|
+
*/
|
29
|
+
|
30
|
+
export default class GenericTouchable extends Component {
|
31
|
+
static defaultProps = {
|
32
|
+
delayLongPress: 600,
|
33
|
+
extraButtonProps: {
|
34
|
+
rippleColor: 'transparent',
|
35
|
+
exclusive: true
|
36
|
+
}
|
37
|
+
};
|
38
|
+
|
39
|
+
// Timeout handlers
|
40
|
+
|
41
|
+
// This flag is required since recognition of longPress implies not-invoking onPress
|
42
|
+
longPressDetected = false;
|
43
|
+
pointerInside = true;
|
44
|
+
|
45
|
+
// State of touchable
|
46
|
+
STATE = TOUCHABLE_STATE.UNDETERMINED;
|
47
|
+
|
48
|
+
// handlePressIn in called on first touch on traveling inside component.
|
49
|
+
// Handles state transition with delay.
|
50
|
+
handlePressIn() {
|
51
|
+
if (this.props.delayPressIn) {
|
52
|
+
this.pressInTimeout = setTimeout(() => {
|
53
|
+
this.moveToState(TOUCHABLE_STATE.BEGAN);
|
54
|
+
this.pressInTimeout = null;
|
55
|
+
}, this.props.delayPressIn);
|
56
|
+
} else {
|
57
|
+
this.moveToState(TOUCHABLE_STATE.BEGAN);
|
58
|
+
}
|
59
|
+
if (this.props.onLongPress) {
|
60
|
+
const time = (this.props.delayPressIn || 0) + (this.props.delayLongPress || 0);
|
61
|
+
this.longPressTimeout = setTimeout(this.onLongPressDetected, time);
|
62
|
+
}
|
63
|
+
}
|
64
|
+
// handleMoveOutside in called on traveling outside component.
|
65
|
+
// Handles state transition with delay.
|
66
|
+
handleMoveOutside() {
|
67
|
+
if (this.props.delayPressOut) {
|
68
|
+
this.pressOutTimeout = this.pressOutTimeout || setTimeout(() => {
|
69
|
+
this.moveToState(TOUCHABLE_STATE.MOVED_OUTSIDE);
|
70
|
+
this.pressOutTimeout = null;
|
71
|
+
}, this.props.delayPressOut);
|
72
|
+
} else {
|
73
|
+
this.moveToState(TOUCHABLE_STATE.MOVED_OUTSIDE);
|
74
|
+
}
|
75
|
+
}
|
76
|
+
|
77
|
+
// handleGoToUndetermined transits to UNDETERMINED state with proper delay
|
78
|
+
handleGoToUndetermined() {
|
79
|
+
clearTimeout(this.pressOutTimeout); // TODO: maybe it can be undefined
|
80
|
+
if (this.props.delayPressOut) {
|
81
|
+
this.pressOutTimeout = setTimeout(() => {
|
82
|
+
if (this.STATE === TOUCHABLE_STATE.UNDETERMINED) {
|
83
|
+
this.moveToState(TOUCHABLE_STATE.BEGAN);
|
84
|
+
}
|
85
|
+
this.moveToState(TOUCHABLE_STATE.UNDETERMINED);
|
86
|
+
this.pressOutTimeout = null;
|
87
|
+
}, this.props.delayPressOut);
|
88
|
+
} else {
|
89
|
+
if (this.STATE === TOUCHABLE_STATE.UNDETERMINED) {
|
90
|
+
this.moveToState(TOUCHABLE_STATE.BEGAN);
|
91
|
+
}
|
92
|
+
this.moveToState(TOUCHABLE_STATE.UNDETERMINED);
|
93
|
+
}
|
94
|
+
}
|
95
|
+
componentDidMount() {
|
96
|
+
this.reset();
|
97
|
+
}
|
98
|
+
// Reset timeout to prevent memory leaks.
|
99
|
+
reset() {
|
100
|
+
this.longPressDetected = false;
|
101
|
+
this.pointerInside = true;
|
102
|
+
clearTimeout(this.pressInTimeout);
|
103
|
+
clearTimeout(this.pressOutTimeout);
|
104
|
+
clearTimeout(this.longPressTimeout);
|
105
|
+
this.pressOutTimeout = null;
|
106
|
+
this.longPressTimeout = null;
|
107
|
+
this.pressInTimeout = null;
|
108
|
+
}
|
109
|
+
|
110
|
+
// All states' transitions are defined here.
|
111
|
+
moveToState(newState) {
|
112
|
+
if (newState === this.STATE) {
|
113
|
+
// Ignore dummy transitions
|
114
|
+
return;
|
115
|
+
}
|
116
|
+
if (newState === TOUCHABLE_STATE.BEGAN) {
|
117
|
+
// First touch and moving inside
|
118
|
+
this.props.onPressIn?.();
|
119
|
+
} else if (newState === TOUCHABLE_STATE.MOVED_OUTSIDE) {
|
120
|
+
// Moving outside
|
121
|
+
this.props.onPressOut?.();
|
122
|
+
} else if (newState === TOUCHABLE_STATE.UNDETERMINED) {
|
123
|
+
// Need to reset each time on transition to UNDETERMINED
|
124
|
+
this.reset();
|
125
|
+
if (this.STATE === TOUCHABLE_STATE.BEGAN) {
|
126
|
+
// ... and if it happens inside button.
|
127
|
+
this.props.onPressOut?.();
|
128
|
+
}
|
129
|
+
}
|
130
|
+
// Finally call lister (used by subclasses)
|
131
|
+
this.props.onStateChange?.(this.STATE, newState);
|
132
|
+
// ... and make transition.
|
133
|
+
this.STATE = newState;
|
134
|
+
}
|
135
|
+
onGestureEvent = ({
|
136
|
+
nativeEvent: {
|
137
|
+
pointerInside
|
138
|
+
}
|
139
|
+
}) => {
|
140
|
+
if (this.pointerInside !== pointerInside) {
|
141
|
+
if (pointerInside) {
|
142
|
+
this.onMoveIn();
|
143
|
+
} else {
|
144
|
+
this.onMoveOut();
|
145
|
+
}
|
146
|
+
}
|
147
|
+
this.pointerInside = pointerInside;
|
148
|
+
};
|
149
|
+
onHandlerStateChange = ({
|
150
|
+
nativeEvent
|
151
|
+
}) => {
|
152
|
+
const {
|
153
|
+
state
|
154
|
+
} = nativeEvent;
|
155
|
+
if (state === State.CANCELLED || state === State.FAILED) {
|
156
|
+
// Need to handle case with external cancellation (e.g. by ScrollView)
|
157
|
+
this.moveToState(TOUCHABLE_STATE.UNDETERMINED);
|
158
|
+
} else if (
|
159
|
+
// This platform check is an implication of slightly different behavior of handlers on different platform.
|
160
|
+
// And Android "Active" state is achieving on first move of a finger, not on press in.
|
161
|
+
// On iOS event on "Began" is not delivered.
|
162
|
+
state === (Platform.OS !== 'android' ? State.ACTIVE : State.BEGAN) && this.STATE === TOUCHABLE_STATE.UNDETERMINED) {
|
163
|
+
// Moving inside requires
|
164
|
+
this.handlePressIn();
|
165
|
+
} else if (state === State.END) {
|
166
|
+
const shouldCallOnPress = !this.longPressDetected && this.STATE !== TOUCHABLE_STATE.MOVED_OUTSIDE && this.pressOutTimeout === null;
|
167
|
+
this.handleGoToUndetermined();
|
168
|
+
if (shouldCallOnPress) {
|
169
|
+
// Calls only inside component whether no long press was called previously
|
170
|
+
this.props.onPress?.();
|
171
|
+
}
|
172
|
+
}
|
173
|
+
};
|
174
|
+
onLongPressDetected = () => {
|
175
|
+
this.longPressDetected = true;
|
176
|
+
// Checked for in the caller of `onLongPressDetected`, but better to check twice
|
177
|
+
this.props.onLongPress?.();
|
178
|
+
};
|
179
|
+
componentWillUnmount() {
|
180
|
+
// To prevent memory leaks
|
181
|
+
this.reset();
|
182
|
+
}
|
183
|
+
onMoveIn() {
|
184
|
+
if (this.STATE === TOUCHABLE_STATE.MOVED_OUTSIDE) {
|
185
|
+
// This call is not throttled with delays (like in RN's implementation).
|
186
|
+
this.moveToState(TOUCHABLE_STATE.BEGAN);
|
187
|
+
}
|
188
|
+
}
|
189
|
+
onMoveOut() {
|
190
|
+
// Long press should no longer be detected
|
191
|
+
clearTimeout(this.longPressTimeout);
|
192
|
+
this.longPressTimeout = null;
|
193
|
+
if (this.STATE === TOUCHABLE_STATE.BEGAN) {
|
194
|
+
this.handleMoveOutside();
|
195
|
+
}
|
196
|
+
}
|
197
|
+
render() {
|
198
|
+
const hitSlop = (typeof this.props.hitSlop === 'number' ? {
|
199
|
+
top: this.props.hitSlop,
|
200
|
+
left: this.props.hitSlop,
|
201
|
+
bottom: this.props.hitSlop,
|
202
|
+
right: this.props.hitSlop
|
203
|
+
} : this.props.hitSlop) ?? undefined;
|
204
|
+
const coreProps = {
|
205
|
+
accessible: this.props.accessible !== false,
|
206
|
+
accessibilityLabel: this.props.accessibilityLabel,
|
207
|
+
accessibilityHint: this.props.accessibilityHint,
|
208
|
+
accessibilityRole: this.props.accessibilityRole,
|
209
|
+
// TODO: check if changed to no 's' correctly, also removed 2 props that are no longer available: `accessibilityComponentType` and `accessibilityTraits`,
|
210
|
+
// would be good to check if it is ok for sure, see: https://github.com/facebook/react-native/issues/24016
|
211
|
+
accessibilityState: this.props.accessibilityState,
|
212
|
+
accessibilityActions: this.props.accessibilityActions,
|
213
|
+
onAccessibilityAction: this.props.onAccessibilityAction,
|
214
|
+
nativeID: this.props.nativeID,
|
215
|
+
onLayout: this.props.onLayout
|
216
|
+
};
|
217
|
+
return /*#__PURE__*/_jsx(BaseButton, {
|
218
|
+
style: this.props.containerStyle,
|
219
|
+
onHandlerStateChange:
|
220
|
+
// TODO: not sure if it can be undefined instead of null
|
221
|
+
this.props.disabled ? undefined : this.onHandlerStateChange,
|
222
|
+
onGestureEvent: this.onGestureEvent,
|
223
|
+
hitSlop: hitSlop,
|
224
|
+
userSelect: this.props.userSelect,
|
225
|
+
shouldActivateOnStart: this.props.shouldActivateOnStart,
|
226
|
+
disallowInterruption: this.props.disallowInterruption,
|
227
|
+
testID: this.props.testID,
|
228
|
+
touchSoundDisabled: this.props.touchSoundDisabled ?? false,
|
229
|
+
enabled: !this.props.disabled,
|
230
|
+
...this.props.extraButtonProps,
|
231
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
232
|
+
...coreProps,
|
233
|
+
style: this.props.style,
|
234
|
+
children: this.props.children
|
235
|
+
})
|
236
|
+
});
|
237
|
+
}
|
238
|
+
}
|
239
|
+
//# sourceMappingURL=GenericTouchable.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["React","Component","Animated","Platform","State","BaseButton","jsx","_jsx","TOUCHABLE_STATE","UNDETERMINED","BEGAN","MOVED_OUTSIDE","GenericTouchable","defaultProps","delayLongPress","extraButtonProps","rippleColor","exclusive","longPressDetected","pointerInside","STATE","handlePressIn","props","delayPressIn","pressInTimeout","setTimeout","moveToState","onLongPress","time","longPressTimeout","onLongPressDetected","handleMoveOutside","delayPressOut","pressOutTimeout","handleGoToUndetermined","clearTimeout","componentDidMount","reset","newState","onPressIn","onPressOut","onStateChange","onGestureEvent","nativeEvent","onMoveIn","onMoveOut","onHandlerStateChange","state","CANCELLED","FAILED","OS","ACTIVE","END","shouldCallOnPress","onPress","componentWillUnmount","render","hitSlop","top","left","bottom","right","undefined","coreProps","accessible","accessibilityLabel","accessibilityHint","accessibilityRole","accessibilityState","accessibilityActions","onAccessibilityAction","nativeID","onLayout","style","containerStyle","disabled","userSelect","shouldActivateOnStart","disallowInterruption","testID","touchSoundDisabled","enabled","children","View"],"sourceRoot":"../../../../src","sources":["components/touchables/GenericTouchable.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,QAAQ,OAAO;AACjC,SAASC,QAAQ,EAAEC,QAAQ,QAAQ,cAAc;AAEjD,SAASC,KAAK,QAAQ,aAAa;AACnC,SAASC,UAAU,QAAQ,mBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAS/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAG;EAC7BC,YAAY,EAAE,CAAC;EACfC,KAAK,EAAE,CAAC;EAC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OAAO,EAAEA,OAAQ;MACjBmB,UAAU,EAAE,IAAI,CAACtD,KAAK,CAACsD,UAAW;MAClCC,qBAAqB,EAAE,IAAI,CAACvD,KAAK,CAACuD,qBAAsB;MACxDC,oBAAoB,EAAE,IAAI,CAACxD,KAAK,CAACwD,oBAAqB;MACtDC,MAAM,EAAE,IAAI,CAACzD,KAAK,CAACyD,MAAO;MAC1BC,kBAAkB,EAAE,IAAI,CAAC1D,KAAK,CAAC0D,kBAAkB,IAAI,KAAM;MAC3DC,OAAO,EAAE,CAAC,IAAI,CAAC3D,KAAK,CAACqD,QAAS;MAAA,GAC1B,IAAI,CAACrD,KAAK,CAACP,gBAAgB;MAAAmE,QAAA,eAC/B3E,IAAA,CAACL,QAAQ,CAACiF,IAAI;QAAA,GAAKpB,SAAS;QAAEU,KAAK,EAAE,IAAI,CAACnD,KAAK,CAACmD,KAAM;QAAAS,QAAA,EACnD,IAAI,CAAC5D,KAAK,CAAC4D;MAAQ,CACP;IAAC,CACN,CAAC;EAEjB;AACF","ignoreList":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/touchables/GenericTouchableProps.ts"],"mappings":"","ignoreList":[]}
|
@@ -0,0 +1,87 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
import * as React from 'react';
|
4
|
+
import { Component } from 'react';
|
5
|
+
import GenericTouchable, { TOUCHABLE_STATE } from './GenericTouchable';
|
6
|
+
import { StyleSheet, View } from 'react-native';
|
7
|
+
|
8
|
+
/**
|
9
|
+
* @deprecated TouchableHighlight will be removed in the future version of Gesture Handler. Use Pressable instead.
|
10
|
+
*/
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
12
|
+
/**
|
13
|
+
* @deprecated TouchableHighlight will be removed in the future version of Gesture Handler. Use Pressable instead.
|
14
|
+
*
|
15
|
+
* TouchableHighlight follows RN's implementation
|
16
|
+
*/
|
17
|
+
export default class TouchableHighlight extends Component {
|
18
|
+
static defaultProps = {
|
19
|
+
...GenericTouchable.defaultProps,
|
20
|
+
activeOpacity: 0.85,
|
21
|
+
delayPressOut: 100,
|
22
|
+
underlayColor: 'black'
|
23
|
+
};
|
24
|
+
constructor(props) {
|
25
|
+
super(props);
|
26
|
+
this.state = {
|
27
|
+
extraChildStyle: null,
|
28
|
+
extraUnderlayStyle: null
|
29
|
+
};
|
30
|
+
}
|
31
|
+
|
32
|
+
// Copied from RN
|
33
|
+
showUnderlay = () => {
|
34
|
+
if (!this.hasPressHandler()) {
|
35
|
+
return;
|
36
|
+
}
|
37
|
+
this.setState({
|
38
|
+
extraChildStyle: {
|
39
|
+
opacity: this.props.activeOpacity
|
40
|
+
},
|
41
|
+
extraUnderlayStyle: {
|
42
|
+
backgroundColor: this.props.underlayColor
|
43
|
+
}
|
44
|
+
});
|
45
|
+
this.props.onShowUnderlay?.();
|
46
|
+
};
|
47
|
+
hasPressHandler = () => this.props.onPress || this.props.onPressIn || this.props.onPressOut || this.props.onLongPress;
|
48
|
+
hideUnderlay = () => {
|
49
|
+
this.setState({
|
50
|
+
extraChildStyle: null,
|
51
|
+
extraUnderlayStyle: null
|
52
|
+
});
|
53
|
+
this.props.onHideUnderlay?.();
|
54
|
+
};
|
55
|
+
renderChildren() {
|
56
|
+
if (!this.props.children) {
|
57
|
+
return /*#__PURE__*/_jsx(View, {});
|
58
|
+
}
|
59
|
+
const child = React.Children.only(this.props.children); // TODO: not sure if OK but fixes error
|
60
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
61
|
+
style: StyleSheet.compose(child.props.style, this.state.extraChildStyle)
|
62
|
+
});
|
63
|
+
}
|
64
|
+
onStateChange = (_from, to) => {
|
65
|
+
if (to === TOUCHABLE_STATE.BEGAN) {
|
66
|
+
this.showUnderlay();
|
67
|
+
} else if (to === TOUCHABLE_STATE.UNDETERMINED || to === TOUCHABLE_STATE.MOVED_OUTSIDE) {
|
68
|
+
this.hideUnderlay();
|
69
|
+
}
|
70
|
+
};
|
71
|
+
render() {
|
72
|
+
const {
|
73
|
+
style = {},
|
74
|
+
...rest
|
75
|
+
} = this.props;
|
76
|
+
const {
|
77
|
+
extraUnderlayStyle
|
78
|
+
} = this.state;
|
79
|
+
return /*#__PURE__*/_jsx(GenericTouchable, {
|
80
|
+
...rest,
|
81
|
+
style: [style, extraUnderlayStyle],
|
82
|
+
onStateChange: this.onStateChange,
|
83
|
+
children: this.renderChildren()
|
84
|
+
});
|
85
|
+
}
|
86
|
+
}
|
87
|
+
//# sourceMappingURL=TouchableHighlight.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["React","Component","GenericTouchable","TOUCHABLE_STATE","StyleSheet","View","jsx","_jsx","TouchableHighlight","defaultProps","activeOpacity","delayPressOut","underlayColor","constructor","props","state","extraChildStyle","extraUnderlayStyle","showUnderlay","hasPressHandler","setState","opacity","backgroundColor","onShowUnderlay","onPress","onPressIn","onPressOut","onLongPress","hideUnderlay","onHideUnderlay","renderChildren","children","child","Children","only","cloneElement","style","compose","onStateChange","_from","to","BEGAN","UNDETERMINED","MOVED_OUTSIDE","render","rest"],"sourceRoot":"../../../../src","sources":["components/touchables/TouchableHighlight.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,QAAQ,OAAO;AACjC,OAAOC,gBAAgB,IAAIC,eAAe,QAAQ,oBAAoB;AAEtE,SACEC,UAAU,EACVC,IAAI,QAIC,cAAc;;AAWrB;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA;AAMA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAMC,kBAAkB,SAASP,SAAS,CAGvD;EACA,OAAOQ,YAAY,GAAG;IACpB,GAAGP,gBAAgB,CAACO,YAAY;IAChCC,aAAa,EAAE,IAAI;IACnBC,aAAa,EAAE,GAAG;IAClBC,aAAa,EAAE;EACjB,CAAC;EAEDC,WAAWA,CAACC,KAA8B,EAAE;IAC1C,KAAK,CAACA,KAAK,CA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C,eAAe;IACzE,CAAC,CAAC;EACJ;EAEAsB,aAAa,GAAGA,CAACC,KAAa,EAAEC,EAAU,KAAK;IAC7C,IAAIA,EAAE,KAAKrC,eAAe,CAACsC,KAAK,EAAE;MAChC,IAAI,CAACvB,YAAY,CAAC,CAAC;IACrB,CAAC,MAAM,IACLsB,EAAE,KAAKrC,eAAe,CAACuC,YAAY,IACnCF,EAAE,KAAKrC,eAAe,CAACwC,aAAa,EACpC;MACA,IAAI,CAACf,YAAY,CAAC,CAAC;IACrB;EACF,CAAC;EAEDgB,MAAMA,CAAA,EAAG;IACP,MAAM;MAAER,KAAK,GAAG,CAAC,CAAC;MAAE,GAAGS;IAAK,CAAC,GAAG,IAAI,CAAC/B,KAAK;IAC1C,MAAM;MAAEG;IAAmB,CAAC,GAAG,IAAI,CAACF,KAAK;IACzC,oBACER,IAAA,CAACL,gBAAgB;MAAA,GACX2C,IAAI;MACRT,KAAK,EAAE,CAACA,KAAK,EAAEnB,kBAAkB,CAAE;MACnCqB,aAAa,EAAE,IAAI,CAACA,aAAc;MAAAP,QAAA,EACjC,IAAI,CAACD,cAAc,CAAC;IAAC,CACN,CAAC;EAEvB;AACF","ignoreList":[]}
|
@@ -0,0 +1,77 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
import { Platform } from 'react-native';
|
4
|
+
import * as React from 'react';
|
5
|
+
import { Component } from 'react';
|
6
|
+
import GenericTouchable from './GenericTouchable';
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
8
|
+
/**
|
9
|
+
* @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler. Use Pressable instead.
|
10
|
+
*
|
11
|
+
* TouchableNativeFeedback behaves slightly different than RN's TouchableNativeFeedback.
|
12
|
+
* There's small difference with handling long press ripple since RN's implementation calls
|
13
|
+
* ripple animation via bridge. This solution leaves all animations' handling for native components so
|
14
|
+
* it follows native behaviours.
|
15
|
+
*/
|
16
|
+
export default class TouchableNativeFeedback extends Component {
|
17
|
+
static defaultProps = {
|
18
|
+
...GenericTouchable.defaultProps,
|
19
|
+
useForeground: true,
|
20
|
+
extraButtonProps: {
|
21
|
+
// Disable hiding ripple on Android
|
22
|
+
rippleColor: null
|
23
|
+
}
|
24
|
+
};
|
25
|
+
|
26
|
+
// Could be taken as RNTouchableNativeFeedback.SelectableBackground etc. but the API may change
|
27
|
+
static SelectableBackground = rippleRadius => ({
|
28
|
+
type: 'ThemeAttrAndroid',
|
29
|
+
// I added `attribute` prop to clone the implementation of RN and be able to use only 2 types
|
30
|
+
attribute: 'selectableItemBackground',
|
31
|
+
rippleRadius
|
32
|
+
});
|
33
|
+
static SelectableBackgroundBorderless = rippleRadius => ({
|
34
|
+
type: 'ThemeAttrAndroid',
|
35
|
+
attribute: 'selectableItemBackgroundBorderless',
|
36
|
+
rippleRadius
|
37
|
+
});
|
38
|
+
static Ripple = (color, borderless, rippleRadius) => ({
|
39
|
+
type: 'RippleAndroid',
|
40
|
+
color,
|
41
|
+
borderless,
|
42
|
+
rippleRadius
|
43
|
+
});
|
44
|
+
static canUseNativeForeground = () => Platform.OS === 'android' && Platform.Version >= 23;
|
45
|
+
getExtraButtonProps() {
|
46
|
+
const extraProps = {};
|
47
|
+
const {
|
48
|
+
background
|
49
|
+
} = this.props;
|
50
|
+
if (background) {
|
51
|
+
// I changed type values to match those used in RN
|
52
|
+
// TODO(TS): check if it works the same as previous implementation - looks like it works the same as RN component, so it should be ok
|
53
|
+
if (background.type === 'RippleAndroid') {
|
54
|
+
extraProps['borderless'] = background.borderless;
|
55
|
+
extraProps['rippleColor'] = background.color;
|
56
|
+
} else if (background.type === 'ThemeAttrAndroid') {
|
57
|
+
extraProps['borderless'] = background.attribute === 'selectableItemBackgroundBorderless';
|
58
|
+
}
|
59
|
+
// I moved it from above since it should be available in all options
|
60
|
+
extraProps['rippleRadius'] = background.rippleRadius;
|
61
|
+
}
|
62
|
+
extraProps['foreground'] = this.props.useForeground;
|
63
|
+
return extraProps;
|
64
|
+
}
|
65
|
+
render() {
|
66
|
+
const {
|
67
|
+
style = {},
|
68
|
+
...rest
|
69
|
+
} = this.props;
|
70
|
+
return /*#__PURE__*/_jsx(GenericTouchable, {
|
71
|
+
...rest,
|
72
|
+
style: style,
|
73
|
+
extraButtonProps: this.getExtraButtonProps()
|
74
|
+
});
|
75
|
+
}
|
76
|
+
}
|
77
|
+
//# sourceMappingURL=TouchableNativeFeedback.android.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["Platform","React","Component","GenericTouchable","jsx","_jsx","TouchableNativeFeedback","defaultProps","useForeground","extraButtonProps","rippleColor","SelectableBackground","rippleRadius","type","attribute","SelectableBackgroundBorderless","Ripple","color","borderless","canUseNativeForeground","OS","Version","getExtraButtonProps","extraProps","background","props","render","style","rest"],"sourceRoot":"../../../../src","sources":["components/touchables/TouchableNativeFeedback.android.tsx"],"mappings":";;AAAA,SAASA,QAAQ,QAAoB,cAAc;AACnD,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,QAAQ,OAAO;AACjC,OAAOC,gBAAgB,MAAM,oBAAoB;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAMlD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAMC,uBAAuB,SAASJ,SAAS,CAA+B;EAC3F,OAAOK,YAAY,GAAG;IACpB,GAAGJ,gBAAgB,CAACI,YAAY;IAChCC,aAAa,EAAE,IAAI;IACnBC,gBAAgB,EAAE;MAChB;MACAC,WAAW,EAAE;IACf;EACF,CAAC;;EAED;EACA,OAAOC,oBAAoB,GAAIC,YAAqB,KAAM;IACxDC,IAAI,EAAE,kBAAkB;IACxB;IACAC,SAAS,EAAE,0BAA0B;IACrCF;EACF,CAAC,CAAC;EACF,OAAOG,8BAA8B,GAAIH,YAAqB,KAAM;IAClEC,IAAI,EAAE,kBAAkB;IACxBC,SAAS,EAAE,oCAAoC;IAC/CF;EACF,CAAC,CAAC;EACF,OAAOI,MAAM,GAAGA,C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eedback } from 'react-native';
|
4
|
+
|
5
|
+
/**
|
6
|
+
* @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler. Use Pressable instead.
|
7
|
+
*/
|
8
|
+
const TouchableNativeFeedback = RNTouchableNativeFeedback;
|
9
|
+
export default TouchableNativeFeedback;
|
10
|
+
//# sourceMappingURL=TouchableNativeFeedback.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["TouchableNativeFeedback","RNTouchableNativeFeedback"],"sourceRoot":"../../../../src","sources":["components/touchables/TouchableNativeFeedback.tsx"],"mappings":";;AAAA,SAASA,uBAAuB,IAAIC,yBAAyB,QAAQ,cAAc;;AAEnF;AACA;AACA;AACA,MAAMD,uBAAuB,GAAGC,yBAAyB;AAEzD,eAAeD,uBAAuB","ignoreList":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/touchables/TouchableNativeFeedbackProps.tsx"],"mappings":"","ignoreList":[]}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
import { Animated, Easing, StyleSheet, View } from 'react-native';
|
4
|
+
import GenericTouchable, { TOUCHABLE_STATE } from './GenericTouchable';
|
5
|
+
import * as React from 'react';
|
6
|
+
import { Component } from 'react';
|
7
|
+
|
8
|
+
/**
|
9
|
+
* @deprecated TouchableOpacity will be removed in the future version of Gesture Handler. Use Pressable instead.
|
10
|
+
*/
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
12
|
+
/**
|
13
|
+
* @deprecated TouchableOpacity will be removed in the future version of Gesture Handler. Use Pressable instead.
|
14
|
+
*
|
15
|
+
* TouchableOpacity bases on timing animation which has been used in RN's core
|
16
|
+
*/
|
17
|
+
export default class TouchableOpacity extends Component {
|
18
|
+
static defaultProps = {
|
19
|
+
...GenericTouchable.defaultProps,
|
20
|
+
activeOpacity: 0.2
|
21
|
+
};
|
22
|
+
|
23
|
+
// Opacity is 1 one by default but could be overwritten
|
24
|
+
getChildStyleOpacityWithDefault = () => {
|
25
|
+
const childStyle = StyleSheet.flatten(this.props.style) || {};
|
26
|
+
return childStyle.opacity == null ? 1 : childStyle.opacity.valueOf();
|
27
|
+
};
|
28
|
+
opacity = new Animated.Value(this.getChildStyleOpacityWithDefault());
|
29
|
+
setOpacityTo = (value, duration) => {
|
30
|
+
Animated.timing(this.opacity, {
|
31
|
+
toValue: value,
|
32
|
+
duration: duration,
|
33
|
+
easing: Easing.inOut(Easing.quad),
|
34
|
+
useNativeDriver: this.props.useNativeAnimations ?? true
|
35
|
+
}).start();
|
36
|
+
};
|
37
|
+
onStateChange = (_from, to) => {
|
38
|
+
if (to === TOUCHABLE_STATE.BEGAN) {
|
39
|
+
this.setOpacityTo(this.props.activeOpacity, 0);
|
40
|
+
} else if (to === TOUCHABLE_STATE.UNDETERMINED || to === TOUCHABLE_STATE.MOVED_OUTSIDE) {
|
41
|
+
this.setOpacityTo(this.getChildStyleOpacityWithDefault(), 150);
|
42
|
+
}
|
43
|
+
};
|
44
|
+
render() {
|
45
|
+
const {
|
46
|
+
style = {},
|
47
|
+
...rest
|
48
|
+
} = this.props;
|
49
|
+
return /*#__PURE__*/_jsx(GenericTouchable, {
|
50
|
+
...rest,
|
51
|
+
style: [style, {
|
52
|
+
opacity: this.opacity // TODO: fix this
|
53
|
+
}],
|
54
|
+
onStateChange: this.onStateChange,
|
55
|
+
children: this.props.children ? this.props.children : /*#__PURE__*/_jsx(View, {})
|
56
|
+
});
|
57
|
+
}
|
58
|
+
}
|
59
|
+
//# sourceMappingURL=TouchableOpacity.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["Animated","Easing","StyleSheet","View","GenericTouchable","TOUCHABLE_STATE","React","Component","jsx","_jsx","TouchableOpacity","defaultProps","activeOpacity","getChildStyleOpacityWithDefault","childStyle","flatten","props","style","opacity","valueOf","Value","setOpacityTo","value","duration","timing","toValue","easing","inOut","quad","useNativeDriver","useNativeAnimations","start","onStateChange","_from","to","BEGAN","UNDETERMINED","MOVED_OUTSIDE","render","rest","children"],"sourceRoot":"../../../../src","sources":["components/touchables/TouchableOpacity.tsx"],"mappings":";;AAAA,SACEA,QAAQ,EACRC,MAAM,EACNC,UAAU,EACVC,IAAI,QAEC,cAAc;AACrB,OAAOC,gBAAgB,IAAIC,eAAe,QAAQ,oBAAoB;AAEtE,OAAO,KAAKC,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,QAAQ,OAAO;;AAEjC;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA;AAQA;AACA;AACA;AACA;AACA;AACA,eAAe,MAAMC,gBAAgB,SAASH,SAAS,CAAwB;EAC7E,OAAOI,YAAY,GAAG;IACpB,GAAGP,gBAAgB,CAACO,YAAY;IAChCC,aAAa,EAAE;EACjB,CAAC;;EAED;EACAC,+BAA+B,GAAGA,CAAA,KAAM;IACtC,MAAMC,UAAU,GAAGZ,UAAU,CAACa,OAAO,CAAC,IAAI,CAACC,KAAK,CAACC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC7D,OAAOH,UAAU,CAACI,OAAO,IAAI,IAAI,GAC7B,CAAC,GACAJ,UAAU,CAACI,OAAO,CAACC,OAAO,CAAC,CAAY;EAC9C,CAAC;EAEDD,OAAO,GAAG,IAAIlB,QAAQ,CAACoB,KAAK,CAAC,IAAI,CAACP,+BAA+B,CAAC,CAAC,CAAC;EAEpEQ,YAAY,GAAGA,CAACC,KAAa,EAAEC,QAAgB,KAAK;IAClDvB,QAAQ,CAACwB,MAAM,CAAC,IAAI,CAACN,OAAO,EAAE;MAC5BO,OAAO,EAAEH,KAAK;MACdC,QAAQ,EAAEA,QAAQ;MAClBG,MAAM,EAAEzB,MAAM,CAAC0B,KAAK,CAAC1B,MAAM,CAAC2B,IAAI,CAAC;MACjCC,eAAe,EAAE,IAAI,CAACb,KAAK,CAACc,mBAAmB,IAAI;IACrD,CAAC,CAAC,CAACC,KAAK,CAAC,CAAC;EACZ,CAAC;EAEDC,aAAa,GAAGA,CAACC,KAAa,EAAEC,EAAU,KAAK;IAC7C,IAAIA,EAAE,KAAK7B,eAAe,CAAC8B,KAAK,EAAE;MAChC,IAAI,CAACd,YAAY,CAAC,IAAI,CAACL,KAAK,CAACJ,aAAa,EAAG,CAAC,CAAC;IACjD,CAAC,MAAM,IACLsB,EAAE,KAAK7B,eAAe,CAAC+B,YAAY,IACnCF,EAAE,KAAK7B,eAAe,CAACgC,aAAa,EACpC;MACA,IAAI,CAAChB,YAAY,CAAC,IAAI,CAACR,+BAA+B,CAAC,CAAC,EAAE,GAAG,CAAC;IAChE;EACF,CAAC;EAEDyB,MAAMA,CAAA,EAAG;IACP,MAAM;MAAErB,KAAK,GAAG,CAAC,CAAC;MAAE,GAAGsB;IAAK,CAAC,GAAG,IAAI,CAACvB,KAAK;IAC1C,oBACEP,IAAA,CAACL,gBAAgB;MAAA,GACXmC,IAAI;MACRtB,KAAK,EAAE,CACLA,KAAK,EACL;QACEC,OAAO,EAAE,IAAI,CAACA,OAA4B,CAAE;MAC9C,CAAC,CACD;MACFc,aAAa,EAAE,IAAI,CAACA,aAAc;MAAAQ,QAAA,EACjC,IAAI,CAACxB,KAAK,CAACwB,QAAQ,GAAG,IAAI,CAACxB,KAAK,CAACwB,QAAQ,gBAAG/B,IAAA,CAACN,IAAI,IAAE;IAAC,CACrC,CAAC;EAEvB;AACF","ignoreList":[]}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
import * as React from 'react';
|
4
|
+
import GenericTouchable from './GenericTouchable';
|
5
|
+
|
6
|
+
/**
|
7
|
+
* @deprecated TouchableWithoutFeedback will be removed in the future version of Gesture Handler. Use Pressable instead.
|
8
|
+
*/
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
10
|
+
/**
|
11
|
+
* @deprecated TouchableWithoutFeedback will be removed in the future version of Gesture Handler. Use Pressable instead.
|
12
|
+
*/
|
13
|
+
const TouchableWithoutFeedback = /*#__PURE__*/React.forwardRef(({
|
14
|
+
delayLongPress = 600,
|
15
|
+
extraButtonProps = {
|
16
|
+
rippleColor: 'transparent',
|
17
|
+
exclusive: true
|
18
|
+
},
|
19
|
+
...rest
|
20
|
+
}, ref) => /*#__PURE__*/_jsx(GenericTouchable, {
|
21
|
+
ref: ref,
|
22
|
+
delayLongPress: delayLongPress,
|
23
|
+
extraButtonProps: extraButtonProps,
|
24
|
+
...rest
|
25
|
+
}));
|
26
|
+
export default TouchableWithoutFeedback;
|
27
|
+
//# sourceMappingURL=TouchableWithoutFeedback.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["React","GenericTouchable","jsx","_jsx","TouchableWithoutFeedback","forwardRef","delayLongPress","extraButtonProps","rippleColor","exclusive","rest","ref"],"sourceRoot":"../../../../src","sources":["components/touchables/TouchableWithoutFeedback.tsx"],"mappings":";;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,OAAOC,gBAAgB,MAAM,oBAAoB;;AAGjD;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA;AAKA;AACA;AACA;AACA,MAAMC,wBAAwB,gBAAGJ,KAAK,CAACK,UAAU,CAI/C,CACE;EACEC,cAAc,GAAG,GAAG;EACpBC,gBAAgB,GAAG;IACjBC,WAAW,EAAE,aAAa;IAC1BC,SAAS,EAAE;EACb,CAAC;EACD,GAAGC;AACL,CAAC,EAEDC,GAAG,kBAEHR,IAAA,CAACF,gBAAgB;EACfU,GAAG,EAAEA,GAAI;EACTL,cAAc,EAAEA,cAAe;EAC/BC,gBAAgB,EAAEA,gBAAiB;EAAA,GAC/BG;AAAI,CACT,CAEL,CAAC;AAED,eAAeN,wBAAwB","ignoreList":[]}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
export { default as TouchableNativeFeedback } from './TouchableNativeFeedback';
|
4
|
+
export { default as TouchableWithoutFeedback } from './TouchableWithoutFeedback';
|
5
|
+
export { default as TouchableOpacity } from './TouchableOpacity';
|
6
|
+
export { default as TouchableHighlight } from './TouchableHighlight';
|
7
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["default","TouchableNativeFeedback","TouchableWithoutFeedback","TouchableOpacity","TouchableHighlight"],"sourceRoot":"../../../../src","sources":["components/touchables/index.ts"],"mappings":";;AAGA,SAASA,OAAO,IAAIC,uBAAuB,QAAQ,2BAA2B;AAC9E,SAASD,OAAO,IAAIE,wBAAwB,QAAQ,4BAA4B;AAChF,SAASF,OAAO,IAAIG,gBAAgB,QAAQ,oBAAoB;AAChE,SAASH,OAAO,IAAII,kBAAkB,QAAQ,sBAAsB","ignoreList":[]}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
export function applyRelationProp(gesture, relationPropName, relationProp) {
|
4
|
+
if (!relationProp) {
|
5
|
+
return;
|
6
|
+
}
|
7
|
+
if (Array.isArray(relationProp)) {
|
8
|
+
gesture[relationPropName](...relationProp);
|
9
|
+
} else {
|
10
|
+
gesture[relationPropName](relationProp);
|
11
|
+
}
|
12
|
+
}
|
13
|
+
//# sourceMappingURL=utils.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["applyRelationProp","gesture","relationPropName","relationProp","Array","isArray"],"sourceRoot":"../../../src","sources":["components/utils.ts"],"mappings":";;AAWA,OAAO,SAASA,iBAAiBA,CAC/BC,OAAyB,EACzBC,gBAAkC,EAClCC,YAA8B,EAC9B;EACA,IAAI,CAACA,YAAY,EAAE;IACjB;EACF;EAEA,IAAIC,KAAK,CAACC,OAAO,CAACF,YAAY,CAAC,EAAE;IAC/BF,OAAO,CAACC,gBAAgB,CAAC,CAAC,GAAGC,YAAY,CAAC;EAC5C,CAAC,MAAM;IACLF,OAAO,CAACC,gBAAgB,CAAC,CAACC,YAAY,CAAC;EACzC;AACF","ignoreList":[]}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["findNodeHandle"],"sourceRoot":"../../src","sources":["findNodeHandle.ts"],"mappings":";;AAAA,SAASA,cAAc,QAAQ,cAAc;AAE7C,eAAeA,cAAc","ignoreList":[]}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
import { FlatList } from 'react-native';
|
4
|
+
import { isRNSVGElement } from './web/utils';
|
5
|
+
export default function findNodeHandle(viewRef) {
|
6
|
+
// TODO: Remove this once we remove old API.
|
7
|
+
if (viewRef instanceof FlatList) {
|
8
|
+
// @ts-ignore This is the only way to get the scroll ref from FlatList.
|
9
|
+
return viewRef._listRef._scrollRef.firstChild;
|
10
|
+
}
|
11
|
+
// Old API assumes that child handler is HTMLElement.
|
12
|
+
// However, if we nest handlers, we will get ref to another handler.
|
13
|
+
// In that case, we want to recursively call findNodeHandle with new handler viewTag (which can also be ref to another handler).
|
14
|
+
if (viewRef?.viewTag !== undefined) {
|
15
|
+
return findNodeHandle(viewRef.viewTag);
|
16
|
+
}
|
17
|
+
if (viewRef instanceof Element) {
|
18
|
+
if (viewRef.style.display === 'contents') {
|
19
|
+
return findNodeHandle(viewRef.firstChild);
|
20
|
+
}
|
21
|
+
return viewRef;
|
22
|
+
}
|
23
|
+
if (isRNSVGElement(viewRef)) {
|
24
|
+
return viewRef.elementRef.current;
|
25
|
+
}
|
26
|
+
|
27
|
+
// In new API, we receive ref object which `current` field points to wrapper `div` with `display: contents;`.
|
28
|
+
// We want to return the first descendant (in DFS order) that doesn't have this property.
|
29
|
+
let element = viewRef?.current;
|
30
|
+
while (element && element.style.display === 'contents') {
|
31
|
+
element = element.firstChild;
|
32
|
+
}
|
33
|
+
return element;
|
34
|
+
}
|
35
|
+
//# sourceMappingURL=findNodeHandle.web.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["FlatList","isRNSVGElement","findNodeHandle","viewRef","_listRef","_scrollRef","firstChild","viewTag","undefined","Element","style","display","elementRef","current","element"],"sourceRoot":"../../src","sources":["findNodeHandle.web.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,SAASC,cAAc,QAAQ,aAAa;AAE5C,eAAe,SAASC,cAAcA,CACpCC,OAA8D,EAC3B;EACnC;EACA,IAAIA,OAAO,YAAYH,QAAQ,EAAE;IAC/B;IACA,OAAOG,OAAO,CAACC,QAAQ,CAACC,UAAU,CAACC,UAAU;EAC/C;EACA;EACA;EACA;EACA,IAAKH,OAAO,EAAwBI,OAAO,KAAKC,SAAS,EAAE;IACzD,OAAON,cAAc,CAAEC,OAAO,CAAuBI,OAAO,CAAC;EAC/D;EAEA,IAAIJ,OAAO,YAAYM,OAAO,EAAE;IAC9B,IAAIN,OAAO,CAACO,KAAK,CAACC,OAAO,KAAK,UAAU,EAAE;MACxC,OAAOT,cAAc,CAACC,OAAO,CAACG,UAAyB,CAAC;IAC1D;IAEA,OAAOH,OAAO;EAChB;EAEA,IAAIF,cAAc,CAACE,OAAO,CAAC,EAAE;IAC3B,OAAQA,OAAO,CAAYS,UAAU,CAACC,OAAO;EAC/C;;EAEA;EACA;EACA,IAAIC,OAAO,GAAIX,OAAO,EAAwBU,OAAO;EAErD,OAAOC,OAAO,IAAIA,OAAO,CAACJ,KAAK,CAACC,OAAO,KAAK,UAAU,EAAE;IACtDG,OAAO,GAAGA,OAAO,CAACR,UAAyB;EAC7C;EAEA,OAAOQ,OAAO;AAChB","ignoreList":[]}
|