react-native-gesture-handler 2.25.0 → 2.26.0

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.
Files changed (1028) hide show
  1. package/RNGestureHandler.podspec +1 -0
  2. package/android/build.gradle +41 -42
  3. package/android/fabric/src/main/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +1 -1
  4. package/android/gradle.properties +1 -1
  5. package/android/noreanimated/src/main/java/com/swmansion/gesturehandler/ReanimatedEventDispatcher.kt +2 -2
  6. package/android/paper/src/main/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +4 -1
  7. package/android/reanimated/src/main/java/com/swmansion/gesturehandler/ReanimatedEventDispatcher.kt +1 -1
  8. package/android/{package77/src → src}/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt +14 -19
  9. package/android/src/main/java/com/swmansion/gesturehandler/core/FlingGestureHandler.kt +29 -5
  10. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandler.kt +229 -114
  11. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerInteractionController.kt +4 -4
  12. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt +91 -49
  13. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerRegistry.kt +1 -1
  14. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureUtils.kt +13 -4
  15. package/android/src/main/java/com/swmansion/gesturehandler/core/HoverGestureHandler.kt +20 -6
  16. package/android/src/main/java/com/swmansion/gesturehandler/core/LongPressGestureHandler.kt +52 -21
  17. package/android/src/main/java/com/swmansion/gesturehandler/core/ManualGestureHandler.kt +12 -1
  18. package/android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt +65 -35
  19. package/android/src/main/java/com/swmansion/gesturehandler/core/OnTouchEventListener.kt +3 -3
  20. package/android/src/main/java/com/swmansion/gesturehandler/core/PanGestureHandler.kt +187 -92
  21. package/android/src/main/java/com/swmansion/gesturehandler/core/PinchGestureHandler.kt +12 -5
  22. package/android/src/main/java/com/swmansion/gesturehandler/core/PointerEventsConfig.kt +1 -1
  23. package/android/src/main/java/com/swmansion/gesturehandler/core/RotationGestureDetector.kt +3 -1
  24. package/android/src/main/java/com/swmansion/gesturehandler/core/RotationGestureHandler.kt +12 -5
  25. package/android/src/main/java/com/swmansion/gesturehandler/core/StylusData.kt +1 -1
  26. package/android/src/main/java/com/swmansion/gesturehandler/core/TapGestureHandler.kt +55 -33
  27. package/android/src/main/java/com/swmansion/gesturehandler/core/Vector.kt +13 -18
  28. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +27 -21
  29. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEnabledRootView.kt +7 -2
  30. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEvent.kt +13 -12
  31. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEventDispatcher.kt +189 -0
  32. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerFactoryUtil.kt +34 -0
  33. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerInteractionManager.kt +7 -11
  34. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt +29 -590
  35. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRegistry.kt +8 -14
  36. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.kt +26 -16
  37. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootView.kt +15 -12
  38. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootViewManager.kt +2 -4
  39. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerStateChangeEvent.kt +17 -16
  40. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerTouchEvent.kt +6 -4
  41. package/android/src/main/java/com/swmansion/gesturehandler/react/RNViewConfigurationHelper.kt +7 -5
  42. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/FlingGestureHandlerEventDataBuilder.kt +2 -1
  43. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/GestureHandlerEventDataBuilder.kt +1 -1
  44. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/HoverGestureHandlerEventDataBuilder.kt +2 -1
  45. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/LongPressGestureHandlerEventDataBuilder.kt +2 -1
  46. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/ManualGestureHandlerEventDataBuilder.kt +2 -1
  47. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/NativeGestureHandlerEventDataBuilder.kt +2 -1
  48. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/PanGestureHandlerEventDataBuilder.kt +2 -1
  49. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/PinchGestureHandlerEventDataBuilder.kt +2 -1
  50. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/RotationGestureHandlerEventDataBuilder.kt +2 -1
  51. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/TapGestureHandlerEventDataBuilder.kt +2 -1
  52. package/android/src/main/jni/CMakeLists.txt +10 -1
  53. package/android/svg/src/main/java/com/swmansion/gesturehandler/RNSVGHitTester.kt +1 -3
  54. package/apple/RNGestureHandlerButton.mm +6 -2
  55. package/lib/commonjs/ActionType.js +3 -3
  56. package/lib/commonjs/ActionType.js.map +1 -1
  57. package/lib/commonjs/Directions.js +11 -8
  58. package/lib/commonjs/Directions.js.map +1 -1
  59. package/lib/commonjs/EnableNewWebImplementation.js +2 -10
  60. package/lib/commonjs/EnableNewWebImplementation.js.map +1 -1
  61. package/lib/commonjs/GestureHandlerRootViewContext.js +2 -7
  62. package/lib/commonjs/GestureHandlerRootViewContext.js.map +1 -1
  63. package/lib/commonjs/PlatformConstants.js +1 -7
  64. package/lib/commonjs/PlatformConstants.js.map +1 -1
  65. package/lib/commonjs/PlatformConstants.web.js +1 -3
  66. package/lib/commonjs/PlatformConstants.web.js.map +1 -1
  67. package/lib/commonjs/PointerType.js +3 -5
  68. package/lib/commonjs/PointerType.js.map +1 -1
  69. package/lib/commonjs/RNGestureHandlerModule.js +2 -6
  70. package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
  71. package/lib/commonjs/RNGestureHandlerModule.web.js +10 -37
  72. package/lib/commonjs/RNGestureHandlerModule.web.js.map +1 -1
  73. package/lib/commonjs/RNGestureHandlerModule.windows.js +22 -32
  74. package/lib/commonjs/RNGestureHandlerModule.windows.js.map +1 -1
  75. package/lib/commonjs/RNRenderer.js +1 -3
  76. package/lib/commonjs/RNRenderer.js.map +1 -1
  77. package/lib/commonjs/RNRenderer.web.js +1 -2
  78. package/lib/commonjs/RNRenderer.web.js.map +1 -1
  79. package/lib/commonjs/State.js +4 -3
  80. package/lib/commonjs/State.js.map +1 -1
  81. package/lib/commonjs/TouchEventType.js +3 -3
  82. package/lib/commonjs/TouchEventType.js.map +1 -1
  83. package/lib/commonjs/components/DrawerLayout.js +436 -462
  84. package/lib/commonjs/components/DrawerLayout.js.map +1 -1
  85. package/lib/commonjs/components/GestureButtons.js +123 -181
  86. package/lib/commonjs/components/GestureButtons.js.map +1 -1
  87. package/lib/commonjs/components/GestureButtonsProps.js.map +1 -1
  88. package/lib/commonjs/components/GestureComponents.js +36 -45
  89. package/lib/commonjs/components/GestureComponents.js.map +1 -1
  90. package/lib/commonjs/components/GestureComponents.web.js +19 -32
  91. package/lib/commonjs/components/GestureComponents.web.js.map +1 -1
  92. package/lib/commonjs/components/GestureHandlerButton.js +2 -6
  93. package/lib/commonjs/components/GestureHandlerButton.js.map +1 -1
  94. package/lib/commonjs/components/GestureHandlerButton.web.js +6 -14
  95. package/lib/commonjs/components/GestureHandlerButton.web.js.map +1 -1
  96. package/lib/commonjs/components/GestureHandlerRootView.android.js +10 -20
  97. package/lib/commonjs/components/GestureHandlerRootView.android.js.map +1 -1
  98. package/lib/commonjs/components/GestureHandlerRootView.js +10 -19
  99. package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
  100. package/lib/commonjs/components/GestureHandlerRootView.web.js +10 -18
  101. package/lib/commonjs/components/GestureHandlerRootView.web.js.map +1 -1
  102. package/lib/commonjs/components/Pressable/Pressable.js +72 -118
  103. package/lib/commonjs/components/Pressable/Pressable.js.map +1 -1
  104. package/lib/commonjs/components/Pressable/PressableProps.js.map +1 -1
  105. package/lib/commonjs/components/Pressable/index.js +1 -3
  106. package/lib/commonjs/components/Pressable/index.js.map +1 -1
  107. package/lib/commonjs/components/Pressable/utils.js +16 -38
  108. package/lib/commonjs/components/Pressable/utils.js.map +1 -1
  109. package/lib/commonjs/components/ReanimatedDrawerLayout.js +72 -108
  110. package/lib/commonjs/components/ReanimatedDrawerLayout.js.map +1 -1
  111. package/lib/commonjs/components/ReanimatedSwipeable.js +81 -102
  112. package/lib/commonjs/components/ReanimatedSwipeable.js.map +1 -1
  113. package/lib/commonjs/components/Swipeable.js +290 -335
  114. package/lib/commonjs/components/Swipeable.js.map +1 -1
  115. package/lib/commonjs/components/Text.js +23 -34
  116. package/lib/commonjs/components/Text.js.map +1 -1
  117. package/lib/commonjs/components/gestureHandlerRootHOC.js +11 -17
  118. package/lib/commonjs/components/gestureHandlerRootHOC.js.map +1 -1
  119. package/lib/commonjs/components/touchables/ExtraButtonProps.js.map +1 -1
  120. package/lib/commonjs/components/touchables/GenericTouchable.js +95 -140
  121. package/lib/commonjs/components/touchables/GenericTouchable.js.map +1 -1
  122. package/lib/commonjs/components/touchables/GenericTouchableProps.js.map +1 -1
  123. package/lib/commonjs/components/touchables/TouchableHighlight.js +51 -69
  124. package/lib/commonjs/components/touchables/TouchableHighlight.js.map +1 -1
  125. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +38 -56
  126. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  127. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +1 -4
  128. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js.map +1 -1
  129. package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js.map +1 -1
  130. package/lib/commonjs/components/touchables/TouchableOpacity.js +39 -53
  131. package/lib/commonjs/components/touchables/TouchableOpacity.js.map +1 -1
  132. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +11 -15
  133. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  134. package/lib/commonjs/components/touchables/index.js +7 -12
  135. package/lib/commonjs/components/touchables/index.js.map +1 -1
  136. package/lib/commonjs/components/utils.js +17 -0
  137. package/lib/commonjs/components/utils.js.map +1 -0
  138. package/lib/commonjs/findNodeHandle.js +1 -4
  139. package/lib/commonjs/findNodeHandle.js.map +1 -1
  140. package/lib/commonjs/findNodeHandle.web.js +7 -16
  141. package/lib/commonjs/findNodeHandle.web.js.map +1 -1
  142. package/lib/commonjs/getShadowNodeFromRef.js +19 -20
  143. package/lib/commonjs/getShadowNodeFromRef.js.map +1 -1
  144. package/lib/commonjs/getShadowNodeFromRef.web.js +0 -1
  145. package/lib/commonjs/getShadowNodeFromRef.web.js.map +1 -1
  146. package/lib/commonjs/ghQueueMicrotask.js +1 -2
  147. package/lib/commonjs/ghQueueMicrotask.js.map +1 -1
  148. package/lib/commonjs/handlers/FlingGestureHandler.js +9 -11
  149. package/lib/commonjs/handlers/FlingGestureHandler.js.map +1 -1
  150. package/lib/commonjs/handlers/ForceTouchGestureHandler.js +16 -23
  151. package/lib/commonjs/handlers/ForceTouchGestureHandler.js.map +1 -1
  152. package/lib/commonjs/handlers/GestureHandlerEventPayload.js.map +1 -1
  153. package/lib/commonjs/handlers/LongPressGestureHandler.js +9 -11
  154. package/lib/commonjs/handlers/LongPressGestureHandler.js.map +1 -1
  155. package/lib/commonjs/handlers/NativeViewGestureHandler.ts +59 -0
  156. package/lib/commonjs/handlers/PanGestureHandler.js +13 -32
  157. package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -1
  158. package/lib/commonjs/handlers/PinchGestureHandler.js +7 -9
  159. package/lib/commonjs/handlers/PinchGestureHandler.js.map +1 -1
  160. package/lib/commonjs/handlers/PressabilityDebugView.js +0 -1
  161. package/lib/commonjs/handlers/PressabilityDebugView.js.map +1 -1
  162. package/lib/commonjs/handlers/PressabilityDebugView.web.js +0 -1
  163. package/lib/commonjs/handlers/PressabilityDebugView.web.js.map +1 -1
  164. package/lib/commonjs/handlers/RotationGestureHandler.js +7 -9
  165. package/lib/commonjs/handlers/RotationGestureHandler.js.map +1 -1
  166. package/lib/commonjs/handlers/TapGestureHandler.js +9 -11
  167. package/lib/commonjs/handlers/TapGestureHandler.js.map +1 -1
  168. package/lib/commonjs/handlers/createHandler.js +128 -229
  169. package/lib/commonjs/handlers/createHandler.js.map +1 -1
  170. package/lib/commonjs/handlers/createNativeWrapper.js +26 -35
  171. package/lib/commonjs/handlers/createNativeWrapper.js.map +1 -1
  172. package/lib/commonjs/handlers/customDirectEventTypes.js +0 -1
  173. package/lib/commonjs/handlers/customDirectEventTypes.js.map +1 -1
  174. package/lib/commonjs/handlers/customDirectEventTypes.web.js +1 -2
  175. package/lib/commonjs/handlers/customDirectEventTypes.web.js.map +1 -1
  176. package/lib/commonjs/handlers/gestureHandlerCommon.js +9 -10
  177. package/lib/commonjs/handlers/gestureHandlerCommon.js.map +1 -1
  178. package/lib/commonjs/handlers/gestureHandlerTypesCompat.js.map +1 -1
  179. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js +5 -15
  180. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
  181. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js +14 -22
  182. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
  183. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js +9 -29
  184. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
  185. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js +1 -10
  186. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
  187. package/lib/commonjs/handlers/gestures/GestureDetector/index.js +19 -42
  188. package/lib/commonjs/handlers/gestures/GestureDetector/index.js.map +1 -1
  189. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js +0 -3
  190. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -1
  191. package/lib/commonjs/handlers/gestures/GestureDetector/types.js.map +1 -1
  192. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js +15 -26
  193. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
  194. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js +13 -50
  195. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
  196. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js +3 -13
  197. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
  198. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js +2 -9
  199. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
  200. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js +6 -14
  201. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
  202. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js +23 -52
  203. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js.map +1 -1
  204. package/lib/commonjs/handlers/gestures/eventReceiver.js +14 -55
  205. package/lib/commonjs/handlers/gestures/eventReceiver.js.map +1 -1
  206. package/lib/commonjs/handlers/gestures/flingGesture.js +3 -13
  207. package/lib/commonjs/handlers/gestures/flingGesture.js.map +1 -1
  208. package/lib/commonjs/handlers/gestures/forceTouchGesture.js +6 -20
  209. package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -1
  210. package/lib/commonjs/handlers/gestures/gesture.js +50 -93
  211. package/lib/commonjs/handlers/gestures/gesture.js.map +1 -1
  212. package/lib/commonjs/handlers/gestures/gestureComposition.js +17 -34
  213. package/lib/commonjs/handlers/gestures/gestureComposition.js.map +1 -1
  214. package/lib/commonjs/handlers/gestures/gestureObjects.js +1 -27
  215. package/lib/commonjs/handlers/gestures/gestureObjects.js.map +1 -1
  216. package/lib/commonjs/handlers/gestures/gestureStateManager.js +5 -11
  217. package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +1 -1
  218. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js +2 -7
  219. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js.map +1 -1
  220. package/lib/commonjs/handlers/gestures/hoverGesture.js +9 -26
  221. package/lib/commonjs/handlers/gestures/hoverGesture.js.map +1 -1
  222. package/lib/commonjs/handlers/gestures/longPressGesture.js +4 -15
  223. package/lib/commonjs/handlers/gestures/longPressGesture.js.map +1 -1
  224. package/lib/commonjs/handlers/gestures/manualGesture.js +0 -6
  225. package/lib/commonjs/handlers/gestures/manualGesture.js.map +1 -1
  226. package/lib/{module/handlers/gestures/nativeGesture.js → commonjs/handlers/gestures/nativeGesture.ts} +12 -13
  227. package/lib/commonjs/handlers/gestures/panGesture.js +16 -44
  228. package/lib/commonjs/handlers/gestures/panGesture.js.map +1 -1
  229. package/lib/commonjs/handlers/gestures/pinchGesture.js +2 -9
  230. package/lib/commonjs/handlers/gestures/pinchGesture.js.map +1 -1
  231. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js +2 -10
  232. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js.map +1 -1
  233. package/lib/commonjs/handlers/gestures/rotationGesture.js +2 -9
  234. package/lib/commonjs/handlers/gestures/rotationGesture.js.map +1 -1
  235. package/lib/commonjs/handlers/gestures/tapGesture.js +8 -23
  236. package/lib/commonjs/handlers/gestures/tapGesture.js.map +1 -1
  237. package/lib/commonjs/handlers/getNextHandlerTag.js +0 -1
  238. package/lib/commonjs/handlers/getNextHandlerTag.js.map +1 -1
  239. package/lib/commonjs/handlers/handlersRegistry.js +7 -23
  240. package/lib/commonjs/handlers/handlersRegistry.js.map +1 -1
  241. package/lib/commonjs/handlers/utils.js +8 -31
  242. package/lib/commonjs/handlers/utils.js.map +1 -1
  243. package/lib/commonjs/index.js +75 -104
  244. package/lib/commonjs/index.js.map +1 -1
  245. package/lib/commonjs/init.js +4 -11
  246. package/lib/commonjs/init.js.map +1 -1
  247. package/lib/commonjs/jestUtils/index.js +4 -5
  248. package/lib/commonjs/jestUtils/index.js.map +1 -1
  249. package/lib/commonjs/jestUtils/jestUtils.js +24 -91
  250. package/lib/commonjs/jestUtils/jestUtils.js.map +1 -1
  251. package/lib/commonjs/mocks.js +10 -18
  252. package/lib/commonjs/mocks.js.map +1 -1
  253. package/lib/commonjs/mountRegistry.js +2 -14
  254. package/lib/commonjs/mountRegistry.js.map +1 -1
  255. package/lib/commonjs/package.json +1 -0
  256. package/lib/commonjs/specs/NativeRNGestureHandlerModule.ts +26 -0
  257. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.ts +22 -0
  258. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.ts +6 -0
  259. package/lib/commonjs/typeUtils.js.map +1 -1
  260. package/lib/commonjs/utils.js +14 -35
  261. package/lib/commonjs/utils.js.map +1 -1
  262. package/lib/commonjs/web/Gestures.js +5 -23
  263. package/lib/commonjs/web/Gestures.js.map +1 -1
  264. package/lib/commonjs/web/constants.js +2 -4
  265. package/lib/commonjs/web/constants.js.map +1 -1
  266. package/lib/commonjs/web/detectors/RotationGestureDetector.js +10 -52
  267. package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +1 -1
  268. package/lib/commonjs/web/detectors/ScaleGestureDetector.js +11 -55
  269. package/lib/commonjs/web/detectors/ScaleGestureDetector.js.map +1 -1
  270. package/lib/commonjs/web/handlers/FlingGestureHandler.js +9 -59
  271. package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -1
  272. package/lib/commonjs/web/handlers/GestureHandler.js +91 -226
  273. package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
  274. package/lib/commonjs/web/handlers/HoverGestureHandler.js +3 -23
  275. package/lib/commonjs/web/handlers/HoverGestureHandler.js.map +1 -1
  276. package/lib/commonjs/web/handlers/IGestureHandler.js.map +1 -1
  277. package/lib/commonjs/web/handlers/LongPressGestureHandler.js +11 -59
  278. package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +1 -1
  279. package/lib/commonjs/web/handlers/ManualGestureHandler.js +1 -11
  280. package/lib/commonjs/web/handlers/ManualGestureHandler.js.map +1 -1
  281. package/lib/{module/web/handlers/NativeViewGestureHandler.js → commonjs/web/handlers/NativeViewGestureHandler.ts} +49 -48
  282. package/lib/commonjs/web/handlers/PanGestureHandler.js +33 -155
  283. package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
  284. package/lib/commonjs/web/handlers/PinchGestureHandler.js +25 -68
  285. package/lib/commonjs/web/handlers/PinchGestureHandler.js.map +1 -1
  286. package/lib/commonjs/web/handlers/RotationGestureHandler.js +23 -67
  287. package/lib/commonjs/web/handlers/RotationGestureHandler.js.map +1 -1
  288. package/lib/commonjs/web/handlers/TapGestureHandler.js +18 -87
  289. package/lib/commonjs/web/handlers/TapGestureHandler.js.map +1 -1
  290. package/lib/commonjs/web/interfaces.js +9 -17
  291. package/lib/commonjs/web/interfaces.js.map +1 -1
  292. package/lib/commonjs/web/tools/CircularBuffer.js +0 -19
  293. package/lib/commonjs/web/tools/CircularBuffer.js.map +1 -1
  294. package/lib/commonjs/web/tools/EventManager.js +5 -44
  295. package/lib/commonjs/web/tools/EventManager.js.map +1 -1
  296. package/lib/commonjs/web/tools/GestureHandlerDelegate.js.map +1 -1
  297. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +13 -86
  298. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  299. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +14 -61
  300. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  301. package/lib/commonjs/web/tools/InteractionManager.js +12 -35
  302. package/lib/commonjs/web/tools/InteractionManager.js.map +1 -1
  303. package/lib/commonjs/web/tools/KeyboardEventManager.js +24 -52
  304. package/lib/commonjs/web/tools/KeyboardEventManager.js.map +1 -1
  305. package/lib/commonjs/web/tools/LeastSquareSolver.js +24 -69
  306. package/lib/commonjs/web/tools/LeastSquareSolver.js.map +1 -1
  307. package/lib/commonjs/web/tools/NodeManager.js +5 -15
  308. package/lib/commonjs/web/tools/NodeManager.js.map +1 -1
  309. package/lib/commonjs/web/tools/PointerEventManager.js +119 -159
  310. package/lib/commonjs/web/tools/PointerEventManager.js.map +1 -1
  311. package/lib/commonjs/web/tools/PointerTracker.js +20 -63
  312. package/lib/commonjs/web/tools/PointerTracker.js.map +1 -1
  313. package/lib/commonjs/web/tools/Vector.js +1 -25
  314. package/lib/commonjs/web/tools/Vector.js.map +1 -1
  315. package/lib/commonjs/web/tools/VelocityTracker.js +10 -36
  316. package/lib/commonjs/web/tools/VelocityTracker.js.map +1 -1
  317. package/lib/commonjs/web/tools/WheelEventManager.js +15 -34
  318. package/lib/commonjs/web/tools/WheelEventManager.js.map +1 -1
  319. package/lib/commonjs/web/utils.js +32 -67
  320. package/lib/commonjs/web/utils.js.map +1 -1
  321. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js +8 -20
  322. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js.map +1 -1
  323. package/lib/commonjs/web_hammer/DraggingGestureHandler.js +4 -14
  324. package/lib/commonjs/web_hammer/DraggingGestureHandler.js.map +1 -1
  325. package/lib/commonjs/web_hammer/Errors.js +0 -3
  326. package/lib/commonjs/web_hammer/Errors.js.map +1 -1
  327. package/lib/commonjs/web_hammer/FlingGestureHandler.js +14 -45
  328. package/lib/commonjs/web_hammer/FlingGestureHandler.js.map +1 -1
  329. package/lib/commonjs/web_hammer/GestureHandler.js +149 -244
  330. package/lib/commonjs/web_hammer/GestureHandler.js.map +1 -1
  331. package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js +2 -11
  332. package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js.map +1 -1
  333. package/lib/commonjs/web_hammer/LongPressGestureHandler.js +6 -20
  334. package/lib/commonjs/web_hammer/LongPressGestureHandler.js.map +1 -1
  335. package/lib/commonjs/web_hammer/NativeViewGestureHandler.ts +47 -0
  336. package/lib/commonjs/web_hammer/NodeManager.js +9 -16
  337. package/lib/commonjs/web_hammer/NodeManager.js.map +1 -1
  338. package/lib/commonjs/web_hammer/PanGestureHandler.js +8 -49
  339. package/lib/commonjs/web_hammer/PanGestureHandler.js.map +1 -1
  340. package/lib/commonjs/web_hammer/PinchGestureHandler.js +2 -11
  341. package/lib/commonjs/web_hammer/PinchGestureHandler.js.map +1 -1
  342. package/lib/commonjs/web_hammer/PressGestureHandler.js +14 -49
  343. package/lib/commonjs/web_hammer/PressGestureHandler.js.map +1 -1
  344. package/lib/commonjs/web_hammer/RotationGestureHandler.js +3 -15
  345. package/lib/commonjs/web_hammer/RotationGestureHandler.js.map +1 -1
  346. package/lib/commonjs/web_hammer/TapGestureHandler.js +43 -70
  347. package/lib/commonjs/web_hammer/TapGestureHandler.js.map +1 -1
  348. package/lib/commonjs/web_hammer/constants.js +13 -26
  349. package/lib/commonjs/web_hammer/constants.js.map +1 -1
  350. package/lib/commonjs/web_hammer/utils.js +4 -14
  351. package/lib/commonjs/web_hammer/utils.js.map +1 -1
  352. package/lib/module/ActionType.js +5 -1
  353. package/lib/module/ActionType.js.map +1 -1
  354. package/lib/module/Directions.js +11 -3
  355. package/lib/module/Directions.js.map +1 -1
  356. package/lib/module/EnableNewWebImplementation.js +4 -5
  357. package/lib/module/EnableNewWebImplementation.js.map +1 -1
  358. package/lib/module/GestureHandlerRootViewContext.js +2 -0
  359. package/lib/module/GestureHandlerRootViewContext.js.map +1 -1
  360. package/lib/module/PlatformConstants.js +2 -2
  361. package/lib/module/PlatformConstants.js.map +1 -1
  362. package/lib/module/PlatformConstants.web.js +2 -1
  363. package/lib/module/PlatformConstants.web.js.map +1 -1
  364. package/lib/module/PointerType.js +4 -3
  365. package/lib/module/PointerType.js.map +1 -1
  366. package/lib/module/RNGestureHandlerModule.js +3 -0
  367. package/lib/module/RNGestureHandlerModule.js.map +1 -1
  368. package/lib/module/RNGestureHandlerModule.web.js +12 -20
  369. package/lib/module/RNGestureHandlerModule.web.js.map +1 -1
  370. package/lib/module/RNGestureHandlerModule.windows.js +20 -17
  371. package/lib/module/RNGestureHandlerModule.windows.js.map +1 -1
  372. package/lib/module/RNRenderer.js +2 -0
  373. package/lib/module/RNRenderer.js.map +1 -1
  374. package/lib/module/RNRenderer.web.js +2 -0
  375. package/lib/module/RNRenderer.web.js.map +1 -1
  376. package/lib/module/State.js +6 -1
  377. package/lib/module/State.js.map +1 -1
  378. package/lib/module/TouchEventType.js +5 -1
  379. package/lib/module/TouchEventType.js.map +1 -1
  380. package/lib/module/components/DrawerLayout.js +427 -446
  381. package/lib/module/components/DrawerLayout.js.map +1 -1
  382. package/lib/module/components/GestureButtons.js +119 -157
  383. package/lib/module/components/GestureButtons.js.map +1 -1
  384. package/lib/module/components/GestureButtonsProps.js +2 -0
  385. package/lib/module/components/GestureButtonsProps.js.map +1 -1
  386. package/lib/module/components/GestureComponents.js +29 -19
  387. package/lib/module/components/GestureComponents.js.map +1 -1
  388. package/lib/module/components/GestureComponents.web.js +13 -9
  389. package/lib/module/components/GestureComponents.web.js.map +1 -1
  390. package/lib/module/components/GestureHandlerButton.js +2 -0
  391. package/lib/module/components/GestureHandlerButton.js.map +1 -1
  392. package/lib/module/components/GestureHandlerButton.web.js +6 -4
  393. package/lib/module/components/GestureHandlerButton.web.js.map +1 -1
  394. package/lib/module/components/GestureHandlerRootView.android.js +9 -6
  395. package/lib/module/components/GestureHandlerRootView.android.js.map +1 -1
  396. package/lib/module/components/GestureHandlerRootView.js +9 -6
  397. package/lib/module/components/GestureHandlerRootView.js.map +1 -1
  398. package/lib/module/components/GestureHandlerRootView.web.js +9 -6
  399. package/lib/module/components/GestureHandlerRootView.web.js.map +1 -1
  400. package/lib/module/components/Pressable/Pressable.js +70 -98
  401. package/lib/module/components/Pressable/Pressable.js.map +1 -1
  402. package/lib/module/components/Pressable/PressableProps.js +2 -0
  403. package/lib/module/components/Pressable/PressableProps.js.map +1 -1
  404. package/lib/module/components/Pressable/index.js +2 -0
  405. package/lib/module/components/Pressable/index.js.map +1 -1
  406. package/lib/module/components/Pressable/utils.js +17 -32
  407. package/lib/module/components/Pressable/utils.js.map +1 -1
  408. package/lib/module/components/ReanimatedDrawerLayout.js +71 -88
  409. package/lib/module/components/ReanimatedDrawerLayout.js.map +1 -1
  410. package/lib/module/components/ReanimatedSwipeable.js +78 -87
  411. package/lib/module/components/ReanimatedSwipeable.js.map +1 -1
  412. package/lib/module/components/Swipeable.js +286 -320
  413. package/lib/module/components/Swipeable.js.map +1 -1
  414. package/lib/module/components/Text.js +22 -20
  415. package/lib/module/components/Text.js.map +1 -1
  416. package/lib/module/components/gestureHandlerRootHOC.js +11 -5
  417. package/lib/module/components/gestureHandlerRootHOC.js.map +1 -1
  418. package/lib/module/components/touchables/ExtraButtonProps.js +1 -1
  419. package/lib/module/components/touchables/ExtraButtonProps.js.map +1 -1
  420. package/lib/module/components/touchables/GenericTouchable.js +92 -127
  421. package/lib/module/components/touchables/GenericTouchable.js.map +1 -1
  422. package/lib/module/components/touchables/GenericTouchableProps.js +2 -0
  423. package/lib/module/components/touchables/GenericTouchableProps.js.map +1 -1
  424. package/lib/module/components/touchables/TouchableHighlight.js +48 -58
  425. package/lib/module/components/touchables/TouchableHighlight.js.map +1 -1
  426. package/lib/module/components/touchables/TouchableNativeFeedback.android.js +34 -43
  427. package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  428. package/lib/module/components/touchables/TouchableNativeFeedback.js +3 -1
  429. package/lib/module/components/touchables/TouchableNativeFeedback.js.map +1 -1
  430. package/lib/module/components/touchables/TouchableNativeFeedbackProps.js +2 -0
  431. package/lib/module/components/touchables/TouchableNativeFeedbackProps.js.map +1 -1
  432. package/lib/module/components/touchables/TouchableOpacity.js +34 -43
  433. package/lib/module/components/touchables/TouchableOpacity.js.map +1 -1
  434. package/lib/module/components/touchables/TouchableWithoutFeedback.js +9 -4
  435. package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  436. package/lib/module/components/touchables/index.js +2 -0
  437. package/lib/module/components/touchables/index.js.map +1 -1
  438. package/lib/module/components/utils.js +13 -0
  439. package/lib/module/components/utils.js.map +1 -0
  440. package/lib/module/findNodeHandle.js +2 -0
  441. package/lib/module/findNodeHandle.js.map +1 -1
  442. package/lib/module/findNodeHandle.web.js +9 -13
  443. package/lib/module/findNodeHandle.web.js.map +1 -1
  444. package/lib/module/getShadowNodeFromRef.js +21 -19
  445. package/lib/module/getShadowNodeFromRef.js.map +1 -1
  446. package/lib/module/getShadowNodeFromRef.web.js +2 -0
  447. package/lib/module/getShadowNodeFromRef.web.js.map +1 -1
  448. package/lib/module/ghQueueMicrotask.js +2 -0
  449. package/lib/module/ghQueueMicrotask.js.map +1 -1
  450. package/lib/module/handlers/FlingGestureHandler.js +8 -0
  451. package/lib/module/handlers/FlingGestureHandler.js.map +1 -1
  452. package/lib/module/handlers/ForceTouchGestureHandler.js +14 -8
  453. package/lib/module/handlers/ForceTouchGestureHandler.js.map +1 -1
  454. package/lib/module/handlers/GestureHandlerEventPayload.js +2 -0
  455. package/lib/module/handlers/GestureHandlerEventPayload.js.map +1 -1
  456. package/lib/module/handlers/LongPressGestureHandler.js +8 -0
  457. package/lib/module/handlers/LongPressGestureHandler.js.map +1 -1
  458. package/lib/module/handlers/NativeViewGestureHandler.ts +59 -0
  459. package/lib/module/handlers/PanGestureHandler.js +10 -19
  460. package/lib/module/handlers/PanGestureHandler.js.map +1 -1
  461. package/lib/module/handlers/PinchGestureHandler.js +4 -0
  462. package/lib/module/handlers/PinchGestureHandler.js.map +1 -1
  463. package/lib/module/handlers/PressabilityDebugView.js +2 -0
  464. package/lib/module/handlers/PressabilityDebugView.js.map +1 -1
  465. package/lib/module/handlers/PressabilityDebugView.web.js +2 -0
  466. package/lib/module/handlers/PressabilityDebugView.web.js.map +1 -1
  467. package/lib/module/handlers/RotationGestureHandler.js +4 -0
  468. package/lib/module/handlers/RotationGestureHandler.js.map +1 -1
  469. package/lib/module/handlers/TapGestureHandler.js +8 -0
  470. package/lib/module/handlers/TapGestureHandler.js.map +1 -1
  471. package/lib/module/handlers/createHandler.js +127 -200
  472. package/lib/module/handlers/createHandler.js.map +1 -1
  473. package/lib/module/handlers/createNativeWrapper.js +22 -22
  474. package/lib/module/handlers/createNativeWrapper.js.map +1 -1
  475. package/lib/module/handlers/customDirectEventTypes.js +2 -0
  476. package/lib/module/handlers/customDirectEventTypes.js.map +1 -1
  477. package/lib/module/handlers/customDirectEventTypes.web.js +2 -0
  478. package/lib/module/handlers/customDirectEventTypes.web.js.map +1 -1
  479. package/lib/module/handlers/gestureHandlerCommon.js +11 -4
  480. package/lib/module/handlers/gestureHandlerCommon.js.map +1 -1
  481. package/lib/module/handlers/gestureHandlerTypesCompat.js +2 -0
  482. package/lib/module/handlers/gestureHandlerTypesCompat.js.map +1 -1
  483. package/lib/module/handlers/gestures/GestureDetector/Wrap.js +4 -4
  484. package/lib/module/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
  485. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js +12 -8
  486. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
  487. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js +10 -16
  488. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
  489. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js +2 -1
  490. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
  491. package/lib/module/handlers/gestures/GestureDetector/index.js +18 -19
  492. package/lib/module/handlers/gestures/GestureDetector/index.js.map +1 -1
  493. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js +2 -2
  494. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -1
  495. package/lib/module/handlers/gestures/GestureDetector/types.js +2 -0
  496. package/lib/module/handlers/gestures/GestureDetector/types.js.map +1 -1
  497. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js +16 -16
  498. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
  499. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js +15 -41
  500. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
  501. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js +7 -5
  502. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
  503. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js +4 -6
  504. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
  505. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js +7 -7
  506. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
  507. package/lib/module/handlers/gestures/GestureDetector/utils.js +21 -26
  508. package/lib/module/handlers/gestures/GestureDetector/utils.js.map +1 -1
  509. package/lib/module/handlers/gestures/eventReceiver.js +16 -47
  510. package/lib/module/handlers/gestures/eventReceiver.js.map +1 -1
  511. package/lib/module/handlers/gestures/flingGesture.js +4 -9
  512. package/lib/module/handlers/gestures/flingGesture.js.map +1 -1
  513. package/lib/module/handlers/gestures/forceTouchGesture.js +7 -17
  514. package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -1
  515. package/lib/module/handlers/gestures/gesture.js +51 -81
  516. package/lib/module/handlers/gestures/gesture.js.map +1 -1
  517. package/lib/module/handlers/gestures/gestureComposition.js +17 -26
  518. package/lib/module/handlers/gestures/gestureComposition.js.map +1 -1
  519. package/lib/module/handlers/gestures/gestureObjects.js +3 -14
  520. package/lib/module/handlers/gestures/gestureObjects.js.map +1 -1
  521. package/lib/module/handlers/gestures/gestureStateManager.js +7 -6
  522. package/lib/module/handlers/gestures/gestureStateManager.js.map +1 -1
  523. package/lib/module/handlers/gestures/gestureStateManager.web.js +2 -1
  524. package/lib/module/handlers/gestures/gestureStateManager.web.js.map +1 -1
  525. package/lib/module/handlers/gestures/hoverGesture.js +8 -18
  526. package/lib/module/handlers/gestures/hoverGesture.js.map +1 -1
  527. package/lib/module/handlers/gestures/longPressGesture.js +5 -11
  528. package/lib/module/handlers/gestures/longPressGesture.js.map +1 -1
  529. package/lib/module/handlers/gestures/manualGesture.js +2 -4
  530. package/lib/module/handlers/gestures/manualGesture.js.map +1 -1
  531. package/lib/module/handlers/gestures/nativeGesture.ts +33 -0
  532. package/lib/module/handlers/gestures/panGesture.js +17 -41
  533. package/lib/module/handlers/gestures/panGesture.js.map +1 -1
  534. package/lib/module/handlers/gestures/pinchGesture.js +4 -7
  535. package/lib/module/handlers/gestures/pinchGesture.js.map +1 -1
  536. package/lib/module/handlers/gestures/reanimatedWrapper.js +2 -6
  537. package/lib/module/handlers/gestures/reanimatedWrapper.js.map +1 -1
  538. package/lib/module/handlers/gestures/rotationGesture.js +4 -7
  539. package/lib/module/handlers/gestures/rotationGesture.js.map +1 -1
  540. package/lib/module/handlers/gestures/tapGesture.js +9 -19
  541. package/lib/module/handlers/gestures/tapGesture.js.map +1 -1
  542. package/lib/module/handlers/getNextHandlerTag.js +2 -0
  543. package/lib/module/handlers/getNextHandlerTag.js.map +1 -1
  544. package/lib/module/handlers/handlersRegistry.js +3 -7
  545. package/lib/module/handlers/handlersRegistry.js.map +1 -1
  546. package/lib/module/handlers/utils.js +8 -18
  547. package/lib/module/handlers/utils.js.map +1 -1
  548. package/lib/module/index.js +2 -0
  549. package/lib/module/index.js.map +1 -1
  550. package/lib/module/init.js +5 -2
  551. package/lib/module/init.js.map +1 -1
  552. package/lib/module/jestUtils/index.js +2 -0
  553. package/lib/module/jestUtils/index.js.map +1 -1
  554. package/lib/module/jestUtils/jestUtils.js +27 -74
  555. package/lib/module/jestUtils/jestUtils.js.map +1 -1
  556. package/lib/module/mocks.js +9 -9
  557. package/lib/module/mocks.js.map +1 -1
  558. package/lib/module/mountRegistry.js +3 -11
  559. package/lib/module/mountRegistry.js.map +1 -1
  560. package/lib/module/specs/NativeRNGestureHandlerModule.ts +26 -0
  561. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.ts +22 -0
  562. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.ts +6 -0
  563. package/lib/module/typeUtils.js +1 -1
  564. package/lib/module/typeUtils.js.map +1 -1
  565. package/lib/module/utils.js +8 -14
  566. package/lib/module/utils.js.map +1 -1
  567. package/lib/module/web/Gestures.js +4 -1
  568. package/lib/module/web/Gestures.js.map +1 -1
  569. package/lib/module/web/constants.js +2 -0
  570. package/lib/module/web/constants.js.map +1 -1
  571. package/lib/module/web/detectors/RotationGestureDetector.js +11 -48
  572. package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -1
  573. package/lib/module/web/detectors/ScaleGestureDetector.js +12 -50
  574. package/lib/module/web/detectors/ScaleGestureDetector.js.map +1 -1
  575. package/lib/module/web/handlers/FlingGestureHandler.js +9 -48
  576. package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
  577. package/lib/module/web/handlers/GestureHandler.js +90 -212
  578. package/lib/module/web/handlers/GestureHandler.js.map +1 -1
  579. package/lib/module/web/handlers/HoverGestureHandler.js +3 -14
  580. package/lib/module/web/handlers/HoverGestureHandler.js.map +1 -1
  581. package/lib/module/web/handlers/IGestureHandler.js +1 -1
  582. package/lib/module/web/handlers/IGestureHandler.js.map +1 -1
  583. package/lib/module/web/handlers/LongPressGestureHandler.js +11 -51
  584. package/lib/module/web/handlers/LongPressGestureHandler.js.map +1 -1
  585. package/lib/module/web/handlers/ManualGestureHandler.js +2 -6
  586. package/lib/module/web/handlers/ManualGestureHandler.js.map +1 -1
  587. package/lib/module/web/handlers/NativeViewGestureHandler.ts +175 -0
  588. package/lib/module/web/handlers/PanGestureHandler.js +33 -145
  589. package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
  590. package/lib/module/web/handlers/PinchGestureHandler.js +25 -59
  591. package/lib/module/web/handlers/PinchGestureHandler.js.map +1 -1
  592. package/lib/module/web/handlers/RotationGestureHandler.js +23 -58
  593. package/lib/module/web/handlers/RotationGestureHandler.js.map +1 -1
  594. package/lib/module/web/handlers/TapGestureHandler.js +18 -78
  595. package/lib/module/web/handlers/TapGestureHandler.js.map +1 -1
  596. package/lib/module/web/interfaces.js +10 -13
  597. package/lib/module/web/interfaces.js.map +1 -1
  598. package/lib/module/web/tools/CircularBuffer.js +1 -16
  599. package/lib/module/web/tools/CircularBuffer.js.map +1 -1
  600. package/lib/module/web/tools/EventManager.js +6 -41
  601. package/lib/module/web/tools/EventManager.js.map +1 -1
  602. package/lib/module/web/tools/GestureHandlerDelegate.js +2 -0
  603. package/lib/module/web/tools/GestureHandlerDelegate.js.map +1 -1
  604. package/lib/module/web/tools/GestureHandlerOrchestrator.js +13 -78
  605. package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  606. package/lib/module/web/tools/GestureHandlerWebDelegate.js +14 -49
  607. package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  608. package/lib/module/web/tools/InteractionManager.js +13 -32
  609. package/lib/module/web/tools/InteractionManager.js.map +1 -1
  610. package/lib/module/web/tools/KeyboardEventManager.js +24 -44
  611. package/lib/module/web/tools/KeyboardEventManager.js.map +1 -1
  612. package/lib/module/web/tools/LeastSquareSolver.js +25 -66
  613. package/lib/module/web/tools/LeastSquareSolver.js.map +1 -1
  614. package/lib/module/web/tools/NodeManager.js +6 -12
  615. package/lib/module/web/tools/NodeManager.js.map +1 -1
  616. package/lib/module/web/tools/PointerEventManager.js +119 -148
  617. package/lib/module/web/tools/PointerEventManager.js.map +1 -1
  618. package/lib/module/web/tools/PointerTracker.js +20 -56
  619. package/lib/module/web/tools/PointerTracker.js.map +1 -1
  620. package/lib/module/web/tools/Vector.js +2 -20
  621. package/lib/module/web/tools/Vector.js.map +1 -1
  622. package/lib/module/web/tools/VelocityTracker.js +10 -29
  623. package/lib/module/web/tools/VelocityTracker.js.map +1 -1
  624. package/lib/module/web/tools/WheelEventManager.js +15 -26
  625. package/lib/module/web/tools/WheelEventManager.js.map +1 -1
  626. package/lib/module/web/utils.js +29 -49
  627. package/lib/module/web/utils.js.map +1 -1
  628. package/lib/module/web_hammer/DiscreteGestureHandler.js +6 -13
  629. package/lib/module/web_hammer/DiscreteGestureHandler.js.map +1 -1
  630. package/lib/module/web_hammer/DraggingGestureHandler.js +2 -5
  631. package/lib/module/web_hammer/DraggingGestureHandler.js.map +1 -1
  632. package/lib/module/web_hammer/Errors.js +2 -1
  633. package/lib/module/web_hammer/Errors.js.map +1 -1
  634. package/lib/module/web_hammer/FlingGestureHandler.js +12 -35
  635. package/lib/module/web_hammer/FlingGestureHandler.js.map +1 -1
  636. package/lib/module/web_hammer/GestureHandler.js +148 -233
  637. package/lib/module/web_hammer/GestureHandler.js.map +1 -1
  638. package/lib/module/web_hammer/IndiscreteGestureHandler.js +3 -6
  639. package/lib/module/web_hammer/IndiscreteGestureHandler.js.map +1 -1
  640. package/lib/module/web_hammer/LongPressGestureHandler.js +4 -11
  641. package/lib/module/web_hammer/LongPressGestureHandler.js.map +1 -1
  642. package/lib/module/web_hammer/NativeViewGestureHandler.ts +47 -0
  643. package/lib/module/web_hammer/NodeManager.js +8 -8
  644. package/lib/module/web_hammer/NodeManager.js.map +1 -1
  645. package/lib/module/web_hammer/PanGestureHandler.js +8 -40
  646. package/lib/module/web_hammer/PanGestureHandler.js.map +1 -1
  647. package/lib/module/web_hammer/PinchGestureHandler.js +2 -5
  648. package/lib/module/web_hammer/PinchGestureHandler.js.map +1 -1
  649. package/lib/module/web_hammer/PressGestureHandler.js +13 -39
  650. package/lib/module/web_hammer/PressGestureHandler.js.map +1 -1
  651. package/lib/module/web_hammer/RotationGestureHandler.js +3 -8
  652. package/lib/module/web_hammer/RotationGestureHandler.js.map +1 -1
  653. package/lib/module/web_hammer/TapGestureHandler.js +42 -62
  654. package/lib/module/web_hammer/TapGestureHandler.js.map +1 -1
  655. package/lib/module/web_hammer/constants.js +4 -1
  656. package/lib/module/web_hammer/constants.js.map +1 -1
  657. package/lib/module/web_hammer/utils.js +4 -2
  658. package/lib/module/web_hammer/utils.js.map +1 -1
  659. package/lib/typescript/ActionType.d.ts +1 -0
  660. package/lib/typescript/ActionType.d.ts.map +1 -0
  661. package/lib/typescript/Directions.d.ts +1 -0
  662. package/lib/typescript/Directions.d.ts.map +1 -0
  663. package/lib/typescript/EnableNewWebImplementation.d.ts +1 -0
  664. package/lib/typescript/EnableNewWebImplementation.d.ts.map +1 -0
  665. package/lib/typescript/GestureHandlerRootViewContext.d.ts +1 -0
  666. package/lib/typescript/GestureHandlerRootViewContext.d.ts.map +1 -0
  667. package/lib/typescript/PlatformConstants.d.ts +1 -0
  668. package/lib/typescript/PlatformConstants.d.ts.map +1 -0
  669. package/lib/typescript/PlatformConstants.web.d.ts +1 -0
  670. package/lib/typescript/PlatformConstants.web.d.ts.map +1 -0
  671. package/lib/typescript/PointerType.d.ts +1 -0
  672. package/lib/typescript/PointerType.d.ts.map +1 -0
  673. package/lib/typescript/RNGestureHandlerModule.d.ts +1 -0
  674. package/lib/typescript/RNGestureHandlerModule.d.ts.map +1 -0
  675. package/lib/typescript/RNGestureHandlerModule.web.d.ts +1 -0
  676. package/lib/typescript/RNGestureHandlerModule.web.d.ts.map +1 -0
  677. package/lib/typescript/RNGestureHandlerModule.windows.d.ts +1 -0
  678. package/lib/typescript/RNGestureHandlerModule.windows.d.ts.map +1 -0
  679. package/lib/typescript/RNRenderer.d.ts +1 -0
  680. package/lib/typescript/RNRenderer.d.ts.map +1 -0
  681. package/lib/typescript/RNRenderer.web.d.ts +1 -0
  682. package/lib/typescript/RNRenderer.web.d.ts.map +1 -0
  683. package/lib/typescript/State.d.ts +1 -0
  684. package/lib/typescript/State.d.ts.map +1 -0
  685. package/lib/typescript/TouchEventType.d.ts +1 -0
  686. package/lib/typescript/TouchEventType.d.ts.map +1 -0
  687. package/lib/typescript/components/DrawerLayout.d.ts +1 -0
  688. package/lib/typescript/components/DrawerLayout.d.ts.map +1 -0
  689. package/lib/typescript/components/GestureButtons.d.ts +1 -0
  690. package/lib/typescript/components/GestureButtons.d.ts.map +1 -0
  691. package/lib/typescript/components/GestureButtonsProps.d.ts +1 -0
  692. package/lib/typescript/components/GestureButtonsProps.d.ts.map +1 -0
  693. package/lib/typescript/components/GestureComponents.d.ts +4 -3
  694. package/lib/typescript/components/GestureComponents.d.ts.map +1 -0
  695. package/lib/typescript/components/GestureComponents.web.d.ts +1 -0
  696. package/lib/typescript/components/GestureComponents.web.d.ts.map +1 -0
  697. package/lib/typescript/components/GestureHandlerButton.d.ts +1 -0
  698. package/lib/typescript/components/GestureHandlerButton.d.ts.map +1 -0
  699. package/lib/typescript/components/GestureHandlerButton.web.d.ts +1 -0
  700. package/lib/typescript/components/GestureHandlerButton.web.d.ts.map +1 -0
  701. package/lib/typescript/components/GestureHandlerRootView.android.d.ts +1 -0
  702. package/lib/typescript/components/GestureHandlerRootView.android.d.ts.map +1 -0
  703. package/lib/typescript/components/GestureHandlerRootView.d.ts +1 -0
  704. package/lib/typescript/components/GestureHandlerRootView.d.ts.map +1 -0
  705. package/lib/typescript/components/GestureHandlerRootView.web.d.ts +1 -0
  706. package/lib/typescript/components/GestureHandlerRootView.web.d.ts.map +1 -0
  707. package/lib/typescript/components/Pressable/Pressable.d.ts +1 -0
  708. package/lib/typescript/components/Pressable/Pressable.d.ts.map +1 -0
  709. package/lib/typescript/components/Pressable/PressableProps.d.ts +17 -1
  710. package/lib/typescript/components/Pressable/PressableProps.d.ts.map +1 -0
  711. package/lib/typescript/components/Pressable/index.d.ts +1 -0
  712. package/lib/typescript/components/Pressable/index.d.ts.map +1 -0
  713. package/lib/typescript/components/Pressable/utils.d.ts +1 -0
  714. package/lib/typescript/components/Pressable/utils.d.ts.map +1 -0
  715. package/lib/typescript/components/ReanimatedDrawerLayout.d.ts +1 -0
  716. package/lib/typescript/components/ReanimatedDrawerLayout.d.ts.map +1 -0
  717. package/lib/typescript/components/ReanimatedSwipeable.d.ts +13 -2
  718. package/lib/typescript/components/ReanimatedSwipeable.d.ts.map +1 -0
  719. package/lib/typescript/components/Swipeable.d.ts +1 -0
  720. package/lib/typescript/components/Swipeable.d.ts.map +1 -0
  721. package/lib/typescript/components/Text.d.ts +1 -0
  722. package/lib/typescript/components/Text.d.ts.map +1 -0
  723. package/lib/typescript/components/gestureHandlerRootHOC.d.ts +1 -0
  724. package/lib/typescript/components/gestureHandlerRootHOC.d.ts.map +1 -0
  725. package/lib/typescript/components/touchables/ExtraButtonProps.d.ts +1 -0
  726. package/lib/typescript/components/touchables/ExtraButtonProps.d.ts.map +1 -0
  727. package/lib/typescript/components/touchables/GenericTouchable.d.ts +1 -0
  728. package/lib/typescript/components/touchables/GenericTouchable.d.ts.map +1 -0
  729. package/lib/typescript/components/touchables/GenericTouchableProps.d.ts +1 -0
  730. package/lib/typescript/components/touchables/GenericTouchableProps.d.ts.map +1 -0
  731. package/lib/typescript/components/touchables/TouchableHighlight.d.ts +1 -0
  732. package/lib/typescript/components/touchables/TouchableHighlight.d.ts.map +1 -0
  733. package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +1 -0
  734. package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts.map +1 -0
  735. package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +1 -0
  736. package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts.map +1 -0
  737. package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +1 -0
  738. package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts.map +1 -0
  739. package/lib/typescript/components/touchables/TouchableOpacity.d.ts +1 -0
  740. package/lib/typescript/components/touchables/TouchableOpacity.d.ts.map +1 -0
  741. package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +2 -1
  742. package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts.map +1 -0
  743. package/lib/typescript/components/touchables/index.d.ts +1 -0
  744. package/lib/typescript/components/touchables/index.d.ts.map +1 -0
  745. package/lib/typescript/components/utils.d.ts +5 -0
  746. package/lib/typescript/components/utils.d.ts.map +1 -0
  747. package/lib/typescript/findNodeHandle.d.ts +1 -0
  748. package/lib/typescript/findNodeHandle.d.ts.map +1 -0
  749. package/lib/typescript/findNodeHandle.web.d.ts +1 -0
  750. package/lib/typescript/findNodeHandle.web.d.ts.map +1 -0
  751. package/lib/typescript/getShadowNodeFromRef.d.ts +1 -0
  752. package/lib/typescript/getShadowNodeFromRef.d.ts.map +1 -0
  753. package/lib/typescript/getShadowNodeFromRef.web.d.ts +1 -0
  754. package/lib/typescript/getShadowNodeFromRef.web.d.ts.map +1 -0
  755. package/lib/typescript/ghQueueMicrotask.d.ts +1 -0
  756. package/lib/typescript/ghQueueMicrotask.d.ts.map +1 -0
  757. package/lib/typescript/handlers/FlingGestureHandler.d.ts +1 -1
  758. package/lib/typescript/handlers/FlingGestureHandler.d.ts.map +1 -0
  759. package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +1 -0
  760. package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts.map +1 -0
  761. package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts +1 -0
  762. package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts.map +1 -0
  763. package/lib/typescript/handlers/LongPressGestureHandler.d.ts +1 -1
  764. package/lib/typescript/handlers/LongPressGestureHandler.d.ts.map +1 -0
  765. package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +1 -1
  766. package/lib/typescript/handlers/NativeViewGestureHandler.d.ts.map +1 -0
  767. package/lib/typescript/handlers/PanGestureHandler.d.ts +1 -1
  768. package/lib/typescript/handlers/PanGestureHandler.d.ts.map +1 -0
  769. package/lib/typescript/handlers/PinchGestureHandler.d.ts +1 -1
  770. package/lib/typescript/handlers/PinchGestureHandler.d.ts.map +1 -0
  771. package/lib/typescript/handlers/PressabilityDebugView.d.ts +1 -0
  772. package/lib/typescript/handlers/PressabilityDebugView.d.ts.map +1 -0
  773. package/lib/typescript/handlers/PressabilityDebugView.web.d.ts +1 -0
  774. package/lib/typescript/handlers/PressabilityDebugView.web.d.ts.map +1 -0
  775. package/lib/typescript/handlers/RotationGestureHandler.d.ts +1 -1
  776. package/lib/typescript/handlers/RotationGestureHandler.d.ts.map +1 -0
  777. package/lib/typescript/handlers/TapGestureHandler.d.ts +1 -1
  778. package/lib/typescript/handlers/TapGestureHandler.d.ts.map +1 -0
  779. package/lib/typescript/handlers/createHandler.d.ts +1 -0
  780. package/lib/typescript/handlers/createHandler.d.ts.map +1 -0
  781. package/lib/typescript/handlers/createNativeWrapper.d.ts +1 -0
  782. package/lib/typescript/handlers/createNativeWrapper.d.ts.map +1 -0
  783. package/lib/typescript/handlers/customDirectEventTypes.d.ts +1 -0
  784. package/lib/typescript/handlers/customDirectEventTypes.d.ts.map +1 -0
  785. package/lib/typescript/handlers/customDirectEventTypes.web.d.ts +1 -0
  786. package/lib/typescript/handlers/customDirectEventTypes.web.d.ts.map +1 -0
  787. package/lib/typescript/handlers/gestureHandlerCommon.d.ts +1 -0
  788. package/lib/typescript/handlers/gestureHandlerCommon.d.ts.map +1 -0
  789. package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts +1 -0
  790. package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts.map +1 -0
  791. package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts +1 -0
  792. package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts.map +1 -0
  793. package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts +3 -2
  794. package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts.map +1 -0
  795. package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts +1 -0
  796. package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts.map +1 -0
  797. package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts +1 -0
  798. package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts.map +1 -0
  799. package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts +1 -0
  800. package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts.map +1 -0
  801. package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts +1 -0
  802. package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts.map +1 -0
  803. package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts +1 -1
  804. package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts.map +1 -0
  805. package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts +1 -0
  806. package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts.map +1 -0
  807. package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts +1 -0
  808. package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts.map +1 -0
  809. package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts +1 -0
  810. package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts.map +1 -0
  811. package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts +1 -0
  812. package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts.map +1 -0
  813. package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts +1 -0
  814. package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts.map +1 -0
  815. package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts +1 -1
  816. package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts.map +1 -0
  817. package/lib/typescript/handlers/gestures/eventReceiver.d.ts +1 -0
  818. package/lib/typescript/handlers/gestures/eventReceiver.d.ts.map +1 -0
  819. package/lib/typescript/handlers/gestures/flingGesture.d.ts +1 -0
  820. package/lib/typescript/handlers/gestures/flingGesture.d.ts.map +1 -0
  821. package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts +1 -0
  822. package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts.map +1 -0
  823. package/lib/typescript/handlers/gestures/gesture.d.ts +1 -1
  824. package/lib/typescript/handlers/gestures/gesture.d.ts.map +1 -0
  825. package/lib/typescript/handlers/gestures/gestureComposition.d.ts +1 -0
  826. package/lib/typescript/handlers/gestures/gestureComposition.d.ts.map +1 -0
  827. package/lib/typescript/handlers/gestures/gestureObjects.d.ts +1 -0
  828. package/lib/typescript/handlers/gestures/gestureObjects.d.ts.map +1 -0
  829. package/lib/typescript/handlers/gestures/gestureStateManager.d.ts +1 -0
  830. package/lib/typescript/handlers/gestures/gestureStateManager.d.ts.map +1 -0
  831. package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts +1 -0
  832. package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts.map +1 -0
  833. package/lib/typescript/handlers/gestures/hoverGesture.d.ts +1 -0
  834. package/lib/typescript/handlers/gestures/hoverGesture.d.ts.map +1 -0
  835. package/lib/typescript/handlers/gestures/longPressGesture.d.ts +1 -0
  836. package/lib/typescript/handlers/gestures/longPressGesture.d.ts.map +1 -0
  837. package/lib/typescript/handlers/gestures/manualGesture.d.ts +1 -0
  838. package/lib/typescript/handlers/gestures/manualGesture.d.ts.map +1 -0
  839. package/lib/typescript/handlers/gestures/nativeGesture.d.ts +1 -0
  840. package/lib/typescript/handlers/gestures/nativeGesture.d.ts.map +1 -0
  841. package/lib/typescript/handlers/gestures/panGesture.d.ts +1 -0
  842. package/lib/typescript/handlers/gestures/panGesture.d.ts.map +1 -0
  843. package/lib/typescript/handlers/gestures/pinchGesture.d.ts +1 -0
  844. package/lib/typescript/handlers/gestures/pinchGesture.d.ts.map +1 -0
  845. package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts +1 -0
  846. package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts.map +1 -0
  847. package/lib/typescript/handlers/gestures/rotationGesture.d.ts +1 -0
  848. package/lib/typescript/handlers/gestures/rotationGesture.d.ts.map +1 -0
  849. package/lib/typescript/handlers/gestures/tapGesture.d.ts +1 -0
  850. package/lib/typescript/handlers/gestures/tapGesture.d.ts.map +1 -0
  851. package/lib/typescript/handlers/getNextHandlerTag.d.ts +1 -0
  852. package/lib/typescript/handlers/getNextHandlerTag.d.ts.map +1 -0
  853. package/lib/typescript/handlers/handlersRegistry.d.ts +1 -0
  854. package/lib/typescript/handlers/handlersRegistry.d.ts.map +1 -0
  855. package/lib/typescript/handlers/utils.d.ts +1 -0
  856. package/lib/typescript/handlers/utils.d.ts.map +1 -0
  857. package/lib/typescript/index.d.ts +1 -0
  858. package/lib/typescript/index.d.ts.map +1 -0
  859. package/lib/typescript/init.d.ts +1 -0
  860. package/lib/typescript/init.d.ts.map +1 -0
  861. package/lib/typescript/jestUtils/index.d.ts +1 -0
  862. package/lib/typescript/jestUtils/index.d.ts.map +1 -0
  863. package/lib/typescript/jestUtils/jestUtils.d.ts +1 -1
  864. package/lib/typescript/jestUtils/jestUtils.d.ts.map +1 -0
  865. package/lib/typescript/mocks.d.ts +1 -0
  866. package/lib/typescript/mocks.d.ts.map +1 -0
  867. package/lib/typescript/mountRegistry.d.ts +1 -1
  868. package/lib/typescript/mountRegistry.d.ts.map +1 -0
  869. package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts +1 -0
  870. package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts.map +1 -0
  871. package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts +1 -1
  872. package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts.map +1 -0
  873. package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +1 -1
  874. package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts.map +1 -0
  875. package/lib/typescript/typeUtils.d.ts +1 -0
  876. package/lib/typescript/typeUtils.d.ts.map +1 -0
  877. package/lib/typescript/utils.d.ts +1 -0
  878. package/lib/typescript/utils.d.ts.map +1 -0
  879. package/lib/typescript/web/Gestures.d.ts +1 -0
  880. package/lib/typescript/web/Gestures.d.ts.map +1 -0
  881. package/lib/typescript/web/constants.d.ts +1 -0
  882. package/lib/typescript/web/constants.d.ts.map +1 -0
  883. package/lib/typescript/web/detectors/RotationGestureDetector.d.ts +1 -0
  884. package/lib/typescript/web/detectors/RotationGestureDetector.d.ts.map +1 -0
  885. package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts +1 -0
  886. package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts.map +1 -0
  887. package/lib/typescript/web/handlers/FlingGestureHandler.d.ts +1 -0
  888. package/lib/typescript/web/handlers/FlingGestureHandler.d.ts.map +1 -0
  889. package/lib/typescript/web/handlers/GestureHandler.d.ts +1 -1
  890. package/lib/typescript/web/handlers/GestureHandler.d.ts.map +1 -0
  891. package/lib/typescript/web/handlers/HoverGestureHandler.d.ts +1 -0
  892. package/lib/typescript/web/handlers/HoverGestureHandler.d.ts.map +1 -0
  893. package/lib/typescript/web/handlers/IGestureHandler.d.ts +1 -0
  894. package/lib/typescript/web/handlers/IGestureHandler.d.ts.map +1 -0
  895. package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts +1 -1
  896. package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts.map +1 -0
  897. package/lib/typescript/web/handlers/ManualGestureHandler.d.ts +1 -0
  898. package/lib/typescript/web/handlers/ManualGestureHandler.d.ts.map +1 -0
  899. package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts +1 -1
  900. package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts.map +1 -0
  901. package/lib/typescript/web/handlers/PanGestureHandler.d.ts +1 -0
  902. package/lib/typescript/web/handlers/PanGestureHandler.d.ts.map +1 -0
  903. package/lib/typescript/web/handlers/PinchGestureHandler.d.ts +1 -1
  904. package/lib/typescript/web/handlers/PinchGestureHandler.d.ts.map +1 -0
  905. package/lib/typescript/web/handlers/RotationGestureHandler.d.ts +1 -1
  906. package/lib/typescript/web/handlers/RotationGestureHandler.d.ts.map +1 -0
  907. package/lib/typescript/web/handlers/TapGestureHandler.d.ts +1 -0
  908. package/lib/typescript/web/handlers/TapGestureHandler.d.ts.map +1 -0
  909. package/lib/typescript/web/interfaces.d.ts +1 -0
  910. package/lib/typescript/web/interfaces.d.ts.map +1 -0
  911. package/lib/typescript/web/tools/CircularBuffer.d.ts +1 -0
  912. package/lib/typescript/web/tools/CircularBuffer.d.ts.map +1 -0
  913. package/lib/typescript/web/tools/EventManager.d.ts +1 -0
  914. package/lib/typescript/web/tools/EventManager.d.ts.map +1 -0
  915. package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +1 -0
  916. package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts.map +1 -0
  917. package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts +1 -0
  918. package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts.map +1 -0
  919. package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +1 -0
  920. package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts.map +1 -0
  921. package/lib/typescript/web/tools/InteractionManager.d.ts +1 -0
  922. package/lib/typescript/web/tools/InteractionManager.d.ts.map +1 -0
  923. package/lib/typescript/web/tools/KeyboardEventManager.d.ts +1 -0
  924. package/lib/typescript/web/tools/KeyboardEventManager.d.ts.map +1 -0
  925. package/lib/typescript/web/tools/LeastSquareSolver.d.ts +1 -0
  926. package/lib/typescript/web/tools/LeastSquareSolver.d.ts.map +1 -0
  927. package/lib/typescript/web/tools/NodeManager.d.ts +1 -0
  928. package/lib/typescript/web/tools/NodeManager.d.ts.map +1 -0
  929. package/lib/typescript/web/tools/PointerEventManager.d.ts +1 -0
  930. package/lib/typescript/web/tools/PointerEventManager.d.ts.map +1 -0
  931. package/lib/typescript/web/tools/PointerTracker.d.ts +1 -0
  932. package/lib/typescript/web/tools/PointerTracker.d.ts.map +1 -0
  933. package/lib/typescript/web/tools/Vector.d.ts +1 -0
  934. package/lib/typescript/web/tools/Vector.d.ts.map +1 -0
  935. package/lib/typescript/web/tools/VelocityTracker.d.ts +1 -0
  936. package/lib/typescript/web/tools/VelocityTracker.d.ts.map +1 -0
  937. package/lib/typescript/web/tools/WheelEventManager.d.ts +1 -0
  938. package/lib/typescript/web/tools/WheelEventManager.d.ts.map +1 -0
  939. package/lib/typescript/web/utils.d.ts +1 -0
  940. package/lib/typescript/web/utils.d.ts.map +1 -0
  941. package/lib/typescript/web_hammer/DiscreteGestureHandler.d.ts +1 -0
  942. package/lib/typescript/web_hammer/DiscreteGestureHandler.d.ts.map +1 -0
  943. package/lib/typescript/web_hammer/DraggingGestureHandler.d.ts +1 -0
  944. package/lib/typescript/web_hammer/DraggingGestureHandler.d.ts.map +1 -0
  945. package/lib/typescript/web_hammer/Errors.d.ts +1 -0
  946. package/lib/typescript/web_hammer/Errors.d.ts.map +1 -0
  947. package/lib/typescript/web_hammer/FlingGestureHandler.d.ts +1 -0
  948. package/lib/typescript/web_hammer/FlingGestureHandler.d.ts.map +1 -0
  949. package/lib/typescript/web_hammer/GestureHandler.d.ts +1 -0
  950. package/lib/typescript/web_hammer/GestureHandler.d.ts.map +1 -0
  951. package/lib/typescript/web_hammer/IndiscreteGestureHandler.d.ts +1 -0
  952. package/lib/typescript/web_hammer/IndiscreteGestureHandler.d.ts.map +1 -0
  953. package/lib/typescript/web_hammer/LongPressGestureHandler.d.ts +1 -0
  954. package/lib/typescript/web_hammer/LongPressGestureHandler.d.ts.map +1 -0
  955. package/lib/typescript/web_hammer/NativeViewGestureHandler.d.ts +1 -0
  956. package/lib/typescript/web_hammer/NativeViewGestureHandler.d.ts.map +1 -0
  957. package/lib/typescript/web_hammer/NodeManager.d.ts +1 -0
  958. package/lib/typescript/web_hammer/NodeManager.d.ts.map +1 -0
  959. package/lib/typescript/web_hammer/PanGestureHandler.d.ts +1 -0
  960. package/lib/typescript/web_hammer/PanGestureHandler.d.ts.map +1 -0
  961. package/lib/typescript/web_hammer/PinchGestureHandler.d.ts +1 -0
  962. package/lib/typescript/web_hammer/PinchGestureHandler.d.ts.map +1 -0
  963. package/lib/typescript/web_hammer/PressGestureHandler.d.ts +1 -0
  964. package/lib/typescript/web_hammer/PressGestureHandler.d.ts.map +1 -0
  965. package/lib/typescript/web_hammer/RotationGestureHandler.d.ts +1 -0
  966. package/lib/typescript/web_hammer/RotationGestureHandler.d.ts.map +1 -0
  967. package/lib/typescript/web_hammer/TapGestureHandler.d.ts +1 -0
  968. package/lib/typescript/web_hammer/TapGestureHandler.d.ts.map +1 -0
  969. package/lib/typescript/web_hammer/constants.d.ts +1 -0
  970. package/lib/typescript/web_hammer/constants.d.ts.map +1 -0
  971. package/lib/typescript/web_hammer/utils.d.ts +1 -0
  972. package/lib/typescript/web_hammer/utils.d.ts.map +1 -0
  973. package/package.json +27 -47
  974. package/src/components/DrawerLayout.tsx +5 -2
  975. package/src/components/GestureButtons.tsx +2 -2
  976. package/src/components/GestureComponents.web.tsx +1 -1
  977. package/src/components/GestureHandlerButton.web.tsx +3 -3
  978. package/src/components/Pressable/Pressable.tsx +34 -9
  979. package/src/components/Pressable/PressableProps.tsx +19 -0
  980. package/src/components/ReanimatedSwipeable.tsx +55 -33
  981. package/src/components/Swipeable.tsx +3 -0
  982. package/src/components/Text.tsx +5 -2
  983. package/src/components/utils.ts +26 -0
  984. package/src/getShadowNodeFromRef.ts +2 -2
  985. package/src/handlers/createHandler.tsx +1 -0
  986. package/src/handlers/gestures/reanimatedWrapper.ts +0 -1
  987. package/src/handlers/utils.ts +1 -1
  988. package/src/utils.ts +0 -1
  989. package/src/web_hammer/DiscreteGestureHandler.ts +1 -1
  990. package/src/web_hammer/DraggingGestureHandler.ts +1 -1
  991. package/src/web_hammer/FlingGestureHandler.ts +1 -1
  992. package/src/web_hammer/GestureHandler.ts +2 -1
  993. package/src/web_hammer/LongPressGestureHandler.ts +1 -1
  994. package/README.md +0 -71
  995. package/android/packageDeprecated/src/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt +0 -85
  996. package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerDelegate.java +0 -60
  997. package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerInterface.java +0 -26
  998. package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerDelegate.java +0 -26
  999. package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerInterface.java +0 -16
  1000. package/android/paper77/src/main/java/com/swmansion/gesturehandler/NativeRNGestureHandlerModuleSpec.java +0 -67
  1001. package/android/paper77/src/main/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +0 -13
  1002. package/lib/commonjs/handlers/NativeViewGestureHandler.js +0 -35
  1003. package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +0 -1
  1004. package/lib/commonjs/handlers/gestures/nativeGesture.js +0 -44
  1005. package/lib/commonjs/handlers/gestures/nativeGesture.js.map +0 -1
  1006. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +0 -13
  1007. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +0 -1
  1008. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js +0 -15
  1009. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +0 -1
  1010. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js +0 -15
  1011. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +0 -1
  1012. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js +0 -189
  1013. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js.map +0 -1
  1014. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js +0 -66
  1015. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js.map +0 -1
  1016. package/lib/module/handlers/NativeViewGestureHandler.js +0 -19
  1017. package/lib/module/handlers/NativeViewGestureHandler.js.map +0 -1
  1018. package/lib/module/handlers/gestures/nativeGesture.js.map +0 -1
  1019. package/lib/module/specs/NativeRNGestureHandlerModule.js +0 -3
  1020. package/lib/module/specs/NativeRNGestureHandlerModule.js.map +0 -1
  1021. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js +0 -3
  1022. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +0 -1
  1023. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js +0 -3
  1024. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +0 -1
  1025. package/lib/module/web/handlers/NativeViewGestureHandler.js.map +0 -1
  1026. package/lib/module/web_hammer/NativeViewGestureHandler.js +0 -49
  1027. package/lib/module/web_hammer/NativeViewGestureHandler.js.map +0 -1
  1028. /package/android/{common → noreanimated}/src/main/java/com/swmansion/common/GestureHandlerStateManager.kt +0 -0
