react-native-gesture-handler 2.22.1 → 2.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (677) hide show
  1. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +14 -0
  2. package/android/src/main/jni/cpp-adapter.cpp +19 -12
  3. package/apple/RNGestureHandler.mm +15 -8
  4. package/apple/RNGestureHandlerModule.mm +17 -5
  5. package/lib/commonjs/ActionType.js +3 -3
  6. package/lib/commonjs/ActionType.js.map +1 -1
  7. package/lib/commonjs/Directions.js +11 -8
  8. package/lib/commonjs/Directions.js.map +1 -1
  9. package/lib/commonjs/EnableNewWebImplementation.js +2 -10
  10. package/lib/commonjs/EnableNewWebImplementation.js.map +1 -1
  11. package/lib/commonjs/GestureHandlerRootViewContext.js +2 -7
  12. package/lib/commonjs/GestureHandlerRootViewContext.js.map +1 -1
  13. package/lib/commonjs/PlatformConstants.js +1 -6
  14. package/lib/commonjs/PlatformConstants.js.map +1 -1
  15. package/lib/commonjs/PlatformConstants.web.js +1 -3
  16. package/lib/commonjs/PlatformConstants.web.js.map +1 -1
  17. package/lib/commonjs/PointerType.js +3 -5
  18. package/lib/commonjs/PointerType.js.map +1 -1
  19. package/lib/commonjs/RNGestureHandlerModule.js +2 -6
  20. package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
  21. package/lib/commonjs/RNGestureHandlerModule.web.js +13 -39
  22. package/lib/commonjs/RNGestureHandlerModule.web.js.map +1 -1
  23. package/lib/commonjs/RNGestureHandlerModule.windows.js +22 -32
  24. package/lib/commonjs/RNGestureHandlerModule.windows.js.map +1 -1
  25. package/lib/commonjs/RNRenderer.js +1 -3
  26. package/lib/commonjs/RNRenderer.js.map +1 -1
  27. package/lib/commonjs/RNRenderer.web.js +1 -2
  28. package/lib/commonjs/RNRenderer.web.js.map +1 -1
  29. package/lib/commonjs/State.js +4 -3
  30. package/lib/commonjs/State.js.map +1 -1
  31. package/lib/commonjs/TouchEventType.js +3 -3
  32. package/lib/commonjs/TouchEventType.js.map +1 -1
  33. package/lib/commonjs/components/DrawerLayout.js +96 -115
  34. package/lib/commonjs/components/DrawerLayout.js.map +1 -1
  35. package/lib/commonjs/components/GestureButtons.js +36 -80
  36. package/lib/commonjs/components/GestureButtons.js.map +1 -1
  37. package/lib/commonjs/components/GestureButtonsProps.js.map +1 -1
  38. package/lib/commonjs/components/GestureComponents.js +26 -37
  39. package/lib/commonjs/components/GestureComponents.js.map +1 -1
  40. package/lib/commonjs/components/GestureComponents.web.js +13 -27
  41. package/lib/commonjs/components/GestureComponents.web.js.map +1 -1
  42. package/lib/commonjs/components/GestureHandlerButton.js +2 -6
  43. package/lib/commonjs/components/GestureHandlerButton.js.map +1 -1
  44. package/lib/commonjs/components/GestureHandlerButton.web.js +4 -12
  45. package/lib/commonjs/components/GestureHandlerButton.web.js.map +1 -1
  46. package/lib/commonjs/components/GestureHandlerRootView.android.js +4 -15
  47. package/lib/commonjs/components/GestureHandlerRootView.android.js.map +1 -1
  48. package/lib/commonjs/components/GestureHandlerRootView.js +4 -14
  49. package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
  50. package/lib/commonjs/components/GestureHandlerRootView.web.js +4 -13
  51. package/lib/commonjs/components/GestureHandlerRootView.web.js.map +1 -1
  52. package/lib/commonjs/components/Pressable/Pressable.js +46 -78
  53. package/lib/commonjs/components/Pressable/Pressable.js.map +1 -1
  54. package/lib/commonjs/components/Pressable/PressableProps.js.map +1 -1
  55. package/lib/commonjs/components/Pressable/index.js +1 -3
  56. package/lib/commonjs/components/Pressable/index.js.map +1 -1
  57. package/lib/commonjs/components/Pressable/utils.js +5 -20
  58. package/lib/commonjs/components/Pressable/utils.js.map +1 -1
  59. package/lib/commonjs/components/ReanimatedDrawerLayout.js +38 -76
  60. package/lib/commonjs/components/ReanimatedDrawerLayout.js.map +1 -1
  61. package/lib/commonjs/components/ReanimatedSwipeable.js +61 -59
  62. package/lib/commonjs/components/ReanimatedSwipeable.js.map +1 -1
  63. package/lib/commonjs/components/Swipeable.js +34 -75
  64. package/lib/commonjs/components/Swipeable.js.map +1 -1
  65. package/lib/commonjs/components/Text.js +18 -26
  66. package/lib/commonjs/components/Text.js.map +1 -1
  67. package/lib/commonjs/components/gestureHandlerRootHOC.js +5 -14
  68. package/lib/commonjs/components/gestureHandlerRootHOC.js.map +1 -1
  69. package/lib/commonjs/components/touchables/GenericTouchable.js +40 -76
  70. package/lib/commonjs/components/touchables/GenericTouchable.js.map +1 -1
  71. package/lib/commonjs/components/touchables/GenericTouchableProps.js.map +1 -1
  72. package/lib/commonjs/components/touchables/TouchableHighlight.js +20 -33
  73. package/lib/commonjs/components/touchables/TouchableHighlight.js.map +1 -1
  74. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +17 -31
  75. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  76. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +5 -4
  77. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js.map +1 -1
  78. package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js.map +1 -1
  79. package/lib/commonjs/components/touchables/TouchableOpacity.js +17 -24
  80. package/lib/commonjs/components/touchables/TouchableOpacity.js.map +1 -1
  81. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +12 -13
  82. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  83. package/lib/commonjs/components/touchables/index.js +7 -12
  84. package/lib/commonjs/components/touchables/index.js.map +1 -1
  85. package/lib/commonjs/findNodeHandle.js +1 -4
  86. package/lib/commonjs/findNodeHandle.js.map +1 -1
  87. package/lib/commonjs/findNodeHandle.web.js +9 -10
  88. package/lib/commonjs/findNodeHandle.web.js.map +1 -1
  89. package/lib/commonjs/getReactNativeVersion.js +1 -6
  90. package/lib/commonjs/getReactNativeVersion.js.map +1 -1
  91. package/lib/commonjs/getReactNativeVersion.web.js +0 -1
  92. package/lib/commonjs/getReactNativeVersion.web.js.map +1 -1
  93. package/lib/commonjs/getShadowNodeFromRef.js +13 -14
  94. package/lib/commonjs/getShadowNodeFromRef.js.map +1 -1
  95. package/lib/commonjs/getShadowNodeFromRef.web.js +0 -1
  96. package/lib/commonjs/getShadowNodeFromRef.web.js.map +1 -1
  97. package/lib/commonjs/ghQueueMicrotask.js +1 -2
  98. package/lib/commonjs/ghQueueMicrotask.js.map +1 -1
  99. package/lib/commonjs/handlers/FlingGestureHandler.js +16 -10
  100. package/lib/commonjs/handlers/FlingGestureHandler.js.map +1 -1
  101. package/lib/commonjs/handlers/ForceTouchGestureHandler.js +20 -23
  102. package/lib/commonjs/handlers/ForceTouchGestureHandler.js.map +1 -1
  103. package/lib/commonjs/handlers/GestureHandlerEventPayload.js.map +1 -1
  104. package/lib/commonjs/handlers/LongPressGestureHandler.js +16 -10
  105. package/lib/commonjs/handlers/LongPressGestureHandler.js.map +1 -1
  106. package/lib/commonjs/handlers/NativeViewGestureHandler.js +17 -12
  107. package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +1 -1
  108. package/lib/commonjs/handlers/PanGestureHandler.js +20 -31
  109. package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -1
  110. package/lib/commonjs/handlers/PinchGestureHandler.js +14 -8
  111. package/lib/commonjs/handlers/PinchGestureHandler.js.map +1 -1
  112. package/lib/commonjs/handlers/PressabilityDebugView.js +0 -1
  113. package/lib/commonjs/handlers/PressabilityDebugView.js.map +1 -1
  114. package/lib/commonjs/handlers/PressabilityDebugView.web.js +0 -1
  115. package/lib/commonjs/handlers/PressabilityDebugView.web.js.map +1 -1
  116. package/lib/commonjs/handlers/RotationGestureHandler.js +14 -8
  117. package/lib/commonjs/handlers/RotationGestureHandler.js.map +1 -1
  118. package/lib/commonjs/handlers/TapGestureHandler.js +16 -10
  119. package/lib/commonjs/handlers/TapGestureHandler.js.map +1 -1
  120. package/lib/commonjs/handlers/createHandler.js +55 -135
  121. package/lib/commonjs/handlers/createHandler.js.map +1 -1
  122. package/lib/commonjs/handlers/createNativeWrapper.js +17 -27
  123. package/lib/commonjs/handlers/createNativeWrapper.js.map +1 -1
  124. package/lib/commonjs/handlers/customDirectEventTypes.js +0 -1
  125. package/lib/commonjs/handlers/customDirectEventTypes.js.map +1 -1
  126. package/lib/commonjs/handlers/customDirectEventTypes.web.js +1 -2
  127. package/lib/commonjs/handlers/customDirectEventTypes.web.js.map +1 -1
  128. package/lib/commonjs/handlers/gestureHandlerCommon.js +9 -10
  129. package/lib/commonjs/handlers/gestureHandlerCommon.js.map +1 -1
  130. package/lib/commonjs/handlers/gestureHandlerTypesCompat.js.map +1 -1
  131. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js +5 -14
  132. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
  133. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js +10 -20
  134. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
  135. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js +9 -29
  136. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
  137. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js +1 -10
  138. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
  139. package/lib/commonjs/handlers/gestures/GestureDetector/index.js +12 -37
  140. package/lib/commonjs/handlers/gestures/GestureDetector/index.js.map +1 -1
  141. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js +0 -3
  142. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -1
  143. package/lib/commonjs/handlers/gestures/GestureDetector/types.js.map +1 -1
  144. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js +12 -24
  145. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
  146. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js +12 -48
  147. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
  148. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js +3 -13
  149. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
  150. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js +2 -9
  151. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
  152. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js +8 -16
  153. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
  154. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js +28 -56
  155. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js.map +1 -1
  156. package/lib/commonjs/handlers/gestures/eventReceiver.js +14 -46
  157. package/lib/commonjs/handlers/gestures/eventReceiver.js.map +1 -1
  158. package/lib/commonjs/handlers/gestures/flingGesture.js +5 -12
  159. package/lib/commonjs/handlers/gestures/flingGesture.js.map +1 -1
  160. package/lib/commonjs/handlers/gestures/forceTouchGesture.js +8 -19
  161. package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -1
  162. package/lib/commonjs/handlers/gestures/gesture.js +44 -84
  163. package/lib/commonjs/handlers/gestures/gesture.js.map +1 -1
  164. package/lib/commonjs/handlers/gestures/gestureComposition.js +17 -31
  165. package/lib/commonjs/handlers/gestures/gestureComposition.js.map +1 -1
  166. package/lib/commonjs/handlers/gestures/gestureObjects.js +1 -27
  167. package/lib/commonjs/handlers/gestures/gestureObjects.js.map +1 -1
  168. package/lib/commonjs/handlers/gestures/gestureStateManager.js +3 -9
  169. package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +1 -1
  170. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js +2 -7
  171. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js.map +1 -1
  172. package/lib/commonjs/handlers/gestures/hoverGesture.js +11 -25
  173. package/lib/commonjs/handlers/gestures/hoverGesture.js.map +1 -1
  174. package/lib/commonjs/handlers/gestures/longPressGesture.js +6 -14
  175. package/lib/commonjs/handlers/gestures/longPressGesture.js.map +1 -1
  176. package/lib/commonjs/handlers/gestures/manualGesture.js +0 -6
  177. package/lib/commonjs/handlers/gestures/manualGesture.js.map +1 -1
  178. package/lib/commonjs/handlers/gestures/nativeGesture.js +5 -12
  179. package/lib/commonjs/handlers/gestures/nativeGesture.js.map +1 -1
  180. package/lib/commonjs/handlers/gestures/panGesture.js +18 -43
  181. package/lib/commonjs/handlers/gestures/panGesture.js.map +1 -1
  182. package/lib/commonjs/handlers/gestures/pinchGesture.js +2 -9
  183. package/lib/commonjs/handlers/gestures/pinchGesture.js.map +1 -1
  184. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js +1 -8
  185. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js.map +1 -1
  186. package/lib/commonjs/handlers/gestures/rotationGesture.js +2 -9
  187. package/lib/commonjs/handlers/gestures/rotationGesture.js.map +1 -1
  188. package/lib/commonjs/handlers/gestures/tapGesture.js +10 -22
  189. package/lib/commonjs/handlers/gestures/tapGesture.js.map +1 -1
  190. package/lib/commonjs/handlers/getNextHandlerTag.js +0 -1
  191. package/lib/commonjs/handlers/getNextHandlerTag.js.map +1 -1
  192. package/lib/commonjs/handlers/handlersRegistry.js +11 -21
  193. package/lib/commonjs/handlers/handlersRegistry.js.map +1 -1
  194. package/lib/commonjs/handlers/utils.js +6 -26
  195. package/lib/commonjs/handlers/utils.js.map +1 -1
  196. package/lib/commonjs/index.js +75 -104
  197. package/lib/commonjs/index.js.map +1 -1
  198. package/lib/commonjs/init.js +4 -11
  199. package/lib/commonjs/init.js.map +1 -1
  200. package/lib/commonjs/jestUtils/index.js +4 -5
  201. package/lib/commonjs/jestUtils/index.js.map +1 -1
  202. package/lib/commonjs/jestUtils/jestUtils.js +19 -83
  203. package/lib/commonjs/jestUtils/jestUtils.js.map +1 -1
  204. package/lib/commonjs/mocks.js +5 -15
  205. package/lib/commonjs/mocks.js.map +1 -1
  206. package/lib/commonjs/mountRegistry.js +3 -12
  207. package/lib/commonjs/mountRegistry.js.map +1 -1
  208. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +1 -5
  209. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +1 -1
  210. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js +2 -7
  211. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
  212. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js +2 -7
  213. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
  214. package/lib/commonjs/typeUtils.js.map +1 -1
  215. package/lib/commonjs/utils.js +15 -30
  216. package/lib/commonjs/utils.js.map +1 -1
  217. package/lib/commonjs/web/Gestures.js +5 -23
  218. package/lib/commonjs/web/Gestures.js.map +1 -1
  219. package/lib/commonjs/web/constants.js +2 -4
  220. package/lib/commonjs/web/constants.js.map +1 -1
  221. package/lib/commonjs/web/detectors/RotationGestureDetector.js +26 -62
  222. package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +1 -1
  223. package/lib/commonjs/web/detectors/ScaleGestureDetector.js +36 -65
  224. package/lib/commonjs/web/detectors/ScaleGestureDetector.js.map +1 -1
  225. package/lib/commonjs/web/handlers/FlingGestureHandler.js +12 -55
  226. package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -1
  227. package/lib/commonjs/web/handlers/GestureHandler.js +160 -273
  228. package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
  229. package/lib/commonjs/web/handlers/HoverGestureHandler.js +8 -21
  230. package/lib/commonjs/web/handlers/HoverGestureHandler.js.map +1 -1
  231. package/lib/commonjs/web/handlers/IGestureHandler.js.map +1 -1
  232. package/lib/commonjs/web/handlers/LongPressGestureHandler.js +12 -53
  233. package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +1 -1
  234. package/lib/commonjs/web/handlers/ManualGestureHandler.js +1 -11
  235. package/lib/commonjs/web/handlers/ManualGestureHandler.js.map +1 -1
  236. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js +21 -62
  237. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js.map +1 -1
  238. package/lib/commonjs/web/handlers/PanGestureHandler.js +23 -138
  239. package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
  240. package/lib/commonjs/web/handlers/PinchGestureHandler.js +19 -56
  241. package/lib/commonjs/web/handlers/PinchGestureHandler.js.map +1 -1
  242. package/lib/commonjs/web/handlers/RotationGestureHandler.js +16 -54
  243. package/lib/commonjs/web/handlers/RotationGestureHandler.js.map +1 -1
  244. package/lib/commonjs/web/handlers/TapGestureHandler.js +10 -71
  245. package/lib/commonjs/web/handlers/TapGestureHandler.js.map +1 -1
  246. package/lib/commonjs/web/interfaces.js +9 -17
  247. package/lib/commonjs/web/interfaces.js.map +1 -1
  248. package/lib/commonjs/web/tools/CircularBuffer.js +17 -29
  249. package/lib/commonjs/web/tools/CircularBuffer.js.map +1 -1
  250. package/lib/commonjs/web/tools/EventManager.js +7 -41
  251. package/lib/commonjs/web/tools/EventManager.js.map +1 -1
  252. package/lib/commonjs/web/tools/GestureHandlerDelegate.js.map +1 -1
  253. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +51 -118
  254. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  255. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +37 -58
  256. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  257. package/lib/commonjs/web/tools/InteractionManager.js +21 -40
  258. package/lib/commonjs/web/tools/InteractionManager.js.map +1 -1
  259. package/lib/commonjs/web/tools/KeyboardEventManager.js +4 -26
  260. package/lib/commonjs/web/tools/KeyboardEventManager.js.map +1 -1
  261. package/lib/commonjs/web/tools/LeastSquareSolver.js +30 -67
  262. package/lib/commonjs/web/tools/LeastSquareSolver.js.map +1 -1
  263. package/lib/commonjs/web/tools/NodeManager.js +9 -16
  264. package/lib/commonjs/web/tools/NodeManager.js.map +1 -1
  265. package/lib/commonjs/web/tools/PointerEventManager.js +10 -45
  266. package/lib/commonjs/web/tools/PointerEventManager.js.map +1 -1
  267. package/lib/commonjs/web/tools/PointerTracker.js +24 -60
  268. package/lib/commonjs/web/tools/PointerTracker.js.map +1 -1
  269. package/lib/commonjs/web/tools/Vector.js +3 -18
  270. package/lib/commonjs/web/tools/Vector.js.map +1 -1
  271. package/lib/commonjs/web/tools/VelocityTracker.js +10 -32
  272. package/lib/commonjs/web/tools/VelocityTracker.js.map +1 -1
  273. package/lib/commonjs/web/tools/WheelEventManager.js +4 -17
  274. package/lib/commonjs/web/tools/WheelEventManager.js.map +1 -1
  275. package/lib/commonjs/web/utils.js +26 -55
  276. package/lib/commonjs/web/utils.js.map +1 -1
  277. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js +7 -19
  278. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js.map +1 -1
  279. package/lib/commonjs/web_hammer/DraggingGestureHandler.js +3 -13
  280. package/lib/commonjs/web_hammer/DraggingGestureHandler.js.map +1 -1
  281. package/lib/commonjs/web_hammer/Errors.js +0 -3
  282. package/lib/commonjs/web_hammer/Errors.js.map +1 -1
  283. package/lib/commonjs/web_hammer/FlingGestureHandler.js +13 -44
  284. package/lib/commonjs/web_hammer/FlingGestureHandler.js.map +1 -1
  285. package/lib/commonjs/web_hammer/GestureHandler.js +55 -142
  286. package/lib/commonjs/web_hammer/GestureHandler.js.map +1 -1
  287. package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js +2 -11
  288. package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js.map +1 -1
  289. package/lib/commonjs/web_hammer/LongPressGestureHandler.js +5 -19
  290. package/lib/commonjs/web_hammer/LongPressGestureHandler.js.map +1 -1
  291. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js +16 -24
  292. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js.map +1 -1
  293. package/lib/commonjs/web_hammer/NodeManager.js +9 -16
  294. package/lib/commonjs/web_hammer/NodeManager.js.map +1 -1
  295. package/lib/commonjs/web_hammer/PanGestureHandler.js +8 -49
  296. package/lib/commonjs/web_hammer/PanGestureHandler.js.map +1 -1
  297. package/lib/commonjs/web_hammer/PinchGestureHandler.js +2 -11
  298. package/lib/commonjs/web_hammer/PinchGestureHandler.js.map +1 -1
  299. package/lib/commonjs/web_hammer/PressGestureHandler.js +15 -43
  300. package/lib/commonjs/web_hammer/PressGestureHandler.js.map +1 -1
  301. package/lib/commonjs/web_hammer/RotationGestureHandler.js +2 -13
  302. package/lib/commonjs/web_hammer/RotationGestureHandler.js.map +1 -1
  303. package/lib/commonjs/web_hammer/TapGestureHandler.js +33 -52
  304. package/lib/commonjs/web_hammer/TapGestureHandler.js.map +1 -1
  305. package/lib/commonjs/web_hammer/constants.js +13 -26
  306. package/lib/commonjs/web_hammer/constants.js.map +1 -1
  307. package/lib/commonjs/web_hammer/utils.js +4 -14
  308. package/lib/commonjs/web_hammer/utils.js.map +1 -1
  309. package/lib/module/ActionType.js +3 -1
  310. package/lib/module/ActionType.js.map +1 -1
  311. package/lib/module/Directions.js +9 -3
  312. package/lib/module/Directions.js.map +1 -1
  313. package/lib/module/EnableNewWebImplementation.js +2 -5
  314. package/lib/module/EnableNewWebImplementation.js.map +1 -1
  315. package/lib/module/GestureHandlerRootViewContext.js.map +1 -1
  316. package/lib/module/PlatformConstants.js +0 -1
  317. package/lib/module/PlatformConstants.js.map +1 -1
  318. package/lib/module/PlatformConstants.web.js +0 -1
  319. package/lib/module/PlatformConstants.web.js.map +1 -1
  320. package/lib/module/PointerType.js +3 -4
  321. package/lib/module/PointerType.js.map +1 -1
  322. package/lib/module/RNGestureHandlerModule.js +1 -0
  323. package/lib/module/RNGestureHandlerModule.js.map +1 -1
  324. package/lib/module/RNGestureHandlerModule.web.js +12 -22
  325. package/lib/module/RNGestureHandlerModule.web.js.map +1 -1
  326. package/lib/module/RNGestureHandlerModule.windows.js +18 -17
  327. package/lib/module/RNGestureHandlerModule.windows.js.map +1 -1
  328. package/lib/module/RNRenderer.js.map +1 -1
  329. package/lib/module/RNRenderer.web.js.map +1 -1
  330. package/lib/module/State.js +4 -1
  331. package/lib/module/State.js.map +1 -1
  332. package/lib/module/TouchEventType.js +3 -1
  333. package/lib/module/TouchEventType.js.map +1 -1
  334. package/lib/module/components/DrawerLayout.js +87 -99
  335. package/lib/module/components/DrawerLayout.js.map +1 -1
  336. package/lib/module/components/GestureButtons.js +27 -55
  337. package/lib/module/components/GestureButtons.js.map +1 -1
  338. package/lib/module/components/GestureButtonsProps.js.map +1 -1
  339. package/lib/module/components/GestureComponents.js +17 -12
  340. package/lib/module/components/GestureComponents.js.map +1 -1
  341. package/lib/module/components/GestureComponents.web.js +4 -4
  342. package/lib/module/components/GestureComponents.web.js.map +1 -1
  343. package/lib/module/components/GestureHandlerButton.js.map +1 -1
  344. package/lib/module/components/GestureHandlerButton.web.js +1 -2
  345. package/lib/module/components/GestureHandlerButton.web.js.map +1 -1
  346. package/lib/module/components/GestureHandlerRootView.android.js +1 -2
  347. package/lib/module/components/GestureHandlerRootView.android.js.map +1 -1
  348. package/lib/module/components/GestureHandlerRootView.js +1 -2
  349. package/lib/module/components/GestureHandlerRootView.js.map +1 -1
  350. package/lib/module/components/GestureHandlerRootView.web.js +1 -2
  351. package/lib/module/components/GestureHandlerRootView.web.js.map +1 -1
  352. package/lib/module/components/Pressable/Pressable.js +44 -61
  353. package/lib/module/components/Pressable/Pressable.js.map +1 -1
  354. package/lib/module/components/Pressable/PressableProps.js.map +1 -1
  355. package/lib/module/components/Pressable/index.js.map +1 -1
  356. package/lib/module/components/Pressable/utils.js +4 -14
  357. package/lib/module/components/Pressable/utils.js.map +1 -1
  358. package/lib/module/components/ReanimatedDrawerLayout.js +34 -56
  359. package/lib/module/components/ReanimatedDrawerLayout.js.map +1 -1
  360. package/lib/module/components/ReanimatedSwipeable.js +57 -44
  361. package/lib/module/components/ReanimatedSwipeable.js.map +1 -1
  362. package/lib/module/components/Swipeable.js +28 -59
  363. package/lib/module/components/Swipeable.js.map +1 -1
  364. package/lib/module/components/Text.js +14 -13
  365. package/lib/module/components/Text.js.map +1 -1
  366. package/lib/module/components/gestureHandlerRootHOC.js +2 -2
  367. package/lib/module/components/gestureHandlerRootHOC.js.map +1 -1
  368. package/lib/module/components/touchables/GenericTouchable.js +34 -63
  369. package/lib/module/components/touchables/GenericTouchable.js.map +1 -1
  370. package/lib/module/components/touchables/GenericTouchableProps.js.map +1 -1
  371. package/lib/module/components/touchables/TouchableHighlight.js +16 -23
  372. package/lib/module/components/touchables/TouchableHighlight.js.map +1 -1
  373. package/lib/module/components/touchables/TouchableNativeFeedback.android.js +11 -19
  374. package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  375. package/lib/module/components/touchables/TouchableNativeFeedback.js +6 -1
  376. package/lib/module/components/touchables/TouchableNativeFeedback.js.map +1 -1
  377. package/lib/module/components/touchables/TouchableNativeFeedbackProps.js.map +1 -1
  378. package/lib/module/components/touchables/TouchableOpacity.js +13 -14
  379. package/lib/module/components/touchables/TouchableOpacity.js.map +1 -1
  380. package/lib/module/components/touchables/TouchableWithoutFeedback.js +9 -2
  381. package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  382. package/lib/module/components/touchables/index.js.map +1 -1
  383. package/lib/module/findNodeHandle.js.map +1 -1
  384. package/lib/module/findNodeHandle.web.js +9 -8
  385. package/lib/module/findNodeHandle.web.js.map +1 -1
  386. package/lib/module/getReactNativeVersion.js.map +1 -1
  387. package/lib/module/getReactNativeVersion.web.js.map +1 -1
  388. package/lib/module/getShadowNodeFromRef.js +13 -13
  389. package/lib/module/getShadowNodeFromRef.js.map +1 -1
  390. package/lib/module/getShadowNodeFromRef.web.js.map +1 -1
  391. package/lib/module/ghQueueMicrotask.js.map +1 -1
  392. package/lib/module/handlers/FlingGestureHandler.js +13 -0
  393. package/lib/module/handlers/FlingGestureHandler.js.map +1 -1
  394. package/lib/module/handlers/ForceTouchGestureHandler.js +16 -8
  395. package/lib/module/handlers/ForceTouchGestureHandler.js.map +1 -1
  396. package/lib/module/handlers/GestureHandlerEventPayload.js.map +1 -1
  397. package/lib/module/handlers/LongPressGestureHandler.js +13 -0
  398. package/lib/module/handlers/LongPressGestureHandler.js.map +1 -1
  399. package/lib/module/handlers/NativeViewGestureHandler.js +13 -0
  400. package/lib/module/handlers/NativeViewGestureHandler.js.map +1 -1
  401. package/lib/module/handlers/PanGestureHandler.js +15 -19
  402. package/lib/module/handlers/PanGestureHandler.js.map +1 -1
  403. package/lib/module/handlers/PinchGestureHandler.js +13 -0
  404. package/lib/module/handlers/PinchGestureHandler.js.map +1 -1
  405. package/lib/module/handlers/PressabilityDebugView.js.map +1 -1
  406. package/lib/module/handlers/PressabilityDebugView.web.js.map +1 -1
  407. package/lib/module/handlers/RotationGestureHandler.js +13 -0
  408. package/lib/module/handlers/RotationGestureHandler.js.map +1 -1
  409. package/lib/module/handlers/TapGestureHandler.js +13 -0
  410. package/lib/module/handlers/TapGestureHandler.js.map +1 -1
  411. package/lib/module/handlers/createHandler.js +54 -108
  412. package/lib/module/handlers/createHandler.js.map +1 -1
  413. package/lib/module/handlers/createNativeWrapper.js +12 -17
  414. package/lib/module/handlers/createNativeWrapper.js.map +1 -1
  415. package/lib/module/handlers/customDirectEventTypes.js.map +1 -1
  416. package/lib/module/handlers/customDirectEventTypes.web.js.map +1 -1
  417. package/lib/module/handlers/gestureHandlerCommon.js +9 -4
  418. package/lib/module/handlers/gestureHandlerCommon.js.map +1 -1
  419. package/lib/module/handlers/gestureHandlerTypesCompat.js.map +1 -1
  420. package/lib/module/handlers/gestures/GestureDetector/Wrap.js +3 -4
  421. package/lib/module/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
  422. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js +5 -6
  423. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
  424. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js +8 -16
  425. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
  426. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js +0 -1
  427. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
  428. package/lib/module/handlers/gestures/GestureDetector/index.js +9 -15
  429. package/lib/module/handlers/gestures/GestureDetector/index.js.map +1 -1
  430. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js +0 -2
  431. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -1
  432. package/lib/module/handlers/gestures/GestureDetector/types.js.map +1 -1
  433. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js +11 -14
  434. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
  435. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js +12 -39
  436. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
  437. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js +5 -5
  438. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
  439. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js +2 -6
  440. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
  441. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js +7 -9
  442. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
  443. package/lib/module/handlers/gestures/GestureDetector/utils.js +25 -30
  444. package/lib/module/handlers/gestures/GestureDetector/utils.js.map +1 -1
  445. package/lib/module/handlers/gestures/eventReceiver.js +14 -38
  446. package/lib/module/handlers/gestures/eventReceiver.js.map +1 -1
  447. package/lib/module/handlers/gestures/flingGesture.js +5 -9
  448. package/lib/module/handlers/gestures/flingGesture.js.map +1 -1
  449. package/lib/module/handlers/gestures/forceTouchGesture.js +8 -17
  450. package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -1
  451. package/lib/module/handlers/gestures/gesture.js +44 -73
  452. package/lib/module/handlers/gestures/gesture.js.map +1 -1
  453. package/lib/module/handlers/gestures/gestureComposition.js +16 -24
  454. package/lib/module/handlers/gestures/gestureComposition.js.map +1 -1
  455. package/lib/module/handlers/gestures/gestureObjects.js +1 -14
  456. package/lib/module/handlers/gestures/gestureObjects.js.map +1 -1
  457. package/lib/module/handlers/gestures/gestureStateManager.js +3 -4
  458. package/lib/module/handlers/gestures/gestureStateManager.js.map +1 -1
  459. package/lib/module/handlers/gestures/gestureStateManager.web.js +0 -1
  460. package/lib/module/handlers/gestures/gestureStateManager.web.js.map +1 -1
  461. package/lib/module/handlers/gestures/hoverGesture.js +9 -18
  462. package/lib/module/handlers/gestures/hoverGesture.js.map +1 -1
  463. package/lib/module/handlers/gestures/longPressGesture.js +6 -11
  464. package/lib/module/handlers/gestures/longPressGesture.js.map +1 -1
  465. package/lib/module/handlers/gestures/manualGesture.js +0 -4
  466. package/lib/module/handlers/gestures/manualGesture.js.map +1 -1
  467. package/lib/module/handlers/gestures/nativeGesture.js +5 -9
  468. package/lib/module/handlers/gestures/nativeGesture.js.map +1 -1
  469. package/lib/module/handlers/gestures/panGesture.js +18 -41
  470. package/lib/module/handlers/gestures/panGesture.js.map +1 -1
  471. package/lib/module/handlers/gestures/pinchGesture.js +2 -7
  472. package/lib/module/handlers/gestures/pinchGesture.js.map +1 -1
  473. package/lib/module/handlers/gestures/reanimatedWrapper.js +0 -5
  474. package/lib/module/handlers/gestures/reanimatedWrapper.js.map +1 -1
  475. package/lib/module/handlers/gestures/rotationGesture.js +2 -7
  476. package/lib/module/handlers/gestures/rotationGesture.js.map +1 -1
  477. package/lib/module/handlers/gestures/tapGesture.js +10 -19
  478. package/lib/module/handlers/gestures/tapGesture.js.map +1 -1
  479. package/lib/module/handlers/getNextHandlerTag.js.map +1 -1
  480. package/lib/module/handlers/handlersRegistry.js +6 -8
  481. package/lib/module/handlers/handlersRegistry.js.map +1 -1
  482. package/lib/module/handlers/utils.js +4 -13
  483. package/lib/module/handlers/utils.js.map +1 -1
  484. package/lib/module/index.js.map +1 -1
  485. package/lib/module/init.js +3 -2
  486. package/lib/module/init.js.map +1 -1
  487. package/lib/module/jestUtils/index.js.map +1 -1
  488. package/lib/module/jestUtils/jestUtils.js +20 -66
  489. package/lib/module/jestUtils/jestUtils.js.map +1 -1
  490. package/lib/module/mocks.js +3 -7
  491. package/lib/module/mocks.js.map +1 -1
  492. package/lib/module/mountRegistry.js +3 -10
  493. package/lib/module/mountRegistry.js.map +1 -1
  494. package/lib/module/specs/NativeRNGestureHandlerModule.js.map +1 -1
  495. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
  496. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
  497. package/lib/module/typeUtils.js.map +1 -1
  498. package/lib/module/utils.js +8 -13
  499. package/lib/module/utils.js.map +1 -1
  500. package/lib/module/web/Gestures.js +2 -1
  501. package/lib/module/web/Gestures.js.map +1 -1
  502. package/lib/module/web/constants.js.map +1 -1
  503. package/lib/module/web/detectors/RotationGestureDetector.js +26 -59
  504. package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -1
  505. package/lib/module/web/detectors/ScaleGestureDetector.js +36 -61
  506. package/lib/module/web/detectors/ScaleGestureDetector.js.map +1 -1
  507. package/lib/module/web/handlers/FlingGestureHandler.js +11 -45
  508. package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
  509. package/lib/module/web/handlers/GestureHandler.js +159 -259
  510. package/lib/module/web/handlers/GestureHandler.js.map +1 -1
  511. package/lib/module/web/handlers/HoverGestureHandler.js +7 -13
  512. package/lib/module/web/handlers/HoverGestureHandler.js.map +1 -1
  513. package/lib/module/web/handlers/IGestureHandler.js.map +1 -1
  514. package/lib/module/web/handlers/LongPressGestureHandler.js +11 -46
  515. package/lib/module/web/handlers/LongPressGestureHandler.js.map +1 -1
  516. package/lib/module/web/handlers/ManualGestureHandler.js +0 -6
  517. package/lib/module/web/handlers/ManualGestureHandler.js.map +1 -1
  518. package/lib/module/web/handlers/NativeViewGestureHandler.js +20 -54
  519. package/lib/module/web/handlers/NativeViewGestureHandler.js.map +1 -1
  520. package/lib/module/web/handlers/PanGestureHandler.js +22 -129
  521. package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
  522. package/lib/module/web/handlers/PinchGestureHandler.js +18 -48
  523. package/lib/module/web/handlers/PinchGestureHandler.js.map +1 -1
  524. package/lib/module/web/handlers/RotationGestureHandler.js +15 -46
  525. package/lib/module/web/handlers/RotationGestureHandler.js.map +1 -1
  526. package/lib/module/web/handlers/TapGestureHandler.js +9 -63
  527. package/lib/module/web/handlers/TapGestureHandler.js.map +1 -1
  528. package/lib/module/web/interfaces.js +9 -14
  529. package/lib/module/web/interfaces.js.map +1 -1
  530. package/lib/module/web/tools/CircularBuffer.js +17 -27
  531. package/lib/module/web/tools/CircularBuffer.js.map +1 -1
  532. package/lib/module/web/tools/EventManager.js +7 -39
  533. package/lib/module/web/tools/EventManager.js.map +1 -1
  534. package/lib/module/web/tools/GestureHandlerDelegate.js.map +1 -1
  535. package/lib/module/web/tools/GestureHandlerOrchestrator.js +50 -111
  536. package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  537. package/lib/module/web/tools/GestureHandlerWebDelegate.js +36 -47
  538. package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  539. package/lib/module/web/tools/InteractionManager.js +21 -35
  540. package/lib/module/web/tools/InteractionManager.js.map +1 -1
  541. package/lib/module/web/tools/KeyboardEventManager.js +3 -19
  542. package/lib/module/web/tools/KeyboardEventManager.js.map +1 -1
  543. package/lib/module/web/tools/LeastSquareSolver.js +30 -65
  544. package/lib/module/web/tools/LeastSquareSolver.js.map +1 -1
  545. package/lib/module/web/tools/NodeManager.js +9 -14
  546. package/lib/module/web/tools/NodeManager.js.map +1 -1
  547. package/lib/module/web/tools/PointerEventManager.js +9 -35
  548. package/lib/module/web/tools/PointerEventManager.js.map +1 -1
  549. package/lib/module/web/tools/PointerTracker.js +23 -54
  550. package/lib/module/web/tools/PointerTracker.js.map +1 -1
  551. package/lib/module/web/tools/Vector.js +3 -14
  552. package/lib/module/web/tools/Vector.js.map +1 -1
  553. package/lib/module/web/tools/VelocityTracker.js +9 -26
  554. package/lib/module/web/tools/VelocityTracker.js.map +1 -1
  555. package/lib/module/web/tools/WheelEventManager.js +3 -10
  556. package/lib/module/web/tools/WheelEventManager.js.map +1 -1
  557. package/lib/module/web/utils.js +21 -40
  558. package/lib/module/web/utils.js.map +1 -1
  559. package/lib/module/web_hammer/DiscreteGestureHandler.js +4 -13
  560. package/lib/module/web_hammer/DiscreteGestureHandler.js.map +1 -1
  561. package/lib/module/web_hammer/DraggingGestureHandler.js +0 -5
  562. package/lib/module/web_hammer/DraggingGestureHandler.js.map +1 -1
  563. package/lib/module/web_hammer/Errors.js +0 -1
  564. package/lib/module/web_hammer/Errors.js.map +1 -1
  565. package/lib/module/web_hammer/FlingGestureHandler.js +10 -35
  566. package/lib/module/web_hammer/FlingGestureHandler.js.map +1 -1
  567. package/lib/module/web_hammer/GestureHandler.js +53 -130
  568. package/lib/module/web_hammer/GestureHandler.js.map +1 -1
  569. package/lib/module/web_hammer/IndiscreteGestureHandler.js +1 -6
  570. package/lib/module/web_hammer/IndiscreteGestureHandler.js.map +1 -1
  571. package/lib/module/web_hammer/LongPressGestureHandler.js +2 -11
  572. package/lib/module/web_hammer/LongPressGestureHandler.js.map +1 -1
  573. package/lib/module/web_hammer/NativeViewGestureHandler.js +12 -12
  574. package/lib/module/web_hammer/NativeViewGestureHandler.js.map +1 -1
  575. package/lib/module/web_hammer/NodeManager.js +6 -8
  576. package/lib/module/web_hammer/NodeManager.js.map +1 -1
  577. package/lib/module/web_hammer/PanGestureHandler.js +6 -40
  578. package/lib/module/web_hammer/PanGestureHandler.js.map +1 -1
  579. package/lib/module/web_hammer/PinchGestureHandler.js +0 -5
  580. package/lib/module/web_hammer/PinchGestureHandler.js.map +1 -1
  581. package/lib/module/web_hammer/PressGestureHandler.js +13 -34
  582. package/lib/module/web_hammer/PressGestureHandler.js.map +1 -1
  583. package/lib/module/web_hammer/RotationGestureHandler.js +0 -6
  584. package/lib/module/web_hammer/RotationGestureHandler.js.map +1 -1
  585. package/lib/module/web_hammer/TapGestureHandler.js +31 -45
  586. package/lib/module/web_hammer/TapGestureHandler.js.map +1 -1
  587. package/lib/module/web_hammer/constants.js +2 -1
  588. package/lib/module/web_hammer/constants.js.map +1 -1
  589. package/lib/module/web_hammer/utils.js +2 -2
  590. package/lib/module/web_hammer/utils.js.map +1 -1
  591. package/lib/typescript/components/DrawerLayout.d.ts +27 -0
  592. package/lib/typescript/components/GestureButtonsProps.d.ts +18 -2
  593. package/lib/typescript/components/Pressable/PressableProps.d.ts +3 -10
  594. package/lib/typescript/components/Pressable/index.d.ts +1 -1
  595. package/lib/typescript/components/ReanimatedSwipeable.d.ts +6 -0
  596. package/lib/typescript/components/touchables/TouchableHighlight.d.ts +5 -0
  597. package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +2 -0
  598. package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +5 -1
  599. package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +3 -0
  600. package/lib/typescript/components/touchables/TouchableOpacity.d.ts +5 -0
  601. package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +6 -0
  602. package/lib/typescript/handlers/FlingGestureHandler.d.ts +9 -0
  603. package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +9 -0
  604. package/lib/typescript/handlers/LongPressGestureHandler.d.ts +9 -0
  605. package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +9 -0
  606. package/lib/typescript/handlers/PanGestureHandler.d.ts +9 -0
  607. package/lib/typescript/handlers/PinchGestureHandler.d.ts +9 -0
  608. package/lib/typescript/handlers/RotationGestureHandler.d.ts +9 -0
  609. package/lib/typescript/handlers/TapGestureHandler.d.ts +9 -0
  610. package/lib/typescript/handlers/handlersRegistry.d.ts +1 -0
  611. package/lib/typescript/index.d.ts +1 -1
  612. package/lib/typescript/utils.d.ts +1 -1
  613. package/lib/typescript/web/detectors/RotationGestureDetector.d.ts +7 -7
  614. package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts +8 -8
  615. package/lib/typescript/web/handlers/GestureHandler.d.ts +33 -28
  616. package/lib/typescript/web/handlers/IGestureHandler.d.ts +12 -13
  617. package/lib/typescript/web/tools/CircularBuffer.d.ts +3 -3
  618. package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +1 -1
  619. package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts +2 -2
  620. package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +3 -2
  621. package/lib/typescript/web/tools/InteractionManager.d.ts +2 -2
  622. package/lib/typescript/web/tools/NodeManager.d.ts +1 -1
  623. package/lib/typescript/web/tools/PointerTracker.d.ts +4 -4
  624. package/lib/typescript/web/tools/VelocityTracker.d.ts +1 -1
  625. package/package.json +2 -2
  626. package/src/RNGestureHandlerModule.web.ts +2 -2
  627. package/src/components/DrawerLayout.tsx +29 -0
  628. package/src/components/GestureButtons.tsx +13 -2
  629. package/src/components/GestureButtonsProps.ts +31 -2
  630. package/src/components/Pressable/Pressable.tsx +22 -5
  631. package/src/components/Pressable/PressableProps.tsx +4 -11
  632. package/src/components/Pressable/index.ts +4 -1
  633. package/src/components/ReanimatedSwipeable.tsx +97 -66
  634. package/src/components/Text.tsx +13 -4
  635. package/src/components/touchables/TouchableHighlight.tsx +5 -0
  636. package/src/components/touchables/TouchableNativeFeedback.android.tsx +2 -0
  637. package/src/components/touchables/TouchableNativeFeedback.tsx +6 -1
  638. package/src/components/touchables/TouchableNativeFeedbackProps.tsx +3 -0
  639. package/src/components/touchables/TouchableOpacity.tsx +5 -0
  640. package/src/components/touchables/TouchableWithoutFeedback.tsx +6 -0
  641. package/src/findNodeHandle.web.ts +6 -0
  642. package/src/handlers/FlingGestureHandler.ts +10 -0
  643. package/src/handlers/ForceTouchGestureHandler.ts +9 -0
  644. package/src/handlers/LongPressGestureHandler.ts +10 -0
  645. package/src/handlers/NativeViewGestureHandler.ts +10 -0
  646. package/src/handlers/PanGestureHandler.ts +10 -0
  647. package/src/handlers/PinchGestureHandler.ts +10 -0
  648. package/src/handlers/RotationGestureHandler.ts +10 -0
  649. package/src/handlers/TapGestureHandler.ts +10 -0
  650. package/src/handlers/createHandler.tsx +11 -4
  651. package/src/handlers/gestures/GestureDetector/index.tsx +2 -2
  652. package/src/handlers/gestures/GestureDetector/useViewRefHandler.ts +3 -3
  653. package/src/handlers/gestures/GestureDetector/utils.ts +2 -2
  654. package/src/handlers/handlersRegistry.ts +7 -3
  655. package/src/index.ts +4 -1
  656. package/src/utils.ts +2 -2
  657. package/src/web/detectors/RotationGestureDetector.ts +22 -22
  658. package/src/web/detectors/ScaleGestureDetector.ts +24 -24
  659. package/src/web/handlers/FlingGestureHandler.ts +6 -7
  660. package/src/web/handlers/GestureHandler.ts +115 -105
  661. package/src/web/handlers/HoverGestureHandler.ts +2 -2
  662. package/src/web/handlers/IGestureHandler.ts +12 -13
  663. package/src/web/handlers/LongPressGestureHandler.ts +7 -7
  664. package/src/web/handlers/NativeViewGestureHandler.ts +14 -19
  665. package/src/web/handlers/PanGestureHandler.ts +17 -17
  666. package/src/web/handlers/PinchGestureHandler.ts +17 -21
  667. package/src/web/handlers/RotationGestureHandler.ts +12 -12
  668. package/src/web/handlers/TapGestureHandler.ts +4 -6
  669. package/src/web/tools/CircularBuffer.ts +15 -15
  670. package/src/web/tools/GestureHandlerDelegate.ts +1 -1
  671. package/src/web/tools/GestureHandlerOrchestrator.ts +42 -42
  672. package/src/web/tools/GestureHandlerWebDelegate.ts +32 -13
  673. package/src/web/tools/InteractionManager.ts +16 -16
  674. package/src/web/tools/NodeManager.ts +2 -2
  675. package/src/web/tools/PointerTracker.ts +20 -20
  676. package/src/web/tools/Vector.ts +1 -1
  677. package/src/web/tools/VelocityTracker.ts +1 -1
