react-native-gesture-handler 2.23.0 → 2.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (601) hide show
  1. package/RNGestureHandler.podspec +8 -0
  2. package/apple/RNGestureHandlerButton.mm +12 -2
  3. package/lib/commonjs/ActionType.js +3 -3
  4. package/lib/commonjs/ActionType.js.map +1 -1
  5. package/lib/commonjs/Directions.js +8 -11
  6. package/lib/commonjs/Directions.js.map +1 -1
  7. package/lib/commonjs/EnableNewWebImplementation.js +10 -2
  8. package/lib/commonjs/EnableNewWebImplementation.js.map +1 -1
  9. package/lib/commonjs/GestureHandlerRootViewContext.js +7 -2
  10. package/lib/commonjs/GestureHandlerRootViewContext.js.map +1 -1
  11. package/lib/commonjs/PlatformConstants.js +6 -1
  12. package/lib/commonjs/PlatformConstants.js.map +1 -1
  13. package/lib/commonjs/PlatformConstants.web.js +3 -1
  14. package/lib/commonjs/PlatformConstants.web.js.map +1 -1
  15. package/lib/commonjs/PointerType.js +5 -3
  16. package/lib/commonjs/PointerType.js.map +1 -1
  17. package/lib/commonjs/RNGestureHandlerModule.js +6 -2
  18. package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
  19. package/lib/commonjs/RNGestureHandlerModule.web.js +37 -11
  20. package/lib/commonjs/RNGestureHandlerModule.web.js.map +1 -1
  21. package/lib/commonjs/RNGestureHandlerModule.windows.js +32 -22
  22. package/lib/commonjs/RNGestureHandlerModule.windows.js.map +1 -1
  23. package/lib/commonjs/RNRenderer.js +3 -1
  24. package/lib/commonjs/RNRenderer.js.map +1 -1
  25. package/lib/commonjs/RNRenderer.web.js +2 -1
  26. package/lib/commonjs/RNRenderer.web.js.map +1 -1
  27. package/lib/commonjs/State.js +3 -4
  28. package/lib/commonjs/State.js.map +1 -1
  29. package/lib/commonjs/TouchEventType.js +3 -3
  30. package/lib/commonjs/TouchEventType.js.map +1 -1
  31. package/lib/commonjs/components/DrawerLayout.js +115 -90
  32. package/lib/commonjs/components/DrawerLayout.js.map +1 -1
  33. package/lib/commonjs/components/GestureButtons.js +81 -28
  34. package/lib/commonjs/components/GestureButtons.js.map +1 -1
  35. package/lib/commonjs/components/GestureButtonsProps.js.map +1 -1
  36. package/lib/commonjs/components/GestureComponents.js +37 -26
  37. package/lib/commonjs/components/GestureComponents.js.map +1 -1
  38. package/lib/commonjs/components/GestureComponents.web.js +27 -13
  39. package/lib/commonjs/components/GestureComponents.web.js.map +1 -1
  40. package/lib/commonjs/components/GestureHandlerButton.js +6 -2
  41. package/lib/commonjs/components/GestureHandlerButton.js.map +1 -1
  42. package/lib/commonjs/components/GestureHandlerButton.web.js +12 -4
  43. package/lib/commonjs/components/GestureHandlerButton.web.js.map +1 -1
  44. package/lib/commonjs/components/GestureHandlerRootView.android.js +15 -4
  45. package/lib/commonjs/components/GestureHandlerRootView.android.js.map +1 -1
  46. package/lib/commonjs/components/GestureHandlerRootView.js +14 -4
  47. package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
  48. package/lib/commonjs/components/GestureHandlerRootView.web.js +13 -4
  49. package/lib/commonjs/components/GestureHandlerRootView.web.js.map +1 -1
  50. package/lib/commonjs/components/Pressable/Pressable.js +77 -29
  51. package/lib/commonjs/components/Pressable/Pressable.js.map +1 -1
  52. package/lib/commonjs/components/Pressable/PressableProps.js.map +1 -1
  53. package/lib/commonjs/components/Pressable/index.js +3 -1
  54. package/lib/commonjs/components/Pressable/index.js.map +1 -1
  55. package/lib/commonjs/components/Pressable/utils.js +20 -5
  56. package/lib/commonjs/components/Pressable/utils.js.map +1 -1
  57. package/lib/commonjs/components/ReanimatedDrawerLayout.js +76 -38
  58. package/lib/commonjs/components/ReanimatedDrawerLayout.js.map +1 -1
  59. package/lib/commonjs/components/ReanimatedSwipeable.js +45 -18
  60. package/lib/commonjs/components/ReanimatedSwipeable.js.map +1 -1
  61. package/lib/commonjs/components/Swipeable.js +75 -34
  62. package/lib/commonjs/components/Swipeable.js.map +1 -1
  63. package/lib/commonjs/components/Text.js +23 -9
  64. package/lib/commonjs/components/Text.js.map +1 -1
  65. package/lib/commonjs/components/gestureHandlerRootHOC.js +14 -5
  66. package/lib/commonjs/components/gestureHandlerRootHOC.js.map +1 -1
  67. package/lib/commonjs/components/touchables/GenericTouchable.js +76 -40
  68. package/lib/commonjs/components/touchables/GenericTouchable.js.map +1 -1
  69. package/lib/commonjs/components/touchables/GenericTouchableProps.js.map +1 -1
  70. package/lib/commonjs/components/touchables/TouchableHighlight.js +34 -19
  71. package/lib/commonjs/components/touchables/TouchableHighlight.js.map +1 -1
  72. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +32 -16
  73. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  74. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +5 -2
  75. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js.map +1 -1
  76. package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js.map +1 -1
  77. package/lib/commonjs/components/touchables/TouchableOpacity.js +25 -16
  78. package/lib/commonjs/components/touchables/TouchableOpacity.js.map +1 -1
  79. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +13 -9
  80. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  81. package/lib/commonjs/components/touchables/index.js +12 -7
  82. package/lib/commonjs/components/touchables/index.js.map +1 -1
  83. package/lib/commonjs/findNodeHandle.js +4 -1
  84. package/lib/commonjs/findNodeHandle.js.map +1 -1
  85. package/lib/commonjs/findNodeHandle.web.js +14 -5
  86. package/lib/commonjs/findNodeHandle.web.js.map +1 -1
  87. package/lib/commonjs/getReactNativeVersion.js +6 -1
  88. package/lib/commonjs/getReactNativeVersion.js.map +1 -1
  89. package/lib/commonjs/getReactNativeVersion.web.js +1 -0
  90. package/lib/commonjs/getReactNativeVersion.web.js.map +1 -1
  91. package/lib/commonjs/getShadowNodeFromRef.js +14 -13
  92. package/lib/commonjs/getShadowNodeFromRef.js.map +1 -1
  93. package/lib/commonjs/getShadowNodeFromRef.web.js +1 -0
  94. package/lib/commonjs/getShadowNodeFromRef.web.js.map +1 -1
  95. package/lib/commonjs/ghQueueMicrotask.js +2 -1
  96. package/lib/commonjs/ghQueueMicrotask.js.map +1 -1
  97. package/lib/commonjs/handlers/FlingGestureHandler.js +11 -9
  98. package/lib/commonjs/handlers/FlingGestureHandler.js.map +1 -1
  99. package/lib/commonjs/handlers/ForceTouchGestureHandler.js +22 -15
  100. package/lib/commonjs/handlers/ForceTouchGestureHandler.js.map +1 -1
  101. package/lib/commonjs/handlers/GestureHandlerEventPayload.js.map +1 -1
  102. package/lib/commonjs/handlers/LongPressGestureHandler.js +11 -9
  103. package/lib/commonjs/handlers/LongPressGestureHandler.js.map +1 -1
  104. package/lib/commonjs/handlers/NativeViewGestureHandler.js +13 -10
  105. package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +1 -1
  106. package/lib/commonjs/handlers/PanGestureHandler.js +32 -13
  107. package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -1
  108. package/lib/commonjs/handlers/PinchGestureHandler.js +9 -7
  109. package/lib/commonjs/handlers/PinchGestureHandler.js.map +1 -1
  110. package/lib/commonjs/handlers/PressabilityDebugView.js +1 -0
  111. package/lib/commonjs/handlers/PressabilityDebugView.js.map +1 -1
  112. package/lib/commonjs/handlers/PressabilityDebugView.web.js +1 -0
  113. package/lib/commonjs/handlers/PressabilityDebugView.web.js.map +1 -1
  114. package/lib/commonjs/handlers/RotationGestureHandler.js +9 -7
  115. package/lib/commonjs/handlers/RotationGestureHandler.js.map +1 -1
  116. package/lib/commonjs/handlers/TapGestureHandler.js +11 -9
  117. package/lib/commonjs/handlers/TapGestureHandler.js.map +1 -1
  118. package/lib/commonjs/handlers/createHandler.js +134 -50
  119. package/lib/commonjs/handlers/createHandler.js.map +1 -1
  120. package/lib/commonjs/handlers/createNativeWrapper.js +27 -17
  121. package/lib/commonjs/handlers/createNativeWrapper.js.map +1 -1
  122. package/lib/commonjs/handlers/customDirectEventTypes.js +1 -0
  123. package/lib/commonjs/handlers/customDirectEventTypes.js.map +1 -1
  124. package/lib/commonjs/handlers/customDirectEventTypes.web.js +2 -1
  125. package/lib/commonjs/handlers/customDirectEventTypes.web.js.map +1 -1
  126. package/lib/commonjs/handlers/gestureHandlerCommon.js +10 -9
  127. package/lib/commonjs/handlers/gestureHandlerCommon.js.map +1 -1
  128. package/lib/commonjs/handlers/gestureHandlerTypesCompat.js.map +1 -1
  129. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js +14 -5
  130. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
  131. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js +20 -10
  132. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
  133. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js +29 -9
  134. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
  135. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js +10 -1
  136. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
  137. package/lib/commonjs/handlers/gestures/GestureDetector/index.js +36 -11
  138. package/lib/commonjs/handlers/gestures/GestureDetector/index.js.map +1 -1
  139. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js +3 -0
  140. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -1
  141. package/lib/commonjs/handlers/gestures/GestureDetector/types.js.map +1 -1
  142. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js +24 -12
  143. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
  144. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js +48 -12
  145. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
  146. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js +13 -3
  147. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
  148. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js +9 -2
  149. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
  150. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js +14 -6
  151. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
  152. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js +55 -27
  153. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js.map +1 -1
  154. package/lib/commonjs/handlers/gestures/eventReceiver.js +46 -14
  155. package/lib/commonjs/handlers/gestures/eventReceiver.js.map +1 -1
  156. package/lib/commonjs/handlers/gestures/flingGesture.js +12 -5
  157. package/lib/commonjs/handlers/gestures/flingGesture.js.map +1 -1
  158. package/lib/commonjs/handlers/gestures/forceTouchGesture.js +19 -8
  159. package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -1
  160. package/lib/commonjs/handlers/gestures/gesture.js +84 -44
  161. package/lib/commonjs/handlers/gestures/gesture.js.map +1 -1
  162. package/lib/commonjs/handlers/gestures/gestureComposition.js +31 -17
  163. package/lib/commonjs/handlers/gestures/gestureComposition.js.map +1 -1
  164. package/lib/commonjs/handlers/gestures/gestureObjects.js +27 -1
  165. package/lib/commonjs/handlers/gestures/gestureObjects.js.map +1 -1
  166. package/lib/commonjs/handlers/gestures/gestureStateManager.js +9 -3
  167. package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +1 -1
  168. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js +7 -2
  169. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js.map +1 -1
  170. package/lib/commonjs/handlers/gestures/hoverGesture.js +25 -11
  171. package/lib/commonjs/handlers/gestures/hoverGesture.js.map +1 -1
  172. package/lib/commonjs/handlers/gestures/longPressGesture.js +14 -6
  173. package/lib/commonjs/handlers/gestures/longPressGesture.js.map +1 -1
  174. package/lib/commonjs/handlers/gestures/manualGesture.js +6 -0
  175. package/lib/commonjs/handlers/gestures/manualGesture.js.map +1 -1
  176. package/lib/commonjs/handlers/gestures/nativeGesture.js +12 -5
  177. package/lib/commonjs/handlers/gestures/nativeGesture.js.map +1 -1
  178. package/lib/commonjs/handlers/gestures/panGesture.js +43 -18
  179. package/lib/commonjs/handlers/gestures/panGesture.js.map +1 -1
  180. package/lib/commonjs/handlers/gestures/pinchGesture.js +9 -2
  181. package/lib/commonjs/handlers/gestures/pinchGesture.js.map +1 -1
  182. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js +8 -1
  183. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js.map +1 -1
  184. package/lib/commonjs/handlers/gestures/rotationGesture.js +9 -2
  185. package/lib/commonjs/handlers/gestures/rotationGesture.js.map +1 -1
  186. package/lib/commonjs/handlers/gestures/tapGesture.js +22 -10
  187. package/lib/commonjs/handlers/gestures/tapGesture.js.map +1 -1
  188. package/lib/commonjs/handlers/getNextHandlerTag.js +1 -0
  189. package/lib/commonjs/handlers/getNextHandlerTag.js.map +1 -1
  190. package/lib/commonjs/handlers/handlersRegistry.js +21 -6
  191. package/lib/commonjs/handlers/handlersRegistry.js.map +1 -1
  192. package/lib/commonjs/handlers/utils.js +26 -6
  193. package/lib/commonjs/handlers/utils.js.map +1 -1
  194. package/lib/commonjs/index.js +104 -75
  195. package/lib/commonjs/index.js.map +1 -1
  196. package/lib/commonjs/init.js +11 -4
  197. package/lib/commonjs/init.js.map +1 -1
  198. package/lib/commonjs/jestUtils/index.js +5 -4
  199. package/lib/commonjs/jestUtils/index.js.map +1 -1
  200. package/lib/commonjs/jestUtils/jestUtils.js +83 -19
  201. package/lib/commonjs/jestUtils/jestUtils.js.map +1 -1
  202. package/lib/commonjs/mocks.js +15 -5
  203. package/lib/commonjs/mocks.js.map +1 -1
  204. package/lib/commonjs/mountRegistry.js +12 -3
  205. package/lib/commonjs/mountRegistry.js.map +1 -1
  206. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +5 -1
  207. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +1 -1
  208. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js +7 -2
  209. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
  210. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js +7 -2
  211. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
  212. package/lib/commonjs/typeUtils.js.map +1 -1
  213. package/lib/commonjs/utils.js +28 -13
  214. package/lib/commonjs/utils.js.map +1 -1
  215. package/lib/commonjs/web/Gestures.js +23 -5
  216. package/lib/commonjs/web/Gestures.js.map +1 -1
  217. package/lib/commonjs/web/constants.js +4 -2
  218. package/lib/commonjs/web/constants.js.map +1 -1
  219. package/lib/commonjs/web/detectors/RotationGestureDetector.js +41 -5
  220. package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +1 -1
  221. package/lib/commonjs/web/detectors/ScaleGestureDetector.js +42 -13
  222. package/lib/commonjs/web/detectors/ScaleGestureDetector.js.map +1 -1
  223. package/lib/commonjs/web/handlers/FlingGestureHandler.js +49 -6
  224. package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -1
  225. package/lib/commonjs/web/handlers/GestureHandler.js +195 -62
  226. package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
  227. package/lib/commonjs/web/handlers/HoverGestureHandler.js +19 -6
  228. package/lib/commonjs/web/handlers/HoverGestureHandler.js.map +1 -1
  229. package/lib/commonjs/web/handlers/IGestureHandler.js.map +1 -1
  230. package/lib/commonjs/web/handlers/LongPressGestureHandler.js +47 -6
  231. package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +1 -1
  232. package/lib/commonjs/web/handlers/ManualGestureHandler.js +11 -1
  233. package/lib/commonjs/web/handlers/ManualGestureHandler.js.map +1 -1
  234. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js +49 -8
  235. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js.map +1 -1
  236. package/lib/commonjs/web/handlers/PanGestureHandler.js +123 -8
  237. package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
  238. package/lib/commonjs/web/handlers/PinchGestureHandler.js +41 -4
  239. package/lib/commonjs/web/handlers/PinchGestureHandler.js.map +1 -1
  240. package/lib/commonjs/web/handlers/RotationGestureHandler.js +42 -4
  241. package/lib/commonjs/web/handlers/RotationGestureHandler.js.map +1 -1
  242. package/lib/commonjs/web/handlers/TapGestureHandler.js +67 -6
  243. package/lib/commonjs/web/handlers/TapGestureHandler.js.map +1 -1
  244. package/lib/commonjs/web/interfaces.js +17 -9
  245. package/lib/commonjs/web/interfaces.js.map +1 -1
  246. package/lib/commonjs/web/tools/CircularBuffer.js +15 -3
  247. package/lib/commonjs/web/tools/CircularBuffer.js.map +1 -1
  248. package/lib/commonjs/web/tools/EventManager.js +41 -7
  249. package/lib/commonjs/web/tools/EventManager.js.map +1 -1
  250. package/lib/commonjs/web/tools/GestureHandlerDelegate.js.map +1 -1
  251. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +78 -11
  252. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  253. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +48 -8
  254. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  255. package/lib/commonjs/web/tools/InteractionManager.js +22 -5
  256. package/lib/commonjs/web/tools/InteractionManager.js.map +1 -1
  257. package/lib/commonjs/web/tools/KeyboardEventManager.js +26 -4
  258. package/lib/commonjs/web/tools/KeyboardEventManager.js.map +1 -1
  259. package/lib/commonjs/web/tools/LeastSquareSolver.js +67 -30
  260. package/lib/commonjs/web/tools/LeastSquareSolver.js.map +1 -1
  261. package/lib/commonjs/web/tools/NodeManager.js +14 -7
  262. package/lib/commonjs/web/tools/NodeManager.js.map +1 -1
  263. package/lib/commonjs/web/tools/PointerEventManager.js +45 -10
  264. package/lib/commonjs/web/tools/PointerEventManager.js.map +1 -1
  265. package/lib/commonjs/web/tools/PointerTracker.js +45 -9
  266. package/lib/commonjs/web/tools/PointerTracker.js.map +1 -1
  267. package/lib/commonjs/web/tools/Vector.js +18 -3
  268. package/lib/commonjs/web/tools/Vector.js.map +1 -1
  269. package/lib/commonjs/web/tools/VelocityTracker.js +31 -9
  270. package/lib/commonjs/web/tools/VelocityTracker.js.map +1 -1
  271. package/lib/commonjs/web/tools/WheelEventManager.js +17 -4
  272. package/lib/commonjs/web/tools/WheelEventManager.js.map +1 -1
  273. package/lib/commonjs/web/utils.js +55 -26
  274. package/lib/commonjs/web/utils.js.map +1 -1
  275. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js +19 -7
  276. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js.map +1 -1
  277. package/lib/commonjs/web_hammer/DraggingGestureHandler.js +13 -3
  278. package/lib/commonjs/web_hammer/DraggingGestureHandler.js.map +1 -1
  279. package/lib/commonjs/web_hammer/Errors.js +3 -0
  280. package/lib/commonjs/web_hammer/Errors.js.map +1 -1
  281. package/lib/commonjs/web_hammer/FlingGestureHandler.js +44 -13
  282. package/lib/commonjs/web_hammer/FlingGestureHandler.js.map +1 -1
  283. package/lib/commonjs/web_hammer/GestureHandler.js +142 -55
  284. package/lib/commonjs/web_hammer/GestureHandler.js.map +1 -1
  285. package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js +11 -2
  286. package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js.map +1 -1
  287. package/lib/commonjs/web_hammer/LongPressGestureHandler.js +19 -5
  288. package/lib/commonjs/web_hammer/LongPressGestureHandler.js.map +1 -1
  289. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js +24 -16
  290. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js.map +1 -1
  291. package/lib/commonjs/web_hammer/NodeManager.js +16 -9
  292. package/lib/commonjs/web_hammer/NodeManager.js.map +1 -1
  293. package/lib/commonjs/web_hammer/PanGestureHandler.js +49 -8
  294. package/lib/commonjs/web_hammer/PanGestureHandler.js.map +1 -1
  295. package/lib/commonjs/web_hammer/PinchGestureHandler.js +11 -2
  296. package/lib/commonjs/web_hammer/PinchGestureHandler.js.map +1 -1
  297. package/lib/commonjs/web_hammer/PressGestureHandler.js +43 -15
  298. package/lib/commonjs/web_hammer/PressGestureHandler.js.map +1 -1
  299. package/lib/commonjs/web_hammer/RotationGestureHandler.js +13 -2
  300. package/lib/commonjs/web_hammer/RotationGestureHandler.js.map +1 -1
  301. package/lib/commonjs/web_hammer/TapGestureHandler.js +52 -33
  302. package/lib/commonjs/web_hammer/TapGestureHandler.js.map +1 -1
  303. package/lib/commonjs/web_hammer/constants.js +26 -13
  304. package/lib/commonjs/web_hammer/constants.js.map +1 -1
  305. package/lib/commonjs/web_hammer/utils.js +14 -4
  306. package/lib/commonjs/web_hammer/utils.js.map +1 -1
  307. package/lib/module/ActionType.js +1 -3
  308. package/lib/module/ActionType.js.map +1 -1
  309. package/lib/module/Directions.js +3 -9
  310. package/lib/module/Directions.js.map +1 -1
  311. package/lib/module/EnableNewWebImplementation.js +5 -2
  312. package/lib/module/EnableNewWebImplementation.js.map +1 -1
  313. package/lib/module/GestureHandlerRootViewContext.js.map +1 -1
  314. package/lib/module/PlatformConstants.js +1 -0
  315. package/lib/module/PlatformConstants.js.map +1 -1
  316. package/lib/module/PlatformConstants.web.js +1 -0
  317. package/lib/module/PlatformConstants.web.js.map +1 -1
  318. package/lib/module/PointerType.js +4 -3
  319. package/lib/module/PointerType.js.map +1 -1
  320. package/lib/module/RNGestureHandlerModule.js +0 -1
  321. package/lib/module/RNGestureHandlerModule.js.map +1 -1
  322. package/lib/module/RNGestureHandlerModule.web.js +20 -10
  323. package/lib/module/RNGestureHandlerModule.web.js.map +1 -1
  324. package/lib/module/RNGestureHandlerModule.windows.js +17 -18
  325. package/lib/module/RNGestureHandlerModule.windows.js.map +1 -1
  326. package/lib/module/RNRenderer.js.map +1 -1
  327. package/lib/module/RNRenderer.web.js.map +1 -1
  328. package/lib/module/State.js +1 -4
  329. package/lib/module/State.js.map +1 -1
  330. package/lib/module/TouchEventType.js +1 -3
  331. package/lib/module/TouchEventType.js.map +1 -1
  332. package/lib/module/components/DrawerLayout.js +99 -80
  333. package/lib/module/components/DrawerLayout.js.map +1 -1
  334. package/lib/module/components/GestureButtons.js +55 -19
  335. package/lib/module/components/GestureButtons.js.map +1 -1
  336. package/lib/module/components/GestureButtonsProps.js.map +1 -1
  337. package/lib/module/components/GestureComponents.js +12 -17
  338. package/lib/module/components/GestureComponents.js.map +1 -1
  339. package/lib/module/components/GestureComponents.web.js +4 -4
  340. package/lib/module/components/GestureComponents.web.js.map +1 -1
  341. package/lib/module/components/GestureHandlerButton.js.map +1 -1
  342. package/lib/module/components/GestureHandlerButton.web.js +2 -1
  343. package/lib/module/components/GestureHandlerButton.web.js.map +1 -1
  344. package/lib/module/components/GestureHandlerRootView.android.js +2 -1
  345. package/lib/module/components/GestureHandlerRootView.android.js.map +1 -1
  346. package/lib/module/components/GestureHandlerRootView.js +2 -1
  347. package/lib/module/components/GestureHandlerRootView.js.map +1 -1
  348. package/lib/module/components/GestureHandlerRootView.web.js +2 -1
  349. package/lib/module/components/GestureHandlerRootView.web.js.map +1 -1
  350. package/lib/module/components/Pressable/Pressable.js +59 -26
  351. package/lib/module/components/Pressable/Pressable.js.map +1 -1
  352. package/lib/module/components/Pressable/PressableProps.js.map +1 -1
  353. package/lib/module/components/Pressable/index.js.map +1 -1
  354. package/lib/module/components/Pressable/utils.js +14 -4
  355. package/lib/module/components/Pressable/utils.js.map +1 -1
  356. package/lib/module/components/ReanimatedDrawerLayout.js +56 -34
  357. package/lib/module/components/ReanimatedDrawerLayout.js.map +1 -1
  358. package/lib/module/components/ReanimatedSwipeable.js +30 -14
  359. package/lib/module/components/ReanimatedSwipeable.js.map +1 -1
  360. package/lib/module/components/Swipeable.js +59 -28
  361. package/lib/module/components/Swipeable.js.map +1 -1
  362. package/lib/module/components/Text.js +10 -6
  363. package/lib/module/components/Text.js.map +1 -1
  364. package/lib/module/components/gestureHandlerRootHOC.js +2 -2
  365. package/lib/module/components/gestureHandlerRootHOC.js.map +1 -1
  366. package/lib/module/components/touchables/GenericTouchable.js +63 -34
  367. package/lib/module/components/touchables/GenericTouchable.js.map +1 -1
  368. package/lib/module/components/touchables/GenericTouchableProps.js.map +1 -1
  369. package/lib/module/components/touchables/TouchableHighlight.js +24 -15
  370. package/lib/module/components/touchables/TouchableHighlight.js.map +1 -1
  371. package/lib/module/components/touchables/TouchableNativeFeedback.android.js +20 -10
  372. package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  373. package/lib/module/components/touchables/TouchableNativeFeedback.js +2 -2
  374. package/lib/module/components/touchables/TouchableNativeFeedback.js.map +1 -1
  375. package/lib/module/components/touchables/TouchableNativeFeedbackProps.js.map +1 -1
  376. package/lib/module/components/touchables/TouchableOpacity.js +16 -10
  377. package/lib/module/components/touchables/TouchableOpacity.js.map +1 -1
  378. package/lib/module/components/touchables/TouchableWithoutFeedback.js +3 -6
  379. package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  380. package/lib/module/components/touchables/index.js.map +1 -1
  381. package/lib/module/findNodeHandle.js.map +1 -1
  382. package/lib/module/findNodeHandle.web.js +11 -5
  383. package/lib/module/findNodeHandle.web.js.map +1 -1
  384. package/lib/module/getReactNativeVersion.js.map +1 -1
  385. package/lib/module/getReactNativeVersion.web.js.map +1 -1
  386. package/lib/module/getShadowNodeFromRef.js +13 -13
  387. package/lib/module/getShadowNodeFromRef.js.map +1 -1
  388. package/lib/module/getShadowNodeFromRef.web.js.map +1 -1
  389. package/lib/module/ghQueueMicrotask.js.map +1 -1
  390. package/lib/module/handlers/FlingGestureHandler.js +0 -6
  391. package/lib/module/handlers/FlingGestureHandler.js.map +1 -1
  392. package/lib/module/handlers/ForceTouchGestureHandler.js +8 -12
  393. package/lib/module/handlers/ForceTouchGestureHandler.js.map +1 -1
  394. package/lib/module/handlers/GestureHandlerEventPayload.js.map +1 -1
  395. package/lib/module/handlers/LongPressGestureHandler.js +0 -6
  396. package/lib/module/handlers/LongPressGestureHandler.js.map +1 -1
  397. package/lib/module/handlers/NativeViewGestureHandler.js +0 -6
  398. package/lib/module/handlers/NativeViewGestureHandler.js.map +1 -1
  399. package/lib/module/handlers/PanGestureHandler.js +19 -8
  400. package/lib/module/handlers/PanGestureHandler.js.map +1 -1
  401. package/lib/module/handlers/PinchGestureHandler.js +0 -2
  402. package/lib/module/handlers/PinchGestureHandler.js.map +1 -1
  403. package/lib/module/handlers/PressabilityDebugView.js.map +1 -1
  404. package/lib/module/handlers/PressabilityDebugView.web.js.map +1 -1
  405. package/lib/module/handlers/RotationGestureHandler.js +0 -2
  406. package/lib/module/handlers/RotationGestureHandler.js.map +1 -1
  407. package/lib/module/handlers/TapGestureHandler.js +0 -6
  408. package/lib/module/handlers/TapGestureHandler.js.map +1 -1
  409. package/lib/module/handlers/createHandler.js +106 -47
  410. package/lib/module/handlers/createHandler.js.map +1 -1
  411. package/lib/module/handlers/createNativeWrapper.js +17 -12
  412. package/lib/module/handlers/createNativeWrapper.js.map +1 -1
  413. package/lib/module/handlers/customDirectEventTypes.js.map +1 -1
  414. package/lib/module/handlers/customDirectEventTypes.web.js.map +1 -1
  415. package/lib/module/handlers/gestureHandlerCommon.js +4 -9
  416. package/lib/module/handlers/gestureHandlerCommon.js.map +1 -1
  417. package/lib/module/handlers/gestureHandlerTypesCompat.js.map +1 -1
  418. package/lib/module/handlers/gestures/GestureDetector/Wrap.js +4 -3
  419. package/lib/module/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
  420. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js +6 -5
  421. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
  422. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js +16 -8
  423. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
  424. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js +1 -0
  425. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
  426. package/lib/module/handlers/gestures/GestureDetector/index.js +13 -7
  427. package/lib/module/handlers/gestures/GestureDetector/index.js.map +1 -1
  428. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js +2 -0
  429. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -1
  430. package/lib/module/handlers/gestures/GestureDetector/types.js.map +1 -1
  431. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js +14 -11
  432. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
  433. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js +39 -12
  434. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
  435. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js +5 -5
  436. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
  437. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js +6 -2
  438. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
  439. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js +7 -5
  440. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
  441. package/lib/module/handlers/gestures/GestureDetector/utils.js +28 -23
  442. package/lib/module/handlers/gestures/GestureDetector/utils.js.map +1 -1
  443. package/lib/module/handlers/gestures/eventReceiver.js +38 -14
  444. package/lib/module/handlers/gestures/eventReceiver.js.map +1 -1
  445. package/lib/module/handlers/gestures/flingGesture.js +9 -5
  446. package/lib/module/handlers/gestures/flingGesture.js.map +1 -1
  447. package/lib/module/handlers/gestures/forceTouchGesture.js +17 -8
  448. package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -1
  449. package/lib/module/handlers/gestures/gesture.js +73 -44
  450. package/lib/module/handlers/gestures/gesture.js.map +1 -1
  451. package/lib/module/handlers/gestures/gestureComposition.js +24 -16
  452. package/lib/module/handlers/gestures/gestureComposition.js.map +1 -1
  453. package/lib/module/handlers/gestures/gestureObjects.js +14 -1
  454. package/lib/module/handlers/gestures/gestureObjects.js.map +1 -1
  455. package/lib/module/handlers/gestures/gestureStateManager.js +4 -3
  456. package/lib/module/handlers/gestures/gestureStateManager.js.map +1 -1
  457. package/lib/module/handlers/gestures/gestureStateManager.web.js +1 -0
  458. package/lib/module/handlers/gestures/gestureStateManager.web.js.map +1 -1
  459. package/lib/module/handlers/gestures/hoverGesture.js +18 -9
  460. package/lib/module/handlers/gestures/hoverGesture.js.map +1 -1
  461. package/lib/module/handlers/gestures/longPressGesture.js +11 -6
  462. package/lib/module/handlers/gestures/longPressGesture.js.map +1 -1
  463. package/lib/module/handlers/gestures/manualGesture.js +4 -0
  464. package/lib/module/handlers/gestures/manualGesture.js.map +1 -1
  465. package/lib/module/handlers/gestures/nativeGesture.js +9 -5
  466. package/lib/module/handlers/gestures/nativeGesture.js.map +1 -1
  467. package/lib/module/handlers/gestures/panGesture.js +41 -18
  468. package/lib/module/handlers/gestures/panGesture.js.map +1 -1
  469. package/lib/module/handlers/gestures/pinchGesture.js +7 -2
  470. package/lib/module/handlers/gestures/pinchGesture.js.map +1 -1
  471. package/lib/module/handlers/gestures/reanimatedWrapper.js +5 -0
  472. package/lib/module/handlers/gestures/reanimatedWrapper.js.map +1 -1
  473. package/lib/module/handlers/gestures/rotationGesture.js +7 -2
  474. package/lib/module/handlers/gestures/rotationGesture.js.map +1 -1
  475. package/lib/module/handlers/gestures/tapGesture.js +19 -10
  476. package/lib/module/handlers/gestures/tapGesture.js.map +1 -1
  477. package/lib/module/handlers/getNextHandlerTag.js.map +1 -1
  478. package/lib/module/handlers/handlersRegistry.js +5 -0
  479. package/lib/module/handlers/handlersRegistry.js.map +1 -1
  480. package/lib/module/handlers/utils.js +13 -4
  481. package/lib/module/handlers/utils.js.map +1 -1
  482. package/lib/module/index.js.map +1 -1
  483. package/lib/module/init.js +2 -3
  484. package/lib/module/init.js.map +1 -1
  485. package/lib/module/jestUtils/index.js.map +1 -1
  486. package/lib/module/jestUtils/jestUtils.js +66 -20
  487. package/lib/module/jestUtils/jestUtils.js.map +1 -1
  488. package/lib/module/mocks.js +7 -3
  489. package/lib/module/mocks.js.map +1 -1
  490. package/lib/module/mountRegistry.js +10 -3
  491. package/lib/module/mountRegistry.js.map +1 -1
  492. package/lib/module/specs/NativeRNGestureHandlerModule.js.map +1 -1
  493. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
  494. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
  495. package/lib/module/typeUtils.js.map +1 -1
  496. package/lib/module/utils.js +11 -6
  497. package/lib/module/utils.js.map +1 -1
  498. package/lib/module/web/Gestures.js +1 -2
  499. package/lib/module/web/Gestures.js.map +1 -1
  500. package/lib/module/web/constants.js.map +1 -1
  501. package/lib/module/web/detectors/RotationGestureDetector.js +38 -5
  502. package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -1
  503. package/lib/module/web/detectors/ScaleGestureDetector.js +38 -13
  504. package/lib/module/web/detectors/ScaleGestureDetector.js.map +1 -1
  505. package/lib/module/web/handlers/FlingGestureHandler.js +39 -5
  506. package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
  507. package/lib/module/web/handlers/GestureHandler.js +181 -61
  508. package/lib/module/web/handlers/GestureHandler.js.map +1 -1
  509. package/lib/module/web/handlers/HoverGestureHandler.js +11 -5
  510. package/lib/module/web/handlers/HoverGestureHandler.js.map +1 -1
  511. package/lib/module/web/handlers/IGestureHandler.js.map +1 -1
  512. package/lib/module/web/handlers/LongPressGestureHandler.js +40 -5
  513. package/lib/module/web/handlers/LongPressGestureHandler.js.map +1 -1
  514. package/lib/module/web/handlers/ManualGestureHandler.js +6 -0
  515. package/lib/module/web/handlers/ManualGestureHandler.js.map +1 -1
  516. package/lib/module/web/handlers/NativeViewGestureHandler.js +41 -7
  517. package/lib/module/web/handlers/NativeViewGestureHandler.js.map +1 -1
  518. package/lib/module/web/handlers/PanGestureHandler.js +114 -7
  519. package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
  520. package/lib/module/web/handlers/PinchGestureHandler.js +33 -3
  521. package/lib/module/web/handlers/PinchGestureHandler.js.map +1 -1
  522. package/lib/module/web/handlers/RotationGestureHandler.js +34 -3
  523. package/lib/module/web/handlers/RotationGestureHandler.js.map +1 -1
  524. package/lib/module/web/handlers/TapGestureHandler.js +59 -5
  525. package/lib/module/web/handlers/TapGestureHandler.js.map +1 -1
  526. package/lib/module/web/interfaces.js +14 -9
  527. package/lib/module/web/interfaces.js.map +1 -1
  528. package/lib/module/web/tools/CircularBuffer.js +13 -3
  529. package/lib/module/web/tools/CircularBuffer.js.map +1 -1
  530. package/lib/module/web/tools/EventManager.js +39 -7
  531. package/lib/module/web/tools/EventManager.js.map +1 -1
  532. package/lib/module/web/tools/GestureHandlerDelegate.js.map +1 -1
  533. package/lib/module/web/tools/GestureHandlerOrchestrator.js +71 -10
  534. package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  535. package/lib/module/web/tools/GestureHandlerWebDelegate.js +37 -7
  536. package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  537. package/lib/module/web/tools/InteractionManager.js +19 -5
  538. package/lib/module/web/tools/InteractionManager.js.map +1 -1
  539. package/lib/module/web/tools/KeyboardEventManager.js +19 -3
  540. package/lib/module/web/tools/KeyboardEventManager.js.map +1 -1
  541. package/lib/module/web/tools/LeastSquareSolver.js +65 -30
  542. package/lib/module/web/tools/LeastSquareSolver.js.map +1 -1
  543. package/lib/module/web/tools/NodeManager.js +12 -7
  544. package/lib/module/web/tools/NodeManager.js.map +1 -1
  545. package/lib/module/web/tools/PointerEventManager.js +35 -9
  546. package/lib/module/web/tools/PointerEventManager.js.map +1 -1
  547. package/lib/module/web/tools/PointerTracker.js +39 -8
  548. package/lib/module/web/tools/PointerTracker.js.map +1 -1
  549. package/lib/module/web/tools/Vector.js +14 -3
  550. package/lib/module/web/tools/Vector.js.map +1 -1
  551. package/lib/module/web/tools/VelocityTracker.js +25 -8
  552. package/lib/module/web/tools/VelocityTracker.js.map +1 -1
  553. package/lib/module/web/tools/WheelEventManager.js +10 -3
  554. package/lib/module/web/tools/WheelEventManager.js.map +1 -1
  555. package/lib/module/web/utils.js +40 -21
  556. package/lib/module/web/utils.js.map +1 -1
  557. package/lib/module/web_hammer/DiscreteGestureHandler.js +13 -4
  558. package/lib/module/web_hammer/DiscreteGestureHandler.js.map +1 -1
  559. package/lib/module/web_hammer/DraggingGestureHandler.js +5 -0
  560. package/lib/module/web_hammer/DraggingGestureHandler.js.map +1 -1
  561. package/lib/module/web_hammer/Errors.js +1 -0
  562. package/lib/module/web_hammer/Errors.js.map +1 -1
  563. package/lib/module/web_hammer/FlingGestureHandler.js +35 -10
  564. package/lib/module/web_hammer/FlingGestureHandler.js.map +1 -1
  565. package/lib/module/web_hammer/GestureHandler.js +130 -53
  566. package/lib/module/web_hammer/GestureHandler.js.map +1 -1
  567. package/lib/module/web_hammer/IndiscreteGestureHandler.js +6 -1
  568. package/lib/module/web_hammer/IndiscreteGestureHandler.js.map +1 -1
  569. package/lib/module/web_hammer/LongPressGestureHandler.js +11 -2
  570. package/lib/module/web_hammer/LongPressGestureHandler.js.map +1 -1
  571. package/lib/module/web_hammer/NativeViewGestureHandler.js +12 -12
  572. package/lib/module/web_hammer/NativeViewGestureHandler.js.map +1 -1
  573. package/lib/module/web_hammer/NodeManager.js +8 -6
  574. package/lib/module/web_hammer/NodeManager.js.map +1 -1
  575. package/lib/module/web_hammer/PanGestureHandler.js +40 -6
  576. package/lib/module/web_hammer/PanGestureHandler.js.map +1 -1
  577. package/lib/module/web_hammer/PinchGestureHandler.js +5 -0
  578. package/lib/module/web_hammer/PinchGestureHandler.js.map +1 -1
  579. package/lib/module/web_hammer/PressGestureHandler.js +34 -13
  580. package/lib/module/web_hammer/PressGestureHandler.js.map +1 -1
  581. package/lib/module/web_hammer/RotationGestureHandler.js +6 -0
  582. package/lib/module/web_hammer/RotationGestureHandler.js.map +1 -1
  583. package/lib/module/web_hammer/TapGestureHandler.js +45 -31
  584. package/lib/module/web_hammer/TapGestureHandler.js.map +1 -1
  585. package/lib/module/web_hammer/constants.js +1 -2
  586. package/lib/module/web_hammer/constants.js.map +1 -1
  587. package/lib/module/web_hammer/utils.js +2 -2
  588. package/lib/module/web_hammer/utils.js.map +1 -1
  589. package/lib/typescript/components/touchables/TouchableHighlight.d.ts +2 -2
  590. package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +1 -1
  591. package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +1 -1
  592. package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +1 -1
  593. package/lib/typescript/components/touchables/TouchableOpacity.d.ts +2 -2
  594. package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +2 -2
  595. package/package.json +1 -1
  596. package/src/components/touchables/TouchableHighlight.tsx +2 -2
  597. package/src/components/touchables/TouchableNativeFeedback.android.tsx +1 -1
  598. package/src/components/touchables/TouchableNativeFeedback.tsx +1 -1
  599. package/src/components/touchables/TouchableNativeFeedbackProps.tsx +1 -1
  600. package/src/components/touchables/TouchableOpacity.tsx +2 -2
  601. package/src/components/touchables/TouchableWithoutFeedback.tsx +2 -2
