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":["React","ScrollView","RNScrollView","Switch","RNSwitch","TextInput","RNTextInput","DrawerLayoutAndroid","RNDrawerLayoutAndroid","FlatList","RNFlatList","RefreshControl","RNRefreshControl","createNativeWrapper","nativeViewProps","toArray","disallowInterruption","shouldCancelWhenOutside","GHScrollView","forwardRef","props","ref","refreshControlGestureRef","useRef","refreshControl","waitFor","rest","createElement","_extends","cloneElement","undefined","shouldActivateOnStart","flatListProps","scrollViewProps","propName","value","Object","entries","includes","renderScrollComponent","scrollProps"],"sources":["GestureComponents.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n PropsWithChildren,\n ForwardedRef,\n RefAttributes,\n ReactElement,\n} from 'react';\nimport {\n ScrollView as RNScrollView,\n ScrollViewProps as RNScrollViewProps,\n Switch as RNSwitch,\n SwitchProps as RNSwitchProps,\n TextInput as RNTextInput,\n TextInputProps as RNTextInputProps,\n DrawerLayoutAndroid as RNDrawerLayoutAndroid,\n DrawerLayoutAndroidProps as RNDrawerLayoutAndroidProps,\n FlatList as RNFlatList,\n FlatListProps as RNFlatListProps,\n RefreshControl as RNRefreshControl,\n} from 'react-native';\n\nimport createNativeWrapper from '../handlers/createNativeWrapper';\n\nimport {\n NativeViewGestureHandlerProps,\n nativeViewProps,\n} from '../handlers/NativeViewGestureHandler';\n\nimport { toArray } from '../utils';\n\nexport const RefreshControl = createNativeWrapper(RNRefreshControl, {\n disallowInterruption: true,\n shouldCancelWhenOutside: false,\n});\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type RefreshControl = typeof RefreshControl & RNRefreshControl;\n\nconst GHScrollView = createNativeWrapper<PropsWithChildren<RNScrollViewProps>>(\n RNScrollView,\n {\n disallowInterruption: true,\n shouldCancelWhenOutside: false,\n }\n);\nexport const ScrollView = React.forwardRef<\n RNScrollView,\n RNScrollViewProps & NativeViewGestureHandlerProps\n>((props, ref) => {\n const refreshControlGestureRef = React.useRef<RefreshControl>(null);\n const { refreshControl, waitFor, ...rest } = props;\n\n return (\n <GHScrollView\n {...rest}\n // @ts-ignore `ref` exists on `GHScrollView`\n ref={ref}\n waitFor={[...toArray(waitFor ?? []), refreshControlGestureRef]}\n // @ts-ignore we don't pass `refreshing` prop as we only want to override the ref\n refreshControl={\n refreshControl\n ? React.cloneElement(refreshControl, {\n // @ts-ignore for reasons unknown to me, `ref` doesn't exist on the type inferred by TS\n ref: refreshControlGestureRef,\n })\n : undefined\n }\n />\n );\n});\n// Backward type compatibility with https://github.com/software-mansion/react-native-gesture-handler/blob/db78d3ca7d48e8ba57482d3fe9b0a15aa79d9932/react-native-gesture-handler.d.ts#L440-L457\n// include methods of wrapped components by creating an intersection type with the RN component instead of duplicating them.\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type ScrollView = typeof GHScrollView & RNScrollView;\n\nexport const Switch = createNativeWrapper<RNSwitchProps>(RNSwitch, {\n shouldCancelWhenOutside: false,\n shouldActivateOnStart: true,\n disallowInterruption: true,\n});\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type Switch = typeof Switch & RNSwitch;\n\nexport const TextInput = createNativeWrapper<RNTextInputProps>(RNTextInput);\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type TextInput = typeof TextInput & RNTextInput;\n\nexport const DrawerLayoutAndroid = createNativeWrapper<\n PropsWithChildren<RNDrawerLayoutAndroidProps>\n>(RNDrawerLayoutAndroid, { disallowInterruption: true });\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type DrawerLayoutAndroid = typeof DrawerLayoutAndroid &\n RNDrawerLayoutAndroid;\n\nexport const FlatList = React.forwardRef((props, ref) => {\n const refreshControlGestureRef = React.useRef<RefreshControl>(null);\n\n const { waitFor, refreshControl, ...rest } = props;\n\n const flatListProps = {};\n const scrollViewProps = {};\n for (const [propName, value] of Object.entries(rest)) {\n // https://github.com/microsoft/TypeScript/issues/26255\n if ((nativeViewProps as readonly string[]).includes(propName)) {\n // @ts-ignore - this function cannot have generic type so we have to ignore this error\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n scrollViewProps[propName] = value;\n } else {\n // @ts-ignore - this function cannot have generic type so we have to ignore this error\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n flatListProps[propName] = value;\n }\n }\n\n return (\n // @ts-ignore - this function cannot have generic type so we have to ignore this error\n <RNFlatList\n ref={ref}\n {...flatListProps}\n renderScrollComponent={(scrollProps) => (\n <ScrollView\n {...{\n ...scrollProps,\n ...scrollViewProps,\n waitFor: [...toArray(waitFor ?? []), refreshControlGestureRef],\n }}\n />\n )}\n // @ts-ignore we don't pass `refreshing` prop as we only want to override the ref\n refreshControl={\n refreshControl\n ? React.cloneElement(refreshControl, {\n // @ts-ignore for reasons unknown to me, `ref` doesn't exist on the type inferred by TS\n ref: refreshControlGestureRef,\n })\n : undefined\n }\n />\n );\n}) as <ItemT = any>(\n props: PropsWithChildren<\n Omit<RNFlatListProps<ItemT>, 'renderScrollComponent'> &\n RefAttributes<FlatList<ItemT>> &\n NativeViewGestureHandlerProps\n >,\n ref: ForwardedRef<FlatList<ItemT>>\n) => ReactElement | null;\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type FlatList<ItemT = any> = typeof FlatList & RNFlatList<ItemT>;\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAO9B,SACEC,UAAU,IAAIC,YAAY,EAE1BC,MAAM,IAAIC,QAAQ,EAElBC,SAAS,IAAIC,WAAW,EAExBC,mBAAmB,IAAIC,qBAAqB,EAE5CC,QAAQ,IAAIC,UAAU,EAEtBC,cAAc,IAAIC,gBAAgB,QAC7B,cAAc;AAErB,OAAOC,mBAAmB,MAAM,iCAAiC;AAEjE,SAEEC,eAAe,QACV,sCAAsC;AAE7C,SAASC,OAAO,QAAQ,UAAU;AAElC,OAAO,MAAMJ,cAAc,GAAGE,mBAAmB,CAACD,gBAAgB,EAAE;EAClEI,oBAAoB,EAAE,IAAI;EAC1BC,uBAAuB,EAAE;AAC3B,CAAC,CAAC;AACF;;AAGA,MAAMC,YAAY,GAAGL,mBAAmB,CACtCX,YAAY,EACZ;EACEc,oBAAoB,EAAE,IAAI;EAC1BC,uBAAuB,EAAE;AAC3B,CACF,CAAC;AACD,OAAO,MAAMhB,UAAU,gBAAGD,KAAK,CAACmB,UAAU,CAGxC,CAACC,KAAK,EAAEC,GAAG,KAAK;EAChB,MAAMC,wBAAwB,GAAGtB,KAAK,CAACuB,MAAM,CAAiB,IAAI,CAAC;EACnE,MAAM;IAAEC,cAAc;IAAEC,OAAO;IAAE,GAAGC;EAAK,CAAC,GAAGN,KAAK;EAElD,oBACEpB,KAAA,CAAA2B,aAAA,CAACT,YA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AAGC,KAAK;IACnC,CAAC,MAAM;MACL;MACA;MACAH,aAAa,CAACE,QAAQ,CAAC,GAAGC,KAAK;IACjC;EACF;EAEA;IAAA;IACE;IACAnC,KAAA,CAAA2B,aAAA,CAACjB,UAAU,EAAAkB,QAAA;MACTP,GAAG,EAAEA;IAAI,GACLW,aAAa;MACjBO,qBAAqB,EAAGC,WAAW,iBACjCxC,KAAA,CAAA2B,aAAA,CAAC1B,UAAU,EAAA2B,QAAA,KAEJY,WAAW,EACXP,eAAe;QAClBR,OAAO,EAAE,CAAC,GAAGV,OAAO,CAACU,OAAO,aAAPA,OAAO,cAAPA,OAAO,GAAI,EAAE,CAAC,EAAEH,wBAAwB;MAAC,EAEjE;MAEH;MAAA;MACAE,cAAc,EACZA,cAAc,gBACVxB,KAAK,CAAC6B,YAAY,CAACL,cAAc,EAAE;QACjC;QACAH,GAAG,EAAEC;MACP,CAAC,CAAC,GACFQ;IACL,EACF;EAAC;AAEN,CAAC,CAOuB;AACxB","ignoreList":[]}
1
+ {"version":3,"sources":["GestureComponents.tsx"],"names":["React","ScrollView","RNScrollView","Switch","RNSwitch","TextInput","RNTextInput","DrawerLayoutAndroid","RNDrawerLayoutAndroid","FlatList","RNFlatList","RefreshControl","RNRefreshControl","createNativeWrapper","nativeViewProps","toArray","disallowInterruption","shouldCancelWhenOutside","GHScrollView","forwardRef","props","ref","refreshControlGestureRef","useRef","refreshControl","waitFor","rest","cloneElement","undefined","shouldActivateOnStart","flatListProps","scrollViewProps","propName","value","Object","entries","includes","scrollProps"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAOA,SACEC,UAAU,IAAIC,YADhB,EAGEC,MAAM,IAAIC,QAHZ,EAKEC,SAAS,IAAIC,WALf,EAOEC,mBAAmB,IAAIC,qBAPzB,EASEC,QAAQ,IAAIC,UATd,EAWEC,cAAc,IAAIC,gBAXpB,QAYO,cAZP;AAcA,OAAOC,mBAAP,MAAgC,iCAAhC;AAEA,SAEEC,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EC;AAF4B,OAAnC,CADU,GAKVM;AAnBR;AAFF;AAyBD,CA7CuB,CAAjB,C,CAqDP","sourcesContent":["import * as React from 'react';\nimport {\n PropsWithChildren,\n ForwardedRef,\n RefAttributes,\n ReactElement,\n} from 'react';\nimport {\n ScrollView as RNScrollView,\n ScrollViewProps as RNScrollViewProps,\n Switch as RNSwitch,\n SwitchProps as RNSwitchProps,\n TextInput as RNTextInput,\n TextInputProps as RNTextInputProps,\n DrawerLayoutAndroid as RNDrawerLayoutAndroid,\n DrawerLayoutAndroidProps as RNDrawerLayoutAndroidProps,\n FlatList as RNFlatList,\n FlatListProps as RNFlatListProps,\n RefreshControl as RNRefreshControl,\n} from 'react-native';\n\nimport createNativeWrapper from '../handlers/createNativeWrapper';\n\nimport {\n NativeViewGestureHandlerProps,\n nativeViewProps,\n} from '../handlers/NativeViewGestureHandler';\n\nimport { toArray } from '../utils';\n\nexport const RefreshControl = createNativeWrapper(RNRefreshControl, {\n disallowInterruption: true,\n shouldCancelWhenOutside: false,\n});\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type RefreshControl = typeof RefreshControl & RNRefreshControl;\n\nconst GHScrollView = createNativeWrapper<PropsWithChildren<RNScrollViewProps>>(\n RNScrollView,\n {\n disallowInterruption: true,\n shouldCancelWhenOutside: false,\n }\n);\nexport const ScrollView = React.forwardRef<\n RNScrollView,\n RNScrollViewProps & NativeViewGestureHandlerProps\n>((props, ref) => {\n const refreshControlGestureRef = React.useRef<RefreshControl>(null);\n const { refreshControl, waitFor, ...rest } = props;\n\n return (\n <GHScrollView\n {...rest}\n // @ts-ignore `ref` exists on `GHScrollView`\n ref={ref}\n waitFor={[...toArray(waitFor ?? []), refreshControlGestureRef]}\n // @ts-ignore we don't pass `refreshing` prop as we only want to override the ref\n refreshControl={\n refreshControl\n ? React.cloneElement(refreshControl, {\n // @ts-ignore for reasons unknown to me, `ref` doesn't exist on the type inferred by TS\n ref: refreshControlGestureRef,\n })\n : undefined\n }\n />\n );\n});\n// Backward type compatibility with https://github.com/software-mansion/react-native-gesture-handler/blob/db78d3ca7d48e8ba57482d3fe9b0a15aa79d9932/react-native-gesture-handler.d.ts#L440-L457\n// include methods of wrapped components by creating an intersection type with the RN component instead of duplicating them.\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type ScrollView = typeof GHScrollView & RNScrollView;\n\nexport const Switch = createNativeWrapper<RNSwitchProps>(RNSwitch, {\n shouldCancelWhenOutside: false,\n shouldActivateOnStart: true,\n disallowInterruption: true,\n});\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type Switch = typeof Switch & RNSwitch;\n\nexport const TextInput = createNativeWrapper<RNTextInputProps>(RNTextInput);\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type TextInput = typeof TextInput & RNTextInput;\n\nexport const DrawerLayoutAndroid = createNativeWrapper<\n PropsWithChildren<RNDrawerLayoutAndroidProps>\n>(RNDrawerLayoutAndroid, { disallowInterruption: true });\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type DrawerLayoutAndroid = typeof DrawerLayoutAndroid &\n RNDrawerLayoutAndroid;\n\nexport const FlatList = React.forwardRef((props, ref) => {\n const refreshControlGestureRef = React.useRef<RefreshControl>(null);\n\n const { waitFor, refreshControl, ...rest } = props;\n\n const flatListProps = {};\n const scrollViewProps = {};\n for (const [propName, value] of Object.entries(rest)) {\n // https://github.com/microsoft/TypeScript/issues/26255\n if ((nativeViewProps as readonly string[]).includes(propName)) {\n // @ts-ignore - this function cannot have generic type so we have to ignore this error\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n scrollViewProps[propName] = value;\n } else {\n // @ts-ignore - this function cannot have generic type so we have to ignore this error\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n flatListProps[propName] = value;\n }\n }\n\n return (\n // @ts-ignore - this function cannot have generic type so we have to ignore this error\n <RNFlatList\n ref={ref}\n {...flatListProps}\n renderScrollComponent={(scrollProps) => (\n <ScrollView\n {...{\n ...scrollProps,\n ...scrollViewProps,\n waitFor: [...toArray(waitFor ?? []), refreshControlGestureRef],\n }}\n />\n )}\n // @ts-ignore we don't pass `refreshing` prop as we only want to override the ref\n refreshControl={\n refreshControl\n ? React.cloneElement(refreshControl, {\n // @ts-ignore for reasons unknown to me, `ref` doesn't exist on the type inferred by TS\n ref: refreshControlGestureRef,\n })\n : undefined\n }\n />\n );\n}) as <ItemT = any>(\n props: PropsWithChildren<\n Omit<RNFlatListProps<ItemT>, 'renderScrollComponent'> &\n RefAttributes<FlatList<ItemT>> &\n NativeViewGestureHandlerProps\n >,\n ref: ForwardedRef<FlatList<ItemT>>\n) => ReactElement | null;\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type FlatList<ItemT = any> = typeof FlatList & RNFlatList<ItemT>;\n"]}
@@ -1,4 +1,5 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
1
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
2
3
  import * as React from 'react';
3
4
  import { FlatList as RNFlatList, Switch as RNSwitch, TextInput as RNTextInput, ScrollView as RNScrollView, View } from 'react-native';
4
5
  import createNativeWrapper from '../handlers/createNativeWrapper';
@@ -14,11 +15,10 @@ export const TextInput = createNativeWrapper(RNTextInput);
14
15
  export const DrawerLayoutAndroid = () => {
15
16
  console.warn('DrawerLayoutAndroid is not supported on web!');
16
17
  return /*#__PURE__*/React.createElement(View, null);
17
- };
18
-
19
- // RefreshControl is implemented as a functional component, rendering a View
18
+ }; // RefreshControl is implemented as a functional component, rendering a View
20
19
  // NativeViewGestureHandler needs to set a ref on its child, which cannot be done
21
20
  // on functional components
21
+
22
22
  export const RefreshControl = createNativeWrapper(View);
23
23
  export const FlatList = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(RNFlatList, _extends({
24
24
  ref: ref
@@ -1 +1 @@
1
- {"version":3,"names":["React","FlatList","RNFlatList","Switch","RNSwitch","TextInput","RNTextInput","ScrollView","RNScrollView","View","createNativeWrapper","disallowInterruption","shouldCancelWhenOutside","shouldActivateOnStart","DrawerLayoutAndroid","console","warn","createElement","RefreshControl","forwardRef","props","ref","_extends","renderScrollComponent","scrollProps"],"sources":["GestureComponents.web.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n FlatList as RNFlatList,\n Switch as RNSwitch,\n TextInput as RNTextInput,\n ScrollView as RNScrollView,\n FlatListProps,\n View,\n} from 'react-native';\n\nimport createNativeWrapper from '../handlers/createNativeWrapper';\n\nexport const ScrollView = createNativeWrapper(RNScrollView, {\n disallowInterruption: false,\n});\n\nexport const Switch = createNativeWrapper(RNSwitch, {\n shouldCancelWhenOutside: false,\n shouldActivateOnStart: true,\n disallowInterruption: true,\n});\nexport const TextInput = createNativeWrapper(RNTextInput);\nexport const DrawerLayoutAndroid = () => {\n console.warn('DrawerLayoutAndroid is not supported on web!');\n return <View />;\n};\n\n// RefreshControl is implemented as a functional component, rendering a View\n// NativeViewGestureHandler needs to set a ref on its child, which cannot be done\n// on functional components\nexport const RefreshControl = createNativeWrapper(View);\n\nexport const FlatList = React.forwardRef(\n <ItemT extends any>(props: FlatListProps<ItemT>, ref: any) => (\n <RNFlatList\n ref={ref}\n {...props}\n renderScrollComponent={(scrollProps) => <ScrollView {...scrollProps} />}\n />\n )\n);\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,QAAQ,IAAIC,UAAU,EACtBC,MAAM,IAAIC,QAAQ,EAClBC,SAAS,IAAIC,WAAW,EACxBC,UAAU,IAAIC,YAAY,EAE1BC,IAAI,QACC,cAAc;AAErB,OAAOC,mBAAmB,MAAM,iCAAiC;AAEjE,OAAO,MAAMH,UAAU,GAAGG,mBAAmB,CAACF,YAAY,EAAE;EAC1DG,oBAAoB,EAAE;AACxB,CAAC,CAAC;AAEF,OAAO,MAAMR,MAAM,GAAGO,mBAAmB,CAACN,QAAQ,EAAE;EAClDQ,uBAAuB,EAAE,KAAK;EAC9BC,qBAAqB,EAAE,IAAI;EAC3BF,oBAAoB,EAAE;AACxB,CAAC,CAAC;AACF,OAAO,MAAMN,SAAS,GAAGK,mBAAmB,CAACJ,WAAW,CAAC;AACzD,OAAO,MAAMQ,mBAAmB,GAAGA,CAAA,KAAM;EACvCC,OAAO,CAACC,IAAI,CAAC,8CAA8C,CAAC;EAC5D,oBAAOhB,KAAA,CAAAiB,aAAA,CAACR,IAAI,MAAE,CAAC;AACjB,CAAC;;AAED;AACA;AACA;AACA,OAAO,MAAMS,cAAc,GAAGR,mBAAmB,CAACD,IAAI,CAAC;AAEvD,OAAO,MAAMR,QAAQ,gBAAGD,KAAK,CAACmB,UAAU,CACtC,CAAoBC,KAA2B,EAAEC,GAAQ,kBACvDrB,KAAA,CAAAiB,aAAA,CAACf,UAAU,EAAAoB,QAAA;EACTD,GAAG,EAAEA;AAAI,GACLD,KAAK;EACTG,qBAAqB,EAAGC,WAAW,iBAAKxB,KAAA,CAAAiB,aAAA,CAACV,UAAU,EAAKiB,WAAc;AAAE,EACzE,CAEL,CAAC","ignoreList":[]}
1
+ {"version":3,"sources":["GestureComponents.web.tsx"],"names":["React","FlatList","RNFlatList","Switch","RNSwitch","TextInput","RNTextInput","ScrollView","RNScrollView","View","createNativeWrapper","disallowInterruption","shouldCancelWhenOutside","shouldActivateOnStart","DrawerLayoutAndroid","console","warn","RefreshControl","forwardRef","props","ref","scrollProps"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,QAAQ,IAAIC,UADd,EAEEC,MAAM,IAAIC,QAFZ,EAGEC,SAAS,IAAIC,WAHf,EAIEC,UAAU,IAAIC,YAJhB,EAMEC,IANF,QAOO,cAPP;AASA,OAAOC,mBAAP,MAAgC,iCAAhC;AAEA,OAAO,MAAMH,UAAU,GAAGG,mBAAmB,CAACF,YAAD,EAAe;AAC1DG,EAAAA,oBAAoB,EAAE;AADoC,CAAf,CAAtC;AAIP,OAAO,MAAMR,MAAM,GAAGO,mBAAmB,CAACN,QAAD,EAAW;AAClDQ,EAAAA,uBAAuB,EAAE,KADyB;AAElDC,EAAAA,qBAAqB,EAAE,IAF2B;AAGlDF,EAAAA,oBAAoB,EAAE;AAH4B,CAAX,CAAlC;AAKP,OAAO,MAAMN,SAAS,GAAGK,mBAAmB,CAACJ,WAAD,CAArC;AACP,OAAO,MAAMQ,mBAAmB,GAAG,MAAM;AACvCC,EAAAA,OAAO,CAACC,IAAR,CAAa,8CAAb;AACA,sBAAO,oBAAC,IAAD,OAAP;AACD,CAHM,C,CAKP;AACA;AACA;;AACA,OAAO,MAAMC,cAAc,GAAGP,mBAAmB,CAACD,IAAD,CAA1C;AAEP,OAAO,MAAMR,QAAQ,gBAAGD,KAAK,CAACkB,UAAN,CACtB,CAAoBC,KAApB,EAAiDC,GAAjD,kBACE,oBAAC,UAAD;AACE,EAAA,GAAG,EAAEA;AADP,GAEMD,KAFN;AAGE,EAAA,qBAAqB,EAAGE,WAAD,iBAAiB,oBAAC,UAAD,EAAgBA,WAAhB;AAH1C,GAFoB,CAAjB","sourcesContent":["import * as React from 'react';\nimport {\n FlatList as RNFlatList,\n Switch as RNSwitch,\n TextInput as RNTextInput,\n ScrollView as RNScrollView,\n FlatListProps,\n View,\n} from 'react-native';\n\nimport createNativeWrapper from '../handlers/createNativeWrapper';\n\nexport const ScrollView = createNativeWrapper(RNScrollView, {\n disallowInterruption: false,\n});\n\nexport const Switch = createNativeWrapper(RNSwitch, {\n shouldCancelWhenOutside: false,\n shouldActivateOnStart: true,\n disallowInterruption: true,\n});\nexport const TextInput = createNativeWrapper(RNTextInput);\nexport const DrawerLayoutAndroid = () => {\n console.warn('DrawerLayoutAndroid is not supported on web!');\n return <View />;\n};\n\n// RefreshControl is implemented as a functional component, rendering a View\n// NativeViewGestureHandler needs to set a ref on its child, which cannot be done\n// on functional components\nexport const RefreshControl = createNativeWrapper(View);\n\nexport const FlatList = React.forwardRef(\n <ItemT extends any>(props: FlatListProps<ItemT>, ref: any) => (\n <RNFlatList\n ref={ref}\n {...props}\n renderScrollComponent={(scrollProps) => <ScrollView {...scrollProps} />}\n />\n )\n);\n"]}
@@ -1 +1 @@
1
- {"version":3,"names":["RNGestureHandlerButtonNativeComponent"],"sources":["GestureHandlerButton.tsx"],"sourcesContent":["import { HostComponent } from 'react-native';\nimport type { RawButtonProps } from './GestureButtonsProps';\nimport RNGestureHandlerButtonNativeComponent from '../specs/RNGestureHandlerButtonNativeComponent';\n\nexport default RNGestureHandlerButtonNativeComponent as HostComponent<RawButtonProps>;\n"],"mappings":"AAEA,OAAOA,qCAAqC,MAAM,gDAAgD;AAElG,eAAeA,qCAAqC","ignoreList":[]}
1
+ {"version":3,"sources":["GestureHandlerButton.tsx"],"names":["RNGestureHandlerButtonNativeComponent"],"mappings":"AAEA,OAAOA,qCAAP,MAAkD,gDAAlD;AAEA,eAAeA,qCAAf","sourcesContent":["import { HostComponent } from 'react-native';\nimport type { RawButtonProps } from './GestureButtonsProps';\nimport RNGestureHandlerButtonNativeComponent from '../specs/RNGestureHandlerButtonNativeComponent';\n\nexport default RNGestureHandlerButtonNativeComponent as HostComponent<RawButtonProps>;\n"]}
@@ -1,4 +1,5 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
1
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
2
3
  import * as React from 'react';
3
4
  import { View } from 'react-native';
4
5
  export default /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(View, _extends({
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","forwardRef","props","ref","createElement","_extends","accessibilityRole"],"sources":["GestureHandlerButton.web.tsx"],"sourcesContent":["import * as React from 'react';\nimport { View } from 'react-native';\n\nexport default React.forwardRef<View>((props, ref) => (\n <View ref={ref} accessibilityRole=\"button\" {...props} />\n));\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,IAAI,QAAQ,cAAc;AAEnC,4BAAeD,KAAK,CAACE,UAAU,CAAO,CAACC,KAAK,EAAEC,GAAG,kBAC/CJ,KAAA,CAAAK,aAAA,CAACJ,IAAI,EAAAK,QAAA;EAACF,GAAG,EAAEA,GAAI;EAACG,iBAAiB,EAAC;AAAQ,GAAKJ,KAAK,CAAG,CACxD,CAAC","ignoreList":[]}
1
+ {"version":3,"sources":["GestureHandlerButton.web.tsx"],"names":["React","View","forwardRef","props","ref"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,IAAT,QAAqB,cAArB;AAEA,4BAAeD,KAAK,CAACE,UAAN,CAAuB,CAACC,KAAD,EAAQC,GAAR,kBACpC,oBAAC,IAAD;AAAM,EAAA,GAAG,EAAEA,GAAX;AAAgB,EAAA,iBAAiB,EAAC;AAAlC,GAA+CD,KAA/C,EADa,CAAf","sourcesContent":["import * as React from 'react';\nimport { View } from 'react-native';\n\nexport default React.forwardRef<View>((props, ref) => (\n <View ref={ref} accessibilityRole=\"button\" {...props} />\n));\n"]}
@@ -1,4 +1,5 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
1
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
2
3
  import * as React from 'react';
3
4
  import { StyleSheet } from 'react-native';
4
5
  import { maybeInitializeFabric } from '../init';
@@ -1 +1 @@
1
- {"version":3,"names":["React","StyleSheet","maybeInitializeFabric","GestureHandlerRootViewContext","GestureHandlerRootViewNativeComponent","GestureHandlerRootView","style","rest","createElement","Provider","value","_extends","styles","container","create","flex"],"sources":["GestureHandlerRootView.android.tsx"],"sourcesContent":["import * as React from 'react';\nimport { PropsWithChildren } from 'react';\nimport { ViewProps, StyleSheet } from 'react-native';\nimport { maybeInitializeFabric } from '../init';\nimport GestureHandlerRootViewContext from '../GestureHandlerRootViewContext';\nimport GestureHandlerRootViewNativeComponent from '../specs/RNGestureHandlerRootViewNativeComponent';\n\nexport interface GestureHandlerRootViewProps\n extends PropsWithChildren<ViewProps> {}\n\nexport default function GestureHandlerRootView({\n style,\n ...rest\n}: GestureHandlerRootViewProps) {\n // Try initialize fabric on the first render, at this point we can\n // reliably check if fabric is enabled (the function contains a flag\n // to make sure it's called only once)\n maybeInitializeFabric();\n\n return (\n <GestureHandlerRootViewContext.Provider value>\n <GestureHandlerRootViewNativeComponent\n style={style ?? styles.container}\n {...rest}\n />\n </GestureHandlerRootViewContext.Provider>\n );\n}\n\nconst styles = StyleSheet.create({\n container: { flex: 1 },\n});\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAAoBC,UAAU,QAAQ,cAAc;AACpD,SAASC,qBAAqB,QAAQ,SAAS;AAC/C,OAAOC,6BAA6B,MAAM,kCAAkC;AAC5E,OAAOC,qCAAqC,MAAM,kDAAkD;AAKpG,eAAe,SAASC,sBAAsBA,CAAC;EAC7CC,KAAK;EACL,GAAGC;AACwB,CAAC,EAAE;EAC9B;EACA;EACA;EACAL,qBAAqB,CAAC,CAAC;EAEvB,oBACEF,KAAA,CAAAQ,aAAA,CAACL,6BAA6B,CAACM,QAAQ;IAACC,KAAK;EAAA,gBAC3CV,KAAA,CAAAQ,aAAA,CAACJ,qCAAqC,EAAAO,QAAA;IACpCL,KAAK,EAAEA,KAAK,aAALA,KAAK,cAALA,KAAK,GAAIM,MAAM,CAACC;EAAU,GAC7BN,IAAI,CACT,CACqC,CAAC;AAE7C;AAEA,MAAMK,MAAM,GAAGX,UAAU,CAACa,MAAM,CAAC;EAC/BD,SAAS,EAAE;IAAEE,IAAI,EAAE;EAAE;AACvB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"sources":["GestureHandlerRootView.android.tsx"],"names":["React","StyleSheet","maybeInitializeFabric","GestureHandlerRootViewContext","GestureHandlerRootViewNativeComponent","GestureHandlerRootView","style","rest","styles","container","create","flex"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAEA,SAAoBC,UAApB,QAAsC,cAAtC;AACA,SAASC,qBAAT,QAAsC,SAAtC;AACA,OAAOC,6BAAP,MAA0C,kCAA1C;AACA,OAAOC,qCAAP,MAAkD,kDAAlD;AAKA,eAAe,SAASC,sBAAT,CAAgC;AAC7CC,EAAAA,KAD6C;AAE7C,KAAGC;AAF0C,CAAhC,EAGiB;AAC9B;AACA;AACA;AACAL,EAAAA,qBAAqB;AAErB,sBACE,oBAAC,6BAAD,CAA+B,QAA/B;AAAwC,IAAA,KAAK;AAA7C,kBACE,oBAAC,qCAAD;AACE,IAAA,KAAK,EAAEI,KAAF,aAAEA,KAAF,cAAEA,KAAF,GAAWE,MAAM,CAACC;AADzB,KAEMF,IAFN,EADF,CADF;AAQD;AAED,MAAMC,MAAM,GAAGP,UAAU,CAACS,MAAX,CAAkB;AAC/BD,EAAAA,SAAS,EAAE;AAAEE,IAAAA,IAAI,EAAE;AAAR;AADoB,CAAlB,CAAf","sourcesContent":["import * as React from 'react';\nimport { PropsWithChildren } from 'react';\nimport { ViewProps, StyleSheet } from 'react-native';\nimport { maybeInitializeFabric } from '../init';\nimport GestureHandlerRootViewContext from '../GestureHandlerRootViewContext';\nimport GestureHandlerRootViewNativeComponent from '../specs/RNGestureHandlerRootViewNativeComponent';\n\nexport interface GestureHandlerRootViewProps\n extends PropsWithChildren<ViewProps> {}\n\nexport default function GestureHandlerRootView({\n style,\n ...rest\n}: GestureHandlerRootViewProps) {\n // Try initialize fabric on the first render, at this point we can\n // reliably check if fabric is enabled (the function contains a flag\n // to make sure it's called only once)\n maybeInitializeFabric();\n\n return (\n <GestureHandlerRootViewContext.Provider value>\n <GestureHandlerRootViewNativeComponent\n style={style ?? styles.container}\n {...rest}\n />\n </GestureHandlerRootViewContext.Provider>\n );\n}\n\nconst styles = StyleSheet.create({\n container: { flex: 1 },\n});\n"]}
@@ -1,4 +1,5 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
1
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
2
3
  import * as React from 'react';
3
4
  import { View, StyleSheet } from 'react-native';
4
5
  import { maybeInitializeFabric } from '../init';
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","StyleSheet","maybeInitializeFabric","GestureHandlerRootViewContext","GestureHandlerRootView","style","rest","createElement","Provider","value","_extends","styles","container","create","flex"],"sources":["GestureHandlerRootView.tsx"],"sourcesContent":["import * as React from 'react';\nimport { PropsWithChildren } from 'react';\nimport { View, ViewProps, StyleSheet } from 'react-native';\nimport { maybeInitializeFabric } from '../init';\nimport GestureHandlerRootViewContext from '../GestureHandlerRootViewContext';\n\nexport interface GestureHandlerRootViewProps\n extends PropsWithChildren<ViewProps> {}\n\nexport default function GestureHandlerRootView({\n style,\n ...rest\n}: GestureHandlerRootViewProps) {\n // Try initialize fabric on the first render, at this point we can\n // reliably check if fabric is enabled (the function contains a flag\n // to make sure it's called only once)\n maybeInitializeFabric();\n\n return (\n <GestureHandlerRootViewContext.Provider value>\n <View style={style ?? styles.container} {...rest} />\n </GestureHandlerRootViewContext.Provider>\n );\n}\n\nconst styles = StyleSheet.create({\n container: { flex: 1 },\n});\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,IAAI,EAAaC,UAAU,QAAQ,cAAc;AAC1D,SAASC,qBAAqB,QAAQ,SAAS;AAC/C,OAAOC,6BAA6B,MAAM,kCAAkC;AAK5E,eAAe,SAASC,sBAAsBA,CAAC;EAC7CC,KAAK;EACL,GAAGC;AACwB,CAAC,EAAE;EAC9B;EACA;EACA;EACAJ,qBAAqB,CAAC,CAAC;EAEvB,oBACEH,KAAA,CAAAQ,aAAA,CAACJ,6BAA6B,CAACK,QAAQ;IAACC,KAAK;EAAA,gBAC3CV,KAAA,CAAAQ,aAAA,CAACP,IAAI,EAAAU,QAAA;IAACL,KAAK,EAAEA,KAAK,aAALA,KAAK,cAALA,KAAK,GAAIM,MAAM,CAACC;EAAU,GAAKN,IAAI,CAAG,CACb,CAAC;AAE7C;AAEA,MAAMK,MAAM,GAAGV,UAAU,CAACY,MAAM,CAAC;EAC/BD,SAAS,EAAE;IAAEE,IAAI,EAAE;EAAE;AACvB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"sources":["GestureHandlerRootView.tsx"],"names":["React","View","StyleSheet","maybeInitializeFabric","GestureHandlerRootViewContext","GestureHandlerRootView","style","rest","styles","container","create","flex"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAEA,SAASC,IAAT,EAA0BC,UAA1B,QAA4C,cAA5C;AACA,SAASC,qBAAT,QAAsC,SAAtC;AACA,OAAOC,6BAAP,MAA0C,kCAA1C;AAKA,eAAe,SAASC,sBAAT,CAAgC;AAC7CC,EAAAA,KAD6C;AAE7C,KAAGC;AAF0C,CAAhC,EAGiB;AAC9B;AACA;AACA;AACAJ,EAAAA,qBAAqB;AAErB,sBACE,oBAAC,6BAAD,CAA+B,QAA/B;AAAwC,IAAA,KAAK;AAA7C,kBACE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAEG,KAAF,aAAEA,KAAF,cAAEA,KAAF,GAAWE,MAAM,CAACC;AAA7B,KAA4CF,IAA5C,EADF,CADF;AAKD;AAED,MAAMC,MAAM,GAAGN,UAAU,CAACQ,MAAX,CAAkB;AAC/BD,EAAAA,SAAS,EAAE;AAAEE,IAAAA,IAAI,EAAE;AAAR;AADoB,CAAlB,CAAf","sourcesContent":["import * as React from 'react';\nimport { PropsWithChildren } from 'react';\nimport { View, ViewProps, StyleSheet } from 'react-native';\nimport { maybeInitializeFabric } from '../init';\nimport GestureHandlerRootViewContext from '../GestureHandlerRootViewContext';\n\nexport interface GestureHandlerRootViewProps\n extends PropsWithChildren<ViewProps> {}\n\nexport default function GestureHandlerRootView({\n style,\n ...rest\n}: GestureHandlerRootViewProps) {\n // Try initialize fabric on the first render, at this point we can\n // reliably check if fabric is enabled (the function contains a flag\n // to make sure it's called only once)\n maybeInitializeFabric();\n\n return (\n <GestureHandlerRootViewContext.Provider value>\n <View style={style ?? styles.container} {...rest} />\n </GestureHandlerRootViewContext.Provider>\n );\n}\n\nconst styles = StyleSheet.create({\n container: { flex: 1 },\n});\n"]}
@@ -1,4 +1,5 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
1
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
2
3
  import * as React from 'react';
3
4
  import { View, StyleSheet } from 'react-native';
4
5
  import GestureHandlerRootViewContext from '../GestureHandlerRootViewContext';
@@ -1 +1 @@
1
- {"version":3,"names":["React","View","StyleSheet","GestureHandlerRootViewContext","GestureHandlerRootView","style","rest","createElement","Provider","value","_extends","styles","container","create","flex"],"sources":["GestureHandlerRootView.web.tsx"],"sourcesContent":["import * as React from 'react';\nimport { PropsWithChildren } from 'react';\nimport { View, ViewProps, StyleSheet } from 'react-native';\nimport GestureHandlerRootViewContext from '../GestureHandlerRootViewContext';\n\nexport interface GestureHandlerRootViewProps\n extends PropsWithChildren<ViewProps> {}\n\nexport default function GestureHandlerRootView({\n style,\n ...rest\n}: GestureHandlerRootViewProps) {\n return (\n <GestureHandlerRootViewContext.Provider value>\n <View style={style ?? styles.container} {...rest} />\n </GestureHandlerRootViewContext.Provider>\n );\n}\n\nconst styles = StyleSheet.create({\n container: { flex: 1 },\n});\n"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SAASC,IAAI,EAAaC,UAAU,QAAQ,cAAc;AAC1D,OAAOC,6BAA6B,MAAM,kCAAkC;AAK5E,eAAe,SAASC,sBAAsBA,CAAC;EAC7CC,KAAK;EACL,GAAGC;AACwB,CAAC,EAAE;EAC9B,oBACEN,KAAA,CAAAO,aAAA,CAACJ,6BAA6B,CAACK,QAAQ;IAACC,KAAK;EAAA,gBAC3CT,KAAA,CAAAO,aAAA,CAACN,IAAI,EAAAS,QAAA;IAACL,KAAK,EAAEA,KAAK,aAALA,KAAK,cAALA,KAAK,GAAIM,MAAM,CAACC;EAAU,GAAKN,IAAI,CAAG,CACb,CAAC;AAE7C;AAEA,MAAMK,MAAM,GAAGT,UAAU,CAACW,MAAM,CAAC;EAC/BD,SAAS,EAAE;IAAEE,IAAI,EAAE;EAAE;AACvB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"sources":["GestureHandlerRootView.web.tsx"],"names":["React","View","StyleSheet","GestureHandlerRootViewContext","GestureHandlerRootView","style","rest","styles","container","create","flex"],"mappings":";;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AAEA,SAASC,IAAT,EAA0BC,UAA1B,QAA4C,cAA5C;AACA,OAAOC,6BAAP,MAA0C,kCAA1C;AAKA,eAAe,SAASC,sBAAT,CAAgC;AAC7CC,EAAAA,KAD6C;AAE7C,KAAGC;AAF0C,CAAhC,EAGiB;AAC9B,sBACE,oBAAC,6BAAD,CAA+B,QAA/B;AAAwC,IAAA,KAAK;AAA7C,kBACE,oBAAC,IAAD;AAAM,IAAA,KAAK,EAAED,KAAF,aAAEA,KAAF,cAAEA,KAAF,GAAWE,MAAM,CAACC;AAA7B,KAA4CF,IAA5C,EADF,CADF;AAKD;AAED,MAAMC,MAAM,GAAGL,UAAU,CAACO,MAAX,CAAkB;AAC/BD,EAAAA,SAAS,EAAE;AAAEE,IAAAA,IAAI,EAAE;AAAR;AADoB,CAAlB,CAAf","sourcesContent":["import * as React from 'react';\nimport { PropsWithChildren } from 'react';\nimport { View, ViewProps, StyleSheet } from 'react-native';\nimport GestureHandlerRootViewContext from '../GestureHandlerRootViewContext';\n\nexport interface GestureHandlerRootViewProps\n extends PropsWithChildren<ViewProps> {}\n\nexport default function GestureHandlerRootView({\n style,\n ...rest\n}: GestureHandlerRootViewProps) {\n return (\n <GestureHandlerRootViewContext.Provider value>\n <View style={style ?? styles.container} {...rest} />\n </GestureHandlerRootViewContext.Provider>\n );\n}\n\nconst styles = StyleSheet.create({\n container: { flex: 1 },\n});\n"]}
@@ -1,4 +1,5 @@
1
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
1
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
+
2
3
  import React, { useCallback, useMemo, useRef, useState } from 'react';
3
4
  import { GestureObjects as Gesture } from '../../handlers/gestures/gestureObjects';
4
5
  import { GestureDetector } from '../../handlers/gestures/GestureDetector';
@@ -12,6 +13,7 @@ const IS_TEST_ENV = isTestEnv();
12
13
  let IS_FABRIC = null;
13
14
  export default function Pressable(props) {
14
15
  var _android_ripple$radiu;
16
+
15
17
  const {
16
18
  testOnly_pressed,
17
19
  hitSlop,
@@ -34,9 +36,8 @@ export default function Pressable(props) {
34
36
  ...remainingProps
35
37
  } = props;
36
38
  const [pressedState, setPressedState] = useState(testOnly_pressed !== null && testOnly_pressed !== void 0 ? testOnly_pressed : false);
37
- const pressableRef = useRef(null);
39
+ const pressableRef = useRef(null); // Disabled when onLongPress has been called
38
40
 
39
- // Disabled when onLongPress has been called
40
41
  const isPressCallbackEnabled = useRef(true);
41
42
  const hasPassedBoundsChecks = useRef(false);
42
43
  const shouldPreventNativeEffects = useRef(false);
@@ -49,35 +50,40 @@ export default function Pressable(props) {
49
50
  if (hoverOutTimeout.current) {
50
51
  clearTimeout(hoverOutTimeout.current);
51
52
  }
53
+
52
54
  if (delayHoverIn) {
53
55
  hoverInTimeout.current = setTimeout(() => onHoverIn === null || onHoverIn === void 0 ? void 0 : onHoverIn(gestureToPressableEvent(event)), delayHoverIn);
54
56
  return;
55
57
  }
56
- onHoverIn === null || onHoverIn === void 0 || onHoverIn(gestureToPressableEvent(event));
58
+
59
+ onHoverIn === null || onHoverIn === void 0 ? void 0 : onHoverIn(gestureToPressableEvent(event));
57
60
  }).onFinalize(event => {
58
61
  if (hoverInTimeout.current) {
59
62
  clearTimeout(hoverInTimeout.current);
60
63
  }
64
+
61
65
  if (delayHoverOut) {
62
66
  hoverOutTimeout.current = setTimeout(() => onHoverOut === null || onHoverOut === void 0 ? void 0 : onHoverOut(gestureToPressableEvent(event)), delayHoverOut);
63
67
  return;
64
68
  }
65
- onHoverOut === null || onHoverOut === void 0 || onHoverOut(gestureToPressableEvent(event));
69
+
70
+ onHoverOut === null || onHoverOut === void 0 ? void 0 : onHoverOut(gestureToPressableEvent(event));
66
71
  }), [delayHoverIn, delayHoverOut, onHoverIn, onHoverOut]);
67
72
  const pressDelayTimeoutRef = useRef(null);
68
- const isTouchPropagationAllowed = useRef(false);
73
+ const isTouchPropagationAllowed = useRef(false); // iOS only: due to varying flow of gestures, events sometimes have to be saved for later use
69
74
 
70
- // iOS only: due to varying flow of gestures, events sometimes have to be saved for later use
71
75
  const deferredEventPayload = useRef(null);
72
76
  const pressInHandler = useCallback(event => {
73
77
  if (handlingOnTouchesDown.current) {
74
78
  deferredEventPayload.current = event;
75
79
  }
80
+
76
81
  if (!isTouchPropagationAllowed.current) {
77
82
  return;
78
83
  }
84
+
79
85
  deferredEventPayload.current = null;
80
- onPressIn === null || onPressIn === void 0 || onPressIn(event);
86
+ onPressIn === null || onPressIn === void 0 ? void 0 : onPressIn(event);
81
87
  isPressCallbackEnabled.current = true;
82
88
  pressDelayTimeoutRef.current = null;
83
89
  setPressedState(true);
@@ -86,6 +92,7 @@ export default function Pressable(props) {
86
92
  if (!hasPassedBoundsChecks.current || event.nativeEvent.touches.length > event.nativeEvent.changedTouches.length) {
87
93
  return;
88
94
  }
95
+
89
96
  if (unstable_pressDelay && pressDelayTimeoutRef.current !== null) {
90
97
  // When delay is preemptively finished by lifting touches,
91
98
  // we want to immediately activate it's effects - pressInHandler,
@@ -93,18 +100,23 @@ export default function Pressable(props) {
93
100
  clearTimeout(pressDelayTimeoutRef.current);
94
101
  pressInHandler(event);
95
102
  }
103
+
96
104
  if (deferredEventPayload.current) {
97
- onPressIn === null || onPressIn === void 0 || onPressIn(deferredEventPayload.current);
105
+ onPressIn === null || onPressIn === void 0 ? void 0 : onPressIn(deferredEventPayload.current);
98
106
  deferredEventPayload.current = null;
99
107
  }
100
- onPressOut === null || onPressOut === void 0 || onPressOut(event);
108
+
109
+ onPressOut === null || onPressOut === void 0 ? void 0 : onPressOut(event);
110
+
101
111
  if (isPressCallbackEnabled.current) {
102
- onPress === null || onPress === void 0 || onPress(event);
112
+ onPress === null || onPress === void 0 ? void 0 : onPress(event);
103
113
  }
114
+
104
115
  if (longPressTimeoutRef.current) {
105
116
  clearTimeout(longPressTimeoutRef.current);
106
117
  longPressTimeoutRef.current = null;
107
118
  }
119
+
108
120
  isTouchPropagationAllowed.current = false;
109
121
  hasPassedBoundsChecks.current = false;
110
122
  isPressCallbackEnabled.current = true;
@@ -117,10 +129,12 @@ export default function Pressable(props) {
117
129
  if (!isTouchPropagationAllowed.current) {
118
130
  return;
119
131
  }
132
+
120
133
  if (hasPassedBoundsChecks.current) {
121
- onLongPress === null || onLongPress === void 0 || onLongPress(gestureTouchToPressableEvent(event));
134
+ onLongPress === null || onLongPress === void 0 ? void 0 : onLongPress(gestureTouchToPressableEvent(event));
122
135
  isPressCallbackEnabled.current = false;
123
136
  }
137
+
124
138
  if (longPressTimeoutRef.current) {
125
139
  clearTimeout(longPressTimeoutRef.current);
126
140
  longPressTimeoutRef.current = null;
@@ -132,9 +146,11 @@ export default function Pressable(props) {
132
146
  .maxDistance(INT32_MAX) // Stops long press from cancelling after set distance
133
147
  .cancelsTouchesInView(false).onTouchesDown(event => {
134
148
  var _pressableRef$current;
149
+
135
150
  handlingOnTouchesDown.current = true;
136
- (_pressableRef$current = pressableRef.current) === null || _pressableRef$current === void 0 || _pressableRef$current.measure((_x, _y, width, height) => {
151
+ (_pressableRef$current = pressableRef.current) === null || _pressableRef$current === void 0 ? void 0 : _pressableRef$current.measure((_x, _y, width, height) => {
137
152
  var _onEndHandlingTouches;
153
+
138
154
  if (!isTouchWithinInset({
139
155
  width,
140
156
  height
@@ -144,13 +160,14 @@ export default function Pressable(props) {
144
160
  handlingOnTouchesDown.current = false;
145
161
  return;
146
162
  }
147
- hasPassedBoundsChecks.current = true;
148
163
 
149
- // In case of multiple touches, the first one starts long press gesture
164
+ hasPassedBoundsChecks.current = true; // In case of multiple touches, the first one starts long press gesture
165
+
150
166
  if (longPressTimeoutRef.current === null) {
151
167
  // Start long press gesture timer
152
168
  longPressTimeoutRef.current = setTimeout(() => activateLongPress(event), longPressMinDuration);
153
169
  }
170
+
154
171
  if (unstable_pressDelay) {
155
172
  pressDelayTimeoutRef.current = setTimeout(() => {
156
173
  pressInHandler(gestureTouchToPressableEvent(event));
@@ -158,35 +175,43 @@ export default function Pressable(props) {
158
175
  } else {
159
176
  pressInHandler(gestureTouchToPressableEvent(event));
160
177
  }
161
- (_onEndHandlingTouches = onEndHandlingTouchesDown.current) === null || _onEndHandlingTouches === void 0 || _onEndHandlingTouches.call(onEndHandlingTouchesDown);
178
+
179
+ (_onEndHandlingTouches = onEndHandlingTouchesDown.current) === null || _onEndHandlingTouches === void 0 ? void 0 : _onEndHandlingTouches.call(onEndHandlingTouchesDown);
162
180
  onEndHandlingTouchesDown.current = null;
163
181
  handlingOnTouchesDown.current = false;
164
182
  });
165
183
  }).onTouchesUp(event => {
166
184
  if (handlingOnTouchesDown.current) {
167
185
  onEndHandlingTouchesDown.current = () => pressOutHandler(gestureTouchToPressableEvent(event));
186
+
168
187
  return;
169
- }
170
- // On iOS, short taps will make LongPress gesture call onTouchesUp before Native gesture calls onStart
188
+ } // On iOS, short taps will make LongPress gesture call onTouchesUp before Native gesture calls onStart
171
189
  // This variable ensures that onStart isn't detected as the first gesture since Pressable is pressed.
190
+
191
+
172
192
  if (deferredEventPayload.current !== null) {
173
193
  shouldPreventNativeEffects.current = true;
174
194
  }
195
+
175
196
  pressOutHandler(gestureTouchToPressableEvent(event));
176
197
  }).onTouchesCancelled(event => {
177
198
  isPressCallbackEnabled.current = false;
199
+
178
200
  if (handlingOnTouchesDown.current) {
179
201
  cancelledMidPress.current = true;
202
+
180
203
  onEndHandlingTouchesDown.current = () => pressOutHandler(gestureTouchToPressableEvent(event));
204
+
181
205
  return;
182
206
  }
207
+
183
208
  if (!hasPassedBoundsChecks.current || event.allTouches.length > event.changedTouches.length) {
184
209
  return;
185
210
  }
211
+
186
212
  pressOutHandler(gestureTouchToPressableEvent(event));
187
- }), [activateLongPress, longPressMinDuration, normalizedHitSlop, pressInHandler, pressOutHandler, unstable_pressDelay]);
213
+ }), [activateLongPress, longPressMinDuration, normalizedHitSlop, pressInHandler, pressOutHandler, unstable_pressDelay]); // RNButton is placed inside ButtonGesture to enable Android's ripple and to capture non-propagating events
188
214
 
189
- // RNButton is placed inside ButtonGesture to enable Android's ripple and to capture non-propagating events
190
215
  const buttonGesture = useMemo(() => Gesture.Native().onBegin(() => {
191
216
  // Android sets BEGAN state on press down
192
217
  if (Platform.OS === 'android' || Platform.OS === 'macos') {
@@ -195,14 +220,16 @@ export default function Pressable(props) {
195
220
  }).onStart(() => {
196
221
  if (Platform.OS === 'web') {
197
222
  isTouchPropagationAllowed.current = true;
198
- }
223
+ } // iOS sets ACTIVE state on press down
224
+
199
225
 
200
- // iOS sets ACTIVE state on press down
201
226
  if (Platform.OS !== 'ios') {
202
227
  return;
203
228
  }
229
+
204
230
  if (deferredEventPayload.current) {
205
231
  isTouchPropagationAllowed.current = true;
232
+
206
233
  if (hasPassedBoundsChecks.current) {
207
234
  pressInHandler(deferredEventPayload.current);
208
235
  deferredEventPayload.current = null;
@@ -210,33 +237,37 @@ export default function Pressable(props) {
210
237
  pressOutHandler(deferredEventPayload.current);
211
238
  isTouchPropagationAllowed.current = false;
212
239
  }
240
+
213
241
  return;
214
242
  }
243
+
215
244
  if (hasPassedBoundsChecks.current) {
216
245
  isTouchPropagationAllowed.current = true;
217
246
  return;
218
247
  }
248
+
219
249
  if (shouldPreventNativeEffects.current) {
220
250
  shouldPreventNativeEffects.current = false;
221
251
  return;
222
252
  }
253
+
223
254
  isTouchPropagationAllowed.current = true;
224
255
  }), [pressInHandler, pressOutHandler]);
225
256
  const appliedHitSlop = addInsets(normalizedHitSlop, normalizedPressRetentionOffset);
226
257
  const isPressableEnabled = disabled !== true;
227
258
  const gestures = [buttonGesture, pressAndTouchGesture, hoverGesture];
259
+
228
260
  for (const gesture of gestures) {
229
261
  gesture.enabled(isPressableEnabled);
230
262
  gesture.runOnJS(true);
231
263
  gesture.hitSlop(appliedHitSlop);
232
264
  gesture.shouldCancelWhenOutside(Platform.OS === 'web' ? false : true);
233
- }
265
+ } // Uses different hitSlop, to activate on hitSlop area instead of pressRetentionOffset area
266
+
234
267
 
235
- // Uses different hitSlop, to activate on hitSlop area instead of pressRetentionOffset area
236
268
  buttonGesture.hitSlop(normalizedHitSlop);
237
- const gesture = Gesture.Simultaneous(...gestures);
269
+ const gesture = Gesture.Simultaneous(...gestures); // `cursor: 'pointer'` on `RNButton` crashes iOS
238
270
 
239
- // `cursor: 'pointer'` on `RNButton` crashes iOS
240
271
  const pointerStyle = Platform.OS === 'web' ? {
241
272
  cursor: 'pointer'
242
273
  } : {};
@@ -248,9 +279,11 @@ export default function Pressable(props) {
248
279
  }) : children;
249
280
  const rippleColor = useMemo(() => {
250
281
  var _android_ripple$color;
282
+
251
283
  if (IS_FABRIC === null) {
252
284
  IS_FABRIC = isFabric();
253
285
  }
286
+
254
287
  const defaultRippleColor = android_ripple ? undefined : 'transparent';
255
288
  const unprocessedRippleColor = (_android_ripple$color = android_ripple === null || android_ripple === void 0 ? void 0 : android_ripple.color) !== null && _android_ripple$color !== void 0 ? _android_ripple$color : defaultRippleColor;
256
289
  return IS_FABRIC ? unprocessedRippleColor : processColor(unprocessedRippleColor);
@@ -1 +1 @@
1
- {"version":3,"names":["React","useCallback","useMemo","useRef","useState","GestureObjects","Gesture","GestureDetector","Platform","processColor","NativeButton","numberAsInset","gestureToPressableEvent","isTouchWithinInset","gestureTouchToPressableEvent","addInsets","PressabilityDebugView","INT32_MAX","isFabric","isTestEnv","DEFAULT_LONG_PRESS_DURATION","IS_TEST_ENV","IS_FABRIC","Pressable","props","_android_ripple$radiu","testOnly_pressed","hitSlop","pressRetentionOffset","delayHoverIn","onHoverIn","delayHoverOut","onHoverOut","delayLongPress","unstable_pressDelay","onPress","onPressIn","onPressOut","onLongPress","style","children","android_disableSound","android_ripple","disabled","remainingProps","pressedState","setPressedState","pressableRef","isPressCallbackEnabled","hasPassedBoundsChecks","shouldPreventNativeEffects","normalizedHitSlop","normalizedPressRetentionOffset","hoverInTimeout","hoverOutTimeout","hoverGesture","Hover","manualActivation","cancelsTouchesInView","onBegin","event","current","clearTimeout","setTimeout","onFinalize","pressDelayTimeoutRef","isTouchPropagationAllowed","deferredEventPayload","pressInHandler","handlingOnTouchesDown","pressOutHandler","nativeEvent","touches","length","changedTouches","longPressTimeoutRef","onEndHandlingTouchesDown","cancelledMidPress","activateLongPress","longPressMinDuration","pressAndTouchGesture","LongPress","minDuration","maxDistance","onTouchesDown","_pressableRef$current","measure","_x","_y","width","height","_onEndHandlingTouches","at","call","onTouchesUp","onTouchesCancelled","allTouches","buttonGesture","Native","OS","onStart","appliedHitSlop","isPressableEnabled","gestures","gesture","enabled","runOnJS","shouldCancelWhenOutside","Simultaneous","pointerStyle","cursor","styleProp","pressed","childrenProp","rippleColor","_android_ripple$color","defaultRippleColor","undefined","unprocessedRippleColor","color","createElement","_extends","ref","touchSoundDisabled","rippleRadius","radius","testOnly_onPress","testOnly_onPressIn","testOnly_onPressOut","testOnly_onLongPress","__DEV__"],"sources":["Pressable.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { GestureObjects as Gesture } from '../../handlers/gestures/gestureObjects';\nimport { GestureDetector } from '../../handlers/gestures/GestureDetector';\nimport { PressableEvent, PressableProps } from './PressableProps';\nimport {\n Insets,\n Platform,\n StyleProp,\n View,\n ViewStyle,\n processColor,\n} from 'react-native';\nimport NativeButton from '../GestureHandlerButton';\nimport {\n numberAsInset,\n gestureToPressableEvent,\n isTouchWithinInset,\n gestureTouchToPressableEvent,\n addInsets,\n} from './utils';\nimport { PressabilityDebugView } from '../../handlers/PressabilityDebugView';\nimport { GestureTouchEvent } from '../../handlers/gestureHandlerCommon';\nimport { INT32_MAX, isFabric, isTestEnv } from '../../utils';\n\nconst DEFAULT_LONG_PRESS_DURATION = 500;\nconst IS_TEST_ENV = isTestEnv();\n\nlet IS_FABRIC: null | boolean = null;\n\nexport default function Pressable(props: PressableProps) {\n const {\n testOnly_pressed,\n hitSlop,\n pressRetentionOffset,\n delayHoverIn,\n onHoverIn,\n delayHoverOut,\n onHoverOut,\n delayLongPress,\n unstable_pressDelay,\n onPress,\n onPressIn,\n onPressOut,\n onLongPress,\n style,\n children,\n android_disableSound,\n android_ripple,\n disabled,\n ...remainingProps\n } = props;\n\n const [pressedState, setPressedState] = useState(testOnly_pressed ?? false);\n\n const pressableRef = useRef<View>(null);\n\n // Disabled when onLongPress has been called\n const isPressCallbackEnabled = useRef<boolean>(true);\n const hasPassedBoundsChecks = useRef<boolean>(false);\n const shouldPreventNativeEffects = useRef<boolean>(false);\n\n const normalizedHitSlop: Insets = useMemo(\n () =>\n typeof hitSlop === 'number' ? numberAsInset(hitSlop) : (hitSlop ?? {}),\n [hitSlop]\n );\n\n const normalizedPressRetentionOffset: Insets = useMemo(\n () =>\n typeof pressRetentionOffset === 'number'\n ? numberAsInset(pressRetentionOffset)\n : (pressRetentionOffset ?? {}),\n [pressRetentionOffset]\n );\n\n const hoverInTimeout = useRef<number | null>(null);\n const hoverOutTimeout = useRef<number | null>(null);\n\n const hoverGesture = useMemo(\n () =>\n Gesture.Hover()\n .manualActivation(true) // Stops Hover from blocking Native gesture activation on web\n .cancelsTouchesInView(false)\n .onBegin((event) => {\n if (hoverOutTimeout.current) {\n clearTimeout(hoverOutTimeout.current);\n }\n if (delayHoverIn) {\n hoverInTimeout.current = setTimeout(\n () => onHoverIn?.(gestureToPressableEvent(event)),\n delayHoverIn\n );\n return;\n }\n onHoverIn?.(gestureToPressableEvent(event));\n })\n .onFinalize((event) => {\n if (hoverInTimeout.current) {\n clearTimeout(hoverInTimeout.current);\n }\n if (delayHoverOut) {\n hoverOutTimeout.current = setTimeout(\n () => onHoverOut?.(gestureToPressableEvent(event)),\n delayHoverOut\n );\n return;\n }\n onHoverOut?.(gestureToPressableEvent(event));\n }),\n [delayHoverIn, delayHoverOut, onHoverIn, onHoverOut]\n );\n\n const pressDelayTimeoutRef = useRef<number | null>(null);\n const isTouchPropagationAllowed = useRef<boolean>(false);\n\n // iOS only: due to varying flow of gestures, events sometimes have to be saved for later use\n const deferredEventPayload = useRef<PressableEvent | null>(null);\n\n const pressInHandler = useCallback(\n (event: PressableEvent) => {\n if (handlingOnTouchesDown.current) {\n deferredEventPayload.current = event;\n }\n\n if (!isTouchPropagationAllowed.current) {\n return;\n }\n\n deferredEventPayload.current = null;\n\n onPressIn?.(event);\n isPressCallbackEnabled.current = true;\n pressDelayTimeoutRef.current = null;\n setPressedState(true);\n },\n [onPressIn]\n );\n\n const pressOutHandler = useCallback(\n (event: PressableEvent) => {\n if (\n !hasPassedBoundsChecks.current ||\n event.nativeEvent.touches.length >\n event.nativeEvent.changedTouches.length\n ) {\n return;\n }\n\n if (unstable_pressDelay && pressDelayTimeoutRef.current !== null) {\n // When delay is preemptively finished by lifting touches,\n // we want to immediately activate it's effects - pressInHandler,\n // even though we are located at the pressOutHandler\n clearTimeout(pressDelayTimeoutRef.current);\n pressInHandler(event);\n }\n\n if (deferredEventPayload.current) {\n onPressIn?.(deferredEventPayload.current);\n deferredEventPayload.current = null;\n }\n\n onPressOut?.(event);\n\n if (isPressCallbackEnabled.current) {\n onPress?.(event);\n }\n\n if (longPressTimeoutRef.current) {\n clearTimeout(longPressTimeoutRef.current);\n longPressTimeoutRef.current = null;\n }\n\n isTouchPropagationAllowed.current = false;\n hasPassedBoundsChecks.current = false;\n isPressCallbackEnabled.current = true;\n setPressedState(false);\n },\n [onPress, onPressIn, onPressOut, pressInHandler, unstable_pressDelay]\n );\n\n const handlingOnTouchesDown = useRef<boolean>(false);\n const onEndHandlingTouchesDown = useRef<(() => void) | null>(null);\n const cancelledMidPress = useRef<boolean>(false);\n\n const activateLongPress = useCallback(\n (event: GestureTouchEvent) => {\n if (!isTouchPropagationAllowed.current) {\n return;\n }\n\n if (hasPassedBoundsChecks.current) {\n onLongPress?.(gestureTouchToPressableEvent(event));\n isPressCallbackEnabled.current = false;\n }\n\n if (longPressTimeoutRef.current) {\n clearTimeout(longPressTimeoutRef.current);\n longPressTimeoutRef.current = null;\n }\n },\n [onLongPress]\n );\n\n const longPressTimeoutRef = useRef<number | null>(null);\n const longPressMinDuration =\n (delayLongPress ?? DEFAULT_LONG_PRESS_DURATION) +\n (unstable_pressDelay ?? 0);\n\n const pressAndTouchGesture = useMemo(\n () =>\n Gesture.LongPress()\n .minDuration(INT32_MAX) // Stops long press from blocking native gesture\n .maxDistance(INT32_MAX) // Stops long press from cancelling after set distance\n .cancelsTouchesInView(false)\n .onTouchesDown((event) => {\n handlingOnTouchesDown.current = true;\n pressableRef.current?.measure((_x, _y, width, height) => {\n if (\n !isTouchWithinInset(\n {\n width,\n height,\n },\n normalizedHitSlop,\n event.changedTouches.at(-1)\n ) ||\n hasPassedBoundsChecks.current ||\n cancelledMidPress.current\n ) {\n cancelledMidPress.current = false;\n onEndHandlingTouchesDown.current = null;\n handlingOnTouchesDown.current = false;\n return;\n }\n\n hasPassedBoundsChecks.current = true;\n\n // In case of multiple touches, the first one starts long press gesture\n if (longPressTimeoutRef.current === null) {\n // Start long press gesture timer\n longPressTimeoutRef.current = setTimeout(\n () => activateLongPress(event),\n longPressMinDuration\n );\n }\n\n if (unstable_pressDelay) {\n pressDelayTimeoutRef.current = setTimeout(() => {\n pressInHandler(gestureTouchToPressableEvent(event));\n }, unstable_pressDelay);\n } else {\n pressInHandler(gestureTouchToPressableEvent(event));\n }\n\n onEndHandlingTouchesDown.current?.();\n onEndHandlingTouchesDown.current = null;\n handlingOnTouchesDown.current = false;\n });\n })\n .onTouchesUp((event) => {\n if (handlingOnTouchesDown.current) {\n onEndHandlingTouchesDown.current = () =>\n pressOutHandler(gestureTouchToPressableEvent(event));\n return;\n }\n // On iOS, short taps will make LongPress gesture call onTouchesUp before Native gesture calls onStart\n // This variable ensures that onStart isn't detected as the first gesture since Pressable is pressed.\n if (deferredEventPayload.current !== null) {\n shouldPreventNativeEffects.current = true;\n }\n pressOutHandler(gestureTouchToPressableEvent(event));\n })\n .onTouchesCancelled((event) => {\n isPressCallbackEnabled.current = false;\n\n if (handlingOnTouchesDown.current) {\n cancelledMidPress.current = true;\n onEndHandlingTouchesDown.current = () =>\n pressOutHandler(gestureTouchToPressableEvent(event));\n return;\n }\n\n if (\n !hasPassedBoundsChecks.current ||\n event.allTouches.length > event.changedTouches.length\n ) {\n return;\n }\n\n pressOutHandler(gestureTouchToPressableEvent(event));\n }),\n [\n activateLongPress,\n longPressMinDuration,\n normalizedHitSlop,\n pressInHandler,\n pressOutHandler,\n unstable_pressDelay,\n ]\n );\n\n // RNButton is placed inside ButtonGesture to enable Android's ripple and to capture non-propagating events\n const buttonGesture = useMemo(\n () =>\n Gesture.Native()\n .onBegin(() => {\n // Android sets BEGAN state on press down\n if (Platform.OS === 'android' || Platform.OS === 'macos') {\n isTouchPropagationAllowed.current = true;\n }\n })\n .onStart(() => {\n if (Platform.OS === 'web') {\n isTouchPropagationAllowed.current = true;\n }\n\n // iOS sets ACTIVE state on press down\n if (Platform.OS !== 'ios') {\n return;\n }\n\n if (deferredEventPayload.current) {\n isTouchPropagationAllowed.current = true;\n\n if (hasPassedBoundsChecks.current) {\n pressInHandler(deferredEventPayload.current);\n deferredEventPayload.current = null;\n } else {\n pressOutHandler(deferredEventPayload.current);\n isTouchPropagationAllowed.current = false;\n }\n\n return;\n }\n\n if (hasPassedBoundsChecks.current) {\n isTouchPropagationAllowed.current = true;\n return;\n }\n\n if (shouldPreventNativeEffects.current) {\n shouldPreventNativeEffects.current = false;\n return;\n }\n\n isTouchPropagationAllowed.current = true;\n }),\n [pressInHandler, pressOutHandler]\n );\n\n const appliedHitSlop = addInsets(\n normalizedHitSlop,\n normalizedPressRetentionOffset\n );\n\n const isPressableEnabled = disabled !== true;\n\n const gestures = [buttonGesture, pressAndTouchGesture, hoverGesture];\n\n for (const gesture of gestures) {\n gesture.enabled(isPressableEnabled);\n gesture.runOnJS(true);\n gesture.hitSlop(appliedHitSlop);\n gesture.shouldCancelWhenOutside(Platform.OS === 'web' ? false : true);\n }\n\n // Uses different hitSlop, to activate on hitSlop area instead of pressRetentionOffset area\n buttonGesture.hitSlop(normalizedHitSlop);\n\n const gesture = Gesture.Simultaneous(...gestures);\n\n // `cursor: 'pointer'` on `RNButton` crashes iOS\n const pointerStyle: StyleProp<ViewStyle> =\n Platform.OS === 'web' ? { cursor: 'pointer' } : {};\n\n const styleProp =\n typeof style === 'function' ? style({ pressed: pressedState }) : style;\n\n const childrenProp =\n typeof children === 'function'\n ? children({ pressed: pressedState })\n : children;\n\n const rippleColor = useMemo(() => {\n if (IS_FABRIC === null) {\n IS_FABRIC = isFabric();\n }\n\n const defaultRippleColor = android_ripple ? undefined : 'transparent';\n const unprocessedRippleColor = android_ripple?.color ?? defaultRippleColor;\n return IS_FABRIC\n ? unprocessedRippleColor\n : processColor(unprocessedRippleColor);\n }, [android_ripple]);\n\n return (\n <GestureDetector gesture={gesture}>\n <NativeButton\n {...remainingProps}\n ref={pressableRef}\n hitSlop={appliedHitSlop}\n enabled={isPressableEnabled}\n touchSoundDisabled={android_disableSound ?? undefined}\n rippleColor={rippleColor}\n rippleRadius={android_ripple?.radius ?? undefined}\n style={[pointerStyle, styleProp]}\n testOnly_onPress={IS_TEST_ENV ? onPress : undefined}\n testOnly_onPressIn={IS_TEST_ENV ? onPressIn : undefined}\n testOnly_onPressOut={IS_TEST_ENV ? onPressOut : undefined}\n testOnly_onLongPress={IS_TEST_ENV ? onLongPress : undefined}>\n {childrenProp}\n {__DEV__ ? (\n <PressabilityDebugView color=\"red\" hitSlop={normalizedHitSlop} />\n ) : null}\n </NativeButton>\n </GestureDetector>\n );\n}\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,EAAEC,MAAM,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,EACZiB,OAAO,gBACNlI,KAAA,CAAAwH,aAAA,CAACxG,qBAAqB;IAACuG,KAAK,EAAC,KAAK;IAAC5F,OAAO,EAAEwB;EAAkB,CAAE,CAAC,GAC/D,IACQ,CACC,CAAC;AAEtB","ignoreList":[]}
1
+ {"version":3,"sources":["Pressable.tsx"],"names":["React","useCallback","useMemo","useRef","useState","GestureObjects","Gesture","GestureDetector","Platform","processColor","NativeButton","numberAsInset","gestureToPressableEvent","isTouchWithinInset","gestureTouchToPressableEvent","addInsets","PressabilityDebugView","INT32_MAX","isFabric","isTestEnv","DEFAULT_LONG_PRESS_DURATION","IS_TEST_ENV","IS_FABRIC","Pressable","props","testOnly_pressed","hitSlop","pressRetentionOffset","delayHoverIn","onHoverIn","delayHoverOut","onHoverOut","delayLongPress","unstable_pressDelay","onPress","onPressIn","onPressOut","onLongPress","style","children","android_disableSound","android_ripple","disabled","remainingProps","pressedState","setPressedState","pressableRef","isPressCallbackEnabled","hasPassedBoundsChecks","shouldPreventNativeEffects","normalizedHitSlop","normalizedPressRetentionOffset","hoverInTimeout","hoverOutTimeout","hoverGesture","Hover","manualActivation","cancelsTouchesInView","onBegin","event","current","clearTimeout","setTimeout","onFinalize","pressDelayTimeoutRef","isTouchPropagationAllowed","deferredEventPayload","pressInHandler","handlingOnTouchesDown","pressOutHandler","nativeEvent","touches","length","changedTouches","longPressTimeoutRef","onEndHandlingTouchesDown","cancelledMidPress","activateLongPress","longPressMinDuration","pressAndTouchGesture","LongPress","minDuration","maxDistance","onTouchesDown","measure","_x","_y","width","height","at","onTouchesUp","onTouchesCancelled","allTouches","buttonGesture","Native","OS","onStart","appliedHitSlop","isPressableEnabled","gestures","gesture","enabled","runOnJS","shouldCancelWhenOutside","Simultaneous","pointerStyle","cursor","styleProp","pressed","childrenProp","rippleColor","defaultRippleColor","undefined","unprocessedRippleColor","color","radius","__DEV__"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,WAAhB,EAA6BC,OAA7B,EAAsCC,MA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AiB,IAAA,OAAO,EAAE2D;AAA1B,kBACE,oBAAC,YAAD,eACMzD,cADN;AAEE,IAAA,GAAG,EAAEG,YAFP;AAGE,IAAA,OAAO,EAAEmD,cAHX;AAIE,IAAA,OAAO,EAAEC,kBAJX;AAKE,IAAA,kBAAkB,EAAE1D,oBAAF,aAAEA,oBAAF,cAAEA,oBAAF,GAA0BwE,SAL9C;AAME,IAAA,WAAW,EAAEF,WANf;AAOE,IAAA,YAAY,2BAAErE,cAAF,aAAEA,cAAF,uBAAEA,cAAc,CAAE0E,MAAlB,yEAA4BH,SAP1C;AAQE,IAAA,KAAK,EAAE,CAACP,YAAD,EAAeE,SAAf,CART;AASE,IAAA,gBAAgB,EAAEtF,WAAW,GAAGa,OAAH,GAAa8E,SAT5C;AAUE,IAAA,kBAAkB,EAAE3F,WAAW,GAAGc,SAAH,GAAe6E,SAVhD;AAWE,IAAA,mBAAmB,EAAE3F,WAAW,GAAGe,UAAH,GAAgB4E,SAXlD;AAYE,IAAA,oBAAoB,EAAE3F,WAAW,GAAGgB,WAAH,GAAiB2E;AAZpD,MAaGH,YAbH,EAcGO,OAAO,gBACN,oBAAC,qBAAD;AAAuB,IAAA,KAAK,EAAC,KAA7B;AAAmC,IAAA,OAAO,EAAElE;AAA5C,IADM,GAEJ,IAhBN,CADF,CADF;AAsBD","sourcesContent":["import React, { useCallback, useMemo, useRef, useState } from 'react';\nimport { GestureObjects as Gesture } from '../../handlers/gestures/gestureObjects';\nimport { GestureDetector } from '../../handlers/gestures/GestureDetector';\nimport { PressableEvent, PressableProps } from './PressableProps';\nimport {\n Insets,\n Platform,\n StyleProp,\n View,\n ViewStyle,\n processColor,\n} from 'react-native';\nimport NativeButton from '../GestureHandlerButton';\nimport {\n numberAsInset,\n gestureToPressableEvent,\n isTouchWithinInset,\n gestureTouchToPressableEvent,\n addInsets,\n} from './utils';\nimport { PressabilityDebugView } from '../../handlers/PressabilityDebugView';\nimport { GestureTouchEvent } from '../../handlers/gestureHandlerCommon';\nimport { INT32_MAX, isFabric, isTestEnv } from '../../utils';\n\nconst DEFAULT_LONG_PRESS_DURATION = 500;\nconst IS_TEST_ENV = isTestEnv();\n\nlet IS_FABRIC: null | boolean = null;\n\nexport default function Pressable(props: PressableProps) {\n const {\n testOnly_pressed,\n hitSlop,\n pressRetentionOffset,\n delayHoverIn,\n onHoverIn,\n delayHoverOut,\n onHoverOut,\n delayLongPress,\n unstable_pressDelay,\n onPress,\n onPressIn,\n onPressOut,\n onLongPress,\n style,\n children,\n android_disableSound,\n android_ripple,\n disabled,\n ...remainingProps\n } = props;\n\n const [pressedState, setPressedState] = useState(testOnly_pressed ?? false);\n\n const pressableRef = useRef<View>(null);\n\n // Disabled when onLongPress has been called\n const isPressCallbackEnabled = useRef<boolean>(true);\n const hasPassedBoundsChecks = useRef<boolean>(false);\n const shouldPreventNativeEffects = useRef<boolean>(false);\n\n const normalizedHitSlop: Insets = useMemo(\n () =>\n typeof hitSlop === 'number' ? numberAsInset(hitSlop) : (hitSlop ?? {}),\n [hitSlop]\n );\n\n const normalizedPressRetentionOffset: Insets = useMemo(\n () =>\n typeof pressRetentionOffset === 'number'\n ? numberAsInset(pressRetentionOffset)\n : (pressRetentionOffset ?? {}),\n [pressRetentionOffset]\n );\n\n const hoverInTimeout = useRef<number | null>(null);\n const hoverOutTimeout = useRef<number | null>(null);\n\n const hoverGesture = useMemo(\n () =>\n Gesture.Hover()\n .manualActivation(true) // Stops Hover from blocking Native gesture activation on web\n .cancelsTouchesInView(false)\n .onBegin((event) => {\n if (hoverOutTimeout.current) {\n clearTimeout(hoverOutTimeout.current);\n }\n if (delayHoverIn) {\n hoverInTimeout.current = setTimeout(\n () => onHoverIn?.(gestureToPressableEvent(event)),\n delayHoverIn\n );\n return;\n }\n onHoverIn?.(gestureToPressableEvent(event));\n })\n .onFinalize((event) => {\n if (hoverInTimeout.current) {\n clearTimeout(hoverInTimeout.current);\n }\n if (delayHoverOut) {\n hoverOutTimeout.current = setTimeout(\n () => onHoverOut?.(gestureToPressableEvent(event)),\n delayHoverOut\n );\n return;\n }\n onHoverOut?.(gestureToPressableEvent(event));\n }),\n [delayHoverIn, delayHoverOut, onHoverIn, onHoverOut]\n );\n\n const pressDelayTimeoutRef = useRef<number | null>(null);\n const isTouchPropagationAllowed = useRef<boolean>(false);\n\n // iOS only: due to varying flow of gestures, events sometimes have to be saved for later use\n const deferredEventPayload = useRef<PressableEvent | null>(null);\n\n const pressInHandler = useCallback(\n (event: PressableEvent) => {\n if (handlingOnTouchesDown.current) {\n deferredEventPayload.current = event;\n }\n\n if (!isTouchPropagationAllowed.current) {\n return;\n }\n\n deferredEventPayload.current = null;\n\n onPressIn?.(event);\n isPressCallbackEnabled.current = true;\n pressDelayTimeoutRef.current = null;\n setPressedState(true);\n },\n [onPressIn]\n );\n\n const pressOutHandler = useCallback(\n (event: PressableEvent) => {\n if (\n !hasPassedBoundsChecks.current ||\n event.nativeEvent.touches.length >\n event.nativeEvent.changedTouches.length\n ) {\n return;\n }\n\n if (unstable_pressDelay && pressDelayTimeoutRef.current !== null) {\n // When delay is preemptively finished by lifting touches,\n // we want to immediately activate it's effects - pressInHandler,\n // even though we are located at the pressOutHandler\n clearTimeout(pressDelayTimeoutRef.current);\n pressInHandler(event);\n }\n\n if (deferredEventPayload.current) {\n onPressIn?.(deferredEventPayload.current);\n deferredEventPayload.current = null;\n }\n\n onPressOut?.(event);\n\n if (isPressCallbackEnabled.current) {\n onPress?.(event);\n }\n\n if (longPressTimeoutRef.current) {\n clearTimeout(longPressTimeoutRef.current);\n longPressTimeoutRef.current = null;\n }\n\n isTouchPropagationAllowed.current = false;\n hasPassedBoundsChecks.current = false;\n isPressCallbackEnabled.current = true;\n setPressedState(false);\n },\n [onPress, onPressIn, onPressOut, pressInHandler, unstable_pressDelay]\n );\n\n const handlingOnTouchesDown = useRef<boolean>(false);\n const onEndHandlingTouchesDown = useRef<(() => void) | null>(null);\n const cancelledMidPress = useRef<boolean>(false);\n\n const activateLongPress = useCallback(\n (event: GestureTouchEvent) => {\n if (!isTouchPropagationAllowed.current) {\n return;\n }\n\n if (hasPassedBoundsChecks.current) {\n onLongPress?.(gestureTouchToPressableEvent(event));\n isPressCallbackEnabled.current = false;\n }\n\n if (longPressTimeoutRef.current) {\n clearTimeout(longPressTimeoutRef.current);\n longPressTimeoutRef.current = null;\n }\n },\n [onLongPress]\n );\n\n const longPressTimeoutRef = useRef<number | null>(null);\n const longPressMinDuration =\n (delayLongPress ?? DEFAULT_LONG_PRESS_DURATION) +\n (unstable_pressDelay ?? 0);\n\n const pressAndTouchGesture = useMemo(\n () =>\n Gesture.LongPress()\n .minDuration(INT32_MAX) // Stops long press from blocking native gesture\n .maxDistance(INT32_MAX) // Stops long press from cancelling after set distance\n .cancelsTouchesInView(false)\n .onTouchesDown((event) => {\n handlingOnTouchesDown.current = true;\n pressableRef.current?.measure((_x, _y, width, height) => {\n if (\n !isTouchWithinInset(\n {\n width,\n height,\n },\n normalizedHitSlop,\n event.changedTouches.at(-1)\n ) ||\n hasPassedBoundsChecks.current ||\n cancelledMidPress.current\n ) {\n cancelledMidPress.current = false;\n onEndHandlingTouchesDown.current = null;\n handlingOnTouchesDown.current = false;\n return;\n }\n\n hasPassedBoundsChecks.current = true;\n\n // In case of multiple touches, the first one starts long press gesture\n if (longPressTimeoutRef.current === null) {\n // Start long press gesture timer\n longPressTimeoutRef.current = setTimeout(\n () => activateLongPress(event),\n longPressMinDuration\n );\n }\n\n if (unstable_pressDelay) {\n pressDelayTimeoutRef.current = setTimeout(() => {\n pressInHandler(gestureTouchToPressableEvent(event));\n }, unstable_pressDelay);\n } else {\n pressInHandler(gestureTouchToPressableEvent(event));\n }\n\n onEndHandlingTouchesDown.current?.();\n onEndHandlingTouchesDown.current = null;\n handlingOnTouchesDown.current = false;\n });\n })\n .onTouchesUp((event) => {\n if (handlingOnTouchesDown.current) {\n onEndHandlingTouchesDown.current = () =>\n pressOutHandler(gestureTouchToPressableEvent(event));\n return;\n }\n // On iOS, short taps will make LongPress gesture call onTouchesUp before Native gesture calls onStart\n // This variable ensures that onStart isn't detected as the first gesture since Pressable is pressed.\n if (deferredEventPayload.current !== null) {\n shouldPreventNativeEffects.current = true;\n }\n pressOutHandler(gestureTouchToPressableEvent(event));\n })\n .onTouchesCancelled((event) => {\n isPressCallbackEnabled.current = false;\n\n if (handlingOnTouchesDown.current) {\n cancelledMidPress.current = true;\n onEndHandlingTouchesDown.current = () =>\n pressOutHandler(gestureTouchToPressableEvent(event));\n return;\n }\n\n if (\n !hasPassedBoundsChecks.current ||\n event.allTouches.length > event.changedTouches.length\n ) {\n return;\n }\n\n pressOutHandler(gestureTouchToPressableEvent(event));\n }),\n [\n activateLongPress,\n longPressMinDuration,\n normalizedHitSlop,\n pressInHandler,\n pressOutHandler,\n unstable_pressDelay,\n ]\n );\n\n // RNButton is placed inside ButtonGesture to enable Android's ripple and to capture non-propagating events\n const buttonGesture = useMemo(\n () =>\n Gesture.Native()\n .onBegin(() => {\n // Android sets BEGAN state on press down\n if (Platform.OS === 'android' || Platform.OS === 'macos') {\n isTouchPropagationAllowed.current = true;\n }\n })\n .onStart(() => {\n if (Platform.OS === 'web') {\n isTouchPropagationAllowed.current = true;\n }\n\n // iOS sets ACTIVE state on press down\n if (Platform.OS !== 'ios') {\n return;\n }\n\n if (deferredEventPayload.current) {\n isTouchPropagationAllowed.current = true;\n\n if (hasPassedBoundsChecks.current) {\n pressInHandler(deferredEventPayload.current);\n deferredEventPayload.current = null;\n } else {\n pressOutHandler(deferredEventPayload.current);\n isTouchPropagationAllowed.current = false;\n }\n\n return;\n }\n\n if (hasPassedBoundsChecks.current) {\n isTouchPropagationAllowed.current = true;\n return;\n }\n\n if (shouldPreventNativeEffects.current) {\n shouldPreventNativeEffects.current = false;\n return;\n }\n\n isTouchPropagationAllowed.current = true;\n }),\n [pressInHandler, pressOutHandler]\n );\n\n const appliedHitSlop = addInsets(\n normalizedHitSlop,\n normalizedPressRetentionOffset\n );\n\n const isPressableEnabled = disabled !== true;\n\n const gestures = [buttonGesture, pressAndTouchGesture, hoverGesture];\n\n for (const gesture of gestures) {\n gesture.enabled(isPressableEnabled);\n gesture.runOnJS(true);\n gesture.hitSlop(appliedHitSlop);\n gesture.shouldCancelWhenOutside(Platform.OS === 'web' ? false : true);\n }\n\n // Uses different hitSlop, to activate on hitSlop area instead of pressRetentionOffset area\n buttonGesture.hitSlop(normalizedHitSlop);\n\n const gesture = Gesture.Simultaneous(...gestures);\n\n // `cursor: 'pointer'` on `RNButton` crashes iOS\n const pointerStyle: StyleProp<ViewStyle> =\n Platform.OS === 'web' ? { cursor: 'pointer' } : {};\n\n const styleProp =\n typeof style === 'function' ? style({ pressed: pressedState }) : style;\n\n const childrenProp =\n typeof children === 'function'\n ? children({ pressed: pressedState })\n : children;\n\n const rippleColor = useMemo(() => {\n if (IS_FABRIC === null) {\n IS_FABRIC = isFabric();\n }\n\n const defaultRippleColor = android_ripple ? undefined : 'transparent';\n const unprocessedRippleColor = android_ripple?.color ?? defaultRippleColor;\n return IS_FABRIC\n ? unprocessedRippleColor\n : processColor(unprocessedRippleColor);\n }, [android_ripple]);\n\n return (\n <GestureDetector gesture={gesture}>\n <NativeButton\n {...remainingProps}\n ref={pressableRef}\n hitSlop={appliedHitSlop}\n enabled={isPressableEnabled}\n touchSoundDisabled={android_disableSound ?? undefined}\n rippleColor={rippleColor}\n rippleRadius={android_ripple?.radius ?? undefined}\n style={[pointerStyle, styleProp]}\n testOnly_onPress={IS_TEST_ENV ? onPress : undefined}\n testOnly_onPressIn={IS_TEST_ENV ? onPressIn : undefined}\n testOnly_onPressOut={IS_TEST_ENV ? onPressOut : undefined}\n testOnly_onLongPress={IS_TEST_ENV ? onLongPress : undefined}>\n {childrenProp}\n {__DEV__ ? (\n <PressabilityDebugView color=\"red\" hitSlop={normalizedHitSlop} />\n ) : null}\n </NativeButton>\n </GestureDetector>\n );\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["PressableProps.tsx"],"sourcesContent":["import {\n AccessibilityProps,\n ViewProps,\n Insets,\n StyleProp,\n ViewStyle,\n PressableStateCallbackType as RNPressableStateCallbackType,\n PressableAndroidRippleConfig as RNPressableAndroidRippleConfig,\n} from 'react-native';\n\nexport type PressableStateCallbackType = RNPressableStateCallbackType;\nexport type PressableAndroidRippleConfig = RNPressableAndroidRippleConfig;\n\nexport type InnerPressableEvent = {\n changedTouches: InnerPressableEvent[];\n identifier: number;\n locationX: number;\n locationY: number;\n pageX: number;\n pageY: number;\n target: number;\n timestamp: number;\n touches: InnerPressableEvent[];\n force?: number;\n};\n\nexport type PressableEvent = { nativeEvent: InnerPressableEvent };\n\nexport interface PressableProps\n extends AccessibilityProps,\n Omit<ViewProps, 'children' | 'style' | 'hitSlop'> {\n /**\n * Called when the hover is activated to provide visual feedback.\n */\n onHoverIn?: null | ((event: PressableEvent) => void);\n\n /**\n * Called when the hover is deactivated to undo visual feedback.\n */\n onHoverOut?: null | ((event: PressableEvent) => void);\n\n /**\n * Called when a single tap gesture is detected.\n */\n onPress?: null | ((event: PressableEvent) => void);\n\n /**\n * Called when a touch is engaged before `onPress`.\n */\n onPressIn?: null | ((event: PressableEvent) => void);\n\n /**\n * Called when a touch is released before `onPress`.\n */\n onPressOut?: null | ((event: PressableEvent) => void);\n\n /**\n * Called when a long-tap gesture is detected.\n */\n onLongPress?: null | ((event: PressableEvent) => void);\n\n /**\n * Either children or a render prop that receives a boolean reflecting whether\n * the component is currently pressed.\n */\n children?:\n | React.ReactNode\n | ((state: PressableStateCallbackType) => React.ReactNode);\n\n /**\n * Whether a press gesture can be interrupted by a parent gesture such as a\n * scroll event. Defaults to true.\n */\n cancelable?: null | boolean;\n\n /**\n * Duration to wait after hover in before calling `onHoverIn`.\n * @platform web macos\n *\n * NOTE: not present in RN docs\n */\n delayHoverIn?: number | null;\n\n /**\n * Duration to wait after hover out before calling `onHoverOut`.\n * @platform web macos\n *\n * NOTE: not present in RN docs\n */\n delayHoverOut?: number | null;\n\n /**\n * Duration (in milliseconds) from `onPressIn` before `onLongPress` is called.\n */\n delayLongPress?: null | number;\n\n /**\n * Whether the press behavior is disabled.\n */\n disabled?: null | boolean;\n\n /**\n * Additional distance outside of this view in which a press is detected.\n */\n hitSlop?: null | Insets | number;\n\n /**\n * Additional distance outside of this view in which a touch is considered a\n * press before `onPressOut` is triggered.\n */\n pressRetentionOffset?: null | Insets | number;\n\n /**\n * If true, doesn't play system sound on touch.\n * @platform android\n */\n android_disableSound?: null | boolean;\n\n /**\n * Enables the Android ripple effect and configures its color.\n * @platform android\n */\n android_ripple?: null | PressableAndroidRippleConfig;\n\n /**\n * Used only for documentation or testing (e.g. snapshot testing).\n */\n testOnly_pressed?: null | boolean;\n\n /**\n * Either view styles or a function that receives a boolean reflecting whether\n * the component is currently pressed and returns view styles.\n */\n style?:\n | StyleProp<ViewStyle>\n | ((state: PressableStateCallbackType) => StyleProp<ViewStyle>);\n\n /**\n * Duration (in milliseconds) to wait after press down before calling onPressIn.\n */\n unstable_pressDelay?: number;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["default"],"sources":["index.ts"],"sourcesContent":["export type {\n PressableProps,\n PressableStateCallbackType,\n} from './PressableProps';\nexport { default } from './Pressable';\n"],"mappings":"AAIA,SAASA,OAAO,QAAQ,aAAa","ignoreList":[]}
1
+ {"version":3,"sources":["index.ts"],"names":["default"],"mappings":"AAIA,SAASA,OAAT,QAAwB,aAAxB","sourcesContent":["export type {\n PressableProps,\n PressableStateCallbackType,\n} from './PressableProps';\nexport { default } from './Pressable';\n"]}