@@ -1 +1 @@
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,eAFF,QAGO,sCAHP;AAKA,SAASC,OAAT,QAAwB,UAAxB;AAEA,OAAO,MAAMJ,cAAc,GAAGE,mBAAmB,CAACD,gBAAD,EAAmB;AAClEI,EAAAA,oBAAoB,EAAE,IAD4C;AAElEC,EAAAA,uBAAuB,EAAE;AAFyC,CAAnB,CAA1C,C,CAIP;;AAGA,MAAMC,YAAY,GAAGL,mBAAmB,CACtCX,YADsC,EAEtC;AACEc,EAAAA,oBAAoB,EAAE,IADxB;AAEEC,EAAAA,uBAAuB,EAAE;AAF3B,CAFsC,CAAxC;AAOA,OAAO,MAAMhB,UAAU,gBAAGD,KAAK,CAACmB,UAAN,CAGxB,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAChB,QAAMC,wBAAwB,GAAGtB,KAAK,CAACuB,MAAN,CAA6B,IAA7B,CAAjC;AACA,QAAM;AAAEC,IAAAA,cAAF;AAAkBC,IAAAA,OAAlB;AAA2B,OAAGC;AAA9B,MAAuCN,KAA7C;AAEA,sBACE,oBAAC,YAAD,eACMM,IADN;AAEE;AACA,IAAA,GAAG,EAAEL,GA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ACA;AACAD,MAAAA,eAAe,CAACC,QAAD,CAAf,GAA4BC,KAA5B;AACD,KAJD,MAIO;AACL;AACA;AACAH,MAAAA,aAAa,CAACE,QAAD,CAAb,GAA0BC,KAA1B;AACD;AACF;;AAED;AAAA;AACE;AACA,wBAAC,UAAD;AACE,MAAA,GAAG,EAAEZ;AADP,OAEMS,aAFN;AAGE,MAAA,qBAAqB,EAAGO,WAAD,iBACrB,oBAAC,UAAD,eAEOA,WAFP,EAGON,eAHP;AAIIN,QAAAA,OAAO,EAAE,CAAC,GAAGV,OAAO,CAACU,OAAD,aAACA,OAAD,cAACA,OAAD,GAAY,EAAZ,CAAX,EAA4BH,wBAA5B;AAJb,SAJJ,CAYE;AAZF;AAaE,MAAA,cAAc,EACZE,cAAc,gBACVxB,KAAK,CAAC2B,YAAN,CAAmBH,cAAnB,EAAmC;AACjC;AACAH,QAAAA,GAAG,EAAEC;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
+ {"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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,CAAC;EAC1B,KAAK,MAAM,CAACC,QAAQ,EAAEC,KAAK,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACX,IAAI,CAAC,EAAE;IACpD;IACA,IAAKZ,eAAe,CAAuBwB,QAAQ,CAACJ,QAAQ,CAAC,EAAE;MAC7D;MACA;MACAD,eAAe,CAACC,QAAQ,CAAC,GAAGC,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,5 +1,4 @@
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
-
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); }
3
2
  import * as React from 'react';
