react-native-gesture-handler 2.26.0 → 2.27.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 (415) hide show
  1. package/README.md +69 -0
  2. package/android/src/main/jni/CMakeLists.txt +7 -26
  3. package/lib/commonjs/components/Pressable/Pressable.js +139 -188
  4. package/lib/commonjs/components/Pressable/Pressable.js.map +1 -1
  5. package/lib/commonjs/components/Pressable/StateMachine.js +38 -0
  6. package/lib/commonjs/components/Pressable/StateMachine.js.map +1 -0
  7. package/lib/commonjs/components/Pressable/stateDefinitions.js +88 -0
  8. package/lib/commonjs/components/Pressable/stateDefinitions.js.map +1 -0
  9. package/lib/commonjs/components/Pressable/utils.js +1 -1
  10. package/lib/commonjs/components/Pressable/utils.js.map +1 -1
  11. package/lib/commonjs/handlers/gestures/forceTouchGesture.js +12 -0
  12. package/lib/commonjs/handlers/gestures/forceTouchGesture.js.map +1 -1
  13. package/lib/commonjs/handlers/gestures/gestureObjects.js +3 -1
  14. package/lib/commonjs/handlers/gestures/gestureObjects.js.map +1 -1
  15. package/lib/commonjs/web/detectors/RotationGestureDetector.js +3 -0
  16. package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +1 -1
  17. package/lib/commonjs/web/handlers/FlingGestureHandler.js +3 -0
  18. package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -1
  19. package/lib/commonjs/web/handlers/GestureHandler.js +6 -6
  20. package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
  21. package/lib/commonjs/web/handlers/PanGestureHandler.js +24 -33
  22. package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
  23. package/lib/commonjs/web/handlers/TapGestureHandler.js +15 -17
  24. package/lib/commonjs/web/handlers/TapGestureHandler.js.map +1 -1
  25. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +1 -1
  26. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  27. package/lib/commonjs/web/tools/PointerEventManager.js +1 -1
  28. package/lib/commonjs/web/tools/PointerEventManager.js.map +1 -1
  29. package/lib/commonjs/web/tools/PointerTracker.js +12 -11
  30. package/lib/commonjs/web/tools/PointerTracker.js.map +1 -1
  31. package/lib/commonjs/web/tools/Vector.js +1 -1
  32. package/lib/commonjs/web/tools/Vector.js.map +1 -1
  33. package/lib/module/components/Pressable/Pressable.js +141 -190
  34. package/lib/module/components/Pressable/Pressable.js.map +1 -1
  35. package/lib/module/components/Pressable/StateMachine.js +34 -0
  36. package/lib/module/components/Pressable/StateMachine.js.map +1 -0
  37. package/lib/module/components/Pressable/stateDefinitions.js +83 -0
  38. package/lib/module/components/Pressable/stateDefinitions.js.map +1 -0
  39. package/lib/module/components/Pressable/utils.js +1 -1
  40. package/lib/module/components/Pressable/utils.js.map +1 -1
  41. package/lib/module/handlers/gestures/forceTouchGesture.js +13 -0
  42. package/lib/module/handlers/gestures/forceTouchGesture.js.map +1 -1
  43. package/lib/module/handlers/gestures/gestureObjects.js +3 -1
  44. package/lib/module/handlers/gestures/gestureObjects.js.map +1 -1
  45. package/lib/module/web/detectors/RotationGestureDetector.js +3 -0
  46. package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -1
  47. package/lib/module/web/handlers/FlingGestureHandler.js +3 -0
  48. package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
  49. package/lib/module/web/handlers/GestureHandler.js +6 -6
  50. package/lib/module/web/handlers/GestureHandler.js.map +1 -1
  51. package/lib/module/web/handlers/PanGestureHandler.js +24 -33
  52. package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
  53. package/lib/module/web/handlers/TapGestureHandler.js +15 -17
  54. package/lib/module/web/handlers/TapGestureHandler.js.map +1 -1
  55. package/lib/module/web/tools/GestureHandlerOrchestrator.js +1 -1
  56. package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  57. package/lib/module/web/tools/PointerEventManager.js +1 -1
  58. package/lib/module/web/tools/PointerEventManager.js.map +1 -1
  59. package/lib/module/web/tools/PointerTracker.js +12 -11
  60. package/lib/module/web/tools/PointerTracker.js.map +1 -1
  61. package/lib/module/web/tools/Vector.js +1 -1
  62. package/lib/module/web/tools/Vector.js.map +1 -1
  63. package/lib/typescript/ActionType.d.ts +0 -1
  64. package/lib/typescript/ActionType.js +6 -0
  65. package/lib/typescript/Directions.d.ts +0 -1
  66. package/lib/typescript/Directions.js +18 -0
  67. package/lib/typescript/EnableNewWebImplementation.d.ts +0 -1
  68. package/lib/typescript/EnableNewWebImplementation.js +30 -0
  69. package/lib/typescript/GestureHandlerRootViewContext.d.ts +0 -1
  70. package/lib/typescript/GestureHandlerRootViewContext.js +2 -0
  71. package/lib/typescript/PlatformConstants.d.ts +0 -1
  72. package/lib/typescript/PlatformConstants.js +3 -0
  73. package/lib/typescript/PlatformConstants.web.d.ts +0 -1
  74. package/lib/typescript/PlatformConstants.web.js +5 -0
  75. package/lib/typescript/PointerType.d.ts +0 -1
  76. package/lib/typescript/PointerType.js +8 -0
  77. package/lib/typescript/RNGestureHandlerModule.d.ts +0 -1
  78. package/lib/typescript/RNGestureHandlerModule.js +4 -0
  79. package/lib/typescript/RNGestureHandlerModule.web.d.ts +0 -1
  80. package/lib/typescript/RNGestureHandlerModule.web.js +92 -0
  81. package/lib/typescript/RNGestureHandlerModule.windows.d.ts +0 -1
  82. package/lib/typescript/RNGestureHandlerModule.windows.js +47 -0
  83. package/lib/typescript/RNRenderer.d.ts +0 -1
  84. package/lib/typescript/RNRenderer.js +3 -0
  85. package/lib/typescript/RNRenderer.web.d.ts +0 -1
  86. package/lib/typescript/RNRenderer.web.js +3 -0
  87. package/lib/typescript/State.d.ts +0 -1
  88. package/lib/typescript/State.js +9 -0
  89. package/lib/typescript/TouchEventType.d.ts +0 -1
  90. package/lib/typescript/TouchEventType.js +7 -0
  91. package/lib/typescript/components/DrawerLayout.d.ts +0 -1
  92. package/lib/typescript/components/DrawerLayout.js +417 -0
  93. package/lib/typescript/components/GestureButtons.d.ts +0 -1
  94. package/lib/typescript/components/GestureButtons.js +165 -0
  95. package/lib/typescript/components/GestureButtonsProps.d.ts +0 -1
  96. package/lib/typescript/components/GestureButtonsProps.js +1 -0
  97. package/lib/typescript/components/GestureComponents.d.ts +0 -1
  98. package/lib/typescript/components/GestureComponents.js +67 -0
  99. package/lib/typescript/components/GestureComponents.web.d.ts +0 -1
  100. package/lib/typescript/components/GestureComponents.web.js +21 -0
  101. package/lib/typescript/components/GestureHandlerButton.d.ts +0 -1
  102. package/lib/typescript/components/GestureHandlerButton.js +2 -0
  103. package/lib/typescript/components/GestureHandlerButton.web.d.ts +0 -1
  104. package/lib/typescript/components/GestureHandlerButton.web.js +3 -0
  105. package/lib/typescript/components/GestureHandlerRootView.android.d.ts +0 -1
  106. package/lib/typescript/components/GestureHandlerRootView.android.js +17 -0
  107. package/lib/typescript/components/GestureHandlerRootView.d.ts +0 -1
  108. package/lib/typescript/components/GestureHandlerRootView.js +16 -0
  109. package/lib/typescript/components/GestureHandlerRootView.web.d.ts +0 -1
  110. package/lib/typescript/components/GestureHandlerRootView.web.js +11 -0
  111. package/lib/typescript/components/Pressable/Pressable.d.ts +1 -3
  112. package/lib/typescript/components/Pressable/Pressable.d.ts.map +1 -1
  113. package/lib/typescript/components/Pressable/Pressable.js +231 -0
  114. package/lib/typescript/components/Pressable/PressableProps.d.ts +15 -2
  115. package/lib/typescript/components/Pressable/PressableProps.d.ts.map +1 -1
  116. package/lib/typescript/components/Pressable/PressableProps.js +1 -0
  117. package/lib/typescript/components/Pressable/StateMachine.d.ts +14 -0
  118. package/lib/typescript/components/Pressable/StateMachine.d.ts.map +1 -0
  119. package/lib/typescript/components/Pressable/StateMachine.js +34 -0
  120. package/lib/typescript/components/Pressable/index.d.ts +0 -1
  121. package/lib/typescript/components/Pressable/index.js +1 -0
  122. package/lib/typescript/components/Pressable/stateDefinitions.d.ts +9 -0
  123. package/lib/typescript/components/Pressable/stateDefinitions.d.ts.map +1 -0
  124. package/lib/typescript/components/Pressable/stateDefinitions.js +104 -0
  125. package/lib/typescript/components/Pressable/utils.d.ts +3 -7
  126. package/lib/typescript/components/Pressable/utils.d.ts.map +1 -1
  127. package/lib/typescript/components/Pressable/utils.js +80 -0
  128. package/lib/typescript/components/ReanimatedDrawerLayout.d.ts +0 -1
  129. package/lib/typescript/components/ReanimatedDrawerLayout.js +364 -0
  130. package/lib/typescript/components/ReanimatedSwipeable.d.ts +0 -1
  131. package/lib/typescript/components/ReanimatedSwipeable.js +400 -0
  132. package/lib/typescript/components/Swipeable.d.ts +0 -1
  133. package/lib/typescript/components/Swipeable.js +287 -0
  134. package/lib/typescript/components/Text.d.ts +0 -1
  135. package/lib/typescript/components/Text.js +38 -0
  136. package/lib/typescript/components/gestureHandlerRootHOC.d.ts +0 -1
  137. package/lib/typescript/components/gestureHandlerRootHOC.js +18 -0
  138. package/lib/typescript/components/touchables/ExtraButtonProps.d.ts +0 -1
  139. package/lib/typescript/components/touchables/ExtraButtonProps.js +1 -0
  140. package/lib/typescript/components/touchables/GenericTouchable.d.ts +0 -1
  141. package/lib/typescript/components/touchables/GenericTouchable.js +221 -0
  142. package/lib/typescript/components/touchables/GenericTouchableProps.d.ts +0 -1
  143. package/lib/typescript/components/touchables/GenericTouchableProps.js +1 -0
  144. package/lib/typescript/components/touchables/TouchableHighlight.d.ts +0 -1
  145. package/lib/typescript/components/touchables/TouchableHighlight.js +75 -0
  146. package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +0 -1
  147. package/lib/typescript/components/touchables/TouchableNativeFeedback.android.js +65 -0
  148. package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +0 -1
  149. package/lib/typescript/components/touchables/TouchableNativeFeedback.js +6 -0
  150. package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +0 -1
  151. package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.js +1 -0
  152. package/lib/typescript/components/touchables/TouchableOpacity.d.ts +0 -1
  153. package/lib/typescript/components/touchables/TouchableOpacity.js +51 -0
  154. package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +0 -1
  155. package/lib/typescript/components/touchables/TouchableWithoutFeedback.js +10 -0
  156. package/lib/typescript/components/touchables/index.d.ts +0 -1
  157. package/lib/typescript/components/touchables/index.js +4 -0
  158. package/lib/typescript/components/utils.d.ts +0 -1
  159. package/lib/typescript/components/utils.js +11 -0
  160. package/lib/typescript/findNodeHandle.d.ts +0 -1
  161. package/lib/typescript/findNodeHandle.js +2 -0
  162. package/lib/typescript/findNodeHandle.web.d.ts +0 -1
  163. package/lib/typescript/findNodeHandle.web.js +31 -0
  164. package/lib/typescript/getShadowNodeFromRef.d.ts +0 -1
  165. package/lib/typescript/getShadowNodeFromRef.js +45 -0
  166. package/lib/typescript/getShadowNodeFromRef.web.d.ts +0 -1
  167. package/lib/typescript/getShadowNodeFromRef.web.js +7 -0
  168. package/lib/typescript/ghQueueMicrotask.d.ts +0 -1
  169. package/lib/typescript/ghQueueMicrotask.js +7 -0
  170. package/lib/typescript/handlers/FlingGestureHandler.d.ts +0 -1
  171. package/lib/typescript/handlers/FlingGestureHandler.js +19 -0
  172. package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +0 -1
  173. package/lib/typescript/handlers/ForceTouchGestureHandler.js +37 -0
  174. package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts +3 -1
  175. package/lib/typescript/handlers/GestureHandlerEventPayload.d.ts.map +1 -1
  176. package/lib/typescript/handlers/GestureHandlerEventPayload.js +1 -0
  177. package/lib/typescript/handlers/LongPressGestureHandler.d.ts +0 -1
  178. package/lib/typescript/handlers/LongPressGestureHandler.js +22 -0
  179. package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +0 -1
  180. package/lib/typescript/handlers/NativeViewGestureHandler.js +20 -0
  181. package/lib/typescript/handlers/PanGestureHandler.d.ts +0 -1
  182. package/lib/typescript/handlers/PanGestureHandler.js +128 -0
  183. package/lib/typescript/handlers/PinchGestureHandler.d.ts +0 -1
  184. package/lib/typescript/handlers/PinchGestureHandler.js +12 -0
  185. package/lib/typescript/handlers/PressabilityDebugView.d.ts +0 -1
  186. package/lib/typescript/handlers/PressabilityDebugView.js +2 -0
  187. package/lib/typescript/handlers/PressabilityDebugView.web.d.ts +0 -1
  188. package/lib/typescript/handlers/PressabilityDebugView.web.js +4 -0
  189. package/lib/typescript/handlers/RotationGestureHandler.d.ts +0 -1
  190. package/lib/typescript/handlers/RotationGestureHandler.js +12 -0
  191. package/lib/typescript/handlers/TapGestureHandler.d.ts +0 -1
  192. package/lib/typescript/handlers/TapGestureHandler.js +26 -0
  193. package/lib/typescript/handlers/createHandler.d.ts +0 -1
  194. package/lib/typescript/handlers/createHandler.js +375 -0
  195. package/lib/typescript/handlers/createNativeWrapper.d.ts +0 -1
  196. package/lib/typescript/handlers/createNativeWrapper.js +67 -0
  197. package/lib/typescript/handlers/customDirectEventTypes.d.ts +0 -1
  198. package/lib/typescript/handlers/customDirectEventTypes.js +2 -0
  199. package/lib/typescript/handlers/customDirectEventTypes.web.d.ts +0 -1
  200. package/lib/typescript/handlers/customDirectEventTypes.web.js +4 -0
  201. package/lib/typescript/handlers/gestureHandlerCommon.d.ts +0 -1
  202. package/lib/typescript/handlers/gestureHandlerCommon.js +42 -0
  203. package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts +9 -1
  204. package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts.map +1 -1
  205. package/lib/typescript/handlers/gestureHandlerTypesCompat.js +1 -0
  206. package/lib/typescript/handlers/gestures/GestureDetector/Wrap.d.ts +0 -1
  207. package/lib/typescript/handlers/gestures/GestureDetector/Wrap.js +22 -0
  208. package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.d.ts +0 -1
  209. package/lib/typescript/handlers/gestures/GestureDetector/Wrap.web.js +24 -0
  210. package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.d.ts +0 -1
  211. package/lib/typescript/handlers/gestures/GestureDetector/attachHandlers.js +55 -0
  212. package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.d.ts +0 -1
  213. package/lib/typescript/handlers/gestures/GestureDetector/dropHandlers.js +12 -0
  214. package/lib/typescript/handlers/gestures/GestureDetector/index.d.ts +0 -1
  215. package/lib/typescript/handlers/gestures/GestureDetector/index.js +114 -0
  216. package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.d.ts +0 -1
  217. package/lib/typescript/handlers/gestures/GestureDetector/needsToReattach.js +18 -0
  218. package/lib/typescript/handlers/gestures/GestureDetector/types.d.ts +0 -1
  219. package/lib/typescript/handlers/gestures/GestureDetector/types.js +1 -0
  220. package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.d.ts +0 -1
  221. package/lib/typescript/handlers/gestures/GestureDetector/updateHandlers.js +54 -0
  222. package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.d.ts +0 -1
  223. package/lib/typescript/handlers/gestures/GestureDetector/useAnimatedGesture.js +137 -0
  224. package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.d.ts +0 -1
  225. package/lib/typescript/handlers/gestures/GestureDetector/useDetectorUpdater.js +48 -0
  226. package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.d.ts +0 -1
  227. package/lib/typescript/handlers/gestures/GestureDetector/useMountReactions.js +35 -0
  228. package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.d.ts +0 -1
  229. package/lib/typescript/handlers/gestures/GestureDetector/useViewRefHandler.js +32 -0
  230. package/lib/typescript/handlers/gestures/GestureDetector/utils.d.ts +0 -1
  231. package/lib/typescript/handlers/gestures/GestureDetector/utils.js +140 -0
  232. package/lib/typescript/handlers/gestures/eventReceiver.d.ts +0 -1
  233. package/lib/typescript/handlers/gestures/eventReceiver.js +105 -0
  234. package/lib/typescript/handlers/gestures/flingGesture.d.ts +0 -1
  235. package/lib/typescript/handlers/gestures/flingGesture.js +27 -0
  236. package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts +9 -1
  237. package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts.map +1 -1
  238. package/lib/typescript/handlers/gestures/forceTouchGesture.js +57 -0
  239. package/lib/typescript/handlers/gestures/gesture.d.ts +0 -1
  240. package/lib/typescript/handlers/gestures/gesture.js +303 -0
  241. package/lib/typescript/handlers/gestures/gestureComposition.d.ts +0 -1
  242. package/lib/typescript/handlers/gestures/gestureComposition.js +78 -0
  243. package/lib/typescript/handlers/gestures/gestureObjects.d.ts +3 -2
  244. package/lib/typescript/handlers/gestures/gestureObjects.d.ts.map +1 -1
  245. package/lib/typescript/handlers/gestures/gestureObjects.js +125 -0
  246. package/lib/typescript/handlers/gestures/gestureStateManager.d.ts +0 -1
  247. package/lib/typescript/handlers/gestures/gestureStateManager.js +60 -0
  248. package/lib/typescript/handlers/gestures/gestureStateManager.web.d.ts +0 -1
  249. package/lib/typescript/handlers/gestures/gestureStateManager.web.js +19 -0
  250. package/lib/typescript/handlers/gestures/hoverGesture.d.ts +0 -1
  251. package/lib/typescript/handlers/gestures/hoverGesture.js +45 -0
  252. package/lib/typescript/handlers/gestures/longPressGesture.d.ts +0 -1
  253. package/lib/typescript/handlers/gestures/longPressGesture.js +35 -0
  254. package/lib/typescript/handlers/gestures/manualGesture.d.ts +0 -1
  255. package/lib/typescript/handlers/gestures/manualGesture.js +16 -0
  256. package/lib/typescript/handlers/gestures/nativeGesture.d.ts +0 -1
  257. package/lib/typescript/handlers/gestures/nativeGesture.js +24 -0
  258. package/lib/typescript/handlers/gestures/panGesture.d.ts +0 -1
  259. package/lib/typescript/handlers/gestures/panGesture.js +181 -0
  260. package/lib/typescript/handlers/gestures/pinchGesture.d.ts +0 -1
  261. package/lib/typescript/handlers/gestures/pinchGesture.js +27 -0
  262. package/lib/typescript/handlers/gestures/reanimatedWrapper.d.ts +0 -1
  263. package/lib/typescript/handlers/gestures/reanimatedWrapper.js +23 -0
  264. package/lib/typescript/handlers/gestures/rotationGesture.d.ts +0 -1
  265. package/lib/typescript/handlers/gestures/rotationGesture.js +27 -0
  266. package/lib/typescript/handlers/gestures/tapGesture.d.ts +0 -1
  267. package/lib/typescript/handlers/gestures/tapGesture.js +72 -0
  268. package/lib/typescript/handlers/getNextHandlerTag.d.ts +0 -1
  269. package/lib/typescript/handlers/getNextHandlerTag.js +4 -0
  270. package/lib/typescript/handlers/handlersRegistry.d.ts +0 -1
  271. package/lib/typescript/handlers/handlersRegistry.js +36 -0
  272. package/lib/typescript/handlers/utils.d.ts +0 -1
  273. package/lib/typescript/handlers/utils.js +58 -0
  274. package/lib/typescript/index.d.ts +0 -1
  275. package/lib/typescript/index.js +28 -0
  276. package/lib/typescript/init.d.ts +0 -1
  277. package/lib/typescript/init.js +15 -0
  278. package/lib/typescript/jestUtils/index.d.ts +0 -1
  279. package/lib/typescript/jestUtils/index.js +1 -0
  280. package/lib/typescript/jestUtils/jestUtils.d.ts +0 -1
  281. package/lib/typescript/jestUtils/jestUtils.js +290 -0
  282. package/lib/typescript/mocks.d.ts +0 -1
  283. package/lib/typescript/mocks.js +59 -0
  284. package/lib/typescript/mountRegistry.d.ts +0 -1
  285. package/lib/typescript/mountRegistry.js +29 -0
  286. package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts +0 -1
  287. package/lib/typescript/specs/NativeRNGestureHandlerModule.js +2 -0
  288. package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.d.ts +0 -1
  289. package/lib/typescript/specs/RNGestureHandlerButtonNativeComponent.js +2 -0
  290. package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.d.ts +0 -1
  291. package/lib/typescript/specs/RNGestureHandlerRootViewNativeComponent.js +2 -0
  292. package/lib/typescript/typeUtils.d.ts +0 -1
  293. package/lib/typescript/typeUtils.js +1 -0
  294. package/lib/typescript/utils.d.ts +0 -1
  295. package/lib/typescript/utils.js +80 -0
  296. package/lib/typescript/web/Gestures.d.ts +0 -1
  297. package/lib/typescript/web/Gestures.js +38 -0
  298. package/lib/typescript/web/constants.d.ts +0 -1
  299. package/lib/typescript/web/constants.js +2 -0
  300. package/lib/typescript/web/detectors/RotationGestureDetector.d.ts +0 -1
  301. package/lib/typescript/web/detectors/RotationGestureDetector.d.ts.map +1 -1
  302. package/lib/typescript/web/detectors/RotationGestureDetector.js +122 -0
  303. package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts +0 -1
  304. package/lib/typescript/web/detectors/ScaleGestureDetector.js +117 -0
  305. package/lib/typescript/web/handlers/FlingGestureHandler.d.ts +0 -1
  306. package/lib/typescript/web/handlers/FlingGestureHandler.d.ts.map +1 -1
  307. package/lib/typescript/web/handlers/FlingGestureHandler.js +133 -0
  308. package/lib/typescript/web/handlers/GestureHandler.d.ts +0 -1
  309. package/lib/typescript/web/handlers/GestureHandler.d.ts.map +1 -1
  310. package/lib/typescript/web/handlers/GestureHandler.js +656 -0
  311. package/lib/typescript/web/handlers/HoverGestureHandler.d.ts +0 -1
  312. package/lib/typescript/web/handlers/HoverGestureHandler.js +37 -0
  313. package/lib/typescript/web/handlers/IGestureHandler.d.ts +0 -1
  314. package/lib/typescript/web/handlers/IGestureHandler.js +1 -0
  315. package/lib/typescript/web/handlers/LongPressGestureHandler.d.ts +0 -1
  316. package/lib/typescript/web/handlers/LongPressGestureHandler.js +136 -0
  317. package/lib/typescript/web/handlers/ManualGestureHandler.d.ts +0 -1
  318. package/lib/typescript/web/handlers/ManualGestureHandler.js +29 -0
  319. package/lib/typescript/web/handlers/NativeViewGestureHandler.d.ts +0 -1
  320. package/lib/typescript/web/handlers/NativeViewGestureHandler.js +133 -0
  321. package/lib/typescript/web/handlers/PanGestureHandler.d.ts +2 -1
  322. package/lib/typescript/web/handlers/PanGestureHandler.d.ts.map +1 -1
  323. package/lib/typescript/web/handlers/PanGestureHandler.js +420 -0
  324. package/lib/typescript/web/handlers/PinchGestureHandler.d.ts +0 -1
  325. package/lib/typescript/web/handlers/PinchGestureHandler.js +117 -0
  326. package/lib/typescript/web/handlers/RotationGestureHandler.d.ts +0 -1
  327. package/lib/typescript/web/handlers/RotationGestureHandler.js +122 -0
  328. package/lib/typescript/web/handlers/TapGestureHandler.d.ts +1 -1
  329. package/lib/typescript/web/handlers/TapGestureHandler.d.ts.map +1 -1
  330. package/lib/typescript/web/handlers/TapGestureHandler.js +202 -0
  331. package/lib/typescript/web/interfaces.d.ts +0 -1
  332. package/lib/typescript/web/interfaces.js +25 -0
  333. package/lib/typescript/web/tools/CircularBuffer.d.ts +0 -1
  334. package/lib/typescript/web/tools/CircularBuffer.js +37 -0
  335. package/lib/typescript/web/tools/EventManager.d.ts +0 -1
  336. package/lib/typescript/web/tools/EventManager.js +85 -0
  337. package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +0 -1
  338. package/lib/typescript/web/tools/GestureHandlerDelegate.js +1 -0
  339. package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts +0 -1
  340. package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts.map +1 -1
  341. package/lib/typescript/web/tools/GestureHandlerOrchestrator.js +273 -0
  342. package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +0 -1
  343. package/lib/typescript/web/tools/GestureHandlerWebDelegate.js +169 -0
  344. package/lib/typescript/web/tools/InteractionManager.d.ts +0 -1
  345. package/lib/typescript/web/tools/InteractionManager.js +91 -0
  346. package/lib/typescript/web/tools/KeyboardEventManager.d.ts +0 -1
  347. package/lib/typescript/web/tools/KeyboardEventManager.js +73 -0
  348. package/lib/typescript/web/tools/LeastSquareSolver.d.ts +0 -1
  349. package/lib/typescript/web/tools/LeastSquareSolver.js +147 -0
  350. package/lib/typescript/web/tools/NodeManager.d.ts +0 -1
  351. package/lib/typescript/web/tools/NodeManager.js +28 -0
  352. package/lib/typescript/web/tools/PointerEventManager.d.ts +0 -1
  353. package/lib/typescript/web/tools/PointerEventManager.js +179 -0
  354. package/lib/typescript/web/tools/PointerTracker.d.ts +3 -4
  355. package/lib/typescript/web/tools/PointerTracker.d.ts.map +1 -1
  356. package/lib/typescript/web/tools/PointerTracker.js +161 -0
  357. package/lib/typescript/web/tools/Vector.d.ts +1 -2
  358. package/lib/typescript/web/tools/Vector.js +43 -0
  359. package/lib/typescript/web/tools/VelocityTracker.d.ts +0 -1
  360. package/lib/typescript/web/tools/VelocityTracker.js +76 -0
  361. package/lib/typescript/web/tools/WheelEventManager.d.ts +0 -1
  362. package/lib/typescript/web/tools/WheelEventManager.js +40 -0
  363. package/lib/typescript/web/utils.d.ts +0 -1
  364. package/lib/typescript/web/utils.js +233 -0
  365. package/lib/typescript/web_hammer/DiscreteGestureHandler.d.ts +0 -1
  366. package/lib/typescript/web_hammer/DiscreteGestureHandler.js +48 -0
  367. package/lib/typescript/web_hammer/DraggingGestureHandler.d.ts +0 -1
  368. package/lib/typescript/web_hammer/DraggingGestureHandler.js +25 -0
  369. package/lib/typescript/web_hammer/Errors.d.ts +0 -1
  370. package/lib/typescript/web_hammer/Errors.js +5 -0
  371. package/lib/typescript/web_hammer/FlingGestureHandler.d.ts +0 -1
  372. package/lib/typescript/web_hammer/FlingGestureHandler.js +119 -0
  373. package/lib/typescript/web_hammer/GestureHandler.d.ts +0 -1
  374. package/lib/typescript/web_hammer/GestureHandler.js +469 -0
  375. package/lib/typescript/web_hammer/IndiscreteGestureHandler.d.ts +0 -1
  376. package/lib/typescript/web_hammer/IndiscreteGestureHandler.js +26 -0
  377. package/lib/typescript/web_hammer/LongPressGestureHandler.d.ts +0 -1
  378. package/lib/typescript/web_hammer/LongPressGestureHandler.js +46 -0
  379. package/lib/typescript/web_hammer/NativeViewGestureHandler.d.ts +0 -1
  380. package/lib/typescript/web_hammer/NativeViewGestureHandler.js +40 -0
  381. package/lib/typescript/web_hammer/NodeManager.d.ts +0 -1
  382. package/lib/typescript/web_hammer/NodeManager.js +28 -0
  383. package/lib/typescript/web_hammer/PanGestureHandler.d.ts +0 -1
  384. package/lib/typescript/web_hammer/PanGestureHandler.js +151 -0
  385. package/lib/typescript/web_hammer/PinchGestureHandler.d.ts +0 -1
  386. package/lib/typescript/web_hammer/PinchGestureHandler.js +19 -0
  387. package/lib/typescript/web_hammer/PressGestureHandler.d.ts +0 -1
  388. package/lib/typescript/web_hammer/PressGestureHandler.js +133 -0
  389. package/lib/typescript/web_hammer/RotationGestureHandler.d.ts +0 -1
  390. package/lib/typescript/web_hammer/RotationGestureHandler.js +20 -0
  391. package/lib/typescript/web_hammer/TapGestureHandler.d.ts +0 -1
  392. package/lib/typescript/web_hammer/TapGestureHandler.js +142 -0
  393. package/lib/typescript/web_hammer/constants.d.ts +0 -1
  394. package/lib/typescript/web_hammer/constants.js +42 -0
  395. package/lib/typescript/web_hammer/utils.d.ts +0 -1
  396. package/lib/typescript/web_hammer/utils.js +15 -0
  397. package/package.json +4 -2
  398. package/src/components/Pressable/Pressable.tsx +357 -445
  399. package/src/components/Pressable/PressableProps.tsx +15 -0
  400. package/src/components/Pressable/StateMachine.tsx +49 -0
  401. package/src/components/Pressable/stateDefinitions.ts +125 -0
  402. package/src/components/Pressable/utils.ts +11 -7
  403. package/src/handlers/GestureHandlerEventPayload.ts +3 -0
  404. package/src/handlers/gestureHandlerTypesCompat.ts +9 -0
  405. package/src/handlers/gestures/forceTouchGesture.ts +9 -0
  406. package/src/handlers/gestures/gestureObjects.ts +3 -1
  407. package/src/web/detectors/RotationGestureDetector.ts +4 -0
  408. package/src/web/handlers/FlingGestureHandler.ts +4 -0
  409. package/src/web/handlers/GestureHandler.ts +9 -3
  410. package/src/web/handlers/PanGestureHandler.ts +25 -36
  411. package/src/web/handlers/TapGestureHandler.ts +14 -19
  412. package/src/web/tools/GestureHandlerOrchestrator.ts +1 -0
  413. package/src/web/tools/PointerEventManager.ts +1 -1
  414. package/src/web/tools/PointerTracker.ts +17 -15
  415. package/src/web/tools/Vector.ts +1 -1