@@ -4,22 +4,31 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
+
7
8
  var _react = _interopRequireWildcard(require("react"));
9
+
8
10
  var _gestureObjects = require("../handlers/gestures/gestureObjects");
11
+
9
12
  var _GestureDetector = require("../handlers/gestures/GestureDetector");
13
+
10
14
  var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
15
+
11
16
  var _reactNative = require("react-native");
12
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
13
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
- 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); } // Similarily to the DrawerLayout component this deserves to be put in a
15
- // separate repo. Although, keeping it here for the time being will allow us to
16
- // move faster and fix possible issues quicker
17
+
18
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
19
+
20
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
21
+
22
+ 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); }
23
+
17
24
  const DRAG_TOSS = 0.05;
18
- var SwipeDirection = /*#__PURE__*/function (SwipeDirection) {
25
+ var SwipeDirection;
26
+
27
+ (function (SwipeDirection) {
19
28
  SwipeDirection["LEFT"] = "left";
20
29
  SwipeDirection["RIGHT"] = "right";
21
- return SwipeDirection;
22
- }(SwipeDirection || {});
30
+ })(SwipeDirection || (SwipeDirection = {}));
31
+
23
32
  const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props, ref) {
24
33
  const defaultProps = {
25
34
  friction: 1,
@@ -110,8 +119,7 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
110
119
  const isClosing = toValue === 0;
111
120
  const moveToRight = isClosing ? rowState.value < 0 : toValue > 0;
112
121
  const usedWidth = isClosing ? moveToRight ? rightWidth.value : leftWidth.value : moveToRight ? leftWidth.value : rightWidth.value;
113
- const progressSpringConfig = {
114
- ...translationSpringConfig,
122
+ const progressSpringConfig = { ...translationSpringConfig,
115
123
  restDisplacementThreshold: 0.01,
116
124
  restSpeedThreshold: 0.01,
117
125
  velocity: velocityX && (0, _reactNativeReanimated.interpolate)(velocityX, [-usedWidth, usedWidth], [-1, 1])
@@ -135,6 +143,7 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
135
143
  'worklet';
136
144
 
137
145
  var _leftLayout$pageX, _leftWrapperLayout$pa, _rightLayout$pageX, _leftWrapperLayout$pa2;
146
+
138
147
  const leftLayout = (0, _reactNativeReanimated.measure)(leftLayoutRef);
139
148
  const leftWrapperLayout = (0, _reactNativeReanimated.measure)(leftWrapperLayoutRef);
140
149
  const rightLayout = (0, _reactNativeReanimated.measure)(rightLayoutRef);
@@ -149,10 +158,12 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
149
158
  animateRow(0);
150
159
  return;
151
160
  }
161
+
152
162
  (0, _reactNativeReanimated.runOnUI)(() => {
153
163
  animateRow(0);
154
164
  })();
155
165
  },
166
+
156
167
  openLeft() {
157
168
  'worklet';
158
169
 
@@ -161,11 +172,13 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
161
172
  animateRow(leftWidth.value);
162
173
  return;
163
174
  }
175
+
164
176
  (0, _reactNativeReanimated.runOnUI)(() => {
165
177
  updateElementWidths();
166
178
  animateRow(leftWidth.value);
167
179
  })();
168
180
  },
181
+
169
182
  openRight() {
170
183
  'worklet';
171
184
 
@@ -174,11 +187,13 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
174
187
  animateRow(-rightWidth.value);
175
188
  return;
176
189
  }
190
+
177
191
  (0, _reactNativeReanimated.runOnUI)(() => {
178
192
  updateElementWidths();
179
193
  animateRow(-rightWidth.value);
180
194
  })();
181
195
  },
