react-native-gesture-handler 2.25.0 → 2.26.0

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 (1028) hide show
  1. package/RNGestureHandler.podspec +1 -0
  2. package/android/build.gradle +41 -42
  3. package/android/fabric/src/main/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +1 -1
  4. package/android/gradle.properties +1 -1
  5. package/android/noreanimated/src/main/java/com/swmansion/gesturehandler/ReanimatedEventDispatcher.kt +2 -2
  6. package/android/paper/src/main/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +4 -1
  7. package/android/reanimated/src/main/java/com/swmansion/gesturehandler/ReanimatedEventDispatcher.kt +1 -1
  8. package/android/{package77/src → src}/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt +14 -19
  9. package/android/src/main/java/com/swmansion/gesturehandler/core/FlingGestureHandler.kt +29 -5
  10. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandler.kt +229 -114
  11. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerInteractionController.kt +4 -4
  12. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt +91 -49
  13. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerRegistry.kt +1 -1
  14. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureUtils.kt +13 -4
  15. package/android/src/main/java/com/swmansion/gesturehandler/core/HoverGestureHandler.kt +20 -6
  16. package/android/src/main/java/com/swmansion/gesturehandler/core/LongPressGestureHandler.kt +52 -21
  17. package/android/src/main/java/com/swmansion/gesturehandler/core/ManualGestureHandler.kt +12 -1
  18. package/android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt +65 -35
  19. package/android/src/main/java/com/swmansion/gesturehandler/core/OnTouchEventListener.kt +3 -3
  20. package/android/src/main/java/com/swmansion/gesturehandler/core/PanGestureHandler.kt +187 -92
  21. package/android/src/main/java/com/swmansion/gesturehandler/core/PinchGestureHandler.kt +12 -5
  22. package/android/src/main/java/com/swmansion/gesturehandler/core/PointerEventsConfig.kt +1 -1
  23. package/android/src/main/java/com/swmansion/gesturehandler/core/RotationGestureDetector.kt +3 -1
  24. package/android/src/main/java/com/swmansion/gesturehandler/core/RotationGestureHandler.kt +12 -5
  25. package/android/src/main/java/com/swmansion/gesturehandler/core/StylusData.kt +1 -1
  26. package/android/src/main/java/com/swmansion/gesturehandler/core/TapGestureHandler.kt +55 -33
  27. package/android/src/main/java/com/swmansion/gesturehandler/core/Vector.kt +13 -18
  28. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +27 -21
  29. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEnabledRootView.kt +7 -2
  30. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEvent.kt +13 -12
  31. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEventDispatcher.kt +189 -0
  32. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerFactoryUtil.kt +34 -0
  33. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerInteractionManager.kt +7 -11
  34. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt +29 -590
  35. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRegistry.kt +8 -14
  36. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.kt +26 -16
  37. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootView.kt +15 -12
  38. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootViewManager.kt +2 -4
  39. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerStateChangeEvent.kt +17 -16
  40. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerTouchEvent.kt +6 -4
  41. package/android/src/main/java/com/swmansion/gesturehandler/react/RNViewConfigurationHelper.kt +7 -5
  42. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/FlingGestureHandlerEventDataBuilder.kt +2 -1
  43. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/GestureHandlerEventDataBuilder.kt +1 -1
  44. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/HoverGestureHandlerEventDataBuilder.kt +2 -1
  45. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/LongPressGestureHandlerEventDataBuilder.kt +2 -1
  46. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/ManualGestureHandlerEventDataBuilder.kt +2 -1
  47. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/NativeGestureHandlerEventDataBuilder.kt +2 -1
  48. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/PanGestureHandlerEventDataBuilder.kt +2 -1
  49. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/PinchGestureHandlerEventDataBuilder.kt +2 -1
  50. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/RotationGestureHandlerEventDataBuilder.kt +2 -1
  51. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/TapGestureHandlerEventDataBuilder.kt +2 -1
  52. package/android/src/main/jni/CMakeLists.txt +10 -1
  53. package/android/svg/src/main/java/com/swmansion/gesturehandler/RNSVGHitTester.kt +1 -3
  54. package/apple/RNGestureHandlerButton.mm +6 -2
  55. package/lib/commonjs/ActionType.js +3 -3
  56. package/lib/commonjs/ActionType.js.map +1 -1
  57. package/lib/commonjs/Directions.js +11 -8
  58. package/lib/commonjs/Directions.js.map +1 -1
  59. package/lib/commonjs/EnableNewWebImplementation.js +2 -10
  60. package/lib/commonjs/EnableNewWebImplementation.js.map +1 -1
  61. package/lib/commonjs/GestureHandlerRootViewContext.js +2 -7
  62. package/lib/commonjs/GestureHandlerRootViewContext.js.map +1 -1
  63. package/lib/commonjs/PlatformConstants.js +1 -7
  64. package/lib/commonjs/PlatformConstants.js.map +1 -1
  65. package/lib/commonjs/PlatformConstants.web.js +1 -3
  66. package/lib/commonjs/PlatformConstants.web.js.map +1 -1
  67. package/lib/commonjs/PointerType.js +3 -5
  68. package/lib/commonjs/PointerType.js.map +1 -1
  69. package/lib/commonjs/RNGestureHandlerModule.js +2 -6
  70. package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
  71. package/lib/commonjs/RNGestureHandlerModule.web.js +10 -37
  72. package/lib/commonjs/RNGestureHandlerModule.web.js.map +1 -1
  73. package/lib/commonjs/RNGestureHandlerModule.windows.js +22 -32
  74. package/lib/commonjs/RNGestureHandlerModule.windows.js.map +1 -1
  75. package/lib/commonjs/RNRenderer.js +1 -3
  76. package/lib/commonjs/RNRenderer.js.map +1 -1
  77. package/lib/commonjs/RNRenderer.web.js +1 -2
  78. package/lib/commonjs/RNRenderer.web.js.map +1 -1
  79. package/lib/commonjs/State.js +4 -3
  80. package/lib/commonjs/State.js.map +1 -1
  81. package/lib/commonjs/TouchEventType.js +3 -3
  82. package/lib/commonjs/TouchEventType.js.map +1 -1
  83. package/lib/commonjs/components/DrawerLayout.js +436 -462
  84. package/lib/commonjs/components/DrawerLayout.js.map +1 -1
  85. package/lib/commonjs/components/GestureButtons.js +123 -181
  86. package/lib/commonjs/components/GestureButtons.js.map +1 -1
  87. package/lib/commonjs/components/GestureButtonsProps.js.map +1 -1
  88. package/lib/commonjs/components/GestureComponents.js +36 -45
  89. package/lib/commonjs/components/GestureComponents.js.map +1 -1
  90. package/lib/commonjs/components/GestureComponents.web.js +19 -32
  91. package/lib/commonjs/components/GestureComponents.web.js.map +1 -1
  92. package/lib/commonjs/components/GestureHandlerButton.js +2 -6
  93. package/lib/commonjs/components/GestureHandlerButton.js.map +1 -1
  94. package/lib/commonjs/components/GestureHandlerButton.web.js +6 -14
  95. package/lib/commonjs/components/GestureHandlerButton.web.js.map +1 -1
  96. package/lib/commonjs/components/GestureHandlerRootView.android.js +10 -20
  97. package/lib/commonjs/components/GestureHandlerRootView.android.js.map +1 -1
  98. package/lib/commonjs/components/GestureHandlerRootView.js +10 -19
  99. package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
  100. package/lib/commonjs/components/GestureHandlerRootView.web.js +10 -18
  101. package/lib/commonjs/components/GestureHandlerRootView.web.js.map +1 -1
  102. package/lib/commonjs/components/Pressable/Pressable.js +72 -118
  103. package/lib/commonjs/components/Pressable/Pressable.js.map +1 -1
  104. package/lib/commonjs/components/Pressable/PressableProps.js.map +1 -1
  105. package/lib/commonjs/components/Pressable/index.js +1 -3
  106. package/lib/commonjs/components/Pressable/index.js.map +1 -1
  107. package/lib/commonjs/components/Pressable/utils.js +16 -38
  108. package/lib/commonjs/components/Pressable/utils.js.map +1 -1
  109. package/lib/commonjs/components/ReanimatedDrawerLayout.js +72 -108
  110. package/lib/commonjs/components/ReanimatedDrawerLayout.js.map +1 -1
  111. package/lib/commonjs/components/ReanimatedSwipeable.js +81 -102
  112. package/lib/commonjs/components/ReanimatedSwipeable.js.map +1 -1
  113. package/lib/commonjs/components/Swipeable.js +290 -335
  114. package/lib/commonjs/components/Swipeable.js.map +1 -1
  115. package/lib/commonjs/components/Text.js +23 -34
  116. package/lib/commonjs/components/Text.js.map +1 -1
  117. package/lib/commonjs/components/gestureHandlerRootHOC.js +11 -17
  118. package/lib/commonjs/components/gestureHandlerRootHOC.js.map +1 -1
  119. package/lib/commonjs/components/touchables/ExtraButtonProps.js.map +1 -1
  120. package/lib/commonjs/components/touchables/GenericTouchable.js +95 -140
  121. package/lib/commonjs/components/touchables/GenericTouchable.js.map +1 -1
  122. package/lib/commonjs/components/touchables/GenericTouchableProps.js.map +1 -1
  123. package/lib/commonjs/components/touchables/TouchableHighlight.js +51 -69
  124. package/lib/commonjs/components/touchables/TouchableHighlight.js.map +1 -1
  125. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +38 -56
  126. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  127. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +1 -4
  128. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js.map +1 -1
  129. package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js.map +1 -1
  130. package/lib/commonjs/components/touchables/TouchableOpacity.js +39 -53
  131. package/lib/commonjs/components/touchables/TouchableOpacity.js.map +1 -1
  132. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +11 -15
  133. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  134. package/lib/commonjs/components/touchables/index.js +7 -12
  135. package/lib/commonjs/components/touchables/index.js.map +1 -1
  136. package/lib/commonjs/components/utils.js +17 -0
  137. package/lib/commonjs/components/utils.js.map +1 -0
  138. package/lib/commonjs/findNodeHandle.js +1 -4
  139. package/lib/commonjs/findNodeHandle.js.map +1 -1
  140. package/lib/commonjs/findNodeHandle.web.js +7 -16
  141. package/lib/commonjs/findNodeHandle.web.js.map +1 -1
  142. package/lib/commonjs/getShadowNodeFromRef.js +19 -20
  143. package/lib/commonjs/getShadowNodeFromRef.js.map +1 -1
  144. package/lib/commonjs/getShadowNodeFromRef.web.js +0 -1
  145. package/lib/commonjs/getShadowNodeFromRef.web.js.map +1 -1
  146. package/lib/commonjs/ghQueueMicrotask.js +1 -2
  147. package/lib/commonjs/ghQueueMicrotask.js.map +1 -1
  148. package/lib/commonjs/handlers/FlingGestureHandler.js +9 -11
  149. package/lib/commonjs/handlers/FlingGestureHandler.js.map +1 -1
  150. package/lib/commonjs/handlers/ForceTouchGestureHandler.js +16 -23
  151. package/lib/commonjs/handlers/ForceTouchGestureHandler.js.map +1 -1
  152. package/lib/commonjs/handlers/GestureHandlerEventPayload.js.map +1 -1
  153. package/lib/commonjs/handlers/LongPressGestureHandler.js +9 -11
  154. package/lib/commonjs/handlers/LongPressGestureHandler.js.map +1 -1
  155. package/lib/commonjs/handlers/NativeViewGestureHandler.ts +59 -0
  156. package/lib/commonjs/handlers/PanGestureHandler.js +13 -32
  157. package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -1
  158. package/lib/commonjs/handlers/PinchGestureHandler.js +7 -9
  159. package/lib/commonjs/handlers/PinchGestureHandler.js.map +1 -1
  160. package/lib/commonjs/handlers/PressabilityDebugView.js +0 -1
  161. package/lib/commonjs/handlers/PressabilityDebugView.js.map +1 -1
  162. package/lib/commonjs/handlers/PressabilityDebugView.web.js +0 -1
  163. package/lib/commonjs/handlers/PressabilityDebugView.web.js.map +1 -1
  164. package/lib/commonjs/handlers/RotationGestureHandler.js +7 -9
  165. package/lib/commonjs/handlers/RotationGestureHandler.js.map +1 -1
  166. package/lib/commonjs/handlers/TapGestureHandler.js +9 -11
  167. package/lib/commonjs/handlers/TapGestureHandler.js.map +1 -1
  168. package/lib/commonjs/handlers/createHandler.js +128 -229
  169. package/lib/commonjs/handlers/createHandler.js.map +1 -1
  170. package/lib/commonjs/handlers/createNativeWrapper.js +26 -35
  171. package/lib/commonjs/handlers/createNativeWrapper.js.map +1 -1
  172. package/lib/commonjs/handlers/customDirectEventTypes.js +0 -1
  173. package/lib/commonjs/handlers/customDirectEventTypes.js.map +1 -1
  174. package/lib/commonjs/handlers/customDirectEventTypes.web.js +1 -2
  175. package/lib/commonjs/handlers/customDirectEventTypes.web.js.map +1 -1
  176. package/lib/commonjs/handlers/gestureHandlerCommon.js +9 -10
  177. package/lib/commonjs/handlers/gestureHandlerCommon.js.map +1 -1
  178. package/lib/commonjs/handlers/gestureHandlerTypesCompat.js.map +1 -1
  179. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js +5 -15
  180. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
  181. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js +14 -22
  182. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
  183. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js +9 -29
  184. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
  185. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js +1 -10
  186. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
  187. package/lib/commonjs/handlers/gestures/GestureDetector/index.js +19 -42
  188. package/lib/commonjs/handlers/gestures/GestureDetector/index.js.map +1 -1
  189. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js +0 -3
  190. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -1
  191. package/lib/commonjs/handlers/gestures/GestureDetector/types.js.map +1 -1
  192. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js +15 -26
  193. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
  194. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js +13 -50
  195. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
  196. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js +3 -13
  197. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
  198. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js +2 -9
  199. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
  200. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js +6 -14
  201. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
  202. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js +23 -52
  203. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js.map +1 -1
  204. package/lib/commonjs/handlers/gestures/eventReceiver.js +14 -55
  205. package/lib/commonjs/handlers/gestures/eventReceiver.js.map +1 -1
  206. package/lib/commonjs/handlers/gestures/flingGesture.js +3 -13
  207. package/lib/commonjs/handlers/gestures/flingGesture.js.map +1 -1
  208. package/lib/commonjs/handlers/gestures/forceTouchGesture.js +6 -20
  209. package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -1
  210. package/lib/commonjs/handlers/gestures/gesture.js +50 -93
  211. package/lib/commonjs/handlers/gestures/gesture.js.map +1 -1
  212. package/lib/commonjs/handlers/gestures/gestureComposition.js +17 -34
  213. package/lib/commonjs/handlers/gestures/gestureComposition.js.map +1 -1
  214. package/lib/commonjs/handlers/gestures/gestureObjects.js +1 -27
  215. package/lib/commonjs/handlers/gestures/gestureObjects.js.map +1 -1
  216. package/lib/commonjs/handlers/gestures/gestureStateManager.js +5 -11
  217. package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +1 -1
  218. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js +2 -7
  219. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js.map +1 -1
  220. package/lib/commonjs/handlers/gestures/hoverGesture.js +9 -26
  221. package/lib/commonjs/handlers/gestures/hoverGesture.js.map +1 -1
  222. package/lib/commonjs/handlers/gestures/longPressGesture.js +4 -15
  223. package/lib/commonjs/handlers/gestures/longPressGesture.js.map +1 -1
  224. package/lib/commonjs/handlers/gestures/manualGesture.js +0 -6
  225. package/lib/commonjs/handlers/gestures/manualGesture.js.map +1 -1
  226. package/lib/{module/handlers/gestures/nativeGesture.js → commonjs/handlers/gestures/nativeGesture.ts} +12 -13
  227. package/lib/commonjs/handlers/gestures/panGesture.js +16 -44
  228. package/lib/commonjs/handlers/gestures/panGesture.js.map +1 -1
  229. package/lib/commonjs/handlers/gestures/pinchGesture.js +2 -9
  230. package/lib/commonjs/handlers/gestures/pinchGesture.js.map +1 -1
  231. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js +2 -10
  232. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js.map +1 -1
  233. package/lib/commonjs/handlers/gestures/rotationGesture.js +2 -9
  234. package/lib/commonjs/handlers/gestures/rotationGesture.js.map +1 -1
  235. package/lib/commonjs/handlers/gestures/tapGesture.js +8 -23
  236. package/lib/commonjs/handlers/gestures/tapGesture.js.map +1 -1
  237. package/lib/commonjs/handlers/getNextHandlerTag.js +0 -1
  238. package/lib/commonjs/handlers/getNextHandlerTag.js.map +1 -1
  239. package/lib/commonjs/handlers/handlersRegistry.js +7 -23
  240. package/lib/commonjs/handlers/handlersRegistry.js.map +1 -1
  241. package/lib/commonjs/handlers/utils.js +8 -31
  242. package/lib/commonjs/handlers/utils.js.map +1 -1
  243. package/lib/commonjs/index.js +75 -104
  244. package/lib/commonjs/index.js.map +1 -1
  245. package/lib/commonjs/init.js +4 -11
  246. package/lib/commonjs/init.js.map +1 -1
  247. package/lib/commonjs/jestUtils/index.js +4 -5
  248. package/lib/commonjs/jestUtils/index.js.map +1 -1
  249. package/lib/commonjs/jestUtils/jestUtils.js +24 -91
  250. package/lib/commonjs/jestUtils/jestUtils.js.map +1 -1
  251. package/lib/commonjs/mocks.js +10 -18
  252. package/lib/commonjs/mocks.js.map +1 -1
  253. package/lib/commonjs/mountRegistry.js +2 -14
  254. package/lib/commonjs/mountRegistry.js.map +1 -1
  255. package/lib/commonjs/package.json +1 -0
  256. package/lib/commonjs/specs/NativeRNGestureHandlerModule.ts +26 -0
  257. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.ts +22 -0
  258. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.ts +6 -0
  259. package/lib/commonjs/typeUtils.js.map +1 -1
  260. package/lib/commonjs/utils.js +14 -35
  261. package/lib/commonjs/utils.js.map +1 -1
  262. package/lib/commonjs/web/Gestures.js +5 -23
  263. package/lib/commonjs/web/Gestures.js.map +1 -1
  264. package/lib/commonjs/web/constants.js +2 -4
  265. package/lib/commonjs/web/constants.js.map +1 -1
  266. package/lib/commonjs/web/detectors/RotationGestureDetector.js +10 -52
  267. package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +1 -1
  268. package/lib/commonjs/web/detectors/ScaleGestureDetector.js +11 -55
  269. package/lib/commonjs/web/detectors/ScaleGestureDetector.js.map +1 -1
  270. package/lib/commonjs/web/handlers/FlingGestureHandler.js +9 -59
  271. package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -1
  272. package/lib/commonjs/web/handlers/GestureHandler.js +91 -226
  273. package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
  274. package/lib/commonjs/web/handlers/HoverGestureHandler.js +3 -23
  275. package/lib/commonjs/web/handlers/HoverGestureHandler.js.map +1 -1
  276. package/lib/commonjs/web/handlers/IGestureHandler.js.map +1 -1
  277. package/lib/commonjs/web/handlers/LongPressGestureHandler.js +11 -59
  278. package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +1 -1
  279. package/lib/commonjs/web/handlers/ManualGestureHandler.js +1 -11
  280. package/lib/commonjs/web/handlers/ManualGestureHandler.js.map +1 -1
  281. package/lib/{module/web/handlers/NativeViewGestureHandler.js → commonjs/web/handlers/NativeViewGestureHandler.ts} +49 -48
  282. package/lib/commonjs/web/handlers/PanGestureHandler.js +33 -155
  283. package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
  284. package/lib/commonjs/web/handlers/PinchGestureHandler.js +25 -68
  285. package/lib/commonjs/web/handlers/PinchGestureHandler.js.map +1 -1
  286. package/lib/commonjs/web/handlers/RotationGestureHandler.js +23 -67
  287. package/lib/commonjs/web/handlers/RotationGestureHandler.js.map +1 -1
  288. package/lib/commonjs/web/handlers/TapGestureHandler.js +18 -87
  289. package/lib/commonjs/web/handlers/TapGestureHandler.js.map +1 -1
  290. package/lib/commonjs/web/interfaces.js +9 -17
  291. package/lib/commonjs/web/interfaces.js.map +1 -1
  292. package/lib/commonjs/web/tools/CircularBuffer.js +0 -19
  293. package/lib/commonjs/web/tools/CircularBuffer.js.map +1 -1
  294. package/lib/commonjs/web/tools/EventManager.js +5 -44
  295. package/lib/commonjs/web/tools/EventManager.js.map +1 -1
  296. package/lib/commonjs/web/tools/GestureHandlerDelegate.js.map +1 -1
  297. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +13 -86
  298. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  299. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +14 -61
  300. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  301. package/lib/commonjs/web/tools/InteractionManager.js +12 -35
  302. package/lib/commonjs/web/tools/InteractionManager.js.map +1 -1
  303. package/lib/commonjs/web/tools/KeyboardEventManager.js +24 -52
  304. package/lib/commonjs/web/tools/KeyboardEventManager.js.map +1 -1
  305. package/lib/commonjs/web/tools/LeastSquareSolver.js +24 -69
  306. package/lib/commonjs/web/tools/LeastSquareSolver.js.map +1 -1
  307. package/lib/commonjs/web/tools/NodeManager.js +5 -15
  308. package/lib/commonjs/web/tools/NodeManager.js.map +1 -1
  309. package/lib/commonjs/web/tools/PointerEventManager.js +119 -159
  310. package/lib/commonjs/web/tools/PointerEventManager.js.map +1 -1
  311. package/lib/commonjs/web/tools/PointerTracker.js +20 -63
  312. package/lib/commonjs/web/tools/PointerTracker.js.map +1 -1
  313. package/lib/commonjs/web/tools/Vector.js +1 -25
  314. package/lib/commonjs/web/tools/Vector.js.map +1 -1
  315. package/lib/commonjs/web/tools/VelocityTracker.js +10 -36
  316. package/lib/commonjs/web/tools/VelocityTracker.js.map +1 -1
  317. package/lib/commonjs/web/tools/WheelEventManager.js +15 -34
  318. package/lib/commonjs/web/tools/WheelEventManager.js.map +1 -1
  319. package/lib/commonjs/web/utils.js +32 -67
  320. package/lib/commonjs/web/utils.js.map +1 -1
  321. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js +8 -20
  322. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js.map +1 -1
  323. package/lib/commonjs/web_hammer/DraggingGestureHandler.js +4 -14
  324. package/lib/commonjs/web_hammer/DraggingGestureHandler.js.map +1 -1
  325. package/lib/commonjs/web_hammer/Errors.js +0 -3
  326. package/lib/commonjs/web_hammer/Errors.js.map +1 -1
  327. package/lib/commonjs/web_hammer/FlingGestureHandler.js +14 -45
  328. package/lib/commonjs/web_hammer/FlingGestureHandler.js.map +1 -1
  329. package/lib/commonjs/web_hammer/GestureHandler.js +149 -244
  330. package/lib/commonjs/web_hammer/GestureHandler.js.map +1 -1
  331. package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js +2 -11
  332. package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js.map +1 -1
  333. package/lib/commonjs/web_hammer/LongPressGestureHandler.js +6 -20
  334. package/lib/commonjs/web_hammer/LongPressGestureHandler.js.map +1 -1
  335. package/lib/commonjs/web_hammer/NativeViewGestureHandler.ts +47 -0
  336. package/lib/commonjs/web_hammer/NodeManager.js +9 -16
  337. package/lib/commonjs/web_hammer/NodeManager.js.map +1 -1
  338. package/lib/commonjs/web_hammer/PanGestureHandler.js +8 -49
  339. package/lib/commonjs/web_hammer/PanGestureHandler.js.map +1 -1
  340. package/lib/commonjs/web_hammer/PinchGestureHandler.js +2 -11
  341. package/lib/commonjs/web_hammer/PinchGestureHandler.js.map +1 -1
  342. package/lib/commonjs/web_hammer/PressGestureHandler.js +14 -49
  343. package/lib/commonjs/web_hammer/PressGestureHandler.js.map +1 -1
  344. package/lib/commonjs/web_hammer/RotationGestureHandler.js +3 -15
  345. package/lib/commonjs/web_hammer/RotationGestureHandler.js.map +1 -1
  346. package/lib/commonjs/web_hammer/TapGestureHandler.js +43 -70
  347. package/lib/commonjs/web_hammer/TapGestureHandler.js.map +1 -1
  348. package/lib/commonjs/web_hammer/constants.js +13 -26
  349. package/lib/commonjs/web_hammer/constants.js.map +1 -1
  350. package/lib/commonjs/web_hammer/utils.js +4 -14
  351. package/lib/commonjs/web_hammer/utils.js.map +1 -1
  352. package/lib/module/ActionType.js +5 -1
  353. package/lib/module/ActionType.js.map +1 -1
  354. package/lib/module/Directions.js +11 -3
  355. package/lib/module/Directions.js.map +1 -1
  356. package/lib/module/EnableNewWebImplementation.js +4 -5
  357. package/lib/module/EnableNewWebImplementation.js.map +1 -1
  358. package/lib/module/GestureHandlerRootViewContext.js +2 -0
  359. package/lib/module/GestureHandlerRootViewContext.js.map +1 -1
  360. package/lib/module/PlatformConstants.js +2 -2
  361. package/lib/module/PlatformConstants.js.map +1 -1
  362. package/lib/module/PlatformConstants.web.js +2 -1
  363. package/lib/module/PlatformConstants.web.js.map +1 -1
  364. package/lib/module/PointerType.js +4 -3
  365. package/lib/module/PointerType.js.map +1 -1
  366. package/lib/module/RNGestureHandlerModule.js +3 -0
  367. package/lib/module/RNGestureHandlerModule.js.map +1 -1
  368. package/lib/module/RNGestureHandlerModule.web.js +12 -20
  369. package/lib/module/RNGestureHandlerModule.web.js.map +1 -1
  370. package/lib/module/RNGestureHandlerModule.windows.js +20 -17
  371. package/lib/module/RNGestureHandlerModule.windows.js.map +1 -1
  372. package/lib/module/RNRenderer.js +2 -0
  373. package/lib/module/RNRenderer.js.map +1 -1
  374. package/lib/module/RNRenderer.web.js +2 -0
  375. package/lib/module/RNRenderer.web.js.map +1 -1
  376. package/lib/module/State.js +6 -1
  377. package/lib/module/State.js.map +1 -1
  378. package/lib/module/TouchEventType.js +5 -1
  379. package/lib/module/TouchEventType.js.map +1 -1
  380. package/lib/module/components/DrawerLayout.js +427 -446
  381. package/lib/module/components/DrawerLayout.js.map +1 -1
  382. package/lib/module/components/GestureButtons.js +119 -157
  383. package/lib/module/components/GestureButtons.js.map +1 -1
  384. package/lib/module/components/GestureButtonsProps.js +2 -0
  385. package/lib/module/components/GestureButtonsProps.js.map +1 -1
  386. package/lib/module/components/GestureComponents.js +29 -19
  387. package/lib/module/components/GestureComponents.js.map +1 -1
  388. package/lib/module/components/GestureComponents.web.js +13 -9
  389. package/lib/module/components/GestureComponents.web.js.map +1 -1
  390. package/lib/module/components/GestureHandlerButton.js +2 -0
  391. package/lib/module/components/GestureHandlerButton.js.map +1 -1
  392. package/lib/module/components/GestureHandlerButton.web.js +6 -4
  393. package/lib/module/components/GestureHandlerButton.web.js.map +1 -1
  394. package/lib/module/components/GestureHandlerRootView.android.js +9 -6
  395. package/lib/module/components/GestureHandlerRootView.android.js.map +1 -1
  396. package/lib/module/components/GestureHandlerRootView.js +9 -6
  397. package/lib/module/components/GestureHandlerRootView.js.map +1 -1
  398. package/lib/module/components/GestureHandlerRootView.web.js +9 -6
  399. package/lib/module/components/GestureHandlerRootView.web.js.map +1 -1
  400. package/lib/module/components/Pressable/Pressable.js +70 -98
  401. package/lib/module/components/Pressable/Pressable.js.map +1 -1
  402. package/lib/module/components/Pressable/PressableProps.js +2 -0
  403. package/lib/module/components/Pressable/PressableProps.js.map +1 -1
  404. package/lib/module/components/Pressable/index.js +2 -0
  405. package/lib/module/components/Pressable/index.js.map +1 -1
  406. package/lib/module/components/Pressable/utils.js +17 -32
  407. package/lib/module/components/Pressable/utils.js.map +1 -1
  408. package/lib/module/components/ReanimatedDrawerLayout.js +71 -88
  409. package/lib/module/components/ReanimatedDrawerLayout.js.map +1 -1
  410. package/lib/module/components/ReanimatedSwipeable.js +78 -87
  411. package/lib/module/components/ReanimatedSwipeable.js.map +1 -1
  412. package/lib/module/components/Swipeable.js +286 -320
  413. package/lib/module/components/Swipeable.js.map +1 -1
  414. package/lib/module/components/Text.js +22 -20
  415. package/lib/module/components/Text.js.map +1 -1
  416. package/lib/module/components/gestureHandlerRootHOC.js +11 -5
  417. package/lib/module/components/gestureHandlerRootHOC.js.map +1 -1
  418. package/lib/module/components/touchables/ExtraButtonProps.js +1 -1
  419. package/lib/module/components/touchables/ExtraButtonProps.js.map +1 -1
  420. package/lib/module/components/touchables/GenericTouchable.js +92 -127
  421. package/lib/module/components/touchables/GenericTouchable.js.map +1 -1
  422. package/lib/module/components/touchables/GenericTouchableProps.js +2 -0
  423. package/lib/module/components/touchables/GenericTouchableProps.js.map +1 -1
  424. package/lib/module/components/touchables/TouchableHighlight.js +48 -58
  425. package/lib/module/components/touchables/TouchableHighlight.js.map +1 -1
  426. package/lib/module/components/touchables/TouchableNativeFeedback.android.js +34 -43
  427. package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  428. package/lib/module/components/touchables/TouchableNativeFeedback.js +3 -1
  429. package/lib/module/components/touchables/TouchableNativeFeedback.js.map +1 -1
  430. package/lib/module/components/touchables/TouchableNativeFeedbackProps.js +2 -0
  431. package/lib/module/components/touchables/TouchableNativeFeedbackProps.js.map +1 -1
  432. package/lib/module/components/touchables/TouchableOpacity.js +34 -43
  433. package/lib/module/components/touchables/TouchableOpacity.js.map +1 -1
  434. package/lib/module/components/touchables/TouchableWithoutFeedback.js +9 -4
  435. package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  436. package/lib/module/components/touchables/index.js +2 -0
  437. package/lib/module/components/touchables/index.js.map +1 -1
  438. package/lib/module/components/utils.js +13 -0
  439. package/lib/module/components/utils.js.map +1 -0
  440. package/lib/module/findNodeHandle.js +2 -0
  441. package/lib/module/findNodeHandle.js.map +1 -1
  442. package/lib/module/findNodeHandle.web.js +9 -13
  443. package/lib/module/findNodeHandle.web.js.map +1 -1
  444. package/lib/module/getShadowNodeFromRef.js +21 -19
  445. package/lib/module/getShadowNodeFromRef.js.map +1 -1
  446. package/lib/module/getShadowNodeFromRef.web.js +2 -0
  447. package/lib/module/getShadowNodeFromRef.web.js.map +1 -1
  448. package/lib/module/ghQueueMicrotask.js +2 -0
  449. package/lib/module/ghQueueMicrotask.js.map +1 -1
  450. package/lib/module/handlers/FlingGestureHandler.js +8 -0
  451. package/lib/module/handlers/FlingGestureHandler.js.map +1 -1
  452. package/lib/module/handlers/ForceTouchGestureHandler.js +14 -8
  453. package/lib/module/handlers/ForceTouchGestureHandler.js.map +1 -1
  454. package/lib/module/handlers/GestureHandlerEventPayload.js +2 -0
  455. package/lib/module/handlers/GestureHandlerEventPayload.js.map +1 -1
  456. package/lib/module/handlers/LongPressGestureHandler.js +8 -0
  457. package/lib/module/handlers/LongPressGestureHandler.js.map +1 -1
  458. package/lib/module/handlers/NativeViewGestureHandler.ts +59 -0
  459. package/lib/module/handlers/PanGestureHandler.js +10 -19
  460. package/lib/module/handlers/PanGestureHandler.js.map +1 -1
  461. package/lib/module/handlers/PinchGestureHandler.js +4 -0
  462. package/lib/module/handlers/PinchGestureHandler.js.map +1 -1
  463. package/lib/module/handlers/PressabilityDebugView.js +2 -0
  464. package/lib/module/handlers/PressabilityDebugView.js.map +1 -1
  465. package/lib/module/handlers/PressabilityDebugView.web.js +2 -0
  466. package/lib/module/handlers/PressabilityDebugView.web.js.map +1 -1
  467. package/lib/module/handlers/RotationGestureHandler.js +4 -0
  468. package/lib/module/handlers/RotationGestureHandler.js.map +1 -1
  469. package/lib/module/handlers/TapGestureHandler.js +8 -0
  470. package/lib/module/handlers/TapGestureHandler.js.map +1 -1
  471. package/lib/module/handlers/createHandler.js +127 -200
  472. package/lib/module/handlers/createHandler.js.map +1 -1
  473. package/lib/module/handlers/createNativeWrapper.js +22 -22
  474. package/lib/module/handlers/createNativeWrapper.js.map +1 -1
  475. package/lib/module/handlers/customDirectEventTypes.js +2 -0
  476. package/lib/module/handlers/customDirectEventTypes.js.map +1 -1
  477. package/lib/module/handlers/customDirectEventTypes.web.js +2 -0
  478. package/lib/module/handlers/customDirectEventTypes.web.js.map +1 -1
  479. package/lib/module/handlers/gestureHandlerCommon.js +11 -4
  480. package/lib/module/handlers/gestureHandlerCommon.js.map +1 -1
  481. package/lib/module/handlers/gestureHandlerTypesCompat.js +2 -0
  482. package/lib/module/handlers/gestureHandlerTypesCompat.js.map +1 -1
  483. package/lib/module/handlers/gestures/GestureDetector/Wrap.js +4 -4
  484. package/lib/module/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
  485. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js +12 -8
  486. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
  487. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js +10 -16
  488. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
  489. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js +2 -1
  490. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
  491. package/lib/module/handlers/gestures/GestureDetector/index.js +18 -19
  492. package/lib/module/handlers/gestures/GestureDetector/index.js.map +1 -1
  493. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js +2 -2
  494. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -1
  495. package/lib/module/handlers/gestures/GestureDetector/types.js +2 -0
  496. package/lib/module/handlers/gestures/GestureDetector/types.js.map +1 -1
  497. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js +16 -16
  498. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
  499. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js +15 -41
  500. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
  501. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js +7 -5
  502. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
  503. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js +4 -6
  504. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
  505. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js +7 -7
  506. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
  507. package/lib/module/handlers/gestures/GestureDetector/utils.js +21 -26
  508. package/lib/module/handlers/gestures/GestureDetector/utils.js.map +1 -1
  509. package/lib/module/handlers/gestures/eventReceiver.js +16 -47
  510. package/lib/module/handlers/gestures/eventReceiver.js.map +1 -1
  511. package/lib/module/handlers/gestures/flingGesture.js +4 -9
  512. package/lib/module/handlers/gestures/flingGesture.js.map +1 -1
  513. package/lib/module/handlers/gestures/forceTouchGesture.js +7 -17
  514. package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -1
  515. package/lib/module/handlers/gestures/gesture.js +51 -81
  516. package/lib/module/handlers/gestures/gesture.js.map +1 -1
  517. package/lib/module/handlers/gestures/gestureComposition.js +17 -26
  518. package/lib/module/handlers/gestures/gestureComposition.js.map +1 -1
  519. package/lib/module/handlers/gestures/gestureObjects.js +3 -14
  520. package/lib/module/handlers/gestures/gestureObjects.js.map +1 -1
  521. package/lib/module/handlers/gestures/gestureStateManager.js +7 -6
  522. package/lib/module/handlers/gestures/gestureStateManager.js.map +1 -1
  523. package/lib/module/handlers/gestures/gestureStateManager.web.js +2 -1
  524. package/lib/module/handlers/gestures/gestureStateManager.web.js.map +1 -1
  525. package/lib/module/handlers/gestures/hoverGesture.js +8 -18
  526. package/lib/module/handlers/gestures/hoverGesture.js.map +1 -1
  527. package/lib/module/handlers/gestures/longPressGesture.js +5 -11
  528. package/lib/module/handlers/gestures/longPressGesture.js.map +1 -1
  529. package/lib/module/handlers/gestures/manualGesture.js +2 -4
  530. package/lib/module/handlers/gestures/manualGesture.js.map +1 -1
  531. package/lib/module/handlers/gestures/nativeGesture.ts +33 -0
  532. package/lib/module/handlers/gestures/panGesture.js +17 -41
  533. package/lib/module/handlers/gestures/panGesture.js.map +1 -1
  534. package/lib/module/handlers/gestures/pinchGesture.js +4 -7
  535. package/lib/module/handlers/gestures/pinchGesture.js.map +1 -1
  536. package/lib/module/handlers/gestures/reanimatedWrapper.js +2 -6
  537. package/lib/module/handlers/gestures/reanimatedWrapper.js.map +1 -1
  538. package/lib/module/handlers/gestures/rotationGesture.js +4 -7
  539. package/lib/module/handlers/gestures/rotationGesture.js.map +1 -1
  540. package/lib/module/handlers/gestures/tapGesture.js +9 -19
  541. package/lib/module/handlers/gestures/tapGesture.js.map +1 -1
  542. package/lib/module/handlers/getNextHandlerTag.js +2 -0
  543. package/lib/module/handlers/getNextHandlerTag.js.map +1 -1
  544. package/lib/module/handlers/handlersRegistry.js +3 -7
  545. package/lib/module/handlers/handlersRegistry.js.map +1 -1
  546. package/lib/module/handlers/utils.js +8 -18
  547. package/lib/module/handlers/utils.js.map +1 -1
  548. package/lib/module/index.js +2 -0
  549. package/lib/module/index.js.map +1 -1
  550. package/lib/module/init.js +5 -2
  551. package/lib/module/init.js.map +1 -1
  552. package/lib/module/jestUtils/index.js +2 -0
  553. package/lib/module/jestUtils/index.js.map +1 -1
  554. package/lib/module/jestUtils/jestUtils.js +27 -74
  555. package/lib/module/jestUtils/jestUtils.js.map +1 -1
  556. package/lib/module/mocks.js +9 -9
  557. package/lib/module/mocks.js.map +1 -1
  558. package/lib/module/mountRegistry.js +3 -11
  559. package/lib/module/mountRegistry.js.map +1 -1
  560. package/lib/module/specs/NativeRNGestureHandlerModule.ts +26 -0
  561. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.ts +22 -0
  562. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.ts +6 -0
  563. package/lib/module/typeUtils.js +1 -1
  564. package/lib/module/typeUtils.js.map +1 -1
  565. package/lib/module/utils.js +8 -14
  566. package/lib/module/utils.js.map +1 -1
  567. package/lib/module/web/Gestures.js +4 -1
  568. package/lib/module/web/Gestures.js.map +1 -1
  569. package/lib/module/web/constants.js +2 -0
  570. package/lib/module/web/constants.js.map +1 -1
  571. package/lib/module/web/detectors/RotationGestureDetector.js +11 -48
  572. package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -1
  573. package/lib/module/web/detectors/ScaleGestureDetector.js +12 -50
  574. package/lib/module/web/detectors/ScaleGestureDetector.js.map +1 -1
  575. package/lib/module/web/handlers/FlingGestureHandler.js +9 -48
  576. package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
  577. package/lib/module/web/handlers/GestureHandler.js +90 -212
  578. package/lib/module/web/handlers/GestureHandler.js.map +1 -1
  579. package/lib/module/web/handlers/HoverGestureHandler.js +3 -14
  580. package/lib/module/web/handlers/HoverGestureHandler.js.map +1 -1
  581. package/lib/module/web/handlers/IGestureHandler.js +1 -1
  582. package/lib/module/web/handlers/IGestureHandler.js.map +1 -1
  583. package/lib/module/web/handlers/LongPressGestureHandler.js +11 -51
  584. package/lib/module/web/handlers/LongPressGestureHandler.js.map +1 -1
  585. package/lib/module/web/handlers/ManualGestureHandler.js +2 -6
  586. package/lib/module/web/handlers/ManualGestureHandler.js.map +1 -1
  587. package/lib/module/web/handlers/NativeViewGestureHandler.ts +175 -0
  588. package/lib/module/web/handlers/PanGestureHandler.js +33 -145
  589. package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
  590. package/lib/module/web/handlers/PinchGestureHandler.js +25 -59
  591. package/lib/module/web/handlers/PinchGestureHandler.js.map +1 -1
  592. package/lib/module/web/handlers/RotationGestureHandler.js +23 -58
  593. package/lib/module/web/handlers/RotationGestureHandler.js.map +1 -1
  594. package/lib/module/web/handlers/TapGestureHandler.js +18 -78
  595. package/lib/module/web/handlers/TapGestureHandler.js.map +1 -1
  596. package/lib/module/web/interfaces.js +10 -13
  597. package/lib/module/web/interfaces.js.map +1 -1
  598. package/lib/module/web/tools/CircularBuffer.js +1 -16
  599. package/lib/module/web/tools/CircularBuffer.js.map +1 -1
  600. package/lib/module/web/tools/EventManager.js +6 -41
  601. package/lib/module/web/tools/EventManager.js.map +1 -1
  602. package/lib/module/web/tools/GestureHandlerDelegate.js +2 -0
  603. package/lib/module/web/tools/GestureHandlerDelegate.js.map +1 -1
  604. package/lib/module/web/tools/GestureHandlerOrchestrator.js +13 -78
  605. package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  606. package/lib/module/web/tools/GestureHandlerWebDelegate.js +14 -49
  607. package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  608. package/lib/module/web/tools/InteractionManager.js +13 -32
  609. package/lib/module/web/tools/InteractionManager.js.map +1 -1
  610. package/lib/module/web/tools/KeyboardEventManager.js +24 -44
  611. package/lib/module/web/tools/KeyboardEventManager.js.map +1 -1
  612. package/lib/module/web/tools/LeastSquareSolver.js +25 -66
  613. package/lib/module/web/tools/LeastSquareSolver.js.map +1 -1
  614. package/lib/module/web/tools/NodeManager.js +6 -12
  615. package/lib/module/web/tools/NodeManager.js.map +1 -1
  616. package/lib/module/web/tools/PointerEventManager.js +119 -148
  617. package/lib/module/web/tools/PointerEventManager.js.map +1 -1
  618. package/lib/module/web/tools/PointerTracker.js +20 -56
  619. package/lib/module/web/tools/PointerTracker.js.map +1 -1
  620. package/lib/module/web/tools/Vector.js +2 -20
  621. package/lib/module/web/tools/Vector.js.map +1 -1
  622. package/lib/module/web/tools/VelocityTracker.js +10 -29
  623. package/lib/module/web/tools/VelocityTracker.js.map +1 -1
  624. package/lib/module/web/tools/WheelEventManager.js +15 -26
  625. package/lib/module/web/tools/WheelEventManager.js.map +1 -1
  626. package/lib/module/web/utils.js +29 -49
  627. package/lib/module/web/utils.js.map +1 -1
  628. package/lib/module/web_hammer/DiscreteGestureHandler.js +6 -13
  629. package/lib/module/web_hammer/DiscreteGestureHandler.js.map +1 -1
  630. package/lib/module/web_hammer/DraggingGestureHandler.js +2 -5
  631. package/lib/module/web_hammer/DraggingGestureHandler.js.map +1 -1
  632. package/lib/module/web_hammer/Errors.js +2 -1
  633. package/lib/module/web_hammer/Errors.js.map +1 -1
  634. package/lib/module/web_hammer/FlingGestureHandler.js +12 -35
  635. package/lib/module/web_hammer/FlingGestureHandler.js.map +1 -1
  636. package/lib/module/web_hammer/GestureHandler.js +148 -233
  637. package/lib/module/web_hammer/GestureHandler.js.map +1 -1
  638. package/lib/module/web_hammer/IndiscreteGestureHandler.js +3 -6
  639. package/lib/module/web_hammer/IndiscreteGestureHandler.js.map +1 -1
  640. package/lib/module/web_hammer/LongPressGestureHandler.js +4 -11
  641. package/lib/module/web_hammer/LongPressGestureHandler.js.map +1 -1
  642. package/lib/module/web_hammer/NativeViewGestureHandler.ts +47 -0
  643. package/lib/module/web_hammer/NodeManager.js +8 -8
  644. package/lib/module/web_hammer/NodeManager.js.map +1 -1
  645. package/lib/module/web_hammer/PanGestureHandler.js +8 -40
  646. package/lib/module/web_hammer/PanGestureHandler.js.map +1 -1
  647. package/lib/module/web_hammer/PinchGestureHandler.js +2 -5
  648. package/lib/module/web_hammer/PinchGestureHandler.js.map +1 -1
  649. package/lib/module/web_hammer/PressGestureHandler.js +13 -39
  650. package/lib/module/web_hammer/PressGestureHandler.js.map +1 -1
  651. package/lib/module/web_hammer/RotationGestureHandler.js +3 -8
  652. package/lib/module/web_hammer/RotationGestureHandler.js.map +1 -1
  653. package/lib/module/web_hammer/TapGestureHandler.js +42 -62
  654. package/lib/module/web_hammer/TapGestureHandler.js.map +1 -1
  655. package/lib/module/web_hammer/constants.js +4 -1
  656. package/lib/module/web_hammer/constants.js.map +1 -1
  657. package/lib/module/web_hammer/utils.js +4 -2
  658. package/lib/module/web_hammer/utils.js.map +1 -1
  659. package/lib/typescript/ActionType.d.ts +1 -0
  660. package/lib/typescript/ActionType.d.ts.map +1 -0
  661. package/lib/typescript/Directions.d.ts +1 -0
  662. package/lib/typescript/Directions.d.ts.map +1 -0
  663. package/lib/typescript/EnableNewWebImplementation.d.ts +1 -0
  664. package/lib/typescript/EnableNewWebImplementation.d.ts.map +1 -0
  665. package/lib/typescript/GestureHandlerRootViewContext.d.ts +1 -0
  666. package/lib/typescript/GestureHandlerRootViewContext.d.ts.map +1 -0
  667. package/lib/typescript/PlatformConstants.d.ts +1 -0
  668. package/lib/typescript/PlatformConstants.d.ts.map +1 -0
  669. package/lib/typescript/PlatformConstants.web.d.ts +1 -0
  670. package/lib/typescript/PlatformConstants.web.d.ts.map +1 -0
  671. package/lib/typescript/PointerType.d.ts +1 -0
  672. package/lib/typescript/PointerType.d.ts.map +1 -0
  673. package/lib/typescript/RNGestureHandlerModule.d.ts +1 -0
  674. package/lib/typescript/RNGestureHandlerModule.d.ts.map +1 -0
  675. package/lib/typescript/RNGestureHandlerModule.web.d.ts +1 -0
  676. package/lib/typescript/RNGestureHandlerModule.web.d.ts.map +1 -0
  677. package/lib/typescript/RNGestureHandlerModule.windows.d.ts +1 -0
  678. package/lib/typescript/RNGestureHandlerModule.windows.d.ts.map +1 -0
  679. package/lib/typescript/RNRenderer.d.ts +1 -0
  680. package/lib/typescript/RNRenderer.d.ts.map +1 -0
  681. package/lib/typescript/RNRenderer.web.d.ts +1 -0
  682. package/lib/typescript/RNRenderer.web.d.ts.map +1 -0
  683. package/lib/typescript/State.d.ts +1 -0
  684. package/lib/typescript/State.d.ts.map +1 -0
  685. package/lib/typescript/TouchEventType.d.ts +1 -0
  686. package/lib/typescript/TouchEventType.d.ts.map +1 -0
  687. package/lib/typescript/components/DrawerLayout.d.ts +1 -0
  688. package/lib/typescript/components/DrawerLayout.d.ts.map +1 -0
  689. package/lib/typescript/components/GestureButtons.d.ts +1 -0
  690. package/lib/typescript/components/GestureButtons.d.ts.map +1 -0
  691. package/lib/typescript/components/GestureButtonsProps.d.ts +1 -0
  692. package/lib/typescript/components/GestureButtonsProps.d.ts.map +1 -0
  693. package/lib/typescript/components/GestureComponents.d.ts +4 -3
  694. package/lib/typescript/components/GestureComponents.d.ts.map +1 -0
  695. package/lib/typescript/components/GestureComponents.web.d.ts +1 -0
  696. package/lib/typescript/components/GestureComponents.web.d.ts.map +1 -0
  697. package/lib/typescript/components/GestureHandlerButton.d.ts +1 -0
  698. package/lib/typescript/components/GestureHandlerButton.d.ts.map +1 -0
  699. package/lib/typescript/components/GestureHandlerButton.web.d.ts +1 -0
  700. package/lib/typescript/components/GestureHandlerButton.web.d.ts.map +1 -0
  701. package/lib/typescript/components/GestureHandlerRootView.android.d.ts +1 -0
  702. package/lib/typescript/components/GestureHandlerRootView.android.d.ts.map +1 -0
  703. package/lib/typescript/components/GestureHandlerRootView.d.ts +1 -0
  704. package/lib/typescript/components/GestureHandlerRootView.d.ts.map +1 -0
  705. package/lib/typescript/components/GestureHandlerRootView.web.d.ts +1 -0
  706. package/lib/typescript/components/GestureHandlerRootView.web.d.ts.map +1 -0
  707. package/lib/typescript/components/Pressable/Pressable.d.ts +1 -0
  708. package/lib/typescript/components/Pressable/Pressable.d.ts.map +1 -0
  709. package/lib/typescript/components/Pressable/PressableProps.d.ts +17 -1
  710. package/lib/typescript/components/Pressable/PressableProps.d.ts.map +1 -0
  711. package/lib/typescript/components/Pressable/index.d.ts +1 -0
  712. package/lib/typescript/components/Pressable/index.d.ts.map +1 -0
  713. package/lib/typescript/components/Pressable/utils.d.ts +1 -0
  714. package/lib/typescript/components/Pressable/utils.d.ts.map +1 -0
  715. package/lib/typescript/components/ReanimatedDrawerLayout.d.ts +1 -0
  716. package/lib/typescript/components/ReanimatedDrawerLayout.d.ts.map +1 -0
  717. package/lib/typescript/components/ReanimatedSwipeable.d.ts +13 -2
  718. package/lib/typescript/components/ReanimatedSwipeable.d.ts.map +1 -0
  719. package/lib/typescript/components/Swipeable.d.ts +1 -0
  720. package/lib/typescript/components/Swipeable.d.ts.map +1 -0
  721. package/lib/typescript/components/Text.d.ts +1 -0
  722. package/lib/typescript/components/Text.d.ts.map +1 -0
  723. package/lib/typescript/components/gestureHandlerRootHOC.d.ts +1 -0
  724. package/lib/typescript/components/gestureHandlerRootHOC.d.ts.map +1 -0
  725. package/lib/typescript/components/touchables/ExtraButtonProps.d.ts +1 -0
  726. package/lib/typescript/components/touchables/ExtraButtonProps.d.ts.map +1 -0
  727. package/lib/typescript/components/touchables/GenericTouchable.d.ts +1 -0
  728. package/lib/typescript/components/touchables/GenericTouchable.d.ts.map +1 -0
  729. package/lib/typescript/components/touchables/GenericTouchableProps.d.ts +1 -0
  730. package/lib/typescript/components/touchables/GenericTouchableProps.d.ts.map +1 -0
  731. package/lib/typescript/components/touchables/TouchableHighlight.d.ts +1 -0
  732. package/lib/typescript/components/touchables/TouchableHighlight.d.ts.map +1 -0
  733. package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +1 -0
  734. package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts.map +1 -0
  735. package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +1 -0
  736. package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts.map +1 -0
  737. package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +1 -0
  738. package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts.map +1 -0
  739. package/lib/typescript/components/touchables/TouchableOpacity.d.ts +1 -0
  740. package/lib/typescript/components/touchables/TouchableOpacity.d.ts.map +1 -0
  741. package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +2 -1
  742. package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts.map +1 -0
  743. package/lib/typescript/components/touchables/index.d.ts +1 -0
  744. package/lib/typescript/components/touchables/index.d.ts.map +1 -0
  745. package/lib/typescript/components/utils.d.ts +5 -0
  746. package/lib/typescript/components/utils.d.ts.map +1 -0
  747. package/lib/typescript/findNodeHandle.d.ts +1 -0
  748. package/lib/typescript/findNodeHandle.d.ts.map +1 -0
  749. package/lib/typescript/findNodeHandle.web.d.ts +1 -0
  750. package/lib/typescript/findNodeHandle.web.d.ts.map +1 -0
  751. package/lib/typescript/getShadowNodeFromRef.d.ts +1 -0
  752. package/lib/typescript/getShadowNodeFromRef.d.ts.map +1 -0
  753. package/lib/typescript/getShadowNodeFromRef.web.d.ts +1 -0
  754. package/lib/typescript/getShadowNodeFromRef.web.d.ts.map +1 -0
  755. package/lib/typescript/ghQueueMicrotask.d.ts +1 -0
  756. package/lib/typescript/ghQueueMicrotask.d.ts.map +1 -0
  757. package/lib/typescript/handlers/FlingGestureHandler.d.ts +1 -1
  758. package/lib/typescript/handlers/FlingGestureHandler.d.ts.map +1 -0
  759. package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +1 -0
  760. package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts.map +1 -0
  761. package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts +1 -0
  762. package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts.map +1 -0
  763. package/lib/typescript/handlers/LongPressGestureHandler.d.ts +1 -1
  764. package/lib/typescript/handlers/LongPressGestureHandler.d.ts.map +1 -0
  765. package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +1 -1
  766. package/lib/typescript/handlers/NativeViewGestureHandler.d.ts.map +1 -0
  767. package/lib/typescript/handlers/PanGestureHandler.d.ts +1 -1
  768. package/lib/typescript/handlers/PanGestureHandler.d.ts.map +1 -0
  769. package/lib/typescript/handlers/PinchGestureHandler.d.ts +1 -1
  770. package/lib/typescript/handlers/PinchGestureHandler.d.ts.map +1 -0
  771. package/lib/typescript/handlers/PressabilityDebugView.d.ts +1 -0
  772. package/lib/typescript/handlers/PressabilityDebugView.d.ts.map +1 -0
  773. package/lib/typescript/handlers/PressabilityDebugView.web.d.ts +1 -0
  774. package/lib/typescript/handlers/PressabilityDebugView.web.d.ts.map +1 -0
  775. package/lib/typescript/handlers/RotationGestureHandler.d.ts +1 -1
  776. package/lib/typescript/handlers/RotationGestureHandler.d.ts.map +1 -0
  777. package/lib/typescript/handlers/TapGestureHandler.d.ts +1 -1
  778. package/lib/typescript/handlers/TapGestureHandler.d.ts.map +1 -0
  779. package/lib/typescript/handlers/createHandler.d.ts +1 -0
  780. package/lib/typescript/handlers/createHandler.d.ts.map +1 -0
  781. package/lib/typescript/handlers/createNativeWrapper.d.ts +1 -0
  782. package/lib/typescript/handlers/createNativeWrapper.d.ts.map +1 -0
  783. package/lib/typescript/handlers/customDirectEventTypes.d.ts +1 -0
  784. package/lib/typescript/handlers/customDirectEventTypes.d.ts.map +1 -0
  785. package/lib/typescript/handlers/customDirectEventTypes.web.d.ts +1 -0
  786. package/lib/typescript/handlers/customDirectEventTypes.web.d.ts.map +1 -0
  787. package/lib/typescript/handlers/gestureHandlerCommon.d.ts +1 -0
  788. package/lib/typescript/handlers/gestureHandlerCommon.d.ts.map +1 -0
  789. package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts +1 -0
  790. package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts.map +1 -0
  791. package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts +1 -0
  792. package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts.map +1 -0
  793. package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts +3 -2
  794. package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts.map +1 -0
  795. package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts +1 -0
  796. package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts.map +1 -0
  797. package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts +1 -0
  798. package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts.map +1 -0
  799. package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts +1 -0
  800. package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts.map +1 -0
  801. package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts +1 -0
  802. package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts.map +1 -0
  803. package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts +1 -1
  804. package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts.map +1 -0
  805. package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts +1 -0
  806. package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts.map +1 -0
  807. package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts +1 -0
  808. package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts.map +1 -0
  809. package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts +1 -0
  810. package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts.map +1 -0
  811. package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts +1 -0
  812. package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts.map +1 -0
  813. package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts +1 -0
  814. package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts.map +1 -0
  815. package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts +1 -1
  816. package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts.map +1 -0
  817. package/lib/typescript/handlers/gestures/eventReceiver.d.ts +1 -0
  818. package/lib/typescript/handlers/gestures/eventReceiver.d.ts.map +1 -0
  819. package/lib/typescript/handlers/gestures/flingGesture.d.ts +1 -0
  820. package/lib/typescript/handlers/gestures/flingGesture.d.ts.map +1 -0
  821. package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts +1 -0
  822. package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts.map +1 -0
  823. package/lib/typescript/handlers/gestures/gesture.d.ts +1 -1
  824. package/lib/typescript/handlers/gestures/gesture.d.ts.map +1 -0
  825. package/lib/typescript/handlers/gestures/gestureComposition.d.ts +1 -0
  826. package/lib/typescript/handlers/gestures/gestureComposition.d.ts.map +1 -0
  827. package/lib/typescript/handlers/gestures/gestureObjects.d.ts +1 -0
  828. package/lib/typescript/handlers/gestures/gestureObjects.d.ts.map +1 -0
  829. package/lib/typescript/handlers/gestures/gestureStateManager.d.ts +1 -0
  830. package/lib/typescript/handlers/gestures/gestureStateManager.d.ts.map +1 -0
  831. package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts +1 -0
  832. package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts.map +1 -0
  833. package/lib/typescript/handlers/gestures/hoverGesture.d.ts +1 -0
  834. package/lib/typescript/handlers/gestures/hoverGesture.d.ts.map +1 -0
  835. package/lib/typescript/handlers/gestures/longPressGesture.d.ts +1 -0
  836. package/lib/typescript/handlers/gestures/longPressGesture.d.ts.map +1 -0
  837. package/lib/typescript/handlers/gestures/manualGesture.d.ts +1 -0
  838. package/lib/typescript/handlers/gestures/manualGesture.d.ts.map +1 -0
  839. package/lib/typescript/handlers/gestures/nativeGesture.d.ts +1 -0
  840. package/lib/typescript/handlers/gestures/nativeGesture.d.ts.map +1 -0
  841. package/lib/typescript/handlers/gestures/panGesture.d.ts +1 -0
  842. package/lib/typescript/handlers/gestures/panGesture.d.ts.map +1 -0
  843. package/lib/typescript/handlers/gestures/pinchGesture.d.ts +1 -0
  844. package/lib/typescript/handlers/gestures/pinchGesture.d.ts.map +1 -0
  845. package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts +1 -0
  846. package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts.map +1 -0
  847. package/lib/typescript/handlers/gestures/rotationGesture.d.ts +1 -0
  848. package/lib/typescript/handlers/gestures/rotationGesture.d.ts.map +1 -0
  849. package/lib/typescript/handlers/gestures/tapGesture.d.ts +1 -0
  850. package/lib/typescript/handlers/gestures/tapGesture.d.ts.map +1 -0
  851. package/lib/typescript/handlers/getNextHandlerTag.d.ts +1 -0
  852. package/lib/typescript/handlers/getNextHandlerTag.d.ts.map +1 -0
  853. package/lib/typescript/handlers/handlersRegistry.d.ts +1 -0
  854. package/lib/typescript/handlers/handlersRegistry.d.ts.map +1 -0
  855. package/lib/typescript/handlers/utils.d.ts +1 -0
  856. package/lib/typescript/handlers/utils.d.ts.map +1 -0
  857. package/lib/typescript/index.d.ts +1 -0
  858. package/lib/typescript/index.d.ts.map +1 -0
  859. package/lib/typescript/init.d.ts +1 -0
  860. package/lib/typescript/init.d.ts.map +1 -0
  861. package/lib/typescript/jestUtils/index.d.ts +1 -0
  862. package/lib/typescript/jestUtils/index.d.ts.map +1 -0
  863. package/lib/typescript/jestUtils/jestUtils.d.ts +1 -1
  864. package/lib/typescript/jestUtils/jestUtils.d.ts.map +1 -0
  865. package/lib/typescript/mocks.d.ts +1 -0
  866. package/lib/typescript/mocks.d.ts.map +1 -0
  867. package/lib/typescript/mountRegistry.d.ts +1 -1
  868. package/lib/typescript/mountRegistry.d.ts.map +1 -0
  869. package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts +1 -0
  870. package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts.map +1 -0
  871. package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts +1 -1
  872. package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts.map +1 -0
  873. package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +1 -1
  874. package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts.map +1 -0
  875. package/lib/typescript/typeUtils.d.ts +1 -0
  876. package/lib/typescript/typeUtils.d.ts.map +1 -0
  877. package/lib/typescript/utils.d.ts +1 -0
  878. package/lib/typescript/utils.d.ts.map +1 -0
  879. package/lib/typescript/web/Gestures.d.ts +1 -0
  880. package/lib/typescript/web/Gestures.d.ts.map +1 -0
  881. package/lib/typescript/web/constants.d.ts +1 -0
  882. package/lib/typescript/web/constants.d.ts.map +1 -0
  883. package/lib/typescript/web/detectors/RotationGestureDetector.d.ts +1 -0
  884. package/lib/typescript/web/detectors/RotationGestureDetector.d.ts.map +1 -0
  885. package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts +1 -0
  886. package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts.map +1 -0
  887. package/lib/typescript/web/handlers/FlingGestureHandler.d.ts +1 -0
  888. package/lib/typescript/web/handlers/FlingGestureHandler.d.ts.map +1 -0
  889. package/lib/typescript/web/handlers/GestureHandler.d.ts +1 -1
  890. package/lib/typescript/web/handlers/GestureHandler.d.ts.map +1 -0
  891. package/lib/typescript/web/handlers/HoverGestureHandler.d.ts +1 -0
  892. package/lib/typescript/web/handlers/HoverGestureHandler.d.ts.map +1 -0
  893. package/lib/typescript/web/handlers/IGestureHandler.d.ts +1 -0
  894. package/lib/typescript/web/handlers/IGestureHandler.d.ts.map +1 -0
  895. package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts +1 -1
  896. package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts.map +1 -0
  897. package/lib/typescript/web/handlers/ManualGestureHandler.d.ts +1 -0
  898. package/lib/typescript/web/handlers/ManualGestureHandler.d.ts.map +1 -0
  899. package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts +1 -1
  900. package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts.map +1 -0
  901. package/lib/typescript/web/handlers/PanGestureHandler.d.ts +1 -0
  902. package/lib/typescript/web/handlers/PanGestureHandler.d.ts.map +1 -0
  903. package/lib/typescript/web/handlers/PinchGestureHandler.d.ts +1 -1
  904. package/lib/typescript/web/handlers/PinchGestureHandler.d.ts.map +1 -0
  905. package/lib/typescript/web/handlers/RotationGestureHandler.d.ts +1 -1
  906. package/lib/typescript/web/handlers/RotationGestureHandler.d.ts.map +1 -0
  907. package/lib/typescript/web/handlers/TapGestureHandler.d.ts +1 -0
  908. package/lib/typescript/web/handlers/TapGestureHandler.d.ts.map +1 -0
  909. package/lib/typescript/web/interfaces.d.ts +1 -0
  910. package/lib/typescript/web/interfaces.d.ts.map +1 -0
  911. package/lib/typescript/web/tools/CircularBuffer.d.ts +1 -0
  912. package/lib/typescript/web/tools/CircularBuffer.d.ts.map +1 -0
  913. package/lib/typescript/web/tools/EventManager.d.ts +1 -0
  914. package/lib/typescript/web/tools/EventManager.d.ts.map +1 -0
  915. package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +1 -0
  916. package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts.map +1 -0
  917. package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts +1 -0
  918. package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts.map +1 -0
  919. package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +1 -0
  920. package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts.map +1 -0
  921. package/lib/typescript/web/tools/InteractionManager.d.ts +1 -0
  922. package/lib/typescript/web/tools/InteractionManager.d.ts.map +1 -0
  923. package/lib/typescript/web/tools/KeyboardEventManager.d.ts +1 -0
  924. package/lib/typescript/web/tools/KeyboardEventManager.d.ts.map +1 -0
  925. package/lib/typescript/web/tools/LeastSquareSolver.d.ts +1 -0
  926. package/lib/typescript/web/tools/LeastSquareSolver.d.ts.map +1 -0
  927. package/lib/typescript/web/tools/NodeManager.d.ts +1 -0
  928. package/lib/typescript/web/tools/NodeManager.d.ts.map +1 -0
  929. package/lib/typescript/web/tools/PointerEventManager.d.ts +1 -0
  930. package/lib/typescript/web/tools/PointerEventManager.d.ts.map +1 -0
  931. package/lib/typescript/web/tools/PointerTracker.d.ts +1 -0
  932. package/lib/typescript/web/tools/PointerTracker.d.ts.map +1 -0
  933. package/lib/typescript/web/tools/Vector.d.ts +1 -0
  934. package/lib/typescript/web/tools/Vector.d.ts.map +1 -0
  935. package/lib/typescript/web/tools/VelocityTracker.d.ts +1 -0
  936. package/lib/typescript/web/tools/VelocityTracker.d.ts.map +1 -0
  937. package/lib/typescript/web/tools/WheelEventManager.d.ts +1 -0
  938. package/lib/typescript/web/tools/WheelEventManager.d.ts.map +1 -0
  939. package/lib/typescript/web/utils.d.ts +1 -0
  940. package/lib/typescript/web/utils.d.ts.map +1 -0
  941. package/lib/typescript/web_hammer/DiscreteGestureHandler.d.ts +1 -0
  942. package/lib/typescript/web_hammer/DiscreteGestureHandler.d.ts.map +1 -0
  943. package/lib/typescript/web_hammer/DraggingGestureHandler.d.ts +1 -0
  944. package/lib/typescript/web_hammer/DraggingGestureHandler.d.ts.map +1 -0
  945. package/lib/typescript/web_hammer/Errors.d.ts +1 -0
  946. package/lib/typescript/web_hammer/Errors.d.ts.map +1 -0
  947. package/lib/typescript/web_hammer/FlingGestureHandler.d.ts +1 -0
  948. package/lib/typescript/web_hammer/FlingGestureHandler.d.ts.map +1 -0
  949. package/lib/typescript/web_hammer/GestureHandler.d.ts +1 -0
  950. package/lib/typescript/web_hammer/GestureHandler.d.ts.map +1 -0
  951. package/lib/typescript/web_hammer/IndiscreteGestureHandler.d.ts +1 -0
  952. package/lib/typescript/web_hammer/IndiscreteGestureHandler.d.ts.map +1 -0
  953. package/lib/typescript/web_hammer/LongPressGestureHandler.d.ts +1 -0
  954. package/lib/typescript/web_hammer/LongPressGestureHandler.d.ts.map +1 -0
  955. package/lib/typescript/web_hammer/NativeViewGestureHandler.d.ts +1 -0
  956. package/lib/typescript/web_hammer/NativeViewGestureHandler.d.ts.map +1 -0
  957. package/lib/typescript/web_hammer/NodeManager.d.ts +1 -0
  958. package/lib/typescript/web_hammer/NodeManager.d.ts.map +1 -0
  959. package/lib/typescript/web_hammer/PanGestureHandler.d.ts +1 -0
  960. package/lib/typescript/web_hammer/PanGestureHandler.d.ts.map +1 -0
  961. package/lib/typescript/web_hammer/PinchGestureHandler.d.ts +1 -0
  962. package/lib/typescript/web_hammer/PinchGestureHandler.d.ts.map +1 -0
  963. package/lib/typescript/web_hammer/PressGestureHandler.d.ts +1 -0
  964. package/lib/typescript/web_hammer/PressGestureHandler.d.ts.map +1 -0
  965. package/lib/typescript/web_hammer/RotationGestureHandler.d.ts +1 -0
  966. package/lib/typescript/web_hammer/RotationGestureHandler.d.ts.map +1 -0
  967. package/lib/typescript/web_hammer/TapGestureHandler.d.ts +1 -0
  968. package/lib/typescript/web_hammer/TapGestureHandler.d.ts.map +1 -0
  969. package/lib/typescript/web_hammer/constants.d.ts +1 -0
  970. package/lib/typescript/web_hammer/constants.d.ts.map +1 -0
  971. package/lib/typescript/web_hammer/utils.d.ts +1 -0
  972. package/lib/typescript/web_hammer/utils.d.ts.map +1 -0
  973. package/package.json +27 -47
  974. package/src/components/DrawerLayout.tsx +5 -2
  975. package/src/components/GestureButtons.tsx +2 -2
  976. package/src/components/GestureComponents.web.tsx +1 -1
  977. package/src/components/GestureHandlerButton.web.tsx +3 -3
  978. package/src/components/Pressable/Pressable.tsx +34 -9
  979. package/src/components/Pressable/PressableProps.tsx +19 -0
  980. package/src/components/ReanimatedSwipeable.tsx +55 -33
  981. package/src/components/Swipeable.tsx +3 -0
  982. package/src/components/Text.tsx +5 -2
  983. package/src/components/utils.ts +26 -0
  984. package/src/getShadowNodeFromRef.ts +2 -2
  985. package/src/handlers/createHandler.tsx +1 -0
  986. package/src/handlers/gestures/reanimatedWrapper.ts +0 -1
  987. package/src/handlers/utils.ts +1 -1
  988. package/src/utils.ts +0 -1
  989. package/src/web_hammer/DiscreteGestureHandler.ts +1 -1
  990. package/src/web_hammer/DraggingGestureHandler.ts +1 -1
  991. package/src/web_hammer/FlingGestureHandler.ts +1 -1
  992. package/src/web_hammer/GestureHandler.ts +2 -1
  993. package/src/web_hammer/LongPressGestureHandler.ts +1 -1
  994. package/README.md +0 -71
  995. package/android/packageDeprecated/src/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt +0 -85
  996. package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerDelegate.java +0 -60
  997. package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerInterface.java +0 -26
  998. package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerDelegate.java +0 -26
  999. package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerInterface.java +0 -16
  1000. package/android/paper77/src/main/java/com/swmansion/gesturehandler/NativeRNGestureHandlerModuleSpec.java +0 -67
  1001. package/android/paper77/src/main/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +0 -13
  1002. package/lib/commonjs/handlers/NativeViewGestureHandler.js +0 -35
  1003. package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +0 -1
  1004. package/lib/commonjs/handlers/gestures/nativeGesture.js +0 -44
  1005. package/lib/commonjs/handlers/gestures/nativeGesture.js.map +0 -1
  1006. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +0 -13
  1007. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +0 -1
  1008. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js +0 -15
  1009. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +0 -1
  1010. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js +0 -15
  1011. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +0 -1
  1012. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js +0 -189
  1013. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js.map +0 -1
  1014. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js +0 -66
  1015. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js.map +0 -1
  1016. package/lib/module/handlers/NativeViewGestureHandler.js +0 -19
  1017. package/lib/module/handlers/NativeViewGestureHandler.js.map +0 -1
  1018. package/lib/module/handlers/gestures/nativeGesture.js.map +0 -1
  1019. package/lib/module/specs/NativeRNGestureHandlerModule.js +0 -3
  1020. package/lib/module/specs/NativeRNGestureHandlerModule.js.map +0 -1
  1021. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js +0 -3
  1022. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +0 -1
  1023. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js +0 -3
  1024. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +0 -1
  1025. package/lib/module/web/handlers/NativeViewGestureHandler.js.map +0 -1
  1026. package/lib/module/web_hammer/NativeViewGestureHandler.js +0 -49
  1027. package/lib/module/web_hammer/NativeViewGestureHandler.js.map +0 -1
  1028. /package/android/{common → noreanimated}/src/main/java/com/swmansion/common/GestureHandlerStateManager.kt +0 -0