4
3
  import { FlatList as RNFlatList, Switch as RNSwitch, TextInput as RNTextInput, ScrollView as RNScrollView, View } from 'react-native';
5
4
  import createNativeWrapper from '../handlers/createNativeWrapper';
@@ -15,10 +14,11 @@ export const TextInput = createNativeWrapper(RNTextInput);
15
14
  export const DrawerLayoutAndroid = () => {
16
15
  console.warn('DrawerLayoutAndroid is not supported on web!');
17
16
  return /*#__PURE__*/React.createElement(View, null);
18
- }; // RefreshControl is implemented as a functional component, rendering a View
17
+ };
18
+
19
+ // RefreshControl is implemented as a functional component, rendering a View
19
20
  // NativeViewGestureHandler needs to set a ref on its child, which cannot be done
20
21
  // 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,"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
+ {"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 +1 @@
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
+ {"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,5 +1,4 @@
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
-
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); }
3
2
  import * as React from 'react';
4
3
  import { View } from 'react-native';
5
4
  export default /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(View, _extends({
@@ -1 +1 @@
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
+ {"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,5 +1,4 @@
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
-
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); }
3
2
  import * as React from 'react';
4
3
  import { StyleSheet } from 'react-native';
5
4
  import { maybeInitializeFabric } from '../init';
@@ -1 +1 @@
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
+ {"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,5 +1,4 @@
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
-
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); }
3
2
  import * as React from 'react';
4
3
  import { View, StyleSheet } from 'react-native';
5
4
  import { maybeInitializeFabric } from '../init';
@@ -1 +1 @@
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
+ {"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,5 +1,4 @@
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
-
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); }
3
2
  import * as React from 'react';
