react-native-gesture-handler 2.13.4 → 2.14.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 (158) hide show
  1. package/android/build.gradle +3 -2
  2. package/android/gradle.properties +2 -2
  3. package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt +36 -72
  4. package/android/src/main/java/com/swmansion/gesturehandler/react/Extensions.kt +1 -1
  5. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEvent.kt +12 -14
  6. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerInteractionManager.kt +8 -1
  7. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt +34 -88
  8. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootView.kt +1 -1
  9. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerStateChangeEvent.kt +18 -12
  10. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/FlingGestureHandlerEventDataBuilder.kt +30 -0
  11. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/GestureHandlerEventDataBuilder.kt +22 -0
  12. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/HoverGestureHandlerEventDataBuilder.kt +30 -0
  13. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/LongPressGestureHandlerEventDataBuilder.kt +33 -0
  14. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/ManualGestureHandlerEventDataBuilder.kt +5 -0
  15. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/NativeGestureHandlerEventDataBuilder.kt +18 -0
  16. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/PanGestureHandlerEventDataBuilder.kt +42 -0
  17. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/PinchGestureHandlerEventDataBuilder.kt +30 -0
  18. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/RotationGestureHandlerEventDataBuilder.kt +30 -0
  19. package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/TapGestureHandlerEventDataBuilder.kt +30 -0
  20. package/android/src/main/jni/CMakeLists.txt +14 -2
  21. package/ios/Handlers/RNHoverHandler.m +15 -14
  22. package/ios/RNGestureHandler.m +11 -0
  23. package/ios/RNGestureHandlerButtonComponentView.mm +2 -0
  24. package/lib/commonjs/components/gestureHandlerRootHOC.js.map +1 -1
  25. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +1 -1
  26. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  27. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  28. package/lib/commonjs/getReactNativeVersion.js +22 -0
  29. package/lib/commonjs/getReactNativeVersion.js.map +1 -0
  30. package/lib/commonjs/getReactNativeVersion.web.js +11 -0
  31. package/lib/commonjs/getReactNativeVersion.web.js.map +1 -0
  32. package/lib/commonjs/handlers/gestureHandlerCommon.js +1 -1
  33. package/lib/commonjs/handlers/gestureHandlerCommon.js.map +1 -1
  34. package/lib/commonjs/handlers/gestures/GestureDetector.js +13 -3
  35. package/lib/commonjs/handlers/gestures/GestureDetector.js.map +1 -1
  36. package/lib/commonjs/handlers/gestures/gesture.js +8 -0
  37. package/lib/commonjs/handlers/gestures/gesture.js.map +1 -1
  38. package/lib/commonjs/handlers/gestures/gestureStateManager.js +39 -37
  39. package/lib/commonjs/handlers/gestures/gestureStateManager.js.map +1 -1
  40. package/lib/commonjs/utils.js +0 -13
  41. package/lib/commonjs/utils.js.map +1 -1
  42. package/lib/commonjs/web/handlers/FlingGestureHandler.js +4 -6
  43. package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -1
  44. package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
  45. package/lib/commonjs/web/interfaces.js.map +1 -1
  46. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +4 -15
  47. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  48. package/lib/commonjs/web/tools/InteractionManager.js +27 -29
  49. package/lib/commonjs/web/tools/InteractionManager.js.map +1 -1
  50. package/lib/commonjs/web/tools/PointerEventManager.js +13 -3
  51. package/lib/commonjs/web/tools/PointerEventManager.js.map +1 -1
  52. package/lib/module/components/gestureHandlerRootHOC.js.map +1 -1
  53. package/lib/module/components/touchables/TouchableNativeFeedback.android.js +1 -1
  54. package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  55. package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  56. package/lib/module/getReactNativeVersion.js +10 -0
  57. package/lib/module/getReactNativeVersion.js.map +1 -0
  58. package/lib/module/getReactNativeVersion.web.js +4 -0
  59. package/lib/module/getReactNativeVersion.web.js.map +1 -0
  60. package/lib/module/handlers/gestureHandlerCommon.js +1 -1
  61. package/lib/module/handlers/gestureHandlerCommon.js.map +1 -1
  62. package/lib/module/handlers/gestures/GestureDetector.js +12 -3
  63. package/lib/module/handlers/gestures/GestureDetector.js.map +1 -1
  64. package/lib/module/handlers/gestures/gesture.js +8 -0
  65. package/lib/module/handlers/gestures/gesture.js.map +1 -1
  66. package/lib/module/handlers/gestures/gestureStateManager.js +44 -42
  67. package/lib/module/handlers/gestures/gestureStateManager.js.map +1 -1
  68. package/lib/module/utils.js +0 -6
  69. package/lib/module/utils.js.map +1 -1
  70. package/lib/module/web/handlers/FlingGestureHandler.js +4 -6
  71. package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
  72. package/lib/module/web/handlers/GestureHandler.js.map +1 -1
  73. package/lib/module/web/interfaces.js.map +1 -1
  74. package/lib/module/web/tools/GestureHandlerOrchestrator.js +4 -15
  75. package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  76. package/lib/module/web/tools/InteractionManager.js +27 -29
  77. package/lib/module/web/tools/InteractionManager.js.map +1 -1
  78. package/lib/module/web/tools/PointerEventManager.js +12 -3
  79. package/lib/module/web/tools/PointerEventManager.js.map +1 -1
  80. package/lib/typescript/ActionType.d.ts +1 -1
  81. package/lib/typescript/Directions.d.ts +1 -1
  82. package/lib/typescript/PlatformConstants.d.ts +1 -1
  83. package/lib/typescript/RNGestureHandlerModule.d.ts +1 -1
  84. package/lib/typescript/State.d.ts +1 -1
  85. package/lib/typescript/TouchEventType.d.ts +1 -1
  86. package/lib/typescript/components/DrawerLayout.d.ts +9 -9
  87. package/lib/typescript/components/GestureButtons.d.ts +3 -3
  88. package/lib/typescript/components/GestureComponents.d.ts +6 -6
  89. package/lib/typescript/components/GestureComponents.web.d.ts +1 -1
  90. package/lib/typescript/components/GestureHandlerRootView.android.d.ts +2 -1
  91. package/lib/typescript/components/GestureHandlerRootView.d.ts +2 -1
  92. package/lib/typescript/components/GestureHandlerRootView.web.d.ts +2 -1
  93. package/lib/typescript/components/Swipeable.d.ts +4 -4
  94. package/lib/typescript/components/gestureHandlerRootHOC.d.ts +1 -1
  95. package/lib/typescript/components/touchables/GenericTouchable.d.ts +4 -3
  96. package/lib/typescript/components/touchables/TouchableHighlight.d.ts +4 -3
  97. package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +7 -6
  98. package/lib/typescript/components/touchables/TouchableOpacity.d.ts +3 -2
  99. package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +1 -1
  100. package/lib/typescript/getReactNativeVersion.d.ts +4 -0
  101. package/lib/typescript/getReactNativeVersion.web.d.ts +1 -0
  102. package/lib/typescript/handlers/FlingGestureHandler.d.ts +2 -2
  103. package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +2 -2
  104. package/lib/typescript/handlers/LongPressGestureHandler.d.ts +2 -2
  105. package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +3 -3
  106. package/lib/typescript/handlers/PanGestureHandler.d.ts +2 -2
  107. package/lib/typescript/handlers/PinchGestureHandler.d.ts +2 -2
  108. package/lib/typescript/handlers/RotationGestureHandler.d.ts +2 -2
  109. package/lib/typescript/handlers/TapGestureHandler.d.ts +2 -2
  110. package/lib/typescript/handlers/createHandler.d.ts +1 -1
  111. package/lib/typescript/handlers/gestureHandlerCommon.d.ts +11 -10
  112. package/lib/typescript/handlers/gestureHandlerTypesCompat.d.ts +32 -32
  113. package/lib/typescript/handlers/gestures/GestureDetector.d.ts +2 -2
  114. package/lib/typescript/handlers/gestures/flingGesture.d.ts +1 -1
  115. package/lib/typescript/handlers/gestures/forceTouchGesture.d.ts +2 -2
  116. package/lib/typescript/handlers/gestures/gesture.d.ts +7 -5
  117. package/lib/typescript/handlers/gestures/gestureComposition.d.ts +4 -4
  118. package/lib/typescript/handlers/gestures/gestureStateManager.d.ts +3 -1
  119. package/lib/typescript/handlers/gestures/hoverGesture.d.ts +3 -3
  120. package/lib/typescript/handlers/gestures/longPressGesture.d.ts +1 -1
  121. package/lib/typescript/handlers/gestures/manualGesture.d.ts +1 -1
  122. package/lib/typescript/handlers/gestures/nativeGesture.d.ts +1 -1
  123. package/lib/typescript/handlers/gestures/panGesture.d.ts +2 -2
  124. package/lib/typescript/handlers/gestures/pinchGesture.d.ts +2 -2
  125. package/lib/typescript/handlers/gestures/rotationGesture.d.ts +2 -2
  126. package/lib/typescript/handlers/gestures/tapGesture.d.ts +1 -1
  127. package/lib/typescript/jestUtils/jestUtils.d.ts +6 -6
  128. package/lib/typescript/typeUtils.d.ts +1 -1
  129. package/lib/typescript/utils.d.ts +1 -5
  130. package/lib/typescript/web/interfaces.d.ts +4 -3
  131. package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts +0 -1
  132. package/lib/typescript/web/tools/InteractionManager.d.ts +2 -1
  133. package/lib/typescript/web_hammer/GestureHandler.d.ts +2 -2
  134. package/package.json +7 -7
  135. package/src/components/gestureHandlerRootHOC.tsx +1 -3
  136. package/src/components/touchables/TouchableNativeFeedback.android.tsx +2 -1
  137. package/src/components/touchables/TouchableWithoutFeedback.tsx +3 -3
  138. package/src/getReactNativeVersion.ts +11 -0
  139. package/src/getReactNativeVersion.web.ts +3 -0
  140. package/src/handlers/gestureHandlerCommon.ts +6 -1
  141. package/src/handlers/gestures/GestureDetector.tsx +9 -6
  142. package/src/handlers/gestures/gesture.ts +9 -1
  143. package/src/handlers/gestures/gestureStateManager.ts +42 -40
  144. package/src/utils.ts +0 -8
  145. package/src/web/handlers/FlingGestureHandler.ts +5 -5
  146. package/src/web/handlers/GestureHandler.ts +1 -1
  147. package/src/web/interfaces.ts +1 -0
  148. package/src/web/tools/GestureHandlerOrchestrator.ts +4 -13
  149. package/src/web/tools/InteractionManager.ts +37 -30
  150. package/src/web/tools/PointerEventManager.ts +14 -3
  151. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerEventDataExtractor.kt +0 -8
  152. /package/android/{src/fabric → fabric/src/main}/java/com/swmansion/gesturehandler/RNGestureHandlerComponentsRegistry.java +0 -0
  153. /package/android/{src/fabric → fabric/src/main}/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +0 -0
  154. /package/android/{src/paper → paper/src/main}/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerDelegate.java +0 -0
  155. /package/android/{src/paper → paper/src/main}/java/com/facebook/react/viewmanagers/RNGestureHandlerButtonManagerInterface.java +0 -0
  156. /package/android/{src/paper → paper/src/main}/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerDelegate.java +0 -0
  157. /package/android/{src/paper → paper/src/main}/java/com/facebook/react/viewmanagers/RNGestureHandlerRootViewManagerInterface.java +0 -0
  158. /package/android/{src/paper → paper/src/main}/java/com/swmansion/gesturehandler/ReactContextExtensions.kt +0 -0
