diff --git a/change/@office-iss-react-native-win32-9cd66295-a74c-4f98-b629-1c2dbe6b776e.json b/change/@office-iss-react-native-win32-9cd66295-a74c-4f98-b629-1c2dbe6b776e.json new file mode 100644 index 00000000000..307a71b2596 --- /dev/null +++ b/change/@office-iss-react-native-win32-9cd66295-a74c-4f98-b629-1c2dbe6b776e.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Integrate React Native 0.87.0-nightly-20260604-63683f091 (June 4th)", + "packageName": "@office-iss/react-native-win32", + "email": "email not defined", + "dependentChangeType": "patch" +} diff --git a/change/@react-native-windows-automation-channel-7ac062f8-4585-49f7-99be-a168fbafb118.json b/change/@react-native-windows-automation-channel-7ac062f8-4585-49f7-99be-a168fbafb118.json new file mode 100644 index 00000000000..53bd49bdd44 --- /dev/null +++ b/change/@react-native-windows-automation-channel-7ac062f8-4585-49f7-99be-a168fbafb118.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Integrate React Native 0.87.0-nightly-20260604-63683f091 (June 4th)", + "packageName": "@react-native-windows/automation-channel", + "email": "email not defined", + "dependentChangeType": "patch" +} diff --git a/change/@react-native-windows-cli-be5d6e73-9e1f-4e7f-a0ff-65ff0661a65c.json b/change/@react-native-windows-cli-be5d6e73-9e1f-4e7f-a0ff-65ff0661a65c.json new file mode 100644 index 00000000000..54ce901bf98 --- /dev/null +++ b/change/@react-native-windows-cli-be5d6e73-9e1f-4e7f-a0ff-65ff0661a65c.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Integrate React Native 0.87.0-nightly-20260604-63683f091 (June 4th)", + "packageName": "@react-native-windows/cli", + "email": "email not defined", + "dependentChangeType": "patch" +} diff --git a/change/@react-native-windows-perf-testing-db3c2e20-9515-46c5-a116-2bbec05dba20.json b/change/@react-native-windows-perf-testing-db3c2e20-9515-46c5-a116-2bbec05dba20.json new file mode 100644 index 00000000000..0c7d2320b3e --- /dev/null +++ b/change/@react-native-windows-perf-testing-db3c2e20-9515-46c5-a116-2bbec05dba20.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Integrate React Native 0.87.0-nightly-20260604-63683f091 (June 4th)", + "packageName": "@react-native-windows/perf-testing", + "email": "email not defined", + "dependentChangeType": "patch" +} diff --git a/change/react-native-windows-e32a4ff6-6759-4792-a18b-498c36881708.json b/change/react-native-windows-e32a4ff6-6759-4792-a18b-498c36881708.json new file mode 100644 index 00000000000..62562d1a2d5 --- /dev/null +++ b/change/react-native-windows-e32a4ff6-6759-4792-a18b-498c36881708.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Integrate React Native 0.87.0-nightly-20260604-63683f091 (June 4th)", + "packageName": "react-native-windows", + "email": "email not defined", + "dependentChangeType": "patch" +} diff --git a/change/react-native-windows-init-80556143-a2fc-4cf1-a3ce-96b04e24f5fb.json b/change/react-native-windows-init-80556143-a2fc-4cf1-a3ce-96b04e24f5fb.json new file mode 100644 index 00000000000..1d36a83ce88 --- /dev/null +++ b/change/react-native-windows-init-80556143-a2fc-4cf1-a3ce-96b04e24f5fb.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Integrate React Native 0.87.0-nightly-20260604-63683f091 (June 4th)", + "packageName": "react-native-windows-init", + "email": "email not defined", + "dependentChangeType": "patch" +} diff --git a/package.json b/package.json index 741f4fdcefa..49cc7d5f601 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "prettier": "^3.6.2", "prettier-plugin-hermes-parser": "0.21.1", "react": "19.2.3", - "react-native": "0.87.0-nightly-20260519-58cd1bf58", + "react-native": "0.87.0-nightly-20260604-63683f091", "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 5f552dc4858..d25123731a5 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.87.0-nightly-20260519-58cd1bf58", + "baseVersion": "0.87.0-nightly-20260604-63683f091", "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 2b10bf85e25..c1cab9dd810 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.87.0-nightly-20260519-58cd1bf58", + "@react-native/tester": "0.87.0-nightly-20260604-63683f091", "@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.312", "react": "19.2.3", - "react-native": "0.87.0-nightly-20260519-58cd1bf58" + "react-native": "0.87.0-nightly-20260604-63683f091" }, "devDependencies": { "@office-iss/react-native-win32": "^0.0.0-canary.312", @@ -32,7 +32,7 @@ "just-scripts": "^1.3.3", "prettier": "^3.6.2", "react": "19.2.3", - "react-native": "0.87.0-nightly-20260519-58cd1bf58", + "react-native": "0.87.0-nightly-20260604-63683f091", "react-native-platform-override": "0.0.0-canary.1023", "typescript": "5.0.4" }, diff --git a/packages/@office-iss/react-native-win32/.flowconfig b/packages/@office-iss/react-native-win32/.flowconfig index 92333c90d9a..809537fbccf 100644 --- a/packages/@office-iss/react-native-win32/.flowconfig +++ b/packages/@office-iss/react-native-win32/.flowconfig @@ -115,6 +115,7 @@ src/types/ [options] enums=true experimental.pattern_matching=true +experimental.allow_variance_keywords=true casting_syntax=both component_syntax=true @@ -171,4 +172,4 @@ untyped-import untyped-type-import [version] -^0.314.0 +^0.316.0 diff --git a/packages/@office-iss/react-native-win32/overrides.json b/packages/@office-iss/react-native-win32/overrides.json index 4bbb528e251..b193da6de92 100644 --- a/packages/@office-iss/react-native-win32/overrides.json +++ b/packages/@office-iss/react-native-win32/overrides.json @@ -7,25 +7,25 @@ "**/__snapshots__/**", "src-win/rntypes/**" ], - "baseVersion": "0.87.0-nightly-20260519-58cd1bf58", + "baseVersion": "0.87.0-nightly-20260604-63683f091", "overrides": [ { "type": "derived", "file": ".flowconfig", "baseFile": ".flowconfig", - "baseHash": "8541594eb651d934e295d80bfca57608797c051d" + "baseHash": "cab29897ab41daf0bdf7ec14469f549709ee8df1" }, { "type": "derived", "file": "src-win/index.win32.js", "baseFile": "packages/react-native/index.js", - "baseHash": "4f1425bdee2bfc1532954a3ad0a9bca5ac5cb52d" + "baseHash": "a8995a3fd85b5ac8b503f475134706add0ac628d" }, { "type": "derived", "file": "src-win/index.win32.js.flow", "baseFile": "packages/react-native/index.js.flow", - "baseHash": "6ed6e4c48890f67618a2bacc4160cc7a1a205962" + "baseHash": "ba5a4284d241076a429506eb5f35df0e813237a1" }, { "type": "platform", @@ -66,7 +66,7 @@ "type": "derived", "file": "src-win/Libraries/Components/Button.win32.js", "baseFile": "packages/react-native/Libraries/Components/Button.js", - "baseHash": "441c1b0e0db63cb1f0e7597105e0ebdbfaabc6f4" + "baseHash": "dfaae1a77b333609c531734fd29fc9212094f2c7" }, { "type": "platform", @@ -91,20 +91,20 @@ "type": "patch", "file": "src-win/Libraries/Components/Pressable/Pressable.win32.js", "baseFile": "packages/react-native/Libraries/Components/Pressable/Pressable.js", - "baseHash": "f4f899e3e0cc0fc70de0021fbc2e4268e68c66dd", + "baseHash": "671fd9e3b50ad0dbc21237aba195b2fd536b0d33", "issue": 6240 }, { "type": "copy", "file": "src-win/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js", "baseFile": "packages/react-native/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js", - "baseHash": "5eb51a48b73b5c1ccc24fe34fd91c67c01b969d4" + "baseHash": "5ce9bc8741381a80a1eaa4af64fc7023bd3c43e9" }, { "type": "copy", "file": "src-win/Libraries/Components/SafeAreaView/SafeAreaView.win32.js", "baseFile": "packages/react-native/Libraries/Components/SafeAreaView/SafeAreaView.js", - "baseHash": "ebfbaeb4fbaaf7a262149d47f1af526828f7b086" + "baseHash": "73f001c9cf840b12c8f0e01da3388cedbcfdf105" }, { "type": "platform", @@ -120,7 +120,7 @@ "type": "derived", "file": "src-win/Libraries/Components/TextInput/TextInput.win32.js", "baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.js", - "baseHash": "63cc3972f4d9d1c369e616dd1a93348595e67a20" + "baseHash": "9f6b2c9e0e65947f9b76142aab4279c838515188" }, { "type": "patch", @@ -147,7 +147,7 @@ "type": "patch", "file": "src-win/Libraries/Components/Touchable/Touchable.win32.js", "baseFile": "packages/react-native/Libraries/Components/Touchable/Touchable.js", - "baseHash": "bb64188fc7f7c760c960de6a66d74048658d2fe5" + "baseHash": "eda6184f18761af5ae80c4ec4a8271e65140b28e" }, { "type": "derived", @@ -159,7 +159,7 @@ "type": "derived", "file": "src-win/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js", "baseFile": "packages/react-native/Libraries/Components/Touchable/TouchableNativeFeedback.js", - "baseHash": "7adb86e9810269266c8d1f9d252dc541a7030b75" + "baseHash": "56b83741ba7bfd763e0aa161ebde4a9648b30a67" }, { "type": "platform", @@ -177,13 +177,13 @@ "type": "patch", "file": "src-win/Libraries/Components/View/View.win32.js", "baseFile": "packages/react-native/Libraries/Components/View/View.js", - "baseHash": "31ddfc79350a2f57e3963501d37c1522b76b2f40" + "baseHash": "cc9a4ded5391bc4ac8e2054ea5f158d92d24b26f" }, { "type": "derived", "file": "src-win/Libraries/Components/View/ViewAccessibility.d.ts", "baseFile": "packages/react-native/Libraries/Components/View/ViewAccessibility.d.ts", - "baseHash": "1e4e3a89397960e8f08b86be62496473829c0ac3" + "baseHash": "6f10f9c0c28d5d70bfcb74d7cddb8f3c114c940d" }, { "type": "derived", @@ -201,7 +201,7 @@ "type": "patch", "file": "src-win/Libraries/Components/View/ViewPropTypes.win32.js", "baseFile": "packages/react-native/Libraries/Components/View/ViewPropTypes.js", - "baseHash": "4be3c7c79c4def3cd1a1a4df27f8ca2d8507f6e3", + "baseHash": "72246881f3da4f2eb2a11b4fcc459ecb9d3abe04", "issue": 6240 }, { @@ -236,7 +236,7 @@ "type": "derived", "file": "src-win/Libraries/Image/Image.win32.js", "baseFile": "packages/react-native/Libraries/Image/Image.ios.js", - "baseHash": "e52a6144ed3241e1e31e87292536908f8088d9c0", + "baseHash": "f2bfa56783706d0fd2af980d992f06a0a0d928a6", "issue": 4320 }, { @@ -425,7 +425,7 @@ "type": "derived", "file": "src-win/Libraries/Text/Text.win32.js", "baseFile": "packages/react-native/Libraries/Text/Text.js", - "baseHash": "c7a8fd756a79aee901d60cf731d3be71199bd3b3" + "baseHash": "9e8e0694c95f81bf26f842dcff8be43292f8c85d" }, { "type": "derived", @@ -438,20 +438,20 @@ "type": "derived", "file": "src-win/Libraries/Text/TextProps.win32.js", "baseFile": "packages/react-native/Libraries/Text/TextProps.js", - "baseHash": "8392ed76bf20cb9cc345066baa5809530fed1b72" + "baseHash": "62b3c3a1353376fb0e144a7916cd3dc79d1859cf" }, { "type": "patch", "file": "src-win/Libraries/Types/CoreEventTypes.win32.js", "baseFile": "packages/react-native/Libraries/Types/CoreEventTypes.js", - "baseHash": "a171d222c66e809419656decb12be33185f35952", + "baseHash": "486ae7020716f382ed63cef9f1d4aec15a8c3c70", "issue": 6240 }, { "type": "copy", "file": "src-win/Libraries/Utilities/BackHandler.win32.js", "baseFile": "packages/react-native/Libraries/Utilities/BackHandler.android.js", - "baseHash": "9fa1579308fcafa2d919b6f428e1ef2bdbfb83fc", + "baseHash": "da60a90a9e44f7146318ed30b2ff26867768b217", "issue": 4629 }, { @@ -497,7 +497,7 @@ "type": "patch", "file": "src-win/src/private/animated/NativeAnimatedHelper.win32.js", "baseFile": "packages/react-native/src/private/animated/NativeAnimatedHelper.js", - "baseHash": "cb4954c7fe4b3e5ac7a39f2a1fa0ce111e299a65", + "baseHash": "a2891638cebb0c8782f8adbb18a855fe0b282b41", "issue": 11041 }, { @@ -510,19 +510,19 @@ "type": "derived", "file": "src-win/src/private/specs_DEPRECATED/modules/NativeAccessibilityInfoWin32.js", "baseFile": "packages/react-native/src/private/specs_DEPRECATED/modules/NativeAccessibilityInfo.js", - "baseHash": "c36aa0a8347aa80fdc8bdbfc687adf284b7a2cae" + "baseHash": "9e0e3d3ad824e8acecd5f2e583d9d3281cb47215" }, { "type": "derived", "file": "src-win/src/private/specs_DEPRECATED/modules/NativeImageLoaderWin32.js", "baseFile": "packages/react-native/src/private/specs_DEPRECATED/modules/NativeImageLoaderAndroid.js", - "baseHash": "755d9106743414de391e261e31558de5ab28a8d0" + "baseHash": "ca9d38954ef1f7ae98b8975c244153fc8dbaea16" }, { "type": "derived", "file": "src-win/src/private/specs_DEPRECATED/modules/NativePlatformConstantsWin.js", "baseFile": "packages/react-native/src/private/specs_DEPRECATED/modules/NativePlatformConstantsAndroid.js", - "baseHash": "809b3807bafb9b73c95fd5ecf30f2d398f993847" + "baseHash": "6d562f689df6f0fd926a78326afce7f51b6b1279" } ] } \ No newline at end of file diff --git a/packages/@office-iss/react-native-win32/package.json b/packages/@office-iss/react-native-win32/package.json index 589e91cd0bb..f47f0f087ef 100644 --- a/packages/@office-iss/react-native-win32/package.json +++ b/packages/@office-iss/react-native-win32/package.json @@ -30,14 +30,14 @@ "@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.87.0-nightly-20260519-58cd1bf58", - "@react-native/codegen": "0.87.0-nightly-20260519-58cd1bf58", - "@react-native/community-cli-plugin": "0.87.0-nightly-20260519-58cd1bf58", - "@react-native/gradle-plugin": "0.87.0-nightly-20260519-58cd1bf58", - "@react-native/jest-preset": "0.87.0-nightly-20260519-58cd1bf58", - "@react-native/js-polyfills": "0.87.0-nightly-20260519-58cd1bf58", - "@react-native/normalize-colors": "0.87.0-nightly-20260519-58cd1bf58", - "@react-native/virtualized-lists": "0.87.0-nightly-20260519-58cd1bf58", + "@react-native/assets-registry": "0.87.0-nightly-20260604-63683f091", + "@react-native/codegen": "0.87.0-nightly-20260604-63683f091", + "@react-native/community-cli-plugin": "0.87.0-nightly-20260604-63683f091", + "@react-native/gradle-plugin": "0.87.0-nightly-20260604-63683f091", + "@react-native/jest-preset": "0.87.0-nightly-20260604-63683f091", + "@react-native/js-polyfills": "0.87.0-nightly-20260604-63683f091", + "@react-native/normalize-colors": "0.87.0-nightly-20260604-63683f091", + "@react-native/virtualized-lists": "0.87.0-nightly-20260604-63683f091", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", @@ -50,7 +50,7 @@ "event-target-shim": "^5.0.1", "flow-enums-runtime": "^0.0.6", "glob": "^7.1.1", - "hermes-compiler": "250829098.0.13", + "hermes-compiler": "250829098.0.14", "invariant": "^2.2.4", "jest-environment-node": "^29.7.0", "memoize-one": "^5.0.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.87.0-nightly-20260519-58cd1bf58", + "@react-native/metro-config": "0.87.0-nightly-20260604-63683f091", "@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", @@ -88,20 +88,20 @@ "@types/prop-types": "15.7.1", "@types/react": "^19.2.3", "eslint": "^8.19.0", - "flow-bin": "^0.314.0", + "flow-bin": "^0.316.0", "jscodeshift": "^0.14.0", "just-scripts": "^1.3.3", "prettier": "^3.6.2", "react": "19.2.3", - "react-native": "0.87.0-nightly-20260519-58cd1bf58", + "react-native": "0.87.0-nightly-20260604-63683f091", "react-native-platform-override": "0.0.0-canary.1023", "typescript": "5.0.4" }, "peerDependencies": { - "@react-native/jest-preset": "0.87.0-nightly-20260519-58cd1bf58", + "@react-native/jest-preset": "0.87.0-nightly-20260604-63683f091", "@types/react": "^19.1.1", "react": "^19.2.3", - "react-native": "0.87.0-nightly-20260519-58cd1bf58" + "react-native": "0.87.0-nightly-20260604-63683f091" }, "beachball": { "defaultNpmTag": "canary", diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Button.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Button.win32.js index a1729305b66..516005fea62 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Button.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Button.win32.js @@ -287,12 +287,18 @@ const NativeTouchable: | typeof TouchableOpacity = Platform.OS === 'android' ? TouchableNativeFeedback : TouchableOpacity; -type ButtonRef = React.ElementRef; +export type ButtonInstance = React.ElementRef; const Button: component( - ref?: React.RefSetter, + ref?: React.RefSetter, ...props: ButtonProps -) = ({ref, ...props}: {ref?: React.RefSetter, ...ButtonProps}) => { +) = ({ + ref, + ...props +}: { + ref?: React.RefSetter, + ...ButtonProps, +}) => { // Win32 const { accessibilityLabel, diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Pressable/Pressable.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Pressable/Pressable.win32.js index d53b3784875..29cad91a8ef 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Pressable/Pressable.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Pressable/Pressable.win32.js @@ -8,6 +8,7 @@ * @format */ +import type {HostInstance} from '../../../src/private/types/HostInstance'; import type {ViewStyleProp} from '../../StyleSheet/StyleSheet'; import type { GestureResponderEvent, @@ -34,6 +35,8 @@ import {memo, useMemo, useRef, useState} from 'react'; import type {HandledKeyboardEvent} from '../../Components/View/ViewPropTypes'; import View from '../View/View'; +export type PressableInstance = HostInstance; + export type {PressableAndroidRippleConfig}; export type PressableStateCallbackType = Readonly<{ @@ -212,8 +215,6 @@ export type PressableProps = Readonly<{ ...PressableBaseProps, }>; -type Instance = React.ElementRef; - /** * Component used to build display components that should respond to whether the * component is currently pressed or not. @@ -222,7 +223,7 @@ function Pressable({ ref: forwardedRef, ...props }: { - ref?: React.RefSetter, + ref?: React.RefSetter, ...PressableProps, }): React.Node { const { @@ -268,7 +269,7 @@ function Pressable({ ...restProps } = props; - const viewRef = useRef(null); + const viewRef = useRef(null); const mergedRef = useMergeRefs(forwardedRef, viewRef); const android_rippleConfig = useAndroidRippleForView(android_ripple, viewRef); @@ -416,6 +417,6 @@ const MemoedPressable = memo(Pressable); MemoedPressable.displayName = 'Pressable'; export default MemoedPressable as component( - ref?: React.RefSetter>, + ref?: React.RefSetter, ...props: PressableProps ); diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js index 447327cb669..1a6bd48ab1b 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js @@ -10,11 +10,13 @@ 'use strict'; -import typeof ProgressBarAndroidNativeComponentType from './ProgressBarAndroidNativeComponent'; +import type {HostInstance} from '../../../src/private/types/HostInstance'; import type {ProgressBarAndroidProps} from './ProgressBarAndroidTypes'; import Platform from '../../Utilities/Platform'; +export type ProgressBarAndroidInstance = HostInstance; + export type {ProgressBarAndroidProps}; // A utility type to preserve the semantics of the union uses in the definition @@ -30,9 +32,7 @@ type Omit = T extends any ? Pick> : T; * @deprecated */ let ProgressBarAndroid: component( - ref?: React.RefSetter< - React.ElementRef, - >, + ref?: React.RefSetter, ...props: Omit ); diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/SafeAreaView/SafeAreaView.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/SafeAreaView/SafeAreaView.win32.js index 34097b8ea3b..b6f5a47aaf7 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/SafeAreaView/SafeAreaView.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/SafeAreaView/SafeAreaView.win32.js @@ -8,12 +8,15 @@ * @format */ +import type {HostInstance} from '../../../src/private/types/HostInstance'; import type {ViewProps} from '../View/ViewPropTypes'; import Platform from '../../Utilities/Platform'; import View from '../View/View'; import * as React from 'react'; +export type SafeAreaViewInstance = HostInstance; + /** * Renders nested content and automatically applies paddings reflect the portion * of the view that is not covered by navigation bars, tab bars, toolbars, and @@ -25,7 +28,7 @@ import * as React from 'react'; * @deprecated Use `react-native-safe-area-context` instead. This component will be removed in a future release. */ const SafeAreaView: component( - ref?: React.RefSetter>, + ref?: React.RefSetter, ...props: ViewProps ) = Platform.select({ ios: require('./RCTSafeAreaViewNativeComponent').default, diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/TextInput/TextInput.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/TextInput/TextInput.win32.js index 5e216b1a7a6..03114efe2b2 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/TextInput/TextInput.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/TextInput/TextInput.win32.js @@ -129,6 +129,7 @@ export type { TextInputKeyPressEvent, TextInputProps, TextInputSelectionChangeEvent, + TextInputInstance, TextInputSubmitEditingEvent, TextInputWindowsProps, // [Windows] }; diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Touchable/Touchable.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Touchable/Touchable.win32.js index fc5f7829c5d..e9dbccfc423 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Touchable/Touchable.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Touchable/Touchable.win32.js @@ -25,21 +25,21 @@ import Position from './Position'; import * as React from 'react'; const extractSingleTouch = (nativeEvent: { - +changedTouches: ReadonlyArray, - +altKey: ?boolean, - +button: ?number, - +ctrlKey: ?boolean, - +force?: number, - +identifier: number, - +locationX: number, - +locationY: number, - +metaKey: ?boolean, - +pageX: number, - +pageY: number, - +shiftKey: ?boolean, - +target: ?number, - +timestamp: number, - +touches: ReadonlyArray, + readonly changedTouches: ReadonlyArray, + readonly altKey: ?boolean, + readonly button: ?number, + readonly ctrlKey: ?boolean, + readonly force?: number, + readonly identifier: number, + readonly locationX: number, + readonly locationY: number, + readonly metaKey: ?boolean, + readonly pageX: number, + readonly pageY: number, + readonly shiftKey: ?boolean, + readonly target: ?number, + readonly timestamp: number, + readonly touches: ReadonlyArray, }) => { const touches = nativeEvent.touches; const changedTouches = nativeEvent.changedTouches; diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js index d827bfc1b15..5f044705fe4 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js @@ -7,6 +7,8 @@ */ 'use strict'; +import type {ProcessedColorValue} from '../../StyleSheet/processColor'; +import type {ColorValue} from '../../StyleSheet/StyleSheet'; import type {GestureResponderEvent} from '../../Types/CoreEventTypes'; import type {TouchableWithoutFeedbackProps} from './TouchableWithoutFeedback'; @@ -18,7 +20,6 @@ import {findHostInstance_DEPRECATED} from '../../ReactNative/RendererProxy'; import processColor from '../../StyleSheet/processColor'; import Platform from '../../Utilities/Platform'; import {Commands} from '../View/ViewNativeComponent'; -import invariant from 'invariant'; import * as React from 'react'; import {cloneElement} from 'react'; @@ -94,7 +95,7 @@ export type TouchableNativeFeedbackProps = Readonly<{ }> | Readonly<{ type: 'RippleAndroid', - color: ?number, + color: ?ProcessedColorValue, borderless: boolean, rippleRadius: ?number, }> @@ -177,23 +178,18 @@ class TouchableNativeFeedback extends React.Component< * @param rippleRadius The radius of ripple effect */ static Ripple: ( - color: string, + color: ColorValue, borderless: boolean, rippleRadius?: ?number, ) => Readonly<{ borderless: boolean, - color: ?number, + color: ?ProcessedColorValue, rippleRadius: ?number, type: 'RippleAndroid', - }> = (color: string, borderless: boolean, rippleRadius?: ?number) => { + }> = (color: ColorValue, borderless: boolean, rippleRadius?: ?number) => { const processedColor = processColor(color); - invariant( - processedColor == null || typeof processedColor === 'number', - 'Unexpected color given for Ripple color', - ); return { type: 'RippleAndroid', - // $FlowFixMe[incompatible-type] color: processedColor, borderless, rippleRadius, @@ -304,4 +300,6 @@ class TouchableNativeFeedback extends React.Component< TouchableNativeFeedback.displayName = 'TouchableNativeFeedback'; +export type TouchableNativeFeedbackInstance = TouchableNativeFeedback; + export default TouchableNativeFeedback; diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/View.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/View.win32.js index 9aadbe20c8f..a1cf71ee53b 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/View.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/View.win32.js @@ -8,6 +8,7 @@ * @format */ +import type {HostInstance} from '../../../src/private/types/HostInstance'; import type {ViewProps} from './ViewPropTypes'; import TextAncestorContext from '../../Text/TextAncestorContext'; @@ -18,6 +19,8 @@ import invariant from 'invariant'; // [Windows] import type {KeyUpEvent, KeyDownEvent} from '../../Types/CoreEventTypes'; // Windows] +export type ViewInstance = HostInstance; + /** * The most fundamental component for building a UI, View is a container that * supports layout with flexbox, style, some touch handling, and accessibility @@ -26,7 +29,7 @@ import type {KeyUpEvent, KeyDownEvent} from '../../Types/CoreEventTypes'; * @see https://reactnative.dev/docs/view */ const View: component( - ref?: React.RefSetter>, + ref?: React.RefSetter, ...props: ViewProps ) = React.forwardRef( ( @@ -71,7 +74,7 @@ const View: component( tabIndex, ...otherProps }: ViewProps, - forwardedRef: React.RefSetter>, + forwardedRef: React.RefSetter, ) => { const _accessibilityLabelledBy = ariaLabelledBy?.split(/\s*,\s*/g) ?? accessibilityLabelledBy; diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/ViewAccessibility.d.ts b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/ViewAccessibility.d.ts index f3fa4e5637d..111b893c1dd 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/ViewAccessibility.d.ts +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/ViewAccessibility.d.ts @@ -235,6 +235,7 @@ export type AccessibilityRole = | 'tree' // Win32 | 'treeitem' // Win32 | 'button' + | 'dropdownlist' | 'togglebutton' | 'link' | 'search' @@ -262,7 +263,16 @@ export type AccessibilityRole = | 'tablist' | 'timer' | 'list' - | 'toolbar'; + | 'toolbar' + | 'grid' + | 'pager' + | 'scrollview' + | 'horizontalscrollview' + | 'viewgroup' + | 'webview' + | 'drawerlayout' + | 'slidingdrawer' + | 'iconmenu'; export interface AccessibilityPropsAndroid { /** 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 1fb3c570f42..7c0c43a5777 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 @@ -11,6 +11,7 @@ 'use strict'; import type {EdgeInsetsOrSizeProp} from '../../StyleSheet/EdgeInsetsPropType'; +import type {ProcessedColorValue} from '../../StyleSheet/processColor'; import type {ViewStyleProp} from '../../StyleSheet/StyleSheet'; import type { BlurEvent, @@ -265,9 +266,10 @@ type AndroidDrawableThemeAttr = Readonly<{ type AndroidDrawableRipple = Readonly<{ type: 'RippleAndroid', - color?: ?number, + color?: ?ProcessedColorValue, borderless?: ?boolean, rippleRadius?: ?number, + alpha?: ?number, }>; type AndroidDrawable = AndroidDrawableThemeAttr | AndroidDrawableRipple; diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Image/Image.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Image/Image.win32.js index bb1b0c93f3e..03277a70dc7 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Image/Image.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Image/Image.win32.js @@ -32,6 +32,8 @@ import ImageViewNativeComponent from './ImageViewNativeComponent'; import resolveAssetSource from './resolveAssetSource'; import * as React from 'react'; +export type ImageInstance = HostInstance; + function getSize( uri: string, success?: (width: number, height: number) => void, @@ -128,7 +130,7 @@ let BaseImage: AbstractImageIOS = ({ ref: forwardedRef, ...props }: { - ref?: React.RefSetter, + ref?: React.RefSetter, ...ImageProps, }) => { const source = getImageSourcesFromImageProps(props) || { 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 381878740b3..f6d0c494157 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 @@ -8,6 +8,7 @@ * @format */ +import type {HostInstance} from '../../src/private/types/HostInstance'; import type {TextStyleProp} from '../StyleSheet/StyleSheet'; import type {____TextStyle_Internal as TextStyleInternal} from '../StyleSheet/StyleSheetTypes'; import type {GestureResponderEvent} from '../Types/CoreEventTypes'; @@ -30,11 +31,9 @@ import { import * as React from 'react'; import {useContext, useMemo, useState} from 'react'; -export type {TextProps} from './TextProps'; +export type TextInstance = HostInstance; -type TextForwardRef = React.ElementRef< - typeof NativeText | typeof NativeVirtualText | typeof NativeSelectableText, ->; +export type {TextProps} from './TextProps'; /** * Text is the fundamental component for displaying text. @@ -42,7 +41,7 @@ type TextForwardRef = React.ElementRef< * @see https://reactnative.dev/docs/text */ const TextImpl: component( - ref?: React.RefSetter, + ref?: React.RefSetter, ...props: TextProps ) = ({ ref: forwardedRef, @@ -98,7 +97,7 @@ const TextImpl: component( style, ...restProps }: { - ref?: React.RefSetter, + ref?: React.RefSetter, ...TextProps, }) => { const processedProps = restProps as { @@ -541,7 +540,7 @@ function useTextPressability({ * expensive pressability logic to be only initialized when needed. */ component PressableVirtualText( - ref?: React.RefSetter, + ref?: React.RefSetter, textProps: NativeTextProps, textPressabilityProps: TextPressabilityProps, ) { @@ -567,7 +566,7 @@ component PressableVirtualText( * expensive pressability logic to be only initialized when needed. */ component PressableText( - ref?: React.RefSetter, + ref?: React.RefSetter, selectable?: ?boolean, textProps: NativeTextProps, textPressabilityProps: TextPressabilityProps, diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Text/TextProps.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Text/TextProps.win32.js index 480f92adc99..38f829b0cc2 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Text/TextProps.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Text/TextProps.win32.js @@ -129,6 +129,13 @@ type TextBaseProps = Readonly<{ accessibilityLevel?: ?number, // Win32 accessibilityPositionInSet?: ?number, // Win32 accessibilitySetSize?: ?number, // Win32 + /** + * Controls whether the `Text` can be the target of touch events. + * + * See https://reactnative.dev/docs/view#pointerevents + */ + pointerEvents?: ?('auto' | 'box-none' | 'box-only' | 'none'), + /** * Whether fonts should scale to respect Text Size accessibility settings. * The default is `true`. diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Types/CoreEventTypes.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Types/CoreEventTypes.win32.js index 8d8a71e0be0..0f986e43cae 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Types/CoreEventTypes.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Types/CoreEventTypes.win32.js @@ -10,7 +10,7 @@ import type {HostInstance} from '../../src/private/types/HostInstance'; -export type NativeSyntheticEvent<+T> = Readonly<{ +export type NativeSyntheticEvent = Readonly<{ bubbles: ?boolean, cancelable: ?boolean, currentTarget: number | HostInstance, @@ -89,7 +89,7 @@ export interface NativeUIEvent { /** * Returns a long with details about the event, depending on the event type. */ - +detail: number; + readonly detail: number; } /** @@ -99,81 +99,81 @@ export interface NativeMouseEvent extends NativeUIEvent { /** * The X coordinate of the mouse pointer in global (screen) coordinates. */ - +screenX: number; + readonly screenX: number; /** * The Y coordinate of the mouse pointer in global (screen) coordinates. */ - +screenY: number; + readonly screenY: number; /** * The X coordinate of the mouse pointer relative to the whole document. */ - +pageX: number; + readonly pageX: number; /** * The Y coordinate of the mouse pointer relative to the whole document. */ - +pageY: number; + readonly pageY: number; /** * The X coordinate of the mouse pointer in local (DOM content) coordinates. */ - +clientX: number; + readonly clientX: number; /** * The Y coordinate of the mouse pointer in local (DOM content) coordinates. */ - +clientY: number; + readonly clientY: number; /** * Alias for NativeMouseEvent.clientX */ - +x: number; + readonly x: number; /** * Alias for NativeMouseEvent.clientY */ - +y: number; + readonly y: number; /** * Returns true if the control key was down when the mouse event was fired. */ - +ctrlKey: boolean; + readonly ctrlKey: boolean; /** * Returns true if the shift key was down when the mouse event was fired. */ - +shiftKey: boolean; + readonly shiftKey: boolean; /** * Returns true if the alt key was down when the mouse event was fired. */ - +altKey: boolean; + readonly altKey: boolean; /** * Returns true if the meta key was down when the mouse event was fired. */ - +metaKey: boolean; + readonly metaKey: boolean; /** * The button number that was pressed (if applicable) when the mouse event was fired. */ - +button: number; + readonly button: number; /** * The buttons being depressed (if any) when the mouse event was fired. */ - +buttons: number; + readonly buttons: number; /** * The secondary target for the event, if there is one. */ - +relatedTarget: null | number | HostInstance; + readonly relatedTarget: null | number | HostInstance; // offset is proposed: https://drafts.csswg.org/cssom-view/#extensions-to-the-mouseevent-interface /** * The X coordinate of the mouse pointer between that event and the padding edge of the target node */ - +offsetX: number; + readonly offsetX: number; /** * The Y coordinate of the mouse pointer between that event and the padding edge of the target node */ - +offsetY: number; + readonly offsetY: number; // [Windows - +isLeftButton: boolean; - +isRightButton: boolean; - +isMiddleButton: boolean; - +isBarrelButtonPressed: boolean; - +isHorizontalScrollWheel: boolean; - +isEraser: boolean; - +target: ?number; + readonly isLeftButton: boolean; + readonly isRightButton: boolean; + readonly isMiddleButton: boolean; + readonly isBarrelButtonPressed: boolean; + readonly isHorizontalScrollWheel: boolean; + readonly isEraser: boolean; + readonly target: ?number; // Windows] } @@ -184,48 +184,48 @@ export interface NativePointerEvent extends NativeMouseEvent { /** * A unique identifier for the pointer causing the event. */ - +pointerId: number; + readonly pointerId: number; /** * The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer */ - +width: number; + readonly width: number; /** * The height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer. */ - +height: number; + readonly height: number; /** * The normalized pressure of the pointer input in the range 0 to 1, where 0 and 1 represent * the minimum and maximum pressure the hardware is capable of detecting, respectively. */ - +pressure: number; + readonly pressure: number; /** * The normalized tangential pressure of the pointer input (also known as barrel pressure or * cylinder stress) in the range -1 to 1, where 0 is the neutral position of the control. */ - +tangentialPressure: number; + readonly tangentialPressure: number; /** * The plane angle (in degrees, in the range of -90 to 90) between the Y–Z plane and the plane * containing both the pointer (e.g. pen stylus) axis and the Y axis. */ - +tiltX: number; + readonly tiltX: number; /** * The plane angle (in degrees, in the range of -90 to 90) between the X–Z plane and the plane * containing both the pointer (e.g. pen stylus) axis and the X axis. */ - +tiltY: number; + readonly tiltY: number; /** * The clockwise rotation of the pointer (e.g. pen stylus) around its major axis in degrees, * with a value in the range 0 to 359. */ - +twist: number; + readonly twist: number; /** * Indicates the device type that caused the event (mouse, pen, touch, etc.) */ - +pointerType: string; + readonly pointerType: string; /** * Indicates if the pointer represents the primary pointer of this pointer type. */ - +isPrimary: boolean; + readonly isPrimary: boolean; } export type PointerEvent = NativeSyntheticEvent; diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Utilities/BackHandler.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Utilities/BackHandler.win32.js index d29e71fa07b..c47b0f6a22b 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Utilities/BackHandler.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Utilities/BackHandler.win32.js @@ -63,8 +63,8 @@ RCTDeviceEventEmitter.addListener(DEVICE_BACK_EVENT, function (nativeEvent) { * ``` */ type TBackHandler = { - +exitApp: () => void, - +addEventListener: ( + readonly exitApp: () => void, + readonly addEventListener: ( eventName: BackPressEventName, handler: BackPressHandler, ) => {remove: () => void, ...}, diff --git a/packages/@office-iss/react-native-win32/src-win/index.win32.js b/packages/@office-iss/react-native-win32/src-win/index.win32.js index a78a0488c45..99771aa5ad6 100644 --- a/packages/@office-iss/react-native-win32/src-win/index.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/index.win32.js @@ -260,18 +260,6 @@ module.exports = { get I18nManager() { return require('./Libraries/ReactNative/I18nManager').default; }, - /** - * @deprecated - */ - get InteractionManager() { - warnOnce( - 'interaction-manager-deprecated', - 'InteractionManager has been deprecated and will be removed in a ' + - 'future release. Please refactor long tasks into smaller ones, and ' + - " use 'requestIdleCallback' instead.", - ); - return require('./Libraries/Interaction/InteractionManager').default; - }, get Keyboard() { return require('./Libraries/Components/Keyboard/Keyboard').default; }, @@ -290,10 +278,6 @@ module.exports = { get NativeComponentRegistry() { return require('./Libraries/NativeComponent/NativeComponentRegistry'); }, - get NativeDialogManagerAndroid() { - return require('./Libraries/NativeModules/specs/NativeDialogManagerAndroid') - .default; - }, get NativeEventEmitter() { return require('./Libraries/EventEmitter/NativeEventEmitter').default; }, @@ -437,78 +421,17 @@ module.exports = { if (__DEV__) { /* $FlowFixMe[prop-missing] This is intentional: Flow will error when - * attempting to access AsyncStorage. */ - /* $FlowFixMe[invalid-export] This is intentional: Flow will error when - * attempting to access AsyncStorage. */ - Object.defineProperty(module.exports, 'AsyncStorage', { - configurable: true, - get() { - invariant( - false, - 'AsyncStorage has been removed from react-native core. ' + - "It can now be installed and imported from '@react-native-async-storage/async-storage' instead of 'react-native'. " + - 'See https://github.com/react-native-async-storage/async-storage', - ); - }, - }); - /* $FlowFixMe[prop-missing] This is intentional: Flow will error when - * attempting to access ImagePickerIOS. */ - /* $FlowFixMe[invalid-export] This is intentional: Flow will error when - * attempting to access ImagePickerIOS. */ - Object.defineProperty(module.exports, 'ImagePickerIOS', { - configurable: true, - get() { - invariant( - false, - 'ImagePickerIOS has been removed from React Native. ' + - "Please upgrade to use either 'react-native-image-picker' or 'expo-image-picker'. " + - "If you cannot upgrade to a different library, please install the deprecated '@react-native-community/image-picker-ios' package. " + - 'See https://github.com/rnc-archive/react-native-image-picker-ios', - ); - }, - }); - /* $FlowFixMe[prop-missing] This is intentional: Flow will error when - * attempting to access ProgressViewIOS. */ - /* $FlowFixMe[invalid-export] This is intentional: Flow will error when - * attempting to access ProgressViewIOS. */ - Object.defineProperty(module.exports, 'ProgressViewIOS', { - configurable: true, - get() { - invariant( - false, - 'ProgressViewIOS has been removed from react-native core. ' + - "It can now be installed and imported from '@react-native-community/progress-view' instead of 'react-native'. " + - 'See https://github.com/react-native-progress-view/progress-view', - ); - }, - }); - /* $FlowFixMe[prop-missing] This is intentional: Flow will error when - * attempting to access DatePickerIOS. */ - /* $FlowFixMe[invalid-export] This is intentional: Flow will error when - * attempting to access DatePickerIOS. */ - Object.defineProperty(module.exports, 'DatePickerIOS', { - configurable: true, - get() { - invariant( - false, - 'DatePickerIOS has been removed from react-native core. ' + - "It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. " + - 'See https://github.com/react-native-datetimepicker/datetimepicker', - ); - }, - }); - /* $FlowFixMe[prop-missing] This is intentional: Flow will error when - * attempting to access Slider. */ + * attempting to access InteractionManager. */ /* $FlowFixMe[invalid-export] This is intentional: Flow will error when - * attempting to access Slider. */ - Object.defineProperty(module.exports, 'Slider', { + * attempting to access InteractionManager. */ + Object.defineProperty(module.exports, 'InteractionManager', { configurable: true, get() { invariant( false, - 'Slider has been removed from react-native core. ' + - "It can now be installed and imported from '@react-native-community/slider' instead of 'react-native'. " + - 'See https://github.com/callstack/react-native-slider', + 'InteractionManager has been removed from react-native core. ' + + 'Please refactor long tasks into smaller ones, and use ' + + "'requestIdleCallback' instead.", ); }, }); diff --git a/packages/@office-iss/react-native-win32/src-win/index.win32.js.flow b/packages/@office-iss/react-native-win32/src-win/index.win32.js.flow index 7c15414a7e8..5bef8bda7d7 100644 --- a/packages/@office-iss/react-native-win32/src-win/index.win32.js.flow +++ b/packages/@office-iss/react-native-win32/src-win/index.win32.js.flow @@ -22,21 +22,26 @@ // #region Components -export type {ActivityIndicatorProps} from './Libraries/Components/ActivityIndicator/ActivityIndicator'; +export type { + ActivityIndicatorInstance, + ActivityIndicatorProps, +} from './Libraries/Components/ActivityIndicator/ActivityIndicator'; export {default as ActivityIndicator} from './Libraries/Components/ActivityIndicator/ActivityIndicator'; -export type {ButtonProps} from './Libraries/Components/Button'; +export type {ButtonInstance, ButtonProps} from './Libraries/Components/Button'; export {default as Button} from './Libraries/Components/Button'; export type { + DrawerLayoutAndroidInstance, DrawerLayoutAndroidProps, DrawerSlideEvent, -} from './Libraries/Components/DrawerAndroid/DrawerLayoutAndroid'; +} from './Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes'; export {default as DrawerLayoutAndroid} from './Libraries/Components/DrawerAndroid/DrawerLayoutAndroid'; -export type {FlatListProps} from './Libraries/Lists/FlatList'; +export type {FlatListInstance, FlatListProps} from './Libraries/Lists/FlatList'; export {default as FlatList} from './Libraries/Lists/FlatList'; +export type {ImageInstance} from './Libraries/Image/ImageTypes.flow'; // [Win32] Import Image types from source files since Image.js is ignored and // Image.win32.js doesn't re-export these types export type { @@ -60,12 +65,16 @@ export type { ImageURISource, } from './Libraries/Image/ImageSource'; export {default as Image} from './Libraries/Image/Image'; +export type {ImageBackgroundInstance} from './Libraries/Image/ImageBackground'; export {default as ImageBackground} from './Libraries/Image/ImageBackground'; export type {InputAccessoryViewProps} from './Libraries/Components/TextInput/InputAccessoryView'; export {default as InputAccessoryView} from './Libraries/Components/TextInput/InputAccessoryView'; -export type {KeyboardAvoidingViewProps} from './Libraries/Components/Keyboard/KeyboardAvoidingView'; +export type { + KeyboardAvoidingViewInstance, + KeyboardAvoidingViewProps, +} from './Libraries/Components/Keyboard/KeyboardAvoidingView'; export {default as KeyboardAvoidingView} from './Libraries/Components/Keyboard/KeyboardAvoidingView'; export type {LayoutConformanceProps} from './Libraries/Components/LayoutConformance/LayoutConformance'; @@ -73,6 +82,7 @@ export {default as experimental_LayoutConformance} from './Libraries/Components/ export type { ModalBaseProps, + ModalInstance, ModalProps, ModalPropsAndroid, ModalPropsIOS, @@ -81,25 +91,32 @@ export {default as Modal} from './Libraries/Modal/Modal'; export type { PressableAndroidRippleConfig, + PressableInstance, PressableProps, PressableStateCallbackType, } from './Libraries/Components/Pressable/Pressable'; export {default as Pressable} from './Libraries/Components/Pressable/Pressable'; -export type {ProgressBarAndroidProps} from './Libraries/Components/ProgressBarAndroid/ProgressBarAndroid'; +export type { + ProgressBarAndroidInstance, + ProgressBarAndroidProps, +} from './Libraries/Components/ProgressBarAndroid/ProgressBarAndroid'; export {default as ProgressBarAndroid} from './Libraries/Components/ProgressBarAndroid/ProgressBarAndroid'; export type { + RefreshControlInstance, RefreshControlProps, RefreshControlPropsAndroid, RefreshControlPropsIOS, } from './Libraries/Components/RefreshControl/RefreshControl'; export {default as RefreshControl} from './Libraries/Components/RefreshControl/RefreshControl'; +export type {SafeAreaViewInstance} from './Libraries/Components/SafeAreaView/SafeAreaView'; export {default as SafeAreaView} from './Libraries/Components/SafeAreaView/SafeAreaView'; export type { ScrollViewImperativeMethods, + ScrollViewInstance, ScrollViewScrollToOptions, ScrollResponderType, ScrollViewProps, @@ -109,6 +126,7 @@ export type { export {default as ScrollView} from './Libraries/Components/ScrollView/ScrollView'; export type { + SectionListInstance, SectionListProps, SectionListRenderItem, SectionListRenderItemInfo, @@ -118,6 +136,7 @@ export {default as SectionList} from './Libraries/Lists/SectionList'; export type { StatusBarAnimation, + StatusBarInstance, StatusBarProps, StatusBarStyle, } from './Libraries/Components/StatusBar/StatusBar'; @@ -125,11 +144,12 @@ export {default as StatusBar} from './Libraries/Components/StatusBar/StatusBar'; export type { SwitchChangeEvent, + SwitchInstance, SwitchProps, } from './Libraries/Components/Switch/Switch'; export {default as Switch} from './Libraries/Components/Switch/Switch'; -export type {TextProps} from './Libraries/Text/Text'; +export type {TextInstance, TextProps} from './Libraries/Text/Text'; export {default as Text} from './Libraries/Text/Text'; export type {NativeTextProps as unstable_NativeTextProps} from './Libraries/Text/TextNativeComponent'; export {NativeText as unstable_NativeText} from './Libraries/Text/TextNativeComponent'; @@ -142,6 +162,7 @@ export type { InputModeOptions, TextContentType, TextInputAndroidProps, + TextInputInstance, TextInputIOSProps, TextInputProps, TextInputChangeEvent, @@ -158,13 +179,22 @@ export {default as TextInput} from './Libraries/Components/TextInput/TextInput'; export {default as Touchable} from './Libraries/Components/Touchable/Touchable'; -export type {TouchableHighlightProps} from './Libraries/Components/Touchable/TouchableHighlight'; +export type { + TouchableHighlightInstance, + TouchableHighlightProps, +} from './Libraries/Components/Touchable/TouchableHighlight'; export {default as TouchableHighlight} from './Libraries/Components/Touchable/TouchableHighlight'; -export type {TouchableNativeFeedbackProps} from './Libraries/Components/Touchable/TouchableNativeFeedback'; +export type { + TouchableNativeFeedbackInstance, + TouchableNativeFeedbackProps, +} from './Libraries/Components/Touchable/TouchableNativeFeedback'; export {default as TouchableNativeFeedback} from './Libraries/Components/Touchable/TouchableNativeFeedback'; -export type {TouchableOpacityProps} from './Libraries/Components/Touchable/TouchableOpacity'; +export type { + TouchableOpacityInstance, + TouchableOpacityProps, +} from './Libraries/Components/Touchable/TouchableOpacity'; export {default as TouchableOpacity} from './Libraries/Components/Touchable/TouchableOpacity'; export type {TouchableWithoutFeedbackProps} from './Libraries/Components/Touchable/TouchableWithoutFeedback'; @@ -185,6 +215,7 @@ export type { ViewPropsAndroid, ViewPropsIOS, } from './Libraries/Components/View/ViewPropTypes'; +export type {ViewInstance} from './Libraries/Components/View/View'; export {default as View} from './Libraries/Components/View/View'; export {default as unstable_NativeView} from './Libraries/Components/View/ViewNativeComponent'; @@ -195,6 +226,7 @@ export type { Separators, VirtualizedListProps, } from './Libraries/Lists/VirtualizedList'; +export type {VirtualizedListInstance} from './Libraries/Lists/VirtualizedList'; export {default as VirtualizedList} from './Libraries/Lists/VirtualizedList'; export type { @@ -202,6 +234,7 @@ export type { SectionBase, VirtualizedSectionListProps, } from './Libraries/Lists/VirtualizedSectionList'; +export type {VirtualizedSectionListInstance} from './Libraries/Lists/VirtualizedSectionList'; export {default as VirtualizedSectionList} from './Libraries/Lists/VirtualizedSectionList'; // #endregion @@ -281,13 +314,6 @@ export {findNodeHandle} from './Libraries/ReactNative/RendererProxy'; export {default as I18nManager} from './Libraries/ReactNative/I18nManager'; -export type { - Handle, - PromiseTask, - SimpleTask, -} from './Libraries/Interaction/InteractionManager'; -export {default as InteractionManager} from './Libraries/Interaction/InteractionManager'; - export type { AndroidKeyboardEvent, IOSKeyboardEvent, @@ -321,8 +347,6 @@ export {default as NativeAppEventEmitter} from './Libraries/EventEmitter/RCTNati export * as NativeComponentRegistry from './Libraries/NativeComponent/NativeComponentRegistry'; -export {default as NativeDialogManagerAndroid} from './Libraries/NativeModules/specs/NativeDialogManagerAndroid'; - export type { EmitterSubscription, NativeEventSubscription, @@ -459,8 +483,6 @@ export type * from './Libraries/Types/CodegenTypesNamespace'; export type { HostInstance, - NativeMethods, - NativeMethodsMixin, MeasureInWindowOnSuccessCallback, MeasureLayoutOnSuccessCallback, MeasureOnSuccessCallback, diff --git a/packages/@office-iss/react-native-win32/src-win/src/private/animated/NativeAnimatedHelper.win32.js b/packages/@office-iss/react-native-win32/src-win/src/private/animated/NativeAnimatedHelper.win32.js index 123ffad245d..fa2eb73b659 100644 --- a/packages/@office-iss/react-native-win32/src-win/src/private/animated/NativeAnimatedHelper.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/src/private/animated/NativeAnimatedHelper.win32.js @@ -32,7 +32,7 @@ import nullthrows from 'nullthrows'; interface NativeAnimatedModuleSpec extends NativeAnimatedTurboModuleSpec { // connectAnimatedNodeToShadowNodeFamily is available only in NativeAnimatedNonTurboModule - +connectAnimatedNodeToShadowNodeFamily?: ( + readonly connectAnimatedNodeToShadowNodeFamily?: ( nodeTag: number, // $FlowExpectedError[unclear-type]. shadowNode: Object, diff --git a/packages/@office-iss/react-native-win32/src-win/src/private/specs_DEPRECATED/modules/NativeAccessibilityInfoWin32.js b/packages/@office-iss/react-native-win32/src-win/src/private/specs_DEPRECATED/modules/NativeAccessibilityInfoWin32.js index 2c7b4205f5e..3b84bd4324b 100644 --- a/packages/@office-iss/react-native-win32/src-win/src/private/specs_DEPRECATED/modules/NativeAccessibilityInfoWin32.js +++ b/packages/@office-iss/react-native-win32/src-win/src/private/specs_DEPRECATED/modules/NativeAccessibilityInfoWin32.js @@ -13,34 +13,34 @@ import type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport'; import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry'; export interface Spec extends TurboModule { - +isReduceMotionEnabled: ( + readonly isReduceMotionEnabled: ( onSuccess: (isReduceMotionEnabled: boolean) => void, ) => void; - +isInvertColorsEnabled?: ( + readonly isInvertColorsEnabled?: ( onSuccess: (isInvertColorsEnabled: boolean) => void, ) => void; - +isHighTextContrastEnabled?: ( + readonly isHighTextContrastEnabled?: ( onSuccess: (isHighTextContrastEnabled: boolean) => void, ) => void; - +isTouchExplorationEnabled: ( + readonly isTouchExplorationEnabled: ( onSuccess: (isScreenReaderEnabled: boolean) => void, ) => void; - +isAccessibilityServiceEnabled?: ?( + readonly isAccessibilityServiceEnabled?: ?( onSuccess: (isAccessibilityServiceEnabled: boolean) => void, ) => void; - +setAccessibilityFocus: (reactTag: number) => void; - +announceForAccessibility: (announcement: string) => void; + readonly setAccessibilityFocus: (reactTag: number) => void; + readonly announceForAccessibility: (announcement: string) => void; // [Win32 - +announceForAccessibilityWithOptions?: ( + readonly announceForAccessibilityWithOptions?: ( announcement: string, options: {queue?: boolean, nativeID?: string}, ) => void; // Win32] - +getRecommendedTimeoutMillis?: ( + readonly getRecommendedTimeoutMillis?: ( mSec: number, onSuccess: (recommendedTimeoutMillis: number) => void, ) => void; - +isGrayscaleEnabled?: ( + readonly isGrayscaleEnabled?: ( onSuccess: (isGrayscaleEnabled: boolean) => void, ) => void; } diff --git a/packages/@office-iss/react-native-win32/src-win/src/private/specs_DEPRECATED/modules/NativeImageLoaderWin32.js b/packages/@office-iss/react-native-win32/src-win/src/private/specs_DEPRECATED/modules/NativeImageLoaderWin32.js index dd446299c01..43c399c4728 100644 --- a/packages/@office-iss/react-native-win32/src-win/src/private/specs_DEPRECATED/modules/NativeImageLoaderWin32.js +++ b/packages/@office-iss/react-native-win32/src-win/src/private/specs_DEPRECATED/modules/NativeImageLoaderWin32.js @@ -14,9 +14,9 @@ import type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport'; import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry'; export interface Spec extends TurboModule { - +getConstants: () => {}; + readonly getConstants: () => {}; // [Win32 uses callback instead of promise - +getSize: ( + readonly getSize: ( uri: string, callback: (width: number, height: number, err?: string) => void, ) => void; @@ -24,7 +24,7 @@ export interface Spec extends TurboModule { // [Win32 These aren't actually implemented, and will just blow up if called // currently. - +getSizeWithHeaders: ( + readonly getSizeWithHeaders: ( uri: string, headers: Object, ) => Promise<{ @@ -32,13 +32,13 @@ export interface Spec extends TurboModule { height: number, ... }>; - +prefetchImage: (uri: string) => Promise; - +prefetchImageWithMetadata?: ( + readonly prefetchImage: (uri: string) => Promise; + readonly prefetchImageWithMetadata?: ( uri: string, queryRootName: string, rootTag: RootTag, ) => Promise; - +queryCache: (uris: Array) => Promise; + readonly queryCache: (uris: Array) => Promise; // Win32] } diff --git a/packages/@office-iss/react-native-win32/src-win/src/private/specs_DEPRECATED/modules/NativePlatformConstantsWin.js b/packages/@office-iss/react-native-win32/src-win/src/private/specs_DEPRECATED/modules/NativePlatformConstantsWin.js index c7a6d609c0c..a23b6decfa5 100644 --- a/packages/@office-iss/react-native-win32/src-win/src/private/specs_DEPRECATED/modules/NativePlatformConstantsWin.js +++ b/packages/@office-iss/react-native-win32/src-win/src/private/specs_DEPRECATED/modules/NativePlatformConstantsWin.js @@ -31,7 +31,7 @@ export type PlatformConstantsWin32 = { }; export interface Spec extends TurboModule { - +getConstants: () => PlatformConstantsWin32; + readonly getConstants: () => PlatformConstantsWin32; } export default TurboModuleRegistry.getEnforcing( diff --git a/packages/@react-native-windows/automation-channel/package.json b/packages/@react-native-windows/automation-channel/package.json index 21296f8f925..f224a7ea031 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.87.0-nightly-20260519-58cd1bf58", + "react-native": "0.87.0-nightly-20260604-63683f091", "react-native-windows": "^0.0.0-canary.1060", "typescript": "5.0.4" }, diff --git a/packages/@react-native-windows/cli/package.json b/packages/@react-native-windows/cli/package.json index 6f574d92852..3a28a2475d2 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.87.0-nightly-20260519-58cd1bf58", + "react-native": "0.87.0-nightly-20260604-63683f091", "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 d9937403aa2..18ed8c652d2 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.87.0-nightly-20260519-58cd1bf58", + "react-native": "0.87.0-nightly-20260604-63683f091", "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 9d60e4a8a55..bcaa1b3ec1c 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.87.0-nightly-20260519-58cd1bf58", + "baseVersion": "0.87.0-nightly-20260604-63683f091", "overrides": [ { "type": "copy", @@ -85,7 +85,7 @@ "type": "patch", "file": "src/js/examples/Image/ImageExample.windows.js", "baseFile": "packages/rn-tester/js/examples/Image/ImageExample.js", - "baseHash": "7e0acad4f41eae5d225f893755f464cfa06e1eab", + "baseHash": "145838b4b8b6b614f6c2b1b34b19d1d6002fb49e", "issue": 12869 }, { @@ -104,7 +104,7 @@ "type": "patch", "file": "src/js/examples/Pressable/PressableExample.windows.js", "baseFile": "packages/rn-tester/js/examples/Pressable/PressableExample.js", - "baseHash": "a88dce30ae4ba4b334b903b2f85663a054b3603c", + "baseHash": "b8a25360dfe8ca7412862756624ce298aed07dde", "issue": 6240 }, { diff --git a/packages/@react-native-windows/tester/package.json b/packages/@react-native-windows/tester/package.json index b5146675961..71d30b06444 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.87.0-nightly-20260519-58cd1bf58", + "react-native": "0.87.0-nightly-20260604-63683f091", "react-native-windows": "^0.0.0-canary.1060", "react-native-xaml": "^0.0.80" }, @@ -33,8 +33,8 @@ }, "devDependencies": { "@react-native-picker/picker": "2.11.0", - "@react-native/new-app-screen": "0.87.0-nightly-20260519-58cd1bf58", - "@react-native/tester": "0.87.0-nightly-20260519-58cd1bf58", + "@react-native/new-app-screen": "0.87.0-nightly-20260604-63683f091", + "@react-native/tester": "0.87.0-nightly-20260604-63683f091", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.38", "@rnw-scripts/just-task": "2.3.58", @@ -44,7 +44,7 @@ "just-scripts": "^1.3.3", "prettier": "^3.6.2", "react": "19.2.3", - "react-native": "0.87.0-nightly-20260519-58cd1bf58", + "react-native": "0.87.0-nightly-20260604-63683f091", "react-native-platform-override": "0.0.0-canary.1023", "react-native-windows": "^0.0.0-canary.1060", "typescript": "5.0.4" diff --git a/packages/@react-native-windows/tester/src/js/examples/Image/ImageExample.windows.js b/packages/@react-native-windows/tester/src/js/examples/Image/ImageExample.windows.js index 58c597538fa..8cbbfe8f95e 100644 --- a/packages/@react-native-windows/tester/src/js/examples/Image/ImageExample.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples/Image/ImageExample.windows.js @@ -20,7 +20,14 @@ import RNTesterPlatformTest from '../Experimental/PlatformTest/RNTesterPlatformT import ImageCapInsetsExample from './ImageCapInsetsExample'; import * as React from 'react'; import {useEffect, useState} from 'react'; -import {Image, ImageBackground, StyleSheet, Text, View} from 'react-native'; +import { + Image, + ImageBackground, + PixelRatio, + StyleSheet, + Text, + View, +} from 'react-native'; const IMAGE1 = 'https://raw.githubusercontent.com/microsoft/react-native-windows/main/packages/@react-native/tester/js/assets/flux@3x.png'; @@ -633,6 +640,76 @@ const VectorDrawableExample = () => { ); }; +const VectorDrawableGetSizeExample = () => { + const [results, setResults] = useState< + Array<{name: string, status: string, width?: number, height?: number}>, + >([]); + + const testResources = [ + {name: 'ic_vector_test_24', label: 'VectorDrawable (24dp circle)'}, + { + name: 'ic_launcher_foreground', + label: 'VectorDrawable (108dp React logo)', + }, + {name: 'ic_launcher_background', label: 'VectorDrawable (108dp grid)'}, + {name: 'ic_menu_black_24dp', label: 'PNG drawable (24dp menu icon)'}, + { + name: 'ic_settings_black_48dp', + label: 'PNG drawable (48dp settings icon)', + }, + {name: 'nonexistent_drawable', label: 'Non-existent resource'}, + ]; + + const runTest = () => { + setResults([]); + const scale = PixelRatio.get(); + testResources.forEach(({name, label}) => { + Image.getSize( + name, + (width, height) => { + setResults(prev => [ + ...prev, + { + name: label, + status: 'success', + width: Math.round(width / scale), + height: Math.round(height / scale), + }, + ]); + }, + (error: unknown) => { + setResults(prev => [ + ...prev, + {name: label, status: `error: ${String(error)}`}, + ]); + }, + ); + }); + }; + + return ( + + + Run Image.getSize on local drawable resources + + {results.map((result, index) => ( + + {result.name} + {result.status === 'success' ? ( + + {result.width}x{result.height} dp + + ) : ( + + {result.status} + + )} + + ))} + + ); +}; + const AccessibilityActions = () => { const [accessibilityLabel, setAccessibilityLabel] = React.useState('Initial Label'); @@ -1228,6 +1305,22 @@ const styles = StyleSheet.create({ height: 64, width: 64, }, + getSizeRow: { + flexDirection: 'row', + justifyContent: 'space-between', + paddingVertical: 4, + paddingHorizontal: 8, + }, + getSizeLabel: { + flex: 1, + }, + getSizeSuccess: { + color: 'green', + fontWeight: 'bold', + }, + getSizeError: { + color: 'red', + }, resizedImage: { height: 100, width: '500%', @@ -2203,6 +2296,16 @@ exports.examples = [ }, platform: 'android', }, + { + title: 'Image.getSize with local drawables', + name: 'vector-drawable-getsize', + description: + 'Calls Image.getSize() on Android drawable resource names (both VectorDrawable and raster PNG) and displays dimensions in density-independent pixels (dp).', + render: function (): React.Node { + return ; + }, + platform: 'android', + }, { title: 'Large image with different resize methods', name: 'resize-method', diff --git a/packages/@react-native-windows/tester/src/js/examples/Pressable/PressableExample.windows.js b/packages/@react-native-windows/tester/src/js/examples/Pressable/PressableExample.windows.js index 4a7931345bd..c4e8480678d 100644 --- a/packages/@react-native-windows/tester/src/js/examples/Pressable/PressableExample.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples/Pressable/PressableExample.windows.js @@ -17,6 +17,7 @@ import { Animated, Image, Platform, + PlatformColor, Pressable, StyleSheet, Text, @@ -696,6 +697,57 @@ const examples = [ ); }, }, + { + title: 'Pressable with PlatformColor ripple and alpha', + description: + 'android_ripple accepts PlatformColor and a separate alpha (0–1) parameter' as string, + platform: 'android', + render: function (): React.Node { + const buttonStyle = {textAlign: 'center' as const, margin: 10}; + return ( + + + + PlatformColor('?attr/colorAccent'), no alpha + + + + + PlatformColor('?attr/colorAccent'), alpha=0.3 + + + + Red (#FF0000), no alpha + + + Red (#FF0000), alpha=0.5 + + + ); + }, + }, { title: ' with highlight', name: 'text-press', diff --git a/packages/@react-native/monorepo/overrides.json b/packages/@react-native/monorepo/overrides.json index f9b967f2bed..fc2a593be45 100644 --- a/packages/@react-native/monorepo/overrides.json +++ b/packages/@react-native/monorepo/overrides.json @@ -1,11 +1,11 @@ { - "baseVersion": "0.87.0-nightly-20260519-58cd1bf58", + "baseVersion": "0.87.0-nightly-20260604-63683f091", "overrides": [ { "type": "patch", "file": "package.json", "baseFile": "package.json", - "baseHash": "740920587ef0ac62b1510888dd87fb1a0f785f38" + "baseHash": "914dbd5384f0076903bd1db33c474e2186bd4926" } ] } \ No newline at end of file diff --git a/packages/@react-native/monorepo/package.json b/packages/@react-native/monorepo/package.json index 65ed4534696..851c8a98fb9 100644 --- a/packages/@react-native/monorepo/package.json +++ b/packages/@react-native/monorepo/package.json @@ -53,8 +53,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.87.0-nightly-20260519-58cd1bf58", - "@react-native/metro-config": "0.87.0-nightly-20260519-58cd1bf58", + "@react-native/metro-babel-transformer": "0.87.0-nightly-20260604-63683f091", + "@react-native/metro-config": "0.87.0-nightly-20260604-63683f091", "@tsconfig/node22": "22.0.2", "@types/react": "^19.2.3", "@typescript-eslint/parser": "^8.59.2", @@ -81,7 +81,7 @@ "eslint-plugin-relay": "^1.8.3", "fb-dotslash": "0.5.8", "flow-api-translator": "0.36.1", - "flow-bin": "^0.314.0", + "flow-bin": "^0.316.0", "hermes-eslint": "0.36.1", "hermes-transform": "0.36.1", "ini": "^5.0.0", @@ -120,6 +120,7 @@ "on-headers": "1.1.0", "compression": "1.8.1", "@microsoft/api-extractor/minimatch": "3.1.4", + "metro-babel-register/babel-plugin-syntax-hermes-parser": "0.36.1", "lodash": "4.18.1" } } diff --git a/packages/@react-native/tester/NativeComponentExample/js/MyNativeViewNativeComponent.js b/packages/@react-native/tester/NativeComponentExample/js/MyNativeViewNativeComponent.js index b5fbf11f8e4..dc2026366e7 100644 --- a/packages/@react-native/tester/NativeComponentExample/js/MyNativeViewNativeComponent.js +++ b/packages/@react-native/tester/NativeComponentExample/js/MyNativeViewNativeComponent.js @@ -44,21 +44,23 @@ type NativeProps = Readonly<{ export type MyNativeViewType = HostComponent; interface NativeCommands { - +callNativeMethodToChangeBackgroundColor: ( + readonly callNativeMethodToChangeBackgroundColor: ( viewRef: React.ElementRef, color: string, ) => void; - +callNativeMethodToAddOverlays: ( + readonly callNativeMethodToAddOverlays: ( viewRef: React.ElementRef, overlayColors: ReadonlyArray, ) => void; - +callNativeMethodToRemoveOverlays: ( + readonly callNativeMethodToRemoveOverlays: ( viewRef: React.ElementRef, ) => void; - +fireLagacyStyleEvent: (viewRef: React.ElementRef) => void; + readonly fireLagacyStyleEvent: ( + viewRef: React.ElementRef, + ) => void; } export const Commands: NativeCommands = codegenNativeCommands({ diff --git a/packages/@react-native/tester/NativeCxxModuleExample/NativeCxxModuleExample.js b/packages/@react-native/tester/NativeCxxModuleExample/NativeCxxModuleExample.js index 589360363a3..4524a1b3e2b 100644 --- a/packages/@react-native/tester/NativeCxxModuleExample/NativeCxxModuleExample.js +++ b/packages/@react-native/tester/NativeCxxModuleExample/NativeCxxModuleExample.js @@ -76,44 +76,52 @@ export type CustomDeviceEvent = { }; export interface Spec extends TurboModule { - +onPress: CodegenTypes.EventEmitter; - +onClick: CodegenTypes.EventEmitter; - +onChange: CodegenTypes.EventEmitter; - +onSubmit: CodegenTypes.EventEmitter; - +onEvent: CodegenTypes.EventEmitter; - +getArray: (arg: Array) => Array; - +getBool: (arg: boolean) => boolean; - +getConstants: () => ConstantsStruct; - +getCustomEnum: (arg: EnumInt) => EnumInt; - +getCustomHostObject: () => CustomHostObject; - +consumeCustomHostObject: (customHostObject: CustomHostObject) => string; - +getBinaryTreeNode: (arg: BinaryTreeNode) => BinaryTreeNode; - +getGraphNode: (arg: GraphNode) => GraphNode; - +getNumEnum: (arg: EnumInt) => EnumInt; - +getStrEnum: (arg: EnumNone) => EnumStr; - +getMap: (arg: {[key: string]: ?number}) => {[key: string]: ?number}; - +getNumber: (arg: number) => number; - +getObject: (arg: ObjectStruct) => ObjectStruct; - +getSet: (arg: Array) => Array; - +getString: (arg: string) => string; - +getUnion: (x: UnionFloat, y: UnionString, z: UnionObject) => string; - +getValue: (x: number, y: string, z: ObjectStruct) => ValueStruct; - +getValueWithCallback: (callback: (value: string) => void) => void; - +setValueCallbackWithSubscription: ( + readonly onPress: CodegenTypes.EventEmitter; + readonly onClick: CodegenTypes.EventEmitter; + readonly onChange: CodegenTypes.EventEmitter; + readonly onSubmit: CodegenTypes.EventEmitter; + readonly onEvent: CodegenTypes.EventEmitter; + readonly getArray: ( + arg: Array, + ) => Array; + readonly getArrayBuffer: (payload: ArrayBuffer) => ArrayBuffer; + readonly createNativeBuffer: (size: number) => ArrayBuffer; + readonly processAsyncBuffer: (payload: ArrayBuffer) => Promise; + readonly getAsyncBuffer: (size: number) => Promise; + readonly getBool: (arg: boolean) => boolean; + readonly getConstants: () => ConstantsStruct; + readonly getCustomEnum: (arg: EnumInt) => EnumInt; + readonly getCustomHostObject: () => CustomHostObject; + readonly consumeCustomHostObject: ( + customHostObject: CustomHostObject, + ) => string; + readonly getBinaryTreeNode: (arg: BinaryTreeNode) => BinaryTreeNode; + readonly getGraphNode: (arg: GraphNode) => GraphNode; + readonly getNumEnum: (arg: EnumInt) => EnumInt; + readonly getStrEnum: (arg: EnumNone) => EnumStr; + readonly getMap: (arg: {[key: string]: ?number}) => {[key: string]: ?number}; + readonly getNumber: (arg: number) => number; + readonly getObject: (arg: ObjectStruct) => ObjectStruct; + readonly getSet: (arg: Array) => Array; + readonly getString: (arg: string) => string; + readonly getUnion: (x: UnionFloat, y: UnionString, z: UnionObject) => string; + readonly getValue: (x: number, y: string, z: ObjectStruct) => ValueStruct; + readonly getValueWithCallback: (callback: (value: string) => void) => void; + readonly setValueCallbackWithSubscription: ( callback: (value: string) => void, ) => () => void; - +getValueWithPromise: (error: boolean) => Promise; - +getWithWithOptionalArgs: (optionalArg?: boolean) => ?boolean; - +voidFunc: () => void; - +voidPromise: () => Promise; - +setMenu: (menuItem: MenuItem) => void; - +emitCustomDeviceEvent: (eventName: string) => void; - +voidFuncThrows: () => void; - +getObjectThrows: (arg: ObjectStruct) => ObjectStruct; - +promiseThrows: () => Promise; - +voidFuncAssert: () => void; - +getObjectAssert: (arg: ObjectStruct) => ObjectStruct; - +promiseAssert: () => Promise; + readonly getValueWithPromise: (error: boolean) => Promise; + readonly getWithWithOptionalArgs: (optionalArg?: boolean) => ?boolean; + readonly voidFunc: () => void; + readonly voidPromise: () => Promise; + readonly setMenu: (menuItem: MenuItem) => void; + readonly emitCustomDeviceEvent: (eventName: string) => void; + readonly voidFuncThrows: () => void; + readonly getObjectThrows: (arg: ObjectStruct) => ObjectStruct; + readonly promiseThrows: () => Promise; + readonly voidFuncAssert: () => void; + readonly getObjectAssert: (arg: ObjectStruct) => ObjectStruct; + readonly promiseAssert: () => Promise; } export default TurboModuleRegistry.get( diff --git a/packages/@react-native/tester/NativeModuleExample/NativeScreenshotManager.js b/packages/@react-native/tester/NativeModuleExample/NativeScreenshotManager.js index 0f6b0682777..518bd7bdf60 100644 --- a/packages/@react-native/tester/NativeModuleExample/NativeScreenshotManager.js +++ b/packages/@react-native/tester/NativeModuleExample/NativeScreenshotManager.js @@ -15,7 +15,7 @@ import {TurboModuleRegistry} from 'react-native'; export type ScreenshotManagerOptions = CodegenTypes.UnsafeObject; export interface Spec extends TurboModule { - +getConstants: () => {}; + readonly getConstants: () => {}; takeScreenshot( id: string, options: ScreenshotManagerOptions, diff --git a/packages/@react-native/tester/js/examples/Experimental/PlatformTest/RNTesterPlatformTestTypes.js b/packages/@react-native/tester/js/examples/Experimental/PlatformTest/RNTesterPlatformTestTypes.js index a17182b7e4d..de5ee16441f 100644 --- a/packages/@react-native/tester/js/examples/Experimental/PlatformTest/RNTesterPlatformTestTypes.js +++ b/packages/@react-native/tester/js/examples/Experimental/PlatformTest/RNTesterPlatformTestTypes.js @@ -66,6 +66,6 @@ export type PlatformTestHarness = Readonly<{ }>; export type PlatformTestComponentBaseProps = { - +harness: PlatformTestHarness, + readonly harness: PlatformTestHarness, ... }; diff --git a/packages/@react-native/tester/js/examples/Image/ImageExample.js b/packages/@react-native/tester/js/examples/Image/ImageExample.js index 1eedeb69301..850a8f7b244 100644 --- a/packages/@react-native/tester/js/examples/Image/ImageExample.js +++ b/packages/@react-native/tester/js/examples/Image/ImageExample.js @@ -20,7 +20,14 @@ import RNTesterPlatformTest from '../Experimental/PlatformTest/RNTesterPlatformT import ImageCapInsetsExample from './ImageCapInsetsExample'; import * as React from 'react'; import {useEffect, useState} from 'react'; -import {Image, ImageBackground, StyleSheet, Text, View} from 'react-native'; +import { + Image, + ImageBackground, + PixelRatio, + StyleSheet, + Text, + View, +} from 'react-native'; const IMAGE1 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAEUlEQVR42mO4Y6SPFTEMLQkAItlPQS82a/YAAAAASUVORK5CYII='; @@ -597,6 +604,76 @@ const VectorDrawableExample = () => { ); }; +const VectorDrawableGetSizeExample = () => { + const [results, setResults] = useState< + Array<{name: string, status: string, width?: number, height?: number}>, + >([]); + + const testResources = [ + {name: 'ic_vector_test_24', label: 'VectorDrawable (24dp circle)'}, + { + name: 'ic_launcher_foreground', + label: 'VectorDrawable (108dp React logo)', + }, + {name: 'ic_launcher_background', label: 'VectorDrawable (108dp grid)'}, + {name: 'ic_menu_black_24dp', label: 'PNG drawable (24dp menu icon)'}, + { + name: 'ic_settings_black_48dp', + label: 'PNG drawable (48dp settings icon)', + }, + {name: 'nonexistent_drawable', label: 'Non-existent resource'}, + ]; + + const runTest = () => { + setResults([]); + const scale = PixelRatio.get(); + testResources.forEach(({name, label}) => { + Image.getSize( + name, + (width, height) => { + setResults(prev => [ + ...prev, + { + name: label, + status: 'success', + width: Math.round(width / scale), + height: Math.round(height / scale), + }, + ]); + }, + (error: unknown) => { + setResults(prev => [ + ...prev, + {name: label, status: `error: ${String(error)}`}, + ]); + }, + ); + }); + }; + + return ( + + + Run Image.getSize on local drawable resources + + {results.map((result, index) => ( + + {result.name} + {result.status === 'success' ? ( + + {result.width}x{result.height} dp + + ) : ( + + {result.status} + + )} + + ))} + + ); +}; + function CacheControlExample(): React.Node { const [reload, setReload] = useState(0); @@ -993,6 +1070,22 @@ const styles = StyleSheet.create({ height: 64, width: 64, }, + getSizeRow: { + flexDirection: 'row', + justifyContent: 'space-between', + paddingVertical: 4, + paddingHorizontal: 8, + }, + getSizeLabel: { + flex: 1, + }, + getSizeSuccess: { + color: 'green', + fontWeight: 'bold', + }, + getSizeError: { + color: 'red', + }, resizedImage: { height: 100, width: '500%', @@ -1814,6 +1907,16 @@ exports.examples = [ }, platform: 'android', }, + { + title: 'Image.getSize with local drawables', + name: 'vector-drawable-getsize', + description: + 'Calls Image.getSize() on Android drawable resource names (both VectorDrawable and raster PNG) and displays dimensions in density-independent pixels (dp).', + render: function (): React.Node { + return ; + }, + platform: 'android', + }, { title: 'Large image with different resize methods', name: 'resize-method', diff --git a/packages/@react-native/tester/js/examples/Pressable/PressableExample.js b/packages/@react-native/tester/js/examples/Pressable/PressableExample.js index 58696ccb722..0ff1cbd8f9a 100644 --- a/packages/@react-native/tester/js/examples/Pressable/PressableExample.js +++ b/packages/@react-native/tester/js/examples/Pressable/PressableExample.js @@ -17,6 +17,7 @@ import { Animated, Image, Platform, + PlatformColor, Pressable, StyleSheet, Text, @@ -512,6 +513,57 @@ const examples = [ ); }, }, + { + title: 'Pressable with PlatformColor ripple and alpha', + description: + 'android_ripple accepts PlatformColor and a separate alpha (0–1) parameter' as string, + platform: 'android', + render: function (): React.Node { + const buttonStyle = {textAlign: 'center' as const, margin: 10}; + return ( + + + + PlatformColor('?attr/colorAccent'), no alpha + + + + + PlatformColor('?attr/colorAccent'), alpha=0.3 + + + + Red (#FF0000), no alpha + + + Red (#FF0000), alpha=0.5 + + + ); + }, + }, { title: ' with highlight', name: 'text-press', diff --git a/packages/@react-native/tester/js/examples/StatusBar/StatusBarExample.js b/packages/@react-native/tester/js/examples/StatusBar/StatusBarExample.js index eed932fdc8c..f0b76552e0b 100644 --- a/packages/@react-native/tester/js/examples/StatusBar/StatusBarExample.js +++ b/packages/@react-native/tester/js/examples/StatusBar/StatusBarExample.js @@ -24,7 +24,7 @@ import { const colors = ['#ff0000', '#00ff00', '#0000ff', 'rgba(0, 0, 0, 0.4)']; -const barStyles = ['default', 'light-content', 'dark-content']; +const barStyles = ['default', 'auto', 'light-content', 'dark-content']; const showHideTransitions = ['fade', 'slide']; diff --git a/packages/@react-native/tester/js/examples/TurboModule/NativeCxxModuleExampleExample.js b/packages/@react-native/tester/js/examples/TurboModule/NativeCxxModuleExampleExample.js index dcee38ad656..25515e2063d 100644 --- a/packages/@react-native/tester/js/examples/TurboModule/NativeCxxModuleExampleExample.js +++ b/packages/@react-native/tester/js/examples/TurboModule/NativeCxxModuleExampleExample.js @@ -40,6 +40,9 @@ type Examples = | 'callback' | 'callbackWithSubscription' | 'getArray' + | 'getArrayBuffer' + | 'processAsyncBuffer' + | 'getAsyncBuffer' | 'getBool' | 'getConstants' | 'getCustomEnum' @@ -102,6 +105,31 @@ class NativeCxxModuleExampleExample extends React.Component<{}, State> { {a: 2, b: 'bar'}, null, ]), + getArrayBuffer: () => { + const view = new Uint8Array([1, 2, 3, 4, 5]); + const buffer = NativeCxxModuleExample?.getArrayBuffer(view.buffer); + return new Uint8Array(buffer || []).toString(); + }, + processAsyncBuffer: async () => { + const view = new Uint8Array([10, 20, 30, 40, 50]); + const nativeBuffer = NativeCxxModuleExample?.createNativeBuffer(10); + + const [byteSum, zeroCopyByteSum] = await Promise.all([ + NativeCxxModuleExample?.processAsyncBuffer(view.buffer), + nativeBuffer != null + ? NativeCxxModuleExample?.processAsyncBuffer(nativeBuffer) + : Promise.resolve(0), + ]); + + this._setResult( + 'processAsyncBuffer', + `sum=${(byteSum ?? 0) + (zeroCopyByteSum ?? 0)}`, + ); + }, + getAsyncBuffer: () => + NativeCxxModuleExample?.getAsyncBuffer(10).then(buffer => { + this._setResult('getAsyncBuffer', new Uint8Array(buffer).toString()); + }), getBool: () => NativeCxxModuleExample?.getBool(true), getConstants: () => NativeCxxModuleExample?.getConstants(), getCustomEnum: () => NativeCxxModuleExample?.getCustomEnum(EnumInt.IB), diff --git a/packages/@react-native/tester/overrides.json b/packages/@react-native/tester/overrides.json index 2c06e619105..24fa0638555 100644 --- a/packages/@react-native/tester/overrides.json +++ b/packages/@react-native/tester/overrides.json @@ -1,5 +1,5 @@ { - "baseVersion": "0.87.0-nightly-20260519-58cd1bf58", + "baseVersion": "0.87.0-nightly-20260604-63683f091", "overrides": [ { "type": "copy", @@ -194,7 +194,7 @@ "type": "copy", "directory": "js/examples/Experimental", "baseDirectory": "packages/rn-tester/js/examples/Experimental", - "baseHash": "051a836afcb287a47d8ddfb7853cdd4f11560900", + "baseHash": "34657bfaf9334813bdb5d0c121b030630299e551", "issue": 4054 }, { @@ -222,7 +222,7 @@ "type": "derived", "file": "js/examples/Image/ImageExample.js", "baseFile": "packages/rn-tester/js/examples/Image/ImageExample.js", - "baseHash": "7e0acad4f41eae5d225f893755f464cfa06e1eab", + "baseHash": "145838b4b8b6b614f6c2b1b34b19d1d6002fb49e", "issue": 4054 }, { @@ -459,7 +459,7 @@ "type": "derived", "file": "js/examples/Pressable/PressableExample.js", "baseFile": "packages/rn-tester/js/examples/Pressable/PressableExample.js", - "baseHash": "a88dce30ae4ba4b334b903b2f85663a054b3603c", + "baseHash": "b8a25360dfe8ca7412862756624ce298aed07dde", "issue": 4054 }, { @@ -543,7 +543,7 @@ "type": "copy", "directory": "js/examples/StatusBar", "baseDirectory": "packages/rn-tester/js/examples/StatusBar", - "baseHash": "2e8d155724d9d3f2fb8664b2b2bedcd02fb3725c", + "baseHash": "06eccb4a69e9f6b554e940fe3572418f438461a2", "issue": 4054 }, { @@ -648,7 +648,7 @@ "type": "copy", "directory": "js/examples/TurboModule", "baseDirectory": "packages/rn-tester/js/examples/TurboModule", - "baseHash": "efc05879738a3ad59a96487c2aa3005951ac72d4", + "baseHash": "2987f1aef163cc375f399042702ab258aa21895a", "issue": 4054 }, { @@ -780,28 +780,28 @@ "type": "copy", "file": "NativeComponentExample/js/MyNativeViewNativeComponent.js", "baseFile": "packages/rn-tester/NativeComponentExample/js/MyNativeViewNativeComponent.js", - "baseHash": "b5f9e271ec21857cb6a6b07f9df412561cca2561", + "baseHash": "8bda424f4e88971e829d0c2203cb1c3a5fb2211b", "issue": 4054 }, { "type": "copy", "file": "NativeCxxModuleExample/NativeCxxModuleExample.js", "baseFile": "packages/rn-tester/NativeCxxModuleExample/NativeCxxModuleExample.js", - "baseHash": "fc6b78efdd2f5a316d4d4a8b1b59181ef266d19f", + "baseHash": "177e17226f9b2f7470b3bce5f76e25ca290d568b", "issue": 4054 }, { "type": "copy", "file": "NativeModuleExample/NativeScreenshotManager.js", "baseFile": "packages/rn-tester/NativeModuleExample/NativeScreenshotManager.js", - "baseHash": "6eca67ffe577705a40034632effffd4cb2a96308", + "baseHash": "bd67b558e4b9c7fc346905a97ac05592799571b0", "issue": 4054 }, { "type": "patch", "file": "package.json", "baseFile": "packages/rn-tester/package.json", - "baseHash": "67adc74806c05f95e3a5dd6a15a67c3b570f563f", + "baseHash": "6edf2f0de86d44f18f4670abbce1f3e182b93657", "issue": 13228 }, { diff --git a/packages/@react-native/tester/package.json b/packages/@react-native/tester/package.json index 5fe54ab35f5..32973054530 100644 --- a/packages/@react-native/tester/package.json +++ b/packages/@react-native/tester/package.json @@ -1,6 +1,6 @@ { "name": "@react-native/tester", - "version": "0.87.0-nightly-20260519-58cd1bf58", + "version": "0.87.0-nightly-20260604-63683f091", "private": true, "description": "React Native tester app.", "license": "MIT", @@ -10,7 +10,7 @@ "directory": "packages/rn-tester" }, "engines": { - "node": "^20.19.4 || ^22.13.0 || ^24.3.0 || >= 25.0.0" + "node": "^22.13.0 || ^24.3.0 || >= 26.0.0" }, "scripts": { "start": "npx @react-native-community/cli start", @@ -26,8 +26,8 @@ "e2e-test-ios": "./scripts/maestro-test-ios.sh" }, "dependencies": { - "@react-native/new-app-screen": "0.87.0-nightly-20260519-58cd1bf58", - "@react-native/popup-menu-android": "0.87.0-nightly-20260519-58cd1bf58", + "@react-native/new-app-screen": "0.87.0-nightly-20260604-63683f091", + "@react-native/popup-menu-android": "0.87.0-nightly-20260604-63683f091", "flow-enums-runtime": "^0.0.6", "invariant": "^2.2.4", "nullthrows": "^1.1.1" @@ -55,10 +55,11 @@ "@react-native-community/cli": "20.0.0", "@react-native-community/cli-platform-android": "20.0.0", "@react-native-community/cli-platform-ios": "20.0.0", + "@react-native/core-cli-utils": "*", "commander": "^12.0.0", "listr2": "^6.4.1", "react": "19.2.3", - "react-native": "0.87.0-nightly-20260519-58cd1bf58", + "react-native": "0.87.0-nightly-20260604-63683f091", "rxjs": "npm:@react-native-community/rxjs@6.5.4-custom" } } diff --git a/packages/@rnw-scripts/babel-react-native-config/package.json b/packages/@rnw-scripts/babel-react-native-config/package.json index 9043a0d9e6b..702457b33de 100644 --- a/packages/@rnw-scripts/babel-react-native-config/package.json +++ b/packages/@rnw-scripts/babel-react-native-config/package.json @@ -11,12 +11,12 @@ }, "dependencies": { "@babel/core": "^7.25.2", - "@react-native/babel-preset": "0.87.0-nightly-20260519-58cd1bf58", + "@react-native/babel-preset": "0.87.0-nightly-20260604-63683f091", "babel-plugin-transform-flow-enums": "^0.0.2" }, "devDependencies": { "@babel/core": "^7.25.2", - "@react-native/babel-preset": "0.87.0-nightly-20260519-58cd1bf58", + "@react-native/babel-preset": "0.87.0-nightly-20260604-63683f091", "eslint": "^8.19.0", "prettier": "^3.6.2" }, diff --git a/packages/@rnw-scripts/eslint-config/package.json b/packages/@rnw-scripts/eslint-config/package.json index 1064cb33b11..6198148916b 100644 --- a/packages/@rnw-scripts/eslint-config/package.json +++ b/packages/@rnw-scripts/eslint-config/package.json @@ -13,7 +13,7 @@ "@babel/core": "^7.25.2", "@babel/eslint-parser": "^7.25.1", "@microsoft/eslint-plugin-sdl": "^0.2.0", - "@react-native/eslint-config": "0.87.0-nightly-20260519-58cd1bf58", + "@react-native/eslint-config": "0.87.0-nightly-20260604-63683f091", "eslint-config-prettier": "^8.5.0", "eslint-plugin-ft-flow": "^2.0.1", "hermes-eslint": "0.23.1" diff --git a/packages/@rnw-scripts/integrate-rn/package.json b/packages/@rnw-scripts/integrate-rn/package.json index db81319b769..ac47f69cb5d 100644 --- a/packages/@rnw-scripts/integrate-rn/package.json +++ b/packages/@rnw-scripts/integrate-rn/package.json @@ -52,7 +52,7 @@ "jest": "^29.7.0", "prettier": "^3.6.2", "react": "19.2.3", - "react-native": "0.87.0-nightly-20260519-58cd1bf58", + "react-native": "0.87.0-nightly-20260604-63683f091", "typescript": "5.0.4" }, "files": [ diff --git a/packages/@rnw-scripts/metro-dev-config/package.json b/packages/@rnw-scripts/metro-dev-config/package.json index 72c40e4341d..8fb63c9f009 100644 --- a/packages/@rnw-scripts/metro-dev-config/package.json +++ b/packages/@rnw-scripts/metro-dev-config/package.json @@ -17,7 +17,7 @@ "lint:fix": "rnw-scripts lint:fix" }, "dependencies": { - "@react-native/metro-config": "0.87.0-nightly-20260519-58cd1bf58", + "@react-native/metro-config": "0.87.0-nightly-20260604-63683f091", "@rnx-kit/metro-config": "^2.2.3", "@rnx-kit/metro-plugin-duplicates-checker": "^3.0.2", "@rnx-kit/metro-serializer": "^2.0.3", @@ -30,7 +30,7 @@ "eslint": "^8.19.0", "prettier": "^3.6.2", "react": "19.2.3", - "react-native": "0.87.0-nightly-20260519-58cd1bf58", + "react-native": "0.87.0-nightly-20260604-63683f091", "typescript": "5.0.4" }, "peerDependencies": { diff --git a/packages/e2e-test-app-fabric/package.json b/packages/e2e-test-app-fabric/package.json index 06898d40f6e..d8dc2c23b5e 100644 --- a/packages/e2e-test-app-fabric/package.json +++ b/packages/e2e-test-app-fabric/package.json @@ -27,12 +27,12 @@ "dependencies": { "@react-native-windows/automation-channel": "0.0.0-canary.1060", "@react-native-windows/tester": "0.0.1", - "@react-native/jest-preset": "0.87.0-nightly-20260519-58cd1bf58", + "@react-native/jest-preset": "0.87.0-nightly-20260604-63683f091", "@types/react": "^19.1.1", "@typescript-eslint/eslint-plugin": "^8.36.0", "@typescript-eslint/parser": "^8.36.0", "react": "^19.2.3", - "react-native": "0.87.0-nightly-20260519-58cd1bf58", + "react-native": "0.87.0-nightly-20260604-63683f091", "react-native-windows": "^0.0.0-canary.1060" }, "devDependencies": { @@ -46,7 +46,7 @@ "@react-native-windows/automation-commands": "0.0.0-canary.1061", "@react-native-windows/fs": "^0.0.0-canary.72", "@react-native-windows/perf-testing": "0.0.0-canary.1039", - "@react-native/metro-config": "0.87.0-nightly-20260519-58cd1bf58", + "@react-native/metro-config": "0.87.0-nightly-20260604-63683f091", "@rnw-scripts/babel-node-config": "2.3.3", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.38", diff --git a/packages/playground/package.json b/packages/playground/package.json index 435abce9063..68aa6dbe862 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -11,19 +11,19 @@ "dependencies": { "@react-native-picker/picker": "2.11.0", "@react-native-windows/tester": "0.0.1", - "@react-native/jest-preset": "0.87.0-nightly-20260519-58cd1bf58", + "@react-native/jest-preset": "0.87.0-nightly-20260604-63683f091", "@types/react": "^19.1.1", "@typescript-eslint/eslint-plugin": "^8.36.0", "@typescript-eslint/parser": "^8.36.0", "react": "^19.2.3", - "react-native": "0.87.0-nightly-20260519-58cd1bf58", + "react-native": "0.87.0-nightly-20260604-63683f091", "react-native-windows": "^0.0.0-canary.1060" }, "devDependencies": { "@babel/core": "^7.25.2", "@babel/runtime": "^7.20.0", "@react-native-community/cli": "20.0.0", - "@react-native/metro-config": "0.87.0-nightly-20260519-58cd1bf58", + "@react-native/metro-config": "0.87.0-nightly-20260604-63683f091", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.38", "@rnw-scripts/just-task": "2.3.58", diff --git a/packages/react-native-windows-init/package.json b/packages/react-native-windows-init/package.json index ae0f44e7af2..51ef3c4eeb2 100644 --- a/packages/react-native-windows-init/package.json +++ b/packages/react-native-windows-init/package.json @@ -53,7 +53,7 @@ "jest": "^29.7.0", "prettier": "^3.6.2", "react": "19.2.3", - "react-native": "0.87.0-nightly-20260519-58cd1bf58", + "react-native": "0.87.0-nightly-20260604-63683f091", "typescript": "5.0.4" }, "files": [ diff --git a/packages/sample-app-fabric/package.json b/packages/sample-app-fabric/package.json index b831b7ef800..847eeee9e19 100644 --- a/packages/sample-app-fabric/package.json +++ b/packages/sample-app-fabric/package.json @@ -12,13 +12,13 @@ "bundle": "rnw-scripts prepareBundle && npx @react-native-community/cli bundle --platform windows --entry-file App.tsx --bundle-output windows/SampleAppFabric/Bundle/app.windows.bundle --assets-dest windows/SampleAppFabric/Bundle" }, "dependencies": { - "@react-native/jest-preset": "0.87.0-nightly-20260519-58cd1bf58", - "@react-native/new-app-screen": "0.87.0-nightly-20260519-58cd1bf58", + "@react-native/jest-preset": "0.87.0-nightly-20260604-63683f091", + "@react-native/new-app-screen": "0.87.0-nightly-20260604-63683f091", "@types/react": "^19.1.1", "@typescript-eslint/eslint-plugin": "^8.36.0", "@typescript-eslint/parser": "^8.36.0", "react": "^19.2.3", - "react-native": "0.87.0-nightly-20260519-58cd1bf58", + "react-native": "0.87.0-nightly-20260604-63683f091", "react-native-windows": "^0.0.0-canary.1060" }, "devDependencies": { @@ -29,7 +29,7 @@ "@babel/runtime": "^7.20.0", "@jest/globals": "^29.7.0", "@react-native-community/cli": "20.0.0", - "@react-native/metro-config": "0.87.0-nightly-20260519-58cd1bf58", + "@react-native/metro-config": "0.87.0-nightly-20260604-63683f091", "@rnw-scripts/babel-node-config": "2.3.3", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.38", diff --git a/packages/sample-custom-component/package.json b/packages/sample-custom-component/package.json index 5458aa4c803..194e9d1a13f 100644 --- a/packages/sample-custom-component/package.json +++ b/packages/sample-custom-component/package.json @@ -20,11 +20,11 @@ } }, "dependencies": { - "@react-native/jest-preset": "0.87.0-nightly-20260519-58cd1bf58", + "@react-native/jest-preset": "0.87.0-nightly-20260604-63683f091", "@types/react": "^19.1.1", "minimatch": "^10.0.3", "react": "^19.2.3", - "react-native": "0.87.0-nightly-20260519-58cd1bf58", + "react-native": "0.87.0-nightly-20260604-63683f091", "react-native-windows": "^0.0.0-canary.1060" }, "devDependencies": { @@ -34,7 +34,7 @@ "@babel/preset-typescript": "^7.8.3", "@babel/runtime": "^7.20.0", "@react-native-community/cli": "20.0.0", - "@react-native/metro-config": "0.87.0-nightly-20260519-58cd1bf58", + "@react-native/metro-config": "0.87.0-nightly-20260604-63683f091", "@rnw-scripts/babel-node-config": "2.3.3", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.38", diff --git a/vnext/.flowconfig b/vnext/.flowconfig index c42f1180149..cb57a3909c6 100644 --- a/vnext/.flowconfig +++ b/vnext/.flowconfig @@ -114,6 +114,7 @@ src/types/ [options] enums=true experimental.pattern_matching=true +experimental.allow_variance_keywords=true casting_syntax=both component_syntax=true @@ -169,4 +170,4 @@ untyped-import untyped-type-import [version] -^0.314.0 +^0.316.0 diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/ArrayBuffer.h b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/ArrayBuffer.h new file mode 100644 index 00000000000..5f2be242f12 --- /dev/null +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/ArrayBuffer.h @@ -0,0 +1,64 @@ +/* + * 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. + */ + +#pragma once + +#include +#include + +#include + +namespace facebook::react { + +namespace detail { + +/** + * An owning implementation of jsi::MutableBuffer backed by a std::vector. + * Use this when the source of the bytes cannot be guaranteed to outlive the + * buffer (for example, returning data to JS from an asynchronous native call, + * or copying a JS ArrayBuffer argument before storing it). + */ +class OwnedBytesBuffer final : public jsi::MutableBuffer { + public: + explicit OwnedBytesBuffer(std::vector bytes) noexcept : bytes_(std::move(bytes)) {} + + size_t size() const override + { + return bytes_.size(); + } + + uint8_t *data() override + { + return bytes_.data(); + } + + private: + std::vector bytes_; +}; + +} // namespace detail + +template <> +struct Bridging { + static jsi::ArrayBuffer fromJs(jsi::Runtime &rt, const jsi::Object &obj) + { + if (!obj.isArrayBuffer(rt)) { + throw jsi::JSError(rt, "Expected ArrayBuffer"); + } + return obj.getArrayBuffer(rt); + } + + static jsi::Value toJs(jsi::Runtime &rt, jsi::ArrayBuffer buf) + { + return {rt, buf}; + } +}; + +// [Windows] AsyncArrayBuffer requires newer JSI runtime APIs that are not yet +// available in node-api-jsi. Keep synchronous ArrayBuffer bridging supported. + +} // namespace facebook::react diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Bridging.h b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Bridging.h index 87ae9cb4f4b..bbc27a04691 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Bridging.h +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Bridging.h @@ -9,6 +9,7 @@ #include #include +#include #include #include // #include // [Windows] Line causes Error C1083 Cannot open include file: 'double-conversion/double-conversion.h' #11644 diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/mounting/ShadowTree.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/mounting/ShadowTree.cpp new file mode 100644 index 00000000000..5633a99ad37 --- /dev/null +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/mounting/ShadowTree.cpp @@ -0,0 +1,677 @@ +/* + * 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. + */ + +#include "ShadowTree.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "updateMountedFlag.h" + +#include "ShadowTreeDelegate.h" + +namespace facebook::react { + +namespace { +const int MAX_COMMIT_ATTEMPTS_BEFORE_LOCKING = 3; + +std::string getShadowTreeCommitSourceName(ShadowTreeCommitSource source) { + switch (source) { + case ShadowTreeCommitSource::Unknown: + return "Unknown"; + case ShadowTreeCommitSource::React: + return "React"; + case ShadowTreeCommitSource::AnimationEndSync: + return "AnimationEndSync"; + case ShadowTreeCommitSource::ReactRevisionMerge: + return "ReactRevisionMerge"; + } +} + +inline bool isPropsUpdatesAccumulationGuaranteed() { +#ifdef __ANDROID__ + return ReactNativeFeatureFlags::enableAccumulatedUpdatesInRawPropsAndroid(); +#else + return true; +#endif +} +} // namespace + +using CommitStatus = ShadowTree::CommitStatus; +using CommitMode = ShadowTree::CommitMode; + +/* + * Generates (possibly) a new tree where all nodes with non-obsolete `State` + * objects. If all `State` objects in the tree are not obsolete for the moment + * of calling, the function returns `nullptr` (as an indication that no + * additional work is required). + */ +static std::shared_ptr progressState(const ShadowNode& shadowNode) { + auto isStateChanged = false; + auto areChildrenChanged = false; + + auto newState = shadowNode.getState(); + if (newState) { + newState = newState->getMostRecentStateIfObsolete(); + if (newState) { + isStateChanged = true; + } + } + + auto newChildren = std::vector>{}; + if (!shadowNode.getChildren().empty()) { + auto index = size_t{0}; + for (const auto& childNode : shadowNode.getChildren()) { + auto newChildNode = progressState(*childNode); + if (newChildNode) { + if (!areChildrenChanged) { + // Making a copy before the first mutation. + newChildren = shadowNode.getChildren(); + } + newChildren[index] = newChildNode; + areChildrenChanged = true; + } + index++; + } + } + + if (!areChildrenChanged && !isStateChanged) { + return nullptr; + } + + return shadowNode.clone({ + .props = ShadowNodeFragment::propsPlaceholder(), + .children = areChildrenChanged + ? std::make_shared< + const std::vector>>( + std::move(newChildren)) + : ShadowNodeFragment::childrenPlaceholder(), + .state = + isStateChanged ? newState : ShadowNodeFragment::statePlaceholder(), + }); +} + +/* + * An optimized version of the previous function (and relies on it). + * The function uses a given base tree to exclude unchanged (equal) parts + * of the three from the traversing. + */ +static std::shared_ptr progressState( + const ShadowNode& shadowNode, + const ShadowNode& baseShadowNode) { + // The intuition behind the complexity: + // - A very few nodes have associated state, therefore it's mostly reading and + // it only writes when state objects were found obsolete; + // - Most before-after trees are aligned, therefore most tree branches will be + // skipped; + // - If trees are significantly different, any other algorithm will have + // close to linear complexity. + + auto isStateChanged = false; + auto areChildrenChanged = false; + + auto newState = shadowNode.getState(); + if (newState) { + newState = newState->getMostRecentStateIfObsolete(); + if (newState) { + isStateChanged = true; + } + } + + auto& children = shadowNode.getChildren(); + auto& baseChildren = baseShadowNode.getChildren(); + auto newChildren = std::vector>{}; + + auto childrenSize = children.size(); + auto baseChildrenSize = baseChildren.size(); + auto index = size_t{0}; + + // Stage 1: Aligned part. + for (index = 0; index < childrenSize && index < baseChildrenSize; index++) { + const auto& childNode = *children[index]; + const auto& baseChildNode = *baseChildren[index]; + + if (&childNode == &baseChildNode) { + // Nodes are identical, skipping. + continue; + } + + if (!ShadowNode::sameFamily(childNode, baseChildNode)) { + // Totally different nodes, updating is impossible. + break; + } + + auto newChildNode = progressState(childNode, baseChildNode); + if (newChildNode) { + if (!areChildrenChanged) { + // Making a copy before the first mutation. + newChildren = children; + } + newChildren[index] = newChildNode; + areChildrenChanged = true; + } + } + + // Stage 2: Misaligned part. + for (; index < childrenSize; index++) { + auto newChildNode = progressState(*children[index]); + if (newChildNode) { + if (!areChildrenChanged) { + // Making a copy before the first mutation. + newChildren = children; + } + newChildren[index] = newChildNode; + areChildrenChanged = true; + } + } + + if (!areChildrenChanged && !isStateChanged) { + return nullptr; + } + + return shadowNode.clone({ + .props = ShadowNodeFragment::propsPlaceholder(), + .children = areChildrenChanged + ? std::make_shared< + const std::vector>>( + std::move(newChildren)) + : ShadowNodeFragment::childrenPlaceholder(), + .state = + isStateChanged ? newState : ShadowNodeFragment::statePlaceholder(), + }); +} + +/* + * Updates the layout context and layout metrics on the RootNode for commits + * coming from React. The RootNode is managed outside of it, and may have been + * modified concurrently with the React revision. + */ +static std::shared_ptr progressRootLayoutInfo( + const std::shared_ptr& shadowNode, + const RootShadowNode& baseShadowNode, + const ShadowTreeCommitOptions& commitOptions) { + if (commitOptions.source == ShadowTreeCommitSource::React || + commitOptions.source == ShadowTreeCommitSource::ReactRevisionMerge) { + const auto& mainBranchRootProps = baseShadowNode.getConcreteProps(); + const auto& jsBranchRootProps = shadowNode->getConcreteProps(); + + if (mainBranchRootProps.layoutConstraints == + jsBranchRootProps.layoutConstraints && + mainBranchRootProps.layoutContext == jsBranchRootProps.layoutContext) { + // The layout information kept in the JS branch is up to date. + return shadowNode; + } + + const auto clonedNode = baseShadowNode.ShadowNode::clone( + {.children = std::make_shared< + const std::vector>>( + shadowNode->getChildren())}); + return std::static_pointer_cast(clonedNode); + } + + return shadowNode; +} + +ShadowTree::ShadowTree( + SurfaceId surfaceId, + const LayoutConstraints& layoutConstraints, + const LayoutContext& layoutContext, + const ShadowTreeDelegate& delegate, + const ContextContainer& contextContainer) + : surfaceId_(surfaceId), delegate_(delegate) { + static RootComponentDescriptor globalRootComponentDescriptor( + ComponentDescriptorParameters{ + .eventDispatcher = EventDispatcher::Shared{}, + .contextContainer = nullptr, + .flavor = nullptr}); + + const auto props = std::make_shared( + PropsParserContext{surfaceId, contextContainer}, + *RootShadowNode::defaultSharedProps(), + layoutConstraints, + layoutContext); + + auto family = globalRootComponentDescriptor.createFamily( + {.tag = surfaceId, .surfaceId = surfaceId, .instanceHandle = nullptr}); + + auto rootShadowNode = std::static_pointer_cast( + globalRootComponentDescriptor.createShadowNode( + ShadowNodeFragment{ + /* .props = */ .props = props, + }, + family)); + + currentRevision_ = ShadowTreeRevision{ + .rootShadowNode = rootShadowNode, + .number = INITIAL_REVISION, + .telemetry = TransactionTelemetry{}}; + + mountingCoordinator_ = + std::make_shared(currentRevision_); +} + +ShadowTree::~ShadowTree() { + mountingCoordinator_->revoke(); +} + +Tag ShadowTree::getSurfaceId() const { + return surfaceId_; +} + +void ShadowTree::setCommitMode(CommitMode commitMode) const { + auto revision = ShadowTreeRevision{}; + + { + ShadowTree::UniqueLock lock = uniqueRevisionLock(); + + if (commitMode_ == commitMode) { + return; + } + + commitMode_ = commitMode; + revision = currentRevision_; + } + + // initial revision never contains any commits so mounting it here is + // incorrect + if (commitMode == CommitMode::Normal && revision.number != INITIAL_REVISION) { + mount(revision, true); + } +} + +CommitMode ShadowTree::getCommitMode() const { + SharedLock lock = sharedRevisionLock(); + return commitMode_; +} + +std::shared_ptr ShadowTree::getMountingCoordinator() + const { + return mountingCoordinator_; +} + +CommitStatus ShadowTree::commit( + const ShadowTreeCommitTransaction& transaction, + const CommitOptions& commitOptions) const { + [[maybe_unused]] int attempts = 0; + + if (ReactNativeFeatureFlags::preventShadowTreeCommitExhaustion()) { + while (attempts < MAX_COMMIT_ATTEMPTS_BEFORE_LOCKING) { + auto status = tryCommit(transaction, commitOptions); + if (status != CommitStatus::Failed) { + return status; + } + attempts++; + } + + { + std::unique_lock lock(revisionMutexRecursive_); + return tryCommit(transaction, commitOptions); + } + } else { + while (true) { + attempts++; + + auto status = tryCommit(transaction, commitOptions); + if (status != CommitStatus::Failed) { + return status; + } + + // After multiple attempts, we failed to commit the transaction. + // Something internally went terribly wrong. + react_native_assert(attempts < 1024); + } + } +} + +CommitStatus ShadowTree::tryCommit( + const ShadowTreeCommitTransaction& transaction, + const CommitOptions& commitOptions) const { + TraceSection s("ShadowTree::commit"); + jsinspector_modern::tracing::PerformanceTracerSection s1( + "commit", + "Renderer", + "\u269b Native", + nullptr, + "source", + getShadowTreeCommitSourceName(commitOptions.source)); + + auto isReactBranch = ReactNativeFeatureFlags::enableFabricCommitBranching() && + commitOptions.source == CommitSource::React; + + // Commits on the JS branch are never synchronous. + react_native_assert(!isReactBranch || !commitOptions.mountSynchronously); + + auto telemetry = TransactionTelemetry{}; + telemetry.willCommit(); + + CommitMode commitMode; + auto oldRevision = ShadowTreeRevision{}; + auto oldRevisionForStateProgression = ShadowTreeRevision{}; + auto newRevision = ShadowTreeRevision{}; + + { + // Reading `currentRevision_` in shared manner. + SharedLock lock = sharedRevisionLock(); + commitMode = commitMode_; + + if (isReactBranch && currentReactRevision_.has_value()) { + oldRevision = currentReactRevision_.value(); + } else { + oldRevision = currentRevision_; + } + + oldRevisionForStateProgression = currentRevision_; + } + + const auto& oldRootShadowNode = oldRevision.rootShadowNode; + auto newRootShadowNode = transaction(*oldRevision.rootShadowNode); + + if (!newRootShadowNode) { + return CommitStatus::Cancelled; + } + + if (commitOptions.enableStateReconciliation) { + auto updatedNewRootShadowNode = progressState( + *newRootShadowNode, *oldRevisionForStateProgression.rootShadowNode); + if (updatedNewRootShadowNode) { + newRootShadowNode = + std::static_pointer_cast(updatedNewRootShadowNode); + } + } + + if (ReactNativeFeatureFlags::enableFabricCommitBranching()) { + newRootShadowNode = progressRootLayoutInfo( + newRootShadowNode, + *oldRevisionForStateProgression.rootShadowNode, + commitOptions); + } + + // Run commit hooks. + newRootShadowNode = delegate_.shadowTreeWillCommit( + *this, oldRootShadowNode, newRootShadowNode, commitOptions); + + if (!newRootShadowNode) { + return CommitStatus::Cancelled; + } + + // Layout nodes. + std::vector affectedLayoutableNodes{}; + affectedLayoutableNodes.reserve(1024); + + telemetry.willLayout(); + telemetry.setAsThreadLocal(); + { + jsinspector_modern::tracing::PerformanceTracerSection s2( + "layout", "Renderer", "\u269b Native"); + newRootShadowNode->layoutIfNeeded(&affectedLayoutableNodes); + } + telemetry.unsetAsThreadLocal(); + telemetry.didLayout(static_cast(affectedLayoutableNodes.size())); + + { + // Updating `currentRevision_` in unique manner if it hasn't changed. + UniqueLock lock = uniqueRevisionLock( + /*defer*/ isReactBranch); + + if (!isReactBranch && currentRevision_.number != oldRevision.number) { + return CommitStatus::Failed; + } + + auto newRevisionNumber = isReactBranch + ? oldRevisionForStateProgression.number + 1 + : currentRevision_.number + 1; + + { + std::scoped_lock dispatchLock(EventEmitter::DispatchMutex()); + updateMountedFlag( + oldRevision.rootShadowNode->getChildren(), + newRootShadowNode->getChildren(), + commitOptions.source); + } + + telemetry.didCommit(); + telemetry.setRevisionNumber(static_cast(newRevisionNumber)); + + // Seal the shadow node so it can no longer be mutated + // Does nothing in release. + newRootShadowNode->sealRecursive(); + + newRevision = ShadowTreeRevision{ + .rootShadowNode = std::move(newRootShadowNode), + .number = newRevisionNumber, + .telemetry = telemetry}; + + if (isReactBranch) { + // Lock the deferred lock to ensure that the new React revision is not + // reset during a scheduled merge. + std::visit([](auto& concreteLock) { concreteLock.lock(); }, lock); + currentReactRevision_ = newRevision; + } else { + currentRevision_ = newRevision; + } + } + + emitLayoutEvents(affectedLayoutableNodes); + + if (isReactBranch) { + scheduleReactRevisionPromotion(); + } else if (commitMode == CommitMode::Normal) { + mount(std::move(newRevision), commitOptions.mountSynchronously); + } + + return CommitStatus::Succeeded; +} + +ShadowTreeRevision ShadowTree::getCurrentRevision() const { + SharedLock lock = sharedRevisionLock(); + return currentRevision_; +} + +std::optional ShadowTree::getCurrentReactRevision() const { + SharedLock lock = sharedRevisionLock(); + return currentReactRevision_; +} + +void ShadowTree::mount(ShadowTreeRevision revision, bool mountSynchronously) + const { + mountingCoordinator_->push(std::move(revision)); + delegate_.shadowTreeDidFinishTransaction( + mountingCoordinator_, mountSynchronously); +} + +void ShadowTree::mergeReactRevision() const { + ShadowTreeRevision promotedRevision; + std::vector promotedRevisions; + // If props updates accumulation is guaranteed, we can merge the promoted + // react revision, otherwise we need to merge all queued revisions. + + { + UniqueLock lock = uniqueRevisionLock(false); + + if (isPropsUpdatesAccumulationGuaranteed()) { + if (!reactRevisionToBePromoted_.has_value()) { + return; + } + + promotedRevision = + std::exchange(reactRevisionToBePromoted_, std::nullopt).value(); + } else { + if (promotedReactRevisions_.empty()) { + return; + } + + promotedReactRevisions_.swap(promotedRevisions); + } + } + + RootShadowNode::Shared lastMergedRootShadowNode; + bool lastMergeSucceeded = false; + + if (isPropsUpdatesAccumulationGuaranteed()) { + lastMergedRootShadowNode = promotedRevision.rootShadowNode; + auto status = this->commit( + [revision = std::move(promotedRevision)]( + const RootShadowNode& /*oldRootShadowNode*/) { + return std::make_shared( + *revision.rootShadowNode, ShadowNodeFragment{}); + }, + { + .enableStateReconciliation = true, + .mountSynchronously = true, + .source = CommitSource::ReactRevisionMerge, + }); + lastMergeSucceeded = status == CommitStatus::Succeeded; + } else { + for (size_t i = 0; i < promotedRevisions.size(); ++i) { + auto& revision = promotedRevisions[i]; + bool isLast = i == promotedRevisions.size() - 1; + lastMergedRootShadowNode = revision.rootShadowNode; + + auto status = this->commit( + [revision = std::move(revision)]( + const RootShadowNode& /*oldRootShadowNode*/) { + return std::make_shared( + *revision.rootShadowNode, ShadowNodeFragment{}); + }, + { + .enableStateReconciliation = isLast, + .mountSynchronously = true, + .source = CommitSource::ReactRevisionMerge, + }); + lastMergeSucceeded = status == CommitStatus::Succeeded; + } + } + + { + UniqueLock commitLock = uniqueRevisionLock( + /*defer*/ false); + + // If the current react revision is the same as the one that was just + // merged, clear it. + if (lastMergeSucceeded && currentReactRevision_.has_value() && + currentReactRevision_.value().rootShadowNode == + lastMergedRootShadowNode) { + currentReactRevision_.reset(); + } + } +} + +void ShadowTree::promoteReactRevision() const { + // Promote only when props updates accumulation is guaranteed. Otherwise, + // queuedReactRevisions_ will be used instead. + if (isPropsUpdatesAccumulationGuaranteed()) { + ShadowTreeRevision currentReactRevision; + { + SharedLock lock = sharedRevisionLock(); + // Promotion happens at the end of the event loop tick, it's possible to + // have more than one promotion in a row. In this case, all but the first + // one should no-op. + if (!currentReactRevision_.has_value()) { + return; + } + currentReactRevision = currentReactRevision_.value(); + } + + { + UniqueLock lock = uniqueRevisionLock(false); + reactRevisionToBePromoted_ = std::move(currentReactRevision); + } + } else { + UniqueLock lock = uniqueRevisionLock(false); + + if (queuedReactRevisions_.empty()) { + return; + } + + // Move all queued revisions to the promoted revisions. + promotedReactRevisions_.insert( + promotedReactRevisions_.end(), + std::make_move_iterator(queuedReactRevisions_.begin()), + std::make_move_iterator(queuedReactRevisions_.end())); + queuedReactRevisions_.clear(); + } + + delegate_.shadowTreeDidPromoteReactRevision(*this); +} + +void ShadowTree::scheduleReactRevisionPromotion() const { + if (!isPropsUpdatesAccumulationGuaranteed()) { + // If props updates accumulation is not guaranteed, we need to store each + // revision to be merged separately. + UniqueLock lock = uniqueRevisionLock(false); + if (currentReactRevision_.has_value()) { + queuedReactRevisions_.push_back(currentReactRevision_.value()); + } + } + + delegate_.shadowTreeDidFinishReactCommit(*this); +} + +void ShadowTree::commitEmptyTree() const { + commit( + [](const RootShadowNode& oldRootShadowNode) + -> std::shared_ptr { + return std::make_shared( + oldRootShadowNode, + ShadowNodeFragment{ + /* .props = */ .props = ShadowNodeFragment::propsPlaceholder(), + /* .children = */ .children = + ShadowNode::emptySharedShadowNodeSharedList(), + }); + }, + {/* default commit options */}); +} + +void ShadowTree::emitLayoutEvents( + std::vector& affectedLayoutableNodes) const { + TraceSection s( + "ShadowTree::emitLayoutEvents", + "affectedLayoutableNodes", + affectedLayoutableNodes.size()); + + for (const auto* layoutableNode : affectedLayoutableNodes) { + if (auto viewProps = + dynamic_cast(layoutableNode->getProps().get())) { + if (viewProps->onLayout) { + static_cast( + *layoutableNode->getEventEmitter()) + .onLayout(layoutableNode->getLayoutMetrics()); + } + } + } +} + +void ShadowTree::notifyDelegatesOfUpdates() const { + delegate_.shadowTreeDidFinishTransaction(mountingCoordinator_, true); +} + +inline ShadowTree::UniqueLock ShadowTree::uniqueRevisionLock(bool defer) const { + if (ReactNativeFeatureFlags::preventShadowTreeCommitExhaustion()) { + return defer ? std::unique_lock{revisionMutexRecursive_, std::defer_lock} + : std::unique_lock{revisionMutexRecursive_}; + } else { + return defer ? std::unique_lock{revisionMutex_, std::defer_lock} + : std::unique_lock{revisionMutex_}; + } +} + +inline ShadowTree::SharedLock ShadowTree::sharedRevisionLock() const { + if (ReactNativeFeatureFlags::preventShadowTreeCommitExhaustion()) { + return std::unique_lock{revisionMutexRecursive_}; + } else { + return std::shared_lock{revisionMutex_}; + } +} + +} // namespace facebook::react diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp index ffecc083713..2ad028ff079 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp @@ -240,7 +240,7 @@ void ReactInstance::loadScript( std::shared_ptr buffer(std::move(script)); std::string scriptName = simpleBasename(sourceURL); - runtimeScheduler_->scheduleWork([this, + runtimeScheduler_->scheduleWork([jsErrorHandler = jsErrorHandler_, scriptName, sourceURL, buffer = std::move(buffer), @@ -278,8 +278,8 @@ void ReactInstance::loadScript( * pipeline from javascript. Remove this after we figure that out, or * after we just remove the js pipeline. */ - if (!jsErrorHandler_->hasHandledFatalError()) { - jsErrorHandler_->setRuntimeReady(); + if (!jsErrorHandler->hasHandledFatalError()) { + jsErrorHandler->setRuntimeReady(); } if (hasLogger) { diff --git a/vnext/overrides.json b/vnext/overrides.json index a47e5bb3546..25d23c0bfae 100644 --- a/vnext/overrides.json +++ b/vnext/overrides.json @@ -8,13 +8,13 @@ "**/__snapshots__/**", "src-win/rntypes/**" ], - "baseVersion": "0.87.0-nightly-20260519-58cd1bf58", + "baseVersion": "0.87.0-nightly-20260604-63683f091", "overrides": [ { "type": "derived", "file": ".flowconfig", "baseFile": ".flowconfig", - "baseHash": "8541594eb651d934e295d80bfca57608797c051d" + "baseHash": "cab29897ab41daf0bdf7ec14469f549709ee8df1" }, { "type": "derived", @@ -105,9 +105,15 @@ "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Bridging.h", "baseFile": "packages/react-native/ReactCommon/react/bridging/Bridging.h", - "baseHash": "5678d5ac212112184b7e63b5d58c6ae713e03cd5", + "baseHash": "01daddd285fdfa7486a3d9442d4ed645f7aafd72", "issue": 12195 }, + { + "type": "patch", + "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/ArrayBuffer.h", + "baseFile": "packages/react-native/ReactCommon/react/bridging/ArrayBuffer.h", + "baseHash": "3f56ab499a21ce18e596ad54af482212f8533183" + }, { "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h", @@ -215,6 +221,12 @@ "baseHash": "6d91921f18e3e79984a6a368de9b5ab90d47db3b", "issue": 16261 }, + { + "type": "patch", + "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/mounting/ShadowTree.cpp", + "baseFile": "packages/react-native/ReactCommon/react/renderer/mounting/ShadowTree.cpp", + "baseHash": "94c60519a299bce6b87e48f54c7f545e48cf7805" + }, { "type": "derived", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/uimanager/UIManager.cpp", @@ -225,7 +237,7 @@ "type": "derived", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp", "baseFile": "packages/react-native/ReactCommon/react/runtime/ReactInstance.cpp", - "baseHash": "8ba7b2445e78a8addd7b6ebec7a3649783b48b5f" + "baseHash": "0fd65701e3545dd1da282520aa07808fa6afd4f9" }, { "type": "copy", @@ -238,13 +250,13 @@ "type": "derived", "file": "src-win/index.windows.js", "baseFile": "packages/react-native/index.js", - "baseHash": "4f1425bdee2bfc1532954a3ad0a9bca5ac5cb52d" + "baseHash": "a8995a3fd85b5ac8b503f475134706add0ac628d" }, { "type": "derived", "file": "src-win/index.windows.js.flow", "baseFile": "packages/react-native/index.js.flow", - "baseHash": "6ed6e4c48890f67618a2bacc4160cc7a1a205962" + "baseHash": "ba5a4284d241076a429506eb5f35df0e813237a1" }, { "type": "platform", @@ -333,7 +345,7 @@ "type": "derived", "file": "src-win/Libraries/Components/Button.windows.js", "baseFile": "packages/react-native/Libraries/Components/Button.js", - "baseHash": "441c1b0e0db63cb1f0e7597105e0ebdbfaabc6f4" + "baseHash": "dfaae1a77b333609c531734fd29fc9212094f2c7" }, { "type": "platform", @@ -383,25 +395,25 @@ "type": "derived", "file": "src-win/Libraries/Components/Pressable/Pressable.d.ts", "baseFile": "packages/react-native/Libraries/Components/Pressable/Pressable.d.ts", - "baseHash": "eca0d20e6e8df0297268c683a5c0f939fc075fc5" + "baseHash": "3de4740a03c9a2e7c0ae337cbfa789bebf1e6427" }, { "type": "patch", "file": "src-win/Libraries/Components/Pressable/Pressable.windows.js", "baseFile": "packages/react-native/Libraries/Components/Pressable/Pressable.js", - "baseHash": "f4f899e3e0cc0fc70de0021fbc2e4268e68c66dd" + "baseHash": "671fd9e3b50ad0dbc21237aba195b2fd536b0d33" }, { "type": "patch", "file": "src-win/Libraries/Components/RefreshControl/RefreshControl.windows.js", "baseFile": "packages/react-native/Libraries/Components/RefreshControl/RefreshControl.js", - "baseHash": "0318a95f15b38f09f5b78522419e32dbd16be8a1" + "baseHash": "35039b46cf8b969efc526e6aa0ad01190e4650c5" }, { "type": "derived", "file": "src-win/Libraries/Components/ScrollView/ScrollView.windows.js", "baseFile": "packages/react-native/Libraries/Components/ScrollView/ScrollView.js", - "baseHash": "c69c0c1244e378e5e5a6026eb175ef2e097957a1" + "baseHash": "bf8e36ee98ce285b0e0c0884a335cdc33d2c0afe" }, { "type": "derived", @@ -413,7 +425,7 @@ "type": "derived", "file": "src-win/Libraries/Components/Switch/Switch.windows.js", "baseFile": "packages/react-native/Libraries/Components/Switch/Switch.js", - "baseHash": "2c4d34ae7caeb5d97f0771ba605e8875bef9e14e" + "baseHash": "c5ca69412a88eed3bc1bb05da77b30703055ac45" }, { "type": "derived", @@ -425,7 +437,7 @@ "type": "patch", "file": "src-win/Libraries/Components/TextInput/TextInput.windows.js", "baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.js", - "baseHash": "63cc3972f4d9d1c369e616dd1a93348595e67a20" + "baseHash": "9f6b2c9e0e65947f9b76142aab4279c838515188" }, { "type": "patch", @@ -443,7 +455,7 @@ "type": "patch", "file": "src-win/Libraries/Components/Touchable/Touchable.windows.js", "baseFile": "packages/react-native/Libraries/Components/Touchable/Touchable.js", - "baseHash": "bb64188fc7f7c760c960de6a66d74048658d2fe5" + "baseHash": "eda6184f18761af5ae80c4ec4a8271e65140b28e" }, { "type": "derived", @@ -455,19 +467,19 @@ "type": "patch", "file": "src-win/Libraries/Components/Touchable/TouchableHighlight.windows.js", "baseFile": "packages/react-native/Libraries/Components/Touchable/TouchableHighlight.js", - "baseHash": "bb168366cda832fc9361b0ce76f2f4c27c418e16" + "baseHash": "f2772a14ca11544baf06ebfdde0bde67aab4e558" }, { "type": "derived", "file": "src-win/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js", "baseFile": "packages/react-native/Libraries/Components/Touchable/TouchableNativeFeedback.js", - "baseHash": "7adb86e9810269266c8d1f9d252dc541a7030b75" + "baseHash": "56b83741ba7bfd763e0aa161ebde4a9648b30a67" }, { "type": "patch", "file": "src-win/Libraries/Components/Touchable/TouchableOpacity.windows.js", "baseFile": "packages/react-native/Libraries/Components/Touchable/TouchableOpacity.js", - "baseHash": "d865091daba5b35bca5baa7ccc33abff3660437a" + "baseHash": "2c3c9532bc535a673719e7d8267d908177bd43b2" }, { "type": "patch", @@ -479,13 +491,13 @@ "type": "patch", "file": "src-win/Libraries/Components/View/View.windows.js", "baseFile": "packages/react-native/Libraries/Components/View/View.js", - "baseHash": "31ddfc79350a2f57e3963501d37c1522b76b2f40" + "baseHash": "cc9a4ded5391bc4ac8e2054ea5f158d92d24b26f" }, { "type": "derived", "file": "src-win/Libraries/Components/View/ViewAccessibility.d.ts", "baseFile": "packages/react-native/Libraries/Components/View/ViewAccessibility.d.ts", - "baseHash": "1e4e3a89397960e8f08b86be62496473829c0ac3" + "baseHash": "6f10f9c0c28d5d70bfcb74d7cddb8f3c114c940d" }, { "type": "patch", @@ -503,7 +515,7 @@ "type": "patch", "file": "src-win/Libraries/Components/View/ViewPropTypes.windows.js", "baseFile": "packages/react-native/Libraries/Components/View/ViewPropTypes.js", - "baseHash": "4be3c7c79c4def3cd1a1a4df27f8ca2d8507f6e3" + "baseHash": "72246881f3da4f2eb2a11b4fcc459ecb9d3abe04" }, { "type": "patch", @@ -520,13 +532,13 @@ "type": "derived", "file": "src-win/Libraries/Image/AssetSourceResolver.windows.js", "baseFile": "packages/react-native/Libraries/Image/AssetSourceResolver.js", - "baseHash": "6776a3d61da483d1ea3232cdf9d25a0aec68aa09" + "baseHash": "93b3399b63158fbc2030ff5cf63048f37685d187" }, { "type": "patch", "file": "src-win/Libraries/Image/Image.windows.js", "baseFile": "packages/react-native/Libraries/Image/Image.ios.js", - "baseHash": "e52a6144ed3241e1e31e87292536908f8088d9c0", + "baseHash": "f2bfa56783706d0fd2af980d992f06a0a0d928a6", "issue": 4590 }, { @@ -564,13 +576,13 @@ "type": "patch", "file": "src-win/Libraries/Modal/Modal.d.ts", "baseFile": "packages/react-native/Libraries/Modal/Modal.d.ts", - "baseHash": "21877e187985c1c36b60ac128888bde13e65d234" + "baseHash": "a7e52bebd71694daf466e7aec4914afc29d876e4" }, { "type": "derived", "file": "src-win/Libraries/Modal/Modal.windows.js", "baseFile": "packages/react-native/Libraries/Modal/Modal.js", - "baseHash": "1d08d04a7938ac1ff8f56028c02a82814b744581" + "baseHash": "6d74f07016577db42b11f48192dd93eb48addaf3" }, { "type": "derived", @@ -582,7 +594,7 @@ "type": "derived", "file": "src-win/Libraries/NativeComponent/ViewConfigIgnore.windows.js", "baseFile": "packages/react-native/Libraries/NativeComponent/ViewConfigIgnore.js", - "baseHash": "2e9c8aee8d920c24a48ed23cb9aa440bc5ac8efe" + "baseHash": "0fa9ce7290a781ffa451fe337464dbdffe929aaf" }, { "type": "derived", @@ -641,25 +653,25 @@ "type": "derived", "file": "src-win/Libraries/Text/Text.windows.js", "baseFile": "packages/react-native/Libraries/Text/Text.js", - "baseHash": "c7a8fd756a79aee901d60cf731d3be71199bd3b3" + "baseHash": "9e8e0694c95f81bf26f842dcff8be43292f8c85d" }, { "type": "derived", "file": "src-win/Libraries/Text/TextProps.windows.js", "baseFile": "packages/react-native/Libraries/Text/TextProps.js", - "baseHash": "8392ed76bf20cb9cc345066baa5809530fed1b72" + "baseHash": "62b3c3a1353376fb0e144a7916cd3dc79d1859cf" }, { "type": "patch", "file": "src-win/Libraries/Types/CoreEventTypes.windows.js", "baseFile": "packages/react-native/Libraries/Types/CoreEventTypes.js", - "baseHash": "a171d222c66e809419656decb12be33185f35952" + "baseHash": "486ae7020716f382ed63cef9f1d4aec15a8c3c70" }, { "type": "copy", "file": "src-win/Libraries/Utilities/BackHandler.windows.js", "baseFile": "packages/react-native/Libraries/Utilities/BackHandler.android.js", - "baseHash": "9fa1579308fcafa2d919b6f428e1ef2bdbfb83fc", + "baseHash": "da60a90a9e44f7146318ed30b2ff26867768b217", "issue": 4629 }, { @@ -703,7 +715,7 @@ "type": "patch", "file": "src-win/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js", "baseFile": "packages/react-native/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js", - "baseHash": "7f5f26c2303365f2b7cff5eeaf1fad1b9233284e", + "baseHash": "29f8cce9b90356583ea104ef6c76108be45d2241", "issue": 15582 }, { @@ -714,13 +726,13 @@ "type": "derived", "file": "src-win/src/private/specs_DEPRECATED/modules/NativeDialogManagerWindows.js", "baseFile": "packages/react-native/src/private/specs_DEPRECATED/modules/NativeDialogManagerAndroid.js", - "baseHash": "192c088657630dd03d1de00f2b224fb4e870d0dc" + "baseHash": "19424f14a05a497f936db89322a0458c2ab3464c" }, { "type": "derived", "file": "src-win/src/private/specs_DEPRECATED/modules/NativePlatformConstantsWindows.js", "baseFile": "packages/react-native/src/private/specs_DEPRECATED/modules/NativePlatformConstantsAndroid.js", - "baseHash": "809b3807bafb9b73c95fd5ecf30f2d398f993847" + "baseHash": "6d562f689df6f0fd926a78326afce7f51b6b1279" } ] } \ No newline at end of file diff --git a/vnext/package.json b/vnext/package.json index c1855ec18d8..47ec93d4641 100644 --- a/vnext/package.json +++ b/vnext/package.json @@ -28,15 +28,15 @@ "@react-native-community/cli-platform-ios": "20.0.0", "@react-native-windows/cli": "0.0.0-canary.293", "@react-native/assets": "1.0.0", - "@react-native/assets-registry": "0.87.0-nightly-20260519-58cd1bf58", - "@react-native/codegen": "0.87.0-nightly-20260519-58cd1bf58", - "@react-native/community-cli-plugin": "0.87.0-nightly-20260519-58cd1bf58", - "@react-native/gradle-plugin": "0.87.0-nightly-20260519-58cd1bf58", - "@react-native/jest-preset": "0.87.0-nightly-20260519-58cd1bf58", - "@react-native/js-polyfills": "0.87.0-nightly-20260519-58cd1bf58", - "@react-native/new-app-screen": "0.87.0-nightly-20260519-58cd1bf58", - "@react-native/normalize-colors": "0.87.0-nightly-20260519-58cd1bf58", - "@react-native/virtualized-lists": "0.87.0-nightly-20260519-58cd1bf58", + "@react-native/assets-registry": "0.87.0-nightly-20260604-63683f091", + "@react-native/codegen": "0.87.0-nightly-20260604-63683f091", + "@react-native/community-cli-plugin": "0.87.0-nightly-20260604-63683f091", + "@react-native/gradle-plugin": "0.87.0-nightly-20260604-63683f091", + "@react-native/jest-preset": "0.87.0-nightly-20260604-63683f091", + "@react-native/js-polyfills": "0.87.0-nightly-20260604-63683f091", + "@react-native/new-app-screen": "0.87.0-nightly-20260604-63683f091", + "@react-native/normalize-colors": "0.87.0-nightly-20260604-63683f091", + "@react-native/virtualized-lists": "0.87.0-nightly-20260604-63683f091", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", @@ -48,7 +48,7 @@ "event-target-shim": "^5.0.1", "flow-enums-runtime": "^0.0.6", "glob": "^7.1.1", - "hermes-compiler": "250829098.0.13", + "hermes-compiler": "250829098.0.14", "invariant": "^2.2.4", "jest-environment-node": "^29.7.0", "memoize-one": "^5.0.0", @@ -75,7 +75,7 @@ "@babel/preset-env": "^7.25.3", "@react-native-windows/codegen": "0.0.0-canary.133", "@react-native-windows/find-dotnet-tools": "0.0.0-canary.2", - "@react-native/metro-config": "0.87.0-nightly-20260519-58cd1bf58", + "@react-native/metro-config": "0.87.0-nightly-20260604-63683f091", "@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", @@ -85,21 +85,21 @@ "@types/node": "^22.14.0", "@types/react": "^19.2.3", "eslint": "^8.19.0", - "flow-bin": "^0.314.0", + "flow-bin": "^0.316.0", "jscodeshift": "^0.14.0", "just-scripts": "^1.3.3", "prettier": "^3.6.2", "react": "19.2.3", - "react-native": "0.87.0-nightly-20260519-58cd1bf58", + "react-native": "0.87.0-nightly-20260604-63683f091", "react-native-platform-override": "0.0.0-canary.1023", "react-refresh": "^0.14.0", "typescript": "5.0.4" }, "peerDependencies": { - "@react-native/jest-preset": "0.87.0-nightly-20260519-58cd1bf58", + "@react-native/jest-preset": "0.87.0-nightly-20260604-63683f091", "@types/react": "^19.1.1", "react": "^19.2.3", - "react-native": "0.87.0-nightly-20260519-58cd1bf58" + "react-native": "0.87.0-nightly-20260604-63683f091" }, "beachball": { "defaultNpmTag": "canary", diff --git a/vnext/src-win/Libraries/Components/Button.windows.js b/vnext/src-win/Libraries/Components/Button.windows.js index ce41af84693..591540f5c6c 100644 --- a/vnext/src-win/Libraries/Components/Button.windows.js +++ b/vnext/src-win/Libraries/Components/Button.windows.js @@ -304,12 +304,18 @@ export type ButtonProps = Readonly<{ ``` */ -type ButtonRef = React.ElementRef; +export type ButtonInstance = React.ElementRef; const Button: component( - ref?: React.RefSetter, + ref?: React.RefSetter, ...props: ButtonProps -) = ({ref, ...props}: {ref?: React.RefSetter, ...ButtonProps}) => { +) = ({ + ref, + ...props +}: { + ref?: React.RefSetter, + ...ButtonProps, +}) => { // [Windows const [hover, setHover] = React.useState(false); const [pressed, setPressed] = React.useState(false); diff --git a/vnext/src-win/Libraries/Components/Pressable/Pressable.d.ts b/vnext/src-win/Libraries/Components/Pressable/Pressable.d.ts index 4803d4939b7..6b15b510d81 100644 --- a/vnext/src-win/Libraries/Components/Pressable/Pressable.d.ts +++ b/vnext/src-win/Libraries/Components/Pressable/Pressable.d.ts @@ -30,6 +30,7 @@ export interface PressableAndroidRippleConfig { borderless?: null | boolean | undefined; radius?: null | number | undefined; foreground?: null | boolean | undefined; + alpha?: null | number | undefined; } export interface PressableProps diff --git a/vnext/src-win/Libraries/Components/Pressable/Pressable.windows.js b/vnext/src-win/Libraries/Components/Pressable/Pressable.windows.js index ca0f1fca2aa..ab3e6484bbc 100644 --- a/vnext/src-win/Libraries/Components/Pressable/Pressable.windows.js +++ b/vnext/src-win/Libraries/Components/Pressable/Pressable.windows.js @@ -8,6 +8,7 @@ * @format */ +import type {HostInstance} from '../../../src/private/types/HostInstance'; import type {ViewStyleProp} from '../../StyleSheet/StyleSheet'; import type { GestureResponderEvent, @@ -33,6 +34,8 @@ import * as React from 'react'; import {memo, useMemo, useRef, useState} from 'react'; import type {HandledKeyboardEvent} from '../../Components/View/ViewPropTypes'; +export type PressableInstance = HostInstance; + export type {PressableAndroidRippleConfig}; export type PressableStateCallbackType = Readonly<{ @@ -219,8 +222,6 @@ export type PressableProps = Readonly<{ ...PressableBaseProps, }>; -type Instance = React.ElementRef; - /** * Component used to build display components that should respond to whether the * component is currently pressed or not. @@ -229,7 +230,7 @@ function Pressable({ ref: forwardedRef, ...props }: { - ref?: React.RefSetter, + ref?: React.RefSetter, ...PressableProps, }): React.Node { const { @@ -277,7 +278,7 @@ function Pressable({ ...restProps } = props; - const viewRef = useRef(null); + const viewRef = useRef(null); const mergedRef = useMergeRefs(forwardedRef, viewRef); const android_rippleConfig = useAndroidRippleForView(android_ripple, viewRef); @@ -437,6 +438,6 @@ const MemoedPressable = memo(Pressable); MemoedPressable.displayName = 'Pressable'; export default MemoedPressable as component( - ref?: React.RefSetter>, + ref?: React.RefSetter, ...props: PressableProps ); diff --git a/vnext/src-win/Libraries/Components/RefreshControl/RefreshControl.windows.js b/vnext/src-win/Libraries/Components/RefreshControl/RefreshControl.windows.js index 767a82235f1..846209030c4 100644 --- a/vnext/src-win/Libraries/Components/RefreshControl/RefreshControl.windows.js +++ b/vnext/src-win/Libraries/Components/RefreshControl/RefreshControl.windows.js @@ -221,4 +221,6 @@ class RefreshControl extends React.Component { }; } +export type RefreshControlInstance = RefreshControl; + export default RefreshControl; diff --git a/vnext/src-win/Libraries/Components/ScrollView/ScrollView.windows.js b/vnext/src-win/Libraries/Components/ScrollView/ScrollView.windows.js index f452e8c2bc4..aadea6f41b3 100644 --- a/vnext/src-win/Libraries/Components/ScrollView/ScrollView.windows.js +++ b/vnext/src-win/Libraries/Components/ScrollView/ScrollView.windows.js @@ -135,19 +135,19 @@ export interface ScrollViewScrollToOptions { // Public methods for ScrollView export interface ScrollViewImperativeMethods { - +getScrollResponder: () => ScrollResponderType; - +getScrollableNode: () => ?number; - +getInnerViewNode: () => ?number; - +getInnerViewRef: () => InnerViewInstance | null; - +getNativeScrollRef: () => PublicScrollViewInstance | null; - +scrollTo: ( + readonly getScrollResponder: () => ScrollResponderType; + readonly getScrollableNode: () => ?number; + readonly getInnerViewNode: () => ?number; + readonly getInnerViewRef: () => InnerViewInstance | null; + readonly getNativeScrollRef: () => ScrollViewInstance | null; + readonly scrollTo: ( options?: ScrollViewScrollToOptions | number, deprecatedX?: number, deprecatedAnimated?: boolean, ) => void; - +scrollToEnd: (options?: ?ScrollViewScrollToOptions) => void; - +flashScrollIndicators: () => void; - +scrollResponderZoomTo: ( + readonly scrollToEnd: (options?: ?ScrollViewScrollToOptions) => void; + readonly flashScrollIndicators: () => void; + readonly scrollResponderZoomTo: ( rect: { x: number, y: number, @@ -157,7 +157,7 @@ export interface ScrollViewImperativeMethods { }, animated?: boolean, // deprecated, put this inside the rect argument instead ) => void; - +scrollResponderScrollNativeHandleToKeyboard: ( + readonly scrollResponderScrollNativeHandleToKeyboard: ( nodeHandle: number | HostInstance, additionalOffset?: number, preventNegativeScrollOffset?: boolean, @@ -167,10 +167,13 @@ export interface ScrollViewImperativeMethods { export type DecelerationRateType = 'fast' | 'normal' | number; export type ScrollResponderType = ScrollViewImperativeMethods; -export interface PublicScrollViewInstance +export interface ScrollViewInstance extends HostInstance, ScrollViewImperativeMethods {} +/** @deprecated Use ScrollViewInstance instead */ +export type PublicScrollViewInstance = ScrollViewInstance; + type InnerViewInstance = React.ElementRef; export type ScrollViewPropsIOS = Readonly<{ @@ -677,7 +680,7 @@ type ScrollViewBaseProps = Readonly<{ * all of ScrollView's public methods, in addition to native methods like * measure, measureLayout, etc. */ - scrollViewRef?: React.RefSetter, + scrollViewRef?: React.RefSetter, }>; /** @build-types emit-as-interface Nativewind compatibility */ @@ -874,7 +877,7 @@ class ScrollView extends React.Component { getNativeScrollRef: ScrollViewImperativeMethods['getNativeScrollRef'] = () => { // Object.assign in _scrollView's mutator augments nativeInstance in place, - // so it is already a PublicScrollViewInstance at runtime. + // so it is already a ScrollViewInstance at runtime. // $FlowFixMe[incompatible-type] return this._scrollView.nativeInstance; }; @@ -1170,7 +1173,7 @@ class ScrollView extends React.Component { (instance: InnerViewInstance): InnerViewInstance => instance, ); - _scrollView: RefForwarder = + _scrollView: RefForwarder = createRefForwarder(nativeInstance => { // This is a hack. Ideally we would forwardRef to the underlying // host component. However, since ScrollView has it's own methods that can be @@ -1183,22 +1186,19 @@ class ScrollView extends React.Component { // $FlowFixMe[prop-missing] - Known issue with appending custom methods. // $FlowFixMe[incompatible-type] // $FlowFixMe[unsafe-object-assign] - const publicInstance: PublicScrollViewInstance = Object.assign( - nativeInstance, - { - getScrollResponder: this.getScrollResponder, - getScrollableNode: this.getScrollableNode, - getInnerViewNode: this.getInnerViewNode, - getInnerViewRef: this.getInnerViewRef, - getNativeScrollRef: this.getNativeScrollRef, - scrollTo: this.scrollTo, - scrollToEnd: this.scrollToEnd, - flashScrollIndicators: this.flashScrollIndicators, - scrollResponderZoomTo: this.scrollResponderZoomTo, - scrollResponderScrollNativeHandleToKeyboard: - this.scrollResponderScrollNativeHandleToKeyboard, - }, - ); + const publicInstance: ScrollViewInstance = Object.assign(nativeInstance, { + getScrollResponder: this.getScrollResponder, + getScrollableNode: this.getScrollableNode, + getInnerViewNode: this.getInnerViewNode, + getInnerViewRef: this.getInnerViewRef, + getNativeScrollRef: this.getNativeScrollRef, + scrollTo: this.scrollTo, + scrollToEnd: this.scrollToEnd, + flashScrollIndicators: this.flashScrollIndicators, + scrollResponderZoomTo: this.scrollResponderZoomTo, + scrollResponderScrollNativeHandleToKeyboard: + this.scrollResponderScrollNativeHandleToKeyboard, + }); return publicInstance; }); @@ -1938,13 +1938,13 @@ function createRefForwarder( // component and we need to map `ref` to a differently named prop. This can be // removed when `ScrollView` is a functional component. const ScrollViewWrapper: component( - ref?: React.RefSetter, + ref?: React.RefSetter, ...props: ScrollViewProps ) = function Wrapper({ ref, ...props }: { - ref?: React.RefSetter, + ref?: React.RefSetter, ...ScrollViewProps, }): React.Node { return ref == null ? ( diff --git a/vnext/src-win/Libraries/Components/Switch/Switch.windows.js b/vnext/src-win/Libraries/Components/Switch/Switch.windows.js index d15536fc3ff..93028316988 100644 --- a/vnext/src-win/Libraries/Components/Switch/Switch.windows.js +++ b/vnext/src-win/Libraries/Components/Switch/Switch.windows.js @@ -8,6 +8,7 @@ * @format */ +import type {HostInstance} from '../../../src/private/types/HostInstance'; import type {ColorValue} from '../../StyleSheet/StyleSheet'; import type {NativeSyntheticEvent} from '../../Types/CoreEventTypes'; import type {AccessibilityState} from '../View/ViewAccessibility'; @@ -25,6 +26,8 @@ import SwitchNativeComponent, { import * as React from 'react'; import {useLayoutEffect, useRef, useState} from 'react'; +export type SwitchInstance = HostInstance; + export type SwitchPropsIOS = { /** * Background color when the switch is turned on. @@ -119,10 +122,6 @@ export type SwitchProps = Readonly<{ const returnsFalse = () => false; const returnsTrue = () => true; -type SwitchRef = React.ElementRef< - typeof SwitchNativeComponent | typeof AndroidSwitchNativeComponent, ->; - /** Renders a boolean input. @@ -165,13 +164,13 @@ type SwitchRef = React.ElementRef< ``` */ const Switch: component( - ref?: React.RefSetter, + ref?: React.RefSetter, ...props: SwitchProps ) = function Switch({ ref: forwardedRef, ...props }: { - ref?: React.RefSetter, + ref?: React.RefSetter, ...SwitchProps, }): React.Node { const { @@ -196,9 +195,7 @@ const Switch: component( const _accessibilityPosInSet = ariaPosinset ?? props.accessibilityPosInSet; // Windows const _accessibilitySetSize = ariaSetsize ?? props.accessibilitySetSize; // Windows - const nativeSwitchRef = useRef | null>(null); + const nativeSwitchRef = useRef(null); const ref = useMergeRefs(nativeSwitchRef, forwardedRef); diff --git a/vnext/src-win/Libraries/Components/TextInput/TextInput.windows.js b/vnext/src-win/Libraries/Components/TextInput/TextInput.windows.js index e535b213c9e..62277ca4ca8 100644 --- a/vnext/src-win/Libraries/Components/TextInput/TextInput.windows.js +++ b/vnext/src-win/Libraries/Components/TextInput/TextInput.windows.js @@ -132,6 +132,7 @@ export type { TextInputKeyPressEvent, TextInputProps, TextInputSelectionChangeEvent, + TextInputInstance, TextInputSubmitEditingEvent, TextInputWindowsProps, // [Windows] }; diff --git a/vnext/src-win/Libraries/Components/Touchable/Touchable.windows.js b/vnext/src-win/Libraries/Components/Touchable/Touchable.windows.js index f9400844bf5..955ffaba50f 100644 --- a/vnext/src-win/Libraries/Components/Touchable/Touchable.windows.js +++ b/vnext/src-win/Libraries/Components/Touchable/Touchable.windows.js @@ -25,21 +25,21 @@ import Position from './Position'; import * as React from 'react'; const extractSingleTouch = (nativeEvent: { - +altKey: ?boolean, - +button: ?number, - +changedTouches: ReadonlyArray, - +ctrlKey: ?boolean, - +force?: number, - +identifier: number, - +locationX: number, - +locationY: number, - +metaKey: ?boolean, - +pageX: number, - +pageY: number, - +shiftKey: ?boolean, - +target: ?number, - +timestamp: number, - +touches: ReadonlyArray, + readonly altKey: ?boolean, + readonly button: ?number, + readonly changedTouches: ReadonlyArray, + readonly ctrlKey: ?boolean, + readonly force?: number, + readonly identifier: number, + readonly locationX: number, + readonly locationY: number, + readonly metaKey: ?boolean, + readonly pageX: number, + readonly pageY: number, + readonly shiftKey: ?boolean, + readonly target: ?number, + readonly timestamp: number, + readonly touches: ReadonlyArray, }) => { const touches = nativeEvent.touches; const changedTouches = nativeEvent.changedTouches; diff --git a/vnext/src-win/Libraries/Components/Touchable/TouchableHighlight.windows.js b/vnext/src-win/Libraries/Components/Touchable/TouchableHighlight.windows.js index 6be0c06521a..44e130fc5c5 100644 --- a/vnext/src-win/Libraries/Components/Touchable/TouchableHighlight.windows.js +++ b/vnext/src-win/Libraries/Components/Touchable/TouchableHighlight.windows.js @@ -8,6 +8,7 @@ * @format */ +import type {HostInstance} from '../../../src/private/types/HostInstance'; import type {ColorValue} from '../../StyleSheet/StyleSheet'; import type {AccessibilityState} from '../View/ViewAccessibility'; import type {TouchableWithoutFeedbackProps} from './TouchableWithoutFeedback'; @@ -19,9 +20,12 @@ import Pressability, { import {PressabilityDebugView} from '../../Pressability/PressabilityDebug'; import StyleSheet, {type ViewStyleProp} from '../../StyleSheet/StyleSheet'; import Platform from '../../Utilities/Platform'; +import warnOnce from '../../Utilities/warnOnce'; import * as React from 'react'; import {cloneElement} from 'react'; +export type TouchableHighlightInstance = HostInstance; + type AndroidProps = Readonly<{ nextFocusDown?: ?number, nextFocusForward?: ?number, @@ -69,7 +73,7 @@ type TouchableHighlightBaseProps = Readonly<{ onHideUnderlay?: ?() => void, testOnly_pressed?: ?boolean, - hostRef?: React.RefSetter>, + hostRef?: React.RefSetter, }>; /** @build-types emit-as-interface Uniwind compatibility */ @@ -317,6 +321,13 @@ class TouchableHighlightImpl extends React.Component< render(): React.Node { const child = React.Children.only<$FlowFixMe>(this.props.children); + if (__DEV__ && child.type === React.Fragment) { + warnOnce( + 'TouchableHighlight-fragment', + 'TouchableHighlight does not support React.Fragment as a child. ' + + 'Wrap the children in a single host element such as .', + ); + } // BACKWARD-COMPATIBILITY: Focus and blur events were never supported before // adopting `Pressability`, so preserve that behavior. @@ -402,12 +413,14 @@ class TouchableHighlightImpl extends React.Component< onMouseEnter={this.props.onMouseEnter} // [Windows] onMouseLeave={this.props.onMouseLeave} // [Windows] {...eventHandlersWithoutBlurAndFocus}> - {cloneElement(child, { - style: StyleSheet.compose( - child.props.style, - this.state.extraStyles?.child, - ), - })} + {child.type === React.Fragment + ? child + : cloneElement(child, { + style: StyleSheet.compose( + child.props.style, + this.state.extraStyles?.child, + ), + })} {__DEV__ ? ( ) : null} @@ -437,13 +450,13 @@ class TouchableHighlightImpl extends React.Component< } const TouchableHighlight: component( - ref?: React.RefSetter>, + ref?: React.RefSetter, ...props: Readonly> ) = ({ ref: hostRef, ...props }: { - ref?: React.RefSetter>, + ref?: React.RefSetter, ...Readonly>, }) => ; diff --git a/vnext/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js b/vnext/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js index edb7f645f03..040514a385b 100644 --- a/vnext/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js +++ b/vnext/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js @@ -8,6 +8,8 @@ * @format */ +import type {ProcessedColorValue} from '../../StyleSheet/processColor'; +import type {ColorValue} from '../../StyleSheet/StyleSheet'; import type {GestureResponderEvent} from '../../Types/CoreEventTypes'; import type {TouchableWithoutFeedbackProps} from './TouchableWithoutFeedback'; @@ -20,7 +22,6 @@ import {findHostInstance_DEPRECATED} from '../../ReactNative/RendererProxy'; import processColor from '../../StyleSheet/processColor'; import Platform from '../../Utilities/Platform'; import {Commands} from '../View/ViewNativeComponent'; -import invariant from 'invariant'; import * as React from 'react'; import {cloneElement} from 'react'; @@ -96,7 +97,7 @@ export type TouchableNativeFeedbackProps = Readonly<{ }> | Readonly<{ type: 'RippleAndroid', - color: ?number, + color: ?ProcessedColorValue, borderless: boolean, rippleRadius: ?number, }> @@ -177,23 +178,18 @@ class TouchableNativeFeedback extends React.Component< * @param rippleRadius The radius of ripple effect */ static Ripple: ( - color: string, + color: ColorValue, borderless: boolean, rippleRadius?: ?number, ) => Readonly<{ borderless: boolean, - color: ?number, + color: ?ProcessedColorValue, rippleRadius: ?number, type: 'RippleAndroid', - }> = (color: string, borderless: boolean, rippleRadius?: ?number) => { + }> = (color: ColorValue, borderless: boolean, rippleRadius?: ?number) => { const processedColor = processColor(color); - invariant( - processedColor == null || typeof processedColor === 'number', - 'Unexpected color given for Ripple color', - ); return { type: 'RippleAndroid', - // $FlowFixMe[incompatible-type] color: processedColor, borderless, rippleRadius, @@ -420,4 +416,6 @@ const getBackgroundProp = TouchableNativeFeedback.displayName = 'TouchableNativeFeedback'; +export type TouchableNativeFeedbackInstance = TouchableNativeFeedback; + export default TouchableNativeFeedback; diff --git a/vnext/src-win/Libraries/Components/Touchable/TouchableOpacity.windows.js b/vnext/src-win/Libraries/Components/Touchable/TouchableOpacity.windows.js index 72dd5922159..671c76b4559 100644 --- a/vnext/src-win/Libraries/Components/Touchable/TouchableOpacity.windows.js +++ b/vnext/src-win/Libraries/Components/Touchable/TouchableOpacity.windows.js @@ -8,6 +8,7 @@ * @format */ +import type {HostInstance} from '../../../src/private/types/HostInstance'; import type {ViewStyleProp} from '../../StyleSheet/StyleSheet'; import type {TouchableWithoutFeedbackProps} from './TouchableWithoutFeedback'; @@ -21,6 +22,8 @@ import flattenStyle from '../../StyleSheet/flattenStyle'; import Platform from '../../Utilities/Platform'; import * as React from 'react'; +export type TouchableOpacityInstance = HostInstance; + export type TouchableOpacityTVProps = Readonly<{ /** * *(Apple TV only)* TV preferred focus (see documentation for the View component). @@ -74,7 +77,7 @@ type TouchableOpacityBaseProps = Readonly<{ activeOpacity?: ?number, style?: ?Animated.WithAnimatedValue, - hostRef?: ?React.RefSetter>, + hostRef?: ?React.RefSetter, }>; export type TouchableOpacityProps = Readonly<{ @@ -400,13 +403,13 @@ class TouchableOpacity extends React.Component< } const Touchable: component( - ref?: React.RefSetter>, + ref?: React.RefSetter, ...props: TouchableOpacityProps ) = ({ ref, ...props }: { - ref?: React.RefSetter>, + ref?: React.RefSetter, ...TouchableOpacityProps, }) => ; diff --git a/vnext/src-win/Libraries/Components/View/View.windows.js b/vnext/src-win/Libraries/Components/View/View.windows.js index 94a127e96f4..f015f3ebeb1 100644 --- a/vnext/src-win/Libraries/Components/View/View.windows.js +++ b/vnext/src-win/Libraries/Components/View/View.windows.js @@ -8,6 +8,7 @@ * @format */ +import type {HostInstance} from '../../../src/private/types/HostInstance'; import type {ViewProps} from './ViewPropTypes'; import TextAncestorContext from '../../Text/TextAncestorContext'; @@ -55,6 +56,8 @@ const childrenWithImportantForAccessibility: ( }; // Windows] +export type ViewInstance = HostInstance; + /** * The most fundamental component for building a UI, View is a container that * supports layout with flexbox, style, some touch handling, and accessibility @@ -62,10 +65,7 @@ const childrenWithImportantForAccessibility: ( * * @see https://reactnative.dev/docs/view */ -component View( - ref?: React.RefSetter>, - ...props: ViewProps -) { +component View(ref?: React.RefSetter, ...props: ViewProps) { const hasTextAncestor = use(TextAncestorContext); let actualView; diff --git a/vnext/src-win/Libraries/Components/View/ViewAccessibility.d.ts b/vnext/src-win/Libraries/Components/View/ViewAccessibility.d.ts index 7b48156b751..d3561110854 100644 --- a/vnext/src-win/Libraries/Components/View/ViewAccessibility.d.ts +++ b/vnext/src-win/Libraries/Components/View/ViewAccessibility.d.ts @@ -226,6 +226,7 @@ export interface AccessibilityValue { export type AccessibilityRole = | 'none' | 'button' + | 'dropdownlist' | 'togglebutton' | 'link' | 'search' @@ -257,7 +258,16 @@ export type AccessibilityRole = | 'tree' // Windows | 'treeitem' // Windows | 'listitem' // Windows - | 'toolbar'; + | 'toolbar' + | 'grid' + | 'pager' + | 'scrollview' + | 'horizontalscrollview' + | 'viewgroup' + | 'webview' + | 'drawerlayout' + | 'slidingdrawer' + | 'iconmenu'; // [Windows] export type AnnotationType = diff --git a/vnext/src-win/Libraries/Components/View/ViewPropTypes.windows.js b/vnext/src-win/Libraries/Components/View/ViewPropTypes.windows.js index f45b95839e7..07305ca87c2 100644 --- a/vnext/src-win/Libraries/Components/View/ViewPropTypes.windows.js +++ b/vnext/src-win/Libraries/Components/View/ViewPropTypes.windows.js @@ -11,6 +11,7 @@ 'use strict'; import type {EdgeInsetsOrSizeProp} from '../../StyleSheet/EdgeInsetsPropType'; +import type {ProcessedColorValue} from '../../StyleSheet/processColor'; import type {ViewStyleProp} from '../../StyleSheet/StyleSheet'; import type { BlurEvent, @@ -267,9 +268,10 @@ type AndroidDrawableThemeAttr = Readonly<{ type AndroidDrawableRipple = Readonly<{ type: 'RippleAndroid', - color?: ?number, + color?: ?ProcessedColorValue, borderless?: ?boolean, rippleRadius?: ?number, + alpha?: ?number, }>; type AndroidDrawable = AndroidDrawableThemeAttr | AndroidDrawableRipple; diff --git a/vnext/src-win/Libraries/Image/AssetSourceResolver.windows.js b/vnext/src-win/Libraries/Image/AssetSourceResolver.windows.js index 832212c93c0..18423849187 100644 --- a/vnext/src-win/Libraries/Image/AssetSourceResolver.windows.js +++ b/vnext/src-win/Libraries/Image/AssetSourceResolver.windows.js @@ -11,11 +11,11 @@ 'use strict'; export type ResolvedAssetSource = { - +__packager_asset: boolean, - +width: ?number, - +height: ?number, - +uri: string, - +scale: number, + readonly __packager_asset: boolean, + readonly width: ?number, + readonly height: ?number, + readonly uri: string, + readonly scale: number, }; // From @react-native/assets-registry diff --git a/vnext/src-win/Libraries/Image/Image.windows.js b/vnext/src-win/Libraries/Image/Image.windows.js index 1df8ff9c7a4..7627ec70ee4 100644 --- a/vnext/src-win/Libraries/Image/Image.windows.js +++ b/vnext/src-win/Libraries/Image/Image.windows.js @@ -32,6 +32,8 @@ import NativeImageLoaderIOS from './NativeImageLoaderIOS'; import resolveAssetSource from './resolveAssetSource'; import * as React from 'react'; +export type ImageInstance = HostInstance; + function getSize( uri: string, success?: (width: number, height: number) => void, @@ -113,7 +115,7 @@ let BaseImage: AbstractImageIOS = ({ ref: forwardedRef, ...props }: { - ref?: React.RefSetter, + ref?: React.RefSetter, ...ImageProps, }) => { const source = getImageSourcesFromImageProps(props) || { diff --git a/vnext/src-win/Libraries/Modal/Modal.d.ts b/vnext/src-win/Libraries/Modal/Modal.d.ts index f345348bae9..818145554a0 100644 --- a/vnext/src-win/Libraries/Modal/Modal.d.ts +++ b/vnext/src-win/Libraries/Modal/Modal.d.ts @@ -50,6 +50,11 @@ export interface ModalBaseProps { * Defaults to `white` if not provided and transparent is `false`. Ignored if `transparent` is `true`. */ backdropColor?: ColorValue | undefined; + + /** + * A ref to the native Modal component. + */ + modalRef?: React.RefObject | undefined; } export interface ModalPropsIOS { diff --git a/vnext/src-win/Libraries/Modal/Modal.windows.js b/vnext/src-win/Libraries/Modal/Modal.windows.js index f9d4be763a6..0492ec16365 100644 --- a/vnext/src-win/Libraries/Modal/Modal.windows.js +++ b/vnext/src-win/Libraries/Modal/Modal.windows.js @@ -36,7 +36,10 @@ type ModalEventDefinitions = { modalDismissed: [{modalID: number}], }; -export type PublicModalInstance = HostInstance; +export type ModalInstance = HostInstance; + +/** @deprecated Use ModalInstance instead */ +export type PublicModalInstance = ModalInstance; const ModalEventEmitter = (Platform.OS === 'ios' || Platform.OS === 'windows') && // [Windows] @@ -105,7 +108,7 @@ export type ModalBaseProps = { /** * A ref to the native Modal component. */ - modalRef?: React.RefSetter, + modalRef?: React.RefSetter, }; export type ModalPropsIOS = { @@ -402,7 +405,7 @@ const styles = StyleSheet.create({ }); type ModalRefProps = Readonly<{ - ref?: React.RefSetter, + ref?: React.RefSetter, }>; // NOTE: This wrapper component is necessary because `Modal` is a class diff --git a/vnext/src-win/Libraries/NativeComponent/ViewConfigIgnore.windows.js b/vnext/src-win/Libraries/NativeComponent/ViewConfigIgnore.windows.js index 6acaa4133f8..5e8526c3e6f 100644 --- a/vnext/src-win/Libraries/NativeComponent/ViewConfigIgnore.windows.js +++ b/vnext/src-win/Libraries/NativeComponent/ViewConfigIgnore.windows.js @@ -34,7 +34,7 @@ export function DynamicallyInjectedByGestureHandler( * TODO(T110872225): Remove this logic, after achieving platform-consistency */ export function ConditionallyIgnoredEventHandlers< - const T extends {+[name: string]: true}, + const T extends {readonly [name: string]: true}, >(value: T): T | void { return value; } diff --git a/vnext/src-win/Libraries/Text/Text.windows.js b/vnext/src-win/Libraries/Text/Text.windows.js index a431fe9e7ed..778ff3edaaf 100644 --- a/vnext/src-win/Libraries/Text/Text.windows.js +++ b/vnext/src-win/Libraries/Text/Text.windows.js @@ -8,6 +8,7 @@ * @format */ +import type {HostInstance} from '../../src/private/types/HostInstance'; import type {TextStyleProp} from '../StyleSheet/StyleSheet'; import type {____TextStyle_Internal as TextStyleInternal} from '../StyleSheet/StyleSheetTypes'; import type {GestureResponderEvent} from '../Types/CoreEventTypes'; @@ -30,22 +31,20 @@ import { import * as React from 'react'; import {useContext, useMemo, useState} from 'react'; +export type TextInstance = HostInstance; + export type {TextProps} from './TextProps'; const View = require('../Components/View/View').default; // [Windows] import {type ViewStyleProp} from '../StyleSheet/StyleSheet'; // [Windows] -type TextForwardRef = React.ElementRef< - typeof NativeText | typeof NativeVirtualText | typeof NativeSelectableText, ->; - /** * Text is the fundamental component for displaying text. * * @see https://reactnative.dev/docs/text */ const TextImpl: component( - ref?: React.RefSetter, + ref?: React.RefSetter, ...props: TextProps ) = ({ ref: forwardedRef, @@ -96,7 +95,7 @@ const TextImpl: component( style, ...restProps }: { - ref?: React.RefSetter, + ref?: React.RefSetter, ...TextProps, }) => { const processedProps = restProps as { @@ -528,7 +527,7 @@ function useTextPressability({ * expensive pressability logic to be only initialized when needed. */ component PressableVirtualText( - ref?: React.RefSetter, + ref?: React.RefSetter, textProps: NativeTextProps, textPressabilityProps: TextPressabilityProps, ) { @@ -554,7 +553,7 @@ component PressableVirtualText( * expensive pressability logic to be only initialized when needed. */ component PressableText( - ref?: React.RefSetter, + ref?: React.RefSetter, selectable?: ?boolean, textProps: NativeTextProps, textPressabilityProps: TextPressabilityProps, diff --git a/vnext/src-win/Libraries/Text/TextProps.windows.js b/vnext/src-win/Libraries/Text/TextProps.windows.js index 47b6007aa13..eb079eef002 100644 --- a/vnext/src-win/Libraries/Text/TextProps.windows.js +++ b/vnext/src-win/Libraries/Text/TextProps.windows.js @@ -126,6 +126,13 @@ type TextBaseProps = Readonly<{ accessibilityLevel?: ?number, // Windows accessibilityPosInSet?: ?number, // Windows accessibilitySetSize?: ?number, // Windows + /** + * Controls whether the `Text` can be the target of touch events. + * + * See https://reactnative.dev/docs/view#pointerevents + */ + pointerEvents?: ?('auto' | 'box-none' | 'box-only' | 'none'), + /** * Whether fonts should scale to respect Text Size accessibility settings. * The default is `true`. diff --git a/vnext/src-win/Libraries/Types/CoreEventTypes.windows.js b/vnext/src-win/Libraries/Types/CoreEventTypes.windows.js index cab86771af9..15349100c73 100644 --- a/vnext/src-win/Libraries/Types/CoreEventTypes.windows.js +++ b/vnext/src-win/Libraries/Types/CoreEventTypes.windows.js @@ -10,7 +10,7 @@ import type {HostInstance} from '../../src/private/types/HostInstance'; -export type NativeSyntheticEvent<+T> = Readonly<{ +export type NativeSyntheticEvent = Readonly<{ bubbles: ?boolean, cancelable: ?boolean, currentTarget: number | HostInstance, @@ -89,7 +89,7 @@ export interface NativeUIEvent { /** * Returns a long with details about the event, depending on the event type. */ - +detail: number; + readonly detail: number; } /** @@ -99,81 +99,81 @@ export interface NativeMouseEvent extends NativeUIEvent { /** * The X coordinate of the mouse pointer in global (screen) coordinates. */ - +screenX: number; + readonly screenX: number; /** * The Y coordinate of the mouse pointer in global (screen) coordinates. */ - +screenY: number; + readonly screenY: number; /** * The X coordinate of the mouse pointer relative to the whole document. */ - +pageX: number; + readonly pageX: number; /** * The Y coordinate of the mouse pointer relative to the whole document. */ - +pageY: number; + readonly pageY: number; /** * The X coordinate of the mouse pointer in local (DOM content) coordinates. */ - +clientX: number; + readonly clientX: number; /** * The Y coordinate of the mouse pointer in local (DOM content) coordinates. */ - +clientY: number; + readonly clientY: number; /** * Alias for NativeMouseEvent.clientX */ - +x: number; + readonly x: number; /** * Alias for NativeMouseEvent.clientY */ - +y: number; + readonly y: number; /** * Returns true if the control key was down when the mouse event was fired. */ - +ctrlKey: boolean; + readonly ctrlKey: boolean; /** * Returns true if the shift key was down when the mouse event was fired. */ - +shiftKey: boolean; + readonly shiftKey: boolean; /** * Returns true if the alt key was down when the mouse event was fired. */ - +altKey: boolean; + readonly altKey: boolean; /** * Returns true if the meta key was down when the mouse event was fired. */ - +metaKey: boolean; + readonly metaKey: boolean; /** * The button number that was pressed (if applicable) when the mouse event was fired. */ - +button: number; + readonly button: number; /** * The buttons being depressed (if any) when the mouse event was fired. */ - +buttons: number; + readonly buttons: number; /** * The secondary target for the event, if there is one. */ - +relatedTarget: null | number | HostInstance; + readonly relatedTarget: null | number | HostInstance; // offset is proposed: https://drafts.csswg.org/cssom-view/#extensions-to-the-mouseevent-interface /** * The X coordinate of the mouse pointer between that event and the padding edge of the target node */ - +offsetX: number; + readonly offsetX: number; /** * The Y coordinate of the mouse pointer between that event and the padding edge of the target node */ - +offsetY: number; + readonly offsetY: number; // [Windows - +isLeftButton: boolean; - +isRightButton: boolean; - +isMiddleButton: boolean; - +isBarrelButtonPressed: boolean; - +isHorizontalScrollWheel: boolean; - +isEraser: boolean; - +target: ?number; + readonly isLeftButton: boolean; + readonly isRightButton: boolean; + readonly isMiddleButton: boolean; + readonly isBarrelButtonPressed: boolean; + readonly isHorizontalScrollWheel: boolean; + readonly isEraser: boolean; + readonly target: ?number; // Windows] } @@ -184,48 +184,48 @@ export interface NativePointerEvent extends NativeMouseEvent { /** * A unique identifier for the pointer causing the event. */ - +pointerId: number; + readonly pointerId: number; /** * The width (magnitude on the X axis), in CSS pixels, of the contact geometry of the pointer */ - +width: number; + readonly width: number; /** * The height (magnitude on the Y axis), in CSS pixels, of the contact geometry of the pointer. */ - +height: number; + readonly height: number; /** * The normalized pressure of the pointer input in the range 0 to 1, where 0 and 1 represent * the minimum and maximum pressure the hardware is capable of detecting, respectively. */ - +pressure: number; + readonly pressure: number; /** * The normalized tangential pressure of the pointer input (also known as barrel pressure or * cylinder stress) in the range -1 to 1, where 0 is the neutral position of the control. */ - +tangentialPressure: number; + readonly tangentialPressure: number; /** * The plane angle (in degrees, in the range of -90 to 90) between the Y–Z plane and the plane * containing both the pointer (e.g. pen stylus) axis and the Y axis. */ - +tiltX: number; + readonly tiltX: number; /** * The plane angle (in degrees, in the range of -90 to 90) between the X–Z plane and the plane * containing both the pointer (e.g. pen stylus) axis and the X axis. */ - +tiltY: number; + readonly tiltY: number; /** * The clockwise rotation of the pointer (e.g. pen stylus) around its major axis in degrees, * with a value in the range 0 to 359. */ - +twist: number; + readonly twist: number; /** * Indicates the device type that caused the event (mouse, pen, touch, etc.) */ - +pointerType: string; + readonly pointerType: string; /** * Indicates if the pointer represents the primary pointer of this pointer type. */ - +isPrimary: boolean; + readonly isPrimary: boolean; } export type PointerEvent = NativeSyntheticEvent; diff --git a/vnext/src-win/Libraries/Utilities/BackHandler.windows.js b/vnext/src-win/Libraries/Utilities/BackHandler.windows.js index d29e71fa07b..c47b0f6a22b 100644 --- a/vnext/src-win/Libraries/Utilities/BackHandler.windows.js +++ b/vnext/src-win/Libraries/Utilities/BackHandler.windows.js @@ -63,8 +63,8 @@ RCTDeviceEventEmitter.addListener(DEVICE_BACK_EVENT, function (nativeEvent) { * ``` */ type TBackHandler = { - +exitApp: () => void, - +addEventListener: ( + readonly exitApp: () => void, + readonly addEventListener: ( eventName: BackPressEventName, handler: BackPressHandler, ) => {remove: () => void, ...}, diff --git a/vnext/src-win/index.windows.js b/vnext/src-win/index.windows.js index bea80a073c7..819e64a697c 100644 --- a/vnext/src-win/index.windows.js +++ b/vnext/src-win/index.windows.js @@ -257,18 +257,6 @@ module.exports = { get I18nManager() { return require('./Libraries/ReactNative/I18nManager').default; }, - /** - * @deprecated - */ - get InteractionManager() { - warnOnce( - 'interaction-manager-deprecated', - 'InteractionManager has been deprecated and will be removed in a ' + - 'future release. Please refactor long tasks into smaller ones, and ' + - " use 'requestIdleCallback' instead.", - ); - return require('./Libraries/Interaction/InteractionManager').default; - }, get Keyboard() { return require('./Libraries/Components/Keyboard/Keyboard').default; }, @@ -287,10 +275,6 @@ module.exports = { get NativeComponentRegistry() { return require('./Libraries/NativeComponent/NativeComponentRegistry'); }, - get NativeDialogManagerAndroid() { - return require('./Libraries/NativeModules/specs/NativeDialogManagerAndroid') - .default; - }, get NativeEventEmitter() { return require('./Libraries/EventEmitter/NativeEventEmitter').default; }, @@ -430,78 +414,17 @@ module.exports = { if (__DEV__) { /* $FlowFixMe[prop-missing] This is intentional: Flow will error when - * attempting to access AsyncStorage. */ - /* $FlowFixMe[invalid-export] This is intentional: Flow will error when - * attempting to access AsyncStorage. */ - Object.defineProperty(module.exports, 'AsyncStorage', { - configurable: true, - get() { - invariant( - false, - 'AsyncStorage has been removed from react-native core. ' + - "It can now be installed and imported from '@react-native-async-storage/async-storage' instead of 'react-native'. " + - 'See https://github.com/react-native-async-storage/async-storage', - ); - }, - }); - /* $FlowFixMe[prop-missing] This is intentional: Flow will error when - * attempting to access ImagePickerIOS. */ - /* $FlowFixMe[invalid-export] This is intentional: Flow will error when - * attempting to access ImagePickerIOS. */ - Object.defineProperty(module.exports, 'ImagePickerIOS', { - configurable: true, - get() { - invariant( - false, - 'ImagePickerIOS has been removed from React Native. ' + - "Please upgrade to use either 'react-native-image-picker' or 'expo-image-picker'. " + - "If you cannot upgrade to a different library, please install the deprecated '@react-native-community/image-picker-ios' package. " + - 'See https://github.com/rnc-archive/react-native-image-picker-ios', - ); - }, - }); - /* $FlowFixMe[prop-missing] This is intentional: Flow will error when - * attempting to access ProgressViewIOS. */ - /* $FlowFixMe[invalid-export] This is intentional: Flow will error when - * attempting to access ProgressViewIOS. */ - Object.defineProperty(module.exports, 'ProgressViewIOS', { - configurable: true, - get() { - invariant( - false, - 'ProgressViewIOS has been removed from react-native core. ' + - "It can now be installed and imported from '@react-native-community/progress-view' instead of 'react-native'. " + - 'See https://github.com/react-native-progress-view/progress-view', - ); - }, - }); - /* $FlowFixMe[prop-missing] This is intentional: Flow will error when - * attempting to access DatePickerIOS. */ - /* $FlowFixMe[invalid-export] This is intentional: Flow will error when - * attempting to access DatePickerIOS. */ - Object.defineProperty(module.exports, 'DatePickerIOS', { - configurable: true, - get() { - invariant( - false, - 'DatePickerIOS has been removed from react-native core. ' + - "It can now be installed and imported from '@react-native-community/datetimepicker' instead of 'react-native'. " + - 'See https://github.com/react-native-datetimepicker/datetimepicker', - ); - }, - }); - /* $FlowFixMe[prop-missing] This is intentional: Flow will error when - * attempting to access Slider. */ + * attempting to access InteractionManager. */ /* $FlowFixMe[invalid-export] This is intentional: Flow will error when - * attempting to access Slider. */ - Object.defineProperty(module.exports, 'Slider', { + * attempting to access InteractionManager. */ + Object.defineProperty(module.exports, 'InteractionManager', { configurable: true, get() { invariant( false, - 'Slider has been removed from react-native core. ' + - "It can now be installed and imported from '@react-native-community/slider' instead of 'react-native'. " + - 'See https://github.com/callstack/react-native-slider', + 'InteractionManager has been removed from react-native core. ' + + 'Please refactor long tasks into smaller ones, and use ' + + "'requestIdleCallback' instead.", ); }, }); diff --git a/vnext/src-win/index.windows.js.flow b/vnext/src-win/index.windows.js.flow index f63808483ef..3105b8fde5d 100644 --- a/vnext/src-win/index.windows.js.flow +++ b/vnext/src-win/index.windows.js.flow @@ -22,21 +22,26 @@ // #region Components -export type {ActivityIndicatorProps} from './Libraries/Components/ActivityIndicator/ActivityIndicator'; +export type { + ActivityIndicatorInstance, + ActivityIndicatorProps, +} from './Libraries/Components/ActivityIndicator/ActivityIndicator'; export {default as ActivityIndicator} from './Libraries/Components/ActivityIndicator/ActivityIndicator'; -export type {ButtonProps} from './Libraries/Components/Button'; +export type {ButtonInstance, ButtonProps} from './Libraries/Components/Button'; export {default as Button} from './Libraries/Components/Button'; export type { + DrawerLayoutAndroidInstance, DrawerLayoutAndroidProps, DrawerSlideEvent, -} from './Libraries/Components/DrawerAndroid/DrawerLayoutAndroid'; +} from './Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes'; export {default as DrawerLayoutAndroid} from './Libraries/Components/DrawerAndroid/DrawerLayoutAndroid'; -export type {FlatListProps} from './Libraries/Lists/FlatList'; +export type {FlatListInstance, FlatListProps} from './Libraries/Lists/FlatList'; export {default as FlatList} from './Libraries/Lists/FlatList'; +export type {ImageInstance} from './Libraries/Image/ImageTypes.flow'; export type { ImageBackgroundProps, ImageErrorEvent, @@ -56,12 +61,16 @@ export type { ImageURISource, } from './Libraries/Image/ImageSource'; export {default as Image} from './Libraries/Image/Image'; +export type {ImageBackgroundInstance} from './Libraries/Image/ImageBackground'; export {default as ImageBackground} from './Libraries/Image/ImageBackground'; export type {InputAccessoryViewProps} from './Libraries/Components/TextInput/InputAccessoryView'; export {default as InputAccessoryView} from './Libraries/Components/TextInput/InputAccessoryView'; -export type {KeyboardAvoidingViewProps} from './Libraries/Components/Keyboard/KeyboardAvoidingView'; +export type { + KeyboardAvoidingViewInstance, + KeyboardAvoidingViewProps, +} from './Libraries/Components/Keyboard/KeyboardAvoidingView'; export {default as KeyboardAvoidingView} from './Libraries/Components/Keyboard/KeyboardAvoidingView'; export type {LayoutConformanceProps} from './Libraries/Components/LayoutConformance/LayoutConformance'; @@ -69,6 +78,7 @@ export {default as experimental_LayoutConformance} from './Libraries/Components/ export type { ModalBaseProps, + ModalInstance, ModalProps, ModalPropsAndroid, ModalPropsIOS, @@ -77,25 +87,32 @@ export {default as Modal} from './Libraries/Modal/Modal'; export type { PressableAndroidRippleConfig, + PressableInstance, PressableProps, PressableStateCallbackType, } from './Libraries/Components/Pressable/Pressable'; export {default as Pressable} from './Libraries/Components/Pressable/Pressable'; -export type {ProgressBarAndroidProps} from './Libraries/Components/ProgressBarAndroid/ProgressBarAndroid'; +export type { + ProgressBarAndroidInstance, + ProgressBarAndroidProps, +} from './Libraries/Components/ProgressBarAndroid/ProgressBarAndroid'; export {default as ProgressBarAndroid} from './Libraries/Components/ProgressBarAndroid/ProgressBarAndroid'; export type { + RefreshControlInstance, RefreshControlProps, RefreshControlPropsAndroid, RefreshControlPropsIOS, } from './Libraries/Components/RefreshControl/RefreshControl'; export {default as RefreshControl} from './Libraries/Components/RefreshControl/RefreshControl'; +export type {SafeAreaViewInstance} from './Libraries/Components/SafeAreaView/SafeAreaView'; export {default as SafeAreaView} from './Libraries/Components/SafeAreaView/SafeAreaView'; export type { ScrollViewImperativeMethods, + ScrollViewInstance, ScrollViewScrollToOptions, ScrollResponderType, ScrollViewProps, @@ -105,6 +122,7 @@ export type { export {default as ScrollView} from './Libraries/Components/ScrollView/ScrollView'; export type { + SectionListInstance, SectionListProps, SectionListRenderItem, SectionListRenderItemInfo, @@ -114,6 +132,7 @@ export {default as SectionList} from './Libraries/Lists/SectionList'; export type { StatusBarAnimation, + StatusBarInstance, StatusBarProps, StatusBarStyle, } from './Libraries/Components/StatusBar/StatusBar'; @@ -121,11 +140,12 @@ export {default as StatusBar} from './Libraries/Components/StatusBar/StatusBar'; export type { SwitchChangeEvent, + SwitchInstance, SwitchProps, } from './Libraries/Components/Switch/Switch'; export {default as Switch} from './Libraries/Components/Switch/Switch'; -export type {TextProps} from './Libraries/Text/Text'; +export type {TextInstance, TextProps} from './Libraries/Text/Text'; export {default as Text} from './Libraries/Text/Text'; export type {NativeTextProps as unstable_NativeTextProps} from './Libraries/Text/TextNativeComponent'; export {NativeText as unstable_NativeText} from './Libraries/Text/TextNativeComponent'; @@ -138,6 +158,7 @@ export type { InputModeOptions, TextContentType, TextInputAndroidProps, + TextInputInstance, TextInputIOSProps, TextInputProps, TextInputChangeEvent, @@ -154,13 +175,22 @@ export {default as TextInput} from './Libraries/Components/TextInput/TextInput'; export {default as Touchable} from './Libraries/Components/Touchable/Touchable'; -export type {TouchableHighlightProps} from './Libraries/Components/Touchable/TouchableHighlight'; +export type { + TouchableHighlightInstance, + TouchableHighlightProps, +} from './Libraries/Components/Touchable/TouchableHighlight'; export {default as TouchableHighlight} from './Libraries/Components/Touchable/TouchableHighlight'; -export type {TouchableNativeFeedbackProps} from './Libraries/Components/Touchable/TouchableNativeFeedback'; +export type { + TouchableNativeFeedbackInstance, + TouchableNativeFeedbackProps, +} from './Libraries/Components/Touchable/TouchableNativeFeedback'; export {default as TouchableNativeFeedback} from './Libraries/Components/Touchable/TouchableNativeFeedback'; -export type {TouchableOpacityProps} from './Libraries/Components/Touchable/TouchableOpacity'; +export type { + TouchableOpacityInstance, + TouchableOpacityProps, +} from './Libraries/Components/Touchable/TouchableOpacity'; export {default as TouchableOpacity} from './Libraries/Components/Touchable/TouchableOpacity'; export type {TouchableWithoutFeedbackProps} from './Libraries/Components/Touchable/TouchableWithoutFeedback'; @@ -181,6 +211,7 @@ export type { ViewPropsAndroid, ViewPropsIOS, } from './Libraries/Components/View/ViewPropTypes'; +export type {ViewInstance} from './Libraries/Components/View/View'; export {default as View} from './Libraries/Components/View/View'; export {default as unstable_NativeView} from './Libraries/Components/View/ViewNativeComponent'; @@ -191,6 +222,7 @@ export type { Separators, VirtualizedListProps, } from './Libraries/Lists/VirtualizedList'; +export type {VirtualizedListInstance} from './Libraries/Lists/VirtualizedList'; export {default as VirtualizedList} from './Libraries/Lists/VirtualizedList'; export type { @@ -198,6 +230,7 @@ export type { SectionBase, VirtualizedSectionListProps, } from './Libraries/Lists/VirtualizedSectionList'; +export type {VirtualizedSectionListInstance} from './Libraries/Lists/VirtualizedSectionList'; export {default as VirtualizedSectionList} from './Libraries/Lists/VirtualizedSectionList'; // #endregion @@ -277,13 +310,6 @@ export {findNodeHandle} from './Libraries/ReactNative/RendererProxy'; export {default as I18nManager} from './Libraries/ReactNative/I18nManager'; -export type { - Handle, - PromiseTask, - SimpleTask, -} from './Libraries/Interaction/InteractionManager'; -export {default as InteractionManager} from './Libraries/Interaction/InteractionManager'; - export type { AndroidKeyboardEvent, IOSKeyboardEvent, @@ -317,8 +343,6 @@ export {default as NativeAppEventEmitter} from './Libraries/EventEmitter/RCTNati export * as NativeComponentRegistry from './Libraries/NativeComponent/NativeComponentRegistry'; -export {default as NativeDialogManagerAndroid} from './Libraries/NativeModules/specs/NativeDialogManagerAndroid'; - export type { EmitterSubscription, NativeEventSubscription, @@ -455,8 +479,6 @@ export type * from './Libraries/Types/CodegenTypesNamespace'; export type { HostInstance, - NativeMethods, - NativeMethodsMixin, MeasureInWindowOnSuccessCallback, MeasureLayoutOnSuccessCallback, MeasureOnSuccessCallback, diff --git a/vnext/src-win/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js b/vnext/src-win/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js index d7593ef7fd4..ecb37837f57 100644 --- a/vnext/src-win/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js +++ b/vnext/src-win/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js @@ -48,7 +48,10 @@ type SwitchNativeProps = Readonly<{ type ComponentType = HostComponent; interface NativeCommands { - +setValue: (viewRef: React.ElementRef, value: boolean) => void; + readonly setValue: ( + viewRef: React.ElementRef, + value: boolean, + ) => void; } export const Commands: NativeCommands = codegenNativeCommands({ diff --git a/vnext/src-win/src/private/specs_DEPRECATED/modules/NativeDialogManagerWindows.js b/vnext/src-win/src/private/specs_DEPRECATED/modules/NativeDialogManagerWindows.js index 69d7b19b68a..de7b90c0b81 100644 --- a/vnext/src-win/src/private/specs_DEPRECATED/modules/NativeDialogManagerWindows.js +++ b/vnext/src-win/src/private/specs_DEPRECATED/modules/NativeDialogManagerWindows.js @@ -34,14 +34,14 @@ export type DialogOptions = { }; export interface Spec extends TurboModule { - +getConstants: () => { - +buttonClicked: DialogAction, - +dismissed: DialogAction, - +buttonPositive: DialogButtonKey, - +buttonNegative: DialogButtonKey, - +buttonNeutral: DialogButtonKey, + readonly getConstants: () => { + readonly buttonClicked: DialogAction, + readonly dismissed: DialogAction, + readonly buttonPositive: DialogButtonKey, + readonly buttonNegative: DialogButtonKey, + readonly buttonNeutral: DialogButtonKey, }; - +showAlert: ( + readonly showAlert: ( config: DialogOptions, onError: (error: string) => void, onAction: (action: DialogAction, buttonKey?: DialogButtonKey) => void, diff --git a/vnext/src-win/src/private/specs_DEPRECATED/modules/NativePlatformConstantsWindows.js b/vnext/src-win/src/private/specs_DEPRECATED/modules/NativePlatformConstantsWindows.js index 3f559decf4e..c7222289e6d 100644 --- a/vnext/src-win/src/private/specs_DEPRECATED/modules/NativePlatformConstantsWindows.js +++ b/vnext/src-win/src/private/specs_DEPRECATED/modules/NativePlatformConstantsWindows.js @@ -32,7 +32,7 @@ export type PlatformConstantsWindows = {| |}; export interface Spec extends TurboModule { - +getConstants: () => PlatformConstantsWindows; + readonly getConstants: () => PlatformConstantsWindows; } export default TurboModuleRegistry.getEnforcing( diff --git a/yarn.lock b/yarn.lock index 0b03892572e..b3d29f7415a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3548,7 +3548,7 @@ __metadata: resolution: "@office-iss/react-native-win32-tester@workspace:packages/@office-iss/react-native-win32-tester" dependencies: "@office-iss/react-native-win32": "npm:^0.0.0-canary.312" - "@react-native/tester": "npm:0.87.0-nightly-20260519-58cd1bf58" + "@react-native/tester": "npm:0.87.0-nightly-20260604-63683f091" "@rnw-scripts/babel-react-native-config": "npm:0.0.0" "@rnw-scripts/eslint-config": "npm:1.2.38" "@rnw-scripts/just-task": "npm:2.3.58" @@ -3561,13 +3561,13 @@ __metadata: just-scripts: "npm:^1.3.3" prettier: "npm:^3.6.2" react: "npm:19.2.3" - react-native: "npm:0.87.0-nightly-20260519-58cd1bf58" + react-native: "npm:0.87.0-nightly-20260604-63683f091" react-native-platform-override: "npm:0.0.0-canary.1023" typescript: "npm:5.0.4" peerDependencies: "@office-iss/react-native-win32": ^0.0.0-canary.312 react: 19.2.3 - react-native: 0.87.0-nightly-20260519-58cd1bf58 + react-native: 0.87.0-nightly-20260604-63683f091 languageName: unknown linkType: soft @@ -3584,15 +3584,15 @@ __metadata: "@react-native-community/cli-platform-android": "npm:20.0.0" "@react-native-community/cli-platform-ios": "npm:20.0.0" "@react-native/assets": "npm:1.0.0" - "@react-native/assets-registry": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/codegen": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/community-cli-plugin": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/gradle-plugin": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/jest-preset": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/js-polyfills": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/metro-config": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/normalize-colors": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/virtualized-lists": "npm:0.87.0-nightly-20260519-58cd1bf58" + "@react-native/assets-registry": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/codegen": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/community-cli-plugin": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/gradle-plugin": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/jest-preset": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/js-polyfills": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/metro-config": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/normalize-colors": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/virtualized-lists": "npm:0.87.0-nightly-20260604-63683f091" "@rnw-scripts/babel-react-native-config": "npm:0.0.0" "@rnw-scripts/eslint-config": "npm:1.2.38" "@rnw-scripts/jest-out-of-tree-snapshot-resolver": "npm:^1.1.42" @@ -3614,10 +3614,10 @@ __metadata: commander: "npm:^12.0.0" eslint: "npm:^8.19.0" event-target-shim: "npm:^5.0.1" - flow-bin: "npm:^0.314.0" + flow-bin: "npm:^0.316.0" flow-enums-runtime: "npm:^0.0.6" glob: "npm:^7.1.1" - hermes-compiler: "npm:250829098.0.13" + hermes-compiler: "npm:250829098.0.14" invariant: "npm:^2.2.4" jest-environment-node: "npm:^29.7.0" jscodeshift: "npm:^0.14.0" @@ -3633,7 +3633,7 @@ __metadata: react: "npm:19.2.3" react-clone-referenced-element: "npm:^1.0.1" react-devtools-core: "npm:^6.1.5" - react-native: "npm:0.87.0-nightly-20260519-58cd1bf58" + react-native: "npm:0.87.0-nightly-20260604-63683f091" react-native-platform-override: "npm:0.0.0-canary.1023" react-refresh: "npm:^0.14.0" regenerator-runtime: "npm:^0.13.2" @@ -3646,10 +3646,10 @@ __metadata: ws: "npm:^7.5.10" yargs: "npm:^17.6.2" peerDependencies: - "@react-native/jest-preset": 0.87.0-nightly-20260519-58cd1bf58 + "@react-native/jest-preset": 0.87.0-nightly-20260604-63683f091 "@types/react": ^19.1.1 react: ^19.2.3 - react-native: 0.87.0-nightly-20260519-58cd1bf58 + react-native: 0.87.0-nightly-20260604-63683f091 languageName: unknown linkType: soft @@ -4008,7 +4008,7 @@ __metadata: minimatch: "npm:^10.0.3" prettier: "npm:^3.6.2" react: "npm:19.2.3" - react-native: "npm:0.87.0-nightly-20260519-58cd1bf58" + react-native: "npm:0.87.0-nightly-20260604-63683f091" react-native-windows: "npm:^0.0.0-canary.1060" typescript: "npm:5.0.4" languageName: unknown @@ -4108,7 +4108,7 @@ __metadata: prettier: "npm:^3.6.2" prompts: "npm:^2.4.1" react: "npm:19.2.3" - react-native: "npm:0.87.0-nightly-20260519-58cd1bf58" + react-native: "npm:0.87.0-nightly-20260604-63683f091" semver: "npm:^7.3.2" shelljs: "npm:^0.8.4" typescript: "npm:5.0.4" @@ -4252,7 +4252,7 @@ __metadata: peerDependencies: jest: ">=29.0.3" react: ">=18.0.0" - react-native: 0.87.0-nightly-20260519-58cd1bf58 + react-native: 0.87.0-nightly-20260604-63683f091 react-test-renderer: ">=18.0.0" peerDependenciesMeta: react-test-renderer: @@ -4300,8 +4300,8 @@ __metadata: resolution: "@react-native-windows/tester@workspace:packages/@react-native-windows/tester" dependencies: "@react-native-picker/picker": "npm:2.11.0" - "@react-native/new-app-screen": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/tester": "npm:0.87.0-nightly-20260519-58cd1bf58" + "@react-native/new-app-screen": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/tester": "npm:0.87.0-nightly-20260604-63683f091" "@rnw-scripts/babel-react-native-config": "npm:0.0.0" "@rnw-scripts/eslint-config": "npm:1.2.38" "@rnw-scripts/just-task": "npm:2.3.58" @@ -4315,14 +4315,14 @@ __metadata: just-scripts: "npm:^1.3.3" prettier: "npm:^3.6.2" react: "npm:19.2.3" - react-native: "npm:0.87.0-nightly-20260519-58cd1bf58" + react-native: "npm:0.87.0-nightly-20260604-63683f091" react-native-platform-override: "npm:0.0.0-canary.1023" react-native-windows: "npm:^0.0.0-canary.1060" typescript: "npm:5.0.4" peerDependencies: "@react-native-picker/picker": 2.11.0 react: 19.2.3 - react-native: 0.87.0-nightly-20260519-58cd1bf58 + react-native: 0.87.0-nightly-20260604-63683f091 react-native-windows: ^0.0.0-canary.1060 react-native-xaml: ^0.0.80 peerDependenciesMeta: @@ -4333,10 +4333,10 @@ __metadata: languageName: unknown linkType: soft -"@react-native/assets-registry@npm:0.87.0-nightly-20260519-58cd1bf58": - version: 0.87.0-nightly-20260519-58cd1bf58 - resolution: "@react-native/assets-registry@npm:0.87.0-nightly-20260519-58cd1bf58::__archiveUrl=https%3A%2F%2Fms-feed-25.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fassets-registry%2F-%2Fassets-registry-0.87.0-nightly-20260519-58cd1bf58.tgz" - checksum: 10c0/f3a3d9e2afa4a1d7db25b03e0a0be897b00d8263b9b38f3b1f71789eedca13d40d580d5d171a907689aff1c20db7ab6f9f988871fe9d8e513b06e26c32a65d72 +"@react-native/assets-registry@npm:0.87.0-nightly-20260604-63683f091": + version: 0.87.0-nightly-20260604-63683f091 + resolution: "@react-native/assets-registry@npm:0.87.0-nightly-20260604-63683f091::__archiveUrl=https%3A%2F%2Fms-feed-25.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fassets-registry%2F-%2Fassets-registry-0.87.0-nightly-20260604-63683f091.tgz" + checksum: 10c0/6f1f0b247a3754ea1f31f222b2c01d2bb3fa8b354af7c66bb790aa947e1df5d27eb9378c38dc3c1271092c51d633c1df026feb635d008e46b1dbf7037850c59d languageName: node linkType: hard @@ -4347,19 +4347,19 @@ __metadata: languageName: node linkType: hard -"@react-native/babel-plugin-codegen@npm:0.87.0-nightly-20260519-58cd1bf58": - version: 0.87.0-nightly-20260519-58cd1bf58 - resolution: "@react-native/babel-plugin-codegen@npm:0.87.0-nightly-20260519-58cd1bf58::__archiveUrl=https%3A%2F%2Fms-feed-25.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fbabel-plugin-codegen%2F-%2Fbabel-plugin-codegen-0.87.0-nightly-20260519-58cd1bf58.tgz" +"@react-native/babel-plugin-codegen@npm:0.87.0-nightly-20260604-63683f091": + version: 0.87.0-nightly-20260604-63683f091 + resolution: "@react-native/babel-plugin-codegen@npm:0.87.0-nightly-20260604-63683f091::__archiveUrl=https%3A%2F%2Fms-feed-25.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fbabel-plugin-codegen%2F-%2Fbabel-plugin-codegen-0.87.0-nightly-20260604-63683f091.tgz" dependencies: "@babel/traverse": "npm:^7.29.0" - "@react-native/codegen": "npm:0.87.0-nightly-20260519-58cd1bf58" - checksum: 10c0/287663204927ca0459b5274e15313ecbe21c40bc3ceaa3c0fad751bf2d053d6f1a8f4edc5f680eae4b0b13cd06402f3c58c67a0d9820127f67b7a38453f8ec62 + "@react-native/codegen": "npm:0.87.0-nightly-20260604-63683f091" + checksum: 10c0/8c49bea3901d24029f26e5abefd4319e7576015d0754e88d3b997141f7a0dad12f489bcec3ee852c702e884b4933a52c9d22e045e70cac639db266383066db2a languageName: node linkType: hard -"@react-native/babel-preset@npm:0.87.0-nightly-20260519-58cd1bf58": - version: 0.87.0-nightly-20260519-58cd1bf58 - resolution: "@react-native/babel-preset@npm:0.87.0-nightly-20260519-58cd1bf58::__archiveUrl=https%3A%2F%2Fms-feed-2.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fbabel-preset%2F-%2Fbabel-preset-0.87.0-nightly-20260519-58cd1bf58.tgz" +"@react-native/babel-preset@npm:0.87.0-nightly-20260604-63683f091": + version: 0.87.0-nightly-20260604-63683f091 + resolution: "@react-native/babel-preset@npm:0.87.0-nightly-20260604-63683f091::__archiveUrl=https%3A%2F%2Fms-feed-2.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fbabel-preset%2F-%2Fbabel-preset-0.87.0-nightly-20260604-63683f091.tgz" dependencies: "@babel/core": "npm:^7.25.2" "@babel/plugin-proposal-export-default-from": "npm:^7.24.7" @@ -4390,19 +4390,19 @@ __metadata: "@babel/plugin-transform-runtime": "npm:^7.24.7" "@babel/plugin-transform-typescript": "npm:^7.25.2" "@babel/plugin-transform-unicode-regex": "npm:^7.24.7" - "@react-native/babel-plugin-codegen": "npm:0.87.0-nightly-20260519-58cd1bf58" + "@react-native/babel-plugin-codegen": "npm:0.87.0-nightly-20260604-63683f091" babel-plugin-syntax-hermes-parser: "npm:0.36.1" babel-plugin-transform-flow-enums: "npm:^0.0.2" react-refresh: "npm:^0.14.0" peerDependencies: "@babel/core": "*" - checksum: 10c0/e075fe3d89ebdeae598b9acc6aedb8fe0e3483ba75bf6cab07fb98bfc852ef5da12c3f2a3fbc69dfd96830803c0675ebb2262fdf28381bc11d960bdb3732152d + checksum: 10c0/9f92e704769dfbb0adebf36840b1be01e45d44e7f68ab6e094af0388c03f54524413eb256bc593078fd16f72fd17e04c0740b6b96d06ee654323a46243cfcf6d languageName: node linkType: hard -"@react-native/codegen@npm:0.87.0-nightly-20260519-58cd1bf58": - version: 0.87.0-nightly-20260519-58cd1bf58 - resolution: "@react-native/codegen@npm:0.87.0-nightly-20260519-58cd1bf58::__archiveUrl=https%3A%2F%2Fms-feed-25.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fcodegen%2F-%2Fcodegen-0.87.0-nightly-20260519-58cd1bf58.tgz" +"@react-native/codegen@npm:0.87.0-nightly-20260604-63683f091": + version: 0.87.0-nightly-20260604-63683f091 + resolution: "@react-native/codegen@npm:0.87.0-nightly-20260604-63683f091::__archiveUrl=https%3A%2F%2Fms-feed-25.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fcodegen%2F-%2Fcodegen-0.87.0-nightly-20260604-63683f091.tgz" dependencies: "@babel/core": "npm:^7.25.2" "@babel/parser": "npm:^7.29.0" @@ -4413,15 +4413,15 @@ __metadata: yargs: "npm:^17.6.2" peerDependencies: "@babel/core": "*" - checksum: 10c0/53c05aeeec2e55ec99fc2dab108a011d45ec5753b56f864436441b1eac7bd26eb4b48b8818c4dc0c71a867c3ef4cdedbdbd39732b8c26fd76c1350dd907b83bf + checksum: 10c0/f7ee94245b3fd78b59e1122a6a0ec57ffdd1220abb6b2554157f7b5e10822e598fcd8f37fcecc3b58cb66de670618c00bc09bf17ba43f7e5883f5a713216931b languageName: node linkType: hard -"@react-native/community-cli-plugin@npm:0.87.0-nightly-20260519-58cd1bf58": - version: 0.87.0-nightly-20260519-58cd1bf58 - resolution: "@react-native/community-cli-plugin@npm:0.87.0-nightly-20260519-58cd1bf58::__archiveUrl=https%3A%2F%2Fms-feed-17.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fcommunity-cli-plugin%2F-%2Fcommunity-cli-plugin-0.87.0-nightly-20260519-58cd1bf58.tgz" +"@react-native/community-cli-plugin@npm:0.87.0-nightly-20260604-63683f091": + version: 0.87.0-nightly-20260604-63683f091 + resolution: "@react-native/community-cli-plugin@npm:0.87.0-nightly-20260604-63683f091::__archiveUrl=https%3A%2F%2Fms-feed-17.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fcommunity-cli-plugin%2F-%2Fcommunity-cli-plugin-0.87.0-nightly-20260604-63683f091.tgz" dependencies: - "@react-native/dev-middleware": "npm:0.87.0-nightly-20260519-58cd1bf58" + "@react-native/dev-middleware": "npm:0.87.0-nightly-20260604-63683f091" debug: "npm:^4.4.0" invariant: "npm:^2.2.4" metro: "npm:^0.84.3" @@ -4430,41 +4430,48 @@ __metadata: semver: "npm:^7.1.3" peerDependencies: "@react-native-community/cli": "*" - "@react-native/metro-config": 0.87.0-nightly-20260519-58cd1bf58 + "@react-native/metro-config": 0.87.0-nightly-20260604-63683f091 peerDependenciesMeta: "@react-native-community/cli": optional: true "@react-native/metro-config": optional: true - checksum: 10c0/1a011c9e1b4bbf3887525a126cd6af30c2978c97047fbbd63330b540fffb28f9bbab6b9aec6d5f6223d35a5c7b49cf0fcc4e4716f8eeb45c935b5ad3e2338f8a + checksum: 10c0/c498add0493de23a81de36e56e72d0a0c9a78ad670898377c68e76a74c99b7315bc23602a2267de1f4001889bed890c9fe7a3d7a18d8c99000b8f4a06ef241fe languageName: node linkType: hard -"@react-native/debugger-frontend@npm:0.87.0-nightly-20260519-58cd1bf58": - version: 0.87.0-nightly-20260519-58cd1bf58 - resolution: "@react-native/debugger-frontend@npm:0.87.0-nightly-20260519-58cd1bf58::__archiveUrl=https%3A%2F%2Fms-feed-25.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fdebugger-frontend%2F-%2Fdebugger-frontend-0.87.0-nightly-20260519-58cd1bf58.tgz" - checksum: 10c0/3428db635b072e8a819e150ab73fb0cb8d9cad72f0249fcf280632e0ef8762a2440f05d906b23ffa6a9c54c5e6a6031b3f134ff12c2aa412bbc3849defd158a4 +"@react-native/core-cli-utils@npm:*": + version: 0.86.3 + resolution: "@react-native/core-cli-utils@npm:0.86.3::__archiveUrl=https%3A%2F%2Fms-feed-25.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fcore-cli-utils%2F-%2Fcore-cli-utils-0.86.3.tgz" + checksum: 10c0/3d1b742e35e4ac15f4b48af16fcbc9738bff183e6700b5a4fd76b07b976b9380e924405aeb4a6c52936feb743f4541cb656269d0d9dc7090c3f6439e01931ecb languageName: node linkType: hard -"@react-native/debugger-shell@npm:0.87.0-nightly-20260519-58cd1bf58": - version: 0.87.0-nightly-20260519-58cd1bf58 - resolution: "@react-native/debugger-shell@npm:0.87.0-nightly-20260519-58cd1bf58::__archiveUrl=https%3A%2F%2Fms-feed-12.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fdebugger-shell%2F-%2Fdebugger-shell-0.87.0-nightly-20260519-58cd1bf58.tgz" +"@react-native/debugger-frontend@npm:0.87.0-nightly-20260604-63683f091": + version: 0.87.0-nightly-20260604-63683f091 + resolution: "@react-native/debugger-frontend@npm:0.87.0-nightly-20260604-63683f091::__archiveUrl=https%3A%2F%2Fms-feed-25.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fdebugger-frontend%2F-%2Fdebugger-frontend-0.87.0-nightly-20260604-63683f091.tgz" + checksum: 10c0/cfa7591226dc583436589ec8cf4874a5fc04c713da7f5800381499474efb3c4978f7ce62c068fd2121ff44c634e13678187a7e63b282613dfd55f66eed1523a0 + languageName: node + linkType: hard + +"@react-native/debugger-shell@npm:0.87.0-nightly-20260604-63683f091": + version: 0.87.0-nightly-20260604-63683f091 + resolution: "@react-native/debugger-shell@npm:0.87.0-nightly-20260604-63683f091::__archiveUrl=https%3A%2F%2Fms-feed-12.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fdebugger-shell%2F-%2Fdebugger-shell-0.87.0-nightly-20260604-63683f091.tgz" dependencies: cross-spawn: "npm:^7.0.6" debug: "npm:^4.4.0" fb-dotslash: "npm:0.5.8" - checksum: 10c0/f6efd55e35e938effcc2f5ae95ec501a8b30c0cc43db9a39d79b8876deae1c1a0024423524520d6416a5e58a690375494c9be91b84af6c2af55581eb29f5ceac + checksum: 10c0/a48a96b5181e32308f83f648a887739db1a7cce04bc1558cb6446fa7e9e324226f96e3ed2f10c5eb05acf30bf2cbf364785f8c4fa535bad2ee8d400e3f735059 languageName: node linkType: hard -"@react-native/dev-middleware@npm:0.87.0-nightly-20260519-58cd1bf58": - version: 0.87.0-nightly-20260519-58cd1bf58 - resolution: "@react-native/dev-middleware@npm:0.87.0-nightly-20260519-58cd1bf58::__archiveUrl=https%3A%2F%2Fms-feed-12.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fdev-middleware%2F-%2Fdev-middleware-0.87.0-nightly-20260519-58cd1bf58.tgz" +"@react-native/dev-middleware@npm:0.87.0-nightly-20260604-63683f091": + version: 0.87.0-nightly-20260604-63683f091 + resolution: "@react-native/dev-middleware@npm:0.87.0-nightly-20260604-63683f091::__archiveUrl=https%3A%2F%2Fms-feed-12.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fdev-middleware%2F-%2Fdev-middleware-0.87.0-nightly-20260604-63683f091.tgz" dependencies: "@isaacs/ttlcache": "npm:^1.4.1" - "@react-native/debugger-frontend": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/debugger-shell": "npm:0.87.0-nightly-20260519-58cd1bf58" + "@react-native/debugger-frontend": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/debugger-shell": "npm:0.87.0-nightly-20260604-63683f091" chrome-launcher: "npm:^0.15.2" chromium-edge-launcher: "npm:^0.3.0" connect: "npm:^3.6.5" @@ -4474,17 +4481,17 @@ __metadata: open: "npm:^7.0.3" serve-static: "npm:^1.16.2" ws: "npm:^7.5.10" - checksum: 10c0/97ec8073bbea64a0c0d175b5eadfdac79a47181d67f424d30a4774fc46c2509f39c7eed78e6e149e40845e01cf92e4220d475f3f717f6968aa2839802c468b52 + checksum: 10c0/355743d4b8157c603df3d9e53a6322a864ab3a353819b5cd3d67732d2fdd6fbf4feda47587450a14a3331abe9535697f66b480af4a8b60ac7a8862c77952eb09 languageName: node linkType: hard -"@react-native/eslint-config@npm:0.87.0-nightly-20260519-58cd1bf58": - version: 0.87.0-nightly-20260519-58cd1bf58 - resolution: "@react-native/eslint-config@npm:0.87.0-nightly-20260519-58cd1bf58::__archiveUrl=https%3A%2F%2Fms-feed-12.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Feslint-config%2F-%2Feslint-config-0.87.0-nightly-20260519-58cd1bf58.tgz" +"@react-native/eslint-config@npm:0.87.0-nightly-20260604-63683f091": + version: 0.87.0-nightly-20260604-63683f091 + resolution: "@react-native/eslint-config@npm:0.87.0-nightly-20260604-63683f091::__archiveUrl=https%3A%2F%2Fms-feed-12.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Feslint-config%2F-%2Feslint-config-0.87.0-nightly-20260604-63683f091.tgz" dependencies: "@babel/core": "npm:^7.25.2" "@babel/eslint-parser": "npm:^7.25.1" - "@react-native/eslint-plugin": "npm:0.87.0-nightly-20260519-58cd1bf58" + "@react-native/eslint-plugin": "npm:0.87.0-nightly-20260604-63683f091" "@typescript-eslint/eslint-plugin": "npm:^8.59.2" "@typescript-eslint/parser": "npm:^8.59.2" eslint-config-prettier: "npm:^8.5.0" @@ -4497,69 +4504,69 @@ __metadata: peerDependencies: eslint: ^8.0.0 || ^9.0.0 prettier: ">=2" - checksum: 10c0/0d398931f3af283e7ed34b96be2a649342d421b73ee49c72a337c33f63ce6f99ab49ae55fc01ec2aedf4a64975d48cd871f62a36100c2289a2a0b70c94626f33 + checksum: 10c0/d999e162afd3d22975ff68cba5f74155bfa97f32bc83286c438e930332e612b28db7f8f24b648c6676c3641b0624589ec9be64996cfdf312f276ee4bce2327f1 languageName: node linkType: hard -"@react-native/eslint-plugin@npm:0.87.0-nightly-20260519-58cd1bf58": - version: 0.87.0-nightly-20260519-58cd1bf58 - resolution: "@react-native/eslint-plugin@npm:0.87.0-nightly-20260519-58cd1bf58::__archiveUrl=https%3A%2F%2Fms-feed-25.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Feslint-plugin%2F-%2Feslint-plugin-0.87.0-nightly-20260519-58cd1bf58.tgz" - checksum: 10c0/595fbcf910984c0bd8920f27958372205fd36846c3a8960bb02231e383e648e4f48bf876550ff40c5c3791bfbf06e9d58846deb64a4853db8b2b7b86374a5da9 +"@react-native/eslint-plugin@npm:0.87.0-nightly-20260604-63683f091": + version: 0.87.0-nightly-20260604-63683f091 + resolution: "@react-native/eslint-plugin@npm:0.87.0-nightly-20260604-63683f091::__archiveUrl=https%3A%2F%2Fms-feed-25.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Feslint-plugin%2F-%2Feslint-plugin-0.87.0-nightly-20260604-63683f091.tgz" + checksum: 10c0/125ce7ca792574e948ce9d5fe4d70d80bed2cb5ddf2f2dfe46563740d7d2b8f25dd6fb4c267a002907453e2c91d9bd2c0767cd7e0d5118456015fcd7bce40b70 languageName: node linkType: hard -"@react-native/gradle-plugin@npm:0.87.0-nightly-20260519-58cd1bf58": - version: 0.87.0-nightly-20260519-58cd1bf58 - resolution: "@react-native/gradle-plugin@npm:0.87.0-nightly-20260519-58cd1bf58::__archiveUrl=https%3A%2F%2Fms-feed-17.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fgradle-plugin%2F-%2Fgradle-plugin-0.87.0-nightly-20260519-58cd1bf58.tgz" - checksum: 10c0/d77d1626a6281eac9715ede5f36094e5bf8eb005c87d956e276292d48994abd7f82f049139ea30f5c6562c6af2df67865c2b3ce752cd1d71050e95ee27e85b38 +"@react-native/gradle-plugin@npm:0.87.0-nightly-20260604-63683f091": + version: 0.87.0-nightly-20260604-63683f091 + resolution: "@react-native/gradle-plugin@npm:0.87.0-nightly-20260604-63683f091::__archiveUrl=https%3A%2F%2Fms-feed-17.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fgradle-plugin%2F-%2Fgradle-plugin-0.87.0-nightly-20260604-63683f091.tgz" + checksum: 10c0/26ca38debbf84ce4941c37512b575fa9c3a000b65d09e5e2a96aabe5738b5f1deeed56d586948f09ab45e056fdefcefe72ec32a0b0d56a093936d56543934e51 languageName: node linkType: hard -"@react-native/jest-preset@npm:0.87.0-nightly-20260519-58cd1bf58": - version: 0.87.0-nightly-20260519-58cd1bf58 - resolution: "@react-native/jest-preset@npm:0.87.0-nightly-20260519-58cd1bf58::__archiveUrl=https%3A%2F%2Fms-feed-17.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fjest-preset%2F-%2Fjest-preset-0.87.0-nightly-20260519-58cd1bf58.tgz" +"@react-native/jest-preset@npm:0.87.0-nightly-20260604-63683f091": + version: 0.87.0-nightly-20260604-63683f091 + resolution: "@react-native/jest-preset@npm:0.87.0-nightly-20260604-63683f091::__archiveUrl=https%3A%2F%2Fms-feed-17.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fjest-preset%2F-%2Fjest-preset-0.87.0-nightly-20260604-63683f091.tgz" dependencies: "@jest/create-cache-key-function": "npm:^29.7.0" - "@react-native/js-polyfills": "npm:0.87.0-nightly-20260519-58cd1bf58" + "@react-native/js-polyfills": "npm:0.87.0-nightly-20260604-63683f091" babel-jest: "npm:^29.7.0" jest-environment-node: "npm:^29.7.0" regenerator-runtime: "npm:^0.13.2" peerDependencies: react: ^19.2.3 - checksum: 10c0/e6ec9f779ef99a27bee88898bc57d0e36bf60c6da9157562e78ae7a48004da760db99957e56416268f522ae929b5e553a8ee836bc3ed47382d07bc17243569ce + checksum: 10c0/ed176834717a1d10986dc1f3bc5ff8740e91edcfed3be13ccba4a542ecacc488a709a61cef516f1608636c92e8751ad4258d918a542a6f30041d2fa77bc1c665 languageName: node linkType: hard -"@react-native/js-polyfills@npm:0.87.0-nightly-20260519-58cd1bf58": - version: 0.87.0-nightly-20260519-58cd1bf58 - resolution: "@react-native/js-polyfills@npm:0.87.0-nightly-20260519-58cd1bf58::__archiveUrl=https%3A%2F%2Fms-feed-2.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fjs-polyfills%2F-%2Fjs-polyfills-0.87.0-nightly-20260519-58cd1bf58.tgz" - checksum: 10c0/f3c7ee74a22722954a0605c0da054cf7b24f587f605c7bdf8ede8fb9b29524efc853850468d0fc579d0cae3d5f47ccdd8902e45bdcff864ba1f0dec7f92c123a +"@react-native/js-polyfills@npm:0.87.0-nightly-20260604-63683f091": + version: 0.87.0-nightly-20260604-63683f091 + resolution: "@react-native/js-polyfills@npm:0.87.0-nightly-20260604-63683f091::__archiveUrl=https%3A%2F%2Fms-feed-2.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fjs-polyfills%2F-%2Fjs-polyfills-0.87.0-nightly-20260604-63683f091.tgz" + checksum: 10c0/68587119268372a86054e258d91b0775a6c60b688478317e2c25a16b3944c3bf6505d91b1996e343aceefb81459080c9775bf0f7fbc5ab138c448174be99dcb1 languageName: node linkType: hard -"@react-native/metro-babel-transformer@npm:0.87.0-nightly-20260519-58cd1bf58": - version: 0.87.0-nightly-20260519-58cd1bf58 - resolution: "@react-native/metro-babel-transformer@npm:0.87.0-nightly-20260519-58cd1bf58::__archiveUrl=https%3A%2F%2Fms-feed-2.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fmetro-babel-transformer%2F-%2Fmetro-babel-transformer-0.87.0-nightly-20260519-58cd1bf58.tgz" +"@react-native/metro-babel-transformer@npm:0.87.0-nightly-20260604-63683f091": + version: 0.87.0-nightly-20260604-63683f091 + resolution: "@react-native/metro-babel-transformer@npm:0.87.0-nightly-20260604-63683f091::__archiveUrl=https%3A%2F%2Fms-feed-2.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fmetro-babel-transformer%2F-%2Fmetro-babel-transformer-0.87.0-nightly-20260604-63683f091.tgz" dependencies: "@babel/core": "npm:^7.25.2" - "@react-native/babel-preset": "npm:0.87.0-nightly-20260519-58cd1bf58" + "@react-native/babel-preset": "npm:0.87.0-nightly-20260604-63683f091" hermes-parser: "npm:0.36.1" nullthrows: "npm:^1.1.1" peerDependencies: "@babel/core": "*" - checksum: 10c0/03f0288bfe0faedaa656a46f2f5ff16eaa60b35591fc317ffb210d29a8cb880e1ca21ec8cb27f6ec5c604ce2d30055e337a9501b32b99f4bcbfca8581909b287 + checksum: 10c0/0a533a5cc3dc80a95d2d5cac94c687cf7e495bae1c68cd22279f9594f437d11f85d11c5af1ffd3661a90ab037a5d1e32a6aaaf137233dc892ebfa4fc19b609de languageName: node linkType: hard -"@react-native/metro-config@npm:0.87.0-nightly-20260519-58cd1bf58": - version: 0.87.0-nightly-20260519-58cd1bf58 - resolution: "@react-native/metro-config@npm:0.87.0-nightly-20260519-58cd1bf58::__archiveUrl=https%3A%2F%2Fms-feed-12.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fmetro-config%2F-%2Fmetro-config-0.87.0-nightly-20260519-58cd1bf58.tgz" +"@react-native/metro-config@npm:0.87.0-nightly-20260604-63683f091": + version: 0.87.0-nightly-20260604-63683f091 + resolution: "@react-native/metro-config@npm:0.87.0-nightly-20260604-63683f091::__archiveUrl=https%3A%2F%2Fms-feed-12.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fmetro-config%2F-%2Fmetro-config-0.87.0-nightly-20260604-63683f091.tgz" dependencies: - "@react-native/js-polyfills": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/metro-babel-transformer": "npm:0.87.0-nightly-20260519-58cd1bf58" + "@react-native/js-polyfills": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/metro-babel-transformer": "npm:0.87.0-nightly-20260604-63683f091" metro-config: "npm:^0.84.3" metro-runtime: "npm:^0.84.3" - checksum: 10c0/ed64b639fefa5f4be2325bff3ad93cc01acd6cebc59063a843074bbb79dd993ffb7223999f4ba4f68c907d1564da57a437797819e87756edbcc8c2d693a40de5 + checksum: 10c0/0369996444d7fca8306c777ec240105d9d7200341646e6ec11a86684395409f722bc33c0a8eec56bdf73a98383d4d333e0ffa2a764fea5b82327aa50636a1fbe languageName: node linkType: hard @@ -4579,8 +4586,8 @@ __metadata: "@jest/create-cache-key-function": "npm:^29.7.0" "@microsoft/api-extractor": "npm:^7.52.2" "@octokit/rest": "npm:^22.0.0" - "@react-native/metro-babel-transformer": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/metro-config": "npm:0.87.0-nightly-20260519-58cd1bf58" + "@react-native/metro-babel-transformer": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/metro-config": "npm:0.87.0-nightly-20260604-63683f091" "@tsconfig/node22": "npm:22.0.2" "@types/react": "npm:^19.2.3" "@typescript-eslint/parser": "npm:^8.59.2" @@ -4607,7 +4614,7 @@ __metadata: eslint-plugin-relay: "npm:^1.8.3" fb-dotslash: "npm:0.5.8" flow-api-translator: "npm:0.36.1" - flow-bin: "npm:^0.314.0" + flow-bin: "npm:^0.316.0" hermes-eslint: "npm:0.36.1" hermes-transform: "npm:0.36.1" ini: "npm:^5.0.0" @@ -4643,59 +4650,60 @@ __metadata: languageName: unknown linkType: soft -"@react-native/new-app-screen@npm:0.87.0-nightly-20260519-58cd1bf58": - version: 0.87.0-nightly-20260519-58cd1bf58 - resolution: "@react-native/new-app-screen@npm:0.87.0-nightly-20260519-58cd1bf58::__archiveUrl=https%3A%2F%2Fms-feed-17.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fnew-app-screen%2F-%2Fnew-app-screen-0.87.0-nightly-20260519-58cd1bf58.tgz" +"@react-native/new-app-screen@npm:0.87.0-nightly-20260604-63683f091": + version: 0.87.0-nightly-20260604-63683f091 + resolution: "@react-native/new-app-screen@npm:0.87.0-nightly-20260604-63683f091::__archiveUrl=https%3A%2F%2Fms-feed-17.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fnew-app-screen%2F-%2Fnew-app-screen-0.87.0-nightly-20260604-63683f091.tgz" peerDependencies: "@types/react": ^19.1.0 react: "*" - react-native: 0.87.0-nightly-20260519-58cd1bf58 + react-native: 0.87.0-nightly-20260604-63683f091 peerDependenciesMeta: "@types/react": optional: true - checksum: 10c0/9415510e7e9bb1c4731734a6f235f18894cebedcc8ca76e229d951bb62d373d750369d624ca963f8e66e436df5fb8d9ca37d4a3c813377b77e3952440adcbc90 + checksum: 10c0/7c93f829ae45d52e811a7c0788abc6e05c239e128f3582c924287e453666a715886b1f62e0bb0f98e671e3eba75d3501bafafd426b3a99f05dd565e27a3ca638 languageName: node linkType: hard -"@react-native/normalize-colors@npm:0.87.0-nightly-20260519-58cd1bf58": - version: 0.87.0-nightly-20260519-58cd1bf58 - resolution: "@react-native/normalize-colors@npm:0.87.0-nightly-20260519-58cd1bf58::__archiveUrl=https%3A%2F%2Fms-feed-25.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fnormalize-colors%2F-%2Fnormalize-colors-0.87.0-nightly-20260519-58cd1bf58.tgz" - checksum: 10c0/3ccfff96b0fa3383f3b4ba36483f7f043d1ee3e1a1b2898ac347c5e9c8d79f1031314f2591d33cf6d5b5d9287cb08c20a6b1aab6fe5be3541fc17681911c429b +"@react-native/normalize-colors@npm:0.87.0-nightly-20260604-63683f091": + version: 0.87.0-nightly-20260604-63683f091 + resolution: "@react-native/normalize-colors@npm:0.87.0-nightly-20260604-63683f091::__archiveUrl=https%3A%2F%2Fms-feed-25.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fnormalize-colors%2F-%2Fnormalize-colors-0.87.0-nightly-20260604-63683f091.tgz" + checksum: 10c0/21ca8c54e23f24fc9ba7b54415148b877e96a071cbe8610ed74ffe4c3304f4f4849fff311ae6bf65013e3e99194d038d1ccc3bd00b7cc793edc61b8b1020ab6d languageName: node linkType: hard -"@react-native/popup-menu-android@npm:0.87.0-nightly-20260519-58cd1bf58": - version: 0.87.0-nightly-20260519-58cd1bf58 - resolution: "@react-native/popup-menu-android@npm:0.87.0-nightly-20260519-58cd1bf58::__archiveUrl=https%3A%2F%2Fms-feed-2.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fpopup-menu-android%2F-%2Fpopup-menu-android-0.87.0-nightly-20260519-58cd1bf58.tgz" +"@react-native/popup-menu-android@npm:0.87.0-nightly-20260604-63683f091": + version: 0.87.0-nightly-20260604-63683f091 + resolution: "@react-native/popup-menu-android@npm:0.87.0-nightly-20260604-63683f091::__archiveUrl=https%3A%2F%2Fms-feed-2.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fpopup-menu-android%2F-%2Fpopup-menu-android-0.87.0-nightly-20260604-63683f091.tgz" dependencies: nullthrows: "npm:^1.1.1" peerDependencies: "@types/react": ^19.1.0 react: "*" - react-native: 0.87.0-nightly-20260519-58cd1bf58 + react-native: 0.87.0-nightly-20260604-63683f091 peerDependenciesMeta: "@types/react": optional: true - checksum: 10c0/bc8c49bbd75921ade07dabeb4fc452bb429adb4a979902389b333372816a3c74cbca1d597fa94ed159ec88cd064377b915889623cab2ec7f2ea99798e951d2c4 + checksum: 10c0/d2714ba1c627a6f13a4980b774897d370a8ae674514584c85be8eeb2909d0573b8f789063040e01dedead67c7676f72349f9e4366f1d22090f26116225b06548 languageName: node linkType: hard -"@react-native/tester@npm:0.87.0-nightly-20260519-58cd1bf58, @react-native/tester@workspace:packages/@react-native/tester": +"@react-native/tester@npm:0.87.0-nightly-20260604-63683f091, @react-native/tester@workspace:packages/@react-native/tester": version: 0.0.0-use.local resolution: "@react-native/tester@workspace:packages/@react-native/tester" dependencies: "@react-native-community/cli": "npm:20.0.0" "@react-native-community/cli-platform-android": "npm:20.0.0" "@react-native-community/cli-platform-ios": "npm:20.0.0" - "@react-native/new-app-screen": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/popup-menu-android": "npm:0.87.0-nightly-20260519-58cd1bf58" + "@react-native/core-cli-utils": "npm:*" + "@react-native/new-app-screen": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/popup-menu-android": "npm:0.87.0-nightly-20260604-63683f091" commander: "npm:^12.0.0" flow-enums-runtime: "npm:^0.0.6" invariant: "npm:^2.2.4" listr2: "npm:^6.4.1" nullthrows: "npm:^1.1.1" react: "npm:19.2.3" - react-native: "npm:0.87.0-nightly-20260519-58cd1bf58" + react-native: "npm:0.87.0-nightly-20260604-63683f091" rxjs: "npm:@react-native-community/rxjs@6.5.4-custom" peerDependencies: react: 19.2.3 @@ -4703,20 +4711,20 @@ __metadata: languageName: unknown linkType: soft -"@react-native/virtualized-lists@npm:0.87.0-nightly-20260519-58cd1bf58": - version: 0.87.0-nightly-20260519-58cd1bf58 - resolution: "@react-native/virtualized-lists@npm:0.87.0-nightly-20260519-58cd1bf58::__archiveUrl=https%3A%2F%2Fms-feed-17.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fvirtualized-lists%2F-%2Fvirtualized-lists-0.87.0-nightly-20260519-58cd1bf58.tgz" +"@react-native/virtualized-lists@npm:0.87.0-nightly-20260604-63683f091": + version: 0.87.0-nightly-20260604-63683f091 + resolution: "@react-native/virtualized-lists@npm:0.87.0-nightly-20260604-63683f091::__archiveUrl=https%3A%2F%2Fms-feed-17.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2F%40react-native%2Fvirtualized-lists%2F-%2Fvirtualized-lists-0.87.0-nightly-20260604-63683f091.tgz" dependencies: invariant: "npm:^2.2.4" nullthrows: "npm:^1.1.1" peerDependencies: "@types/react": ^19.2.0 react: "*" - react-native: 0.87.0-nightly-20260519-58cd1bf58 + react-native: 0.87.0-nightly-20260604-63683f091 peerDependenciesMeta: "@types/react": optional: true - checksum: 10c0/df630f7e15975488083886af32741809707a00ddeb672f63062d709fe5944fa296d3a86ac1ef2884ee5c1bbf2dfb116db9e8a12cbf24fed1a310163e09e7ee47 + checksum: 10c0/27a57d9a20fb004c5f9635b88a1e47494e61b8455d94fd32ba108ce73cf04a551d0a198199180215aff5a68665da9146bb26bf4f5dd878ac49c29a39e29ba745 languageName: node linkType: hard @@ -4746,7 +4754,7 @@ __metadata: resolution: "@rnw-scripts/babel-react-native-config@workspace:packages/@rnw-scripts/babel-react-native-config" dependencies: "@babel/core": "npm:^7.25.2" - "@react-native/babel-preset": "npm:0.87.0-nightly-20260519-58cd1bf58" + "@react-native/babel-preset": "npm:0.87.0-nightly-20260604-63683f091" babel-plugin-transform-flow-enums: "npm:^0.0.2" eslint: "npm:^8.19.0" prettier: "npm:^3.6.2" @@ -4884,8 +4892,8 @@ __metadata: "@react-native-windows/fs": "npm:^0.0.0-canary.72" "@react-native-windows/perf-testing": "npm:0.0.0-canary.1039" "@react-native-windows/tester": "npm:0.0.1" - "@react-native/jest-preset": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/metro-config": "npm:0.87.0-nightly-20260519-58cd1bf58" + "@react-native/jest-preset": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/metro-config": "npm:0.87.0-nightly-20260604-63683f091" "@rnw-scripts/babel-node-config": "npm:2.3.3" "@rnw-scripts/babel-react-native-config": "npm:0.0.0" "@rnw-scripts/eslint-config": "npm:1.2.38" @@ -4906,7 +4914,7 @@ __metadata: jest-image-snapshot: "npm:^6.5.2" prettier: "npm:^3.6.2" react: "npm:^19.2.3" - react-native: "npm:0.87.0-nightly-20260519-58cd1bf58" + react-native: "npm:0.87.0-nightly-20260604-63683f091" react-native-windows: "npm:^0.0.0-canary.1060" react-test-renderer: "npm:19.1.0" sanitize-filename: "npm:^1.6.3" @@ -4922,7 +4930,7 @@ __metadata: "@babel/eslint-parser": "npm:^7.25.1" "@jest/globals": "npm:^29.7.0" "@microsoft/eslint-plugin-sdl": "npm:^0.2.0" - "@react-native/eslint-config": "npm:0.87.0-nightly-20260519-58cd1bf58" + "@react-native/eslint-config": "npm:0.87.0-nightly-20260604-63683f091" eslint: "npm:^8.19.0" eslint-config-prettier: "npm:^8.5.0" eslint-plugin-ft-flow: "npm:^2.0.1" @@ -5025,7 +5033,7 @@ __metadata: ora: "npm:^3.4.0" prettier: "npm:^3.6.2" react: "npm:19.2.3" - react-native: "npm:0.87.0-nightly-20260519-58cd1bf58" + react-native: "npm:0.87.0-nightly-20260604-63683f091" react-native-platform-override: "npm:0.0.0-canary.1023" semver: "npm:^7.6.3" source-map-support: "npm:^0.5.19" @@ -5146,7 +5154,7 @@ __metadata: version: 0.0.0-use.local resolution: "@rnw-scripts/metro-dev-config@workspace:packages/@rnw-scripts/metro-dev-config" dependencies: - "@react-native/metro-config": "npm:0.87.0-nightly-20260519-58cd1bf58" + "@react-native/metro-config": "npm:0.87.0-nightly-20260604-63683f091" "@rnw-scripts/eslint-config": "npm:1.2.38" "@rnw-scripts/just-task": "npm:2.3.58" "@rnx-kit/metro-config": "npm:^2.2.3" @@ -5157,7 +5165,7 @@ __metadata: eslint: "npm:^8.19.0" prettier: "npm:^3.6.2" react: "npm:19.2.3" - react-native: "npm:0.87.0-nightly-20260519-58cd1bf58" + react-native: "npm:0.87.0-nightly-20260604-63683f091" typescript: "npm:5.0.4" peerDependencies: react: 19.2.3 @@ -5174,8 +5182,8 @@ __metadata: "@react-native-community/cli": "npm:20.0.0" "@react-native-picker/picker": "npm:2.11.0" "@react-native-windows/tester": "npm:0.0.1" - "@react-native/jest-preset": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/metro-config": "npm:0.87.0-nightly-20260519-58cd1bf58" + "@react-native/jest-preset": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/metro-config": "npm:0.87.0-nightly-20260604-63683f091" "@rnw-scripts/babel-react-native-config": "npm:0.0.0" "@rnw-scripts/eslint-config": "npm:1.2.38" "@rnw-scripts/just-task": "npm:2.3.58" @@ -5191,7 +5199,7 @@ __metadata: just-scripts: "npm:^1.3.3" prettier: "npm:^3.6.2" react: "npm:^19.2.3" - react-native: "npm:0.87.0-nightly-20260519-58cd1bf58" + react-native: "npm:0.87.0-nightly-20260604-63683f091" react-native-windows: "npm:^0.0.0-canary.1060" react-test-renderer: "npm:19.1.0" typescript: "npm:5.0.4" @@ -5270,7 +5278,7 @@ __metadata: prettier: "npm:^3.6.2" prettier-plugin-hermes-parser: "npm:0.21.1" react: "npm:19.2.3" - react-native: "npm:0.87.0-nightly-20260519-58cd1bf58" + react-native: "npm:0.87.0-nightly-20260604-63683f091" react-native-platform-override: "workspace:*" typescript: "npm:5.0.4" languageName: unknown @@ -5287,9 +5295,9 @@ __metadata: "@babel/runtime": "npm:^7.20.0" "@jest/globals": "npm:^29.7.0" "@react-native-community/cli": "npm:20.0.0" - "@react-native/jest-preset": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/metro-config": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/new-app-screen": "npm:0.87.0-nightly-20260519-58cd1bf58" + "@react-native/jest-preset": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/metro-config": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/new-app-screen": "npm:0.87.0-nightly-20260604-63683f091" "@rnw-scripts/babel-node-config": "npm:2.3.3" "@rnw-scripts/babel-react-native-config": "npm:0.0.0" "@rnw-scripts/eslint-config": "npm:1.2.38" @@ -5307,7 +5315,7 @@ __metadata: just-scripts: "npm:^1.3.3" prettier: "npm:^3.6.2" react: "npm:^19.2.3" - react-native: "npm:0.87.0-nightly-20260519-58cd1bf58" + react-native: "npm:0.87.0-nightly-20260604-63683f091" react-native-windows: "npm:^0.0.0-canary.1060" react-test-renderer: "npm:19.1.0" typescript: "npm:5.0.4" @@ -5324,8 +5332,8 @@ __metadata: "@babel/preset-typescript": "npm:^7.8.3" "@babel/runtime": "npm:^7.20.0" "@react-native-community/cli": "npm:20.0.0" - "@react-native/jest-preset": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/metro-config": "npm:0.87.0-nightly-20260519-58cd1bf58" + "@react-native/jest-preset": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/metro-config": "npm:0.87.0-nightly-20260604-63683f091" "@rnw-scripts/babel-node-config": "npm:2.3.3" "@rnw-scripts/babel-react-native-config": "npm:0.0.0" "@rnw-scripts/eslint-config": "npm:1.2.38" @@ -5343,7 +5351,7 @@ __metadata: minimatch: "npm:^10.0.3" prettier: "npm:^3.6.2" react: "npm:^19.2.3" - react-native: "npm:0.87.0-nightly-20260519-58cd1bf58" + react-native: "npm:0.87.0-nightly-20260604-63683f091" react-native-windows: "npm:^0.0.0-canary.1060" typescript: "npm:5.0.4" languageName: unknown @@ -10800,12 +10808,12 @@ __metadata: languageName: node linkType: hard -"flow-bin@npm:^0.314.0": - version: 0.314.0 - resolution: "flow-bin@npm:0.314.0::__archiveUrl=https%3A%2F%2Fms-feed-25.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2Fflow-bin%2F-%2Fflow-bin-0.314.0.tgz" +"flow-bin@npm:^0.316.0": + version: 0.316.0 + resolution: "flow-bin@npm:0.316.0::__archiveUrl=https%3A%2F%2Fms-feed-25.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2Fflow-bin%2F-%2Fflow-bin-0.316.0.tgz" bin: flow: cli.js - checksum: 10c0/7050ec0f89fd02af8dda3cd606aeb904c70ddb042615f73b709dfc21b8d1292c592ad8dbbb7d7bb2e617d6058b7fecc42e8cbee8a19fb0fa4aeca4c8e8833bd2 + checksum: 10c0/28428f43e2e654940c748261c59c3cee0b5f97b7f9a3f017c240e1b37ff3d5d7027802283e33b472fbdca1cab6d96592c50c88045f56891b322aa014a6c43be9 languageName: node linkType: hard @@ -11533,10 +11541,10 @@ __metadata: languageName: node linkType: hard -"hermes-compiler@npm:250829098.0.13": - version: 250829098.0.13 - resolution: "hermes-compiler@npm:250829098.0.13::__archiveUrl=https%3A%2F%2Fms-feed-12.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2Fhermes-compiler%2F-%2Fhermes-compiler-250829098.0.13.tgz" - checksum: 10c0/8c56322abf897a25e62f0dce7d66830381fe3698895e553b9e74afb0f9e575a3e9d0dac5e4a7019aa7f303a1e3a3d403877dfa1bdabead9f60c2a08924a2eebe +"hermes-compiler@npm:250829098.0.14": + version: 250829098.0.14 + resolution: "hermes-compiler@npm:250829098.0.14::__archiveUrl=https%3A%2F%2Fms-feed-12.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2Fhermes-compiler%2F-%2Fhermes-compiler-250829098.0.14.tgz" + checksum: 10c0/b9f4024ac7377bebec61b91e1cee8f3909a8ecad0ea786c6b7c3863f8b65bd94f928850b341c82865a9435b8390d33f03e149e9d479c6870b6f5a754d101fde7 languageName: node linkType: hard @@ -16547,7 +16555,7 @@ __metadata: prettier: "npm:^3.6.2" prompts: "npm:^2.4.1" react: "npm:19.2.3" - react-native: "npm:0.87.0-nightly-20260519-58cd1bf58" + react-native: "npm:0.87.0-nightly-20260604-63683f091" semver: "npm:^7.3.2" source-map-support: "npm:^0.5.19" typescript: "npm:5.0.4" @@ -16573,16 +16581,16 @@ __metadata: "@react-native-windows/codegen": "npm:0.0.0-canary.133" "@react-native-windows/find-dotnet-tools": "npm:0.0.0-canary.2" "@react-native/assets": "npm:1.0.0" - "@react-native/assets-registry": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/codegen": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/community-cli-plugin": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/gradle-plugin": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/jest-preset": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/js-polyfills": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/metro-config": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/new-app-screen": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/normalize-colors": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/virtualized-lists": "npm:0.87.0-nightly-20260519-58cd1bf58" + "@react-native/assets-registry": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/codegen": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/community-cli-plugin": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/gradle-plugin": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/jest-preset": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/js-polyfills": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/metro-config": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/new-app-screen": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/normalize-colors": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/virtualized-lists": "npm:0.87.0-nightly-20260604-63683f091" "@rnw-scripts/babel-react-native-config": "npm:0.0.0" "@rnw-scripts/eslint-config": "npm:1.2.38" "@rnw-scripts/jest-out-of-tree-snapshot-resolver": "npm:^1.1.42" @@ -16601,10 +16609,10 @@ __metadata: commander: "npm:^12.0.0" eslint: "npm:^8.19.0" event-target-shim: "npm:^5.0.1" - flow-bin: "npm:^0.314.0" + flow-bin: "npm:^0.316.0" flow-enums-runtime: "npm:^0.0.6" glob: "npm:^7.1.1" - hermes-compiler: "npm:250829098.0.13" + hermes-compiler: "npm:250829098.0.14" invariant: "npm:^2.2.4" jest-environment-node: "npm:^29.7.0" jscodeshift: "npm:^0.14.0" @@ -16619,7 +16627,7 @@ __metadata: promise: "npm:^8.3.0" react: "npm:19.2.3" react-devtools-core: "npm:^6.1.5" - react-native: "npm:0.87.0-nightly-20260519-58cd1bf58" + react-native: "npm:0.87.0-nightly-20260604-63683f091" react-native-platform-override: "npm:0.0.0-canary.1023" react-refresh: "npm:^0.14.0" regenerator-runtime: "npm:^0.13.2" @@ -16633,24 +16641,24 @@ __metadata: ws: "npm:^7.5.10" yargs: "npm:^17.6.2" peerDependencies: - "@react-native/jest-preset": 0.87.0-nightly-20260519-58cd1bf58 + "@react-native/jest-preset": 0.87.0-nightly-20260604-63683f091 "@types/react": ^19.1.1 react: ^19.2.3 - react-native: 0.87.0-nightly-20260519-58cd1bf58 + react-native: 0.87.0-nightly-20260604-63683f091 languageName: unknown linkType: soft -"react-native@npm:0.87.0-nightly-20260519-58cd1bf58": - version: 0.87.0-nightly-20260519-58cd1bf58 - resolution: "react-native@npm:0.87.0-nightly-20260519-58cd1bf58::__archiveUrl=https%3A%2F%2Fms-feed-2.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2Freact-native%2F-%2Freact-native-0.87.0-nightly-20260519-58cd1bf58.tgz" - dependencies: - "@react-native/assets-registry": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/codegen": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/community-cli-plugin": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/gradle-plugin": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/js-polyfills": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/normalize-colors": "npm:0.87.0-nightly-20260519-58cd1bf58" - "@react-native/virtualized-lists": "npm:0.87.0-nightly-20260519-58cd1bf58" +"react-native@npm:0.87.0-nightly-20260604-63683f091": + version: 0.87.0-nightly-20260604-63683f091 + resolution: "react-native@npm:0.87.0-nightly-20260604-63683f091::__archiveUrl=https%3A%2F%2Fms-feed-2.pkgs.visualstudio.com%2F1es-public%2F_packaging%2Fnpm-public%2Fnpm%2Fregistry%2Freact-native%2F-%2Freact-native-0.87.0-nightly-20260604-63683f091.tgz" + dependencies: + "@react-native/assets-registry": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/codegen": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/community-cli-plugin": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/gradle-plugin": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/js-polyfills": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/normalize-colors": "npm:0.87.0-nightly-20260604-63683f091" + "@react-native/virtualized-lists": "npm:0.87.0-nightly-20260604-63683f091" abort-controller: "npm:^3.0.0" anser: "npm:^1.4.9" ansi-regex: "npm:^5.0.0" @@ -16658,7 +16666,7 @@ __metadata: base64-js: "npm:^1.5.1" commander: "npm:^12.0.0" flow-enums-runtime: "npm:^0.0.6" - hermes-compiler: "npm:250829098.0.13" + hermes-compiler: "npm:250829098.0.14" invariant: "npm:^2.2.4" memoize-one: "npm:^5.0.0" metro-runtime: "npm:^0.84.3" @@ -16677,7 +16685,7 @@ __metadata: ws: "npm:^7.5.10" yargs: "npm:^17.6.2" peerDependencies: - "@react-native/jest-preset": 0.87.0-nightly-20260519-58cd1bf58 + "@react-native/jest-preset": 0.87.0-nightly-20260604-63683f091 "@types/react": ^19.1.1 react: ^19.2.3 peerDependenciesMeta: @@ -16687,7 +16695,7 @@ __metadata: optional: true bin: react-native: cli.js - checksum: 10c0/664a73e1533d348713445ee91aa4690b7fa727112b91678460b983295c4758a7bd29926b905b0400bb65c0e5c4282bc78adcd15b1dabc2e0f5ffe70629b193c1 + checksum: 10c0/0e22db4df314bdde8cf20b0761ddf7d7da813d7829b0fc870b97e1d16c07d778b3082306686d6477a3f6be8de483670580242dc93e2087661da92beeb7577bd1 languageName: node linkType: hard