react-native-gesture-handler 2.22.1 → 2.23.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (677) hide show
  1. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +14 -0
  2. package/android/src/main/jni/cpp-adapter.cpp +19 -12
  3. package/apple/RNGestureHandler.mm +15 -8
  4. package/apple/RNGestureHandlerModule.mm +17 -5
  5. package/lib/commonjs/ActionType.js +3 -3
  6. package/lib/commonjs/ActionType.js.map +1 -1
  7. package/lib/commonjs/Directions.js +11 -8
  8. package/lib/commonjs/Directions.js.map +1 -1
  9. package/lib/commonjs/EnableNewWebImplementation.js +2 -10
  10. package/lib/commonjs/EnableNewWebImplementation.js.map +1 -1
  11. package/lib/commonjs/GestureHandlerRootViewContext.js +2 -7
  12. package/lib/commonjs/GestureHandlerRootViewContext.js.map +1 -1
  13. package/lib/commonjs/PlatformConstants.js +1 -6
  14. package/lib/commonjs/PlatformConstants.js.map +1 -1
  15. package/lib/commonjs/PlatformConstants.web.js +1 -3
  16. package/lib/commonjs/PlatformConstants.web.js.map +1 -1
  17. package/lib/commonjs/PointerType.js +3 -5
  18. package/lib/commonjs/PointerType.js.map +1 -1
  19. package/lib/commonjs/RNGestureHandlerModule.js +2 -6
  20. package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
  21. package/lib/commonjs/RNGestureHandlerModule.web.js +13 -39
  22. package/lib/commonjs/RNGestureHandlerModule.web.js.map +1 -1
  23. package/lib/commonjs/RNGestureHandlerModule.windows.js +22 -32
  24. package/lib/commonjs/RNGestureHandlerModule.windows.js.map +1 -1
  25. package/lib/commonjs/RNRenderer.js +1 -3
  26. package/lib/commonjs/RNRenderer.js.map +1 -1
  27. package/lib/commonjs/RNRenderer.web.js +1 -2
  28. package/lib/commonjs/RNRenderer.web.js.map +1 -1
  29. package/lib/commonjs/State.js +4 -3
  30. package/lib/commonjs/State.js.map +1 -1
  31. package/lib/commonjs/TouchEventType.js +3 -3
  32. package/lib/commonjs/TouchEventType.js.map +1 -1
  33. package/lib/commonjs/components/DrawerLayout.js +96 -115
  34. package/lib/commonjs/components/DrawerLayout.js.map +1 -1
  35. package/lib/commonjs/components/GestureButtons.js +36 -80
  36. package/lib/commonjs/components/GestureButtons.js.map +1 -1
  37. package/lib/commonjs/components/GestureButtonsProps.js.map +1 -1
  38. package/lib/commonjs/components/GestureComponents.js +26 -37
  39. package/lib/commonjs/components/GestureComponents.js.map +1 -1
  40. package/lib/commonjs/components/GestureComponents.web.js +13 -27
  41. package/lib/commonjs/components/GestureComponents.web.js.map +1 -1
  42. package/lib/commonjs/components/GestureHandlerButton.js +2 -6
  43. package/lib/commonjs/components/GestureHandlerButton.js.map +1 -1
  44. package/lib/commonjs/components/GestureHandlerButton.web.js +4 -12
  45. package/lib/commonjs/components/GestureHandlerButton.web.js.map +1 -1
  46. package/lib/commonjs/components/GestureHandlerRootView.android.js +4 -15
  47. package/lib/commonjs/components/GestureHandlerRootView.android.js.map +1 -1
  48. package/lib/commonjs/components/GestureHandlerRootView.js +4 -14
  49. package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
  50. package/lib/commonjs/components/GestureHandlerRootView.web.js +4 -13
  51. package/lib/commonjs/components/GestureHandlerRootView.web.js.map +1 -1
  52. package/lib/commonjs/components/Pressable/Pressable.js +46 -78
  53. package/lib/commonjs/components/Pressable/Pressable.js.map +1 -1
  54. package/lib/commonjs/components/Pressable/PressableProps.js.map +1 -1
  55. package/lib/commonjs/components/Pressable/index.js +1 -3
  56. package/lib/commonjs/components/Pressable/index.js.map +1 -1
  57. package/lib/commonjs/components/Pressable/utils.js +5 -20
  58. package/lib/commonjs/components/Pressable/utils.js.map +1 -1
  59. package/lib/commonjs/components/ReanimatedDrawerLayout.js +38 -76
  60. package/lib/commonjs/components/ReanimatedDrawerLayout.js.map +1 -1
  61. package/lib/commonjs/components/ReanimatedSwipeable.js +61 -59
  62. package/lib/commonjs/components/ReanimatedSwipeable.js.map +1 -1
  63. package/lib/commonjs/components/Swipeable.js +34 -75
  64. package/lib/commonjs/components/Swipeable.js.map +1 -1
  65. package/lib/commonjs/components/Text.js +18 -26
  66. package/lib/commonjs/components/Text.js.map +1 -1
  67. package/lib/commonjs/components/gestureHandlerRootHOC.js +5 -14
  68. package/lib/commonjs/components/gestureHandlerRootHOC.js.map +1 -1
  69. package/lib/commonjs/components/touchables/GenericTouchable.js +40 -76
  70. package/lib/commonjs/components/touchables/GenericTouchable.js.map +1 -1
  71. package/lib/commonjs/components/touchables/GenericTouchableProps.js.map +1 -1
  72. package/lib/commonjs/components/touchables/TouchableHighlight.js +20 -33
  73. package/lib/commonjs/components/touchables/TouchableHighlight.js.map +1 -1
  74. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +17 -31
  75. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  76. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +5 -4
  77. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js.map +1 -1
  78. package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js.map +1 -1
  79. package/lib/commonjs/components/touchables/TouchableOpacity.js +17 -24
  80. package/lib/commonjs/components/touchables/TouchableOpacity.js.map +1 -1
  81. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +12 -13
  82. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  83. package/lib/commonjs/components/touchables/index.js +7 -12
  84. package/lib/commonjs/components/touchables/index.js.map +1 -1
  85. package/lib/commonjs/findNodeHandle.js +1 -4
  86. package/lib/commonjs/findNodeHandle.js.map +1 -1
  87. package/lib/commonjs/findNodeHandle.web.js +9 -10
  88. package/lib/commonjs/findNodeHandle.web.js.map +1 -1
  89. package/lib/commonjs/getReactNativeVersion.js +1 -6
  90. package/lib/commonjs/getReactNativeVersion.js.map +1 -1
  91. package/lib/commonjs/getReactNativeVersion.web.js +0 -1
  92. package/lib/commonjs/getReactNativeVersion.web.js.map +1 -1
  93. package/lib/commonjs/getShadowNodeFromRef.js +13 -14
  94. package/lib/commonjs/getShadowNodeFromRef.js.map +1 -1
  95. package/lib/commonjs/getShadowNodeFromRef.web.js +0 -1
  96. package/lib/commonjs/getShadowNodeFromRef.web.js.map +1 -1
  97. package/lib/commonjs/ghQueueMicrotask.js +1 -2
  98. package/lib/commonjs/ghQueueMicrotask.js.map +1 -1
  99. package/lib/commonjs/handlers/FlingGestureHandler.js +16 -10
  100. package/lib/commonjs/handlers/FlingGestureHandler.js.map +1 -1
  101. package/lib/commonjs/handlers/ForceTouchGestureHandler.js +20 -23
  102. package/lib/commonjs/handlers/ForceTouchGestureHandler.js.map +1 -1
  103. package/lib/commonjs/handlers/GestureHandlerEventPayload.js.map +1 -1
  104. package/lib/commonjs/handlers/LongPressGestureHandler.js +16 -10
  105. package/lib/commonjs/handlers/LongPressGestureHandler.js.map +1 -1
  106. package/lib/commonjs/handlers/NativeViewGestureHandler.js +17 -12
  107. package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +1 -1
  108. package/lib/commonjs/handlers/PanGestureHandler.js +20 -31
  109. package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -1
  110. package/lib/commonjs/handlers/PinchGestureHandler.js +14 -8
  111. package/lib/commonjs/handlers/PinchGestureHandler.js.map +1 -1
  112. package/lib/commonjs/handlers/PressabilityDebugView.js +0 -1
  113. package/lib/commonjs/handlers/PressabilityDebugView.js.map +1 -1
  114. package/lib/commonjs/handlers/PressabilityDebugView.web.js +0 -1
  115. package/lib/commonjs/handlers/PressabilityDebugView.web.js.map +1 -1
  116. package/lib/commonjs/handlers/RotationGestureHandler.js +14 -8
  117. package/lib/commonjs/handlers/RotationGestureHandler.js.map +1 -1
  118. package/lib/commonjs/handlers/TapGestureHandler.js +16 -10
  119. package/lib/commonjs/handlers/TapGestureHandler.js.map +1 -1
  120. package/lib/commonjs/handlers/createHandler.js +55 -135
  121. package/lib/commonjs/handlers/createHandler.js.map +1 -1
  122. package/lib/commonjs/handlers/createNativeWrapper.js +17 -27
  123. package/lib/commonjs/handlers/createNativeWrapper.js.map +1 -1
  124. package/lib/commonjs/handlers/customDirectEventTypes.js +0 -1
  125. package/lib/commonjs/handlers/customDirectEventTypes.js.map +1 -1
  126. package/lib/commonjs/handlers/customDirectEventTypes.web.js +1 -2
  127. package/lib/commonjs/handlers/customDirectEventTypes.web.js.map +1 -1
  128. package/lib/commonjs/handlers/gestureHandlerCommon.js +9 -10
  129. package/lib/commonjs/handlers/gestureHandlerCommon.js.map +1 -1
  130. package/lib/commonjs/handlers/gestureHandlerTypesCompat.js.map +1 -1
  131. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js +5 -14
  132. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
  133. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js +10 -20
  134. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
  135. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js +9 -29
  136. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
  137. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js +1 -10
  138. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
  139. package/lib/commonjs/handlers/gestures/GestureDetector/index.js +12 -37
  140. package/lib/commonjs/handlers/gestures/GestureDetector/index.js.map +1 -1
  141. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js +0 -3
  142. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -1
  143. package/lib/commonjs/handlers/gestures/GestureDetector/types.js.map +1 -1
  144. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js +12 -24
  145. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
  146. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js +12 -48
  147. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
  148. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js +3 -13
  149. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
  150. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js +2 -9
  151. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
  152. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js +8 -16
  153. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
  154. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js +28 -56
  155. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js.map +1 -1
  156. package/lib/commonjs/handlers/gestures/eventReceiver.js +14 -46
  157. package/lib/commonjs/handlers/gestures/eventReceiver.js.map +1 -1
  158. package/lib/commonjs/handlers/gestures/flingGesture.js +5 -12
  159. package/lib/commonjs/handlers/gestures/flingGesture.js.map +1 -1
  160. package/lib/commonjs/handlers/gestures/forceTouchGesture.js +8 -19
  161. package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -1
  162. package/lib/commonjs/handlers/gestures/gesture.js +44 -84
  163. package/lib/commonjs/handlers/gestures/gesture.js.map +1 -1
  164. package/lib/commonjs/handlers/gestures/gestureComposition.js +17 -31
  165. package/lib/commonjs/handlers/gestures/gestureComposition.js.map +1 -1
  166. package/lib/commonjs/handlers/gestures/gestureObjects.js +1 -27
  167. package/lib/commonjs/handlers/gestures/gestureObjects.js.map +1 -1
  168. package/lib/commonjs/handlers/gestures/gestureStateManager.js +3 -9
  169. package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +1 -1
  170. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js +2 -7
  171. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js.map +1 -1
  172. package/lib/commonjs/handlers/gestures/hoverGesture.js +11 -25
  173. package/lib/commonjs/handlers/gestures/hoverGesture.js.map +1 -1
  174. package/lib/commonjs/handlers/gestures/longPressGesture.js +6 -14
  175. package/lib/commonjs/handlers/gestures/longPressGesture.js.map +1 -1
  176. package/lib/commonjs/handlers/gestures/manualGesture.js +0 -6
  177. package/lib/commonjs/handlers/gestures/manualGesture.js.map +1 -1
  178. package/lib/commonjs/handlers/gestures/nativeGesture.js +5 -12
  179. package/lib/commonjs/handlers/gestures/nativeGesture.js.map +1 -1
  180. package/lib/commonjs/handlers/gestures/panGesture.js +18 -43
  181. package/lib/commonjs/handlers/gestures/panGesture.js.map +1 -1
  182. package/lib/commonjs/handlers/gestures/pinchGesture.js +2 -9
  183. package/lib/commonjs/handlers/gestures/pinchGesture.js.map +1 -1
  184. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js +1 -8
  185. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js.map +1 -1
  186. package/lib/commonjs/handlers/gestures/rotationGesture.js +2 -9
  187. package/lib/commonjs/handlers/gestures/rotationGesture.js.map +1 -1
  188. package/lib/commonjs/handlers/gestures/tapGesture.js +10 -22
  189. package/lib/commonjs/handlers/gestures/tapGesture.js.map +1 -1
  190. package/lib/commonjs/handlers/getNextHandlerTag.js +0 -1
  191. package/lib/commonjs/handlers/getNextHandlerTag.js.map +1 -1
  192. package/lib/commonjs/handlers/handlersRegistry.js +11 -21
  193. package/lib/commonjs/handlers/handlersRegistry.js.map +1 -1
  194. package/lib/commonjs/handlers/utils.js +6 -26
  195. package/lib/commonjs/handlers/utils.js.map +1 -1
  196. package/lib/commonjs/index.js +75 -104
  197. package/lib/commonjs/index.js.map +1 -1
  198. package/lib/commonjs/init.js +4 -11
  199. package/lib/commonjs/init.js.map +1 -1
  200. package/lib/commonjs/jestUtils/index.js +4 -5
  201. package/lib/commonjs/jestUtils/index.js.map +1 -1
  202. package/lib/commonjs/jestUtils/jestUtils.js +19 -83
  203. package/lib/commonjs/jestUtils/jestUtils.js.map +1 -1
  204. package/lib/commonjs/mocks.js +5 -15
  205. package/lib/commonjs/mocks.js.map +1 -1
  206. package/lib/commonjs/mountRegistry.js +3 -12
  207. package/lib/commonjs/mountRegistry.js.map +1 -1
  208. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +1 -5
  209. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +1 -1
  210. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js +2 -7
  211. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
  212. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js +2 -7
  213. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
  214. package/lib/commonjs/typeUtils.js.map +1 -1
  215. package/lib/commonjs/utils.js +15 -30
  216. package/lib/commonjs/utils.js.map +1 -1
  217. package/lib/commonjs/web/Gestures.js +5 -23
  218. package/lib/commonjs/web/Gestures.js.map +1 -1
  219. package/lib/commonjs/web/constants.js +2 -4
  220. package/lib/commonjs/web/constants.js.map +1 -1
  221. package/lib/commonjs/web/detectors/RotationGestureDetector.js +26 -62
  222. package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +1 -1
  223. package/lib/commonjs/web/detectors/ScaleGestureDetector.js +36 -65
  224. package/lib/commonjs/web/detectors/ScaleGestureDetector.js.map +1 -1
  225. package/lib/commonjs/web/handlers/FlingGestureHandler.js +12 -55
  226. package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -1
  227. package/lib/commonjs/web/handlers/GestureHandler.js +160 -273
  228. package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
  229. package/lib/commonjs/web/handlers/HoverGestureHandler.js +8 -21
  230. package/lib/commonjs/web/handlers/HoverGestureHandler.js.map +1 -1
  231. package/lib/commonjs/web/handlers/IGestureHandler.js.map +1 -1
  232. package/lib/commonjs/web/handlers/LongPressGestureHandler.js +12 -53
  233. package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +1 -1
  234. package/lib/commonjs/web/handlers/ManualGestureHandler.js +1 -11
  235. package/lib/commonjs/web/handlers/ManualGestureHandler.js.map +1 -1
  236. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js +21 -62
  237. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js.map +1 -1
  238. package/lib/commonjs/web/handlers/PanGestureHandler.js +23 -138
  239. package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
  240. package/lib/commonjs/web/handlers/PinchGestureHandler.js +19 -56
  241. package/lib/commonjs/web/handlers/PinchGestureHandler.js.map +1 -1
  242. package/lib/commonjs/web/handlers/RotationGestureHandler.js +16 -54
  243. package/lib/commonjs/web/handlers/RotationGestureHandler.js.map +1 -1
  244. package/lib/commonjs/web/handlers/TapGestureHandler.js +10 -71
  245. package/lib/commonjs/web/handlers/TapGestureHandler.js.map +1 -1
  246. package/lib/commonjs/web/interfaces.js +9 -17
  247. package/lib/commonjs/web/interfaces.js.map +1 -1
  248. package/lib/commonjs/web/tools/CircularBuffer.js +17 -29
  249. package/lib/commonjs/web/tools/CircularBuffer.js.map +1 -1
  250. package/lib/commonjs/web/tools/EventManager.js +7 -41
  251. package/lib/commonjs/web/tools/EventManager.js.map +1 -1
  252. package/lib/commonjs/web/tools/GestureHandlerDelegate.js.map +1 -1
  253. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +51 -118
  254. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  255. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +37 -58
  256. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  257. package/lib/commonjs/web/tools/InteractionManager.js +21 -40
  258. package/lib/commonjs/web/tools/InteractionManager.js.map +1 -1
  259. package/lib/commonjs/web/tools/KeyboardEventManager.js +4 -26
  260. package/lib/commonjs/web/tools/KeyboardEventManager.js.map +1 -1
  261. package/lib/commonjs/web/tools/LeastSquareSolver.js +30 -67
  262. package/lib/commonjs/web/tools/LeastSquareSolver.js.map +1 -1
  263. package/lib/commonjs/web/tools/NodeManager.js +9 -16
  264. package/lib/commonjs/web/tools/NodeManager.js.map +1 -1
  265. package/lib/commonjs/web/tools/PointerEventManager.js +10 -45
  266. package/lib/commonjs/web/tools/PointerEventManager.js.map +1 -1
  267. package/lib/commonjs/web/tools/PointerTracker.js +24 -60
  268. package/lib/commonjs/web/tools/PointerTracker.js.map +1 -1
  269. package/lib/commonjs/web/tools/Vector.js +3 -18
  270. package/lib/commonjs/web/tools/Vector.js.map +1 -1
  271. package/lib/commonjs/web/tools/VelocityTracker.js +10 -32
  272. package/lib/commonjs/web/tools/VelocityTracker.js.map +1 -1
  273. package/lib/commonjs/web/tools/WheelEventManager.js +4 -17
  274. package/lib/commonjs/web/tools/WheelEventManager.js.map +1 -1
  275. package/lib/commonjs/web/utils.js +26 -55
  276. package/lib/commonjs/web/utils.js.map +1 -1
  277. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js +7 -19
  278. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js.map +1 -1
  279. package/lib/commonjs/web_hammer/DraggingGestureHandler.js +3 -13
  280. package/lib/commonjs/web_hammer/DraggingGestureHandler.js.map +1 -1
  281. package/lib/commonjs/web_hammer/Errors.js +0 -3
  282. package/lib/commonjs/web_hammer/Errors.js.map +1 -1
  283. package/lib/commonjs/web_hammer/FlingGestureHandler.js +13 -44
  284. package/lib/commonjs/web_hammer/FlingGestureHandler.js.map +1 -1
  285. package/lib/commonjs/web_hammer/GestureHandler.js +55 -142
  286. package/lib/commonjs/web_hammer/GestureHandler.js.map +1 -1
  287. package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js +2 -11
  288. package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js.map +1 -1
  289. package/lib/commonjs/web_hammer/LongPressGestureHandler.js +5 -19
  290. package/lib/commonjs/web_hammer/LongPressGestureHandler.js.map +1 -1
  291. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js +16 -24
  292. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js.map +1 -1
  293. package/lib/commonjs/web_hammer/NodeManager.js +9 -16
  294. package/lib/commonjs/web_hammer/NodeManager.js.map +1 -1
  295. package/lib/commonjs/web_hammer/PanGestureHandler.js +8 -49
  296. package/lib/commonjs/web_hammer/PanGestureHandler.js.map +1 -1
  297. package/lib/commonjs/web_hammer/PinchGestureHandler.js +2 -11
  298. package/lib/commonjs/web_hammer/PinchGestureHandler.js.map +1 -1
  299. package/lib/commonjs/web_hammer/PressGestureHandler.js +15 -43
  300. package/lib/commonjs/web_hammer/PressGestureHandler.js.map +1 -1
  301. package/lib/commonjs/web_hammer/RotationGestureHandler.js +2 -13
  302. package/lib/commonjs/web_hammer/RotationGestureHandler.js.map +1 -1
  303. package/lib/commonjs/web_hammer/TapGestureHandler.js +33 -52
  304. package/lib/commonjs/web_hammer/TapGestureHandler.js.map +1 -1
  305. package/lib/commonjs/web_hammer/constants.js +13 -26
  306. package/lib/commonjs/web_hammer/constants.js.map +1 -1
  307. package/lib/commonjs/web_hammer/utils.js +4 -14
  308. package/lib/commonjs/web_hammer/utils.js.map +1 -1
  309. package/lib/module/ActionType.js +3 -1
  310. package/lib/module/ActionType.js.map +1 -1
  311. package/lib/module/Directions.js +9 -3
  312. package/lib/module/Directions.js.map +1 -1
  313. package/lib/module/EnableNewWebImplementation.js +2 -5
  314. package/lib/module/EnableNewWebImplementation.js.map +1 -1
  315. package/lib/module/GestureHandlerRootViewContext.js.map +1 -1
  316. package/lib/module/PlatformConstants.js +0 -1
  317. package/lib/module/PlatformConstants.js.map +1 -1
  318. package/lib/module/PlatformConstants.web.js +0 -1
  319. package/lib/module/PlatformConstants.web.js.map +1 -1
  320. package/lib/module/PointerType.js +3 -4
  321. package/lib/module/PointerType.js.map +1 -1
  322. package/lib/module/RNGestureHandlerModule.js +1 -0
  323. package/lib/module/RNGestureHandlerModule.js.map +1 -1
  324. package/lib/module/RNGestureHandlerModule.web.js +12 -22
  325. package/lib/module/RNGestureHandlerModule.web.js.map +1 -1
  326. package/lib/module/RNGestureHandlerModule.windows.js +18 -17
  327. package/lib/module/RNGestureHandlerModule.windows.js.map +1 -1
  328. package/lib/module/RNRenderer.js.map +1 -1
  329. package/lib/module/RNRenderer.web.js.map +1 -1
  330. package/lib/module/State.js +4 -1
  331. package/lib/module/State.js.map +1 -1
  332. package/lib/module/TouchEventType.js +3 -1
  333. package/lib/module/TouchEventType.js.map +1 -1
  334. package/lib/module/components/DrawerLayout.js +87 -99
  335. package/lib/module/components/DrawerLayout.js.map +1 -1
  336. package/lib/module/components/GestureButtons.js +27 -55
  337. package/lib/module/components/GestureButtons.js.map +1 -1
  338. package/lib/module/components/GestureButtonsProps.js.map +1 -1
  339. package/lib/module/components/GestureComponents.js +17 -12
  340. package/lib/module/components/GestureComponents.js.map +1 -1
  341. package/lib/module/components/GestureComponents.web.js +4 -4
  342. package/lib/module/components/GestureComponents.web.js.map +1 -1
  343. package/lib/module/components/GestureHandlerButton.js.map +1 -1
  344. package/lib/module/components/GestureHandlerButton.web.js +1 -2
  345. package/lib/module/components/GestureHandlerButton.web.js.map +1 -1
  346. package/lib/module/components/GestureHandlerRootView.android.js +1 -2
  347. package/lib/module/components/GestureHandlerRootView.android.js.map +1 -1
  348. package/lib/module/components/GestureHandlerRootView.js +1 -2
  349. package/lib/module/components/GestureHandlerRootView.js.map +1 -1
  350. package/lib/module/components/GestureHandlerRootView.web.js +1 -2
  351. package/lib/module/components/GestureHandlerRootView.web.js.map +1 -1
  352. package/lib/module/components/Pressable/Pressable.js +44 -61
  353. package/lib/module/components/Pressable/Pressable.js.map +1 -1
  354. package/lib/module/components/Pressable/PressableProps.js.map +1 -1
  355. package/lib/module/components/Pressable/index.js.map +1 -1
  356. package/lib/module/components/Pressable/utils.js +4 -14
  357. package/lib/module/components/Pressable/utils.js.map +1 -1
  358. package/lib/module/components/ReanimatedDrawerLayout.js +34 -56
  359. package/lib/module/components/ReanimatedDrawerLayout.js.map +1 -1
  360. package/lib/module/components/ReanimatedSwipeable.js +57 -44
  361. package/lib/module/components/ReanimatedSwipeable.js.map +1 -1
  362. package/lib/module/components/Swipeable.js +28 -59
  363. package/lib/module/components/Swipeable.js.map +1 -1
  364. package/lib/module/components/Text.js +14 -13
  365. package/lib/module/components/Text.js.map +1 -1
  366. package/lib/module/components/gestureHandlerRootHOC.js +2 -2
  367. package/lib/module/components/gestureHandlerRootHOC.js.map +1 -1
  368. package/lib/module/components/touchables/GenericTouchable.js +34 -63
  369. package/lib/module/components/touchables/GenericTouchable.js.map +1 -1
  370. package/lib/module/components/touchables/GenericTouchableProps.js.map +1 -1
  371. package/lib/module/components/touchables/TouchableHighlight.js +16 -23
  372. package/lib/module/components/touchables/TouchableHighlight.js.map +1 -1
  373. package/lib/module/components/touchables/TouchableNativeFeedback.android.js +11 -19
  374. package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  375. package/lib/module/components/touchables/TouchableNativeFeedback.js +6 -1
  376. package/lib/module/components/touchables/TouchableNativeFeedback.js.map +1 -1
  377. package/lib/module/components/touchables/TouchableNativeFeedbackProps.js.map +1 -1
  378. package/lib/module/components/touchables/TouchableOpacity.js +13 -14
  379. package/lib/module/components/touchables/TouchableOpacity.js.map +1 -1
  380. package/lib/module/components/touchables/TouchableWithoutFeedback.js +9 -2
  381. package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  382. package/lib/module/components/touchables/index.js.map +1 -1
  383. package/lib/module/findNodeHandle.js.map +1 -1
  384. package/lib/module/findNodeHandle.web.js +9 -8
  385. package/lib/module/findNodeHandle.web.js.map +1 -1
  386. package/lib/module/getReactNativeVersion.js.map +1 -1
  387. package/lib/module/getReactNativeVersion.web.js.map +1 -1
  388. package/lib/module/getShadowNodeFromRef.js +13 -13
  389. package/lib/module/getShadowNodeFromRef.js.map +1 -1
  390. package/lib/module/getShadowNodeFromRef.web.js.map +1 -1
  391. package/lib/module/ghQueueMicrotask.js.map +1 -1
  392. package/lib/module/handlers/FlingGestureHandler.js +13 -0
  393. package/lib/module/handlers/FlingGestureHandler.js.map +1 -1
  394. package/lib/module/handlers/ForceTouchGestureHandler.js +16 -8
  395. package/lib/module/handlers/ForceTouchGestureHandler.js.map +1 -1
  396. package/lib/module/handlers/GestureHandlerEventPayload.js.map +1 -1
  397. package/lib/module/handlers/LongPressGestureHandler.js +13 -0
  398. package/lib/module/handlers/LongPressGestureHandler.js.map +1 -1
  399. package/lib/module/handlers/NativeViewGestureHandler.js +13 -0
  400. package/lib/module/handlers/NativeViewGestureHandler.js.map +1 -1
  401. package/lib/module/handlers/PanGestureHandler.js +15 -19
  402. package/lib/module/handlers/PanGestureHandler.js.map +1 -1
  403. package/lib/module/handlers/PinchGestureHandler.js +13 -0
  404. package/lib/module/handlers/PinchGestureHandler.js.map +1 -1
  405. package/lib/module/handlers/PressabilityDebugView.js.map +1 -1
  406. package/lib/module/handlers/PressabilityDebugView.web.js.map +1 -1
  407. package/lib/module/handlers/RotationGestureHandler.js +13 -0
  408. package/lib/module/handlers/RotationGestureHandler.js.map +1 -1
  409. package/lib/module/handlers/TapGestureHandler.js +13 -0
  410. package/lib/module/handlers/TapGestureHandler.js.map +1 -1
  411. package/lib/module/handlers/createHandler.js +54 -108
  412. package/lib/module/handlers/createHandler.js.map +1 -1
  413. package/lib/module/handlers/createNativeWrapper.js +12 -17
  414. package/lib/module/handlers/createNativeWrapper.js.map +1 -1
  415. package/lib/module/handlers/customDirectEventTypes.js.map +1 -1
  416. package/lib/module/handlers/customDirectEventTypes.web.js.map +1 -1
  417. package/lib/module/handlers/gestureHandlerCommon.js +9 -4
  418. package/lib/module/handlers/gestureHandlerCommon.js.map +1 -1
  419. package/lib/module/handlers/gestureHandlerTypesCompat.js.map +1 -1
  420. package/lib/module/handlers/gestures/GestureDetector/Wrap.js +3 -4
  421. package/lib/module/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
  422. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js +5 -6
  423. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
  424. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js +8 -16
  425. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
  426. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js +0 -1
  427. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
  428. package/lib/module/handlers/gestures/GestureDetector/index.js +9 -15
  429. package/lib/module/handlers/gestures/GestureDetector/index.js.map +1 -1
  430. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js +0 -2
  431. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -1
  432. package/lib/module/handlers/gestures/GestureDetector/types.js.map +1 -1
  433. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js +11 -14
  434. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
  435. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js +12 -39
  436. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
  437. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js +5 -5
  438. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
  439. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js +2 -6
  440. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
  441. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js +7 -9
  442. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
  443. package/lib/module/handlers/gestures/GestureDetector/utils.js +25 -30
  444. package/lib/module/handlers/gestures/GestureDetector/utils.js.map +1 -1
  445. package/lib/module/handlers/gestures/eventReceiver.js +14 -38
  446. package/lib/module/handlers/gestures/eventReceiver.js.map +1 -1
  447. package/lib/module/handlers/gestures/flingGesture.js +5 -9
  448. package/lib/module/handlers/gestures/flingGesture.js.map +1 -1
  449. package/lib/module/handlers/gestures/forceTouchGesture.js +8 -17
  450. package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -1
  451. package/lib/module/handlers/gestures/gesture.js +44 -73
  452. package/lib/module/handlers/gestures/gesture.js.map +1 -1
  453. package/lib/module/handlers/gestures/gestureComposition.js +16 -24
  454. package/lib/module/handlers/gestures/gestureComposition.js.map +1 -1
  455. package/lib/module/handlers/gestures/gestureObjects.js +1 -14
  456. package/lib/module/handlers/gestures/gestureObjects.js.map +1 -1
  457. package/lib/module/handlers/gestures/gestureStateManager.js +3 -4
  458. package/lib/module/handlers/gestures/gestureStateManager.js.map +1 -1
  459. package/lib/module/handlers/gestures/gestureStateManager.web.js +0 -1
  460. package/lib/module/handlers/gestures/gestureStateManager.web.js.map +1 -1
  461. package/lib/module/handlers/gestures/hoverGesture.js +9 -18
  462. package/lib/module/handlers/gestures/hoverGesture.js.map +1 -1
  463. package/lib/module/handlers/gestures/longPressGesture.js +6 -11
  464. package/lib/module/handlers/gestures/longPressGesture.js.map +1 -1
  465. package/lib/module/handlers/gestures/manualGesture.js +0 -4
  466. package/lib/module/handlers/gestures/manualGesture.js.map +1 -1
  467. package/lib/module/handlers/gestures/nativeGesture.js +5 -9
  468. package/lib/module/handlers/gestures/nativeGesture.js.map +1 -1
  469. package/lib/module/handlers/gestures/panGesture.js +18 -41
  470. package/lib/module/handlers/gestures/panGesture.js.map +1 -1
  471. package/lib/module/handlers/gestures/pinchGesture.js +2 -7
  472. package/lib/module/handlers/gestures/pinchGesture.js.map +1 -1
  473. package/lib/module/handlers/gestures/reanimatedWrapper.js +0 -5
  474. package/lib/module/handlers/gestures/reanimatedWrapper.js.map +1 -1
  475. package/lib/module/handlers/gestures/rotationGesture.js +2 -7
  476. package/lib/module/handlers/gestures/rotationGesture.js.map +1 -1
  477. package/lib/module/handlers/gestures/tapGesture.js +10 -19
  478. package/lib/module/handlers/gestures/tapGesture.js.map +1 -1
  479. package/lib/module/handlers/getNextHandlerTag.js.map +1 -1
  480. package/lib/module/handlers/handlersRegistry.js +6 -8
  481. package/lib/module/handlers/handlersRegistry.js.map +1 -1
  482. package/lib/module/handlers/utils.js +4 -13
  483. package/lib/module/handlers/utils.js.map +1 -1
  484. package/lib/module/index.js.map +1 -1
  485. package/lib/module/init.js +3 -2
  486. package/lib/module/init.js.map +1 -1
  487. package/lib/module/jestUtils/index.js.map +1 -1
  488. package/lib/module/jestUtils/jestUtils.js +20 -66
  489. package/lib/module/jestUtils/jestUtils.js.map +1 -1
  490. package/lib/module/mocks.js +3 -7
  491. package/lib/module/mocks.js.map +1 -1
  492. package/lib/module/mountRegistry.js +3 -10
  493. package/lib/module/mountRegistry.js.map +1 -1
  494. package/lib/module/specs/NativeRNGestureHandlerModule.js.map +1 -1
  495. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
  496. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
  497. package/lib/module/typeUtils.js.map +1 -1
  498. package/lib/module/utils.js +8 -13
  499. package/lib/module/utils.js.map +1 -1
  500. package/lib/module/web/Gestures.js +2 -1
  501. package/lib/module/web/Gestures.js.map +1 -1
  502. package/lib/module/web/constants.js.map +1 -1
  503. package/lib/module/web/detectors/RotationGestureDetector.js +26 -59
  504. package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -1
  505. package/lib/module/web/detectors/ScaleGestureDetector.js +36 -61
  506. package/lib/module/web/detectors/ScaleGestureDetector.js.map +1 -1
  507. package/lib/module/web/handlers/FlingGestureHandler.js +11 -45
  508. package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
  509. package/lib/module/web/handlers/GestureHandler.js +159 -259
  510. package/lib/module/web/handlers/GestureHandler.js.map +1 -1
  511. package/lib/module/web/handlers/HoverGestureHandler.js +7 -13
  512. package/lib/module/web/handlers/HoverGestureHandler.js.map +1 -1
  513. package/lib/module/web/handlers/IGestureHandler.js.map +1 -1
  514. package/lib/module/web/handlers/LongPressGestureHandler.js +11 -46
  515. package/lib/module/web/handlers/LongPressGestureHandler.js.map +1 -1
  516. package/lib/module/web/handlers/ManualGestureHandler.js +0 -6
  517. package/lib/module/web/handlers/ManualGestureHandler.js.map +1 -1
  518. package/lib/module/web/handlers/NativeViewGestureHandler.js +20 -54
  519. package/lib/module/web/handlers/NativeViewGestureHandler.js.map +1 -1
  520. package/lib/module/web/handlers/PanGestureHandler.js +22 -129
  521. package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
  522. package/lib/module/web/handlers/PinchGestureHandler.js +18 -48
  523. package/lib/module/web/handlers/PinchGestureHandler.js.map +1 -1
  524. package/lib/module/web/handlers/RotationGestureHandler.js +15 -46
  525. package/lib/module/web/handlers/RotationGestureHandler.js.map +1 -1
  526. package/lib/module/web/handlers/TapGestureHandler.js +9 -63
  527. package/lib/module/web/handlers/TapGestureHandler.js.map +1 -1
  528. package/lib/module/web/interfaces.js +9 -14
  529. package/lib/module/web/interfaces.js.map +1 -1
  530. package/lib/module/web/tools/CircularBuffer.js +17 -27
  531. package/lib/module/web/tools/CircularBuffer.js.map +1 -1
  532. package/lib/module/web/tools/EventManager.js +7 -39
  533. package/lib/module/web/tools/EventManager.js.map +1 -1
  534. package/lib/module/web/tools/GestureHandlerDelegate.js.map +1 -1
  535. package/lib/module/web/tools/GestureHandlerOrchestrator.js +50 -111
  536. package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  537. package/lib/module/web/tools/GestureHandlerWebDelegate.js +36 -47
  538. package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  539. package/lib/module/web/tools/InteractionManager.js +21 -35
  540. package/lib/module/web/tools/InteractionManager.js.map +1 -1
  541. package/lib/module/web/tools/KeyboardEventManager.js +3 -19
  542. package/lib/module/web/tools/KeyboardEventManager.js.map +1 -1
  543. package/lib/module/web/tools/LeastSquareSolver.js +30 -65
  544. package/lib/module/web/tools/LeastSquareSolver.js.map +1 -1
  545. package/lib/module/web/tools/NodeManager.js +9 -14
  546. package/lib/module/web/tools/NodeManager.js.map +1 -1
  547. package/lib/module/web/tools/PointerEventManager.js +9 -35
  548. package/lib/module/web/tools/PointerEventManager.js.map +1 -1
  549. package/lib/module/web/tools/PointerTracker.js +23 -54
  550. package/lib/module/web/tools/PointerTracker.js.map +1 -1
  551. package/lib/module/web/tools/Vector.js +3 -14
  552. package/lib/module/web/tools/Vector.js.map +1 -1
  553. package/lib/module/web/tools/VelocityTracker.js +9 -26
  554. package/lib/module/web/tools/VelocityTracker.js.map +1 -1
  555. package/lib/module/web/tools/WheelEventManager.js +3 -10
  556. package/lib/module/web/tools/WheelEventManager.js.map +1 -1
  557. package/lib/module/web/utils.js +21 -40
  558. package/lib/module/web/utils.js.map +1 -1
  559. package/lib/module/web_hammer/DiscreteGestureHandler.js +4 -13
  560. package/lib/module/web_hammer/DiscreteGestureHandler.js.map +1 -1
  561. package/lib/module/web_hammer/DraggingGestureHandler.js +0 -5
  562. package/lib/module/web_hammer/DraggingGestureHandler.js.map +1 -1
  563. package/lib/module/web_hammer/Errors.js +0 -1
  564. package/lib/module/web_hammer/Errors.js.map +1 -1
  565. package/lib/module/web_hammer/FlingGestureHandler.js +10 -35
  566. package/lib/module/web_hammer/FlingGestureHandler.js.map +1 -1
  567. package/lib/module/web_hammer/GestureHandler.js +53 -130
  568. package/lib/module/web_hammer/GestureHandler.js.map +1 -1
  569. package/lib/module/web_hammer/IndiscreteGestureHandler.js +1 -6
  570. package/lib/module/web_hammer/IndiscreteGestureHandler.js.map +1 -1
  571. package/lib/module/web_hammer/LongPressGestureHandler.js +2 -11
  572. package/lib/module/web_hammer/LongPressGestureHandler.js.map +1 -1
  573. package/lib/module/web_hammer/NativeViewGestureHandler.js +12 -12
  574. package/lib/module/web_hammer/NativeViewGestureHandler.js.map +1 -1
  575. package/lib/module/web_hammer/NodeManager.js +6 -8
  576. package/lib/module/web_hammer/NodeManager.js.map +1 -1
  577. package/lib/module/web_hammer/PanGestureHandler.js +6 -40
  578. package/lib/module/web_hammer/PanGestureHandler.js.map +1 -1
  579. package/lib/module/web_hammer/PinchGestureHandler.js +0 -5
  580. package/lib/module/web_hammer/PinchGestureHandler.js.map +1 -1
  581. package/lib/module/web_hammer/PressGestureHandler.js +13 -34
  582. package/lib/module/web_hammer/PressGestureHandler.js.map +1 -1
  583. package/lib/module/web_hammer/RotationGestureHandler.js +0 -6
  584. package/lib/module/web_hammer/RotationGestureHandler.js.map +1 -1
  585. package/lib/module/web_hammer/TapGestureHandler.js +31 -45
  586. package/lib/module/web_hammer/TapGestureHandler.js.map +1 -1
  587. package/lib/module/web_hammer/constants.js +2 -1
  588. package/lib/module/web_hammer/constants.js.map +1 -1
  589. package/lib/module/web_hammer/utils.js +2 -2
  590. package/lib/module/web_hammer/utils.js.map +1 -1
  591. package/lib/typescript/components/DrawerLayout.d.ts +27 -0
  592. package/lib/typescript/components/GestureButtonsProps.d.ts +18 -2
  593. package/lib/typescript/components/Pressable/PressableProps.d.ts +3 -10
  594. package/lib/typescript/components/Pressable/index.d.ts +1 -1
  595. package/lib/typescript/components/ReanimatedSwipeable.d.ts +6 -0
  596. package/lib/typescript/components/touchables/TouchableHighlight.d.ts +5 -0
  597. package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +2 -0
  598. package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +5 -1
  599. package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +3 -0
  600. package/lib/typescript/components/touchables/TouchableOpacity.d.ts +5 -0
  601. package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +6 -0
  602. package/lib/typescript/handlers/FlingGestureHandler.d.ts +9 -0
  603. package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +9 -0
  604. package/lib/typescript/handlers/LongPressGestureHandler.d.ts +9 -0
  605. package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +9 -0
  606. package/lib/typescript/handlers/PanGestureHandler.d.ts +9 -0
  607. package/lib/typescript/handlers/PinchGestureHandler.d.ts +9 -0
  608. package/lib/typescript/handlers/RotationGestureHandler.d.ts +9 -0
  609. package/lib/typescript/handlers/TapGestureHandler.d.ts +9 -0
  610. package/lib/typescript/handlers/handlersRegistry.d.ts +1 -0
  611. package/lib/typescript/index.d.ts +1 -1
  612. package/lib/typescript/utils.d.ts +1 -1
  613. package/lib/typescript/web/detectors/RotationGestureDetector.d.ts +7 -7
  614. package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts +8 -8
  615. package/lib/typescript/web/handlers/GestureHandler.d.ts +33 -28
  616. package/lib/typescript/web/handlers/IGestureHandler.d.ts +12 -13
  617. package/lib/typescript/web/tools/CircularBuffer.d.ts +3 -3
  618. package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +1 -1
  619. package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts +2 -2
  620. package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +3 -2
  621. package/lib/typescript/web/tools/InteractionManager.d.ts +2 -2
  622. package/lib/typescript/web/tools/NodeManager.d.ts +1 -1
  623. package/lib/typescript/web/tools/PointerTracker.d.ts +4 -4
  624. package/lib/typescript/web/tools/VelocityTracker.d.ts +1 -1
  625. package/package.json +2 -2
  626. package/src/RNGestureHandlerModule.web.ts +2 -2
  627. package/src/components/DrawerLayout.tsx +29 -0
  628. package/src/components/GestureButtons.tsx +13 -2
  629. package/src/components/GestureButtonsProps.ts +31 -2
  630. package/src/components/Pressable/Pressable.tsx +22 -5
  631. package/src/components/Pressable/PressableProps.tsx +4 -11
  632. package/src/components/Pressable/index.ts +4 -1
  633. package/src/components/ReanimatedSwipeable.tsx +97 -66
  634. package/src/components/Text.tsx +13 -4
  635. package/src/components/touchables/TouchableHighlight.tsx +5 -0
  636. package/src/components/touchables/TouchableNativeFeedback.android.tsx +2 -0
  637. package/src/components/touchables/TouchableNativeFeedback.tsx +6 -1
  638. package/src/components/touchables/TouchableNativeFeedbackProps.tsx +3 -0
  639. package/src/components/touchables/TouchableOpacity.tsx +5 -0
  640. package/src/components/touchables/TouchableWithoutFeedback.tsx +6 -0
  641. package/src/findNodeHandle.web.ts +6 -0
  642. package/src/handlers/FlingGestureHandler.ts +10 -0
  643. package/src/handlers/ForceTouchGestureHandler.ts +9 -0
  644. package/src/handlers/LongPressGestureHandler.ts +10 -0
  645. package/src/handlers/NativeViewGestureHandler.ts +10 -0
  646. package/src/handlers/PanGestureHandler.ts +10 -0
  647. package/src/handlers/PinchGestureHandler.ts +10 -0
  648. package/src/handlers/RotationGestureHandler.ts +10 -0
  649. package/src/handlers/TapGestureHandler.ts +10 -0
  650. package/src/handlers/createHandler.tsx +11 -4
  651. package/src/handlers/gestures/GestureDetector/index.tsx +2 -2
  652. package/src/handlers/gestures/GestureDetector/useViewRefHandler.ts +3 -3
  653. package/src/handlers/gestures/GestureDetector/utils.ts +2 -2
  654. package/src/handlers/handlersRegistry.ts +7 -3
  655. package/src/index.ts +4 -1
  656. package/src/utils.ts +2 -2
  657. package/src/web/detectors/RotationGestureDetector.ts +22 -22
  658. package/src/web/detectors/ScaleGestureDetector.ts +24 -24
  659. package/src/web/handlers/FlingGestureHandler.ts +6 -7
  660. package/src/web/handlers/GestureHandler.ts +115 -105
  661. package/src/web/handlers/HoverGestureHandler.ts +2 -2
  662. package/src/web/handlers/IGestureHandler.ts +12 -13
  663. package/src/web/handlers/LongPressGestureHandler.ts +7 -7
  664. package/src/web/handlers/NativeViewGestureHandler.ts +14 -19
  665. package/src/web/handlers/PanGestureHandler.ts +17 -17
  666. package/src/web/handlers/PinchGestureHandler.ts +17 -21
  667. package/src/web/handlers/RotationGestureHandler.ts +12 -12
  668. package/src/web/handlers/TapGestureHandler.ts +4 -6
  669. package/src/web/tools/CircularBuffer.ts +15 -15
  670. package/src/web/tools/GestureHandlerDelegate.ts +1 -1
  671. package/src/web/tools/GestureHandlerOrchestrator.ts +42 -42
  672. package/src/web/tools/GestureHandlerWebDelegate.ts +32 -13
  673. package/src/web/tools/InteractionManager.ts +16 -16
  674. package/src/web/tools/NodeManager.ts +2 -2
  675. package/src/web/tools/PointerTracker.ts +20 -20
  676. package/src/web/tools/Vector.ts +1 -1
  677. package/src/web/tools/VelocityTracker.ts +1 -1