@@ -1 +1 @@
1
- {"version":3,"sources":["utils.ts"],"names":["numberAsInset","value","left","right","top","bottom","addInsets","a","b","touchDataToPressEvent","data","timestamp","targetId","identifier","id","locationX","x","locationY","y","pageX","absoluteX","pageY","absoluteY","target","touches","changedTouches","gestureToPressEvent","event","handlerTag","isTouchWithinInset","dimensions","inset","touch","width","height","gestureToPressableEvent","Date","now","pressEvent","nativeEvent","force","undefined","gestureTouchToPressableEvent","touchesList","allTouches","map","changedTouchesList","at"],"mappings":"AAYA,MAAMA,aAAa,GAAIC,KAAD,KAA4B;AAChDC,EAAAA,IAAI,EAAED,KAD0C;AAEhDE,EAAAA,KAAK,EAAEF,KAFyC;AAGhDG,EAAAA,GAAG,EAAEH,KAH2C;AAIhDI,EAAAA,MAAM,EAAEJ;AAJwC,CAA5B,CAAtB;;AAOA,MAAMK,SAAS,GAAG,CAACC,CAAD,EAAYC,CAAZ;AAAA;;AAAA,SAAmC;AACnDN,IAAAA,IAAI,EAAE,YAACK,CAAC,CAACL,IAAH,6CAAW,CAAX,gBAAiBM,CAAC,CAACN,IA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AAwB3B,SAA1B,2EAAuC,CAAC,CANlC;AAOXC,MAAAA,KAAK,qDAAEM,KAAK,CAACiB,UAAN,CAAiBG,EAAjB,CAAoB,CAApB,CAAF,0DAAE,sBAAwBzB,SAA1B,2EAAuC,CAAC,CAPlC;AAQXC,MAAAA,MAAM,EAAEX,QARG;AASXD,MAAAA,SAAS,EAAEA,SATA;AAUX6B,MAAAA,KAAK,EAAEC;AAVI;AADR,GAAP;AAcD,CA7BD;;AA+BA,SACEzC,aADF,EAEEM,SAFF,EAGEuB,kBAHF,EAIEM,uBAJF,EAKEO,4BALF","sourcesContent":["import { Insets } from 'react-native';\nimport {\n HoverGestureHandlerEventPayload,\n LongPressGestureHandlerEventPayload,\n} from '../../handlers/GestureHandlerEventPayload';\nimport {\n TouchData,\n GestureStateChangeEvent,\n GestureTouchEvent,\n} from '../../handlers/gestureHandlerCommon';\nimport { InnerPressableEvent, PressableEvent } from './PressableProps';\n\nconst numberAsInset = (value: number): Insets => ({\n left: value,\n right: value,\n top: value,\n bottom: value,\n});\n\nconst addInsets = (a: Insets, b: Insets): Insets => ({\n left: (a.left ?? 0) + (b.left ?? 0),\n right: (a.right ?? 0) + (b.right ?? 0),\n top: (a.top ?? 0) + (b.top ?? 0),\n bottom: (a.bottom ?? 0) + (b.bottom ?? 0),\n});\n\nconst touchDataToPressEvent = (\n data: TouchData,\n timestamp: number,\n targetId: number\n): InnerPressableEvent => ({\n identifier: data.id,\n locationX: data.x,\n locationY: data.y,\n pageX: data.absoluteX,\n pageY: data.absoluteY,\n target: targetId,\n timestamp: timestamp,\n touches: [], // Always empty - legacy compatibility\n changedTouches: [], // Always empty - legacy compatibility\n});\n\nconst gestureToPressEvent = (\n event: GestureStateChangeEvent<\n HoverGestureHandlerEventPayload | LongPressGestureHandlerEventPayload\n >,\n timestamp: number,\n targetId: number\n): InnerPressableEvent => ({\n identifier: event.handlerTag,\n locationX: event.x,\n locationY: event.y,\n pageX: event.absoluteX,\n pageY: event.absoluteY,\n target: targetId,\n timestamp: timestamp,\n touches: [], // Always empty - legacy compatibility\n changedTouches: [], // Always empty - legacy compatibility\n});\n\nconst isTouchWithinInset = (\n dimensions: { width: number; height: number },\n inset: Insets,\n touch?: TouchData\n) =>\n (touch?.x ?? 0) < (inset.right ?? 0) + dimensions.width &&\n (touch?.y ?? 0) < (inset.bottom ?? 0) + dimensions.height &&\n (touch?.x ?? 0) > -(inset.left ?? 0) &&\n (touch?.y ?? 0) > -(inset.top ?? 0);\n\nconst gestureToPressableEvent = (\n event: GestureStateChangeEvent<\n HoverGestureHandlerEventPayload | LongPressGestureHandlerEventPayload\n >\n): PressableEvent => {\n const timestamp = Date.now();\n\n // As far as I can see, there isn't a conventional way of getting targetId with the data we get\n const targetId = 0;\n\n const pressEvent = gestureToPressEvent(event, timestamp, targetId);\n\n return {\n nativeEvent: {\n touches: [pressEvent],\n changedTouches: [pressEvent],\n identifier: pressEvent.identifier,\n locationX: event.x,\n locationY: event.y,\n pageX: event.absoluteX,\n pageY: event.absoluteY,\n target: targetId,\n timestamp: timestamp,\n force: undefined,\n },\n };\n};\n\nconst gestureTouchToPressableEvent = (\n event: GestureTouchEvent\n): PressableEvent => {\n const timestamp = Date.now();\n\n // As far as I can see, there isn't a conventional way of getting targetId with the data we get\n const targetId = 0;\n\n const touchesList = event.allTouches.map((touch: TouchData) =>\n touchDataToPressEvent(touch, timestamp, targetId)\n );\n const changedTouchesList = event.changedTouches.map((touch: TouchData) =>\n touchDataToPressEvent(touch, timestamp, targetId)\n );\n\n return {\n nativeEvent: {\n touches: touchesList,\n changedTouches: changedTouchesList,\n identifier: event.handlerTag,\n locationX: event.allTouches.at(0)?.x ?? -1,\n locationY: event.allTouches.at(0)?.y ?? -1,\n pageX: event.allTouches.at(0)?.absoluteX ?? -1,\n pageY: event.allTouches.at(0)?.absoluteY ?? -1,\n target: targetId,\n timestamp: timestamp,\n force: undefined,\n },\n };\n};\n\nexport {\n numberAsInset,\n addInsets,\n isTouchWithinInset,\n gestureToPressableEvent,\n gestureTouchToPressableEvent,\n};\n"]}
1
+ {"version":3,"names":["numberAsInset","value","left","right","top","bottom","addInsets","a","b","touchDataToPressEvent","data","timestamp","targetId","identifier","id","locationX","x","locationY","y","pageX","absoluteX","pageY","absoluteY","target","touches","changedTouches","gestureToPressEvent","event","handlerTag","isTouchWithinInset","dimensions","inset","touch","width","height","gestureToPressableEvent","Date","now","pressEvent","nativeEvent","force","undefined","gestureTouchToPressableEvent","touchesList","allTouches","map","changedTouchesList","at"],"sourceRoot":"../../../../src","sources":["components/Pressable/utils.ts"],"mappings":";;AAYA,MAAMA,aAAa,GAAIC,KAAa,KAAc;EAChDC,IAAI,EAAED,KAAK;EACXE,KAAK,EAAEF,KAAK;EACZG,GAAG,EAAEH,KAAK;EACVI,MAAM,EAAEJ;AACV,CAAC,CAAC;AAEF,MAAMK,SAAS,GAAGA,CAACC,CAAS,EAAEC,CAAS,MAAc;EACnDN,IAAI,EAAE,CAACK,CAAC,CAACL,IAAI,IAAI,CAAC,KAAKM,CAAC,CAACN,IAAI,IAAI,CAAC,CAAC;EACnCC,KAAK,EAAE,CAACI,CAAC,CAACJ,KAAK,IAAI,CAAC,KAAKK,CAAC,CAACL,KAAK,IAAI,CAAC,CAAC;EACtCC,GAAG,EAAE,CAACG,CAAC,CAACH,GAAG,IAAI,CAAC,KAAKI,CAAC,CAACJ,GAAG,IAAI,CAAC,CAAC;EAChCC,MAAM,EAAE,CAACE,CAAC,CAACF,MAAM,IAAI,CAAC,KAAKG,CAAC,CAACH,MAAM,IAAI,CAAC;AAC1C,CAAC,CAAC;AAEF,MAAMI,qBAAqB,GAAGA,CAC5BC,IAAe,EACfC,SAAiB,EACjBC,QAAgB,MACS;EACzBC,UAAU,EAAEH,IAAI,CAACI,EAAE;EACnBC,SAAS,EAAEL,IAAI,CAACM,CAAC;EACjBC,SAAS,EAAEP,IAAI,CAACQ,CAAC;EACjBC,KAAK,EAAET,IAAI,CAACU,SAAS;EACrBC,KAAK,EAAEX,IAAI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AEQ,KAAK,CAACiB,UAAU,CAACG,EAAE,CAAC,CAAC,CAAC,EAAE3B,SAAS,IAAI,CAAC,CAAC;MAC9CC,KAAK,EAAEM,KAAK,CAACiB,UAAU,CAACG,EAAE,CAAC,CAAC,CAAC,EAAEzB,SAAS,IAAI,CAAC,CAAC;MAC9CC,MAAM,EAAEX,QAAQ;MAChBD,SAAS,EAAEA,SAAS;MACpB6B,KAAK,EAAEC;IACT;EACF,CAAC;AACH,CAAC;AAED,SACEzC,aAAa,EACbM,SAAS,EACTuB,kBAAkB,EAClBM,uBAAuB,EACvBO,4BAA4B","ignoreList":[]}
@@ -1,51 +1,45 @@
1
+ "use strict";
2
+
1
3
  // This component is based on RN's DrawerLayoutAndroid API