@@ -0,0 +1,45 @@
1
+ // Used by GestureDetector (unsupported on web at the moment) to check whether the
2
+ // attached view may get flattened on Fabric. This implementation causes errors
3
+ // on web due to the static resolution of `require` statements by webpack breaking
4
+ // the conditional importing. Solved by making .web file.
5
+ let findHostInstance_DEPRECATED;
6
+ let getInternalInstanceHandleFromPublicInstance;
7
+ export function getShadowNodeFromRef(ref) {
8
+ // Load findHostInstance_DEPRECATED lazily because it may not be available before render
9
+ if (findHostInstance_DEPRECATED === undefined) {
10
+ try {
11
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
12
+ const ReactFabric = require('react-native/Libraries/Renderer/shims/ReactFabric');
13
+ // Since RN 0.77 ReactFabric exports findHostInstance_DEPRECATED in default object so we're trying to
14
+ // access it first, then fallback on named export
15
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
16
+ findHostInstance_DEPRECATED =
17
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
18
+ ReactFabric?.default?.findHostInstance_DEPRECATED ||
19
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
20
+ ReactFabric?.findHostInstance_DEPRECATED;
21
+ }
22
+ catch (e) {
23
+ findHostInstance_DEPRECATED = (_ref) => null;
24
+ }
25
+ }
26
+ // Load findHostInstance_DEPRECATED lazily because it may not be available before render
27
+ if (getInternalInstanceHandleFromPublicInstance === undefined) {
28
+ try {
29
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
30
+ getInternalInstanceHandleFromPublicInstance =
31
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
32
+ require('react-native/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance')
33
+ .getInternalInstanceHandleFromPublicInstance ??
34
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-return
35
+ ((ref) => ref._internalInstanceHandle);
36
+ }
37
+ catch (e) {
38
+ getInternalInstanceHandleFromPublicInstance = (ref) =>
39
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-return
40
+ ref._internalInstanceHandle;
41
+ }
42
+ }
43
+ // @ts-ignore Fabric
44
+ return getInternalInstanceHandleFromPublicInstance(findHostInstance_DEPRECATED(ref)).stateNode.node;
45
+ }
@@ -1,2 +1 @@
1
1
  export declare function getShadowNodeFromRef(_ref: any): null;