4
3
  import { View, StyleSheet } from 'react-native';
5
4
  import GestureHandlerRootViewContext from '../GestureHandlerRootViewContext';
@@ -1 +1 @@
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
+ {"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,5 +1,4 @@
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
-
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); }
3
2
  import React, { useCallback, useMemo, useRef, useState } from 'react';
4
3
  import { GestureObjects as Gesture } from '../../handlers/gestures/gestureObjects';
5
4
  import { GestureDetector } from '../../handlers/gestures/GestureDetector';
@@ -7,11 +6,12 @@ import { Platform, processColor } from 'react-native';
7
6
  import NativeButton from '../GestureHandlerButton';
8
7
  import { numberAsInset, gestureToPressableEvent, isTouchWithinInset, gestureTouchToPressableEvent, addInsets } from './utils';
9
8
  import { PressabilityDebugView } from '../../handlers/PressabilityDebugView';
10
- import { INT32_MAX } from '../../utils';
9
+ import { INT32_MAX, isFabric, isTestEnv } from '../../utils';
11
10
  const DEFAULT_LONG_PRESS_DURATION = 500;
11
+ const IS_TEST_ENV = isTestEnv();
12
+ let IS_FABRIC = null;
12
13
  export default function Pressable(props) {
13
- var _android_ripple$color, _android_ripple$radiu;
14
-
14
+ var _android_ripple$radiu;
15
15
  const {
16
16
  testOnly_pressed,
17
17
  hitSlop,
@@ -34,8 +34,9 @@ export default function Pressable(props) {
34
34
  ...remainingProps
35
35
  } = props;
36
36
  const [pressedState, setPressedState] = useState(testOnly_pressed !== null && testOnly_pressed !== void 0 ? testOnly_pressed : false);
37
- const pressableRef = useRef(null); // Disabled when onLongPress has been called
37
+ const pressableRef = useRef(null);
38
38
 
39
+ // Disabled when onLongPress has been called
39
40
  const isPressCallbackEnabled = useRef(true);
40
41
  const hasPassedBoundsChecks = useRef(false);
41
42
  const shouldPreventNativeEffects = useRef(false);
@@ -48,40 +49,35 @@ export default function Pressable(props) {
48
49
  if (hoverOutTimeout.current) {
49
50
  clearTimeout(hoverOutTimeout.current);
50
51
  }
51
-
52
52
  if (delayHoverIn) {
53
53
  hoverInTimeout.current = setTimeout(() => onHoverIn === null || onHoverIn === void 0 ? void 0 : onHoverIn(gestureToPressableEvent(event)), delayHoverIn);
54
54
  return;
55
55
  }
56
-
57
- onHoverIn === null || onHoverIn === void 0 ? void 0 : onHoverIn(gestureToPressableEvent(event));
56
+ onHoverIn === null || onHoverIn === void 0 || onHoverIn(gestureToPressableEvent(event));
58
57
  }).onFinalize(event => {
59
58
  if (hoverInTimeout.current) {
60
59
  clearTimeout(hoverInTimeout.current);
61
60
  }
62
-
63
61
  if (delayHoverOut) {
64
62
  hoverOutTimeout.current = setTimeout(() => onHoverOut === null || onHoverOut === void 0 ? void 0 : onHoverOut(gestureToPressableEvent(event)), delayHoverOut);
65
63
  return;
66
64
  }
67
-
68
- onHoverOut === null || onHoverOut === void 0 ? void 0 : onHoverOut(gestureToPressableEvent(event));
65
+ onHoverOut === null || onHoverOut === void 0 || onHoverOut(gestureToPressableEvent(event));
69
66
  }), [delayHoverIn, delayHoverOut, onHoverIn, onHoverOut]);
