react-native-gesture-handler 2.22.1 → 2.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (275) hide show
  1. package/RNGestureHandler.podspec +8 -0
  2. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +14 -0
  3. package/android/src/main/jni/cpp-adapter.cpp +19 -12
  4. package/apple/RNGestureHandler.mm +15 -8
  5. package/apple/RNGestureHandlerButton.mm +12 -2
  6. package/apple/RNGestureHandlerModule.mm +17 -5
  7. package/lib/commonjs/RNGestureHandlerModule.web.js +2 -2
  8. package/lib/commonjs/RNGestureHandlerModule.web.js.map +1 -1
  9. package/lib/commonjs/components/DrawerLayout.js +6 -0
  10. package/lib/commonjs/components/DrawerLayout.js.map +1 -1
  11. package/lib/commonjs/components/GestureButtons.js +11 -2
  12. package/lib/commonjs/components/GestureButtons.js.map +1 -1
  13. package/lib/commonjs/components/Pressable/Pressable.js +21 -5
  14. package/lib/commonjs/components/Pressable/Pressable.js.map +1 -1
  15. package/lib/commonjs/components/Pressable/index.js.map +1 -1
  16. package/lib/commonjs/components/ReanimatedSwipeable.js +49 -20
  17. package/lib/commonjs/components/ReanimatedSwipeable.js.map +1 -1
  18. package/lib/commonjs/components/Text.js +10 -4
  19. package/lib/commonjs/components/Text.js.map +1 -1
  20. package/lib/commonjs/components/touchables/TouchableHighlight.js +2 -0
  21. package/lib/commonjs/components/touchables/TouchableHighlight.js.map +1 -1
  22. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +2 -0
  23. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  24. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +5 -1
  25. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js.map +1 -1
  26. package/lib/commonjs/components/touchables/TouchableOpacity.js +2 -0
  27. package/lib/commonjs/components/touchables/TouchableOpacity.js.map +1 -1
  28. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +3 -0
  29. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  30. package/lib/commonjs/findNodeHandle.web.js +9 -1
  31. package/lib/commonjs/findNodeHandle.web.js.map +1 -1
  32. package/lib/commonjs/handlers/FlingGestureHandler.js +8 -0
  33. package/lib/commonjs/handlers/FlingGestureHandler.js.map +1 -1
  34. package/lib/commonjs/handlers/ForceTouchGestureHandler.js +5 -1
  35. package/lib/commonjs/handlers/ForceTouchGestureHandler.js.map +1 -1
  36. package/lib/commonjs/handlers/LongPressGestureHandler.js +8 -0
  37. package/lib/commonjs/handlers/LongPressGestureHandler.js.map +1 -1
  38. package/lib/commonjs/handlers/NativeViewGestureHandler.js +8 -0
  39. package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +1 -1
  40. package/lib/commonjs/handlers/PanGestureHandler.js +8 -0
  41. package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -1
  42. package/lib/commonjs/handlers/PinchGestureHandler.js +8 -0
  43. package/lib/commonjs/handlers/PinchGestureHandler.js.map +1 -1
  44. package/lib/commonjs/handlers/RotationGestureHandler.js +8 -0
  45. package/lib/commonjs/handlers/RotationGestureHandler.js.map +1 -1
  46. package/lib/commonjs/handlers/TapGestureHandler.js +8 -0
  47. package/lib/commonjs/handlers/TapGestureHandler.js.map +1 -1
  48. package/lib/commonjs/handlers/createHandler.js +6 -2
  49. package/lib/commonjs/handlers/createHandler.js.map +1 -1
  50. package/lib/commonjs/handlers/gestures/GestureDetector/index.js +1 -1
  51. package/lib/commonjs/handlers/gestures/GestureDetector/index.js.map +1 -1
  52. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js +2 -2
  53. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
  54. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js +1 -1
  55. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js.map +1 -1
  56. package/lib/commonjs/handlers/handlersRegistry.js +7 -2
  57. package/lib/commonjs/handlers/handlersRegistry.js.map +1 -1
  58. package/lib/commonjs/index.js.map +1 -1
  59. package/lib/commonjs/utils.js +3 -3
  60. package/lib/commonjs/utils.js.map +1 -1
  61. package/lib/commonjs/web/detectors/RotationGestureDetector.js +22 -22
  62. package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +1 -1
  63. package/lib/commonjs/web/detectors/ScaleGestureDetector.js +24 -24
  64. package/lib/commonjs/web/detectors/ScaleGestureDetector.js.map +1 -1
  65. package/lib/commonjs/web/handlers/FlingGestureHandler.js +6 -6
  66. package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -1
  67. package/lib/commonjs/web/handlers/GestureHandler.js +112 -92
  68. package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
  69. package/lib/commonjs/web/handlers/HoverGestureHandler.js +2 -2
  70. package/lib/commonjs/web/handlers/HoverGestureHandler.js.map +1 -1
  71. package/lib/commonjs/web/handlers/LongPressGestureHandler.js +6 -6
  72. package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +1 -1
  73. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js +13 -13
  74. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js.map +1 -1
  75. package/lib/commonjs/web/handlers/PanGestureHandler.js +15 -15
  76. package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
  77. package/lib/commonjs/web/handlers/PinchGestureHandler.js +15 -15
  78. package/lib/commonjs/web/handlers/PinchGestureHandler.js.map +1 -1
  79. package/lib/commonjs/web/handlers/RotationGestureHandler.js +12 -12
  80. package/lib/commonjs/web/handlers/RotationGestureHandler.js.map +1 -1
  81. package/lib/commonjs/web/handlers/TapGestureHandler.js +4 -4
  82. package/lib/commonjs/web/handlers/TapGestureHandler.js.map +1 -1
  83. package/lib/commonjs/web/tools/CircularBuffer.js +15 -15
  84. package/lib/commonjs/web/tools/CircularBuffer.js.map +1 -1
  85. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +40 -40
  86. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  87. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +32 -13
  88. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  89. package/lib/commonjs/web/tools/InteractionManager.js +16 -18
  90. package/lib/commonjs/web/tools/InteractionManager.js.map +1 -1
  91. package/lib/commonjs/web/tools/NodeManager.js +2 -2
  92. package/lib/commonjs/web/tools/NodeManager.js.map +1 -1
  93. package/lib/commonjs/web/tools/PointerTracker.js +18 -18
  94. package/lib/commonjs/web/tools/PointerTracker.js.map +1 -1
  95. package/lib/commonjs/web/tools/Vector.js.map +1 -1
  96. package/lib/commonjs/web/tools/VelocityTracker.js +1 -1
  97. package/lib/commonjs/web/tools/VelocityTracker.js.map +1 -1
  98. package/lib/module/RNGestureHandlerModule.web.js +2 -2
  99. package/lib/module/RNGestureHandlerModule.web.js.map +1 -1
  100. package/lib/module/components/DrawerLayout.js +7 -0
  101. package/lib/module/components/DrawerLayout.js.map +1 -1
  102. package/lib/module/components/GestureButtons.js +10 -2
  103. package/lib/module/components/GestureButtons.js.map +1 -1
  104. package/lib/module/components/Pressable/Pressable.js +22 -6
  105. package/lib/module/components/Pressable/Pressable.js.map +1 -1
  106. package/lib/module/components/Pressable/index.js.map +1 -1
  107. package/lib/module/components/ReanimatedSwipeable.js +49 -20
  108. package/lib/module/components/ReanimatedSwipeable.js.map +1 -1
  109. package/lib/module/components/Text.js +8 -3
  110. package/lib/module/components/Text.js.map +1 -1
  111. package/lib/module/components/touchables/TouchableHighlight.js +2 -0
  112. package/lib/module/components/touchables/TouchableHighlight.js.map +1 -1
  113. package/lib/module/components/touchables/TouchableNativeFeedback.android.js +2 -0
  114. package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  115. package/lib/module/components/touchables/TouchableNativeFeedback.js +6 -1
  116. package/lib/module/components/touchables/TouchableNativeFeedback.js.map +1 -1
  117. package/lib/module/components/touchables/TouchableOpacity.js +5 -0
  118. package/lib/module/components/touchables/TouchableOpacity.js.map +1 -1
  119. package/lib/module/components/touchables/TouchableWithoutFeedback.js +4 -0
  120. package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  121. package/lib/module/findNodeHandle.web.js +8 -1
  122. package/lib/module/findNodeHandle.web.js.map +1 -1
  123. package/lib/module/handlers/FlingGestureHandler.js +7 -0
  124. package/lib/module/handlers/FlingGestureHandler.js.map +1 -1
  125. package/lib/module/handlers/ForceTouchGestureHandler.js +5 -1
  126. package/lib/module/handlers/ForceTouchGestureHandler.js.map +1 -1
  127. package/lib/module/handlers/LongPressGestureHandler.js +7 -0
  128. package/lib/module/handlers/LongPressGestureHandler.js.map +1 -1
  129. package/lib/module/handlers/NativeViewGestureHandler.js +7 -0
  130. package/lib/module/handlers/NativeViewGestureHandler.js.map +1 -1
  131. package/lib/module/handlers/PanGestureHandler.js +7 -0
  132. package/lib/module/handlers/PanGestureHandler.js.map +1 -1
  133. package/lib/module/handlers/PinchGestureHandler.js +11 -0
  134. package/lib/module/handlers/PinchGestureHandler.js.map +1 -1
  135. package/lib/module/handlers/RotationGestureHandler.js +11 -0
  136. package/lib/module/handlers/RotationGestureHandler.js.map +1 -1
  137. package/lib/module/handlers/TapGestureHandler.js +7 -0
  138. package/lib/module/handlers/TapGestureHandler.js.map +1 -1
  139. package/lib/module/handlers/createHandler.js +9 -4
  140. package/lib/module/handlers/createHandler.js.map +1 -1
  141. package/lib/module/handlers/gestures/GestureDetector/index.js +2 -2
  142. package/lib/module/handlers/gestures/GestureDetector/index.js.map +1 -1
  143. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js +2 -2
  144. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
  145. package/lib/module/handlers/gestures/GestureDetector/utils.js +2 -2
  146. package/lib/module/handlers/gestures/GestureDetector/utils.js.map +1 -1
  147. package/lib/module/handlers/handlersRegistry.js +6 -3
  148. package/lib/module/handlers/handlersRegistry.js.map +1 -1
  149. package/lib/module/index.js.map +1 -1
  150. package/lib/module/utils.js +2 -2
  151. package/lib/module/utils.js.map +1 -1
  152. package/lib/module/web/detectors/RotationGestureDetector.js +22 -22
  153. package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -1
  154. package/lib/module/web/detectors/ScaleGestureDetector.js +24 -24
  155. package/lib/module/web/detectors/ScaleGestureDetector.js.map +1 -1
  156. package/lib/module/web/handlers/FlingGestureHandler.js +6 -6
  157. package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
  158. package/lib/module/web/handlers/GestureHandler.js +112 -92
  159. package/lib/module/web/handlers/GestureHandler.js.map +1 -1
  160. package/lib/module/web/handlers/HoverGestureHandler.js +2 -2
  161. package/lib/module/web/handlers/HoverGestureHandler.js.map +1 -1
  162. package/lib/module/web/handlers/LongPressGestureHandler.js +6 -6
  163. package/lib/module/web/handlers/LongPressGestureHandler.js.map +1 -1
  164. package/lib/module/web/handlers/NativeViewGestureHandler.js +13 -13
  165. package/lib/module/web/handlers/NativeViewGestureHandler.js.map +1 -1
  166. package/lib/module/web/handlers/PanGestureHandler.js +15 -15
  167. package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
  168. package/lib/module/web/handlers/PinchGestureHandler.js +15 -15
  169. package/lib/module/web/handlers/PinchGestureHandler.js.map +1 -1
  170. package/lib/module/web/handlers/RotationGestureHandler.js +12 -12
  171. package/lib/module/web/handlers/RotationGestureHandler.js.map +1 -1
  172. package/lib/module/web/handlers/TapGestureHandler.js +4 -4
  173. package/lib/module/web/handlers/TapGestureHandler.js.map +1 -1
  174. package/lib/module/web/tools/CircularBuffer.js +15 -15
  175. package/lib/module/web/tools/CircularBuffer.js.map +1 -1
  176. package/lib/module/web/tools/GestureHandlerOrchestrator.js +40 -40
  177. package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  178. package/lib/module/web/tools/GestureHandlerWebDelegate.js +32 -13
  179. package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  180. package/lib/module/web/tools/InteractionManager.js +16 -16
  181. package/lib/module/web/tools/InteractionManager.js.map +1 -1
  182. package/lib/module/web/tools/NodeManager.js +2 -2
  183. package/lib/module/web/tools/NodeManager.js.map +1 -1
  184. package/lib/module/web/tools/PointerTracker.js +18 -18
  185. package/lib/module/web/tools/PointerTracker.js.map +1 -1
  186. package/lib/module/web/tools/Vector.js.map +1 -1
  187. package/lib/module/web/tools/VelocityTracker.js +1 -1
  188. package/lib/module/web/tools/VelocityTracker.js.map +1 -1
  189. package/lib/typescript/components/DrawerLayout.d.ts +27 -0
  190. package/lib/typescript/components/GestureButtonsProps.d.ts +18 -2
  191. package/lib/typescript/components/Pressable/PressableProps.d.ts +3 -10
  192. package/lib/typescript/components/Pressable/index.d.ts +1 -1
  193. package/lib/typescript/components/ReanimatedSwipeable.d.ts +6 -0
  194. package/lib/typescript/components/touchables/TouchableHighlight.d.ts +5 -0
  195. package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +2 -0
  196. package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +5 -1
  197. package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +3 -0
  198. package/lib/typescript/components/touchables/TouchableOpacity.d.ts +5 -0
  199. package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +6 -0
  200. package/lib/typescript/handlers/FlingGestureHandler.d.ts +9 -0
  201. package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +9 -0
  202. package/lib/typescript/handlers/LongPressGestureHandler.d.ts +9 -0
  203. package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +9 -0
  204. package/lib/typescript/handlers/PanGestureHandler.d.ts +9 -0
  205. package/lib/typescript/handlers/PinchGestureHandler.d.ts +9 -0
  206. package/lib/typescript/handlers/RotationGestureHandler.d.ts +9 -0
  207. package/lib/typescript/handlers/TapGestureHandler.d.ts +9 -0
  208. package/lib/typescript/handlers/handlersRegistry.d.ts +1 -0
  209. package/lib/typescript/index.d.ts +1 -1
  210. package/lib/typescript/utils.d.ts +1 -1
  211. package/lib/typescript/web/detectors/RotationGestureDetector.d.ts +7 -7
  212. package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts +8 -8
  213. package/lib/typescript/web/handlers/GestureHandler.d.ts +33 -28
  214. package/lib/typescript/web/handlers/IGestureHandler.d.ts +12 -13
  215. package/lib/typescript/web/tools/CircularBuffer.d.ts +3 -3
  216. package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +1 -1
  217. package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts +2 -2
  218. package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +3 -2
  219. package/lib/typescript/web/tools/InteractionManager.d.ts +2 -2
  220. package/lib/typescript/web/tools/NodeManager.d.ts +1 -1
  221. package/lib/typescript/web/tools/PointerTracker.d.ts +4 -4
  222. package/lib/typescript/web/tools/VelocityTracker.d.ts +1 -1
  223. package/package.json +2 -2
  224. package/src/RNGestureHandlerModule.web.ts +2 -2
  225. package/src/components/DrawerLayout.tsx +29 -0
  226. package/src/components/GestureButtons.tsx +13 -2
  227. package/src/components/GestureButtonsProps.ts +31 -2
  228. package/src/components/Pressable/Pressable.tsx +22 -5
  229. package/src/components/Pressable/PressableProps.tsx +4 -11
  230. package/src/components/Pressable/index.ts +4 -1
  231. package/src/components/ReanimatedSwipeable.tsx +97 -66
  232. package/src/components/Text.tsx +13 -4
  233. package/src/components/touchables/TouchableHighlight.tsx +5 -0
  234. package/src/components/touchables/TouchableNativeFeedback.android.tsx +2 -0
  235. package/src/components/touchables/TouchableNativeFeedback.tsx +6 -1
  236. package/src/components/touchables/TouchableNativeFeedbackProps.tsx +3 -0
  237. package/src/components/touchables/TouchableOpacity.tsx +5 -0
  238. package/src/components/touchables/TouchableWithoutFeedback.tsx +6 -0
  239. package/src/findNodeHandle.web.ts +6 -0
  240. package/src/handlers/FlingGestureHandler.ts +10 -0
  241. package/src/handlers/ForceTouchGestureHandler.ts +9 -0
  242. package/src/handlers/LongPressGestureHandler.ts +10 -0
  243. package/src/handlers/NativeViewGestureHandler.ts +10 -0
  244. package/src/handlers/PanGestureHandler.ts +10 -0
  245. package/src/handlers/PinchGestureHandler.ts +10 -0
  246. package/src/handlers/RotationGestureHandler.ts +10 -0
  247. package/src/handlers/TapGestureHandler.ts +10 -0
  248. package/src/handlers/createHandler.tsx +11 -4
  249. package/src/handlers/gestures/GestureDetector/index.tsx +2 -2
  250. package/src/handlers/gestures/GestureDetector/useViewRefHandler.ts +3 -3
  251. package/src/handlers/gestures/GestureDetector/utils.ts +2 -2
  252. package/src/handlers/handlersRegistry.ts +7 -3
  253. package/src/index.ts +4 -1
  254. package/src/utils.ts +2 -2
  255. package/src/web/detectors/RotationGestureDetector.ts +22 -22
  256. package/src/web/detectors/ScaleGestureDetector.ts +24 -24
  257. package/src/web/handlers/FlingGestureHandler.ts +6 -7
  258. package/src/web/handlers/GestureHandler.ts +115 -105
  259. package/src/web/handlers/HoverGestureHandler.ts +2 -2
  260. package/src/web/handlers/IGestureHandler.ts +12 -13
  261. package/src/web/handlers/LongPressGestureHandler.ts +7 -7
  262. package/src/web/handlers/NativeViewGestureHandler.ts +14 -19
  263. package/src/web/handlers/PanGestureHandler.ts +17 -17
  264. package/src/web/handlers/PinchGestureHandler.ts +17 -21
  265. package/src/web/handlers/RotationGestureHandler.ts +12 -12
  266. package/src/web/handlers/TapGestureHandler.ts +4 -6
  267. package/src/web/tools/CircularBuffer.ts +15 -15
  268. package/src/web/tools/GestureHandlerDelegate.ts +1 -1
  269. package/src/web/tools/GestureHandlerOrchestrator.ts +42 -42
  270. package/src/web/tools/GestureHandlerWebDelegate.ts +32 -13
  271. package/src/web/tools/InteractionManager.ts +16 -16
  272. package/src/web/tools/NodeManager.ts +2 -2
  273. package/src/web/tools/PointerTracker.ts +20 -20
  274. package/src/web/tools/Vector.ts +1 -1
  275. package/src/web/tools/VelocityTracker.ts +1 -1