@@ -1,10 +1,11 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
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
-
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
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
  // Similarily to the DrawerLayout component this deserves to be put in a
6
6
  // separate repo. Although, keeping it here for the time being will allow us to
7
7
  // move faster and fix possible issues quicker
8
+
8
9
  import * as React from 'react';
9
10
  import { Component } from 'react';
10
11
  import { Animated, StyleSheet, View, I18nManager } from 'react-native';
@@ -13,27 +14,25 @@ import { TapGestureHandler } from '../handlers/TapGestureHandler';
13
14
  import { State } from '../State';
14
15
  const DRAG_TOSS = 0.05;
15
16
 
17
+ // Animated.AnimatedInterpolation has been converted to a generic type
18
+ // in @types/react-native 0.70. This way we can maintain compatibility
19
+ // with all versions of @types/react-native
20
+
16
21
  /**
17
22
  * @deprecated use Reanimated version of Swipeable instead
18
23
  *
19
24
  * This component allows for implementing swipeable rows or similar interaction.
20
25
  */
26
+
21
27
  export default class Swipeable extends Component {
22
28
  constructor(_props) {
23
29
  super(_props);
24
-
25
30
  _defineProperty(this, "onGestureEvent", void 0);
26
-
27
31
  _defineProperty(this, "transX", void 0);
28
-
29
32
  _defineProperty(this, "showLeftAction", void 0);
30
-
31
33
  _defineProperty(this, "leftActionTranslate", void 0);
32
-
33
34
  _defineProperty(this, "showRightAction", void 0);
34
-
35
35
  _defineProperty(this, "rightActionTranslate", void 0);
36
-
37
36
  _defineProperty(this, "updateAnimatedEvent", (props, state) => {
38
37
  const {
39
38
  friction,
@@ -80,7 +79,6 @@ export default class Swipeable extends Component {
80
79
  extrapolate: 'clamp'
81
80
  });
82
81
  });
83
-
84
82
  _defineProperty(this, "onTapHandlerStateChange", ({
85
83
  nativeEvent
86
84
  }) => {
@@ -88,12 +86,10 @@ export default class Swipeable extends Component {
88
86
  this.close();
89
87
  }
90
88
  });
91
-
92
89
  _defineProperty(this, "onHandlerStateChange", ev => {
93
90
  if (ev.nativeEvent.oldState === State.ACTIVE) {
94
91
  this.handleRelease(ev);
95
92
  }
96
-
97
93
  if (ev.nativeEvent.state === State.ACTIVE) {
98
94
  const {
99
95
  velocityX,
@@ -107,19 +103,15 @@ export default class Swipeable extends Component {
107
103
  } = this.props;
108
104
  const translationX = (dragX + DRAG_TOSS * velocityX) / friction;
109
105
  const direction = rowState === -1 ? 'right' : rowState === 1 ? 'left' : translationX > 0 ? 'left' : 'right';
110
-
111
106
  if (rowState === 0) {
112
107
  var _this$props$onSwipeab, _this$props;
113
-
114
- (_this$props$onSwipeab = (_this$props = this.props).onSwipeableOpenStartDrag) === null || _this$props$onSwipeab === void 0 ? void 0 : _this$props$onSwipeab.call(_this$props, direction);
108
+ (_this$props$onSwipeab = (_this$props = this.props).onSwipeableOpenStartDrag) === null || _this$props$onSwipeab === void 0 || _this$props$onSwipeab.call(_this$props, direction);
115
109
  } else {
116
110
  var _this$props$onSwipeab2, _this$props2;
117
-
118
- (_this$props$onSwipeab2 = (_this$props2 = this.props).onSwipeableCloseStartDrag) === null || _this$props$onSwipeab2 === void 0 ? void 0 : _this$props$onSwipeab2.call(_this$props2, direction);
111
+ (_this$props$onSwipeab2 = (_this$props2 = this.props).onSwipeableCloseStartDrag) === null || _this$props$onSwipeab2 === void 0 || _this$props$onSwipeab2.call(_this$props2, direction);
119
112
  }
120
113
  }
121
114
  });
122
-
123
115
  _defineProperty(this, "handleRelease", ev => {
124
116
  const {
125
117
  velocityX,
@@ -142,7 +134,6 @@ export default class Swipeable extends Component {
142
134
  const startOffsetX = this.currentOffset() + dragX / friction;
143
135
  const translationX = (dragX + DRAG_TOSS * velocityX) / friction;
144
136
  let toValue = 0;
145
-
146
137
  if (rowState === 0) {
147
138
  if (translationX > leftThreshold) {
148
139
  toValue = leftWidth;
@@ -160,10 +151,8 @@ export default class Swipeable extends Component {
160
151
  toValue = -rightWidth;
161
152
  }
162
153
  }
163
-
164
154
  this.animateRow(startOffsetX, toValue, velocityX / friction);
165
155
  });
166
-
167
156
  _defineProperty(this, "animateRow", (fromValue, toValue, velocityX) => {
168
157
  const {
169
158
  dragX,
@@ -188,41 +177,33 @@ export default class Swipeable extends Component {
188
177
  if (finished) {
189
178
  if (toValue > 0) {
190
179
  var _this$props$onSwipeab3, _this$props3, _this$props$onSwipeab4, _this$props4;
191
-
192
- (_this$props$onSwipeab3 = (_this$props3 = this.props).onSwipeableLeftOpen) === null || _this$props$onSwipeab3 === void 0 ? void 0 : _this$props$onSwipeab3.call(_this$props3);
193
- (_this$props$onSwipeab4 = (_this$props4 = this.props).onSwipeableOpen) === null || _this$props$onSwipeab4 === void 0 ? void 0 : _this$props$onSwipeab4.call(_this$props4, 'left', this);
180
+ (_this$props$onSwipeab3 = (_this$props3 = this.props).onSwipeableLeftOpen) === null || _this$props$onSwipeab3 === void 0 || _this$props$onSwipeab3.call(_this$props3);
181
+ (_this$props$onSwipeab4 = (_this$props4 = this.props).onSwipeableOpen) === null || _this$props$onSwipeab4 === void 0 || _this$props$onSwipeab4.call(_this$props4, 'left', this);
194
182
  } else if (toValue < 0) {
195
183
  var _this$props$onSwipeab5, _this$props5, _this$props$onSwipeab6, _this$props6;
196
-
197
- (_this$props$onSwipeab5 = (_this$props5 = this.props).onSwipeableRightOpen) === null || _this$props$onSwipeab5 === void 0 ? void 0 : _this$props$onSwipeab5.call(_this$props5);
198
- (_this$props$onSwipeab6 = (_this$props6 = this.props).onSwipeableOpen) === null || _this$props$onSwipeab6 === void 0 ? void 0 : _this$props$onSwipeab6.call(_this$props6, 'right', this);
184
+ (_this$props$onSwipeab5 = (_this$props5 = this.props).onSwipeableRightOpen) === null || _this$props$onSwipeab5 === void 0 || _this$props$onSwipeab5.call(_this$props5);
185
+ (_this$props$onSwipeab6 = (_this$props6 = this.props).onSwipeableOpen) === null || _this$props$onSwipeab6 === void 0 || _this$props$onSwipeab6.call(_this$props6, 'right', this);
199
186
  } else {
200
187
  var _this$props$onSwipeab7, _this$props7;
201
-
202
188
  const closingDirection = fromValue > 0 ? 'left' : 'right';
203
- (_this$props$onSwipeab7 = (_this$props7 = this.props).onSwipeableClose) === null || _this$props$onSwipeab7 === void 0 ? void 0 : _this$props$onSwipeab7.call(_this$props7, closingDirection, this);
189
+ (_this$props$onSwipeab7 = (_this$props7 = this.props).onSwipeableClose) === null || _this$props$onSwipeab7 === void 0 || _this$props$onSwipeab7.call(_this$props7, closingDirection, this);
204
190
  }
205
191
  }
206
192
  });
207
-
208
193
  if (toValue > 0) {
209
194
  var _this$props$onSwipeab8, _this$props8, _this$props$onSwipeab9, _this$props9;
210
-
211
- (_this$props$onSwipeab8 = (_this$props8 = this.props).onSwipeableLeftWillOpen) === null || _this$props$onSwipeab8 === void 0 ? void 0 : _this$props$onSwipeab8.call(_this$props8);
212
- (_this$props$onSwipeab9 = (_this$props9 = this.props).onSwipeableWillOpen) === null || _this$props$onSwipeab9 === void 0 ? void 0 : _this$props$onSwipeab9.call(_this$props9, 'left');
195
+ (_this$props$onSwipeab8 = (_this$props8 = this.props).onSwipeableLeftWillOpen) === null || _this$props$onSwipeab8 === void 0 || _this$props$onSwipeab8.call(_this$props8);
196
+ (_this$props$onSwipeab9 = (_this$props9 = this.props).onSwipeableWillOpen) === null || _this$props$onSwipeab9 === void 0 || _this$props$onSwipeab9.call(_this$props9, 'left');
213
197
  } else if (toValue < 0) {
214
198
  var _this$props$onSwipeab10, _this$props10, _this$props$onSwipeab11, _this$props11;
215
-
216
- (_this$props$onSwipeab10 = (_this$props10 = this.props).onSwipeableRightWillOpen) === null || _this$props$onSwipeab10 === void 0 ? void 0 : _this$props$onSwipeab10.call(_this$props10);
217
- (_this$props$onSwipeab11 = (_this$props11 = this.props).onSwipeableWillOpen) === null || _this$props$onSwipeab11 === void 0 ? void 0 : _this$props$onSwipeab11.call(_this$props11, 'right');
199
+ (_this$props$onSwipeab10 = (_this$props10 = this.props).onSwipeableRightWillOpen) === null || _this$props$onSwipeab10 === void 0 || _this$props$onSwipeab10.call(_this$props10);
200
+ (_this$props$onSwipeab11 = (_this$props11 = this.props).onSwipeableWillOpen) === null || _this$props$onSwipeab11 === void 0 || _this$props$onSwipeab11.call(_this$props11, 'right');
218
201
  } else {
219
202
  var _this$props$onSwipeab12, _this$props12;
220
-
221
203
  const closingDirection = fromValue > 0 ? 'left' : 'right';
222
- (_this$props$onSwipeab12 = (_this$props12 = this.props).onSwipeableWillClose) === null || _this$props$onSwipeab12 === void 0 ? void 0 : _this$props$onSwipeab12.call(_this$props12, closingDirection);
204
+ (_this$props$onSwipeab12 = (_this$props12 = this.props).onSwipeableWillClose) === null || _this$props$onSwipeab12 === void 0 || _this$props$onSwipeab12.call(_this$props12, closingDirection);
223
205
  }
224
206
  });
225
-
226
207
  _defineProperty(this, "onRowLayout", ({
227
208
  nativeEvent
228
209
  }) => {
@@ -230,7 +211,6 @@ export default class Swipeable extends Component {
230
211
  rowWidth: nativeEvent.layout.width
231
212
  });
232
213
  });
233
-
234
214
  _defineProperty(this, "currentOffset", () => {
235
215
  const {
236
216
  leftWidth = 0,
@@ -241,27 +221,22 @@ export default class Swipeable extends Component {
241
221
  rightOffset = rowWidth
242
222
  } = this.state;
243
223
  const rightWidth = rowWidth - rightOffset;
244
-
245
224
  if (rowState === 1) {
246
225
  return leftWidth;
247
226
  } else if (rowState === -1) {
248
227
  return -rightWidth;
249
228
  }
250
-
251
229
  return 0;
252
230
  });
253
-
254
231
  _defineProperty(this, "close", () => {
255
232
  this.animateRow(this.currentOffset(), 0);
256
233
  });
257
-
258
234
  _defineProperty(this, "openLeft", () => {
259
235
  const {
260
236
  leftWidth = 0
261
237
  } = this.state;
262
238
  this.animateRow(this.currentOffset(), leftWidth);
263
239
  });
264
-
265
240
  _defineProperty(this, "openRight", () => {
266
241
  const {
267
242
  rowWidth = 0
@@ -272,7 +247,6 @@ export default class Swipeable extends Component {
272
247
  const rightWidth = rowWidth - rightOffset;
273
248
  this.animateRow(this.currentOffset(), -rightWidth);
274
249
  });
275
-
276
250
  _defineProperty(this, "reset", () => {
277
251
  const {
278
252
  dragX,
@@ -284,9 +258,7 @@ export default class Swipeable extends Component {
284
258
  rowState: 0
285
259
  });
286
260
  });
287
-
288
261
  const _dragX = new Animated.Value(0);
289
-
290
262
  this.state = {
291
263
  dragX: _dragX,
292
264
  rowTranslation: new Animated.Value(0),
@@ -304,15 +276,12 @@ export default class Swipeable extends Component {
304
276
  useNativeDriver: _props.useNativeAnimations
305
277
  });
306
278
  }
307
-
308
279
  shouldComponentUpdate(props, state) {
309
280
  if (this.props.friction !== props.friction || this.props.overshootLeft !== props.overshootLeft || this.props.overshootRight !== props.overshootRight || this.props.overshootFriction !== props.overshootFriction || this.state.leftWidth !== state.leftWidth || this.state.rightOffset !== state.rightOffset || this.state.rowWidth !== state.rowWidth) {
310
281
  this.updateAnimatedEvent(props, state);
311
282
  }
312
-
313
283
  return true;
314
284
  }
315
-
316
285
  render() {
317
286
  const {
318
287
  rowState
@@ -325,7 +294,8 @@ export default class Swipeable extends Component {
325
294
  dragOffsetFromRightEdge = 10
326
295
  } = this.props;
327
296
  const left = renderLeftActions && /*#__PURE__*/React.createElement(Animated.View, {
328
- style: [styles.leftActions, // All those and below parameters can have ! since they are all
297
+ style: [styles.leftActions,
298
+ // All those and below parameters can have ! since they are all
329
299
  // asigned in constructor in `updateAnimatedEvent` but TS cannot spot
330
300
  // it for some reason
331
301
  {
@@ -375,23 +345,22 @@ export default class Swipeable extends Component {
375
345
  }, this.props.childrenContainerStyle]
376
346
  }, children))));
377
347
  }
378
-
379
348
  }
380
-
381
349
  _defineProperty(Swipeable, "defaultProps", {
382
350
  friction: 1,
383
351
  overshootFriction: 1,
384
352
  useNativeAnimations: true
385
353
  });
386
-
387
354
  const styles = StyleSheet.create({
388
355
  container: {
389
356
  overflow: 'hidden'
390
357
  },
391
- leftActions: { ...StyleSheet.absoluteFillObject,
358
+ leftActions: {
359
+ ...StyleSheet.absoluteFillObject,
392
360
  flexDirection: I18nManager.isRTL ? 'row-reverse' : 'row'
393
361
  },
394
- rightActions: { ...StyleSheet.absoluteFillObject,
362
+ rightActions: {
363
+ ...StyleSheet.absoluteFillObject,
395
364
  flexDirection: I18nManager.isRTL ? 'row' : 'row-reverse'
396
365
  }
397
366
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["Swipeable.tsx"],"names":["React","Component","Animated","StyleSheet","View","I18nManager","PanGestureHandler","TapGestureHandler","State","DRAG_TOSS","Swipeable","constructor","props","state","friction","overshootFriction","dragX","rowTranslation","leftWidth","rowWidth","rightOffset","rightWidth","Math","max","overshootLeft","overshootRight","transX","add","interpolate","inputRange","outputRange","showLeftAction","Value","leftActionTranslate","Number","MIN_VALUE","extrapolate","showRightAction","rightActionTranslate","nativeEvent","oldState","ACTIVE","close","ev","handleRelease","velocityX","translationX","rowState","direction","onSwipeableOpenStartDrag","onSwipeableCloseStartDrag","leftThreshold","rightThreshold","startOffsetX","currentOffset","toValue","animateRow","fromValue","setValue","setState","sign","spring","restSpeedThreshold","restDisplacementThreshold","velocity","bounciness","useNativeDriver","useNativeAnimations","animationOptions","start","finished","onSwipeableLeftOpen","onSwipeableOpen","onSwipeableRightOpen","closingDirection","onSwipeableClose","onSwipeableLeftWillOpen","onSwipeableWillOpen","onSwipeableRightWillOpen","onSwipeableWillClose","layout","width","undefined","updateAnimatedEvent","onGestureEvent","event","shouldComponentUpdate","render","children","renderLeftActions","renderRightActions","dragOffsetFromLeftEdge","dragOffsetFromRightEdge","left","styles","leftActions","transform","translateX","x","right","rightActions","onHandlerStateChange","onRowLayout","container","containerStyle","onTapHandlerStateChange","childrenContainerStyle","create","overflow","absoluteFillObject","flexDirection","isRTL"],"mappings":";;;;AAAA;AACA;AACA;AAEA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,SAAT,QAA0B,OAA1B;AACA,SACEC,QADF,EAEEC,UAFF,EAGEC,IAHF,EAIEC,WAJF,QAQO,cARP;AAcA,SACEC,iBADF,QAGO,+BAHP;AAQA,SAASC,iBAAT,QAAkC,+BAAlC;AACA,SAASC,KAAT,QAAsB,UAAtB;AAEA,MAAMC,SAAS,GAAG,IAAlB;;AAiMA;AACA;AACA;AACA;AACA;AAEA,eAAe,MAAMC,SAAN,SAAwBT,SAAxB,CAGb;AAOAU,EAAAA,WAAW,CAACC,MAAD,EAAwB;AACjC,UAAMA,MAAN;;AADiC;;AAAA;;AAAA;;AAAA;;AAAA;;AAAA;;AAAA,iDA4CL,CAC5BA,KAD4B,EAE5BC,KAF4B,KAGzB;AACH,YAAM;AAAEC,QAAAA,QAAF;AAAYC,QAAAA;AAAZ,UAAkCH,KAAxC;AACA,YAAM;AAAEI,QAAAA,KAAF;AAASC,QAAAA,cAAT;AAAyBC,QAAAA,SAAS,GAAG,CAArC;AAAwCC,QAAAA,QAAQ,GAAG;AAAnD,UAAyDN,KAA/D;AACA,YAAM;AAAEO,QAAAA,WAAW,GAAGD;AAAhB,UAA6BN,KAAnC;AACA,YAAMQ,UAAU,GAAGC,IAAI,CAACC,GAAL,CAAS,CAAT,EAAYJ,QAAQ,GAAGC,WAAvB,CAAnB;AAEA,YAAM;AAAEI,QAAAA,aAA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,KAApB,GAA4B;AAF/B;AARiB,CAAlB,CAAf","sourcesContent":["// Similarily to the DrawerLayout component this deserves to be put in a\n// separate repo. Although, keeping it here for the time being will allow us to\n// move faster and fix possible issues quicker\n\nimport * as React from 'react';\nimport { Component } from 'react';\nimport {\n Animated,\n StyleSheet,\n View,\n I18nManager,\n LayoutChangeEvent,\n StyleProp,\n ViewStyle,\n} from 'react-native';\n\nimport {\n GestureEvent,\n HandlerStateChangeEvent,\n} from '../handlers/gestureHandlerCommon';\nimport {\n PanGestureHandler,\n PanGestureHandlerProps,\n} from '../handlers/PanGestureHandler';\nimport {\n PanGestureHandlerEventPayload,\n TapGestureHandlerEventPayload,\n} from '../handlers/GestureHandlerEventPayload';\nimport { TapGestureHandler } from '../handlers/TapGestureHandler';\nimport { State } from '../State';\n\nconst DRAG_TOSS = 0.05;\n\ntype SwipeableExcludes = Exclude<\n keyof PanGestureHandlerProps,\n 'onGestureEvent' | 'onHandlerStateChange'\n>;\n\n// Animated.AnimatedInterpolation has been converted to a generic type\n// in @types/react-native 0.70. This way we can maintain compatibility\n// with all versions of @types/react-native\ntype AnimatedInterpolation = ReturnType<Animated.Value['interpolate']>;\n\nexport interface SwipeableProps\n extends Pick<PanGestureHandlerProps, SwipeableExcludes> {\n /**\n * Enables two-finger gestures on supported devices, for example iPads with\n * trackpads. If not enabled the gesture will require click + drag, with\n * `enableTrackpadTwoFingerGesture` swiping with two fingers will also trigger\n * the gesture.\n */\n enableTrackpadTwoFingerGesture?: boolean;\n\n /**\n * Specifies how much the visual interaction will be delayed compared to the\n * gesture distance. e.g. value of 1 will indicate that the swipeable panel\n * should exactly follow the gesture, 2 means it is going to be two times\n * \"slower\".\n */\n friction?: number;\n\n /**\n * Distance from the left edge at which released panel will animate to the\n * open state (or the open panel will animate into the closed state). By\n * default it's a half of the panel's width.\n */\n leftThreshold?: number;\n\n /**\n * Distance from the right edge at which released panel will animate to the\n * open state (or the open panel will animate into the closed state). By\n * default it's a half of the panel's width.\n */\n rightThreshold?: number;\n\n /**\n * Distance that the panel must be dragged from the left edge to be considered\n * a swipe. The default value is 10.\n */\n dragOffsetFromLeftEdge?: number;\n\n /**\n * Distance that the panel must be dragged from the right edge to be considered\n * a swipe. The default value is 10.\n */\n dragOffsetFromRightEdge?: number;\n\n /**\n * Value indicating if the swipeable panel can be pulled further than the left\n * actions panel's width. It is set to true by default as long as the left\n * panel render method is present.\n */\n overshootLeft?: boolean;\n\n /**\n * Value indicating if the swipeable panel can be pulled further than the\n * right actions panel's width. It is set to true by default as long as the\n * right panel render method is present.\n */\n overshootRight?: boolean;\n\n /**\n * Specifies how much the visual interaction will be delayed compared to the\n * gesture distance at overshoot. Default value is 1, it mean no friction, for\n * a native feel, try 8 or above.\n */\n overshootFriction?: number;\n\n /**\n * @deprecated Use `direction` argument of onSwipeableOpen()\n *\n * Called when left action panel gets open.\n */\n onSwipeableLeftOpen?: () => void;\n\n /**\n * @deprecated Use `direction` argument of onSwipeableOpen()\n *\n * Called when right action panel gets open.\n */\n onSwipeableRightOpen?: () => void;\n\n /**\n * Called when action panel gets open (either right or left).\n */\n onSwipeableOpen?: (direction: 'left' | 'right', swipeable: Swipeable) => void;\n\n /**\n * Called when action panel is closed.\n */\n onSwipeableClose?: (\n direction: 'left' | 'right',\n swipeable: Swipeable\n ) => void;\n\n /**\n * @deprecated Use `direction` argument of onSwipeableWillOpen()\n *\n * Called when left action panel starts animating on open.\n */\n onSwipeableLeftWillOpen?: () => void;\n\n /**\n * @deprecated Use `direction` argument of onSwipeableWillOpen()\n *\n * Called when right action panel starts animating on open.\n */\n onSwipeableRightWillOpen?: () => void;\n\n /**\n * Called when action panel starts animating on open (either right or left).\n */\n onSwipeableWillOpen?: (direction: 'left' | 'right') => void;\n\n /**\n * Called when action panel starts animating on close.\n */\n onSwipeableWillClose?: (direction: 'left' | 'right') => void;\n\n /**\n * Called when action panel starts being shown on dragging to open.\n */\n onSwipeableOpenStartDrag?: (direction: 'left' | 'right') => void;\n\n /**\n * Called when action panel starts being shown on dragging to close.\n */\n onSwipeableCloseStartDrag?: (direction: 'left' | 'right') => void;\n\n /**\n *\n * This map describes the values to use as inputRange for extra interpolation:\n * AnimatedValue: [startValue, endValue]\n *\n * progressAnimatedValue: [0, 1] dragAnimatedValue: [0, +]\n *\n * To support `rtl` flexbox layouts use `flexDirection` styling.\n * */\n renderLeftActions?: (\n progressAnimatedValue: AnimatedInterpolation,\n dragAnimatedValue: AnimatedInterpolation,\n swipeable: Swipeable\n ) => React.ReactNode;\n /**\n *\n * This map describes the values to use as inputRange for extra interpolation:\n * AnimatedValue: [startValue, endValue]\n *\n * progressAnimatedValue: [0, 1] dragAnimatedValue: [0, -]\n *\n * To support `rtl` flexbox layouts use `flexDirection` styling.\n * */\n renderRightActions?: (\n progressAnimatedValue: AnimatedInterpolation,\n dragAnimatedValue: AnimatedInterpolation,\n swipeable: Swipeable\n ) => React.ReactNode;\n\n useNativeAnimations?: boolean;\n\n animationOptions?: Record<string, unknown>;\n\n /**\n * Style object for the container (`Animated.View`), for example to override\n * `overflow: 'hidden'`.\n */\n containerStyle?: StyleProp<ViewStyle>;\n\n /**\n * Style object for the children container (`Animated.View`), for example to\n * apply `flex: 1`\n */\n childrenContainerStyle?: StyleProp<ViewStyle>;\n}\n\ntype SwipeableState = {\n dragX: Animated.Value;\n rowTranslation: Animated.Value;\n rowState: number;\n leftWidth?: number;\n rightOffset?: number;\n rowWidth?: number;\n};\n\n/**\n * @deprecated use Reanimated version of Swipeable instead\n *\n * This component allows for implementing swipeable rows or similar interaction.\n */\n\nexport default class Swipeable extends Component<\n SwipeableProps,\n SwipeableState\n> {\n static defaultProps = {\n friction: 1,\n overshootFriction: 1,\n useNativeAnimations: true,\n };\n\n constructor(props: SwipeableProps) {\n super(props);\n const dragX = new Animated.Value(0);\n this.state = {\n dragX,\n rowTranslation: new Animated.Value(0),\n rowState: 0,\n leftWidth: undefined,\n rightOffset: undefined,\n rowWidth: undefined,\n };\n this.updateAnimatedEvent(props, this.state);\n\n this.onGestureEvent = Animated.event(\n [{ nativeEvent: { translationX: dragX } }],\n { useNativeDriver: props.useNativeAnimations! }\n );\n }\n\n shouldComponentUpdate(props: SwipeableProps, state: SwipeableState) {\n if (\n this.props.friction !== props.friction ||\n this.props.overshootLeft !== props.overshootLeft ||\n this.props.overshootRight !== props.overshootRight ||\n this.props.overshootFriction !== props.overshootFriction ||\n this.state.leftWidth !== state.leftWidth ||\n this.state.rightOffset !== state.rightOffset ||\n this.state.rowWidth !== state.rowWidth\n ) {\n this.updateAnimatedEvent(props, state);\n }\n\n return true;\n }\n\n private onGestureEvent?: (\n event: GestureEvent<PanGestureHandlerEventPayload>\n ) => void;\n private transX?: AnimatedInterpolation;\n private showLeftAction?: AnimatedInterpolation | Animated.Value;\n private leftActionTranslate?: AnimatedInterpolation;\n private showRightAction?: AnimatedInterpolation | Animated.Value;\n private rightActionTranslate?: AnimatedInterpolation;\n\n private updateAnimatedEvent = (\n props: SwipeableProps,\n state: SwipeableState\n ) => {\n const { friction, overshootFriction } = props;\n const { dragX, rowTranslation, leftWidth = 0, rowWidth = 0 } = state;\n const { rightOffset = rowWidth } = state;\n const rightWidth = Math.max(0, rowWidth - rightOffset);\n\n const { overshootLeft = leftWidth > 0, overshootRight = rightWidth > 0 } =\n props;\n\n const transX = Animated.add(\n rowTranslation,\n dragX.interpolate({\n inputRange: [0, friction!],\n outputRange: [0, 1],\n })\n ).interpolate({\n inputRange: [-rightWidth - 1, -rightWidth, leftWidth, leftWidth + 1],\n outputRange: [\n -rightWidth - (overshootRight ? 1 / overshootFriction! : 0),\n -rightWidth,\n leftWidth,\n leftWidth + (overshootLeft ? 1 / overshootFriction! : 0),\n ],\n });\n this.transX = transX;\n this.showLeftAction =\n leftWidth > 0\n ? transX.interpolate({\n inputRange: [-1, 0, leftWidth],\n outputRange: [0, 0, 1],\n })\n : new Animated.Value(0);\n this.leftActionTranslate = this.showLeftAction.interpolate({\n inputRange: [0, Number.MIN_VALUE],\n outputRange: [-10000, 0],\n extrapolate: 'clamp',\n });\n this.showRightAction =\n rightWidth > 0\n ? transX.interpolate({\n inputRange: [-rightWidth, 0, 1],\n outputRange: [1, 0, 0],\n })\n : new Animated.Value(0);\n this.rightActionTranslate = this.showRightAction.interpolate({\n inputRange: [0, Number.MIN_VALUE],\n outputRange: [-10000, 0],\n extrapolate: 'clamp',\n });\n };\n\n private onTapHandlerStateChange = ({\n nativeEvent,\n }: HandlerStateChangeEvent<TapGestureHandlerEventPayload>) => {\n if (nativeEvent.oldState === State.ACTIVE) {\n this.close();\n }\n };\n\n private onHandlerStateChange = (\n ev: HandlerStateChangeEvent<PanGestureHandlerEventPayload>\n ) => {\n if (ev.nativeEvent.oldState === State.ACTIVE) {\n this.handleRelease(ev);\n }\n\n if (ev.nativeEvent.state === State.ACTIVE) {\n const { velocityX, translationX: dragX } = ev.nativeEvent;\n const { rowState } = this.state;\n const { friction } = this.props;\n\n const translationX = (dragX + DRAG_TOSS * velocityX) / friction!;\n\n const direction =\n rowState === -1\n ? 'right'\n : rowState === 1\n ? 'left'\n : translationX > 0\n ? 'left'\n : 'right';\n\n if (rowState === 0) {\n this.props.onSwipeableOpenStartDrag?.(direction);\n } else {\n this.props.onSwipeableCloseStartDrag?.(direction);\n }\n }\n };\n\n private handleRelease = (\n ev: HandlerStateChangeEvent<PanGestureHandlerEventPayload>\n ) => {\n const { velocityX, translationX: dragX } = ev.nativeEvent;\n const { leftWidth = 0, rowWidth = 0, rowState } = this.state;\n const { rightOffset = rowWidth } = this.state;\n const rightWidth = rowWidth - rightOffset;\n const {\n friction,\n leftThreshold = leftWidth / 2,\n rightThreshold = rightWidth / 2,\n } = this.props;\n\n const startOffsetX = this.currentOffset() + dragX / friction!;\n const translationX = (dragX + DRAG_TOSS * velocityX) / friction!;\n\n let toValue = 0;\n if (rowState === 0) {\n if (translationX > leftThreshold) {\n toValue = leftWidth;\n } else if (translationX < -rightThreshold) {\n toValue = -rightWidth;\n }\n } else if (rowState === 1) {\n // Swiped to left\n if (translationX > -leftThreshold) {\n toValue = leftWidth;\n }\n } else {\n // Swiped to right\n if (translationX < rightThreshold) {\n toValue = -rightWidth;\n }\n }\n\n this.animateRow(startOffsetX, toValue, velocityX / friction!);\n };\n\n private animateRow = (\n fromValue: number,\n toValue: number,\n velocityX?:\n | number\n | {\n x: number;\n y: number;\n }\n ) => {\n const { dragX, rowTranslation } = this.state;\n dragX.setValue(0);\n rowTranslation.setValue(fromValue);\n\n this.setState({ rowState: Math.sign(toValue) });\n Animated.spring(rowTranslation, {\n restSpeedThreshold: 1.7,\n restDisplacementThreshold: 0.4,\n velocity: velocityX,\n bounciness: 0,\n toValue,\n useNativeDriver: this.props.useNativeAnimations!,\n ...this.props.animationOptions,\n }).start(({ finished }) => {\n if (finished) {\n if (toValue > 0) {\n this.props.onSwipeableLeftOpen?.();\n this.props.onSwipeableOpen?.('left', this);\n } else if (toValue < 0) {\n this.props.onSwipeableRightOpen?.();\n this.props.onSwipeableOpen?.('right', this);\n } else {\n const closingDirection = fromValue > 0 ? 'left' : 'right';\n this.props.onSwipeableClose?.(closingDirection, this);\n }\n }\n });\n if (toValue > 0) {\n this.props.onSwipeableLeftWillOpen?.();\n this.props.onSwipeableWillOpen?.('left');\n } else if (toValue < 0) {\n this.props.onSwipeableRightWillOpen?.();\n this.props.onSwipeableWillOpen?.('right');\n } else {\n const closingDirection = fromValue > 0 ? 'left' : 'right';\n this.props.onSwipeableWillClose?.(closingDirection);\n }\n };\n\n private onRowLayout = ({ nativeEvent }: LayoutChangeEvent) => {\n this.setState({ rowWidth: nativeEvent.layout.width });\n };\n\n private currentOffset = () => {\n const { leftWidth = 0, rowWidth = 0, rowState } = this.state;\n const { rightOffset = rowWidth } = this.state;\n const rightWidth = rowWidth - rightOffset;\n if (rowState === 1) {\n return leftWidth;\n } else if (rowState === -1) {\n return -rightWidth;\n }\n return 0;\n };\n\n close = () => {\n this.animateRow(this.currentOffset(), 0);\n };\n\n openLeft = () => {\n const { leftWidth = 0 } = this.state;\n this.animateRow(this.currentOffset(), leftWidth);\n };\n\n openRight = () => {\n const { rowWidth = 0 } = this.state;\n const { rightOffset = rowWidth } = this.state;\n const rightWidth = rowWidth - rightOffset;\n this.animateRow(this.currentOffset(), -rightWidth);\n };\n\n reset = () => {\n const { dragX, rowTranslation } = this.state;\n dragX.setValue(0);\n rowTranslation.setValue(0);\n this.setState({ rowState: 0 });\n };\n\n render() {\n const { rowState } = this.state;\n const {\n children,\n renderLeftActions,\n renderRightActions,\n dragOffsetFromLeftEdge = 10,\n dragOffsetFromRightEdge = 10,\n } = this.props;\n\n const left = renderLeftActions && (\n <Animated.View\n style={[\n styles.leftActions,\n // All those and below parameters can have ! since they are all\n // asigned in constructor in `updateAnimatedEvent` but TS cannot spot\n // it for some reason\n { transform: [{ translateX: this.leftActionTranslate! }] },\n ]}>\n {renderLeftActions(this.showLeftAction!, this.transX!, this)}\n <View\n onLayout={({ nativeEvent }) =>\n this.setState({ leftWidth: nativeEvent.layout.x })\n }\n />\n </Animated.View>\n );\n\n const right = renderRightActions && (\n <Animated.View\n style={[\n styles.rightActions,\n { transform: [{ translateX: this.rightActionTranslate! }] },\n ]}>\n {renderRightActions(this.showRightAction!, this.transX!, this)}\n <View\n onLayout={({ nativeEvent }) =>\n this.setState({ rightOffset: nativeEvent.layout.x })\n }\n />\n </Animated.View>\n );\n\n return (\n <PanGestureHandler\n activeOffsetX={[-dragOffsetFromRightEdge, dragOffsetFromLeftEdge]}\n touchAction=\"pan-y\"\n {...this.props}\n onGestureEvent={this.onGestureEvent}\n onHandlerStateChange={this.onHandlerStateChange}>\n <Animated.View\n onLayout={this.onRowLayout}\n style={[styles.container, this.props.containerStyle]}>\n {left}\n {right}\n <TapGestureHandler\n enabled={rowState !== 0}\n touchAction=\"pan-y\"\n onHandlerStateChange={this.onTapHandlerStateChange}>\n <Animated.View\n pointerEvents={rowState === 0 ? 'auto' : 'box-only'}\n style={[\n {\n transform: [{ translateX: this.transX! }],\n },\n this.props.childrenContainerStyle,\n ]}>\n {children}\n </Animated.View>\n </TapGestureHandler>\n </Animated.View>\n </PanGestureHandler>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n overflow: 'hidden',\n },\n leftActions: {\n ...StyleSheet.absoluteFillObject,\n flexDirection: I18nManager.isRTL ? 'row-reverse' : 'row',\n },\n rightActions: {\n ...StyleSheet.absoluteFillObject,\n flexDirection: I18nManager.isRTL ? 'row' : 'row-reverse',\n },\n});\n"]}
1
+ {"version":3,"names":["React","Component","Animated","StyleSheet","View","I18nManager","PanGestureHandler","TapGestureHandler","State","DRAG_TOSS","Swipeable","constructor","props","_defineProperty","state","friction","overshootFriction","dragX","rowTranslation","leftWidth","rowWidth","rightOffset","rightWidth","Math","max","overshootLeft","overshootRight","transX","add","interpolate","inputRange","outputRange","showLeftAction","Value","leftActionTranslate","Number","MIN_VALUE","extrapolate","showRightAction","rightActionTranslate","nativeEvent","oldState","ACTIVE","close","ev","handleRelease","velocityX","translationX","rowState","direction","_this$props$onSwipeab","_this$props","onSwipeableOpenStartDrag","call","_this$props$onSwipeab2","_this$props2","onSwipeableCloseStartDrag","leftThreshold","rightThreshold","startOffsetX","currentOffset","toValue","animateRow","fromValue","setValue","setState","sign","spring","restSpeedThreshold","restDisplacementThreshold","velocity","bounciness","useNativeDriver","useNativeAnimations","animationOptions","start","finished","_this$props$onSwipeab3","_this$props3","_this$props$onSwipeab4","_this$props4","onSwipeableLeftOpen","onSwipeableOpen","_this$props$onSwipeab5","_this$props5","_this$props$onSwipeab6","_this$props6","onSwipeableRightOpen","_this$props$onSwipeab7","_this$props7","closingDirection","onSwipeableClose","_this$props$onSwipeab8","_this$props8","_this$props$onSwipeab9","_this$props9","onSwipeableLeftWillOpen","onSwipeableWillOpen","_this$props$onSwipeab10","_this$props10","_this$props$onSwipeab11","_this$props11","onSwipeableRightWillOpen","_this$props$onSwipeab12","_this$props12","onSwipeableWillClose","layout","width","undefined","updateAnimatedEvent","onGestureEvent","event","shouldComponentUpdate","render","children","renderLeftActions","renderRightActions","dragOffsetFromLeftEdge","dragOffsetFromRightEdge","left","createElement","style","styles","leftActions","transform","translateX","onLayout","x","right","rightActions","_extends","activeOffsetX","touchAction","onHandlerStateChange","onRowLayout","container","containerStyle","enabled","onTapHandlerStateChange","pointerEvents","childrenContainerStyle","create","overflow","absoluteFillObject","flexDirection","isRTL"],"sources":["Swipeable.tsx"],"sourcesContent":["// Similarily to the DrawerLayout component this deserves to be put in a\n// separate repo. Although, keeping it here for the time being will allow us to\n// move faster and fix possible issues quicker\n\nimport * as React from 'react';\nimport { Component } from 'react';\nimport {\n Animated,\n StyleSheet,\n View,\n I18nManager,\n LayoutChangeEvent,\n StyleProp,\n ViewStyle,\n} from 'react-native';\n\nimport {\n GestureEvent,\n HandlerStateChangeEvent,\n} from '../handlers/gestureHandlerCommon';\nimport {\n PanGestureHandler,\n PanGestureHandlerProps,\n} from '../handlers/PanGestureHandler';\nimport {\n PanGestureHandlerEventPayload,\n TapGestureHandlerEventPayload,\n} from '../handlers/GestureHandlerEventPayload';\nimport { TapGestureHandler } from '../handlers/TapGestureHandler';\nimport { State } from '../State';\n\nconst DRAG_TOSS = 0.05;\n\ntype SwipeableExcludes = Exclude<\n keyof PanGestureHandlerProps,\n 'onGestureEvent' | 'onHandlerStateChange'\n>;\n\n// Animated.AnimatedInterpolation has been converted to a generic type\n// in @types/react-native 0.70. This way we can maintain compatibility\n// with all versions of @types/react-native\ntype AnimatedInterpolation = ReturnType<Animated.Value['interpolate']>;\n\nexport interface SwipeableProps\n extends Pick<PanGestureHandlerProps, SwipeableExcludes> {\n /**\n * Enables two-finger gestures on supported devices, for example iPads with\n * trackpads. If not enabled the gesture will require click + drag, with\n * `enableTrackpadTwoFingerGesture` swiping with two fingers will also trigger\n * the gesture.\n */\n enableTrackpadTwoFingerGesture?: boolean;\n\n /**\n * Specifies how much the visual interaction will be delayed compared to the\n * gesture distance. e.g. value of 1 will indicate that the swipeable panel\n * should exactly follow the gesture, 2 means it is going to be two times\n * \"slower\".\n */\n friction?: number;\n\n /**\n * Distance from the left edge at which released panel will animate to the\n * open state (or the open panel will animate into the closed state). By\n * default it's a half of the panel's width.\n */\n leftThreshold?: number;\n\n /**\n * Distance from the right edge at which released panel will animate to the\n * open state (or the open panel will animate into the closed state). By\n * default it's a half of the panel's width.\n */\n rightThreshold?: number;\n\n /**\n * Distance that the panel must be dragged from the left edge to be considered\n * a swipe. The default value is 10.\n */\n dragOffsetFromLeftEdge?: number;\n\n /**\n * Distance that the panel must be dragged from the right edge to be considered\n * a swipe. The default value is 10.\n */\n dragOffsetFromRightEdge?: number;\n\n /**\n * Value indicating if the swipeable panel can be pulled further than the left\n * actions panel's width. It is set to true by default as long as the left\n * panel render method is present.\n */\n overshootLeft?: boolean;\n\n /**\n * Value indicating if the swipeable panel can be pulled further than the\n * right actions panel's width. It is set to true by default as long as the\n * right panel render method is present.\n */\n overshootRight?: boolean;\n\n /**\n * Specifies how much the visual interaction will be delayed compared to the\n * gesture distance at overshoot. Default value is 1, it mean no friction, for\n * a native feel, try 8 or above.\n */\n overshootFriction?: number;\n\n /**\n * @deprecated Use `direction` argument of onSwipeableOpen()\n *\n * Called when left action panel gets open.\n */\n onSwipeableLeftOpen?: () => void;\n\n /**\n * @deprecated Use `direction` argument of onSwipeableOpen()\n *\n * Called when right action panel gets open.\n */\n onSwipeableRightOpen?: () => void;\n\n /**\n * Called when action panel gets open (either right or left).\n */\n onSwipeableOpen?: (direction: 'left' | 'right', swipeable: Swipeable) => void;\n\n /**\n * Called when action panel is closed.\n */\n onSwipeableClose?: (\n direction: 'left' | 'right',\n swipeable: Swipeable\n ) => void;\n\n /**\n * @deprecated Use `direction` argument of onSwipeableWillOpen()\n *\n * Called when left action panel starts animating on open.\n */\n onSwipeableLeftWillOpen?: () => void;\n\n /**\n * @deprecated Use `direction` argument of onSwipeableWillOpen()\n *\n * Called when right action panel starts animating on open.\n */\n onSwipeableRightWillOpen?: () => void;\n\n /**\n * Called when action panel starts animating on open (either right or left).\n */\n onSwipeableWillOpen?: (direction: 'left' | 'right') => void;\n\n /**\n * Called when action panel starts animating on close.\n */\n onSwipeableWillClose?: (direction: 'left' | 'right') => void;\n\n /**\n * Called when action panel starts being shown on dragging to open.\n */\n onSwipeableOpenStartDrag?: (direction: 'left' | 'right') => void;\n\n /**\n * Called when action panel starts being shown on dragging to close.\n */\n onSwipeableCloseStartDrag?: (direction: 'left' | 'right') => void;\n\n /**\n *\n * This map describes the values to use as inputRange for extra interpolation:\n * AnimatedValue: [startValue, endValue]\n *\n * progressAnimatedValue: [0, 1] dragAnimatedValue: [0, +]\n *\n * To support `rtl` flexbox layouts use `flexDirection` styling.\n * */\n renderLeftActions?: (\n progressAnimatedValue: AnimatedInterpolation,\n dragAnimatedValue: AnimatedInterpolation,\n swipeable: Swipeable\n ) => React.ReactNode;\n /**\n *\n * This map describes the values to use as inputRange for extra interpolation:\n * AnimatedValue: [startValue, endValue]\n *\n * progressAnimatedValue: [0, 1] dragAnimatedValue: [0, -]\n *\n * To support `rtl` flexbox layouts use `flexDirection` styling.\n * */\n renderRightActions?: (\n progressAnimatedValue: AnimatedInterpolation,\n dragAnimatedValue: AnimatedInterpolation,\n swipeable: Swipeable\n ) => React.ReactNode;\n\n useNativeAnimations?: boolean;\n\n animationOptions?: Record<string, unknown>;\n\n /**\n * Style object for the container (`Animated.View`), for example to override\n * `overflow: 'hidden'`.\n */\n containerStyle?: StyleProp<ViewStyle>;\n\n /**\n * Style object for the children container (`Animated.View`), for example to\n * apply `flex: 1`\n */\n childrenContainerStyle?: StyleProp<ViewStyle>;\n}\n\ntype SwipeableState = {\n dragX: Animated.Value;\n rowTranslation: Animated.Value;\n rowState: number;\n leftWidth?: number;\n rightOffset?: number;\n rowWidth?: number;\n};\n\n/**\n * @deprecated use Reanimated version of Swipeable instead\n *\n * This component allows for implementing swipeable rows or similar interaction.\n */\n\nexport default class Swipeable extends Component<\n SwipeableProps,\n SwipeableState\n> {\n static defaultProps = {\n friction: 1,\n overshootFriction: 1,\n useNativeAnimations: true,\n };\n\n constructor(props: SwipeableProps) {\n super(props);\n const dragX = new Animated.Value(0);\n this.state = {\n dragX,\n rowTranslation: new Animated.Value(0),\n rowState: 0,\n leftWidth: undefined,\n rightOffset: undefined,\n rowWidth: undefined,\n };\n this.updateAnimatedEvent(props, this.state);\n\n this.onGestureEvent = Animated.event(\n [{ nativeEvent: { translationX: dragX } }],\n { useNativeDriver: props.useNativeAnimations! }\n );\n }\n\n shouldComponentUpdate(props: SwipeableProps, state: SwipeableState) {\n if (\n this.props.friction !== props.friction ||\n this.props.overshootLeft !== props.overshootLeft ||\n this.props.overshootRight !== props.overshootRight ||\n this.props.overshootFriction !== props.overshootFriction ||\n this.state.leftWidth !== state.leftWidth ||\n this.state.rightOffset !== state.rightOffset ||\n this.state.rowWidth !== state.rowWidth\n ) {\n this.updateAnimatedEvent(props, state);\n }\n\n return true;\n }\n\n private onGestureEvent?: (\n event: GestureEvent<PanGestureHandlerEventPayload>\n ) => void;\n private transX?: AnimatedInterpolation;\n private showLeftAction?: AnimatedInterpolation | Animated.Value;\n private leftActionTranslate?: AnimatedInterpolation;\n private showRightAction?: AnimatedInterpolation | Animated.Value;\n private rightActionTranslate?: AnimatedInterpolation;\n\n private updateAnimatedEvent = (\n props: SwipeableProps,\n state: SwipeableState\n ) => {\n const { friction, overshootFriction } = props;\n const { dragX, rowTranslation, leftWidth = 0, rowWidth = 0 } = state;\n const { rightOffset = rowWidth } = state;\n const rightWidth = Math.max(0, rowWidth - rightOffset);\n\n const { overshootLeft = leftWidth > 0, overshootRight = rightWidth > 0 } =\n props;\n\n const transX = Animated.add(\n rowTranslation,\n dragX.interpolate({\n inputRange: [0, friction!],\n outputRange: [0, 1],\n })\n ).interpolate({\n inputRange: [-rightWidth - 1, -rightWidth, leftWidth, leftWidth + 1],\n outputRange: [\n -rightWidth - (overshootRight ? 1 / overshootFriction! : 0),\n -rightWidth,\n leftWidth,\n leftWidth + (overshootLeft ? 1 / overshootFriction! : 0),\n ],\n });\n this.transX = transX;\n this.showLeftAction =\n leftWidth > 0\n ? transX.interpolate({\n inputRange: [-1, 0, leftWidth],\n outputRange: [0, 0, 1],\n })\n : new Animated.Value(0);\n this.leftActionTranslate = this.showLeftAction.interpolate({\n inputRange: [0, Number.MIN_VALUE],\n outputRange: [-10000, 0],\n extrapolate: 'clamp',\n });\n this.showRightAction =\n rightWidth > 0\n ? transX.interpolate({\n inputRange: [-rightWidth, 0, 1],\n outputRange: [1, 0, 0],\n })\n : new Animated.Value(0);\n this.rightActionTranslate = this.showRightAction.interpolate({\n inputRange: [0, Number.MIN_VALUE],\n outputRange: [-10000, 0],\n extrapolate: 'clamp',\n });\n };\n\n private onTapHandlerStateChange = ({\n nativeEvent,\n }: HandlerStateChangeEvent<TapGestureHandlerEventPayload>) => {\n if (nativeEvent.oldState === State.ACTIVE) {\n this.close();\n }\n };\n\n private onHandlerStateChange = (\n ev: HandlerStateChangeEvent<PanGestureHandlerEventPayload>\n ) => {\n if (ev.nativeEvent.oldState === State.ACTIVE) {\n this.handleRelease(ev);\n }\n\n if (ev.nativeEvent.state === State.ACTIVE) {\n const { velocityX, translationX: dragX } = ev.nativeEvent;\n const { rowState } = this.state;\n const { friction } = this.props;\n\n const translationX = (dragX + DRAG_TOSS * velocityX) / friction!;\n\n const direction =\n rowState === -1\n ? 'right'\n : rowState === 1\n ? 'left'\n : translationX > 0\n ? 'left'\n : 'right';\n\n if (rowState === 0) {\n this.props.onSwipeableOpenStartDrag?.(direction);\n } else {\n this.props.onSwipeableCloseStartDrag?.(direction);\n }\n }\n };\n\n private handleRelease = (\n ev: HandlerStateChangeEvent<PanGestureHandlerEventPayload>\n ) => {\n const { velocityX, translationX: dragX } = ev.nativeEvent;\n const { leftWidth = 0, rowWidth = 0, rowState } = this.state;\n const { rightOffset = rowWidth } = this.state;\n const rightWidth = rowWidth - rightOffset;\n const {\n friction,\n leftThreshold = leftWidth / 2,\n rightThreshold = rightWidth / 2,\n } = this.props;\n\n const startOffsetX = this.currentOffset() + dragX / friction!;\n const translationX = (dragX + DRAG_TOSS * velocityX) / friction!;\n\n let toValue = 0;\n if (rowState === 0) {\n if (translationX > leftThreshold) {\n toValue = leftWidth;\n } else if (translationX < -rightThreshold) {\n toValue = -rightWidth;\n }\n } else if (rowState === 1) {\n // Swiped to left\n if (translationX > -leftThreshold) {\n toValue = leftWidth;\n }\n } else {\n // Swiped to right\n if (translationX < rightThreshold) {\n toValue = -rightWidth;\n }\n }\n\n this.animateRow(startOffsetX, toValue, velocityX / friction!);\n };\n\n private animateRow = (\n fromValue: number,\n toValue: number,\n velocityX?:\n | number\n | {\n x: number;\n y: number;\n }\n ) => {\n const { dragX, rowTranslation } = this.state;\n dragX.setValue(0);\n rowTranslation.setValue(fromValue);\n\n this.setState({ rowState: Math.sign(toValue) });\n Animated.spring(rowTranslation, {\n restSpeedThreshold: 1.7,\n restDisplacementThreshold: 0.4,\n velocity: velocityX,\n bounciness: 0,\n toValue,\n useNativeDriver: this.props.useNativeAnimations!,\n ...this.props.animationOptions,\n }).start(({ finished }) => {\n if (finished) {\n if (toValue > 0) {\n this.props.onSwipeableLeftOpen?.();\n this.props.onSwipeableOpen?.('left', this);\n } else if (toValue < 0) {\n this.props.onSwipeableRightOpen?.();\n this.props.onSwipeableOpen?.('right', this);\n } else {\n const closingDirection = fromValue > 0 ? 'left' : 'right';\n this.props.onSwipeableClose?.(closingDirection, this);\n }\n }\n });\n if (toValue > 0) {\n this.props.onSwipeableLeftWillOpen?.();\n this.props.onSwipeableWillOpen?.('left');\n } else if (toValue < 0) {\n this.props.onSwipeableRightWillOpen?.();\n this.props.onSwipeableWillOpen?.('right');\n } else {\n const closingDirection = fromValue > 0 ? 'left' : 'right';\n this.props.onSwipeableWillClose?.(closingDirection);\n }\n };\n\n private onRowLayout = ({ nativeEvent }: LayoutChangeEvent) => {\n this.setState({ rowWidth: nativeEvent.layout.width });\n };\n\n private currentOffset = () => {\n const { leftWidth = 0, rowWidth = 0, rowState } = this.state;\n const { rightOffset = rowWidth } = this.state;\n const rightWidth = rowWidth - rightOffset;\n if (rowState === 1) {\n return leftWidth;\n } else if (rowState === -1) {\n return -rightWidth;\n }\n return 0;\n };\n\n close = () => {\n this.animateRow(this.currentOffset(), 0);\n };\n\n openLeft = () => {\n const { leftWidth = 0 } = this.state;\n this.animateRow(this.currentOffset(), leftWidth);\n };\n\n openRight = () => {\n const { rowWidth = 0 } = this.state;\n const { rightOffset = rowWidth } = this.state;\n const rightWidth = rowWidth - rightOffset;\n this.animateRow(this.currentOffset(), -rightWidth);\n };\n\n reset = () => {\n const { dragX, rowTranslation } = this.state;\n dragX.setValue(0);\n rowTranslation.setValue(0);\n this.setState({ rowState: 0 });\n };\n\n render() {\n const { rowState } = this.state;\n const {\n children,\n renderLeftActions,\n renderRightActions,\n dragOffsetFromLeftEdge = 10,\n dragOffsetFromRightEdge = 10,\n } = this.props;\n\n const left = renderLeftActions && (\n <Animated.View\n style={[\n styles.leftActions,\n // All those and below parameters can have ! since they are all\n // asigned in constructor in `updateAnimatedEvent` but TS cannot spot\n // it for some reason\n { transform: [{ translateX: this.leftActionTranslate! }] },\n ]}>\n {renderLeftActions(this.showLeftAction!, this.transX!, this)}\n <View\n onLayout={({ nativeEvent }) =>\n this.setState({ leftWidth: nativeEvent.layout.x })\n }\n />\n </Animated.View>\n );\n\n const right = renderRightActions && (\n <Animated.View\n style={[\n styles.rightActions,\n { transform: [{ translateX: this.rightActionTranslate! }] },\n ]}>\n {renderRightActions(this.showRightAction!, this.transX!, this)}\n <View\n onLayout={({ nativeEvent }) =>\n this.setState({ rightOffset: nativeEvent.layout.x })\n }\n />\n </Animated.View>\n );\n\n return (\n <PanGestureHandler\n activeOffsetX={[-dragOffsetFromRightEdge, dragOffsetFromLeftEdge]}\n touchAction=\"pan-y\"\n {...this.props}\n onGestureEvent={this.onGestureEvent}\n onHandlerStateChange={this.onHandlerStateChange}>\n <Animated.View\n onLayout={this.onRowLayout}\n style={[styles.container, this.props.containerStyle]}>\n {left}\n {right}\n <TapGestureHandler\n enabled={rowState !== 0}\n touchAction=\"pan-y\"\n onHandlerStateChange={this.onTapHandlerStateChange}>\n <Animated.View\n pointerEvents={rowState === 0 ? 'auto' : 'box-only'}\n style={[\n {\n transform: [{ translateX: this.transX! }],\n },\n this.props.childrenContainerStyle,\n ]}>\n {children}\n </Animated.View>\n </TapGestureHandler>\n </Animated.View>\n </PanGestureHandler>\n );\n }\n}\n\nconst styles = StyleSheet.create({\n container: {\n overflow: 'hidden',\n },\n leftActions: {\n ...StyleSheet.absoluteFillObject,\n flexDirection: I18nManager.isRTL ? 'row-reverse' : 'row',\n },\n rightActions: {\n ...StyleSheet.absoluteFillObject,\n flexDirection: I18nManager.isRTL ? 'row' : 'row-reverse',\n },\n});\n"],"mappings":";;;;AAAA;AACA;AACA;;AAEA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,SAAS,QAAQ,OAAO;AACjC,SACEC,QAAQ,EACRC,UAAU,EACVC,IAAI,EACJC,WAAW,QAIN,cAAc;AAMrB,SACEC,iBAAiB,QAEZ,+BAA+B;AAKtC,SAASC,iBAAiB,QAAQ,+BAA+B;AACjE,SAASC,KAAK,QAAQ,UAAU;AAEhC,MAAMC,SAAS,GAAG,IAAI;;AAOtB;AACA;AACA;;AAwLA;AACA;AACA;AACA;AACA;;AAEA,eAAe,MAAMC,SAAS,SAAST,SAAS,CAG9C;EAOAU,WAAWA,CAACC,MAAqB,EAAE;IACjC,KAAK,CAACA,MAAK,CAAC;IAACC,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA;IAAAA,eAAA,8BA2Ce,CAC5BD,KAAqB,EACrBE,KAAqB,KAClB;MACH,MAAM;QAAEC,QAAQ;QAAEC;MAAkB,CAAC,GAAGJ,KAAK;MAC7C,MAAM;QAAEK,KAAK;QAAEC,cAAc;QAAEC,SAAS,GAAG,CAAC;QAAEC,QAAQ,GAAG;MAAE,CAAC,GAAGN,KAAK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iD,MAAM,GAAGvH,UAAU,CAAC0I,MAAM,CAAC;EAC/BN,SAAS,EAAE;IACTO,QAAQ,EAAE;EACZ,CAAC;EACDnB,WAAW,EAAE;IACX,GAAGxH,UAAU,CAAC4I,kBAAkB;IAChCC,aAAa,EAAE3I,WAAW,CAAC4I,KAAK,GAAG,aAAa,GAAG;EACrD,CAAC;EACDhB,YAAY,EAAE;IACZ,GAAG9H,UAAU,CAAC4I,kBAAkB;IAChCC,aAAa,EAAE3I,WAAW,CAAC4I,KAAK,GAAG,KAAK,GAAG;EAC7C;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,44 +1,45 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
-
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
3
2
  import React, { forwardRef, useEffect, useRef } from 'react';
4
3
  import { Platform, Text as RNText } from 'react-native';
5
- import { Gesture, GestureDetector } from '../';
4
+ import { GestureObjects as Gesture } from '../handlers/gestures/gestureObjects';
5
+ import { GestureDetector } from '../handlers/gestures/GestureDetector';
6
6
  export const Text = /*#__PURE__*/forwardRef((props, ref) => {
7
7
  const {
8
8
  onPress,
9
+ onLongPress,
9
10
  ...rest
10
11
  } = props;
11
12
  const textRef = useRef(null);
12
13
  const native = Gesture.Native().runOnJS(true);
13
-
14
14
  const refHandler = node => {
15
15
  textRef.current = node;
16
-
17
16
  if (ref === null) {
18
17
  return;
19
18
  }
20
-
21
19
  if (typeof ref === 'function') {
22
20
  ref(node);
23
21
  } else {
24
22
  ref.current = node;
25
23
  }
26
24
  };
27
-
28
25
  useEffect(() => {
29
26
  if (Platform.OS !== 'web') {
30
27
  return;
31
28
  }
29
+ const textElement = ref ? ref.current : textRef.current;
32
30
 
33
- const textElement = ref ? ref.current : textRef.current; // At this point we are sure that textElement is div in HTML tree
34
-
35
- textElement === null || textElement === void 0 ? void 0 : textElement.setAttribute('rnghtext', 'true');
31
+ // At this point we are sure that textElement is div in HTML tree
32
+ textElement === null || textElement === void 0 || textElement.setAttribute('rnghtext', 'true');
36
33
  }, []);
37
- return /*#__PURE__*/React.createElement(GestureDetector, {
34
+ return onPress || onLongPress ? /*#__PURE__*/React.createElement(GestureDetector, {
38
35
  gesture: native
39
36
  }, /*#__PURE__*/React.createElement(RNText, _extends({
40
37
  onPress: onPress,
38
+ onLongPress: onLongPress,
41
39
  ref: refHandler
42
- }, rest)));
43
- }); // eslint-disable-next-line @typescript-eslint/no-redeclare
40
+ }, rest))) : /*#__PURE__*/React.createElement(RNText, _extends({
41
+ ref: ref
42
+ }, rest));
43
+ });
44
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
44
45
  //# sourceMappingURL=Text.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["Text.tsx"],"names":["React","forwardRef","useEffect","useRef","Platform","Text","RNText","Gesture","GestureDetector","props","ref","onPress","rest","textRef","native","Native","runOnJS","refHandler","node","current","OS","textElement","setAttribute"],"mappings":";;AAAA,OAAOA,KAAP,IAEEC,UAFF,EAIEC,SAJF,EAKEC,MALF,QAMO,OANP;AAOA,SACEC,QADF,EAEEC,IAAI,IAAIC,MAFV,QAIO,cAJP;AAMA,SAASC,OAAT,EAAkBC,eAAlB,QAAyC,KAAzC;AAEA,OAAO,MAAMH,IAAI,gBAAGJ,UAAU,CAC5B,CAACQ,KAAD,EAAqBC,GAArB,KAAmD;AACjD,QAAM;AAAEC,IAAAA,OAAF;AAAW,OAAGC;AAAd,MAAuBH,KAA7B;AACA,QAAMI,OAAO,GAAGV,MAAM,CAAgB,IAAhB,CAAtB;AACA,QAAMW,MAAM,GAAGP,OAAO,CAACQ,MAAR,GAAiBC,OAAjB,CAAyB,IAAzB,CAAf;;AAEA,QAAMC,UAAU,GAAIC,IAAD,IAAe;AAChCL,IAAAA,OAAO,CAACM,OAAR,GAAkBD,IAAlB;;AAEA,QAAIR,GAAG,KAAK,IAAZ,EAAkB;AAChB;AACD;;AAED,QAAI,OAAOA,GAAP,KAAe,UAAnB,EAA+B;AAC7BA,MAAAA,GAAG,CAACQ,IAAD,CAAH;AACD,KAFD,MAEO;AACLR,MAAAA,GAAG,CAACS,OAAJ,GAAcD,IAAd;AACD;AACF,GAZD;;AAcAhB,EAAAA,SAAS,CAAC,MAAM;AACd,QAAIE,QAAQ,CAACgB,EAAT,KAAgB,KAApB,EAA2B;AACzB;AACD;;AAED,UAAMC,WAAW,GAAGX,GAAG,GAClBA,GAAD,CAA2BS,OADR,GAEnBN,OAAO,CAACM,OAFZ,CALc,CASd;;AACCE,IAAAA,WAAD,aAACA,WAAD,uBAACA,WAAD,CAA4CC,YAA5C,CACE,UADF,EAEE,MAFF;AAID,GAdQ,EAcN,EAdM,CAAT;AAgBA,sBACE,oBAAC,eAAD;AAAiB,IAAA,OAAO,EAAER;AAA1B,kBACE,oBAAC,MAAD;AAAQ,IAAA,OAAO,EAAEH,OAAjB;AAA0B,IAAA,GAAG,EAAEM;AAA/B,KAA+CL,IAA/C,EADF,CADF;AAKD,CAzC2B,CAAvB,C,CA2CP","sourcesContent":["import React, {\n ForwardedRef,\n forwardRef,\n RefObject,\n useEffect,\n useRef,\n} from 'react';\nimport {\n Platform,\n Text as RNText,\n TextProps as RNTextProps,\n} from 'react-native';\n\nimport { Gesture, GestureDetector } from '../';\n\nexport const Text = forwardRef(\n (props: RNTextProps, ref: ForwardedRef<RNText>) => {\n const { onPress, ...rest } = props;\n const textRef = useRef<RNText | null>(null);\n const native = Gesture.Native().runOnJS(true);\n\n const refHandler = (node: any) => {\n textRef.current = node;\n\n if (ref === null) {\n return;\n }\n\n if (typeof ref === 'function') {\n ref(node);\n } else {\n ref.current = node;\n }\n };\n\n useEffect(() => {\n if (Platform.OS !== 'web') {\n return;\n }\n\n const textElement = ref\n ? (ref as RefObject<RNText>).current\n : textRef.current;\n\n // At this point we are sure that textElement is div in HTML tree\n (textElement as unknown as HTMLDivElement)?.setAttribute(\n 'rnghtext',\n 'true'\n );\n }, []);\n\n return (\n <GestureDetector gesture={native}>\n <RNText onPress={onPress} ref={refHandler} {...rest} />\n </GestureDetector>\n );\n }\n);\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type Text = typeof Text & RNText;\n"]}
1
+ {"version":3,"names":["React","forwardRef","useEffect","useRef","Platform","Text","RNText","GestureObjects","Gesture","GestureDetector","props","ref","onPress","onLongPress","rest","textRef","native","Native","runOnJS","refHandler","node","current","OS","textElement","setAttribute","createElement","gesture","_extends"],"sources":["Text.tsx"],"sourcesContent":["import React, {\n ForwardedRef,\n forwardRef,\n RefObject,\n useEffect,\n useRef,\n} from 'react';\nimport {\n Platform,\n Text as RNText,\n TextProps as RNTextProps,\n} from 'react-native';\n\nimport { GestureObjects as Gesture } from '../handlers/gestures/gestureObjects';\nimport { GestureDetector } from '../handlers/gestures/GestureDetector';\n\nexport const Text = forwardRef(\n (props: RNTextProps, ref: ForwardedRef<RNText>) => {\n const { onPress, onLongPress, ...rest } = props;\n\n const textRef = useRef<RNText | null>(null);\n const native = Gesture.Native().runOnJS(true);\n\n const refHandler = (node: any) => {\n textRef.current = node;\n\n if (ref === null) {\n return;\n }\n\n if (typeof ref === 'function') {\n ref(node);\n } else {\n ref.current = node;\n }\n };\n\n useEffect(() => {\n if (Platform.OS !== 'web') {\n return;\n }\n\n const textElement = ref\n ? (ref as RefObject<RNText>).current\n : textRef.current;\n\n // At this point we are sure that textElement is div in HTML tree\n (textElement as unknown as HTMLDivElement)?.setAttribute(\n 'rnghtext',\n 'true'\n );\n }, []);\n\n return onPress || onLongPress ? (\n <GestureDetector gesture={native}>\n <RNText\n onPress={onPress}\n onLongPress={onLongPress}\n ref={refHandler}\n {...rest}\n />\n </GestureDetector>\n ) : (\n <RNText ref={ref} {...rest} />\n );\n }\n);\n// eslint-disable-next-line @typescript-eslint/no-redeclare\nexport type Text = typeof Text & RNText;\n"],"mappings":";AAAA,OAAOA,KAAK,IAEVC,UAAU,EAEVC,SAAS,EACTC,MAAM,QACD,OAAO;AACd,SACEC,QAAQ,EACRC,IAAI,IAAIC,MAAM,QAET,cAAc;AAErB,SAASC,cAAc,IAAIC,OAAO,QAAQ,qCAAqC;AAC/E,SAASC,eAAe,QAAQ,sCAAsC;AAEtE,OAAO,MAAMJ,IAAI,gBAAGJ,UAAU,CAC5B,CAACS,KAAkB,EAAEC,GAAyB,KAAK;EACjD,MAAM;IAAEC,OAAO;IAAEC,WAAW;IAAE,GAAGC;EAAK,CAAC,GAAGJ,KAAK;EAE/C,MAAMK,OAAO,GAAGZ,MAAM,CAAgB,IAAI,CAAC;EAC3C,MAAMa,MAAM,GAAGR,OAAO,CAACS,MAAM,CAAC,CAAC,CAACC,OAAO,CAAC,IAAI,CAAC;EAE7C,MAAMC,UAAU,GAAIC,IAAS,IAAK;IAChCL,OAAO,CAACM,OAAO,GAAGD,IAAI;IAEtB,IAAIT,GAAG,KAAK,IAAI,EAAE;MAChB;IACF;IAEA,IAAI,OAAOA,GAAG,KAAK,UAAU,EAAE;MAC7BA,GAAG,CAACS,IAAI,CAAC;IACX,CAAC,MAAM;MACLT,GAAG,CAACU,OAAO,GAAGD,IAAI;IACpB;EACF,CAAC;EAEDlB,SAAS,CAAC,MAAM;IACd,IAAIE,QAAQ,CAACkB,EAAE,KAAK,KAAK,EAAE;MACzB;IACF;IAEA,MAAMC,WAAW,GAAGZ,GAAG,GAClBA,GAAG,CAAuBU,OAAO,GAClCN,OAAO,CAACM,OAAO;;IAEnB;IACCE,WAAW,aAAXA,WAAW,eAAXA,WAAW,CAAgCC,YAAY,CACtD,UAAU,EACV,MACF,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOZ,OAAO,IAAIC,WAAW,gBAC3Bb,KAAA,CAAAyB,aAAA,CAAChB,eAAe;IAACiB,OAAO,EAAEV;EAAO,gBAC/BhB,KAAA,CAAAyB,aAAA,CAACnB,MAAM,EAAAqB,QAAA;IACLf,OAAO,EAAEA,OAAQ;IACjBC,WAAW,EAAEA,WAAY;IACzBF,GAAG,EAAEQ;EAAW,GACZL,IAAI,CACT,CACc,CAAC,gBAElBd,KAAA,CAAAyB,aAAA,CAACnB,MAAM,EAAAqB,QAAA;IAAChB,GAAG,EAAEA;EAAI,GAAKG,IAAI,CAAG,CAC9B;AACH,CACF,CAAC;AACD","ignoreList":[]}
@@ -8,9 +8,9 @@ export default function gestureHandlerRootHOC(Component, containerStyles) {
8
8
  style: [styles.container, containerStyles]
9
9
  }, /*#__PURE__*/React.createElement(Component, props));
10
10
  }
11
+ Wrapper.displayName = `gestureHandlerRootHOC(${Component.displayName || Component.name})`;
11
12
 
12
- Wrapper.displayName = `gestureHandlerRootHOC(${Component.displayName || Component.name})`; // @ts-ignore - hoistNonReactStatics uses old version of @types/react
13
-
13
+ // @ts-ignore - hoistNonReactStatics uses old version of @types/react
14
14
  hoistNonReactStatics(Wrapper, Component);
15
15
  return Wrapper;
16
16
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["gestureHandlerRootHOC.tsx"],"names":["React","StyleSheet","hoistNonReactStatics","GestureHandlerRootView","gestureHandlerRootHOC","Component","containerStyles","Wrapper","props","styles","container","displayName","name","create","flex"],"mappings":"AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,SAASC,UAAT,QAAiD,cAAjD;AACA,OAAOC,oBAAP,MAAiC,yBAAjC;AACA,OAAOC,sBAAP,MAAmC,0BAAnC;AAEA,eAAe,SAASC,qBAAT,CACbC,SADa,EAEbC,eAFa,EAGW;AACxB,WAASC,OAAT,CAAiBC,KAAjB,EAA2B;AACzB,wBACE,oBAAC,sBAAD;AAAwB,MAAA,KAAK,EAAE,CAACC,MAAM,CAACC,SAAR,EAAmBJ,eAAnB;AAA/B,oBACE,oBAAC,SAAD,EAAeE,KAAf,CADF,CADF;AAKD;;AAEDD,EAAAA,OAAO,CAACI,WAAR,GAAuB,yBACrBN,SAAS,CAACM,WAAV,IAAyBN,SAAS,CAACO,IACpC,GAFD,CATwB,CAaxB;;AACAV,EAAAA,oBAAoB,CAACK,OAAD,EAAUF,SAAV,CAApB;AAEA,SAAOE,OAAP;AACD;AAED,MAAME,MAAM,GAAGR,UAAU,CAACY,MAAX,CAAkB;AAC/BH,EAAAA,SAAS,EAAE;AAAEI,IAAAA,IAAI,EAAE;AAAR;AADoB,CAAlB,CAAf","sourcesContent":["import * as React from 'react';\nimport { StyleSheet, StyleProp, ViewStyle } from 'react-native';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport GestureHandlerRootView from './GestureHandlerRootView';\n\nexport default function gestureHandlerRootHOC<P extends object>(\n Component: React.ComponentType<P>,\n containerStyles?: StyleProp<ViewStyle>\n): React.ComponentType<P> {\n function Wrapper(props: P) {\n return (\n <GestureHandlerRootView style={[styles.container, containerStyles]}>\n <Component {...props} />\n </GestureHandlerRootView>\n );\n }\n\n Wrapper.displayName = `gestureHandlerRootHOC(${\n Component.displayName || Component.name\n })`;\n\n // @ts-ignore - hoistNonReactStatics uses old version of @types/react\n hoistNonReactStatics(Wrapper, Component);\n\n return Wrapper;\n}\n\nconst styles = StyleSheet.create({\n container: { flex: 1 },\n});\n"]}
1
+ {"version":3,"names":["React","StyleSheet","hoistNonReactStatics","GestureHandlerRootView","gestureHandlerRootHOC","Component","containerStyles","Wrapper","props","createElement","style","styles","container","displayName","name","create","flex"],"sources":["gestureHandlerRootHOC.tsx"],"sourcesContent":["import * as React from 'react';\nimport { StyleSheet, StyleProp, ViewStyle } from 'react-native';\nimport hoistNonReactStatics from 'hoist-non-react-statics';\nimport GestureHandlerRootView from './GestureHandlerRootView';\n\nexport default function gestureHandlerRootHOC<P extends object>(\n Component: React.ComponentType<P>,\n containerStyles?: StyleProp<ViewStyle>\n): React.ComponentType<P> {\n function Wrapper(props: P) {\n return (\n <GestureHandlerRootView style={[styles.container, containerStyles]}>\n <Component {...props} />\n </GestureHandlerRootView>\n );\n }\n\n Wrapper.displayName = `gestureHandlerRootHOC(${\n Component.displayName || Component.name\n })`;\n\n // @ts-ignore - hoistNonReactStatics uses old version of @types/react\n hoistNonReactStatics(Wrapper, Component);\n\n return Wrapper;\n}\n\nconst styles = StyleSheet.create({\n container: { flex: 1 },\n});\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,QAA8B,cAAc;AAC/D,OAAOC,oBAAoB,MAAM,yBAAyB;AAC1D,OAAOC,sBAAsB,MAAM,0BAA0B;AAE7D,eAAe,SAASC,qBAAqBA,CAC3CC,SAAiC,EACjCC,eAAsC,EACd;EACxB,SAASC,OAAOA,CAACC,KAAQ,EAAE;IACzB,oBACER,KAAA,CAAAS,aAAA,CAACN,sBAAsB;MAACO,KAAK,EAAE,CAACC,MAAM,CAACC,SAAS,EAAEN,eAAe;IAAE,gBACjEN,KAAA,CAAAS,aAAA,CAACJ,SAAS,EAAKG,KAAQ,CACD,CAAC;EAE7B;EAEAD,OAAO,CAACM,WAAW,GAAG,yBACpBR,SAAS,CAACQ,WAAW,IAAIR,SAAS,CAACS,IAAI,GACtC;;EAEH;EACAZ,oBAAoB,CAACK,OAAO,EAAEF,SAAS,CAAC;EAExC,OAAOE,OAAO;AAChB;AAEA,MAAMI,MAAM,GAAGV,UAAU,CAACc,MAAM,CAAC;EAC/BH,SAAS,EAAE;IAAEI,IAAI,EAAE;EAAE;AACvB,CAAC,CAAC","ignoreList":[]}