react-native-gesture-handler 2.23.0 → 2.24.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 (633) hide show
  1. package/RNGestureHandler.podspec +8 -0
  2. package/android/build.gradle +9 -3
  3. package/android/paper/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerInterface.java +2 -1
  4. package/android/paper/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerInterface.java +2 -1
  5. package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerDelegate.java +60 -0
  6. package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerInterface.java +26 -0
  7. package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerDelegate.java +26 -0
  8. package/android/paper77/src/main/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerInterface.java +16 -0
  9. package/android/paper77/src/main/java/com/swmansion/gesturehandler/NativeRNGestureHandlerModuleSpec.java +67 -0
  10. package/android/paper77/src/main/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +13 -0
  11. package/apple/RNGestureHandlerButton.mm +12 -2
  12. package/lib/commonjs/ActionType.js +3 -3
  13. package/lib/commonjs/ActionType.js.map +1 -1
  14. package/lib/commonjs/Directions.js +8 -11
  15. package/lib/commonjs/Directions.js.map +1 -1
  16. package/lib/commonjs/EnableNewWebImplementation.js +10 -2
  17. package/lib/commonjs/EnableNewWebImplementation.js.map +1 -1
  18. package/lib/commonjs/GestureHandlerRootViewContext.js +7 -2
  19. package/lib/commonjs/GestureHandlerRootViewContext.js.map +1 -1
  20. package/lib/commonjs/PlatformConstants.js +6 -1
  21. package/lib/commonjs/PlatformConstants.js.map +1 -1
  22. package/lib/commonjs/PlatformConstants.web.js +3 -1
  23. package/lib/commonjs/PlatformConstants.web.js.map +1 -1
  24. package/lib/commonjs/PointerType.js +5 -3
  25. package/lib/commonjs/PointerType.js.map +1 -1
  26. package/lib/commonjs/RNGestureHandlerModule.js +6 -2
  27. package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
  28. package/lib/commonjs/RNGestureHandlerModule.web.js +37 -11
  29. package/lib/commonjs/RNGestureHandlerModule.web.js.map +1 -1
  30. package/lib/commonjs/RNGestureHandlerModule.windows.js +32 -22
  31. package/lib/commonjs/RNGestureHandlerModule.windows.js.map +1 -1
  32. package/lib/commonjs/RNRenderer.js +3 -1
  33. package/lib/commonjs/RNRenderer.js.map +1 -1
  34. package/lib/commonjs/RNRenderer.web.js +2 -1
  35. package/lib/commonjs/RNRenderer.web.js.map +1 -1
  36. package/lib/commonjs/State.js +3 -4
  37. package/lib/commonjs/State.js.map +1 -1
  38. package/lib/commonjs/TouchEventType.js +3 -3
  39. package/lib/commonjs/TouchEventType.js.map +1 -1
  40. package/lib/commonjs/components/DrawerLayout.js +115 -90
  41. package/lib/commonjs/components/DrawerLayout.js.map +1 -1
  42. package/lib/commonjs/components/GestureButtons.js +81 -28
  43. package/lib/commonjs/components/GestureButtons.js.map +1 -1
  44. package/lib/commonjs/components/GestureButtonsProps.js.map +1 -1
  45. package/lib/commonjs/components/GestureComponents.js +37 -26
  46. package/lib/commonjs/components/GestureComponents.js.map +1 -1
  47. package/lib/commonjs/components/GestureComponents.web.js +27 -13
  48. package/lib/commonjs/components/GestureComponents.web.js.map +1 -1
  49. package/lib/commonjs/components/GestureHandlerButton.js +6 -2
  50. package/lib/commonjs/components/GestureHandlerButton.js.map +1 -1
  51. package/lib/commonjs/components/GestureHandlerButton.web.js +12 -4
  52. package/lib/commonjs/components/GestureHandlerButton.web.js.map +1 -1
  53. package/lib/commonjs/components/GestureHandlerRootView.android.js +15 -4
  54. package/lib/commonjs/components/GestureHandlerRootView.android.js.map +1 -1
  55. package/lib/commonjs/components/GestureHandlerRootView.js +14 -4
  56. package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
  57. package/lib/commonjs/components/GestureHandlerRootView.web.js +13 -4
  58. package/lib/commonjs/components/GestureHandlerRootView.web.js.map +1 -1
  59. package/lib/commonjs/components/Pressable/Pressable.js +77 -29
  60. package/lib/commonjs/components/Pressable/Pressable.js.map +1 -1
  61. package/lib/commonjs/components/Pressable/PressableProps.js.map +1 -1
  62. package/lib/commonjs/components/Pressable/index.js +3 -1
  63. package/lib/commonjs/components/Pressable/index.js.map +1 -1
  64. package/lib/commonjs/components/Pressable/utils.js +20 -5
  65. package/lib/commonjs/components/Pressable/utils.js.map +1 -1
  66. package/lib/commonjs/components/ReanimatedDrawerLayout.js +86 -44
  67. package/lib/commonjs/components/ReanimatedDrawerLayout.js.map +1 -1
  68. package/lib/commonjs/components/ReanimatedSwipeable.js +45 -18
  69. package/lib/commonjs/components/ReanimatedSwipeable.js.map +1 -1
  70. package/lib/commonjs/components/Swipeable.js +75 -34
  71. package/lib/commonjs/components/Swipeable.js.map +1 -1
  72. package/lib/commonjs/components/Text.js +28 -10
  73. package/lib/commonjs/components/Text.js.map +1 -1
  74. package/lib/commonjs/components/gestureHandlerRootHOC.js +14 -5
  75. package/lib/commonjs/components/gestureHandlerRootHOC.js.map +1 -1
  76. package/lib/commonjs/components/touchables/ExtraButtonProps.js +2 -0
  77. package/lib/commonjs/components/touchables/ExtraButtonProps.js.map +1 -0
  78. package/lib/commonjs/components/touchables/GenericTouchable.js +76 -40
  79. package/lib/commonjs/components/touchables/GenericTouchable.js.map +1 -1
  80. package/lib/commonjs/components/touchables/GenericTouchableProps.js.map +1 -1
  81. package/lib/commonjs/components/touchables/TouchableHighlight.js +34 -19
  82. package/lib/commonjs/components/touchables/TouchableHighlight.js.map +1 -1
  83. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +32 -16
  84. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  85. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +5 -2
  86. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js.map +1 -1
  87. package/lib/commonjs/components/touchables/TouchableNativeFeedbackProps.js.map +1 -1
  88. package/lib/commonjs/components/touchables/TouchableOpacity.js +25 -16
  89. package/lib/commonjs/components/touchables/TouchableOpacity.js.map +1 -1
  90. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +25 -13
  91. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  92. package/lib/commonjs/components/touchables/index.js +12 -7
  93. package/lib/commonjs/components/touchables/index.js.map +1 -1
  94. package/lib/commonjs/findNodeHandle.js +4 -1
  95. package/lib/commonjs/findNodeHandle.js.map +1 -1
  96. package/lib/commonjs/findNodeHandle.web.js +14 -5
  97. package/lib/commonjs/findNodeHandle.web.js.map +1 -1
  98. package/lib/commonjs/getReactNativeVersion.js +6 -1
  99. package/lib/commonjs/getReactNativeVersion.js.map +1 -1
  100. package/lib/commonjs/getReactNativeVersion.web.js +1 -0
  101. package/lib/commonjs/getReactNativeVersion.web.js.map +1 -1
  102. package/lib/commonjs/getShadowNodeFromRef.js +14 -13
  103. package/lib/commonjs/getShadowNodeFromRef.js.map +1 -1
  104. package/lib/commonjs/getShadowNodeFromRef.web.js +1 -0
  105. package/lib/commonjs/getShadowNodeFromRef.web.js.map +1 -1
  106. package/lib/commonjs/ghQueueMicrotask.js +2 -1
  107. package/lib/commonjs/ghQueueMicrotask.js.map +1 -1
  108. package/lib/commonjs/handlers/FlingGestureHandler.js +11 -9
  109. package/lib/commonjs/handlers/FlingGestureHandler.js.map +1 -1
  110. package/lib/commonjs/handlers/ForceTouchGestureHandler.js +22 -15
  111. package/lib/commonjs/handlers/ForceTouchGestureHandler.js.map +1 -1
  112. package/lib/commonjs/handlers/GestureHandlerEventPayload.js.map +1 -1
  113. package/lib/commonjs/handlers/LongPressGestureHandler.js +11 -9
  114. package/lib/commonjs/handlers/LongPressGestureHandler.js.map +1 -1
  115. package/lib/commonjs/handlers/NativeViewGestureHandler.js +13 -10
  116. package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +1 -1
  117. package/lib/commonjs/handlers/PanGestureHandler.js +32 -13
  118. package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -1
  119. package/lib/commonjs/handlers/PinchGestureHandler.js +9 -7
  120. package/lib/commonjs/handlers/PinchGestureHandler.js.map +1 -1
  121. package/lib/commonjs/handlers/PressabilityDebugView.js +1 -0
  122. package/lib/commonjs/handlers/PressabilityDebugView.js.map +1 -1
  123. package/lib/commonjs/handlers/PressabilityDebugView.web.js +1 -0
  124. package/lib/commonjs/handlers/PressabilityDebugView.web.js.map +1 -1
  125. package/lib/commonjs/handlers/RotationGestureHandler.js +9 -7
  126. package/lib/commonjs/handlers/RotationGestureHandler.js.map +1 -1
  127. package/lib/commonjs/handlers/TapGestureHandler.js +11 -9
  128. package/lib/commonjs/handlers/TapGestureHandler.js.map +1 -1
  129. package/lib/commonjs/handlers/createHandler.js +146 -59
  130. package/lib/commonjs/handlers/createHandler.js.map +1 -1
  131. package/lib/commonjs/handlers/createNativeWrapper.js +30 -18
  132. package/lib/commonjs/handlers/createNativeWrapper.js.map +1 -1
  133. package/lib/commonjs/handlers/customDirectEventTypes.js +1 -0
  134. package/lib/commonjs/handlers/customDirectEventTypes.js.map +1 -1
  135. package/lib/commonjs/handlers/customDirectEventTypes.web.js +2 -1
  136. package/lib/commonjs/handlers/customDirectEventTypes.web.js.map +1 -1
  137. package/lib/commonjs/handlers/gestureHandlerCommon.js +10 -9
  138. package/lib/commonjs/handlers/gestureHandlerCommon.js.map +1 -1
  139. package/lib/commonjs/handlers/gestureHandlerTypesCompat.js.map +1 -1
  140. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js +14 -5
  141. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
  142. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js +21 -13
  143. package/lib/commonjs/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
  144. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js +29 -9
  145. package/lib/commonjs/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
  146. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js +10 -1
  147. package/lib/commonjs/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
  148. package/lib/commonjs/handlers/gestures/GestureDetector/index.js +36 -11
  149. package/lib/commonjs/handlers/gestures/GestureDetector/index.js.map +1 -1
  150. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js +3 -0
  151. package/lib/commonjs/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -1
  152. package/lib/commonjs/handlers/gestures/GestureDetector/types.js.map +1 -1
  153. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js +24 -12
  154. package/lib/commonjs/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
  155. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js +48 -12
  156. package/lib/commonjs/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
  157. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js +13 -3
  158. package/lib/commonjs/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
  159. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js +9 -2
  160. package/lib/commonjs/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
  161. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js +14 -6
  162. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
  163. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js +55 -27
  164. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js.map +1 -1
  165. package/lib/commonjs/handlers/gestures/eventReceiver.js +46 -14
  166. package/lib/commonjs/handlers/gestures/eventReceiver.js.map +1 -1
  167. package/lib/commonjs/handlers/gestures/flingGesture.js +12 -5
  168. package/lib/commonjs/handlers/gestures/flingGesture.js.map +1 -1
  169. package/lib/commonjs/handlers/gestures/forceTouchGesture.js +19 -8
  170. package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -1
  171. package/lib/commonjs/handlers/gestures/gesture.js +84 -44
  172. package/lib/commonjs/handlers/gestures/gesture.js.map +1 -1
  173. package/lib/commonjs/handlers/gestures/gestureComposition.js +31 -17
  174. package/lib/commonjs/handlers/gestures/gestureComposition.js.map +1 -1
  175. package/lib/commonjs/handlers/gestures/gestureObjects.js +27 -1
  176. package/lib/commonjs/handlers/gestures/gestureObjects.js.map +1 -1
  177. package/lib/commonjs/handlers/gestures/gestureStateManager.js +9 -3
  178. package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +1 -1
  179. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js +7 -2
  180. package/lib/commonjs/handlers/gestures/gestureStateManager.web.js.map +1 -1
  181. package/lib/commonjs/handlers/gestures/hoverGesture.js +25 -11
  182. package/lib/commonjs/handlers/gestures/hoverGesture.js.map +1 -1
  183. package/lib/commonjs/handlers/gestures/longPressGesture.js +14 -6
  184. package/lib/commonjs/handlers/gestures/longPressGesture.js.map +1 -1
  185. package/lib/commonjs/handlers/gestures/manualGesture.js +6 -0
  186. package/lib/commonjs/handlers/gestures/manualGesture.js.map +1 -1
  187. package/lib/commonjs/handlers/gestures/nativeGesture.js +12 -5
  188. package/lib/commonjs/handlers/gestures/nativeGesture.js.map +1 -1
  189. package/lib/commonjs/handlers/gestures/panGesture.js +43 -18
  190. package/lib/commonjs/handlers/gestures/panGesture.js.map +1 -1
  191. package/lib/commonjs/handlers/gestures/pinchGesture.js +9 -2
  192. package/lib/commonjs/handlers/gestures/pinchGesture.js.map +1 -1
  193. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js +8 -1
  194. package/lib/commonjs/handlers/gestures/reanimatedWrapper.js.map +1 -1
  195. package/lib/commonjs/handlers/gestures/rotationGesture.js +9 -2
  196. package/lib/commonjs/handlers/gestures/rotationGesture.js.map +1 -1
  197. package/lib/commonjs/handlers/gestures/tapGesture.js +22 -10
  198. package/lib/commonjs/handlers/gestures/tapGesture.js.map +1 -1
  199. package/lib/commonjs/handlers/getNextHandlerTag.js +1 -0
  200. package/lib/commonjs/handlers/getNextHandlerTag.js.map +1 -1
  201. package/lib/commonjs/handlers/handlersRegistry.js +21 -6
  202. package/lib/commonjs/handlers/handlersRegistry.js.map +1 -1
  203. package/lib/commonjs/handlers/utils.js +26 -6
  204. package/lib/commonjs/handlers/utils.js.map +1 -1
  205. package/lib/commonjs/index.js +104 -75
  206. package/lib/commonjs/index.js.map +1 -1
  207. package/lib/commonjs/init.js +11 -4
  208. package/lib/commonjs/init.js.map +1 -1
  209. package/lib/commonjs/jestUtils/index.js +5 -4
  210. package/lib/commonjs/jestUtils/index.js.map +1 -1
  211. package/lib/commonjs/jestUtils/jestUtils.js +83 -19
  212. package/lib/commonjs/jestUtils/jestUtils.js.map +1 -1
  213. package/lib/commonjs/mocks.js +15 -5
  214. package/lib/commonjs/mocks.js.map +1 -1
  215. package/lib/commonjs/mountRegistry.js +12 -3
  216. package/lib/commonjs/mountRegistry.js.map +1 -1
  217. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +5 -1
  218. package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +1 -1
  219. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js +7 -2
  220. package/lib/commonjs/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
  221. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js +7 -2
  222. package/lib/commonjs/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
  223. package/lib/commonjs/typeUtils.js.map +1 -1
  224. package/lib/commonjs/utils.js +37 -13
  225. package/lib/commonjs/utils.js.map +1 -1
  226. package/lib/commonjs/web/Gestures.js +23 -5
  227. package/lib/commonjs/web/Gestures.js.map +1 -1
  228. package/lib/commonjs/web/constants.js +4 -2
  229. package/lib/commonjs/web/constants.js.map +1 -1
  230. package/lib/commonjs/web/detectors/RotationGestureDetector.js +41 -5
  231. package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +1 -1
  232. package/lib/commonjs/web/detectors/ScaleGestureDetector.js +42 -13
  233. package/lib/commonjs/web/detectors/ScaleGestureDetector.js.map +1 -1
  234. package/lib/commonjs/web/handlers/FlingGestureHandler.js +49 -6
  235. package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -1
  236. package/lib/commonjs/web/handlers/GestureHandler.js +195 -62
  237. package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
  238. package/lib/commonjs/web/handlers/HoverGestureHandler.js +19 -6
  239. package/lib/commonjs/web/handlers/HoverGestureHandler.js.map +1 -1
  240. package/lib/commonjs/web/handlers/IGestureHandler.js.map +1 -1
  241. package/lib/commonjs/web/handlers/LongPressGestureHandler.js +47 -6
  242. package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +1 -1
  243. package/lib/commonjs/web/handlers/ManualGestureHandler.js +11 -1
  244. package/lib/commonjs/web/handlers/ManualGestureHandler.js.map +1 -1
  245. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js +49 -8
  246. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js.map +1 -1
  247. package/lib/commonjs/web/handlers/PanGestureHandler.js +123 -8
  248. package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
  249. package/lib/commonjs/web/handlers/PinchGestureHandler.js +41 -4
  250. package/lib/commonjs/web/handlers/PinchGestureHandler.js.map +1 -1
  251. package/lib/commonjs/web/handlers/RotationGestureHandler.js +42 -4
  252. package/lib/commonjs/web/handlers/RotationGestureHandler.js.map +1 -1
  253. package/lib/commonjs/web/handlers/TapGestureHandler.js +67 -6
  254. package/lib/commonjs/web/handlers/TapGestureHandler.js.map +1 -1
  255. package/lib/commonjs/web/interfaces.js +17 -9
  256. package/lib/commonjs/web/interfaces.js.map +1 -1
  257. package/lib/commonjs/web/tools/CircularBuffer.js +15 -3
  258. package/lib/commonjs/web/tools/CircularBuffer.js.map +1 -1
  259. package/lib/commonjs/web/tools/EventManager.js +41 -7
  260. package/lib/commonjs/web/tools/EventManager.js.map +1 -1
  261. package/lib/commonjs/web/tools/GestureHandlerDelegate.js.map +1 -1
  262. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +78 -11
  263. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  264. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +48 -8
  265. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  266. package/lib/commonjs/web/tools/InteractionManager.js +22 -5
  267. package/lib/commonjs/web/tools/InteractionManager.js.map +1 -1
  268. package/lib/commonjs/web/tools/KeyboardEventManager.js +26 -4
  269. package/lib/commonjs/web/tools/KeyboardEventManager.js.map +1 -1
  270. package/lib/commonjs/web/tools/LeastSquareSolver.js +67 -30
  271. package/lib/commonjs/web/tools/LeastSquareSolver.js.map +1 -1
  272. package/lib/commonjs/web/tools/NodeManager.js +14 -7
  273. package/lib/commonjs/web/tools/NodeManager.js.map +1 -1
  274. package/lib/commonjs/web/tools/PointerEventManager.js +45 -10
  275. package/lib/commonjs/web/tools/PointerEventManager.js.map +1 -1
  276. package/lib/commonjs/web/tools/PointerTracker.js +45 -9
  277. package/lib/commonjs/web/tools/PointerTracker.js.map +1 -1
  278. package/lib/commonjs/web/tools/Vector.js +18 -3
  279. package/lib/commonjs/web/tools/Vector.js.map +1 -1
  280. package/lib/commonjs/web/tools/VelocityTracker.js +31 -9
  281. package/lib/commonjs/web/tools/VelocityTracker.js.map +1 -1
  282. package/lib/commonjs/web/tools/WheelEventManager.js +17 -4
  283. package/lib/commonjs/web/tools/WheelEventManager.js.map +1 -1
  284. package/lib/commonjs/web/utils.js +76 -27
  285. package/lib/commonjs/web/utils.js.map +1 -1
  286. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js +19 -7
  287. package/lib/commonjs/web_hammer/DiscreteGestureHandler.js.map +1 -1
  288. package/lib/commonjs/web_hammer/DraggingGestureHandler.js +13 -3
  289. package/lib/commonjs/web_hammer/DraggingGestureHandler.js.map +1 -1
  290. package/lib/commonjs/web_hammer/Errors.js +3 -0
  291. package/lib/commonjs/web_hammer/Errors.js.map +1 -1
  292. package/lib/commonjs/web_hammer/FlingGestureHandler.js +44 -13
  293. package/lib/commonjs/web_hammer/FlingGestureHandler.js.map +1 -1
  294. package/lib/commonjs/web_hammer/GestureHandler.js +142 -55
  295. package/lib/commonjs/web_hammer/GestureHandler.js.map +1 -1
  296. package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js +11 -2
  297. package/lib/commonjs/web_hammer/IndiscreteGestureHandler.js.map +1 -1
  298. package/lib/commonjs/web_hammer/LongPressGestureHandler.js +19 -5
  299. package/lib/commonjs/web_hammer/LongPressGestureHandler.js.map +1 -1
  300. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js +24 -16
  301. package/lib/commonjs/web_hammer/NativeViewGestureHandler.js.map +1 -1
  302. package/lib/commonjs/web_hammer/NodeManager.js +16 -9
  303. package/lib/commonjs/web_hammer/NodeManager.js.map +1 -1
  304. package/lib/commonjs/web_hammer/PanGestureHandler.js +49 -8
  305. package/lib/commonjs/web_hammer/PanGestureHandler.js.map +1 -1
  306. package/lib/commonjs/web_hammer/PinchGestureHandler.js +11 -2
  307. package/lib/commonjs/web_hammer/PinchGestureHandler.js.map +1 -1
  308. package/lib/commonjs/web_hammer/PressGestureHandler.js +43 -15
  309. package/lib/commonjs/web_hammer/PressGestureHandler.js.map +1 -1
  310. package/lib/commonjs/web_hammer/RotationGestureHandler.js +13 -2
  311. package/lib/commonjs/web_hammer/RotationGestureHandler.js.map +1 -1
  312. package/lib/commonjs/web_hammer/TapGestureHandler.js +52 -33
  313. package/lib/commonjs/web_hammer/TapGestureHandler.js.map +1 -1
  314. package/lib/commonjs/web_hammer/constants.js +26 -13
  315. package/lib/commonjs/web_hammer/constants.js.map +1 -1
  316. package/lib/commonjs/web_hammer/utils.js +14 -4
  317. package/lib/commonjs/web_hammer/utils.js.map +1 -1
  318. package/lib/module/ActionType.js +1 -3
  319. package/lib/module/ActionType.js.map +1 -1
  320. package/lib/module/Directions.js +3 -9
  321. package/lib/module/Directions.js.map +1 -1
  322. package/lib/module/EnableNewWebImplementation.js +5 -2
  323. package/lib/module/EnableNewWebImplementation.js.map +1 -1
  324. package/lib/module/GestureHandlerRootViewContext.js.map +1 -1
  325. package/lib/module/PlatformConstants.js +1 -0
  326. package/lib/module/PlatformConstants.js.map +1 -1
  327. package/lib/module/PlatformConstants.web.js +1 -0
  328. package/lib/module/PlatformConstants.web.js.map +1 -1
  329. package/lib/module/PointerType.js +4 -3
  330. package/lib/module/PointerType.js.map +1 -1
  331. package/lib/module/RNGestureHandlerModule.js +0 -1
  332. package/lib/module/RNGestureHandlerModule.js.map +1 -1
  333. package/lib/module/RNGestureHandlerModule.web.js +20 -10
  334. package/lib/module/RNGestureHandlerModule.web.js.map +1 -1
  335. package/lib/module/RNGestureHandlerModule.windows.js +17 -18
  336. package/lib/module/RNGestureHandlerModule.windows.js.map +1 -1
  337. package/lib/module/RNRenderer.js.map +1 -1
  338. package/lib/module/RNRenderer.web.js.map +1 -1
  339. package/lib/module/State.js +1 -4
  340. package/lib/module/State.js.map +1 -1
  341. package/lib/module/TouchEventType.js +1 -3
  342. package/lib/module/TouchEventType.js.map +1 -1
  343. package/lib/module/components/DrawerLayout.js +99 -80
  344. package/lib/module/components/DrawerLayout.js.map +1 -1
  345. package/lib/module/components/GestureButtons.js +55 -19
  346. package/lib/module/components/GestureButtons.js.map +1 -1
  347. package/lib/module/components/GestureButtonsProps.js.map +1 -1
  348. package/lib/module/components/GestureComponents.js +12 -17
  349. package/lib/module/components/GestureComponents.js.map +1 -1
  350. package/lib/module/components/GestureComponents.web.js +4 -4
  351. package/lib/module/components/GestureComponents.web.js.map +1 -1
  352. package/lib/module/components/GestureHandlerButton.js.map +1 -1
  353. package/lib/module/components/GestureHandlerButton.web.js +2 -1
  354. package/lib/module/components/GestureHandlerButton.web.js.map +1 -1
  355. package/lib/module/components/GestureHandlerRootView.android.js +2 -1
  356. package/lib/module/components/GestureHandlerRootView.android.js.map +1 -1
  357. package/lib/module/components/GestureHandlerRootView.js +2 -1
  358. package/lib/module/components/GestureHandlerRootView.js.map +1 -1
  359. package/lib/module/components/GestureHandlerRootView.web.js +2 -1
  360. package/lib/module/components/GestureHandlerRootView.web.js.map +1 -1
  361. package/lib/module/components/Pressable/Pressable.js +59 -26
  362. package/lib/module/components/Pressable/Pressable.js.map +1 -1
  363. package/lib/module/components/Pressable/PressableProps.js.map +1 -1
  364. package/lib/module/components/Pressable/index.js.map +1 -1
  365. package/lib/module/components/Pressable/utils.js +14 -4
  366. package/lib/module/components/Pressable/utils.js.map +1 -1
  367. package/lib/module/components/ReanimatedDrawerLayout.js +66 -40
  368. package/lib/module/components/ReanimatedDrawerLayout.js.map +1 -1
  369. package/lib/module/components/ReanimatedSwipeable.js +30 -14
  370. package/lib/module/components/ReanimatedSwipeable.js.map +1 -1
  371. package/lib/module/components/Swipeable.js +59 -28
  372. package/lib/module/components/Swipeable.js.map +1 -1
  373. package/lib/module/components/Text.js +15 -7
  374. package/lib/module/components/Text.js.map +1 -1
  375. package/lib/module/components/gestureHandlerRootHOC.js +2 -2
  376. package/lib/module/components/gestureHandlerRootHOC.js.map +1 -1
  377. package/lib/module/components/touchables/ExtraButtonProps.js +2 -0
  378. package/lib/module/components/touchables/ExtraButtonProps.js.map +1 -0
  379. package/lib/module/components/touchables/GenericTouchable.js +63 -34
  380. package/lib/module/components/touchables/GenericTouchable.js.map +1 -1
  381. package/lib/module/components/touchables/GenericTouchableProps.js.map +1 -1
  382. package/lib/module/components/touchables/TouchableHighlight.js +24 -15
  383. package/lib/module/components/touchables/TouchableHighlight.js.map +1 -1
  384. package/lib/module/components/touchables/TouchableNativeFeedback.android.js +20 -10
  385. package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  386. package/lib/module/components/touchables/TouchableNativeFeedback.js +2 -2
  387. package/lib/module/components/touchables/TouchableNativeFeedback.js.map +1 -1
  388. package/lib/module/components/touchables/TouchableNativeFeedbackProps.js.map +1 -1
  389. package/lib/module/components/touchables/TouchableOpacity.js +16 -10
  390. package/lib/module/components/touchables/TouchableOpacity.js.map +1 -1
  391. package/lib/module/components/touchables/TouchableWithoutFeedback.js +15 -10
  392. package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  393. package/lib/module/components/touchables/index.js.map +1 -1
  394. package/lib/module/findNodeHandle.js.map +1 -1
  395. package/lib/module/findNodeHandle.web.js +11 -5
  396. package/lib/module/findNodeHandle.web.js.map +1 -1
  397. package/lib/module/getReactNativeVersion.js.map +1 -1
  398. package/lib/module/getReactNativeVersion.web.js.map +1 -1
  399. package/lib/module/getShadowNodeFromRef.js +13 -13
  400. package/lib/module/getShadowNodeFromRef.js.map +1 -1
  401. package/lib/module/getShadowNodeFromRef.web.js.map +1 -1
  402. package/lib/module/ghQueueMicrotask.js.map +1 -1
  403. package/lib/module/handlers/FlingGestureHandler.js +0 -6
  404. package/lib/module/handlers/FlingGestureHandler.js.map +1 -1
  405. package/lib/module/handlers/ForceTouchGestureHandler.js +8 -12
  406. package/lib/module/handlers/ForceTouchGestureHandler.js.map +1 -1
  407. package/lib/module/handlers/GestureHandlerEventPayload.js.map +1 -1
  408. package/lib/module/handlers/LongPressGestureHandler.js +0 -6
  409. package/lib/module/handlers/LongPressGestureHandler.js.map +1 -1
  410. package/lib/module/handlers/NativeViewGestureHandler.js +0 -6
  411. package/lib/module/handlers/NativeViewGestureHandler.js.map +1 -1
  412. package/lib/module/handlers/PanGestureHandler.js +19 -8
  413. package/lib/module/handlers/PanGestureHandler.js.map +1 -1
  414. package/lib/module/handlers/PinchGestureHandler.js +0 -2
  415. package/lib/module/handlers/PinchGestureHandler.js.map +1 -1
  416. package/lib/module/handlers/PressabilityDebugView.js.map +1 -1
  417. package/lib/module/handlers/PressabilityDebugView.web.js.map +1 -1
  418. package/lib/module/handlers/RotationGestureHandler.js +0 -2
  419. package/lib/module/handlers/RotationGestureHandler.js.map +1 -1
  420. package/lib/module/handlers/TapGestureHandler.js +0 -6
  421. package/lib/module/handlers/TapGestureHandler.js.map +1 -1
  422. package/lib/module/handlers/createHandler.js +119 -57
  423. package/lib/module/handlers/createHandler.js.map +1 -1
  424. package/lib/module/handlers/createNativeWrapper.js +22 -15
  425. package/lib/module/handlers/createNativeWrapper.js.map +1 -1
  426. package/lib/module/handlers/customDirectEventTypes.js.map +1 -1
  427. package/lib/module/handlers/customDirectEventTypes.web.js.map +1 -1
  428. package/lib/module/handlers/gestureHandlerCommon.js +4 -9
  429. package/lib/module/handlers/gestureHandlerCommon.js.map +1 -1
  430. package/lib/module/handlers/gestureHandlerTypesCompat.js.map +1 -1
  431. package/lib/module/handlers/gestures/GestureDetector/Wrap.js +4 -3
  432. package/lib/module/handlers/gestures/GestureDetector/Wrap.js.map +1 -1
  433. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js +7 -8
  434. package/lib/module/handlers/gestures/GestureDetector/Wrap.web.js.map +1 -1
  435. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js +16 -8
  436. package/lib/module/handlers/gestures/GestureDetector/attachHandlers.js.map +1 -1
  437. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js +1 -0
  438. package/lib/module/handlers/gestures/GestureDetector/dropHandlers.js.map +1 -1
  439. package/lib/module/handlers/gestures/GestureDetector/index.js +13 -7
  440. package/lib/module/handlers/gestures/GestureDetector/index.js.map +1 -1
  441. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js +2 -0
  442. package/lib/module/handlers/gestures/GestureDetector/needsToReattach.js.map +1 -1
  443. package/lib/module/handlers/gestures/GestureDetector/types.js.map +1 -1
  444. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js +14 -11
  445. package/lib/module/handlers/gestures/GestureDetector/updateHandlers.js.map +1 -1
  446. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js +39 -12
  447. package/lib/module/handlers/gestures/GestureDetector/useAnimatedGesture.js.map +1 -1
  448. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js +5 -5
  449. package/lib/module/handlers/gestures/GestureDetector/useDetectorUpdater.js.map +1 -1
  450. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js +6 -2
  451. package/lib/module/handlers/gestures/GestureDetector/useMountReactions.js.map +1 -1
  452. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js +7 -5
  453. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
  454. package/lib/module/handlers/gestures/GestureDetector/utils.js +28 -23
  455. package/lib/module/handlers/gestures/GestureDetector/utils.js.map +1 -1
  456. package/lib/module/handlers/gestures/eventReceiver.js +38 -14
  457. package/lib/module/handlers/gestures/eventReceiver.js.map +1 -1
  458. package/lib/module/handlers/gestures/flingGesture.js +9 -5
  459. package/lib/module/handlers/gestures/flingGesture.js.map +1 -1
  460. package/lib/module/handlers/gestures/forceTouchGesture.js +17 -8
  461. package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -1
  462. package/lib/module/handlers/gestures/gesture.js +73 -44
  463. package/lib/module/handlers/gestures/gesture.js.map +1 -1
  464. package/lib/module/handlers/gestures/gestureComposition.js +24 -16
  465. package/lib/module/handlers/gestures/gestureComposition.js.map +1 -1
  466. package/lib/module/handlers/gestures/gestureObjects.js +14 -1
  467. package/lib/module/handlers/gestures/gestureObjects.js.map +1 -1
  468. package/lib/module/handlers/gestures/gestureStateManager.js +4 -3
  469. package/lib/module/handlers/gestures/gestureStateManager.js.map +1 -1
  470. package/lib/module/handlers/gestures/gestureStateManager.web.js +1 -0
  471. package/lib/module/handlers/gestures/gestureStateManager.web.js.map +1 -1
  472. package/lib/module/handlers/gestures/hoverGesture.js +18 -9
  473. package/lib/module/handlers/gestures/hoverGesture.js.map +1 -1
  474. package/lib/module/handlers/gestures/longPressGesture.js +11 -6
  475. package/lib/module/handlers/gestures/longPressGesture.js.map +1 -1
  476. package/lib/module/handlers/gestures/manualGesture.js +4 -0
  477. package/lib/module/handlers/gestures/manualGesture.js.map +1 -1
  478. package/lib/module/handlers/gestures/nativeGesture.js +9 -5
  479. package/lib/module/handlers/gestures/nativeGesture.js.map +1 -1
  480. package/lib/module/handlers/gestures/panGesture.js +41 -18
  481. package/lib/module/handlers/gestures/panGesture.js.map +1 -1
  482. package/lib/module/handlers/gestures/pinchGesture.js +7 -2
  483. package/lib/module/handlers/gestures/pinchGesture.js.map +1 -1
  484. package/lib/module/handlers/gestures/reanimatedWrapper.js +5 -0
  485. package/lib/module/handlers/gestures/reanimatedWrapper.js.map +1 -1
  486. package/lib/module/handlers/gestures/rotationGesture.js +7 -2
  487. package/lib/module/handlers/gestures/rotationGesture.js.map +1 -1
  488. package/lib/module/handlers/gestures/tapGesture.js +19 -10
  489. package/lib/module/handlers/gestures/tapGesture.js.map +1 -1
  490. package/lib/module/handlers/getNextHandlerTag.js.map +1 -1
  491. package/lib/module/handlers/handlersRegistry.js +5 -0
  492. package/lib/module/handlers/handlersRegistry.js.map +1 -1
  493. package/lib/module/handlers/utils.js +13 -4
  494. package/lib/module/handlers/utils.js.map +1 -1
  495. package/lib/module/index.js.map +1 -1
  496. package/lib/module/init.js +2 -3
  497. package/lib/module/init.js.map +1 -1
  498. package/lib/module/jestUtils/index.js.map +1 -1
  499. package/lib/module/jestUtils/jestUtils.js +66 -20
  500. package/lib/module/jestUtils/jestUtils.js.map +1 -1
  501. package/lib/module/mocks.js +7 -3
  502. package/lib/module/mocks.js.map +1 -1
  503. package/lib/module/mountRegistry.js +10 -3
  504. package/lib/module/mountRegistry.js.map +1 -1
  505. package/lib/module/specs/NativeRNGestureHandlerModule.js.map +1 -1
  506. package/lib/module/specs/RNGestureHandlerButtonNativeComponent.js.map +1 -1
  507. package/lib/module/specs/RNGestureHandlerRootViewNativeComponent.js.map +1 -1
  508. package/lib/module/typeUtils.js.map +1 -1
  509. package/lib/module/utils.js +15 -6
  510. package/lib/module/utils.js.map +1 -1
  511. package/lib/module/web/Gestures.js +1 -2
  512. package/lib/module/web/Gestures.js.map +1 -1
  513. package/lib/module/web/constants.js.map +1 -1
  514. package/lib/module/web/detectors/RotationGestureDetector.js +38 -5
  515. package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -1
  516. package/lib/module/web/detectors/ScaleGestureDetector.js +38 -13
  517. package/lib/module/web/detectors/ScaleGestureDetector.js.map +1 -1
  518. package/lib/module/web/handlers/FlingGestureHandler.js +39 -5
  519. package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
  520. package/lib/module/web/handlers/GestureHandler.js +181 -61
  521. package/lib/module/web/handlers/GestureHandler.js.map +1 -1
  522. package/lib/module/web/handlers/HoverGestureHandler.js +11 -5
  523. package/lib/module/web/handlers/HoverGestureHandler.js.map +1 -1
  524. package/lib/module/web/handlers/IGestureHandler.js.map +1 -1
  525. package/lib/module/web/handlers/LongPressGestureHandler.js +40 -5
  526. package/lib/module/web/handlers/LongPressGestureHandler.js.map +1 -1
  527. package/lib/module/web/handlers/ManualGestureHandler.js +6 -0
  528. package/lib/module/web/handlers/ManualGestureHandler.js.map +1 -1
  529. package/lib/module/web/handlers/NativeViewGestureHandler.js +41 -7
  530. package/lib/module/web/handlers/NativeViewGestureHandler.js.map +1 -1
  531. package/lib/module/web/handlers/PanGestureHandler.js +114 -7
  532. package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
  533. package/lib/module/web/handlers/PinchGestureHandler.js +33 -3
  534. package/lib/module/web/handlers/PinchGestureHandler.js.map +1 -1
  535. package/lib/module/web/handlers/RotationGestureHandler.js +34 -3
  536. package/lib/module/web/handlers/RotationGestureHandler.js.map +1 -1
  537. package/lib/module/web/handlers/TapGestureHandler.js +59 -5
  538. package/lib/module/web/handlers/TapGestureHandler.js.map +1 -1
  539. package/lib/module/web/interfaces.js +14 -9
  540. package/lib/module/web/interfaces.js.map +1 -1
  541. package/lib/module/web/tools/CircularBuffer.js +13 -3
  542. package/lib/module/web/tools/CircularBuffer.js.map +1 -1
  543. package/lib/module/web/tools/EventManager.js +39 -7
  544. package/lib/module/web/tools/EventManager.js.map +1 -1
  545. package/lib/module/web/tools/GestureHandlerDelegate.js.map +1 -1
  546. package/lib/module/web/tools/GestureHandlerOrchestrator.js +71 -10
  547. package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  548. package/lib/module/web/tools/GestureHandlerWebDelegate.js +37 -7
  549. package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  550. package/lib/module/web/tools/InteractionManager.js +19 -5
  551. package/lib/module/web/tools/InteractionManager.js.map +1 -1
  552. package/lib/module/web/tools/KeyboardEventManager.js +19 -3
  553. package/lib/module/web/tools/KeyboardEventManager.js.map +1 -1
  554. package/lib/module/web/tools/LeastSquareSolver.js +65 -30
  555. package/lib/module/web/tools/LeastSquareSolver.js.map +1 -1
  556. package/lib/module/web/tools/NodeManager.js +12 -7
  557. package/lib/module/web/tools/NodeManager.js.map +1 -1
  558. package/lib/module/web/tools/PointerEventManager.js +35 -9
  559. package/lib/module/web/tools/PointerEventManager.js.map +1 -1
  560. package/lib/module/web/tools/PointerTracker.js +39 -8
  561. package/lib/module/web/tools/PointerTracker.js.map +1 -1
  562. package/lib/module/web/tools/Vector.js +14 -3
  563. package/lib/module/web/tools/Vector.js.map +1 -1
  564. package/lib/module/web/tools/VelocityTracker.js +25 -8
  565. package/lib/module/web/tools/VelocityTracker.js.map +1 -1
  566. package/lib/module/web/tools/WheelEventManager.js +10 -3
  567. package/lib/module/web/tools/WheelEventManager.js.map +1 -1
  568. package/lib/module/web/utils.js +57 -22
  569. package/lib/module/web/utils.js.map +1 -1
  570. package/lib/module/web_hammer/DiscreteGestureHandler.js +13 -4
  571. package/lib/module/web_hammer/DiscreteGestureHandler.js.map +1 -1
  572. package/lib/module/web_hammer/DraggingGestureHandler.js +5 -0
  573. package/lib/module/web_hammer/DraggingGestureHandler.js.map +1 -1
  574. package/lib/module/web_hammer/Errors.js +1 -0
  575. package/lib/module/web_hammer/Errors.js.map +1 -1
  576. package/lib/module/web_hammer/FlingGestureHandler.js +35 -10
  577. package/lib/module/web_hammer/FlingGestureHandler.js.map +1 -1
  578. package/lib/module/web_hammer/GestureHandler.js +130 -53
  579. package/lib/module/web_hammer/GestureHandler.js.map +1 -1
  580. package/lib/module/web_hammer/IndiscreteGestureHandler.js +6 -1
  581. package/lib/module/web_hammer/IndiscreteGestureHandler.js.map +1 -1
  582. package/lib/module/web_hammer/LongPressGestureHandler.js +11 -2
  583. package/lib/module/web_hammer/LongPressGestureHandler.js.map +1 -1
  584. package/lib/module/web_hammer/NativeViewGestureHandler.js +12 -12
  585. package/lib/module/web_hammer/NativeViewGestureHandler.js.map +1 -1
  586. package/lib/module/web_hammer/NodeManager.js +8 -6
  587. package/lib/module/web_hammer/NodeManager.js.map +1 -1
  588. package/lib/module/web_hammer/PanGestureHandler.js +40 -6
  589. package/lib/module/web_hammer/PanGestureHandler.js.map +1 -1
  590. package/lib/module/web_hammer/PinchGestureHandler.js +5 -0
  591. package/lib/module/web_hammer/PinchGestureHandler.js.map +1 -1
  592. package/lib/module/web_hammer/PressGestureHandler.js +34 -13
  593. package/lib/module/web_hammer/PressGestureHandler.js.map +1 -1
  594. package/lib/module/web_hammer/RotationGestureHandler.js +6 -0
  595. package/lib/module/web_hammer/RotationGestureHandler.js.map +1 -1
  596. package/lib/module/web_hammer/TapGestureHandler.js +45 -31
  597. package/lib/module/web_hammer/TapGestureHandler.js.map +1 -1
  598. package/lib/module/web_hammer/constants.js +1 -2
  599. package/lib/module/web_hammer/constants.js.map +1 -1
  600. package/lib/module/web_hammer/utils.js +2 -2
  601. package/lib/module/web_hammer/utils.js.map +1 -1
  602. package/lib/typescript/components/GestureComponents.d.ts +1 -1
  603. package/lib/typescript/components/ReanimatedDrawerLayout.d.ts +5 -0
  604. package/lib/typescript/components/touchables/ExtraButtonProps.d.ts +7 -0
  605. package/lib/typescript/components/touchables/GenericTouchable.d.ts +0 -2
  606. package/lib/typescript/components/touchables/GenericTouchableProps.d.ts +2 -0
  607. package/lib/typescript/components/touchables/TouchableHighlight.d.ts +2 -2
  608. package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +3 -3
  609. package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +1 -1
  610. package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +3 -7
  611. package/lib/typescript/components/touchables/TouchableOpacity.d.ts +2 -2
  612. package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +2 -2
  613. package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts +1 -1
  614. package/lib/typescript/utils.d.ts +1 -0
  615. package/lib/typescript/web/utils.d.ts +2 -0
  616. package/package.json +9 -8
  617. package/src/components/GestureComponents.tsx +1 -1
  618. package/src/components/ReanimatedDrawerLayout.tsx +17 -4
  619. package/src/components/Text.tsx +5 -0
  620. package/src/components/touchables/ExtraButtonProps.ts +7 -0
  621. package/src/components/touchables/GenericTouchable.tsx +0 -2
  622. package/src/components/touchables/GenericTouchableProps.ts +2 -0
  623. package/src/components/touchables/TouchableHighlight.tsx +2 -2
  624. package/src/components/touchables/TouchableNativeFeedback.android.tsx +1 -1
  625. package/src/components/touchables/TouchableNativeFeedback.tsx +1 -1
  626. package/src/components/touchables/TouchableNativeFeedbackProps.tsx +3 -8
  627. package/src/components/touchables/TouchableOpacity.tsx +2 -2
  628. package/src/components/touchables/TouchableWithoutFeedback.tsx +22 -4
  629. package/src/handlers/createHandler.tsx +20 -9
  630. package/src/handlers/createNativeWrapper.tsx +7 -3
  631. package/src/handlers/gestures/GestureDetector/Wrap.web.tsx +2 -4
  632. package/src/utils.ts +6 -0
  633. package/src/web/utils.ts +21 -3
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","React","_invariant","_interopRequireDefault","_reactNative","_PanGestureHandler","_TapGestureHandler","_State","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_defineProperty","_toPropertyKey","value","enumerable","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","DRAG_TOSS","IDLE","DRAGGING","SETTLING","DrawerLayout","Component","constructor","props","createRef","state","drawerPosition","drawerWidth","drawerType","dragX","dragXValue","touchX","touchXValue","drawerTranslation","containerWidth","Animated","multiply","Value","add","setValue","translationX","startPositionX","dragOffsetFromOnStartPosition","interpolate","inputRange","outputRange","openValue","extrapolate","gestureOptions","useNativeDriver","useNativeAnimations","onDrawerSlide","listener","ev","_this$props$onDrawerS","_this$props","Math","floor","abs","nativeEvent","position","onGestureEvent","event","x","setState","layout","width","newState","drawerWillShow","_this$props$onDrawerS2","_this$props2","onDrawerStateChanged","oldState","State","ACTIVE","handleRelease","emitStateChanged","drawerState","keyboardDismissMode","Keyboard","dismiss","hideStatusBar","StatusBar","setHidden","statusBarAnimation","drawerShown","drawerLockMode","closeDrawer","velocityX","gestureStartX","dragOffsetBasedOnStart","startOffsetX","projOffsetX","shouldOpen","animateDrawer","showing","_this$accessibilityIs","_this$pointerEventsVi","_this$panGestureHandl","accessibilityIsModalView","current","setNativeProps","accessibilityViewIsModal","pointerEventsView","pointerEvents","minSwipeDistance","edgeWidth","fromLeft","gestureOrientation","hitSlop","left","undefined","right","panGestureHandler","activeOffsetX","fromValue","toValue","velocity","speed","nextFramePosition","min","max","willShow","updateShowing","spring","bounciness","start","finished","drawerOpened","_this$props$onDrawerO","_this$props3","onDrawerOpen","_this$props$onDrawerC","_this$props4","onDrawerClose","options","forceUpdate","invariant","overlayOpacity","dynamicOverlayStyles","opacity","backgroundColor","overlayColor","createElement","TapGestureHandler","onHandlerStateChange","onTapHandlerStateChange","View","ref","style","styles","overlay","drawerBackgroundColor","drawerContainerStyle","contentContainerStyle","drawerSlide","containerSlide","reverseContentDirection","I18nManager","isRTL","dynamicDrawerStyles","containerStyles","containerTranslateX","transform","translateX","drawerTranslateX","closedDrawerOffset","drawerStyles","flexDirection","main","onLayout","handleContainerLayout","containerOnBack","containerInFront","importantForAccessibility","children","renderOverlay","drawerContainer","renderNavigationView","_this$props$onGesture","_this$props5","onGestureRef","updateAnimatedEvent","shouldComponentUpdate","render","PanGestureHandler","userSelect","activeCursor","mouseButton","enableContextMenu","setPanGestureRef","failOffsetY","openingHandlerStateChange","enableTrackpadTwoFingerGesture","enabled","renderDrawer","exports","Left","Right","StyleSheet","create","absoluteFillObject","zIndex","flex","overflow"],"sources":["DrawerLayout.tsx"],"sourcesContent":["// This component is based on RN's DrawerLayoutAndroid API\n//\n// It perhaps deserves to be put in a separate repo, but since it relies on\n// react-native-gesture-handler library which isn't very popular at the moment I\n// decided to keep it here for the time being. It will allow us to move faster\n// and fix issues that may arise in gesture handler library that could be found\n// when using the drawer component\n\nimport * as React from 'react';\nimport { Component } from 'react';\nimport invariant from 'invariant';\nimport {\n Animated,\n StyleSheet,\n View,\n Keyboard,\n StatusBar,\n I18nManager,\n StatusBarAnimation,\n StyleProp,\n ViewStyle,\n LayoutChangeEvent,\n NativeSyntheticEvent,\n} from 'react-native';\n\nimport {\n GestureEvent,\n HandlerStateChangeEvent,\n UserSelect,\n ActiveCursor,\n MouseButton,\n} from '../handlers/gestureHandlerCommon';\nimport { PanGestureHandler } from '../handlers/PanGestureHandler';\nimport type {\n PanGestureHandlerEventPayload,\n TapGestureHandlerEventPayload,\n} from '../handlers/GestureHandlerEventPayload';\nimport { TapGestureHandler } from '../handlers/TapGestureHandler';\nimport { State } from '../State';\n\nconst DRAG_TOSS = 0.05;\n\nconst IDLE: DrawerState = 'Idle';\nconst DRAGGING: DrawerState = 'Dragging';\nconst SETTLING: DrawerState = 'Settling';\n\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport type DrawerPosition = 'left' | 'right';\n\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport type DrawerState = 'Idle' | 'Dragging' | 'Settling';\n\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport type DrawerType = 'front' | 'back' | 'slide';\n\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport type DrawerLockMode = 'unlocked' | 'locked-closed' | 'locked-open';\n\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport type DrawerKeyboardDismissMode = 'none' | 'on-drag';\n\n// Animated.AnimatedInterpolation has been converted to a generic type\n// in @types/react-native 0.70. This way we can maintain compatibility\n// with all versions of @types/react-native`\ntype AnimatedInterpolation = ReturnType<Animated.Value['interpolate']>;\n\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport interface DrawerLayoutProps {\n /**\n * This attribute is present in the standard implementation already and is one\n * of the required params. Gesture handler version of DrawerLayout make 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: Animated.Value\n ) => React.ReactNode;\n\n drawerPosition?: DrawerPosition;\n\n drawerWidth?: number;\n\n drawerBackgroundColor?: string;\n\n drawerLockMode?: DrawerLockMode;\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 useNativeAnimations?: boolean;\n\n drawerType?: DrawerType;\n\n /**\n * Defines how far from the edge of the content view the gesture should\n * activate.\n */\n edgeWidth?: number;\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 black\n *\n * Color of a semi-transparent overlay to be displayed on top of the content\n * view when drawer gets open. A solid color should be used as the opacity is\n * added by the Drawer itself and the opacity of the overlay is animated (from\n * 0% to 70%).\n */\n overlayColor?: string;\n\n contentContainerStyle?: StyleProp<ViewStyle>;\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 onGestureRef?: (ref: PanGestureHandler) => void;\n\n // Implicit `children` prop has been removed in @types/react^18.0.0\n children?:\n | React.ReactNode\n | ((openValue?: AnimatedInterpolation) => React.ReactNode);\n\n /**\n * @default 'none'\n * Defines which userSelect property should be used.\n * Values: 'none'|'text'|'auto'\n */\n userSelect?: UserSelect;\n\n /**\n * @default 'auto'\n * Defines which cursor property should be used when gesture activates.\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\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport type DrawerLayoutState = {\n dragX: Animated.Value;\n touchX: Animated.Value;\n drawerTranslation: Animated.Value;\n containerWidth: number;\n drawerState: DrawerState;\n drawerOpened: boolean;\n};\n\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport type DrawerMovementOption = {\n velocity?: number;\n speed?: number;\n};\n\n/**\n * @deprecated use Reanimated version of DrawerLayout instead\n */\nexport default class DrawerLayout extends Component<\n DrawerLayoutProps,\n DrawerLayoutState\n> {\n static defaultProps = {\n drawerWidth: 200,\n drawerPosition: 'left',\n useNativeAnimations: true,\n drawerType: 'front',\n edgeWidth: 20,\n minSwipeDistance: 3,\n overlayColor: 'rgba(0, 0, 0, 0.7)',\n drawerLockMode: 'unlocked',\n enableTrackpadTwoFingerGesture: false,\n };\n\n constructor(props: DrawerLayoutProps) {\n super(props);\n\n const dragX = new Animated.Value(0);\n const touchX = new Animated.Value(0);\n const drawerTranslation = new Animated.Value(0);\n\n this.state = {\n dragX,\n touchX,\n drawerTranslation,\n containerWidth: 0,\n drawerState: IDLE,\n drawerOpened: false,\n };\n\n this.updateAnimatedEvent(props, this.state);\n }\n\n shouldComponentUpdate(props: DrawerLayoutProps, state: DrawerLayoutState) {\n if (\n this.props.drawerPosition !== props.drawerPosition ||\n this.props.drawerWidth !== props.drawerWidth ||\n this.props.drawerType !== props.drawerType ||\n this.state.containerWidth !== state.containerWidth\n ) {\n this.updateAnimatedEvent(props, state);\n }\n\n return true;\n }\n\n private openValue?: AnimatedInterpolation;\n private onGestureEvent?: (\n event: GestureEvent<PanGestureHandlerEventPayload>\n ) => void;\n private accessibilityIsModalView = React.createRef<View>();\n private pointerEventsView = React.createRef<View>();\n private panGestureHandler = React.createRef<PanGestureHandler | null>();\n private drawerShown = false;\n\n static positions = {\n Left: 'left',\n Right: 'right',\n };\n\n private updateAnimatedEvent = (\n props: DrawerLayoutProps,\n state: DrawerLayoutState\n ) => {\n // Event definition is based on\n const { drawerPosition, drawerWidth, drawerType } = props;\n const {\n dragX: dragXValue,\n touchX: touchXValue,\n drawerTranslation,\n containerWidth,\n } = state;\n\n let dragX = dragXValue;\n let touchX = touchXValue;\n\n if (drawerPosition !== 'left') {\n // Most of the code is written in a way to handle left-side drawer. In\n // order to handle right-side drawer the only thing we need to do is to\n // reverse events coming from gesture handler in a way they emulate\n // left-side drawer gestures. E.g. dragX is simply -dragX, and touchX is\n // calulcated by subtracing real touchX from the width of the container\n // (such that when touch happens at the right edge the value is simply 0)\n dragX = Animated.multiply(\n new Animated.Value(-1),\n dragXValue\n ) as Animated.Value; // TODO(TS): (for all \"as\" in this file) make sure we can map this\n touchX = Animated.add(\n new Animated.Value(containerWidth),\n Animated.multiply(new Animated.Value(-1), touchXValue)\n ) as Animated.Value; // TODO(TS): make sure we can map this;\n touchXValue.setValue(containerWidth);\n } else {\n touchXValue.setValue(0);\n }\n\n // While closing the drawer when user starts gesture outside of its area (in greyed\n // out part of the window), we want the drawer to follow only once finger reaches the\n // edge of the drawer.\n // E.g. on the diagram below drawer is illustrate by X signs and the greyed out area by\n // dots. The touch gesture starts at '*' and moves left, touch path is indicated by\n // an arrow pointing left\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 // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|\n // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|\n // +---------------+ +---------------+ +---------------+ +---------------+\n //\n // For the above to work properly we define animated value that will keep\n // start position of the gesture. Then we use that value to calculate how\n // much we need to subtract from the dragX. If the gesture started on the\n // greyed out area we take the distance from the edge of the drawer to the\n // start position. Otherwise we don't subtract at all and the drawer be\n // pulled back as soon as you start the pan.\n //\n // This is used only when drawerType is \"front\"\n //\n let translationX = dragX;\n if (drawerType === 'front') {\n const startPositionX = Animated.add(\n touchX,\n Animated.multiply(new Animated.Value(-1), dragX)\n );\n\n const dragOffsetFromOnStartPosition = startPositionX.interpolate({\n inputRange: [drawerWidth! - 1, drawerWidth!, drawerWidth! + 1],\n outputRange: [0, 0, 1],\n });\n translationX = Animated.add(\n dragX,\n dragOffsetFromOnStartPosition\n ) as Animated.Value; // TODO: as above\n }\n\n this.openValue = Animated.add(translationX, drawerTranslation).interpolate({\n inputRange: [0, drawerWidth!],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n });\n\n const gestureOptions: {\n useNativeDriver: boolean;\n // TODO: make sure it is correct\n listener?: (\n ev: NativeSyntheticEvent<PanGestureHandlerEventPayload>\n ) => void;\n } = {\n useNativeDriver: props.useNativeAnimations!,\n };\n\n if (this.props.onDrawerSlide) {\n gestureOptions.listener = (ev) => {\n const translationX = Math.floor(Math.abs(ev.nativeEvent.translationX));\n const position = translationX / this.state.containerWidth;\n\n this.props.onDrawerSlide?.(position);\n };\n }\n\n this.onGestureEvent = Animated.event(\n [{ nativeEvent: { translationX: dragXValue, x: touchXValue } }],\n gestureOptions\n );\n };\n\n private handleContainerLayout = ({ nativeEvent }: LayoutChangeEvent) => {\n this.setState({ containerWidth: nativeEvent.layout.width });\n };\n\n private emitStateChanged = (\n newState: DrawerState,\n drawerWillShow: boolean\n ) => {\n this.props.onDrawerStateChanged?.(newState, drawerWillShow);\n };\n\n private openingHandlerStateChange = ({\n nativeEvent,\n }: HandlerStateChangeEvent<PanGestureHandlerEventPayload>) => {\n if (nativeEvent.oldState === State.ACTIVE) {\n this.handleRelease({ nativeEvent });\n } else if (nativeEvent.state === State.ACTIVE) {\n this.emitStateChanged(DRAGGING, false);\n this.setState({ drawerState: DRAGGING });\n if (this.props.keyboardDismissMode === 'on-drag') {\n Keyboard.dismiss();\n }\n if (this.props.hideStatusBar) {\n StatusBar.setHidden(true, this.props.statusBarAnimation || 'slide');\n }\n }\n };\n\n private onTapHandlerStateChange = ({\n nativeEvent,\n }: HandlerStateChangeEvent<TapGestureHandlerEventPayload>) => {\n if (\n this.drawerShown &&\n nativeEvent.oldState === State.ACTIVE &&\n this.props.drawerLockMode !== 'locked-open'\n ) {\n this.closeDrawer();\n }\n };\n\n private handleRelease = ({\n nativeEvent,\n }: HandlerStateChangeEvent<PanGestureHandlerEventPayload>) => {\n const { drawerWidth, drawerPosition, drawerType } = this.props;\n const { containerWidth } = this.state;\n let { translationX: dragX, velocityX, x: touchX } = nativeEvent;\n\n if (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 === 'front') {\n dragOffsetBasedOnStart =\n gestureStartX > drawerWidth! ? gestureStartX - drawerWidth! : 0;\n }\n\n const startOffsetX =\n dragX + dragOffsetBasedOnStart + (this.drawerShown ? drawerWidth! : 0);\n const projOffsetX = startOffsetX + DRAG_TOSS * velocityX;\n\n const shouldOpen = projOffsetX > drawerWidth! / 2;\n\n if (shouldOpen) {\n this.animateDrawer(startOffsetX, drawerWidth!, velocityX);\n } else {\n this.animateDrawer(startOffsetX, 0, velocityX);\n }\n };\n\n private updateShowing = (showing: boolean) => {\n this.drawerShown = showing;\n this.accessibilityIsModalView.current?.setNativeProps({\n accessibilityViewIsModal: showing,\n });\n this.pointerEventsView.current?.setNativeProps({\n pointerEvents: showing ? 'auto' : 'none',\n });\n const { drawerPosition, minSwipeDistance, edgeWidth } = this.props;\n const fromLeft = drawerPosition === 'left';\n // gestureOrientation is 1 if the expected gesture is from left to right and\n // -1 otherwise e.g. when drawer is on the left and is closed we expect left\n // to right gesture, thus orientation will be 1.\n const gestureOrientation =\n (fromLeft ? 1 : -1) * (this.drawerShown ? -1 : 1);\n // When drawer is closed we want the hitSlop to be horizontally shorter than\n // the container size by the value of SLOP. This will make it only activate\n // when gesture happens not further than SLOP away from the edge\n const hitSlop = fromLeft\n ? { left: 0, width: showing ? undefined : edgeWidth }\n : { right: 0, width: showing ? undefined : edgeWidth };\n // @ts-ignore internal API, maybe could be fixed in handler types\n this.panGestureHandler.current?.setNativeProps({\n hitSlop,\n activeOffsetX: gestureOrientation * minSwipeDistance!,\n });\n };\n\n private animateDrawer = (\n fromValue: number | null | undefined,\n toValue: number,\n velocity: number,\n speed?: number\n ) => {\n this.state.dragX.setValue(0);\n this.state.touchX.setValue(\n this.props.drawerPosition === 'left' ? 0 : this.state.containerWidth\n );\n\n if (fromValue != null) {\n let nextFramePosition = fromValue;\n if (this.props.useNativeAnimations) {\n // When using native driver, we predict the next position of the\n // animation because it takes one frame of a roundtrip to pass RELEASE\n // event from native driver to JS before we can start animating. Without\n // it, it is more noticable that the frame is dropped.\n if (fromValue < toValue && velocity > 0) {\n nextFramePosition = Math.min(fromValue + velocity / 60.0, toValue);\n } else if (fromValue > toValue && velocity < 0) {\n nextFramePosition = Math.max(fromValue + velocity / 60.0, toValue);\n }\n }\n this.state.drawerTranslation.setValue(nextFramePosition);\n }\n\n const willShow = toValue !== 0;\n this.updateShowing(willShow);\n this.emitStateChanged(SETTLING, willShow);\n this.setState({ drawerState: SETTLING });\n if (this.props.hideStatusBar) {\n StatusBar.setHidden(willShow, this.props.statusBarAnimation || 'slide');\n }\n Animated.spring(this.state.drawerTranslation, {\n velocity,\n bounciness: 0,\n toValue,\n useNativeDriver: this.props.useNativeAnimations!,\n speed: speed ?? undefined,\n }).start(({ finished }) => {\n if (finished) {\n this.emitStateChanged(IDLE, willShow);\n this.setState({ drawerOpened: willShow });\n if (this.state.drawerState !== DRAGGING) {\n // It's possilbe that user started drag while the drawer\n // was settling, don't override state in this case\n this.setState({ drawerState: IDLE });\n }\n if (willShow) {\n this.props.onDrawerOpen?.();\n } else {\n this.props.onDrawerClose?.();\n }\n }\n });\n };\n\n openDrawer = (options: DrawerMovementOption = {}) => {\n this.animateDrawer(\n // TODO: decide if it should be null or undefined is the proper value\n undefined,\n this.props.drawerWidth!,\n options.velocity ? options.velocity : 0,\n options.speed\n );\n\n // We need to force the update, otherwise the overlay is not rerendered and\n // it would not be clickable\n this.forceUpdate();\n };\n\n closeDrawer = (options: DrawerMovementOption = {}) => {\n // TODO: decide if it should be null or undefined is the proper value\n this.animateDrawer(\n undefined,\n 0,\n options.velocity ? options.velocity : 0,\n options.speed\n );\n\n // We need to force the update, otherwise the overlay is not rerendered and\n // it would be still clickable\n this.forceUpdate();\n };\n\n private renderOverlay = () => {\n /* Overlay styles */\n invariant(this.openValue, 'should be set');\n let overlayOpacity;\n\n if (this.state.drawerState !== IDLE) {\n overlayOpacity = this.openValue;\n } else {\n overlayOpacity = this.state.drawerOpened ? 1 : 0;\n }\n\n const dynamicOverlayStyles = {\n opacity: overlayOpacity,\n backgroundColor: this.props.overlayColor,\n };\n\n return (\n <TapGestureHandler onHandlerStateChange={this.onTapHandlerStateChange}>\n <Animated.View\n pointerEvents={this.drawerShown ? 'auto' : 'none'}\n ref={this.pointerEventsView}\n style={[styles.overlay, dynamicOverlayStyles]}\n />\n </TapGestureHandler>\n );\n };\n\n private renderDrawer = () => {\n const {\n drawerBackgroundColor,\n drawerWidth,\n drawerPosition,\n drawerType,\n drawerContainerStyle,\n contentContainerStyle,\n } = this.props;\n\n const fromLeft = drawerPosition === 'left';\n const drawerSlide = drawerType !== 'back';\n const containerSlide = drawerType !== 'front';\n\n // We rely on row and row-reverse flex directions to position the drawer\n // properly. Apparently for RTL these are flipped which requires us to use\n // the opposite setting for the drawer to appear from left or right\n // according to the drawerPosition prop\n const reverseContentDirection = I18nManager.isRTL ? fromLeft : !fromLeft;\n\n const dynamicDrawerStyles = {\n backgroundColor: drawerBackgroundColor,\n width: drawerWidth,\n };\n const openValue = this.openValue;\n invariant(openValue, 'should be set');\n\n let containerStyles;\n if (containerSlide) {\n const containerTranslateX = openValue.interpolate({\n inputRange: [0, 1],\n outputRange: fromLeft ? [0, drawerWidth!] : [0, -drawerWidth!],\n extrapolate: 'clamp',\n });\n containerStyles = {\n transform: [{ translateX: containerTranslateX }],\n };\n }\n\n let drawerTranslateX: number | AnimatedInterpolation = 0;\n if (drawerSlide) {\n const closedDrawerOffset = fromLeft ? -drawerWidth! : drawerWidth!;\n if (this.state.drawerState !== IDLE) {\n drawerTranslateX = openValue.interpolate({\n inputRange: [0, 1],\n outputRange: [closedDrawerOffset, 0],\n extrapolate: 'clamp',\n });\n } else {\n drawerTranslateX = this.state.drawerOpened ? 0 : closedDrawerOffset;\n }\n }\n const drawerStyles: {\n transform: { translateX: number | AnimatedInterpolation }[];\n flexDirection: 'row-reverse' | 'row';\n } = {\n transform: [{ translateX: drawerTranslateX }],\n flexDirection: reverseContentDirection ? 'row-reverse' : 'row',\n };\n\n return (\n <Animated.View style={styles.main} onLayout={this.handleContainerLayout}>\n <Animated.View\n style={[\n drawerType === 'front'\n ? styles.containerOnBack\n : styles.containerInFront,\n containerStyles,\n contentContainerStyle,\n ]}\n importantForAccessibility={\n this.drawerShown ? 'no-hide-descendants' : 'yes'\n }>\n {typeof this.props.children === 'function'\n ? this.props.children(this.openValue)\n : this.props.children}\n {this.renderOverlay()}\n </Animated.View>\n <Animated.View\n pointerEvents=\"box-none\"\n ref={this.accessibilityIsModalView}\n accessibilityViewIsModal={this.drawerShown}\n style={[styles.drawerContainer, drawerStyles, drawerContainerStyle]}>\n <View style={dynamicDrawerStyles}>\n {this.props.renderNavigationView(this.openValue as Animated.Value)}\n </View>\n </Animated.View>\n </Animated.View>\n );\n };\n\n private setPanGestureRef = (ref: PanGestureHandler) => {\n // TODO(TS): make sure it is OK taken from\n // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/31065#issuecomment-596081842\n (\n this.panGestureHandler as React.MutableRefObject<PanGestureHandler>\n ).current = ref;\n this.props.onGestureRef?.(ref);\n };\n\n render() {\n const { drawerPosition, drawerLockMode, edgeWidth, minSwipeDistance } =\n this.props;\n\n const fromLeft = drawerPosition === 'left';\n\n // gestureOrientation is 1 if the expected gesture is from left to right and\n // -1 otherwise e.g. when drawer is on the left and is closed we expect left\n // to right gesture, thus orientation will be 1.\n const gestureOrientation =\n (fromLeft ? 1 : -1) * (this.drawerShown ? -1 : 1);\n\n // When drawer is closed we want the hitSlop to be horizontally shorter than\n // the container size by the value of SLOP. This will make it only activate\n // when gesture happens not further than SLOP away from the edge\n const hitSlop = fromLeft\n ? { left: 0, width: this.drawerShown ? undefined : edgeWidth }\n : { right: 0, width: this.drawerShown ? undefined : edgeWidth };\n\n return (\n <PanGestureHandler\n // @ts-ignore could be fixed in handler types\n userSelect={this.props.userSelect}\n activeCursor={this.props.activeCursor}\n mouseButton={this.props.mouseButton}\n enableContextMenu={this.props.enableContextMenu}\n ref={this.setPanGestureRef}\n hitSlop={hitSlop}\n activeOffsetX={gestureOrientation * minSwipeDistance!}\n failOffsetY={[-15, 15]}\n onGestureEvent={this.onGestureEvent}\n onHandlerStateChange={this.openingHandlerStateChange}\n enableTrackpadTwoFingerGesture={\n this.props.enableTrackpadTwoFingerGesture\n }\n enabled={\n drawerLockMode !== 'locked-closed' && drawerLockMode !== 'locked-open'\n }>\n {this.renderDrawer()}\n </PanGestureHandler>\n );\n }\n}\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"],"mappings":";;;;;;AAQA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA+B,IAAAC,KAAA,GAAAH,MAAA;AAE/B,IAAAI,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAqBA,IAAAK,kBAAA,GAAAL,O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AAM,EAAE,CAAC;IACTE,QAAQ,EAAE;EACZ,CAAC;EACDrD,OAAO,EAAE;IACP,GAAGgD,uBAAU,CAACE,kBAAkB;IAChCC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"sources":["DrawerLayout.tsx"],"names":["DRAG_TOSS","IDLE","DRAGGING","SETTLING","DrawerLayout","Component","constructor","props","React","createRef","state","drawerPosition","drawerWidth","drawerType","dragX","dragXValue","touchX","touchXValue","drawerTranslation","containerWidth","Animated","multiply","Value","add","setValue","translationX","startPositionX","dragOffsetFromOnStartPosition","interpolate","inputRange","outputRange","openValue","extrapolate","gestureOptions","useNativeDriver","useNativeAnimations","onDrawerSlide","listener","ev","Math","floor","abs","nativeEvent","position","onGestureEvent","event","x","setState","layout","width","newState","drawerWillShow","onDrawerStateChanged","oldState","State","ACTIVE","handleRelease","emitStateChanged","drawerState","keyboardDismissMode","Keyboard","dismiss","hideStatusBar","StatusBar","setHidden","statusBarAnimation","drawerShown","drawerLockMode","closeDrawer","velocityX","gestureStartX","dragOffsetBasedOnStart","startOffsetX","projOffsetX","shouldOpen","animateDrawer","showing","accessibilityIsModalView","current","setNativeProps","accessibilityViewIsModal","pointerEventsView","pointerEvents","minSwipeDistance","edgeWidth","fromLeft","gestureOrientation","hitSlop","left","undefined","right","panGestureHandler","activeOffsetX","fromValue","toValue","velocity","speed","nextFramePosition","min","max","willShow","updateShowing","spring","bounciness","start","finished","drawerOpened","onDrawerOpen","onDrawerClose","options","forceUpdate","overlayOpacity","dynamicOverlayStyles","opacity","backgroundColor","overlayColor","onTapHandlerStateChange","styles","overlay","drawerBackgroundColor","drawerContainerStyle","contentContainerStyle","drawerSlide","containerSlide","reverseContentDirection","I18nManager","isRTL","dynamicDrawerStyles","containerStyles","containerTranslateX","transform","translateX","drawerTranslateX","closedDrawerOffset","drawerStyles","flexDirection","main","handleContainerLayout","containerOnBack","containerInFront","children","renderOverlay","drawerContainer","renderNavigationView","ref","onGestureRef","updateAnimatedEvent","shouldComponentUpdate","render","userSelect","activeCursor","mouseButton","enableContextMenu","setPanGestureRef","openingHandlerStateChange","enableTrackpadTwoFingerGesture","renderDrawer","Left","Right","StyleSheet","create","absoluteFillObject","zIndex","flex","overflow"],"mappings":";;;;;;;AAQA;;AAEA;;AACA;;AAqBA;;AAKA;;AACA;;;;;;;;;;AAEA,MAAMA,SAAS,GAAG,IAAlB;AAEA,MAAMC,IAAiB,GAAG,MAA1B;AACA,MAAMC,QAAqB,GAAG,UAA9B;AACA,MAAMC,QAAqB,GAAG,UAA9B;AAEA;AACA;AACA;;AAmLA;AACA;AACA;AACe,MAAMC,YAAN,SAA2BC,eAA3B,CAGb;AAaAC,EAAAA,WAAW,CAACC,MAAD,EAA2B;AACpC,UAAMA,MAAN;;AADoC;;AAAA;;AAAA,mEAoCHC,KAAK,CAACC,SAAN,EApCG;;AAAA,4DAqCVD,KAAK,CAACC,SAAN,EArCU;;AAAA,4DAsCVD,KAAK,CAACC,SAAN,EAtCU;;AAAA,yCAuChB,KAvCgB;;AAAA,iDA8CR,CAC5BF,KAD4B,EAE5BG,KAF4B,KAGzB;AACH;AACA,YAAM;AAAEC,QAAAA,cAAF;AAAkBC,QAAAA,WAAlB;AAA+BC,QAAAA;AAA/B,UAA8CN,KAApD;AACA,YAAM;AACJO,QAAAA,KAAK,EAAEC,UADH;AAEJC,QAAAA,MAAM,EAAEC,WAFJ;AAGJC,QAAAA,iBAHI;AAIJC,QAAAA;AAJI,UAKFT,KALJ;AAOA,UAAII,KAAK,GAAGC,UAAZ;AACA,UAAIC,MAAM,GAAGC,WAAb;;AAEA,UAAIN,cAAc,KAAK,MAAvB,EAA+B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACAG,QAAAA,KAAK,GAAGM,sBAASC,QAAT,CACN,IAAID,sBAASE,KAAb,CAAmB,CAAC,CAApB,CADM,EAENP,UAFM,CAAR,CAP6B,CAUR;;AACrBC,QAAAA,MAAM,GAAGI,sBAASG,GAAT,C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but since it relies on\n// react-native-gesture-handler library which isn't very popular at the moment I\n// decided to keep it here for the time being. It will allow us to move faster\n// and fix issues that may arise in gesture handler library that could be found\n// when using the drawer component\n\nimport * as React from 'react';\nimport { Component } from 'react';\nimport invariant from 'invariant';\nimport {\n Animated,\n StyleSheet,\n View,\n Keyboard,\n StatusBar,\n I18nManager,\n StatusBarAnimation,\n StyleProp,\n ViewStyle,\n LayoutChangeEvent,\n NativeSyntheticEvent,\n} from 'react-native';\n\nimport {\n GestureEvent,\n HandlerStateChangeEvent,\n UserSelect,\n ActiveCursor,\n MouseButton,\n} from '../handlers/gestureHandlerCommon';\nimport { PanGestureHandler } from '../handlers/PanGestureHandler';\nimport type {\n PanGestureHandlerEventPayload,\n TapGestureHandlerEventPayload,\n} from '../handlers/GestureHandlerEventPayload';\nimport { TapGestureHandler } from '../handlers/TapGestureHandler';\nimport { State } from '../State';\n\nconst DRAG_TOSS = 0.05;\n\nconst IDLE: DrawerState = 'Idle';\nconst DRAGGING: DrawerState = 'Dragging';\nconst SETTLING: DrawerState = 'Settling';\n\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport type DrawerPosition = 'left' | 'right';\n\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport type DrawerState = 'Idle' | 'Dragging' | 'Settling';\n\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport type DrawerType = 'front' | 'back' | 'slide';\n\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport type DrawerLockMode = 'unlocked' | 'locked-closed' | 'locked-open';\n\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport type DrawerKeyboardDismissMode = 'none' | 'on-drag';\n\n// Animated.AnimatedInterpolation has been converted to a generic type\n// in @types/react-native 0.70. This way we can maintain compatibility\n// with all versions of @types/react-native`\ntype AnimatedInterpolation = ReturnType<Animated.Value['interpolate']>;\n\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport interface DrawerLayoutProps {\n /**\n * This attribute is present in the standard implementation already and is one\n * of the required params. Gesture handler version of DrawerLayout make 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: Animated.Value\n ) => React.ReactNode;\n\n drawerPosition?: DrawerPosition;\n\n drawerWidth?: number;\n\n drawerBackgroundColor?: string;\n\n drawerLockMode?: DrawerLockMode;\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 useNativeAnimations?: boolean;\n\n drawerType?: DrawerType;\n\n /**\n * Defines how far from the edge of the content view the gesture should\n * activate.\n */\n edgeWidth?: number;\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 black\n *\n * Color of a semi-transparent overlay to be displayed on top of the content\n * view when drawer gets open. A solid color should be used as the opacity is\n * added by the Drawer itself and the opacity of the overlay is animated (from\n * 0% to 70%).\n */\n overlayColor?: string;\n\n contentContainerStyle?: StyleProp<ViewStyle>;\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 onGestureRef?: (ref: PanGestureHandler) => void;\n\n // Implicit `children` prop has been removed in @types/react^18.0.0\n children?:\n | React.ReactNode\n | ((openValue?: AnimatedInterpolation) => React.ReactNode);\n\n /**\n * @default 'none'\n * Defines which userSelect property should be used.\n * Values: 'none'|'text'|'auto'\n */\n userSelect?: UserSelect;\n\n /**\n * @default 'auto'\n * Defines which cursor property should be used when gesture activates.\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\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport type DrawerLayoutState = {\n dragX: Animated.Value;\n touchX: Animated.Value;\n drawerTranslation: Animated.Value;\n containerWidth: number;\n drawerState: DrawerState;\n drawerOpened: boolean;\n};\n\n/**\n * @deprecated DrawerLayout is deprecated. Use Reanimated version of DrawerLayout instead.\n */\nexport type DrawerMovementOption = {\n velocity?: number;\n speed?: number;\n};\n\n/**\n * @deprecated use Reanimated version of DrawerLayout instead\n */\nexport default class DrawerLayout extends Component<\n DrawerLayoutProps,\n DrawerLayoutState\n> {\n static defaultProps = {\n drawerWidth: 200,\n drawerPosition: 'left',\n useNativeAnimations: true,\n drawerType: 'front',\n edgeWidth: 20,\n minSwipeDistance: 3,\n overlayColor: 'rgba(0, 0, 0, 0.7)',\n drawerLockMode: 'unlocked',\n enableTrackpadTwoFingerGesture: false,\n };\n\n constructor(props: DrawerLayoutProps) {\n super(props);\n\n const dragX = new Animated.Value(0);\n const touchX = new Animated.Value(0);\n const drawerTranslation = new Animated.Value(0);\n\n this.state = {\n dragX,\n touchX,\n drawerTranslation,\n containerWidth: 0,\n drawerState: IDLE,\n drawerOpened: false,\n };\n\n this.updateAnimatedEvent(props, this.state);\n }\n\n shouldComponentUpdate(props: DrawerLayoutProps, state: DrawerLayoutState) {\n if (\n this.props.drawerPosition !== props.drawerPosition ||\n this.props.drawerWidth !== props.drawerWidth ||\n this.props.drawerType !== props.drawerType ||\n this.state.containerWidth !== state.containerWidth\n ) {\n this.updateAnimatedEvent(props, state);\n }\n\n return true;\n }\n\n private openValue?: AnimatedInterpolation;\n private onGestureEvent?: (\n event: GestureEvent<PanGestureHandlerEventPayload>\n ) => void;\n private accessibilityIsModalView = React.createRef<View>();\n private pointerEventsView = React.createRef<View>();\n private panGestureHandler = React.createRef<PanGestureHandler | null>();\n private drawerShown = false;\n\n static positions = {\n Left: 'left',\n Right: 'right',\n };\n\n private updateAnimatedEvent = (\n props: DrawerLayoutProps,\n state: DrawerLayoutState\n ) => {\n // Event definition is based on\n const { drawerPosition, drawerWidth, drawerType } = props;\n const {\n dragX: dragXValue,\n touchX: touchXValue,\n drawerTranslation,\n containerWidth,\n } = state;\n\n let dragX = dragXValue;\n let touchX = touchXValue;\n\n if (drawerPosition !== 'left') {\n // Most of the code is written in a way to handle left-side drawer. In\n // order to handle right-side drawer the only thing we need to do is to\n // reverse events coming from gesture handler in a way they emulate\n // left-side drawer gestures. E.g. dragX is simply -dragX, and touchX is\n // calulcated by subtracing real touchX from the width of the container\n // (such that when touch happens at the right edge the value is simply 0)\n dragX = Animated.multiply(\n new Animated.Value(-1),\n dragXValue\n ) as Animated.Value; // TODO(TS): (for all \"as\" in this file) make sure we can map this\n touchX = Animated.add(\n new Animated.Value(containerWidth),\n Animated.multiply(new Animated.Value(-1), touchXValue)\n ) as Animated.Value; // TODO(TS): make sure we can map this;\n touchXValue.setValue(containerWidth);\n } else {\n touchXValue.setValue(0);\n }\n\n // While closing the drawer when user starts gesture outside of its area (in greyed\n // out part of the window), we want the drawer to follow only once finger reaches the\n // edge of the drawer.\n // E.g. on the diagram below drawer is illustrate by X signs and the greyed out area by\n // dots. The touch gesture starts at '*' and moves left, touch path is indicated by\n // an arrow pointing left\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 // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|\n // |XXXXXXXX|......| |XXXXXXXX|......| |XXXXXXXX|......| |XXXXX|.........|\n // +---------------+ +---------------+ +---------------+ +---------------+\n //\n // For the above to work properly we define animated value that will keep\n // start position of the gesture. Then we use that value to calculate how\n // much we need to subtract from the dragX. If the gesture started on the\n // greyed out area we take the distance from the edge of the drawer to the\n // start position. Otherwise we don't subtract at all and the drawer be\n // pulled back as soon as you start the pan.\n //\n // This is used only when drawerType is \"front\"\n //\n let translationX = dragX;\n if (drawerType === 'front') {\n const startPositionX = Animated.add(\n touchX,\n Animated.multiply(new Animated.Value(-1), dragX)\n );\n\n const dragOffsetFromOnStartPosition = startPositionX.interpolate({\n inputRange: [drawerWidth! - 1, drawerWidth!, drawerWidth! + 1],\n outputRange: [0, 0, 1],\n });\n translationX = Animated.add(\n dragX,\n dragOffsetFromOnStartPosition\n ) as Animated.Value; // TODO: as above\n }\n\n this.openValue = Animated.add(translationX, drawerTranslation).interpolate({\n inputRange: [0, drawerWidth!],\n outputRange: [0, 1],\n extrapolate: 'clamp',\n });\n\n const gestureOptions: {\n useNativeDriver: boolean;\n // TODO: make sure it is correct\n listener?: (\n ev: NativeSyntheticEvent<PanGestureHandlerEventPayload>\n ) => void;\n } = {\n useNativeDriver: props.useNativeAnimations!,\n };\n\n if (this.props.onDrawerSlide) {\n gestureOptions.listener = (ev) => {\n const translationX = Math.floor(Math.abs(ev.nativeEvent.translationX));\n const position = translationX / this.state.containerWidth;\n\n this.props.onDrawerSlide?.(position);\n };\n }\n\n this.onGestureEvent = Animated.event(\n [{ nativeEvent: { translationX: dragXValue, x: touchXValue } }],\n gestureOptions\n );\n };\n\n private handleContainerLayout = ({ nativeEvent }: LayoutChangeEvent) => {\n this.setState({ containerWidth: nativeEvent.layout.width });\n };\n\n private emitStateChanged = (\n newState: DrawerState,\n drawerWillShow: boolean\n ) => {\n this.props.onDrawerStateChanged?.(newState, drawerWillShow);\n };\n\n private openingHandlerStateChange = ({\n nativeEvent,\n }: HandlerStateChangeEvent<PanGestureHandlerEventPayload>) => {\n if (nativeEvent.oldState === State.ACTIVE) {\n this.handleRelease({ nativeEvent });\n } else if (nativeEvent.state === State.ACTIVE) {\n this.emitStateChanged(DRAGGING, false);\n this.setState({ drawerState: DRAGGING });\n if (this.props.keyboardDismissMode === 'on-drag') {\n Keyboard.dismiss();\n }\n if (this.props.hideStatusBar) {\n StatusBar.setHidden(true, this.props.statusBarAnimation || 'slide');\n }\n }\n };\n\n private onTapHandlerStateChange = ({\n nativeEvent,\n }: HandlerStateChangeEvent<TapGestureHandlerEventPayload>) => {\n if (\n this.drawerShown &&\n nativeEvent.oldState === State.ACTIVE &&\n this.props.drawerLockMode !== 'locked-open'\n ) {\n this.closeDrawer();\n }\n };\n\n private handleRelease = ({\n nativeEvent,\n }: HandlerStateChangeEvent<PanGestureHandlerEventPayload>) => {\n const { drawerWidth, drawerPosition, drawerType } = this.props;\n const { containerWidth } = this.state;\n let { translationX: dragX, velocityX, x: touchX } = nativeEvent;\n\n if (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 === 'front') {\n dragOffsetBasedOnStart =\n gestureStartX > drawerWidth! ? gestureStartX - drawerWidth! : 0;\n }\n\n const startOffsetX =\n dragX + dragOffsetBasedOnStart + (this.drawerShown ? drawerWidth! : 0);\n const projOffsetX = startOffsetX + DRAG_TOSS * velocityX;\n\n const shouldOpen = projOffsetX > drawerWidth! / 2;\n\n if (shouldOpen) {\n this.animateDrawer(startOffsetX, drawerWidth!, velocityX);\n } else {\n this.animateDrawer(startOffsetX, 0, velocityX);\n }\n };\n\n private updateShowing = (showing: boolean) => {\n this.drawerShown = showing;\n this.accessibilityIsModalView.current?.setNativeProps({\n accessibilityViewIsModal: showing,\n });\n this.pointerEventsView.current?.setNativeProps({\n pointerEvents: showing ? 'auto' : 'none',\n });\n const { drawerPosition, minSwipeDistance, edgeWidth } = this.props;\n const fromLeft = drawerPosition === 'left';\n // gestureOrientation is 1 if the expected gesture is from left to right and\n // -1 otherwise e.g. when drawer is on the left and is closed we expect left\n // to right gesture, thus orientation will be 1.\n const gestureOrientation =\n (fromLeft ? 1 : -1) * (this.drawerShown ? -1 : 1);\n // When drawer is closed we want the hitSlop to be horizontally shorter than\n // the container size by the value of SLOP. This will make it only activate\n // when gesture happens not further than SLOP away from the edge\n const hitSlop = fromLeft\n ? { left: 0, width: showing ? undefined : edgeWidth }\n : { right: 0, width: showing ? undefined : edgeWidth };\n // @ts-ignore internal API, maybe could be fixed in handler types\n this.panGestureHandler.current?.setNativeProps({\n hitSlop,\n activeOffsetX: gestureOrientation * minSwipeDistance!,\n });\n };\n\n private animateDrawer = (\n fromValue: number | null | undefined,\n toValue: number,\n velocity: number,\n speed?: number\n ) => {\n this.state.dragX.setValue(0);\n this.state.touchX.setValue(\n this.props.drawerPosition === 'left' ? 0 : this.state.containerWidth\n );\n\n if (fromValue != null) {\n let nextFramePosition = fromValue;\n if (this.props.useNativeAnimations) {\n // When using native driver, we predict the next position of the\n // animation because it takes one frame of a roundtrip to pass RELEASE\n // event from native driver to JS before we can start animating. Without\n // it, it is more noticable that the frame is dropped.\n if (fromValue < toValue && velocity > 0) {\n nextFramePosition = Math.min(fromValue + velocity / 60.0, toValue);\n } else if (fromValue > toValue && velocity < 0) {\n nextFramePosition = Math.max(fromValue + velocity / 60.0, toValue);\n }\n }\n this.state.drawerTranslation.setValue(nextFramePosition);\n }\n\n const willShow = toValue !== 0;\n this.updateShowing(willShow);\n this.emitStateChanged(SETTLING, willShow);\n this.setState({ drawerState: SETTLING });\n if (this.props.hideStatusBar) {\n StatusBar.setHidden(willShow, this.props.statusBarAnimation || 'slide');\n }\n Animated.spring(this.state.drawerTranslation, {\n velocity,\n bounciness: 0,\n toValue,\n useNativeDriver: this.props.useNativeAnimations!,\n speed: speed ?? undefined,\n }).start(({ finished }) => {\n if (finished) {\n this.emitStateChanged(IDLE, willShow);\n this.setState({ drawerOpened: willShow });\n if (this.state.drawerState !== DRAGGING) {\n // It's possilbe that user started drag while the drawer\n // was settling, don't override state in this case\n this.setState({ drawerState: IDLE });\n }\n if (willShow) {\n this.props.onDrawerOpen?.();\n } else {\n this.props.onDrawerClose?.();\n }\n }\n });\n };\n\n openDrawer = (options: DrawerMovementOption = {}) => {\n this.animateDrawer(\n // TODO: decide if it should be null or undefined is the proper value\n undefined,\n this.props.drawerWidth!,\n options.velocity ? options.velocity : 0,\n options.speed\n );\n\n // We need to force the update, otherwise the overlay is not rerendered and\n // it would not be clickable\n this.forceUpdate();\n };\n\n closeDrawer = (options: DrawerMovementOption = {}) => {\n // TODO: decide if it should be null or undefined is the proper value\n this.animateDrawer(\n undefined,\n 0,\n options.velocity ? options.velocity : 0,\n options.speed\n );\n\n // We need to force the update, otherwise the overlay is not rerendered and\n // it would be still clickable\n this.forceUpdate();\n };\n\n private renderOverlay = () => {\n /* Overlay styles */\n invariant(this.openValue, 'should be set');\n let overlayOpacity;\n\n if (this.state.drawerState !== IDLE) {\n overlayOpacity = this.openValue;\n } else {\n overlayOpacity = this.state.drawerOpened ? 1 : 0;\n }\n\n const dynamicOverlayStyles = {\n opacity: overlayOpacity,\n backgroundColor: this.props.overlayColor,\n };\n\n return (\n <TapGestureHandler onHandlerStateChange={this.onTapHandlerStateChange}>\n <Animated.View\n pointerEvents={this.drawerShown ? 'auto' : 'none'}\n ref={this.pointerEventsView}\n style={[styles.overlay, dynamicOverlayStyles]}\n />\n </TapGestureHandler>\n );\n };\n\n private renderDrawer = () => {\n const {\n drawerBackgroundColor,\n drawerWidth,\n drawerPosition,\n drawerType,\n drawerContainerStyle,\n contentContainerStyle,\n } = this.props;\n\n const fromLeft = drawerPosition === 'left';\n const drawerSlide = drawerType !== 'back';\n const containerSlide = drawerType !== 'front';\n\n // We rely on row and row-reverse flex directions to position the drawer\n // properly. Apparently for RTL these are flipped which requires us to use\n // the opposite setting for the drawer to appear from left or right\n // according to the drawerPosition prop\n const reverseContentDirection = I18nManager.isRTL ? fromLeft : !fromLeft;\n\n const dynamicDrawerStyles = {\n backgroundColor: drawerBackgroundColor,\n width: drawerWidth,\n };\n const openValue = this.openValue;\n invariant(openValue, 'should be set');\n\n let containerStyles;\n if (containerSlide) {\n const containerTranslateX = openValue.interpolate({\n inputRange: [0, 1],\n outputRange: fromLeft ? [0, drawerWidth!] : [0, -drawerWidth!],\n extrapolate: 'clamp',\n });\n containerStyles = {\n transform: [{ translateX: containerTranslateX }],\n };\n }\n\n let drawerTranslateX: number | AnimatedInterpolation = 0;\n if (drawerSlide) {\n const closedDrawerOffset = fromLeft ? -drawerWidth! : drawerWidth!;\n if (this.state.drawerState !== IDLE) {\n drawerTranslateX = openValue.interpolate({\n inputRange: [0, 1],\n outputRange: [closedDrawerOffset, 0],\n extrapolate: 'clamp',\n });\n } else {\n drawerTranslateX = this.state.drawerOpened ? 0 : closedDrawerOffset;\n }\n }\n const drawerStyles: {\n transform: { translateX: number | AnimatedInterpolation }[];\n flexDirection: 'row-reverse' | 'row';\n } = {\n transform: [{ translateX: drawerTranslateX }],\n flexDirection: reverseContentDirection ? 'row-reverse' : 'row',\n };\n\n return (\n <Animated.View style={styles.main} onLayout={this.handleContainerLayout}>\n <Animated.View\n style={[\n drawerType === 'front'\n ? styles.containerOnBack\n : styles.containerInFront,\n containerStyles,\n contentContainerStyle,\n ]}\n importantForAccessibility={\n this.drawerShown ? 'no-hide-descendants' : 'yes'\n }>\n {typeof this.props.children === 'function'\n ? this.props.children(this.openValue)\n : this.props.children}\n {this.renderOverlay()}\n </Animated.View>\n <Animated.View\n pointerEvents=\"box-none\"\n ref={this.accessibilityIsModalView}\n accessibilityViewIsModal={this.drawerShown}\n style={[styles.drawerContainer, drawerStyles, drawerContainerStyle]}>\n <View style={dynamicDrawerStyles}>\n {this.props.renderNavigationView(this.openValue as Animated.Value)}\n </View>\n </Animated.View>\n </Animated.View>\n );\n };\n\n private setPanGestureRef = (ref: PanGestureHandler) => {\n // TODO(TS): make sure it is OK taken from\n // https://github.com/DefinitelyTyped/DefinitelyTyped/issues/31065#issuecomment-596081842\n (\n this.panGestureHandler as React.MutableRefObject<PanGestureHandler>\n ).current = ref;\n this.props.onGestureRef?.(ref);\n };\n\n render() {\n const { drawerPosition, drawerLockMode, edgeWidth, minSwipeDistance } =\n this.props;\n\n const fromLeft = drawerPosition === 'left';\n\n // gestureOrientation is 1 if the expected gesture is from left to right and\n // -1 otherwise e.g. when drawer is on the left and is closed we expect left\n // to right gesture, thus orientation will be 1.\n const gestureOrientation =\n (fromLeft ? 1 : -1) * (this.drawerShown ? -1 : 1);\n\n // When drawer is closed we want the hitSlop to be horizontally shorter than\n // the container size by the value of SLOP. This will make it only activate\n // when gesture happens not further than SLOP away from the edge\n const hitSlop = fromLeft\n ? { left: 0, width: this.drawerShown ? undefined : edgeWidth }\n : { right: 0, width: this.drawerShown ? undefined : edgeWidth };\n\n return (\n <PanGestureHandler\n // @ts-ignore could be fixed in handler types\n userSelect={this.props.userSelect}\n activeCursor={this.props.activeCursor}\n mouseButton={this.props.mouseButton}\n enableContextMenu={this.props.enableContextMenu}\n ref={this.setPanGestureRef}\n hitSlop={hitSlop}\n activeOffsetX={gestureOrientation * minSwipeDistance!}\n failOffsetY={[-15, 15]}\n onGestureEvent={this.onGestureEvent}\n onHandlerStateChange={this.openingHandlerStateChange}\n enableTrackpadTwoFingerGesture={\n this.props.enableTrackpadTwoFingerGesture\n }\n enabled={\n drawerLockMode !== 'locked-closed' && drawerLockMode !== 'locked-open'\n }>\n {this.renderDrawer()}\n </PanGestureHandler>\n );\n }\n}\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"]}
@@ -3,38 +3,53 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.BorderlessButton = exports.BaseButton = void 0;
7
6
  Object.defineProperty(exports, "PureNativeButton", {
8
7
  enumerable: true,
9
8
  get: function () {
10
9
  return _GestureHandlerButton.default;
11
10
  }
12
11
  });