2
4
  // It's cross-compatible with all platforms despite
3
5
  // `DrawerLayoutAndroid` only being available on android
6
+
4
7
  import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useState } from 'react';
5
8
  import { StyleSheet, Keyboard, StatusBar, I18nManager, Platform } from 'react-native';
6
9
  import Animated, { Extrapolation, interpolate, runOnJS, useAnimatedProps, useAnimatedStyle, useDerivedValue, useSharedValue, withSpring } from 'react-native-reanimated';
7
10
  import { GestureObjects as Gesture } from '../handlers/gestures/gestureObjects';
8
11
  import { GestureDetector } from '../handlers/gestures/GestureDetector';
9
12
  import { MouseButton } from '../handlers/gestureHandlerCommon';
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
14
  const DRAG_TOSS = 0.05;
11
- export let DrawerPosition;
12
-
13
- (function (DrawerPosition) {
15
+ export let DrawerPosition = /*#__PURE__*/function (DrawerPosition) {
14
16
  DrawerPosition[DrawerPosition["LEFT"] = 0] = "LEFT";
15
17
  DrawerPosition[DrawerPosition["RIGHT"] = 1] = "RIGHT";
16
- })(DrawerPosition || (DrawerPosition = {}));
17
-
18
- export let DrawerState;
19
-
20
- (function (DrawerState) {
18
+ return DrawerPosition;
19
+ }({});
20
+ export let DrawerState = /*#__PURE__*/function (DrawerState) {
21
21
  DrawerState[DrawerState["IDLE"] = 0] = "IDLE";
22
22
  DrawerState[DrawerState["DRAGGING"] = 1] = "DRAGGING";
23
23
  DrawerState[DrawerState["SETTLING"] = 2] = "SETTLING";
24
- })(DrawerState || (DrawerState = {}));
25
-
26
- export let DrawerType;
27
-
28
- (function (DrawerType) {
24
+ return DrawerState;
25
+ }({});
26
+ export let DrawerType = /*#__PURE__*/function (DrawerType) {
29
27
  DrawerType[DrawerType["FRONT"] = 0] = "FRONT";
30
28
  DrawerType[DrawerType["BACK"] = 1] = "BACK";
31
29
  DrawerType[DrawerType["SLIDE"] = 2] = "SLIDE";
32
- })(DrawerType || (DrawerType = {}));
33
-
34
- export let DrawerLockMode;
35
-
36
- (function (DrawerLockMode) {
30
+ return DrawerType;
31
+ }({});
32
+ export let DrawerLockMode = /*#__PURE__*/function (DrawerLockMode) {
37
33
  DrawerLockMode[DrawerLockMode["UNLOCKED"] = 0] = "UNLOCKED";
38
34
  DrawerLockMode[DrawerLockMode["LOCKED_CLOSED"] = 1] = "LOCKED_CLOSED";
39
35
  DrawerLockMode[DrawerLockMode["LOCKED_OPEN"] = 2] = "LOCKED_OPEN";
40
- })(DrawerLockMode || (DrawerLockMode = {}));
41
-
42
- export let DrawerKeyboardDismissMode;
43
-
44
- (function (DrawerKeyboardDismissMode) {
36
+ return DrawerLockMode;
37
+ }({});
38
+ export let DrawerKeyboardDismissMode = /*#__PURE__*/function (DrawerKeyboardDismissMode) {
45
39
  DrawerKeyboardDismissMode[DrawerKeyboardDismissMode["NONE"] = 0] = "NONE";
46
40
  DrawerKeyboardDismissMode[DrawerKeyboardDismissMode["ON_DRAG"] = 1] = "ON_DRAG";
47
- })(DrawerKeyboardDismissMode || (DrawerKeyboardDismissMode = {}));
48
-
41
+ return DrawerKeyboardDismissMode;
42
+ }({});
49
43
  const defaultProps = {
50
44
  drawerWidth: 200,
51
45
  drawerPosition: DrawerPosition.LEFT,
@@ -58,8 +52,9 @@ const defaultProps = {
58
52
  activeCursor: 'auto',
59
53
  mouseButton: MouseButton.LEFT,
60
54
  statusBarAnimation: 'slide'
61
- }; // StatusBar.setHidden and Keyboard.dismiss cannot be directly referenced in worklets.
55
+ };
62
56
 