@@ -1,3 +1,3 @@
1
1
  import * as React from 'react';
2
2
  import { StyleProp, ViewStyle } from 'react-native';
3
- export default function gestureHandlerRootHOC<P extends Record<string, unknown>>(Component: React.ComponentType<P>, containerStyles?: StyleProp<ViewStyle>): React.ComponentType<P>;
3
+ export default function gestureHandlerRootHOC<P extends object>(Component: React.ComponentType<P>, containerStyles?: StyleProp<ViewStyle>): React.ComponentType<P>;
@@ -1,3 +1,4 @@
1
+ import * as React from 'react';
1
2
  import { Component } from 'react';
2
3
  import { StyleProp, ViewStyle, TouchableWithoutFeedbackProps, Insets } from 'react-native';
3
4
  import { GestureEvent, HandlerStateChangeEvent } from '../../handlers/gestureHandlerCommon';
@@ -15,7 +16,7 @@ export declare const TOUCHABLE_STATE: {
15
16
  readonly BEGAN: 1;
16
17
  readonly MOVED_OUTSIDE: 2;
17
18
  };
18
- declare type TouchableState = typeof TOUCHABLE_STATE[keyof typeof TOUCHABLE_STATE];
19
+ type TouchableState = typeof TOUCHABLE_STATE[keyof typeof TOUCHABLE_STATE];
19
20
  export interface GenericTouchableProps extends Omit<TouchableWithoutFeedbackProps, 'hitSlop'> {
20
21
  onPress?: () => void;
21
22
  onPressIn?: () => void;
@@ -31,7 +32,7 @@ interface InternalProps {
31
32
  extraButtonProps: TouchableNativeFeedbackExtraProps;
32
33
  onStateChange?: (oldState: TouchableState, newState: TouchableState) => void;
33
34
  }
34
- declare type Timeout = ReturnType<typeof setTimeout> | null | undefined;
35
+ type Timeout = ReturnType<typeof setTimeout> | null | undefined;
35
36
  /**
36
37
  * GenericTouchable is not intented to be used as it is.
37
38
  * Should be treated as a source for the rest of touchables
@@ -62,6 +63,6 @@ export default class GenericTouchable extends Component<GenericTouchableProps &
62
63
  componentWillUnmount(): void;
63
64
  onMoveIn(): void;
64
65
  onMoveOut(): void;
65
- render(): JSX.Element;
66
+ render(): React.JSX.Element;
66
67
  }
67
68
  export {};
@@ -1,3 +1,4 @@
1
+ import * as React from 'react';
1
2
  import { Component } from 'react';
2
3
  import { GenericTouchableProps } from './GenericTouchable';
3
4
  import { TouchableHighlightProps as RNTouchableHighlightProps, ColorValue } from 'react-native';
@@ -9,7 +10,7 @@ interface State {
9
10
  backgroundColor?: ColorValue;
10
11
  };
11
12
  }
12
- export declare type TouchableHighlightProps = RNTouchableHighlightProps & GenericTouchableProps;
13
+ export type TouchableHighlightProps = RNTouchableHighlightProps & GenericTouchableProps;
13
14
  /**
14
15
  * TouchableHighlight follows RN's implementation
15
16
  */
@@ -28,8 +29,8 @@ export default class TouchableHighlight extends Component<TouchableHighlightProp
28
29
  showUnderlay: () => void;
29
30
  hasPressHandler: () => (((event: import("react-native").GestureResponderEvent) => void) & (() => void)) | undefined;
30
31
  hideUnderlay: () => void;
31
- renderChildren(): JSX.Element;
32
+ renderChildren(): React.JSX.Element;
32
33
  onStateChange: (_from: number, to: number) => void;
33
- render(): JSX.Element;
34
+ render(): React.JSX.Element;
34
35
  }