@@ -1,21 +1,22 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ "use strict";
2
2
 
3
3
  // Similarily to the DrawerLayout component this deserves to be put in a
4
4
  // separate repo. Although, keeping it here for the time being will allow us to
5
5
  // move faster and fix possible issues quicker
6
+
6
7
  import React, { forwardRef, useCallback, useImperativeHandle, useMemo } from 'react';
7
8
  import { GestureObjects as Gesture } from '../handlers/gestures/gestureObjects';
8
9
  import { GestureDetector } from '../handlers/gestures/GestureDetector';
9
10
  import Animated, { ReduceMotion, interpolate, measure, runOnJS, runOnUI, useAnimatedRef, useAnimatedStyle, useSharedValue, withSpring } from 'react-native-reanimated';
10
11
  import { I18nManager, StyleSheet, View } from 'react-native';
12
+ import { applyRelationProp } from './utils';
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
11
14
  const DRAG_TOSS = 0.05;
12
- var SwipeDirection;
13
-
14
- (function (SwipeDirection) {
15
+ var SwipeDirection = /*#__PURE__*/function (SwipeDirection) {
15
16
  SwipeDirection["LEFT"] = "left";
16
17
  SwipeDirection["RIGHT"] = "right";
17
- })(SwipeDirection || (SwipeDirection = {}));
18
-
18
+ return SwipeDirection;
19
+ }(SwipeDirection || {});
19
20
  const Swipeable = /*#__PURE__*/forwardRef(function Swipeable(props, ref) {
20
21
  const defaultProps = {
21
22
  friction: 1,
@@ -48,8 +49,16 @@ const Swipeable = /*#__PURE__*/forwardRef(function Swipeable(props, ref) {
48
49
  renderLeftActions,
49
50
  renderRightActions,
50
51
  simultaneousWithExternalGesture,
52
+ requireExternalGestureToFail,
53
+ blocksExternalGesture,
54
+ hitSlop,
51
55
  ...remainingProps
52
56
  } = props;
57
+ const relationProps = {
58
+ simultaneousWithExternalGesture,
59
+ requireExternalGestureToFail,
60
+ blocksExternalGesture
61
+ };
53
62
  const rowState = useSharedValue(0);
54
63
  const userDrag = useSharedValue(0);
55
64
  const appliedTranslation = useSharedValue(0);
@@ -61,8 +70,8 @@ const Swipeable = /*#__PURE__*/forwardRef(function Swipeable(props, ref) {
61
70
  const updateAnimatedEvent = useCallback(() => {
62
71
  'worklet';
63
72
 
64
- const shouldOvershootLeft = overshootLeft !== null && overshootLeft !== void 0 ? overshootLeft : leftWidth.value > 0;
65
- const shouldOvershootRight = overshootRight !== null && overshootRight !== void 0 ? overshootRight : rightWidth.value > 0;
73
+ const shouldOvershootLeft = overshootLeft ?? leftWidth.value > 0;
74
+ const shouldOvershootRight = overshootRight ?? rightWidth.value > 0;
66
75
  const startOffset = rowState.value === 1 ? leftWidth.value : rowState.value === -1 ? -rightWidth.value : 0;
67
76
  const offsetDrag = userDrag.value / friction + startOffset;
68
77
  appliedTranslation.value = interpolate(offsetDrag, [-rightWidth.value - 1, -rightWidth.value, leftWidth.value, leftWidth.value + 1], [-rightWidth.value - (shouldOvershootRight ? 1 / overshootFriction : 0), -rightWidth.value, leftWidth.value, leftWidth.value + (shouldOvershootLeft ? 1 / overshootFriction : 0)]);
@@ -72,22 +81,20 @@ const Swipeable = /*#__PURE__*/forwardRef(function Swipeable(props, ref) {
72
81
  const dispatchImmediateEvents = useCallback((fromValue, toValue) => {
73
82
  'worklet';
74
83
 
75
- if (toValue > 0 && onSwipeableWillOpen) {
76
- runOnJS(onSwipeableWillOpen)(SwipeDirection.RIGHT);
77
- } else if (toValue < 0 && onSwipeableWillOpen) {
78
- runOnJS(onSwipeableWillOpen)(SwipeDirection.LEFT);
79
- } else if (onSwipeableWillClose) {
84
+ if (onSwipeableWillOpen && toValue !== 0) {
85
+ runOnJS(onSwipeableWillOpen)(toValue > 0 ? SwipeDirection.RIGHT : SwipeDirection.LEFT);
86
+ }
87
+ if (onSwipeableWillClose && toValue === 0) {
80
88
  runOnJS(onSwipeableWillClose)(fromValue > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT);
81
89
  }
82
- }, [onSwipeableWillClose, onSwipeableWillOpen]);
90
+ }, [onSwipeableWillClose, onSwipeableWillOpen, rowState]);
83
91
  const dispatchEndEvents = useCallback((fromValue, toValue) => {
84
92
  'worklet';
85
93
 
86
- if (toValue > 0 && onSwipeableOpen) {
87
- runOnJS(onSwipeableOpen)(SwipeDirection.RIGHT);
88
- } else if (toValue < 0 && onSwipeableOpen) {
89
- runOnJS(onSwipeableOpen)(SwipeDirection.LEFT);
90
- } else if (onSwipeableClose) {
94
+ if (onSwipeableOpen && toValue !== 0) {
95
+ runOnJS(onSwipeableOpen)(toValue > 0 ? SwipeDirection.RIGHT : SwipeDirection.LEFT);
96
+ }
97
+ if (onSwipeableClose && toValue === 0) {
91
98
  runOnJS(onSwipeableClose)(fromValue > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT);
92
99
  }
93
100
  }, [onSwipeableClose, onSwipeableOpen]);
@@ -106,7 +113,8 @@ const Swipeable = /*#__PURE__*/forwardRef(function Swipeable(props, ref) {
106
113
  const isClosing = toValue === 0;
107
114
  const moveToRight = isClosing ? rowState.value < 0 : toValue > 0;
108
115
  const usedWidth = isClosing ? moveToRight ? rightWidth.value : leftWidth.value : moveToRight ? leftWidth.value : rightWidth.value;
109
- const progressSpringConfig = { ...translationSpringConfig,
116
+ const progressSpringConfig = {
117
+ ...translationSpringConfig,
110
118
  restDisplacementThreshold: 0.01,
111
119
  restSpeedThreshold: 0.01,
112
120
  velocity: velocityX && interpolate(velocityX, [-usedWidth, usedWidth], [-1, 1])
@@ -129,13 +137,11 @@ const Swipeable = /*#__PURE__*/forwardRef(function Swipeable(props, ref) {
129
137
  const updateElementWidths = useCallback(() => {
130
138
  'worklet';
131
139
 
132
- var _leftLayout$pageX, _leftWrapperLayout$pa, _rightLayout$pageX, _leftWrapperLayout$pa2;
133
-
134
140
  const leftLayout = measure(leftLayoutRef);
135
141
  const leftWrapperLayout = measure(leftWrapperLayoutRef);
136
142
  const rightLayout = measure(rightLayoutRef);
137
- leftWidth.value = ((_leftLayout$pageX = leftLayout === null || leftLayout === void 0 ? void 0 : leftLayout.pageX) !== null && _leftLayout$pageX !== void 0 ? _leftLayout$pageX : 0) - ((_leftWrapperLayout$pa = leftWrapperLayout === null || leftWrapperLayout === void 0 ? void 0 : leftWrapperLayout.pageX) !== null && _leftWrapperLayout$pa !== void 0 ? _leftWrapperLayout$pa : 0);
138
- rightWidth.value = rowWidth.value - ((_rightLayout$pageX = rightLayout === null || rightLayout === void 0 ? void 0 : rightLayout.pageX) !== null && _rightLayout$pageX !== void 0 ? _rightLayout$pageX : rowWidth.value) + ((_leftWrapperLayout$pa2 = leftWrapperLayout === null || leftWrapperLayout === void 0 ? void 0 : leftWrapperLayout.pageX) !== null && _leftWrapperLayout$pa2 !== void 0 ? _leftWrapperLayout$pa2 : 0);
143
+ leftWidth.value = (leftLayout?.pageX ?? 0) - (leftWrapperLayout?.pageX ?? 0);
144
+ rightWidth.value = rowWidth.value - (rightLayout?.pageX ?? rowWidth.value) + (leftWrapperLayout?.pageX ?? 0);
139
145
  }, [leftLayoutRef, leftWrapperLayoutRef, rightLayoutRef, leftWidth, rightWidth, rowWidth]);
140
146
  const swipeableMethods = useMemo(() => ({
141
147
  close() {
@@ -145,12 +151,10 @@ const Swipeable = /*#__PURE__*/forwardRef(function Swipeable(props, ref) {
145
151
  animateRow(0);
146
152
  return;
147
153
  }
148
-
149
154
  runOnUI(() => {
150
155
  animateRow(0);
151
156
  })();
152
157
  },
153
-
154
158
  openLeft() {
155
159
  'worklet';
156
160
 
@@ -159,13 +163,11 @@ const Swipeable = /*#__PURE__*/forwardRef(function Swipeable(props, ref) {
159
163
  animateRow(leftWidth.value);
160
164
  return;
161
165
  }
162
-
163
166
  runOnUI(() => {
164
167
  updateElementWidths();
165
168
  animateRow(leftWidth.value);
166
169
  })();
167
170
  },
168
-
169
171
  openRight() {
170
172
  'worklet';
171
173
 
@@ -174,13 +176,11 @@ const Swipeable = /*#__PURE__*/forwardRef(function Swipeable(props, ref) {
174
176
  animateRow(-rightWidth.value);
175
177
  return;
176
178
  }
177
-
178
179
  runOnUI(() => {
179
180
  updateElementWidths();
180
181
  animateRow(-rightWidth.value);
181
182
  })();
182
183
  },
183
-
184
184
  reset() {
185
185
  'worklet';
186
186
 
@@ -189,13 +189,14 @@ const Swipeable = /*#__PURE__*/forwardRef(function Swipeable(props, ref) {
189
189
  appliedTranslation.value = 0;
190
190
  rowState.value = 0;
191
191
  }
192
-
193
192
  }), [animateRow, updateElementWidths, leftWidth, rightWidth, userDrag, showLeftProgress, appliedTranslation, rowState]);
194
193
  const onRowLayout = useCallback(({
195
194
  nativeEvent
196
195
  }) => {
197
196
  rowWidth.value = nativeEvent.layout.width;
198
- }, [rowWidth]); // As stated in `Dimensions.get` docstring, this function should be called on every render
197
+ }, [rowWidth]);
198
+
199
+ // As stated in `Dimensions.get` docstring, this function should be called on every render
199
200
  // since dimensions may change (e.g. orientation change)
200
201
 
201
202
  const leftActionAnimation = useAnimatedStyle(() => {
@@ -203,22 +204,24 @@ const Swipeable = /*#__PURE__*/forwardRef(function Swipeable(props, ref) {
203
204
  opacity: showLeftProgress.value === 0 ? 0 : 1
204
205
  };
205
206
  });
206
- const leftElement = useCallback(() => /*#__PURE__*/React.createElement(Animated.View, {
207
+ const leftElement = useCallback(() => /*#__PURE__*/_jsxs(Animated.View, {
207
208
  ref: leftWrapperLayoutRef,
208
- style: [styles.leftActions, leftActionAnimation]
209
- }, renderLeftActions === null || renderLeftActions === void 0 ? void 0 : renderLeftActions(showLeftProgress, appliedTranslation, swipeableMethods), /*#__PURE__*/React.createElement(Animated.View, {
210
- ref: leftLayoutRef
211
- })), [appliedTranslation, leftActionAnimation, leftLayoutRef, leftWrapperLayoutRef, renderLeftActions, showLeftProgress, swipeableMethods]);
209
+ style: [styles.leftActions, leftActionAnimation],
210
+ children: [renderLeftActions?.(showLeftProgress, appliedTranslation, swipeableMethods), /*#__PURE__*/_jsx(Animated.View, {
211
+ ref: leftLayoutRef
212
+ })]
213
+ }), [appliedTranslation, leftActionAnimation, leftLayoutRef, leftWrapperLayoutRef, renderLeftActions, showLeftProgress, swipeableMethods]);
212
214
  const rightActionAnimation = useAnimatedStyle(() => {
213
215
  return {
214
216
  opacity: showRightProgress.value === 0 ? 0 : 1
215
217
  };
216
218
  });
217
- const rightElement = useCallback(() => /*#__PURE__*/React.createElement(Animated.View, {
218
- style: [styles.rightActions, rightActionAnimation]
219
- }, renderRightActions === null || renderRightActions === void 0 ? void 0 : renderRightActions(showRightProgress, appliedTranslation, swipeableMethods), /*#__PURE__*/React.createElement(Animated.View, {
220
- ref: rightLayoutRef
221
- })), [appliedTranslation, renderRightActions, rightActionAnimation, rightLayoutRef, showRightProgress, swipeableMethods]);
219
+ const rightElement = useCallback(() => /*#__PURE__*/_jsxs(Animated.View, {
220
+ style: [styles.rightActions, rightActionAnimation],
221
+ children: [renderRightActions?.(showRightProgress, appliedTranslation, swipeableMethods), /*#__PURE__*/_jsx(Animated.View, {
222
+ ref: rightLayoutRef
223
+ })]
224
+ }), [appliedTranslation, renderRightActions, rightActionAnimation, rightLayoutRef, showRightProgress, swipeableMethods]);
222
225
  const handleRelease = useCallback(event => {
223
226
  'worklet';
224
227
 
@@ -226,11 +229,10 @@ const Swipeable = /*#__PURE__*/forwardRef(function Swipeable(props, ref) {
226
229
  velocityX
227
230
  } = event;
228
231
  userDrag.value = event.translationX;
229
- const leftThresholdProp = leftThreshold !== null && leftThreshold !== void 0 ? leftThreshold : leftWidth.value / 2;
230
- const rightThresholdProp = rightThreshold !== null && rightThreshold !== void 0 ? rightThreshold : rightWidth.value / 2;
232
+ const leftThresholdProp = leftThreshold ?? leftWidth.value / 2;
233
+ const rightThresholdProp = rightThreshold ?? rightWidth.value / 2;
231
234
  const translationX = (userDrag.value + DRAG_TOSS * velocityX) / friction;
232
235
  let toValue = 0;
233
-
234
236
  if (rowState.value === 0) {
235
237
  if (translationX > leftThresholdProp) {
236
238
  toValue = leftWidth.value;
@@ -248,7 +250,6 @@ const Swipeable = /*#__PURE__*/forwardRef(function Swipeable(props, ref) {
248
250
  toValue = -rightWidth.value;
249
251
  }
250
252
  }
251
-
252
253
  animateRow(toValue, velocityX / friction);
253
254
  }, [animateRow, friction, leftThreshold, leftWidth, rightThreshold, rightWidth, rowState, userDrag]);
254
255
  const close = useCallback(() => {
@@ -263,51 +264,32 @@ const Swipeable = /*#__PURE__*/forwardRef(function Swipeable(props, ref) {
263
264
  close();
264
265
  }
265
266
  });
266
-
267
- if (!simultaneousWithExternalGesture) {
268
- return tap;
269
- }
270
-
271
- if (Array.isArray(simultaneousWithExternalGesture)) {
272
- tap.simultaneousWithExternalGesture(...simultaneousWithExternalGesture);
273
- } else {
274
- tap.simultaneousWithExternalGesture(simultaneousWithExternalGesture);
275
- }
276
-
267
+ Object.entries(relationProps).forEach(([relationName, relation]) => {
268
+ applyRelationProp(tap, relationName, relation);
269
+ });
277
270
  return tap;
278
271
  }, [close, rowState, simultaneousWithExternalGesture]);
279
272
  const panGesture = useMemo(() => {
280
273
  const pan = Gesture.Pan().enabled(enabled !== false).enableTrackpadTwoFingerGesture(enableTrackpadTwoFingerGesture).activeOffsetX([-dragOffsetFromRightEdge, dragOffsetFromLeftEdge]).onStart(updateElementWidths).onUpdate(event => {
281
274
  userDrag.value = event.translationX;
282
275
  const direction = rowState.value === -1 ? SwipeDirection.RIGHT : rowState.value === 1 ? SwipeDirection.LEFT : event.translationX > 0 ? SwipeDirection.RIGHT : SwipeDirection.LEFT;
283
-
284
276
  if (!dragStarted.value) {
285
277
  dragStarted.value = true;
286
-
287
278
  if (rowState.value === 0 && onSwipeableOpenStartDrag) {
288
279
  runOnJS(onSwipeableOpenStartDrag)(direction);
289
280
  } else if (onSwipeableCloseStartDrag) {
290
281
  runOnJS(onSwipeableCloseStartDrag)(direction);
291
282
  }
292
283
  }
293
-
294
284
  updateAnimatedEvent();
295
285
  }).onEnd(event => {
296
286
  handleRelease(event);
297
287
  }).onFinalize(() => {
298
288
  dragStarted.value = false;
299
289
  });
300
-
301
- if (!simultaneousWithExternalGesture) {
302
- return pan;
303
- }
304
-
305
- if (Array.isArray(simultaneousWithExternalGesture)) {
306
- pan.simultaneousWithExternalGesture(...simultaneousWithExternalGesture);
307
- } else {
308
- pan.simultaneousWithExternalGesture(simultaneousWithExternalGesture);
309
- }
310
-
290
+ Object.entries(relationProps).forEach(([relationName, relation]) => {
291
+ applyRelationProp(pan, relationName, relation);
292
+ });
311
293
  return pan;
312
294
  }, [dragOffsetFromLeftEdge, dragOffsetFromRightEdge, dragStarted, enableTrackpadTwoFingerGesture, enabled, handleRelease, onSwipeableCloseStartDrag, onSwipeableOpenStartDrag, rowState, updateAnimatedEvent, updateElementWidths, userDrag, simultaneousWithExternalGesture]);
313
295
  useImperativeHandle(ref, () => swipeableMethods, [swipeableMethods]);
@@ -317,32 +299,41 @@ const Swipeable = /*#__PURE__*/forwardRef(function Swipeable(props, ref) {
317
299
  }],
318
300
  pointerEvents: rowState.value === 0 ? 'auto' : 'box-only'
319
301
  }), [appliedTranslation, rowState]);
320
- const swipeableComponent = /*#__PURE__*/React.createElement(GestureDetector, {
302
+ const swipeableComponent = /*#__PURE__*/_jsx(GestureDetector, {
321
303
  gesture: panGesture,
322
- touchAction: "pan-y"
323
- }, /*#__PURE__*/React.createElement(Animated.View, _extends({}, remainingProps, {
324
- onLayout: onRowLayout,
325
- style: [styles.container, containerStyle]
326
- }), leftElement(), rightElement(), /*#__PURE__*/React.createElement(GestureDetector, {
327
- gesture: tapGesture,
328
- touchAction: "pan-y"
329
- }, /*#__PURE__*/React.createElement(Animated.View, {
330
- style: [animatedStyle, childrenContainerStyle]
331
- }, children))));
332
- return testID ? /*#__PURE__*/React.createElement(View, {
333
- testID: testID
334
- }, swipeableComponent) : swipeableComponent;
304
+ touchAction: "pan-y",
305
+ children: /*#__PURE__*/_jsxs(Animated.View, {
306
+ ...remainingProps,
307
+ onLayout: onRowLayout,
308
+ hitSlop: hitSlop ?? undefined,
309
+ style: [styles.container, containerStyle],
310
+ children: [leftElement(), rightElement(), /*#__PURE__*/_jsx(GestureDetector, {
311
+ gesture: tapGesture,
312
+ touchAction: "pan-y",
313
+ children: /*#__PURE__*/_jsx(Animated.View, {
314
+ style: [animatedStyle, childrenContainerStyle],
315
+ children: children
316
+ })
317
+ })]
318
+ })
319
+ });
320
+ return testID ? /*#__PURE__*/_jsx(View, {
321
+ testID: testID,
322
+ children: swipeableComponent
323
+ }) : swipeableComponent;
335
324
  });
336
325
  export default Swipeable;
337
326
  const styles = StyleSheet.create({
338
327
  container: {
339
328
  overflow: 'hidden'
340
329
  },
341
- leftActions: { ...StyleSheet.absoluteFillObject,
330
+ leftActions: {
331
+ ...StyleSheet.absoluteFillObject,
342
332
  flexDirection: I18nManager.isRTL ? 'row-reverse' : 'row',
343
333
  overflow: 'hidden'
344
334
  },
345
- rightActions: { ...StyleSheet.absoluteFillObject,
335
+ rightActions: {
336
+ ...StyleSheet.absoluteFillObject,
346
337
  flexDirection: I18nManager.isRTL ? 'row' : 'row-reverse',
347
338
  overflow: 'hidden'
348
339
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["ReanimatedSwipeable.tsx"],"names":["React","forwardRef","useCallback","useImperativeHandle","useMemo","GestureObjects","Gesture","GestureDetector","Animated","ReduceMotion","interpolate","measure","runOnJS","runOnUI","useAnimatedRef","useAnimatedStyle","useSharedValue","withSpring","I18nManager","StyleSheet","View","DRAG_TOSS","SwipeDirection","Swipeable","props","ref","defaultProps","friction","overshootFriction","dragOffset","enableTrackpadTwoFingerGesture","leftThreshold","rightThreshold","enabled","containerStyle","childrenContainerStyle","animationOptions","overshootLeft","overshootRight","testID","children","dragOffsetFromLeftEdge","dragOffsetFromRightEdge","onSwipeableOpenStartDrag","onSwipeableCloseStartDrag","onSwipeableWillOpen","onSwipeableWillClose","onSwipeableOpen","onSwipeableClose","renderLeftActions","renderRightActions","simultaneousWithExternalGesture","remainingProps","rowState","userDrag","appliedTranslation","rowWidth","leftWidth","rightWidth","showLeftProgress","showRightProgress","updateAnimatedEvent","shouldOvershootLeft","value","shouldOvershootRight","startOffset","offsetDrag","dispatchImmediateEvents","fromValue","toValue","RIGHT","LEFT","dispatchEndEvents","animateRow","velocityX","translationSpringConfig","mass","damping","stiffness","velocity","overshootClamping","reduceMotion","System","isClosing","moveToRight","usedWidth","progressSpringConfig","restDisplacementThreshold","restSpeedThreshold","frozenRowState","isFinished","progressTarget","Math","sign","max","leftLayoutRef","leftWrapperLayoutRef","rightLayoutRef","updateElementWidths","leftLayout","leftWrapperLayout","rightLayout","pageX","swipeableMethods","close","_WORKLET","openLeft","openRight","reset","onRowLayout","nativeEvent","layout","width","leftActionAnimation","opacity","leftElement","styles","leftActions","rightActionAnimation","rightElement","rightActions","handleRelease","event","translationX","leftThresholdProp","rightThresholdProp","dragStarted","tapGesture","tap","Tap","shouldCancelWhenOutside","onStart","Array","isArray","panGesture","pan","Pan","activeOffsetX","onUpdate","direction","onEnd","onFinalize","animatedStyle","transform","translateX","pointerEvents","swipeableComponent","container","create","overflow","absoluteFillObject","flexDirection","isRTL"],"m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AAD,CAAU,IAAV;AAAe,IAAA,KAAK,EAAE,CAACe,aAAD,EAAgB3G,sBAAhB;AAAtB,KACGK,QADH,CADF,CANF,CADF,CADF;AAiBA,SAAOD,MAAM,gBACX,oBAAC,IAAD;AAAM,IAAA,MAAM,EAAEA;AAAd,KAAuB2G,kBAAvB,CADW,GAGXA,kBAHF;AAKD,CAliByB,CAA5B;AAqiBA,eAAe3H,SAAf;AAGA,MAAM6F,MAAM,GAAGjG,UAAU,CAACiI,MAAX,CAAkB;AAC/BD,EAAAA,SAAS,EAAE;AACTE,IAAAA,QAAQ,EAAE;AADD,GADoB;AAI/BhC,EAAAA,WAAW,EAAE,EACX,GAAGlG,UAAU,CAACmI,kBADH;AAEXC,IAAAA,aAAa,EAAErI,WAAW,CAACsI,KAAZ,GAAoB,aAApB,GAAoC,KAFxC;AAGXH,IAAAA,QAAQ,EAAE;AAHC,GAJkB;AAS/B7B,EAAAA,YAAY,EAAE,EACZ,GAAGrG,UAAU,CAACmI,kBADF;AAEZC,IAAAA,aAAa,EAAErI,WAAW,CAACsI,KAAZ,GAAoB,KAApB,GAA4B,aAF/B;AAGZH,IAAAA,QAAQ,EAAE;AAHE;AATiB,CAAlB,CAAf","sourcesContent":["// Similarily to the DrawerLayout component this deserves to be put in a\n// separate repo. Although, keeping it here for the time being will allow us to\n// move faster and fix possible issues quicker\n\nimport React, {\n ForwardedRef,\n forwardRef,\n useCallback,\n useImperativeHandle,\n useMemo,\n} from 'react';\nimport { GestureRef } from '../handlers/gestures/gesture';\nimport { GestureObjects as Gesture } from '../handlers/gestures/gestureObjects';\nimport { GestureDetector } from '../handlers/gestures/GestureDetector';\nimport {\n GestureStateChangeEvent,\n GestureUpdateEvent,\n} from '../handlers/gestureHandlerCommon';\nimport type { PanGestureHandlerProps } from '../handlers/PanGestureHandler';\nimport type { PanGestureHandlerEventPayload } from '../handlers/GestureHandlerEventPayload';\nimport Animated, {\n ReduceMotion,\n SharedValue,\n interpolate,\n measure,\n runOnJS,\n runOnUI,\n useAnimatedRef,\n useAnimatedStyle,\n useSharedValue,\n withSpring,\n} from 'react-native-reanimated';\nimport {\n I18nManager,\n LayoutChangeEvent,\n StyleProp,\n StyleSheet,\n View,\n ViewStyle,\n} from 'react-native';\n\nconst DRAG_TOSS = 0.05;\n\ntype SwipeableExcludes = Exclude<\n keyof PanGestureHandlerProps,\n 'onGestureEvent' | 'onHandlerStateChange'\n>;\n\nenum SwipeDirection {\n LEFT = 'left',\n RIGHT = 'right',\n}\n\nexport interface SwipeableProps\n extends Pick<PanGestureHandlerProps, SwipeableExcludes> {\n /**\n * Enables two-finger gestures on supported devices, for example iPads with\n * trackpads. If not enabled the gesture will require click + drag, with\n * `enableTrackpadTwoFingerGesture` swiping with two fingers will also trigger\n * the gesture.\n */\n enableTrackpadTwoFingerGesture?: boolean;\n\n /**\n * Specifies how much the visual interaction will be delayed compared to the\n * gesture distance. e.g. value of 1 will indicate that the swipeable panel\n * should exactly follow the gesture, 2 means it is going to be two times\n * \"slower\".\n */\n friction?: number;\n\n /**\n * Distance from the left edge at which released panel will animate to the\n * open state (or the open panel will animate into the closed state). By\n * default it's a half of the panel's width.\n */\n leftThreshold?: number;\n\n /**\n * Distance from the right edge at which released panel will animate to the\n * open state (or the open panel will animate into the closed state). By\n * default it's a half of the panel's width.\n */\n rightThreshold?: number;\n\n /**\n * Distance that the panel must be dragged from the left edge to be considered\n * a swipe. The default value is 10.\n */\n dragOffsetFromLeftEdge?: number;\n\n /**\n * Distance that the panel must be dragged from the right edge to be considered\n * a swipe. The default value is 10.\n */\n dragOffsetFromRightEdge?: number;\n\n /**\n * Value indicating if the swipeable panel can be pulled further than the left\n * actions panel's width. It is set to true by default as long as the left\n * panel render method is present.\n */\n overshootLeft?: boolean;\n\n /**\n * Value indicating if the swipeable panel can be pulled further than the\n * right actions panel's width. It is set to true by default as long as the\n * right panel render method is present.\n */\n overshootRight?: boolean;\n\n /**\n * Specifies how much the visual interaction will be delayed compared to the\n * gesture distance at overshoot. Default value is 1, it mean no friction, for\n * a native feel, try 8 or above.\n */\n overshootFriction?: number;\n\n /**\n * Called when action panel gets open (either right or left).\n */\n onSwipeableOpen?: (\n direction: SwipeDirection.LEFT | SwipeDirection.RIGHT\n ) => void;\n\n /**\n * Called when action panel is closed.\n */\n onSwipeableClose?: (\n direction: SwipeDirection.LEFT | SwipeDirection.RIGHT\n ) => void;\n\n /**\n * Called when action panel starts animating on open (either right or left).\n */\n onSwipeableWillOpen?: (\n direction: SwipeDirection.LEFT | SwipeDirection.RIGHT\n ) => void;\n\n /**\n * Called when action panel starts animating on close.\n */\n onSwipeableWillClose?: (\n direction: SwipeDirection.LEFT | SwipeDirection.RIGHT\n ) => void;\n\n /**\n * Called when action panel starts being shown on dragging to open.\n */\n onSwipeableOpenStartDrag?: (\n direction: SwipeDirection.LEFT | SwipeDirection.RIGHT\n ) => void;\n\n /**\n * Called when action panel starts being shown on dragging to close.\n */\n onSwipeableCloseStartDrag?: (\n direction: SwipeDirection.LEFT | SwipeDirection.RIGHT\n ) => void;\n\n /**\n * `progress`: Equals `0` when `swipeable` is closed, `1` when `swipeable` is opened.\n * - When the element overshoots it's opened position the value tends towards `Infinity`.\n * - Goes back to `1` when `swipeable` is released.\n *\n * `translation`: a horizontal offset of the `swipeable` relative to its closed position.\\\n * `swipeableMethods`: provides an object exposing methods for controlling the `swipeable`.\n *\n * To support `rtl` flexbox layouts use `flexDirection` styling.\n * */\n renderLeftActions?: (\n progress: SharedValue<number>,\n translation: SharedValue<number>,\n swipeableMethods: SwipeableMethods\n ) => React.ReactNode;\n\n /**\n * `progress`: Equals `0` when `swipeable` is closed, `1` when `swipeable` is opened.\n * - When the element overshoots it's opened position the value tends towards `Infinity`.\n * - Goes back to `1` when `swipeable` is released.\n *\n * `translation`: a horizontal offset of the `swipeable` relative to its closed position.\\\n * `swipeableMethods`: provides an object exposing methods for controlling the `swipeable`.\n *\n * To support `rtl` flexbox layouts use `flexDirection` styling.\n * */\n renderRightActions?: (\n progress: SharedValue<number>,\n translation: SharedValue<number>,\n swipeableMethods: SwipeableMethods\n ) => React.ReactNode;\n\n animationOptions?: Record<string, unknown>;\n\n /**\n * Style object for the container (`Animated.View`), for example to override\n * `overflow: 'hidden'`.\n */\n containerStyle?: StyleProp<ViewStyle>;\n\n /**\n * Style object for the children container (`Animated.View`), for example to\n * apply `flex: 1`\n */\n childrenContainerStyle?: StyleProp<ViewStyle>;\n\n /**\n * A gesture object or an array of gesture objects containing the configuration and callbacks to be\n * used with the swipeable's gesture handler.\n */\n simultaneousWithExternalGesture?:\n | Exclude<GestureRef, number>\n | Exclude<GestureRef, number>[];\n}\n\nexport interface SwipeableMethods {\n close: () => void;\n openLeft: () => void;\n openRight: () => void;\n reset: () => void;\n}\n\nconst Swipeable = forwardRef<SwipeableMethods, SwipeableProps>(\n function Swipeable(\n props: SwipeableProps,\n ref: ForwardedRef<SwipeableMethods>\n ) {\n const defaultProps = {\n friction: 1,\n overshootFriction: 1,\n dragOffset: 10,\n enableTrackpadTwoFingerGesture: false,\n };\n\n const {\n leftThreshold,\n rightThreshold,\n enabled,\n containerStyle,\n childrenContainerStyle,\n animationOptions,\n overshootLeft,\n overshootRight,\n testID,\n children,\n enableTrackpadTwoFingerGesture = defaultProps.enableTrackpadTwoFingerGesture,\n dragOffsetFromLeftEdge = defaultProps.dragOffset,\n dragOffsetFromRightEdge = defaultProps.dragOffset,\n friction = defaultProps.friction,\n overshootFriction = defaultProps.overshootFriction,\n onSwipeableOpenStartDrag,\n onSwipeableCloseStartDrag,\n onSwipeableWillOpen,\n onSwipeableWillClose,\n onSwipeableOpen,\n onSwipeableClose,\n renderLeftActions,\n renderRightActions,\n simultaneousWithExternalGesture,\n ...remainingProps\n } = props;\n\n const rowState = useSharedValue<number>(0);\n\n const userDrag = useSharedValue<number>(0);\n\n const appliedTranslation = useSharedValue<number>(0);\n\n const rowWidth = useSharedValue<number>(0);\n const leftWidth = useSharedValue<number>(0);\n const rightWidth = useSharedValue<number>(0);\n\n const showLeftProgress = useSharedValue<number>(0);\n const showRightProgress = useSharedValue<number>(0);\n\n const updateAnimatedEvent = useCallback(() => {\n 'worklet';\n\n const shouldOvershootLeft = overshootLeft ?? leftWidth.value > 0;\n const shouldOvershootRight = overshootRight ?? rightWidth.value > 0;\n\n const startOffset =\n rowState.value === 1\n ? leftWidth.value\n : rowState.value === -1\n ? -rightWidth.value\n : 0;\n\n const offsetDrag = userDrag.value / friction + startOffset;\n\n appliedTranslation.value = interpolate(\n offsetDrag,\n [\n -rightWidth.value - 1,\n -rightWidth.value,\n leftWidth.value,\n leftWidth.value + 1,\n ],\n [\n -rightWidth.value -\n (shouldOvershootRight ? 1 / overshootFriction : 0),\n -rightWidth.value,\n leftWidth.value,\n leftWidth.value + (shouldOvershootLeft ? 1 / overshootFriction : 0),\n ]\n );\n\n showLeftProgress.value =\n leftWidth.value > 0\n ? interpolate(\n appliedTranslation.value,\n [-1, 0, leftWidth.value],\n [0, 0, 1]\n )\n : 0;\n\n showRightProgress.value =\n rightWidth.value > 0\n ? interpolate(\n appliedTranslation.value,\n [-rightWidth.value, 0, 1],\n [1, 0, 0]\n )\n : 0;\n }, [\n appliedTranslation,\n friction,\n leftWidth,\n overshootFriction,\n rightWidth,\n rowState,\n showLeftProgress,\n showRightProgress,\n userDrag,\n overshootLeft,\n overshootRight,\n ]);\n\n const dispatchImmediateEvents = useCallback(\n (fromValue: number, toValue: number) => {\n 'worklet';\n if (toValue > 0 && onSwipeableWillOpen) {\n runOnJS(onSwipeableWillOpen)(SwipeDirection.RIGHT);\n } else if (toValue < 0 && onSwipeableWillOpen) {\n runOnJS(onSwipeableWillOpen)(SwipeDirection.LEFT);\n } else if (onSwipeableWillClose) {\n runOnJS(onSwipeableWillClose)(\n fromValue > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT\n );\n }\n },\n [onSwipeableWillClose, onSwipeableWillOpen]\n );\n\n const dispatchEndEvents = useCallback(\n (fromValue: number, toValue: number) => {\n 'worklet';\n if (toValue > 0 && onSwipeableOpen) {\n runOnJS(onSwipeableOpen)(SwipeDirection.RIGHT);\n } else if (toValue < 0 && onSwipeableOpen) {\n runOnJS(onSwipeableOpen)(SwipeDirection.LEFT);\n } else if (onSwipeableClose) {\n runOnJS(onSwipeableClose)(\n fromValue > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT\n );\n }\n },\n [onSwipeableClose, onSwipeableOpen]\n );\n\n const animateRow: (toValue: number, velocityX?: number) => void =\n useCallback(\n (toValue: number, velocityX?: number) => {\n 'worklet';\n\n const translationSpringConfig = {\n mass: 2,\n damping: 1000,\n stiffness: 700,\n velocity: velocityX,\n overshootClamping: true,\n reduceMotion: ReduceMotion.System,\n ...animationOptions,\n };\n\n const isClosing = toValue === 0;\n const moveToRight = isClosing ? rowState.value < 0 : toValue > 0;\n\n const usedWidth = isClosing\n ? moveToRight\n ? rightWidth.value\n : leftWidth.value\n : moveToRight\n ? leftWidth.value\n : rightWidth.value;\n\n const progressSpringConfig = {\n ...translationSpringConfig,\n restDisplacementThreshold: 0.01,\n restSpeedThreshold: 0.01,\n velocity:\n velocityX &&\n interpolate(velocityX, [-usedWidth, usedWidth], [-1, 1]),\n };\n\n const frozenRowState = rowState.value;\n\n appliedTranslation.value = withSpring(\n toValue,\n translationSpringConfig,\n (isFinished) => {\n if (isFinished) {\n dispatchEndEvents(frozenRowState, toValue);\n }\n }\n );\n\n const progressTarget = toValue === 0 ? 0 : 1 * Math.sign(toValue);\n\n showLeftProgress.value = withSpring(\n Math.max(progressTarget, 0),\n progressSpringConfig\n );\n\n showRightProgress.value = withSpring(\n Math.max(-progressTarget, 0),\n progressSpringConfig\n );\n\n dispatchImmediateEvents(frozenRowState, toValue);\n\n rowState.value = Math.sign(toValue);\n },\n [\n rowState,\n animationOptions,\n appliedTranslation,\n showLeftProgress,\n leftWidth,\n showRightProgress,\n rightWidth,\n dispatchImmediateEvents,\n dispatchEndEvents,\n ]\n );\n\n const leftLayoutRef = useAnimatedRef();\n const leftWrapperLayoutRef = useAnimatedRef();\n const rightLayoutRef = useAnimatedRef();\n\n const updateElementWidths = useCallback(() => {\n 'worklet';\n const leftLayout = measure(leftLayoutRef);\n const leftWrapperLayout = measure(leftWrapperLayoutRef);\n const rightLayout = measure(rightLayoutRef);\n leftWidth.value =\n (leftLayout?.pageX ?? 0) - (leftWrapperLayout?.pageX ?? 0);\n\n rightWidth.value =\n rowWidth.value -\n (rightLayout?.pageX ?? rowWidth.value) +\n (leftWrapperLayout?.pageX ?? 0);\n }, [\n leftLayoutRef,\n leftWrapperLayoutRef,\n rightLayoutRef,\n leftWidth,\n rightWidth,\n rowWidth,\n ]);\n\n const swipeableMethods = useMemo<SwipeableMethods>(\n () => ({\n close() {\n 'worklet';\n if (_WORKLET) {\n animateRow(0);\n return;\n }\n runOnUI(() => {\n animateRow(0);\n })();\n },\n openLeft() {\n 'worklet';\n if (_WORKLET) {\n updateElementWidths();\n animateRow(leftWidth.value);\n return;\n }\n runOnUI(() => {\n updateElementWidths();\n animateRow(leftWidth.value);\n })();\n },\n openRight() {\n 'worklet';\n if (_WORKLET) {\n updateElementWidths();\n animateRow(-rightWidth.value);\n return;\n }\n runOnUI(() => {\n updateElementWidths();\n animateRow(-rightWidth.value);\n })();\n },\n reset() {\n 'worklet';\n userDrag.value = 0;\n showLeftProgress.value = 0;\n appliedTranslation.value = 0;\n rowState.value = 0;\n },\n }),\n [\n animateRow,\n updateElementWidths,\n leftWidth,\n rightWidth,\n userDrag,\n showLeftProgress,\n appliedTranslation,\n rowState,\n ]\n );\n\n const onRowLayout = useCallback(\n ({ nativeEvent }: LayoutChangeEvent) => {\n rowWidth.value = nativeEvent.layout.width;\n },\n [rowWidth]\n );\n\n // As stated in `Dimensions.get` docstring, this function should be called on every render\n // since dimensions may change (e.g. orientation change)\n\n const leftActionAnimation = useAnimatedStyle(() => {\n return {\n opacity: showLeftProgress.value === 0 ? 0 : 1,\n };\n });\n\n const leftElement = useCallback(\n () => (\n <Animated.View\n ref={leftWrapperLayoutRef}\n style={[styles.leftActions, leftActionAnimation]}>\n {renderLeftActions?.(\n showLeftProgress,\n appliedTranslation,\n swipeableMethods\n )}\n <Animated.View ref={leftLayoutRef} />\n </Animated.View>\n ),\n [\n appliedTranslation,\n leftActionAnimation,\n leftLayoutRef,\n leftWrapperLayoutRef,\n renderLeftActions,\n showLeftProgress,\n swipeableMethods,\n ]\n );\n\n const rightActionAnimation = useAnimatedStyle(() => {\n return {\n opacity: showRightProgress.value === 0 ? 0 : 1,\n };\n });\n\n const rightElement = useCallback(\n () => (\n <Animated.View style={[styles.rightActions, rightActionAnimation]}>\n {renderRightActions?.(\n showRightProgress,\n appliedTranslation,\n swipeableMethods\n )}\n <Animated.View ref={rightLayoutRef} />\n </Animated.View>\n ),\n [\n appliedTranslation,\n renderRightActions,\n rightActionAnimation,\n rightLayoutRef,\n showRightProgress,\n swipeableMethods,\n ]\n );\n\n const handleRelease = useCallback(\n (event: GestureStateChangeEvent<PanGestureHandlerEventPayload>) => {\n 'worklet';\n const { velocityX } = event;\n userDrag.value = event.translationX;\n\n const leftThresholdProp = leftThreshold ?? leftWidth.value / 2;\n const rightThresholdProp = rightThreshold ?? rightWidth.value / 2;\n\n const translationX =\n (userDrag.value + DRAG_TOSS * velocityX) / friction;\n\n let toValue = 0;\n\n if (rowState.value === 0) {\n if (translationX > leftThresholdProp) {\n toValue = leftWidth.value;\n } else if (translationX < -rightThresholdProp) {\n toValue = -rightWidth.value;\n }\n } else if (rowState.value === 1) {\n // Swiped to left\n if (translationX > -leftThresholdProp) {\n toValue = leftWidth.value;\n }\n } else {\n // Swiped to right\n if (translationX < rightThresholdProp) {\n toValue = -rightWidth.value;\n }\n }\n\n animateRow(toValue, velocityX / friction);\n },\n [\n animateRow,\n friction,\n leftThreshold,\n leftWidth,\n rightThreshold,\n rightWidth,\n rowState,\n userDrag,\n ]\n );\n\n const close = useCallback(() => {\n 'worklet';\n animateRow(0);\n }, [animateRow]);\n\n const dragStarted = useSharedValue<boolean>(false);\n\n const tapGesture = useMemo(() => {\n const tap = Gesture.Tap()\n .shouldCancelWhenOutside(true)\n .onStart(() => {\n if (rowState.value !== 0) {\n close();\n }\n });\n\n if (!simultaneousWithExternalGesture) {\n return tap;\n }\n\n if (Array.isArray(simultaneousWithExternalGesture)) {\n tap.simultaneousWithExternalGesture(...simultaneousWithExternalGesture);\n } else {\n tap.simultaneousWithExternalGesture(simultaneousWithExternalGesture);\n }\n\n return tap;\n }, [close, rowState, simultaneousWithExternalGesture]);\n\n const panGesture = useMemo(() => {\n const pan = Gesture.Pan()\n .enabled(enabled !== false)\n .enableTrackpadTwoFingerGesture(enableTrackpadTwoFingerGesture)\n .activeOffsetX([-dragOffsetFromRightEdge, dragOffsetFromLeftEdge])\n .onStart(updateElementWidths)\n .onUpdate(\n (event: GestureUpdateEvent<PanGestureHandlerEventPayload>) => {\n userDrag.value = event.translationX;\n\n const direction =\n rowState.value === -1\n ? SwipeDirection.RIGHT\n : rowState.value === 1\n ? SwipeDirection.LEFT\n : event.translationX > 0\n ? SwipeDirection.RIGHT\n : SwipeDirection.LEFT;\n\n if (!dragStarted.value) {\n dragStarted.value = true;\n if (rowState.value === 0 && onSwipeableOpenStartDrag) {\n runOnJS(onSwipeableOpenStartDrag)(direction);\n } else if (onSwipeableCloseStartDrag) {\n runOnJS(onSwipeableCloseStartDrag)(direction);\n }\n }\n\n updateAnimatedEvent();\n }\n )\n .onEnd(\n (event: GestureStateChangeEvent<PanGestureHandlerEventPayload>) => {\n handleRelease(event);\n }\n )\n .onFinalize(() => {\n dragStarted.value = false;\n });\n\n if (!simultaneousWithExternalGesture) {\n return pan;\n }\n\n if (Array.isArray(simultaneousWithExternalGesture)) {\n pan.simultaneousWithExternalGesture(...simultaneousWithExternalGesture);\n } else {\n pan.simultaneousWithExternalGesture(simultaneousWithExternalGesture);\n }\n\n return pan;\n }, [\n dragOffsetFromLeftEdge,\n dragOffsetFromRightEdge,\n dragStarted,\n enableTrackpadTwoFingerGesture,\n enabled,\n handleRelease,\n onSwipeableCloseStartDrag,\n onSwipeableOpenStartDrag,\n rowState,\n updateAnimatedEvent,\n updateElementWidths,\n userDrag,\n simultaneousWithExternalGesture,\n ]);\n\n useImperativeHandle(ref, () => swipeableMethods, [swipeableMethods]);\n\n const animatedStyle = useAnimatedStyle(\n () => ({\n transform: [{ translateX: appliedTranslation.value }],\n pointerEvents: rowState.value === 0 ? 'auto' : 'box-only',\n }),\n [appliedTranslation, rowState]\n );\n\n const swipeableComponent = (\n <GestureDetector gesture={panGesture} touchAction=\"pan-y\">\n <Animated.View\n {...remainingProps}\n onLayout={onRowLayout}\n style={[styles.container, containerStyle]}>\n {leftElement()}\n {rightElement()}\n <GestureDetector gesture={tapGesture} touchAction=\"pan-y\">\n <Animated.View style={[animatedStyle, childrenContainerStyle]}>\n {children}\n </Animated.View>\n </GestureDetector>\n </Animated.View>\n </GestureDetector>\n );\n\n return testID ? (\n <View testID={testID}>{swipeableComponent}</View>\n ) : (\n swipeableComponent\n );\n }\n);\n\nexport default Swipeable;\nexport type SwipeableRef = ForwardedRef<SwipeableMethods>;\n\nconst styles = StyleSheet.create({\n container: {\n overflow: 'hidden',\n },\n leftActions: {\n ...StyleSheet.absoluteFillObject,\n flexDirection: I18nManager.isRTL ? 'row-reverse' : 'row',\n overflow: 'hidden',\n },\n rightActions: {\n ...StyleSheet.absoluteFillObject,\n flexDirection: I18nManager.isRTL ? 'row' : 'row-reverse',\n overflow: 'hidden',\n },\n});\n"]}
1
+ {"version":3,"names":["React","forwardRef","useCallback","useImperativeHandle","useMemo","GestureObjects","Gesture","GestureDetector","Animated","ReduceMotion","interpolate","measure","runOnJS","runOnUI","useAnimatedRef","useAnimatedStyle","useSharedValue","withSpring","I18nManager","StyleSheet","View","applyRelationProp","jsx","_jsx","jsxs","_jsxs","DRAG_TOSS","SwipeDirection","Swipeable","props","ref","defaultProps","friction","overshootFriction","dragOffset","enableTrackpadTwoFingerGesture","leftThreshold","rightThreshold","enabled","containerStyle","childrenContainerStyle","animationOptions","overshootLeft","overshootRight","testID","children","dragOffsetFromLeftEdge","dragOffsetFromRightEdge","onSwipeableOpenStartDrag","onSwipeableCloseStartDrag","onSwipeableWillOpen","onSwipeableWillClose","onSwipeableOpen","onSwipeableClose","renderLeftActions","renderRightActions","simultaneousWithExternalGesture","requireExternalGestureToFail","blocksExternalGesture","hitSlop","remainingProps","relationProps","rowState","userDrag","appliedTranslation","rowWidth","leftWidth","rightWidth","showLeftProgress","showRightProgress","updateAnimatedEvent","shouldOvershootLeft","value","shouldOvershootRight","startOffset","offsetDrag","dispatchImmediateEvents","fromValue","toValue","RIGHT","LEFT","dispatchEndEvents","animateRow","velocityX","translationSpringConfig","mass","damping","stiffness","velocity","overshootClamping","reduceMotion","System","isClosing","moveToRight","usedWidth","progressSpringConfig","restDisplacementThreshold","restSpeedThreshold","frozenRowState","isFinished","progressTarget","Math","sign","max","leftLayoutRef","leftWrapperLayoutRef","rightLayoutRef","updateElementWidths","leftLayout","leftWrapperLayout","rightLayout","pageX","swipeableMethods","close","_WORKLET","openLeft","openRight","reset","onRowLayout","nativeEvent","layout","width","leftActionAnimation","opacity","leftElement","style","styles","leftActions","rightActionAnimation","rightElement","rightActions","handleRelease","event","translationX","leftThresholdProp","rightThresholdProp","dragStarted","tapGesture","tap","Tap","shouldCancelWhenOutside","onStart","Object","entries","forEach","relationName","relation","panGesture","pan","Pan","activeOffsetX","onUpdate","direction","onEnd","onFinalize","animatedStyle","transform","translateX","pointerEvents","swipeableComponent","gesture","touchAction","onLayout","undefined","container","create","overflow","absoluteFillObject","flexDirection","isRTL"],"sourceRoot":"../../../src","sources":["components/ReanimatedSwipeable.tsx"],"mappings":";;AAAA;AACA;AACA;;AAEA,OAAOA,KAAK,IAEVC,UAAU,EACVC,WAAW,EACXC,mBAAmB,EACnBC,OAAO,QACF,OAAO;AACd,SAASC,cAAc,IAAIC,OAAO,QAAQ,qCAAqC;AAC/E,SAASC,eAAe,QAAQ,sCAAsC;AAOtE,OAAOC,QAAQ,IACbC,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