react-native-gesture-handler 2.25.0 → 2.27.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 (880) hide show
  1. package/README.md +2 -4
  2. package/RNGestureHandler.podspec +1 -0
  3. package/android/build.gradle +41 -42
  4. package/android/fabric/src/main/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +1 -1
  5. package/android/gradle.properties +1 -1
  6. package/android/noreanimated/src/main/java/com/swmansion/gesturehandler/ReanimatedEventDispatcher.kt +2 -2
  7. package/android/paper/src/main/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +4 -1
  8. package/android/reanimated/src/main/java/com/swmansion/gesturehandler/ReanimatedEventDispatcher.kt +1 -1
  9. package/android/{package77/src → src}/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt +14 -19
  10. package/android/src/main/java/com/swmansion/gesturehandler/core/FlingGestureHandler.kt +29 -5
  11. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandler.kt +229 -114
  12. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerInteractionController.kt +4 -4
  13. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt +91 -49
  14. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerRegistry.kt +1 -1
  15. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureUtils.kt +13 -4
  16. package/android/src/main/java/com/swmansion/gesturehandler/core/HoverGestureHandler.kt +20 -6
  17. package/android/src/main/java/com/swmansion/gesturehandler/core/LongPressGestureHandler.kt +52 -21
  18. package/android/src/main/java/com/swmansion/gesturehandler/core/ManualGestureHandler.kt +12 -1
  19. package/android/src/main/java/com/swmansion/gesturehandler/core/NativeViewGestureHandler.kt +65 -35
  20. package/android/src/main/java/com/swmansion/gesturehandler/core/OnTouchEventListener.kt +3 -3
  21. package/android/src/main/java/com/swmansion/gesturehandler/core/PanGestureHandler.kt +187 -92
  22. package/android/src/main/java/com/swmansion/gesturehandler/core/PinchGestureHandler.kt +12 -5
  23. package/android/src/main/java/com/swmansion/gesturehandler/core/PointerEventsConfig.kt +1 -1
  24. package/android/src/main/java/com/swmansion/gesturehandler/core/RotationGestureDetector.kt +3 -1
  25. package/android/src/main/java/com/swmansion/gesturehandler/core/RotationGestureHandler.kt +12 -5
  26. package/android/src/main/java/com/swmansion/gesturehandler/core/StylusData.kt +1 -1
  27. package/android/src/main/java/com/swmansion/gesturehandler/core/TapGestureHandler.kt +55 -33
  28. package/android/src/main/java/com/swmansion/gesturehandler/core/Vector.kt +13 -18
  29. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +27 -21
  30. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEnabledRootView.kt +7 -2
  31. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEvent.kt +13 -12
  32. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEventDispatcher.kt +189 -0
  33. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerFactoryUtil.kt +34 -0
  34. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerInteractionManager.kt +7 -11
  35. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt +29 -590
  36. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRegistry.kt +8 -14
  37. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.kt +26 -16
  38. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootView.kt +15 -12
  39. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootViewManager.kt +2 -4
  40. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerStateChangeEvent.kt +17 -16
  41. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerTouchEvent.kt +6 -4
  42. package/android/src/main/java/com/swmansion/gesturehandler/react/RNViewConfigurationHelper.kt +7 -5
  43. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/FlingGestureHandlerEventDataBuilder.kt +2 -1
  44. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/GestureHandlerEventDataBuilder.kt +1 -1
  45. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/HoverGestureHandlerEventDataBuilder.kt +2 -1
  46. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/LongPressGestureHandlerEventDataBuilder.kt +2 -1
  47. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/ManualGestureHandlerEventDataBuilder.kt +2 -1
  48. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/NativeGestureHandlerEventDataBuilder.kt +2 -1
  49. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/PanGestureHandlerEventDataBuilder.kt +2 -1
  50. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/PinchGestureHandlerEventDataBuilder.kt +2 -1
  51. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/RotationGestureHandlerEventDataBuilder.kt +2 -1
  52. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/TapGestureHandlerEventDataBuilder.kt +2 -1
  53. package/android/src/main/jni/CMakeLists.txt +8 -18
  54. package/android/svg/src/main/java/com/swmansion/gesturehandler/RNSVGHitTester.kt +1 -3
  55. package/apple/RNGestureHandlerButton.mm +6 -2
  56. package/package.json +29 -47
  57. package/src/components/DrawerLayout.tsx +5 -2
  58. package/src/components/GestureButtons.tsx +2 -2
  59. package/src/components/GestureComponents.web.tsx +1 -1
  60. package/src/components/GestureHandlerButton.web.tsx +3 -3
  61. package/src/components/Pressable/Pressable.tsx +362 -425
  62. package/src/components/Pressable/PressableProps.tsx +34 -0
  63. package/src/components/Pressable/StateMachine.tsx +49 -0
  64. package/src/components/Pressable/stateDefinitions.ts +125 -0
  65. package/src/components/Pressable/utils.ts +11 -7
  66. package/src/components/ReanimatedSwipeable.tsx +55 -33
  67. package/src/components/Swipeable.tsx +3 -0
  68. package/src/components/Text.tsx +5 -2
  69. package/src/components/utils.ts +26 -0
  70. package/src/getShadowNodeFromRef.ts +2 -2
  71. package/src/handlers/GestureHandlerEventPayload.ts +3 -0
  72. package/src/handlers/createHandler.tsx +1 -0
  73. package/src/handlers/gestureHandlerTypesCompat.ts +9 -0
  74. package/src/handlers/gestures/forceTouchGesture.ts +9 -0
  75. package/src/handlers/gestures/gestureObjects.ts +3 -1
  76. package/src/handlers/gestures/reanimatedWrapper.ts +0 -1
  77. package/src/handlers/utils.ts +1 -1
  78. package/src/utils.ts +0 -1
  79. package/src/web/detectors/RotationGestureDetector.ts +4 -0
  80. package/src/web/handlers/FlingGestureHandler.ts +4 -0
  81. package/src/web/handlers/GestureHandler.ts +9 -3
  82. package/src/web/handlers/PanGestureHandler.ts +25 -36
  83. package/src/web/handlers/TapGestureHandler.ts +14 -19
  84. package/src/web/tools/GestureHandlerOrchestrator.ts +1 -0
  85. package/src/web/tools/PointerEventManager.ts +1 -1
  86. package/src/web/tools/PointerTracker.ts +17 -15
  87. package/src/web/tools/Vector.ts +1 -1
  88. package/src/web_hammer/DiscreteGestureHandler.ts +1 -1
  89. package/src/web_hammer/DraggingGestureHandler.ts +1 -1
  90. package/src/web_hammer/FlingGestureHandler.ts +1 -1
  91. package/src/web_hammer/GestureHandler.ts +2 -1
  92. package/src/web_hammer/LongPressGestureHandler.ts +1 -1
  93. package/android/packageDeprecated/src/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt +0 -85
  94. package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerDelegate.java +0 -60
  95. package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerInterface.java +0 -26
  96. package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerDelegate.java +0 -26
  97. package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerInterface.java +0 -16
  98. package/android/paper77/src/main/java/com/swmansion/gesturehandler/NativeRNGestureHandlerModuleSpec.java +0 -67
  99. package/android/paper77/src/main/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +0 -13
  100. package/lib/commonjs/ActionType.js +0 -15
  101. package/lib/commonjs/ActionType.js.map +0 -1
  102. package/lib/commonjs/Directions.js +0 -28
  103. package/lib/commonjs/Directions.js.map +0 -1
  104. package/lib/commonjs/EnableNewWebImplementation.js +0 -48
  105. package/lib/commonjs/EnableNewWebImplementation.js.map +0 -1
  106. package/lib/commonjs/GestureHandlerRootViewContext.js +0 -15
  107. package/lib/commonjs/GestureHandlerRootViewContext.js.map +0 -1
  108. package/lib/commonjs/PlatformConstants.js +0 -15
  109. package/lib/commonjs/PlatformConstants.js.map +0 -1
  110. package/lib/commonjs/PlatformConstants.web.js +0 -14
  111. package/lib/commonjs/PlatformConstants.web.js.map +0 -1
  112. package/lib/commonjs/PointerType.js +0 -17
  113. package/lib/commonjs/PointerType.js.map +0 -1
  114. package/lib/commonjs/RNGestureHandlerModule.js +0 -16
  115. package/lib/commonjs/RNGestureHandlerModule.js.map +0 -1
  116. package/lib/commonjs/RNGestureHandlerModule.web.js +0 -122
  117. package/lib/commonjs/RNGestureHandlerModule.web.js.map +0 -1
  118. package/lib/commonjs/RNGestureHandlerModule.windows.js +0 -66
  119. package/lib/commonjs/RNGestureHandlerModule.windows.js.map +0 -1
  120. package/lib/commonjs/RNRenderer.js +0 -16
  121. package/lib/commonjs/RNRenderer.js.map +0 -1
  122. package/lib/commonjs/RNRenderer.web.js +0 -11
  123. package/lib/commonjs/RNRenderer.web.js.map +0 -1
  124. package/lib/commonjs/State.js +0 -18
  125. package/lib/commonjs/State.js.map +0 -1
  126. package/lib/commonjs/TouchEventType.js +0 -16
  127. package/lib/commonjs/TouchEventType.js.map +0 -1
  128. package/lib/commonjs/components/DrawerLayout.js +0 -574
  129. package/lib/commonjs/components/DrawerLayout.js.map +0 -1
  130. package/lib/commonjs/components/GestureButtons.js +0 -269
  131. package/lib/commonjs/components/GestureButtons.js.map +0 -1
  132. package/lib/commonjs/components/GestureButtonsProps.js +0 -6
  133. package/lib/commonjs/components/GestureButtonsProps.js.map +0 -1
  134. package/lib/commonjs/components/GestureComponents.js +0 -115
  135. package/lib/commonjs/components/GestureComponents.js.map +0 -1
  136. package/lib/commonjs/components/GestureComponents.web.js +0 -52
  137. package/lib/commonjs/components/GestureComponents.web.js.map +0 -1
  138. package/lib/commonjs/components/GestureHandlerButton.js +0 -14
  139. package/lib/commonjs/components/GestureHandlerButton.js.map +0 -1
  140. package/lib/commonjs/components/GestureHandlerButton.web.js +0 -24
  141. package/lib/commonjs/components/GestureHandlerButton.web.js.map +0 -1
  142. package/lib/commonjs/components/GestureHandlerRootView.android.js +0 -46
  143. package/lib/commonjs/components/GestureHandlerRootView.android.js.map +0 -1
  144. package/lib/commonjs/components/GestureHandlerRootView.js +0 -44
  145. package/lib/commonjs/components/GestureHandlerRootView.js.map +0 -1
  146. package/lib/commonjs/components/GestureHandlerRootView.web.js +0 -38
  147. package/lib/commonjs/components/GestureHandlerRootView.web.js.map +0 -1
  148. package/lib/commonjs/components/Pressable/Pressable.js +0 -370
  149. package/lib/commonjs/components/Pressable/Pressable.js.map +0 -1
  150. package/lib/commonjs/components/Pressable/PressableProps.js +0 -6
  151. package/lib/commonjs/components/Pressable/PressableProps.js.map +0 -1
  152. package/lib/commonjs/components/Pressable/index.js +0 -16
  153. package/lib/commonjs/components/Pressable/index.js.map +0 -1
  154. package/lib/commonjs/components/Pressable/utils.js +0 -114
  155. package/lib/commonjs/components/Pressable/utils.js.map +0 -1
  156. package/lib/commonjs/components/ReanimatedDrawerLayout.js +0 -393
  157. package/lib/commonjs/components/ReanimatedDrawerLayout.js.map +0 -1
  158. package/lib/commonjs/components/ReanimatedSwipeable.js +0 -367
  159. package/lib/commonjs/components/ReanimatedSwipeable.js.map +0 -1
  160. package/lib/commonjs/components/Swipeable.js +0 -415
  161. package/lib/commonjs/components/Swipeable.js.map +0 -1
  162. package/lib/commonjs/components/Text.js +0 -71
  163. package/lib/commonjs/components/Text.js.map +0 -1
  164. package/lib/commonjs/components/gestureHandlerRootHOC.js +0 -40
  165. package/lib/commonjs/components/gestureHandlerRootHOC.js.map +0 -1
  166. package/lib/commonjs/components/touchables/ExtraButtonProps.js +0 -2
  167. package/lib/commonjs/components/touchables/ExtraButtonProps.js.map +0 -1
  168. package/lib/commonjs/components/touchables/GenericTouchable.js +0 -290
  169. package/lib/commonjs/components/touchables/GenericTouchable.js.map +0 -1
  170. package/lib/commonjs/components/touchables/GenericTouchableProps.js +0 -6
  171. package/lib/commonjs/components/touchables/GenericTouchableProps.js.map +0 -1
  172. package/lib/commonjs/components/touchables/TouchableHighlight.js +0 -111
  173. package/lib/commonjs/components/touchables/TouchableHighlight.js.map +0 -1
  174. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +0 -102
  175. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +0 -1
  176. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +0 -16
  177. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js.map +0 -1
  178. package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js +0 -6
  179. package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js.map +0 -1
  180. package/lib/commonjs/components/touchables/TouchableOpacity.js +0 -79
  181. package/lib/commonjs/components/touchables/TouchableOpacity.js.map +0 -1
  182. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +0 -37
  183. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +0 -1
  184. package/lib/commonjs/components/touchables/index.js +0 -40
  185. package/lib/commonjs/components/touchables/index.js.map +0 -1
  186. package/lib/commonjs/findNodeHandle.js +0 -12
  187. package/lib/commonjs/findNodeHandle.js.map +0 -1
  188. package/lib/commonjs/findNodeHandle.web.js +0 -48
  189. package/lib/commonjs/findNodeHandle.web.js.map +0 -1
  190. package/lib/commonjs/getShadowNodeFromRef.js +0 -52
  191. package/lib/commonjs/getShadowNodeFromRef.js.map +0 -1
  192. package/lib/commonjs/getShadowNodeFromRef.web.js +0 -15
  193. package/lib/commonjs/getShadowNodeFromRef.web.js.map +0 -1
  194. package/lib/commonjs/ghQueueMicrotask.js +0 -11
  195. package/lib/commonjs/ghQueueMicrotask.js.map +0 -1
  196. package/lib/commonjs/handlers/FlingGestureHandler.js +0 -33
  197. package/lib/commonjs/handlers/FlingGestureHandler.js.map +0 -1
  198. package/lib/commonjs/handlers/ForceTouchGestureHandler.js +0 -53
  199. package/lib/commonjs/handlers/ForceTouchGestureHandler.js.map +0 -1
  200. package/lib/commonjs/handlers/GestureHandlerEventPayload.js +0 -6
  201. package/lib/commonjs/handlers/GestureHandlerEventPayload.js.map +0 -1
  202. package/lib/commonjs/handlers/LongPressGestureHandler.js +0 -35
  203. package/lib/commonjs/handlers/LongPressGestureHandler.js.map +0 -1
  204. package/lib/commonjs/handlers/NativeViewGestureHandler.js +0 -35
  205. package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +0 -1
  206. package/lib/commonjs/handlers/PanGestureHandler.js +0 -131
  207. package/lib/commonjs/handlers/PanGestureHandler.js.map +0 -1
  208. package/lib/commonjs/handlers/PinchGestureHandler.js +0 -31
  209. package/lib/commonjs/handlers/PinchGestureHandler.js.map +0 -1
  210. package/lib/commonjs/handlers/PressabilityDebugView.js +0 -14
  211. package/lib/commonjs/handlers/PressabilityDebugView.js.map +0 -1
  212. package/lib/commonjs/handlers/PressabilityDebugView.web.js +0 -12
  213. package/lib/commonjs/handlers/PressabilityDebugView.web.js.map +0 -1
  214. package/lib/commonjs/handlers/RotationGestureHandler.js +0 -31
  215. package/lib/commonjs/handlers/RotationGestureHandler.js.map +0 -1
  216. package/lib/commonjs/handlers/TapGestureHandler.js +0 -35
  217. package/lib/commonjs/handlers/TapGestureHandler.js.map +0 -1
  218. package/lib/commonjs/handlers/createHandler.js +0 -494
  219. package/lib/commonjs/handlers/createHandler.js.map +0 -1
  220. package/lib/commonjs/handlers/createNativeWrapper.js +0 -87
  221. package/lib/commonjs/handlers/createNativeWrapper.js.map +0 -1
  222. package/lib/commonjs/handlers/customDirectEventTypes.js +0 -14
  223. package/lib/commonjs/handlers/customDirectEventTypes.js.map +0 -1
  224. package/lib/commonjs/handlers/customDirectEventTypes.web.js +0 -11
  225. package/lib/commonjs/handlers/customDirectEventTypes.web.js.map +0 -1
  226. package/lib/commonjs/handlers/gestureHandlerCommon.js +0 -28
  227. package/lib/commonjs/handlers/gestureHandlerCommon.js.map +0 -1
  228. package/lib/commonjs/handlers/gestureHandlerTypesCompat.js +0 -6
  229. package/lib/commonjs/handlers/gestureHandlerTypesCompat.js.map +0 -1
  230. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js +0 -42
  231. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js.map +0 -1
  232. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js +0 -49
  233. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js.map +0 -1
  234. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js +0 -87
  235. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js.map +0 -1
  236. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js +0 -29
  237. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js.map +0 -1
  238. package/lib/commonjs/handlers/gestures/GestureDetector/index.js +0 -148
  239. package/lib/commonjs/handlers/gestures/GestureDetector/index.js.map +0 -1
  240. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js +0 -25
  241. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js.map +0 -1
  242. package/lib/commonjs/handlers/gestures/GestureDetector/types.js +0 -6
  243. package/lib/commonjs/handlers/gestures/GestureDetector/types.js.map +0 -1
  244. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js +0 -77
  245. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js.map +0 -1
  246. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js +0 -180
  247. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +0 -1
  248. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js +0 -57
  249. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +0 -1
  250. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js +0 -48
  251. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js.map +0 -1
  252. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js +0 -49
  253. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js.map +0 -1
  254. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js +0 -172
  255. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js.map +0 -1
  256. package/lib/commonjs/handlers/gestures/eventReceiver.js +0 -147
  257. package/lib/commonjs/handlers/gestures/eventReceiver.js.map +0 -1
  258. package/lib/commonjs/handlers/gestures/flingGesture.js +0 -47
  259. package/lib/commonjs/handlers/gestures/flingGesture.js.map +0 -1
  260. package/lib/commonjs/handlers/gestures/forceTouchGesture.js +0 -82
  261. package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +0 -1
  262. package/lib/commonjs/handlers/gestures/gesture.js +0 -381
  263. package/lib/commonjs/handlers/gestures/gesture.js.map +0 -1
  264. package/lib/commonjs/handlers/gestures/gestureComposition.js +0 -107
  265. package/lib/commonjs/handlers/gestures/gestureComposition.js.map +0 -1
  266. package/lib/commonjs/handlers/gestures/gestureObjects.js +0 -156
  267. package/lib/commonjs/handlers/gestures/gestureObjects.js.map +0 -1
  268. package/lib/commonjs/handlers/gestures/gestureStateManager.js +0 -75
  269. package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +0 -1
  270. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js +0 -32
  271. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js.map +0 -1
  272. package/lib/commonjs/handlers/gestures/hoverGesture.js +0 -74
  273. package/lib/commonjs/handlers/gestures/hoverGesture.js.map +0 -1
  274. package/lib/commonjs/handlers/gestures/longPressGesture.js +0 -57
  275. package/lib/commonjs/handlers/gestures/longPressGesture.js.map +0 -1
  276. package/lib/commonjs/handlers/gestures/manualGesture.js +0 -31
  277. package/lib/commonjs/handlers/gestures/manualGesture.js.map +0 -1
  278. package/lib/commonjs/handlers/gestures/nativeGesture.js +0 -44
  279. package/lib/commonjs/handlers/gestures/nativeGesture.js.map +0 -1
  280. package/lib/commonjs/handlers/gestures/panGesture.js +0 -225
  281. package/lib/commonjs/handlers/gestures/panGesture.js.map +0 -1
  282. package/lib/commonjs/handlers/gestures/pinchGesture.js +0 -45
  283. package/lib/commonjs/handlers/gestures/pinchGesture.js.map +0 -1
  284. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js +0 -37
  285. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js.map +0 -1
  286. package/lib/commonjs/handlers/gestures/rotationGesture.js +0 -45
  287. package/lib/commonjs/handlers/gestures/rotationGesture.js.map +0 -1
  288. package/lib/commonjs/handlers/gestures/tapGesture.js +0 -102
  289. package/lib/commonjs/handlers/gestures/tapGesture.js.map +0 -1
  290. package/lib/commonjs/handlers/getNextHandlerTag.js +0 -12
  291. package/lib/commonjs/handlers/getNextHandlerTag.js.map +0 -1
  292. package/lib/commonjs/handlers/handlersRegistry.js +0 -66
  293. package/lib/commonjs/handlers/handlersRegistry.js.map +0 -1
  294. package/lib/commonjs/handlers/utils.js +0 -92
  295. package/lib/commonjs/handlers/utils.js.map +0 -1
  296. package/lib/commonjs/index.js +0 -298
  297. package/lib/commonjs/index.js.map +0 -1
  298. package/lib/commonjs/init.js +0 -32
  299. package/lib/commonjs/init.js.map +0 -1
  300. package/lib/commonjs/jestUtils/index.js +0 -20
  301. package/lib/commonjs/jestUtils/index.js.map +0 -1
  302. package/lib/commonjs/jestUtils/jestUtils.js +0 -383
  303. package/lib/commonjs/jestUtils/jestUtils.js.map +0 -1
  304. package/lib/commonjs/mocks.js +0 -81
  305. package/lib/commonjs/mocks.js.map +0 -1
  306. package/lib/commonjs/mountRegistry.js +0 -49
  307. package/lib/commonjs/mountRegistry.js.map +0 -1
  308. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +0 -13
  309. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +0 -1
  310. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js +0 -15
  311. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +0 -1
  312. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js +0 -15
  313. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +0 -1
  314. package/lib/commonjs/typeUtils.js +0 -2
  315. package/lib/commonjs/typeUtils.js.map +0 -1
  316. package/lib/commonjs/utils.js +0 -116
  317. package/lib/commonjs/utils.js.map +0 -1
  318. package/lib/commonjs/web/Gestures.js +0 -66
  319. package/lib/commonjs/web/Gestures.js.map +0 -1
  320. package/lib/commonjs/web/constants.js +0 -11
  321. package/lib/commonjs/web/constants.js.map +0 -1
  322. package/lib/commonjs/web/detectors/RotationGestureDetector.js +0 -163
  323. package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +0 -1
  324. package/lib/commonjs/web/detectors/ScaleGestureDetector.js +0 -155
  325. package/lib/commonjs/web/detectors/ScaleGestureDetector.js.map +0 -1
  326. package/lib/commonjs/web/handlers/FlingGestureHandler.js +0 -190
  327. package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +0 -1
  328. package/lib/commonjs/web/handlers/GestureHandler.js +0 -821
  329. package/lib/commonjs/web/handlers/GestureHandler.js.map +0 -1
  330. package/lib/commonjs/web/handlers/HoverGestureHandler.js +0 -65
  331. package/lib/commonjs/web/handlers/HoverGestureHandler.js.map +0 -1
  332. package/lib/commonjs/web/handlers/IGestureHandler.js +0 -2
  333. package/lib/commonjs/web/handlers/IGestureHandler.js.map +0 -1
  334. package/lib/commonjs/web/handlers/LongPressGestureHandler.js +0 -194
  335. package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +0 -1
  336. package/lib/commonjs/web/handlers/ManualGestureHandler.js +0 -48
  337. package/lib/commonjs/web/handlers/ManualGestureHandler.js.map +0 -1
  338. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js +0 -189
  339. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js.map +0 -1
  340. package/lib/commonjs/web/handlers/PanGestureHandler.js +0 -530
  341. package/lib/commonjs/web/handlers/PanGestureHandler.js.map +0 -1
  342. package/lib/commonjs/web/handlers/PinchGestureHandler.js +0 -165
  343. package/lib/commonjs/web/handlers/PinchGestureHandler.js.map +0 -1
  344. package/lib/commonjs/web/handlers/RotationGestureHandler.js +0 -173
  345. package/lib/commonjs/web/handlers/RotationGestureHandler.js.map +0 -1
  346. package/lib/commonjs/web/handlers/TapGestureHandler.js +0 -286
  347. package/lib/commonjs/web/handlers/TapGestureHandler.js.map +0 -1
  348. package/lib/commonjs/web/interfaces.js +0 -40
  349. package/lib/commonjs/web/interfaces.js.map +0 -1
  350. package/lib/commonjs/web/tools/CircularBuffer.js +0 -59
  351. package/lib/commonjs/web/tools/CircularBuffer.js.map +0 -1
  352. package/lib/commonjs/web/tools/EventManager.js +0 -133
  353. package/lib/commonjs/web/tools/EventManager.js.map +0 -1
  354. package/lib/commonjs/web/tools/GestureHandlerDelegate.js +0 -6
  355. package/lib/commonjs/web/tools/GestureHandlerDelegate.js.map +0 -1
  356. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +0 -340
  357. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +0 -1
  358. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +0 -217
  359. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +0 -1
  360. package/lib/commonjs/web/tools/InteractionManager.js +0 -119
  361. package/lib/commonjs/web/tools/InteractionManager.js.map +0 -1
  362. package/lib/commonjs/web/tools/KeyboardEventManager.js +0 -110
  363. package/lib/commonjs/web/tools/KeyboardEventManager.js.map +0 -1
  364. package/lib/commonjs/web/tools/LeastSquareSolver.js +0 -204
  365. package/lib/commonjs/web/tools/LeastSquareSolver.js.map +0 -1
  366. package/lib/commonjs/web/tools/NodeManager.js +0 -49
  367. package/lib/commonjs/web/tools/NodeManager.js.map +0 -1
  368. package/lib/commonjs/web/tools/PointerEventManager.js +0 -229
  369. package/lib/commonjs/web/tools/PointerEventManager.js.map +0 -1
  370. package/lib/commonjs/web/tools/PointerTracker.js +0 -234
  371. package/lib/commonjs/web/tools/PointerTracker.js.map +0 -1
  372. package/lib/commonjs/web/tools/Vector.js +0 -61
  373. package/lib/commonjs/web/tools/Vector.js.map +0 -1
  374. package/lib/commonjs/web/tools/VelocityTracker.js +0 -111
  375. package/lib/commonjs/web/tools/VelocityTracker.js.map +0 -1
  376. package/lib/commonjs/web/tools/WheelEventManager.js +0 -74
  377. package/lib/commonjs/web/tools/WheelEventManager.js.map +0 -1
  378. package/lib/commonjs/web/utils.js +0 -270
  379. package/lib/commonjs/web/utils.js.map +0 -1
  380. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js +0 -105
  381. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js.map +0 -1
  382. package/lib/commonjs/web_hammer/DraggingGestureHandler.js +0 -53
  383. package/lib/commonjs/web_hammer/DraggingGestureHandler.js.map +0 -1
  384. package/lib/commonjs/web_hammer/Errors.js +0 -16
  385. package/lib/commonjs/web_hammer/Errors.js.map +0 -1
  386. package/lib/commonjs/web_hammer/FlingGestureHandler.js +0 -170
  387. package/lib/commonjs/web_hammer/FlingGestureHandler.js.map +0 -1
  388. package/lib/commonjs/web_hammer/GestureHandler.js +0 -579
  389. package/lib/commonjs/web_hammer/GestureHandler.js.map +0 -1
  390. package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js +0 -54
  391. package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js.map +0 -1
  392. package/lib/commonjs/web_hammer/LongPressGestureHandler.js +0 -71
  393. package/lib/commonjs/web_hammer/LongPressGestureHandler.js.map +0 -1
  394. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js +0 -66
  395. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js.map +0 -1
  396. package/lib/commonjs/web_hammer/NodeManager.js +0 -48
  397. package/lib/commonjs/web_hammer/NodeManager.js.map +0 -1
  398. package/lib/commonjs/web_hammer/PanGestureHandler.js +0 -208
  399. package/lib/commonjs/web_hammer/PanGestureHandler.js.map +0 -1
  400. package/lib/commonjs/web_hammer/PinchGestureHandler.js +0 -40
  401. package/lib/commonjs/web_hammer/PinchGestureHandler.js.map +0 -1
  402. package/lib/commonjs/web_hammer/PressGestureHandler.js +0 -188
  403. package/lib/commonjs/web_hammer/PressGestureHandler.js.map +0 -1
  404. package/lib/commonjs/web_hammer/RotationGestureHandler.js +0 -44
  405. package/lib/commonjs/web_hammer/RotationGestureHandler.js.map +0 -1
  406. package/lib/commonjs/web_hammer/TapGestureHandler.js +0 -192
  407. package/lib/commonjs/web_hammer/TapGestureHandler.js.map +0 -1
  408. package/lib/commonjs/web_hammer/constants.js +0 -64
  409. package/lib/commonjs/web_hammer/constants.js.map +0 -1
  410. package/lib/commonjs/web_hammer/utils.js +0 -42
  411. package/lib/commonjs/web_hammer/utils.js.map +0 -1
  412. package/lib/module/ActionType.js +0 -7
  413. package/lib/module/ActionType.js.map +0 -1
  414. package/lib/module/Directions.js +0 -19
  415. package/lib/module/Directions.js.map +0 -1
  416. package/lib/module/EnableNewWebImplementation.js +0 -35
  417. package/lib/module/EnableNewWebImplementation.js.map +0 -1
  418. package/lib/module/GestureHandlerRootViewContext.js +0 -3
  419. package/lib/module/GestureHandlerRootViewContext.js.map +0 -1
  420. package/lib/module/PlatformConstants.js +0 -5
  421. package/lib/module/PlatformConstants.js.map +0 -1
  422. package/lib/module/PlatformConstants.web.js +0 -7
  423. package/lib/module/PlatformConstants.web.js.map +0 -1
  424. package/lib/module/PointerType.js +0 -10
  425. package/lib/module/PointerType.js.map +0 -1
  426. package/lib/module/RNGestureHandlerModule.js +0 -5
  427. package/lib/module/RNGestureHandlerModule.js.map +0 -1
  428. package/lib/module/RNGestureHandlerModule.web.js +0 -98
  429. package/lib/module/RNGestureHandlerModule.web.js.map +0 -1
  430. package/lib/module/RNGestureHandlerModule.windows.js +0 -47
  431. package/lib/module/RNGestureHandlerModule.windows.js.map +0 -1
  432. package/lib/module/RNRenderer.js +0 -4
  433. package/lib/module/RNRenderer.js.map +0 -1
  434. package/lib/module/RNRenderer.web.js +0 -4
  435. package/lib/module/RNRenderer.web.js.map +0 -1
  436. package/lib/module/State.js +0 -10
  437. package/lib/module/State.js.map +0 -1
  438. package/lib/module/TouchEventType.js +0 -8
  439. package/lib/module/TouchEventType.js.map +0 -1
  440. package/lib/module/components/DrawerLayout.js +0 -560
  441. package/lib/module/components/DrawerLayout.js.map +0 -1
  442. package/lib/module/components/GestureButtons.js +0 -237
  443. package/lib/module/components/GestureButtons.js.map +0 -1
  444. package/lib/module/components/GestureButtonsProps.js +0 -2
  445. package/lib/module/components/GestureButtonsProps.js.map +0 -1
  446. package/lib/module/components/GestureComponents.js +0 -90
  447. package/lib/module/components/GestureComponents.js.map +0 -1
  448. package/lib/module/components/GestureComponents.web.js +0 -28
  449. package/lib/module/components/GestureComponents.web.js.map +0 -1
  450. package/lib/module/components/GestureHandlerButton.js +0 -3
  451. package/lib/module/components/GestureHandlerButton.js.map +0 -1
  452. package/lib/module/components/GestureHandlerButton.web.js +0 -9
  453. package/lib/module/components/GestureHandlerButton.web.js.map +0 -1
  454. package/lib/module/components/GestureHandlerRootView.android.js +0 -27
  455. package/lib/module/components/GestureHandlerRootView.android.js.map +0 -1
  456. package/lib/module/components/GestureHandlerRootView.js +0 -26
  457. package/lib/module/components/GestureHandlerRootView.js.map +0 -1
  458. package/lib/module/components/GestureHandlerRootView.web.js +0 -21
  459. package/lib/module/components/GestureHandlerRootView.web.js.map +0 -1
  460. package/lib/module/components/Pressable/Pressable.js +0 -346
  461. package/lib/module/components/Pressable/Pressable.js.map +0 -1
  462. package/lib/module/components/Pressable/PressableProps.js +0 -2
  463. package/lib/module/components/Pressable/PressableProps.js.map +0 -1
  464. package/lib/module/components/Pressable/index.js +0 -2
  465. package/lib/module/components/Pressable/index.js.map +0 -1
  466. package/lib/module/components/Pressable/utils.js +0 -99
  467. package/lib/module/components/Pressable/utils.js.map +0 -1
  468. package/lib/module/components/ReanimatedDrawerLayout.js +0 -369
  469. package/lib/module/components/ReanimatedDrawerLayout.js.map +0 -1
  470. package/lib/module/components/ReanimatedSwipeable.js +0 -350
  471. package/lib/module/components/ReanimatedSwipeable.js.map +0 -1
  472. package/lib/module/components/Swipeable.js +0 -398
  473. package/lib/module/components/Swipeable.js.map +0 -1
  474. package/lib/module/components/Text.js +0 -53
  475. package/lib/module/components/Text.js.map +0 -1
  476. package/lib/module/components/gestureHandlerRootHOC.js +0 -22
  477. package/lib/module/components/gestureHandlerRootHOC.js.map +0 -1
  478. package/lib/module/components/touchables/ExtraButtonProps.js +0 -2
  479. package/lib/module/components/touchables/ExtraButtonProps.js.map +0 -1
  480. package/lib/module/components/touchables/GenericTouchable.js +0 -274
  481. package/lib/module/components/touchables/GenericTouchable.js.map +0 -1
  482. package/lib/module/components/touchables/GenericTouchableProps.js +0 -2
  483. package/lib/module/components/touchables/GenericTouchableProps.js.map +0 -1
  484. package/lib/module/components/touchables/TouchableHighlight.js +0 -97
  485. package/lib/module/components/touchables/TouchableHighlight.js.map +0 -1
  486. package/lib/module/components/touchables/TouchableNativeFeedback.android.js +0 -86
  487. package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +0 -1
  488. package/lib/module/components/touchables/TouchableNativeFeedback.js +0 -8
  489. package/lib/module/components/touchables/TouchableNativeFeedback.js.map +0 -1
  490. package/lib/module/components/touchables/TouchableNativeFeedbackProps.js +0 -2
  491. package/lib/module/components/touchables/TouchableNativeFeedbackProps.js.map +0 -1
  492. package/lib/module/components/touchables/TouchableOpacity.js +0 -68
  493. package/lib/module/components/touchables/TouchableOpacity.js.map +0 -1
  494. package/lib/module/components/touchables/TouchableWithoutFeedback.js +0 -22
  495. package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +0 -1
  496. package/lib/module/components/touchables/index.js +0 -5
  497. package/lib/module/components/touchables/index.js.map +0 -1
  498. package/lib/module/findNodeHandle.js +0 -3
  499. package/lib/module/findNodeHandle.js.map +0 -1
  500. package/lib/module/findNodeHandle.web.js +0 -39
  501. package/lib/module/findNodeHandle.web.js.map +0 -1
  502. package/lib/module/getShadowNodeFromRef.js +0 -45
  503. package/lib/module/getShadowNodeFromRef.js.map +0 -1
  504. package/lib/module/getShadowNodeFromRef.web.js +0 -8
  505. package/lib/module/getShadowNodeFromRef.web.js.map +0 -1
  506. package/lib/module/ghQueueMicrotask.js +0 -4
  507. package/lib/module/ghQueueMicrotask.js.map +0 -1
  508. package/lib/module/handlers/FlingGestureHandler.js +0 -18
  509. package/lib/module/handlers/FlingGestureHandler.js.map +0 -1
  510. package/lib/module/handlers/ForceTouchGestureHandler.js +0 -35
  511. package/lib/module/handlers/ForceTouchGestureHandler.js.map +0 -1
  512. package/lib/module/handlers/GestureHandlerEventPayload.js +0 -2
  513. package/lib/module/handlers/GestureHandlerEventPayload.js.map +0 -1
  514. package/lib/module/handlers/LongPressGestureHandler.js +0 -20
  515. package/lib/module/handlers/LongPressGestureHandler.js.map +0 -1
  516. package/lib/module/handlers/NativeViewGestureHandler.js +0 -19
  517. package/lib/module/handlers/NativeViewGestureHandler.js.map +0 -1
  518. package/lib/module/handlers/PanGestureHandler.js +0 -114
  519. package/lib/module/handlers/PanGestureHandler.js.map +0 -1
  520. package/lib/module/handlers/PinchGestureHandler.js +0 -21
  521. package/lib/module/handlers/PinchGestureHandler.js.map +0 -1
  522. package/lib/module/handlers/PressabilityDebugView.js +0 -3
  523. package/lib/module/handlers/PressabilityDebugView.js.map +0 -1
  524. package/lib/module/handlers/PressabilityDebugView.web.js +0 -5
  525. package/lib/module/handlers/PressabilityDebugView.web.js.map +0 -1
  526. package/lib/module/handlers/RotationGestureHandler.js +0 -21
  527. package/lib/module/handlers/RotationGestureHandler.js.map +0 -1
  528. package/lib/module/handlers/TapGestureHandler.js +0 -20
  529. package/lib/module/handlers/TapGestureHandler.js.map +0 -1
  530. package/lib/module/handlers/createHandler.js +0 -460
  531. package/lib/module/handlers/createHandler.js.map +0 -1
  532. package/lib/module/handlers/createNativeWrapper.js +0 -75
  533. package/lib/module/handlers/createNativeWrapper.js.map +0 -1
  534. package/lib/module/handlers/customDirectEventTypes.js +0 -3
  535. package/lib/module/handlers/customDirectEventTypes.js.map +0 -1
  536. package/lib/module/handlers/customDirectEventTypes.web.js +0 -5
  537. package/lib/module/handlers/customDirectEventTypes.web.js.map +0 -1
  538. package/lib/module/handlers/gestureHandlerCommon.js +0 -19
  539. package/lib/module/handlers/gestureHandlerCommon.js.map +0 -1
  540. package/lib/module/handlers/gestureHandlerTypesCompat.js +0 -2
  541. package/lib/module/handlers/gestureHandlerTypesCompat.js.map +0 -1
  542. package/lib/module/handlers/gestures/GestureDetector/Wrap.js +0 -26
  543. package/lib/module/handlers/gestures/GestureDetector/Wrap.js.map +0 -1
  544. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js +0 -32
  545. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js.map +0 -1
  546. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js +0 -68
  547. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js.map +0 -1
  548. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js +0 -14
  549. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js.map +0 -1
  550. package/lib/module/handlers/gestures/GestureDetector/index.js +0 -118
  551. package/lib/module/handlers/gestures/GestureDetector/index.js.map +0 -1
  552. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js +0 -18
  553. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js.map +0 -1
  554. package/lib/module/handlers/gestures/GestureDetector/types.js +0 -2
  555. package/lib/module/handlers/gestures/GestureDetector/types.js.map +0 -1
  556. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js +0 -61
  557. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js.map +0 -1
  558. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js +0 -165
  559. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +0 -1
  560. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js +0 -41
  561. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +0 -1
  562. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js +0 -39
  563. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js.map +0 -1
  564. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js +0 -36
  565. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js.map +0 -1
  566. package/lib/module/handlers/gestures/GestureDetector/utils.js +0 -139
  567. package/lib/module/handlers/gestures/GestureDetector/utils.js.map +0 -1
  568. package/lib/module/handlers/gestures/eventReceiver.js +0 -131
  569. package/lib/module/handlers/gestures/eventReceiver.js.map +0 -1
  570. package/lib/module/handlers/gestures/flingGesture.js +0 -37
  571. package/lib/module/handlers/gestures/flingGesture.js.map +0 -1
  572. package/lib/module/handlers/gestures/forceTouchGesture.js +0 -73
  573. package/lib/module/handlers/gestures/forceTouchGesture.js.map +0 -1
  574. package/lib/module/handlers/gestures/gesture.js +0 -362
  575. package/lib/module/handlers/gestures/gesture.js.map +0 -1
  576. package/lib/module/handlers/gestures/gestureComposition.js +0 -92
  577. package/lib/module/handlers/gestures/gestureComposition.js.map +0 -1
  578. package/lib/module/handlers/gestures/gestureObjects.js +0 -138
  579. package/lib/module/handlers/gestures/gestureObjects.js.map +0 -1
  580. package/lib/module/handlers/gestures/gestureStateManager.js +0 -64
  581. package/lib/module/handlers/gestures/gestureStateManager.js.map +0 -1
  582. package/lib/module/handlers/gestures/gestureStateManager.web.js +0 -21
  583. package/lib/module/handlers/gestures/gestureStateManager.web.js.map +0 -1
  584. package/lib/module/handlers/gestures/hoverGesture.js +0 -62
  585. package/lib/module/handlers/gestures/hoverGesture.js.map +0 -1
  586. package/lib/module/handlers/gestures/longPressGesture.js +0 -47
  587. package/lib/module/handlers/gestures/longPressGesture.js.map +0 -1
  588. package/lib/module/handlers/gestures/manualGesture.js +0 -22
  589. package/lib/module/handlers/gestures/manualGesture.js.map +0 -1
  590. package/lib/module/handlers/gestures/nativeGesture.js +0 -34
  591. package/lib/module/handlers/gestures/nativeGesture.js.map +0 -1
  592. package/lib/module/handlers/gestures/panGesture.js +0 -216
  593. package/lib/module/handlers/gestures/panGesture.js.map +0 -1
  594. package/lib/module/handlers/gestures/pinchGesture.js +0 -36
  595. package/lib/module/handlers/gestures/pinchGesture.js.map +0 -1
  596. package/lib/module/handlers/gestures/reanimatedWrapper.js +0 -30
  597. package/lib/module/handlers/gestures/reanimatedWrapper.js.map +0 -1
  598. package/lib/module/handlers/gestures/rotationGesture.js +0 -36
  599. package/lib/module/handlers/gestures/rotationGesture.js.map +0 -1
  600. package/lib/module/handlers/gestures/tapGesture.js +0 -92
  601. package/lib/module/handlers/gestures/tapGesture.js.map +0 -1
  602. package/lib/module/handlers/getNextHandlerTag.js +0 -5
  603. package/lib/module/handlers/getNextHandlerTag.js.map +0 -1
  604. package/lib/module/handlers/handlersRegistry.js +0 -43
  605. package/lib/module/handlers/handlersRegistry.js.map +0 -1
  606. package/lib/module/handlers/utils.js +0 -71
  607. package/lib/module/handlers/utils.js.map +0 -1
  608. package/lib/module/index.js +0 -29
  609. package/lib/module/index.js.map +0 -1
  610. package/lib/module/init.js +0 -16
  611. package/lib/module/init.js.map +0 -1
  612. package/lib/module/jestUtils/index.js +0 -2
  613. package/lib/module/jestUtils/index.js.map +0 -1
  614. package/lib/module/jestUtils/jestUtils.js +0 -358
  615. package/lib/module/jestUtils/jestUtils.js.map +0 -1
  616. package/lib/module/mocks.js +0 -68
  617. package/lib/module/mocks.js.map +0 -1
  618. package/lib/module/mountRegistry.js +0 -40
  619. package/lib/module/mountRegistry.js.map +0 -1
  620. package/lib/module/specs/NativeRNGestureHandlerModule.js +0 -3
  621. package/lib/module/specs/NativeRNGestureHandlerModule.js.map +0 -1
  622. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js +0 -3
  623. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +0 -1
  624. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js +0 -3
  625. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +0 -1
  626. package/lib/module/typeUtils.js +0 -2
  627. package/lib/module/typeUtils.js.map +0 -1
  628. package/lib/module/utils.js +0 -87
  629. package/lib/module/utils.js.map +0 -1
  630. package/lib/module/web/Gestures.js +0 -39
  631. package/lib/module/web/Gestures.js.map +0 -1
  632. package/lib/module/web/constants.js +0 -3
  633. package/lib/module/web/constants.js.map +0 -1
  634. package/lib/module/web/detectors/RotationGestureDetector.js +0 -153
  635. package/lib/module/web/detectors/RotationGestureDetector.js.map +0 -1
  636. package/lib/module/web/detectors/ScaleGestureDetector.js +0 -144
  637. package/lib/module/web/detectors/ScaleGestureDetector.js.map +0 -1
  638. package/lib/module/web/handlers/FlingGestureHandler.js +0 -173
  639. package/lib/module/web/handlers/FlingGestureHandler.js.map +0 -1
  640. package/lib/module/web/handlers/GestureHandler.js +0 -801
  641. package/lib/module/web/handlers/GestureHandler.js.map +0 -1
  642. package/lib/module/web/handlers/HoverGestureHandler.js +0 -50
  643. package/lib/module/web/handlers/HoverGestureHandler.js.map +0 -1
  644. package/lib/module/web/handlers/IGestureHandler.js +0 -2
  645. package/lib/module/web/handlers/IGestureHandler.js.map +0 -1
  646. package/lib/module/web/handlers/LongPressGestureHandler.js +0 -180
  647. package/lib/module/web/handlers/LongPressGestureHandler.js.map +0 -1
  648. package/lib/module/web/handlers/ManualGestureHandler.js +0 -36
  649. package/lib/module/web/handlers/ManualGestureHandler.js.map +0 -1
  650. package/lib/module/web/handlers/NativeViewGestureHandler.js +0 -174
  651. package/lib/module/web/handlers/NativeViewGestureHandler.js.map +0 -1
  652. package/lib/module/web/handlers/PanGestureHandler.js +0 -514
  653. package/lib/module/web/handlers/PanGestureHandler.js.map +0 -1
  654. package/lib/module/web/handlers/PinchGestureHandler.js +0 -150
  655. package/lib/module/web/handlers/PinchGestureHandler.js.map +0 -1
  656. package/lib/module/web/handlers/RotationGestureHandler.js +0 -158
  657. package/lib/module/web/handlers/RotationGestureHandler.js.map +0 -1
  658. package/lib/module/web/handlers/TapGestureHandler.js +0 -271
  659. package/lib/module/web/handlers/TapGestureHandler.js.map +0 -1
  660. package/lib/module/web/interfaces.js +0 -31
  661. package/lib/module/web/interfaces.js.map +0 -1
  662. package/lib/module/web/tools/CircularBuffer.js +0 -50
  663. package/lib/module/web/tools/CircularBuffer.js.map +0 -1
  664. package/lib/module/web/tools/EventManager.js +0 -124
  665. package/lib/module/web/tools/EventManager.js.map +0 -1
  666. package/lib/module/web/tools/GestureHandlerDelegate.js +0 -2
  667. package/lib/module/web/tools/GestureHandlerDelegate.js.map +0 -1
  668. package/lib/module/web/tools/GestureHandlerOrchestrator.js +0 -326
  669. package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +0 -1
  670. package/lib/module/web/tools/GestureHandlerWebDelegate.js +0 -199
  671. package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +0 -1
  672. package/lib/module/web/tools/InteractionManager.js +0 -110
  673. package/lib/module/web/tools/InteractionManager.js.map +0 -1
  674. package/lib/module/web/tools/KeyboardEventManager.js +0 -96
  675. package/lib/module/web/tools/KeyboardEventManager.js.map +0 -1
  676. package/lib/module/web/tools/LeastSquareSolver.js +0 -195
  677. package/lib/module/web/tools/LeastSquareSolver.js.map +0 -1
  678. package/lib/module/web/tools/NodeManager.js +0 -40
  679. package/lib/module/web/tools/NodeManager.js.map +0 -1
  680. package/lib/module/web/tools/PointerEventManager.js +0 -212
  681. package/lib/module/web/tools/PointerEventManager.js.map +0 -1
  682. package/lib/module/web/tools/PointerTracker.js +0 -221
  683. package/lib/module/web/tools/PointerTracker.js.map +0 -1
  684. package/lib/module/web/tools/Vector.js +0 -50
  685. package/lib/module/web/tools/Vector.js.map +0 -1
  686. package/lib/module/web/tools/VelocityTracker.js +0 -98
  687. package/lib/module/web/tools/VelocityTracker.js.map +0 -1
  688. package/lib/module/web/tools/WheelEventManager.js +0 -60
  689. package/lib/module/web/tools/WheelEventManager.js.map +0 -1
  690. package/lib/module/web/utils.js +0 -243
  691. package/lib/module/web/utils.js.map +0 -1
  692. package/lib/module/web_hammer/DiscreteGestureHandler.js +0 -94
  693. package/lib/module/web_hammer/DiscreteGestureHandler.js.map +0 -1
  694. package/lib/module/web_hammer/DraggingGestureHandler.js +0 -40
  695. package/lib/module/web_hammer/DraggingGestureHandler.js.map +0 -1
  696. package/lib/module/web_hammer/Errors.js +0 -7
  697. package/lib/module/web_hammer/Errors.js.map +0 -1
  698. package/lib/module/web_hammer/FlingGestureHandler.js +0 -156
  699. package/lib/module/web_hammer/FlingGestureHandler.js.map +0 -1
  700. package/lib/module/web_hammer/GestureHandler.js +0 -563
  701. package/lib/module/web_hammer/GestureHandler.js.map +0 -1
  702. package/lib/module/web_hammer/IndiscreteGestureHandler.js +0 -44
  703. package/lib/module/web_hammer/IndiscreteGestureHandler.js.map +0 -1
  704. package/lib/module/web_hammer/LongPressGestureHandler.js +0 -58
  705. package/lib/module/web_hammer/LongPressGestureHandler.js.map +0 -1
  706. package/lib/module/web_hammer/NativeViewGestureHandler.js +0 -49
  707. package/lib/module/web_hammer/NativeViewGestureHandler.js.map +0 -1
  708. package/lib/module/web_hammer/NodeManager.js +0 -33
  709. package/lib/module/web_hammer/NodeManager.js.map +0 -1
  710. package/lib/module/web_hammer/PanGestureHandler.js +0 -194
  711. package/lib/module/web_hammer/PanGestureHandler.js.map +0 -1
  712. package/lib/module/web_hammer/PinchGestureHandler.js +0 -29
  713. package/lib/module/web_hammer/PinchGestureHandler.js.map +0 -1
  714. package/lib/module/web_hammer/PressGestureHandler.js +0 -174
  715. package/lib/module/web_hammer/PressGestureHandler.js.map +0 -1
  716. package/lib/module/web_hammer/RotationGestureHandler.js +0 -32
  717. package/lib/module/web_hammer/RotationGestureHandler.js.map +0 -1
  718. package/lib/module/web_hammer/TapGestureHandler.js +0 -180
  719. package/lib/module/web_hammer/TapGestureHandler.js.map +0 -1
  720. package/lib/module/web_hammer/constants.js +0 -43
  721. package/lib/module/web_hammer/constants.js.map +0 -1
  722. package/lib/module/web_hammer/utils.js +0 -19
  723. package/lib/module/web_hammer/utils.js.map +0 -1
  724. package/lib/typescript/ActionType.d.ts +0 -7
  725. package/lib/typescript/Directions.d.ts +0 -14
  726. package/lib/typescript/EnableNewWebImplementation.d.ts +0 -9
  727. package/lib/typescript/GestureHandlerRootViewContext.d.ts +0 -3
  728. package/lib/typescript/PlatformConstants.d.ts +0 -5
  729. package/lib/typescript/PlatformConstants.web.d.ts +0 -4
  730. package/lib/typescript/PointerType.d.ts +0 -7
  731. package/lib/typescript/RNGestureHandlerModule.d.ts +0 -2
  732. package/lib/typescript/RNGestureHandlerModule.web.d.ts +0 -15
  733. package/lib/typescript/RNGestureHandlerModule.windows.d.ts +0 -32
  734. package/lib/typescript/RNRenderer.d.ts +0 -1
  735. package/lib/typescript/RNRenderer.web.d.ts +0 -3
  736. package/lib/typescript/State.d.ts +0 -9
  737. package/lib/typescript/TouchEventType.d.ts +0 -8
  738. package/lib/typescript/components/DrawerLayout.d.ts +0 -185
  739. package/lib/typescript/components/GestureButtons.d.ts +0 -7
  740. package/lib/typescript/components/GestureButtonsProps.d.ts +0 -115
  741. package/lib/typescript/components/GestureComponents.d.ts +0 -22
  742. package/lib/typescript/components/GestureComponents.web.d.ts +0 -8
  743. package/lib/typescript/components/GestureHandlerButton.d.ts +0 -4
  744. package/lib/typescript/components/GestureHandlerButton.web.d.ts +0 -4
  745. package/lib/typescript/components/GestureHandlerRootView.android.d.ts +0 -6
  746. package/lib/typescript/components/GestureHandlerRootView.d.ts +0 -6
  747. package/lib/typescript/components/GestureHandlerRootView.web.d.ts +0 -6
  748. package/lib/typescript/components/Pressable/Pressable.d.ts +0 -5
  749. package/lib/typescript/components/Pressable/PressableProps.d.ts +0 -109
  750. package/lib/typescript/components/Pressable/index.d.ts +0 -2
  751. package/lib/typescript/components/Pressable/utils.d.ts +0 -13
  752. package/lib/typescript/components/ReanimatedDrawerLayout.d.ts +0 -167
  753. package/lib/typescript/components/ReanimatedSwipeable.d.ts +0 -137
  754. package/lib/typescript/components/Swipeable.d.ts +0 -183
  755. package/lib/typescript/components/Text.d.ts +0 -4
  756. package/lib/typescript/components/gestureHandlerRootHOC.d.ts +0 -3
  757. package/lib/typescript/components/touchables/ExtraButtonProps.d.ts +0 -7
  758. package/lib/typescript/components/touchables/GenericTouchable.d.ts +0 -55
  759. package/lib/typescript/components/touchables/GenericTouchableProps.d.ts +0 -16
  760. package/lib/typescript/components/touchables/TouchableHighlight.d.ts +0 -41
  761. package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +0 -40
  762. package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +0 -6
  763. package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +0 -8
  764. package/lib/typescript/components/touchables/TouchableOpacity.d.ts +0 -30
  765. package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +0 -14
  766. package/lib/typescript/components/touchables/index.d.ts +0 -7
  767. package/lib/typescript/findNodeHandle.d.ts +0 -2
  768. package/lib/typescript/findNodeHandle.web.d.ts +0 -2
  769. package/lib/typescript/getShadowNodeFromRef.d.ts +0 -1
  770. package/lib/typescript/getShadowNodeFromRef.web.d.ts +0 -1
  771. package/lib/typescript/ghQueueMicrotask.d.ts +0 -1
  772. package/lib/typescript/handlers/FlingGestureHandler.d.ts +0 -39
  773. package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +0 -44
  774. package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts +0 -194
  775. package/lib/typescript/handlers/LongPressGestureHandler.d.ts +0 -36
  776. package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +0 -33
  777. package/lib/typescript/handlers/PanGestureHandler.d.ts +0 -100
  778. package/lib/typescript/handlers/PinchGestureHandler.d.ts +0 -17
  779. package/lib/typescript/handlers/PressabilityDebugView.d.ts +0 -1
  780. package/lib/typescript/handlers/PressabilityDebugView.web.d.ts +0 -1
  781. package/lib/typescript/handlers/RotationGestureHandler.d.ts +0 -17
  782. package/lib/typescript/handlers/TapGestureHandler.d.ts +0 -62
  783. package/lib/typescript/handlers/createHandler.d.ts +0 -11
  784. package/lib/typescript/handlers/createNativeWrapper.d.ts +0 -3
  785. package/lib/typescript/handlers/customDirectEventTypes.d.ts +0 -1
  786. package/lib/typescript/handlers/customDirectEventTypes.web.d.ts +0 -2
  787. package/lib/typescript/handlers/gestureHandlerCommon.d.ts +0 -78
  788. package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts +0 -43
  789. package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts +0 -13
  790. package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts +0 -7
  791. package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts +0 -13
  792. package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts +0 -2
  793. package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts +0 -49
  794. package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts +0 -3
  795. package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts +0 -21
  796. package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts +0 -4
  797. package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts +0 -2
  798. package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts +0 -5
  799. package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts +0 -2
  800. package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts +0 -3
  801. package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts +0 -13
  802. package/lib/typescript/handlers/gestures/eventReceiver.d.ts +0 -4
  803. package/lib/typescript/handlers/gestures/flingGesture.d.ts +0 -21
  804. package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts +0 -30
  805. package/lib/typescript/handlers/gestures/gesture.d.ts +0 -218
  806. package/lib/typescript/handlers/gestures/gestureComposition.d.ts +0 -21
  807. package/lib/typescript/handlers/gestures/gestureObjects.d.ts +0 -98
  808. package/lib/typescript/handlers/gestures/gestureStateManager.d.ts +0 -11
  809. package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts +0 -4
  810. package/lib/typescript/handlers/gestures/hoverGesture.d.ts +0 -27
  811. package/lib/typescript/handlers/gestures/longPressGesture.d.ts +0 -25
  812. package/lib/typescript/handlers/gestures/manualGesture.d.ts +0 -7
  813. package/lib/typescript/handlers/gestures/nativeGesture.d.ts +0 -18
  814. package/lib/typescript/handlers/gestures/panGesture.d.ts +0 -90
  815. package/lib/typescript/handlers/gestures/pinchGesture.d.ts +0 -11
  816. package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts +0 -14
  817. package/lib/typescript/handlers/gestures/rotationGesture.d.ts +0 -12
  818. package/lib/typescript/handlers/gestures/tapGesture.d.ts +0 -50
  819. package/lib/typescript/handlers/getNextHandlerTag.d.ts +0 -1
  820. package/lib/typescript/handlers/handlersRegistry.d.ts +0 -14
  821. package/lib/typescript/handlers/utils.d.ts +0 -7
  822. package/lib/typescript/index.d.ts +0 -58
  823. package/lib/typescript/init.d.ts +0 -2
  824. package/lib/typescript/jestUtils/index.d.ts +0 -1
  825. package/lib/typescript/jestUtils/jestUtils.d.ts +0 -30
  826. package/lib/typescript/mocks.d.ts +0 -46
  827. package/lib/typescript/mountRegistry.d.ts +0 -17
  828. package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts +0 -14
  829. package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts +0 -17
  830. package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +0 -6
  831. package/lib/typescript/typeUtils.d.ts +0 -1
  832. package/lib/typescript/utils.d.ts +0 -20
  833. package/lib/typescript/web/Gestures.d.ts +0 -36
  834. package/lib/typescript/web/constants.d.ts +0 -2
  835. package/lib/typescript/web/detectors/RotationGestureDetector.d.ts +0 -30
  836. package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts +0 -29
  837. package/lib/typescript/web/handlers/FlingGestureHandler.d.ts +0 -26
  838. package/lib/typescript/web/handlers/GestureHandler.d.ts +0 -103
  839. package/lib/typescript/web/handlers/HoverGestureHandler.d.ts +0 -10
  840. package/lib/typescript/web/handlers/IGestureHandler.d.ts +0 -37
  841. package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts +0 -31
  842. package/lib/typescript/web/handlers/ManualGestureHandler.d.ts +0 -10
  843. package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts +0 -26
  844. package/lib/typescript/web/handlers/PanGestureHandler.d.ts +0 -61
  845. package/lib/typescript/web/handlers/PinchGestureHandler.d.ts +0 -28
  846. package/lib/typescript/web/handlers/RotationGestureHandler.d.ts +0 -28
  847. package/lib/typescript/web/handlers/TapGestureHandler.d.ts +0 -38
  848. package/lib/typescript/web/interfaces.d.ts +0 -157
  849. package/lib/typescript/web/tools/CircularBuffer.d.ts +0 -11
  850. package/lib/typescript/web/tools/EventManager.d.ts +0 -39
  851. package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +0 -24
  852. package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts +0 -31
  853. package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +0 -35
  854. package/lib/typescript/web/tools/InteractionManager.d.ts +0 -17
  855. package/lib/typescript/web/tools/KeyboardEventManager.d.ts +0 -13
  856. package/lib/typescript/web/tools/LeastSquareSolver.d.ts +0 -12
  857. package/lib/typescript/web/tools/NodeManager.d.ts +0 -12
  858. package/lib/typescript/web/tools/PointerEventManager.d.ts +0 -19
  859. package/lib/typescript/web/tools/PointerTracker.d.ts +0 -50
  860. package/lib/typescript/web/tools/Vector.d.ts +0 -15
  861. package/lib/typescript/web/tools/VelocityTracker.d.ts +0 -13
  862. package/lib/typescript/web/tools/WheelEventManager.d.ts +0 -11
  863. package/lib/typescript/web/utils.d.ts +0 -14
  864. package/lib/typescript/web_hammer/DiscreteGestureHandler.d.ts +0 -20
  865. package/lib/typescript/web_hammer/DraggingGestureHandler.d.ts +0 -15
  866. package/lib/typescript/web_hammer/Errors.d.ts +0 -3
  867. package/lib/typescript/web_hammer/FlingGestureHandler.d.ts +0 -43
  868. package/lib/typescript/web_hammer/GestureHandler.d.ts +0 -145
  869. package/lib/typescript/web_hammer/IndiscreteGestureHandler.d.ts +0 -40
  870. package/lib/typescript/web_hammer/LongPressGestureHandler.d.ts +0 -38
  871. package/lib/typescript/web_hammer/NativeViewGestureHandler.d.ts +0 -7
  872. package/lib/typescript/web_hammer/NodeManager.d.ts +0 -7
  873. package/lib/typescript/web_hammer/PanGestureHandler.d.ts +0 -56
  874. package/lib/typescript/web_hammer/PinchGestureHandler.d.ts +0 -13
  875. package/lib/typescript/web_hammer/PressGestureHandler.d.ts +0 -83
  876. package/lib/typescript/web_hammer/RotationGestureHandler.d.ts +0 -13
  877. package/lib/typescript/web_hammer/TapGestureHandler.d.ts +0 -57
  878. package/lib/typescript/web_hammer/constants.d.ts +0 -39
  879. package/lib/typescript/web_hammer/utils.d.ts +0 -9
  880. /package/android/{common → noreanimated}/src/main/java/com/swmansion/common/GestureHandlerStateManager.kt +0 -0
