react-native-tvos 0.86.2-0 → 0.86.3-0
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/Components/TV/TVFocusGuideView.js +31 -0
- package/Libraries/Components/TV/useFocusEnterLeave.js +112 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/README.md +2 -0
- package/React/Base/RCTVersion.m +1 -1
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +30 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.kt +10 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/intent/IntentModule.kt +7 -3
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- package/ReactCommon/react/nativemodule/dom/NativeDOM.cpp +10 -4
- package/ReactCommon/react/renderer/core/EventEmitter.cpp +20 -4
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm +1 -1
- package/ReactCommon/yoga/Yoga.podspec +1 -1
- package/package.json +10 -10
- package/sdks/.hermesv1version +1 -1
- package/sdks/hermes-engine/hermes-engine.podspec +6 -1
- package/sdks/hermes-engine/version.properties +1 -1
- package/types/public/ReactNativeTVTypes.d.ts +12 -1
- package/types_generated/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +101 -0
- package/types_generated/Libraries/Alert/Alert.d.ts +55 -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 +128 -0
- package/types_generated/Libraries/Animated/AnimatedPlatformConfig.d.ts +13 -0
- package/types_generated/Libraries/Animated/Easing.d.ts +171 -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 +47 -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 +63 -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 +20 -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 +232 -0
- package/types_generated/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.d.ts +20 -0
- package/types_generated/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +84 -0
- package/types_generated/Libraries/Components/Button.d.ts +247 -0
- package/types_generated/Libraries/Components/Clipboard/Clipboard.d.ts +38 -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 +176 -0
- package/types_generated/Libraries/Components/Keyboard/Keyboard.d.ts +146 -0
- package/types_generated/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts +73 -0
- package/types_generated/Libraries/Components/LayoutConformance/LayoutConformance.d.ts +23 -0
- package/types_generated/Libraries/Components/Pressable/Pressable.d.ts +146 -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/ProgressBarAndroidNativeComponent.d.ts +14 -0
- package/types_generated/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.d.ts +50 -0
- package/types_generated/Libraries/Components/RefreshControl/RefreshControl.d.ts +113 -0
- package/types_generated/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +33 -0
- package/types_generated/Libraries/Components/ScrollView/ScrollView.d.ts +581 -0
- package/types_generated/Libraries/Components/ScrollView/ScrollViewContext.d.ts +24 -0
- package/types_generated/Libraries/Components/ScrollView/ScrollViewNativeComponent.d.ts +21 -0
- package/types_generated/Libraries/Components/ScrollView/ScrollViewNativeComponentType.d.ts +140 -0
- package/types_generated/Libraries/Components/ScrollView/ScrollViewStickyHeader.d.ts +36 -0
- package/types_generated/Libraries/Components/StatusBar/StatusBar.d.ts +222 -0
- package/types_generated/Libraries/Components/Switch/AndroidSwitchNativeComponent.d.ts +14 -0
- package/types_generated/Libraries/Components/Switch/Switch.d.ts +138 -0
- package/types_generated/Libraries/Components/Switch/SwitchNativeComponent.d.ts +14 -0
- package/types_generated/Libraries/Components/TV/TVEventControl.d.ts +23 -0
- package/types_generated/Libraries/Components/TV/TVEventHandler.d.ts +21 -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 +86 -0
- package/types_generated/Libraries/Components/TextInput/TextInput.d.ts +47 -0
- package/types_generated/Libraries/Components/TextInput/TextInput.flow.d.ts +1005 -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/Touchable.d.ts +257 -0
- package/types_generated/Libraries/Components/Touchable/TouchableHighlight.d.ts +51 -0
- package/types_generated/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts +192 -0
- package/types_generated/Libraries/Components/Touchable/TouchableOpacity.d.ts +35 -0
- package/types_generated/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +121 -0
- package/types_generated/Libraries/Components/View/View.d.ts +30 -0
- package/types_generated/Libraries/Components/View/ViewAccessibility.d.ts +415 -0
- package/types_generated/Libraries/Components/View/ViewNativeComponent.d.ts +39 -0
- package/types_generated/Libraries/Components/View/ViewPropTypes.d.ts +367 -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 +42 -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 +21 -0
- package/types_generated/Libraries/Image/AssetSourceResolver.d.ts +71 -0
- package/types_generated/Libraries/Image/Image.d.ts +18 -0
- package/types_generated/Libraries/Image/ImageBackground.d.ts +44 -0
- package/types_generated/Libraries/Image/ImageProps.d.ts +512 -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 +61 -0
- package/types_generated/Libraries/Interaction/InteractionManager.d.ts +117 -0
- package/types_generated/Libraries/Interaction/PanResponder.d.ts +228 -0
- package/types_generated/Libraries/LayoutAnimation/LayoutAnimation.d.ts +76 -0
- package/types_generated/Libraries/Linking/Linking.d.ts +68 -0
- package/types_generated/Libraries/Lists/FlatList.d.ts +317 -0
- package/types_generated/Libraries/Lists/SectionList.d.ts +172 -0
- package/types_generated/Libraries/Lists/VirtualizedList.d.ts +19 -0
- package/types_generated/Libraries/Lists/VirtualizedSectionList.d.ts +19 -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 +29 -0
- package/types_generated/Libraries/Modal/Modal.d.ts +110 -0
- package/types_generated/Libraries/NativeComponent/NativeComponentRegistry.d.ts +50 -0
- package/types_generated/Libraries/NativeModules/specs/NativeDialogManagerAndroid.d.ts +17 -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 +61 -0
- package/types_generated/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +129 -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 +323 -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 +73 -0
- package/types_generated/Libraries/ReactNative/DisplayMode.d.ts +24 -0
- package/types_generated/Libraries/ReactNative/I18nManager.d.ts +23 -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 +33 -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 +85 -0
- package/types_generated/Libraries/StyleSheet/EdgeInsetsPropType.d.ts +15 -0
- package/types_generated/Libraries/StyleSheet/PlatformColorValueTypes.d.ts +17 -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 +851 -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 +30 -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 +220 -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 +355 -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 +31 -0
- package/types_generated/Libraries/Utilities/BackHandler.d.ts +27 -0
- package/types_generated/Libraries/Utilities/DevSettings.d.ts +34 -0
- package/types_generated/Libraries/Utilities/DeviceInfo.d.ts +17 -0
- package/types_generated/Libraries/Utilities/Dimensions.d.ts +54 -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 +110 -0
- package/types_generated/Libraries/Utilities/Platform.d.ts +16 -0
- package/types_generated/Libraries/Utilities/PlatformTypes.d.ts +134 -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 +15 -0
- package/types_generated/Libraries/Utilities/useWindowDimensions.d.ts +15 -0
- package/types_generated/Libraries/Vibration/Vibration.d.ts +29 -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 +184 -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/specs_DEPRECATED/components/AndroidSwitchNativeComponent.d.ts +53 -0
- package/types_generated/src/private/specs_DEPRECATED/components/ProgressBarAndroidNativeComponent.d.ts +36 -0
- package/types_generated/src/private/specs_DEPRECATED/components/SwitchNativeComponent.d.ts +51 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeAppearance.d.ts +26 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeDeviceInfo.d.ts +46 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeDialogManagerAndroid.d.ts +37 -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 +92 -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 +33 -0
- package/types_generated/src/private/webapis/dom/nodes/ReactNativeElement.d.ts +36 -0
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyCharacterData.d.ts +30 -0
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyElement.d.ts +54 -0
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyNode.d.ts +129 -0
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyText.d.ts +24 -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 +22 -0
- package/types_generated/src/private/webapis/dom/oldstylecollections/NodeList.d.ts +25 -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/tsconfig.json +3 -0
- package/types_generated/tsconfig.test.json +16 -0
|
@@ -0,0 +1,229 @@
|
|
|
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<<51b28effce22d8a09023992a9e76cab4>>
|
|
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/nodes/specs/NativeDOM.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { RootTag } from "../../../../../../Libraries/ReactNative/RootTag";
|
|
14
|
+
import type { TurboModule } from "../../../../../../Libraries/TurboModule/RCTExport";
|
|
15
|
+
import type { InstanceHandle } from "../internals/NodeInternals";
|
|
16
|
+
export declare type NativeElementReference = symbol & {
|
|
17
|
+
__NativeElementReference__: string;
|
|
18
|
+
};
|
|
19
|
+
export declare type NativeTextReference = symbol & {
|
|
20
|
+
__NativeTextReference__: string;
|
|
21
|
+
};
|
|
22
|
+
export type NativeNodeReference = NativeElementReference | NativeTextReference | RootTag;
|
|
23
|
+
export type MeasureInWindowOnSuccessCallback = (x: number, y: number, width: number, height: number) => void;
|
|
24
|
+
export type MeasureOnSuccessCallback = (x: number, y: number, width: number, height: number, pageX: number, pageY: number) => void;
|
|
25
|
+
export type MeasureLayoutOnSuccessCallback = (left: number, top: number, width: number, height: number) => void;
|
|
26
|
+
export interface Spec extends TurboModule {
|
|
27
|
+
readonly compareDocumentPosition: (nativeNodeReference: unknown, otherNativeNodeReference: unknown) => number;
|
|
28
|
+
readonly getChildNodes: (nativeNodeReference: unknown) => ReadonlyArray<unknown>;
|
|
29
|
+
readonly getElementById?: (nativeNodeReference: unknown, id: string) => unknown;
|
|
30
|
+
readonly getParentNode: (nativeNodeReference: unknown) => unknown;
|
|
31
|
+
readonly isConnected: (nativeNodeReference: unknown) => boolean;
|
|
32
|
+
readonly getBorderWidth: (nativeElementReference: unknown) => ReadonlyArray<number>;
|
|
33
|
+
readonly getBoundingClientRect: (nativeElementReference: unknown, includeTransform: boolean) => ReadonlyArray<number>;
|
|
34
|
+
readonly getInnerSize: (nativeElementReference: unknown) => ReadonlyArray<number>;
|
|
35
|
+
readonly getScrollPosition: (nativeElementReference: unknown) => ReadonlyArray<number>;
|
|
36
|
+
readonly getScrollSize: (nativeElementReference: unknown) => ReadonlyArray<number>;
|
|
37
|
+
readonly getTagName: (nativeElementReference: unknown) => string;
|
|
38
|
+
readonly getTextContent: (nativeElementReference: unknown) => string;
|
|
39
|
+
readonly hasPointerCapture: (nativeElementReference: unknown, pointerId: number) => boolean;
|
|
40
|
+
readonly releasePointerCapture: (nativeElementReference: unknown, pointerId: number) => void;
|
|
41
|
+
readonly setPointerCapture: (nativeElementReference: unknown, pointerId: number) => void;
|
|
42
|
+
readonly getOffset: (nativeElementReference: unknown) => ReadonlyArray<unknown>;
|
|
43
|
+
readonly linkRootNode?: (rootTag: number, instanceHandle: unknown) => unknown;
|
|
44
|
+
/**
|
|
45
|
+
* Legacy layout APIs (for `ReactNativeElement`).
|
|
46
|
+
*/
|
|
47
|
+
|
|
48
|
+
readonly measure: (nativeElementReference: unknown, callback: MeasureOnSuccessCallback) => void;
|
|
49
|
+
readonly measureInWindow: (nativeElementReference: unknown, callback: MeasureInWindowOnSuccessCallback) => void;
|
|
50
|
+
readonly measureLayout: (nativeElementReference: unknown, relativeNode: unknown, onFail: () => void, onSuccess: MeasureLayoutOnSuccessCallback) => void;
|
|
51
|
+
/**
|
|
52
|
+
* Legacy direct manipulation APIs (for `ReactNativeElement`).
|
|
53
|
+
*/
|
|
54
|
+
|
|
55
|
+
readonly setNativeProps: (nativeElementReference: unknown, updatePayload: unknown) => void;
|
|
56
|
+
}
|
|
57
|
+
export interface RefinedSpec {
|
|
58
|
+
/**
|
|
59
|
+
* This is a React Native implementation of `Node.prototype.compareDocumentPosition`
|
|
60
|
+
* (see https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition).
|
|
61
|
+
*
|
|
62
|
+
* It uses the version of the shadow nodes that are present in the current
|
|
63
|
+
* revision of the shadow tree (if any). If any of the nodes is not present,
|
|
64
|
+
* it just indicates they are disconnected.
|
|
65
|
+
*/
|
|
66
|
+
readonly compareDocumentPosition: (nativeNodeReference: NativeNodeReference, otherNativeNodeReference: NativeNodeReference) => number;
|
|
67
|
+
/**
|
|
68
|
+
* This is a React Native implementation of `Node.prototype.childNodes`
|
|
69
|
+
* (see https://developer.mozilla.org/en-US/docs/Web/API/Node/childNodes).
|
|
70
|
+
*
|
|
71
|
+
* If a version of the given shadow node is present in the current revision
|
|
72
|
+
* of an active shadow tree, it returns an array of instance handles of its
|
|
73
|
+
* children. Otherwise, it returns an empty array.
|
|
74
|
+
*/
|
|
75
|
+
readonly getChildNodes: (nativeNodeReference: NativeNodeReference) => ReadonlyArray<InstanceHandle>;
|
|
76
|
+
/**
|
|
77
|
+
* This is a React Native implementation of `Document.prototype.getElementById`
|
|
78
|
+
* (see https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementById).
|
|
79
|
+
*
|
|
80
|
+
* If the document is active and contains an element with the given ID, it
|
|
81
|
+
* returns the instance handle of that element. Otherwise, it returns `null`.
|
|
82
|
+
*/
|
|
83
|
+
readonly getElementById: (rootTag: RootTag, id: string) => InstanceHandle | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* This is a React Native implementation of `Node.prototype.parentNode`
|
|
86
|
+
* (see https://developer.mozilla.org/en-US/docs/Web/API/Node/parentNode).
|
|
87
|
+
*
|
|
88
|
+
* If a version of the given shadow node is present in the current revision of
|
|
89
|
+
* an active shadow tree, it returns the instance handle of its parent.
|
|
90
|
+
* Otherwise, it returns `null`.
|
|
91
|
+
*/
|
|
92
|
+
readonly getParentNode: (nativeNodeReference: NativeNodeReference) => InstanceHandle | undefined;
|
|
93
|
+
/**
|
|
94
|
+
* This is a React Native implementation of `Node.prototype.isConnected`
|
|
95
|
+
* (see https://developer.mozilla.org/en-US/docs/Web/API/Node/isConnected).
|
|
96
|
+
*
|
|
97
|
+
* Indicates whether a version of the given shadow node is present in the
|
|
98
|
+
* current revision of an active shadow tree.
|
|
99
|
+
*/
|
|
100
|
+
readonly isConnected: (nativeNodeReference: NativeNodeReference) => boolean;
|
|
101
|
+
/**
|
|
102
|
+
* This is a method to access the border size of a shadow node, to implement
|
|
103
|
+
* these methods:
|
|
104
|
+
* - `Element.prototype.clientLeft`: see https://developer.mozilla.org/en-US/docs/Web/API/Element/clientLeft.
|
|
105
|
+
* - `Element.prototype.clientTop`: see https://developer.mozilla.org/en-US/docs/Web/API/Element/clientTop.
|
|
106
|
+
*
|
|
107
|
+
* It uses the version of the shadow node that is present in the current
|
|
108
|
+
* revision of the shadow tree. If the node is not present, it is not
|
|
109
|
+
* displayed (because any of its ancestors or itself have 'display: none'), or
|
|
110
|
+
* it has an inline display, it returns `undefined`. Otherwise, it returns its
|
|
111
|
+
* border size.
|
|
112
|
+
*/
|
|
113
|
+
readonly getBorderWidth: (nativeElementReference: NativeElementReference) => Readonly<[number, number, number, number]>;
|
|
114
|
+
/**
|
|
115
|
+
* This is a React Native implementation of `Element.prototype.getBoundingClientRect`
|
|
116
|
+
* (see https://developer.mozilla.org/en-US/docs/Web/API/Element/getBoundingClientRect).
|
|
117
|
+
*
|
|
118
|
+
* This is similar to `measureInWindow`, except it's explicitly synchronous
|
|
119
|
+
* (returns the result instead of passing it to a callback).
|
|
120
|
+
*
|
|
121
|
+
* It allows indicating whether to include transforms so it can also be used
|
|
122
|
+
* to implement methods like [`offsetWidth`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetWidth)
|
|
123
|
+
* and [`offsetHeight`](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetHeight).
|
|
124
|
+
*/
|
|
125
|
+
readonly getBoundingClientRect: (nativeElementReference: NativeElementReference, includeTransform: boolean) => Readonly<[number, number, number, number]>;
|
|
126
|
+
/**
|
|
127
|
+
* This is a method to access the inner size of a shadow node, to implement
|
|
128
|
+
* these methods:
|
|
129
|
+
* - `Element.prototype.clientWidth`: see https://developer.mozilla.org/en-US/docs/Web/API/Element/clientWidth.
|
|
130
|
+
* - `Element.prototype.clientHeight`: see https://developer.mozilla.org/en-US/docs/Web/API/Element/clientHeight.
|
|
131
|
+
*
|
|
132
|
+
* It uses the version of the shadow node that is present in the current
|
|
133
|
+
* revision of the shadow tree. If the node is not present, it is not
|
|
134
|
+
* displayed (because any of its ancestors or itself have 'display: none'), or
|
|
135
|
+
* it has an inline display, it returns `undefined`. Otherwise, it returns its
|
|
136
|
+
* inner size.
|
|
137
|
+
*/
|
|
138
|
+
readonly getInnerSize: (nativeElementReference: NativeElementReference) => Readonly<[number, number]>;
|
|
139
|
+
/**
|
|
140
|
+
* This is a method to access scroll information for a shadow node, to
|
|
141
|
+
* implement these methods:
|
|
142
|
+
* - `Element.prototype.scrollLeft`: see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft.
|
|
143
|
+
* - `Element.prototype.scrollTop`: see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTop.
|
|
144
|
+
*
|
|
145
|
+
* It uses the version of the shadow node that is present in the current
|
|
146
|
+
* revision of the shadow tree. If the node is not present or is not displayed
|
|
147
|
+
* (because any of its ancestors or itself have 'display: none'), it returns
|
|
148
|
+
* `undefined`. Otherwise, it returns the scroll position.
|
|
149
|
+
*/
|
|
150
|
+
readonly getScrollPosition: (nativeElementReference: NativeElementReference) => Readonly<[number, number]>;
|
|
151
|
+
/**
|
|
152
|
+
*
|
|
153
|
+
* This is a method to access the scroll information of a shadow node, to
|
|
154
|
+
* implement these methods:
|
|
155
|
+
* - `Element.prototype.scrollWidth`: see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollWidth.
|
|
156
|
+
* - `Element.prototype.scrollHeight`: see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight.
|
|
157
|
+
*
|
|
158
|
+
* It uses the version of the shadow node that is present in the current
|
|
159
|
+
* revision of the shadow tree. If the node is not present or is not displayed
|
|
160
|
+
* (because any of its ancestors or itself have 'display: none'), it returns
|
|
161
|
+
* `undefined`. Otherwise, it returns the scroll size.
|
|
162
|
+
*/
|
|
163
|
+
readonly getScrollSize: (nativeElementReference: NativeElementReference) => Readonly<[number, number]>;
|
|
164
|
+
/**
|
|
165
|
+
* This is a method to access the normalized tag name of a shadow node, to
|
|
166
|
+
* implement `Element.prototype.tagName` (see https://developer.mozilla.org/en-US/docs/Web/API/Element/tagName).
|
|
167
|
+
*/
|
|
168
|
+
readonly getTagName: (nativeElementReference: NativeElementReference) => string;
|
|
169
|
+
/**
|
|
170
|
+
* This is a React Native implementation of `Element.prototype.textContent`
|
|
171
|
+
* (see https://developer.mozilla.org/en-US/docs/Web/API/Element/textContent).
|
|
172
|
+
*
|
|
173
|
+
* It uses the version of the shadow node that is present in the current
|
|
174
|
+
* revision of the shadow tree.
|
|
175
|
+
* If the version is present, is traverses all its children in DFS and
|
|
176
|
+
* concatenates all the text contents. Otherwise, it returns an empty string.
|
|
177
|
+
*
|
|
178
|
+
* This is also used to access the text content of text nodes, which does not
|
|
179
|
+
* need any traversal.
|
|
180
|
+
*/
|
|
181
|
+
readonly getTextContent: (nativeNodeReference: NativeNodeReference) => string;
|
|
182
|
+
readonly hasPointerCapture: (nativeElementReference: NativeElementReference, pointerId: number) => boolean;
|
|
183
|
+
readonly releasePointerCapture: (nativeElementReference: NativeElementReference, pointerId: number) => void;
|
|
184
|
+
readonly setPointerCapture: (nativeElementReference: NativeElementReference, pointerId: number) => void;
|
|
185
|
+
/**
|
|
186
|
+
* This is a method to access the offset information for a shadow node, to
|
|
187
|
+
* implement these methods:
|
|
188
|
+
* - `HTMLElement.prototype.offsetParent`: see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetParent.
|
|
189
|
+
* - `HTMLElement.prototype.offsetTop`: see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetTop.
|
|
190
|
+
* - `HTMLElement.prototype.offsetLeft`: see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetLeft.
|
|
191
|
+
*
|
|
192
|
+
* It uses the version of the shadow node that is present in the current
|
|
193
|
+
* revision of the shadow tree. If the node is not present or is not
|
|
194
|
+
* displayed (because any of its ancestors or itself have 'display: none'),
|
|
195
|
+
* it returns `undefined`. Otherwise, it returns its parent (as all nodes in
|
|
196
|
+
* React Native are currently "positioned") and its offset relative to its
|
|
197
|
+
* parent.
|
|
198
|
+
*/
|
|
199
|
+
readonly getOffset: (nativeElementReference: NativeElementReference) => Readonly<[InstanceHandle | undefined, number, number]>;
|
|
200
|
+
/**
|
|
201
|
+
* In React Native, surfaces that represent trees (similar to a `Document` on
|
|
202
|
+
* Web) are created in native first, and then populated from JavaScript.
|
|
203
|
+
*
|
|
204
|
+
* Because React does not create this special node, we need a way to link
|
|
205
|
+
* the JavaScript instance with that node, which is what this method allows.
|
|
206
|
+
*
|
|
207
|
+
* It also allows the implementation of `Node.prototype.ownerDocument` and
|
|
208
|
+
* `Node.prototype.getRootNode`
|
|
209
|
+
* (see https://developer.mozilla.org/en-US/docs/Web/API/Node/ownerDocument and
|
|
210
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/Node/getRootNode).
|
|
211
|
+
*
|
|
212
|
+
* Returns a shadow node representing the root node if it is still mounted.
|
|
213
|
+
*/
|
|
214
|
+
readonly linkRootNode: (rootTag: RootTag, instanceHandle: InstanceHandle) => NativeElementReference | undefined;
|
|
215
|
+
/**
|
|
216
|
+
* Legacy layout APIs
|
|
217
|
+
*/
|
|
218
|
+
|
|
219
|
+
readonly measure: (nativeElementReference: NativeElementReference, callback: MeasureOnSuccessCallback) => void;
|
|
220
|
+
readonly measureInWindow: (nativeElementReference: NativeElementReference, callback: MeasureInWindowOnSuccessCallback) => void;
|
|
221
|
+
readonly measureLayout: (nativeElementReference: NativeElementReference, relativeNode: NativeElementReference, onFail: () => void, onSuccess: MeasureLayoutOnSuccessCallback) => void;
|
|
222
|
+
/**
|
|
223
|
+
* Legacy direct manipulation APIs
|
|
224
|
+
*/
|
|
225
|
+
readonly setNativeProps: (nativeElementReference: NativeElementReference, updatePayload: {}) => void;
|
|
226
|
+
}
|
|
227
|
+
declare const $$NativeDOM: RefinedSpec;
|
|
228
|
+
declare type $$NativeDOM = typeof $$NativeDOM;
|
|
229
|
+
export default $$NativeDOM;
|
|
@@ -0,0 +1,22 @@
|
|
|
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<<5be75fcca589eed5ad553e6a0da9d6bf>>
|
|
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/oldstylecollections/HTMLCollection.js.flow
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { ArrayLike } from "../../utils/ArrayLikeUtils";
|
|
14
|
+
declare class HTMLCollection<T> implements Iterable<T>, ArrayLike<T> {
|
|
15
|
+
[index: number]: T;
|
|
16
|
+
readonly length: number;
|
|
17
|
+
item(index: number): T | null;
|
|
18
|
+
namedItem(name: string): T | null;
|
|
19
|
+
[Symbol.iterator](): Iterator<T>;
|
|
20
|
+
}
|
|
21
|
+
export default HTMLCollection;
|
|
22
|
+
export declare function createHTMLCollection<T>(elements: ReadonlyArray<T>): HTMLCollection<T>;
|
|
@@ -0,0 +1,25 @@
|
|
|
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<<0c54e399e67bd48b6052258872e79127>>
|
|
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/oldstylecollections/NodeList.js.flow
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { ArrayLike } from "../../utils/ArrayLikeUtils";
|
|
14
|
+
declare class NodeList<T> implements Iterable<T>, ArrayLike<T> {
|
|
15
|
+
[index: number]: T;
|
|
16
|
+
readonly length: number;
|
|
17
|
+
item(index: number): T | null;
|
|
18
|
+
entries(): Iterator<[number, T]>;
|
|
19
|
+
forEach<ThisType>(callbackFn: (value: T, index: number, array: NodeList<T>) => unknown, thisArg?: ThisType): void;
|
|
20
|
+
keys(): Iterator<number>;
|
|
21
|
+
values(): Iterator<T>;
|
|
22
|
+
[Symbol.iterator](): Iterator<T>;
|
|
23
|
+
}
|
|
24
|
+
export default NodeList;
|
|
25
|
+
export declare function createNodeList<T>(elements: ReadonlyArray<T>): NodeList<T>;
|
|
@@ -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<<4552688cce23b18ff9436253d1197cc0>>
|
|
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/geometry/DOMRect.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import DOMRectReadOnly, { type DOMRectInit } from "./DOMRectReadOnly";
|
|
14
|
+
/**
|
|
15
|
+
* A `DOMRect` describes the size and position of a rectangle.
|
|
16
|
+
* The type of box represented by the `DOMRect` is specified by the method or property that returned it.
|
|
17
|
+
*
|
|
18
|
+
* This is a (mostly) spec-compliant version of `DOMRect` (https://developer.mozilla.org/en-US/docs/Web/API/DOMRect).
|
|
19
|
+
*/
|
|
20
|
+
declare class DOMRect extends DOMRectReadOnly {
|
|
21
|
+
/**
|
|
22
|
+
* The x coordinate of the `DOMRect`'s origin.
|
|
23
|
+
*/
|
|
24
|
+
get x(): number;
|
|
25
|
+
set x(x: null | undefined | number);
|
|
26
|
+
/**
|
|
27
|
+
* The y coordinate of the `DOMRect`'s origin.
|
|
28
|
+
*/
|
|
29
|
+
get y(): number;
|
|
30
|
+
set y(y: null | undefined | number);
|
|
31
|
+
/**
|
|
32
|
+
* The width of the `DOMRect`.
|
|
33
|
+
*/
|
|
34
|
+
get width(): number;
|
|
35
|
+
set width(width: null | undefined | number);
|
|
36
|
+
/**
|
|
37
|
+
* The height of the `DOMRect`.
|
|
38
|
+
*/
|
|
39
|
+
get height(): number;
|
|
40
|
+
set height(height: null | undefined | number);
|
|
41
|
+
/**
|
|
42
|
+
* Creates a new `DOMRect` object with a given location and dimensions.
|
|
43
|
+
*/
|
|
44
|
+
static fromRect(rect?: null | undefined | DOMRectInit): DOMRect;
|
|
45
|
+
}
|
|
46
|
+
export default DOMRect;
|
|
@@ -0,0 +1,73 @@
|
|
|
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<<e6bb8991db690c2cabd716a6dbe9a361>>
|
|
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/geometry/DOMRectReadOnly.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export interface DOMRectInit {
|
|
14
|
+
x?: number | undefined;
|
|
15
|
+
y?: number | undefined;
|
|
16
|
+
width?: number | undefined;
|
|
17
|
+
height?: number | undefined;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* The `DOMRectReadOnly` interface specifies the standard properties used by `DOMRect` to define a rectangle whose properties are immutable.
|
|
21
|
+
*
|
|
22
|
+
* This is a (mostly) spec-compliant version of `DOMRectReadOnly` (https://developer.mozilla.org/en-US/docs/Web/API/DOMRectReadOnly).
|
|
23
|
+
*/
|
|
24
|
+
declare class DOMRectReadOnly {
|
|
25
|
+
constructor(x: null | undefined | number, y: null | undefined | number, width: null | undefined | number, height: null | undefined | number);
|
|
26
|
+
/**
|
|
27
|
+
* The x coordinate of the `DOMRectReadOnly`'s origin.
|
|
28
|
+
*/
|
|
29
|
+
get x(): number;
|
|
30
|
+
/**
|
|
31
|
+
* The y coordinate of the `DOMRectReadOnly`'s origin.
|
|
32
|
+
*/
|
|
33
|
+
get y(): number;
|
|
34
|
+
/**
|
|
35
|
+
* The width of the `DOMRectReadOnly`.
|
|
36
|
+
*/
|
|
37
|
+
get width(): number;
|
|
38
|
+
/**
|
|
39
|
+
* The height of the `DOMRectReadOnly`.
|
|
40
|
+
*/
|
|
41
|
+
get height(): number;
|
|
42
|
+
/**
|
|
43
|
+
* Returns the top coordinate value of the `DOMRect` (has the same value as `y`, or `y + height` if `height` is negative).
|
|
44
|
+
*/
|
|
45
|
+
get top(): number;
|
|
46
|
+
/**
|
|
47
|
+
* Returns the right coordinate value of the `DOMRect` (has the same value as ``x + width`, or `x` if `width` is negative).
|
|
48
|
+
*/
|
|
49
|
+
get right(): number;
|
|
50
|
+
/**
|
|
51
|
+
* Returns the bottom coordinate value of the `DOMRect` (has the same value as `y + height`, or `y` if `height` is negative).
|
|
52
|
+
*/
|
|
53
|
+
get bottom(): number;
|
|
54
|
+
/**
|
|
55
|
+
* Returns the left coordinate value of the `DOMRect` (has the same value as `x`, or `x + width` if `width` is negative).
|
|
56
|
+
*/
|
|
57
|
+
get left(): number;
|
|
58
|
+
toJSON(): {
|
|
59
|
+
x: number;
|
|
60
|
+
y: number;
|
|
61
|
+
width: number;
|
|
62
|
+
height: number;
|
|
63
|
+
top: number;
|
|
64
|
+
left: number;
|
|
65
|
+
bottom: number;
|
|
66
|
+
right: number;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Creates a new `DOMRectReadOnly` object with a given location and dimensions.
|
|
70
|
+
*/
|
|
71
|
+
static fromRect(rect?: null | undefined | DOMRectInit): DOMRectReadOnly;
|
|
72
|
+
}
|
|
73
|
+
export default DOMRectReadOnly;
|
|
@@ -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<<83bdb889a43e6235704c4efdda42a4e2>>
|
|
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/utils/ArrayLikeUtils.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* This definition is different from the current built-in type `$ArrayLike`
|
|
15
|
+
* provided by Flow, in that this is an interface and that one is an object.
|
|
16
|
+
*
|
|
17
|
+
* The difference is important because, when using objects, Flow thinks
|
|
18
|
+
* a `length` property would be copied over when using the spread operator,
|
|
19
|
+
* which is incorrect.
|
|
20
|
+
*/
|
|
21
|
+
export interface ArrayLike<T> extends Iterable<T> {
|
|
22
|
+
[indexer: number]: T;
|
|
23
|
+
readonly length: number;
|
|
24
|
+
}
|
|
25
|
+
export declare function createValueIterator<T>(arrayLike: ArrayLike<T>): Iterator<T>;
|
|
26
|
+
export declare function createKeyIterator<T>(arrayLike: ArrayLike<T>): Iterator<number>;
|
|
27
|
+
export declare function createEntriesIterator<T>(arrayLike: ArrayLike<T>): Iterator<[number, T]>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "esnext",
|
|
4
|
+
"lib": ["es2020"],
|
|
5
|
+
"noImplicitAny": true,
|
|
6
|
+
"noImplicitThis": true,
|
|
7
|
+
"types": [],
|
|
8
|
+
"jsx": "react",
|
|
9
|
+
"noEmit": true,
|
|
10
|
+
"forceConsistentCasingInFileNames": true,
|
|
11
|
+
"paths": {"react-native": ["."]},
|
|
12
|
+
"moduleResolution": "bundler",
|
|
13
|
+
"customConditions": ["react-native-strict-api"]
|
|
14
|
+
},
|
|
15
|
+
"include": ["**/*.d.ts", "../types/__typetests__/**/*"]
|
|
16
|
+
}
|