2
- //# sourceMappingURL=getShadowNodeFromRef.web.d.ts.map
@@ -0,0 +1,7 @@
1
+ // Used by GestureDetector (unsupported on web at the moment) to check whether the
2
+ // attached view may get flattened on Fabric. Original implementation causes errors
3
+ // on web due to the static resolution of `require` statements by webpack breaking
4
+ // the conditional importing.
5
+ export function getShadowNodeFromRef(_ref) {
6
+ return null;
7
+ }
@@ -1,2 +1 @@
1
1
  export declare const ghQueueMicrotask: typeof queueMicrotask;
2
- //# sourceMappingURL=ghQueueMicrotask.d.ts.map
@@ -0,0 +1,7 @@
1
+ // We check for typeof requestAnimationFrame because of SSR
2
+ // Functions are bound to null to avoid issues with scope when using Metro inline requires.
3
+ export const ghQueueMicrotask = typeof setImmediate === 'function'
4
+ ? setImmediate.bind(null)
5
+ : typeof requestAnimationFrame === 'function'
6
+ ? requestAnimationFrame.bind(null)
7
+ : queueMicrotask.bind(null);
@@ -36,4 +36,3 @@ export type FlingGestureHandler = typeof FlingGestureHandler;
36
36
  * @deprecated FlingGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Fling()` instead.
37
37
  */
38
38
  export declare const FlingGestureHandler: import("react").ComponentType<FlingGestureHandlerProps & import("react").RefAttributes<any>>;
39
- //# sourceMappingURL=FlingGestureHandler.d.ts.map
@@ -0,0 +1,19 @@
1
+ import createHandler from './createHandler';
2
+ import { baseGestureHandlerProps, } from './gestureHandlerCommon';
3
+ export const flingGestureHandlerProps = [
4
+ 'numberOfPointers',
5
+ 'direction',
6
+ ];
7
+ export const flingHandlerName = 'FlingGestureHandler';
8
+ /**
9
+ * @deprecated FlingGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Fling()` instead.
10
+ */
11
+ // eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
12
+ export const FlingGestureHandler = createHandler({
13
+ name: flingHandlerName,
14
+ allowedProps: [
15
+ ...baseGestureHandlerProps,
16
+ ...flingGestureHandlerProps,
17
+ ],
18
+ config: {},
19
+ });
@@ -42,4 +42,3 @@ export declare const forceTouchHandlerName = "ForceTouchGestureHandler";
42
42
  */
