@office-iss/react-native-win32 0.84.0 → 0.85.0-preview.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/.eslintignore +1 -0
- package/.flowconfig +1 -5
- package/CHANGELOG.json +67 -22
- package/CHANGELOG.md +14 -17
- package/IntegrationTests/IntegrationTestHarnessTest.js +1 -1
- package/IntegrationTests/LayoutEventsTest.js +1 -1
- package/IntegrationTests/TimersTest.js +1 -1
- package/Libraries/ActionSheetIOS/ActionSheetIOS.js +3 -3
- package/Libraries/Animated/Animated.d.ts +8 -1
- package/Libraries/Animated/AnimatedEvent.js +4 -4
- package/Libraries/Animated/AnimatedImplementation.js +2 -2
- package/Libraries/Animated/animations/Animation.js +3 -3
- package/Libraries/Animated/animations/DecayAnimation.js +4 -4
- package/Libraries/Animated/animations/SpringAnimation.js +5 -5
- package/Libraries/Animated/animations/TimingAnimation.js +5 -5
- package/Libraries/Animated/createAnimatedComponent.js +7 -7
- package/Libraries/Animated/nodes/AnimatedColor.js +2 -2
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +12 -12
- package/Libraries/Animated/nodes/AnimatedNode.js +3 -3
- package/Libraries/Animated/nodes/AnimatedObject.js +3 -3
- package/Libraries/Animated/nodes/AnimatedProps.js +6 -6
- package/Libraries/Animated/nodes/AnimatedStyle.js +7 -7
- package/Libraries/Animated/nodes/AnimatedTransform.js +13 -13
- package/Libraries/Animated/nodes/AnimatedValue.js +1 -1
- package/Libraries/Animated/nodes/AnimatedValueXY.js +1 -1
- package/Libraries/Animated/nodes/AnimatedWithChildren.js +1 -1
- package/Libraries/Animated/useAnimatedColor.d.ts +15 -0
- package/Libraries/Animated/useAnimatedColor.js +25 -0
- package/Libraries/Animated/useAnimatedValueXY.d.ts +15 -0
- package/Libraries/Animated/useAnimatedValueXY.js +26 -0
- package/Libraries/AppState/AppState.js +1 -1
- package/Libraries/BatchedBridge/MessageQueue.js +3 -3
- package/Libraries/BatchedBridge/NativeModules.js +12 -10
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +30 -26
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +34 -30
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +2 -2
- package/Libraries/Components/Button.js +2 -2
- package/Libraries/Components/Button.win32.js +2 -2
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.js +2 -2
- package/Libraries/Components/EnterString.win32.js +2 -2
- package/Libraries/Components/EnterString.win32.js.map +1 -1
- package/Libraries/Components/Keyboard/Keyboard.js +6 -6
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +1 -1
- package/Libraries/Components/LayoutConformance/LayoutConformance.js +1 -1
- package/Libraries/Components/LayoutConformance/LayoutConformanceNativeComponent.js +1 -1
- package/Libraries/Components/Pressable/Pressable.d.ts +5 -0
- package/Libraries/Components/Pressable/Pressable.js +3 -3
- package/Libraries/Components/Pressable/Pressable.win32.js +3 -3
- package/Libraries/Components/Pressable/useAndroidRippleForView.js +4 -4
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +1 -1
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.js +3 -3
- package/Libraries/Components/RefreshControl/RefreshControl.js +5 -5
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +8 -12
- package/Libraries/Components/ScrollView/ScrollView.d.ts +9 -0
- package/Libraries/Components/ScrollView/ScrollView.js +19 -9
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +8 -18
- package/Libraries/Components/ScrollView/ScrollViewNativeComponentType.js +4 -3
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
- package/Libraries/Components/StaticRenderer.js +1 -1
- package/Libraries/Components/StatusBar/StatusBar.js +8 -8
- package/Libraries/Components/Switch/Switch.js +3 -3
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +33 -48
- package/Libraries/Components/TextInput/InputAccessoryView.js +1 -1
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +6 -11
- package/Libraries/Components/TextInput/TextInput.flow.js +21 -20
- package/Libraries/Components/TextInput/TextInput.flow.win32.js +23 -22
- package/Libraries/Components/TextInput/TextInput.js +8 -4
- package/Libraries/Components/TextInput/TextInput.win32.js +3 -4
- package/Libraries/Components/Touchable/PooledClass.js +1 -1
- package/Libraries/Components/Touchable/Touchable.js +2 -2
- package/Libraries/Components/Touchable/Touchable.win32.js +2 -2
- package/Libraries/Components/Touchable/TouchableBounce.js +4 -4
- package/Libraries/Components/Touchable/TouchableHighlight.js +8 -8
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +7 -7
- package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +7 -7
- package/Libraries/Components/Touchable/TouchableOpacity.js +4 -4
- package/Libraries/Components/Touchable/TouchableWin32.js +1 -1
- package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -1
- package/Libraries/Components/UnimplementedViews/UnimplementedView.js +1 -1
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +68 -31
- package/Libraries/Components/View/ViewAccessibility.js +7 -7
- package/Libraries/Components/View/ViewAccessibility.win32.js +7 -7
- package/Libraries/Components/View/ViewPropTypes.js +14 -14
- package/Libraries/Components/View/ViewPropTypes.win32.js +16 -16
- package/Libraries/Core/Devtools/parseHermesStack.js +8 -8
- package/Libraries/Core/Devtools/symbolicateStackTrace.js +2 -2
- package/Libraries/Core/ExceptionsManager.js +2 -2
- package/Libraries/Core/ExtendedError.js +3 -3
- package/Libraries/Core/RawEventEmitter.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/Timers/JSTimers.js +3 -2
- package/Libraries/Core/setUpDeveloperTools.js +1 -1
- package/Libraries/Core/setUpErrorHandling.js +4 -2
- package/Libraries/Core/setUpReactDevTools.js +23 -6
- package/Libraries/Core/setUpSegmentFetcher.js +1 -1
- package/Libraries/Debugging/DebuggingOverlay.js +2 -2
- package/Libraries/EventEmitter/NativeEventEmitter.js +7 -9
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +1 -1
- package/Libraries/Image/AssetSourceResolver.js +1 -1
- package/Libraries/Image/Image.android.js +172 -306
- package/Libraries/Image/ImageProps.js +9 -11
- package/Libraries/Image/ImageSource.js +2 -2
- package/Libraries/Image/ImageSourceUtils.js +8 -4
- package/Libraries/Image/ImageTypes.flow.js +2 -2
- package/Libraries/Image/ImageViewNativeComponent.js +7 -16
- package/Libraries/Image/nativeImageSource.js +1 -1
- package/Libraries/Interaction/InteractionManager.js +5 -4
- package/Libraries/Interaction/PanResponder.js +1 -1
- package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -2
- package/Libraries/Linking/Linking.js +1 -1
- package/Libraries/Lists/FlatList.js +3 -3
- package/Libraries/Lists/SectionList.js +1 -1
- package/Libraries/Lists/SectionListModern.js +2 -2
- package/Libraries/LogBox/Data/LogBoxData.js +38 -24
- package/Libraries/LogBox/Data/LogBoxLog.js +43 -112
- package/Libraries/LogBox/Data/parseLogBoxLog.js +21 -117
- package/Libraries/LogBox/LogBox.js +42 -19
- package/Libraries/LogBox/LogBoxInspectorContainer.js +2 -2
- package/Libraries/LogBox/LogBoxNotificationContainer.js +2 -2
- package/Libraries/LogBox/UI/LogBoxButton.js +14 -16
- package/Libraries/LogBox/UI/LogBoxInspector.js +2 -2
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +6 -9
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.win32.js +6 -9
- package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorFooterButton.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeaderButton.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorMessageHeader.js +10 -15
- package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +25 -18
- package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.win32.js +15 -16
- package/Libraries/LogBox/UI/LogBoxInspectorSection.js +5 -7
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +8 -10
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.win32.js +11 -13
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +8 -6
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.win32.js +3 -5
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +17 -29
- package/Libraries/LogBox/UI/LogBoxMessage.js +28 -37
- package/Libraries/LogBox/UI/LogBoxNotification.js +1 -1
- package/Libraries/Modal/Modal.js +3 -3
- package/Libraries/NativeComponent/BaseViewConfig.android.js +28 -52
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +19 -21
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +16 -16
- package/Libraries/Network/RCTNetworking.android.js +1 -1
- package/Libraries/Network/RCTNetworking.ios.js +1 -1
- package/Libraries/Network/RCTNetworking.js.flow +1 -1
- package/Libraries/Network/RCTNetworking.win32.js +1 -1
- package/Libraries/Network/RCTNetworkingEventDefinitions.flow.js +1 -1
- package/Libraries/Network/XMLHttpRequest.js +1 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +3 -3
- package/Libraries/Pressability/Pressability.js +5 -5
- package/Libraries/Pressability/Pressability.win32.js +5 -5
- package/Libraries/Pressability/PressabilityDebug.js +1 -1
- package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +1 -1
- package/Libraries/Pressability/usePressability.js +3 -14
- package/Libraries/PushNotificationIOS/PushNotificationIOS.js +2 -2
- package/Libraries/ReactNative/AppContainer-dev.js +18 -1
- package/Libraries/ReactNative/AppContainer.js +1 -1
- package/Libraries/ReactNative/AppRegistry.flow.js +2 -2
- package/Libraries/ReactNative/AppRegistryImpl.js +2 -2
- package/Libraries/ReactNative/FabricUIManager.js +1 -1
- package/Libraries/ReactNative/RendererImplementation.js +4 -4
- package/Libraries/ReactNative/UIManagerProperties.js +1 -1
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +3 -2
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3 -2
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +3 -2
- package/Libraries/Renderer/shims/ReactFabric.js +1 -3
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +1 -3
- package/Libraries/Renderer/shims/ReactNative.js +3 -2
- package/Libraries/Renderer/shims/ReactNativeTypes.js +1 -3
- package/Libraries/Renderer/shims/ReactNativeTypes.win32.js +1 -3
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +1 -3
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +1 -3
- package/Libraries/StyleSheet/PointPropType.js +1 -1
- package/Libraries/StyleSheet/Rect.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.d.ts +0 -5
- package/Libraries/StyleSheet/StyleSheet.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.js.flow +1 -1
- package/Libraries/StyleSheet/StyleSheetExports.js +16 -25
- package/Libraries/StyleSheet/StyleSheetExports.js.flow +2 -7
- package/Libraries/StyleSheet/StyleSheetTypes.js +33 -35
- package/Libraries/StyleSheet/private/_StyleSheetTypesOverrides.js +5 -5
- package/Libraries/StyleSheet/private/_TransformStyle.js +7 -7
- package/Libraries/StyleSheet/processBackgroundImage.js +7 -7
- package/Libraries/StyleSheet/processBackgroundPosition.js +4 -4
- package/Libraries/StyleSheet/processBackgroundRepeat.js +4 -4
- package/Libraries/StyleSheet/processBackgroundSize.js +4 -4
- package/Libraries/StyleSheet/processBoxShadow.js +44 -4
- package/Libraries/StyleSheet/processColorArray.js +2 -2
- package/Libraries/StyleSheet/processFilter.js +2 -2
- package/Libraries/Text/Text.js +295 -627
- package/Libraries/Text/Text.win32.js +360 -744
- package/Libraries/Text/TextNativeComponent.js +14 -7
- package/Libraries/Text/TextNativeComponent.win32.js +14 -7
- package/Libraries/Text/TextProps.js +4 -4
- package/Libraries/Text/TextProps.win32.js +4 -4
- package/Libraries/Types/CodegenTypes.js +1 -1
- package/Libraries/Types/CoreEventTypes.js +21 -21
- package/Libraries/Types/CoreEventTypes.win32.js +22 -21
- package/Libraries/Types/ReactDevToolsTypes.js +2 -2
- package/Libraries/Utilities/Appearance.js +6 -1
- package/Libraries/Utilities/Dimensions.js +1 -1
- package/Libraries/Utilities/Dimensions.win32.js +1 -1
- package/Libraries/Utilities/HMRClient.js +32 -5
- package/Libraries/Utilities/IPerformanceLogger.js +4 -4
- package/Libraries/Utilities/codegenNativeCommands.js +4 -4
- package/Libraries/Utilities/codegenNativeComponent.d.ts +2 -0
- package/Libraries/Utilities/codegenNativeComponent.js +2 -2
- package/Libraries/Utilities/logError.js +1 -1
- package/Libraries/Utilities/stringifySafe.js +3 -3
- package/Libraries/Utilities/useMergeRefs.js +2 -2
- package/Libraries/vendor/core/ErrorUtils.js +4 -4
- package/Libraries/vendor/emitter/EventEmitter.js +16 -20
- package/flow/bom.js.flow +18 -17
- package/flow/dom.js.flow +12 -5
- package/flow/global.js +1 -1
- package/index.js +9 -0
- package/index.win32.js +9 -0
- package/index.win32.js.flow +8 -1
- package/jest/RefreshControlMock.js +2 -2
- package/jest/assetFileTransformer.js +8 -3
- package/jest/mockComponent.js +3 -4
- package/jest/mockNativeComponent.js +1 -1
- package/jest/mocks/ActivityIndicator.js +2 -2
- package/jest/mocks/Image.js +2 -2
- package/jest/mocks/Modal.js +2 -2
- package/jest/mocks/RefreshControl.js +3 -3
- package/jest/mocks/RendererProxy.js +2 -2
- package/jest/mocks/ScrollView.js +5 -5
- package/jest/mocks/Text.js +2 -2
- package/jest/mocks/TextInput.js +2 -2
- package/jest/mocks/View.js +2 -2
- package/jest/mocks/ViewNativeComponent.js +1 -1
- package/jest/mocks/requireNativeComponent.js +1 -1
- package/jest/mocks/useColorScheme.js +1 -1
- package/jest/setup.js +68 -31
- package/overrides.json +30 -36
- package/package.json +22 -19
- package/src/private/animated/NativeAnimatedHelper.js +2 -2
- package/src/private/animated/NativeAnimatedHelper.win32.js +2 -2
- package/src/private/animated/createAnimatedPropsMemoHook.js +19 -19
- package/src/private/components/virtualview/VirtualView.js +14 -21
- package/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js +11 -10
- package/src/private/components/virtualview/VirtualViewNativeComponent.js +4 -4
- package/src/private/devsupport/devmenu/elementinspector/BorderBox.js +2 -2
- package/src/private/devsupport/devmenu/elementinspector/BoxInspector.js +3 -3
- package/src/private/devsupport/devmenu/elementinspector/ElementBox.js +4 -4
- package/src/private/devsupport/devmenu/elementinspector/ElementProperties.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/Inspector.js +39 -17
- package/src/private/devsupport/devmenu/elementinspector/InspectorOverlay.js +15 -3
- package/src/private/devsupport/devmenu/elementinspector/InspectorPanel.js +2 -2
- package/src/private/devsupport/devmenu/elementinspector/ReactDevToolsOverlay.js +2 -8
- package/src/private/devsupport/devmenu/elementinspector/StyleInspector.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/resolveBoxStyle.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/useExternalInspection.js +102 -0
- package/src/private/devsupport/rndevtools/FuseboxSessionObserver.js +12 -25
- package/src/private/devsupport/rndevtools/GlobalStateObserver.js +56 -0
- package/src/private/devsupport/rndevtools/TracingStateObserver.js +28 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +71 -79
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +2 -2
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +14 -12
- package/src/private/setup/setUpDefaultReactNativeEnvironment.js +6 -0
- package/src/private/specs_DEPRECATED/components/ActivityIndicatorViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/AndroidDrawerLayoutNativeComponent.js +3 -3
- package/src/private/specs_DEPRECATED/components/AndroidHorizontalScrollContentViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/AndroidSwipeRefreshLayoutNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/AndroidSwitchNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/DebuggingOverlayNativeComponent.js +3 -3
- package/src/private/specs_DEPRECATED/components/ProgressBarAndroidNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/PullToRefreshViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/RCTInputAccessoryViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/RCTModalHostViewNativeComponent.js +3 -3
- package/src/private/specs_DEPRECATED/components/RCTSafeAreaViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/UnimplementedNativeViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeImageLoaderIOS.js +1 -1
- package/src/private/styles/composeStyles.js +1 -1
- package/src/private/utilities/toError.js +27 -0
- package/src/private/utilities/toExtendedError.js +30 -0
- package/src/private/webapis/dom/events/Event.js +1 -1
- package/src/private/webapis/dom/events/EventHandlerAttributes.js +2 -2
- package/src/private/webapis/dom/events/EventTarget.js +3 -3
- package/src/private/webapis/dom/events/internals/EventInternals.js +2 -2
- package/src/private/webapis/dom/nodes/ReadOnlyElement.js +1 -1
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +2 -2
- package/src/private/webapis/dom/nodes/specs/NativeDOM.js +14 -14
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +2 -2
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +2 -2
- package/src/private/webapis/geometry/DOMRectList.js +2 -2
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +8 -8
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +6 -6
- package/src/private/webapis/mutationobserver/MutationObserver.js +2 -2
- package/src/private/webapis/mutationobserver/MutationRecord.js +2 -2
- package/src/private/webapis/mutationobserver/internals/MutationObserverManager.js +1 -1
- package/src/private/webapis/mutationobserver/specs/NativeMutationObserver.js +3 -3
- package/src/private/webapis/performance/LongTasks.js +3 -3
- package/src/private/webapis/performance/Performance.js +4 -4
- package/src/private/webapis/performance/PerformanceEntry.js +1 -1
- package/src/private/webapis/performance/PerformanceObserver.js +2 -2
- package/src/private/webapis/performance/specs/NativePerformance.js +8 -8
- package/src/private/webapis/structuredClone/structuredClone.js +2 -2
- package/src/types/globals.d.ts +4 -4
- package/src-win/Libraries/Components/EnterString.win32.tsx +2 -2
- package/src-win/Libraries/Components/Touchable/TouchableWin32.tsx +14 -14
- package/src-win/index.win32.js.flow +8 -1
- package/types/index.d.ts +2 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.js +0 -60
- package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +0 -94
- package/Libraries/Image/TextInlineImageNativeComponent.js +0 -49
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<ae363bbd49937178318598ddd93fa421>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
* @noformat
|
|
10
10
|
*/
|
|
@@ -28,10 +28,10 @@ export interface Spec extends TurboModule {
|
|
|
28
28
|
+commonTestFlagWithoutNativeImplementation?: () => boolean;
|
|
29
29
|
+cdpInteractionMetricsEnabled?: () => boolean;
|
|
30
30
|
+cxxNativeAnimatedEnabled?: () => boolean;
|
|
31
|
+
+defaultTextToOverflowHidden?: () => boolean;
|
|
31
32
|
+disableEarlyViewCommandExecution?: () => boolean;
|
|
32
33
|
+disableImageViewPreallocationAndroid?: () => boolean;
|
|
33
34
|
+disableMountItemReorderingAndroid?: () => boolean;
|
|
34
|
-
+disableOldAndroidAttachmentMetricsWorkarounds?: () => boolean;
|
|
35
35
|
+disableSubviewClippingAndroid?: () => boolean;
|
|
36
36
|
+disableTextLayoutManagerCacheAndroid?: () => boolean;
|
|
37
37
|
+disableViewPreallocationAndroid?: () => boolean;
|
|
@@ -48,6 +48,7 @@ export interface Spec extends TurboModule {
|
|
|
48
48
|
+enableEagerMainQueueModulesOnIOS?: () => boolean;
|
|
49
49
|
+enableEagerRootViewAttachment?: () => boolean;
|
|
50
50
|
+enableExclusivePropsUpdateAndroid?: () => boolean;
|
|
51
|
+
+enableFabricCommitBranching?: () => boolean;
|
|
51
52
|
+enableFabricLogs?: () => boolean;
|
|
52
53
|
+enableFabricRenderer?: () => boolean;
|
|
53
54
|
+enableFontScaleChangesUpdatingLayout?: () => boolean;
|
|
@@ -65,6 +66,7 @@ export interface Spec extends TurboModule {
|
|
|
65
66
|
+enableLayoutAnimationsOnIOS?: () => boolean;
|
|
66
67
|
+enableMainQueueCoordinatorOnIOS?: () => boolean;
|
|
67
68
|
+enableModuleArgumentNSNullConversionIOS?: () => boolean;
|
|
69
|
+
+enableMutationObserverByDefault?: () => boolean;
|
|
68
70
|
+enableNativeCSSParsing?: () => boolean;
|
|
69
71
|
+enableNetworkEventReporting?: () => boolean;
|
|
70
72
|
+enablePreparedTextLayout?: () => boolean;
|
|
@@ -78,40 +80,40 @@ export interface Spec extends TurboModule {
|
|
|
78
80
|
+enableViewRecyclingForView?: () => boolean;
|
|
79
81
|
+enableVirtualViewContainerStateExperimental?: () => boolean;
|
|
80
82
|
+enableVirtualViewDebugFeatures?: () => boolean;
|
|
81
|
-
+
|
|
82
|
-
+enableVirtualViewWindowFocusDetection?: () => boolean;
|
|
83
|
-
+enableWebPerformanceAPIsByDefault?: () => boolean;
|
|
83
|
+
+fixFindShadowNodeByTagRaceCondition?: () => boolean;
|
|
84
84
|
+fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean;
|
|
85
85
|
+fixTextClippingAndroid15useBoundsForWidth?: () => boolean;
|
|
86
86
|
+fuseboxAssertSingleHostState?: () => boolean;
|
|
87
87
|
+fuseboxEnabledRelease?: () => boolean;
|
|
88
|
+
+fuseboxFrameRecordingEnabled?: () => boolean;
|
|
88
89
|
+fuseboxNetworkInspectionEnabled?: () => boolean;
|
|
90
|
+
+fuseboxScreenshotCaptureEnabled?: () => boolean;
|
|
89
91
|
+hideOffscreenVirtualViewsOnIOS?: () => boolean;
|
|
90
92
|
+overrideBySynchronousMountPropsAtMountingAndroid?: () => boolean;
|
|
91
93
|
+perfIssuesEnabled?: () => boolean;
|
|
92
94
|
+perfMonitorV2Enabled?: () => boolean;
|
|
93
95
|
+preparedTextCacheSize?: () => number;
|
|
94
96
|
+preventShadowTreeCommitExhaustion?: () => boolean;
|
|
97
|
+
+redBoxV2Android?: () => boolean;
|
|
98
|
+
+redBoxV2IOS?: () => boolean;
|
|
95
99
|
+shouldPressibilityUseW3CPointerEventsForHover?: () => boolean;
|
|
96
|
-
+shouldResetClickableWhenRecyclingView?: () => boolean;
|
|
97
|
-
+shouldResetOnClickListenerWhenRecyclingView?: () => boolean;
|
|
98
|
-
+shouldSetEnabledBasedOnAccessibilityState?: () => boolean;
|
|
99
|
-
+shouldSetIsClickableByDefault?: () => boolean;
|
|
100
100
|
+shouldTriggerResponderTransferOnScrollAndroid?: () => boolean;
|
|
101
101
|
+skipActivityIdentityAssertionOnHostPause?: () => boolean;
|
|
102
|
+
+syncAndroidClipToPaddingWithOverflow?: () => boolean;
|
|
102
103
|
+traceTurboModulePromiseRejectionsOnAndroid?: () => boolean;
|
|
103
104
|
+updateRuntimeShadowNodeReferencesOnCommit?: () => boolean;
|
|
105
|
+
+updateRuntimeShadowNodeReferencesOnCommitThread?: () => boolean;
|
|
104
106
|
+useAlwaysAvailableJSErrorHandling?: () => boolean;
|
|
105
107
|
+useFabricInterop?: () => boolean;
|
|
106
108
|
+useNativeViewConfigsInBridgelessMode?: () => boolean;
|
|
107
|
-
+
|
|
108
|
-
+useShadowNodeStateOnClone?: () => boolean;
|
|
109
|
+
+useNestedScrollViewAndroid?: () => boolean;
|
|
109
110
|
+useSharedAnimatedBackend?: () => boolean;
|
|
110
111
|
+useTraitHiddenOnAndroid?: () => boolean;
|
|
111
112
|
+useTurboModuleInterop?: () => boolean;
|
|
112
113
|
+useTurboModules?: () => boolean;
|
|
114
|
+
+useUnorderedMapInDifferentiator?: () => boolean;
|
|
113
115
|
+viewCullingOutsetRatio?: () => number;
|
|
114
|
-
+
|
|
116
|
+
+viewTransitionEnabled?: () => boolean;
|
|
115
117
|
+virtualViewPrerenderRatio?: () => number;
|
|
116
118
|
}
|
|
117
119
|
|
|
@@ -47,4 +47,10 @@ export default function setUpDefaltReactNativeEnvironment(
|
|
|
47
47
|
) {
|
|
48
48
|
require('./setUpIntersectionObserver').default();
|
|
49
49
|
}
|
|
50
|
+
|
|
51
|
+
if (
|
|
52
|
+
require('../../../src/private/featureflags/ReactNativeFeatureFlags').enableMutationObserverByDefault()
|
|
53
|
+
) {
|
|
54
|
+
require('./setUpMutationObserver').default();
|
|
55
|
+
}
|
|
50
56
|
}
|
|
@@ -15,7 +15,7 @@ import type {HostComponent} from '../../types/HostComponent';
|
|
|
15
15
|
|
|
16
16
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
17
17
|
|
|
18
|
-
type RCTActivityIndicatorViewNativeProps =
|
|
18
|
+
type RCTActivityIndicatorViewNativeProps = Readonly<{
|
|
19
19
|
...ViewProps,
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -22,15 +22,15 @@ import codegenNativeCommands from '../../../../Libraries/Utilities/codegenNative
|
|
|
22
22
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
23
23
|
import * as React from 'react';
|
|
24
24
|
|
|
25
|
-
type DrawerStateEvent =
|
|
25
|
+
type DrawerStateEvent = Readonly<{
|
|
26
26
|
drawerState: Int32,
|
|
27
27
|
}>;
|
|
28
28
|
|
|
29
|
-
type DrawerSlideEvent =
|
|
29
|
+
type DrawerSlideEvent = Readonly<{
|
|
30
30
|
offset: Float,
|
|
31
31
|
}>;
|
|
32
32
|
|
|
33
|
-
type AndroidDrawerLayoutNativeProps =
|
|
33
|
+
type AndroidDrawerLayoutNativeProps = Readonly<{
|
|
34
34
|
...ViewProps,
|
|
35
35
|
/**
|
|
36
36
|
* Determines whether the keyboard gets dismissed in response to a drag.
|
package/src/private/specs_DEPRECATED/components/AndroidHorizontalScrollContentViewNativeComponent.js
CHANGED
|
@@ -13,7 +13,7 @@ import type {HostComponent} from '../../types/HostComponent';
|
|
|
13
13
|
|
|
14
14
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
15
15
|
|
|
16
|
-
type AndroidHorizontalScrollContentViewNativeProps =
|
|
16
|
+
type AndroidHorizontalScrollContentViewNativeProps = Readonly<{
|
|
17
17
|
...ViewProps,
|
|
18
18
|
|
|
19
19
|
removeClippedSubviews?: ?boolean,
|
|
@@ -21,7 +21,7 @@ import codegenNativeCommands from '../../../../Libraries/Utilities/codegenNative
|
|
|
21
21
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
22
22
|
import * as React from 'react';
|
|
23
23
|
|
|
24
|
-
type AndroidSwipeRefreshLayoutNativeProps =
|
|
24
|
+
type AndroidSwipeRefreshLayoutNativeProps = Readonly<{
|
|
25
25
|
...ViewProps,
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -31,7 +31,7 @@ type AndroidSwipeRefreshLayoutNativeProps = $ReadOnly<{
|
|
|
31
31
|
/**
|
|
32
32
|
* The colors (at least one) that will be used to draw the refresh indicator.
|
|
33
33
|
*/
|
|
34
|
-
colors?:
|
|
34
|
+
colors?: ?ReadonlyArray<ColorValue>,
|
|
35
35
|
/**
|
|
36
36
|
* The background color of the refresh indicator.
|
|
37
37
|
*/
|
|
@@ -21,12 +21,12 @@ import codegenNativeCommands from '../../../../Libraries/Utilities/codegenNative
|
|
|
21
21
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
22
22
|
import * as React from 'react';
|
|
23
23
|
|
|
24
|
-
type AndroidSwitchChangeEvent =
|
|
24
|
+
type AndroidSwitchChangeEvent = Readonly<{
|
|
25
25
|
value: boolean,
|
|
26
26
|
target: Int32,
|
|
27
27
|
}>;
|
|
28
28
|
|
|
29
|
-
type AndroidSwitchNativeProps =
|
|
29
|
+
type AndroidSwitchNativeProps = Readonly<{
|
|
30
30
|
...ViewProps,
|
|
31
31
|
|
|
32
32
|
// Props
|
|
@@ -16,7 +16,7 @@ import codegenNativeCommands from '../../../../Libraries/Utilities/codegenNative
|
|
|
16
16
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
17
17
|
import * as React from 'react';
|
|
18
18
|
|
|
19
|
-
type DebuggingOverlayNativeProps =
|
|
19
|
+
type DebuggingOverlayNativeProps = Readonly<{
|
|
20
20
|
...ViewProps,
|
|
21
21
|
}>;
|
|
22
22
|
export type DebuggingOverlayNativeComponentType =
|
|
@@ -38,11 +38,11 @@ export type ElementRectangle = {
|
|
|
38
38
|
interface NativeCommands {
|
|
39
39
|
+highlightTraceUpdates: (
|
|
40
40
|
viewRef: React.ElementRef<DebuggingOverlayNativeComponentType>,
|
|
41
|
-
updates:
|
|
41
|
+
updates: ReadonlyArray<TraceUpdate>,
|
|
42
42
|
) => void;
|
|
43
43
|
+highlightElements: (
|
|
44
44
|
viewRef: React.ElementRef<DebuggingOverlayNativeComponentType>,
|
|
45
|
-
elements:
|
|
45
|
+
elements: ReadonlyArray<ElementRectangle>,
|
|
46
46
|
) => void;
|
|
47
47
|
+clearElementsHighlights: (
|
|
48
48
|
viewRef: React.ElementRef<DebuggingOverlayNativeComponentType>,
|
|
@@ -18,7 +18,7 @@ import type {HostComponent} from '../../types/HostComponent';
|
|
|
18
18
|
|
|
19
19
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
20
20
|
|
|
21
|
-
type AndroidProgressBarNativeProps =
|
|
21
|
+
type AndroidProgressBarNativeProps = Readonly<{
|
|
22
22
|
...ViewProps,
|
|
23
23
|
|
|
24
24
|
//Props
|
|
@@ -21,7 +21,7 @@ import codegenNativeCommands from '../../../../Libraries/Utilities/codegenNative
|
|
|
21
21
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
22
22
|
import * as React from 'react';
|
|
23
23
|
|
|
24
|
-
type PullToRefreshNativeProps =
|
|
24
|
+
type PullToRefreshNativeProps = Readonly<{
|
|
25
25
|
...ViewProps,
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -14,7 +14,7 @@ import type {HostComponent} from '../../types/HostComponent';
|
|
|
14
14
|
|
|
15
15
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
16
16
|
|
|
17
|
-
type InputAccessoryNativeProps =
|
|
17
|
+
type InputAccessoryNativeProps = Readonly<{
|
|
18
18
|
...ViewProps,
|
|
19
19
|
backgroundColor?: ?ColorValue,
|
|
20
20
|
}>;
|
|
@@ -18,11 +18,11 @@ import type {HostComponent} from '../../types/HostComponent';
|
|
|
18
18
|
|
|
19
19
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
20
20
|
|
|
21
|
-
type OrientationChangeEvent =
|
|
21
|
+
type OrientationChangeEvent = Readonly<{
|
|
22
22
|
orientation: 'portrait' | 'landscape',
|
|
23
23
|
}>;
|
|
24
24
|
|
|
25
|
-
type RCTModalHostViewNativeProps =
|
|
25
|
+
type RCTModalHostViewNativeProps = Readonly<{
|
|
26
26
|
...ViewProps,
|
|
27
27
|
|
|
28
28
|
/**
|
|
@@ -124,7 +124,7 @@ type RCTModalHostViewNativeProps = $ReadOnly<{
|
|
|
124
124
|
* See https://reactnative.dev/docs/modal#supportedorientations
|
|
125
125
|
*/
|
|
126
126
|
supportedOrientations?: WithDefault<
|
|
127
|
-
|
|
127
|
+
ReadonlyArray<
|
|
128
128
|
| 'portrait'
|
|
129
129
|
| 'portrait-upside-down'
|
|
130
130
|
| 'landscape'
|
|
@@ -13,7 +13,7 @@ import type {HostComponent} from '../../types/HostComponent';
|
|
|
13
13
|
|
|
14
14
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
15
15
|
|
|
16
|
-
type RCTSafeAreaViewNativeProps =
|
|
16
|
+
type RCTSafeAreaViewNativeProps = Readonly<{
|
|
17
17
|
...ViewProps,
|
|
18
18
|
|
|
19
19
|
// No props
|
|
@@ -21,12 +21,12 @@ import codegenNativeCommands from '../../../../Libraries/Utilities/codegenNative
|
|
|
21
21
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
22
22
|
import * as React from 'react';
|
|
23
23
|
|
|
24
|
-
type NativeSwitchChangeEvent =
|
|
24
|
+
type NativeSwitchChangeEvent = Readonly<{
|
|
25
25
|
value: boolean,
|
|
26
26
|
target: Int32,
|
|
27
27
|
}>;
|
|
28
28
|
|
|
29
|
-
type SwitchNativeProps =
|
|
29
|
+
type SwitchNativeProps = Readonly<{
|
|
30
30
|
...ViewProps,
|
|
31
31
|
|
|
32
32
|
// Props
|
|
@@ -14,7 +14,7 @@ import type {HostComponent} from '../../types/HostComponent';
|
|
|
14
14
|
|
|
15
15
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
16
16
|
|
|
17
|
-
type UnimplementedNativeViewNativeProps =
|
|
17
|
+
type UnimplementedNativeViewNativeProps = Readonly<{
|
|
18
18
|
...ViewProps,
|
|
19
19
|
name?: WithDefault<string, ''>,
|
|
20
20
|
}>;
|
|
@@ -16,7 +16,7 @@ import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboMod
|
|
|
16
16
|
export interface Spec extends TurboModule {
|
|
17
17
|
+getConstants: () => {};
|
|
18
18
|
// Return [width, height] of image uri
|
|
19
|
-
+getSize: (uri: string) => Promise
|
|
19
|
+
+getSize: (uri: string) => Promise<ReadonlyArray<number>>;
|
|
20
20
|
+getSizeWithHeaders: (
|
|
21
21
|
uri: string,
|
|
22
22
|
headers: Object,
|
|
@@ -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
|
+
* @flow strict
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Converts an unknown value to an Error instance.
|
|
13
|
+
* If the value is already an Error, returns it as-is.
|
|
14
|
+
* Otherwise, creates a new Error with the stringified value as the message.
|
|
15
|
+
*
|
|
16
|
+
* This is particularly useful in catch blocks where the caught value
|
|
17
|
+
* is annotated as `unknown` but needs to be treated as an Error.
|
|
18
|
+
*
|
|
19
|
+
* @param value - The unknown value to convert to an Error
|
|
20
|
+
* @returns An Error instance
|
|
21
|
+
*/
|
|
22
|
+
export default function toError(value: unknown): Error {
|
|
23
|
+
if (value instanceof Error) {
|
|
24
|
+
return value;
|
|
25
|
+
}
|
|
26
|
+
return new Error(String(value));
|
|
27
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
* @flow strict
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type {ExtendedError} from '../../../Libraries/Core/ExtendedError';
|
|
12
|
+
|
|
13
|
+
import toError from './toError';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Converts an unknown value to an ExtendedError instance suitable for LogBox.
|
|
17
|
+
* Uses the standard toError utility internally and then casts to ExtendedError.
|
|
18
|
+
*
|
|
19
|
+
* This is specifically designed for LogBox error reporting which requires
|
|
20
|
+
* ExtendedError type compatibility.
|
|
21
|
+
*
|
|
22
|
+
* @param value - The unknown value to convert to an ExtendedError
|
|
23
|
+
* @returns An ExtendedError instance
|
|
24
|
+
*/
|
|
25
|
+
export default function toExtendedError(value: unknown): ExtendedError {
|
|
26
|
+
const error = toError(value);
|
|
27
|
+
// ExtendedError extends Error, so this cast is safe for the LogBox system
|
|
28
|
+
// $FlowFixMe[incompatible-type] ExtendedError extends Error, this cast is safe
|
|
29
|
+
return (error: ExtendedError);
|
|
30
|
+
}
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
import type EventTarget from './EventTarget';
|
|
44
44
|
import type {EventCallback} from './EventTarget';
|
|
45
45
|
|
|
46
|
-
type EventHandler =
|
|
46
|
+
type EventHandler = Readonly<{
|
|
47
47
|
handleEvent: EventCallback,
|
|
48
48
|
}>;
|
|
49
49
|
type EventHandlerAttributeMap = Map<string, EventHandler | null>;
|
|
@@ -119,7 +119,7 @@ export function setEventHandlerAttribute(
|
|
|
119
119
|
setEventHandlerAttributeMap(target, map);
|
|
120
120
|
}
|
|
121
121
|
map.set(type, listener);
|
|
122
|
-
} catch
|
|
122
|
+
} catch {
|
|
123
123
|
// Assigning incorrect listener does not throw in setters.
|
|
124
124
|
}
|
|
125
125
|
}
|
|
@@ -40,11 +40,11 @@ export type EventHandler = interface {
|
|
|
40
40
|
};
|
|
41
41
|
export type EventListener = EventCallback | EventHandler;
|
|
42
42
|
|
|
43
|
-
export type EventListenerOptions =
|
|
43
|
+
export type EventListenerOptions = Readonly<{
|
|
44
44
|
capture?: boolean,
|
|
45
45
|
}>;
|
|
46
46
|
|
|
47
|
-
export type AddEventListenerOptions =
|
|
47
|
+
export type AddEventListenerOptions = Readonly<{
|
|
48
48
|
...EventListenerOptions,
|
|
49
49
|
passive?: boolean,
|
|
50
50
|
once?: boolean,
|
|
@@ -311,7 +311,7 @@ function dispatch(eventTarget: EventTarget, event: Event): void {
|
|
|
311
311
|
function getEventPath(
|
|
312
312
|
eventTarget: EventTarget,
|
|
313
313
|
event: Event,
|
|
314
|
-
):
|
|
314
|
+
): ReadonlyArray<EventTarget> {
|
|
315
315
|
const path = [];
|
|
316
316
|
let target: EventTarget | null = eventTarget;
|
|
317
317
|
|
|
@@ -43,14 +43,14 @@ export function setCurrentTarget(
|
|
|
43
43
|
event[CURRENT_TARGET_KEY] = currentTarget;
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
export function getComposedPath(event: Event):
|
|
46
|
+
export function getComposedPath(event: Event): ReadonlyArray<EventTarget> {
|
|
47
47
|
// $FlowExpectedError[prop-missing]
|
|
48
48
|
return event[COMPOSED_PATH_KEY];
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
export function setComposedPath(
|
|
52
52
|
event: Event,
|
|
53
|
-
composedPath:
|
|
53
|
+
composedPath: ReadonlyArray<EventTarget>,
|
|
54
54
|
): void {
|
|
55
55
|
// $FlowExpectedError[prop-missing]
|
|
56
56
|
event[COMPOSED_PATH_KEY] = composedPath;
|
|
@@ -219,7 +219,7 @@ export default class ReadOnlyElement extends ReadOnlyNode {
|
|
|
219
219
|
}
|
|
220
220
|
}
|
|
221
221
|
|
|
222
|
-
function getChildElements(node: ReadOnlyNode):
|
|
222
|
+
function getChildElements(node: ReadOnlyNode): ReadonlyArray<ReadOnlyElement> {
|
|
223
223
|
// $FlowFixMe[incompatible-type]
|
|
224
224
|
return getChildNodes(
|
|
225
225
|
node,
|
|
@@ -297,7 +297,7 @@ setPlatformObject(ReadOnlyNode);
|
|
|
297
297
|
export function getChildNodes(
|
|
298
298
|
node: ReadOnlyNode,
|
|
299
299
|
filter?: (node: ReadOnlyNode) => boolean,
|
|
300
|
-
):
|
|
300
|
+
): ReadonlyArray<ReadOnlyNode> {
|
|
301
301
|
const shadowNode = getNativeNodeReference(node);
|
|
302
302
|
|
|
303
303
|
if (shadowNode == null) {
|
|
@@ -319,7 +319,7 @@ export function getChildNodes(
|
|
|
319
319
|
|
|
320
320
|
function getNodeSiblingsAndPosition(
|
|
321
321
|
node: ReadOnlyNode,
|
|
322
|
-
): [
|
|
322
|
+
): [ReadonlyArray<ReadOnlyNode>, number] {
|
|
323
323
|
const parent = node.parentNode;
|
|
324
324
|
if (parent == null) {
|
|
325
325
|
// This node is the root or it's disconnected.
|
|
@@ -58,7 +58,7 @@ export interface Spec extends TurboModule {
|
|
|
58
58
|
|
|
59
59
|
+getChildNodes: (
|
|
60
60
|
nativeNodeReference: unknown /* NativeNodeReference */,
|
|
61
|
-
) =>
|
|
61
|
+
) => ReadonlyArray<unknown> /* $ReadOnlyArray<InstanceHandle> */;
|
|
62
62
|
|
|
63
63
|
+getElementById?: (
|
|
64
64
|
nativeNodeReference: unknown /* NativeNodeReference */,
|
|
@@ -79,24 +79,24 @@ export interface Spec extends TurboModule {
|
|
|
79
79
|
|
|
80
80
|
+getBorderWidth: (
|
|
81
81
|
nativeElementReference: unknown /* NativeElementReference */,
|
|
82
|
-
) =>
|
|
82
|
+
) => ReadonlyArray<number> /* [topWidth: number, rightWidth: number, bottomWidth: number, leftWidth: number] */;
|
|
83
83
|
|
|
84
84
|
+getBoundingClientRect: (
|
|
85
85
|
nativeElementReference: unknown /* NativeElementReference */,
|
|
86
86
|
includeTransform: boolean,
|
|
87
|
-
) =>
|
|
87
|
+
) => ReadonlyArray<number> /* [x: number, y: number, width: number, height: number] */;
|
|
88
88
|
|
|
89
89
|
+getInnerSize: (
|
|
90
90
|
nativeElementReference: unknown /* NativeElementReference */,
|
|
91
|
-
) =>
|
|
91
|
+
) => ReadonlyArray<number> /* [width: number, height: number] */;
|
|
92
92
|
|
|
93
93
|
+getScrollPosition: (
|
|
94
94
|
nativeElementReference: unknown /* NativeElementReference */,
|
|
95
|
-
) =>
|
|
95
|
+
) => ReadonlyArray<number> /* [scrollLeft: number, scrollTop: number] */;
|
|
96
96
|
|
|
97
97
|
+getScrollSize: (
|
|
98
98
|
nativeElementReference: unknown /* NativeElementReference */,
|
|
99
|
-
) =>
|
|
99
|
+
) => ReadonlyArray<number> /* [scrollWidth: number, scrollHeight: number] */;
|
|
100
100
|
|
|
101
101
|
+getTagName: (
|
|
102
102
|
nativeElementReference: unknown /* NativeElementReference */,
|
|
@@ -127,7 +127,7 @@ export interface Spec extends TurboModule {
|
|
|
127
127
|
|
|
128
128
|
+getOffset: (
|
|
129
129
|
nativeElementReference: unknown /* NativeElementReference */,
|
|
130
|
-
) =>
|
|
130
|
+
) => ReadonlyArray<unknown> /* [offsetParent: ?InstanceHandle, top: number, left: number] */;
|
|
131
131
|
|
|
132
132
|
/*
|
|
133
133
|
* Special methods to handle the root node.
|
|
@@ -199,7 +199,7 @@ export interface RefinedSpec {
|
|
|
199
199
|
*/
|
|
200
200
|
+getChildNodes: (
|
|
201
201
|
nativeNodeReference: NativeNodeReference,
|
|
202
|
-
) =>
|
|
202
|
+
) => ReadonlyArray<InstanceHandle>;
|
|
203
203
|
|
|
204
204
|
/**
|
|
205
205
|
* This is a React Native implementation of `Document.prototype.getElementById`
|
|
@@ -247,7 +247,7 @@ export interface RefinedSpec {
|
|
|
247
247
|
*/
|
|
248
248
|
+getBorderWidth: (
|
|
249
249
|
nativeElementReference: NativeElementReference,
|
|
250
|
-
) =>
|
|
250
|
+
) => Readonly<
|
|
251
251
|
[
|
|
252
252
|
/* topWidth: */ number,
|
|
253
253
|
/* rightWidth: */ number,
|
|
@@ -270,7 +270,7 @@ export interface RefinedSpec {
|
|
|
270
270
|
+getBoundingClientRect: (
|
|
271
271
|
nativeElementReference: NativeElementReference,
|
|
272
272
|
includeTransform: boolean,
|
|
273
|
-
) =>
|
|
273
|
+
) => Readonly<
|
|
274
274
|
[
|
|
275
275
|
/* x: */ number,
|
|
276
276
|
/* y: */ number,
|
|
@@ -293,7 +293,7 @@ export interface RefinedSpec {
|
|
|
293
293
|
*/
|
|
294
294
|
+getInnerSize: (
|
|
295
295
|
nativeElementReference: NativeElementReference,
|
|
296
|
-
) =>
|
|
296
|
+
) => Readonly<[/* width: */ number, /* height: */ number]>;
|
|
297
297
|
|
|
298
298
|
/**
|
|
299
299
|
* This is a method to access scroll information for a shadow node, to
|
|
@@ -308,7 +308,7 @@ export interface RefinedSpec {
|
|
|
308
308
|
*/
|
|
309
309
|
+getScrollPosition: (
|
|
310
310
|
nativeElementReference: NativeElementReference,
|
|
311
|
-
) =>
|
|
311
|
+
) => Readonly<[/* scrollLeft: */ number, /* scrollTop: */ number]>;
|
|
312
312
|
|
|
313
313
|
/**
|
|
314
314
|
*
|
|
@@ -324,7 +324,7 @@ export interface RefinedSpec {
|
|
|
324
324
|
*/
|
|
325
325
|
+getScrollSize: (
|
|
326
326
|
nativeElementReference: NativeElementReference,
|
|
327
|
-
) =>
|
|
327
|
+
) => Readonly<[/* scrollWidth: */ number, /* scrollHeight: */ number]>;
|
|
328
328
|
|
|
329
329
|
/**
|
|
330
330
|
* This is a method to access the normalized tag name of a shadow node, to
|
|
@@ -377,7 +377,7 @@ export interface RefinedSpec {
|
|
|
377
377
|
*/
|
|
378
378
|
+getOffset: (
|
|
379
379
|
nativeElementReference: NativeElementReference,
|
|
380
|
-
) =>
|
|
380
|
+
) => Readonly<
|
|
381
381
|
[
|
|
382
382
|
/* offsetParent: */ ?InstanceHandle,
|
|
383
383
|
/* top: */ number,
|
|
@@ -35,7 +35,7 @@ export default class HTMLCollection<T> implements Iterable<T>, ArrayLike<T> {
|
|
|
35
35
|
* @private This is not defined in the declaration file, so users will not see
|
|
36
36
|
* the signature of the constructor.
|
|
37
37
|
*/
|
|
38
|
-
constructor(elements:
|
|
38
|
+
constructor(elements: ReadonlyArray<T>) {
|
|
39
39
|
for (let i = 0; i < elements.length; i++) {
|
|
40
40
|
REUSABLE_PROPERTY_DESCRIPTOR.value = elements[i];
|
|
41
41
|
Object.defineProperty(this, i, REUSABLE_PROPERTY_DESCRIPTOR);
|
|
@@ -82,7 +82,7 @@ setPlatformObject(HTMLCollection);
|
|
|
82
82
|
* `HTMLCollection.js.flow`, not here.
|
|
83
83
|
*/
|
|
84
84
|
export function createHTMLCollection<T>(
|
|
85
|
-
elements:
|
|
85
|
+
elements: ReadonlyArray<T>,
|
|
86
86
|
): HTMLCollection<T> {
|
|
87
87
|
return new HTMLCollection(elements);
|
|
88
88
|
}
|
|
@@ -37,7 +37,7 @@ export default class NodeList<T> implements Iterable<T>, ArrayLike<T> {
|
|
|
37
37
|
* @private This is not defined in the declaration file, so users will not see
|
|
38
38
|
* the signature of the constructor.
|
|
39
39
|
*/
|
|
40
|
-
constructor(elements:
|
|
40
|
+
constructor(elements: ReadonlyArray<T>) {
|
|
41
41
|
for (let i = 0; i < elements.length; i++) {
|
|
42
42
|
REUSABLE_PROPERTY_DESCRIPTOR.value = elements[i];
|
|
43
43
|
Object.defineProperty(this, i, REUSABLE_PROPERTY_DESCRIPTOR);
|
|
@@ -105,6 +105,6 @@ setPlatformObject(NodeList);
|
|
|
105
105
|
* We can do that because the external definition of `NodeList` lives in
|
|
106
106
|
* `NodeList.js.flow`, not here.
|
|
107
107
|
*/
|
|
108
|
-
export function createNodeList<T>(elements:
|
|
108
|
+
export function createNodeList<T>(elements: ReadonlyArray<T>): NodeList<T> {
|
|
109
109
|
return new NodeList(elements);
|
|
110
110
|
}
|
|
@@ -29,7 +29,7 @@ export default class DOMRectList implements Iterable<DOMRectReadOnly> {
|
|
|
29
29
|
* @private This is not defined in the declaration file, so users will not see
|
|
30
30
|
* the signature of the constructor.
|
|
31
31
|
*/
|
|
32
|
-
constructor(elements:
|
|
32
|
+
constructor(elements: ReadonlyArray<DOMRectReadOnly>) {
|
|
33
33
|
for (let i = 0; i < elements.length; i++) {
|
|
34
34
|
Object.defineProperty(this, i, {
|
|
35
35
|
value: elements[i],
|
|
@@ -73,7 +73,7 @@ setPlatformObject(DOMRectList);
|
|
|
73
73
|
* `DOMRectList.js.flow`, not here.
|
|
74
74
|
*/
|
|
75
75
|
export function createDOMRectList(
|
|
76
|
-
elements:
|
|
76
|
+
elements: ReadonlyArray<DOMRectReadOnly>,
|
|
77
77
|
): DOMRectList {
|
|
78
78
|
return new DOMRectList(elements);
|
|
79
79
|
}
|