196
+
182
197
  reset() {
183
198
  'worklet';
184
199
 
@@ -187,14 +202,13 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
187
202
  appliedTranslation.value = 0;
188
203
  rowState.value = 0;
189
204
  }
205
+
190
206
  }), [animateRow, updateElementWidths, leftWidth, rightWidth, userDrag, showLeftProgress, appliedTranslation, rowState]);
191
207
  const onRowLayout = (0, _react.useCallback)(({
192
208
  nativeEvent
193
209
  }) => {
194
210
  rowWidth.value = nativeEvent.layout.width;
195
- }, [rowWidth]);
196
-
197
- // As stated in `Dimensions.get` docstring, this function should be called on every render
211
+ }, [rowWidth]); // As stated in `Dimensions.get` docstring, this function should be called on every render
198
212
  // since dimensions may change (e.g. orientation change)
199
213
 
200
214
  const leftActionAnimation = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
@@ -229,6 +243,7 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
229
243
  const rightThresholdProp = rightThreshold !== null && rightThreshold !== void 0 ? rightThreshold : rightWidth.value / 2;
230
244
  const translationX = (userDrag.value + DRAG_TOSS * velocityX) / friction;
231
245
  let toValue = 0;
246
+
232
247
  if (rowState.value === 0) {
233
248
  if (translationX > leftThresholdProp) {
234
249
  toValue = leftWidth.value;
@@ -246,6 +261,7 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
246
261
  toValue = -rightWidth.value;
247
262
  }
248
263
  }