@@ -18,12 +18,15 @@ import type {
18
18
  BorderlessButtonWithRefProps,
19
19
  BorderlessButtonProps,
20
20
  } from './GestureButtonsProps';
21
+ import { isFabric } from '../utils';
21
22
 
22
23
  export const RawButton = createNativeWrapper(GestureHandlerButton, {
23
24
  shouldCancelWhenOutside: false,
24
25
  shouldActivateOnStart: false,
25
26
  });
26
27
 
28
+ let IS_FABRIC: null | boolean = null;
29
+
27
30
  class InnerBaseButton extends React.Component<BaseButtonWithRefProps> {
28
31
  static defaultProps = {
29
32
  delayLongPress: 600,
@@ -120,12 +123,20 @@ class InnerBaseButton extends React.Component<BaseButtonWithRefProps> {
120
123
  };
121
124
 
122
125
  render() {
123
- const { rippleColor, style, ...rest } = this.props;
126
+ const { rippleColor: unprocessedRippleColor, style, ...rest } = this.props;
127
+
128
+ if (IS_FABRIC === null) {
129
+ IS_FABRIC = isFabric();
130
+ }
131
+
132
+ const rippleColor = IS_FABRIC
133
+ ? unprocessedRippleColor
134
+ : processColor(unprocessedRippleColor ?? undefined);
124
135
 
125
136
  return (
126
137
  <RawButton
127
138
  ref={this.props.innerRef}
128
- rippleColor={processColor(rippleColor)}
139
+ rippleColor={rippleColor}
129
140
  style={[style, Platform.OS === 'ios' && { cursor: undefined }]}
130
141
  {...rest}
131
142
  onGestureEvent={this.onGestureEvent}
@@ -1,5 +1,10 @@
1
1
  import * as React from 'react';
2
- import { AccessibilityProps, StyleProp, ViewStyle } from 'react-native';
2
+ import {
3
+ AccessibilityProps,
4
+ ColorValue,
5
+ StyleProp,
6
+ ViewStyle,
7
+ } from 'react-native';
3
8
  import type { NativeViewGestureHandlerProps } from '../handlers/NativeViewGestureHandler';
4
9
 
5
10
  export interface RawButtonProps
@@ -16,7 +21,7 @@ export interface RawButtonProps
16
21
  *
17
22
  * Defines color of native ripple animation used since API level 21.
18
23
  */
19
- rippleColor?: any; // it was present in BaseButtonProps before but is used here in code
24
+ rippleColor?: number | ColorValue | null;
20
25
 
21
26
  /**
22
27
  * Android only.
@@ -50,6 +55,30 @@ export interface RawButtonProps
50
55
  * Style object, use it to set additional styles.
51
56
  */
52
57
  style?: StyleProp<ViewStyle>;
58
+
59
+ /**
60
+ * Used for testing-library compatibility, not passed to the native component.
61
+ */
62
+ // eslint-disable-next-line @typescript-eslint/ban-types
63
+ testOnly_onPress?: Function | null;
64
+
65
+ /**
66
+ * Used for testing-library compatibility, not passed to the native component.
67
+ */
68
+ // eslint-disable-next-line @typescript-eslint/ban-types
69
+ testOnly_onPressIn?: Function | null;
70
+
71
+ /**
72
+ * Used for testing-library compatibility, not passed to the native component.
73
+ */
74
+ // eslint-disable-next-line @typescript-eslint/ban-types
75
+ testOnly_onPressOut?: Function | null;
76
+
77
+ /**
78
+ * Used for testing-library compatibility, not passed to the native component.
79
+ */
80
+ // eslint-disable-next-line @typescript-eslint/ban-types
81
+ testOnly_onLongPress?: Function | null;
53
82
  }
54
83
  interface ButtonWithRefProps {
55
84
  innerRef?: React.ForwardedRef<React.ComponentType<any>>;
@@ -20,9 +20,12 @@ import {
20
20
  } from './utils';
21
21
  import { PressabilityDebugView } from '../../handlers/PressabilityDebugView';
22
22
  import { GestureTouchEvent } from '../../handlers/gestureHandlerCommon';
23
- import { INT32_MAX } from '../../utils';
23
+ import { INT32_MAX, isFabric, isTestEnv } from '../../utils';
24
24
 
25
25
  const DEFAULT_LONG_PRESS_DURATION = 500;
26
+ const IS_TEST_ENV = isTestEnv();
27
+
28
+ let IS_FABRIC: null | boolean = null;
26
29
 
27
30
  export default function Pressable(props: PressableProps) {
28
31
  const {
@@ -366,8 +369,6 @@ export default function Pressable(props: PressableProps) {
366
369
 
367
370
  const gesture = Gesture.Simultaneous(...gestures);
368
371
 
369
- const defaultRippleColor = android_ripple ? undefined : 'transparent';
370
-
371
372
  // `cursor: 'pointer'` on `RNButton` crashes iOS
372
373
  const pointerStyle: StyleProp<ViewStyle> =
373
374
  Platform.OS === 'web' ? { cursor: 'pointer' } : {};
@@ -380,6 +381,18 @@ export default function Pressable(props: PressableProps) {
380
381
  ? children({ pressed: pressedState })
381
382
  : children;
382
383
 
384
+ const rippleColor = useMemo(() => {
385
+ if (IS_FABRIC === null) {
386
+ IS_FABRIC = isFabric();
387
+ }
388
+
389
+ const defaultRippleColor = android_ripple ? undefined : 'transparent';
390
+ const unprocessedRippleColor = android_ripple?.color ?? defaultRippleColor;
391
+ return IS_FABRIC
392
+ ? unprocessedRippleColor
393
+ : processColor(unprocessedRippleColor);
394
+ }, [android_ripple]);
395
+
383
396
  return (
384
397
  <GestureDetector gesture={gesture}>
385
398
  <NativeButton
@@ -388,9 +401,13 @@ export default function Pressable(props: PressableProps) {
388
401
  hitSlop={appliedHitSlop}
389
402
  enabled={isPressableEnabled}
390
403
  touchSoundDisabled={android_disableSound ?? undefined}
391
- rippleColor={processColor(android_ripple?.color ?? defaultRippleColor)}
404
+ rippleColor={rippleColor}
392
405
  rippleRadius={android_ripple?.radius ?? undefined}
393
- style={[pointerStyle, styleProp]}>
406
+ style={[pointerStyle, styleProp]}
407
+ testOnly_onPress={IS_TEST_ENV ? onPress : undefined}
408
+ testOnly_onPressIn={IS_TEST_ENV ? onPressIn : undefined}
409
+ testOnly_onPressOut={IS_TEST_ENV ? onPressOut : undefined}
410
+ testOnly_onLongPress={IS_TEST_ENV ? onLongPress : undefined}>
394
411
  {childrenProp}
395
412
  {__DEV__ ? (
396
413
  <PressabilityDebugView color="red" hitSlop={normalizedHitSlop} />
@@ -1,22 +1,15 @@
1
1
  import {
2
- ColorValue,
3
2
  AccessibilityProps,
4
3
  ViewProps,
5
4
  Insets,
6
5
  StyleProp,
7
6
  ViewStyle,
7
+ PressableStateCallbackType as RNPressableStateCallbackType,
8
+ PressableAndroidRippleConfig as RNPressableAndroidRippleConfig,
8
9
  } from 'react-native';
9
10
 
10
- export interface PressableStateCallbackType {
11
- readonly pressed: boolean;
12
- }
13
-
14
- export interface PressableAndroidRippleConfig {
15
- color?: null | ColorValue | undefined;
16
- borderless?: null | boolean | undefined;
17
- radius?: null | number | undefined;
18
- foreground?: null | boolean | undefined;
19
- }
11
+ export type PressableStateCallbackType = RNPressableStateCallbackType;
12
+ export type PressableAndroidRippleConfig = RNPressableAndroidRippleConfig;
20
13
 
21
14
  export type InnerPressableEvent = {
22
15
  changedTouches: InnerPressableEvent[];
@@ -1,2 +1,5 @@
1
- export type { PressableProps } from './PressableProps';
1
+ export type {
2
+ PressableProps,
3
+ PressableStateCallbackType,
4
+ } from './PressableProps';
2
5
  export { default } from './Pressable';
@@ -9,6 +9,7 @@ import React, {
9
9
  useImperativeHandle,
10
10
  useMemo,
11
11
  } from 'react';
12
+ import { GestureRef } from '../handlers/gestures/gesture';
12
13
  import { GestureObjects as Gesture } from '../handlers/gestures/gestureObjects';
13
14
  import { GestureDetector } from '../handlers/gestures/GestureDetector';
14
15
  import {
@@ -202,6 +203,14 @@ export interface SwipeableProps
202
203
  * apply `flex: 1`
203
204
  */
204
205
  childrenContainerStyle?: StyleProp<ViewStyle>;
206
+
207
+ /**
208
+ * A gesture object or an array of gesture objects containing the configuration and callbacks to be
209
+ * used with the swipeable's gesture handler.
210
+ */
211
+ simultaneousWithExternalGesture?:
212
+ | Exclude<GestureRef, number>
213
+ | Exclude<GestureRef, number>[];
205
214
  }
206
215
 
207
216
  export interface SwipeableMethods {
@@ -247,6 +256,7 @@ const Swipeable = forwardRef<SwipeableMethods, SwipeableProps>(
247
256
  onSwipeableClose,
248
257
  renderLeftActions,
249
258
  renderRightActions,
259
+ simultaneousWithExternalGesture,
250
260
  ...remainingProps
251
261
  } = props;
252
262
 
@@ -456,7 +466,7 @@ const Swipeable = forwardRef<SwipeableMethods, SwipeableProps>(
456
466
  rightLayoutRef,
457
467
  leftWidth,
458
468
  rightWidth,
459
- rowWidth.value,
469
+ rowWidth,
460
470
  ]);
461
471
 
462
472
  const swipeableMethods = useMemo<SwipeableMethods>(
@@ -635,73 +645,94 @@ const Swipeable = forwardRef<SwipeableMethods, SwipeableProps>(
635
645
 
636
646
  const dragStarted = useSharedValue<boolean>(false);
637
647
 
638
- const tapGesture = useMemo(
639
- () =>
640
- Gesture.Tap()
641
- .shouldCancelWhenOutside(true)
642
- .onStart(() => {
643
- if (rowState.value !== 0) {
644
- close();
645
- }
646
- }),
647
- [close, rowState]
648
- );
649
-
650
- const panGesture = useMemo(
651
- () =>
652
- Gesture.Pan()
653
- .enabled(enabled !== false)
654
- .enableTrackpadTwoFingerGesture(enableTrackpadTwoFingerGesture)
655
- .activeOffsetX([-dragOffsetFromRightEdge, dragOffsetFromLeftEdge])
656
- .onStart(updateElementWidths)
657
- .onUpdate(
658
- (event: GestureUpdateEvent<PanGestureHandlerEventPayload>) => {
659
- userDrag.value = event.translationX;
660
-
661
- const direction =
662
- rowState.value === -1
663
- ? SwipeDirection.RIGHT
664
- : rowState.value === 1
665
- ? SwipeDirection.LEFT
666
- : event.translationX > 0
667
- ? SwipeDirection.RIGHT
668
- : SwipeDirection.LEFT;
669
-
670
- if (!dragStarted.value) {
671
- dragStarted.value = true;
672
- if (rowState.value === 0 && onSwipeableOpenStartDrag) {
673
- runOnJS(onSwipeableOpenStartDrag)(direction);
674
- } else if (onSwipeableCloseStartDrag) {
675
- runOnJS(onSwipeableCloseStartDrag)(direction);
676
- }
648
+ const tapGesture = useMemo(() => {
649
+ const tap = Gesture.Tap()
650
+ .shouldCancelWhenOutside(true)
651
+ .onStart(() => {
652
+ if (rowState.value !== 0) {
653
+ close();
654
+ }
655
+ });
656
+
657
+ if (!simultaneousWithExternalGesture) {
658
+ return tap;
659
+ }
660
+
661
+ if (Array.isArray(simultaneousWithExternalGesture)) {
662
+ tap.simultaneousWithExternalGesture(...simultaneousWithExternalGesture);
663
+ } else {
664
+ tap.simultaneousWithExternalGesture(simultaneousWithExternalGesture);
665
+ }
666
+
667
+ return tap;
668
+ }, [close, rowState, simultaneousWithExternalGesture]);
669
+
670
+ const panGesture = useMemo(() => {
671
+ const pan = Gesture.Pan()
672
+ .enabled(enabled !== false)
673
+ .enableTrackpadTwoFingerGesture(enableTrackpadTwoFingerGesture)
674
+ .activeOffsetX([-dragOffsetFromRightEdge, dragOffsetFromLeftEdge])
675
+ .onStart(updateElementWidths)
676
+ .onUpdate(
677
+ (event: GestureUpdateEvent<PanGestureHandlerEventPayload>) => {
678
+ userDrag.value = event.translationX;
679
+
680
+ const direction =
681
+ rowState.value === -1
682
+ ? SwipeDirection.RIGHT
683
+ : rowState.value === 1
684
+ ? SwipeDirection.LEFT
685
+ : event.translationX > 0
686
+ ? SwipeDirection.RIGHT
687
+ : SwipeDirection.LEFT;
688
+
689
+ if (!dragStarted.value) {
690
+ dragStarted.value = true;
691
+ if (rowState.value === 0 && onSwipeableOpenStartDrag) {
692
+ runOnJS(onSwipeableOpenStartDrag)(direction);
693
+ } else if (onSwipeableCloseStartDrag) {
694
+ runOnJS(onSwipeableCloseStartDrag)(direction);
677
695
  }
678
-
679
- updateAnimatedEvent();
680
- }
681
- )
682
- .onEnd(
683
- (event: GestureStateChangeEvent<PanGestureHandlerEventPayload>) => {
684
- handleRelease(event);
685
696
  }
686
- )
687
- .onFinalize(() => {
688
- dragStarted.value = false;
689
- }),
690
- [
691
- dragOffsetFromLeftEdge,
692
- dragOffsetFromRightEdge,
693
- dragStarted,
694
- enableTrackpadTwoFingerGesture,
695
- enabled,
696
- handleRelease,
697
- onSwipeableCloseStartDrag,
698
- onSwipeableOpenStartDrag,
699
- rowState,
700
- updateAnimatedEvent,
701
- updateElementWidths,
702
- userDrag,
703
- ]
704
- );
697
+
698
+ updateAnimatedEvent();
699
+ }
700
+ )
701
+ .onEnd(
702
+ (event: GestureStateChangeEvent<PanGestureHandlerEventPayload>) => {
703
+ handleRelease(event);
704
+ }
705
+ )
706
+ .onFinalize(() => {
707
+ dragStarted.value = false;
708
+ });
709
+
710
+ if (!simultaneousWithExternalGesture) {
711
+ return pan;
712
+ }
713
+
714
+ if (Array.isArray(simultaneousWithExternalGesture)) {
715
+ pan.simultaneousWithExternalGesture(...simultaneousWithExternalGesture);
716
+ } else {
717
+ pan.simultaneousWithExternalGesture(simultaneousWithExternalGesture);
718
+ }
719
+
720
+ return pan;
721
+ }, [
722
+ dragOffsetFromLeftEdge,
723
+ dragOffsetFromRightEdge,
724
+ dragStarted,
725
+ enableTrackpadTwoFingerGesture,
726
+ enabled,
727
+ handleRelease,
728
+ onSwipeableCloseStartDrag,
729
+ onSwipeableOpenStartDrag,
730
+ rowState,
731
+ updateAnimatedEvent,
732
+ updateElementWidths,
733
+ userDrag,
734
+ simultaneousWithExternalGesture,
735
+ ]);
705
736
 
706
737
  useImperativeHandle(ref, () => swipeableMethods, [swipeableMethods]);
707
738
 
@@ -11,11 +11,13 @@ import {
11
11
  TextProps as RNTextProps,
12
12
  } from 'react-native';
13
13
 
14
- import { Gesture, GestureDetector } from '../';
14
+ import { GestureObjects as Gesture } from '../handlers/gestures/gestureObjects';
15
+ import { GestureDetector } from '../handlers/gestures/GestureDetector';
15
16
 
16
17
  export const Text = forwardRef(
17
18
  (props: RNTextProps, ref: ForwardedRef<RNText>) => {
18
- const { onPress, ...rest } = props;
19
+ const { onPress, onLongPress, ...rest } = props;
20
+
19
21
  const textRef = useRef<RNText | null>(null);
20
22
  const native = Gesture.Native().runOnJS(true);
21
23
 
@@ -49,10 +51,17 @@ export const Text = forwardRef(
49
51
  );
50
52
  }, []);
51
53
 
52
- return (
54
+ return onPress || onLongPress ? (
53
55
  <GestureDetector gesture={native}>
54
- <RNText onPress={onPress} ref={refHandler} {...rest} />
56
+ <RNText
57
+ onPress={onPress}
58
+ onLongPress={onLongPress}
59
+ ref={refHandler}
60
+ {...rest}
61
+ />
55
62
  </GestureDetector>
63
+ ) : (
64
+ <RNText ref={ref} {...rest} />
56
65
  );
57
66
  }
58
67
  );
@@ -19,10 +19,15 @@ interface State {
19
19
  };
20
20
  }
21
21
 
22
+ /**
23
+ * @deprecated TouchableHighlight will be removed in the future version of Gesture Handler. Use Pressable instead.
24
+ */
22
25
  export type TouchableHighlightProps = RNTouchableHighlightProps &
23
26
  GenericTouchableProps;
24
27
 
25
28
  /**
29
+ * @deprecated TouchableHighlight will be removed in the future version of Gesture Handler. Use Pressable instead.
30
+ *
26
31
  * TouchableHighlight follows RN's implementation
27
32
  */
28
33
  export default class TouchableHighlight extends Component<
@@ -8,6 +8,8 @@ import {
8
8
  } from './TouchableNativeFeedbackProps';
9
9
 
10
10
  /**
11
+ * @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler. Use Pressable instead.
12
+ *
11
13
  * TouchableNativeFeedback behaves slightly different than RN's TouchableNativeFeedback.
12
14
  * There's small difference with handling long press ripple since RN's implementation calls
13
15
  * ripple animation via bridge. This solution leaves all animations' handling for native components so
@@ -1,3 +1,8 @@
1
- import { TouchableNativeFeedback } from 'react-native';
1
+ import { TouchableNativeFeedback as RNTouchableNativeFeedback } from 'react-native';
2
+
3
+ /**
4
+ * @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler. Use Pressable instead.
5
+ */
6
+ const TouchableNativeFeedback = RNTouchableNativeFeedback;
2
7
 
3
8
  export default TouchableNativeFeedback;
@@ -8,5 +8,8 @@ export type TouchableNativeFeedbackExtraProps = {
8
8
  foreground?: boolean;
9
9
  };
10
10
 
11
+ /**
12
+ * @deprecated TouchableNativeFeedback will be removed in the future version of Gesture Handler. Use Pressable instead.
13
+ */
11
14
  export type TouchableNativeFeedbackProps = RNTouchableNativeFeedbackProps &
12
15
  GenericTouchableProps;
@@ -10,12 +10,17 @@ import type { GenericTouchableProps } from './GenericTouchableProps';
10
10
  import * as React from 'react';
11
11
  import { Component } from 'react';
12
12
 
13
+ /**
14
+ * @deprecated TouchableOpacity will be removed in the future version of Gesture Handler. Use Pressable instead.
15
+ */
13
16
  export type TouchableOpacityProps = RNTouchableOpacityProps &
14
17
  GenericTouchableProps & {
15
18
  useNativeAnimations?: boolean;
16
19
  };
17
20
 
18
21
  /**
22
+ * @deprecated TouchableOpacity will be removed in the future version of Gesture Handler. Use Pressable instead.
23
+ *
19
24
  * TouchableOpacity bases on timing animation which has been used in RN's core
20
25
  */
21
26
  export default class TouchableOpacity extends Component<TouchableOpacityProps> {
@@ -3,8 +3,14 @@ import { PropsWithChildren } from 'react';
3
3
  import GenericTouchable from './GenericTouchable';
4
4
  import type { GenericTouchableProps } from './GenericTouchableProps';
5
5
 
6
+ /**
7
+ * @deprecated TouchableWithoutFeedback will be removed in the future version of Gesture Handler. Use Pressable instead.
8
+ */
6
9
  export type TouchableWithoutFeedbackProps = GenericTouchableProps;
7
10
 
11
+ /**
12
+ * @deprecated TouchableWithoutFeedback will be removed in the future version of Gesture Handler. Use Pressable instead.
13
+ */
8
14
  const TouchableWithoutFeedback = React.forwardRef<
9
15
  GenericTouchable,
10
16
  PropsWithChildren<TouchableWithoutFeedbackProps>
@@ -1,9 +1,15 @@
1
+ import { FlatList } from 'react-native';
1
2
  import type { GestureHandlerRef, SVGRef } from './web/interfaces';
2
3
  import { isRNSVGElement } from './web/utils';
3
4
 
4
5
  export default function findNodeHandle(
5
6
  viewRef: GestureHandlerRef | SVGRef | HTMLElement | SVGElement
6
7
  ): HTMLElement | SVGElement | number {
8
+ // TODO: Remove this once we remove old API.
9
+ if (viewRef instanceof FlatList) {
10
+ // @ts-ignore This is the only way to get the scroll ref from FlatList.
11
+ return viewRef._listRef._scrollRef.firstChild;
12
+ }
7
13
  // Old API assumes that child handler is HTMLElement.
8
14
  // However, if we nest handlers, we will get ref to another handler.
9
15
  // In that case, we want to recursively call findNodeHandle with new handler viewTag (which can also be ref to another handler).
@@ -33,13 +33,23 @@ export interface FlingGestureConfig {
33
33
  numberOfPointers?: number;
34
34
  }
35
35
 
36
+ /**
37
+ * @deprecated FlingGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Fling()` instead.
38
+ */
36
39
  export interface FlingGestureHandlerProps
37
40
  extends BaseGestureHandlerProps<FlingGestureHandlerEventPayload>,
38
41
  FlingGestureConfig {}
39
42
 
40
43
  export const flingHandlerName = 'FlingGestureHandler';
41
44
 
45
+ /**
46
+ * @deprecated FlingGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Fling()` instead.
47
+ */
42
48
  export type FlingGestureHandler = typeof FlingGestureHandler;
49
+
50
+ /**
51
+ * @deprecated FlingGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Fling()` instead.
52
+ */
43
53
  // eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
44
54
  export const FlingGestureHandler = createHandler<
45
55
  FlingGestureHandlerProps,
@@ -50,16 +50,25 @@ export interface ForceTouchGestureConfig {
50
50
  feedbackOnActivation?: boolean;
51
51
  }
52
52
 
53
+ /**
54
+ * @deprecated ForceTouchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.ForceTouch()` instead.
55
+ */
53
56
  export interface ForceTouchGestureHandlerProps
54
57
  extends BaseGestureHandlerProps<ForceTouchGestureHandlerEventPayload>,
55
58
  ForceTouchGestureConfig {}
56
59
 
60
+ /**
61
+ * @deprecated ForceTouchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.ForceTouch()` instead.
62
+ */
57
63
  export type ForceTouchGestureHandler = typeof ForceTouchGestureHandler & {
58
64
  forceTouchAvailable: boolean;
59
65
  };
60
66
 
61
67
  export const forceTouchHandlerName = 'ForceTouchGestureHandler';
62
68
 
69
+ /**
70
+ * @deprecated ForceTouchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.ForceTouch()` instead.
71
+ */
63
72
  // eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
64
73
  export const ForceTouchGestureHandler = PlatformConstants?.forceTouchAvailable
65
74
  ? createHandler<
@@ -32,13 +32,23 @@ export interface LongPressGestureConfig {
32
32
  numberOfPointers?: number;
33
33
  }
34
34
 
35
+ /**
36
+ * @deprecated LongPressGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.LongPress()` instead.
37
+ */
35
38
  export interface LongPressGestureHandlerProps
36
39
  extends BaseGestureHandlerProps<LongPressGestureHandlerEventPayload>,
37
40
  LongPressGestureConfig {}
38
41
 
39
42
  export const longPressHandlerName = 'LongPressGestureHandler';
40
43
 
44
+ /**
45
+ * @deprecated LongPressGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.LongPress()` instead.
46
+ */
41
47
  export type LongPressGestureHandler = typeof LongPressGestureHandler;
48
+
49
+ /**
50
+ * @deprecated LongPressGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.LongPress()` instead.
51
+ */
42
52
  // eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
43
53
  export const LongPressGestureHandler = createHandler<
44
54
  LongPressGestureHandlerProps,
@@ -26,6 +26,9 @@ export interface NativeViewGestureConfig {
26
26
  disallowInterruption?: boolean;
27
27
  }
28
28
 
29
+ /**
30
+ * @deprecated NativeViewGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Native()` instead.
31
+ */
29
32
  export interface NativeViewGestureHandlerProps
30
33
  extends BaseGestureHandlerProps<NativeViewGestureHandlerPayload>,
31
34
  NativeViewGestureConfig {}
@@ -37,7 +40,14 @@ export const nativeViewProps = [
37
40
 
38
41
  export const nativeViewHandlerName = 'NativeViewGestureHandler';
39
42
 
43
+ /**
44
+ * @deprecated NativeViewGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Native()` instead.
45
+ */
40
46
  export type NativeViewGestureHandler = typeof NativeViewGestureHandler;
47
+
48
+ /**
49
+ * @deprecated NativeViewGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Native()` instead.
50
+ */
41
51
  // eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
42
52
  export const NativeViewGestureHandler = createHandler<
43
53
  NativeViewGestureHandlerProps,
@@ -82,6 +82,9 @@ export interface PanGestureConfig extends CommonPanProperties {
82
82
  failOffsetXEnd?: number;
83
83
  }
84
84
 
85
+ /**
86
+ * @deprecated PanGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pan()` instead.
87
+ */
85
88
  export interface PanGestureHandlerProps
86
89
  extends BaseGestureHandlerProps<PanGestureHandlerEventPayload>,
87
90
  CommonPanProperties {
@@ -132,7 +135,14 @@ export interface PanGestureHandlerProps
132
135
 
133
136
  export const panHandlerName = 'PanGestureHandler';
134
137
 
138
+ /**
139
+ * @deprecated PanGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pan()` instead.
140
+ */
135
141
  export type PanGestureHandler = typeof PanGestureHandler;
142
+
143
+ /**
144
+ * @deprecated PanGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pan()` instead.
145
+ */
136
146
  // eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
137
147
  export const PanGestureHandler = createHandler<
138
148
  PanGestureHandlerProps,