57
+ // StatusBar.setHidden and Keyboard.dismiss cannot be directly referenced in worklets.
63
58
  const setStatusBarHidden = StatusBar.setHidden;
64
59
  const dismissKeyboard = Keyboard.dismiss;
65
60
  const DrawerLayout = /*#__PURE__*/forwardRef(function DrawerLayout(props, ref) {
@@ -93,7 +88,9 @@ const DrawerLayout = /*#__PURE__*/forwardRef(function DrawerLayout(props, ref) {
93
88
  animationSpeed: animationSpeedProp
94
89
  } = props;
95
90
  const isFromLeft = drawerPosition === DrawerPosition.LEFT;
96
- const sideCorrection = isFromLeft ? 1 : -1; // While closing the drawer when user starts gesture in the greyed out part of the window,
91
+ const sideCorrection = isFromLeft ? 1 : -1;
92
+
93
+ // While closing the drawer when user starts gesture in the greyed out part of the window,
97
94
  // we want the drawer to follow only once the finger reaches the edge of the drawer.
98
95
  // See the diagram for reference. * = starting finger position, < = current finger position
99
96
  // 1) +---------------+ 2) +---------------+ 3) +---------------+ 4) +---------------+
@@ -109,36 +106,34 @@ const DrawerLayout = /*#__PURE__*/forwardRef(function DrawerLayout(props, ref) {
109
106
  onDrawerSlide && runOnJS(onDrawerSlide)(openValue.value);
110
107
  }, []);
111
108
  const isDrawerOpen = useSharedValue(false);
112
-
113
109
  const handleContainerLayout = ({
114
110
  nativeEvent
115
111
  }) => {
116
112
  setContainerWidth(nativeEvent.layout.width);
117
113
  };
118
-
119
114
  const emitStateChanged = useCallback((newState, drawerWillShow) => {
120
115
  'worklet';
121
116
 
122
- var _runOnJS;
123
-
124
- onDrawerStateChanged && ((_runOnJS = runOnJS(onDrawerStateChanged)) === null || _runOnJS === void 0 ? void 0 : _runOnJS(newState, drawerWillShow));
117
+ onDrawerStateChanged && runOnJS(onDrawerStateChanged)?.(newState, drawerWillShow);
125
118
  }, [onDrawerStateChanged]);
126
119
  const drawerAnimatedProps = useAnimatedProps(() => ({
127
120
  accessibilityViewIsModal: isDrawerOpen.value
128
121
  }));
129
122
  const overlayAnimatedProps = useAnimatedProps(() => ({
130
123
  pointerEvents: isDrawerOpen.value ? 'auto' : 'none'
131
- })); // While the drawer is hidden, it's hitSlop overflows onto the main view by edgeWidth
132
- // This way it can be swiped open even when it's hidden
124
+ }));
133
125
 