43
43
  export declare const ForceTouchGestureHandler: typeof ForceTouchFallback | React.ComponentType<ForceTouchGestureHandlerProps & React.RefAttributes<any>>;
44
44
  export {};
45
- //# sourceMappingURL=ForceTouchGestureHandler.d.ts.map
@@ -0,0 +1,37 @@
1
+ import React from 'react';
2
+ import { tagMessage } from '../utils';
3
+ import PlatformConstants from '../PlatformConstants';
4
+ import createHandler from './createHandler';
5
+ import { baseGestureHandlerProps, } from './gestureHandlerCommon';
6
+ export const forceTouchGestureHandlerProps = [
7
+ 'minForce',
8
+ 'maxForce',
9
+ 'feedbackOnActivation',
10
+ ];
11
+ // implicit `children` prop has been removed in @types/react^18.0.0
12
+ class ForceTouchFallback extends React.Component {
13
+ static forceTouchAvailable = false;
14
+ componentDidMount() {
15
+ console.warn(tagMessage('ForceTouchGestureHandler is not available on this platform. Please use ForceTouchGestureHandler.forceTouchAvailable to conditionally render other components that would provide a fallback behavior specific to your usecase'));
16
+ }
17
+ render() {
18
+ return this.props.children;
19
+ }
20
+ }
21
+ export const forceTouchHandlerName = 'ForceTouchGestureHandler';
22
+ /**
23
+ * @deprecated ForceTouchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.ForceTouch()` instead.
24
+ */
25
+ // eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
26
+ export const ForceTouchGestureHandler = PlatformConstants?.forceTouchAvailable
27
+ ? createHandler({
28
+ name: forceTouchHandlerName,
29
+ allowedProps: [
30
+ ...baseGestureHandlerProps,
31
+ ...forceTouchGestureHandlerProps,
32
+ ],
33
+ config: {},
34
+ })
35
+ : ForceTouchFallback;
36
+ ForceTouchGestureHandler.forceTouchAvailable =
37
+ PlatformConstants?.forceTouchAvailable || false;
@@ -5,6 +5,9 @@ export type FlingGestureHandlerEventPayload = {
5
5
  absoluteX: number;
6
6
  absoluteY: number;
7
7
  };
