From 68418e1f8a65b035ec5603631ee1a95b0f2c1a8e Mon Sep 17 00:00:00 2001 From: Anukrati Agrawal Date: Tue, 7 Jul 2026 15:53:02 -0700 Subject: [PATCH 1/7] Integrate RN 0.85.0-nightly-20260303-c26dbe286 (with conflicts) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- package.json | 2 +- .../react-native-win32-tester/overrides.json | 2 +- .../react-native-win32-tester/package.json | 6 +- .../react-native-win32/.flowconfig | 2 +- .../react-native-win32/overrides.json | 11 +- .../react-native-win32/package.json | 33 +- .../NativeComponent/BaseViewConfig.win32.js | 60 ++- .../src-win/Libraries/Text/Text.win32.js | 69 ++- .../Text/TextNativeComponent.win32.js | 19 +- .../automation-channel/package.json | 2 +- .../@react-native-windows/cli/package.json | 2 +- .../perf-testing/package.json | 2 +- .../tester/overrides.json | 2 +- .../@react-native-windows/tester/package.json | 8 +- .../@react-native/monorepo/overrides.json | 4 +- packages/@react-native/monorepo/package.json | 10 +- .../IntersectionObserverClippingParent.js | 117 ++-- .../IntersectionObserverExplicitRootScroll.js | 7 + packages/@react-native/tester/overrides.json | 6 +- packages/@react-native/tester/package.json | 8 +- .../babel-react-native-config/package.json | 4 +- .../@rnw-scripts/eslint-config/package.json | 2 +- .../@rnw-scripts/integrate-rn/package.json | 2 +- .../metro-dev-config/package.json | 4 +- packages/@rnw-scripts/unbroken/package.json | 2 +- packages/e2e-test-app-fabric/package.json | 7 +- packages/playground/package.json | 7 +- .../react-native-windows-init/package.json | 2 +- packages/sample-app-fabric/package.json | 7 +- packages/sample-custom-component/package.json | 7 +- vnext/.flowconfig | 2 +- .../components/view/AccessibilityPrimitives.h | 27 +- .../react/renderer/uimanager/UIManager.cpp | 51 +- vnext/overrides.json | 17 +- vnext/package.json | 35 +- .../ScrollViewNativeComponent.windows.js | 25 +- .../WindowsTextInputNativeComponent.js | 43 +- .../Libraries/Components/View/View.windows.js | 2 +- .../NativeComponent/BaseViewConfig.windows.js | 72 ++- vnext/src-win/Libraries/Text/Text.windows.js | 69 ++- yarn.lock | 501 ++++++++---------- 41 files changed, 634 insertions(+), 626 deletions(-) diff --git a/package.json b/package.json index 4b007a56b6e..595d6d4692d 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "prettier": "^3.6.2", "prettier-plugin-hermes-parser": "0.21.1", "react": "19.2.3", - "react-native": "0.85.0-nightly-20260224-42cd0f041", + "react-native": "0.85.0-nightly-20260303-c26dbe286", "react-native-platform-override": "workspace:*", "typescript": "5.0.4" }, diff --git a/packages/@office-iss/react-native-win32-tester/overrides.json b/packages/@office-iss/react-native-win32-tester/overrides.json index 9797f80d6cf..9f16f06fdec 100644 --- a/packages/@office-iss/react-native-win32-tester/overrides.json +++ b/packages/@office-iss/react-native-win32-tester/overrides.json @@ -5,7 +5,7 @@ "excludePatterns": [ "src/js/examples-win32/**" ], - "baseVersion": "0.85.0-nightly-20260224-42cd0f041", + "baseVersion": "0.85.0-nightly-20260303-c26dbe286", "overrides": [ { "type": "patch", diff --git a/packages/@office-iss/react-native-win32-tester/package.json b/packages/@office-iss/react-native-win32-tester/package.json index c1c828f1ceb..9c97685cd41 100644 --- a/packages/@office-iss/react-native-win32-tester/package.json +++ b/packages/@office-iss/react-native-win32-tester/package.json @@ -11,7 +11,7 @@ "validate-overrides": "react-native-platform-override validate" }, "dependencies": { - "@react-native/tester": "0.85.0-nightly-20260224-42cd0f041", + "@react-native/tester": "0.85.0-nightly-20260303-c26dbe286", "@typescript-eslint/eslint-plugin": "^8.36.0", "@typescript-eslint/parser": "^8.36.0", "flow-enums-runtime": "^0.0.6" @@ -19,7 +19,7 @@ "peerDependencies": { "@office-iss/react-native-win32": "^0.0.0-canary.311", "react": "19.2.3", - "react-native": "0.85.0-nightly-20260224-42cd0f041" + "react-native": "0.85.0-nightly-20260303-c26dbe286" }, "devDependencies": { "@office-iss/react-native-win32": "^0.0.0-canary.311", @@ -32,7 +32,7 @@ "just-scripts": "^1.3.3", "prettier": "^3.6.2", "react": "19.2.3", - "react-native": "0.85.0-nightly-20260224-42cd0f041", + "react-native": "0.85.0-nightly-20260303-c26dbe286", "react-native-platform-override": "0.0.0-canary.1022", "typescript": "5.0.4" }, diff --git a/packages/@office-iss/react-native-win32/.flowconfig b/packages/@office-iss/react-native-win32/.flowconfig index bebfe7005b6..1fa0efb931e 100644 --- a/packages/@office-iss/react-native-win32/.flowconfig +++ b/packages/@office-iss/react-native-win32/.flowconfig @@ -172,4 +172,4 @@ untyped-import untyped-type-import [version] -^0.302.0 +^0.303.0 diff --git a/packages/@office-iss/react-native-win32/overrides.json b/packages/@office-iss/react-native-win32/overrides.json index b6a6054ff90..374269d3193 100644 --- a/packages/@office-iss/react-native-win32/overrides.json +++ b/packages/@office-iss/react-native-win32/overrides.json @@ -7,13 +7,13 @@ "**/__snapshots__/**", "src-win/rntypes/**" ], - "baseVersion": "0.85.0-nightly-20260224-42cd0f041", + "baseVersion": "0.85.0-nightly-20260303-c26dbe286", "overrides": [ { "type": "derived", "file": ".flowconfig", "baseFile": ".flowconfig", - "baseHash": "baf585dd3e43f5433a04cb6b912333a0dd68b16b" + "baseHash": "56a63445d9d20e6c25fea831d9d0d41b9c5b6463" }, { "type": "derived", @@ -177,6 +177,7 @@ "type": "patch", "file": "src-win/Libraries/Components/View/ReactNativeViewAttributes.win32.js", "baseFile": "packages/react-native/Libraries/Components/View/ReactNativeViewAttributes.js", + "baseVersion": "0.85.0-nightly-20260224-42cd0f041", "baseHash": "096d430d02315c4017c5971daaee5790db6787f6" }, { @@ -335,7 +336,7 @@ "type": "derived", "file": "src-win/Libraries/NativeComponent/BaseViewConfig.win32.js", "baseFile": "packages/react-native/Libraries/NativeComponent/BaseViewConfig.ios.js", - "baseHash": "a54d194cd731380ec0f2ff86b8b1f5ff072ec0ba" + "baseHash": "5b9617aa1bedd5c70b30dac1f3b35aa535976b54" }, { "type": "copy", @@ -431,13 +432,13 @@ "type": "derived", "file": "src-win/Libraries/Text/Text.win32.js", "baseFile": "packages/react-native/Libraries/Text/Text.js", - "baseHash": "14e1085587ef8b8a506594599c1aea8cf40ef140" + "baseHash": "9e33c80b41f230349924379625a39c9cf68b9d3b" }, { "type": "derived", "file": "src-win/Libraries/Text/TextNativeComponent.win32.js", "baseFile": "packages/react-native/Libraries/Text/TextNativeComponent.js", - "baseHash": "48d3dec45a0737147f7dbaa53b81bd4514ec3773", + "baseHash": "508e687d6346c5c99bef39d56a6e8230754ba0ef", "issue": 7074 }, { diff --git a/packages/@office-iss/react-native-win32/package.json b/packages/@office-iss/react-native-win32/package.json index c0089d02d13..977b8c06ab2 100644 --- a/packages/@office-iss/react-native-win32/package.json +++ b/packages/@office-iss/react-native-win32/package.json @@ -30,32 +30,32 @@ "@react-native-community/cli-platform-android": "20.0.0", "@react-native-community/cli-platform-ios": "20.0.0", "@react-native/assets": "1.0.0", - "@react-native/assets-registry": "0.85.0-nightly-20260224-42cd0f041", - "@react-native/codegen": "0.85.0-nightly-20260224-42cd0f041", - "@react-native/community-cli-plugin": "0.85.0-nightly-20260224-42cd0f041", - "@react-native/gradle-plugin": "0.85.0-nightly-20260224-42cd0f041", - "@react-native/jest-preset": "0.85.0-nightly-20260224-42cd0f041", - "@react-native/js-polyfills": "0.85.0-nightly-20260224-42cd0f041", - "@react-native/normalize-colors": "0.85.0-nightly-20260224-42cd0f041", - "@react-native/virtualized-lists": "0.85.0-nightly-20260224-42cd0f041", + "@react-native/assets-registry": "0.85.0-nightly-20260303-c26dbe286", + "@react-native/codegen": "0.85.0-nightly-20260303-c26dbe286", + "@react-native/community-cli-plugin": "0.85.0-nightly-20260303-c26dbe286", + "@react-native/gradle-plugin": "0.85.0-nightly-20260303-c26dbe286", + "@react-native/jest-preset": "0.85.0-nightly-20260303-c26dbe286", + "@react-native/js-polyfills": "0.85.0-nightly-20260303-c26dbe286", + "@react-native/normalize-colors": "0.85.0-nightly-20260303-c26dbe286", + "@react-native/virtualized-lists": "0.85.0-nightly-20260303-c26dbe286", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", "art": "^0.10.0", "babel-jest": "^29.7.0", - "babel-plugin-syntax-hermes-parser": "0.32.0", + "babel-plugin-syntax-hermes-parser": "0.33.3", "base64-js": "^1.5.1", "chalk": "^4.0.0", "commander": "^12.0.0", "event-target-shim": "^5.0.1", "flow-enums-runtime": "^0.0.6", "glob": "^7.1.1", - "hermes-compiler": "0.14.0-commitly-202512102158-39fca9fda", + "hermes-compiler": "250829098.0.10", "invariant": "^2.2.4", "jest-environment-node": "^29.7.0", "memoize-one": "^5.0.0", - "metro-runtime": "^0.83.3", - "metro-source-map": "^0.83.3", + "metro-runtime": "^0.84.2", + "metro-source-map": "^0.84.2", "mkdirp": "^0.5.1", "nullthrows": "^1.1.1", "pretty-format": "^29.7.0", @@ -76,7 +76,7 @@ "@babel/core": "^7.25.2", "@babel/eslint-parser": "^7.25.1", "@babel/preset-env": "^7.25.3", - "@react-native/metro-config": "0.85.0-nightly-20260224-42cd0f041", + "@react-native/metro-config": "0.85.0-nightly-20260303-c26dbe286", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.38", "@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.42", @@ -93,14 +93,15 @@ "just-scripts": "^1.3.3", "prettier": "^3.6.2", "react": "19.2.3", - "react-native": "0.85.0-nightly-20260224-42cd0f041", + "react-native": "0.85.0-nightly-20260303-c26dbe286", "react-native-platform-override": "0.0.0-canary.1022", "typescript": "5.0.4" }, "peerDependencies": { - "@types/react": "^19.2.3", + "@react-native/jest-preset": "0.85.0-nightly-20260303-c26dbe286", + "@types/react": "^19.1.1", "react": "^19.2.3", - "react-native": "0.85.0-nightly-20260224-42cd0f041" + "react-native": "0.85.0-nightly-20260303-c26dbe286" }, "beachball": { "defaultNpmTag": "canary", diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/NativeComponent/BaseViewConfig.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/NativeComponent/BaseViewConfig.win32.js index 69496be5033..04724b6189e 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/NativeComponent/BaseViewConfig.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/NativeComponent/BaseViewConfig.win32.js @@ -10,8 +10,12 @@ import type {PartialViewConfigWithoutName} from './PlatformBaseViewConfig'; -import * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags'; import ReactNativeStyleAttributes from '../Components/View/ReactNativeStyleAttributes'; +import { + boxShadowAttribute, + colorAttribute, + filterAttribute, +} from '../Components/View/ReactNativeStyleAttributes'; import { ConditionallyIgnoredEventHandlers, DynamicallyInjectedByGestureHandler, @@ -198,10 +202,10 @@ const validAttributesForNonEventProps = { accessibilityLargeContentTitle: true, experimental_accessibilityOrder: true, testID: true, - backgroundColor: {process: require('../StyleSheet/processColor').default}, + backgroundColor: colorAttribute, backfaceVisibility: true, opacity: true, - shadowColor: {process: require('../StyleSheet/processColor').default}, + shadowColor: colorAttribute, shadowOffset: {diff: require('../Utilities/differ/sizesDiffer').default}, shadowOpacity: true, shadowRadius: true, @@ -217,34 +221,76 @@ const validAttributesForNonEventProps = { removeClippedSubviews: true, role: true, borderRadius: true, +<<<<<<< Upstream + borderColor: colorAttribute, + borderBlockColor: colorAttribute, +||||||| base + borderColor: {process: require('../StyleSheet/processColor').default}, + borderBlockColor: {process: require('../StyleSheet/processColor').default}, +======= borderColor: {process: require('../StyleSheet/processColor').default}, +>>>>>>> Override borderCurve: true, borderWidth: true, borderStyle: true, hitSlop: {diff: require('../Utilities/differ/insetsDiffer').default}, collapsable: true, collapsableChildren: true, +<<<<<<< Upstream + filter: filterAttribute, + boxShadow: boxShadowAttribute, +||||||| base + filter: ReactNativeFeatureFlags.enableNativeCSSParsing() + ? (true as const) + : {process: require('../StyleSheet/processFilter').default}, + boxShadow: ReactNativeFeatureFlags.enableNativeCSSParsing() + ? (true as const) + : {process: require('../StyleSheet/processBoxShadow').default}, +======= experimental_filter: ReactNativeFeatureFlags.enableNativeCSSParsing() ? (true as const) : {process: require('../StyleSheet/processFilter').default}, boxShadow: ReactNativeFeatureFlags.enableNativeCSSParsing() ? (true as const) : {process: require('../StyleSheet/processBoxShadow').default}, +>>>>>>> Override mixBlendMode: true, isolation: true, borderTopWidth: true, - borderTopColor: {process: require('../StyleSheet/processColor').default}, + borderTopColor: colorAttribute, borderRightWidth: true, - borderRightColor: {process: require('../StyleSheet/processColor').default}, + borderRightColor: colorAttribute, borderBottomWidth: true, - borderBottomColor: {process: require('../StyleSheet/processColor').default}, + borderBottomColor: colorAttribute, borderLeftWidth: true, - borderLeftColor: {process: require('../StyleSheet/processColor').default}, + borderLeftColor: colorAttribute, borderStartWidth: true, +<<<<<<< Upstream + borderBlockStartWidth: true, + borderStartColor: colorAttribute, + borderBlockStartColor: colorAttribute, +||||||| base + borderBlockStartWidth: true, borderStartColor: {process: require('../StyleSheet/processColor').default}, + borderBlockStartColor: { + process: require('../StyleSheet/processColor').default, + }, +======= + borderStartColor: {process: require('../StyleSheet/processColor').default}, +>>>>>>> Override borderEndWidth: true, +<<<<<<< Upstream + borderBlockEndWidth: true, + borderEndColor: colorAttribute, + borderBlockEndColor: colorAttribute, +||||||| base + borderBlockEndWidth: true, + borderEndColor: {process: require('../StyleSheet/processColor').default}, + borderBlockEndColor: {process: require('../StyleSheet/processColor').default}, +======= borderEndColor: {process: require('../StyleSheet/processColor').default}, +>>>>>>> Override borderTopLeftRadius: true, borderTopRightRadius: true, diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Text/Text.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Text/Text.win32.js index 0f9c7e0fadf..dbcc4ad391f 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Text/Text.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Text/Text.win32.js @@ -22,14 +22,18 @@ import processColor from '../StyleSheet/processColor'; import StyleSheet from '../StyleSheet/StyleSheet'; import Platform from '../Utilities/Platform'; import TextAncestorContext from './TextAncestorContext'; -import {NativeText, NativeVirtualText} from './TextNativeComponent'; +import { + NativeSelectableText, + NativeText, + NativeVirtualText, +} from './TextNativeComponent'; import * as React from 'react'; import {useContext, useMemo, useState} from 'react'; export type {TextProps} from './TextProps'; type TextForwardRef = React.ElementRef< - typeof NativeText | typeof NativeVirtualText, + typeof NativeText | typeof NativeVirtualText | typeof NativeSelectableText, >; /** @@ -330,7 +334,7 @@ const TextImpl: component( processedProps.children = children; if (isPressable) { return ( - ); } else { - nativeText = ; + nativeText = + _selectable === true ? ( + + ) : ( + + ); } if (children == null) { @@ -524,28 +534,17 @@ function useTextPressability({ ); } -type NativePressableTextProps = Readonly<{ - textProps: NativeTextProps, - textPressabilityProps: TextPressabilityProps, -}>; - /** * Wrap the NativeVirtualText component and initialize pressability. * * This logic is split out from the main Text component to enable the more * expensive pressability logic to be only initialized when needed. */ -const NativePressableVirtualText: component( - ref: React.RefSetter, - ...props: NativePressableTextProps -) = ({ - ref: forwardedRef, - textProps, - textPressabilityProps, -}: { +component PressableVirtualText( ref?: React.RefSetter, - ...NativePressableTextProps, -}) => { + textProps: NativeTextProps, + textPressabilityProps: TextPressabilityProps, +) { const [isHighlighted, eventHandlersForText] = useTextPressability( textPressabilityProps, ); @@ -556,42 +555,40 @@ const NativePressableVirtualText: component( {...eventHandlersForText} isHighlighted={isHighlighted} isPressable={true} - ref={forwardedRef} + ref={ref} /> ); -}; +} /** - * Wrap the NativeText component and initialize pressability. + * Wrap a NativeText component and initialize pressability. * * This logic is split out from the main Text component to enable the more * expensive pressability logic to be only initialized when needed. */ -const NativePressableText: component( - ref: React.RefSetter, - ...props: NativePressableTextProps -) = ({ - ref: forwardedRef, - textProps, - textPressabilityProps, -}: { +component PressableText( ref?: React.RefSetter, - ...NativePressableTextProps, -}) => { + selectable?: ?boolean, + textProps: NativeTextProps, + textPressabilityProps: TextPressabilityProps, +) { const [isHighlighted, eventHandlersForText] = useTextPressability( textPressabilityProps, ); + const NativeComponent = + selectable === true ? NativeSelectableText : NativeText; + return ( - ); -}; +} const userSelectToSelectableMap = { auto: true, diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Text/TextNativeComponent.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Text/TextNativeComponent.win32.js index 4cb88b5600a..e47d5b9edb8 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Text/TextNativeComponent.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Text/TextNativeComponent.win32.js @@ -13,6 +13,7 @@ import type {ProcessedColorValue} from '../StyleSheet/processColor'; import type {GestureResponderEvent} from '../Types/CoreEventTypes'; import type {TextProps} from './TextProps'; +import {enablePreparedTextLayout} from '../../src/private/featureflags/ReactNativeFeatureFlags'; import {createViewConfig} from '../NativeComponent/ViewConfig'; import UIManager from '../ReactNative/UIManager'; import createReactNativeComponentClass from '../Renderer/shims/createReactNativeComponentClass'; @@ -88,7 +89,7 @@ const textViewConfig = { }, }, uiViewClassName: 'RCTText', -}; +} as const; const virtualTextViewConfig = { validAttributes: { @@ -97,7 +98,7 @@ const virtualTextViewConfig = { maxFontSizeMultiplier: true, }, uiViewClassName: 'RCTVirtualText', -}; +} as const; /** * `NativeText` is an internal React Native host component, and is exported to @@ -111,8 +112,6 @@ const virtualTextViewConfig = { // and wrappers so that we no longer have any reason to export these APIs. export const NativeText: HostComponent = (createReactNativeComponentClass('RCTText', () => - /* $FlowFixMe[incompatible-type] Natural Inference rollout. See - * https://fburl.com/workplace/6291gfvu */ createViewConfig(textViewConfig), ): any); @@ -121,7 +120,15 @@ export const NativeVirtualText: HostComponent = UIManager.getViewManagerConfig('RCTVirtualText') == null ? NativeText : (createReactNativeComponentClass('RCTVirtualText', () => - /* $FlowFixMe[incompatible-type] Natural Inference rollout. See - * https://fburl.com/workplace/6291gfvu */ createViewConfig(virtualTextViewConfig), ): any); + +export const NativeSelectableText: HostComponent = + enablePreparedTextLayout() + ? (createReactNativeComponentClass('RCTSelectableText', () => + createViewConfig({ + ...textViewConfig, + uiViewClassName: 'RCTSelectableText', + }), + ): any) + : NativeText; diff --git a/packages/@react-native-windows/automation-channel/package.json b/packages/@react-native-windows/automation-channel/package.json index 3a63dd1f36b..83d3a8b6add 100644 --- a/packages/@react-native-windows/automation-channel/package.json +++ b/packages/@react-native-windows/automation-channel/package.json @@ -33,7 +33,7 @@ "just-scripts": "^1.3.2", "prettier": "^3.6.2", "react": "19.2.3", - "react-native": "0.85.0-nightly-20260224-42cd0f041", + "react-native": "0.85.0-nightly-20260303-c26dbe286", "react-native-windows": "^0.0.0-canary.1056", "typescript": "5.0.4" }, diff --git a/packages/@react-native-windows/cli/package.json b/packages/@react-native-windows/cli/package.json index 1e59860688b..a786ca74f3e 100644 --- a/packages/@react-native-windows/cli/package.json +++ b/packages/@react-native-windows/cli/package.json @@ -66,7 +66,7 @@ "jest": "^29.7.0", "prettier": "^3.6.2", "react": "19.2.3", - "react-native": "0.85.0-nightly-20260224-42cd0f041", + "react-native": "0.85.0-nightly-20260303-c26dbe286", "typescript": "5.0.4" }, "peerDependencies": { diff --git a/packages/@react-native-windows/perf-testing/package.json b/packages/@react-native-windows/perf-testing/package.json index 23649188ba3..2e6f78b1fb7 100644 --- a/packages/@react-native-windows/perf-testing/package.json +++ b/packages/@react-native-windows/perf-testing/package.json @@ -36,7 +36,7 @@ "peerDependencies": { "jest": ">=29.0.3", "react": ">=18.0.0", - "react-native": "0.85.0-nightly-20260224-42cd0f041", + "react-native": "0.85.0-nightly-20260303-c26dbe286", "react-test-renderer": ">=18.0.0" }, "peerDependenciesMeta": { diff --git a/packages/@react-native-windows/tester/overrides.json b/packages/@react-native-windows/tester/overrides.json index fe6a9da0de5..d977e1b8ed8 100644 --- a/packages/@react-native-windows/tester/overrides.json +++ b/packages/@react-native-windows/tester/overrides.json @@ -5,7 +5,7 @@ "excludePatterns": [ "src/js/examples-win/**" ], - "baseVersion": "0.85.0-nightly-20260224-42cd0f041", + "baseVersion": "0.85.0-nightly-20260303-c26dbe286", "overrides": [ { "type": "copy", diff --git a/packages/@react-native-windows/tester/package.json b/packages/@react-native-windows/tester/package.json index 281a4a7d861..ba8a242a38e 100644 --- a/packages/@react-native-windows/tester/package.json +++ b/packages/@react-native-windows/tester/package.json @@ -19,7 +19,7 @@ "peerDependencies": { "@react-native-picker/picker": "2.11.0", "react": "19.2.3", - "react-native": "0.85.0-nightly-20260224-42cd0f041", + "react-native": "0.85.0-nightly-20260303-c26dbe286", "react-native-windows": "^0.0.0-canary.1056", "react-native-xaml": "^0.0.80" }, @@ -32,8 +32,8 @@ } }, "devDependencies": { - "@react-native/new-app-screen": "0.85.0-nightly-20260224-42cd0f041", - "@react-native/tester": "0.85.0-nightly-20260224-42cd0f041", + "@react-native/new-app-screen": "0.85.0-nightly-20260303-c26dbe286", + "@react-native/tester": "0.85.0-nightly-20260303-c26dbe286", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.38", "@rnw-scripts/just-task": "2.3.58", @@ -43,7 +43,7 @@ "just-scripts": "^1.3.3", "prettier": "^3.6.2", "react": "19.2.3", - "react-native": "0.85.0-nightly-20260224-42cd0f041", + "react-native": "0.85.0-nightly-20260303-c26dbe286", "react-native-platform-override": "0.0.0-canary.1022", "react-native-windows": "^0.0.0-canary.1056", "typescript": "5.0.4" diff --git a/packages/@react-native/monorepo/overrides.json b/packages/@react-native/monorepo/overrides.json index c313219fd44..9c5967f171a 100644 --- a/packages/@react-native/monorepo/overrides.json +++ b/packages/@react-native/monorepo/overrides.json @@ -1,11 +1,11 @@ { - "baseVersion": "0.85.0-nightly-20260224-42cd0f041", + "baseVersion": "0.85.0-nightly-20260303-c26dbe286", "overrides": [ { "type": "patch", "file": "package.json", "baseFile": "package.json", - "baseHash": "835950d539e5c3124098baa7ee2cf4891b4f95f5" + "baseHash": "3f4549686b17952959594cb5d1d8f37b7cebafe2" } ] } \ No newline at end of file diff --git a/packages/@react-native/monorepo/package.json b/packages/@react-native/monorepo/package.json index 110da6a1b1e..8002bb0d63c 100644 --- a/packages/@react-native/monorepo/package.json +++ b/packages/@react-native/monorepo/package.json @@ -51,8 +51,8 @@ "@jest/create-cache-key-function": "^29.7.0", "@microsoft/api-extractor": "^7.52.2", "@octokit/rest": "^22.0.0", - "@react-native/metro-babel-transformer": "0.85.0-nightly-20260224-42cd0f041", - "@react-native/metro-config": "0.85.0-nightly-20260224-42cd0f041", + "@react-native/metro-babel-transformer": "0.85.0-nightly-20260303-c26dbe286", + "@react-native/metro-config": "0.85.0-nightly-20260303-c26dbe286", "@tsconfig/node22": "22.0.2", "@types/react": "^19.2.3", "@typescript-eslint/parser": "^8.36.0", @@ -79,7 +79,7 @@ "eslint-plugin-relay": "^1.8.3", "fb-dotslash": "0.5.8", "flow-api-translator": "0.33.3", - "flow-bin": "^0.302.0", + "flow-bin": "^0.303.0", "hermes-eslint": "0.33.3", "hermes-transform": "0.33.3", "ini": "^5.0.0", @@ -93,9 +93,9 @@ "markdownlint-cli2": "^0.17.2", "markdownlint-rule-relative-links": "^3.0.0", "memfs": "^4.38.2", - "metro-babel-register": "^0.83.3", + "metro-babel-register": "^0.84.2", "metro-memory-fs": "^0.82.4", - "metro-transform-plugins": "^0.83.3", + "metro-transform-plugins": "^0.84.2", "micromatch": "^4.0.4", "node-fetch": "^2.2.0", "nullthrows": "^1.1.1", diff --git a/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverClippingParent.js b/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverClippingParent.js index a0b8381bf5b..c8c3cf01347 100644 --- a/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverClippingParent.js +++ b/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverClippingParent.js @@ -15,6 +15,7 @@ import type IntersectionObserverEntry from 'react-native/src/private/webapis/int import * as React from 'react'; import {useCallback, useLayoutEffect, useRef, useState} from 'react'; import {Button, StyleSheet, Text, TextInput, View} from 'react-native'; +import DOMRectReadOnly from 'react-native/src/private/webapis/geometry/DOMRectReadOnly'; export const name = 'IntersectionObserver Parent Clipping Example'; export const title = name; @@ -22,48 +23,33 @@ export const description = 'A clipping parent clips both the root and target'; declare var IntersectionObserver: Class; -export function render(): React.Node { - return ; +export function render(options?: {e2eTest?: boolean}): React.Node { + return ( + + ); } /** - * Showcase threshold of two overlapping elements + * Formats a DOMRectReadOnly for display with a label. */ -function roundRect(rect: unknown): ?{ - x: number, - y: number, - width: number, - height: number, -} { +function formatRect(label: string, rect: ?DOMRectReadOnly): ?string { if (rect == null || typeof rect !== 'object') { return null; } - // $FlowFixMe[prop-missing] - const x = rect.x; - // $FlowFixMe[prop-missing] - const y = rect.y; - // $FlowFixMe[prop-missing] const width = rect.width; - // $FlowFixMe[prop-missing] const height = rect.height; - if ( - typeof x !== 'number' || - typeof y !== 'number' || - typeof width !== 'number' || - typeof height !== 'number' - ) { + if (typeof width !== 'number' || typeof height !== 'number') { return null; } - return { - x: Math.round(x), - y: Math.round(y), - width: Math.round(width), - height: Math.round(height), - }; + return `${label}: width:${Math.round(width)}, height:${Math.round(height)}`; } -component IntersectionObserverCustomClippingRootExample() { +component IntersectionObserverCustomClippingRootExample( + e2eTest: boolean = false, +) { const rootRef = useRef(null); const targetRef = useRef(null); const [intersectionEntry, setIntersectionEntry] = @@ -136,35 +122,39 @@ component IntersectionObserverCustomClippingRootExample() { Current Root Margin: {rootMarginValue} - - This example highlights a clipping parent to both the explicit root - (blue) and target (yellow). The dashed borders show the full extent of - the root and target, while the solid colors show what's actually visible - after clipping. The purple dashed border shows the root bounds after - applying rootMargin. - - - - - Clipping Area (100x100) - - - - Root (visible) - - - - Target (visible) - - - - Full extent (dashed) - - - - Root + Margin (purple) + {!e2eTest && ( + + This example highlights a clipping parent to both the explicit root + (blue) and target (yellow). The dashed borders show the full extent of + the root and target, while the solid colors show what's actually + visible after clipping. The purple dashed border shows the root bounds + after applying rootMargin. + + )} + {!e2eTest && ( + + + + Clipping Area (100x100) + + + + Root (visible) + + + + Target (visible) + + + + Full extent (dashed) + + + + Root + Margin (purple) + - + )} @@ -214,16 +204,19 @@ component IntersectionObserverCustomClippingRootExample() { {(intersectionEntry.intersectionRatio * 100).toFixed(1)}% - Intersection Rect:{' '} - {JSON.stringify(roundRect(intersectionEntry.intersectionRect))} + {formatRect( + 'Intersection Rect', + intersectionEntry.intersectionRect, + )} - Bounding Client Rect:{' '} - {JSON.stringify(roundRect(intersectionEntry.boundingClientRect))} + {formatRect( + 'Bounding Client Rect', + intersectionEntry.boundingClientRect, + )} - Root Bounds:{' '} - {JSON.stringify(roundRect(intersectionEntry.rootBounds))} + {formatRect('Root Bounds', intersectionEntry.rootBounds)} )} diff --git a/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverExplicitRootScroll.js b/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverExplicitRootScroll.js index 2dfdea9f879..bf883446501 100644 --- a/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverExplicitRootScroll.js +++ b/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverExplicitRootScroll.js @@ -65,6 +65,7 @@ component IntersectionObserverExplicitRootScrollExample() { }} ref={roofRef}>