264
+
249
265
  animateRow(toValue, velocityX / friction);
250
266
  }, [animateRow, friction, leftThreshold, leftWidth, rightThreshold, rightWidth, rowState, userDrag]);
251
267
  const close = (0, _react.useCallback)(() => {
@@ -260,42 +276,51 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
260
276
  close();
261
277
  }
262
278
  });
279
+
263
280
  if (!simultaneousWithExternalGesture) {
264
281
  return tap;
265
282
  }
283
+
266
284
  if (Array.isArray(simultaneousWithExternalGesture)) {
267
285
  tap.simultaneousWithExternalGesture(...simultaneousWithExternalGesture);
268
286
  } else {
269
287
  tap.simultaneousWithExternalGesture(simultaneousWithExternalGesture);
270
288
  }
289
+
271
290
  return tap;
272
291
  }, [close, rowState, simultaneousWithExternalGesture]);
273
292
  const panGesture = (0, _react.useMemo)(() => {
274
293
  const pan = _gestureObjects.GestureObjects.Pan().enabled(enabled !== false).enableTrackpadTwoFingerGesture(enableTrackpadTwoFingerGesture).activeOffsetX([-dragOffsetFromRightEdge, dragOffsetFromLeftEdge]).onStart(updateElementWidths).onUpdate(event => {
275
294
  userDrag.value = event.translationX;
276
295
  const direction = rowState.value === -1 ? SwipeDirection.RIGHT : rowState.value === 1 ? SwipeDirection.LEFT : event.translationX > 0 ? SwipeDirection.RIGHT : SwipeDirection.LEFT;
296
+
277
297
  if (!dragStarted.value) {
278
298
  dragStarted.value = true;
299
+
279
300
  if (rowState.value === 0 && onSwipeableOpenStartDrag) {
280
301
  (0, _reactNativeReanimated.runOnJS)(onSwipeableOpenStartDrag)(direction);
281
302
  } else if (onSwipeableCloseStartDrag) {
282
303
  (0, _reactNativeReanimated.runOnJS)(onSwipeableCloseStartDrag)(direction);
283
304
  }
284
305
  }
306
+
285
307
  updateAnimatedEvent();
286
308
  }).onEnd(event => {
287
309
  handleRelease(event);
288
310
  }).onFinalize(() => {
289
311
  dragStarted.value = false;
290
312
  });
313
+
291
314
  if (!simultaneousWithExternalGesture) {
292
315
  return pan;
293
316
  }
317
+
294
318
  if (Array.isArray(simultaneousWithExternalGesture)) {
295
319
  pan.simultaneousWithExternalGesture(...simultaneousWithExternalGesture);
296
320
  } else {
297
321
  pan.simultaneousWithExternalGesture(simultaneousWithExternalGesture);
298
322
  }
323
+
299
324
  return pan;
300
325
  }, [dragOffsetFromLeftEdge, dragOffsetFromRightEdge, dragStarted, enableTrackpadTwoFingerGesture, enabled, handleRelease, onSwipeableCloseStartDrag, onSwipeableOpenStartDrag, rowState, updateAnimatedEvent, updateElementWidths, userDrag, simultaneousWithExternalGesture]);
301
326
  (0, _react.useImperativeHandle)(ref, () => swipeableMethods, [swipeableMethods]);
@@ -305,6 +330,7 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
305
330
  }],
306
331
  pointerEvents: rowState.value === 0 ? 'auto' : 'box-only'
307
332
  }), [appliedTranslation, rowState]);
333
+
308
334
  const swipeableComponent = /*#__PURE__*/_react.default.createElement(_GestureDetector.GestureDetector, {
309
335
  gesture: panGesture,
310
336
  touchAction: "pan-y"
@@ -317,22 +343,23 @@ const Swipeable = /*#__PURE__*/(0, _react.forwardRef)(function Swipeable(props,
317
343
  }, /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, {
318
344
  style: [animatedStyle, childrenContainerStyle]
319
345
  }, children))));
