react-native-gesture-handler 2.22.0 → 2.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (678) 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 +133 -98
  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 +33 -32
  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 +130 -84
  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 +28 -22
  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 +194 -113
  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/createNativeWrapper.tsx +10 -4
  652. package/src/handlers/gestures/GestureDetector/index.tsx +2 -2
  653. package/src/handlers/gestures/GestureDetector/useViewRefHandler.ts +3 -3
  654. package/src/handlers/gestures/GestureDetector/utils.ts +2 -2
  655. package/src/handlers/handlersRegistry.ts +7 -3
  656. package/src/index.ts +4 -1
  657. package/src/utils.ts +2 -2
  658. package/src/web/detectors/RotationGestureDetector.ts +22 -22
  659. package/src/web/detectors/ScaleGestureDetector.ts +24 -24
  660. package/src/web/handlers/FlingGestureHandler.ts +6 -7
  661. package/src/web/handlers/GestureHandler.ts +115 -105
  662. package/src/web/handlers/HoverGestureHandler.ts +2 -2
  663. package/src/web/handlers/IGestureHandler.ts +12 -13
  664. package/src/web/handlers/LongPressGestureHandler.ts +7 -7
  665. package/src/web/handlers/NativeViewGestureHandler.ts +14 -19
  666. package/src/web/handlers/PanGestureHandler.ts +17 -17
  667. package/src/web/handlers/PinchGestureHandler.ts +17 -21
  668. package/src/web/handlers/RotationGestureHandler.ts +12 -12
  669. package/src/web/handlers/TapGestureHandler.ts +4 -6
  670. package/src/web/tools/CircularBuffer.ts +15 -15
  671. package/src/web/tools/GestureHandlerDelegate.ts +1 -1
  672. package/src/web/tools/GestureHandlerOrchestrator.ts +42 -42
  673. package/src/web/tools/GestureHandlerWebDelegate.ts +32 -13
  674. package/src/web/tools/InteractionManager.ts +16 -16
  675. package/src/web/tools/NodeManager.ts +2 -2
  676. package/src/web/tools/PointerTracker.ts +20 -20
  677. package/src/web/tools/Vector.ts +1 -1
  678. package/src/web/tools/VelocityTracker.ts +1 -1
@@ -1,17 +1,17 @@
1
1
  var _UIManagerAny$getView, _UIManagerAny$getView2, _UIManagerAny$getCons;
2
-
3
- function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
-
2
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
4
+ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
5
  import * as React from 'react';
6
6
  import { Platform, UIManager, DeviceEventEmitter } from 'react-native';
7
7
  import { customDirectEventTypes } from './customDirectEventTypes';
8
8
  import RNGestureHandlerModule from '../RNGestureHandlerModule';
9
9
  import { State } from '../State';
10
- import { handlerIDToTag, registerOldGestureHandler } from './handlersRegistry';
10
+ import { handlerIDToTag, registerOldGestureHandler, unregisterOldGestureHandler } from './handlersRegistry';
11
11
  import { getNextHandlerTag } from './getNextHandlerTag';
12
12
  import { filterConfig, scheduleFlushOperations } from './utils';
13
13
  import findNodeHandle from '../findNodeHandle';
14
- import { deepEqual, isFabric, isJestEnv, tagMessage } from '../utils';
14
+ import { deepEqual, isFabric, isTestEnv, tagMessage } from '../utils';
15
15
  import { ActionType } from '../ActionType';
16
16
  import { PressabilityDebugView } from './PressabilityDebugView';
17
17
  import GestureHandlerRootViewContext from '../GestureHandlerRootViewContext';
@@ -45,66 +45,63 @@ const customGHEventsConfig = {
45
45
  // Without this piece of code below, you'll get the following JS error:
46
46
  // Unsupported top level event type "topOnGestureHandlerEvent" dispatched
47
47
  ...(isFabric() && Platform.OS === 'android' && customGHEventsConfigFabricAndroid)
48
- }; // Add gesture specific events to genericDirectEventTypes object exported from UIManager
48
+ };
49
+
50
+ // Add gesture specific events to genericDirectEventTypes object exported from UIManager
49
51
  // native module.
50
52
  // Once new event types are registered with react it is possible to dispatch these
51
53
  // events to all kind of native views.
52
-
53
- UIManagerAny.genericDirectEventTypes = { ...UIManagerAny.genericDirectEventTypes,
54
+ UIManagerAny.genericDirectEventTypes = {
55
+ ...UIManagerAny.genericDirectEventTypes,
54
56
  ...customGHEventsConfig
55
- }; // In newer versions of RN the `genericDirectEventTypes` is located in the object
57
+ };
58
+ // In newer versions of RN the `genericDirectEventTypes` is located in the object
56
59
  // returned by UIManager.getViewManagerConfig('getConstants') or in older RN UIManager.getConstants(), we need to add it there as well to make
57
60
  // it compatible with RN 61+
58
-
59
61
  const UIManagerConstants = (_UIManagerAny$getView = (_UIManagerAny$getView2 = UIManagerAny.getViewManagerConfig) === null || _UIManagerAny$getView2 === void 0 ? void 0 : _UIManagerAny$getView2.call(UIManagerAny, 'getConstants')) !== null && _UIManagerAny$getView !== void 0 ? _UIManagerAny$getView : (_UIManagerAny$getCons = UIManagerAny.getConstants) === null || _UIManagerAny$getCons === void 0 ? void 0 : _UIManagerAny$getCons.call(UIManagerAny);
60
-
61
62
  if (UIManagerConstants) {
62
- UIManagerConstants.genericDirectEventTypes = { ...UIManagerConstants.genericDirectEventTypes,
63
+ UIManagerConstants.genericDirectEventTypes = {
64
+ ...UIManagerConstants.genericDirectEventTypes,
63
65
  ...customGHEventsConfig
64
66
  };
65
- } // Wrap JS responder calls and notify gesture handler manager
66
-
67
+ }
67
68
 