@@ -1,114 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.gestureTouchToPressableEvent = exports.gestureToPressableEvent = exports.isTouchWithinInset = exports.addInsets = exports.numberAsInset = void 0;
7
-
8
- const numberAsInset = value => ({
9
- left: value,
10
- right: value,
11
- top: value,
12
- bottom: value
13
- });
14
-
15
- exports.numberAsInset = numberAsInset;
16
-
17
- const addInsets = (a, b) => {
18
- var _a$left, _b$left, _a$right, _b$right, _a$top, _b$top, _a$bottom, _b$bottom;
19
-
20
- return {
21
- left: ((_a$left = a.left) !== null && _a$left !== void 0 ? _a$left : 0) + ((_b$left = b.left) !== null && _b$left !== void 0 ? _b$left : 0),
22
- right: ((_a$right = a.right) !== null && _a$right !== void 0 ? _a$right : 0) + ((_b$right = b.right) !== null && _b$right !== void 0 ? _b$right : 0),
23
- top: ((_a$top = a.top) !== null && _a$top !== void 0 ? _a$top : 0) + ((_b$top = b.top) !== null && _b$top !== void 0 ? _b$top : 0),
24
- bottom: ((_a$bottom = a.bottom) !== null && _a$bottom !== void 0 ? _a$bottom : 0) + ((_b$bottom = b.bottom) !== null && _b$bottom !== void 0 ? _b$bottom : 0)
25
- };
26
- };
27
-
28
- exports.addInsets = addInsets;
29
-
30
- const touchDataToPressEvent = (data, timestamp, targetId) => ({
31
- identifier: data.id,
32
- locationX: data.x,
33
- locationY: data.y,
34
- pageX: data.absoluteX,
35
- pageY: data.absoluteY,
36
- target: targetId,
37
- timestamp: timestamp,
38
- touches: [],
39
- // Always empty - legacy compatibility
40
- changedTouches: [] // Always empty - legacy compatibility
41
-
42
- });
43
-
44
- const gestureToPressEvent = (event, timestamp, targetId) => ({
45
- identifier: event.handlerTag,
46
- locationX: event.x,
47
- locationY: event.y,
48
- pageX: event.absoluteX,
49
- pageY: event.absoluteY,
50
- target: targetId,
51
- timestamp: timestamp,
52
- touches: [],
53
- // Always empty - legacy compatibility
54
- changedTouches: [] // Always empty - legacy compatibility
55
-
56
- });
57
-
58
- const isTouchWithinInset = (dimensions, inset, touch) => {
59
- var _touch$x, _inset$right, _touch$y, _inset$bottom, _touch$x2, _inset$left, _touch$y2, _inset$top;
60
-
61
- return ((_touch$x = touch === null || touch === void 0 ? void 0 : touch.x) !== null && _touch$x !== void 0 ? _touch$x : 0) < ((_inset$right = inset.right) !== null && _inset$right !== void 0 ? _inset$right : 0) + dimensions.width && ((_touch$y = touch === null || touch === void 0 ? void 0 : touch.y) !== null && _touch$y !== void 0 ? _touch$y : 0) < ((_inset$bottom = inset.bottom) !== null && _inset$bottom !== void 0 ? _inset$bottom : 0) + dimensions.height && ((_touch$x2 = touch === null || touch === void 0 ? void 0 : touch.x) !== null && _touch$x2 !== void 0 ? _touch$x2 : 0) > -((_inset$left = inset.left) !== null && _inset$left !== void 0 ? _inset$left : 0) && ((_touch$y2 = touch === null || touch === void 0 ? void 0 : touch.y) !== null && _touch$y2 !== void 0 ? _touch$y2 : 0) > -((_inset$top = inset.top) !== null && _inset$top !== void 0 ? _inset$top : 0);
62
- };
63
-
64
- exports.isTouchWithinInset = isTouchWithinInset;
65
-
66
- const gestureToPressableEvent = event => {
67
- const timestamp = Date.now(); // As far as I can see, there isn't a conventional way of getting targetId with the data we get
68
-
69
- const targetId = 0;
70
- const pressEvent = gestureToPressEvent(event, timestamp, targetId);
71
- return {
72
- nativeEvent: {
73
- touches: [pressEvent],
74
- changedTouches: [pressEvent],
75
- identifier: pressEvent.identifier,
76
- locationX: event.x,
77
- locationY: event.y,
78
- pageX: event.absoluteX,
79
- pageY: event.absoluteY,
80
- target: targetId,
81
- timestamp: timestamp,
82
- force: undefined
83
- }
84
- };
85
- };
86
-
87
- exports.gestureToPressableEvent = gestureToPressableEvent;
88
-
89
- const gestureTouchToPressableEvent = event => {
90
- var _event$allTouches$at$, _event$allTouches$at, _event$allTouches$at$2, _event$allTouches$at2, _event$allTouches$at$3, _event$allTouches$at3, _event$allTouches$at$4, _event$allTouches$at4;
91
-
92
- const timestamp = Date.now(); // As far as I can see, there isn't a conventional way of getting targetId with the data we get
93
-
94
- const targetId = 0;
95
- const touchesList = event.allTouches.map(touch => touchDataToPressEvent(touch, timestamp, targetId));
96
- const changedTouchesList = event.changedTouches.map(touch => touchDataToPressEvent(touch, timestamp, targetId));
97
- return {
98
- nativeEvent: {
99
- touches: touchesList,
100
- changedTouches: changedTouchesList,
101
- identifier: event.handlerTag,
102
- locationX: (_event$allTouches$at$ = (_event$allTouches$at = event.allTouches.at(0)) === null || _event$allTouches$at === void 0 ? void 0 : _event$allTouches$at.x) !== null && _event$allTouches$at$ !== void 0 ? _event$allTouches$at$ : -1,
103
- locationY: (_event$allTouches$at$2 = (_event$allTouches$at2 = event.allTouches.at(0)) === null || _event$allTouches$at2 === void 0 ? void 0 : _event$allTouches$at2.y) !== null && _event$allTouches$at$2 !== void 0 ? _event$allTouches$at$2 : -1,
104
- pageX: (_event$allTouches$at$3 = (_event$allTouches$at3 = event.allTouches.at(0)) === null || _event$allTouches$at3 === void 0 ? void 0 : _event$allTouches$at3.absoluteX) !== null && _event$allTouches$at$3 !== void 0 ? _event$allTouches$at$3 : -1,
105
- pageY: (_event$allTouches$at$4 = (_event$allTouches$at4 = event.allTouches.at(0)) === null || _event$allTouches$at4 === void 0 ? void 0 : _event$allTouches$at4.absoluteY) !== null && _event$allTouches$at$4 !== void 0 ? _event$allTouches$at$4 : -1,
106
- target: targetId,
107
- timestamp: timestamp,
108
- force: undefined
109
- }
110
- };
111
- };
112
-
113
- exports.gestureTouchToPressableEvent = gestureTouchToPressableEvent;
114
- //# sourceMappingURL=utils.js.map
@@ -1 +0,0 @@
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,KAFy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AwB/B,CAA1B,yEAA+B,CAAC,CAJ9B;AAKXC,MAAAA,SAAS,qDAAEU,KAAK,CAACiB,UAAN,CAAiBG,EAAjB,CAAoB,CAApB,CAAF,0DAAE,sBAAwB7B,CAA1B,2EAA+B,CAAC,CAL9B;AAMXC,MAAAA,KAAK,qDAAEQ,KAAK,CAACiB,UAAN,CAAiBG,EAAjB,CAAoB,CAApB,CAAF,0DAAE,sBAAwB3B,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","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,393 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.DrawerKeyboardDismissMode = exports.DrawerLockMode = exports.DrawerType = exports.DrawerState = exports.DrawerPosition = void 0;
7
-
8
- var _react = _interopRequireWildcard(require("react"));
9
-
10
- var _reactNative = require("react-native");
11
-
12
- var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
13
-
14
- var _gestureObjects = require("../handlers/gestures/gestureObjects");
15
-
16
- var _GestureDetector = require("../handlers/gestures/GestureDetector");
17
-
18
- var _gestureHandlerCommon = require("../handlers/gestureHandlerCommon");
19
-
20
- function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
21
-
22
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
-
24
- // This component is based on RN's DrawerLayoutAndroid API
25
- // It's cross-compatible with all platforms despite
26
- // `DrawerLayoutAndroid` only being available on android
27
- const DRAG_TOSS = 0.05;
28
- let DrawerPosition;
29
- exports.DrawerPosition = DrawerPosition;
30
-
31
- (function (DrawerPosition) {
32
- DrawerPosition[DrawerPosition["LEFT"] = 0] = "LEFT";
33
- DrawerPosition[DrawerPosition["RIGHT"] = 1] = "RIGHT";
34
- })(DrawerPosition || (exports.DrawerPosition = DrawerPosition = {}));
35
-
36
- let DrawerState;
37
- exports.DrawerState = DrawerState;
38
-
39
- (function (DrawerState) {
40
- DrawerState[DrawerState["IDLE"] = 0] = "IDLE";
41
- DrawerState[DrawerState["DRAGGING"] = 1] = "DRAGGING";
42
- DrawerState[DrawerState["SETTLING"] = 2] = "SETTLING";
43
- })(DrawerState || (exports.DrawerState = DrawerState = {}));
44
-
45
- let DrawerType;
46
- exports.DrawerType = DrawerType;
47
-
48
- (function (DrawerType) {
49
- DrawerType[DrawerType["FRONT"] = 0] = "FRONT";
50
- DrawerType[DrawerType["BACK"] = 1] = "BACK";
51
- DrawerType[DrawerType["SLIDE"] = 2] = "SLIDE";
52
- })(DrawerType || (exports.DrawerType = DrawerType = {}));
53
-
54
- let DrawerLockMode;
55
- exports.DrawerLockMode = DrawerLockMode;
56
-
57
- (function (DrawerLockMode) {
58
- DrawerLockMode[DrawerLockMode["UNLOCKED"] = 0] = "UNLOCKED";
59
- DrawerLockMode[DrawerLockMode["LOCKED_CLOSED"] = 1] = "LOCKED_CLOSED";
60
- DrawerLockMode[DrawerLockMode["LOCKED_OPEN"] = 2] = "LOCKED_OPEN";
61
- })(DrawerLockMode || (exports.DrawerLockMode = DrawerLockMode = {}));
62
-
63
- let DrawerKeyboardDismissMode;
64
- exports.DrawerKeyboardDismissMode = DrawerKeyboardDismissMode;
65
-
66
- (function (DrawerKeyboardDismissMode) {
67
- DrawerKeyboardDismissMode[DrawerKeyboardDismissMode["NONE"] = 0] = "NONE";
68
- DrawerKeyboardDismissMode[DrawerKeyboardDismissMode["ON_DRAG"] = 1] = "ON_DRAG";
69
- })(DrawerKeyboardDismissMode || (exports.DrawerKeyboardDismissMode = DrawerKeyboardDismissMode = {}));
70
-
71
- const defaultProps = {
72
- drawerWidth: 200,
73
- drawerPosition: DrawerPosition.LEFT,
74
- drawerType: DrawerType.FRONT,
75
- edgeWidth: 20,
76
- minSwipeDistance: 3,
77
- overlayColor: 'rgba(0, 0, 0, 0.7)',
78
- drawerLockMode: DrawerLockMode.UNLOCKED,
79
- enableTrackpadTwoFingerGesture: false,
80
- activeCursor: 'auto',
81
- mouseButton: _gestureHandlerCommon.MouseButton.LEFT,
82
- statusBarAnimation: 'slide'
83
- }; // StatusBar.setHidden and Keyboard.dismiss cannot be directly referenced in worklets.
84
-
85
- const setStatusBarHidden = _reactNative.StatusBar.setHidden;
86
- const dismissKeyboard = _reactNative.Keyboard.dismiss;
87
- const DrawerLayout = /*#__PURE__*/(0, _react.forwardRef)(function DrawerLayout(props, ref) {
88
- const [containerWidth, setContainerWidth] = (0, _react.useState)(0);
89
- const [drawerState, setDrawerState] = (0, _react.useState)(DrawerState.IDLE);
90
- const [drawerOpened, setDrawerOpened] = (0, _react.useState)(false);
91
- const {
92
- drawerPosition = defaultProps.drawerPosition,
93
- drawerWidth = defaultProps.drawerWidth,
94
- drawerType = defaultProps.drawerType,
95
- drawerBackgroundColor,
96
- drawerContainerStyle,
97
- contentContainerStyle,
98
- minSwipeDistance = defaultProps.minSwipeDistance,
99
- edgeWidth = defaultProps.edgeWidth,
100
- drawerLockMode = defaultProps.drawerLockMode,
101
- overlayColor = defaultProps.overlayColor,
102
- enableTrackpadTwoFingerGesture = defaultProps.enableTrackpadTwoFingerGesture,
103
- activeCursor = defaultProps.activeCursor,
104
- mouseButton = defaultProps.mouseButton,
105
- statusBarAnimation = defaultProps.statusBarAnimation,
106
- hideStatusBar,
107
- keyboardDismissMode,
108
- userSelect,
109
- enableContextMenu,
110
- renderNavigationView,
111
- onDrawerSlide,
112
- onDrawerClose,
113
- onDrawerOpen,
114
- onDrawerStateChanged,
115
- animationSpeed: animationSpeedProp
116
- } = props;
117
- const isFromLeft = drawerPosition === DrawerPosition.LEFT;
118
- const sideCorrection = isFromLeft ? 1 : -1; // While closing the drawer when user starts gesture in the greyed out part of the window,
119
- // we want the drawer to follow only once the finger reaches the edge of the drawer.
120
- // See the diagram for reference. * = starting finger position, < = current finger position
121
- // 1) +---------------+ 2) +---------------+ 3) +---------------+ 4) +---------------+
122
- // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|
123
- // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|
124
- // |XXXXXXXX|..<*..| |XXXXXXXX|.<-*..| |XXXXXXXX|<--*..| |XXXXX|<-----*..|
125
- // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|
126
- // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|
127
- // +---------------+ +---------------+ +---------------+ +---------------+
128
-
129
- const openValue = (0, _reactNativeReanimated.useSharedValue)(0);
130
- (0, _reactNativeReanimated.useDerivedValue)(() => {
131
- onDrawerSlide && (0, _reactNativeReanimated.runOnJS)(onDrawerSlide)(openValue.value);
132
- }, []);
133
- const isDrawerOpen = (0, _reactNativeReanimated.useSharedValue)(false);
134
-
135
- const handleContainerLayout = ({
136
- nativeEvent
137
- }) => {
138
- setContainerWidth(nativeEvent.layout.width);
139
- };
140
-
141
- const emitStateChanged = (0, _react.useCallback)((newState, drawerWillShow) => {
142
- 'worklet';
143
-
144
- var _runOnJS;
145
-
146
- onDrawerStateChanged && ((_runOnJS = (0, _reactNativeReanimated.runOnJS)(onDrawerStateChanged)) === null || _runOnJS === void 0 ? void 0 : _runOnJS(newState, drawerWillShow));
147
- }, [onDrawerStateChanged]);
148
- const drawerAnimatedProps = (0, _reactNativeReanimated.useAnimatedProps)(() => ({
149
- accessibilityViewIsModal: isDrawerOpen.value
150
- }));
151
- const overlayAnimatedProps = (0, _reactNativeReanimated.useAnimatedProps)(() => ({
152
- pointerEvents: isDrawerOpen.value ? 'auto' : 'none'
153
- })); // While the drawer is hidden, it's hitSlop overflows onto the main view by edgeWidth
154
- // This way it can be swiped open even when it's hidden
155
-
156
- const [edgeHitSlop, setEdgeHitSlop] = (0, _react.useState)(isFromLeft ? {
157
- left: 0,
158
- width: edgeWidth
159
- } : {
160
- right: 0,
161
- width: edgeWidth
162
- }); // gestureOrientation is 1 if the gesture is expected to move from left to right and -1 otherwise
163
-
164
- const gestureOrientation = (0, _react.useMemo)(() => sideCorrection * (drawerOpened ? -1 : 1), [sideCorrection, drawerOpened]);
165
- (0, _react.useEffect)(() => {
166
- setEdgeHitSlop(isFromLeft ? {
167
- left: 0,
168
- width: edgeWidth
169
- } : {
170
- right: 0,
171
- width: edgeWidth
172
- });
173
- }, [isFromLeft, edgeWidth]);
174
- const animateDrawer = (0, _react.useCallback)((toValue, initialVelocity, animationSpeed) => {
175
- 'worklet';
176
-
177
- const willShow = toValue !== 0;
178
- isDrawerOpen.value = willShow;
179
- emitStateChanged(DrawerState.SETTLING, willShow);
180
- (0, _reactNativeReanimated.runOnJS)(setDrawerState)(DrawerState.SETTLING);
181
-
182
- if (hideStatusBar) {
183
- (0, _reactNativeReanimated.runOnJS)(setStatusBarHidden)(willShow, statusBarAnimation);
184
- }
185
-
186
- const normalizedToValue = (0, _reactNativeReanimated.interpolate)(toValue, [0, drawerWidth], [0, 1], _reactNativeReanimated.Extrapolation.CLAMP);
187
- const normalizedInitialVelocity = (0, _reactNativeReanimated.interpolate)(initialVelocity, [0, drawerWidth], [0, 1], _reactNativeReanimated.Extrapolation.CLAMP);
188
- openValue.value = (0, _reactNativeReanimated.withSpring)(normalizedToValue, {
189
- overshootClamping: true,
190
- velocity: normalizedInitialVelocity,
191
- mass: animationSpeed ? 1 / animationSpeed : 1 / (animationSpeedProp !== null && animationSpeedProp !== void 0 ? animationSpeedProp : 1),
192
- damping: 40,
193
- stiffness: 500
194
- }, finished => {
195
- if (finished) {
196
- emitStateChanged(DrawerState.IDLE, willShow);
197
- (0, _reactNativeReanimated.runOnJS)(setDrawerOpened)(willShow);
198
- (0, _reactNativeReanimated.runOnJS)(setDrawerState)(DrawerState.IDLE);
199
-
200
- if (willShow) {
201
- var _runOnJS2;
202
-
203
- onDrawerOpen && ((_runOnJS2 = (0, _reactNativeReanimated.runOnJS)(onDrawerOpen)) === null || _runOnJS2 === void 0 ? void 0 : _runOnJS2());
204
- } else {
205
- var _runOnJS3;
206
-
207
- onDrawerClose && ((_runOnJS3 = (0, _reactNativeReanimated.runOnJS)(onDrawerClose)) === null || _runOnJS3 === void 0 ? void 0 : _runOnJS3());
208
- }
209
- }
210
- });
211
- }, [openValue, emitStateChanged, isDrawerOpen, hideStatusBar, onDrawerClose, onDrawerOpen, drawerWidth, statusBarAnimation]);
212
- const handleRelease = (0, _react.useCallback)(event => {
213
- 'worklet';
214
-
215
- let {
216
- translationX: dragX,
217
- velocityX,
218
- x: touchX
219
- } = event;
220
-
221
- if (drawerPosition !== DrawerPosition.LEFT) {
222
- // See description in _updateAnimatedEvent about why events are flipped
223
- // for right-side drawer
224
- dragX = -dragX;
225
- touchX = containerWidth - touchX;
226
- velocityX = -velocityX;
227
- }
228
-
229
- const gestureStartX = touchX - dragX;
230
- let dragOffsetBasedOnStart = 0;
231
-
232
- if (drawerType === DrawerType.FRONT) {
233
- dragOffsetBasedOnStart = gestureStartX > drawerWidth ? gestureStartX - drawerWidth : 0;
234
- }
235
-
236
- const startOffsetX = dragX + dragOffsetBasedOnStart + (isDrawerOpen.value ? drawerWidth : 0);
237
- const projOffsetX = startOffsetX + DRAG_TOSS * velocityX;
238
- const shouldOpen = projOffsetX > drawerWidth / 2;
239
-
240
- if (shouldOpen) {
241
- animateDrawer(drawerWidth, velocityX);
242
- } else {
243
- animateDrawer(0, velocityX);
244
- }
245
- }, [animateDrawer, containerWidth, drawerPosition, drawerType, drawerWidth, isDrawerOpen]);
246
- const openDrawer = (0, _react.useCallback)((options = {}) => {
247
- 'worklet';
248
-
249
- var _options$initialVeloc;
250
-
251
- animateDrawer(drawerWidth, (_options$initialVeloc = options.initialVelocity) !== null && _options$initialVeloc !== void 0 ? _options$initialVeloc : 0, options.animationSpeed);
252
- }, [animateDrawer, drawerWidth]);
253
- const closeDrawer = (0, _react.useCallback)((options = {}) => {
254
- 'worklet';
255
-
256
- var _options$initialVeloc2;
257
-
258
- animateDrawer(0, (_options$initialVeloc2 = options.initialVelocity) !== null && _options$initialVeloc2 !== void 0 ? _options$initialVeloc2 : 0, options.animationSpeed);
259
- }, [animateDrawer]);
260
- const overlayDismissGesture = (0, _react.useMemo)(() => _gestureObjects.GestureObjects.Tap().maxDistance(25).onEnd(() => {
261
- if (isDrawerOpen.value && drawerLockMode !== DrawerLockMode.LOCKED_OPEN) {
262
- closeDrawer();
263
- }
264
- }), [closeDrawer, isDrawerOpen, drawerLockMode]);
265
- const overlayAnimatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
266
- opacity: openValue.value,
267
- backgroundColor: overlayColor
268
- }));
269
- const fillHitSlop = (0, _react.useMemo)(() => isFromLeft ? {
270
- left: drawerWidth
271
- } : {
272
- right: drawerWidth
273
- }, [drawerWidth, isFromLeft]);
274
- const panGesture = (0, _react.useMemo)(() => {
275
- return _gestureObjects.GestureObjects.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(() => {
276
- emitStateChanged(DrawerState.DRAGGING, false);
277
- (0, _reactNativeReanimated.runOnJS)(setDrawerState)(DrawerState.DRAGGING);
278
-
279
- if (keyboardDismissMode === DrawerKeyboardDismissMode.ON_DRAG) {
280
- (0, _reactNativeReanimated.runOnJS)(dismissKeyboard)();
281
- }
282
-
283
- if (hideStatusBar) {
284
- (0, _reactNativeReanimated.runOnJS)(setStatusBarHidden)(true, statusBarAnimation);
285
- }
286
- }).onUpdate(event => {
287
- const startedOutsideTranslation = isFromLeft ? (0, _reactNativeReanimated.interpolate)(event.x, [0, drawerWidth, drawerWidth + 1], [0, drawerWidth, drawerWidth]) : (0, _reactNativeReanimated.interpolate)(event.x - containerWidth, [-drawerWidth - 1, -drawerWidth, 0], [drawerWidth, drawerWidth, 0]);
288
- const startedInsideTranslation = sideCorrection * (event.translationX + (drawerOpened ? drawerWidth * -gestureOrientation : 0));
289
- const adjustedTranslation = Math.max(drawerOpened ? startedOutsideTranslation : 0, startedInsideTranslation);
290
- openValue.value = (0, _reactNativeReanimated.interpolate)(adjustedTranslation, [-drawerWidth, 0, drawerWidth], [1, 0, 1], _reactNativeReanimated.Extrapolation.CLAMP);
291
- }).onEnd(handleRelease);
292
- }, [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.
293
-
294
- const reverseContentDirection = _reactNative.I18nManager.isRTL ? isFromLeft : !isFromLeft;
295
- const dynamicDrawerStyles = {
296
- backgroundColor: drawerBackgroundColor,
297
- width: drawerWidth
298
- };
299
- const containerStyles = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
300
- if (drawerType === DrawerType.FRONT) {
301
- return {};
302
- }
303
-
304
- return {
305
- transform: [{
306
- translateX: (0, _reactNativeReanimated.interpolate)(openValue.value, [0, 1], [0, drawerWidth * sideCorrection], _reactNativeReanimated.Extrapolation.CLAMP)
307
- }]
308
- };
309
- });
310
- const drawerAnimatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
311
- const closedDrawerOffset = drawerWidth * -sideCorrection;
312
- const isBack = drawerType === DrawerType.BACK;
313
- const isIdle = drawerState === DrawerState.IDLE;
314
-
315
- if (isBack) {
316
- return {
317
- transform: [{
318
- translateX: 0
319
- }],
320
- flexDirection: reverseContentDirection ? 'row-reverse' : 'row'
321
- };
322
- }
323
-
324
- let translateX = 0;
325
-
326
- if (isIdle) {
327
- translateX = drawerOpened ? 0 : closedDrawerOffset;
328
- } else {
329
- translateX = (0, _reactNativeReanimated.interpolate)(openValue.value, [0, 1], [closedDrawerOffset, 0], _reactNativeReanimated.Extrapolation.CLAMP);
330
- }
331
-
332
- return {
333
- transform: [{
334
- translateX
335
- }],
336
- flexDirection: reverseContentDirection ? 'row-reverse' : 'row'
337
- };
338
- });
339
- const containerAnimatedProps = (0, _reactNativeReanimated.useAnimatedProps)(() => ({
340
- importantForAccessibility: _reactNative.Platform.OS === 'android' ? isDrawerOpen.value ? 'no-hide-descendants' : 'yes' : undefined
341
- }));
342
- const children = typeof props.children === 'function' ? props.children(openValue) // renderer function
343
- : props.children;
344
- (0, _react.useImperativeHandle)(ref, () => ({
345
- openDrawer,
346
- closeDrawer
347
- }), [openDrawer, closeDrawer]);
348
- return /*#__PURE__*/_react.default.createElement(_GestureDetector.GestureDetector, {
349
- gesture: panGesture,
350
- userSelect: userSelect,
351
- enableContextMenu: enableContextMenu
352
- }, /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, {
353
- style: styles.main,
354
- onLayout: handleContainerLayout
355
- }, /*#__PURE__*/_react.default.createElement(_GestureDetector.GestureDetector, {
356
- gesture: overlayDismissGesture
357
- }, /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, {
358
- style: [drawerType === DrawerType.FRONT ? styles.containerOnBack : styles.containerInFront, containerStyles, contentContainerStyle],
359
- animatedProps: containerAnimatedProps
360
- }, children, /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, {
361
- animatedProps: overlayAnimatedProps,
362
- style: [styles.overlay, overlayAnimatedStyle]
363
- }))), /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, {
364
- pointerEvents: "box-none",
365
- animatedProps: drawerAnimatedProps,
366
- style: [styles.drawerContainer, drawerAnimatedStyle, drawerContainerStyle]
367
- }, /*#__PURE__*/_react.default.createElement(_reactNativeReanimated.default.View, {
368
- style: dynamicDrawerStyles
369
- }, renderNavigationView(openValue)))));
370
- });
371
- var _default = DrawerLayout;
372
- exports.default = _default;
373
-
374
- const styles = _reactNative.StyleSheet.create({
375
- drawerContainer: { ..._reactNative.StyleSheet.absoluteFillObject,
376
- zIndex: 1001,
377
- flexDirection: 'row'
378
- },
379
- containerInFront: { ..._reactNative.StyleSheet.absoluteFillObject,
380
- zIndex: 1002
381
- },
382
- containerOnBack: { ..._reactNative.StyleSheet.absoluteFillObject
383
- },
384
- main: {
385
- flex: 1,
386
- zIndex: 0,
387
- overflow: 'hidden'
388
- },
389
- overlay: { ..._reactNative.StyleSheet.absoluteFillObject,
390
- zIndex: 1000
391
- }
392
- });
393
- //# sourceMappingURL=ReanimatedDrawerLayout.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["ReanimatedDrawerLayout.tsx"],"names":["DRAG_TOSS","DrawerPosition","DrawerState","DrawerType","DrawerLockMode","DrawerKeyboardDismissMode","defaultProps","drawerWidth","drawerPosition","LEFT","drawerType","FRONT","edgeWidth","minSwipeDistance","overlayColor","drawerLockMode","UNLOCKED","enableTrackpadTwoFingerGesture","activeCursor","mouseButton","MouseButton","statusBarAnimation","setStatusBarHidden","StatusBar","setHidden","dismissKeyboard","Keyboard","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","Extrapolation","CLAMP","normalizedInitialVelocity","overshootClamping","velocity","mass","damping","stiffness","finished","handleRelease","event","translationX","dragX","velocityX","x","touchX","gestureStartX","dragOffsetBasedOnStart","startOffsetX","projOffsetX","shouldOpen","openDrawer","options","closeDrawer","overlayDismissGesture","Gesture","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","I18nManager","isRTL","dynamicDrawerStyles","containerStyles","transform","translateX","drawerAnimatedStyle","closedDrawerOffset","isBack","BACK","isIdle","flexDirection","containerAnimatedProps","importantForAccessibility","Platform","OS","undefined","children","styles","main","containerOnBack","containerInFront","overlay","drawerContainer","StyleSheet","create","absoluteFillObject","zIndex","flex","overflow"],"mappings":";;;;;;;AAIA;;AAUA;;AAYA;;AAYA;;AACA;;AACA;;;;;;AAxCA;AACA;AACA;AA+CA,MAAMA,SAAS,GAAG,IAAlB;IAEYC,c;;;WAAAA,c;AAAAA,EAAAA,c,CAAAA,c;AAAAA,EAAAA,c,CAAAA,c;GAAAA,c,8BAAAA,c;;IAKAC,W;;;WAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;GAAAA,W,2BAAAA,W;;IAMAC,U;;;WAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EA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R,EAAiB7C,oBAAjB;AAFT,IAVF,CADF,CADF,eAkBE,6BAAC,8BAAD,CAAU,IAAV;AACE,IAAA,aAAa,EAAC,UADhB;AAEE,IAAA,aAAa,EAAE7C,mBAFjB;AAGE,IAAA,KAAK,EAAE,CACLsF,MAAM,CAACK,eADF,EAELjB,mBAFK,EAGLnG,oBAHK;AAHT,kBAQE,6BAAC,8BAAD,CAAU,IAAV;AAAe,IAAA,KAAK,EAAE+F;AAAtB,KACGzF,oBAAoB,CAACS,SAAD,CADvB,CARF,CAlBF,CAJF,CADF;AAsCD,CA1ckB,CAArB;eA6ce1B,Y;;;AAEf,MAAM0H,MAAM,GAAGM,wBAAWC,MAAX,CAAkB;AAC/BF,EAAAA,eAAe,EAAE,EACf,GAAGC,wBAAWE,kBADC;AAEfC,IAAAA,MAAM,EAAE,IAFO;AAGfhB,IAAAA,aAAa,EAAE;AAHA,GADc;AAM/BU,EAAAA,gBAAgB,EAAE,EAChB,GAAGG,wBAAWE,kBADE;AAEhBC,IAAAA,MAAM,EAAE;AAFQ,GANa;AAU/BP,EAAAA,eAAe,EAAE,EACf,GAAGI,wBAAWE;AADC,GAVc;AAa/BP,EAAAA,IAAI,EAAE;AACJS,IAAAA,IAAI,EAAE,CADF;AAEJD,IAAAA,MAAM,EAAE,CAFJ;AAGJE,IAAAA,QAAQ,EAAE;AAHN,GAbyB;AAkB/BP,EAAAA,OAAO,EAAE,EACP,GAAGE,wBAAWE,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"]}