13
- exports.RectButton = exports.RawButton = void 0;
12
+ exports.BorderlessButton = exports.RectButton = exports.BaseButton = exports.RawButton = void 0;
13
+
14
14
  var React = _interopRequireWildcard(require("react"));
15
+
15
16
  var _reactNative = require("react-native");
17
+
16
18
  var _createNativeWrapper = _interopRequireDefault(require("../handlers/createNativeWrapper"));
19
+
17
20
  var _GestureHandlerButton = _interopRequireDefault(require("./GestureHandlerButton"));
21
+
18
22
  var _State = require("../State");
23
+
19
24
  var _utils = require("../utils");
20
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
21
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
22
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
23
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
24
- function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
25
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
26
- function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
27
- const RawButton = exports.RawButton = (0, _createNativeWrapper.default)(_GestureHandlerButton.default, {
25
+
26
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
27
+
28
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
29
+
30
+ 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; }
31
+
32
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
33
+
34
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
35
+
36
+ const RawButton = (0, _createNativeWrapper.default)(_GestureHandlerButton.default, {
28
37
  shouldCancelWhenOutside: false,
29
38
  shouldActivateOnStart: false
30
39
  });
40
+ exports.RawButton = RawButton;
31
41
  let IS_FABRIC = null;
42
+
32
43
  class InnerBaseButton extends React.Component {
33
44
  constructor(props) {
34
45
  super(props);
46
+
35
47
  _defineProperty(this, "lastActive", void 0);
48
+
36
49
  _defineProperty(this, "longPressTimeout", void 0);
50
+
37
51
  _defineProperty(this, "longPressDetected", void 0);
52
+
38
53
  _defineProperty(this, "handleEvent", ({
39
54
  nativeEvent
40
55
  }) => {
@@ -44,63 +59,71 @@ class InnerBaseButton extends React.Component {
44
59
  pointerInside
45
60
  } = nativeEvent;
46
61
  const active = pointerInside && state === _State.State.ACTIVE;
62
+
47
63
  if (active !== this.lastActive && this.props.onActiveStateChange) {
48
64
  this.props.onActiveStateChange(active);
49
65
  }
66
+
50
67
  if (!this.longPressDetected && oldState === _State.State.ACTIVE && state !== _State.State.CANCELLED && this.lastActive && this.props.onPress) {
51
68
  this.props.onPress(pointerInside);
52
69
  }
53
- if (!this.lastActive &&
54
- // NativeViewGestureHandler sends different events based on platform
70
+
71
+ if (!this.lastActive && // NativeViewGestureHandler sends different events based on platform
55
72
  state === (_reactNative.Platform.OS !== 'android' ? _State.State.ACTIVE : _State.State.BEGAN) && pointerInside) {
56
73
  this.longPressDetected = false;
74
+
57
75
  if (this.props.onLongPress) {
58
76
  this.longPressTimeout = setTimeout(this.onLongPress, this.props.delayLongPress);
59
77
  }
60
- } else if (
61
- // Cancel longpress timeout if it's set and the finger moved out of the view
78
+ } else if ( // Cancel longpress timeout if it's set and the finger moved out of the view
62
79
  state === _State.State.ACTIVE && !pointerInside && this.longPressTimeout !== undefined) {
63
80
  clearTimeout(this.longPressTimeout);
64
81
  this.longPressTimeout = undefined;
65
- } else if (
66
- // Cancel longpress timeout if it's set and the gesture has finished
82
+ } else if ( // Cancel longpress timeout if it's set and the gesture has finished
67
83
  this.longPressTimeout !== undefined && (state === _State.State.END || state === _State.State.CANCELLED || state === _State.State.FAILED)) {
68
84
  clearTimeout(this.longPressTimeout);
69
85
  this.longPressTimeout = undefined;
70
86
  }
87
+
71
88
  this.lastActive = active;
72
89
  });
90
+
73
91
  _defineProperty(this, "onLongPress", () => {
74
92
  var _this$props$onLongPre, _this$props;
93
+
75
94
  this.longPressDetected = true;
76
- (_this$props$onLongPre = (_this$props = this.props).onLongPress) === null || _this$props$onLongPre === void 0 || _this$props$onLongPre.call(_this$props);
95
+ (_this$props$onLongPre = (_this$props = this.props).onLongPress) === null || _this$props$onLongPre === void 0 ? void 0 : _this$props$onLongPre.call(_this$props);
77
96
  });
78
- // Normally, the parent would execute it's handler first, then forward the
79
- // event to listeners. However, here our handler is virtually only forwarding
80
- // events to listeners, so we reverse the order to keep the proper order of
81
- // the callbacks (from "raw" ones to "processed").
97
+
82
98
  _defineProperty(this, "onHandlerStateChange", e => {
83
99
  var _this$props$onHandler, _this$props2;
84
- (_this$props$onHandler = (_this$props2 = this.props).onHandlerStateChange) === null || _this$props$onHandler === void 0 || _this$props$onHandler.call(_this$props2, e);
100
+
101
+ (_this$props$onHandler = (_this$props2 = this.props).onHandlerStateChange) === null || _this$props$onHandler === void 0 ? void 0 : _this$props$onHandler.call(_this$props2, e);
85
102
  this.handleEvent(e);
86
103
  });
104
+
87
105
  _defineProperty(this, "onGestureEvent", e => {
88
106
  var _this$props$onGesture, _this$props3;
89
- (_this$props$onGesture = (_this$props3 = this.props).onGestureEvent) === null || _this$props$onGesture === void 0 || _this$props$onGesture.call(_this$props3, e);
107
+
108
+ (_this$props$onGesture = (_this$props3 = this.props).onGestureEvent) === null || _this$props$onGesture === void 0 ? void 0 : _this$props$onGesture.call(_this$props3, e);
90
109
  this.handleEvent(e); // TODO: maybe it is not correct
91
110
  });
111
+
92
112
  this.lastActive = false;
93
113
  this.longPressDetected = false;
94
114
  }
115
+
95
116
  render() {
96
117
  const {
97
118
  rippleColor: unprocessedRippleColor,
98
119
  style,
99
120
  ...rest
100
121
  } = this.props;
122
+
101
123
  if (IS_FABRIC === null) {
102
124
  IS_FABRIC = (0, _utils.isFabric)();
103
125
  }
126
+
104
127
  const rippleColor = IS_FABRIC ? unprocessedRippleColor : (0, _reactNative.processColor)(unprocessedRippleColor !== null && unprocessedRippleColor !== void 0 ? unprocessedRippleColor : undefined);
105
128
  return /*#__PURE__*/React.createElement(RawButton, _extends({
106
129
  ref: this.props.innerRef,
@@ -113,14 +136,20 @@ class InnerBaseButton extends React.Component {
113
136
  onHandlerStateChange: this.onHandlerStateChange
114
137
  }));
115
138
  }
139
+
116
140
  }
141
+
117
142
  _defineProperty(InnerBaseButton, "defaultProps", {
118
143
  delayLongPress: 600
119
144
  });
120
- const BaseButton = exports.BaseButton = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(InnerBaseButton, _extends({
145
+
146
+ const BaseButton = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(InnerBaseButton, _extends({
121
147
  innerRef: ref
122
148
  }, props)));
149
+ exports.BaseButton = BaseButton;
150
+
123
151
  const AnimatedBaseButton = _reactNative.Animated.createAnimatedComponent(BaseButton);
152
+
124
153
  const btnStyles = _reactNative.StyleSheet.create({
125
154
  underlay: {
126
155
  position: 'absolute',
@@ -130,26 +159,35 @@ const btnStyles = _reactNative.StyleSheet.create({
130
159
  top: 0
131
160
  }
132
161
  });
162
+
133
163
  class InnerRectButton extends React.Component {
134
164
  constructor(props) {
135
165
  super(props);
166
+
136
167
  _defineProperty(this, "opacity", void 0);
168
+
137
169
  _defineProperty(this, "onActiveStateChange", active => {
138
170
  var _this$props$onActiveS, _this$props4;
171
+
139
172
  if (_reactNative.Platform.OS !== 'android') {
140
173
  this.opacity.setValue(active ? this.props.activeOpacity : 0);
141
174
  }
142
- (_this$props$onActiveS = (_this$props4 = this.props).onActiveStateChange) === null || _this$props$onActiveS === void 0 || _this$props$onActiveS.call(_this$props4, active);
175
+
176
+ (_this$props$onActiveS = (_this$props4 = this.props).onActiveStateChange) === null || _this$props$onActiveS === void 0 ? void 0 : _this$props$onActiveS.call(_this$props4, active);
143
177
  });
178
+
144
179
  this.opacity = new _reactNative.Animated.Value(0);
145
180
  }
181
+
146
182
  render() {
147
183
  const {
148
184
  children,
149
185
  style,
150
186
  ...rest
151
187
  } = this.props;
188
+
152
189
  const resolvedStyle = _reactNative.StyleSheet.flatten(style !== null && style !== void 0 ? style : {});
190
+
153
191
  return /*#__PURE__*/React.createElement(BaseButton, _extends({}, rest, {
154
192
  ref: this.props.innerRef,
155
193
  style: resolvedStyle,
@@ -166,27 +204,38 @@ class InnerRectButton extends React.Component {
166
204
  }]
167
205
  }), children);
168
206
  }
207
+
169
208
  }
209
+
170
210
  _defineProperty(InnerRectButton, "defaultProps", {
171
211
  activeOpacity: 0.105,
172
212
  underlayColor: 'black'
173
213
  });
174
- const RectButton = exports.RectButton = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(InnerRectButton, _extends({
214
+
215
+ const RectButton = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(InnerRectButton, _extends({
175
216
  innerRef: ref
176
217
  }, props)));
218
+ exports.RectButton = RectButton;
219
+
177
220
  class InnerBorderlessButton extends React.Component {
178
221
  constructor(props) {
179
222
  super(props);
223
+
180
224
  _defineProperty(this, "opacity", void 0);
225
+
181
226
  _defineProperty(this, "onActiveStateChange", active => {
182
227
  var _this$props$onActiveS2, _this$props5;
228
+
183
229
  if (_reactNative.Platform.OS !== 'android') {
184
230
  this.opacity.setValue(active ? this.props.activeOpacity : 1);
185
231
  }
186
- (_this$props$onActiveS2 = (_this$props5 = this.props).onActiveStateChange) === null || _this$props$onActiveS2 === void 0 || _this$props$onActiveS2.call(_this$props5, active);
232
+
233
+ (_this$props$onActiveS2 = (_this$props5 = this.props).onActiveStateChange) === null || _this$props$onActiveS2 === void 0 ? void 0 : _this$props$onActiveS2.call(_this$props5, active);
187
234
  });
235
+
188
236
  this.opacity = new _reactNative.Animated.Value(1);
189
237
  }
238
+
190
239
  render() {
191
240
  const {
192
241
  children,
@@ -204,12 +253,16 @@ class InnerBorderlessButton extends React.Component {
204
253
  }]
205
254
  }), children);
206
255
  }
256
+
207
257
  }
258
+
208
259
  _defineProperty(InnerBorderlessButton, "defaultProps", {
209
260
  activeOpacity: 0.3,
210
261
  borderless: true
211
262
  });
212
- const BorderlessButton = exports.BorderlessButton = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(InnerBorderlessButton, _extends({
263
+
264
+ const BorderlessButton = /*#__PURE__*/React.forwardRef((props, ref) => /*#__PURE__*/React.createElement(InnerBorderlessButton, _extends({
213
265
  innerRef: ref
214
266
  }, props)));
267
+ exports.BorderlessButton = BorderlessButton;
215
268
  //# sourceMappingURL=GestureButtons.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","_interopRequireWildcard","require","_reactNative","_createNativeWrapper","_interopRequireDefault","_GestureHandlerButton","_State","_utils","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_extends","assign","bind","arguments","length","apply","_defineProperty","_toPropertyKey","value","enumerable","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","RawButton","exports","createNativeWrapper","GestureHandlerButton","shouldCancelWhenOutside","shouldActivateOnStart","IS_FABRIC","InnerBaseButton","Component","constructor","props","nativeEvent","state","oldState","pointerInside","active","State","ACTIVE","lastActive","onActiveStateChange","longPressDetected","CANCELLED","onPress","Platform","OS","BEGAN","onLongPress","longPressTimeout","setTimeout","delayLongPress","undefined","clearTimeout","END","FAILED","_this$props$onLongPre","_this$props","_this$props$onHandler","_this$props2","onHandlerStateChange","handleEvent","_this$props$onGesture","_this$props3","onGestureEvent","render","rippleColor","unprocessedRippleColor","style","rest","isFabric","processColor","createElement","ref","innerRef","cursor","BaseButton","forwardRef","AnimatedBaseButton","Animated","createAnimatedComponent","btnStyles","StyleSheet","create","underlay","position","left","right","bottom","top","InnerRectButton","_this$props$onActiveS","_this$props4","opacity","setValue","activeOpacity","Value","children","resolvedStyle","flatten","View","backgroundColor","underlayColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","RectButton","InnerBorderlessButton","_this$props$onActiveS2","_this$props5","borderless","BorderlessButton"],"sources":["GestureButtons.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Animated, Platform, processColor, StyleSheet } from 'react-native';\n\nimport createNativeWrapper from '../handlers/createNativeWrapper';\nimport GestureHandlerButton from './GestureHandlerButton';\nimport { State } from '../State';\n\nimport {\n GestureEvent,\n HandlerStateChangeEvent,\n} from '../handlers/gestureHandlerCommon';\nimport type { NativeViewGestureHandlerPayload } from '../handlers/GestureHandlerEventPayload';\nimport type {\n BaseButtonWithRefProps,\n BaseButtonProps,\n RectButtonWithRefProps,\n RectButtonProps,\n BorderlessButtonWithRefProps,\n BorderlessButtonProps,\n} from './GestureButtonsProps';\nimport { isFabric } from '../utils';\n\nexport const RawButton = createNativeWrapper(GestureHandlerButton, {\n shouldCancelWhenOutside: false,\n shouldActivateOnStart: false,\n});\n\nlet IS_FABRIC: null | boolean = null;\n\nclass InnerBaseButton extends React.Component<BaseButtonWithRefProps> {\n static defaultProps = {\n delayLongPress: 600,\n };\n\n private lastActive: boolean;\n private longPressTimeout: ReturnType<typeof setTimeout> | undefined;\n private longPressDetected: boolean;\n\n constructor(props: BaseButtonProps) {\n super(props);\n this.lastActive = false;\n this.longPressDetected = false;\n }\n\n private handleEvent = ({\n nativeEvent,\n }: HandlerStateChangeEvent<NativeViewGestureHandlerPayload>) => {\n const { state, oldState, pointerInside } = nativeEvent;\n const active = pointerInside && state === State.ACTIVE;\n\n if (active !== this.lastActive && this.props.onActiveStateChange) {\n this.props.onActiveStateChange(active);\n }\n\n if (\n !this.longPressDetected &&\n oldState === State.ACTIVE &&\n state !== State.CANCELLED &&\n this.lastActive &&\n this.props.onPress\n ) {\n this.props.onPress(pointerInside);\n }\n\n if (\n !this.lastActive &&\n // NativeViewGestureHandler sends different events based on platform\n state === (Platform.OS !== 'android' ? State.ACTIVE : State.BEGAN) &&\n pointerInside\n ) {\n this.longPressDetected = false;\n if (this.props.onLongPress) {\n this.longPressTimeout = setTimeout(\n this.onLongPress,\n this.props.delayLongPress\n );\n }\n } else if (\n // Cancel longpress timeout if it's set and the finger moved out of the view\n state === State.ACTIVE &&\n !pointerInside &&\n this.longPressTimeout !== undefined\n ) {\n clearTimeout(this.longPressTimeout);\n this.longPressTimeout = undefined;\n } else if (\n // Cancel longpress timeout if it's set and the gesture has finished\n this.longPressTimeout !== undefined &&\n (state === State.END ||\n state === State.CANCELLED ||\n state === State.FAILED)\n ) {\n clearTimeout(this.longPressTimeout);\n this.longPressTimeout = undefined;\n }\n\n this.lastActive = active;\n };\n\n private onLongPress = () => {\n this.longPressDetected = true;\n this.props.onLongPress?.();\n };\n\n // Normally, the parent would execute it's handler first, then forward the\n // event to listeners. However, here our handler is virtually only forwarding\n // events to listeners, so we reverse the order to keep the proper order of\n // the callbacks (from \"raw\" ones to \"processed\").\n private onHandlerStateChange = (\n e: HandlerStateChangeEvent<NativeViewGestureHandlerPayload>\n ) => {\n this.props.onHandlerStateChange?.(e);\n this.handleEvent(e);\n };\n\n private onGestureEvent = (\n e: GestureEvent<NativeViewGestureHandlerPayload>\n ) => {\n this.props.onGestureEvent?.(e);\n this.handleEvent(\n e as HandlerStateChangeEvent<NativeViewGestureHandlerPayload>\n ); // TODO: maybe it is not correct\n };\n\n render() {\n const { rippleColor: unprocessedRippleColor, style, ...rest } = this.props;\n\n if (IS_FABRIC === null) {\n IS_FABRIC = isFabric();\n }\n\n const rippleColor = IS_FABRIC\n ? unprocessedRippleColor\n : processColor(unprocessedRippleColor ?? undefined);\n\n return (\n <RawButton\n ref={this.props.innerRef}\n rippleColor={rippleColor}\n style={[style, Platform.OS === 'ios' && { cursor: undefined }]}\n {...rest}\n onGestureEvent={this.onGestureEvent}\n onHandlerStateChange={this.onHandlerStateChange}\n />\n );\n }\n}\n\nexport const BaseButton = React.forwardRef<\n any,\n Omit<BaseButtonProps, 'innerRef'>\n>((props, ref) => <InnerBaseButton innerRef={ref} {...props} />);\n\nconst AnimatedBaseButton = Animated.createAnimatedComponent(BaseButton);\n\nconst btnStyles = StyleSheet.create({\n underlay: {\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: 0,\n top: 0,\n },\n});\n\nclass InnerRectButton extends React.Component<RectButtonWithRefProps> {\n static defaultProps = {\n activeOpacity: 0.105,\n underlayColor: 'black',\n };\n\n private opacity: Animated.Value;\n\n constructor(props: RectButtonProps) {\n super(props);\n this.opacity = new Animated.Value(0);\n }\n\n private onActiveStateChange = (active: boolean) => {\n if (Platform.OS !== 'android') {\n this.opacity.setValue(active ? this.props.activeOpacity! : 0);\n }\n\n this.props.onActiveStateChange?.(active);\n };\n\n render() {\n const { children, style, ...rest } = this.props;\n\n const resolvedStyle = StyleSheet.flatten(style ?? {});\n\n return (\n <BaseButton\n {...rest}\n ref={this.props.innerRef}\n style={resolvedStyle}\n onActiveStateChange={this.onActiveStateChange}>\n <Animated.View\n style={[\n btnStyles.underlay,\n {\n opacity: this.opacity,\n backgroundColor: this.props.underlayColor,\n borderRadius: resolvedStyle.borderRadius,\n borderTopLeftRadius: resolvedStyle.borderTopLeftRadius,\n borderTopRightRadius: resolvedStyle.borderTopRightRadius,\n borderBottomLeftRadius: resolvedStyle.borderBottomLeftRadius,\n borderBottomRightRadius: resolvedStyle.borderBottomRightRadius,\n },\n ]}\n />\n {children}\n </BaseButton>\n );\n }\n}\n\nexport const RectButton = React.forwardRef<\n any,\n Omit<RectButtonProps, 'innerRef'>\n>((props, ref) => <InnerRectButton innerRef={ref} {...props} />);\n\nclass InnerBorderlessButton extends React.Component<BorderlessButtonWithRefProps> {\n static defaultProps = {\n activeOpacity: 0.3,\n borderless: true,\n };\n\n private opacity: Animated.Value;\n\n constructor(props: BorderlessButtonProps) {\n super(props);\n this.opacity = new Animated.Value(1);\n }\n\n private onActiveStateChange = (active: boolean) => {\n if (Platform.OS !== 'android') {\n this.opacity.setValue(active ? this.props.activeOpacity! : 1);\n }\n\n this.props.onActiveStateChange?.(active);\n };\n\n render() {\n const { children, style, innerRef, ...rest } = this.props;\n\n return (\n <AnimatedBaseButton\n {...rest}\n // @ts-ignore We don't want `innerRef` to be accessible from public API.\n // However in this case we need to set it indirectly on `BaseButton`, hence we use ts-ignore\n innerRef={innerRef}\n onActiveStateChange={this.onActiveStateChange}\n style={[style, Platform.OS === 'ios' && { opacity: this.opacity }]}>\n {children}\n </AnimatedBaseButton>\n );\n }\n}\n\nexport const BorderlessButton = React.forwardRef<\n any,\n Omit<BorderlessButtonProps, 'innerRef'>\n>((props, ref) => <InnerBorderlessButton innerRef={ref} {...props} />);\n\nexport { default as PureNativeButton } from './GestureHandlerButton';\n"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,C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AAC","ignoreList":[]}
1
+ {"version":3,"sources":["GestureButtons.tsx"],"names":["RawButton","GestureHandlerButton","shouldCancelWhenOutside","shouldActivateOnStart","IS_FABRIC","InnerBaseButton","React","Component","constructor","props","nativeEvent","state","oldState","pointerInside","active","State","ACTIVE","lastActive","onActiveStateChange","longPressDetected","CANCELLED","onPress","Platform","OS","BEGAN","onLongPress","longPressTimeout","setTimeout","delayLongPress","undefined","clearTimeout","END","FAILED","e","onHandlerStateChange","handleEvent","onGestureEvent","render","rippleColor","unprocessedRippleColor","style","rest","innerRef","cursor","BaseButton","forwardRef","ref","AnimatedBaseButton","Animated","createAnimatedComponent","btnStyles","StyleSheet","create","underlay","position","left","right","bottom","top","InnerRectButton","opacity","setValue","activeOpacity","Value","children","resolvedStyle","flatten","backgroundColor","underlayColor","borderRadius","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","RectButton","InnerBorderlessButton","borderless","BorderlessButton"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AAeA;;;;;;;;;;;;AAEO,MAAMA,SAAS,GAAG,kCAAoBC,6BAApB,EAA0C;AACjEC,EAAAA,uBAAuB,EAAE,KADwC;AAEjEC,EAAAA,qBAAqB,EAAE;AAF0C,CAA1C,CAAlB;;AAKP,IAAIC,SAAyB,GAAG,IAAhC;;AAEA,MAAMC,eAAN,SAA8BC,KAAK,CAACC,SAApC,CAAsE;AASpEC,EAAAA,WAAW,CAACC,KAAD,EAAyB;AAClC,UAAMA,KAAN;;AADkC;;AAAA;;AAAA;;AAAA,yCAMd,CAAC;AACrBC,MAAAA;AADqB,KAAD,KAE0C;AAC9D,YAAM;AAAEC,QAAAA,KAAF;AAASC,QAAAA,QAAT;AAAmBC,QAAAA;AAAnB,UAAqCH,WAA3C;AACA,YAAMI,MAAM,GAAGD,aAAa,IAAIF,KAAK,KAAKI,aAAMC,MAAhD;;AAEA,UAAIF,MAAM,KAAK,KAAKG,UAAhB,IAA8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B,CAAf;AACD;;AAUD1B,EAAAA,MAAM,GAAG;AACP,UAAM;AAAE2B,MAAAA,QAAF;AAAYxB,MAAAA,KAAZ;AAAmBE,MAAAA,QAAnB;AAA6B,SAAGD;AAAhC,QAAyC,KAAKhC,KAApD;AAEA,wBACE,oBAAC,kBAAD,eACMgC,IADN;AAEE;AACA;AACA,MAAA,QAAQ,EAAEC,QAJZ;AAKE,MAAA,mBAAmB,EAAE,KAAKxB,mBAL5B;AAME,MAAA,KAAK,EAAE,CAACsB,KAAD,EAAQlB,sBAASC,EAAT,KAAgB,KAAhB,IAAyB;AAAEqC,QAAAA,OAAO,EAAE,KAAKA;AAAhB,OAAjC;AANT,QAOGI,QAPH,CADF;AAWD;;AAnC+E;;gBAA5EW,qB,kBACkB;AACpBb,EAAAA,aAAa,EAAE,GADK;AAEpBc,EAAAA,UAAU,EAAE;AAFQ,C;;AAqCjB,MAAMC,gBAAgB,gBAAGvE,KAAK,CAACuC,UAAN,CAG9B,CAACpC,KAAD,EAAQqC,GAAR,kBAAgB,oBAAC,qBAAD;AAAuB,EAAA,QAAQ,EAAEA;AAAjC,GAA0CrC,KAA1C,EAHc,CAAzB","sourcesContent":["import * as React from 'react';\nimport { Animated, Platform, processColor, StyleSheet } from 'react-native';\n\nimport createNativeWrapper from '../handlers/createNativeWrapper';\nimport GestureHandlerButton from './GestureHandlerButton';\nimport { State } from '../State';\n\nimport {\n GestureEvent,\n HandlerStateChangeEvent,\n} from '../handlers/gestureHandlerCommon';\nimport type { NativeViewGestureHandlerPayload } from '../handlers/GestureHandlerEventPayload';\nimport type {\n BaseButtonWithRefProps,\n BaseButtonProps,\n RectButtonWithRefProps,\n RectButtonProps,\n BorderlessButtonWithRefProps,\n BorderlessButtonProps,\n} from './GestureButtonsProps';\nimport { isFabric } from '../utils';\n\nexport const RawButton = createNativeWrapper(GestureHandlerButton, {\n shouldCancelWhenOutside: false,\n shouldActivateOnStart: false,\n});\n\nlet IS_FABRIC: null | boolean = null;\n\nclass InnerBaseButton extends React.Component<BaseButtonWithRefProps> {\n static defaultProps = {\n delayLongPress: 600,\n };\n\n private lastActive: boolean;\n private longPressTimeout: ReturnType<typeof setTimeout> | undefined;\n private longPressDetected: boolean;\n\n constructor(props: BaseButtonProps) {\n super(props);\n this.lastActive = false;\n this.longPressDetected = false;\n }\n\n private handleEvent = ({\n nativeEvent,\n }: HandlerStateChangeEvent<NativeViewGestureHandlerPayload>) => {\n const { state, oldState, pointerInside } = nativeEvent;\n const active = pointerInside && state === State.ACTIVE;\n\n if (active !== this.lastActive && this.props.onActiveStateChange) {\n this.props.onActiveStateChange(active);\n }\n\n if (\n !this.longPressDetected &&\n oldState === State.ACTIVE &&\n state !== State.CANCELLED &&\n this.lastActive &&\n this.props.onPress\n ) {\n this.props.onPress(pointerInside);\n }\n\n if (\n !this.lastActive &&\n // NativeViewGestureHandler sends different events based on platform\n state === (Platform.OS !== 'android' ? State.ACTIVE : State.BEGAN) &&\n pointerInside\n ) {\n this.longPressDetected = false;\n if (this.props.onLongPress) {\n this.longPressTimeout = setTimeout(\n this.onLongPress,\n this.props.delayLongPress\n );\n }\n } else if (\n // Cancel longpress timeout if it's set and the finger moved out of the view\n state === State.ACTIVE &&\n !pointerInside &&\n this.longPressTimeout !== undefined\n ) {\n clearTimeout(this.longPressTimeout);\n this.longPressTimeout = undefined;\n } else if (\n // Cancel longpress timeout if it's set and the gesture has finished\n this.longPressTimeout !== undefined &&\n (state === State.END ||\n state === State.CANCELLED ||\n state === State.FAILED)\n ) {\n clearTimeout(this.longPressTimeout);\n this.longPressTimeout = undefined;\n }\n\n this.lastActive = active;\n };\n\n private onLongPress = () => {\n this.longPressDetected = true;\n this.props.onLongPress?.();\n };\n\n // Normally, the parent would execute it's handler first, then forward the\n // event to listeners. However, here our handler is virtually only forwarding\n // events to listeners, so we reverse the order to keep the proper order of\n // the callbacks (from \"raw\" ones to \"processed\").\n private onHandlerStateChange = (\n e: HandlerStateChangeEvent<NativeViewGestureHandlerPayload>\n ) => {\n this.props.onHandlerStateChange?.(e);\n this.handleEvent(e);\n };\n\n private onGestureEvent = (\n e: GestureEvent<NativeViewGestureHandlerPayload>\n ) => {\n this.props.onGestureEvent?.(e);\n this.handleEvent(\n e as HandlerStateChangeEvent<NativeViewGestureHandlerPayload>\n ); // TODO: maybe it is not correct\n };\n\n render() {\n const { rippleColor: unprocessedRippleColor, style, ...rest } = this.props;\n\n if (IS_FABRIC === null) {\n IS_FABRIC = isFabric();\n }\n\n const rippleColor = IS_FABRIC\n ? unprocessedRippleColor\n : processColor(unprocessedRippleColor ?? undefined);\n\n return (\n <RawButton\n ref={this.props.innerRef}\n rippleColor={rippleColor}\n style={[style, Platform.OS === 'ios' && { cursor: undefined }]}\n {...rest}\n onGestureEvent={this.onGestureEvent}\n onHandlerStateChange={this.onHandlerStateChange}\n />\n );\n }\n}\n\nexport const BaseButton = React.forwardRef<\n any,\n Omit<BaseButtonProps, 'innerRef'>\n>((props, ref) => <InnerBaseButton innerRef={ref} {...props} />);\n\nconst AnimatedBaseButton = Animated.createAnimatedComponent(BaseButton);\n\nconst btnStyles = StyleSheet.create({\n underlay: {\n position: 'absolute',\n left: 0,\n right: 0,\n bottom: 0,\n top: 0,\n },\n});\n\nclass InnerRectButton extends React.Component<RectButtonWithRefProps> {\n static defaultProps = {\n activeOpacity: 0.105,\n underlayColor: 'black',\n };\n\n private opacity: Animated.Value;\n\n constructor(props: RectButtonProps) {\n super(props);\n this.opacity = new Animated.Value(0);\n }\n\n private onActiveStateChange = (active: boolean) => {\n if (Platform.OS !== 'android') {\n this.opacity.setValue(active ? this.props.activeOpacity! : 0);\n }\n\n this.props.onActiveStateChange?.(active);\n };\n\n render() {\n const { children, style, ...rest } = this.props;\n\n const resolvedStyle = StyleSheet.flatten(style ?? {});\n\n return (\n <BaseButton\n {...rest}\n ref={this.props.innerRef}\n style={resolvedStyle}\n onActiveStateChange={this.onActiveStateChange}>\n <Animated.View\n style={[\n btnStyles.underlay,\n {\n opacity: this.opacity,\n backgroundColor: this.props.underlayColor,\n borderRadius: resolvedStyle.borderRadius,\n borderTopLeftRadius: resolvedStyle.borderTopLeftRadius,\n borderTopRightRadius: resolvedStyle.borderTopRightRadius,\n borderBottomLeftRadius: resolvedStyle.borderBottomLeftRadius,\n borderBottomRightRadius: resolvedStyle.borderBottomRightRadius,\n },\n ]}\n />\n {children}\n </BaseButton>\n );\n }\n}\n\nexport const RectButton = React.forwardRef<\n any,\n Omit<RectButtonProps, 'innerRef'>\n>((props, ref) => <InnerRectButton innerRef={ref} {...props} />);\n\nclass InnerBorderlessButton extends React.Component<BorderlessButtonWithRefProps> {\n static defaultProps = {\n activeOpacity: 0.3,\n borderless: true,\n };\n\n private opacity: Animated.Value;\n\n constructor(props: BorderlessButtonProps) {\n super(props);\n this.opacity = new Animated.Value(1);\n }\n\n private onActiveStateChange = (active: boolean) => {\n if (Platform.OS !== 'android') {\n this.opacity.setValue(active ? this.props.activeOpacity! : 1);\n }\n\n this.props.onActiveStateChange?.(active);\n };\n\n render() {\n const { children, style, innerRef, ...rest } = this.props;\n\n return (\n <AnimatedBaseButton\n {...rest}\n // @ts-ignore We don't want `innerRef` to be accessible from public API.\n // However in this case we need to set it indirectly on `BaseButton`, hence we use ts-ignore\n innerRef={innerRef}\n onActiveStateChange={this.onActiveStateChange}\n style={[style, Platform.OS === 'ios' && { opacity: this.opacity }]}>\n {children}\n </AnimatedBaseButton>\n );\n }\n}\n\nexport const BorderlessButton = React.forwardRef<\n any,\n Omit<BorderlessButtonProps, 'innerRef'>\n>((props, ref) => <InnerBorderlessButton innerRef={ref} {...props} />);\n\nexport { default as PureNativeButton } from './GestureHandlerButton';\n"]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["GestureButtonsProps.ts"],"sourcesContent":["import * as React from 'react';\nimport {\n AccessibilityProps,\n ColorValue,\n StyleProp,\n ViewStyle,\n} from 'react-native';\nimport type { NativeViewGestureHandlerProps } from '../handlers/NativeViewGestureHandler';\n\nexport interface RawButtonProps\n extends NativeViewGestureHandlerProps,\n AccessibilityProps {\n /**\n * Defines if more than one button could be pressed simultaneously. By default\n * set true.\n */\n exclusive?: boolean;\n // TODO: we should transform props in `createNativeWrapper`\n /**\n * Android only.\n *\n * Defines color of native ripple animation used since API level 21.\n */\n rippleColor?: number | ColorValue | null;\n\n /**\n * Android only.\n *\n * Defines radius of native ripple animation used since API level 21.\n */\n rippleRadius?: number | null;\n\n /**\n * Android only.\n *\n * Set this to true if you want the ripple animation to render outside the view bounds.\n */\n borderless?: boolean;\n\n /**\n * Android only.\n *\n * Defines whether the ripple animation should be drawn on the foreground of the view.\n */\n foreground?: boolean;\n\n /**\n * Android only.\n *\n * Set this to true if you don't want the system to play sound when the button is pressed.\n */\n touchSoundDisabled?: boolean;\n\n /**\n * Style object, use it to set additional styles.\n */\n style?: StyleProp<ViewStyle>;\n\n /**\n * Used for testing-library compatibility, not passed to the native component.\n */\n // eslint-disable-next-line @typescript-eslint/ban-types\n testOnly_onPress?: Function | null;\n\n /**\n * Used for testing-library compatibility, not passed to the native component.\n */\n // eslint-disable-next-line @typescript-eslint/ban-types\n testOnly_onPressIn?: Function | null;\n\n /**\n * Used for testing-library compatibility, not passed to the native component.\n */\n // eslint-disable-next-line @typescript-eslint/ban-types\n testOnly_onPressOut?: Function | null;\n\n /**\n * Used for testing-library compatibility, not passed to the native component.\n */\n // eslint-disable-next-line @typescript-eslint/ban-types\n testOnly_onLongPress?: Function | null;\n}\ninterface ButtonWithRefProps {\n innerRef?: React.ForwardedRef<React.ComponentType<any>>;\n}\n\nexport interface BaseButtonProps extends RawButtonProps {\n /**\n * Called when the button gets pressed (analogous to `onPress` in\n * `TouchableHighlight` from RN core).\n */\n onPress?: (pointerInside: boolean) => void;\n\n /**\n * Called when the button gets pressed and is held for `delayLongPress`\n * milliseconds.\n */\n onLongPress?: () => void;\n\n /**\n * Called when button changes from inactive to active and vice versa. It\n * passes active state as a boolean variable as a first parameter for that\n * method.\n */\n onActiveStateChange?: (active: boolean) => void;\n style?: StyleProp<ViewStyle>;\n testID?: string;\n\n /**\n * Delay, in milliseconds, after which the `onLongPress` callback gets called.\n * Defaults to 600.\n */\n delayLongPress?: number;\n}\nexport interface BaseButtonWithRefProps\n extends BaseButtonProps,\n ButtonWithRefProps {}\n\nexport interface RectButtonProps extends BaseButtonProps {\n /**\n * Background color that will be dimmed when button is in active state.\n */\n underlayColor?: string;\n\n /**\n * iOS only.\n *\n * Opacity applied to the underlay when button is in active state.\n */\n activeOpacity?: number;\n}\nexport interface RectButtonWithRefProps\n extends RectButtonProps,\n ButtonWithRefProps {}\n\nexport interface BorderlessButtonProps extends BaseButtonProps {\n /**\n * iOS only.\n *\n * Opacity applied to the button when it is in an active state.\n */\n activeOpacity?: number;\n}\nexport interface BorderlessButtonWithRefProps\n extends BorderlessButtonProps,\n ButtonWithRefProps {}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[]}