69
+ // Wrap JS responder calls and notify gesture handler manager
68
70
  const {
69
- setJSResponder: oldSetJSResponder = () => {// no-op
71
+ setJSResponder: oldSetJSResponder = () => {
72
+ // no-op
70
73
  },
71
- clearJSResponder: oldClearJSResponder = () => {// no-op
74
+ clearJSResponder: oldClearJSResponder = () => {
75
+ // no-op
72
76
  }
73
77
  } = UIManagerAny;
74
-
75
78
  UIManagerAny.setJSResponder = (tag, blockNativeResponder) => {
76
79
  RNGestureHandlerModule.handleSetJSResponder(tag, blockNativeResponder);
77
80
  oldSetJSResponder(tag, blockNativeResponder);
78
81
  };
79
-
80
82
  UIManagerAny.clearJSResponder = () => {
81
83
  RNGestureHandlerModule.handleClearJSResponder();
82
84
  oldClearJSResponder();
83
85
  };
84
-
85
86
  let allowTouches = true;
86
- const DEV_ON_ANDROID = __DEV__ && Platform.OS === 'android'; // Toggled inspector blocks touch events in order to allow inspecting on Android
87
+ const DEV_ON_ANDROID = __DEV__ && Platform.OS === 'android';
88
+ // Toggled inspector blocks touch events in order to allow inspecting on Android
87
89
  // This needs to be a global variable in order to set initial state for `allowTouches` property in Handler component
88
-
89
90
  if (DEV_ON_ANDROID) {
90
91
  DeviceEventEmitter.addListener('toggleElementInspector', () => {
91
92
  allowTouches = !allowTouches;
92
93
  });
93
94
  }
94
-
95
95
  function hasUnresolvedRefs(props) {
96
96
  // TODO(TS) - add type for extract arg
97
97
  const extract = refs => {
98
98
  if (!Array.isArray(refs)) {
99
99
  return refs && refs.current === null;
100
100
  }
101
-
102
101
  return refs.some(r => r && r.current === null);
103
102
  };
104
-
105
103
  return extract(props['simultaneousHandlers']) || extract(props['waitFor']);
106
104
  }
107
-
108
105
  const stateToPropMappings = {
109
106
  [State.UNDETERMINED]: undefined,
110
107
  [State.BEGAN]: 'onBegan',
@@ -113,8 +110,12 @@ const stateToPropMappings = {
113
110
  [State.ACTIVE]: 'onActivated',
114
111
  [State.END]: 'onEnded'
115
112
  };
116
- const UNRESOLVED_REFS_RETRY_LIMIT = 1; // TODO(TS) - make sure that BaseGestureHandlerProps doesn't need other generic parameter to work with custom properties.
117
113
 
114
+ // TODO(TS) fix event types
115
+
116
+ const UNRESOLVED_REFS_RETRY_LIMIT = 1;
117
+
118
+ // TODO(TS) - make sure that BaseGestureHandlerProps doesn't need other generic parameter to work with custom properties.
118
119
  export default function createHandler({
119
120
  name,
120
121
  allowedProps = [],
@@ -125,65 +126,49 @@ export default function createHandler({
125
126
  class Handler extends React.Component {
126
127
  constructor(props) {
127
128
  super(props);
128
-
129
129
  _defineProperty(this, "handlerTag", void 0);
130
-
131
130
  _defineProperty(this, "config", void 0);
132
-
133
131
  _defineProperty(this, "propsRef", void 0);
134
-
135
132
  _defineProperty(this, "isMountedRef", void 0);
136
-
137
133
  _defineProperty(this, "viewNode", void 0);
138
-
139
134
  _defineProperty(this, "viewTag", void 0);
140
-
141
135
  _defineProperty(this, "inspectorToggleListener", void 0);
142
-
143
136
  _defineProperty(this, "onGestureHandlerEvent", event => {
144
137
  if (event.nativeEvent.handlerTag === this.handlerTag) {
145
138
  if (typeof this.props.onGestureEvent === 'function') {
146
139
  var _this$props$onGesture, _this$props;
147
-
148
- (_this$props$onGesture = (_this$props = this.props).onGestureEvent) === null || _this$props$onGesture === void 0 ? void 0 : _this$props$onGesture.call(_this$props, event);
140
+ (_this$props$onGesture = (_this$props = this.props).onGestureEvent) === null || _this$props$onGesture === void 0 || _this$props$onGesture.call(_this$props, event);
149
141
  }
150
142
  } else {
151
143
  var _this$props$onGesture2, _this$props2;
152
-
153
- (_this$props$onGesture2 = (_this$props2 = this.props).onGestureHandlerEvent) === null || _this$props$onGesture2 === void 0 ? void 0 : _this$props$onGesture2.call(_this$props2, event);
144
+ (_this$props$onGesture2 = (_this$props2 = this.props).onGestureHandlerEvent) === null || _this$props$onGesture2 === void 0 || _this$props$onGesture2.call(_this$props2, event);
154
145
  }
155
146
  });
156
-
147
+ // TODO(TS) - make sure this is right type for event
157
148
  _defineProperty(this, "onGestureHandlerStateChange", event => {
158
149
  if (event.nativeEvent.handlerTag === this.handlerTag) {
159
150
  if (typeof this.props.onHandlerStateChange === 'function') {
160
151
  var _this$props$onHandler, _this$props3;
161
-
162
- (_this$props$onHandler = (_this$props3 = this.props).onHandlerStateChange) === null || _this$props$onHandler === void 0 ? void 0 : _this$props$onHandler.call(_this$props3, event);
152
+ (_this$props$onHandler = (_this$props3 = this.props).onHandlerStateChange) === null || _this$props$onHandler === void 0 || _this$props$onHandler.call(_this$props3, event);
163
153
  }
164
-
165
154
  const state = event.nativeEvent.state;
166
155
  const stateEventName = stateToPropMappings[state];
167
156
  const eventHandler = stateEventName && this.props[stateEventName];
168
-
169
157
  if (eventHandler && typeof eventHandler === 'function') {
170
158
  eventHandler(event);
171
159
  }
172
160
  } else {
173
161
  var _this$props$onGesture3, _this$props4;
174
-
175
- (_this$props$onGesture3 = (_this$props4 = this.props).onGestureHandlerStateChange) === null || _this$props$onGesture3 === void 0 ? void 0 : _this$props$onGesture3.call(_this$props4, event);
162
+ (_this$props$onGesture3 = (_this$props4 = this.props).onGestureHandlerStateChange) === null || _this$props$onGesture3 === void 0 || _this$props$onGesture3.call(_this$props4, event);
176
163
  }
177
164
  });
178
-
179
165
  _defineProperty(this, "refHandler", node => {
180
166
  this.viewNode = node;
181
- const child = React.Children.only(this.props.children); // TODO(TS) fix ref type
182
-
167
+ const child = React.Children.only(this.props.children);
168
+ // TODO(TS) fix ref type
183
169
  const {
184
170
  ref
185
171
  } = child;
186
-
187
172
  if (ref !== null) {
188
173
  if (typeof ref === 'function') {
189
174
  ref(node);
@@ -192,34 +177,28 @@ export default function createHandler({
192
177
  }
193
178
  }
194
179
  });
195
-
196
180
  _defineProperty(this, "createGestureHandler", newConfig => {
197
181
  this.config = newConfig;
198
182
  RNGestureHandlerModule.createGestureHandler(name, this.handlerTag, newConfig);
199
183
  });
200
-
201
184
  _defineProperty(this, "attachGestureHandler", newViewTag => {
202
185
  this.viewTag = newViewTag;
203
-
204
186
  if (Platform.OS === 'web') {
205
187
  // Typecast due to dynamic resolution, attachGestureHandler should have web version signature in this branch
206
- RNGestureHandlerModule.attachGestureHandler(this.handlerTag, newViewTag, ActionType.JS_FUNCTION_OLD_API, // ignored on web
188
+ RNGestureHandlerModule.attachGestureHandler(this.handlerTag, newViewTag, ActionType.JS_FUNCTION_OLD_API,
189
+ // ignored on web
207
190
  this.propsRef);
208
191
  } else {
209
192
  registerOldGestureHandler(this.handlerTag, {
210
193
  onGestureEvent: this.onGestureHandlerEvent,
211
194
  onGestureStateChange: this.onGestureHandlerStateChange
212
195
  });
213
-
214
- const actionType = (() => {
215
- var _this$props5, _this$props6;
216
-
196
+ const actionType = ((_this$props5, _this$props6) => {
217
197
  const onGestureEvent = (_this$props5 = this.props) === null || _this$props5 === void 0 ? void 0 : _this$props5.onGestureEvent;
218
198
  const isGestureHandlerWorklet = onGestureEvent && ('current' in onGestureEvent || 'workletEventHandler' in onGestureEvent);
219
199
  const onHandlerStateChange = (_this$props6 = this.props) === null || _this$props6 === void 0 ? void 0 : _this$props6.onHandlerStateChange;
220
200
  const isStateChangeHandlerWorklet = onHandlerStateChange && ('current' in onHandlerStateChange || 'workletEventHandler' in onHandlerStateChange);
221
201
  const isReanimatedHandler = isGestureHandlerWorklet || isStateChangeHandlerWorklet;
222
-
223
202
  if (isReanimatedHandler) {
224
203
  // Reanimated worklet
225
204
  return ActionType.REANIMATED_WORKLET;
@@ -231,22 +210,18 @@ export default function createHandler({
231
210
  return ActionType.JS_FUNCTION_OLD_API;
232
211
  }
233
212
  })();
234
-
235
213
  RNGestureHandlerModule.attachGestureHandler(this.handlerTag, newViewTag, actionType);
236
214
  }
237
-
238
215
  scheduleFlushOperations();
239
216
  ghQueueMicrotask(() => {
240
217
  MountRegistry.gestureHandlerWillMount(this);
241
218
  });
242
219
  });
243
-
244
220
  _defineProperty(this, "updateGestureHandler", newConfig => {
245
221
  this.config = newConfig;
246
222
  RNGestureHandlerModule.updateGestureHandler(this.handlerTag, newConfig);
247
223
  scheduleFlushOperations();
248
224
  });
249
-
250
225
  this.handlerTag = getNextHandlerTag();
251
226
  this.config = {};
252
227
  this.propsRef = /*#__PURE__*/React.createRef();
@@ -254,20 +229,16 @@ export default function createHandler({
254
229
  this.state = {
255
230
  allowTouches
256
231
  };
257
-
258
232
  if (props.id) {
259
233
  if (handlerIDToTag[props.id] !== undefined) {
260
234
  throw new Error(`Handler with ID "${props.id}" already registered`);
261
235
  }
262
-
263
236
  handlerIDToTag[props.id] = this.handlerTag;
264
237
  }
265
238
  }
266
-
267
239
  componentDidMount() {
268
240
  const props = this.props;
269
241
  this.isMountedRef.current = true;
270
-
271
242
  if (DEV_ON_ANDROID) {
272
243
  this.inspectorToggleListener = DeviceEventEmitter.addListener('toggleElementInspector', () => {
273
244
  this.setState(_ => ({
@@ -276,7 +247,6 @@ export default function createHandler({
276
247
  this.update(UNRESOLVED_REFS_RETRY_LIMIT);
277
248
  });
278
249
  }
279
-
280
250
  if (hasUnresolvedRefs(props)) {
281
251
  // If there are unresolved refs (e.g. ".current" has not yet been set)
282
252
  // passed as `simultaneousHandlers` or `waitFor`, we enqueue a call to
@@ -288,88 +258,76 @@ export default function createHandler({
288
258
  this.update(UNRESOLVED_REFS_RETRY_LIMIT);
289
259
  });
290
260
  }
291
-
292
261
  this.createGestureHandler(filterConfig(transformProps ? transformProps(this.props) : this.props, [...allowedProps, ...customNativeProps], config));
293
-
294
262
  if (!this.viewNode) {
295
263
  throw new Error(`[Gesture Handler] Failed to obtain view for ${Handler.displayName}. Note that old API doesn't support functional components.`);
296
264
  }
297
-
298
265
  this.attachGestureHandler(findNodeHandle(this.viewNode)); // TODO(TS) - check if this can be null
299
266
  }
300
-
301
267
  componentDidUpdate() {
302
268
  const viewTag = findNodeHandle(this.viewNode);
303
-
304
269
  if (this.viewTag !== viewTag) {
305
270
  this.attachGestureHandler(viewTag); // TODO(TS) - check interaction between _viewTag & findNodeHandle
306
271
  }
307
-
308
272
  this.update(UNRESOLVED_REFS_RETRY_LIMIT);
309
273
  }
310
-
311
274
  componentWillUnmount() {
312
275
  var _this$inspectorToggle;
313
-
314
- (_this$inspectorToggle = this.inspectorToggleListener) === null || _this$inspectorToggle === void 0 ? void 0 : _this$inspectorToggle.remove();
276
+ (_this$inspectorToggle = this.inspectorToggleListener) === null || _this$inspectorToggle === void 0 || _this$inspectorToggle.remove();
315
277
  this.isMountedRef.current = false;
278
+ if (Platform.OS !== 'web') {
279
+ unregisterOldGestureHandler(this.handlerTag);
280
+ }
316
281
  RNGestureHandlerModule.dropGestureHandler(this.handlerTag);
317
- scheduleFlushOperations(); // We can't use this.props.id directly due to TS generic type narrowing bug, see https://github.com/microsoft/TypeScript/issues/13995 for more context
318
-
282
+ scheduleFlushOperations();
283
+ // We can't use this.props.id directly due to TS generic type narrowing bug, see https://github.com/microsoft/TypeScript/issues/13995 for more context
319
284
  const handlerID = this.props.id;
320
-
321
285
  if (handlerID) {
322
286
  // eslint-disable-next-line @typescript-eslint/no-dynamic-delete
323
287
  delete handlerIDToTag[handlerID];
324
288
  }
325
-
326
289
  MountRegistry.gestureHandlerWillUnmount(this);
327
290
  }
328
-
329
291
  update(remainingTries) {
330
292
  if (!this.isMountedRef.current) {
331
293
  return;
332
294
  }
295
+ const props = this.props;
333
296
 
334
- const props = this.props; // When ref is set via a function i.e. `ref={(r) => refObject.current = r}` instead of
297
+ // When ref is set via a function i.e. `ref={(r) => refObject.current = r}` instead of
335
298
  // `ref={refObject}` it's possible that it won't be resolved in time. Seems like trying
336
299
  // again is easy enough fix.
337
-
338
300
  if (hasUnresolvedRefs(props) && remainingTries > 0) {
339
301
  ghQueueMicrotask(() => {
340
302
  this.update(remainingTries - 1);
341
303
  });
342
304
  } else {
343
305
  const newConfig = filterConfig(transformProps ? transformProps(this.props) : this.props, [...allowedProps, ...customNativeProps], config);
344
-
345
306
  if (!deepEqual(this.config, newConfig)) {
346
307
  this.updateGestureHandler(newConfig);
347
308
  }
348
309
  }
349
310
  }
350
-
351
311
  setNativeProps(updates) {
352
- const mergedProps = { ...this.props,
312
+ const mergedProps = {
313
+ ...this.props,
353
314
  ...updates
354
315
  };
355
316
  const newConfig = filterConfig(transformProps ? transformProps(mergedProps) : mergedProps, [...allowedProps, ...customNativeProps], config);
356
317
  this.updateGestureHandler(newConfig);
357
318
  }
358
-
359
319
  render() {
360
320
  var _this$props$testID;
361
-
362
- if (__DEV__ && !this.context && !isJestEnv() && Platform.OS !== 'web') {
321
+ if (__DEV__ && !this.context && !isTestEnv() && Platform.OS !== 'web') {
363
322
  throw new Error(name + ' must be used as a descendant of GestureHandlerRootView. Otherwise the gestures will not be recognized. See https://docs.swmansion.com/react-native-gesture-handler/docs/installation for more details.');
364
323
  }
365
-
366
- let gestureEventHandler = this.onGestureHandlerEvent; // Another instance of https://github.com/microsoft/TypeScript/issues/13995
324
+ let gestureEventHandler = this.onGestureHandlerEvent;
325
+ // Another instance of https://github.com/microsoft/TypeScript/issues/13995
367
326
 
368
327
  const {
369
328
  onGestureEvent,
370
329
  onGestureHandlerEvent
371
330
  } = this.props;
372
-
373
331
  if (onGestureEvent && typeof onGestureEvent !== 'function') {
374
332
  // If it's not a method it should be an native Animated.event
375
333
  // object. We set it directly as the handler for the view
@@ -377,21 +335,19 @@ export default function createHandler({
377
335
  if (onGestureHandlerEvent) {
378
336
  throw new Error('Nesting touch handlers with native animated driver is not supported yet');
379
337
  }
380
-
381
338
  gestureEventHandler = onGestureEvent;
382
339
  } else {
383
340
  if (onGestureHandlerEvent && typeof onGestureHandlerEvent !== 'function') {
384
341
  throw new Error('Nesting touch handlers with native animated driver is not supported yet');
385
342
  }
386
343
  }
387
-
388
- let gestureStateEventHandler = this.onGestureHandlerStateChange; // Another instance of https://github.com/microsoft/TypeScript/issues/13995
344
+ let gestureStateEventHandler = this.onGestureHandlerStateChange;
345
+ // Another instance of https://github.com/microsoft/TypeScript/issues/13995
389
346
 
390
347
  const {
391
348
  onHandlerStateChange,
392
349
  onGestureHandlerStateChange
393
350
  } = this.props;
394
-
395
351
  if (onHandlerStateChange && typeof onHandlerStateChange !== 'function') {
396
352
  // If it's not a method it should be an native Animated.event
397
353
  // object. We set it directly as the handler for the view
@@ -399,42 +355,36 @@ export default function createHandler({
399
355
  if (onGestureHandlerStateChange) {
400
356
  throw new Error('Nesting touch handlers with native animated driver is not supported yet');
401
357
  }
402
-
403
358
  gestureStateEventHandler = onHandlerStateChange;
404
359
  } else {
405
360
  if (onGestureHandlerStateChange && typeof onGestureHandlerStateChange !== 'function') {
406
361
  throw new Error('Nesting touch handlers with native animated driver is not supported yet');
407
362
  }
408
363
  }
409
-
410
364
  const events = {
411
365
  onGestureHandlerEvent: this.state.allowTouches ? gestureEventHandler : undefined,
412
366
  onGestureHandlerStateChange: this.state.allowTouches ? gestureStateEventHandler : undefined
413
367
  };
414
368
  this.propsRef.current = events;
415
369
  let child = null;
416
-
417
370
  try {
418
371
  child = React.Children.only(this.props.children);
419
372
  } catch (e) {
420
373
  throw new Error(tagMessage(`${name} got more than one view as a child. If you want the gesture to work on multiple views, wrap them with a common parent and attach the gesture to that view.`));
421
374
  }
422
-
423
375
  let grandChildren = child.props.children;
424
-
425
376
  if (__DEV__ && child.type && (child.type === 'RNGestureHandlerButton' || child.type.name === 'View' || child.type.displayName === 'View')) {
426
377
  grandChildren = React.Children.toArray(grandChildren);
427
- grandChildren.push( /*#__PURE__*/React.createElement(PressabilityDebugView, {
378
+ grandChildren.push(/*#__PURE__*/React.createElement(PressabilityDebugView, {
428
379
  key: "pressabilityDebugView",
429
380
  color: "mediumspringgreen",
430
381
  hitSlop: child.props.hitSlop
431
382
  }));
432
383
  }
433
-
434
384
  return /*#__PURE__*/React.cloneElement(child, {
435
385
  ref: this.refHandler,
436
386
  collapsable: false,
437
- ...(isJestEnv() ? {
387
+ ...(isTestEnv() ? {
438
388
  handlerType: name,
439
389
  handlerTag: this.handlerTag,
440
390
  enabled: this.props.enabled
@@ -443,13 +393,9 @@ export default function createHandler({
443
393
  ...events
444
394
  }, grandChildren);
445
395
  }
446
-
447
396
  }
448
-
449
397
  _defineProperty(Handler, "displayName", name);
450
-
451
398
  _defineProperty(Handler, "contextType", GestureHandlerRootViewContext);
452
-
453
399
  return Handler;
454
400
  }
455
401
  //# sourceMappingURL=createHandler.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["createHandler.tsx"],"names":["React","Platform","UIManager","DeviceEventEmitter","customDirectEventTypes","RNGestureHandlerModule","State","handlerIDToTag","registerOldGestureHandler","getNextHandlerTag","filterConfig","scheduleFlushOperations","findNodeHandle","deepEqual","isFabric","isJestEnv","tagMessage","ActionType","PressabilityDebugView","GestureHandlerRootViewContext","ghQueueMicrotask","MountRegistry","UIManagerAny","topGestureHandlerEvent","registrationName","customGHEventsConfigFabricAndroid","topOnGestureHandlerEvent","topOnGestureHandlerStateChange","customGHEventsConfig","onGestureHandlerEvent","onGestureHandlerStateChange","OS","genericDirectEventTypes","UIManagerConstants","getViewManagerConfig","getConstants","setJSResponder","oldSetJSResponder","clearJSResponder","oldClearJSResponder","tag","blockNativeResponder","handleSetJSResponder","handleClearJSResponder","allowTouches","DEV_ON_ANDROID","__DEV__","addListener","hasUnresolvedRefs","props","extract","refs","Array","isArray","current","some","r","stateToPropMappings","UNDETERMINED","undefined","BEGAN","FAILED","CANCELLED","ACTIVE","END","UNRESOLVED_REFS_RETRY_LIMIT","createHandler","name","allowedProps","config","transformProps","customNativeProps","Handler","Component","constructor","event","nativeEvent","handlerTag","onGestureEvent","onHandlerStateChange","state","stateEventName","eventHandler","node","viewNode","child","Children","only","children","ref","newConfig","createGestureHandler","newViewTag","viewTag","attachGestureHandler","JS_FUNCTION_OLD_API","propsRef","onGestureStateChange","actionType","isGestureHandlerWorklet","isStateChangeHandlerWorklet","isReanimatedHandler","REANIMATED_WORKLET","NATIVE_ANIMATED_EVENT","gestureHandlerWillMount","updateGestureHandler","createRef","isMountedRef","id","Error","componentDidMount","inspectorToggleListener","setState","_","update","displayName","componentDidUpdate","componentWillUnmount","remove","dropGestureHandler","handlerID","gestureHandlerWillUnmount","remainingTries","setNativeProps","updates","mergedProps","render","context","gestureEventHandler","gestureStateEventHandler","events","e","grandChildren","type","toArray","push","hitSlop","cloneElement","refHandler","collapsable","handlerType","enabled","testID"],"mappings":";;;;AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SACEC,QADF,EAEEC,SAFF,EAGEC,kBAHF,QAKO,cALP;AAMA,SAASC,sBAAT,QAAuC,0BAAv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AGZ;AAXL,OAFK,EAeLE,aAfK,CAAP;AAiBD;;AAxXD;;AAPwE,kBAIpE5D,OAJoE,iBAQnDL,IARmD;;AAAA,kBAIpEK,OAJoE,iBASnDrD,6BATmD;;AAiY1E,SAAOqD,OAAP;AACD","sourcesContent":["import * as React from 'react';\nimport {\n Platform,\n UIManager,\n DeviceEventEmitter,\n EmitterSubscription,\n} from 'react-native';\nimport { customDirectEventTypes } from './customDirectEventTypes';\nimport RNGestureHandlerModule from '../RNGestureHandlerModule';\nimport { State } from '../State';\nimport { handlerIDToTag, registerOldGestureHandler } from './handlersRegistry';\nimport { getNextHandlerTag } from './getNextHandlerTag';\n\nimport {\n BaseGestureHandlerProps,\n GestureEvent,\n HandlerStateChangeEvent,\n} from './gestureHandlerCommon';\nimport { filterConfig, scheduleFlushOperations } from './utils';\nimport findNodeHandle from '../findNodeHandle';\nimport { ValueOf } from '../typeUtils';\nimport { deepEqual, isFabric, isJestEnv, tagMessage } from '../utils';\nimport { ActionType } from '../ActionType';\nimport { PressabilityDebugView } from './PressabilityDebugView';\nimport GestureHandlerRootViewContext from '../GestureHandlerRootViewContext';\nimport { ghQueueMicrotask } from '../ghQueueMicrotask';\nimport { MountRegistry } from '../mountRegistry';\n\nconst UIManagerAny = UIManager as any;\n\ncustomDirectEventTypes.topGestureHandlerEvent = {\n registrationName: 'onGestureHandlerEvent',\n};\n\nconst customGHEventsConfigFabricAndroid = {\n topOnGestureHandlerEvent: { registrationName: 'onGestureHandlerEvent' },\n topOnGestureHandlerStateChange: {\n registrationName: 'onGestureHandlerStateChange',\n },\n};\n\nconst customGHEventsConfig = {\n onGestureHandlerEvent: { registrationName: 'onGestureHandlerEvent' },\n onGestureHandlerStateChange: {\n registrationName: 'onGestureHandlerStateChange',\n },\n\n // When using React Native Gesture Handler for Animated.event with useNativeDriver: true\n // on Android with Fabric enabled, the native part still sends the native events to JS\n // but prefixed with \"top\". We cannot simply rename the events above so they are prefixed\n // with \"top\" instead of \"on\" because in such case Animated.events would not be registered.\n // That's why we need to register another pair of event names.\n // The incoming events will be queued but never handled.\n // Without this piece of code below, you'll get the following JS error:\n // Unsupported top level event type \"topOnGestureHandlerEvent\" dispatched\n ...(isFabric() &&\n Platform.OS === 'android' &&\n customGHEventsConfigFabricAndroid),\n};\n\n// Add gesture specific events to genericDirectEventTypes object exported from UIManager\n// native module.\n// Once new event types are registered with react it is possible to dispatch these\n// events to all kind of native views.\nUIManagerAny.genericDirectEventTypes = {\n ...UIManagerAny.genericDirectEventTypes,\n ...customGHEventsConfig,\n};\n// In newer versions of RN the `genericDirectEventTypes` is located in the object\n// returned by UIManager.getViewManagerConfig('getConstants') or in older RN UIManager.getConstants(), we need to add it there as well to make\n// it compatible with RN 61+\nconst UIManagerConstants =\n UIManagerAny.getViewManagerConfig?.('getConstants') ??\n UIManagerAny.getConstants?.();\n\nif (UIManagerConstants) {\n UIManagerConstants.genericDirectEventTypes = {\n ...UIManagerConstants.genericDirectEventTypes,\n ...customGHEventsConfig,\n };\n}\n\n// Wrap JS responder calls and notify gesture handler manager\nconst {\n setJSResponder: oldSetJSResponder = () => {\n // no-op\n },\n clearJSResponder: oldClearJSResponder = () => {\n // no-op\n },\n} = UIManagerAny;\nUIManagerAny.setJSResponder = (tag: number, blockNativeResponder: boolean) => {\n RNGestureHandlerModule.handleSetJSResponder(tag, blockNativeResponder);\n oldSetJSResponder(tag, blockNativeResponder);\n};\nUIManagerAny.clearJSResponder = () => {\n RNGestureHandlerModule.handleClearJSResponder();\n oldClearJSResponder();\n};\n\nlet allowTouches = true;\nconst DEV_ON_ANDROID = __DEV__ && Platform.OS === 'android';\n// Toggled inspector blocks touch events in order to allow inspecting on Android\n// This needs to be a global variable in order to set initial state for `allowTouches` property in Handler component\nif (DEV_ON_ANDROID) {\n DeviceEventEmitter.addListener('toggleElementInspector', () => {\n allowTouches = !allowTouches;\n });\n}\n\ntype HandlerProps<T extends Record<string, unknown>> = Readonly<\n React.PropsWithChildren<BaseGestureHandlerProps<T>>\n>;\nfunction hasUnresolvedRefs<T extends Record<string, unknown>>(\n props: HandlerProps<T>\n) {\n // TODO(TS) - add type for extract arg\n const extract = (refs: any | any[]) => {\n if (!Array.isArray(refs)) {\n return refs && refs.current === null;\n }\n return refs.some((r) => r && r.current === null);\n };\n return extract(props['simultaneousHandlers']) || extract(props['waitFor']);\n}\n\nconst stateToPropMappings = {\n [State.UNDETERMINED]: undefined,\n [State.BEGAN]: 'onBegan',\n [State.FAILED]: 'onFailed',\n [State.CANCELLED]: 'onCancelled',\n [State.ACTIVE]: 'onActivated',\n [State.END]: 'onEnded',\n} as const;\n\ntype CreateHandlerArgs<HandlerPropsT extends Record<string, unknown>> =\n Readonly<{\n name: string;\n allowedProps: Readonly<Extract<keyof HandlerPropsT, string>[]>;\n config: Readonly<Record<string, unknown>>;\n transformProps?: (props: HandlerPropsT) => HandlerPropsT;\n customNativeProps?: Readonly<string[]>;\n }>;\n\n// TODO(TS) fix event types\ntype InternalEventHandlers = {\n onGestureHandlerEvent?: (event: any) => void;\n onGestureHandlerStateChange?: (event: any) => void;\n};\n\ntype AttachGestureHandlerWeb = (\n handlerTag: number,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n newView: any,\n _actionType: ActionType,\n propsRef: React.RefObject<unknown>\n) => void;\n\nconst UNRESOLVED_REFS_RETRY_LIMIT = 1;\n\n// TODO(TS) - make sure that BaseGestureHandlerProps doesn't need other generic parameter to work with custom properties.\nexport default function createHandler<\n T extends BaseGestureHandlerProps<U>,\n U extends Record<string, unknown>,\n>({\n name,\n allowedProps = [],\n config = {},\n transformProps,\n customNativeProps = [],\n}: CreateHandlerArgs<T>): React.ComponentType<T & React.RefAttributes<any>> {\n interface HandlerState {\n allowTouches: boolean;\n }\n class Handler extends React.Component<\n T & InternalEventHandlers,\n HandlerState\n > {\n static displayName = name;\n static contextType = GestureHandlerRootViewContext;\n\n private handlerTag: number;\n private config: Record<string, unknown>;\n private propsRef: React.MutableRefObject<unknown>;\n private isMountedRef: React.MutableRefObject<boolean | null>;\n private viewNode: any;\n private viewTag?: number;\n private inspectorToggleListener?: EmitterSubscription;\n\n constructor(props: T & InternalEventHandlers) {\n super(props);\n this.handlerTag = getNextHandlerTag();\n this.config = {};\n this.propsRef = React.createRef();\n this.isMountedRef = React.createRef();\n this.state = { allowTouches };\n if (props.id) {\n if (handlerIDToTag[props.id] !== undefined) {\n throw new Error(`Handler with ID \"${props.id}\" already registered`);\n }\n handlerIDToTag[props.id] = this.handlerTag;\n }\n }\n\n componentDidMount() {\n const props: HandlerProps<U> = this.props;\n this.isMountedRef.current = true;\n\n if (DEV_ON_ANDROID) {\n this.inspectorToggleListener = DeviceEventEmitter.addListener(\n 'toggleElementInspector',\n () => {\n this.setState((_) => ({ allowTouches }));\n this.update(UNRESOLVED_REFS_RETRY_LIMIT);\n }\n );\n }\n if (hasUnresolvedRefs(props)) {\n // If there are unresolved refs (e.g. \".current\" has not yet been set)\n // passed as `simultaneousHandlers` or `waitFor`, we enqueue a call to\n // _update method that will try to update native handler props using\n // queueMicrotask. This makes it so update() function gets called after all\n // react components are mounted and we expect the missing ref object to\n // be resolved by then.\n ghQueueMicrotask(() => {\n this.update(UNRESOLVED_REFS_RETRY_LIMIT);\n });\n }\n\n this.createGestureHandler(\n filterConfig(\n transformProps ? transformProps(this.props) : this.props,\n [...allowedProps, ...customNativeProps],\n config\n )\n );\n\n if (!this.viewNode) {\n throw new Error(\n `[Gesture Handler] Failed to obtain view for ${Handler.displayName}. Note that old API doesn't support functional components.`\n );\n }\n\n this.attachGestureHandler(findNodeHandle(this.viewNode) as number); // TODO(TS) - check if this can be null\n }\n\n componentDidUpdate() {\n const viewTag = findNodeHandle(this.viewNode);\n if (this.viewTag !== viewTag) {\n this.attachGestureHandler(viewTag as number); // TODO(TS) - check interaction between _viewTag & findNodeHandle\n }\n this.update(UNRESOLVED_REFS_RETRY_LIMIT);\n }\n\n componentWillUnmount() {\n this.inspectorToggleListener?.remove();\n this.isMountedRef.current = false;\n RNGestureHandlerModule.dropGestureHandler(this.handlerTag);\n scheduleFlushOperations();\n // We can't use this.props.id directly due to TS generic type narrowing bug, see https://github.com/microsoft/TypeScript/issues/13995 for more context\n const handlerID: string | undefined = this.props.id;\n if (handlerID) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete handlerIDToTag[handlerID];\n }\n\n MountRegistry.gestureHandlerWillUnmount(this);\n }\n\n private onGestureHandlerEvent = (event: GestureEvent<U>) => {\n if (event.nativeEvent.handlerTag === this.handlerTag) {\n if (typeof this.props.onGestureEvent === 'function') {\n this.props.onGestureEvent?.(event);\n }\n } else {\n this.props.onGestureHandlerEvent?.(event);\n }\n };\n\n // TODO(TS) - make sure this is right type for event\n private onGestureHandlerStateChange = (\n event: HandlerStateChangeEvent<U>\n ) => {\n if (event.nativeEvent.handlerTag === this.handlerTag) {\n if (typeof this.props.onHandlerStateChange === 'function') {\n this.props.onHandlerStateChange?.(event);\n }\n\n const state: ValueOf<typeof State> = event.nativeEvent.state;\n const stateEventName = stateToPropMappings[state];\n const eventHandler = stateEventName && this.props[stateEventName];\n if (eventHandler && typeof eventHandler === 'function') {\n eventHandler(event);\n }\n } else {\n this.props.onGestureHandlerStateChange?.(event);\n }\n };\n\n private refHandler = (node: any) => {\n this.viewNode = node;\n\n const child = React.Children.only(this.props.children);\n // TODO(TS) fix ref type\n const { ref }: any = child;\n if (ref !== null) {\n if (typeof ref === 'function') {\n ref(node);\n } else {\n ref.current = node;\n }\n }\n };\n\n private createGestureHandler = (\n newConfig: Readonly<Record<string, unknown>>\n ) => {\n this.config = newConfig;\n\n RNGestureHandlerModule.createGestureHandler(\n name,\n this.handlerTag,\n newConfig\n );\n };\n\n private attachGestureHandler = (newViewTag: number) => {\n this.viewTag = newViewTag;\n\n if (Platform.OS === 'web') {\n // Typecast due to dynamic resolution, attachGestureHandler should have web version signature in this branch\n (\n RNGestureHandlerModule.attachGestureHandler as AttachGestureHandlerWeb\n )(\n this.handlerTag,\n newViewTag,\n ActionType.JS_FUNCTION_OLD_API, // ignored on web\n this.propsRef\n );\n } else {\n registerOldGestureHandler(this.handlerTag, {\n onGestureEvent: this.onGestureHandlerEvent,\n onGestureStateChange: this.onGestureHandlerStateChange,\n });\n\n const actionType = (() => {\n const onGestureEvent = this.props?.onGestureEvent;\n const isGestureHandlerWorklet =\n onGestureEvent &&\n ('current' in onGestureEvent ||\n 'workletEventHandler' in onGestureEvent);\n const onHandlerStateChange = this.props?.onHandlerStateChange;\n const isStateChangeHandlerWorklet =\n onHandlerStateChange &&\n ('current' in onHandlerStateChange ||\n 'workletEventHandler' in onHandlerStateChange);\n const isReanimatedHandler =\n isGestureHandlerWorklet || isStateChangeHandlerWorklet;\n if (isReanimatedHandler) {\n // Reanimated worklet\n return ActionType.REANIMATED_WORKLET;\n } else if (onGestureEvent && '__isNative' in onGestureEvent) {\n // Animated.event with useNativeDriver: true\n return ActionType.NATIVE_ANIMATED_EVENT;\n } else {\n // JS callback or Animated.event with useNativeDriver: false\n return ActionType.JS_FUNCTION_OLD_API;\n }\n })();\n\n RNGestureHandlerModule.attachGestureHandler(\n this.handlerTag,\n newViewTag,\n actionType\n );\n }\n\n scheduleFlushOperations();\n\n ghQueueMicrotask(() => {\n MountRegistry.gestureHandlerWillMount(this);\n });\n };\n\n private updateGestureHandler = (\n newConfig: Readonly<Record<string, unknown>>\n ) => {\n this.config = newConfig;\n\n RNGestureHandlerModule.updateGestureHandler(this.handlerTag, newConfig);\n scheduleFlushOperations();\n };\n\n private update(remainingTries: number) {\n if (!this.isMountedRef.current) {\n return;\n }\n\n const props: HandlerProps<U> = this.props;\n\n // When ref is set via a function i.e. `ref={(r) => refObject.current = r}` instead of\n // `ref={refObject}` it's possible that it won't be resolved in time. Seems like trying\n // again is easy enough fix.\n if (hasUnresolvedRefs(props) && remainingTries > 0) {\n ghQueueMicrotask(() => {\n this.update(remainingTries - 1);\n });\n } else {\n const newConfig = filterConfig(\n transformProps ? transformProps(this.props) : this.props,\n [...allowedProps, ...customNativeProps],\n config\n );\n if (!deepEqual(this.config, newConfig)) {\n this.updateGestureHandler(newConfig);\n }\n }\n }\n\n setNativeProps(updates: any) {\n const mergedProps = { ...this.props, ...updates };\n const newConfig = filterConfig(\n transformProps ? transformProps(mergedProps) : mergedProps,\n [...allowedProps, ...customNativeProps],\n config\n );\n this.updateGestureHandler(newConfig);\n }\n\n render() {\n if (__DEV__ && !this.context && !isJestEnv() && Platform.OS !== 'web') {\n throw new Error(\n name +\n ' must be used as a descendant of GestureHandlerRootView. Otherwise the gestures will not be recognized. See https://docs.swmansion.com/react-native-gesture-handler/docs/installation for more details.'\n );\n }\n\n let gestureEventHandler = this.onGestureHandlerEvent;\n // Another instance of https://github.com/microsoft/TypeScript/issues/13995\n type OnGestureEventHandlers = {\n onGestureEvent?: BaseGestureHandlerProps<U>['onGestureEvent'];\n onGestureHandlerEvent?: InternalEventHandlers['onGestureHandlerEvent'];\n };\n const { onGestureEvent, onGestureHandlerEvent }: OnGestureEventHandlers =\n this.props;\n if (onGestureEvent && typeof onGestureEvent !== 'function') {\n // If it's not a method it should be an native Animated.event\n // object. We set it directly as the handler for the view\n // In this case nested handlers are not going to be supported\n if (onGestureHandlerEvent) {\n throw new Error(\n 'Nesting touch handlers with native animated driver is not supported yet'\n );\n }\n gestureEventHandler = onGestureEvent;\n } else {\n if (\n onGestureHandlerEvent &&\n typeof onGestureHandlerEvent !== 'function'\n ) {\n throw new Error(\n 'Nesting touch handlers with native animated driver is not supported yet'\n );\n }\n }\n\n let gestureStateEventHandler = this.onGestureHandlerStateChange;\n // Another instance of https://github.com/microsoft/TypeScript/issues/13995\n type OnGestureStateChangeHandlers = {\n onHandlerStateChange?: BaseGestureHandlerProps<U>['onHandlerStateChange'];\n onGestureHandlerStateChange?: InternalEventHandlers['onGestureHandlerStateChange'];\n };\n const {\n onHandlerStateChange,\n onGestureHandlerStateChange,\n }: OnGestureStateChangeHandlers = this.props;\n if (onHandlerStateChange && typeof onHandlerStateChange !== 'function') {\n // If it's not a method it should be an native Animated.event\n // object. We set it directly as the handler for the view\n // In this case nested handlers are not going to be supported\n if (onGestureHandlerStateChange) {\n throw new Error(\n 'Nesting touch handlers with native animated driver is not supported yet'\n );\n }\n gestureStateEventHandler = onHandlerStateChange;\n } else {\n if (\n onGestureHandlerStateChange &&\n typeof onGestureHandlerStateChange !== 'function'\n ) {\n throw new Error(\n 'Nesting touch handlers with native animated driver is not supported yet'\n );\n }\n }\n const events = {\n onGestureHandlerEvent: this.state.allowTouches\n ? gestureEventHandler\n : undefined,\n onGestureHandlerStateChange: this.state.allowTouches\n ? gestureStateEventHandler\n : undefined,\n };\n\n this.propsRef.current = events;\n\n let child: any = null;\n try {\n child = React.Children.only(this.props.children);\n } catch (e) {\n throw new Error(\n tagMessage(\n `${name} got more than one view as a child. If you want the gesture to work on multiple views, wrap them with a common parent and attach the gesture to that view.`\n )\n );\n }\n\n let grandChildren = child.props.children;\n if (\n __DEV__ &&\n child.type &&\n (child.type === 'RNGestureHandlerButton' ||\n child.type.name === 'View' ||\n child.type.displayName === 'View')\n ) {\n grandChildren = React.Children.toArray(grandChildren);\n grandChildren.push(\n <PressabilityDebugView\n key=\"pressabilityDebugView\"\n color=\"mediumspringgreen\"\n hitSlop={child.props.hitSlop}\n />\n );\n }\n\n return React.cloneElement(\n child,\n {\n ref: this.refHandler,\n collapsable: false,\n ...(isJestEnv()\n ? {\n handlerType: name,\n handlerTag: this.handlerTag,\n enabled: this.props.enabled,\n }\n : {}),\n testID: this.props.testID ?? child.props.testID,\n ...events,\n },\n grandChildren\n );\n }\n }\n return Handler;\n}\n"]}
1
+ {"version":3,"names":["React","Platform","UIManager","DeviceEventEmitter","customDirectEventTypes","RNGestureHandlerModule","State","handlerIDToTag","registerOldGestureHandler","unregisterOldGestureHandler","getNextHandlerTag","filterConfig","scheduleFlushOperations","findNodeHandle","deepEqual","isFabric","isTestEnv","tagMessage","ActionType","PressabilityDebugView","GestureHandlerRootViewContext","ghQueueMicrotask","MountRegistry","UIManagerAny","topGestureHandlerEvent","registrationName","customGHEventsConfigFabricAndroid","topOnGestureHandlerEvent","topOnGestureHandlerStateChange","customGHEventsConfig","onGestureHandlerEvent","onGestureHandlerStateChange","OS","genericDirectEventTypes","UIManagerConstants","_UIManagerAny$getView","_UIManagerAny$getView2","getViewManagerConfig","call","_UIManagerAny$getCons","getConstants","setJSResponder","oldSetJSResponder","clearJSResponder","oldClearJSResponder","tag","blockNativeResponder","handleSetJSResponder","handleClearJSResponder","allowTouches","DEV_ON_ANDROID","__DEV__","addListener","hasUnresolvedRefs","props","extract","refs","Array","isArray","current","some","r","stateToPropMappings","UNDETERMINED","undefined","BEGAN","FAILED","CANCELLED","ACTIVE","END","UNRESOLVED_REFS_RETRY_LIMIT","createHandler","name","allowedProps","config","transformProps","customNativeProps","Handler","Component","constructor","_defineProperty","event","nativeEvent","handlerTag","onGestureEvent","_this$props$onGesture","_this$props","_this$props$onGesture2","_this$props2","onHandlerStateChange","_this$props$onHandler","_this$props3","state","stateEventName","eventHandler","_this$props$onGesture3","_this$props4","node","viewNode","child","Children","only","children","ref","newConfig","createGestureHandler","newViewTag","viewTag","attachGestureHandler","JS_FUNCTION_OLD_API","propsRef","onGestureStateChange","actionType","_this$props5","_this$props6","isGestureHandlerWorklet","isStateChangeHandlerWorklet","isReanimatedHandler","REANIMATED_WORKLET","NATIVE_ANIMATED_EVENT","gestureHandlerWillMount","updateGestureHandler","createRef","isMountedRef","id","Error","componentDidMount","inspectorToggleListener","setState","_","update","displayName","componentDidUpdate","componentWillUnmount","_this$inspectorToggle","remove","dropGestureHandler","handlerID","gestureHandlerWillUnmount","remainingTries","setNativeProps","updates","mergedProps","render","_this$props$testID","context","gestureEventHandler","gestureStateEventHandler","events","e","grandChildren","type","toArray","push","createElement","key","color","hitSlop","cloneElement","refHandler","collapsable","handlerType","enabled","testID"],"sources":["createHandler.tsx"],"sourcesContent":["import * as React from 'react';\nimport {\n Platform,\n UIManager,\n DeviceEventEmitter,\n EmitterSubscription,\n} from 'react-native';\nimport { customDirectEventTypes } from './customDirectEventTypes';\nimport RNGestureHandlerModule from '../RNGestureHandlerModule';\nimport { State } from '../State';\nimport {\n handlerIDToTag,\n registerOldGestureHandler,\n unregisterOldGestureHandler,\n} from './handlersRegistry';\nimport { getNextHandlerTag } from './getNextHandlerTag';\n\nimport {\n BaseGestureHandlerProps,\n GestureEvent,\n HandlerStateChangeEvent,\n} from './gestureHandlerCommon';\nimport { filterConfig, scheduleFlushOperations } from './utils';\nimport findNodeHandle from '../findNodeHandle';\nimport { ValueOf } from '../typeUtils';\nimport { deepEqual, isFabric, isTestEnv, tagMessage } from '../utils';\nimport { ActionType } from '../ActionType';\nimport { PressabilityDebugView } from './PressabilityDebugView';\nimport GestureHandlerRootViewContext from '../GestureHandlerRootViewContext';\nimport { ghQueueMicrotask } from '../ghQueueMicrotask';\nimport { MountRegistry } from '../mountRegistry';\n\nconst UIManagerAny = UIManager as any;\n\ncustomDirectEventTypes.topGestureHandlerEvent = {\n registrationName: 'onGestureHandlerEvent',\n};\n\nconst customGHEventsConfigFabricAndroid = {\n topOnGestureHandlerEvent: { registrationName: 'onGestureHandlerEvent' },\n topOnGestureHandlerStateChange: {\n registrationName: 'onGestureHandlerStateChange',\n },\n};\n\nconst customGHEventsConfig = {\n onGestureHandlerEvent: { registrationName: 'onGestureHandlerEvent' },\n onGestureHandlerStateChange: {\n registrationName: 'onGestureHandlerStateChange',\n },\n\n // When using React Native Gesture Handler for Animated.event with useNativeDriver: true\n // on Android with Fabric enabled, the native part still sends the native events to JS\n // but prefixed with \"top\". We cannot simply rename the events above so they are prefixed\n // with \"top\" instead of \"on\" because in such case Animated.events would not be registered.\n // That's why we need to register another pair of event names.\n // The incoming events will be queued but never handled.\n // Without this piece of code below, you'll get the following JS error:\n // Unsupported top level event type \"topOnGestureHandlerEvent\" dispatched\n ...(isFabric() &&\n Platform.OS === 'android' &&\n customGHEventsConfigFabricAndroid),\n};\n\n// Add gesture specific events to genericDirectEventTypes object exported from UIManager\n// native module.\n// Once new event types are registered with react it is possible to dispatch these\n// events to all kind of native views.\nUIManagerAny.genericDirectEventTypes = {\n ...UIManagerAny.genericDirectEventTypes,\n ...customGHEventsConfig,\n};\n// In newer versions of RN the `genericDirectEventTypes` is located in the object\n// returned by UIManager.getViewManagerConfig('getConstants') or in older RN UIManager.getConstants(), we need to add it there as well to make\n// it compatible with RN 61+\nconst UIManagerConstants =\n UIManagerAny.getViewManagerConfig?.('getConstants') ??\n UIManagerAny.getConstants?.();\n\nif (UIManagerConstants) {\n UIManagerConstants.genericDirectEventTypes = {\n ...UIManagerConstants.genericDirectEventTypes,\n ...customGHEventsConfig,\n };\n}\n\n// Wrap JS responder calls and notify gesture handler manager\nconst {\n setJSResponder: oldSetJSResponder = () => {\n // no-op\n },\n clearJSResponder: oldClearJSResponder = () => {\n // no-op\n },\n} = UIManagerAny;\nUIManagerAny.setJSResponder = (tag: number, blockNativeResponder: boolean) => {\n RNGestureHandlerModule.handleSetJSResponder(tag, blockNativeResponder);\n oldSetJSResponder(tag, blockNativeResponder);\n};\nUIManagerAny.clearJSResponder = () => {\n RNGestureHandlerModule.handleClearJSResponder();\n oldClearJSResponder();\n};\n\nlet allowTouches = true;\nconst DEV_ON_ANDROID = __DEV__ && Platform.OS === 'android';\n// Toggled inspector blocks touch events in order to allow inspecting on Android\n// This needs to be a global variable in order to set initial state for `allowTouches` property in Handler component\nif (DEV_ON_ANDROID) {\n DeviceEventEmitter.addListener('toggleElementInspector', () => {\n allowTouches = !allowTouches;\n });\n}\n\ntype HandlerProps<T extends Record<string, unknown>> = Readonly<\n React.PropsWithChildren<BaseGestureHandlerProps<T>>\n>;\nfunction hasUnresolvedRefs<T extends Record<string, unknown>>(\n props: HandlerProps<T>\n) {\n // TODO(TS) - add type for extract arg\n const extract = (refs: any | any[]) => {\n if (!Array.isArray(refs)) {\n return refs && refs.current === null;\n }\n return refs.some((r) => r && r.current === null);\n };\n return extract(props['simultaneousHandlers']) || extract(props['waitFor']);\n}\n\nconst stateToPropMappings = {\n [State.UNDETERMINED]: undefined,\n [State.BEGAN]: 'onBegan',\n [State.FAILED]: 'onFailed',\n [State.CANCELLED]: 'onCancelled',\n [State.ACTIVE]: 'onActivated',\n [State.END]: 'onEnded',\n} as const;\n\ntype CreateHandlerArgs<HandlerPropsT extends Record<string, unknown>> =\n Readonly<{\n name: string;\n allowedProps: Readonly<Extract<keyof HandlerPropsT, string>[]>;\n config: Readonly<Record<string, unknown>>;\n transformProps?: (props: HandlerPropsT) => HandlerPropsT;\n customNativeProps?: Readonly<string[]>;\n }>;\n\n// TODO(TS) fix event types\ntype InternalEventHandlers = {\n onGestureHandlerEvent?: (event: any) => void;\n onGestureHandlerStateChange?: (event: any) => void;\n};\n\ntype AttachGestureHandlerWeb = (\n handlerTag: number,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n newView: any,\n _actionType: ActionType,\n propsRef: React.RefObject<unknown>\n) => void;\n\nconst UNRESOLVED_REFS_RETRY_LIMIT = 1;\n\n// TODO(TS) - make sure that BaseGestureHandlerProps doesn't need other generic parameter to work with custom properties.\nexport default function createHandler<\n T extends BaseGestureHandlerProps<U>,\n U extends Record<string, unknown>,\n>({\n name,\n allowedProps = [],\n config = {},\n transformProps,\n customNativeProps = [],\n}: CreateHandlerArgs<T>): React.ComponentType<T & React.RefAttributes<any>> {\n interface HandlerState {\n allowTouches: boolean;\n }\n class Handler extends React.Component<\n T & InternalEventHandlers,\n HandlerState\n > {\n static displayName = name;\n static contextType = GestureHandlerRootViewContext;\n\n private handlerTag: number;\n private config: Record<string, unknown>;\n private propsRef: React.MutableRefObject<unknown>;\n private isMountedRef: React.MutableRefObject<boolean | null>;\n private viewNode: any;\n private viewTag?: number;\n private inspectorToggleListener?: EmitterSubscription;\n\n constructor(props: T & InternalEventHandlers) {\n super(props);\n this.handlerTag = getNextHandlerTag();\n this.config = {};\n this.propsRef = React.createRef();\n this.isMountedRef = React.createRef();\n this.state = { allowTouches };\n if (props.id) {\n if (handlerIDToTag[props.id] !== undefined) {\n throw new Error(`Handler with ID \"${props.id}\" already registered`);\n }\n handlerIDToTag[props.id] = this.handlerTag;\n }\n }\n\n componentDidMount() {\n const props: HandlerProps<U> = this.props;\n this.isMountedRef.current = true;\n\n if (DEV_ON_ANDROID) {\n this.inspectorToggleListener = DeviceEventEmitter.addListener(\n 'toggleElementInspector',\n () => {\n this.setState((_) => ({ allowTouches }));\n this.update(UNRESOLVED_REFS_RETRY_LIMIT);\n }\n );\n }\n if (hasUnresolvedRefs(props)) {\n // If there are unresolved refs (e.g. \".current\" has not yet been set)\n // passed as `simultaneousHandlers` or `waitFor`, we enqueue a call to\n // _update method that will try to update native handler props using\n // queueMicrotask. This makes it so update() function gets called after all\n // react components are mounted and we expect the missing ref object to\n // be resolved by then.\n ghQueueMicrotask(() => {\n this.update(UNRESOLVED_REFS_RETRY_LIMIT);\n });\n }\n\n this.createGestureHandler(\n filterConfig(\n transformProps ? transformProps(this.props) : this.props,\n [...allowedProps, ...customNativeProps],\n config\n )\n );\n\n if (!this.viewNode) {\n throw new Error(\n `[Gesture Handler] Failed to obtain view for ${Handler.displayName}. Note that old API doesn't support functional components.`\n );\n }\n\n this.attachGestureHandler(findNodeHandle(this.viewNode) as number); // TODO(TS) - check if this can be null\n }\n\n componentDidUpdate() {\n const viewTag = findNodeHandle(this.viewNode);\n if (this.viewTag !== viewTag) {\n this.attachGestureHandler(viewTag as number); // TODO(TS) - check interaction between _viewTag & findNodeHandle\n }\n this.update(UNRESOLVED_REFS_RETRY_LIMIT);\n }\n\n componentWillUnmount() {\n this.inspectorToggleListener?.remove();\n this.isMountedRef.current = false;\n if (Platform.OS !== 'web') {\n unregisterOldGestureHandler(this.handlerTag);\n }\n RNGestureHandlerModule.dropGestureHandler(this.handlerTag);\n scheduleFlushOperations();\n // We can't use this.props.id directly due to TS generic type narrowing bug, see https://github.com/microsoft/TypeScript/issues/13995 for more context\n const handlerID: string | undefined = this.props.id;\n if (handlerID) {\n // eslint-disable-next-line @typescript-eslint/no-dynamic-delete\n delete handlerIDToTag[handlerID];\n }\n\n MountRegistry.gestureHandlerWillUnmount(this);\n }\n\n private onGestureHandlerEvent = (event: GestureEvent<U>) => {\n if (event.nativeEvent.handlerTag === this.handlerTag) {\n if (typeof this.props.onGestureEvent === 'function') {\n this.props.onGestureEvent?.(event);\n }\n } else {\n this.props.onGestureHandlerEvent?.(event);\n }\n };\n\n // TODO(TS) - make sure this is right type for event\n private onGestureHandlerStateChange = (\n event: HandlerStateChangeEvent<U>\n ) => {\n if (event.nativeEvent.handlerTag === this.handlerTag) {\n if (typeof this.props.onHandlerStateChange === 'function') {\n this.props.onHandlerStateChange?.(event);\n }\n\n const state: ValueOf<typeof State> = event.nativeEvent.state;\n const stateEventName = stateToPropMappings[state];\n const eventHandler = stateEventName && this.props[stateEventName];\n if (eventHandler && typeof eventHandler === 'function') {\n eventHandler(event);\n }\n } else {\n this.props.onGestureHandlerStateChange?.(event);\n }\n };\n\n private refHandler = (node: any) => {\n this.viewNode = node;\n\n const child = React.Children.only(this.props.children);\n // TODO(TS) fix ref type\n const { ref }: any = child;\n if (ref !== null) {\n if (typeof ref === 'function') {\n ref(node);\n } else {\n ref.current = node;\n }\n }\n };\n\n private createGestureHandler = (\n newConfig: Readonly<Record<string, unknown>>\n ) => {\n this.config = newConfig;\n\n RNGestureHandlerModule.createGestureHandler(\n name,\n this.handlerTag,\n newConfig\n );\n };\n\n private attachGestureHandler = (newViewTag: number) => {\n this.viewTag = newViewTag;\n\n if (Platform.OS === 'web') {\n // Typecast due to dynamic resolution, attachGestureHandler should have web version signature in this branch\n (\n RNGestureHandlerModule.attachGestureHandler as AttachGestureHandlerWeb\n )(\n this.handlerTag,\n newViewTag,\n ActionType.JS_FUNCTION_OLD_API, // ignored on web\n this.propsRef\n );\n } else {\n registerOldGestureHandler(this.handlerTag, {\n onGestureEvent: this.onGestureHandlerEvent,\n onGestureStateChange: this.onGestureHandlerStateChange,\n });\n\n const actionType = (() => {\n const onGestureEvent = this.props?.onGestureEvent;\n const isGestureHandlerWorklet =\n onGestureEvent &&\n ('current' in onGestureEvent ||\n 'workletEventHandler' in onGestureEvent);\n const onHandlerStateChange = this.props?.onHandlerStateChange;\n const isStateChangeHandlerWorklet =\n onHandlerStateChange &&\n ('current' in onHandlerStateChange ||\n 'workletEventHandler' in onHandlerStateChange);\n const isReanimatedHandler =\n isGestureHandlerWorklet || isStateChangeHandlerWorklet;\n if (isReanimatedHandler) {\n // Reanimated worklet\n return ActionType.REANIMATED_WORKLET;\n } else if (onGestureEvent && '__isNative' in onGestureEvent) {\n // Animated.event with useNativeDriver: true\n return ActionType.NATIVE_ANIMATED_EVENT;\n } else {\n // JS callback or Animated.event with useNativeDriver: false\n return ActionType.JS_FUNCTION_OLD_API;\n }\n })();\n\n RNGestureHandlerModule.attachGestureHandler(\n this.handlerTag,\n newViewTag,\n actionType\n );\n }\n\n scheduleFlushOperations();\n\n ghQueueMicrotask(() => {\n MountRegistry.gestureHandlerWillMount(this);\n });\n };\n\n private updateGestureHandler = (\n newConfig: Readonly<Record<string, unknown>>\n ) => {\n this.config = newConfig;\n\n RNGestureHandlerModule.updateGestureHandler(this.handlerTag, newConfig);\n scheduleFlushOperations();\n };\n\n private update(remainingTries: number) {\n if (!this.isMountedRef.current) {\n return;\n }\n\n const props: HandlerProps<U> = this.props;\n\n // When ref is set via a function i.e. `ref={(r) => refObject.current = r}` instead of\n // `ref={refObject}` it's possible that it won't be resolved in time. Seems like trying\n // again is easy enough fix.\n if (hasUnresolvedRefs(props) && remainingTries > 0) {\n ghQueueMicrotask(() => {\n this.update(remainingTries - 1);\n });\n } else {\n const newConfig = filterConfig(\n transformProps ? transformProps(this.props) : this.props,\n [...allowedProps, ...customNativeProps],\n config\n );\n if (!deepEqual(this.config, newConfig)) {\n this.updateGestureHandler(newConfig);\n }\n }\n }\n\n setNativeProps(updates: any) {\n const mergedProps = { ...this.props, ...updates };\n const newConfig = filterConfig(\n transformProps ? transformProps(mergedProps) : mergedProps,\n [...allowedProps, ...customNativeProps],\n config\n );\n this.updateGestureHandler(newConfig);\n }\n\n render() {\n if (__DEV__ && !this.context && !isTestEnv() && Platform.OS !== 'web') {\n throw new Error(\n name +\n ' must be used as a descendant of GestureHandlerRootView. Otherwise the gestures will not be recognized. See https://docs.swmansion.com/react-native-gesture-handler/docs/installation for more details.'\n );\n }\n\n let gestureEventHandler = this.onGestureHandlerEvent;\n // Another instance of https://github.com/microsoft/TypeScript/issues/13995\n type OnGestureEventHandlers = {\n onGestureEvent?: BaseGestureHandlerProps<U>['onGestureEvent'];\n onGestureHandlerEvent?: InternalEventHandlers['onGestureHandlerEvent'];\n };\n const { onGestureEvent, onGestureHandlerEvent }: OnGestureEventHandlers =\n this.props;\n if (onGestureEvent && typeof onGestureEvent !== 'function') {\n // If it's not a method it should be an native Animated.event\n // object. We set it directly as the handler for the view\n // In this case nested handlers are not going to be supported\n if (onGestureHandlerEvent) {\n throw new Error(\n 'Nesting touch handlers with native animated driver is not supported yet'\n );\n }\n gestureEventHandler = onGestureEvent;\n } else {\n if (\n onGestureHandlerEvent &&\n typeof onGestureHandlerEvent !== 'function'\n ) {\n throw new Error(\n 'Nesting touch handlers with native animated driver is not supported yet'\n );\n }\n }\n\n let gestureStateEventHandler = this.onGestureHandlerStateChange;\n // Another instance of https://github.com/microsoft/TypeScript/issues/13995\n type OnGestureStateChangeHandlers = {\n onHandlerStateChange?: BaseGestureHandlerProps<U>['onHandlerStateChange'];\n onGestureHandlerStateChange?: InternalEventHandlers['onGestureHandlerStateChange'];\n };\n const {\n onHandlerStateChange,\n onGestureHandlerStateChange,\n }: OnGestureStateChangeHandlers = this.props;\n if (onHandlerStateChange && typeof onHandlerStateChange !== 'function') {\n // If it's not a method it should be an native Animated.event\n // object. We set it directly as the handler for the view\n // In this case nested handlers are not going to be supported\n if (onGestureHandlerStateChange) {\n throw new Error(\n 'Nesting touch handlers with native animated driver is not supported yet'\n );\n }\n gestureStateEventHandler = onHandlerStateChange;\n } else {\n if (\n onGestureHandlerStateChange &&\n typeof onGestureHandlerStateChange !== 'function'\n ) {\n throw new Error(\n 'Nesting touch handlers with native animated driver is not supported yet'\n );\n }\n }\n const events = {\n onGestureHandlerEvent: this.state.allowTouches\n ? gestureEventHandler\n : undefined,\n onGestureHandlerStateChange: this.state.allowTouches\n ? gestureStateEventHandler\n : undefined,\n };\n\n this.propsRef.current = events;\n\n let child: any = null;\n try {\n child = React.Children.only(this.props.children);\n } catch (e) {\n throw new Error(\n tagMessage(\n `${name} got more than one view as a child. If you want the gesture to work on multiple views, wrap them with a common parent and attach the gesture to that view.`\n )\n );\n }\n\n let grandChildren = child.props.children;\n if (\n __DEV__ &&\n child.type &&\n (child.type === 'RNGestureHandlerButton' ||\n child.type.name === 'View' ||\n child.type.displayName === 'View')\n ) {\n grandChildren = React.Children.toArray(grandChildren);\n grandChildren.push(\n <PressabilityDebugView\n key=\"pressabilityDebugView\"\n color=\"mediumspringgreen\"\n hitSlop={child.props.hitSlop}\n />\n );\n }\n\n return React.cloneElement(\n child,\n {\n ref: this.refHandler,\n collapsable: false,\n ...(isTestEnv()\n ? {\n handlerType: name,\n handlerTag: this.handlerTag,\n enabled: this.props.enabled,\n }\n : {}),\n testID: this.props.testID ?? child.props.testID,\n ...events,\n },\n grandChildren\n );\n }\n }\n return Handler;\n}\n"],"mappings":";;;;AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SACEC,QAAQ,EACRC,SAAS,EACTC,kBAAkB,QAEb,cAAc;AACrB,SAASC,sBAAsB,QAAQ,0BAA0B;AACjE,OAAOC,sBAAsB,MAAM,2BAA2B;AAC9D,SAASC,KAAK,QAAQ,UAAU;AAChC,SACEC,cAAc,EACdC,yBAAyB,EACzBC,2BAA2B,QACtB,oBAAoB;AAC3B,SAASC,iBAAiB,QAAQ,qBAAqB;AAOvD,SAASC,YAAY,EAAEC,uBAAuB,QAAQ,SAAS;AAC/D,OAAOC,cAAc,MAAM,mBAAmB;AAE9C,SAASC,SAAS,EAAEC,Q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