react-native-gesture-handler 2.23.0 → 2.23.1

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 (601) hide show
  1. package/RNGestureHandler.podspec +8 -0
  2. package/apple/RNGestureHandlerButton.mm +12 -2
  3. package/lib/commonjs/ActionType.js +3 -3
  4. package/lib/commonjs/ActionType.js.map +1 -1
  5. package/lib/commonjs/Directions.js +8 -11
  6. package/lib/commonjs/Directions.js.map +1 -1
  7. package/lib/commonjs/EnableNewWebImplementation.js +10 -2
  8. package/lib/commonjs/EnableNewWebImplementation.js.map +1 -1
  9. package/lib/commonjs/GestureHandlerRootViewContext.js +7 -2
  10. package/lib/commonjs/GestureHandlerRootViewContext.js.map +1 -1
  11. package/lib/commonjs/PlatformConstants.js +6 -1
  12. package/lib/commonjs/PlatformConstants.js.map +1 -1
  13. package/lib/commonjs/PlatformConstants.web.js +3 -1
  14. package/lib/commonjs/PlatformConstants.web.js.map +1 -1
  15. package/lib/commonjs/PointerType.js +5 -3
  16. package/lib/commonjs/PointerType.js.map +1 -1
  17. package/lib/commonjs/RNGestureHandlerModule.js +6 -2
  18. package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
  19. package/lib/commonjs/RNGestureHandlerModule.web.js +37 -11
  20. package/lib/commonjs/RNGestureHandlerModule.web.js.map +1 -1
  21. package/lib/commonjs/RNGestureHandlerModule.windows.js +32 -22
  22. package/lib/commonjs/RNGestureHandlerModule.windows.js.map +1 -1
  23. package/lib/commonjs/RNRenderer.js +3 -1
  24. package/lib/commonjs/RNRenderer.js.map +1 -1
  25. package/lib/commonjs/RNRenderer.web.js +2 -1
  26. package/lib/commonjs/RNRenderer.web.js.map +1 -1
  27. package/lib/commonjs/State.js +3 -4
  28. package/lib/commonjs/State.js.map +1 -1
  29. package/lib/commonjs/TouchEventType.js +3 -3
  30. package/lib/commonjs/TouchEventType.js.map +1 -1
  31. package/lib/commonjs/components/DrawerLayout.js +115 -90
  32. package/lib/commonjs/components/DrawerLayout.js.map +1 -1
  33. package/lib/commonjs/components/GestureButtons.js +81 -28
  34. package/lib/commonjs/components/GestureButtons.js.map +1 -1
  35. package/lib/commonjs/components/GestureButtonsProps.js.map +1 -1
  36. package/lib/commonjs/components/GestureComponents.js +37 -26
  37. package/lib/commonjs/components/GestureComponents.js.map +1 -1
  38. package/lib/commonjs/components/GestureComponents.web.js +27 -13
  39. package/lib/commonjs/components/GestureComponents.web.js.map +1 -1
  40. package/lib/commonjs/components/GestureHandlerButton.js +6 -2
  41. package/lib/commonjs/components/GestureHandlerButton.js.map +1 -1
  42. package/lib/commonjs/components/GestureHandlerButton.web.js +12 -4
  43. package/lib/commonjs/components/GestureHandlerButton.web.js.map +1 -1
  44. package/lib/commonjs/components/GestureHandlerRootView.android.js +15 -4
  45. package/lib/commonjs/components/GestureHandlerRootView.android.js.map +1 -1
  46. package/lib/commonjs/components/GestureHandlerRootView.js +14 -4
  47. package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
  48. package/lib/commonjs/components/GestureHandlerRootView.web.js +13 -4
  49. package/lib/commonjs/components/GestureHandlerRootView.web.js.map +1 -1
  50. package/lib/commonjs/components/Pressable/Pressable.js +77 -29
  51. package/lib/commonjs/components/Pressable/Pressable.js.map +1 -1
  52. package/lib/commonjs/components/Pressable/PressableProps.js.map +1 -1
  53. package/lib/commonjs/components/Pressable/index.js +3 -1
  54. package/lib/commonjs/components/Pressable/index.js.map +1 -1
  55. package/lib/commonjs/components/Pressable/utils.js +20 -5
  56. package/lib/commonjs/components/Pressable/utils.js.map +1 -1
  57. package/lib/commonjs/components/ReanimatedDrawerLayout.js +76 -38
  58. package/lib/commonjs/components/ReanimatedDrawerLayout.js.map +1 -1
  59. package/lib/commonjs/components/ReanimatedSwipeable.js +45 -18
  60. package/lib/commonjs/components/ReanimatedSwipeable.js.map +1 -1
  61. package/lib/commonjs/components/Swipeable.js +75 -34
  62. package/lib/commonjs/components/Swipeable.js.map +1 -1
  63. package/lib/commonjs/components/Text.js +23 -9
  64. package/lib/commonjs/components/Text.js.map +1 -1
  65. package/lib/commonjs/components/gestureHandlerRootHOC.js +14 -5
  66. package/lib/commonjs/components/gestureHandlerRootHOC.js.map +1 -1
  67. package/lib/commonjs/components/touchables/GenericTouchable.js +76 -40
  68. package/lib/commonjs/components/touchables/GenericTouchable.js.map +1 -1
  69. package/lib/commonjs/components/touchables/GenericTouchableProps.js.map +1 -1
  70. package/lib/commonjs/components/touchables/TouchableHighlight.js +34 -19
  71. package/lib/commonjs/components/touchables/TouchableHighlight.js.map +1 -1
  72. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +32 -16
  73. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  74. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +5 -2
  75. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js.map +1 -1
  76. package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js.map +1 -1
  77. package/lib/commonjs/components/touchables/TouchableOpacity.js +25 -16
  78. package/lib/commonjs/components/touchables/TouchableOpacity.js.map +1 -1
  79. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +13 -9
  80. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  81. package/lib/commonjs/components/touchables/index.js +12 -7
  82. package/lib/commonjs/components/touchables/index.js.map +1 -1
  83. package/lib/commonjs/findNodeHandle.js +4 -1
  84. package/lib/commonjs/findNodeHandle.js.map +1 -1
  85. package/lib/commonjs/findNodeHandle.web.js +14 -5
  86. package/lib/commonjs/findNodeHandle.web.js.map +1 -1
  87. package/lib/commonjs/getReactNativeVersion.js +6 -1
  88. package/lib/commonjs/getReactNativeVersion.js.map +1 -1
  89. package/lib/commonjs/getReactNativeVersion.web.js +1 -0
  90. package/lib/commonjs/getReactNativeVersion.web.js.map +1 -1
  91. package/lib/commonjs/getShadowNodeFromRef.js +14 -13
  92. package/lib/commonjs/getShadowNodeFromRef.js.map +1 -1
  93. package/lib/commonjs/getShadowNodeFromRef.web.js +1 -0
  94. package/lib/commonjs/getShadowNodeFromRef.web.js.map +1 -1
  95. package/lib/commonjs/ghQueueMicrotask.js +2 -1
  96. package/lib/commonjs/ghQueueMicrotask.js.map +1 -1
  97. package/lib/commonjs/handlers/FlingGestureHandler.js +11 -9
  98. package/lib/commonjs/handlers/FlingGestureHandler.js.map +1 -1
  99. package/lib/commonjs/handlers/ForceTouchGestureHandler.js +22 -15
  100. package/lib/commonjs/handlers/ForceTouchGestureHandler.js.map +1 -1
  101. package/lib/commonjs/handlers/GestureHandlerEventPayload.js.map +1 -1
  102. package/lib/commonjs/handlers/LongPressGestureHandler.js +11 -9
  103. package/lib/commonjs/handlers/LongPressGestureHandler.js.map +1 -1
  104. package/lib/commonjs/handlers/NativeViewGestureHandler.js +13 -10
  105. package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +1 -1
  106. package/lib/commonjs/handlers/PanGestureHandler.js +32 -13
  107. package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -1
  108. package/lib/commonjs/handlers/PinchGestureHandler.js +9 -7
  109. package/lib/commonjs/handlers/PinchGestureHandler.js.map +1 -1
  110. package/lib/commonjs/handlers/PressabilityDebugView.js +1 -0
  111. package/lib/commonjs/handlers/PressabilityDebugView.js.map +1 -1
  112. package/lib/commonjs/handlers/PressabilityDebugView.web.js +1 -0
  113. package/lib/commonjs/handlers/PressabilityDebugView.web.js.map +1 -1
  114. package/lib/commonjs/handlers/RotationGestureHandler.js +9 -7
  115. package/lib/commonjs/handlers/RotationGestureHandler.js.map +1 -1
  116. package/lib/commonjs/handlers/TapGestureHandler.js +11 -9
  117. package/lib/commonjs/handlers/TapGestureHandler.js.map +1 -1
  118. package/lib/commonjs/handlers/createHandler.js +134 -50
  119. package/lib/commonjs/handlers/createHandler.js.map +1 -1
  120. package/lib/commonjs/handlers/createNativeWrapper.js +27 -17
  121. package/lib/commonjs/handlers/createNativeWrapper.js.map +1 -1
  122. package/lib/commonjs/handlers/customDirectEventTypes.js +1 -0
  123. package/lib/commonjs/handlers/customDirectEventTypes.js.map +1 -1
  124. package/lib/commonjs/handlers/customDirectEventTypes.web.js +2 -1
  125. package/lib/commonjs/handlers/customDirectEventTypes.web.js.map +1 -1
  126. package/lib/commonjs/handlers/gestureHandlerCommon.js +10 -9
  127. package/lib/commonjs/handlers/gestureHandlerCommon.js.map +1 -1
  128. package/lib/commonjs/handlers/gestureHandlerTypesCompat.js.map +1 -1
  129. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js +14 -5
  130. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
  131. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js +20 -10
  132. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
  133. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js +29 -9
  134. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
  135. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js +10 -1
  136. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
  137. package/lib/commonjs/handlers/gestures/GestureDetector/index.js +36 -11
  138. package/lib/commonjs/handlers/gestures/GestureDetector/index.js.map +1 -1
  139. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js +3 -0
  140. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -1
  141. package/lib/commonjs/handlers/gestures/GestureDetector/types.js.map +1 -1
  142. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js +24 -12
  143. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
  144. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js +48 -12
  145. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
  146. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js +13 -3
  147. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
  148. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js +9 -2
  149. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
  150. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js +14 -6
  151. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
  152. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js +55 -27
  153. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js.map +1 -1
  154. package/lib/commonjs/handlers/gestures/eventReceiver.js +46 -14
  155. package/lib/commonjs/handlers/gestures/eventReceiver.js.map +1 -1
  156. package/lib/commonjs/handlers/gestures/flingGesture.js +12 -5
  157. package/lib/commonjs/handlers/gestures/flingGesture.js.map +1 -1
  158. package/lib/commonjs/handlers/gestures/forceTouchGesture.js +19 -8
  159. package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -1
  160. package/lib/commonjs/handlers/gestures/gesture.js +84 -44
  161. package/lib/commonjs/handlers/gestures/gesture.js.map +1 -1
  162. package/lib/commonjs/handlers/gestures/gestureComposition.js +31 -17
  163. package/lib/commonjs/handlers/gestures/gestureComposition.js.map +1 -1
  164. package/lib/commonjs/handlers/gestures/gestureObjects.js +27 -1
  165. package/lib/commonjs/handlers/gestures/gestureObjects.js.map +1 -1
  166. package/lib/commonjs/handlers/gestures/gestureStateManager.js +9 -3
  167. package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +1 -1
  168. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js +7 -2
  169. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js.map +1 -1
  170. package/lib/commonjs/handlers/gestures/hoverGesture.js +25 -11
  171. package/lib/commonjs/handlers/gestures/hoverGesture.js.map +1 -1
  172. package/lib/commonjs/handlers/gestures/longPressGesture.js +14 -6
  173. package/lib/commonjs/handlers/gestures/longPressGesture.js.map +1 -1
  174. package/lib/commonjs/handlers/gestures/manualGesture.js +6 -0
  175. package/lib/commonjs/handlers/gestures/manualGesture.js.map +1 -1
  176. package/lib/commonjs/handlers/gestures/nativeGesture.js +12 -5
  177. package/lib/commonjs/handlers/gestures/nativeGesture.js.map +1 -1
  178. package/lib/commonjs/handlers/gestures/panGesture.js +43 -18
  179. package/lib/commonjs/handlers/gestures/panGesture.js.map +1 -1
  180. package/lib/commonjs/handlers/gestures/pinchGesture.js +9 -2
  181. package/lib/commonjs/handlers/gestures/pinchGesture.js.map +1 -1
  182. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js +8 -1
  183. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js.map +1 -1
  184. package/lib/commonjs/handlers/gestures/rotationGesture.js +9 -2
  185. package/lib/commonjs/handlers/gestures/rotationGesture.js.map +1 -1
  186. package/lib/commonjs/handlers/gestures/tapGesture.js +22 -10
  187. package/lib/commonjs/handlers/gestures/tapGesture.js.map +1 -1
  188. package/lib/commonjs/handlers/getNextHandlerTag.js +1 -0
  189. package/lib/commonjs/handlers/getNextHandlerTag.js.map +1 -1
  190. package/lib/commonjs/handlers/handlersRegistry.js +21 -6
  191. package/lib/commonjs/handlers/handlersRegistry.js.map +1 -1
  192. package/lib/commonjs/handlers/utils.js +26 -6
  193. package/lib/commonjs/handlers/utils.js.map +1 -1
  194. package/lib/commonjs/index.js +104 -75
  195. package/lib/commonjs/index.js.map +1 -1
  196. package/lib/commonjs/init.js +11 -4
  197. package/lib/commonjs/init.js.map +1 -1
  198. package/lib/commonjs/jestUtils/index.js +5 -4
  199. package/lib/commonjs/jestUtils/index.js.map +1 -1
  200. package/lib/commonjs/jestUtils/jestUtils.js +83 -19
  201. package/lib/commonjs/jestUtils/jestUtils.js.map +1 -1
  202. package/lib/commonjs/mocks.js +15 -5
  203. package/lib/commonjs/mocks.js.map +1 -1
  204. package/lib/commonjs/mountRegistry.js +12 -3
  205. package/lib/commonjs/mountRegistry.js.map +1 -1
  206. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +5 -1
  207. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +1 -1
  208. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js +7 -2
  209. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
  210. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js +7 -2
  211. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
  212. package/lib/commonjs/typeUtils.js.map +1 -1
  213. package/lib/commonjs/utils.js +28 -13
  214. package/lib/commonjs/utils.js.map +1 -1
  215. package/lib/commonjs/web/Gestures.js +23 -5
  216. package/lib/commonjs/web/Gestures.js.map +1 -1
  217. package/lib/commonjs/web/constants.js +4 -2
  218. package/lib/commonjs/web/constants.js.map +1 -1
  219. package/lib/commonjs/web/detectors/RotationGestureDetector.js +41 -5
  220. package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +1 -1
  221. package/lib/commonjs/web/detectors/ScaleGestureDetector.js +42 -13
  222. package/lib/commonjs/web/detectors/ScaleGestureDetector.js.map +1 -1
  223. package/lib/commonjs/web/handlers/FlingGestureHandler.js +49 -6
  224. package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -1
  225. package/lib/commonjs/web/handlers/GestureHandler.js +195 -62
  226. package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
  227. package/lib/commonjs/web/handlers/HoverGestureHandler.js +19 -6
  228. package/lib/commonjs/web/handlers/HoverGestureHandler.js.map +1 -1
  229. package/lib/commonjs/web/handlers/IGestureHandler.js.map +1 -1
  230. package/lib/commonjs/web/handlers/LongPressGestureHandler.js +47 -6
  231. package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +1 -1
  232. package/lib/commonjs/web/handlers/ManualGestureHandler.js +11 -1
  233. package/lib/commonjs/web/handlers/ManualGestureHandler.js.map +1 -1
  234. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js +49 -8
  235. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js.map +1 -1
  236. package/lib/commonjs/web/handlers/PanGestureHandler.js +123 -8
  237. package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
  238. package/lib/commonjs/web/handlers/PinchGestureHandler.js +41 -4
  239. package/lib/commonjs/web/handlers/PinchGestureHandler.js.map +1 -1
  240. package/lib/commonjs/web/handlers/RotationGestureHandler.js +42 -4
  241. package/lib/commonjs/web/handlers/RotationGestureHandler.js.map +1 -1
  242. package/lib/commonjs/web/handlers/TapGestureHandler.js +67 -6
  243. package/lib/commonjs/web/handlers/TapGestureHandler.js.map +1 -1
  244. package/lib/commonjs/web/interfaces.js +17 -9
  245. package/lib/commonjs/web/interfaces.js.map +1 -1
  246. package/lib/commonjs/web/tools/CircularBuffer.js +15 -3
  247. package/lib/commonjs/web/tools/CircularBuffer.js.map +1 -1
  248. package/lib/commonjs/web/tools/EventManager.js +41 -7
  249. package/lib/commonjs/web/tools/EventManager.js.map +1 -1
  250. package/lib/commonjs/web/tools/GestureHandlerDelegate.js.map +1 -1
  251. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +78 -11
  252. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  253. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +48 -8
  254. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  255. package/lib/commonjs/web/tools/InteractionManager.js +22 -5
  256. package/lib/commonjs/web/tools/InteractionManager.js.map +1 -1
  257. package/lib/commonjs/web/tools/KeyboardEventManager.js +26 -4
  258. package/lib/commonjs/web/tools/KeyboardEventManager.js.map +1 -1
  259. package/lib/commonjs/web/tools/LeastSquareSolver.js +67 -30
  260. package/lib/commonjs/web/tools/LeastSquareSolver.js.map +1 -1
  261. package/lib/commonjs/web/tools/NodeManager.js +14 -7
  262. package/lib/commonjs/web/tools/NodeManager.js.map +1 -1
  263. package/lib/commonjs/web/tools/PointerEventManager.js +45 -10
  264. package/lib/commonjs/web/tools/PointerEventManager.js.map +1 -1
  265. package/lib/commonjs/web/tools/PointerTracker.js +45 -9
  266. package/lib/commonjs/web/tools/PointerTracker.js.map +1 -1
  267. package/lib/commonjs/web/tools/Vector.js +18 -3
  268. package/lib/commonjs/web/tools/Vector.js.map +1 -1
  269. package/lib/commonjs/web/tools/VelocityTracker.js +31 -9
  270. package/lib/commonjs/web/tools/VelocityTracker.js.map +1 -1
  271. package/lib/commonjs/web/tools/WheelEventManager.js +17 -4
  272. package/lib/commonjs/web/tools/WheelEventManager.js.map +1 -1
  273. package/lib/commonjs/web/utils.js +55 -26
  274. package/lib/commonjs/web/utils.js.map +1 -1
  275. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js +19 -7
  276. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js.map +1 -1
  277. package/lib/commonjs/web_hammer/DraggingGestureHandler.js +13 -3
  278. package/lib/commonjs/web_hammer/DraggingGestureHandler.js.map +1 -1
  279. package/lib/commonjs/web_hammer/Errors.js +3 -0
  280. package/lib/commonjs/web_hammer/Errors.js.map +1 -1
  281. package/lib/commonjs/web_hammer/FlingGestureHandler.js +44 -13
  282. package/lib/commonjs/web_hammer/FlingGestureHandler.js.map +1 -1
  283. package/lib/commonjs/web_hammer/GestureHandler.js +142 -55
  284. package/lib/commonjs/web_hammer/GestureHandler.js.map +1 -1
  285. package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js +11 -2
  286. package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js.map +1 -1
  287. package/lib/commonjs/web_hammer/LongPressGestureHandler.js +19 -5
  288. package/lib/commonjs/web_hammer/LongPressGestureHandler.js.map +1 -1
  289. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js +24 -16
  290. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js.map +1 -1
  291. package/lib/commonjs/web_hammer/NodeManager.js +16 -9
  292. package/lib/commonjs/web_hammer/NodeManager.js.map +1 -1
  293. package/lib/commonjs/web_hammer/PanGestureHandler.js +49 -8
  294. package/lib/commonjs/web_hammer/PanGestureHandler.js.map +1 -1
  295. package/lib/commonjs/web_hammer/PinchGestureHandler.js +11 -2
  296. package/lib/commonjs/web_hammer/PinchGestureHandler.js.map +1 -1
  297. package/lib/commonjs/web_hammer/PressGestureHandler.js +43 -15
  298. package/lib/commonjs/web_hammer/PressGestureHandler.js.map +1 -1
  299. package/lib/commonjs/web_hammer/RotationGestureHandler.js +13 -2
  300. package/lib/commonjs/web_hammer/RotationGestureHandler.js.map +1 -1
  301. package/lib/commonjs/web_hammer/TapGestureHandler.js +52 -33
  302. package/lib/commonjs/web_hammer/TapGestureHandler.js.map +1 -1
  303. package/lib/commonjs/web_hammer/constants.js +26 -13
  304. package/lib/commonjs/web_hammer/constants.js.map +1 -1
  305. package/lib/commonjs/web_hammer/utils.js +14 -4
  306. package/lib/commonjs/web_hammer/utils.js.map +1 -1
  307. package/lib/module/ActionType.js +1 -3
  308. package/lib/module/ActionType.js.map +1 -1
  309. package/lib/module/Directions.js +3 -9
  310. package/lib/module/Directions.js.map +1 -1
  311. package/lib/module/EnableNewWebImplementation.js +5 -2
  312. package/lib/module/EnableNewWebImplementation.js.map +1 -1
  313. package/lib/module/GestureHandlerRootViewContext.js.map +1 -1
  314. package/lib/module/PlatformConstants.js +1 -0
  315. package/lib/module/PlatformConstants.js.map +1 -1
  316. package/lib/module/PlatformConstants.web.js +1 -0
  317. package/lib/module/PlatformConstants.web.js.map +1 -1
  318. package/lib/module/PointerType.js +4 -3
  319. package/lib/module/PointerType.js.map +1 -1
  320. package/lib/module/RNGestureHandlerModule.js +0 -1
  321. package/lib/module/RNGestureHandlerModule.js.map +1 -1
  322. package/lib/module/RNGestureHandlerModule.web.js +20 -10
  323. package/lib/module/RNGestureHandlerModule.web.js.map +1 -1
  324. package/lib/module/RNGestureHandlerModule.windows.js +17 -18
  325. package/lib/module/RNGestureHandlerModule.windows.js.map +1 -1
  326. package/lib/module/RNRenderer.js.map +1 -1
  327. package/lib/module/RNRenderer.web.js.map +1 -1
  328. package/lib/module/State.js +1 -4
  329. package/lib/module/State.js.map +1 -1
  330. package/lib/module/TouchEventType.js +1 -3
  331. package/lib/module/TouchEventType.js.map +1 -1
  332. package/lib/module/components/DrawerLayout.js +99 -80
  333. package/lib/module/components/DrawerLayout.js.map +1 -1
  334. package/lib/module/components/GestureButtons.js +55 -19
  335. package/lib/module/components/GestureButtons.js.map +1 -1
  336. package/lib/module/components/GestureButtonsProps.js.map +1 -1
  337. package/lib/module/components/GestureComponents.js +12 -17
  338. package/lib/module/components/GestureComponents.js.map +1 -1
  339. package/lib/module/components/GestureComponents.web.js +4 -4
  340. package/lib/module/components/GestureComponents.web.js.map +1 -1
  341. package/lib/module/components/GestureHandlerButton.js.map +1 -1
  342. package/lib/module/components/GestureHandlerButton.web.js +2 -1
  343. package/lib/module/components/GestureHandlerButton.web.js.map +1 -1
  344. package/lib/module/components/GestureHandlerRootView.android.js +2 -1
  345. package/lib/module/components/GestureHandlerRootView.android.js.map +1 -1
  346. package/lib/module/components/GestureHandlerRootView.js +2 -1
  347. package/lib/module/components/GestureHandlerRootView.js.map +1 -1
  348. package/lib/module/components/GestureHandlerRootView.web.js +2 -1
  349. package/lib/module/components/GestureHandlerRootView.web.js.map +1 -1
  350. package/lib/module/components/Pressable/Pressable.js +59 -26
  351. package/lib/module/components/Pressable/Pressable.js.map +1 -1
  352. package/lib/module/components/Pressable/PressableProps.js.map +1 -1
  353. package/lib/module/components/Pressable/index.js.map +1 -1
  354. package/lib/module/components/Pressable/utils.js +14 -4
  355. package/lib/module/components/Pressable/utils.js.map +1 -1
  356. package/lib/module/components/ReanimatedDrawerLayout.js +56 -34
  357. package/lib/module/components/ReanimatedDrawerLayout.js.map +1 -1
  358. package/lib/module/components/ReanimatedSwipeable.js +30 -14
  359. package/lib/module/components/ReanimatedSwipeable.js.map +1 -1
  360. package/lib/module/components/Swipeable.js +59 -28
  361. package/lib/module/components/Swipeable.js.map +1 -1
  362. package/lib/module/components/Text.js +10 -6
  363. package/lib/module/components/Text.js.map +1 -1
  364. package/lib/module/components/gestureHandlerRootHOC.js +2 -2
  365. package/lib/module/components/gestureHandlerRootHOC.js.map +1 -1
  366. package/lib/module/components/touchables/GenericTouchable.js +63 -34
  367. package/lib/module/components/touchables/GenericTouchable.js.map +1 -1
  368. package/lib/module/components/touchables/GenericTouchableProps.js.map +1 -1
  369. package/lib/module/components/touchables/TouchableHighlight.js +24 -15
  370. package/lib/module/components/touchables/TouchableHighlight.js.map +1 -1
  371. package/lib/module/components/touchables/TouchableNativeFeedback.android.js +20 -10
  372. package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  373. package/lib/module/components/touchables/TouchableNativeFeedback.js +2 -2
  374. package/lib/module/components/touchables/TouchableNativeFeedback.js.map +1 -1
  375. package/lib/module/components/touchables/TouchableNativeFeedbackProps.js.map +1 -1
  376. package/lib/module/components/touchables/TouchableOpacity.js +16 -10
  377. package/lib/module/components/touchables/TouchableOpacity.js.map +1 -1
  378. package/lib/module/components/touchables/TouchableWithoutFeedback.js +3 -6
  379. package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  380. package/lib/module/components/touchables/index.js.map +1 -1
  381. package/lib/module/findNodeHandle.js.map +1 -1
  382. package/lib/module/findNodeHandle.web.js +11 -5
  383. package/lib/module/findNodeHandle.web.js.map +1 -1
  384. package/lib/module/getReactNativeVersion.js.map +1 -1
  385. package/lib/module/getReactNativeVersion.web.js.map +1 -1
  386. package/lib/module/getShadowNodeFromRef.js +13 -13
  387. package/lib/module/getShadowNodeFromRef.js.map +1 -1
  388. package/lib/module/getShadowNodeFromRef.web.js.map +1 -1
  389. package/lib/module/ghQueueMicrotask.js.map +1 -1
  390. package/lib/module/handlers/FlingGestureHandler.js +0 -6
  391. package/lib/module/handlers/FlingGestureHandler.js.map +1 -1
  392. package/lib/module/handlers/ForceTouchGestureHandler.js +8 -12
  393. package/lib/module/handlers/ForceTouchGestureHandler.js.map +1 -1
  394. package/lib/module/handlers/GestureHandlerEventPayload.js.map +1 -1
  395. package/lib/module/handlers/LongPressGestureHandler.js +0 -6
  396. package/lib/module/handlers/LongPressGestureHandler.js.map +1 -1
  397. package/lib/module/handlers/NativeViewGestureHandler.js +0 -6
  398. package/lib/module/handlers/NativeViewGestureHandler.js.map +1 -1
  399. package/lib/module/handlers/PanGestureHandler.js +19 -8
  400. package/lib/module/handlers/PanGestureHandler.js.map +1 -1
  401. package/lib/module/handlers/PinchGestureHandler.js +0 -2
  402. package/lib/module/handlers/PinchGestureHandler.js.map +1 -1
  403. package/lib/module/handlers/PressabilityDebugView.js.map +1 -1
  404. package/lib/module/handlers/PressabilityDebugView.web.js.map +1 -1
  405. package/lib/module/handlers/RotationGestureHandler.js +0 -2
  406. package/lib/module/handlers/RotationGestureHandler.js.map +1 -1
  407. package/lib/module/handlers/TapGestureHandler.js +0 -6
  408. package/lib/module/handlers/TapGestureHandler.js.map +1 -1
  409. package/lib/module/handlers/createHandler.js +106 -47
  410. package/lib/module/handlers/createHandler.js.map +1 -1
  411. package/lib/module/handlers/createNativeWrapper.js +17 -12
  412. package/lib/module/handlers/createNativeWrapper.js.map +1 -1
  413. package/lib/module/handlers/customDirectEventTypes.js.map +1 -1
  414. package/lib/module/handlers/customDirectEventTypes.web.js.map +1 -1
  415. package/lib/module/handlers/gestureHandlerCommon.js +4 -9
  416. package/lib/module/handlers/gestureHandlerCommon.js.map +1 -1
  417. package/lib/module/handlers/gestureHandlerTypesCompat.js.map +1 -1
  418. package/lib/module/handlers/gestures/GestureDetector/Wrap.js +4 -3
  419. package/lib/module/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
  420. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js +6 -5
  421. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
  422. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js +16 -8
  423. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
  424. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js +1 -0
  425. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
  426. package/lib/module/handlers/gestures/GestureDetector/index.js +13 -7
  427. package/lib/module/handlers/gestures/GestureDetector/index.js.map +1 -1
  428. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js +2 -0
  429. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -1
  430. package/lib/module/handlers/gestures/GestureDetector/types.js.map +1 -1
  431. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js +14 -11
  432. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
  433. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js +39 -12
  434. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
  435. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js +5 -5
  436. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
  437. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js +6 -2
  438. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
  439. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js +7 -5
  440. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
  441. package/lib/module/handlers/gestures/GestureDetector/utils.js +28 -23
  442. package/lib/module/handlers/gestures/GestureDetector/utils.js.map +1 -1
  443. package/lib/module/handlers/gestures/eventReceiver.js +38 -14
  444. package/lib/module/handlers/gestures/eventReceiver.js.map +1 -1
  445. package/lib/module/handlers/gestures/flingGesture.js +9 -5
  446. package/lib/module/handlers/gestures/flingGesture.js.map +1 -1
  447. package/lib/module/handlers/gestures/forceTouchGesture.js +17 -8
  448. package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -1
  449. package/lib/module/handlers/gestures/gesture.js +73 -44
  450. package/lib/module/handlers/gestures/gesture.js.map +1 -1
  451. package/lib/module/handlers/gestures/gestureComposition.js +24 -16
  452. package/lib/module/handlers/gestures/gestureComposition.js.map +1 -1
  453. package/lib/module/handlers/gestures/gestureObjects.js +14 -1
  454. package/lib/module/handlers/gestures/gestureObjects.js.map +1 -1
  455. package/lib/module/handlers/gestures/gestureStateManager.js +4 -3
  456. package/lib/module/handlers/gestures/gestureStateManager.js.map +1 -1
  457. package/lib/module/handlers/gestures/gestureStateManager.web.js +1 -0
  458. package/lib/module/handlers/gestures/gestureStateManager.web.js.map +1 -1
  459. package/lib/module/handlers/gestures/hoverGesture.js +18 -9
  460. package/lib/module/handlers/gestures/hoverGesture.js.map +1 -1
  461. package/lib/module/handlers/gestures/longPressGesture.js +11 -6
  462. package/lib/module/handlers/gestures/longPressGesture.js.map +1 -1
  463. package/lib/module/handlers/gestures/manualGesture.js +4 -0
  464. package/lib/module/handlers/gestures/manualGesture.js.map +1 -1
  465. package/lib/module/handlers/gestures/nativeGesture.js +9 -5
  466. package/lib/module/handlers/gestures/nativeGesture.js.map +1 -1
  467. package/lib/module/handlers/gestures/panGesture.js +41 -18
  468. package/lib/module/handlers/gestures/panGesture.js.map +1 -1
  469. package/lib/module/handlers/gestures/pinchGesture.js +7 -2
  470. package/lib/module/handlers/gestures/pinchGesture.js.map +1 -1
  471. package/lib/module/handlers/gestures/reanimatedWrapper.js +5 -0
  472. package/lib/module/handlers/gestures/reanimatedWrapper.js.map +1 -1
  473. package/lib/module/handlers/gestures/rotationGesture.js +7 -2
  474. package/lib/module/handlers/gestures/rotationGesture.js.map +1 -1
  475. package/lib/module/handlers/gestures/tapGesture.js +19 -10
  476. package/lib/module/handlers/gestures/tapGesture.js.map +1 -1
  477. package/lib/module/handlers/getNextHandlerTag.js.map +1 -1
  478. package/lib/module/handlers/handlersRegistry.js +5 -0
  479. package/lib/module/handlers/handlersRegistry.js.map +1 -1
  480. package/lib/module/handlers/utils.js +13 -4
  481. package/lib/module/handlers/utils.js.map +1 -1
  482. package/lib/module/index.js.map +1 -1
  483. package/lib/module/init.js +2 -3
  484. package/lib/module/init.js.map +1 -1
  485. package/lib/module/jestUtils/index.js.map +1 -1
  486. package/lib/module/jestUtils/jestUtils.js +66 -20
  487. package/lib/module/jestUtils/jestUtils.js.map +1 -1
  488. package/lib/module/mocks.js +7 -3
  489. package/lib/module/mocks.js.map +1 -1
  490. package/lib/module/mountRegistry.js +10 -3
  491. package/lib/module/mountRegistry.js.map +1 -1
  492. package/lib/module/specs/NativeRNGestureHandlerModule.js.map +1 -1
  493. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
  494. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
  495. package/lib/module/typeUtils.js.map +1 -1
  496. package/lib/module/utils.js +11 -6
  497. package/lib/module/utils.js.map +1 -1
  498. package/lib/module/web/Gestures.js +1 -2
  499. package/lib/module/web/Gestures.js.map +1 -1
  500. package/lib/module/web/constants.js.map +1 -1
  501. package/lib/module/web/detectors/RotationGestureDetector.js +38 -5
  502. package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -1
  503. package/lib/module/web/detectors/ScaleGestureDetector.js +38 -13
  504. package/lib/module/web/detectors/ScaleGestureDetector.js.map +1 -1
  505. package/lib/module/web/handlers/FlingGestureHandler.js +39 -5
  506. package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
  507. package/lib/module/web/handlers/GestureHandler.js +181 -61
  508. package/lib/module/web/handlers/GestureHandler.js.map +1 -1
  509. package/lib/module/web/handlers/HoverGestureHandler.js +11 -5
  510. package/lib/module/web/handlers/HoverGestureHandler.js.map +1 -1
  511. package/lib/module/web/handlers/IGestureHandler.js.map +1 -1
  512. package/lib/module/web/handlers/LongPressGestureHandler.js +40 -5
  513. package/lib/module/web/handlers/LongPressGestureHandler.js.map +1 -1
  514. package/lib/module/web/handlers/ManualGestureHandler.js +6 -0
  515. package/lib/module/web/handlers/ManualGestureHandler.js.map +1 -1
  516. package/lib/module/web/handlers/NativeViewGestureHandler.js +41 -7
  517. package/lib/module/web/handlers/NativeViewGestureHandler.js.map +1 -1
  518. package/lib/module/web/handlers/PanGestureHandler.js +114 -7
  519. package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
  520. package/lib/module/web/handlers/PinchGestureHandler.js +33 -3
  521. package/lib/module/web/handlers/PinchGestureHandler.js.map +1 -1
  522. package/lib/module/web/handlers/RotationGestureHandler.js +34 -3
  523. package/lib/module/web/handlers/RotationGestureHandler.js.map +1 -1
  524. package/lib/module/web/handlers/TapGestureHandler.js +59 -5
  525. package/lib/module/web/handlers/TapGestureHandler.js.map +1 -1
  526. package/lib/module/web/interfaces.js +14 -9
  527. package/lib/module/web/interfaces.js.map +1 -1
  528. package/lib/module/web/tools/CircularBuffer.js +13 -3
  529. package/lib/module/web/tools/CircularBuffer.js.map +1 -1
  530. package/lib/module/web/tools/EventManager.js +39 -7
  531. package/lib/module/web/tools/EventManager.js.map +1 -1
  532. package/lib/module/web/tools/GestureHandlerDelegate.js.map +1 -1
  533. package/lib/module/web/tools/GestureHandlerOrchestrator.js +71 -10
  534. package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  535. package/lib/module/web/tools/GestureHandlerWebDelegate.js +37 -7
  536. package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  537. package/lib/module/web/tools/InteractionManager.js +19 -5
  538. package/lib/module/web/tools/InteractionManager.js.map +1 -1
  539. package/lib/module/web/tools/KeyboardEventManager.js +19 -3
  540. package/lib/module/web/tools/KeyboardEventManager.js.map +1 -1
  541. package/lib/module/web/tools/LeastSquareSolver.js +65 -30
  542. package/lib/module/web/tools/LeastSquareSolver.js.map +1 -1
  543. package/lib/module/web/tools/NodeManager.js +12 -7
  544. package/lib/module/web/tools/NodeManager.js.map +1 -1
  545. package/lib/module/web/tools/PointerEventManager.js +35 -9
  546. package/lib/module/web/tools/PointerEventManager.js.map +1 -1
  547. package/lib/module/web/tools/PointerTracker.js +39 -8
  548. package/lib/module/web/tools/PointerTracker.js.map +1 -1
  549. package/lib/module/web/tools/Vector.js +14 -3
  550. package/lib/module/web/tools/Vector.js.map +1 -1
  551. package/lib/module/web/tools/VelocityTracker.js +25 -8
  552. package/lib/module/web/tools/VelocityTracker.js.map +1 -1
  553. package/lib/module/web/tools/WheelEventManager.js +10 -3
  554. package/lib/module/web/tools/WheelEventManager.js.map +1 -1
  555. package/lib/module/web/utils.js +40 -21
  556. package/lib/module/web/utils.js.map +1 -1
  557. package/lib/module/web_hammer/DiscreteGestureHandler.js +13 -4
  558. package/lib/module/web_hammer/DiscreteGestureHandler.js.map +1 -1
  559. package/lib/module/web_hammer/DraggingGestureHandler.js +5 -0
  560. package/lib/module/web_hammer/DraggingGestureHandler.js.map +1 -1
  561. package/lib/module/web_hammer/Errors.js +1 -0
  562. package/lib/module/web_hammer/Errors.js.map +1 -1
  563. package/lib/module/web_hammer/FlingGestureHandler.js +35 -10
  564. package/lib/module/web_hammer/FlingGestureHandler.js.map +1 -1
  565. package/lib/module/web_hammer/GestureHandler.js +130 -53
  566. package/lib/module/web_hammer/GestureHandler.js.map +1 -1
  567. package/lib/module/web_hammer/IndiscreteGestureHandler.js +6 -1
  568. package/lib/module/web_hammer/IndiscreteGestureHandler.js.map +1 -1
  569. package/lib/module/web_hammer/LongPressGestureHandler.js +11 -2
  570. package/lib/module/web_hammer/LongPressGestureHandler.js.map +1 -1
  571. package/lib/module/web_hammer/NativeViewGestureHandler.js +12 -12
  572. package/lib/module/web_hammer/NativeViewGestureHandler.js.map +1 -1
  573. package/lib/module/web_hammer/NodeManager.js +8 -6
  574. package/lib/module/web_hammer/NodeManager.js.map +1 -1
  575. package/lib/module/web_hammer/PanGestureHandler.js +40 -6
  576. package/lib/module/web_hammer/PanGestureHandler.js.map +1 -1
  577. package/lib/module/web_hammer/PinchGestureHandler.js +5 -0
  578. package/lib/module/web_hammer/PinchGestureHandler.js.map +1 -1
  579. package/lib/module/web_hammer/PressGestureHandler.js +34 -13
  580. package/lib/module/web_hammer/PressGestureHandler.js.map +1 -1
  581. package/lib/module/web_hammer/RotationGestureHandler.js +6 -0
  582. package/lib/module/web_hammer/RotationGestureHandler.js.map +1 -1
  583. package/lib/module/web_hammer/TapGestureHandler.js +45 -31
  584. package/lib/module/web_hammer/TapGestureHandler.js.map +1 -1
  585. package/lib/module/web_hammer/constants.js +1 -2
  586. package/lib/module/web_hammer/constants.js.map +1 -1
  587. package/lib/module/web_hammer/utils.js +2 -2
  588. package/lib/module/web_hammer/utils.js.map +1 -1
  589. package/lib/typescript/components/touchables/TouchableHighlight.d.ts +2 -2
  590. package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +1 -1
  591. package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +1 -1
  592. package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +1 -1
  593. package/lib/typescript/components/touchables/TouchableOpacity.d.ts +2 -2
  594. package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +2 -2
  595. package/package.json +1 -1
  596. package/src/components/touchables/TouchableHighlight.tsx +2 -2
  597. package/src/components/touchables/TouchableNativeFeedback.android.tsx +1 -1
  598. package/src/components/touchables/TouchableNativeFeedback.tsx +1 -1
  599. package/src/components/touchables/TouchableNativeFeedbackProps.tsx +1 -1
  600. package/src/components/touchables/TouchableOpacity.tsx +2 -2
  601. package/src/components/touchables/TouchableWithoutFeedback.tsx +2 -2
