diff --git a/change/@office-iss-react-native-win32-00f08c1d-abec-4482-ac13-a55c51d9d0ab.json b/change/@office-iss-react-native-win32-00f08c1d-abec-4482-ac13-a55c51d9d0ab.json new file mode 100644 index 00000000000..b99650482d0 --- /dev/null +++ b/change/@office-iss-react-native-win32-00f08c1d-abec-4482-ac13-a55c51d9d0ab.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "integrate RN-Nightly 0.77.0-nightly-20241125-4cffff35e", + "packageName": "@office-iss/react-native-win32", + "email": "email not defined", + "dependentChangeType": "patch" +} diff --git a/change/@react-native-windows-automation-channel-9599af0a-0bfc-472c-a030-cce847337557.json b/change/@react-native-windows-automation-channel-9599af0a-0bfc-472c-a030-cce847337557.json new file mode 100644 index 00000000000..ca24ef8102f --- /dev/null +++ b/change/@react-native-windows-automation-channel-9599af0a-0bfc-472c-a030-cce847337557.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "integrate RN-Nightly 0.77.0-nightly-20241125-4cffff35e", + "packageName": "@react-native-windows/automation-channel", + "email": "email not defined", + "dependentChangeType": "patch" +} diff --git a/change/react-native-windows-cf3be303-f17a-4c7a-b180-a20c22ea1c27.json b/change/react-native-windows-cf3be303-f17a-4c7a-b180-a20c22ea1c27.json new file mode 100644 index 00000000000..b9d2afcddbb --- /dev/null +++ b/change/react-native-windows-cf3be303-f17a-4c7a-b180-a20c22ea1c27.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "integrate RN-Nightly 0.77.0-nightly-20241125-4cffff35e", + "packageName": "react-native-windows", + "email": "email not defined", + "dependentChangeType": "patch" +} diff --git a/packages/@office-iss/react-native-win32-tester/overrides.json b/packages/@office-iss/react-native-win32-tester/overrides.json index 307414f9bec..f1a3eb4f13d 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.77.0-nightly-20241118-3986eefed", + "baseVersion": "0.77.0-nightly-20241125-4cffff35e", "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 7317820e828..76cad89e5a8 100644 --- a/packages/@office-iss/react-native-win32-tester/package.json +++ b/packages/@office-iss/react-native-win32-tester/package.json @@ -19,7 +19,7 @@ "peerDependencies": { "@office-iss/react-native-win32": "^0.0.0-canary.275", "react": "18.0.0", - "react-native": "0.77.0-nightly-20241118-3986eefed" + "react-native": "0.77.0-nightly-20241125-4cffff35e" }, "devDependencies": { "@office-iss/react-native-win32": "^0.0.0-canary.275", @@ -30,7 +30,7 @@ "@types/node": "^18.0.0", "eslint": "^8.19.0", "just-scripts": "^1.3.3", - "react-native": "0.77.0-nightly-20241118-3986eefed", + "react-native": "0.77.0-nightly-20241125-4cffff35e", "react-native-platform-override": "^1.9.49", "typescript": "5.0.4" }, diff --git a/packages/@office-iss/react-native-win32/overrides.json b/packages/@office-iss/react-native-win32/overrides.json index 3aef529d49d..31b23b0e770 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.77.0-nightly-20241118-3986eefed", + "baseVersion": "0.77.0-nightly-20241125-4cffff35e", "overrides": [ { "type": "derived", "file": ".flowconfig", "baseFile": ".flowconfig", - "baseHash": "afa414432bb8dae6ce606a148b74f85fcef8a59d" + "baseHash": "168a2b4bcf33aba4727eb608902b17b4eb74c95d" }, { "type": "derived", @@ -197,7 +197,7 @@ "type": "patch", "file": "src-win/Libraries/Components/View/ViewPropTypes.win32.js", "baseFile": "packages/react-native/Libraries/Components/View/ViewPropTypes.js", - "baseHash": "a742b26e4c96fdefb07779e40bc58cd1cc872675", + "baseHash": "994aead3d5ab49e6bd34a497094a4bc131a8bdb1", "issue": 6240 }, { diff --git a/packages/@office-iss/react-native-win32/package.json b/packages/@office-iss/react-native-win32/package.json index 300e138ef3b..6bada06306c 100644 --- a/packages/@office-iss/react-native-win32/package.json +++ b/packages/@office-iss/react-native-win32/package.json @@ -30,19 +30,19 @@ "@react-native-community/cli-platform-android": "15.0.0-alpha.2", "@react-native-community/cli-platform-ios": "15.0.0-alpha.2", "@react-native/assets": "1.0.0", - "@react-native/assets-registry": "0.77.0-nightly-20241118-3986eefed", - "@react-native/codegen": "0.77.0-nightly-20241118-3986eefed", - "@react-native/community-cli-plugin": "0.77.0-nightly-20241118-3986eefed", - "@react-native/gradle-plugin": "0.77.0-nightly-20241118-3986eefed", - "@react-native/js-polyfills": "0.77.0-nightly-20241118-3986eefed", - "@react-native/normalize-colors": "0.77.0-nightly-20241118-3986eefed", - "@react-native/virtualized-lists": "0.77.0-nightly-20241118-3986eefed", + "@react-native/assets-registry": "0.77.0-nightly-20241125-4cffff35e", + "@react-native/codegen": "0.77.0-nightly-20241125-4cffff35e", + "@react-native/community-cli-plugin": "0.77.0-nightly-20241125-4cffff35e", + "@react-native/gradle-plugin": "0.77.0-nightly-20241125-4cffff35e", + "@react-native/js-polyfills": "0.77.0-nightly-20241125-4cffff35e", + "@react-native/normalize-colors": "0.77.0-nightly-20241125-4cffff35e", + "@react-native/virtualized-lists": "0.77.0-nightly-20241125-4cffff35e", "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.24.0", + "babel-plugin-syntax-hermes-parser": "0.25.1", "base64-js": "^1.5.1", "chalk": "^4.0.0", "commander": "^12.0.0", @@ -90,14 +90,14 @@ "just-scripts": "^1.3.3", "prettier": "2.8.8", "react": "18.3.1", - "react-native": "0.77.0-nightly-20241118-3986eefed", + "react-native": "0.77.0-nightly-20241125-4cffff35e", "react-native-platform-override": "^1.9.49", "typescript": "5.0.4" }, "peerDependencies": { "@types/react": "^18.2.6", "react": "^18.2.0", - "react-native": "0.77.0-nightly-20241118-3986eefed" + "react-native": "0.77.0-nightly-20241125-4cffff35e" }, "beachball": { "defaultNpmTag": "canary", diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/ViewPropTypes.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/ViewPropTypes.win32.js index 731115e4a75..dae6ae127c2 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/ViewPropTypes.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/ViewPropTypes.win32.js @@ -628,9 +628,6 @@ export type ViewProps = $ReadOnly<{| * optimization. Set this property to `false` to disable this optimization and * ensure that this `View` exists in the native view hierarchy. * - * @platform android - * In Fabric, this prop is used in ios as well. - * * See https://reactnative.dev/docs/view#collapsable */ collapsable?: ?boolean, diff --git a/packages/@react-native-windows/automation-channel/package.json b/packages/@react-native-windows/automation-channel/package.json index 5cc6797f1da..ae463bc8b3b 100644 --- a/packages/@react-native-windows/automation-channel/package.json +++ b/packages/@react-native-windows/automation-channel/package.json @@ -32,7 +32,7 @@ "just-scripts": "^1.3.2", "prettier": "2.8.8", "react": "18.3.1", - "react-native": "0.77.0-nightly-20241118-3986eefed", + "react-native": "0.77.0-nightly-20241125-4cffff35e", "react-native-windows": "^0.0.0-canary.902", "typescript": "5.0.4" }, @@ -45,4 +45,4 @@ "engines": { "node": ">= 18" } -} +} \ No newline at end of file diff --git a/packages/@react-native-windows/tester/overrides.json b/packages/@react-native-windows/tester/overrides.json index 2344c9367f0..97d18059cc6 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.77.0-nightly-20241118-3986eefed", + "baseVersion": "0.77.0-nightly-20241125-4cffff35e", "overrides": [ { "type": "derived", diff --git a/packages/@react-native-windows/tester/package.json b/packages/@react-native-windows/tester/package.json index d54293da979..f7cbf0e4dc4 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.4.10", "react": "18.0.0", - "react-native": "0.77.0-nightly-20241118-3986eefed", + "react-native": "0.77.0-nightly-20241125-4cffff35e", "react-native-windows": "^0.0.0-canary.902", "react-native-xaml": "^0.0.78" }, @@ -32,7 +32,7 @@ "@types/node": "^18.0.0", "eslint": "^8.19.0", "just-scripts": "^1.3.3", - "react-native": "0.77.0-nightly-20241118-3986eefed", + "react-native": "0.77.0-nightly-20241125-4cffff35e", "react-native-platform-override": "^1.9.49", "react-native-windows": "^0.0.0-canary.902", "typescript": "5.0.4" @@ -40,4 +40,4 @@ "engines": { "node": ">= 18" } -} +} \ No newline at end of file diff --git a/packages/@react-native/monorepo/overrides.json b/packages/@react-native/monorepo/overrides.json index d99522e200a..027c11b4e19 100644 --- a/packages/@react-native/monorepo/overrides.json +++ b/packages/@react-native/monorepo/overrides.json @@ -1,11 +1,11 @@ { - "baseVersion": "0.77.0-nightly-20241118-3986eefed", + "baseVersion": "0.77.0-nightly-20241125-4cffff35e", "overrides": [ { "type": "patch", "file": "package.json", "baseFile": "package.json", - "baseHash": "ed58cfcbca39885cda24a4d1e5d115e0e60e62f5" + "baseHash": "9e15fbb7324a582fea297efedd4d1843b2b94902" } ] } \ No newline at end of file diff --git a/packages/@react-native/monorepo/package.json b/packages/@react-native/monorepo/package.json index 682b063ed08..a6b1b1e065e 100644 --- a/packages/@react-native/monorepo/package.json +++ b/packages/@react-native/monorepo/package.json @@ -47,14 +47,14 @@ "@definitelytyped/dtslint": "^0.0.127", "@jest/create-cache-key-function": "^29.6.3", "@pkgjs/parseargs": "^0.11.0", - "@react-native/metro-babel-transformer": "0.77.0-nightly-20241118-3986eefed", - "@react-native/metro-config": "0.77.0-nightly-20241118-3986eefed", + "@react-native/metro-babel-transformer": "0.77.0-nightly-20241125-4cffff35e", + "@react-native/metro-config": "0.77.0-nightly-20241125-4cffff35e", "@tsconfig/node18": "1.0.1", "@types/react": "^18.2.6", "@typescript-eslint/parser": "^7.1.1", "ansi-styles": "^4.2.1", "babel-plugin-minify-dead-code-elimination": "^0.5.2", - "babel-plugin-syntax-hermes-parser": "0.24.0", + "babel-plugin-syntax-hermes-parser": "0.25.1", "babel-plugin-transform-define": "^2.1.4", "babel-plugin-transform-flow-enums": "^0.0.2", "chalk": "^4.0.0", diff --git a/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverIndex.js b/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverIndex.js index 2e71beaf427..9311a5801b1 100644 --- a/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverIndex.js +++ b/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverIndex.js @@ -10,6 +10,7 @@ import * as IntersectionObserverBenchmark from './IntersectionObserverBenchmark'; import * as IntersectionObserverMDNExample from './IntersectionObserverMDNExample'; +import * as IntersectionObserverRootThreshold from './IntersectionObserverRootThreshold'; export const framework = 'React'; export const title = 'IntersectionObserver'; @@ -22,4 +23,5 @@ export const showIndividualExamples = true; export const examples = [ IntersectionObserverMDNExample, IntersectionObserverBenchmark, + IntersectionObserverRootThreshold, ]; diff --git a/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverRootThreshold.js b/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverRootThreshold.js new file mode 100644 index 00000000000..5bb844048bc --- /dev/null +++ b/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverRootThreshold.js @@ -0,0 +1,221 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + * @flow strict-local + */ + +import type {ViewStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet'; + +import {RNTesterThemeContext} from '../../components/RNTesterTheme'; +import * as React from 'react'; +import { + type ElementRef, + useContext, + useLayoutEffect, + useRef, + useState, +} from 'react'; +import {Button, ScrollView, StyleSheet, Text, View} from 'react-native'; + +export const name = 'IntersectionObserver Root Threshold'; +export const title = name; +export const description = + 'Examples of setting threshold and rn_rootThreshold. Views will change background color if they meet their threshold.'; + +export function render(): React.Node { + return ; +} + +/** + * Similar to the example in MDN: https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API + */ +function IntersectionObserverRootThreshold(): React.Node { + const theme = useContext(RNTesterThemeContext); + const [showMargin, setShowMargin] = useState(true); + + return ( + +