70
67
  const pressDelayTimeoutRef = useRef(null);
71
- const isTouchPropagationAllowed = useRef(false); // iOS only: due to varying flow of gestures, events sometimes have to be saved for later use
68
+ const isTouchPropagationAllowed = useRef(false);
72
69
 
70
+ // iOS only: due to varying flow of gestures, events sometimes have to be saved for later use
73
71
  const deferredEventPayload = useRef(null);
74
72
  const pressInHandler = useCallback(event => {
75
73
  if (handlingOnTouchesDown.current) {
76
74
  deferredEventPayload.current = event;
77
75
  }
78
-
79
76
  if (!isTouchPropagationAllowed.current) {
80
77
  return;
81
78
  }
82
-
83
79
  deferredEventPayload.current = null;
84
- onPressIn === null || onPressIn === void 0 ? void 0 : onPressIn(event);
80
+ onPressIn === null || onPressIn === void 0 || onPressIn(event);
85
81
  isPressCallbackEnabled.current = true;
86
82
  pressDelayTimeoutRef.current = null;
87
83
  setPressedState(true);
@@ -90,7 +86,6 @@ export default function Pressable(props) {
90
86
  if (!hasPassedBoundsChecks.current || event.nativeEvent.touches.length > event.nativeEvent.changedTouches.length) {
91
87
  return;
92
88
  }
93
-
94
89
  if (unstable_pressDelay && pressDelayTimeoutRef.current !== null) {
95
90
  // When delay is preemptively finished by lifting touches,
96
91
  // we want to immediately activate it's effects - pressInHandler,
@@ -98,23 +93,18 @@ export default function Pressable(props) {
98
93
  clearTimeout(pressDelayTimeoutRef.current);
99
94
  pressInHandler(event);
100
95
  }
101
-
102
96
  if (deferredEventPayload.current) {
103
- onPressIn === null || onPressIn === void 0 ? void 0 : onPressIn(deferredEventPayload.current);
97
+ onPressIn === null || onPressIn === void 0 || onPressIn(deferredEventPayload.current);
104
98
  deferredEventPayload.current = null;
105
99
  }
106
-
107
- onPressOut === null || onPressOut === void 0 ? void 0 : onPressOut(event);
108
-
100
+ onPressOut === null || onPressOut === void 0 || onPressOut(event);
109
101
  if (isPressCallbackEnabled.current) {
110
- onPress === null || onPress === void 0 ? void 0 : onPress(event);
102
+ onPress === null || onPress === void 0 || onPress(event);
111
103
  }
112
-
113
104
  if (longPressTimeoutRef.current) {
114
105
  clearTimeout(longPressTimeoutRef.current);
115
106
  longPressTimeoutRef.current = null;
116
107
  }
117
-
118
108
  isTouchPropagationAllowed.current = false;
119
109
  hasPassedBoundsChecks.current = false;
120
110
  isPressCallbackEnabled.current = true;
@@ -127,12 +117,10 @@ export default function Pressable(props) {
127
117
  if (!isTouchPropagationAllowed.current) {
128
118
  return;
129
119
  }
130
-
131
120
  if (hasPassedBoundsChecks.current) {
132
- onLongPress === null || onLongPress === void 0 ? void 0 : onLongPress(gestureTouchToPressableEvent(event));
121
+ onLongPress === null || onLongPress === void 0 || onLongPress(gestureTouchToPressableEvent(event));
133
122
  isPressCallbackEnabled.current = false;
134
123
  }
135
-
136
124
  if (longPressTimeoutRef.current) {
137
125
  clearTimeout(longPressTimeoutRef.current);
138
126
  longPressTimeoutRef.current = null;
@@ -144,11 +132,9 @@ export default function Pressable(props) {
144
132
  .maxDistance(INT32_MAX) // Stops long press from cancelling after set distance
145
133
  .cancelsTouchesInView(false).onTouchesDown(event => {
146
134
  var _pressableRef$current;
147
-
148
135
  handlingOnTouchesDown.current = true;
149
- (_pressableRef$current = pressableRef.current) === null || _pressableRef$current === void 0 ? void 0 : _pressableRef$current.measure((_x, _y, width, height) => {
136
+ (_pressableRef$current = pressableRef.current) === null || _pressableRef$current === void 0 || _pressableRef$current.measure((_x, _y, width, height) => {
150
137
  var _onEndHandlingTouches;
151
-
152
138
  if (!isTouchWithinInset({
153
139
  width,
154
140
  height
@@ -158,14 +144,13 @@ export default function Pressable(props) {
158
144
  handlingOnTouchesDown.current = false;
159
145
  return;
160
146
  }
147
+ hasPassedBoundsChecks.current = true;
161
148
 
162
- hasPassedBoundsChecks.current = true; // In case of multiple touches, the first one starts long press gesture
163
-
149
+ // In case of multiple touches, the first one starts long press gesture
164
150
  if (longPressTimeoutRef.current === null) {
165
151
  // Start long press gesture timer
166
152
  longPressTimeoutRef.current = setTimeout(() => activateLongPress(event), longPressMinDuration);
167
153
  }
168
-
169
154
  if (unstable_pressDelay) {
170
155
  pressDelayTimeoutRef.current = setTimeout(() => {
171
156
  pressInHandler(gestureTouchToPressableEvent(event));
@@ -173,43 +158,35 @@ export default function Pressable(props) {
173
158
  } else {
174
159
  pressInHandler(gestureTouchToPressableEvent(event));
175
160
  }
176
-
177
- (_onEndHandlingTouches = onEndHandlingTouchesDown.current) === null || _onEndHandlingTouches === void 0 ? void 0 : _onEndHandlingTouches.call(onEndHandlingTouchesDown);
161
+ (_onEndHandlingTouches = onEndHandlingTouchesDown.current) === null || _onEndHandlingTouches === void 0 || _onEndHandlingTouches.call(onEndHandlingTouchesDown);
178
162
  onEndHandlingTouchesDown.current = null;
179
163
  handlingOnTouchesDown.current = false;
180
164
  });
181
165
  }).onTouchesUp(event => {
182
166
  if (handlingOnTouchesDown.current) {
183
167
  onEndHandlingTouchesDown.current = () => pressOutHandler(gestureTouchToPressableEvent(event));
184
-
185
168
  return;
186
- } // On iOS, short taps will make LongPress gesture call onTouchesUp before Native gesture calls onStart
169
+ }
170
+ // On iOS, short taps will make LongPress gesture call onTouchesUp before Native gesture calls onStart
187
171
  // This variable ensures that onStart isn't detected as the first gesture since Pressable is pressed.
188
-
189
-
190
172
  if (deferredEventPayload.current !== null) {
191
173
  shouldPreventNativeEffects.current = true;
192
174
  }
193
-
194
175
  pressOutHandler(gestureTouchToPressableEvent(event));
195
176
  }).onTouchesCancelled(event => {
196
177
  isPressCallbackEnabled.current = false;
197
-
198
178
  if (handlingOnTouchesDown.current) {
199
179
  cancelledMidPress.current = true;
200
-
201
180
  onEndHandlingTouchesDown.current = () => pressOutHandler(gestureTouchToPressableEvent(event));
202
-
203
181
  return;
204
182
  }
205
-
206
183
  if (!hasPassedBoundsChecks.current || event.allTouches.length > event.changedTouches.length) {
207
184
  return;
208
185
  }
209
-
210
186
  pressOutHandler(gestureTouchToPressableEvent(event));
211
- }), [activateLongPress, longPressMinDuration, normalizedHitSlop, pressInHandler, pressOutHandler, unstable_pressDelay]); // RNButton is placed inside ButtonGesture to enable Android's ripple and to capture non-propagating events
187
+ }), [activateLongPress, longPressMinDuration, normalizedHitSlop, pressInHandler, pressOutHandler, unstable_pressDelay]);
212
188
 
189
+ // RNButton is placed inside ButtonGesture to enable Android's ripple and to capture non-propagating events
213
190
  const buttonGesture = useMemo(() => Gesture.Native().onBegin(() => {
214
191
  // Android sets BEGAN state on press down
215
192
  if (Platform.OS === 'android' || Platform.OS === 'macos') {
@@ -218,16 +195,14 @@ export default function Pressable(props) {
218
195
  }).onStart(() => {
219
196
  if (Platform.OS === 'web') {
220
197
  isTouchPropagationAllowed.current = true;
221
- } // iOS sets ACTIVE state on press down
222
-
198
+ }
223
199
 
200
+ // iOS sets ACTIVE state on press down
224
201
  if (Platform.OS !== 'ios') {
225
202
  return;
226
203
  }
227
-
228
204
  if (deferredEventPayload.current) {
229
205
  isTouchPropagationAllowed.current = true;
230
-
231
206
  if (hasPassedBoundsChecks.current) {
232
207
  pressInHandler(deferredEventPayload.current);
233
208
  deferredEventPayload.current = null;
@@ -235,38 +210,33 @@ export default function Pressable(props) {
235
210
  pressOutHandler(deferredEventPayload.current);
236
211
  isTouchPropagationAllowed.current = false;
237
212
  }
238
-
239
213
  return;
240
214
  }
241
-
242
215
  if (hasPassedBoundsChecks.current) {
243
216
  isTouchPropagationAllowed.current = true;
244
217
  return;
245
218
  }
246
-
247
219
  if (shouldPreventNativeEffects.current) {
248
220
  shouldPreventNativeEffects.current = false;
249
221
  return;
250
222
  }
251
-
252
223
  isTouchPropagationAllowed.current = true;
253
224
  }), [pressInHandler, pressOutHandler]);
254
225
  const appliedHitSlop = addInsets(normalizedHitSlop, normalizedPressRetentionOffset);
255
226
  const isPressableEnabled = disabled !== true;
256
227
  const gestures = [buttonGesture, pressAndTouchGesture, hoverGesture];
257
-
258
228
  for (const gesture of gestures) {
259
229
  gesture.enabled(isPressableEnabled);
260
230
  gesture.runOnJS(true);
261
231
  gesture.hitSlop(appliedHitSlop);
262
232
  gesture.shouldCancelWhenOutside(Platform.OS === 'web' ? false : true);
263
- } // Uses different hitSlop, to activate on hitSlop area instead of pressRetentionOffset area
264
-
233
+ }
265
234
 
235
+ // Uses different hitSlop, to activate on hitSlop area instead of pressRetentionOffset area
266
236
  buttonGesture.hitSlop(normalizedHitSlop);
267
237
  const gesture = Gesture.Simultaneous(...gestures);
268
- const defaultRippleColor = android_ripple ? undefined : 'transparent'; // `cursor: 'pointer'` on `RNButton` crashes iOS
269
238
 
239
+ // `cursor: 'pointer'` on `RNButton` crashes iOS
270
240
  const pointerStyle = Platform.OS === 'web' ? {
271
241
  cursor: 'pointer'
272
242
  } : {};
@@ -276,6 +246,15 @@ export default function Pressable(props) {
276
246
  const childrenProp = typeof children === 'function' ? children({
277
247
  pressed: pressedState
278
248
  }) : children;
249
+ const rippleColor = useMemo(() => {
250
+ var _android_ripple$color;
251
+ if (IS_FABRIC === null) {
252
+ IS_FABRIC = isFabric();
253
+ }
254
+ const defaultRippleColor = android_ripple ? undefined : 'transparent';
255
+ 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
+ return IS_FABRIC ? unprocessedRippleColor : processColor(unprocessedRippleColor);
257
+ }, [android_ripple]);
279
258
  return /*#__PURE__*/React.createElement(GestureDetector, {
280
259
  gesture: gesture
281
260
  }, /*#__PURE__*/React.createElement(NativeButton, _extends({}, remainingProps, {
@@ -283,9 +262,13 @@ export default function Pressable(props) {
283
262
  hitSlop: appliedHitSlop,
284
263
  enabled: isPressableEnabled,
285
264
  touchSoundDisabled: android_disableSound !== null && android_disableSound !== void 0 ? android_disableSound : undefined,
286
- rippleColor: processColor((_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),
265
+ rippleColor: rippleColor,
287
266
  rippleRadius: (_android_ripple$radiu = android_ripple === null || android_ripple === void 0 ? void 0 : android_ripple.radius) !== null && _android_ripple$radiu !== void 0 ? _android_ripple$radiu : undefined,
288
- style: [pointerStyle, styleProp]
267
+ style: [pointerStyle, styleProp],
268
+ testOnly_onPress: IS_TEST_ENV ? onPress : undefined,
269
+ testOnly_onPressIn: IS_TEST_ENV ? onPressIn : undefined,
270
+ testOnly_onPressOut: IS_TEST_ENV ? onPressOut : undefined,
271
+ testOnly_onLongPress: IS_TEST_ENV ? onLongPress : undefined
289
272
  }), childrenProp, __DEV__ ? /*#__PURE__*/React.createElement(PressabilityDebugView, {
290
273
  color: "red",
291
274
  hitSlop: normalizedHitSlop
@@ -1 +1 @@
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","DEFAULT_LONG_PRESS_DURATION","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","defaultRippleColor","undefined","pointerStyle","cursor","styleProp","pressed","childrenProp","color","radius","__DEV__"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,WAAhB,EAA6BC,OAA7B,EAAsCC,MAAtC,EAA8CC,QAA9C,QAA8D,OAA9D;AACA,SAASC,cAAc,IAAIC,OAA3B,QAA0C,wCAA1C;AACA,SAASC,eAAT,QAAgC,yCAAhC;AAEA,SAEEC,QAFF,EAMEC,YANF,QAOO,cAPP;AAQA,OAAOC,YAAP,MAAyB,yBAAzB;AACA,SACEC,aADF,EAEEC,uBAFF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ureObjects 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 } from '../../utils';\n\nconst DEFAULT_LONG_PRESS_DURATION = 500;\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 const defaultRippleColor = android_ripple ? undefined : 'transparent';\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 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={processColor(android_ripple?.color ?? defaultRippleColor)}\n rippleRadius={android_ripple?.radius ?? undefined}\n style={[pointerStyle, styleProp]}>\n {childrenProp}\n {__DEV__ ? (\n <PressabilityDebugView color=\"red\" hitSlop={normalizedHitSlop} />\n ) : null}\n </NativeButton>\n </GestureDetector>\n );\n}\n"]}
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,EAAEC,QAAQ,QAAQ,OAAO;AACrE,SAASC,cAAc,IAAIC,OAAO,QAAQ,wCAAwC;AAClF,SAASC,eAAe,QAAQ,yCAAyC;AAEzE,SAEEC,QAAQ,EAIRC,YAAY,QACP,cAAc;AACrB,OAAOC,YAAY,MAAM,yBAAyB;AAClD,SACEC,aAAa,EACbC,uBAAuB,EACvBC,kBAAkB,EAClBC,4BAA4B,EAC5BC,SAAS,QACJ,SAAS;AAChB,SAASC,qBAAqB,QAAQ,sCAAsC;AAE5E,SAASC,SAAS,EAAEC,QAAQ,EAAEC,SAAS,QAAQ,aAAa;AAE5D,MAAMC,2BAA2B,GAAG,GAAG;AACvC,MAAMC,WAAW,GAAGF,SAAS,CAAC,CAAC;AAE/B,IAAIG,SAAyB,GAAG,IAAI;AAEpC,eAAe,SAASC,SAASA,CAACC,KAAqB,EAAE;EAAA,IAAAC,qBAAA;EACvD,MAAM;IACJC,gBAAgB;IAChBC,OAAO;IACPC,oBAAoB;IACpBC,YAAY;IACZC,SAAS;IACTC,aAAa;IACbC,UAAU;IACVC,cAAc;IACdC,mBAAmB;IACnBC,OAAO;IACPC,SAAS;IACTC,UAAU;IACVC,WAAW;IACXC,KAAK;IACLC,QAAQ;IACRC,oBAAoB;IACpBC,cAAc;IACdC,QAAQ;IACR,GAAGC;EACL,CAAC,GAAGpB,KAAK;EAET,MAAM,CAACqB,YAAY,EAAEC,eAAe,CAAC,GAAG1C,QAAQ,CAACsB,gBAAgB,aAAhBA,gBAAgB,cAAhBA,gBAAgB,GAAI,KAAK,CAAC;EAE3E,MAAMqB,YAAY,GAAG5C,MAAM,CAAO,IAAI,CAA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GAAGc,OAAO,GAAGkF,SAAU;IACpDU,kBAAkB,EAAE1G,WAAW,GAAGe,SAAS,GAAGiF,SAAU;IACxDW,mBAAmB,EAAE3G,WAAW,GAAGgB,UAAU,GAAGgF,SAAU;IAC1DY,oBAAoB,EAAE5G,WAAW,GAAGiB,WAAW,GAAG+E;EAAU,IAC3DJ,YAAY,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 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}
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":[]}