8
+ /**
9
+ * @deprecated ForceTouch gesture is deprecated and will be removed in the future.
10
+ */
8
11
  export type ForceTouchGestureHandlerEventPayload = {
9
12
  x: number;
10
13
  y: number;
@@ -192,4 +195,3 @@ export type HoverGestureHandlerEventPayload = {
192
195
  */
193
196
  stylusData?: StylusData;
194
197
  };
195
- //# sourceMappingURL=GestureHandlerEventPayload.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GestureHandlerEventPayload.d.ts","sourceRoot":"","sources":["../../../src/handlers/GestureHandlerEventPayload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,MAAM,+BAA+B,GAAG;IAC5C,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,oCAAoC,GAAG;IACjD,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,mCAAmC,GAAG;IAChD;;;;OAIG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;;OAIG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;;;OAIG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;;OAIG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG;IAC/C;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;;OAGG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;OAGG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC"}
1
+ {"version":3,"file":"GestureHandlerEventPayload.d.ts","sourceRoot":"","sources":["../../../src/handlers/GestureHandlerEventPayload.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/C,MAAM,MAAM,+BAA+B,GAAG;IAC5C,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,oCAAoC,GAAG;IACjD,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,mCAAmC,GAAG;IAChD;;;;OAIG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;;OAIG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;OAEG;IACH,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;;;OAIG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;;OAIG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,kCAAkC,GAAG;IAC/C;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;OAGG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG;IAC5C;;;OAGG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;OAGG;IACH,CAAC,EAAE,MAAM,CAAC;IAEV;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC"}
@@ -33,4 +33,3 @@ export type LongPressGestureHandler = typeof LongPressGestureHandler;
33
33
  * @deprecated LongPressGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.LongPress()` instead.
34
34
  */
35
35
  export declare const LongPressGestureHandler: import("react").ComponentType<LongPressGestureHandlerProps & import("react").RefAttributes<any>>;
36
- //# sourceMappingURL=LongPressGestureHandler.d.ts.map
@@ -0,0 +1,22 @@
1
+ import createHandler from './createHandler';
2
+ import { baseGestureHandlerProps, } from './gestureHandlerCommon';
3
+ export const longPressGestureHandlerProps = [
4
+ 'minDurationMs',
5
+ 'maxDist',
6
+ 'numberOfPointers',
7
+ ];
8
+ export const longPressHandlerName = 'LongPressGestureHandler';
9
+ /**
10
+ * @deprecated LongPressGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.LongPress()` instead.
11
+ */
12
+ // eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
13
+ export const LongPressGestureHandler = createHandler({
14
+ name: longPressHandlerName,
15
+ allowedProps: [
16
+ ...baseGestureHandlerProps,
17
+ ...longPressGestureHandlerProps,
18
+ ],
19
+ config: {
20
+ shouldCancelWhenOutside: true,
21
+ },
22
+ });
@@ -30,4 +30,3 @@ export type NativeViewGestureHandler = typeof NativeViewGestureHandler;
30
30
  * @deprecated NativeViewGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Native()` instead.
31
31
  */
32
32
  export declare const NativeViewGestureHandler: import("react").ComponentType<NativeViewGestureHandlerProps & import("react").RefAttributes<any>>;
33
- //# sourceMappingURL=NativeViewGestureHandler.d.ts.map
@@ -0,0 +1,20 @@
1
+ import createHandler from './createHandler';
2
+ import { baseGestureHandlerProps, } from './gestureHandlerCommon';
3
+ export const nativeViewGestureHandlerProps = [
4
+ 'shouldActivateOnStart',
5
+ 'disallowInterruption',
6
+ ];
7
+ export const nativeViewProps = [
8
+ ...baseGestureHandlerProps,
9
+ ...nativeViewGestureHandlerProps,
10
+ ];
11
+ export const nativeViewHandlerName = 'NativeViewGestureHandler';
12
+ /**
13
+ * @deprecated NativeViewGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Native()` instead.
14
+ */
15
+ // eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
16
+ export const NativeViewGestureHandler = createHandler({
17
+ name: nativeViewHandlerName,
18
+ allowedProps: nativeViewProps,
19
+ config: {},
20
+ });
@@ -97,4 +97,3 @@ export type PanGestureHandler = typeof PanGestureHandler;
97
97
  export declare const PanGestureHandler: import("react").ComponentType<PanGestureHandlerProps & import("react").RefAttributes<any>>;
98
98
  export declare function managePanProps(props: PanGestureHandlerProps): PanGestureHandlerProps & Partial<Record<"failOffsetXStart" | "failOffsetYStart" | "failOffsetXEnd" | "failOffsetYEnd" | "activeOffsetXStart" | "activeOffsetXEnd" | "activeOffsetYStart" | "activeOffsetYEnd", number>>;
99
99
  export {};
100
- //# sourceMappingURL=PanGestureHandler.d.ts.map
@@ -0,0 +1,128 @@
1
+ import createHandler from './createHandler';
2
+ import { baseGestureHandlerProps, } from './gestureHandlerCommon';
3
+ export const panGestureHandlerProps = [
4
+ 'activeOffsetY',
5
+ 'activeOffsetX',
6
+ 'failOffsetY',
7
+ 'failOffsetX',
8
+ 'minDist',
9
+ 'minVelocity',
10
+ 'minVelocityX',
11
+ 'minVelocityY',
12
+ 'minPointers',
13
+ 'maxPointers',
14
+ 'avgTouches',
15
+ 'enableTrackpadTwoFingerGesture',
16
+ 'activateAfterLongPress',
17
+ ];
18
+ export const panGestureHandlerCustomNativeProps = [
19
+ 'activeOffsetYStart',
20
+ 'activeOffsetYEnd',
21
+ 'activeOffsetXStart',
22
+ 'activeOffsetXEnd',
23
+ 'failOffsetYStart',
24
+ 'failOffsetYEnd',
25
+ 'failOffsetXStart',
26
+ 'failOffsetXEnd',
27
+ ];
28
+ export const panHandlerName = 'PanGestureHandler';
29
+ /**
30
+ * @deprecated PanGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pan()` instead.
31
+ */
32
+ // eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
33
+ export const PanGestureHandler = createHandler({
34
+ name: panHandlerName,
35
+ allowedProps: [
36
+ ...baseGestureHandlerProps,
37
+ ...panGestureHandlerProps,
38
+ ],
39
+ config: {},
40
+ transformProps: managePanProps,
41
+ customNativeProps: panGestureHandlerCustomNativeProps,
42
+ });
43
+ function validatePanGestureHandlerProps(props) {
44
+ if (Array.isArray(props.activeOffsetX) &&
45
+ (props.activeOffsetX[0] > 0 || props.activeOffsetX[1] < 0)) {
46
+ throw new Error(`First element of activeOffsetX should be negative, a the second one should be positive`);
47
+ }
48
+ if (Array.isArray(props.activeOffsetY) &&
49
+ (props.activeOffsetY[0] > 0 || props.activeOffsetY[1] < 0)) {
50
+ throw new Error(`First element of activeOffsetY should be negative, a the second one should be positive`);
51
+ }
52
+ if (Array.isArray(props.failOffsetX) &&
53
+ (props.failOffsetX[0] > 0 || props.failOffsetX[1] < 0)) {
54
+ throw new Error(`First element of failOffsetX should be negative, a the second one should be positive`);
55
+ }
56
+ if (Array.isArray(props.failOffsetY) &&
57
+ (props.failOffsetY[0] > 0 || props.failOffsetY[1] < 0)) {
58
+ throw new Error(`First element of failOffsetY should be negative, a the second one should be positive`);
59
+ }
60
+ if (props.minDist && (props.failOffsetX || props.failOffsetY)) {
61
+ throw new Error(`It is not supported to use minDist with failOffsetX or failOffsetY, use activeOffsetX and activeOffsetY instead`);
62
+ }
63
+ if (props.minDist && (props.activeOffsetX || props.activeOffsetY)) {
64
+ throw new Error(`It is not supported to use minDist with activeOffsetX or activeOffsetY`);
65
+ }
66
+ }
67
+ function transformPanGestureHandlerProps(props) {
68
+ const res = { ...props };
69
+ if (props.activeOffsetX !== undefined) {
70
+ delete res.activeOffsetX;
71
+ if (Array.isArray(props.activeOffsetX)) {
72
+ res.activeOffsetXStart = props.activeOffsetX[0];
73
+ res.activeOffsetXEnd = props.activeOffsetX[1];
74
+ }
75
+ else if (props.activeOffsetX < 0) {
76
+ res.activeOffsetXStart = props.activeOffsetX;
77
+ }
78
+ else {
79
+ res.activeOffsetXEnd = props.activeOffsetX;
80
+ }
81
+ }
82
+ if (props.activeOffsetY !== undefined) {
83
+ delete res.activeOffsetY;
84
+ if (Array.isArray(props.activeOffsetY)) {
85
+ res.activeOffsetYStart = props.activeOffsetY[0];
86
+ res.activeOffsetYEnd = props.activeOffsetY[1];
87
+ }
88
+ else if (props.activeOffsetY < 0) {
89
+ res.activeOffsetYStart = props.activeOffsetY;
90
+ }
91
+ else {
92
+ res.activeOffsetYEnd = props.activeOffsetY;
93
+ }
94
+ }
95
+ if (props.failOffsetX !== undefined) {
96
+ delete res.failOffsetX;
97
+ if (Array.isArray(props.failOffsetX)) {
98
+ res.failOffsetXStart = props.failOffsetX[0];
99
+ res.failOffsetXEnd = props.failOffsetX[1];
100
+ }
101
+ else if (props.failOffsetX < 0) {
102
+ res.failOffsetXStart = props.failOffsetX;
103
+ }
104
+ else {
105
+ res.failOffsetXEnd = props.failOffsetX;
106
+ }
107
+ }
108
+ if (props.failOffsetY !== undefined) {
109
+ delete res.failOffsetY;
110
+ if (Array.isArray(props.failOffsetY)) {
111
+ res.failOffsetYStart = props.failOffsetY[0];
112
+ res.failOffsetYEnd = props.failOffsetY[1];
113
+ }
114
+ else if (props.failOffsetY < 0) {
115
+ res.failOffsetYStart = props.failOffsetY;
116
+ }
117
+ else {
118
+ res.failOffsetYEnd = props.failOffsetY;
119
+ }
120
+ }
121
+ return res;
122
+ }
123
+ export function managePanProps(props) {
124
+ if (__DEV__) {
125
+ validatePanGestureHandlerProps(props);
126
+ }
127
+ return transformPanGestureHandlerProps(props);
128
+ }
@@ -14,4 +14,3 @@ export type PinchGestureHandler = typeof PinchGestureHandler;
14
14
  * @deprecated PinchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pinch()` instead.
15
15
  */
16
16
  export declare const PinchGestureHandler: import("react").ComponentType<PinchGestureHandlerProps & import("react").RefAttributes<any>>;
17
- //# sourceMappingURL=PinchGestureHandler.d.ts.map
@@ -0,0 +1,12 @@
1
+ import createHandler from './createHandler';
2
+ import { baseGestureHandlerProps, } from './gestureHandlerCommon';
3
+ export const pinchHandlerName = 'PinchGestureHandler';
4
+ /**
5
+ * @deprecated PinchGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Pinch()` instead.
6
+ */
7
+ // eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
8
+ export const PinchGestureHandler = createHandler({
9
+ name: pinchHandlerName,
10
+ allowedProps: baseGestureHandlerProps,
11
+ config: {},
12
+ });
@@ -1,2 +1 @@
1
1
  export { PressabilityDebugView } from 'react-native/Libraries/Pressability/PressabilityDebug';
2
- //# sourceMappingURL=PressabilityDebugView.d.ts.map
@@ -0,0 +1,2 @@
1
+ // @ts-ignore it's not exported so we need to import it from path
2
+ export { PressabilityDebugView } from 'react-native/Libraries/Pressability/PressabilityDebug';
@@ -1,2 +1 @@
1
1
  export declare function PressabilityDebugView(): null;
2
- //# sourceMappingURL=PressabilityDebugView.web.d.ts.map
@@ -0,0 +1,4 @@
1
+ // PressabilityDebugView is not implemented in react-native-web
2
+ export function PressabilityDebugView() {
3
+ return null;
4
+ }
@@ -14,4 +14,3 @@ export type RotationGestureHandler = typeof RotationGestureHandler;
14
14
  * @deprecated RotationGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Rotation()` instead.
15
15
  */
16
16
  export declare const RotationGestureHandler: import("react").ComponentType<RotationGestureHandlerProps & import("react").RefAttributes<any>>;
17
- //# sourceMappingURL=RotationGestureHandler.d.ts.map
@@ -0,0 +1,12 @@
1
+ import createHandler from './createHandler';
2
+ import { baseGestureHandlerProps, } from './gestureHandlerCommon';
3
+ export const rotationHandlerName = 'RotationGestureHandler';
4
+ /**
5
+ * @deprecated RotationGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Rotation()` instead.
6
+ */
7
+ // eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
8
+ export const RotationGestureHandler = createHandler({
9
+ name: rotationHandlerName,
10
+ allowedProps: baseGestureHandlerProps,
11
+ config: {},
12
+ });
@@ -59,4 +59,3 @@ export type TapGestureHandler = typeof TapGestureHandler;
59
59
  * @deprecated TapGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Tap()` instead.
60
60
  */
61
61
  export declare const TapGestureHandler: import("react").ComponentType<TapGestureHandlerProps & import("react").RefAttributes<any>>;
62
- //# sourceMappingURL=TapGestureHandler.d.ts.map
@@ -0,0 +1,26 @@
1
+ import createHandler from './createHandler';
2
+ import { baseGestureHandlerProps, } from './gestureHandlerCommon';
3
+ export const tapGestureHandlerProps = [
4
+ 'maxDurationMs',
5
+ 'maxDelayMs',
6
+ 'numberOfTaps',
7
+ 'maxDeltaX',
8
+ 'maxDeltaY',
9
+ 'maxDist',
10
+ 'minPointers',
11
+ ];
12
+ export const tapHandlerName = 'TapGestureHandler';
13
+ /**
14
+ * @deprecated TapGestureHandler will be removed in the future version of Gesture Handler. Use `Gesture.Tap()` instead.
15
+ */
16
+ // eslint-disable-next-line @typescript-eslint/no-redeclare -- backward compatibility; see description on the top of gestureHandlerCommon.ts file
17
+ export const TapGestureHandler = createHandler({
18
+ name: tapHandlerName,
19
+ allowedProps: [
20
+ ...baseGestureHandlerProps,
21
+ ...tapGestureHandlerProps,
22
+ ],
23
+ config: {
24
+ shouldCancelWhenOutside: true,
25
+ },
26
+ });
@@ -9,4 +9,3 @@ type CreateHandlerArgs<HandlerPropsT extends Record<string, unknown>> = Readonly
9
9
  }>;
10
10
  export default function createHandler<T extends BaseGestureHandlerProps<U>, U extends Record<string, unknown>>({ name, allowedProps, config, transformProps, customNativeProps, }: CreateHandlerArgs<T>): React.ComponentType<T & React.RefAttributes<any>>;
11
11
  export {};
12
- //# sourceMappingURL=createHandler.d.ts.map