35
36
  export {};
@@ -1,13 +1,14 @@
1
1
  import { TouchableNativeFeedbackProps as RNTouchableNativeFeedbackProps, ColorValue } from 'react-native';
2
+ import * as React from 'react';
2
3
  import { Component } from 'react';
3
4
  import { GenericTouchableProps } from './GenericTouchable';
4
- export declare type TouchableNativeFeedbackExtraProps = {
5
+ export type TouchableNativeFeedbackExtraProps = {
5
6
  borderless?: boolean;
6
7
  rippleColor?: number | null;
7
8
  rippleRadius?: number | null;
8
9
  foreground?: boolean;
9
10
  };
10
- export declare type TouchableNativeFeedbackProps = RNTouchableNativeFeedbackProps & GenericTouchableProps;
11
+ export type TouchableNativeFeedbackProps = RNTouchableNativeFeedbackProps & GenericTouchableProps;
11
12
  /**
12
13
  * TouchableNativeFeedback behaves slightly different than RN's TouchableNativeFeedback.
13
14
  * There's small difference with handling long press ripple since RN's implementation calls
@@ -22,17 +23,17 @@ export default class TouchableNativeFeedback extends Component<TouchableNativeFe
22
23
  };
23
24
  delayLongPress: number;
24
25
  };
25
- static SelectableBackground: (rippleRadius?: number | undefined) => {
26
+ static SelectableBackground: (rippleRadius?: number) => {
26
27
  type: string;
27
28
  attribute: string;
28
29
  rippleRadius: number | undefined;
29
30
  };
30
- static SelectableBackgroundBorderless: (rippleRadius?: number | undefined) => {
31
+ static SelectableBackgroundBorderless: (rippleRadius?: number) => {
31
32
  type: string;
32
33
  attribute: string;
33
34
  rippleRadius: number | undefined;
34
35
  };
35
- static Ripple: (color: ColorValue, borderless: boolean, rippleRadius?: number | undefined) => {
36
+ static Ripple: (color: ColorValue, borderless: boolean, rippleRadius?: number) => {
36
37
  type: string;
37
38
  color: ColorValue;
38
39
  borderless: boolean;
@@ -40,5 +41,5 @@ export default class TouchableNativeFeedback extends Component<TouchableNativeFe
40
41
  };
41
42
  static canUseNativeForeground: () => boolean;
42
43
  getExtraButtonProps(): TouchableNativeFeedbackExtraProps;
43
- render(): JSX.Element;
44
+ render(): React.JSX.Element;
44
45
  }
@@ -1,7 +1,8 @@
1
1
  import { Animated, TouchableOpacityProps as RNTouchableOpacityProps } from 'react-native';
2
2
  import { GenericTouchableProps } from './GenericTouchable';
3
+ import * as React from 'react';
3
4
  import { Component } from 'react';
4
- export declare type TouchableOpacityProps = RNTouchableOpacityProps & GenericTouchableProps & {
5
+ export type TouchableOpacityProps = RNTouchableOpacityProps & GenericTouchableProps & {
5
6
  useNativeAnimations?: boolean;
6
7
  };
7
8
  /**
@@ -20,5 +21,5 @@ export default class TouchableOpacity extends Component<TouchableOpacityProps> {
20
21
  opacity: Animated.Value;
21
22
  setOpacityTo: (value: number, duration: number) => void;
22
23
  onStateChange: (_from: number, to: number) => void;
23
- render(): JSX.Element;
24
+ render(): React.JSX.Element;
24
25
  }
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import GenericTouchable, { GenericTouchableProps } from './GenericTouchable';
3
- export declare type TouchableWithoutFeedbackProps = GenericTouchable;
3
+ export type TouchableWithoutFeedbackProps = GenericTouchableProps;
4
4
  declare const TouchableWithoutFeedback: React.ForwardRefExoticComponent<GenericTouchableProps & {
5
5
  children?: React.ReactNode;
6
6
  } & React.RefAttributes<GenericTouchable>>;
@@ -0,0 +1,4 @@
1
+ export declare function getReactNativeVersion(): {
2
+ major: number;
3
+ minor: number;
4
+ };
@@ -0,0 +1 @@
1
+ export declare function getReactNativeVersion(): void;
@@ -1,6 +1,6 @@
1
1
  import { BaseGestureHandlerProps } from './gestureHandlerCommon';
2
2
  export declare const flingGestureHandlerProps: readonly ["numberOfPointers", "direction"];
3
- export declare type FlingGestureHandlerEventPayload = {
3
+ export type FlingGestureHandlerEventPayload = {
4
4
  x: number;
5
5
  y: number;
6
6
  absoluteX: number;
@@ -30,5 +30,5 @@ export interface FlingGestureConfig {
30
30
  export interface FlingGestureHandlerProps extends BaseGestureHandlerProps<FlingGestureHandlerEventPayload>, FlingGestureConfig {
31
31
  }
32
32
  export declare const flingHandlerName = "FlingGestureHandler";
33
- export declare type FlingGestureHandler = typeof FlingGestureHandler;
33
+ export type FlingGestureHandler = typeof FlingGestureHandler;
34
34
  export declare const FlingGestureHandler: import("react").ComponentType<FlingGestureHandlerProps & import("react").RefAttributes<any>>;
@@ -6,7 +6,7 @@ declare class ForceTouchFallback extends React.Component<PropsWithChildren<unkno
6
6
  componentDidMount(): void;
7
7
  render(): React.ReactNode;
8
8
  }
9
- export declare type ForceTouchGestureHandlerEventPayload = {
9
+ export type ForceTouchGestureHandlerEventPayload = {
10
10
  x: number;
11
11
  y: number;
12
12
  absoluteX: number;
@@ -36,7 +36,7 @@ export interface ForceTouchGestureConfig {
36
36
  }
37
37
  export interface ForceTouchGestureHandlerProps extends BaseGestureHandlerProps<ForceTouchGestureHandlerEventPayload>, ForceTouchGestureConfig {
38
38
  }
39
- export declare type ForceTouchGestureHandler = typeof ForceTouchGestureHandler & {
39
+ export type ForceTouchGestureHandler = typeof ForceTouchGestureHandler & {
40
40
  forceTouchAvailable: boolean;
41
41
  };
42
42
  export declare const forceTouchHandlerName = "ForceTouchGestureHandler";
@@ -1,6 +1,6 @@
1
1
  import { BaseGestureHandlerProps } from './gestureHandlerCommon';
2
2
  export declare const longPressGestureHandlerProps: readonly ["minDurationMs", "maxDist"];
3
- export declare type LongPressGestureHandlerEventPayload = {
3
+ export type LongPressGestureHandlerEventPayload = {
4
4
  /**
5
5
  * X coordinate, expressed in points, of the current position of the pointer
6
6
  * (finger or a leading pointer when there are multiple fingers placed)
@@ -52,5 +52,5 @@ export interface LongPressGestureConfig {
52
52
  export interface LongPressGestureHandlerProps extends BaseGestureHandlerProps<LongPressGestureHandlerEventPayload>, LongPressGestureConfig {
53
53
  }
54
54
  export declare const longPressHandlerName = "LongPressGestureHandler";
55
- export declare type LongPressGestureHandler = typeof LongPressGestureHandler;
55
+ export type LongPressGestureHandler = typeof LongPressGestureHandler;
56
56
  export declare const LongPressGestureHandler: import("react").ComponentType<LongPressGestureHandlerProps & import("react").RefAttributes<any>>;
@@ -16,13 +16,13 @@ export interface NativeViewGestureConfig {
16
16
  }
17
17
  export interface NativeViewGestureHandlerProps extends BaseGestureHandlerProps<NativeViewGestureHandlerPayload>, NativeViewGestureConfig {
18
18
  }
19
- export declare type NativeViewGestureHandlerPayload = {
19
+ export type NativeViewGestureHandlerPayload = {
20
20
  /**
21
21
  * True if gesture was performed inside of containing view, false otherwise.
22
22
  */
23
23
  pointerInside: boolean;
24
24
  };
