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,107 @@
|
|
|
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<<4abc235430fc70e8f661e546d269d815>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { ViewProps } from "../../../../Libraries/Components/View/ViewPropTypes";
|
|
14
|
+
import type { DirectEventHandler, Double, Int32 } from "../../../../Libraries/Types/CodegenTypes";
|
|
15
|
+
import type { HostComponent } from "../../types/HostComponent";
|
|
16
|
+
export type NativeModeChangeEvent = Readonly<{
|
|
17
|
+
/**
|
|
18
|
+
* Virtualization mode of the target view.
|
|
19
|
+
*
|
|
20
|
+
* - `0`: Target view is visible.
|
|
21
|
+
* - `1`: Target view is hidden, but can be prerendered.
|
|
22
|
+
* - `2`: Target view is hidden.
|
|
23
|
+
*
|
|
24
|
+
* WORKAROUND: As of this writing, codegen doesn't support enums, so we need
|
|
25
|
+
* to convert `number` into an enum in `VirtualView`.
|
|
26
|
+
*/
|
|
27
|
+
mode: Int32;
|
|
28
|
+
/**
|
|
29
|
+
* Rect of the target view, relative to the nearest ancestor scroll container.
|
|
30
|
+
*/
|
|
31
|
+
targetRect: Readonly<{
|
|
32
|
+
x: Double;
|
|
33
|
+
y: Double;
|
|
34
|
+
width: Double;
|
|
35
|
+
height: Double;
|
|
36
|
+
}>;
|
|
37
|
+
/**
|
|
38
|
+
* Rect of the threshold that determines the mode of the target view, relative
|
|
39
|
+
* to the nearest ancestor scroll container.
|
|
40
|
+
*
|
|
41
|
+
* - `Visible`: Rect in which the target view is visible.
|
|
42
|
+
* - `Prerender`: Rect in which the target view is prerendered.
|
|
43
|
+
* - `Hidden`: Unused, without any guarantees.
|
|
44
|
+
*
|
|
45
|
+
* This can be used to determine whether and how much new content to render.
|
|
46
|
+
*/
|
|
47
|
+
thresholdRect: Readonly<{
|
|
48
|
+
x: Double;
|
|
49
|
+
y: Double;
|
|
50
|
+
width: Double;
|
|
51
|
+
height: Double;
|
|
52
|
+
}>;
|
|
53
|
+
}>;
|
|
54
|
+
type VirtualViewExperimentalNativeProps = Readonly<Omit<ViewProps, keyof {
|
|
55
|
+
/**
|
|
56
|
+
* Whether the initial mode should be `Hidden`.
|
|
57
|
+
*/
|
|
58
|
+
initialHidden?: boolean | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* This was needed to get VirtualViewManagerDelegate to set this property.
|
|
61
|
+
* TODO: Investigate why spread ViewProps doesn't call setter
|
|
62
|
+
*/
|
|
63
|
+
removeClippedSubviews?: boolean | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Render state of children.
|
|
66
|
+
*
|
|
67
|
+
* - `0`: Reserved to represent unknown future values.
|
|
68
|
+
* - `1`: Children are rendered.
|
|
69
|
+
* - `2`: Children are not rendered.
|
|
70
|
+
*
|
|
71
|
+
* WORKAROUND: As of this writing, codegen doesn't support enums, so we need
|
|
72
|
+
* to convert `number` into an enum in `VirtualView`.
|
|
73
|
+
*/
|
|
74
|
+
renderState: Int32;
|
|
75
|
+
/**
|
|
76
|
+
* See `NativeModeChangeEvent`.
|
|
77
|
+
*/
|
|
78
|
+
onModeChange?: DirectEventHandler<NativeModeChangeEvent> | undefined;
|
|
79
|
+
}> & {
|
|
80
|
+
/**
|
|
81
|
+
* Whether the initial mode should be `Hidden`.
|
|
82
|
+
*/
|
|
83
|
+
initialHidden?: boolean | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* This was needed to get VirtualViewManagerDelegate to set this property.
|
|
86
|
+
* TODO: Investigate why spread ViewProps doesn't call setter
|
|
87
|
+
*/
|
|
88
|
+
removeClippedSubviews?: boolean | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Render state of children.
|
|
91
|
+
*
|
|
92
|
+
* - `0`: Reserved to represent unknown future values.
|
|
93
|
+
* - `1`: Children are rendered.
|
|
94
|
+
* - `2`: Children are not rendered.
|
|
95
|
+
*
|
|
96
|
+
* WORKAROUND: As of this writing, codegen doesn't support enums, so we need
|
|
97
|
+
* to convert `number` into an enum in `VirtualView`.
|
|
98
|
+
*/
|
|
99
|
+
renderState: Int32;
|
|
100
|
+
/**
|
|
101
|
+
* See `NativeModeChangeEvent`.
|
|
102
|
+
*/
|
|
103
|
+
onModeChange?: DirectEventHandler<NativeModeChangeEvent> | undefined;
|
|
104
|
+
}>;
|
|
105
|
+
declare const $$VirtualViewExperimentalNativeComponent: HostComponent<VirtualViewExperimentalNativeProps>;
|
|
106
|
+
declare type $$VirtualViewExperimentalNativeComponent = typeof $$VirtualViewExperimentalNativeComponent;
|
|
107
|
+
export default $$VirtualViewExperimentalNativeComponent;
|
|
@@ -0,0 +1,107 @@
|
|
|
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<<6a70b88e492c9c319e79fa8ae84d6038>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/src/private/components/virtualview/VirtualViewNativeComponent.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { ViewProps } from "../../../../Libraries/Components/View/ViewPropTypes";
|
|
14
|
+
import type { DirectEventHandler, Double, Int32 } from "../../../../Libraries/Types/CodegenTypes";
|
|
15
|
+
import type { HostComponent } from "../../types/HostComponent";
|
|
16
|
+
export type NativeModeChangeEvent = Readonly<{
|
|
17
|
+
/**
|
|
18
|
+
* Virtualization mode of the target view.
|
|
19
|
+
*
|
|
20
|
+
* - `0`: Target view is visible.
|
|
21
|
+
* - `1`: Target view is hidden, but can be prerendered.
|
|
22
|
+
* - `2`: Target view is hidden.
|
|
23
|
+
*
|
|
24
|
+
* WORKAROUND: As of this writing, codegen doesn't support enums, so we need
|
|
25
|
+
* to convert `number` into an enum in `VirtualView`.
|
|
26
|
+
*/
|
|
27
|
+
mode: Int32;
|
|
28
|
+
/**
|
|
29
|
+
* Rect of the target view, relative to the nearest ancestor scroll container.
|
|
30
|
+
*/
|
|
31
|
+
targetRect: Readonly<{
|
|
32
|
+
x: Double;
|
|
33
|
+
y: Double;
|
|
34
|
+
width: Double;
|
|
35
|
+
height: Double;
|
|
36
|
+
}>;
|
|
37
|
+
/**
|
|
38
|
+
* Rect of the threshold that determines the mode of the target view, relative
|
|
39
|
+
* to the nearest ancestor scroll container.
|
|
40
|
+
*
|
|
41
|
+
* - `Visible`: Rect in which the target view is visible.
|
|
42
|
+
* - `Prerender`: Rect in which the target view is prerendered.
|
|
43
|
+
* - `Hidden`: Unused, without any guarantees.
|
|
44
|
+
*
|
|
45
|
+
* This can be used to determine whether and how much new content to render.
|
|
46
|
+
*/
|
|
47
|
+
thresholdRect: Readonly<{
|
|
48
|
+
x: Double;
|
|
49
|
+
y: Double;
|
|
50
|
+
width: Double;
|
|
51
|
+
height: Double;
|
|
52
|
+
}>;
|
|
53
|
+
}>;
|
|
54
|
+
type VirtualViewNativeProps = Readonly<Omit<ViewProps, keyof {
|
|
55
|
+
/**
|
|
56
|
+
* Whether the initial mode should be `Hidden`.
|
|
57
|
+
*/
|
|
58
|
+
initialHidden?: boolean | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* This was needed to get VirtualViewManagerDelegate to set this property.
|
|
61
|
+
* TODO: Investigate why spread ViewProps doesn't call setter
|
|
62
|
+
*/
|
|
63
|
+
removeClippedSubviews?: boolean | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Render state of children.
|
|
66
|
+
*
|
|
67
|
+
* - `0`: Reserved to represent unknown future values.
|
|
68
|
+
* - `1`: Children are rendered.
|
|
69
|
+
* - `2`: Children are not rendered.
|
|
70
|
+
*
|
|
71
|
+
* WORKAROUND: As of this writing, codegen doesn't support enums, so we need
|
|
72
|
+
* to convert `number` into an enum in `VirtualView`.
|
|
73
|
+
*/
|
|
74
|
+
renderState: Int32;
|
|
75
|
+
/**
|
|
76
|
+
* See `NativeModeChangeEvent`.
|
|
77
|
+
*/
|
|
78
|
+
onModeChange?: DirectEventHandler<NativeModeChangeEvent> | undefined;
|
|
79
|
+
}> & {
|
|
80
|
+
/**
|
|
81
|
+
* Whether the initial mode should be `Hidden`.
|
|
82
|
+
*/
|
|
83
|
+
initialHidden?: boolean | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* This was needed to get VirtualViewManagerDelegate to set this property.
|
|
86
|
+
* TODO: Investigate why spread ViewProps doesn't call setter
|
|
87
|
+
*/
|
|
88
|
+
removeClippedSubviews?: boolean | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Render state of children.
|
|
91
|
+
*
|
|
92
|
+
* - `0`: Reserved to represent unknown future values.
|
|
93
|
+
* - `1`: Children are rendered.
|
|
94
|
+
* - `2`: Children are not rendered.
|
|
95
|
+
*
|
|
96
|
+
* WORKAROUND: As of this writing, codegen doesn't support enums, so we need
|
|
97
|
+
* to convert `number` into an enum in `VirtualView`.
|
|
98
|
+
*/
|
|
99
|
+
renderState: Int32;
|
|
100
|
+
/**
|
|
101
|
+
* See `NativeModeChangeEvent`.
|
|
102
|
+
*/
|
|
103
|
+
onModeChange?: DirectEventHandler<NativeModeChangeEvent> | undefined;
|
|
104
|
+
}>;
|
|
105
|
+
declare const $$VirtualViewNativeComponent: HostComponent<VirtualViewNativeProps>;
|
|
106
|
+
declare type $$VirtualViewNativeComponent = typeof $$VirtualViewNativeComponent;
|
|
107
|
+
export default $$VirtualViewNativeComponent;
|
|
@@ -0,0 +1,28 @@
|
|
|
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<<4f110f5f646cd2735e40a78452c8dcc6>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/src/private/devsupport/devmenu/DevMenu.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The DevMenu module exposes methods for interacting with the Dev Menu in development.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* The DevMenu module exposes methods for interacting with the Dev Menu in development.
|
|
18
|
+
*/
|
|
19
|
+
type DevMenuStatic = {
|
|
20
|
+
/**
|
|
21
|
+
* Show the Dev Menu.
|
|
22
|
+
*/
|
|
23
|
+
show(): void;
|
|
24
|
+
};
|
|
25
|
+
declare const DevMenu: DevMenuStatic;
|
|
26
|
+
declare const $$DevMenu: typeof DevMenu;
|
|
27
|
+
declare type $$DevMenu = typeof $$DevMenu;
|
|
28
|
+
export default $$DevMenu;
|
|
@@ -0,0 +1,26 @@
|
|
|
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<<1028d478babdabc71e24ec4ba8a83745>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/src/private/renderer/events/dispatchNativeEvent.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type EventTarget from "../../webapis/dom/events/EventTarget";
|
|
14
|
+
/**
|
|
15
|
+
* Dispatches a native event through the EventTarget-based dispatch system.
|
|
16
|
+
* This handles:
|
|
17
|
+
* 1. Responder negotiation (touch handling, grant/release lifecycle)
|
|
18
|
+
* 2. Normal event dispatch via dispatchTrustedEvent (capture/bubble phases)
|
|
19
|
+
*
|
|
20
|
+
* Called from the React renderer's dispatchEvent when
|
|
21
|
+
* enableNativeEventTargetEventDispatching is enabled.
|
|
22
|
+
*/
|
|
23
|
+
declare function dispatchNativeEvent(target: EventTarget, type: string, payload: {
|
|
24
|
+
[$$Key$$: string]: unknown;
|
|
25
|
+
}): void;
|
|
26
|
+
export default dispatchNativeEvent;
|
|
@@ -0,0 +1,27 @@
|
|
|
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<<2febbfd80bce757cf46efd86001c72cf>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/src/private/specs_DEPRECATED/modules/NativeAppearance.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { TurboModule } from "../../../../Libraries/TurboModule/RCTExport";
|
|
14
|
+
export type ColorSchemeName = "light" | "dark";
|
|
15
|
+
export type ColorSchemeOverride = "light" | "dark" | "auto" | "unspecified";
|
|
16
|
+
export type AppearancePreferences = {
|
|
17
|
+
colorScheme: ColorSchemeName;
|
|
18
|
+
};
|
|
19
|
+
export interface Spec extends TurboModule {
|
|
20
|
+
readonly getColorScheme: () => ColorSchemeName;
|
|
21
|
+
readonly setColorScheme: (colorScheme: ColorSchemeOverride) => void;
|
|
22
|
+
readonly addListener: (eventName: string) => void;
|
|
23
|
+
readonly removeListeners: (count: number) => void;
|
|
24
|
+
}
|
|
25
|
+
declare const $$NativeAppearance: null | undefined | Spec;
|
|
26
|
+
declare type $$NativeAppearance = typeof $$NativeAppearance;
|
|
27
|
+
export default $$NativeAppearance;
|
|
@@ -0,0 +1,46 @@
|
|
|
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<<9b238e384714e34ec8962bb5283f2d4e>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/src/private/specs_DEPRECATED/modules/NativeDeviceInfo.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { TurboModule } from "../../../../Libraries/TurboModule/RCTExport";
|
|
14
|
+
export type DisplayMetricsAndroid = {
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
scale: number;
|
|
18
|
+
fontScale: number;
|
|
19
|
+
densityDpi: number;
|
|
20
|
+
};
|
|
21
|
+
export type DisplayMetrics = {
|
|
22
|
+
width: number;
|
|
23
|
+
height: number;
|
|
24
|
+
scale: number;
|
|
25
|
+
fontScale: number;
|
|
26
|
+
};
|
|
27
|
+
export type DimensionsPayload = {
|
|
28
|
+
window?: DisplayMetrics | undefined;
|
|
29
|
+
screen?: DisplayMetrics | undefined;
|
|
30
|
+
windowPhysicalPixels?: DisplayMetricsAndroid | undefined;
|
|
31
|
+
screenPhysicalPixels?: DisplayMetricsAndroid | undefined;
|
|
32
|
+
};
|
|
33
|
+
export type DeviceInfoConstants = {
|
|
34
|
+
readonly Dimensions: DimensionsPayload;
|
|
35
|
+
readonly isEdgeToEdge?: boolean | undefined;
|
|
36
|
+
readonly isIPhoneX_deprecated?: boolean | undefined;
|
|
37
|
+
};
|
|
38
|
+
export interface Spec extends TurboModule {
|
|
39
|
+
readonly getConstants: () => DeviceInfoConstants;
|
|
40
|
+
}
|
|
41
|
+
declare const NativeDeviceInfo: {
|
|
42
|
+
getConstants(): DeviceInfoConstants;
|
|
43
|
+
};
|
|
44
|
+
declare const $$NativeDeviceInfo: typeof NativeDeviceInfo;
|
|
45
|
+
declare type $$NativeDeviceInfo = typeof $$NativeDeviceInfo;
|
|
46
|
+
export default $$NativeDeviceInfo;
|
|
@@ -0,0 +1,45 @@
|
|
|
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<<367ded3d83686497acd3e6e5af39e280>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/src/private/specs_DEPRECATED/modules/NativeExceptionsManager.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { TurboModule } from "../../../../Libraries/TurboModule/RCTExport";
|
|
14
|
+
export type StackFrame = {
|
|
15
|
+
column: number | undefined;
|
|
16
|
+
file: string | undefined;
|
|
17
|
+
lineNumber: number | undefined;
|
|
18
|
+
methodName: string;
|
|
19
|
+
collapse?: boolean | undefined;
|
|
20
|
+
};
|
|
21
|
+
export type ExceptionData = {
|
|
22
|
+
message: string;
|
|
23
|
+
originalMessage: string | undefined;
|
|
24
|
+
name: string | undefined;
|
|
25
|
+
componentStack: string | undefined;
|
|
26
|
+
stack: Array<StackFrame>;
|
|
27
|
+
id: number;
|
|
28
|
+
isFatal: boolean;
|
|
29
|
+
extraData?: Object | undefined;
|
|
30
|
+
};
|
|
31
|
+
export interface Spec extends TurboModule {
|
|
32
|
+
readonly reportFatalException: (message: string, stack: Array<StackFrame>, exceptionId: number) => void;
|
|
33
|
+
readonly reportSoftException: (message: string, stack: Array<StackFrame>, exceptionId: number) => void;
|
|
34
|
+
readonly reportException?: ((data: ExceptionData) => void) | undefined;
|
|
35
|
+
readonly dismissRedbox?: (() => void) | undefined;
|
|
36
|
+
}
|
|
37
|
+
declare const ExceptionsManager: {
|
|
38
|
+
reportFatalException(message: string, stack: Array<StackFrame>, exceptionId: number): void;
|
|
39
|
+
reportSoftException(message: string, stack: Array<StackFrame>, exceptionId: number): void;
|
|
40
|
+
dismissRedbox(): void;
|
|
41
|
+
reportException(data: ExceptionData): void;
|
|
42
|
+
};
|
|
43
|
+
declare const $$NativeExceptionsManager: typeof ExceptionsManager;
|
|
44
|
+
declare type $$NativeExceptionsManager = typeof $$NativeExceptionsManager;
|
|
45
|
+
export default $$NativeExceptionsManager;
|
|
@@ -0,0 +1,27 @@
|
|
|
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<<3c54180144c97362d2c58f89bb7d4ca6>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/src/private/specs_DEPRECATED/modules/NativeI18nManager.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { TurboModule } from "../../../../Libraries/TurboModule/RCTExport";
|
|
14
|
+
export type I18nManagerConstants = {
|
|
15
|
+
doLeftAndRightSwapInRTL: boolean;
|
|
16
|
+
isRTL: boolean;
|
|
17
|
+
localeIdentifier?: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
export interface Spec extends TurboModule {
|
|
20
|
+
readonly getConstants: () => I18nManagerConstants;
|
|
21
|
+
allowRTL: (allowRTL: boolean) => void;
|
|
22
|
+
forceRTL: (forceRTL: boolean) => void;
|
|
23
|
+
swapLeftAndRightInRTL: (flipStyles: boolean) => void;
|
|
24
|
+
}
|
|
25
|
+
declare const $$NativeI18nManager: null | undefined | Spec;
|
|
26
|
+
declare type $$NativeI18nManager = typeof $$NativeI18nManager;
|
|
27
|
+
export default $$NativeI18nManager;
|
|
@@ -0,0 +1,109 @@
|
|
|
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<<449390d7c183b7ee7e8df2b8bd2087f8>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/src/private/specs_DEPRECATED/modules/NativeUIManager.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { RootTag } from "../../../../Libraries/TurboModule/RCTExport";
|
|
14
|
+
import type { TurboModule } from "../../../../Libraries/TurboModule/RCTExport";
|
|
15
|
+
export type NativeMeasureOnSuccessCallback = (x: number, y: number, width: number, height: number, pageX: number, pageY: number) => void;
|
|
16
|
+
export type NativeMeasureInWindowOnSuccessCallback = (x: number, y: number, width: number, height: number) => void;
|
|
17
|
+
export type NativeMeasureLayoutOnSuccessCallback = (left: number, top: number, width: number, height: number) => void;
|
|
18
|
+
export interface Spec extends TurboModule {
|
|
19
|
+
readonly getConstants: () => Object;
|
|
20
|
+
readonly createView: (reactTag: number, viewName: string, rootTag: RootTag, props: Object) => void;
|
|
21
|
+
readonly updateView: (reactTag: number, viewName: string, props: Object) => void;
|
|
22
|
+
readonly findSubviewIn: (reactTag: number, point: Array<number>, callback: (nativeViewTag: number, left: number, top: number, width: number, height: number) => void) => void;
|
|
23
|
+
/**
|
|
24
|
+
* Used to call a native view method from JavaScript
|
|
25
|
+
*
|
|
26
|
+
* reactTag - Id of react view.
|
|
27
|
+
* commandID - Id of the native method that should be called.
|
|
28
|
+
* commandArgs - Args of the native method that we can pass from JS to native.
|
|
29
|
+
*/
|
|
30
|
+
readonly dispatchViewManagerCommand: (reactTag: number, commandID: number, commandArgs?: Array<any>) => void;
|
|
31
|
+
/**
|
|
32
|
+
* Determines the location on screen, width, and height of the given view and
|
|
33
|
+
* returns the values via an async callback. If successful, the callback will
|
|
34
|
+
* be called with the following arguments:
|
|
35
|
+
*
|
|
36
|
+
* - x
|
|
37
|
+
* - y
|
|
38
|
+
* - width
|
|
39
|
+
* - height
|
|
40
|
+
* - pageX
|
|
41
|
+
* - pageY
|
|
42
|
+
*
|
|
43
|
+
* Note that these measurements are not available until after the rendering
|
|
44
|
+
* has been completed in native. If you need the measurements as soon as
|
|
45
|
+
* possible, consider using the [`onLayout`
|
|
46
|
+
* prop](docs/view.html#onlayout) instead.
|
|
47
|
+
*
|
|
48
|
+
* @deprecated Use `ref.measure` instead.
|
|
49
|
+
*/
|
|
50
|
+
readonly measure: (reactTag: number, callback: NativeMeasureOnSuccessCallback) => void;
|
|
51
|
+
/**
|
|
52
|
+
* Determines the location of the given view in the window and returns the
|
|
53
|
+
* values via an async callback. If the React root view is embedded in
|
|
54
|
+
* another native view, this will give you the absolute coordinates. If
|
|
55
|
+
* successful, the callback will be called with the following
|
|
56
|
+
* arguments:
|
|
57
|
+
*
|
|
58
|
+
* - x
|
|
59
|
+
* - y
|
|
60
|
+
* - width
|
|
61
|
+
* - height
|
|
62
|
+
*
|
|
63
|
+
* Note that these measurements are not available until after the rendering
|
|
64
|
+
* has been completed in native.
|
|
65
|
+
*
|
|
66
|
+
* @deprecated Use `ref.measureInWindow` instead.
|
|
67
|
+
*/
|
|
68
|
+
readonly measureInWindow: (reactTag: number, callback: NativeMeasureInWindowOnSuccessCallback) => void;
|
|
69
|
+
readonly viewIsDescendantOf: (reactTag: number, ancestorReactTag: number, callback: (result: Array<boolean>) => void) => void;
|
|
70
|
+
/**
|
|
71
|
+
* Like [`measure()`](#measure), but measures the view relative an ancestor,
|
|
72
|
+
* specified as `relativeToNativeNode`. This means that the returned x, y
|
|
73
|
+
* are relative to the origin x, y of the ancestor view.
|
|
74
|
+
*
|
|
75
|
+
* As always, to obtain a native node handle for a component, you can use
|
|
76
|
+
* `React.findNodeHandle(component)`.
|
|
77
|
+
*
|
|
78
|
+
* @deprecated Use `ref.measureLayout` instead.
|
|
79
|
+
*/
|
|
80
|
+
readonly measureLayout: (reactTag: number, ancestorReactTag: number, errorCallback: (error: Object) => void, callback: NativeMeasureLayoutOnSuccessCallback) => void;
|
|
81
|
+
readonly measureLayoutRelativeToParent: (reactTag: number, errorCallback: (error: Object) => void, callback: (left: number, top: number, width: number, height: number) => void) => void;
|
|
82
|
+
readonly setJSResponder: (reactTag: number, blockNativeResponder: boolean) => void;
|
|
83
|
+
readonly clearJSResponder: () => void;
|
|
84
|
+
readonly configureNextLayoutAnimation: (config: Object, callback: () => void, errorCallback: (error: Object) => void) => void;
|
|
85
|
+
readonly setChildren: (containerTag: number, reactTags: Array<number>) => void;
|
|
86
|
+
readonly manageChildren: (containerTag: number, moveFromIndices: Array<number>, moveToIndices: Array<number>, addChildReactTags: Array<number>, addAtIndices: Array<number>, removeAtIndices: Array<number>) => void;
|
|
87
|
+
readonly getConstantsForViewManager?: ((viewManagerName: string) => Object | undefined) | undefined;
|
|
88
|
+
readonly getDefaultEventTypes?: (() => Array<string>) | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Automatically animates views to their new positions when the
|
|
91
|
+
* next layout happens.
|
|
92
|
+
*
|
|
93
|
+
* A common way to use this API is to call it before calling `setState`.
|
|
94
|
+
*
|
|
95
|
+
* Note that in order to get this to work on **Android** you need to set the following flags via `UIManager`:
|
|
96
|
+
*
|
|
97
|
+
* ```js
|
|
98
|
+
* UIManager.setLayoutAnimationEnabledExperimental && UIManager.setLayoutAnimationEnabledExperimental(true);
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
readonly setLayoutAnimationEnabledExperimental?: ((enabled: boolean) => void) | undefined;
|
|
102
|
+
readonly sendAccessibilityEvent?: ((reactTag: number, eventType: number) => void) | undefined;
|
|
103
|
+
readonly lazilyLoadView?: ((name: string) => Object) | undefined;
|
|
104
|
+
readonly focus?: ((reactTag: number) => void) | undefined;
|
|
105
|
+
readonly blur?: ((reactTag: number) => void) | undefined;
|
|
106
|
+
}
|
|
107
|
+
declare const $$NativeUIManager: Spec;
|
|
108
|
+
declare type $$NativeUIManager = typeof $$NativeUIManager;
|
|
109
|
+
export default $$NativeUIManager;
|
|
@@ -0,0 +1,19 @@
|
|
|
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<<ebc5447e24461b23e9aff624a393f79a>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/src/private/styles/composeStyles.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Combines two styles such that `style2` will override any styles in `style1`.
|
|
15
|
+
* If either style is null or undefined, the other one is returned without
|
|
16
|
+
* allocating an array, saving allocations and enabling memoization.
|
|
17
|
+
*/
|
|
18
|
+
declare function composeStyles<T, U extends T, V extends T>(style1: null | undefined | U, style2: null | undefined | V): null | undefined | (T | ReadonlyArray<T>);
|
|
19
|
+
export default composeStyles;
|
|
@@ -0,0 +1,19 @@
|
|
|
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<<18d7fc778fd55326ee6ff956ad8b361c>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/src/private/types/HostComponent.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import * as React from "react";
|
|
14
|
+
import type { HostInstance } from "./HostInstance";
|
|
15
|
+
export type HostComponent<Config extends {}> = (props: Omit<Config, keyof {
|
|
16
|
+
ref?: React.Ref<HostInstance> | undefined;
|
|
17
|
+
}> & {
|
|
18
|
+
ref?: React.Ref<HostInstance> | undefined;
|
|
19
|
+
}) => React.ReactNode;
|
|
@@ -0,0 +1,57 @@
|
|
|
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<<1f7e99a6629d7becc655117f2b7d0f7d>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/src/private/types/HostInstance.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type ReactNativeElement from "../webapis/dom/nodes/ReactNativeElement";
|
|
14
|
+
export type MeasureOnSuccessCallback = (x: number, y: number, width: number, height: number, pageX: number, pageY: number) => void;
|
|
15
|
+
export type MeasureInWindowOnSuccessCallback = (x: number, y: number, width: number, height: number) => void;
|
|
16
|
+
export type MeasureLayoutOnSuccessCallback = (left: number, top: number, width: number, height: number) => void;
|
|
17
|
+
/**
|
|
18
|
+
* Represents an instance of a React Native host component — i.e. a component
|
|
19
|
+
* directly backed by a native view (e.g. `<View>`, `<Text>`, `<TextInput>`).
|
|
20
|
+
*
|
|
21
|
+
* `HostInstance` is an alias for `ReactNativeElement`, which exposes a
|
|
22
|
+
* DOM-compatible element interface. This aligns with the New Architecture's
|
|
23
|
+
* approach of surfacing W3C-compatible APIs for direct manipulation of native
|
|
24
|
+
* views.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* **Prefer component-specific `*Instance` types for refs.**
|
|
28
|
+
* For most use cases, import the dedicated instance type for the component
|
|
29
|
+
* you're working with rather than using `HostInstance` directly:
|
|
30
|
+
*
|
|
31
|
+
* ```tsx
|
|
32
|
+
* import type { ViewInstance, TextInputInstance } from 'react-native';
|
|
33
|
+
*
|
|
34
|
+
* const viewRef = useRef<ViewInstance>(null);
|
|
35
|
+
* const inputRef = useRef<TextInputInstance>(null);
|
|
36
|
+
* ```
|
|
37
|
+
*
|
|
38
|
+
* `HostInstance` is the correct choice for **library authors** writing
|
|
39
|
+
* component-agnostic utilities that accept any native element ref. For
|
|
40
|
+
* application code targeting a specific component, `HostInstance` silently
|
|
41
|
+
* loses access to component-specific imperative methods (e.g.
|
|
42
|
+
* `TextInputInstance.clear()`, `ScrollViewInstance.scrollTo()`).
|
|
43
|
+
*
|
|
44
|
+
* **Only available on host components.** Composite components — including most
|
|
45
|
+
* app-defined components — do not expose a `HostInstance` unless they forward
|
|
46
|
+
* a ref to an underlying host component via `React.forwardRef`.
|
|
47
|
+
*
|
|
48
|
+
* **Avoid direct manipulation where possible.** Prefer `setState` and
|
|
49
|
+
* controlled props. Direct manipulation bypasses React's reconciliation and
|
|
50
|
+
* can cause subtle conflicts if the same property is also managed via props.
|
|
51
|
+
* The primary valid use case is performance-sensitive scenarios such as
|
|
52
|
+
* continuous animations, where triggering a full re-render on every frame
|
|
53
|
+
* would introduce unacceptable overhead.
|
|
54
|
+
*
|
|
55
|
+
* @see {@link https://reactnative.dev/docs/the-new-architecture/direct-manipulation-new-architecture | Direct Manipulation}
|
|
56
|
+
*/
|
|
57
|
+
export type HostInstance = ReactNativeElement;
|
|
@@ -0,0 +1,27 @@
|
|
|
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<<55e049246177fc2ab542bd49fdb240c0>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/src/private/webapis/dom/events/CustomEvent.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* This module implements the `CustomEvent` interface from the DOM.
|
|
15
|
+
* See https://dom.spec.whatwg.org/#interface-customevent.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import type { EventInit } from "./Event";
|
|
19
|
+
import Event from "./Event";
|
|
20
|
+
export interface CustomEventInit extends EventInit {
|
|
21
|
+
readonly detail?: unknown | undefined;
|
|
22
|
+
}
|
|
23
|
+
declare class CustomEvent extends Event {
|
|
24
|
+
constructor(type: string, options?: null | undefined | CustomEventInit);
|
|
25
|
+
get detail(): unknown;
|
|
26
|
+
}
|
|
27
|
+
export default CustomEvent;
|