346
+
320
347
  return testID ? /*#__PURE__*/_react.default.createElement(_reactNative.View, {
321
348
  testID: testID
322
349
  }, swipeableComponent) : swipeableComponent;
323
350
  });
324
- var _default = exports.default = Swipeable;
351
+ var _default = Swipeable;
352
+ exports.default = _default;
353
+
325
354
  const styles = _reactNative.StyleSheet.create({
326
355
  container: {
327
356
  overflow: 'hidden'
328
357
  },
329
- leftActions: {
330
- ..._reactNative.StyleSheet.absoluteFillObject,
358
+ leftActions: { ..._reactNative.StyleSheet.absoluteFillObject,
331
359
  flexDirection: _reactNative.I18nManager.isRTL ? 'row-reverse' : 'row',
332
360
  overflow: 'hidden'
333
361
  },
334
- rightActions: {
335
- ..._reactNative.StyleSheet.absoluteFillObject,
362
+ rightActions: { ..._reactNative.StyleSheet.absoluteFillObject,
336
363
  flexDirection: _reactNative.I18nManager.isRTL ? 'row' : 'row-reverse',
337
364
  overflow: 'hidden'
338
365
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_gestureObjects","_GestureDetector","_reactNativeReanimated","_reactNative","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","DRAG_TOSS","SwipeDirection","Swipeable","forwardRef","props","ref","defaultProps","friction","overshootFriction","dragOffset","enableTrackpadTwoFingerGesture","leftThreshold","rightThreshold","enabled","containerStyle","childrenContainerStyle","animationOptions","overshootLeft","overshootRight","testID","children","dragOffsetFromLeftEdge","dragOffsetFromRightEdge","onSwipeableOpenStartDrag","onSwipeableCloseStartDrag","onSwipeableWillOpen","onSwipeableWillClose","onSwipeableOpen","onSwipeableClose","renderLeftActions","renderRightActions","simultaneousWithExternalGesture","remainingProps","rowState","useSharedValue","userDrag","appliedTranslation","rowWidth","leftWidth","rightWidth","showLeftProgress","showRightProgress","updateAnimatedEvent","useCallback","shouldOvershootLeft","value","shouldOvershootRight","startOffset","offsetDrag","interpolate","dispatchImmediateEvents","fromValue","toValue","runOnJS","RIGHT","LEFT","dispatchEndEvents","animateRow","velocityX","translationSpringConfig","mass","damping","stiffness","velocity","overshootClamping","reduceMotion","ReduceMotion","System","isClosing","moveToRight","usedWidth","progressSpringConfig","restDisplacementThreshold","restSpeedThreshold","frozenRowState","withSpring","isFinished","progressTarget","Math","sign","max","leftLayoutRef","useAnimatedRef","leftWrapperLayoutRef","rightLayoutRef","updateElementWidths","_leftLayout$pageX","_leftWrapperLayout$pa","_rightLayout$pageX","_leftWrapperLayout$pa2","leftLayout","measure","leftWrapperLayout","rightLayout","pageX","swipeableMethods","useMemo","close","_WORKLET","runOnUI","openLeft","openRight","reset","onRowLayout","nativeEvent","layout","width","leftActionAnimation","useAnimatedStyle","opacity","leftElement","createElement","View","style","styles","leftActions","rightActionAnimation","rightElement","rightActions","handleRelease","event","translationX","leftThresholdProp","rightThresholdProp","dragStarted","tapGesture","tap","Gesture","Tap","shouldCancelWhenOutside","onStart","Array","isArray","panGesture","pan","Pan","activeOffsetX","onUpdate","direction","onEnd","onFinalize","useImperativeHandle","animatedStyle","transform","translateX","pointerEvents","swipeableComponent","GestureDetector","gesture","touchAction","onLayout","container","_default","exports","StyleSheet","create","overflow","absoluteFillObject","flexDirection","I18nManager","isRTL"],"sources":["ReanimatedSwipeable.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 React, {\n ForwardedRef,\n forwardRef,\n useCallback,\n useImperativeHandle,\n useMemo,\n} from 'react';\nimport { GestureRef } from '../handlers/gestures/gesture';\nimport { GestureObjects as Gesture } from '../handlers/gestures/gestureObjects';\nimport { GestureDetector } from '../handlers/gestures/GestureDetector';\nimport {\n GestureStateChangeEvent,\n GestureUpdateEvent,\n} from '../handlers/gestureHandlerCommon';\nimport type { PanGestureHandlerProps } from '../handlers/PanGestureHandler';\nimport type { PanGestureHandlerEventPayload } from '../handlers/GestureHandlerEventPayload';\nimport Animated, {\n ReduceMotion,\n SharedValue,\n interpolate,\n measure,\n runOnJS,\n runOnUI,\n useAnimatedRef,\n useAnimatedStyle,\n useSharedValue,\n withSpring,\n} from 'react-native-reanimated';\nimport {\n I18nManager,\n LayoutChangeEvent,\n StyleProp,\n StyleSheet,\n View,\n ViewStyle,\n} from 'react-native';\n\nconst DRAG_TOSS = 0.05;\n\ntype SwipeableExcludes = Exclude<\n keyof PanGestureHandlerProps,\n 'onGestureEvent' | 'onHandlerStateChange'\n>;\n\nenum SwipeDirection {\n LEFT = 'left',\n RIGHT = 'right',\n}\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 * Called when action panel gets open (either right or left).\n */\n onSwipeableOpen?: (\n direction: SwipeDirection.LEFT | SwipeDirection.RIGHT\n ) => void;\n\n /**\n * Called when action panel is closed.\n */\n onSwipeableClose?: (\n direction: SwipeDirection.LEFT | SwipeDirection.RIGHT\n ) => void;\n\n /**\n * Called when action panel starts animating on open (either right or left).\n */\n onSwipeableWillOpen?: (\n direction: SwipeDirection.LEFT | SwipeDirection.RIGHT\n ) => void;\n\n /**\n * Called when action panel starts animating on close.\n */\n onSwipeableWillClose?: (\n direction: SwipeDirection.LEFT | SwipeDirection.RIGHT\n ) => void;\n\n /**\n * Called when action panel starts being shown on dragging to open.\n */\n onSwipeableOpenStartDrag?: (\n direction: SwipeDirection.LEFT | SwipeDirection.RIGHT\n ) => void;\n\n /**\n * Called when action panel starts being shown on dragging to close.\n */\n onSwipeableCloseStartDrag?: (\n direction: SwipeDirection.LEFT | SwipeDirection.RIGHT\n ) => void;\n\n /**\n * `progress`: Equals `0` when `swipeable` is closed, `1` when `swipeable` is opened.\n * - When the element overshoots it's opened position the value tends towards `Infinity`.\n * - Goes back to `1` when `swipeable` is released.\n *\n * `translation`: a horizontal offset of the `swipeable` relative to its closed position.\\\n * `swipeableMethods`: provides an object exposing methods for controlling the `swipeable`.\n *\n * To support `rtl` flexbox layouts use `flexDirection` styling.\n * */\n renderLeftActions?: (\n progress: SharedValue<number>,\n translation: SharedValue<number>,\n swipeableMethods: SwipeableMethods\n ) => React.ReactNode;\n\n /**\n * `progress`: Equals `0` when `swipeable` is closed, `1` when `swipeable` is opened.\n * - When the element overshoots it's opened position the value tends towards `Infinity`.\n * - Goes back to `1` when `swipeable` is released.\n *\n * `translation`: a horizontal offset of the `swipeable` relative to its closed position.\\\n * `swipeableMethods`: provides an object exposing methods for controlling the `swipeable`.\n *\n * To support `rtl` flexbox layouts use `flexDirection` styling.\n * */\n renderRightActions?: (\n progress: SharedValue<number>,\n translation: SharedValue<number>,\n swipeableMethods: SwipeableMethods\n ) => React.ReactNode;\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 /**\n * A gesture object or an array of gesture objects containing the configuration and callbacks to be\n * used with the swipeable's gesture handler.\n */\n simultaneousWithExternalGesture?:\n | Exclude<GestureRef, number>\n | Exclude<GestureRef, number>[];\n}\n\nexport interface SwipeableMethods {\n close: () => void;\n openLeft: () => void;\n openRight: () => void;\n reset: () => void;\n}\n\nconst Swipeable = forwardRef<SwipeableMethods, SwipeableProps>(\n function Swipeable(\n props: SwipeableProps,\n ref: ForwardedRef<SwipeableMethods>\n ) {\n const defaultProps = {\n friction: 1,\n overshootFriction: 1,\n dragOffset: 10,\n enableTrackpadTwoFingerGesture: false,\n };\n\n const {\n leftThreshold,\n rightThreshold,\n enabled,\n containerStyle,\n childrenContainerStyle,\n animationOptions,\n overshootLeft,\n overshootRight,\n testID,\n children,\n enableTrackpadTwoFingerGesture = defaultProps.enableTrackpadTwoFingerGesture,\n dragOffsetFromLeftEdge = defaultProps.dragOffset,\n dragOffsetFromRightEdge = defaultProps.dragOffset,\n friction = defaultProps.friction,\n overshootFriction = defaultProps.overshootFriction,\n onSwipeableOpenStartDrag,\n onSwipeableCloseStartDrag,\n onSwipeableWillOpen,\n onSwipeableWillClose,\n onSwipeableOpen,\n onSwipeableClose,\n renderLeftActions,\n renderRightActions,\n simultaneousWithExternalGesture,\n ...remainingProps\n } = props;\n\n const rowState = useSharedValue<number>(0);\n\n const userDrag = useSharedValue<number>(0);\n\n const appliedTranslation = useSharedValue<number>(0);\n\n const rowWidth = useSharedValue<number>(0);\n const leftWidth = useSharedValue<number>(0);\n const rightWidth = useSharedValue<number>(0);\n\n const showLeftProgress = useSharedValue<number>(0);\n const showRightProgress = useSharedValue<number>(0);\n\n const updateAnimatedEvent = useCallback(() => {\n 'worklet';\n\n const shouldOvershootLeft = overshootLeft ?? leftWidth.value > 0;\n const shouldOvershootRight = overshootRight ?? rightWidth.value > 0;\n\n const startOffset =\n rowState.value === 1\n ? leftWidth.value\n : rowState.value === -1\n ? -rightWidth.value\n : 0;\n\n const offsetDrag = userDrag.value / friction + startOffset;\n\n appliedTranslation.value = interpolate(\n offsetDrag,\n [\n -rightWidth.value - 1,\n -rightWidth.value,\n leftWidth.value,\n leftWidth.value + 1,\n ],\n [\n -rightWidth.value -\n (shouldOvershootRight ? 1 / overshootFriction : 0),\n -rightWidth.value,\n leftWidth.value,\n leftWidth.value + (shouldOvershootLeft ? 1 / overshootFriction : 0),\n ]\n );\n\n showLeftProgress.value =\n leftWidth.value > 0\n ? interpolate(\n appliedTranslation.value,\n [-1, 0, leftWidth.value],\n [0, 0, 1]\n )\n : 0;\n\n showRightProgress.value =\n rightWidth.value > 0\n ? interpolate(\n appliedTranslation.value,\n [-rightWidth.value, 0, 1],\n [1, 0, 0]\n )\n : 0;\n }, [\n appliedTranslation,\n friction,\n leftWidth,\n overshootFriction,\n rightWidth,\n rowState,\n showLeftProgress,\n showRightProgress,\n userDrag,\n overshootLeft,\n overshootRight,\n ]);\n\n const dispatchImmediateEvents = useCallback(\n (fromValue: number, toValue: number) => {\n 'worklet';\n if (toValue > 0 && onSwipeableWillOpen) {\n runOnJS(onSwipeableWillOpen)(SwipeDirection.RIGHT);\n } else if (toValue < 0 && onSwipeableWillOpen) {\n runOnJS(onSwipeableWillOpen)(SwipeDirection.LEFT);\n } else if (onSwipeableWillClose) {\n runOnJS(onSwipeableWillClose)(\n fromValue > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT\n );\n }\n },\n [onSwipeableWillClose, onSwipeableWillOpen]\n );\n\n const dispatchEndEvents = useCallback(\n (fromValue: number, toValue: number) => {\n 'worklet';\n if (toValue > 0 && onSwipeableOpen) {\n runOnJS(onSwipeableOpen)(SwipeDirection.RIGHT);\n } else if (toValue < 0 && onSwipeableOpen) {\n runOnJS(onSwipeableOpen)(SwipeDirection.LEFT);\n } else if (onSwipeableClose) {\n runOnJS(onSwipeableClose)(\n fromValue > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT\n );\n }\n },\n [onSwipeableClose, onSwipeableOpen]\n );\n\n const animateRow: (toValue: number, velocityX?: number) => void =\n useCallback(\n (toValue: number, velocityX?: number) => {\n 'worklet';\n\n const translationSpringConfig = {\n mass: 2,\n damping: 1000,\n stiffness: 700,\n velocity: velocityX,\n overshootClamping: true,\n reduceMotion: ReduceMotion.System,\n ...animationOptions,\n };\n\n const isClosing = toValue === 0;\n const moveToRight = isClosing ? rowState.value < 0 : toValue > 0;\n\n const usedWidth = isClosing\n ? moveToRight\n ? rightWidth.value\n : leftWidth.value\n : moveToRight\n ? leftWidth.value\n : rightWidth.value;\n\n const progressSpringConfig = {\n ...translationSpringConfig,\n restDisplacementThreshold: 0.01,\n restSpeedThreshold: 0.01,\n velocity:\n velocityX &&\n interpolate(velocityX, [-usedWidth, usedWidth], [-1, 1]),\n };\n\n const frozenRowState = rowState.value;\n\n appliedTranslation.value = withSpring(\n toValue,\n translationSpringConfig,\n (isFinished) => {\n if (isFinished) {\n dispatchEndEvents(frozenRowState, toValue);\n }\n }\n );\n\n const progressTarget = toValue === 0 ? 0 : 1 * Math.sign(toValue);\n\n showLeftProgress.value = withSpring(\n Math.max(progressTarget, 0),\n progressSpringConfig\n );\n\n showRightProgress.value = withSpring(\n Math.max(-progressTarget, 0),\n progressSpringConfig\n );\n\n dispatchImmediateEvents(frozenRowState, toValue);\n\n rowState.value = Math.sign(toValue);\n },\n [\n rowState,\n animationOptions,\n appliedTranslation,\n showLeftProgress,\n leftWidth,\n showRightProgress,\n rightWidth,\n dispatchImmediateEvents,\n dispatchEndEvents,\n ]\n );\n\n const leftLayoutRef = useAnimatedRef();\n const leftWrapperLayoutRef = useAnimatedRef();\n const rightLayoutRef = useAnimatedRef();\n\n const updateElementWidths = useCallback(() => {\n 'worklet';\n const leftLayout = measure(leftLayoutRef);\n const leftWrapperLayout = measure(leftWrapperLayoutRef);\n const rightLayout = measure(rightLayoutRef);\n leftWidth.value =\n (leftLayout?.pageX ?? 0) - (leftWrapperLayout?.pageX ?? 0);\n\n rightWidth.value =\n rowWidth.value -\n (rightLayout?.pageX ?? rowWidth.value) +\n (leftWrapperLayout?.pageX ?? 0);\n }, [\n leftLayoutRef,\n leftWrapperLayoutRef,\n rightLayoutRef,\n leftWidth,\n rightWidth,\n rowWidth,\n ]);\n\n const swipeableMethods = useMemo<SwipeableMethods>(\n () => ({\n close() {\n 'worklet';\n if (_WORKLET) {\n animateRow(0);\n return;\n }\n runOnUI(() => {\n animateRow(0);\n })();\n },\n openLeft() {\n 'worklet';\n if (_WORKLET) {\n updateElementWidths();\n animateRow(leftWidth.value);\n return;\n }\n runOnUI(() => {\n updateElementWidths();\n animateRow(leftWidth.value);\n })();\n },\n openRight() {\n 'worklet';\n if (_WORKLET) {\n updateElementWidths();\n animateRow(-rightWidth.value);\n return;\n }\n runOnUI(() => {\n updateElementWidths();\n animateRow(-rightWidth.value);\n })();\n },\n reset() {\n 'worklet';\n userDrag.value = 0;\n showLeftProgress.value = 0;\n appliedTranslation.value = 0;\n rowState.value = 0;\n },\n }),\n [\n animateRow,\n updateElementWidths,\n leftWidth,\n rightWidth,\n userDrag,\n showLeftProgress,\n appliedTranslation,\n rowState,\n ]\n );\n\n const onRowLayout = useCallback(\n ({ nativeEvent }: LayoutChangeEvent) => {\n rowWidth.value = nativeEvent.layout.width;\n },\n [rowWidth]\n );\n\n // As stated in `Dimensions.get` docstring, this function should be called on every render\n // since dimensions may change (e.g. orientation change)\n\n const leftActionAnimation = useAnimatedStyle(() => {\n return {\n opacity: showLeftProgress.value === 0 ? 0 : 1,\n };\n });\n\n const leftElement = useCallback(\n () => (\n <Animated.View\n ref={leftWrapperLayoutRef}\n style={[styles.leftActions, leftActionAnimation]}>\n {renderLeftActions?.(\n showLeftProgress,\n appliedTranslation,\n swipeableMethods\n )}\n <Animated.View ref={leftLayoutRef} />\n </Animated.View>\n ),\n [\n appliedTranslation,\n leftActionAnimation,\n leftLayoutRef,\n leftWrapperLayoutRef,\n renderLeftActions,\n showLeftProgress,\n swipeableMethods,\n ]\n );\n\n const rightActionAnimation = useAnimatedStyle(() => {\n return {\n opacity: showRightProgress.value === 0 ? 0 : 1,\n };\n });\n\n const rightElement = useCallback(\n () => (\n <Animated.View style={[styles.rightActions, rightActionAnimation]}>\n {renderRightActions?.(\n showRightProgress,\n appliedTranslation,\n swipeableMethods\n )}\n <Animated.View ref={rightLayoutRef} />\n </Animated.View>\n ),\n [\n appliedTranslation,\n renderRightActions,\n rightActionAnimation,\n rightLayoutRef,\n showRightProgress,\n swipeableMethods,\n ]\n );\n\n const handleRelease = useCallback(\n (event: GestureStateChangeEvent<PanGestureHandlerEventPayload>) => {\n 'worklet';\n const { velocityX } = event;\n userDrag.value = event.translationX;\n\n const leftThresholdProp = leftThreshold ?? leftWidth.value / 2;\n const rightThresholdProp = rightThreshold ?? rightWidth.value / 2;\n\n const translationX =\n (userDrag.value + DRAG_TOSS * velocityX) / friction;\n\n let toValue = 0;\n\n if (rowState.value === 0) {\n if (translationX > leftThresholdProp) {\n toValue = leftWidth.value;\n } else if (translationX < -rightThresholdProp) {\n toValue = -rightWidth.value;\n }\n } else if (rowState.value === 1) {\n // Swiped to left\n if (translationX > -leftThresholdProp) {\n toValue = leftWidth.value;\n }\n } else {\n // Swiped to right\n if (translationX < rightThresholdProp) {\n toValue = -rightWidth.value;\n }\n }\n\n animateRow(toValue, velocityX / friction);\n },\n [\n animateRow,\n friction,\n leftThreshold,\n leftWidth,\n rightThreshold,\n rightWidth,\n rowState,\n userDrag,\n ]\n );\n\n const close = useCallback(() => {\n 'worklet';\n animateRow(0);\n }, [animateRow]);\n\n const dragStarted = useSharedValue<boolean>(false);\n\n const tapGesture = useMemo(() => {\n const tap = Gesture.Tap()\n .shouldCancelWhenOutside(true)\n .onStart(() => {\n if (rowState.value !== 0) {\n close();\n }\n });\n\n if (!simultaneousWithExternalGesture) {\n return tap;\n }\n\n if (Array.isArray(simultaneousWithExternalGesture)) {\n tap.simultaneousWithExternalGesture(...simultaneousWithExternalGesture);\n } else {\n tap.simultaneousWithExternalGesture(simultaneousWithExternalGesture);\n }\n\n return tap;\n }, [close, rowState, simultaneousWithExternalGesture]);\n\n const panGesture = useMemo(() => {\n const pan = Gesture.Pan()\n .enabled(enabled !== false)\n .enableTrackpadTwoFingerGesture(enableTrackpadTwoFingerGesture)\n .activeOffsetX([-dragOffsetFromRightEdge, dragOffsetFromLeftEdge])\n .onStart(updateElementWidths)\n .onUpdate(\n (event: GestureUpdateEvent<PanGestureHandlerEventPayload>) => {\n userDrag.value = event.translationX;\n\n const direction =\n rowState.value === -1\n ? SwipeDirection.RIGHT\n : rowState.value === 1\n ? SwipeDirection.LEFT\n : event.translationX > 0\n ? SwipeDirection.RIGHT\n : SwipeDirection.LEFT;\n\n if (!dragStarted.value) {\n dragStarted.value = true;\n if (rowState.value === 0 && onSwipeableOpenStartDrag) {\n runOnJS(onSwipeableOpenStartDrag)(direction);\n } else if (onSwipeableCloseStartDrag) {\n runOnJS(onSwipeableCloseStartDrag)(direction);\n }\n }\n\n updateAnimatedEvent();\n }\n )\n .onEnd(\n (event: GestureStateChangeEvent<PanGestureHandlerEventPayload>) => {\n handleRelease(event);\n }\n )\n .onFinalize(() => {\n dragStarted.value = false;\n });\n\n if (!simultaneousWithExternalGesture) {\n return pan;\n }\n\n if (Array.isArray(simultaneousWithExternalGesture)) {\n pan.simultaneousWithExternalGesture(...simultaneousWithExternalGesture);\n } else {\n pan.simultaneousWithExternalGesture(simultaneousWithExternalGesture);\n }\n\n return pan;\n }, [\n dragOffsetFromLeftEdge,\n dragOffsetFromRightEdge,\n dragStarted,\n enableTrackpadTwoFingerGesture,\n enabled,\n handleRelease,\n onSwipeableCloseStartDrag,\n onSwipeableOpenStartDrag,\n rowState,\n updateAnimatedEvent,\n updateElementWidths,\n userDrag,\n simultaneousWithExternalGesture,\n ]);\n\n useImperativeHandle(ref, () => swipeableMethods, [swipeableMethods]);\n\n const animatedStyle = useAnimatedStyle(\n () => ({\n transform: [{ translateX: appliedTranslation.value }],\n pointerEvents: rowState.value === 0 ? 'auto' : 'box-only',\n }),\n [appliedTranslation, rowState]\n );\n\n const swipeableComponent = (\n <GestureDetector gesture={panGesture} touchAction=\"pan-y\">\n <Animated.View\n {...remainingProps}\n onLayout={onRowLayout}\n style={[styles.container, containerStyle]}>\n {leftElement()}\n {rightElement()}\n <GestureDetector gesture={tapGesture} touchAction=\"pan-y\">\n <Animated.View style={[animatedStyle, childrenContainerStyle]}>\n {children}\n </Animated.View>\n </GestureDetector>\n </Animated.View>\n </GestureDetector>\n );\n\n return testID ? (\n <View testID={testID}>{swipeableComponent}</View>\n ) : (\n swipeableComponent\n );\n }\n);\n\nexport default Swipeable;\nexport type SwipeableRef = ForwardedRef<SwipeableMethods>;\n\nconst styles = StyleSheet.create({\n container: {\n overflow: 'hidden',\n },\n leftActions: {\n ...StyleSheet.absoluteFillObject,\n flexDirection: I18nManager.isRTL ? 'row-reverse' : 'row',\n overflow: 'hidden',\n },\n rightActions: {\n ...StyleSheet.absoluteFillObject,\n flexDirection: I18nManager.isRTL ? 'row' : 'row-reverse',\n overflow: 'hidden',\n },\n});\n"],"mappings":";;;;;;AAIA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAQA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAF,OAAA;AAOA,IAAAG,sBAAA,GAAAJ,uBAAA,CAAAC,OAAA;AAYA,IAAAI,YAAA,GAAAJ,OAAA;AAOsB,SAAAK,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAA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sB;EAAE,GAC3DK,QACY,CACA,CACJ,CACA,CAClB;EAED,OAAOD,MAAM,gBACXpD,MAAA,CAAAa,OAAA,CAAAmI,aAAA,CAAC1I,YAAA,CAAA2I,IAAI;IAAC7F,MAAM,EAAEA;EAAO,GAAE+H,kBAAyB,CAAC,GAEjDA,kBACD;AACH,CACF,CAAC;AAAC,IAAAM,QAAA,GAAAC,OAAA,CAAA7K,OAAA,GAEasB,SAAS;AAGxB,MAAMgH,MAAM,GAAGwC,uBAAU,CAACC,MAAM,CAAC;EAC/BJ,SAAS,EAAE;IACTK,QAAQ,EAAE;EACZ,CAAC;EACDzC,WAAW,EAAE;IACX,GAAGuC,uBAAU,CAACG,kBAAkB;IAChCC,aAAa,EAAEC,wBAAW,CAACC,KAAK,GAAG,aAAa,GAAG,KAAK;IACxDJ,QAAQ,EAAE;EACZ,CAAC;EACDtC,YAAY,EAAE;IACZ,GAAGoC,uBAAU,CAACG,kBAAkB;IAChCC,aAAa,EAAEC,wBAAW,CAACC,KAAK,GAAG,KAAK,GAAG,aAAa;IACxDJ,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"sources":["ReanimatedSwipeable.tsx"],"names":["DRAG_TOSS","SwipeDirection","Swipeable","props","ref","defaultProps","friction","overshootFriction","dragOffset","enableTrackpadTwoFingerGesture","leftThreshold","rightThreshold","enabled","containerStyle","childrenContainerStyle","animationOptions","overshootLeft","overshootRight","testID","children","dragOffsetFromLeftEdge","dragOffsetFromRightEdge","onSwipeableOpenStartDrag","onSwipeableCloseStartDrag","onSwipeableWillOpen","onSwipeableWillClose","onSwipeableOpen","onSwipeableClose","renderLeftActions","renderRightActions","simultaneousWithExternalGesture","remainingProps","rowState","userDrag","appliedTranslation","rowWidth","leftWidth","rightWidth","showLeftProgress","showRightProgress","updateAnimatedEvent","shouldOvershootLeft","value","shouldOvershootRight","startOffset","offsetDrag","dispatchImmediateEvents","fromValue","toValue","RIGHT","LEFT","dispatchEndEvents","animateRow","velocityX","translationSpringConfig","mass","damping","stiffness","velocity","overshootClamping","reduceMotion","ReduceMotion","System","isClosing","moveToRight","usedWidth","progressSpringConfig","restDisplacementThreshold","restSpeedThreshold","frozenRowState","isFinished","progressTarget","Math","sign","max","leftLayoutRef","leftWrapperLayoutRef","rightLayoutRef","updateElementWidths","leftLayout","leftWrapperLayout","rightLayout","pageX","swipeableMethods","close","_WORKLET","openLeft","openRight","reset","onRowLayout","nativeEvent","layout","width","leftActionAnimation","opacity","leftElement","styles","leftActions","rightActionAnimation","rightElement","rightActions","handleRelease","event","translationX","leftThresholdProp","rightThresholdProp","dragStarted","tapGesture","tap","Gesture","Tap","shouldCancelWhenOutside","onStart","Array","isArray","panGesture","pan","Pan","activeOffsetX","onUpdate","direction","onEnd","onFinalize","animatedStyle","transform","translateX","pointerEvents","swipeableComponent","container","StyleSheet","create","overflow","absoluteFillObject","flexDirection","I18nManager","isRTL"],"mappings":";;;;;;;AAIA;;AAQA;;AACA;;AAOA;;AAYA;;;;;;;;AASA,MAAMA,SAAS,GAAG,IAAlB;IAOKC,c;;WAAAA,c;AAAAA,EAAAA,c;AAAAA,EAAAA,c;GAAAA,c,KAAAA,c;;AA8KL,MAAMC,SAAS,gBAAG,uBAChB,SAASA,SAAT,CACEC,KADF,EAEEC,GAFF,EAGE;AACA,QAAMC,YAAY,GAAG;AACnBC,IAAAA,QAAQ,EAAE,CADS;AAEnBC,IAAAA,iBAAiB,EAAE,CAFA;AAGnBC,IAAAA,UAAU,EAAE,EAHO;AAInBC,IAAAA,8BAA8B,EAAE;AAJb,GAArB;AAOA,QAAM;AACJC,IAAAA,aADI;AAEJC,IAAAA,cAFI;AAGJC,IAAAA,OAHI;AAIJC,IAAAA,cAJI;AAKJC,IAAAA,sBALI;AAMJC,IAAAA,gBANI;AAOJC,IAAAA,aAPI;AAQJC,IAAAA,cARI;AASJC,IAAAA,MATI;AAUJC,IAAAA,QAVI;AAWJV,IAAAA,8BAA8B,GAAGJ,YAAY,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wBAAWC,MAAX,CAAkB;AAC/BF,EAAAA,SAAS,EAAE;AACTG,IAAAA,QAAQ,EAAE;AADD,GADoB;AAI/BlC,EAAAA,WAAW,EAAE,EACX,GAAGgC,wBAAWG,kBADH;AAEXC,IAAAA,aAAa,EAAEC,yBAAYC,KAAZ,GAAoB,aAApB,GAAoC,KAFxC;AAGXJ,IAAAA,QAAQ,EAAE;AAHC,GAJkB;AAS/B/B,EAAAA,YAAY,EAAE,EACZ,GAAG6B,wBAAWG,kBADF;AAEZC,IAAAA,aAAa,EAAEC,yBAAYC,KAAZ,GAAoB,KAApB,GAA4B,aAF/B;AAGZJ,IAAAA,QAAQ,EAAE;AAHE;AATiB,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 React, {\n ForwardedRef,\n forwardRef,\n useCallback,\n useImperativeHandle,\n useMemo,\n} from 'react';\nimport { GestureRef } from '../handlers/gestures/gesture';\nimport { GestureObjects as Gesture } from '../handlers/gestures/gestureObjects';\nimport { GestureDetector } from '../handlers/gestures/GestureDetector';\nimport {\n GestureStateChangeEvent,\n GestureUpdateEvent,\n} from '../handlers/gestureHandlerCommon';\nimport type { PanGestureHandlerProps } from '../handlers/PanGestureHandler';\nimport type { PanGestureHandlerEventPayload } from '../handlers/GestureHandlerEventPayload';\nimport Animated, {\n ReduceMotion,\n SharedValue,\n interpolate,\n measure,\n runOnJS,\n runOnUI,\n useAnimatedRef,\n useAnimatedStyle,\n useSharedValue,\n withSpring,\n} from 'react-native-reanimated';\nimport {\n I18nManager,\n LayoutChangeEvent,\n StyleProp,\n StyleSheet,\n View,\n ViewStyle,\n} from 'react-native';\n\nconst DRAG_TOSS = 0.05;\n\ntype SwipeableExcludes = Exclude<\n keyof PanGestureHandlerProps,\n 'onGestureEvent' | 'onHandlerStateChange'\n>;\n\nenum SwipeDirection {\n LEFT = 'left',\n RIGHT = 'right',\n}\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 * Called when action panel gets open (either right or left).\n */\n onSwipeableOpen?: (\n direction: SwipeDirection.LEFT | SwipeDirection.RIGHT\n ) => void;\n\n /**\n * Called when action panel is closed.\n */\n onSwipeableClose?: (\n direction: SwipeDirection.LEFT | SwipeDirection.RIGHT\n ) => void;\n\n /**\n * Called when action panel starts animating on open (either right or left).\n */\n onSwipeableWillOpen?: (\n direction: SwipeDirection.LEFT | SwipeDirection.RIGHT\n ) => void;\n\n /**\n * Called when action panel starts animating on close.\n */\n onSwipeableWillClose?: (\n direction: SwipeDirection.LEFT | SwipeDirection.RIGHT\n ) => void;\n\n /**\n * Called when action panel starts being shown on dragging to open.\n */\n onSwipeableOpenStartDrag?: (\n direction: SwipeDirection.LEFT | SwipeDirection.RIGHT\n ) => void;\n\n /**\n * Called when action panel starts being shown on dragging to close.\n */\n onSwipeableCloseStartDrag?: (\n direction: SwipeDirection.LEFT | SwipeDirection.RIGHT\n ) => void;\n\n /**\n * `progress`: Equals `0` when `swipeable` is closed, `1` when `swipeable` is opened.\n * - When the element overshoots it's opened position the value tends towards `Infinity`.\n * - Goes back to `1` when `swipeable` is released.\n *\n * `translation`: a horizontal offset of the `swipeable` relative to its closed position.\\\n * `swipeableMethods`: provides an object exposing methods for controlling the `swipeable`.\n *\n * To support `rtl` flexbox layouts use `flexDirection` styling.\n * */\n renderLeftActions?: (\n progress: SharedValue<number>,\n translation: SharedValue<number>,\n swipeableMethods: SwipeableMethods\n ) => React.ReactNode;\n\n /**\n * `progress`: Equals `0` when `swipeable` is closed, `1` when `swipeable` is opened.\n * - When the element overshoots it's opened position the value tends towards `Infinity`.\n * - Goes back to `1` when `swipeable` is released.\n *\n * `translation`: a horizontal offset of the `swipeable` relative to its closed position.\\\n * `swipeableMethods`: provides an object exposing methods for controlling the `swipeable`.\n *\n * To support `rtl` flexbox layouts use `flexDirection` styling.\n * */\n renderRightActions?: (\n progress: SharedValue<number>,\n translation: SharedValue<number>,\n swipeableMethods: SwipeableMethods\n ) => React.ReactNode;\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 /**\n * A gesture object or an array of gesture objects containing the configuration and callbacks to be\n * used with the swipeable's gesture handler.\n */\n simultaneousWithExternalGesture?:\n | Exclude<GestureRef, number>\n | Exclude<GestureRef, number>[];\n}\n\nexport interface SwipeableMethods {\n close: () => void;\n openLeft: () => void;\n openRight: () => void;\n reset: () => void;\n}\n\nconst Swipeable = forwardRef<SwipeableMethods, SwipeableProps>(\n function Swipeable(\n props: SwipeableProps,\n ref: ForwardedRef<SwipeableMethods>\n ) {\n const defaultProps = {\n friction: 1,\n overshootFriction: 1,\n dragOffset: 10,\n enableTrackpadTwoFingerGesture: false,\n };\n\n const {\n leftThreshold,\n rightThreshold,\n enabled,\n containerStyle,\n childrenContainerStyle,\n animationOptions,\n overshootLeft,\n overshootRight,\n testID,\n children,\n enableTrackpadTwoFingerGesture = defaultProps.enableTrackpadTwoFingerGesture,\n dragOffsetFromLeftEdge = defaultProps.dragOffset,\n dragOffsetFromRightEdge = defaultProps.dragOffset,\n friction = defaultProps.friction,\n overshootFriction = defaultProps.overshootFriction,\n onSwipeableOpenStartDrag,\n onSwipeableCloseStartDrag,\n onSwipeableWillOpen,\n onSwipeableWillClose,\n onSwipeableOpen,\n onSwipeableClose,\n renderLeftActions,\n renderRightActions,\n simultaneousWithExternalGesture,\n ...remainingProps\n } = props;\n\n const rowState = useSharedValue<number>(0);\n\n const userDrag = useSharedValue<number>(0);\n\n const appliedTranslation = useSharedValue<number>(0);\n\n const rowWidth = useSharedValue<number>(0);\n const leftWidth = useSharedValue<number>(0);\n const rightWidth = useSharedValue<number>(0);\n\n const showLeftProgress = useSharedValue<number>(0);\n const showRightProgress = useSharedValue<number>(0);\n\n const updateAnimatedEvent = useCallback(() => {\n 'worklet';\n\n const shouldOvershootLeft = overshootLeft ?? leftWidth.value > 0;\n const shouldOvershootRight = overshootRight ?? rightWidth.value > 0;\n\n const startOffset =\n rowState.value === 1\n ? leftWidth.value\n : rowState.value === -1\n ? -rightWidth.value\n : 0;\n\n const offsetDrag = userDrag.value / friction + startOffset;\n\n appliedTranslation.value = interpolate(\n offsetDrag,\n [\n -rightWidth.value - 1,\n -rightWidth.value,\n leftWidth.value,\n leftWidth.value + 1,\n ],\n [\n -rightWidth.value -\n (shouldOvershootRight ? 1 / overshootFriction : 0),\n -rightWidth.value,\n leftWidth.value,\n leftWidth.value + (shouldOvershootLeft ? 1 / overshootFriction : 0),\n ]\n );\n\n showLeftProgress.value =\n leftWidth.value > 0\n ? interpolate(\n appliedTranslation.value,\n [-1, 0, leftWidth.value],\n [0, 0, 1]\n )\n : 0;\n\n showRightProgress.value =\n rightWidth.value > 0\n ? interpolate(\n appliedTranslation.value,\n [-rightWidth.value, 0, 1],\n [1, 0, 0]\n )\n : 0;\n }, [\n appliedTranslation,\n friction,\n leftWidth,\n overshootFriction,\n rightWidth,\n rowState,\n showLeftProgress,\n showRightProgress,\n userDrag,\n overshootLeft,\n overshootRight,\n ]);\n\n const dispatchImmediateEvents = useCallback(\n (fromValue: number, toValue: number) => {\n 'worklet';\n if (toValue > 0 && onSwipeableWillOpen) {\n runOnJS(onSwipeableWillOpen)(SwipeDirection.RIGHT);\n } else if (toValue < 0 && onSwipeableWillOpen) {\n runOnJS(onSwipeableWillOpen)(SwipeDirection.LEFT);\n } else if (onSwipeableWillClose) {\n runOnJS(onSwipeableWillClose)(\n fromValue > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT\n );\n }\n },\n [onSwipeableWillClose, onSwipeableWillOpen]\n );\n\n const dispatchEndEvents = useCallback(\n (fromValue: number, toValue: number) => {\n 'worklet';\n if (toValue > 0 && onSwipeableOpen) {\n runOnJS(onSwipeableOpen)(SwipeDirection.RIGHT);\n } else if (toValue < 0 && onSwipeableOpen) {\n runOnJS(onSwipeableOpen)(SwipeDirection.LEFT);\n } else if (onSwipeableClose) {\n runOnJS(onSwipeableClose)(\n fromValue > 0 ? SwipeDirection.LEFT : SwipeDirection.RIGHT\n );\n }\n },\n [onSwipeableClose, onSwipeableOpen]\n );\n\n const animateRow: (toValue: number, velocityX?: number) => void =\n useCallback(\n (toValue: number, velocityX?: number) => {\n 'worklet';\n\n const translationSpringConfig = {\n mass: 2,\n damping: 1000,\n stiffness: 700,\n velocity: velocityX,\n overshootClamping: true,\n reduceMotion: ReduceMotion.System,\n ...animationOptions,\n };\n\n const isClosing = toValue === 0;\n const moveToRight = isClosing ? rowState.value < 0 : toValue > 0;\n\n const usedWidth = isClosing\n ? moveToRight\n ? rightWidth.value\n : leftWidth.value\n : moveToRight\n ? leftWidth.value\n : rightWidth.value;\n\n const progressSpringConfig = {\n ...translationSpringConfig,\n restDisplacementThreshold: 0.01,\n restSpeedThreshold: 0.01,\n velocity:\n velocityX &&\n interpolate(velocityX, [-usedWidth, usedWidth], [-1, 1]),\n };\n\n const frozenRowState = rowState.value;\n\n appliedTranslation.value = withSpring(\n toValue,\n translationSpringConfig,\n (isFinished) => {\n if (isFinished) {\n dispatchEndEvents(frozenRowState, toValue);\n }\n }\n );\n\n const progressTarget = toValue === 0 ? 0 : 1 * Math.sign(toValue);\n\n showLeftProgress.value = withSpring(\n Math.max(progressTarget, 0),\n progressSpringConfig\n );\n\n showRightProgress.value = withSpring(\n Math.max(-progressTarget, 0),\n progressSpringConfig\n );\n\n dispatchImmediateEvents(frozenRowState, toValue);\n\n rowState.value = Math.sign(toValue);\n },\n [\n rowState,\n animationOptions,\n appliedTranslation,\n showLeftProgress,\n leftWidth,\n showRightProgress,\n rightWidth,\n dispatchImmediateEvents,\n dispatchEndEvents,\n ]\n );\n\n const leftLayoutRef = useAnimatedRef();\n const leftWrapperLayoutRef = useAnimatedRef();\n const rightLayoutRef = useAnimatedRef();\n\n const updateElementWidths = useCallback(() => {\n 'worklet';\n const leftLayout = measure(leftLayoutRef);\n const leftWrapperLayout = measure(leftWrapperLayoutRef);\n const rightLayout = measure(rightLayoutRef);\n leftWidth.value =\n (leftLayout?.pageX ?? 0) - (leftWrapperLayout?.pageX ?? 0);\n\n rightWidth.value =\n rowWidth.value -\n (rightLayout?.pageX ?? rowWidth.value) +\n (leftWrapperLayout?.pageX ?? 0);\n }, [\n leftLayoutRef,\n leftWrapperLayoutRef,\n rightLayoutRef,\n leftWidth,\n rightWidth,\n rowWidth,\n ]);\n\n const swipeableMethods = useMemo<SwipeableMethods>(\n () => ({\n close() {\n 'worklet';\n if (_WORKLET) {\n animateRow(0);\n return;\n }\n runOnUI(() => {\n animateRow(0);\n })();\n },\n openLeft() {\n 'worklet';\n if (_WORKLET) {\n updateElementWidths();\n animateRow(leftWidth.value);\n return;\n }\n runOnUI(() => {\n updateElementWidths();\n animateRow(leftWidth.value);\n })();\n },\n openRight() {\n 'worklet';\n if (_WORKLET) {\n updateElementWidths();\n animateRow(-rightWidth.value);\n return;\n }\n runOnUI(() => {\n updateElementWidths();\n animateRow(-rightWidth.value);\n })();\n },\n reset() {\n 'worklet';\n userDrag.value = 0;\n showLeftProgress.value = 0;\n appliedTranslation.value = 0;\n rowState.value = 0;\n },\n }),\n [\n animateRow,\n updateElementWidths,\n leftWidth,\n rightWidth,\n userDrag,\n showLeftProgress,\n appliedTranslation,\n rowState,\n ]\n );\n\n const onRowLayout = useCallback(\n ({ nativeEvent }: LayoutChangeEvent) => {\n rowWidth.value = nativeEvent.layout.width;\n },\n [rowWidth]\n );\n\n // As stated in `Dimensions.get` docstring, this function should be called on every render\n // since dimensions may change (e.g. orientation change)\n\n const leftActionAnimation = useAnimatedStyle(() => {\n return {\n opacity: showLeftProgress.value === 0 ? 0 : 1,\n };\n });\n\n const leftElement = useCallback(\n () => (\n <Animated.View\n ref={leftWrapperLayoutRef}\n style={[styles.leftActions, leftActionAnimation]}>\n {renderLeftActions?.(\n showLeftProgress,\n appliedTranslation,\n swipeableMethods\n )}\n <Animated.View ref={leftLayoutRef} />\n </Animated.View>\n ),\n [\n appliedTranslation,\n leftActionAnimation,\n leftLayoutRef,\n leftWrapperLayoutRef,\n renderLeftActions,\n showLeftProgress,\n swipeableMethods,\n ]\n );\n\n const rightActionAnimation = useAnimatedStyle(() => {\n return {\n opacity: showRightProgress.value === 0 ? 0 : 1,\n };\n });\n\n const rightElement = useCallback(\n () => (\n <Animated.View style={[styles.rightActions, rightActionAnimation]}>\n {renderRightActions?.(\n showRightProgress,\n appliedTranslation,\n swipeableMethods\n )}\n <Animated.View ref={rightLayoutRef} />\n </Animated.View>\n ),\n [\n appliedTranslation,\n renderRightActions,\n rightActionAnimation,\n rightLayoutRef,\n showRightProgress,\n swipeableMethods,\n ]\n );\n\n const handleRelease = useCallback(\n (event: GestureStateChangeEvent<PanGestureHandlerEventPayload>) => {\n 'worklet';\n const { velocityX } = event;\n userDrag.value = event.translationX;\n\n const leftThresholdProp = leftThreshold ?? leftWidth.value / 2;\n const rightThresholdProp = rightThreshold ?? rightWidth.value / 2;\n\n const translationX =\n (userDrag.value + DRAG_TOSS * velocityX) / friction;\n\n let toValue = 0;\n\n if (rowState.value === 0) {\n if (translationX > leftThresholdProp) {\n toValue = leftWidth.value;\n } else if (translationX < -rightThresholdProp) {\n toValue = -rightWidth.value;\n }\n } else if (rowState.value === 1) {\n // Swiped to left\n if (translationX > -leftThresholdProp) {\n toValue = leftWidth.value;\n }\n } else {\n // Swiped to right\n if (translationX < rightThresholdProp) {\n toValue = -rightWidth.value;\n }\n }\n\n animateRow(toValue, velocityX / friction);\n },\n [\n animateRow,\n friction,\n leftThreshold,\n leftWidth,\n rightThreshold,\n rightWidth,\n rowState,\n userDrag,\n ]\n );\n\n const close = useCallback(() => {\n 'worklet';\n animateRow(0);\n }, [animateRow]);\n\n const dragStarted = useSharedValue<boolean>(false);\n\n const tapGesture = useMemo(() => {\n const tap = Gesture.Tap()\n .shouldCancelWhenOutside(true)\n .onStart(() => {\n if (rowState.value !== 0) {\n close();\n }\n });\n\n if (!simultaneousWithExternalGesture) {\n return tap;\n }\n\n if (Array.isArray(simultaneousWithExternalGesture)) {\n tap.simultaneousWithExternalGesture(...simultaneousWithExternalGesture);\n } else {\n tap.simultaneousWithExternalGesture(simultaneousWithExternalGesture);\n }\n\n return tap;\n }, [close, rowState, simultaneousWithExternalGesture]);\n\n const panGesture = useMemo(() => {\n const pan = Gesture.Pan()\n .enabled(enabled !== false)\n .enableTrackpadTwoFingerGesture(enableTrackpadTwoFingerGesture)\n .activeOffsetX([-dragOffsetFromRightEdge, dragOffsetFromLeftEdge])\n .onStart(updateElementWidths)\n .onUpdate(\n (event: GestureUpdateEvent<PanGestureHandlerEventPayload>) => {\n userDrag.value = event.translationX;\n\n const direction =\n rowState.value === -1\n ? SwipeDirection.RIGHT\n : rowState.value === 1\n ? SwipeDirection.LEFT\n : event.translationX > 0\n ? SwipeDirection.RIGHT\n : SwipeDirection.LEFT;\n\n if (!dragStarted.value) {\n dragStarted.value = true;\n if (rowState.value === 0 && onSwipeableOpenStartDrag) {\n runOnJS(onSwipeableOpenStartDrag)(direction);\n } else if (onSwipeableCloseStartDrag) {\n runOnJS(onSwipeableCloseStartDrag)(direction);\n }\n }\n\n updateAnimatedEvent();\n }\n )\n .onEnd(\n (event: GestureStateChangeEvent<PanGestureHandlerEventPayload>) => {\n handleRelease(event);\n }\n )\n .onFinalize(() => {\n dragStarted.value = false;\n });\n\n if (!simultaneousWithExternalGesture) {\n return pan;\n }\n\n if (Array.isArray(simultaneousWithExternalGesture)) {\n pan.simultaneousWithExternalGesture(...simultaneousWithExternalGesture);\n } else {\n pan.simultaneousWithExternalGesture(simultaneousWithExternalGesture);\n }\n\n return pan;\n }, [\n dragOffsetFromLeftEdge,\n dragOffsetFromRightEdge,\n dragStarted,\n enableTrackpadTwoFingerGesture,\n enabled,\n handleRelease,\n onSwipeableCloseStartDrag,\n onSwipeableOpenStartDrag,\n rowState,\n updateAnimatedEvent,\n updateElementWidths,\n userDrag,\n simultaneousWithExternalGesture,\n ]);\n\n useImperativeHandle(ref, () => swipeableMethods, [swipeableMethods]);\n\n const animatedStyle = useAnimatedStyle(\n () => ({\n transform: [{ translateX: appliedTranslation.value }],\n pointerEvents: rowState.value === 0 ? 'auto' : 'box-only',\n }),\n [appliedTranslation, rowState]\n );\n\n const swipeableComponent = (\n <GestureDetector gesture={panGesture} touchAction=\"pan-y\">\n <Animated.View\n {...remainingProps}\n onLayout={onRowLayout}\n style={[styles.container, containerStyle]}>\n {leftElement()}\n {rightElement()}\n <GestureDetector gesture={tapGesture} touchAction=\"pan-y\">\n <Animated.View style={[animatedStyle, childrenContainerStyle]}>\n {children}\n </Animated.View>\n </GestureDetector>\n </Animated.View>\n </GestureDetector>\n );\n\n return testID ? (\n <View testID={testID}>{swipeableComponent}</View>\n ) : (\n swipeableComponent\n );\n }\n);\n\nexport default Swipeable;\nexport type SwipeableRef = ForwardedRef<SwipeableMethods>;\n\nconst styles = StyleSheet.create({\n container: {\n overflow: 'hidden',\n },\n leftActions: {\n ...StyleSheet.absoluteFillObject,\n flexDirection: I18nManager.isRTL ? 'row-reverse' : 'row',\n overflow: 'hidden',\n },\n rightActions: {\n ...StyleSheet.absoluteFillObject,\n flexDirection: I18nManager.isRTL ? 'row' : 'row-reverse',\n overflow: 'hidden',\n },\n});\n"]}