25
- export declare const nativeViewProps: readonly ["id", "enabled", "shouldCancelWhenOutside", "hitSlop", "cancelsTouchesInView", "userSelect", "activeCursor", "waitFor", "simultaneousHandlers", "onBegan", "onFailed", "onCancelled", "onActivated", "onEnded", "onGestureEvent", "onHandlerStateChange", "shouldActivateOnStart", "disallowInterruption"];
25
+ export declare const nativeViewProps: readonly ["id", "enabled", "shouldCancelWhenOutside", "hitSlop", "cancelsTouchesInView", "userSelect", "activeCursor", "waitFor", "simultaneousHandlers", "blocksHandlers", "onBegan", "onFailed", "onCancelled", "onActivated", "onEnded", "onGestureEvent", "onHandlerStateChange", "shouldActivateOnStart", "disallowInterruption"];
26
26
  export declare const nativeViewHandlerName = "NativeViewGestureHandler";
27
- export declare type NativeViewGestureHandler = typeof NativeViewGestureHandler;
27
+ export type NativeViewGestureHandler = typeof NativeViewGestureHandler;
28
28
  export declare const NativeViewGestureHandler: import("react").ComponentType<NativeViewGestureHandlerProps & import("react").RefAttributes<any>>;
@@ -1,7 +1,7 @@
1
1
  import { BaseGestureHandlerProps } from './gestureHandlerCommon';
2
2
  export declare const panGestureHandlerProps: readonly ["activeOffsetY", "activeOffsetX", "failOffsetY", "failOffsetX", "minDist", "minVelocity", "minVelocityX", "minVelocityY", "minPointers", "maxPointers", "avgTouches", "enableTrackpadTwoFingerGesture", "activateAfterLongPress"];
3
3
  export declare const panGestureHandlerCustomNativeProps: readonly ["activeOffsetYStart", "activeOffsetYEnd", "activeOffsetXStart", "activeOffsetXEnd", "failOffsetYStart", "failOffsetYEnd", "failOffsetXStart", "failOffsetXEnd"];