@@ -1 +1 @@
1
- {"version":3,"names":["createHandler","baseGestureHandlerProps","panGestureHandlerProps","panGestureHandlerCustomNativeProps","panHandlerName","PanGestureHandler","name","allowedProps","config","transformProps","managePanProps","customNativeProps","validatePanGestureHandlerProps","props","Array","isArray","activeOffsetX","Error","activeOffsetY","failOffsetX","failOffsetY","minDist","transformPanGestureHandlerProps","res","undefined","activeOffsetXStart","activeOffsetXEnd","activeOffsetYStart","activeOffsetYEnd","failOffsetXStart","failOffsetXEnd","failOffsetYStart","failOffsetYEnd","__DEV__"],"sources":["PanGestureHandler.ts"],"sourcesContent":["import type { PanGestureHandlerEventPayload } from './GestureHandlerEventPayload';\nimport createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\n\nexport const panGestureHandlerProps = [\n 'activeOffsetY',\n 'activeOffsetX',\n 'failOffsetY',\n 'failOffsetX',\n 'minDist',\n 'minVelocity',\n 'minVelocityX',\n 'minVelocityY',\n 'minPointers',\n 'maxPointers',\n 'avgTouches',\n 'enableTrackpadTwoFingerGesture',\n 'activateAfterLongPress',\n] as const;\n\nexport const panGestureHandlerCustomNativeProps = [\n 'activeOffsetYStart',\n 'activeOffsetYEnd',\n 'activeOffsetXStart',\n 'activeOffsetXEnd',\n 'failOffsetYStart',\n 'failOffsetYEnd',\n 'failOffsetXStart',\n 'failOffsetXEnd',\n] as const;\n\ninterface CommonPanProperties {\n /**\n * Minimum distance the finger (or multiple finger) need to travel before the\n * handler activates. Expressed in points.\n */\n minDist?: number;\n\n /**\n * Android only.\n */\n avgTouches?: boolean;\n\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 * A number of fingers that is required to be placed before handler can\n * activate. Should be a higher or equal to 0 integer.\n */\n minPointers?: number;\n\n /**\n * When the given number of fingers is placed on the screen and handler hasn't\n * yet activated it will fail recognizing the gesture. Should be a higher or\n * equal to 0 integer.\n */\n maxPointers?: number;\n\n minVelocity?: number;\n minVelocityX?: number;\n minVelocityY?: number;\n activateAfterLongPress?: number;\n}\n\nexport interface PanGestureConfig extends CommonPanProperties {\n activeOffsetYStart?: number;\n activeOffsetYEnd?: number;\n activeOffsetXStart?: number;\n activeOffsetXEnd?: number;\n failOffsetYStart?: number;\n failOffsetYEnd?: number;\n failOffsetXStart?: number;\n failOffsetXEnd?: number;\n}\n\n/**\n * @deprecated PanGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pan()` instead.\n */\nexport interface PanGestureHandlerProps\n extends BaseGestureHandlerProps<PanGestureHandlerEventPayload>,\n CommonPanProperties {\n /**\n * Range along X axis (in points) where fingers travels without activation of\n * handler. Moving outside of this range implies activation of handler. Range\n * can be given as an array or a single number. If range is set as an array,\n * first value must be lower or equal to 0, a the second one higher or equal\n * to 0. If only one number `p` is given a range of `(-inf, p)` will be used\n * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.\n */\n activeOffsetY?:\n | number\n | [activeOffsetYStart: number, activeOffsetYEnd: number];\n\n /**\n * Range along X axis (in points) where fingers travels without activation of\n * handler. Moving outside of this range implies activation of handler. Range\n * can be given as an array or a single number. If range is set as an array,\n * first value must be lower or equal to 0, a the second one higher or equal\n * to 0. If only one number `p` is given a range of `(-inf, p)` will be used\n * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.\n */\n activeOffsetX?:\n | number\n | [activeOffsetXStart: number, activeOffsetXEnd: number];\n\n /**\n * When the finger moves outside this range (in points) along Y axis and\n * handler hasn't yet activated it will fail recognizing the gesture. Range\n * can be given as an array or a single number. If range is set as an array,\n * first value must be lower or equal to 0, a the second one higher or equal\n * to 0. If only one number `p` is given a range of `(-inf, p)` will be used\n * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.\n */\n failOffsetY?: number | [failOffsetYStart: number, failOffsetYEnd: number];\n\n /**\n * When the finger moves outside this range (in points) along X axis and\n * handler hasn't yet activated it will fail recognizing the gesture. Range\n * can be given as an array or a single number. If range is set as an array,\n * first value must be lower or equal to 0, a the second one higher or equal\n * to 0. If only one number `p` is given a range of `(-inf, p)` will be used\n * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.\n */\n failOffsetX?: number | [failOffsetXStart: number, failOffsetXEnd: number];\n}\n\nexport const panHandlerName = 'PanGestureHandler';\n\n/**\n * @deprecated PanGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pan()` instead.\n */\nexport type PanGestureHandler = typeof PanGestureHandler;\n\n/**\n * @deprecated PanGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pan()` instead.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const PanGestureHandler = createHandler<\n PanGestureHandlerProps,\n PanGestureHandlerEventPayload\n>({\n name: panHandlerName,\n allowedProps: [\n ...baseGestureHandlerProps,\n ...panGestureHandlerProps,\n ] as const,\n config: {},\n transformProps: managePanProps,\n customNativeProps: panGestureHandlerCustomNativeProps,\n});\n\nfunction validatePanGestureHandlerProps(props: PanGestureHandlerProps) {\n if (\n Array.isArray(props.activeOffsetX) &&\n (props.activeOffsetX[0] > 0 || props.activeOffsetX[1] < 0)\n ) {\n throw new Error(\n `First element of activeOffsetX should be negative, a the second one should be positive`\n );\n }\n\n if (\n Array.isArray(props.activeOffsetY) &&\n (props.activeOffsetY[0] > 0 || props.activeOffsetY[1] < 0)\n ) {\n throw new Error(\n `First element of activeOffsetY should be negative, a the second one should be positive`\n );\n }\n\n if (\n Array.isArray(props.failOffsetX) &&\n (props.failOffsetX[0] > 0 || props.failOffsetX[1] < 0)\n ) {\n throw new Error(\n `First element of failOffsetX should be negative, a the second one should be positive`\n );\n }\n\n if (\n Array.isArray(props.failOffsetY) &&\n (props.failOffsetY[0] > 0 || props.failOffsetY[1] < 0)\n ) {\n throw new Error(\n `First element of failOffsetY should be negative, a the second one should be positive`\n );\n }\n\n if (props.minDist && (props.failOffsetX || props.failOffsetY)) {\n throw new Error(\n `It is not supported to use minDist with failOffsetX or failOffsetY, use activeOffsetX and activeOffsetY instead`\n );\n }\n\n if (props.minDist && (props.activeOffsetX || props.activeOffsetY)) {\n throw new Error(\n `It is not supported to use minDist with activeOffsetX or activeOffsetY`\n );\n }\n}\n\nfunction transformPanGestureHandlerProps(props: PanGestureHandlerProps) {\n type InternalPanGHKeys =\n | 'activeOffsetXStart'\n | 'activeOffsetXEnd'\n | 'failOffsetXStart'\n | 'failOffsetXEnd'\n | 'activeOffsetYStart'\n | 'activeOffsetYEnd'\n | 'failOffsetYStart'\n | 'failOffsetYEnd';\n type PanGestureHandlerInternalProps = PanGestureHandlerProps &\n Partial<Record<InternalPanGHKeys, number>>;\n\n const res: PanGestureHandlerInternalProps = { ...props };\n\n if (props.activeOffsetX !== undefined) {\n delete res.activeOffsetX;\n if (Array.isArray(props.activeOffsetX)) {\n res.activeOffsetXStart = props.activeOffsetX[0];\n res.activeOffsetXEnd = props.activeOffsetX[1];\n } else if (props.activeOffsetX < 0) {\n res.activeOffsetXStart = props.activeOffsetX;\n } else {\n res.activeOffsetXEnd = props.activeOffsetX;\n }\n }\n\n if (props.activeOffsetY !== undefined) {\n delete res.activeOffsetY;\n if (Array.isArray(props.activeOffsetY)) {\n res.activeOffsetYStart = props.activeOffsetY[0];\n res.activeOffsetYEnd = props.activeOffsetY[1];\n } else if (props.activeOffsetY < 0) {\n res.activeOffsetYStart = props.activeOffsetY;\n } else {\n res.activeOffsetYEnd = props.activeOffsetY;\n }\n }\n\n if (props.failOffsetX !== undefined) {\n delete res.failOffsetX;\n if (Array.isArray(props.failOffsetX)) {\n res.failOffsetXStart = props.failOffsetX[0];\n res.failOffsetXEnd = props.failOffsetX[1];\n } else if (props.failOffsetX < 0) {\n res.failOffsetXStart = props.failOffsetX;\n } else {\n res.failOffsetXEnd = props.failOffsetX;\n }\n }\n\n if (props.failOffsetY !== undefined) {\n delete res.failOffsetY;\n if (Array.isArray(props.failOffsetY)) {\n res.failOffsetYStart = props.failOffsetY[0];\n res.failOffsetYEnd = props.failOffsetY[1];\n } else if (props.failOffsetY < 0) {\n res.failOffsetYStart = props.failOffsetY;\n } else {\n res.failOffsetYEnd = props.failOffsetY;\n }\n }\n\n return res;\n}\n\nexport function managePanProps(props: PanGestureHandlerProps) {\n if (__DEV__) {\n validatePanGestureHandlerProps(props);\n }\n return transformPanGestureHandlerProps(props);\n}\n"],"mappings":"AACA,OAAOA,aAAa,MAAM,iBAAiB;AAC3C,SAEEC,uBAAuB,QAClB,wBAAwB;AAE/B,OAAO,MAAMC,s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,CAAC;MAC3CG,GAAG,CAACS,cAAc,GAAGnB,KAAK,CAACO,WAAW,CAAC,CAAC,CAAC;IAC3C,CAAC,MAAM,IAAIP,KAAK,CAACO,WAAW,GAAG,CAAC,EAAE;MAChCG,GAAG,CAACQ,gBAAgB,GAAGlB,KAAK,CAACO,WAAW;IAC1C,CAAC,MAAM;MACLG,GAAG,CAACS,cAAc,GAAGnB,KAAK,CAACO,WAAW;IACxC;EACF;EAEA,OAAOG,GAAG;AACZ;AAEA,OAAO,SAASb,cAAcA,CAACG,KAA6B,EAAE;EAC5D,IAAIoB,OAAO,EAAE;IACXrB,8BAA8B,CAACC,KAAK,CAAC;EACvC;EACA,OAAOS,+BAA+B,CAACT,KAAK,CAAC;AAC/C","ignoreList":[]}
1
+ {"version":3,"sources":["PanGestureHandler.ts"],"names":["createHandler","baseGestureHandlerProps","panGestureHandlerProps","panGestureHandlerCustomNativeProps","panHandlerName","PanGestureHandler","name","allowedProps","config","transformProps","managePanProps","customNativeProps","validatePanGestureHandlerProps","props","Array","isArray","activeOffsetX","Error","activeOffsetY","failOffsetX","failOffsetY","minDist","transformPanGestureHandlerProps","res","undefined","activeOffsetXStart","activeOffsetXEnd","activeOffsetYStart","activeOffsetYEnd","failOffsetXStart","failOffsetXEnd","failOffsetYStart","failOffsetYEnd","__DEV__"],"mappings":"AACA,OAAOA,aAAP,MAA0B,iBAA1B;AACA,SAEEC,uBAFF,QAGO,wBAHP;AAKA,OAAO,MAAMC,sBAAsB,GAAG,CACpC,eADoC,EAEpC,eAFoC,EAGpC,aAHoC,EAIpC,aAJoC,EAKpC,SALoC,EAMpC,aANoC,EAOpC,cAPoC,EAQpC,cARoC,EASpC,aAToC,EAUpC,aAVoC,EAWpC,YAXoC,EAYpC,gCAZoC,EAapC,wBAboC,CAA/B;AAgBP,OAAO,MAAMC,kCAAkC,GAAG,CAChD,oBADgD,EAEhD,kBAFgD,EAGhD,oBAHgD,EAIhD,kBAJgD,EAKhD,kBALgD,EAMhD,gBAN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AxB,EAA2B;AAChCG,MAAAA,GAAG,CAACQ,gBAAJ,GAAuBlB,KAAK,CAACO,WAA7B;AACD,KAFM,MAEA;AACLG,MAAAA,GAAG,CAACS,cAAJ,GAAqBnB,KAAK,CAACO,WAA3B;AACD;AACF;;AAED,SAAOG,GAAP;AACD;;AAED,OAAO,SAASb,cAAT,CAAwBG,KAAxB,EAAuD;AAC5D,MAAIoB,OAAJ,EAAa;AACXrB,IAAAA,8BAA8B,CAACC,KAAD,CAA9B;AACD;;AACD,SAAOS,+BAA+B,CAACT,KAAD,CAAtC;AACD","sourcesContent":["import type { PanGestureHandlerEventPayload } from './GestureHandlerEventPayload';\nimport createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\n\nexport const panGestureHandlerProps = [\n 'activeOffsetY',\n 'activeOffsetX',\n 'failOffsetY',\n 'failOffsetX',\n 'minDist',\n 'minVelocity',\n 'minVelocityX',\n 'minVelocityY',\n 'minPointers',\n 'maxPointers',\n 'avgTouches',\n 'enableTrackpadTwoFingerGesture',\n 'activateAfterLongPress',\n] as const;\n\nexport const panGestureHandlerCustomNativeProps = [\n 'activeOffsetYStart',\n 'activeOffsetYEnd',\n 'activeOffsetXStart',\n 'activeOffsetXEnd',\n 'failOffsetYStart',\n 'failOffsetYEnd',\n 'failOffsetXStart',\n 'failOffsetXEnd',\n] as const;\n\ninterface CommonPanProperties {\n /**\n * Minimum distance the finger (or multiple finger) need to travel before the\n * handler activates. Expressed in points.\n */\n minDist?: number;\n\n /**\n * Android only.\n */\n avgTouches?: boolean;\n\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 * A number of fingers that is required to be placed before handler can\n * activate. Should be a higher or equal to 0 integer.\n */\n minPointers?: number;\n\n /**\n * When the given number of fingers is placed on the screen and handler hasn't\n * yet activated it will fail recognizing the gesture. Should be a higher or\n * equal to 0 integer.\n */\n maxPointers?: number;\n\n minVelocity?: number;\n minVelocityX?: number;\n minVelocityY?: number;\n activateAfterLongPress?: number;\n}\n\nexport interface PanGestureConfig extends CommonPanProperties {\n activeOffsetYStart?: number;\n activeOffsetYEnd?: number;\n activeOffsetXStart?: number;\n activeOffsetXEnd?: number;\n failOffsetYStart?: number;\n failOffsetYEnd?: number;\n failOffsetXStart?: number;\n failOffsetXEnd?: number;\n}\n\n/**\n * @deprecated PanGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pan()` instead.\n */\nexport interface PanGestureHandlerProps\n extends BaseGestureHandlerProps<PanGestureHandlerEventPayload>,\n CommonPanProperties {\n /**\n * Range along X axis (in points) where fingers travels without activation of\n * handler. Moving outside of this range implies activation of handler. Range\n * can be given as an array or a single number. If range is set as an array,\n * first value must be lower or equal to 0, a the second one higher or equal\n * to 0. If only one number `p` is given a range of `(-inf, p)` will be used\n * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.\n */\n activeOffsetY?:\n | number\n | [activeOffsetYStart: number, activeOffsetYEnd: number];\n\n /**\n * Range along X axis (in points) where fingers travels without activation of\n * handler. Moving outside of this range implies activation of handler. Range\n * can be given as an array or a single number. If range is set as an array,\n * first value must be lower or equal to 0, a the second one higher or equal\n * to 0. If only one number `p` is given a range of `(-inf, p)` will be used\n * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.\n */\n activeOffsetX?:\n | number\n | [activeOffsetXStart: number, activeOffsetXEnd: number];\n\n /**\n * When the finger moves outside this range (in points) along Y axis and\n * handler hasn't yet activated it will fail recognizing the gesture. Range\n * can be given as an array or a single number. If range is set as an array,\n * first value must be lower or equal to 0, a the second one higher or equal\n * to 0. If only one number `p` is given a range of `(-inf, p)` will be used\n * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.\n */\n failOffsetY?: number | [failOffsetYStart: number, failOffsetYEnd: number];\n\n /**\n * When the finger moves outside this range (in points) along X axis and\n * handler hasn't yet activated it will fail recognizing the gesture. Range\n * can be given as an array or a single number. If range is set as an array,\n * first value must be lower or equal to 0, a the second one higher or equal\n * to 0. If only one number `p` is given a range of `(-inf, p)` will be used\n * if `p` is higher or equal to 0 and `(-p, inf)` otherwise.\n */\n failOffsetX?: number | [failOffsetXStart: number, failOffsetXEnd: number];\n}\n\nexport const panHandlerName = 'PanGestureHandler';\n\n/**\n * @deprecated PanGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pan()` instead.\n */\nexport type PanGestureHandler = typeof PanGestureHandler;\n\n/**\n * @deprecated PanGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pan()` instead.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const PanGestureHandler = createHandler<\n PanGestureHandlerProps,\n PanGestureHandlerEventPayload\n>({\n name: panHandlerName,\n allowedProps: [\n ...baseGestureHandlerProps,\n ...panGestureHandlerProps,\n ] as const,\n config: {},\n transformProps: managePanProps,\n customNativeProps: panGestureHandlerCustomNativeProps,\n});\n\nfunction validatePanGestureHandlerProps(props: PanGestureHandlerProps) {\n if (\n Array.isArray(props.activeOffsetX) &&\n (props.activeOffsetX[0] > 0 || props.activeOffsetX[1] < 0)\n ) {\n throw new Error(\n `First element of activeOffsetX should be negative, a the second one should be positive`\n );\n }\n\n if (\n Array.isArray(props.activeOffsetY) &&\n (props.activeOffsetY[0] > 0 || props.activeOffsetY[1] < 0)\n ) {\n throw new Error(\n `First element of activeOffsetY should be negative, a the second one should be positive`\n );\n }\n\n if (\n Array.isArray(props.failOffsetX) &&\n (props.failOffsetX[0] > 0 || props.failOffsetX[1] < 0)\n ) {\n throw new Error(\n `First element of failOffsetX should be negative, a the second one should be positive`\n );\n }\n\n if (\n Array.isArray(props.failOffsetY) &&\n (props.failOffsetY[0] > 0 || props.failOffsetY[1] < 0)\n ) {\n throw new Error(\n `First element of failOffsetY should be negative, a the second one should be positive`\n );\n }\n\n if (props.minDist && (props.failOffsetX || props.failOffsetY)) {\n throw new Error(\n `It is not supported to use minDist with failOffsetX or failOffsetY, use activeOffsetX and activeOffsetY instead`\n );\n }\n\n if (props.minDist && (props.activeOffsetX || props.activeOffsetY)) {\n throw new Error(\n `It is not supported to use minDist with activeOffsetX or activeOffsetY`\n );\n }\n}\n\nfunction transformPanGestureHandlerProps(props: PanGestureHandlerProps) {\n type InternalPanGHKeys =\n | 'activeOffsetXStart'\n | 'activeOffsetXEnd'\n | 'failOffsetXStart'\n | 'failOffsetXEnd'\n | 'activeOffsetYStart'\n | 'activeOffsetYEnd'\n | 'failOffsetYStart'\n | 'failOffsetYEnd';\n type PanGestureHandlerInternalProps = PanGestureHandlerProps &\n Partial<Record<InternalPanGHKeys, number>>;\n\n const res: PanGestureHandlerInternalProps = { ...props };\n\n if (props.activeOffsetX !== undefined) {\n delete res.activeOffsetX;\n if (Array.isArray(props.activeOffsetX)) {\n res.activeOffsetXStart = props.activeOffsetX[0];\n res.activeOffsetXEnd = props.activeOffsetX[1];\n } else if (props.activeOffsetX < 0) {\n res.activeOffsetXStart = props.activeOffsetX;\n } else {\n res.activeOffsetXEnd = props.activeOffsetX;\n }\n }\n\n if (props.activeOffsetY !== undefined) {\n delete res.activeOffsetY;\n if (Array.isArray(props.activeOffsetY)) {\n res.activeOffsetYStart = props.activeOffsetY[0];\n res.activeOffsetYEnd = props.activeOffsetY[1];\n } else if (props.activeOffsetY < 0) {\n res.activeOffsetYStart = props.activeOffsetY;\n } else {\n res.activeOffsetYEnd = props.activeOffsetY;\n }\n }\n\n if (props.failOffsetX !== undefined) {\n delete res.failOffsetX;\n if (Array.isArray(props.failOffsetX)) {\n res.failOffsetXStart = props.failOffsetX[0];\n res.failOffsetXEnd = props.failOffsetX[1];\n } else if (props.failOffsetX < 0) {\n res.failOffsetXStart = props.failOffsetX;\n } else {\n res.failOffsetXEnd = props.failOffsetX;\n }\n }\n\n if (props.failOffsetY !== undefined) {\n delete res.failOffsetY;\n if (Array.isArray(props.failOffsetY)) {\n res.failOffsetYStart = props.failOffsetY[0];\n res.failOffsetYEnd = props.failOffsetY[1];\n } else if (props.failOffsetY < 0) {\n res.failOffsetYStart = props.failOffsetY;\n } else {\n res.failOffsetYEnd = props.failOffsetY;\n }\n }\n\n return res;\n}\n\nexport function managePanProps(props: PanGestureHandlerProps) {\n if (__DEV__) {\n validatePanGestureHandlerProps(props);\n }\n return transformPanGestureHandlerProps(props);\n}\n"]}
@@ -1,12 +1,10 @@
1
1
  import createHandler from './createHandler';