126
+ // While the drawer is hidden, it's hitSlop overflows onto the main view by edgeWidth
127
+ // This way it can be swiped open even when it's hidden
134
128
  const [edgeHitSlop, setEdgeHitSlop] = useState(isFromLeft ? {
135
129
  left: 0,
136
130
  width: edgeWidth
137
131
  } : {
138
132
  right: 0,
139
133
  width: edgeWidth
140
- }); // gestureOrientation is 1 if the gesture is expected to move from left to right and -1 otherwise
134
+ });
141
135
 
136
+ // gestureOrientation is 1 if the gesture is expected to move from left to right and -1 otherwise
142
137
  const gestureOrientation = useMemo(() => sideCorrection * (drawerOpened ? -1 : 1), [sideCorrection, drawerOpened]);
143
138
  useEffect(() => {
144
139
  setEdgeHitSlop(isFromLeft ? {
@@ -156,17 +151,15 @@ const DrawerLayout = /*#__PURE__*/forwardRef(function DrawerLayout(props, ref) {
156
151
  isDrawerOpen.value = willShow;
157
152
  emitStateChanged(DrawerState.SETTLING, willShow);
158
153
  runOnJS(setDrawerState)(DrawerState.SETTLING);
159
-
160
154
  if (hideStatusBar) {
161
155
  runOnJS(setStatusBarHidden)(willShow, statusBarAnimation);
162
156
  }
163
-
164
157
  const normalizedToValue = interpolate(toValue, [0, drawerWidth], [0, 1], Extrapolation.CLAMP);
165
158
  const normalizedInitialVelocity = interpolate(initialVelocity, [0, drawerWidth], [0, 1], Extrapolation.CLAMP);
166
159
  openValue.value = withSpring(normalizedToValue, {
167
160
  overshootClamping: true,
168
161
  velocity: normalizedInitialVelocity,
169
- mass: animationSpeed ? 1 / animationSpeed : 1 / (animationSpeedProp !== null && animationSpeedProp !== void 0 ? animationSpeedProp : 1),
162
+ mass: animationSpeed ? 1 / animationSpeed : 1 / (animationSpeedProp ?? 1),
170
163
  damping: 40,
171
164
  stiffness: 500
172
165
  }, finished => {
@@ -174,15 +167,10 @@ const DrawerLayout = /*#__PURE__*/forwardRef(function DrawerLayout(props, ref) {
174
167
  emitStateChanged(DrawerState.IDLE, willShow);
175
168
  runOnJS(setDrawerOpened)(willShow);
176
169
  runOnJS(setDrawerState)(DrawerState.IDLE);
177
-
178
170
  if (willShow) {
179
- var _runOnJS2;
180
-
181
- onDrawerOpen && ((_runOnJS2 = runOnJS(onDrawerOpen)) === null || _runOnJS2 === void 0 ? void 0 : _runOnJS2());
171
+ onDrawerOpen && runOnJS(onDrawerOpen)?.();
182
172
  } else {
183
- var _runOnJS3;
184
-
185
- onDrawerClose && ((_runOnJS3 = runOnJS(onDrawerClose)) === null || _runOnJS3 === void 0 ? void 0 : _runOnJS3());
173
+ onDrawerClose && runOnJS(onDrawerClose)?.();
186
174
  }
187
175
  }
188
176
  });
@@ -195,7 +183,6 @@ const DrawerLayout = /*#__PURE__*/forwardRef(function DrawerLayout(props, ref) {
195
183
  velocityX,
196
184
  x: touchX
197
185
  } = event;
198
-
199
186
  if (drawerPosition !== DrawerPosition.LEFT) {
200
187
  // See description in _updateAnimatedEvent about why events are flipped
201
188
  // for right-side drawer
@@ -203,18 +190,14 @@ const DrawerLayout = /*#__PURE__*/forwardRef(function DrawerLayout(props, ref) {
203
190
  touchX = containerWidth - touchX;
204
191
  velocityX = -velocityX;
205
192
  }
206
-
207
193
  const gestureStartX = touchX - dragX;
208
194
  let dragOffsetBasedOnStart = 0;
209
-
210
195
  if (drawerType === DrawerType.FRONT) {
211
196
  dragOffsetBasedOnStart = gestureStartX > drawerWidth ? gestureStartX - drawerWidth : 0;
212
197
  }
213
-
214
198
  const startOffsetX = dragX + dragOffsetBasedOnStart + (isDrawerOpen.value ? drawerWidth : 0);
215
199
  const projOffsetX = startOffsetX + DRAG_TOSS * velocityX;
216
200
  const shouldOpen = projOffsetX > drawerWidth / 2;
217
-
218
201
  if (shouldOpen) {
219
202
  animateDrawer(drawerWidth, velocityX);
220
203
  } else {
@@ -224,16 +207,12 @@ const DrawerLayout = /*#__PURE__*/forwardRef(function DrawerLayout(props, ref) {
224
207
  const openDrawer = useCallback((options = {}) => {
225
208
  'worklet';
226
209
 
227
- var _options$initialVeloc;
228
-
229
- animateDrawer(drawerWidth, (_options$initialVeloc = options.initialVelocity) !== null && _options$initialVeloc !== void 0 ? _options$initialVeloc : 0, options.animationSpeed);
210
+ animateDrawer(drawerWidth, options.initialVelocity ?? 0, options.animationSpeed);
230
211
  }, [animateDrawer, drawerWidth]);
231
212
  const closeDrawer = useCallback((options = {}) => {
232
213
  'worklet';
233
214
 
234
- var _options$initialVeloc2;
235
-
236
- animateDrawer(0, (_options$initialVeloc2 = options.initialVelocity) !== null && _options$initialVeloc2 !== void 0 ? _options$initialVeloc2 : 0, options.animationSpeed);
215
+ animateDrawer(0, options.initialVelocity ?? 0, options.animationSpeed);
237
216
  }, [animateDrawer]);
238
217
  const overlayDismissGesture = useMemo(() => Gesture.Tap().maxDistance(25).onEnd(() => {
239
218
  if (isDrawerOpen.value && drawerLockMode !== DrawerLockMode.LOCKED_OPEN) {
@@ -253,11 +232,9 @@ const DrawerLayout = /*#__PURE__*/forwardRef(function DrawerLayout(props, ref) {
253
232
  return Gesture.Pan().activeCursor(activeCursor).mouseButton(mouseButton).hitSlop(drawerOpened ? fillHitSlop : edgeHitSlop).minDistance(drawerOpened ? 100 : 0).activeOffsetX(gestureOrientation * minSwipeDistance).failOffsetY([-15, 15]).simultaneousWithExternalGesture(overlayDismissGesture).enableTrackpadTwoFingerGesture(enableTrackpadTwoFingerGesture).enabled(drawerState !== DrawerState.SETTLING && (drawerOpened ? drawerLockMode !== DrawerLockMode.LOCKED_OPEN : drawerLockMode !== DrawerLockMode.LOCKED_CLOSED)).onStart(() => {
254
233
  emitStateChanged(DrawerState.DRAGGING, false);
255
234
  runOnJS(setDrawerState)(DrawerState.DRAGGING);
256
-
257
235
  if (keyboardDismissMode === DrawerKeyboardDismissMode.ON_DRAG) {
258
236
  runOnJS(dismissKeyboard)();
259
237
  }
260
-
261
238
  if (hideStatusBar) {
262
239
  runOnJS(setStatusBarHidden)(true, statusBarAnimation);
263
240
  }
@@ -267,8 +244,9 @@ const DrawerLayout = /*#__PURE__*/forwardRef(function DrawerLayout(props, ref) {
267
244
  const adjustedTranslation = Math.max(drawerOpened ? startedOutsideTranslation : 0, startedInsideTranslation);
268
245
  openValue.value = interpolate(adjustedTranslation, [-drawerWidth, 0, drawerWidth], [1, 0, 1], Extrapolation.CLAMP);
269
246
  }).onEnd(handleRelease);
270
- }, [drawerLockMode, openValue, drawerWidth, emitStateChanged, gestureOrientation, handleRelease, edgeHitSlop, fillHitSlop, minSwipeDistance, hideStatusBar, keyboardDismissMode, overlayDismissGesture, drawerOpened, isFromLeft, containerWidth, sideCorrection, drawerState, activeCursor, enableTrackpadTwoFingerGesture, mouseButton, statusBarAnimation]); // When using RTL, row and row-reverse flex directions are flipped.
247
+ }, [drawerLockMode, openValue, drawerWidth, emitStateChanged, gestureOrientation, handleRelease, edgeHitSlop, fillHitSlop, minSwipeDistance, hideStatusBar, keyboardDismissMode, overlayDismissGesture, drawerOpened, isFromLeft, containerWidth, sideCorrection, drawerState, activeCursor, enableTrackpadTwoFingerGesture, mouseButton, statusBarAnimation]);
271
248
 
249
+ // When using RTL, row and row-reverse flex directions are flipped.
272
250
  const reverseContentDirection = I18nManager.isRTL ? isFromLeft : !isFromLeft;
273
251
  const dynamicDrawerStyles = {
274
252
  backgroundColor: drawerBackgroundColor,
@@ -278,7 +256,6 @@ const DrawerLayout = /*#__PURE__*/forwardRef(function DrawerLayout(props, ref) {
278
256
  if (drawerType === DrawerType.FRONT) {
279
257
  return {};
280
258
  }
281
-
282
259
  return {
283
260
  transform: [{
284
261
  translateX: interpolate(openValue.value, [0, 1], [0, drawerWidth * sideCorrection], Extrapolation.CLAMP)
@@ -289,7 +266,6 @@ const DrawerLayout = /*#__PURE__*/forwardRef(function DrawerLayout(props, ref) {
289
266
  const closedDrawerOffset = drawerWidth * -sideCorrection;
290
267
  const isBack = drawerType === DrawerType.BACK;
291
268
  const isIdle = drawerState === DrawerState.IDLE;
292
-
293
269
  if (isBack) {
294
270
  return {
295
271
  transform: [{
@@ -298,15 +274,12 @@ const DrawerLayout = /*#__PURE__*/forwardRef(function DrawerLayout(props, ref) {
298
274
  flexDirection: reverseContentDirection ? 'row-reverse' : 'row'
299
275
  };
300
276
  }
301
-
302
277
  let translateX = 0;
303
-
304
278
  if (isIdle) {
305
279
  translateX = drawerOpened ? 0 : closedDrawerOffset;
306
280
  } else {
307
281
  translateX = interpolate(openValue.value, [0, 1], [closedDrawerOffset, 0], Extrapolation.CLAMP);
308
282
  }
309
-
310
283
  return {
311
284
  transform: [{
312
285
  translateX
@@ -323,46 +296,56 @@ const DrawerLayout = /*#__PURE__*/forwardRef(function DrawerLayout(props, ref) {
323
296
  openDrawer,
324
297
  closeDrawer
325
298
  }), [openDrawer, closeDrawer]);
326
- return /*#__PURE__*/React.createElement(GestureDetector, {
299
+ return /*#__PURE__*/_jsx(GestureDetector, {
327
300
  gesture: panGesture,
328
301
  userSelect: userSelect,
329
- enableContextMenu: enableContextMenu
330
- }, /*#__PURE__*/React.createElement(Animated.View, {
331
- style: styles.main,
332
- onLayout: handleContainerLayout
333
- }, /*#__PURE__*/React.createElement(GestureDetector, {
334
- gesture: overlayDismissGesture
335
- }, /*#__PURE__*/React.createElement(Animated.View, {
336
- style: [drawerType === DrawerType.FRONT ? styles.containerOnBack : styles.containerInFront, containerStyles, contentContainerStyle],
337
- animatedProps: containerAnimatedProps
338
- }, children, /*#__PURE__*/React.createElement(Animated.View, {
339
- animatedProps: overlayAnimatedProps,
340
- style: [styles.overlay, overlayAnimatedStyle]
341
- }))), /*#__PURE__*/React.createElement(Animated.View, {
342
- pointerEvents: "box-none",
343
- animatedProps: drawerAnimatedProps,
344
- style: [styles.drawerContainer, drawerAnimatedStyle, drawerContainerStyle]
345
- }, /*#__PURE__*/React.createElement(Animated.View, {
346
- style: dynamicDrawerStyles
347
- }, renderNavigationView(openValue)))));
302
+ enableContextMenu: enableContextMenu,
303
+ children: /*#__PURE__*/_jsxs(Animated.View, {
304
+ style: styles.main,
305
+ onLayout: handleContainerLayout,
306
+ children: [/*#__PURE__*/_jsx(GestureDetector, {
307
+ gesture: overlayDismissGesture,
308
+ children: /*#__PURE__*/_jsxs(Animated.View, {
309
+ style: [drawerType === DrawerType.FRONT ? styles.containerOnBack : styles.containerInFront, containerStyles, contentContainerStyle],
310
+ animatedProps: containerAnimatedProps,
311
+ children: [children, /*#__PURE__*/_jsx(Animated.View, {
312
+ animatedProps: overlayAnimatedProps,
313
+ style: [styles.overlay, overlayAnimatedStyle]
314
+ })]
315
+ })
316
+ }), /*#__PURE__*/_jsx(Animated.View, {
317
+ pointerEvents: "box-none",
318
+ animatedProps: drawerAnimatedProps,
319
+ style: [styles.drawerContainer, drawerAnimatedStyle, drawerContainerStyle],
320
+ children: /*#__PURE__*/_jsx(Animated.View, {
321
+ style: dynamicDrawerStyles,
322
+ children: renderNavigationView(openValue)
323
+ })
324
+ })]
325
+ })
326
+ });
348
327
  });
349
328
  export default DrawerLayout;
350
329
  const styles = StyleSheet.create({
351
- drawerContainer: { ...StyleSheet.absoluteFillObject,
330
+ drawerContainer: {
331
+ ...StyleSheet.absoluteFillObject,
352
332
  zIndex: 1001,
353
333
  flexDirection: 'row'
354
334
  },
355
- containerInFront: { ...StyleSheet.absoluteFillObject,
335
+ containerInFront: {
336
+ ...StyleSheet.absoluteFillObject,
356
337
  zIndex: 1002
357
338
  },
358
- containerOnBack: { ...StyleSheet.absoluteFillObject
339
+ containerOnBack: {
340
+ ...StyleSheet.absoluteFillObject
359
341
  },
360
342
  main: {
361
343
  flex: 1,
362
344
  zIndex: 0,
363
345
  overflow: 'hidden'
364
346
  },
365
- overlay: { ...StyleSheet.absoluteFillObject,
347
+ overlay: {
348
+ ...StyleSheet.absoluteFillObject,
366
349
  zIndex: 1000
367
350
  }
368
351
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["ReanimatedDrawerLayout.tsx"],"names":["React","forwardRef","useCallback","useEffect","useImperativeHandle","useMemo","useState","StyleSheet","Keyboard","StatusBar","I18nManager","Platform","Animated","Extrapolation","interpolate","runOnJS","useAnimatedProps","useAnimatedStyle","useDerivedValue","useSharedValue","withSpring","GestureObjects","Gesture","GestureDetector","MouseButton","DRAG_TOSS","DrawerPosition","DrawerState","DrawerType","DrawerLockMode","DrawerKeyboardDismissMode","defaultProps","drawerWidth","drawerPosition","LEFT","drawerType","FRONT","edgeWidth","minSwipeDistance","overlayColor","drawerLockMode","UNLOCKED","enableTrackpadTwoFingerGesture","activeCursor","mouseButton","statusBarAnimation","setStatusBarHidden","setHidden","dismissKeyboard","dismiss","DrawerLayout","props","ref","containerWidth","setContainerWidth","drawerState","setDrawerState","IDLE","drawerOpened","setDrawerOpened","drawerBackgroundColor","drawerContainerStyle","contentContainerStyle","hideStatusBar","keyboardDismissMode","userSelect","enableContextMenu","renderNavigationView","onDrawerSlide","onDrawerClose","onDrawerOpen","onDrawerStateChanged","animationSpeed","animationSpeedProp","isFromLeft","sideCorrection","openValue","value","isDrawerOpen","handleContainerLayout","nativeEvent","layout","width","emitStateChanged","newState","drawerWillShow","drawerAnimatedProps","accessibilityViewIsModal","overlayAnimatedProps","pointerEvents","edgeHitSlop","setEdgeHitSlop","left","right","gestureOrientation","animateDrawer","toValue","initialVelocity","willShow","SETTLING","normalizedToValue","CLAMP","normalizedInitialVelocity","overshootClamping","velocity","mass","damping","stiffness","finished","handleRelease","event","translationX","dragX","velocityX","x","touchX","gestureStartX","dragOffsetBasedOnStart","startOffsetX","projOffsetX","shouldOpen","openDrawer","options","closeDrawer","overlayDismissGesture","Tap","maxDistance","onEnd","LOCKED_OPEN","overlayAnimatedStyle","opacity","backgroundColor","fillHitSlop","panGesture","Pan","hitSlop","minDistance","activeOffsetX","failOffsetY","simultaneousWithExternalGesture","enabled","LOCKED_CLOSED","onStart","DRAGGING","ON_DRAG","onUpdate","startedOutsideTranslation","startedInsideTranslation","adjustedTranslation","Math","max","reverseContentDirection","isRTL","dynamicDrawerStyles","containerStyles","transform","translateX","drawerAnimatedStyle","closedDrawerOffset","isBack","BACK","isIdle","flexDirection","containerAnimatedProps","importantForAccessibility","OS","undefined","children","styles","main","containerOnBack","containerInFront","overlay","drawerContainer","create","absoluteFillObject","zIndex","flex","overflow"],"mappings":"AAAA;AACA;AACA;AAEA,OAAOA,KAAP,IAEEC,UAFF,EAGEC,WAHF,EAIEC,SAJF,EAKEC,mBALF,EAMEC,OANF,EAOEC,QAPF,QAQO,OARP;AAUA,SACEC,UADF,EAEEC,QAFF,EAGEC,SAHF,EAIEC,WAJF,EASEC,QATF,QAUO,cAVP;AAYA,OAAOC,QAAP,IACEC,aADF,EAGEC,WAHF,EAIEC,OAJF,EAKEC,gBALF,EAMEC,gBANF,EAOEC,eAPF,EAQEC,cARF,EASEC,UATF,QAUO,yBAVP;AAYA,SAASC,cAAc,IAAIC,OAA3B,QAA0C,qCAA1C;AACA,SAASC,eAAT,QAAgC,sCAAhC;AACA,SAGEC,WAHF,QAMO,kCANP;AASA,MAAMC,SAAS,GAAG,IAAlB;AAEA,WAAYC,cAAZ;;WAAYA,c;AAAAA,EAAAA,c,CAAAA,c;AAAAA,EAAAA,c,CAAAA,c;GAAAA,c,KAAAA,c;;AAKZ,WAAYC,WAAZ;;WAAYA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;GAAAA,W,KAAAA,W;;AAMZ,WAAYC,UAAZ;;WAAYA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;GAAAA,U,KAAAA,U;;AAMZ,WAAYC,cAAZ;;WAAYA,c;AAAAA,EAAAA,c,CAAAA,c;AAAAA,EAAAA,c,CA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IAAAA,IAAI,EAAE,CADF;AAEJD,IAAAA,MAAM,EAAE,CAFJ;AAGJE,IAAAA,QAAQ,EAAE;AAHN,GAbyB;AAkB/BN,EAAAA,OAAO,EAAE,EACP,GAAGrK,UAAU,CAACwK,kBADP;AAEPC,IAAAA,MAAM,EAAE;AAFD;AAlBsB,CAAlB,CAAf","sourcesContent":["// This component is based on RN's DrawerLayoutAndroid API\n// It's cross-compatible with all platforms despite\n// `DrawerLayoutAndroid` only being available on android\n\nimport React, {\n ReactNode,\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useState,\n} from 'react';\n\nimport {\n StyleSheet,\n Keyboard,\n StatusBar,\n I18nManager,\n StatusBarAnimation,\n StyleProp,\n ViewStyle,\n LayoutChangeEvent,\n Platform,\n} from 'react-native';\n\nimport Animated, {\n Extrapolation,\n SharedValue,\n interpolate,\n runOnJS,\n useAnimatedProps,\n useAnimatedStyle,\n useDerivedValue,\n useSharedValue,\n withSpring,\n} from 'react-native-reanimated';\n\nimport { GestureObjects as Gesture } from '../handlers/gestures/gestureObjects';\nimport { GestureDetector } from '../handlers/gestures/GestureDetector';\nimport {\n UserSelect,\n ActiveCursor,\n MouseButton,\n HitSlop,\n GestureStateChangeEvent,\n} from '../handlers/gestureHandlerCommon';\nimport { PanGestureHandlerEventPayload } from '../handlers/GestureHandlerEventPayload';\n\nconst DRAG_TOSS = 0.05;\n\nexport enum DrawerPosition {\n LEFT,\n RIGHT,\n}\n\nexport enum DrawerState {\n IDLE,\n DRAGGING,\n SETTLING,\n}\n\nexport enum DrawerType {\n FRONT,\n BACK,\n SLIDE,\n}\n\nexport enum DrawerLockMode {\n UNLOCKED,\n LOCKED_CLOSED,\n LOCKED_OPEN,\n}\n\nexport enum DrawerKeyboardDismissMode {\n NONE,\n ON_DRAG,\n}\n\nexport interface DrawerLayoutProps {\n /**\n * This attribute is present in the native android implementation already and is one\n * of the required params. The gesture handler version of DrawerLayout makes it\n * possible for the function passed as `renderNavigationView` to take an\n * Animated value as a parameter that indicates the progress of drawer\n * opening/closing animation (progress value is 0 when closed and 1 when\n * opened). This can be used by the drawer component to animated its children\n * while the drawer is opening or closing.\n */\n renderNavigationView: (\n progressAnimatedValue: SharedValue<number>\n ) => ReactNode;\n\n /**\n * Determines the side from which the drawer will open.\n */\n drawerPosition?: DrawerPosition;\n\n /**\n * Width of the drawer.\n */\n drawerWidth?: number;\n\n /**\n * Background color of the drawer.\n */\n drawerBackgroundColor?: string;\n\n /**\n * Specifies the lock mode of the drawer.\n * Programatic opening/closing isn't affected by the lock mode. Defaults to `UNLOCKED`.\n * - `UNLOCKED` - the drawer will respond to gestures.\n * - `LOCKED_CLOSED` - the drawer will move freely until it settles in a closed position, then the gestures will be disabled.\n * - `LOCKED_OPEN` - the drawer will move freely until it settles in an opened position, then the gestures will be disabled.\n */\n drawerLockMode?: DrawerLockMode;\n\n /**\n * Determines if system keyboard should be closed upon dragging the drawer.\n */\n keyboardDismissMode?: DrawerKeyboardDismissMode;\n\n /**\n * Called when the drawer is closed.\n */\n onDrawerClose?: () => void;\n\n /**\n * Called when the drawer is opened.\n */\n onDrawerOpen?: () => void;\n\n /**\n * Called when the status of the drawer changes.\n */\n onDrawerStateChanged?: (\n newState: DrawerState,\n drawerWillShow: boolean\n ) => void;\n\n /**\n * Type of animation that will play when opening the drawer.\n */\n drawerType?: DrawerType;\n\n /**\n * Speed of animation that will play when letting go, or dismissing the drawer.\n * This will also be the default animation speed for programatic controlls.\n */\n animationSpeed?: number;\n\n /**\n * Defines how far from the edge of the content view the gesture should\n * activate.\n */\n edgeWidth?: number;\n\n /**\n * Minimal distance to swipe before the drawer starts moving.\n */\n minSwipeDistance?: number;\n\n /**\n * When set to true Drawer component will use\n * {@link https://reactnative.dev/docs/statusbar StatusBar} API to hide the OS\n * status bar whenever the drawer is pulled or when its in an \"open\" state.\n */\n hideStatusBar?: boolean;\n\n /**\n * @default 'slide'\n *\n * Can be used when hideStatusBar is set to true and will select the animation\n * used for hiding/showing the status bar. See\n * {@link https://reactnative.dev/docs/statusbar StatusBar} documentation for\n * more details\n */\n statusBarAnimation?: StatusBarAnimation;\n\n /**\n * @default 'rgba(0, 0, 0, 0.7)'\n *\n * Color of the background overlay.\n * Animated from `0%` to `100%` as the drawer opens.\n */\n overlayColor?: string;\n\n /**\n * Style wrapping the content.\n */\n contentContainerStyle?: StyleProp<ViewStyle>;\n\n /**\n * Style wrapping the drawer.\n */\n drawerContainerStyle?: StyleProp<ViewStyle>;\n\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 onDrawerSlide?: (position: number) => void;\n\n // Implicit `children` prop has been removed in @types/react^18.0.\n /**\n * Elements that will be rendered inside the content view.\n */\n children?: ReactNode | ((openValue?: SharedValue<number>) => ReactNode);\n\n /**\n * @default 'none'\n * Sets whether the text inside both the drawer and the context window can be selected.\n * Values: 'none' | 'text' | 'auto'\n */\n userSelect?: UserSelect;\n\n /**\n * @default 'auto'\n * Sets the displayed cursor pictogram when the drawer is being dragged.\n * Values: see CSS cursor values\n */\n activeCursor?: ActiveCursor;\n\n /**\n * @default 'MouseButton.LEFT'\n * Allows to choose which mouse button should underlying pan handler react to.\n */\n mouseButton?: MouseButton;\n\n /**\n * @default 'false if MouseButton.RIGHT is specified'\n * Allows to enable/disable context menu.\n */\n enableContextMenu?: boolean;\n}\n\nexport type DrawerMovementOption = {\n initialVelocity?: number;\n animationSpeed?: number;\n};\n\nexport interface DrawerLayoutMethods {\n openDrawer: (options?: DrawerMovementOption) => void;\n closeDrawer: (options?: DrawerMovementOption) => void;\n}\n\nconst defaultProps = {\n drawerWidth: 200,\n drawerPosition: DrawerPosition.LEFT,\n drawerType: DrawerType.FRONT,\n edgeWidth: 20,\n minSwipeDistance: 3,\n overlayColor: 'rgba(0, 0, 0, 0.7)',\n drawerLockMode: DrawerLockMode.UNLOCKED,\n enableTrackpadTwoFingerGesture: false,\n activeCursor: 'auto' as ActiveCursor,\n mouseButton: MouseButton.LEFT,\n statusBarAnimation: 'slide' as StatusBarAnimation,\n};\n\n// StatusBar.setHidden and Keyboard.dismiss cannot be directly referenced in worklets.\nconst setStatusBarHidden = StatusBar.setHidden;\nconst dismissKeyboard = Keyboard.dismiss;\n\nconst DrawerLayout = forwardRef<DrawerLayoutMethods, DrawerLayoutProps>(\n function DrawerLayout(props: DrawerLayoutProps, ref) {\n const [containerWidth, setContainerWidth] = useState(0);\n const [drawerState, setDrawerState] = useState<DrawerState>(\n DrawerState.IDLE\n );\n const [drawerOpened, setDrawerOpened] = useState(false);\n\n const {\n drawerPosition = defaultProps.drawerPosition,\n drawerWidth = defaultProps.drawerWidth,\n drawerType = defaultProps.drawerType,\n drawerBackgroundColor,\n drawerContainerStyle,\n contentContainerStyle,\n minSwipeDistance = defaultProps.minSwipeDistance,\n edgeWidth = defaultProps.edgeWidth,\n drawerLockMode = defaultProps.drawerLockMode,\n overlayColor = defaultProps.overlayColor,\n enableTrackpadTwoFingerGesture = defaultProps.enableTrackpadTwoFingerGesture,\n activeCursor = defaultProps.activeCursor,\n mouseButton = defaultProps.mouseButton,\n statusBarAnimation = defaultProps.statusBarAnimation,\n hideStatusBar,\n keyboardDismissMode,\n userSelect,\n enableContextMenu,\n renderNavigationView,\n onDrawerSlide,\n onDrawerClose,\n onDrawerOpen,\n onDrawerStateChanged,\n animationSpeed: animationSpeedProp,\n } = props;\n\n const isFromLeft = drawerPosition === DrawerPosition.LEFT;\n\n const sideCorrection = isFromLeft ? 1 : -1;\n\n // While closing the drawer when user starts gesture in the greyed out part of the window,\n // we want the drawer to follow only once the finger reaches the edge of the drawer.\n // See the diagram for reference. * = starting finger position, < = current finger position\n // 1) +---------------+ 2) +---------------+ 3) +---------------+ 4) +---------------+\n // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|\n // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|\n // |XXXXXXXX|..<*..| |XXXXXXXX|.<-*..| |XXXXXXXX|<--*..| |XXXXX|<-----*..|\n // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|\n // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|\n // +---------------+ +---------------+ +---------------+ +---------------+\n\n const openValue = useSharedValue<number>(0);\n\n useDerivedValue(() => {\n onDrawerSlide && runOnJS(onDrawerSlide)(openValue.value);\n }, []);\n\n const isDrawerOpen = useSharedValue(false);\n\n const handleContainerLayout = ({ nativeEvent }: LayoutChangeEvent) => {\n setContainerWidth(nativeEvent.layout.width);\n };\n\n const emitStateChanged = useCallback(\n (newState: DrawerState, drawerWillShow: boolean) => {\n 'worklet';\n onDrawerStateChanged &&\n runOnJS(onDrawerStateChanged)?.(newState, drawerWillShow);\n },\n [onDrawerStateChanged]\n );\n\n const drawerAnimatedProps = useAnimatedProps(() => ({\n accessibilityViewIsModal: isDrawerOpen.value,\n }));\n\n const overlayAnimatedProps = useAnimatedProps(() => ({\n pointerEvents: isDrawerOpen.value ? ('auto' as const) : ('none' as const),\n }));\n\n // While the drawer is hidden, it's hitSlop overflows onto the main view by edgeWidth\n // This way it can be swiped open even when it's hidden\n const [edgeHitSlop, setEdgeHitSlop] = useState<HitSlop>(\n isFromLeft\n ? { left: 0, width: edgeWidth }\n : { right: 0, width: edgeWidth }\n );\n\n // gestureOrientation is 1 if the gesture is expected to move from left to right and -1 otherwise\n const gestureOrientation = useMemo(\n () => sideCorrection * (drawerOpened ? -1 : 1),\n [sideCorrection, drawerOpened]\n );\n\n useEffect(() => {\n setEdgeHitSlop(\n isFromLeft\n ? { left: 0, width: edgeWidth }\n : { right: 0, width: edgeWidth }\n );\n }, [isFromLeft, edgeWidth]);\n\n const animateDrawer = useCallback(\n (toValue: number, initialVelocity: number, animationSpeed?: number) => {\n 'worklet';\n const willShow = toValue !== 0;\n isDrawerOpen.value = willShow;\n\n emitStateChanged(DrawerState.SETTLING, willShow);\n runOnJS(setDrawerState)(DrawerState.SETTLING);\n\n if (hideStatusBar) {\n runOnJS(setStatusBarHidden)(willShow, statusBarAnimation);\n }\n\n const normalizedToValue = interpolate(\n toValue,\n [0, drawerWidth],\n [0, 1],\n Extrapolation.CLAMP\n );\n\n const normalizedInitialVelocity = interpolate(\n initialVelocity,\n [0, drawerWidth],\n [0, 1],\n Extrapolation.CLAMP\n );\n\n openValue.value = withSpring(\n normalizedToValue,\n {\n overshootClamping: true,\n velocity: normalizedInitialVelocity,\n mass: animationSpeed\n ? 1 / animationSpeed\n : 1 / (animationSpeedProp ?? 1),\n damping: 40,\n stiffness: 500,\n },\n (finished) => {\n if (finished) {\n emitStateChanged(DrawerState.IDLE, willShow);\n runOnJS(setDrawerOpened)(willShow);\n runOnJS(setDrawerState)(DrawerState.IDLE);\n if (willShow) {\n onDrawerOpen && runOnJS(onDrawerOpen)?.();\n } else {\n onDrawerClose && runOnJS(onDrawerClose)?.();\n }\n }\n }\n );\n },\n [\n openValue,\n emitStateChanged,\n isDrawerOpen,\n hideStatusBar,\n onDrawerClose,\n onDrawerOpen,\n drawerWidth,\n statusBarAnimation,\n ]\n );\n\n const handleRelease = useCallback(\n (event: GestureStateChangeEvent<PanGestureHandlerEventPayload>) => {\n 'worklet';\n let { translationX: dragX, velocityX, x: touchX } = event;\n\n if (drawerPosition !== DrawerPosition.LEFT) {\n // See description in _updateAnimatedEvent about why events are flipped\n // for right-side drawer\n dragX = -dragX;\n touchX = containerWidth - touchX;\n velocityX = -velocityX;\n }\n\n const gestureStartX = touchX - dragX;\n let dragOffsetBasedOnStart = 0;\n\n if (drawerType === DrawerType.FRONT) {\n dragOffsetBasedOnStart =\n gestureStartX > drawerWidth ? gestureStartX - drawerWidth : 0;\n }\n\n const startOffsetX =\n dragX +\n dragOffsetBasedOnStart +\n (isDrawerOpen.value ? drawerWidth : 0);\n\n const projOffsetX = startOffsetX + DRAG_TOSS * velocityX;\n\n const shouldOpen = projOffsetX > drawerWidth / 2;\n\n if (shouldOpen) {\n animateDrawer(drawerWidth, velocityX);\n } else {\n animateDrawer(0, velocityX);\n }\n },\n [\n animateDrawer,\n containerWidth,\n drawerPosition,\n drawerType,\n drawerWidth,\n isDrawerOpen,\n ]\n );\n\n const openDrawer = useCallback(\n (options: DrawerMovementOption = {}) => {\n 'worklet';\n animateDrawer(\n drawerWidth,\n options.initialVelocity ?? 0,\n options.animationSpeed\n );\n },\n [animateDrawer, drawerWidth]\n );\n\n const closeDrawer = useCallback(\n (options: DrawerMovementOption = {}) => {\n 'worklet';\n animateDrawer(0, options.initialVelocity ?? 0, options.animationSpeed);\n },\n [animateDrawer]\n );\n\n const overlayDismissGesture = useMemo(\n () =>\n Gesture.Tap()\n .maxDistance(25)\n .onEnd(() => {\n if (\n isDrawerOpen.value &&\n drawerLockMode !== DrawerLockMode.LOCKED_OPEN\n ) {\n closeDrawer();\n }\n }),\n [closeDrawer, isDrawerOpen, drawerLockMode]\n );\n\n const overlayAnimatedStyle = useAnimatedStyle(() => ({\n opacity: openValue.value,\n backgroundColor: overlayColor,\n }));\n\n const fillHitSlop = useMemo(\n () => (isFromLeft ? { left: drawerWidth } : { right: drawerWidth }),\n [drawerWidth, isFromLeft]\n );\n\n const panGesture = useMemo(() => {\n return Gesture.Pan()\n .activeCursor(activeCursor)\n .mouseButton(mouseButton)\n .hitSlop(drawerOpened ? fillHitSlop : edgeHitSlop)\n .minDistance(drawerOpened ? 100 : 0)\n .activeOffsetX(gestureOrientation * minSwipeDistance)\n .failOffsetY([-15, 15])\n .simultaneousWithExternalGesture(overlayDismissGesture)\n .enableTrackpadTwoFingerGesture(enableTrackpadTwoFingerGesture)\n .enabled(\n drawerState !== DrawerState.SETTLING &&\n (drawerOpened\n ? drawerLockMode !== DrawerLockMode.LOCKED_OPEN\n : drawerLockMode !== DrawerLockMode.LOCKED_CLOSED)\n )\n .onStart(() => {\n emitStateChanged(DrawerState.DRAGGING, false);\n runOnJS(setDrawerState)(DrawerState.DRAGGING);\n if (keyboardDismissMode === DrawerKeyboardDismissMode.ON_DRAG) {\n runOnJS(dismissKeyboard)();\n }\n if (hideStatusBar) {\n runOnJS(setStatusBarHidden)(true, statusBarAnimation);\n }\n })\n .onUpdate((event) => {\n const startedOutsideTranslation = isFromLeft\n ? interpolate(\n event.x,\n [0, drawerWidth, drawerWidth + 1],\n [0, drawerWidth, drawerWidth]\n )\n : interpolate(\n event.x - containerWidth,\n [-drawerWidth - 1, -drawerWidth, 0],\n [drawerWidth, drawerWidth, 0]\n );\n\n const startedInsideTranslation =\n sideCorrection *\n (event.translationX +\n (drawerOpened ? drawerWidth * -gestureOrientation : 0));\n\n const adjustedTranslation = Math.max(\n drawerOpened ? startedOutsideTranslation : 0,\n startedInsideTranslation\n );\n\n openValue.value = interpolate(\n adjustedTranslation,\n [-drawerWidth, 0, drawerWidth],\n [1, 0, 1],\n Extrapolation.CLAMP\n );\n })\n .onEnd(handleRelease);\n }, [\n drawerLockMode,\n openValue,\n drawerWidth,\n emitStateChanged,\n gestureOrientation,\n handleRelease,\n edgeHitSlop,\n fillHitSlop,\n minSwipeDistance,\n hideStatusBar,\n keyboardDismissMode,\n overlayDismissGesture,\n drawerOpened,\n isFromLeft,\n containerWidth,\n sideCorrection,\n drawerState,\n activeCursor,\n enableTrackpadTwoFingerGesture,\n mouseButton,\n statusBarAnimation,\n ]);\n\n // When using RTL, row and row-reverse flex directions are flipped.\n const reverseContentDirection = I18nManager.isRTL\n ? isFromLeft\n : !isFromLeft;\n\n const dynamicDrawerStyles = {\n backgroundColor: drawerBackgroundColor,\n width: drawerWidth,\n };\n\n const containerStyles = useAnimatedStyle(() => {\n if (drawerType === DrawerType.FRONT) {\n return {};\n }\n\n return {\n transform: [\n {\n translateX: interpolate(\n openValue.value,\n [0, 1],\n [0, drawerWidth * sideCorrection],\n Extrapolation.CLAMP\n ),\n },\n ],\n };\n });\n\n const drawerAnimatedStyle = useAnimatedStyle(() => {\n const closedDrawerOffset = drawerWidth * -sideCorrection;\n const isBack = drawerType === DrawerType.BACK;\n const isIdle = drawerState === DrawerState.IDLE;\n\n if (isBack) {\n return {\n transform: [{ translateX: 0 }],\n flexDirection: reverseContentDirection ? 'row-reverse' : 'row',\n };\n }\n\n let translateX = 0;\n\n if (isIdle) {\n translateX = drawerOpened ? 0 : closedDrawerOffset;\n } else {\n translateX = interpolate(\n openValue.value,\n [0, 1],\n [closedDrawerOffset, 0],\n Extrapolation.CLAMP\n );\n }\n\n return {\n transform: [{ translateX }],\n flexDirection: reverseContentDirection ? 'row-reverse' : 'row',\n };\n });\n\n const containerAnimatedProps = useAnimatedProps(() => ({\n importantForAccessibility:\n Platform.OS === 'android'\n ? isDrawerOpen.value\n ? ('no-hide-descendants' as const)\n : ('yes' as const)\n : undefined,\n }));\n\n const children =\n typeof props.children === 'function'\n ? props.children(openValue) // renderer function\n : props.children;\n\n useImperativeHandle(\n ref,\n () => ({\n openDrawer,\n closeDrawer,\n }),\n [openDrawer, closeDrawer]\n );\n\n return (\n <GestureDetector\n gesture={panGesture}\n userSelect={userSelect}\n enableContextMenu={enableContextMenu}>\n <Animated.View style={styles.main} onLayout={handleContainerLayout}>\n <GestureDetector gesture={overlayDismissGesture}>\n <Animated.View\n style={[\n drawerType === DrawerType.FRONT\n ? styles.containerOnBack\n : styles.containerInFront,\n containerStyles,\n contentContainerStyle,\n ]}\n animatedProps={containerAnimatedProps}>\n {children}\n <Animated.View\n animatedProps={overlayAnimatedProps}\n style={[styles.overlay, overlayAnimatedStyle]}\n />\n </Animated.View>\n </GestureDetector>\n <Animated.View\n pointerEvents=\"box-none\"\n animatedProps={drawerAnimatedProps}\n style={[\n styles.drawerContainer,\n drawerAnimatedStyle,\n drawerContainerStyle,\n ]}>\n <Animated.View style={dynamicDrawerStyles}>\n {renderNavigationView(openValue)}\n </Animated.View>\n </Animated.View>\n </Animated.View>\n </GestureDetector>\n );\n }\n);\n\nexport default DrawerLayout;\n\nconst styles = StyleSheet.create({\n drawerContainer: {\n ...StyleSheet.absoluteFillObject,\n zIndex: 1001,\n flexDirection: 'row',\n },\n containerInFront: {\n ...StyleSheet.absoluteFillObject,\n zIndex: 1002,\n },\n containerOnBack: {\n ...StyleSheet.absoluteFillObject,\n },\n main: {\n flex: 1,\n zIndex: 0,\n overflow: 'hidden',\n },\n overlay: {\n ...StyleSheet.absoluteFillObject,\n zIndex: 1000,\n },\n});\n"]}
1
+ {"version":3,"names":["React","forwardRef","useCallback","useEffect","useImperativeHandle","useMemo","useState","StyleSheet","Keyboard","StatusBar","I18nManager","Platform","Animated","Extrapolation","interpolate","runOnJS","useAnimatedProps","useAnimatedStyle","useDerivedValue","useSharedValue","withSpring","GestureObjects","Gesture","GestureDetector","MouseButton","jsx","_jsx","jsxs","_jsxs","DRAG_TOSS","DrawerPosition","DrawerState","DrawerType","DrawerLockMode","DrawerKeyboardDismissMode","defaultProps","drawerWidth","drawerPosition","LEFT","drawerType","FRONT","edgeWidth","minSwipeDistance","overlayColor","drawerLockMode","UNLOCKED","enableTrackpadTwoFingerGesture","activeCursor","mouseButton","statusBarAnimation","setStatusBarHidden","setHidden","dismissKeyboard","dismiss","DrawerLayout","props","ref","containerWidth","setContainerWidth","drawerState","setDrawerState","IDLE","drawerOpened","setDrawerOpened","drawerBackgroundColor","drawerContainerStyle","contentContainerStyle","hideStatusBar","keyboardDismissMode","userSelect","enableContextMenu","renderNavigationView","onDrawerSlide","onDrawerClose","onDrawerOpen","onDrawerStateChanged","animationSpeed","animationSpeedProp","isFromLeft","sideCorrection","openValue","value","isDrawerOpen","handleContainerLayout","nativeEvent","layout","width","emitStateChanged","newState","drawerWillShow","drawerAnimatedProps","accessibilityViewIsModal","overlayAnimatedProps","pointerEvents","edgeHitSlop","setEdgeHitSlop","left","right","gestureOrientation","animateDrawer","toValue","initialVelocity","willShow","SETTLING","normalizedToValue","CLAMP","normalizedInitialVelocity","overshootClamping","velocity","mass","damping","stiffness","finished","handleRelease","event","translationX","dragX","velocityX","x","touchX","gestureStartX","dragOffsetBasedOnStart","startOffsetX","projOffsetX","shouldOpen","openDrawer","options","closeDrawer","overlayDismissGesture","Tap","maxDistance","onEnd","LOCKED_OPEN","overlayAnimatedStyle","opacity","backgroundColor","fillHitSlop","panGesture","Pan","hitSlop","minDistance","activeOffsetX","failOffsetY","simultaneousWithExternalGesture","enabled","LOCKED_CLOSED","onStart","DRAGGING","ON_DRAG","onUpdate","startedOutsideTranslation","startedInsideTranslation","adjustedTranslation","Math","max","reverseContentDirection","isRTL","dynamicDrawerStyles","containerStyles","transform","translateX","drawerAnimatedStyle","closedDrawerOffset","isBack","BACK","isIdle","flexDirection","containerAnimatedProps","importantForAccessibility","OS","undefined","children","gesture","View","style","styles","main","onLayout","containerOnBack","containerInFront","animatedProps","overlay","drawerContainer","create","absoluteFillObject","zIndex","flex","overflow"],"sourceRoot":"../../../src","sources":["components/ReanimatedDrawerLayout.tsx"],"mappings":";;AAAA;AACA;AACA;;AAEA,OAAOA,KAAK,IAEVC,UAAU,EACVC,WAAW,EACXC,SAAS,EACTC,mBAAmB,EACnBC,OAAO,EACPC,QAAQ,QACH,OAAO;AAEd,SACEC,UAAU,EACVC,QAAQ,EACRC,SAAS,EACTC,WAAW,EAKXC,QAAQ,QACH,cAAc;AAErB,OAAOC,QAAQ,IACbC,aAAa,EAEbC,WAAW,EACXC,OAAO,EACPC,gBAAgB,EAChBC,gBAAgB,EAChBC,eAAe,EACfC,cAAc,EACdC,UAAU,QACL,yBAAyB;AAEhC,SAASC,cAAc,IAAIC,OAAO,QAAQ,qCAAqC;AAC/E,SAASC,eAAe,QAAQ,sCAAsC;AACtE,SAGEC,WAAW,QAGN,kCAAkC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG1C,MAAMC,SAAS,GAAG,IAAI;AAEtB,WAAYC,cAAc,0BAAdA,cAAc;EAAdA,cAAc,CAAdA,cAAc;EAA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