4
- export declare type PanGestureHandlerEventPayload = {
4
+ export type PanGestureHandlerEventPayload = {
5
5
  /**
6
6
  * X coordinate of the current position of the pointer (finger or a leading
7
7
  * pointer when there are multiple fingers placed) relative to the view
@@ -133,7 +133,7 @@ export interface PanGestureHandlerProps extends BaseGestureHandlerProps<PanGestu
133
133
  failOffsetX?: number | number[];
134
134
  }
135
135
  export declare const panHandlerName = "PanGestureHandler";
136
- export declare type PanGestureHandler = typeof PanGestureHandler;
136
+ export type PanGestureHandler = typeof PanGestureHandler;
137
137
  export declare const PanGestureHandler: import("react").ComponentType<PanGestureHandlerProps & import("react").RefAttributes<any>>;
138
138
  export declare function managePanProps(props: PanGestureHandlerProps): PanGestureHandlerProps & Partial<Record<"activeOffsetXStart" | "activeOffsetXEnd" | "failOffsetXStart" | "failOffsetXEnd" | "activeOffsetYStart" | "activeOffsetYEnd" | "failOffsetYStart" | "failOffsetYEnd", number>>;
139
139
  export {};
@@ -1,5 +1,5 @@
1
1
  import { BaseGestureHandlerProps } from './gestureHandlerCommon';
2
- export declare type PinchGestureHandlerEventPayload = {
2
+ export type PinchGestureHandlerEventPayload = {
3
3
  /**
4
4
  * The scale factor relative to the points of the two touches in screen
5
5
  * coordinates.
@@ -25,5 +25,5 @@ export declare type PinchGestureHandlerEventPayload = {
25
25
  export interface PinchGestureHandlerProps extends BaseGestureHandlerProps<PinchGestureHandlerEventPayload> {
26
26
  }
27
27
  export declare const pinchHandlerName = "PinchGestureHandler";
28
- export declare type PinchGestureHandler = typeof PinchGestureHandler;
28
+ export type PinchGestureHandler = typeof PinchGestureHandler;
29
29
  export declare const PinchGestureHandler: import("react").ComponentType<PinchGestureHandlerProps & import("react").RefAttributes<any>>;
@@ -1,5 +1,5 @@
1
1
  import { BaseGestureHandlerProps } from './gestureHandlerCommon';
2
- export declare type RotationGestureHandlerEventPayload = {
2
+ export type RotationGestureHandlerEventPayload = {
3
3
  /**
4
4
  * Amount rotated, expressed in radians, from the gesture's focal point
5
5
  * (anchor).
@@ -25,5 +25,5 @@ export declare type RotationGestureHandlerEventPayload = {
25
25
  export interface RotationGestureHandlerProps extends BaseGestureHandlerProps<RotationGestureHandlerEventPayload> {
26
26
  }
27
27
  export declare const rotationHandlerName = "RotationGestureHandler";
28
- export declare type RotationGestureHandler = typeof RotationGestureHandler;
28
+ export type RotationGestureHandler = typeof RotationGestureHandler;
29
29
  export declare const RotationGestureHandler: import("react").ComponentType<RotationGestureHandlerProps & import("react").RefAttributes<any>>;
@@ -1,6 +1,6 @@
1
1
  import { BaseGestureHandlerProps } from './gestureHandlerCommon';
2
2
  export declare const tapGestureHandlerProps: readonly ["maxDurationMs", "maxDelayMs", "numberOfTaps", "maxDeltaX", "maxDeltaY", "maxDist", "minPointers"];
3
- export declare type TapGestureHandlerEventPayload = {
3
+ export type TapGestureHandlerEventPayload = {
4
4
  x: number;
5
5
  y: number;
6
6
  absoluteX: number;
@@ -53,5 +53,5 @@ export interface TapGestureConfig {
53
53
  export interface TapGestureHandlerProps extends BaseGestureHandlerProps<TapGestureHandlerEventPayload>, TapGestureConfig {
54
54
  }
55
55
  export declare const tapHandlerName = "TapGestureHandler";
56
- export declare type TapGestureHandler = typeof TapGestureHandler;
56
+ export type TapGestureHandler = typeof TapGestureHandler;
57
57
  export declare const TapGestureHandler: import("react").ComponentType<TapGestureHandlerProps & import("react").RefAttributes<any>>;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { BaseGestureHandlerProps } from './gestureHandlerCommon';
3
- declare type CreateHandlerArgs<HandlerPropsT extends Record<string, unknown>> = Readonly<{
3
+ type CreateHandlerArgs<HandlerPropsT extends Record<string, unknown>> = Readonly<{
4
4
  name: string;
5
5
  allowedProps: Readonly<Extract<keyof HandlerPropsT, string>[]>;
6
6
  config: Readonly<Record<string, unknown>>;
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import { State } from '../State';
3
3
  import { TouchEventType } from '../TouchEventType';
4
4
  import { ValueOf } from '../typeUtils';
5
- export declare const baseGestureHandlerProps: readonly ["id", "enabled", "shouldCancelWhenOutside", "hitSlop", "cancelsTouchesInView", "userSelect", "activeCursor", "waitFor", "simultaneousHandlers", "onBegan", "onFailed", "onCancelled", "onActivated", "onEnded", "onGestureEvent", "onHandlerStateChange"];
5
+ export declare const baseGestureHandlerProps: readonly ["id", "enabled", "shouldCancelWhenOutside", "hitSlop", "cancelsTouchesInView", "userSelect", "activeCursor", "waitFor", "simultaneousHandlers", "blocksHandlers", "onBegan", "onFailed", "onCancelled", "onActivated", "onEnded", "onGestureEvent", "onHandlerStateChange"];
6
6
  export declare const baseGestureHandlerWithMonitorProps: string[];
7
7
  export interface GestureEventPayload {
8
8
  handlerTag: number;
@@ -12,23 +12,23 @@ export interface GestureEventPayload {
12
12
  export interface HandlerStateChangeEventPayload extends GestureEventPayload {
13
13
  oldState: ValueOf<typeof State>;
14
14
  }
15
- export declare type HitSlop = number | Partial<Record<'left' | 'right' | 'top' | 'bottom' | 'vertical' | 'horizontal', number>> | Record<'width' | 'left', number> | Record<'width' | 'right', number> | Record<'height' | 'top', number> | Record<'height' | 'bottom', number>;
16
- export declare type UserSelect = 'none' | 'auto' | 'text';
17
- export declare type ActiveCursor = 'auto' | 'default' | 'none' | 'context-menu' | 'help' | 'pointer' | 'progress' | 'wait' | 'cell' | 'crosshair' | 'text' | 'vertical-text' | 'alias' | 'copy' | 'move' | 'no-drop' | 'not-allowed' | 'grab' | 'grabbing' | 'e-resize' | 'n-resize' | 'ne-resize' | 'nw-resize' | 's-resize' | 'se-resize' | 'sw-resize' | 'w-resize' | 'ew-resize' | 'ns-resize' | 'nesw-resize' | 'nwse-resize' | 'col-resize' | 'row-resize' | 'all-scroll' | 'zoom-in' | 'zoom-out';
15
+ export type HitSlop = number | Partial<Record<'left' | 'right' | 'top' | 'bottom' | 'vertical' | 'horizontal', number>> | Record<'width' | 'left', number> | Record<'width' | 'right', number> | Record<'height' | 'top', number> | Record<'height' | 'bottom', number>;
16
+ export type UserSelect = 'none' | 'auto' | 'text';
17
+ export type ActiveCursor = 'auto' | 'default' | 'none' | 'context-menu' | 'help' | 'pointer' | 'progress' | 'wait' | 'cell' | 'crosshair' | 'text' | 'vertical-text' | 'alias' | 'copy' | 'move' | 'no-drop' | 'not-allowed' | 'grab' | 'grabbing' | 'e-resize' | 'n-resize' | 'ne-resize' | 'nw-resize' | 's-resize' | 'se-resize' | 'sw-resize' | 'w-resize' | 'ew-resize' | 'ns-resize' | 'nesw-resize' | 'nwse-resize' | 'col-resize' | 'row-resize' | 'all-scroll' | 'zoom-in' | 'zoom-out';
18
18
  export interface GestureEvent<ExtraEventPayloadT = Record<string, unknown>> {
19
19
  nativeEvent: Readonly<GestureEventPayload & ExtraEventPayloadT>;
20
20
  }
21
21
  export interface HandlerStateChangeEvent<ExtraEventPayloadT = Record<string, unknown>> {
22
22
  nativeEvent: Readonly<HandlerStateChangeEventPayload & ExtraEventPayloadT>;
23
23
  }
24
- export declare type TouchData = {
24
+ export type TouchData = {
25
25
  id: number;
26
26
  x: number;
27
27
  y: number;
28
28
  absoluteX: number;
29
29
  absoluteY: number;
30
30
  };
31
- export declare type GestureTouchEvent = {
31
+ export type GestureTouchEvent = {
32
32
  handlerTag: number;
33
33
  numberOfTouches: number;
34
34
  state: ValueOf<typeof State>;
@@ -36,19 +36,20 @@ export declare type GestureTouchEvent = {
36
36
  allTouches: TouchData[];
37
37
  changedTouches: TouchData[];
38
38
  };
39
- export declare type GestureUpdateEvent<GestureEventPayloadT = Record<string, unknown>> = GestureEventPayload & GestureEventPayloadT;
40
- export declare type GestureStateChangeEvent<GestureStateChangeEventPayloadT = Record<string, unknown>> = HandlerStateChangeEventPayload & GestureStateChangeEventPayloadT;
41
- export declare type CommonGestureConfig = {
39
+ export type GestureUpdateEvent<GestureEventPayloadT = Record<string, unknown>> = GestureEventPayload & GestureEventPayloadT;
40
+ export type GestureStateChangeEvent<GestureStateChangeEventPayloadT = Record<string, unknown>> = HandlerStateChangeEventPayload & GestureStateChangeEventPayloadT;
41
+ export type CommonGestureConfig = {
42
42
  enabled?: boolean;
43
43
  shouldCancelWhenOutside?: boolean;
44
44
  hitSlop?: HitSlop;
45
45
  userSelect?: UserSelect;
46
46
  activeCursor?: ActiveCursor;
47
47
  };
48
- export declare type BaseGestureHandlerProps<ExtraEventPayloadT extends Record<string, unknown> = Record<string, unknown>> = CommonGestureConfig & {
48
+ export type BaseGestureHandlerProps<ExtraEventPayloadT extends Record<string, unknown> = Record<string, unknown>> = CommonGestureConfig & {
49
49
  id?: string;
50
50
  waitFor?: React.Ref<unknown> | React.Ref<unknown>[];
51
51
  simultaneousHandlers?: React.Ref<unknown> | React.Ref<unknown>[];
52
+ blocksHandlers?: React.Ref<unknown> | React.Ref<unknown>[];
52
53
  testID?: string;
53
54
  cancelsTouchesInView?: boolean;
54
55
  onBegan?: (event: HandlerStateChangeEvent) => void;
@@ -8,35 +8,35 @@ import { PinchGestureHandlerEventPayload, PinchGestureHandlerProps } from './Pin
8
8
  import { RotationGestureHandlerEventPayload, RotationGestureHandlerProps } from './RotationGestureHandler';
9
9
  import { TapGestureHandlerEventPayload, TapGestureHandlerProps } from './TapGestureHandler';
10
10
  import { NativeViewGestureHandlerPayload, NativeViewGestureHandlerProps } from './NativeViewGestureHandler';
11
- export declare type GestureHandlerGestureEventNativeEvent = GestureEventPayload;
12
- export declare type GestureHandlerStateChangeNativeEvent = HandlerStateChangeEventPayload;
13
- export declare type GestureHandlerGestureEvent = GestureEvent;
14
- export declare type GestureHandlerStateChangeEvent = HandlerStateChangeEvent;
15
- export declare type NativeViewGestureHandlerGestureEvent = GestureEvent<NativeViewGestureHandlerPayload>;
16
- export declare type NativeViewGestureHandlerStateChangeEvent = HandlerStateChangeEvent<NativeViewGestureHandlerPayload>;
17
- export declare type TapGestureHandlerGestureEvent = GestureEvent<TapGestureHandlerEventPayload>;
18
- export declare type TapGestureHandlerStateChangeEvent = HandlerStateChangeEvent<TapGestureHandlerEventPayload>;
19
- export declare type ForceTouchGestureHandlerGestureEvent = GestureEvent<ForceTouchGestureHandlerEventPayload>;
20
- export declare type ForceTouchGestureHandlerStateChangeEvent = HandlerStateChangeEvent<ForceTouchGestureHandlerEventPayload>;
21
- export declare type LongPressGestureHandlerGestureEvent = GestureEvent<LongPressGestureHandlerEventPayload>;
22
- export declare type LongPressGestureHandlerStateChangeEvent = HandlerStateChangeEvent<LongPressGestureHandlerEventPayload>;
23
- export declare type PanGestureHandlerGestureEvent = GestureEvent<PanGestureHandlerEventPayload>;
24
- export declare type PanGestureHandlerStateChangeEvent = HandlerStateChangeEvent<PanGestureHandlerEventPayload>;
25
- export declare type PinchGestureHandlerGestureEvent = GestureEvent<PinchGestureHandlerEventPayload>;
26
- export declare type PinchGestureHandlerStateChangeEvent = HandlerStateChangeEvent<PinchGestureHandlerEventPayload>;
27
- export declare type RotationGestureHandlerGestureEvent = GestureEvent<RotationGestureHandlerEventPayload>;
28
- export declare type RotationGestureHandlerStateChangeEvent = HandlerStateChangeEvent<RotationGestureHandlerEventPayload>;
29
- export declare type FlingGestureHandlerGestureEvent = GestureEvent<FlingGestureHandlerEventPayload>;
30
- export declare type FlingGestureHandlerStateChangeEvent = HandlerStateChangeEvent<FlingGestureHandlerEventPayload>;
31
- export declare type NativeViewGestureHandlerProperties = NativeViewGestureHandlerProps;
32
- export declare type TapGestureHandlerProperties = TapGestureHandlerProps;
33
- export declare type LongPressGestureHandlerProperties = LongPressGestureHandlerProps;
34
- export declare type PanGestureHandlerProperties = PanGestureHandlerProps;
35
- export declare type PinchGestureHandlerProperties = PinchGestureHandlerProps;
36
- export declare type RotationGestureHandlerProperties = RotationGestureHandlerProps;
37
- export declare type FlingGestureHandlerProperties = FlingGestureHandlerProps;
38
- export declare type ForceTouchGestureHandlerProperties = ForceTouchGestureHandlerProps;
39
- export declare type RawButtonProperties = RawButtonProps;
40
- export declare type BaseButtonProperties = BaseButtonProps;
41
- export declare type RectButtonProperties = RectButtonProps;
42
- export declare type BorderlessButtonProperties = BorderlessButtonProps;
11
+ export type GestureHandlerGestureEventNativeEvent = GestureEventPayload;
12
+ export type GestureHandlerStateChangeNativeEvent = HandlerStateChangeEventPayload;
13
+ export type GestureHandlerGestureEvent = GestureEvent;
14
+ export type GestureHandlerStateChangeEvent = HandlerStateChangeEvent;
15
+ export type NativeViewGestureHandlerGestureEvent = GestureEvent<NativeViewGestureHandlerPayload>;
16
+ export type NativeViewGestureHandlerStateChangeEvent = HandlerStateChangeEvent<NativeViewGestureHandlerPayload>;
17
+ export type TapGestureHandlerGestureEvent = GestureEvent<TapGestureHandlerEventPayload>;
18
+ export type TapGestureHandlerStateChangeEvent = HandlerStateChangeEvent<TapGestureHandlerEventPayload>;
19
+ export type ForceTouchGestureHandlerGestureEvent = GestureEvent<ForceTouchGestureHandlerEventPayload>;
20
+ export type ForceTouchGestureHandlerStateChangeEvent = HandlerStateChangeEvent<ForceTouchGestureHandlerEventPayload>;
21
+ export type LongPressGestureHandlerGestureEvent = GestureEvent<LongPressGestureHandlerEventPayload>;
22
+ export type LongPressGestureHandlerStateChangeEvent = HandlerStateChangeEvent<LongPressGestureHandlerEventPayload>;
23
+ export type PanGestureHandlerGestureEvent = GestureEvent<PanGestureHandlerEventPayload>;
24
+ export type PanGestureHandlerStateChangeEvent = HandlerStateChangeEvent<PanGestureHandlerEventPayload>;
25
+ export type PinchGestureHandlerGestureEvent = GestureEvent<PinchGestureHandlerEventPayload>;
26
+ export type PinchGestureHandlerStateChangeEvent = HandlerStateChangeEvent<PinchGestureHandlerEventPayload>;
27
+ export type RotationGestureHandlerGestureEvent = GestureEvent<RotationGestureHandlerEventPayload>;
28
+ export type RotationGestureHandlerStateChangeEvent = HandlerStateChangeEvent<RotationGestureHandlerEventPayload>;
29
+ export type FlingGestureHandlerGestureEvent = GestureEvent<FlingGestureHandlerEventPayload>;
30
+ export type FlingGestureHandlerStateChangeEvent = HandlerStateChangeEvent<FlingGestureHandlerEventPayload>;
31
+ export type NativeViewGestureHandlerProperties = NativeViewGestureHandlerProps;
32
+ export type TapGestureHandlerProperties = TapGestureHandlerProps;
33
+ export type LongPressGestureHandlerProperties = LongPressGestureHandlerProps;
34
+ export type PanGestureHandlerProperties = PanGestureHandlerProps;
35
+ export type PinchGestureHandlerProperties = PinchGestureHandlerProps;
36
+ export type RotationGestureHandlerProperties = RotationGestureHandlerProps;
37
+ export type FlingGestureHandlerProperties = FlingGestureHandlerProps;
38
+ export type ForceTouchGestureHandlerProperties = ForceTouchGestureHandlerProps;
39
+ export type RawButtonProperties = RawButtonProps;
40
+ export type BaseButtonProperties = BaseButtonProps;
41
+ export type RectButtonProperties = RectButtonProps;
42
+ export type BorderlessButtonProperties = BorderlessButtonProps;
@@ -3,7 +3,7 @@ import { GestureType, HandlerCallbacks } from './gesture';
3
3
  import { SharedValue } from './reanimatedWrapper';
4
4
  import { UserSelect } from '../gestureHandlerCommon';
5
5
  import { ComposedGesture } from './gestureComposition';
6
- export declare type GestureConfigReference = {
6
+ export type GestureConfigReference = {
7
7
  config: GestureType[];
8
8
  animatedEventHandler: unknown;
9
9
  animatedHandlers: SharedValue<HandlerCallbacks<Record<string, unknown>>[] | null> | null;
@@ -15,5 +15,5 @@ interface GestureDetectorProps {
15
15
  userSelect?: UserSelect;
16
16
  children?: React.ReactNode;
17
17
  }
18
- export declare const GestureDetector: (props: GestureDetectorProps) => JSX.Element;
18
+ export declare const GestureDetector: (props: GestureDetectorProps) => React.JSX.Element;
19
19
  export {};
@@ -6,4 +6,4 @@ export declare class FlingGesture extends BaseGesture<FlingGestureHandlerEventPa
6
6
  numberOfPointers(pointers: number): this;
7
7
  direction(direction: number): this;
8
8
  }
9
- export declare type FlingGestureType = InstanceType<typeof FlingGesture>;
9
+ export type FlingGestureType = InstanceType<typeof FlingGesture>;
@@ -1,7 +1,7 @@
1
1
  import { BaseGestureConfig, ContinousBaseGesture } from './gesture';
2
2
  import { ForceTouchGestureConfig, ForceTouchGestureHandlerEventPayload } from '../ForceTouchGestureHandler';
3
3
  import { GestureUpdateEvent } from '../gestureHandlerCommon';
4
- export declare type ForceTouchGestureChangeEventPayload = {
4
+ export type ForceTouchGestureChangeEventPayload = {
5
5
  forceChange: number;
6
6
  };
7
7
  export declare class ForceTouchGesture extends ContinousBaseGesture<ForceTouchGestureHandlerEventPayload, ForceTouchGestureChangeEventPayload> {
@@ -12,4 +12,4 @@ export declare class ForceTouchGesture extends ContinousBaseGesture<ForceTouchGe
12
12
  feedbackOnActivation(value: boolean): this;
13
13
  onChange(callback: (event: GestureUpdateEvent<GestureUpdateEvent<ForceTouchGestureHandlerEventPayload & ForceTouchGestureChangeEventPayload>>) => void): this;
14
14
  }
15
- export declare type ForceTouchGestureType = InstanceType<typeof ForceTouchGesture>;
15
+ export type ForceTouchGestureType = InstanceType<typeof ForceTouchGesture>;
@@ -8,20 +8,21 @@ import { PinchGestureHandlerEventPayload } from '../PinchGestureHandler';
8
8
  import { RotationGestureHandlerEventPayload } from '../RotationGestureHandler';
9
9
  import { TapGestureHandlerEventPayload } from '../TapGestureHandler';
10
10
  import { NativeViewGestureHandlerPayload } from '../NativeViewGestureHandler';
11
- export declare type GestureType = BaseGesture<Record<string, unknown>> | BaseGesture<Record<string, never>> | BaseGesture<TapGestureHandlerEventPayload> | BaseGesture<PanGestureHandlerEventPayload> | BaseGesture<LongPressGestureHandlerEventPayload> | BaseGesture<RotationGestureHandlerEventPayload> | BaseGesture<PinchGestureHandlerEventPayload> | BaseGesture<FlingGestureHandlerEventPayload> | BaseGesture<ForceTouchGestureHandlerEventPayload> | BaseGesture<NativeViewGestureHandlerPayload>;
12
- export declare type GestureRef = number | GestureType | React.RefObject<GestureType | undefined> | React.RefObject<React.ComponentType | undefined>;
11
+ export type GestureType = BaseGesture<Record<string, unknown>> | BaseGesture<Record<string, never>> | BaseGesture<TapGestureHandlerEventPayload> | BaseGesture<PanGestureHandlerEventPayload> | BaseGesture<LongPressGestureHandlerEventPayload> | BaseGesture<RotationGestureHandlerEventPayload> | BaseGesture<PinchGestureHandlerEventPayload> | BaseGesture<FlingGestureHandlerEventPayload> | BaseGesture<ForceTouchGestureHandlerEventPayload> | BaseGesture<NativeViewGestureHandlerPayload>;
12
+ export type GestureRef = number | GestureType | React.RefObject<GestureType | undefined> | React.RefObject<React.ComponentType | undefined>;
13
13
  export interface BaseGestureConfig extends CommonGestureConfig, Record<string, unknown> {
14
14
  ref?: React.MutableRefObject<GestureType | undefined>;
15
15
  requireToFail?: GestureRef[];
16
16
  simultaneousWith?: GestureRef[];
17
+ blocksHandlers?: GestureRef[];
17
18
  needsPointerData?: boolean;
18
19
  manualActivation?: boolean;
19
20
  runOnJS?: boolean;
20
21
  testId?: string;
21
22
  cancelsTouchesInView?: boolean;
22
23
  }
23
- declare type TouchEventHandlerType = (event: GestureTouchEvent, stateManager: GestureStateManagerType) => void;
24
- export declare type HandlerCallbacks<EventPayloadT extends Record<string, unknown>> = {
24
+ type TouchEventHandlerType = (event: GestureTouchEvent, stateManager: GestureStateManagerType) => void;
25
+ export type HandlerCallbacks<EventPayloadT extends Record<string, unknown>> = {
25
26
  gestureId: number;
26
27
  handlerTag: number;
27
28
  onBegin?: (event: GestureStateChangeEvent<EventPayloadT>) => void;
@@ -50,7 +51,7 @@ export declare const CALLBACK_TYPE: {
50
51
  readonly TOUCHES_UP: 9;
51
52
  readonly TOUCHES_CANCELLED: 10;
52
53
  };
53
- export declare type CALLBACK_TYPE = typeof CALLBACK_TYPE[keyof typeof CALLBACK_TYPE];
54
+ export type CALLBACK_TYPE = typeof CALLBACK_TYPE[keyof typeof CALLBACK_TYPE];
54
55
  export declare abstract class Gesture {
55
56
  /**
56
57
  * Return array of gestures, providing the same interface for creating and updating
@@ -93,6 +94,7 @@ export declare abstract class BaseGesture<EventPayloadT extends Record<string, u
93
94
  runOnJS(runOnJS: boolean): this;
94
95
  simultaneousWithExternalGesture(...gestures: Exclude<GestureRef, number>[]): this;
95
96
  requireExternalGestureToFail(...gestures: Exclude<GestureRef, number>[]): this;
97
+ blocksExternalGesture(...gestures: Exclude<GestureRef, number>[]): this;
96
98
  withTestId(id: string): this;
97
99
  cancelsTouchesInView(value: boolean): this;
98
100
  initialize(): void;
@@ -15,7 +15,7 @@ export declare class SimultaneousGesture extends ComposedGesture {
15
15
  export declare class ExclusiveGesture extends ComposedGesture {
16
16
  prepare(): void;
17
17
  }
18
- export declare type ComposedGestureType = InstanceType<typeof ComposedGesture>;
19
- export declare type RaceGestureType = ComposedGestureType;
20
- export declare type SimultaneousGestureType = InstanceType<typeof SimultaneousGesture>;
21
- export declare type ExclusiveGestureType = InstanceType<typeof ExclusiveGesture>;
18
+ export type ComposedGestureType = InstanceType<typeof ComposedGesture>;
19
+ export type RaceGestureType = ComposedGestureType;
20
+ export type SimultaneousGestureType = InstanceType<typeof SimultaneousGesture>;
21
+ export type ExclusiveGestureType = InstanceType<typeof ExclusiveGesture>;
@@ -4,6 +4,8 @@ export interface GestureStateManagerType {
4
4
  fail: () => void;
5
5
  end: () => void;
6
6
  }
7
+ declare function create(handlerTag: number): GestureStateManagerType;
7
8
  export declare const GestureStateManager: {
8
- create(handlerTag: number): GestureStateManagerType;
9
+ create: typeof create;
9
10
  };
11
+ export {};
@@ -1,12 +1,12 @@
1
1
  import { BaseGestureConfig, ContinousBaseGesture } from './gesture';
2
2
  import { GestureUpdateEvent } from '../gestureHandlerCommon';
3
- export declare type HoverGestureHandlerEventPayload = {
3
+ export type HoverGestureHandlerEventPayload = {
4
4
  x: number;
5
5
  y: number;
6
6
  absoluteX: number;
7
7
  absoluteY: number;
8
8
  };
9
- export declare type HoverGestureChangeEventPayload = {
9
+ export type HoverGestureChangeEventPayload = {
10
10
  changeX: number;
11
11
  changeY: number;
12
12
  };
@@ -29,4 +29,4 @@ export declare class HoverGesture extends ContinousBaseGesture<HoverGestureHandl
29
29
  effect(effect: HoverEffect): this;
30
30
  onChange(callback: (event: GestureUpdateEvent<HoverGestureHandlerEventPayload & HoverGestureChangeEventPayload>) => void): this;
31
31
  }
32
- export declare type HoverGestureType = InstanceType<typeof HoverGesture>;
32
+ export type HoverGestureType = InstanceType<typeof HoverGesture>;
@@ -6,4 +6,4 @@ export declare class LongPressGesture extends BaseGesture<LongPressGestureHandle
6
6
  minDuration(duration: number): this;
7
7
  maxDistance(distance: number): this;
8
8
  }
9
- export declare type LongPressGestureType = InstanceType<typeof LongPressGesture>;
9
+ export type LongPressGestureType = InstanceType<typeof LongPressGesture>;
@@ -4,4 +4,4 @@ export declare class ManualGesture extends ContinousBaseGesture<Record<string, n
4
4
  constructor();
5
5
  onChange(callback: (event: GestureUpdateEvent<Record<string, never>>) => void): this;
6
6
  }
7
- export declare type ManualGestureType = InstanceType<typeof ManualGesture>;
7
+ export type ManualGestureType = InstanceType<typeof ManualGesture>;
@@ -6,4 +6,4 @@ export declare class NativeGesture extends BaseGesture<NativeViewGestureHandlerP
6
6
  shouldActivateOnStart(value: boolean): this;
7
7
  disallowInterruption(value: boolean): this;
8
8
  }
9
- export declare type NativeGestureType = InstanceType<typeof NativeGesture>;
9
+ export type NativeGestureType = InstanceType<typeof NativeGesture>;
@@ -1,7 +1,7 @@
1
1
  import { BaseGestureConfig, ContinousBaseGesture } from './gesture';
2
2
  import { GestureUpdateEvent } from '../gestureHandlerCommon';
3
3
  import { PanGestureConfig, PanGestureHandlerEventPayload } from '../PanGestureHandler';
4
- export declare type PanGestureChangeEventPayload = {
4
+ export type PanGestureChangeEventPayload = {
5
5
  changeX: number;
6
6
  changeY: number;
7
7
  };
@@ -23,4 +23,4 @@ export declare class PanGesture extends ContinousBaseGesture<PanGestureHandlerEv
23
23
  activateAfterLongPress(duration: number): this;
24
24
  onChange(callback: (event: GestureUpdateEvent<PanGestureHandlerEventPayload & PanGestureChangeEventPayload>) => void): this;
25
25
  }
26
- export declare type PanGestureType = InstanceType<typeof PanGesture>;
26
+ export type PanGestureType = InstanceType<typeof PanGesture>;
@@ -1,11 +1,11 @@
1
1
  import { ContinousBaseGesture } from './gesture';
2
2
  import { PinchGestureHandlerEventPayload } from '../PinchGestureHandler';
3
3
  import { GestureUpdateEvent } from '../gestureHandlerCommon';
4
- export declare type PinchGestureChangeEventPayload = {
4
+ export type PinchGestureChangeEventPayload = {
5
5
  scaleChange: number;
6
6
  };
7
7
  export declare class PinchGesture extends ContinousBaseGesture<PinchGestureHandlerEventPayload, PinchGestureChangeEventPayload> {
8
8
  constructor();
9
9
  onChange(callback: (event: GestureUpdateEvent<PinchGestureHandlerEventPayload & PinchGestureChangeEventPayload>) => void): this;
10
10
  }
11
- export declare type PinchGestureType = InstanceType<typeof PinchGesture>;
11
+ export type PinchGestureType = InstanceType<typeof PinchGesture>;