react-native-tvos 0.87.1-0 → 0.87.1-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.
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/package.json +2 -2
- package/types_generated/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +96 -0
- package/types_generated/Libraries/Alert/Alert.d.ts +92 -0
- package/types_generated/Libraries/Animated/Animated.d.ts +14 -0
- package/types_generated/Libraries/Animated/AnimatedEvent.d.ts +30 -0
- package/types_generated/Libraries/Animated/AnimatedExports.d.ts +191 -0
- package/types_generated/Libraries/Animated/AnimatedImplementation.d.ts +232 -0
- package/types_generated/Libraries/Animated/AnimatedPlatformConfig.d.ts +13 -0
- package/types_generated/Libraries/Animated/Easing.d.ts +172 -0
- package/types_generated/Libraries/Animated/animations/Animation.d.ts +35 -0
- package/types_generated/Libraries/Animated/animations/DecayAnimation.d.ts +42 -0
- package/types_generated/Libraries/Animated/animations/SpringAnimation.d.ts +130 -0
- package/types_generated/Libraries/Animated/animations/TimingAnimation.d.ts +54 -0
- package/types_generated/Libraries/Animated/components/AnimatedFlatList.d.ts +22 -0
- package/types_generated/Libraries/Animated/components/AnimatedImage.d.ts +18 -0
- package/types_generated/Libraries/Animated/components/AnimatedScrollView.d.ts +23 -0
- package/types_generated/Libraries/Animated/components/AnimatedSectionList.d.ts +22 -0
- package/types_generated/Libraries/Animated/components/AnimatedText.d.ts +18 -0
- package/types_generated/Libraries/Animated/components/AnimatedView.d.ts +19 -0
- package/types_generated/Libraries/Animated/createAnimatedComponent.d.ts +44 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedAddition.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedColor.d.ts +80 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedDiffClamp.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedDivision.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedInterpolation.d.ts +38 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedModulo.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedMultiplication.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedNode.d.ts +50 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedProps.d.ts +30 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedStyle.d.ts +32 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedSubtraction.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedTracking.d.ts +21 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedValue.d.ts +126 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedValueXY.d.ts +135 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedWithChildren.d.ts +15 -0
- package/types_generated/Libraries/Animated/useAnimatedColor.d.ts +16 -0
- package/types_generated/Libraries/Animated/useAnimatedValue.d.ts +15 -0
- package/types_generated/Libraries/Animated/useAnimatedValueXY.d.ts +18 -0
- package/types_generated/Libraries/AppState/AppState.d.ts +82 -0
- package/types_generated/Libraries/BatchedBridge/BatchedBridge.d.ts +17 -0
- package/types_generated/Libraries/BatchedBridge/MessageQueue.d.ts +39 -0
- package/types_generated/Libraries/BatchedBridge/NativeModules.d.ts +27 -0
- package/types_generated/Libraries/Blob/Blob.d.ts +80 -0
- package/types_generated/Libraries/Blob/BlobTypes.d.ts +27 -0
- package/types_generated/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +223 -0
- package/types_generated/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.d.ts +20 -0
- package/types_generated/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +133 -0
- package/types_generated/Libraries/Components/Button.d.ts +167 -0
- package/types_generated/Libraries/Components/Clipboard/Clipboard.d.ts +43 -0
- package/types_generated/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +17 -0
- package/types_generated/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidFallback.d.ts +27 -0
- package/types_generated/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.d.ts +157 -0
- package/types_generated/Libraries/Components/Keyboard/Keyboard.d.ts +115 -0
- package/types_generated/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts +82 -0
- package/types_generated/Libraries/Components/LayoutConformance/LayoutConformance.d.ts +23 -0
- package/types_generated/Libraries/Components/Pressable/Pressable.d.ts +170 -0
- package/types_generated/Libraries/Components/Pressable/useAndroidRippleForView.d.ts +48 -0
- package/types_generated/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts +32 -0
- package/types_generated/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.d.ts +67 -0
- package/types_generated/Libraries/Components/RefreshControl/RefreshControl.d.ts +96 -0
- package/types_generated/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +31 -0
- package/types_generated/Libraries/Components/ScrollView/ScrollView.d.ts +723 -0
- package/types_generated/Libraries/Components/ScrollView/ScrollViewContext.d.ts +24 -0
- package/types_generated/Libraries/Components/ScrollView/ScrollViewStickyHeader.d.ts +36 -0
- package/types_generated/Libraries/Components/StatusBar/StatusBar.d.ts +189 -0
- package/types_generated/Libraries/Components/Switch/Switch.d.ts +143 -0
- package/types_generated/Libraries/Components/TV/TVEventControl.d.ts +23 -0
- package/types_generated/Libraries/Components/TV/TVEventHandler.d.ts +34 -0
- package/types_generated/Libraries/Components/TV/TVFocusGuideView.d.ts +96 -0
- package/types_generated/Libraries/Components/TV/TVTextScrollView.d.ts +97 -0
- package/types_generated/Libraries/Components/TV/TVViewPropTypes.d.ts +123 -0
- package/types_generated/Libraries/Components/TV/tagForComponentOrHandle.d.ts +24 -0
- package/types_generated/Libraries/Components/TV/useTVEventHandler.d.ts +20 -0
- package/types_generated/Libraries/Components/TextInput/InputAccessoryView.d.ts +37 -0
- package/types_generated/Libraries/Components/TextInput/TextInput.d.ts +162 -0
- package/types_generated/Libraries/Components/TextInput/TextInput.flow.d.ts +1020 -0
- package/types_generated/Libraries/Components/TextInput/TextInputState.d.ts +54 -0
- package/types_generated/Libraries/Components/ToastAndroid/ToastAndroid.d.ts +99 -0
- package/types_generated/Libraries/Components/Touchable/TouchableHighlight.d.ts +62 -0
- package/types_generated/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts +155 -0
- package/types_generated/Libraries/Components/Touchable/TouchableOpacity.d.ts +47 -0
- package/types_generated/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +121 -0
- package/types_generated/Libraries/Components/View/View.d.ts +34 -0
- package/types_generated/Libraries/Components/View/ViewAccessibility.d.ts +426 -0
- package/types_generated/Libraries/Components/View/ViewNativeComponent.d.ts +38 -0
- package/types_generated/Libraries/Components/View/ViewPropTypes.d.ts +412 -0
- package/types_generated/Libraries/Core/Devtools/symbolicateStackTrace.d.ts +27 -0
- package/types_generated/Libraries/Core/ExceptionsManager.d.ts +43 -0
- package/types_generated/Libraries/Core/ExtendedError.d.ts +26 -0
- package/types_generated/Libraries/Core/NativeExceptionsManager.d.ts +17 -0
- package/types_generated/Libraries/Core/RawEventEmitter.d.ts +26 -0
- package/types_generated/Libraries/Core/ReactFiberErrorDialog.d.ts +27 -0
- package/types_generated/Libraries/Core/ReactNativeVersion.d.ts +48 -0
- package/types_generated/Libraries/Core/registerCallableModule.d.ts +18 -0
- package/types_generated/Libraries/EventEmitter/NativeEventEmitter.d.ts +75 -0
- package/types_generated/Libraries/EventEmitter/RCTDeviceEventEmitter.d.ts +19 -0
- package/types_generated/Libraries/EventEmitter/RCTEventEmitter.d.ts +18 -0
- package/types_generated/Libraries/EventEmitter/RCTNativeAppEventEmitter.d.ts +24 -0
- package/types_generated/Libraries/Image/AssetSourceResolver.d.ts +60 -0
- package/types_generated/Libraries/Image/Image.d.ts +18 -0
- package/types_generated/Libraries/Image/ImageBackground.d.ts +55 -0
- package/types_generated/Libraries/Image/ImageProps.d.ts +462 -0
- package/types_generated/Libraries/Image/ImageResizeMode.d.ts +17 -0
- package/types_generated/Libraries/Image/ImageSource.d.ts +94 -0
- package/types_generated/Libraries/Image/ImageTypes.flow.d.ts +62 -0
- package/types_generated/Libraries/Interaction/PanResponder.d.ts +234 -0
- package/types_generated/Libraries/LayoutAnimation/LayoutAnimation.d.ts +87 -0
- package/types_generated/Libraries/Linking/Linking.d.ts +76 -0
- package/types_generated/Libraries/Lists/FlatList.d.ts +316 -0
- package/types_generated/Libraries/Lists/SectionList.d.ts +177 -0
- package/types_generated/Libraries/Lists/VirtualizedList.d.ts +21 -0
- package/types_generated/Libraries/Lists/VirtualizedSectionList.d.ts +21 -0
- package/types_generated/Libraries/LogBox/Data/LogBoxData.d.ts +78 -0
- package/types_generated/Libraries/LogBox/Data/LogBoxLog.d.ts +71 -0
- package/types_generated/Libraries/LogBox/Data/LogBoxSymbolication.d.ts +17 -0
- package/types_generated/Libraries/LogBox/Data/parseLogBoxLog.d.ts +49 -0
- package/types_generated/Libraries/LogBox/LogBox.d.ts +32 -0
- package/types_generated/Libraries/Modal/Modal.d.ts +145 -0
- package/types_generated/Libraries/NativeComponent/NativeComponentRegistry.d.ts +50 -0
- package/types_generated/Libraries/Network/FormData.d.ts +56 -0
- package/types_generated/Libraries/Network/RCTNetworking.d.ts +25 -0
- package/types_generated/Libraries/Network/RCTNetworkingEventDefinitions.flow.d.ts +22 -0
- package/types_generated/Libraries/Network/XMLHttpRequest.d.ts +114 -0
- package/types_generated/Libraries/Network/convertRequestBody.d.ts +21 -0
- package/types_generated/Libraries/Performance/Systrace.d.ts +71 -0
- package/types_generated/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +139 -0
- package/types_generated/Libraries/Pressability/Pressability.d.ts +241 -0
- package/types_generated/Libraries/Pressability/usePressability.d.ts +27 -0
- package/types_generated/Libraries/PushNotificationIOS/PushNotificationIOS.d.ts +327 -0
- package/types_generated/Libraries/ReactNative/AppRegistry.d.ts +14 -0
- package/types_generated/Libraries/ReactNative/AppRegistry.flow.d.ts +43 -0
- package/types_generated/Libraries/ReactNative/AppRegistryImpl.d.ts +120 -0
- package/types_generated/Libraries/ReactNative/DisplayMode.d.ts +24 -0
- package/types_generated/Libraries/ReactNative/I18nManager.d.ts +42 -0
- package/types_generated/Libraries/ReactNative/IPerformanceLogger.flow.d.ts +57 -0
- package/types_generated/Libraries/ReactNative/NativeI18nManager.d.ts +17 -0
- package/types_generated/Libraries/ReactNative/NativeUIManager.d.ts +17 -0
- package/types_generated/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.d.ts +31 -0
- package/types_generated/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.d.ts +15 -0
- package/types_generated/Libraries/ReactNative/RendererImplementation.d.ts +36 -0
- package/types_generated/Libraries/ReactNative/RendererProxy.d.ts +13 -0
- package/types_generated/Libraries/ReactNative/RootTag.d.ts +22 -0
- package/types_generated/Libraries/ReactNative/UIManager.d.ts +17 -0
- package/types_generated/Libraries/ReactNative/requireNativeComponent.d.ts +25 -0
- package/types_generated/Libraries/ReactPrivate/ReactNativePrivateInterface.d.ts +17 -0
- package/types_generated/Libraries/Renderer/shims/ReactFabric.d.ts +17 -0
- package/types_generated/Libraries/Renderer/shims/ReactNativeTypes.d.ts +155 -0
- package/types_generated/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.d.ts +41 -0
- package/types_generated/Libraries/Settings/Settings.d.ts +21 -0
- package/types_generated/Libraries/Share/Share.d.ts +82 -0
- package/types_generated/Libraries/StyleSheet/EdgeInsetsPropType.d.ts +15 -0
- package/types_generated/Libraries/StyleSheet/PlatformColorValueTypes.d.ts +23 -0
- package/types_generated/Libraries/StyleSheet/PlatformColorValueTypesIOS.d.ts +27 -0
- package/types_generated/Libraries/StyleSheet/PointPropType.d.ts +16 -0
- package/types_generated/Libraries/StyleSheet/Rect.d.ts +22 -0
- package/types_generated/Libraries/StyleSheet/StyleSheet.d.ts +153 -0
- package/types_generated/Libraries/StyleSheet/StyleSheetExports.d.ts +94 -0
- package/types_generated/Libraries/StyleSheet/StyleSheetTypes.d.ts +872 -0
- package/types_generated/Libraries/StyleSheet/flattenStyle.d.ts +19 -0
- package/types_generated/Libraries/StyleSheet/private/_StyleSheetTypesOverrides.d.ts +17 -0
- package/types_generated/Libraries/StyleSheet/private/_TransformStyle.d.ts +76 -0
- package/types_generated/Libraries/StyleSheet/processColor.d.ts +18 -0
- package/types_generated/Libraries/Text/Text.d.ts +34 -0
- package/types_generated/Libraries/Text/TextAncestorContext.d.ts +20 -0
- package/types_generated/Libraries/Text/TextNativeComponent.d.ts +41 -0
- package/types_generated/Libraries/Text/TextProps.d.ts +175 -0
- package/types_generated/Libraries/TurboModule/RCTExport.d.ts +35 -0
- package/types_generated/Libraries/TurboModule/TurboModuleRegistry.d.ts +15 -0
- package/types_generated/Libraries/Types/CodegenTypes.d.ts +24 -0
- package/types_generated/Libraries/Types/CodegenTypesNamespace.d.ts +14 -0
- package/types_generated/Libraries/Types/CoreEventTypes.d.ts +361 -0
- package/types_generated/Libraries/Types/RootTagTypes.d.ts +13 -0
- package/types_generated/Libraries/Types/UIManagerJSInterface.d.ts +17 -0
- package/types_generated/Libraries/UTFSequence.d.ts +39 -0
- package/types_generated/Libraries/Utilities/Appearance.d.ts +43 -0
- package/types_generated/Libraries/Utilities/BackHandler.d.ts +43 -0
- package/types_generated/Libraries/Utilities/DevSettings.d.ts +41 -0
- package/types_generated/Libraries/Utilities/DeviceInfo.d.ts +17 -0
- package/types_generated/Libraries/Utilities/Dimensions.d.ts +60 -0
- package/types_generated/Libraries/Utilities/NativeAppearance.d.ts +17 -0
- package/types_generated/Libraries/Utilities/NativeDeviceInfo.d.ts +14 -0
- package/types_generated/Libraries/Utilities/PixelRatio.d.ts +113 -0
- package/types_generated/Libraries/Utilities/Platform.d.ts +20 -0
- package/types_generated/Libraries/Utilities/PlatformTypes.d.ts +193 -0
- package/types_generated/Libraries/Utilities/codegenNativeCommands.d.ts +19 -0
- package/types_generated/Libraries/Utilities/codegenNativeComponent.d.ts +24 -0
- package/types_generated/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.d.ts +33 -0
- package/types_generated/Libraries/Utilities/differ/deepDiffer.d.ts +19 -0
- package/types_generated/Libraries/Utilities/useColorScheme.d.ts +25 -0
- package/types_generated/Libraries/Utilities/useWindowDimensions.d.ts +21 -0
- package/types_generated/Libraries/Vibration/Vibration.d.ts +37 -0
- package/types_generated/Libraries/vendor/core/ErrorUtils.d.ts +39 -0
- package/types_generated/Libraries/vendor/emitter/EventEmitter.d.ts +67 -0
- package/types_generated/index.d.ts +190 -0
- package/types_generated/src/private/assets/AssetRegistry.d.ts +42 -0
- package/types_generated/src/private/components/virtualcollection/FlingConstants.d.ts +20 -0
- package/types_generated/src/private/components/virtualcollection/Virtual.d.ts +46 -0
- package/types_generated/src/private/components/virtualcollection/VirtualCollectionView.d.ts +81 -0
- package/types_generated/src/private/components/virtualcollection/column/VirtualColumn.d.ts +23 -0
- package/types_generated/src/private/components/virtualcollection/column/VirtualColumnGenerator.d.ts +17 -0
- package/types_generated/src/private/components/virtualcollection/dom/getScrollParent.d.ts +21 -0
- package/types_generated/src/private/components/virtualcollection/row/VirtualRow.d.ts +23 -0
- package/types_generated/src/private/components/virtualview/VirtualView.d.ts +75 -0
- package/types_generated/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.d.ts +107 -0
- package/types_generated/src/private/components/virtualview/VirtualViewNativeComponent.d.ts +107 -0
- package/types_generated/src/private/devsupport/devmenu/DevMenu.d.ts +28 -0
- package/types_generated/src/private/renderer/events/dispatchNativeEvent.d.ts +26 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeAppearance.d.ts +27 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeDeviceInfo.d.ts +46 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeExceptionsManager.d.ts +45 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeI18nManager.d.ts +27 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeUIManager.d.ts +109 -0
- package/types_generated/src/private/styles/composeStyles.d.ts +19 -0
- package/types_generated/src/private/types/HostComponent.d.ts +19 -0
- package/types_generated/src/private/types/HostInstance.d.ts +57 -0
- package/types_generated/src/private/webapis/dom/events/CustomEvent.d.ts +27 -0
- package/types_generated/src/private/webapis/dom/events/Event.d.ts +50 -0
- package/types_generated/src/private/webapis/dom/events/EventTarget.d.ts +36 -0
- package/types_generated/src/private/webapis/dom/nodes/ReactNativeDocument.d.ts +35 -0
- package/types_generated/src/private/webapis/dom/nodes/ReactNativeElement.d.ts +89 -0
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyCharacterData.d.ts +32 -0
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyElement.d.ts +56 -0
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyNode.d.ts +131 -0
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyText.d.ts +26 -0
- package/types_generated/src/private/webapis/dom/nodes/internals/NodeInternals.d.ts +36 -0
- package/types_generated/src/private/webapis/dom/nodes/internals/ReactNativeDocumentElementInstanceHandle.d.ts +23 -0
- package/types_generated/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.d.ts +22 -0
- package/types_generated/src/private/webapis/dom/nodes/specs/NativeDOM.d.ts +229 -0
- package/types_generated/src/private/webapis/dom/oldstylecollections/HTMLCollection.d.ts +24 -0
- package/types_generated/src/private/webapis/dom/oldstylecollections/NodeList.d.ts +27 -0
- package/types_generated/src/private/webapis/geometry/DOMRect.d.ts +46 -0
- package/types_generated/src/private/webapis/geometry/DOMRectReadOnly.d.ts +73 -0
- package/types_generated/src/private/webapis/utils/ArrayLikeUtils.d.ts +27 -0
- package/types_generated/src/react-private-interface.d.ts +33 -0
- package/types_generated/tsconfig.json +3 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @generated SignedSource<<024745c9b89bcc133029d932f2a194da>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/Libraries/Interaction/PanResponder.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { GestureResponderEvent } from "../Types/CoreEventTypes";
|
|
14
|
+
export type PanResponderGestureState = {
|
|
15
|
+
/**
|
|
16
|
+
* ID of the gestureState - persisted as long as there at least one touch on screen
|
|
17
|
+
*/
|
|
18
|
+
stateID: number;
|
|
19
|
+
/**
|
|
20
|
+
* The latest screen coordinates of the recently-moved touch
|
|
21
|
+
*/
|
|
22
|
+
moveX: number;
|
|
23
|
+
/**
|
|
24
|
+
* The latest screen coordinates of the recently-moved touch
|
|
25
|
+
*/
|
|
26
|
+
moveY: number;
|
|
27
|
+
/**
|
|
28
|
+
* The screen coordinates of the responder grant
|
|
29
|
+
*/
|
|
30
|
+
x0: number;
|
|
31
|
+
/**
|
|
32
|
+
* The screen coordinates of the responder grant
|
|
33
|
+
*/
|
|
34
|
+
y0: number;
|
|
35
|
+
/**
|
|
36
|
+
* Accumulated distance of the gesture since the touch started
|
|
37
|
+
*/
|
|
38
|
+
dx: number;
|
|
39
|
+
/**
|
|
40
|
+
* Accumulated distance of the gesture since the touch started
|
|
41
|
+
*/
|
|
42
|
+
dy: number;
|
|
43
|
+
/**
|
|
44
|
+
* Current velocity of the gesture
|
|
45
|
+
*/
|
|
46
|
+
vx: number;
|
|
47
|
+
/**
|
|
48
|
+
* Current velocity of the gesture
|
|
49
|
+
*/
|
|
50
|
+
vy: number;
|
|
51
|
+
/**
|
|
52
|
+
* Number of touches currently on screen
|
|
53
|
+
*/
|
|
54
|
+
numberActiveTouches: number;
|
|
55
|
+
};
|
|
56
|
+
type ActiveCallback = (event: GestureResponderEvent, gestureState: PanResponderGestureState) => boolean;
|
|
57
|
+
type PassiveCallback = (event: GestureResponderEvent, gestureState: PanResponderGestureState) => unknown;
|
|
58
|
+
export type GestureResponderHandlerMethods = {
|
|
59
|
+
onMoveShouldSetResponder: (event: GestureResponderEvent) => boolean;
|
|
60
|
+
onMoveShouldSetResponderCapture: (event: GestureResponderEvent) => boolean;
|
|
61
|
+
onResponderEnd: (event: GestureResponderEvent) => void;
|
|
62
|
+
onResponderGrant: (event: GestureResponderEvent) => boolean;
|
|
63
|
+
onResponderMove: (event: GestureResponderEvent) => void;
|
|
64
|
+
onResponderReject: (event: GestureResponderEvent) => void;
|
|
65
|
+
onResponderRelease: (event: GestureResponderEvent) => void;
|
|
66
|
+
onResponderStart: (event: GestureResponderEvent) => void;
|
|
67
|
+
onResponderTerminate: (event: GestureResponderEvent) => void;
|
|
68
|
+
onResponderTerminationRequest: (event: GestureResponderEvent) => boolean;
|
|
69
|
+
onStartShouldSetResponder: (event: GestureResponderEvent) => boolean;
|
|
70
|
+
onStartShouldSetResponderCapture: (event: GestureResponderEvent) => boolean;
|
|
71
|
+
};
|
|
72
|
+
export type PanResponderCallbacks = Readonly<{
|
|
73
|
+
onMoveShouldSetPanResponder?: ActiveCallback | undefined;
|
|
74
|
+
onMoveShouldSetPanResponderCapture?: ActiveCallback | undefined;
|
|
75
|
+
onStartShouldSetPanResponder?: ActiveCallback | undefined;
|
|
76
|
+
onStartShouldSetPanResponderCapture?: ActiveCallback | undefined;
|
|
77
|
+
/**
|
|
78
|
+
* The body of `onResponderGrant` returns a bool, but the vast majority of
|
|
79
|
+
* callsites return void and this TODO notice is found in it:
|
|
80
|
+
* TODO: t7467124 investigate if this can be removed
|
|
81
|
+
*/
|
|
82
|
+
onPanResponderGrant?: (PassiveCallback | ActiveCallback) | undefined;
|
|
83
|
+
onPanResponderReject?: PassiveCallback | undefined;
|
|
84
|
+
onPanResponderStart?: PassiveCallback | undefined;
|
|
85
|
+
onPanResponderEnd?: PassiveCallback | undefined;
|
|
86
|
+
onPanResponderRelease?: PassiveCallback | undefined;
|
|
87
|
+
onPanResponderMove?: PassiveCallback | undefined;
|
|
88
|
+
onPanResponderTerminate?: PassiveCallback | undefined;
|
|
89
|
+
onPanResponderTerminationRequest?: ActiveCallback | undefined;
|
|
90
|
+
onShouldBlockNativeResponder?: ActiveCallback | undefined;
|
|
91
|
+
}>;
|
|
92
|
+
declare const PanResponder: {
|
|
93
|
+
/**
|
|
94
|
+
* Create a `PanResponder` instance with a config of gesture callback
|
|
95
|
+
* handlers.
|
|
96
|
+
*
|
|
97
|
+
* @param {object} config Enhanced versions of all of the responder callbacks
|
|
98
|
+
* that provide not only the typical `ResponderSyntheticEvent`, but also the
|
|
99
|
+
* `PanResponder` gesture state. Simply replace the word `Responder` with
|
|
100
|
+
* `PanResponder` in each of the typical `onResponder*` callbacks. For
|
|
101
|
+
* example, the `config` object looks like:
|
|
102
|
+
*
|
|
103
|
+
* - `onMoveShouldSetPanResponder: (e, gestureState) => {...}`
|
|
104
|
+
* - `onMoveShouldSetPanResponderCapture: (e, gestureState) => {...}`
|
|
105
|
+
* - `onStartShouldSetPanResponder: (e, gestureState) => {...}`
|
|
106
|
+
* - `onStartShouldSetPanResponderCapture: (e, gestureState) => {...}`
|
|
107
|
+
* - `onPanResponderReject: (e, gestureState) => {...}`
|
|
108
|
+
* - `onPanResponderGrant: (e, gestureState) => {...}`
|
|
109
|
+
* - `onPanResponderStart: (e, gestureState) => {...}`
|
|
110
|
+
* - `onPanResponderEnd: (e, gestureState) => {...}`
|
|
111
|
+
* - `onPanResponderRelease: (e, gestureState) => {...}`
|
|
112
|
+
* - `onPanResponderMove: (e, gestureState) => {...}`
|
|
113
|
+
* - `onPanResponderTerminate: (e, gestureState) => {...}`
|
|
114
|
+
* - `onPanResponderTerminationRequest: (e, gestureState) => {...}`
|
|
115
|
+
* - `onShouldBlockNativeResponder: (e, gestureState) => {...}`
|
|
116
|
+
*
|
|
117
|
+
* In general, for events that have capture equivalents, we update the
|
|
118
|
+
* gestureState once in the capture phase and can use it in the bubble phase
|
|
119
|
+
* as well.
|
|
120
|
+
*
|
|
121
|
+
* Be careful with onStartShould* callbacks. They only reflect updated
|
|
122
|
+
* `gestureState` for start/end events that bubble/capture to the Node.
|
|
123
|
+
* Once the node is the responder, you can rely on every start/end event
|
|
124
|
+
* being processed by the gesture and `gestureState` being updated
|
|
125
|
+
* accordingly. (numberActiveTouches) may not be totally accurate unless you
|
|
126
|
+
* are the responder.
|
|
127
|
+
*/
|
|
128
|
+
create(config: PanResponderCallbacks): {
|
|
129
|
+
getInteractionHandle: () => number | undefined;
|
|
130
|
+
panHandlers: GestureResponderHandlerMethods;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
export type PanResponderInstance = ReturnType<(typeof PanResponder)["create"]>;
|
|
134
|
+
/**
|
|
135
|
+
* Reconciles several touches into a single gesture. Makes single-touch
|
|
136
|
+
* gestures resilient to extra touches and can recognize basic multi-touch
|
|
137
|
+
* gestures.
|
|
138
|
+
*
|
|
139
|
+
* It provides a predictable wrapper of the responder handlers provided by the
|
|
140
|
+
* [gesture responder system](docs/gesture-responder-system.html).
|
|
141
|
+
* For each handler, it provides a new `gestureState` object alongside the
|
|
142
|
+
* native event object:
|
|
143
|
+
*
|
|
144
|
+
* ```
|
|
145
|
+
* onPanResponderMove: (event, gestureState) => {}
|
|
146
|
+
* ```
|
|
147
|
+
*
|
|
148
|
+
* A native event is a synthetic touch event with the following form:
|
|
149
|
+
*
|
|
150
|
+
* - `nativeEvent`
|
|
151
|
+
* + `changedTouches` - Array of all touch events that have changed since the last event
|
|
152
|
+
* + `identifier` - The ID of the touch
|
|
153
|
+
* + `locationX` - The X position of the touch, relative to the element
|
|
154
|
+
* + `locationY` - The Y position of the touch, relative to the element
|
|
155
|
+
* + `pageX` - The X position of the touch, relative to the root element
|
|
156
|
+
* + `pageY` - The Y position of the touch, relative to the root element
|
|
157
|
+
* + `target` - The node id of the element receiving the touch event
|
|
158
|
+
* + `timestamp` - A time identifier for the touch, useful for velocity calculation
|
|
159
|
+
* + `touches` - Array of all current touches on the screen
|
|
160
|
+
*
|
|
161
|
+
* A `gestureState` object has the following:
|
|
162
|
+
*
|
|
163
|
+
* - `stateID` - ID of the gestureState- persisted as long as there at least
|
|
164
|
+
* one touch on screen
|
|
165
|
+
* - `moveX` - the latest screen coordinates of the recently-moved touch
|
|
166
|
+
* - `moveY` - the latest screen coordinates of the recently-moved touch
|
|
167
|
+
* - `x0` - the screen coordinates of the responder grant
|
|
168
|
+
* - `y0` - the screen coordinates of the responder grant
|
|
169
|
+
* - `dx` - accumulated distance of the gesture since the touch started
|
|
170
|
+
* - `dy` - accumulated distance of the gesture since the touch started
|
|
171
|
+
* - `vx` - current velocity of the gesture
|
|
172
|
+
* - `vy` - current velocity of the gesture
|
|
173
|
+
* - `numberActiveTouches` - Number of touches currently on screen
|
|
174
|
+
*
|
|
175
|
+
* ### Basic Usage
|
|
176
|
+
*
|
|
177
|
+
* Example:
|
|
178
|
+
*
|
|
179
|
+
* ```tsx
|
|
180
|
+
* componentWillMount: function() {
|
|
181
|
+
* this._panResponder = PanResponder.create({
|
|
182
|
+
* // Ask to be the responder:
|
|
183
|
+
* onStartShouldSetPanResponder: (evt, gestureState) => true,
|
|
184
|
+
* onStartShouldSetPanResponderCapture: (evt, gestureState) => true,
|
|
185
|
+
* onMoveShouldSetPanResponder: (evt, gestureState) => true,
|
|
186
|
+
* onMoveShouldSetPanResponderCapture: (evt, gestureState) => true,
|
|
187
|
+
*
|
|
188
|
+
* onPanResponderGrant: (evt, gestureState) => {
|
|
189
|
+
* // The gesture has started. Show visual feedback so the user knows
|
|
190
|
+
* // what is happening!
|
|
191
|
+
*
|
|
192
|
+
* // gestureState.d{x,y} will be set to zero now
|
|
193
|
+
* },
|
|
194
|
+
* onPanResponderMove: (evt, gestureState) => {
|
|
195
|
+
* // The most recent move distance is gestureState.move{X,Y}
|
|
196
|
+
*
|
|
197
|
+
* // The accumulated gesture distance since becoming responder is
|
|
198
|
+
* // gestureState.d{x,y}
|
|
199
|
+
* },
|
|
200
|
+
* onPanResponderTerminationRequest: (evt, gestureState) => true,
|
|
201
|
+
* onPanResponderRelease: (evt, gestureState) => {
|
|
202
|
+
* // The user has released all touches while this view is the
|
|
203
|
+
* // responder. This typically means a gesture has succeeded
|
|
204
|
+
* },
|
|
205
|
+
* onPanResponderTerminate: (evt, gestureState) => {
|
|
206
|
+
* // Another component has become the responder, so this gesture
|
|
207
|
+
* // should be cancelled
|
|
208
|
+
* },
|
|
209
|
+
* onShouldBlockNativeResponder: (evt, gestureState) => {
|
|
210
|
+
* // Returns whether this component should block native components from becoming the JS
|
|
211
|
+
* // responder. Returns true by default. Is currently only supported on android.
|
|
212
|
+
* return true;
|
|
213
|
+
* },
|
|
214
|
+
* });
|
|
215
|
+
* },
|
|
216
|
+
*
|
|
217
|
+
* render: function() {
|
|
218
|
+
* return (
|
|
219
|
+
* <View {...this._panResponder.panHandlers} />
|
|
220
|
+
* );
|
|
221
|
+
* },
|
|
222
|
+
*
|
|
223
|
+
* ```
|
|
224
|
+
*
|
|
225
|
+
* ### Working Example
|
|
226
|
+
*
|
|
227
|
+
* To see it in action, try the
|
|
228
|
+
* [PanResponder example in RNTester](https://github.com/facebook/react-native/blob/HEAD/packages/rn-tester/js/examples/PanResponder/PanResponderExample.js)
|
|
229
|
+
*
|
|
230
|
+
* @see https://reactnative.dev/docs/panresponder
|
|
231
|
+
*/
|
|
232
|
+
declare const $$PanResponder: typeof PanResponder;
|
|
233
|
+
declare type $$PanResponder = typeof $$PanResponder;
|
|
234
|
+
export default $$PanResponder;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @generated SignedSource<<4715d2a28e31147b787c6ae93773b238>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/Libraries/LayoutAnimation/LayoutAnimation.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { LayoutAnimationConfig, LayoutAnimationProperty, LayoutAnimationType } from "../Renderer/shims/ReactNativeTypes";
|
|
14
|
+
export type { LayoutAnimationType, LayoutAnimationProperty, LayoutAnimationAnimationConfig as LayoutAnimationAnim } from "../Renderer/shims/ReactNativeTypes";
|
|
15
|
+
export type { LayoutAnimationConfig } from "../Renderer/shims/ReactNativeTypes";
|
|
16
|
+
export type LayoutAnimationTypes = Readonly<{ [type in LayoutAnimationType]: type }>;
|
|
17
|
+
export type LayoutAnimationProperties = Readonly<{ [prop in LayoutAnimationProperty]: prop }>;
|
|
18
|
+
type OnAnimationDidEndCallback = () => void;
|
|
19
|
+
type OnAnimationDidFailCallback = () => void;
|
|
20
|
+
declare function setLayoutAnimationEnabled(value: boolean): void;
|
|
21
|
+
/**
|
|
22
|
+
* Configures the next commit to be animated.
|
|
23
|
+
*
|
|
24
|
+
* onAnimationDidEnd is guaranteed to be called when the animation completes.
|
|
25
|
+
* onAnimationDidFail is *never* called in the classic, pre-Fabric renderer,
|
|
26
|
+
* and never has been. In the new renderer (Fabric) it is called only if configuration
|
|
27
|
+
* parsing fails.
|
|
28
|
+
*/
|
|
29
|
+
declare function configureNext(config: LayoutAnimationConfig, onAnimationDidEnd?: OnAnimationDidEndCallback, onAnimationDidFail?: OnAnimationDidFailCallback): void;
|
|
30
|
+
declare function createLayoutAnimation(duration: number, type?: LayoutAnimationType, property?: LayoutAnimationProperty): LayoutAnimationConfig;
|
|
31
|
+
declare const Presets: {
|
|
32
|
+
easeInEaseOut: LayoutAnimationConfig;
|
|
33
|
+
linear: LayoutAnimationConfig;
|
|
34
|
+
spring: LayoutAnimationConfig;
|
|
35
|
+
};
|
|
36
|
+
declare const LayoutAnimation: {
|
|
37
|
+
/**
|
|
38
|
+
* Schedule an animation for the next layout. Config includes duration,
|
|
39
|
+
* create/update/delete sub-configs.
|
|
40
|
+
*
|
|
41
|
+
* @param config Specifies animation properties:
|
|
42
|
+
*
|
|
43
|
+
* - `duration` in milliseconds
|
|
44
|
+
* - `create`, `AnimationConfig` for animating in new views
|
|
45
|
+
* - `update`, `AnimationConfig` for animating views that have been updated
|
|
46
|
+
*
|
|
47
|
+
* @param onAnimationDidEnd Called when the animation finished.
|
|
48
|
+
* Only supported on iOS.
|
|
49
|
+
* @param onError Called on error. Only supported on iOS.
|
|
50
|
+
*/
|
|
51
|
+
configureNext: typeof configureNext;
|
|
52
|
+
/**
|
|
53
|
+
* Helper that creates a config object for `configureNext`.
|
|
54
|
+
*/
|
|
55
|
+
create: typeof createLayoutAnimation;
|
|
56
|
+
/**
|
|
57
|
+
* Enum of animation types (spring, linear, easeInEaseOut, easeIn, easeOut,
|
|
58
|
+
* keyboard).
|
|
59
|
+
*/
|
|
60
|
+
Types: LayoutAnimationTypes;
|
|
61
|
+
/**
|
|
62
|
+
* Enum of layout properties to animate (opacity, scaleX, scaleY, scaleXY).
|
|
63
|
+
*/
|
|
64
|
+
Properties: LayoutAnimationProperties;
|
|
65
|
+
checkConfig(...args: Array<unknown>): void;
|
|
66
|
+
/**
|
|
67
|
+
* Predefined configs (easeInEaseOut, linear, spring).
|
|
68
|
+
*/
|
|
69
|
+
Presets: typeof Presets;
|
|
70
|
+
easeInEaseOut: (onAnimationDidEnd?: OnAnimationDidEndCallback) => void;
|
|
71
|
+
linear: (onAnimationDidEnd?: OnAnimationDidEndCallback) => void;
|
|
72
|
+
spring: (onAnimationDidEnd?: OnAnimationDidEndCallback) => void;
|
|
73
|
+
setEnabled: typeof setLayoutAnimationEnabled;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Automatically animates views to their new positions when the next layout
|
|
77
|
+
* happens. Call before updating state to animate the transition.
|
|
78
|
+
*
|
|
79
|
+
* Note that in order to get this to work on **Android** you need to set the following flags via `UIManager`:
|
|
80
|
+
*
|
|
81
|
+
* UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true);
|
|
82
|
+
*
|
|
83
|
+
* @see https://reactnative.dev/docs/layoutanimation
|
|
84
|
+
*/
|
|
85
|
+
declare const $$LayoutAnimation: typeof LayoutAnimation;
|
|
86
|
+
declare type $$LayoutAnimation = typeof $$LayoutAnimation;
|
|
87
|
+
export default $$LayoutAnimation;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @generated SignedSource<<b8f320cb25e2a554df59f533e83264fc>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/Libraries/Linking/Linking.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { EventSubscription } from "../vendor/emitter/EventEmitter";
|
|
14
|
+
import NativeEventEmitter from "../EventEmitter/NativeEventEmitter";
|
|
15
|
+
type LinkingEventDefinitions = {
|
|
16
|
+
url: [{
|
|
17
|
+
url: string;
|
|
18
|
+
}];
|
|
19
|
+
};
|
|
20
|
+
declare class LinkingImpl extends NativeEventEmitter<LinkingEventDefinitions> {
|
|
21
|
+
constructor();
|
|
22
|
+
/**
|
|
23
|
+
* Listen for incoming URL changes.
|
|
24
|
+
*/
|
|
25
|
+
addEventListener<K extends keyof LinkingEventDefinitions>(eventType: K, listener: (...$$REST$$: LinkingEventDefinitions[K]) => unknown): EventSubscription;
|
|
26
|
+
/**
|
|
27
|
+
* Open the given URL with any installed app that can handle it. This
|
|
28
|
+
* includes URLs such as locations (e.g. "geo:37.484847,-122.148386"),
|
|
29
|
+
* contacts, or any other URL that can be opened with installed apps.
|
|
30
|
+
*
|
|
31
|
+
* This method will fail if the system doesn't know how to open the
|
|
32
|
+
* specified URL. If you're passing in a non-http(s) URL, it's best to
|
|
33
|
+
* check `canOpenURL` first. For web URLs, the protocol ("http://",
|
|
34
|
+
* "https://") must be set accordingly.
|
|
35
|
+
*/
|
|
36
|
+
openURL(url: string): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Check whether an installed app can handle a given URL. For web URLs,
|
|
39
|
+
* the protocol ("http://", "https://") must be set accordingly. As of
|
|
40
|
+
* iOS 9, your app needs to provide the `LSApplicationQueriesSchemes`
|
|
41
|
+
* key inside Info.plist.
|
|
42
|
+
*/
|
|
43
|
+
canOpenURL(url: string): Promise<boolean>;
|
|
44
|
+
/**
|
|
45
|
+
* Open the device Settings app and display the app’s custom settings, if
|
|
46
|
+
* it has any.
|
|
47
|
+
*/
|
|
48
|
+
openSettings(): Promise<void>;
|
|
49
|
+
/**
|
|
50
|
+
* Get the URL that launched the app, or `null` if it was not launched from
|
|
51
|
+
* a link. To support deep linking on Android, see
|
|
52
|
+
* https://developer.android.com/training/app-indexing/deep-linking.html#handling-intents.
|
|
53
|
+
*/
|
|
54
|
+
getInitialURL(): Promise<null | undefined | string>;
|
|
55
|
+
/**
|
|
56
|
+
* Launch an Android intent with optional extras. Useful for deep-linking
|
|
57
|
+
* to settings pages, opening an SMS app with a message draft in place,
|
|
58
|
+
* and more. See https://developer.android.com/reference/kotlin/android/content/Intent.
|
|
59
|
+
*
|
|
60
|
+
* @platform android
|
|
61
|
+
*/
|
|
62
|
+
sendIntent(action: string, extras?: Array<{
|
|
63
|
+
key: string;
|
|
64
|
+
value: string | number | boolean;
|
|
65
|
+
}>): Promise<void>;
|
|
66
|
+
}
|
|
67
|
+
declare const Linking: LinkingImpl;
|
|
68
|
+
/**
|
|
69
|
+
* General interface to interact with both incoming and outgoing app links,
|
|
70
|
+
* including deep links and universal links.
|
|
71
|
+
*
|
|
72
|
+
* @see https://reactnative.dev/docs/linking
|
|
73
|
+
*/
|
|
74
|
+
declare const $$Linking: typeof Linking;
|
|
75
|
+
declare type $$Linking = typeof $$Linking;
|
|
76
|
+
export default $$Linking;
|