2
2
  import { baseGestureHandlerProps } from './gestureHandlerCommon';
3
-
4
3
  /**
5
4
  * @deprecated PinchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pinch()` instead.
6
5
  */
7
6
 
8
7
  export const pinchHandlerName = 'PinchGestureHandler';
9
-
10
8
  /**
11
9
  * @deprecated PinchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pinch()` instead.
12
10
  */
@@ -1 +1 @@
1
- {"version":3,"names":["createHandler","baseGestureHandlerProps","pinchHandlerName","PinchGestureHandler","name","allowedProps","config"],"sources":["PinchGestureHandler.ts"],"sourcesContent":["import { PinchGestureHandlerEventPayload } from './GestureHandlerEventPayload';\nimport createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\n\n/**\n * @deprecated PinchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pinch()` instead.\n */\nexport interface PinchGestureHandlerProps\n extends BaseGestureHandlerProps<PinchGestureHandlerEventPayload> {}\n\nexport const pinchHandlerName = 'PinchGestureHandler';\n\n/**\n * @deprecated PinchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pinch()` instead.\n */\nexport type PinchGestureHandler = typeof PinchGestureHandler;\n\n/**\n * @deprecated PinchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pinch()` instead.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const PinchGestureHandler = createHandler<\n PinchGestureHandlerProps,\n PinchGestureHandlerEventPayload\n>({\n name: pinchHandlerName,\n allowedProps: baseGestureHandlerProps,\n config: {},\n});\n"],"mappings":"AACA,OAAOA,aAAa,MAAM,iBAAiB;AAC3C,SAEEC,uBAAuB,QAClB,wBAAwB;;AAE/B;AACA;AACA;;AAIA,OAAO,MAAMC,gBAAgB,GAAG,qBAAqB;;AAErD;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA,OAAO,MAAMC,mBAAmB,GAAGH,aAAa,CAG9C;EACAI,IAAI,EAAEF,gBAAgB;EACtBG,YAAY,EAAEJ,uBAAuB;EACrCK,MAAM,EAAE,CAAC;AACX,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"sources":["PinchGestureHandler.ts"],"names":["createHandler","baseGestureHandlerProps","pinchHandlerName","PinchGestureHandler","name","allowedProps","config"],"mappings":"AACA,OAAOA,aAAP,MAA0B,iBAA1B;AACA,SAEEC,uBAFF,QAGO,wBAHP;AAKA;AACA;AACA;;AAIA,OAAO,MAAMC,gBAAgB,GAAG,qBAAzB;AAEP;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA,OAAO,MAAMC,mBAAmB,GAAGH,aAAa,CAG9C;AACAI,EAAAA,IAAI,EAAEF,gBADN;AAEAG,EAAAA,YAAY,EAAEJ,uBAFd;AAGAK,EAAAA,MAAM,EAAE;AAHR,CAH8C,CAAzC","sourcesContent":["import { PinchGestureHandlerEventPayload } from './GestureHandlerEventPayload';\nimport createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\n\n/**\n * @deprecated PinchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pinch()` instead.\n */\nexport interface PinchGestureHandlerProps\n extends BaseGestureHandlerProps<PinchGestureHandlerEventPayload> {}\n\nexport const pinchHandlerName = 'PinchGestureHandler';\n\n/**\n * @deprecated PinchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pinch()` instead.\n */\nexport type PinchGestureHandler = typeof PinchGestureHandler;\n\n/**\n * @deprecated PinchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pinch()` instead.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const PinchGestureHandler = createHandler<\n PinchGestureHandlerProps,\n PinchGestureHandlerEventPayload\n>({\n name: pinchHandlerName,\n allowedProps: baseGestureHandlerProps,\n config: {},\n});\n"]}
@@ -1 +1 @@
1
- {"version":3,"names":["PressabilityDebugView"],"sources":["PressabilityDebugView.tsx"],"sourcesContent":["// @ts-ignore it's not exported so we need to import it from path\nexport { PressabilityDebugView } from 'react-native/Libraries/Pressability/PressabilityDebug';\n"],"mappings":"AAAA;AACA,SAASA,qBAAqB,QAAQ,uDAAuD","ignoreList":[]}
1
+ {"version":3,"sources":["PressabilityDebugView.tsx"],"names":["PressabilityDebugView"],"mappings":"AAAA;AACA,SAASA,qBAAT,QAAsC,uDAAtC","sourcesContent":["// @ts-ignore it's not exported so we need to import it from path\nexport { PressabilityDebugView } from 'react-native/Libraries/Pressability/PressabilityDebug';\n"]}
@@ -1 +1 @@
1
- {"version":3,"names":["PressabilityDebugView"],"sources":["PressabilityDebugView.web.tsx"],"sourcesContent":["// PressabilityDebugView is not implemented in react-native-web\nexport function PressabilityDebugView() {\n return null;\n}\n"],"mappings":"AAAA;AACA,OAAO,SAASA,qBAAqBA,CAAA,EAAG;EACtC,OAAO,IAAI;AACb","ignoreList":[]}
1
+ {"version":3,"sources":["PressabilityDebugView.web.tsx"],"names":["PressabilityDebugView"],"mappings":"AAAA;AACA,OAAO,SAASA,qBAAT,GAAiC;AACtC,SAAO,IAAP;AACD","sourcesContent":["// PressabilityDebugView is not implemented in react-native-web\nexport function PressabilityDebugView() {\n return null;\n}\n"]}
@@ -1,12 +1,10 @@
1
1
  import createHandler from './createHandler';
2
2
  import { baseGestureHandlerProps } from './gestureHandlerCommon';
3
-
4
3
  /**
5
4
  * @deprecated RotationGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Rotation()` instead.
6
5
  */
7
6
 
8
7
  export const rotationHandlerName = 'RotationGestureHandler';
9
-
10
8
  /**
11
9
  * @deprecated RotationGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Rotation()` instead.
12
10
  */
@@ -1 +1 @@
1
- {"version":3,"names":["createHandler","baseGestureHandlerProps","rotationHandlerName","RotationGestureHandler","name","allowedProps","config"],"sources":["RotationGestureHandler.ts"],"sourcesContent":["import { RotationGestureHandlerEventPayload } from './GestureHandlerEventPayload';\nimport createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\n\n/**\n * @deprecated RotationGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Rotation()` instead.\n */\nexport interface RotationGestureHandlerProps\n extends BaseGestureHandlerProps<RotationGestureHandlerEventPayload> {}\n\nexport const rotationHandlerName = 'RotationGestureHandler';\n\n/**\n * @deprecated RotationGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Rotation()` instead.\n */\nexport type RotationGestureHandler = typeof RotationGestureHandler;\n\n/**\n * @deprecated RotationGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Rotation()` instead.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const RotationGestureHandler = createHandler<\n RotationGestureHandlerProps,\n RotationGestureHandlerEventPayload\n>({\n name: rotationHandlerName,\n allowedProps: baseGestureHandlerProps,\n config: {},\n});\n"],"mappings":"AACA,OAAOA,aAAa,MAAM,iBAAiB;AAC3C,SAEEC,uBAAuB,QAClB,wBAAwB;;AAE/B;AACA;AACA;;AAIA,OAAO,MAAMC,mBAAmB,GAAG,wBAAwB;;AAE3D;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGH,aAAa,CAGjD;EACAI,IAAI,EAAEF,mBAAmB;EACzBG,YAAY,EAAEJ,uBAAuB;EACrCK,MAAM,EAAE,CAAC;AACX,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"sources":["RotationGestureHandler.ts"],"names":["createHandler","baseGestureHandlerProps","rotationHandlerName","RotationGestureHandler","name","allowedProps","config"],"mappings":"AACA,OAAOA,aAAP,MAA0B,iBAA1B;AACA,SAEEC,uBAFF,QAGO,wBAHP;AAKA;AACA;AACA;;AAIA,OAAO,MAAMC,mBAAmB,GAAG,wBAA5B;AAEP;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAGH,aAAa,CAGjD;AACAI,EAAAA,IAAI,EAAEF,mBADN;AAEAG,EAAAA,YAAY,EAAEJ,uBAFd;AAGAK,EAAAA,MAAM,EAAE;AAHR,CAHiD,CAA5C","sourcesContent":["import { RotationGestureHandlerEventPayload } from './GestureHandlerEventPayload';\nimport createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\n\n/**\n * @deprecated RotationGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Rotation()` instead.\n */\nexport interface RotationGestureHandlerProps\n extends BaseGestureHandlerProps<RotationGestureHandlerEventPayload> {}\n\nexport const rotationHandlerName = 'RotationGestureHandler';\n\n/**\n * @deprecated RotationGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Rotation()` instead.\n */\nexport type RotationGestureHandler = typeof RotationGestureHandler;\n\n/**\n * @deprecated RotationGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Rotation()` instead.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const RotationGestureHandler = createHandler<\n RotationGestureHandlerProps,\n RotationGestureHandlerEventPayload\n>({\n name: rotationHandlerName,\n allowedProps: baseGestureHandlerProps,\n config: {},\n});\n"]}
@@ -1,13 +1,7 @@
1
1
  import createHandler from './createHandler';
2
2
  import { baseGestureHandlerProps } from './gestureHandlerCommon';
3
3
  export const tapGestureHandlerProps = ['maxDurationMs', 'maxDelayMs', 'numberOfTaps', 'maxDeltaX', 'maxDeltaY', 'maxDist', 'minPointers'];
4
-
5
- /**
6
- * @deprecated TapGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Tap()` instead.
7
- */
8
-
9
4
  export const tapHandlerName = 'TapGestureHandler';
10
-
11
5
  /**
12
6
  * @deprecated TapGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Tap()` instead.
13
7
  */
@@ -1 +1 @@
1
- {"version":3,"names":["createHandler","baseGestureHandlerProps","tapGestureHandlerProps","tapHandlerName","TapGestureHandler","name","allowedProps","config","shouldCancelWhenOutside"],"sources":["TapGestureHandler.ts"],"sourcesContent":["import type { TapGestureHandlerEventPayload } from './GestureHandlerEventPayload';\nimport createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\n\nexport const tapGestureHandlerProps = [\n 'maxDurationMs',\n 'maxDelayMs',\n 'numberOfTaps',\n 'maxDeltaX',\n 'maxDeltaY',\n 'maxDist',\n 'minPointers',\n] as const;\n\nexport interface TapGestureConfig {\n /**\n * Minimum number of pointers (fingers) required to be placed before the\n * handler activates. Should be a positive integer.\n * The default value is 1.\n */\n minPointers?: number;\n\n /**\n * Maximum time, expressed in milliseconds, that defines how fast a finger\n * must be released after a touch. The default value is 500.\n */\n maxDurationMs?: number;\n\n /**\n * Maximum time, expressed in milliseconds, that can pass before the next tap\n * if many taps are required. The default value is 500.\n */\n maxDelayMs?: number;\n\n /**\n * Number of tap gestures required to activate the handler. The default value\n * is 1.\n */\n numberOfTaps?: number;\n\n /**\n * Maximum distance, expressed in points, that defines how far the finger is\n * allowed to travel along the X axis during a tap gesture. If the finger\n * travels further than the defined distance along the X axis and the handler\n * hasn't yet activated, it will fail to recognize the gesture.\n */\n maxDeltaX?: number;\n\n /**\n * Maximum distance, expressed in points, that defines how far the finger is\n * allowed to travel along the Y axis during a tap gesture. If the finger\n * travels further than the defined distance along the Y axis and the handler\n * hasn't yet activated, it will fail to recognize the gesture.\n */\n maxDeltaY?: number;\n\n /**\n * Maximum distance, expressed in points, that defines how far the finger is\n * allowed to travel during a tap gesture. If the finger travels further than\n * the defined distance and the handler hasn't yet\n * activated, it will fail to recognize the gesture.\n */\n maxDist?: number;\n}\n\n/**\n * @deprecated TapGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Tap()` instead.\n */\nexport interface TapGestureHandlerProps\n extends BaseGestureHandlerProps<TapGestureHandlerEventPayload>,\n TapGestureConfig {}\n\nexport const tapHandlerName = 'TapGestureHandler';\n\n/**\n * @deprecated TapGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Tap()` instead.\n */\nexport type TapGestureHandler = typeof TapGestureHandler;\n\n/**\n * @deprecated TapGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Tap()` instead.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const TapGestureHandler = createHandler<\n TapGestureHandlerProps,\n TapGestureHandlerEventPayload\n>({\n name: tapHandlerName,\n allowedProps: [\n ...baseGestureHandlerProps,\n ...tapGestureHandlerProps,\n ] as const,\n config: {\n shouldCancelWhenOutside: true,\n },\n});\n"],"mappings":"AACA,OAAOA,aAAa,MAAM,iBAAiB;AAC3C,SAEEC,uBAAuB,QAClB,wBAAwB;AAE/B,OAAO,MAAMC,sBAAsB,GAAG,CACpC,eAAe,EACf,YAAY,EACZ,cAAc,EACd,WAAW,EACX,WAAW,EACX,SAAS,EACT,aAAa,CACL;;AAqDV;AACA;AACA;;AAKA,OAAO,MAAMC,cAAc,GAAG,mBAAmB;;AAEjD;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAGJ,aAAa,CAG5C;EACAK,IAAI,EAAEF,cAAc;EACpBG,YAAY,EAAE,CACZ,GAAGL,uBAAuB,EAC1B,GAAGC,sBAAsB,CACjB;EACVK,MAAM,EAAE;IACNC,uBAAuB,EAAE;EAC3B;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"sources":["TapGestureHandler.ts"],"names":["createHandler","baseGestureHandlerProps","tapGestureHandlerProps","tapHandlerName","TapGestureHandler","name","allowedProps","config","shouldCancelWhenOutside"],"mappings":"AACA,OAAOA,aAAP,MAA0B,iBAA1B;AACA,SAEEC,uBAFF,QAGO,wBAHP;AAKA,OAAO,MAAMC,sBAAsB,GAAG,CACpC,eADoC,EAEpC,YAFoC,EAGpC,cAHoC,EAIpC,WAJoC,EAKpC,WALoC,EAMpC,SANoC,EAOpC,aAPoC,CAA/B;AAoEP,OAAO,MAAMC,cAAc,GAAG,mBAAvB;AAEP;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAGJ,aAAa,CAG5C;AACAK,EAAAA,IAAI,EAAEF,cADN;AAEAG,EAAAA,YAAY,EAAE,CACZ,GAAGL,uBADS,EAEZ,GAAGC,sBAFS,CAFd;AAMAK,EAAAA,MAAM,EAAE;AACNC,IAAAA,uBAAuB,EAAE;AADnB;AANR,CAH4C,CAAvC","sourcesContent":["import type { TapGestureHandlerEventPayload } from './GestureHandlerEventPayload';\nimport createHandler from './createHandler';\nimport {\n BaseGestureHandlerProps,\n baseGestureHandlerProps,\n} from './gestureHandlerCommon';\n\nexport const tapGestureHandlerProps = [\n 'maxDurationMs',\n 'maxDelayMs',\n 'numberOfTaps',\n 'maxDeltaX',\n 'maxDeltaY',\n 'maxDist',\n 'minPointers',\n] as const;\n\nexport interface TapGestureConfig {\n /**\n * Minimum number of pointers (fingers) required to be placed before the\n * handler activates. Should be a positive integer.\n * The default value is 1.\n */\n minPointers?: number;\n\n /**\n * Maximum time, expressed in milliseconds, that defines how fast a finger\n * must be released after a touch. The default value is 500.\n */\n maxDurationMs?: number;\n\n /**\n * Maximum time, expressed in milliseconds, that can pass before the next tap\n * if many taps are required. The default value is 500.\n */\n maxDelayMs?: number;\n\n /**\n * Number of tap gestures required to activate the handler. The default value\n * is 1.\n */\n numberOfTaps?: number;\n\n /**\n * Maximum distance, expressed in points, that defines how far the finger is\n * allowed to travel along the X axis during a tap gesture. If the finger\n * travels further than the defined distance along the X axis and the handler\n * hasn't yet activated, it will fail to recognize the gesture.\n */\n maxDeltaX?: number;\n\n /**\n * Maximum distance, expressed in points, that defines how far the finger is\n * allowed to travel along the Y axis during a tap gesture. If the finger\n * travels further than the defined distance along the Y axis and the handler\n * hasn't yet activated, it will fail to recognize the gesture.\n */\n maxDeltaY?: number;\n\n /**\n * Maximum distance, expressed in points, that defines how far the finger is\n * allowed to travel during a tap gesture. If the finger travels further than\n * the defined distance and the handler hasn't yet\n * activated, it will fail to recognize the gesture.\n */\n maxDist?: number;\n}\n\n/**\n * @deprecated TapGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Tap()` instead.\n */\nexport interface TapGestureHandlerProps\n extends BaseGestureHandlerProps<TapGestureHandlerEventPayload>,\n TapGestureConfig {}\n\nexport const tapHandlerName = 'TapGestureHandler';\n\n/**\n * @deprecated TapGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Tap()` instead.\n */\nexport type TapGestureHandler = typeof TapGestureHandler;\n\n/**\n * @deprecated TapGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Tap()` instead.\n */\n// eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file\nexport const TapGestureHandler = createHandler<\n TapGestureHandlerProps,\n TapGestureHandlerEventPayload\n>({\n name: tapHandlerName,\n allowedProps: [\n ...baseGestureHandlerProps,\n ...tapGestureHandlerProps,\n ] as const,\n config: {\n shouldCancelWhenOutside: true,\n },\n});\n"]}
@@ -1,7 +1,7 @@
1
1
  var _UIManagerAny$getView, _UIManagerAny$getView2, _UIManagerAny$getCons;
2
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
3
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
4
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2
+
3
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
+
5
5
  import * as React from 'react';
6
6
  import { Platform, UIManager, DeviceEventEmitter } from 'react-native';
7
7
  import { customDirectEventTypes } from './customDirectEventTypes';
@@ -45,63 +45,66 @@ const customGHEventsConfig = {
45
45
  // Without this piece of code below, you'll get the following JS error:
46
46
  // Unsupported top level event type "topOnGestureHandlerEvent" dispatched
47
47
  ...(isFabric() && Platform.OS === 'android' && customGHEventsConfigFabricAndroid)
48
- };
49
-
50
- // Add gesture specific events to genericDirectEventTypes object exported from UIManager
48
+ }; // Add gesture specific events to genericDirectEventTypes object exported from UIManager
51
49
  // native module.
52
50
  // Once new event types are registered with react it is possible to dispatch these
53
51
  // events to all kind of native views.
54
- UIManagerAny.genericDirectEventTypes = {
55
- ...UIManagerAny.genericDirectEventTypes,
52
+
53
+ UIManagerAny.genericDirectEventTypes = { ...UIManagerAny.genericDirectEventTypes,
56
54
  ...customGHEventsConfig
57
- };
58
- // In newer versions of RN the `genericDirectEventTypes` is located in the object
55
+ }; // In newer versions of RN the `genericDirectEventTypes` is located in the object
59
56
  // returned by UIManager.getViewManagerConfig('getConstants') or in older RN UIManager.getConstants(), we need to add it there as well to make
60
57
  // it compatible with RN 61+
58
+
61
59
  const UIManagerConstants = (_UIManagerAny$getView = (_UIManagerAny$getView2 = UIManagerAny.getViewManagerConfig) === null || _UIManagerAny$getView2 === void 0 ? void 0 : _UIManagerAny$getView2.call(UIManagerAny, 'getConstants')) !== null && _UIManagerAny$getView !== void 0 ? _UIManagerAny$getView : (_UIManagerAny$getCons = UIManagerAny.getConstants) === null || _UIManagerAny$getCons === void 0 ? void 0 : _UIManagerAny$getCons.call(UIManagerAny);
60
+
62
61
  if (UIManagerConstants) {
63
- UIManagerConstants.genericDirectEventTypes = {
64
- ...UIManagerConstants.genericDirectEventTypes,
62
+ UIManagerConstants.genericDirectEventTypes = { ...UIManagerConstants.genericDirectEventTypes,
65
63
  ...customGHEventsConfig
66
64
  };
67
- }
65
+ } // Wrap JS responder calls and notify gesture handler manager
66
+
68
67
 
69
- // Wrap JS responder calls and notify gesture handler manager
70
68
  const {
71
- setJSResponder: oldSetJSResponder = () => {
72
- // no-op
69
+ setJSResponder: oldSetJSResponder = () => {// no-op
73
70
  },
74
- clearJSResponder: oldClearJSResponder = () => {
75
- // no-op
71
+ clearJSResponder: oldClearJSResponder = () => {// no-op
76
72
  }
77
73
  } = UIManagerAny;
74
+
78
75
  UIManagerAny.setJSResponder = (tag, blockNativeResponder) => {
79
76
  RNGestureHandlerModule.handleSetJSResponder(tag, blockNativeResponder);
80
77
  oldSetJSResponder(tag, blockNativeResponder);
81
78
  };
79
+
82
80
  UIManagerAny.clearJSResponder = () => {
83
81
  RNGestureHandlerModule.handleClearJSResponder();
84
82
  oldClearJSResponder();
85
83
  };
84
+
86
85
  let allowTouches = true;
87
- const DEV_ON_ANDROID = __DEV__ && Platform.OS === 'android';
88
- // Toggled inspector blocks touch events in order to allow inspecting on Android
86
+ const DEV_ON_ANDROID = __DEV__ && Platform.OS === 'android'; // Toggled inspector blocks touch events in order to allow inspecting on Android
89
87
  // This needs to be a global variable in order to set initial state for `allowTouches` property in Handler component
88
+
90
89
  if (DEV_ON_ANDROID) {
91
90
  DeviceEventEmitter.addListener('toggleElementInspector', () => {
92
91
  allowTouches = !allowTouches;
93
92
  });
94
93
  }
94
+
95
95
  function hasUnresolvedRefs(props) {
96
96
  // TODO(TS) - add type for extract arg
97
97
  const extract = refs => {
98
98
  if (!Array.isArray(refs)) {
99
99
  return refs && refs.current === null;
100
100
  }
101
+
101
102
  return refs.some(r => r && r.current === null);
102
103
  };
104
+
103
105
  return extract(props['simultaneousHandlers']) || extract(props['waitFor']);
104
106
  }
107
+
105
108
  const stateToPropMappings = {
106
109
  [State.UNDETERMINED]: undefined,
107
110
  [State.BEGAN]: 'onBegan',
@@ -110,12 +113,8 @@ const stateToPropMappings = {
110
113
  [State.ACTIVE]: 'onActivated',
111
114
  [State.END]: 'onEnded'
112
115
  };
116
+ const UNRESOLVED_REFS_RETRY_LIMIT = 1; // TODO(TS) - make sure that BaseGestureHandlerProps doesn't need other generic parameter to work with custom properties.
113
117
 
114
- // TODO(TS) fix event types
115
-
116
- const UNRESOLVED_REFS_RETRY_LIMIT = 1;
117
-
118
- // TODO(TS) - make sure that BaseGestureHandlerProps doesn't need other generic parameter to work with custom properties.
119
118
  export default function createHandler({
120
119
  name,
121
120
  allowedProps = [],
@@ -126,49 +125,65 @@ export default function createHandler({
126
125
  class Handler extends React.Component {
127
126
  constructor(props) {
128
127
  super(props);
128
+
129
129
  _defineProperty(this, "handlerTag", void 0);
130
+
130
131
  _defineProperty(this, "config", void 0);
132
+
131
133
  _defineProperty(this, "propsRef", void 0);
134
+
132
135
  _defineProperty(this, "isMountedRef", void 0);
136
+
133
137
  _defineProperty(this, "viewNode", void 0);
138
+
134
139
  _defineProperty(this, "viewTag", void 0);
140
+
135
141
  _defineProperty(this, "inspectorToggleListener", void 0);
142
+
136
143
  _defineProperty(this, "onGestureHandlerEvent", event => {
137
144
  if (event.nativeEvent.handlerTag === this.handlerTag) {
138
145
  if (typeof this.props.onGestureEvent === 'function') {
139
146
  var _this$props$onGesture, _this$props;
140
- (_this$props$onGesture = (_this$props = this.props).onGestureEvent) === null || _this$props$onGesture === void 0 || _this$props$onGesture.call(_this$props, event);
147
+
148
+ (_this$props$onGesture = (_this$props = this.props).onGestureEvent) === null || _this$props$onGesture === void 0 ? void 0 : _this$props$onGesture.call(_this$props, event);
141
149
  }
142
150
  } else {
143
151
  var _this$props$onGesture2, _this$props2;
144
- (_this$props$onGesture2 = (_this$props2 = this.props).onGestureHandlerEvent) === null || _this$props$onGesture2 === void 0 || _this$props$onGesture2.call(_this$props2, event);
152
+
153
+ (_this$props$onGesture2 = (_this$props2 = this.props).onGestureHandlerEvent) === null || _this$props$onGesture2 === void 0 ? void 0 : _this$props$onGesture2.call(_this$props2, event);
145
154
  }
146
155
  });
147
- // TODO(TS) - make sure this is right type for event
156
+
148
157
  _defineProperty(this, "onGestureHandlerStateChange", event => {
149
158
  if (event.nativeEvent.handlerTag === this.handlerTag) {
150
159
  if (typeof this.props.onHandlerStateChange === 'function') {
151
160
  var _this$props$onHandler, _this$props3;
152
- (_this$props$onHandler = (_this$props3 = this.props).onHandlerStateChange) === null || _this$props$onHandler === void 0 || _this$props$onHandler.call(_this$props3, event);
161
+
162
+ (_this$props$onHandler = (_this$props3 = this.props).onHandlerStateChange) === null || _this$props$onHandler === void 0 ? void 0 : _this$props$onHandler.call(_this$props3, event);
153
163
  }
164
+
154
165
  const state = event.nativeEvent.state;
155
166
  const stateEventName = stateToPropMappings[state];
156
167
  const eventHandler = stateEventName && this.props[stateEventName];
168
+
157
169
  if (eventHandler && typeof eventHandler === 'function') {
158
170
  eventHandler(event);
159
171
  }
160
172
  } else {
161
173
  var _this$props$onGesture3, _this$props4;
162
- (_this$props$onGesture3 = (_this$props4 = this.props).onGestureHandlerStateChange) === null || _this$props$onGesture3 === void 0 || _this$props$onGesture3.call(_this$props4, event);
174
+
175
+ (_this$props$onGesture3 = (_this$props4 = this.props).onGestureHandlerStateChange) === null || _this$props$onGesture3 === void 0 ? void 0 : _this$props$onGesture3.call(_this$props4, event);
163
176
  }
164
177
  });
178
+
165
179
  _defineProperty(this, "refHandler", node => {
166
180
  this.viewNode = node;
167
- const child = React.Children.only(this.props.children);
168
- // TODO(TS) fix ref type
181
+ const child = React.Children.only(this.props.children); // TODO(TS) fix ref type
182
+
169
183
  const {
170
184
  ref
171
185
  } = child;
186
+
172
187
  if (ref !== null) {
173
188
  if (typeof ref === 'function') {
174
189
  ref(node);
@@ -177,28 +192,34 @@ export default function createHandler({
177
192
  }
178
193
  }
179
194
  });
195
+
180
196
  _defineProperty(this, "createGestureHandler", newConfig => {
181
197
  this.config = newConfig;
182
198
  RNGestureHandlerModule.createGestureHandler(name, this.handlerTag, newConfig);
183
199
  });
200
+
184
201
  _defineProperty(this, "attachGestureHandler", newViewTag => {
185
202
  this.viewTag = newViewTag;
203
+
186
204
  if (Platform.OS === 'web') {
187
205
  // Typecast due to dynamic resolution, attachGestureHandler should have web version signature in this branch
188
- RNGestureHandlerModule.attachGestureHandler(this.handlerTag, newViewTag, ActionType.JS_FUNCTION_OLD_API,
189
- // ignored on web
206
+ RNGestureHandlerModule.attachGestureHandler(this.handlerTag, newViewTag, ActionType.JS_FUNCTION_OLD_API, // ignored on web
190
207
  this.propsRef);
191
208
  } else {
192
209
  registerOldGestureHandler(this.handlerTag, {
193
210
  onGestureEvent: this.onGestureHandlerEvent,
194
211
  onGestureStateChange: this.onGestureHandlerStateChange
195
212
  });
196
- const actionType = ((_this$props5, _this$props6) => {
213
+
214
+ const actionType = (() => {
215
+ var _this$props5, _this$props6;
216
+
197
217
  const onGestureEvent = (_this$props5 = this.props) === null || _this$props5 === void 0 ? void 0 : _this$props5.onGestureEvent;
198
218
  const isGestureHandlerWorklet = onGestureEvent && ('current' in onGestureEvent || 'workletEventHandler' in onGestureEvent);
199
219
  const onHandlerStateChange = (_this$props6 = this.props) === null || _this$props6 === void 0 ? void 0 : _this$props6.onHandlerStateChange;
200
220
  const isStateChangeHandlerWorklet = onHandlerStateChange && ('current' in onHandlerStateChange || 'workletEventHandler' in onHandlerStateChange);
201
221
  const isReanimatedHandler = isGestureHandlerWorklet || isStateChangeHandlerWorklet;
222
+
202
223
  if (isReanimatedHandler) {
203
224
  // Reanimated worklet
204
225
  return ActionType.REANIMATED_WORKLET;
@@ -210,18 +231,22 @@ export default function createHandler({
210
231
  return ActionType.JS_FUNCTION_OLD_API;
211
232
  }
212
233
  })();
234
+
213
235
  RNGestureHandlerModule.attachGestureHandler(this.handlerTag, newViewTag, actionType);
214
236
  }
237
+
215
238
  scheduleFlushOperations();
216
239
  ghQueueMicrotask(() => {
217
240
  MountRegistry.gestureHandlerWillMount(this);
218
241
  });
219
242
  });
243
+
220
244
  _defineProperty(this, "updateGestureHandler", newConfig => {
221
245
  this.config = newConfig;
222
246
  RNGestureHandlerModule.updateGestureHandler(this.handlerTag, newConfig);
223
247
  scheduleFlushOperations();
224
248
  });
249
+
225
250
  this.handlerTag = getNextHandlerTag();
226
251
  this.config = {};
227
252
  this.propsRef = /*#__PURE__*/React.createRef();
@@ -229,16 +254,20 @@ export default function createHandler({
229
254
  this.state = {
230
255
  allowTouches
231
256
  };
257
+
232
258
  if (props.id) {
233
259
  if (handlerIDToTag[props.id] !== undefined) {
234
260
  throw new Error(`Handler with ID "${props.id}" already registered`);
235
261
  }
262
+
236
263
  handlerIDToTag[props.id] = this.handlerTag;
237
264
  }
238
265
  }
266
+
239
267
  componentDidMount() {
240
268
  const props = this.props;
241
269
  this.isMountedRef.current = true;
270
+
242
271
  if (DEV_ON_ANDROID) {
243
272
  this.inspectorToggleListener = DeviceEventEmitter.addListener('toggleElementInspector', () => {
244
273
  this.setState(_ => ({
@@ -247,6 +276,7 @@ export default function createHandler({
247
276
  this.update(UNRESOLVED_REFS_RETRY_LIMIT);
248
277
  });
249
278
  }
279
+
250
280
  if (hasUnresolvedRefs(props)) {
251
281
  // If there are unresolved refs (e.g. ".current" has not yet been set)
252
282
  // passed as `simultaneousHandlers` or `waitFor`, we enqueue a call to
@@ -258,76 +288,93 @@ export default function createHandler({
258
288
  this.update(UNRESOLVED_REFS_RETRY_LIMIT);
259
289
  });
260
290
  }
291
+
261
292
  this.createGestureHandler(filterConfig(transformProps ? transformProps(this.props) : this.props, [...allowedProps, ...customNativeProps], config));
293
+
262
294
  if (!this.viewNode) {
263
295
  throw new Error(`[Gesture Handler] Failed to obtain view for ${Handler.displayName}. Note that old API doesn't support functional components.`);
264
296
  }
297
+
265
298
  this.attachGestureHandler(findNodeHandle(this.viewNode)); // TODO(TS) - check if this can be null
266
299
  }
300
+
267
301
  componentDidUpdate() {
268
302
  const viewTag = findNodeHandle(this.viewNode);
303
+
269
304
  if (this.viewTag !== viewTag) {
270
305
  this.attachGestureHandler(viewTag); // TODO(TS) - check interaction between _viewTag & findNodeHandle
271
306
  }
307
+
272
308
  this.update(UNRESOLVED_REFS_RETRY_LIMIT);
273
309
  }
310
+
274
311
  componentWillUnmount() {
275
312
  var _this$inspectorToggle;
276
- (_this$inspectorToggle = this.inspectorToggleListener) === null || _this$inspectorToggle === void 0 || _this$inspectorToggle.remove();
313
+
314
+ (_this$inspectorToggle = this.inspectorToggleListener) === null || _this$inspectorToggle === void 0 ? void 0 : _this$inspectorToggle.remove();
277
315
  this.isMountedRef.current = false;
316
+
278
317
  if (Platform.OS !== 'web') {
279
318
  unregisterOldGestureHandler(this.handlerTag);
280
319
  }
320
+
281
321
  RNGestureHandlerModule.dropGestureHandler(this.handlerTag);
282
- scheduleFlushOperations();
283
- // We can't use this.props.id directly due to TS generic type narrowing bug, see https://github.com/microsoft/TypeScript/issues/13995 for more context
322
+ scheduleFlushOperations(); // We can't use this.props.id directly due to TS generic type narrowing bug, see https://github.com/microsoft/TypeScript/issues/13995 for more context
323
+
284
324
  const handlerID = this.props.id;
325
+
285
326
  if (handlerID) {
286
327
  // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
287
328
  delete handlerIDToTag[handlerID];
288
329
  }
330
+
289
331
  MountRegistry.gestureHandlerWillUnmount(this);
290
332
  }
333
+
291
334
  update(remainingTries) {
292
335
  if (!this.isMountedRef.current) {
293
336
  return;
294
337
  }
295
- const props = this.props;
296
338
 
297
- // When ref is set via a function i.e. `ref={(r) => refObject.current = r}` instead of
339
+ const props = this.props; // When ref is set via a function i.e. `ref={(r) => refObject.current = r}` instead of
298
340
  // `ref={refObject}` it's possible that it won't be resolved in time. Seems like trying
299
341
  // again is easy enough fix.
342
+
300
343
  if (hasUnresolvedRefs(props) && remainingTries > 0) {
301
344
  ghQueueMicrotask(() => {
302
345
  this.update(remainingTries - 1);
303
346
  });
304
347
  } else {
305
348
  const newConfig = filterConfig(transformProps ? transformProps(this.props) : this.props, [...allowedProps, ...customNativeProps], config);
349
+
306
350
  if (!deepEqual(this.config, newConfig)) {
307
351
  this.updateGestureHandler(newConfig);
308
352
  }
309
353
  }
310
354
  }
355
+
311
356
  setNativeProps(updates) {
312
- const mergedProps = {
313
- ...this.props,
357
+ const mergedProps = { ...this.props,
314
358
  ...updates
315
359
  };
316
360
  const newConfig = filterConfig(transformProps ? transformProps(mergedProps) : mergedProps, [...allowedProps, ...customNativeProps], config);
317
361
  this.updateGestureHandler(newConfig);
318
362
  }
363
+
319
364
  render() {
320
365
  var _this$props$testID;
366
+
321
367
  if (__DEV__ && !this.context && !isTestEnv() && Platform.OS !== 'web') {
322
368
  throw new Error(name + ' must be used as a descendant of GestureHandlerRootView. Otherwise the gestures will not be recognized. See https://docs.swmansion.com/react-native-gesture-handler/docs/installation for more details.');
323
369
  }
324
- let gestureEventHandler = this.onGestureHandlerEvent;
325
- // Another instance of https://github.com/microsoft/TypeScript/issues/13995
370
+
371
+ let gestureEventHandler = this.onGestureHandlerEvent; // Another instance of https://github.com/microsoft/TypeScript/issues/13995
326
372
 
327
373
  const {
328
374
  onGestureEvent,
329
375
  onGestureHandlerEvent
330
376
  } = this.props;
377
+
331
378
  if (onGestureEvent && typeof onGestureEvent !== 'function') {
332
379
  // If it's not a method it should be an native Animated.event
333
380
  // object. We set it directly as the handler for the view
@@ -335,19 +382,21 @@ export default function createHandler({
335
382
  if (onGestureHandlerEvent) {
336
383
  throw new Error('Nesting touch handlers with native animated driver is not supported yet');
337
384
  }
385
+
338
386
  gestureEventHandler = onGestureEvent;
339
387
  } else {
340
388
  if (onGestureHandlerEvent && typeof onGestureHandlerEvent !== 'function') {
341
389
  throw new Error('Nesting touch handlers with native animated driver is not supported yet');
342
390
  }
343
391
  }
344
- let gestureStateEventHandler = this.onGestureHandlerStateChange;
345
- // Another instance of https://github.com/microsoft/TypeScript/issues/13995
392
+
393
+ let gestureStateEventHandler = this.onGestureHandlerStateChange; // Another instance of https://github.com/microsoft/TypeScript/issues/13995
346
394
 
347
395
  const {
348
396
  onHandlerStateChange,
349
397
  onGestureHandlerStateChange
350
398
  } = this.props;
399
+
351
400
  if (onHandlerStateChange && typeof onHandlerStateChange !== 'function') {
352
401
  // If it's not a method it should be an native Animated.event
353
402
  // object. We set it directly as the handler for the view
@@ -355,32 +404,38 @@ export default function createHandler({
355
404
  if (onGestureHandlerStateChange) {
356
405
  throw new Error('Nesting touch handlers with native animated driver is not supported yet');
357
406
  }
407
+
358
408
  gestureStateEventHandler = onHandlerStateChange;
359
409
  } else {
360
410
  if (onGestureHandlerStateChange && typeof onGestureHandlerStateChange !== 'function') {
361
411
  throw new Error('Nesting touch handlers with native animated driver is not supported yet');
362
412
  }
363
413
  }
414
+
364
415
  const events = {
365
416
  onGestureHandlerEvent: this.state.allowTouches ? gestureEventHandler : undefined,
366
417
  onGestureHandlerStateChange: this.state.allowTouches ? gestureStateEventHandler : undefined
367
418
  };
368
419
  this.propsRef.current = events;
369
420
  let child = null;
421
+
370
422
  try {
371
423
  child = React.Children.only(this.props.children);
372
424
  } catch (e) {
373
425
  throw new Error(tagMessage(`${name} got more than one view as a child. If you want the gesture to work on multiple views, wrap them with a common parent and attach the gesture to that view.`));
374
426
  }
427
+
375
428
  let grandChildren = child.props.children;
429
+
376
430
  if (__DEV__ && child.type && (child.type === 'RNGestureHandlerButton' || child.type.name === 'View' || child.type.displayName === 'View')) {
377
431
  grandChildren = React.Children.toArray(grandChildren);
378
- grandChildren.push(/*#__PURE__*/React.createElement(PressabilityDebugView, {
432
+ grandChildren.push( /*#__PURE__*/React.createElement(PressabilityDebugView, {
379
433
  key: "pressabilityDebugView",
380
434
  color: "mediumspringgreen",
381
435
  hitSlop: child.props.hitSlop
382
436
  }));
383
437
  }
438
+
384
439
  return /*#__PURE__*/React.cloneElement(child, {
385
440
  ref: this.refHandler,
386
441
  collapsable: false,
@@ -393,9 +448,13 @@ export default function createHandler({
393
448
  ...events
394
449
  }, grandChildren);
395
450
  }
451
+
396
452
  }
453
+
397
454
  _defineProperty(Handler, "displayName", name);
455
+
398
456
  _defineProperty(Handler, "contextType", GestureHandlerRootViewContext);
457
+
399
458
  return Handler;
400
459
  }
401
460
  //# sourceMappingURL=createHandler.js.map