diff --git a/change/@office-iss-react-native-win32-22d20d57-e7e8-41b9-809e-ef8dd1c4efda.json b/change/@office-iss-react-native-win32-22d20d57-e7e8-41b9-809e-ef8dd1c4efda.json new file mode 100644 index 00000000000..34ededc0ff5 --- /dev/null +++ b/change/@office-iss-react-native-win32-22d20d57-e7e8-41b9-809e-ef8dd1c4efda.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Integrate RN Nightly Build 0.79.0-nightly-20250206-fb8a6a5bb", + "packageName": "@office-iss/react-native-win32", + "email": "54227869+anupriya13@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/change/@react-native-windows-automation-channel-45084f4f-ab60-4fb2-b51b-5a79b22bfd57.json b/change/@react-native-windows-automation-channel-45084f4f-ab60-4fb2-b51b-5a79b22bfd57.json new file mode 100644 index 00000000000..c301c481510 --- /dev/null +++ b/change/@react-native-windows-automation-channel-45084f4f-ab60-4fb2-b51b-5a79b22bfd57.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Integrate RN Nightly Build 0.79.0-nightly-20250206-fb8a6a5bb", + "packageName": "@react-native-windows/automation-channel", + "email": "54227869+anupriya13@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/change/@rnw-scripts-eslint-config-c1946ecc-2994-477f-bab0-38fa540123d6.json b/change/@rnw-scripts-eslint-config-c1946ecc-2994-477f-bab0-38fa540123d6.json new file mode 100644 index 00000000000..a36a1d837e5 --- /dev/null +++ b/change/@rnw-scripts-eslint-config-c1946ecc-2994-477f-bab0-38fa540123d6.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Integrate RN Nightly Build 0.79.0-nightly-20250206-fb8a6a5bb", + "packageName": "@rnw-scripts/eslint-config", + "email": "54227869+anupriya13@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/change/react-native-windows-c2e84606-7ced-4d49-b9f4-5b7c3b6885f1.json b/change/react-native-windows-c2e84606-7ced-4d49-b9f4-5b7c3b6885f1.json new file mode 100644 index 00000000000..f3db7b78938 --- /dev/null +++ b/change/react-native-windows-c2e84606-7ced-4d49-b9f4-5b7c3b6885f1.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Integrate RN Nightly Build 0.79.0-nightly-20250206-fb8a6a5bb", + "packageName": "react-native-windows", + "email": "54227869+anupriya13@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/packages/@office-iss/react-native-win32-tester/overrides.json b/packages/@office-iss/react-native-win32-tester/overrides.json index 63299aa5030..915b1207c4a 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.79.0-nightly-20250123-d1028885e", + "baseVersion": "0.79.0-nightly-20250206-fb8a6a5bb", "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 bee05dffcc0..bd919e172e4 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.78.0-main", + "@react-native/tester": "0.79.0-main", "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "flow-enums-runtime": "^0.0.6" @@ -19,7 +19,7 @@ "peerDependencies": { "@office-iss/react-native-win32": "^0.0.0-canary.284", "react": "19.0.0", - "react-native": "0.79.0-nightly-20250123-d1028885e" + "react-native": "0.79.0-nightly-20250206-fb8a6a5bb" }, "devDependencies": { "@office-iss/react-native-win32": "^0.0.0-canary.284", @@ -30,7 +30,7 @@ "@types/node": "^18.0.0", "eslint": "^8.19.0", "just-scripts": "^1.3.3", - "react-native": "0.79.0-nightly-20250123-d1028885e", + "react-native": "0.79.0-nightly-20250206-fb8a6a5bb", "react-native-platform-override": "^1.9.53", "typescript": "5.0.4" }, diff --git a/packages/@office-iss/react-native-win32/overrides.json b/packages/@office-iss/react-native-win32/overrides.json index f9c7eba2567..9a4bc921de8 100644 --- a/packages/@office-iss/react-native-win32/overrides.json +++ b/packages/@office-iss/react-native-win32/overrides.json @@ -7,7 +7,7 @@ "**/__snapshots__/**", "src-win/rntypes/**" ], - "baseVersion": "0.79.0-nightly-20250123-d1028885e", + "baseVersion": "0.79.0-nightly-20250206-fb8a6a5bb", "overrides": [ { "type": "derived", @@ -19,7 +19,7 @@ "type": "derived", "file": "src-win/index.win32.js", "baseFile": "packages/react-native/index.js", - "baseHash": "21f5672451ddb764217c795a6d3d65a5d416a0c5" + "baseHash": "ec48ab28959a5c8978fb3cceccd9a294e5f6dc7e" }, { "type": "platform", @@ -29,7 +29,7 @@ "type": "patch", "file": "src-win/Libraries/Alert/Alert.win32.js", "baseFile": "packages/react-native/Libraries/Alert/Alert.js", - "baseHash": "82ea5ff7a8a7eb79269f0ab136312c6cf8063773" + "baseHash": "5191de27105f056043f07bf83c1db5d0241fbe96" }, { "type": "derived", @@ -54,7 +54,7 @@ "type": "derived", "file": "src-win/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfoWin32.js", "baseFile": "packages/react-native/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfo.js", - "baseHash": "c3b9975c5fe1c91712fe70546c7b06a1e78cea77" + "baseHash": "f6217411d2c787f76461a278fe027e1ac32dd5ac" }, { "type": "derived", @@ -74,7 +74,7 @@ "type": "patch", "file": "src-win/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js", "baseFile": "packages/react-native/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js", - "baseHash": "bb80311bca01d1765424d931ebc328f09c290948", + "baseHash": "8d67db83e2c43a20a5081375eb3fc4f5b8afdea1", "issue": 14290 }, { @@ -92,7 +92,7 @@ "type": "patch", "file": "src-win/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js", "baseFile": "packages/react-native/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js", - "baseHash": "ece82469597901f974f64c49c02870ee9b33565e", + "baseHash": "c785bfee2b2fe3d1ffee7fc38e5669b0b4dfb533", "issue": 0 }, { @@ -109,13 +109,13 @@ "type": "derived", "file": "src-win/Libraries/Components/TextInput/TextInput.win32.js", "baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.js", - "baseHash": "d3033f628b289a6178466984402bb359f20d3c7a" + "baseHash": "103e01e40f864bb4b5749c02ec526c5ec3720c9d" }, { "type": "patch", "file": "src-win/Libraries/Components/TextInput/TextInputState.win32.js", "baseFile": "packages/react-native/Libraries/Components/TextInput/TextInputState.js", - "baseHash": "7a12ca2e17da0a0f487af5a27c120ef59b2ab9ef" + "baseHash": "2826039a29aa7bd68c64032b260317bae836d078" }, { "type": "platform", @@ -125,7 +125,7 @@ "type": "copy", "file": "src-win/Libraries/Components/ToastAndroid/ToastAndroid.win32.js", "baseFile": "packages/react-native/Libraries/Components/ToastAndroid/ToastAndroid.js", - "baseHash": "37f29678da7a4de7bc92cf52796a7e0388e1540a", + "baseHash": "4948464c2ad124338c1ce6ac68b6b2f01af28876", "issue": 4378 }, { @@ -149,7 +149,7 @@ "type": "derived", "file": "src-win/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js", "baseFile": "packages/react-native/Libraries/Components/Touchable/TouchableNativeFeedback.js", - "baseHash": "ee79fc5b491d9dd05bd90eb365324bc16bde1f46" + "baseHash": "5be72257c6d6f421d9eea0c9cc87a32993aa5bec" }, { "type": "platform", @@ -167,13 +167,13 @@ "type": "patch", "file": "src-win/Libraries/Components/View/ReactNativeViewAttributes.win32.js", "baseFile": "packages/react-native/Libraries/Components/View/ReactNativeViewAttributes.js", - "baseHash": "4279b8fc936dbb03599892069fb7e3ceeb86b846" + "baseHash": "096d430d02315c4017c5971daaee5790db6787f6" }, { "type": "patch", "file": "src-win/Libraries/Components/View/View.win32.js", "baseFile": "packages/react-native/Libraries/Components/View/View.js", - "baseHash": "85d97fc0638ce73353898f67d0f891a86ee83f3f" + "baseHash": "0ab4937047f1469a6e8b5095d1112d0c4892af3d" }, { "type": "derived", @@ -214,14 +214,14 @@ "type": "patch", "file": "src-win/Libraries/Core/Devtools/loadBundleFromServer.win32.js", "baseFile": "packages/react-native/Libraries/Core/Devtools/loadBundleFromServer.js", - "baseHash": "14662281c97222b45893308b744a7dc7c2000801", + "baseHash": "e0158fd16d4a787e5a94d69e2b7a721e81b7c3da", "issue": 12704 }, { "type": "patch", "file": "src-win/Libraries/Core/ReactNativeVersionCheck.win32.js", "baseFile": "packages/react-native/Libraries/Core/ReactNativeVersionCheck.js", - "baseHash": "453c4da8036736aefbd950bb7c90603859933f4e", + "baseHash": "b755142f421cc35c549c1d45768779d0910054b7", "issue": 5170 }, { @@ -232,7 +232,7 @@ "type": "derived", "file": "src-win/Libraries/Image/Image.win32.js", "baseFile": "packages/react-native/Libraries/Image/Image.ios.js", - "baseHash": "a5abee6de7dca3cb043b834925de3f6f0443c738", + "baseHash": "c0bc913aa95b6d1309ba44ef7968ba58fc488427", "issue": 4320 }, { @@ -243,7 +243,7 @@ "type": "derived", "file": "src-win/Libraries/Image/NativeImageLoaderWin32.js", "baseFile": "packages/react-native/Libraries/Image/NativeImageLoaderIOS.js", - "baseHash": "a6f98dd6f021e1fbfbcdff29b695d2144fdf6559", + "baseHash": "ea0a243edfa7b35c9558d7d14fd0646e84ea0aa9", "issue": 4320 }, { @@ -282,18 +282,6 @@ "type": "platform", "file": "src-win/Libraries/Image/Tests/img/en-us/dpitest@3x.png" }, - { - "type": "patch", - "file": "src-win/Libraries/Inspector/Inspector.win32.js", - "baseFile": "packages/react-native/Libraries/Inspector/Inspector.js", - "baseHash": "ac6fdd601cb13861598fd8dc17732b066de8e405" - }, - { - "type": "patch", - "file": "src-win/Libraries/Inspector/InspectorOverlay.win32.js", - "baseFile": "packages/react-native/Libraries/Inspector/InspectorOverlay.js", - "baseHash": "8de3989a83192b69872f5bf593e720ff1aab26b7" - }, { "type": "derived", "file": "src-win/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.win32.js", @@ -337,7 +325,7 @@ "type": "copy", "file": "src-win/Libraries/Network/RCTNetworking.win32.js", "baseFile": "packages/react-native/Libraries/Network/RCTNetworking.ios.js", - "baseHash": "9f1622d938405344bc27a2cf61a1c26773518a88", + "baseHash": "cdda150c411ef03de0f52d5dbbd3976d094d136b", "issue": 4318 }, { @@ -390,13 +378,13 @@ "type": "patch", "file": "src-win/Libraries/ReactNative/PaperUIManager.win32.js", "baseFile": "packages/react-native/Libraries/ReactNative/PaperUIManager.js", - "baseHash": "be8b8afbf4964018271c06f35219ec17888bc93b" + "baseHash": "0011b1ecbb845e7d634f8a5c62b1fb902c4606ad" }, { "type": "derived", "file": "src-win/Libraries/Settings/Settings.win32.js", "baseFile": "packages/react-native/Libraries/Settings/Settings.js", - "baseHash": "1aa8e2b8b3c8e1577f617383c3a47fe8499eb031" + "baseHash": "030ad9c005e35cbd2b3bbb2e3c6c6a5b29965b4a" }, { "type": "platform", @@ -414,7 +402,7 @@ "type": "patch", "file": "src-win/Libraries/StyleSheet/StyleSheet.win32.js", "baseFile": "packages/react-native/Libraries/StyleSheet/StyleSheet.js", - "baseHash": "028556b0f8b31b5cfbd4cb98f3203fad957e330a" + "baseHash": "6d0e21e38e081e55ee5148fb146de6a7ee51c6a6" }, { "type": "derived", @@ -426,7 +414,7 @@ "type": "derived", "file": "src-win/Libraries/Text/Text.win32.js", "baseFile": "packages/react-native/Libraries/Text/Text.js", - "baseHash": "64cdf1c520112ead78e348bc306c208f212ac3c5" + "baseHash": "f493b2f8d8fddeec94d1603023ff6c6eb10a1c42" }, { "type": "derived", @@ -445,7 +433,7 @@ "type": "patch", "file": "src-win/Libraries/Types/CoreEventTypes.win32.js", "baseFile": "packages/react-native/Libraries/Types/CoreEventTypes.js", - "baseHash": "284aef610312bc89a1ae19acaad698ed740d142a", + "baseHash": "18dd62b3ecabdb9996549b608d159ba47a817969", "issue": 6240 }, { @@ -479,7 +467,7 @@ "type": "derived", "file": "src-win/Libraries/Utilities/NativePlatformConstantsWin.js", "baseFile": "packages/react-native/Libraries/Utilities/NativePlatformConstantsIOS.js", - "baseHash": "7b9db1bdc43128938d261961e3765c24d17e68b6" + "baseHash": "092016d462d51606f0b9c32b3a8e3da19b0d7586" }, { "type": "derived", @@ -510,24 +498,24 @@ "type": "copy", "file": "src-win/src/private/debugging/ReactDevToolsSettingsManager.win32.js", "baseFile": "packages/react-native/src/private/debugging/ReactDevToolsSettingsManager.android.js", - "baseHash": "df41b76dc3d2df9455fae588748261d7b0a22d01" + "baseHash": "1e0309d141da6c7a6a9afa571aae831ca221bbe2" }, { "type": "derived", - "file": "src-win/src/private/specs/modules/NativeAccessibilityInfoWin32.js", - "baseFile": "packages/react-native/src/private/specs/modules/NativeAccessibilityInfo.js", + "file": "src-win/src/private/specs_DEPRECATED/modules/NativeAccessibilityInfoWin32.js", + "baseFile": "packages/react-native/src/private/specs_DEPRECATED/modules/NativeAccessibilityInfo.js", "baseHash": "82fc086f675dec489e485c3aabaabe1225ef5f36" }, { "type": "derived", - "file": "src-win/src/private/specs/modules/NativeImageLoaderWin32.js", - "baseFile": "packages/react-native/src/private/specs/modules/NativeImageLoaderAndroid.js", + "file": "src-win/src/private/specs_DEPRECATED/modules/NativeImageLoaderWin32.js", + "baseFile": "packages/react-native/src/private/specs_DEPRECATED/modules/NativeImageLoaderAndroid.js", "baseHash": "98c031d5f249af5f8d9198290750825b70827dcc" }, { "type": "derived", - "file": "src-win/src/private/specs/modules/NativePlatformConstantsWin.js", - "baseFile": "packages/react-native/src/private/specs/modules/NativePlatformConstantsAndroid.js", + "file": "src-win/src/private/specs_DEPRECATED/modules/NativePlatformConstantsWin.js", + "baseFile": "packages/react-native/src/private/specs_DEPRECATED/modules/NativePlatformConstantsAndroid.js", "baseHash": "365c5df75b38b129d364af3f6700cb206ce5bd2a" } ] diff --git a/packages/@office-iss/react-native-win32/package.json b/packages/@office-iss/react-native-win32/package.json index 670a55a7ac0..099353c7a93 100644 --- a/packages/@office-iss/react-native-win32/package.json +++ b/packages/@office-iss/react-native-win32/package.json @@ -30,13 +30,13 @@ "@react-native-community/cli-platform-android": "15.0.0-alpha.2", "@react-native-community/cli-platform-ios": "15.0.0-alpha.2", "@react-native/assets": "1.0.0", - "@react-native/assets-registry": "0.79.0-nightly-20250123-d1028885e", - "@react-native/codegen": "0.79.0-nightly-20250123-d1028885e", - "@react-native/community-cli-plugin": "0.79.0-nightly-20250123-d1028885e", - "@react-native/gradle-plugin": "0.79.0-nightly-20250123-d1028885e", - "@react-native/js-polyfills": "0.79.0-nightly-20250123-d1028885e", - "@react-native/normalize-colors": "0.79.0-nightly-20250123-d1028885e", - "@react-native/virtualized-lists": "0.79.0-nightly-20250123-d1028885e", + "@react-native/assets-registry": "0.79.0-nightly-20250206-fb8a6a5bb", + "@react-native/codegen": "0.79.0-nightly-20250206-fb8a6a5bb", + "@react-native/community-cli-plugin": "0.79.0-nightly-20250206-fb8a6a5bb", + "@react-native/gradle-plugin": "0.79.0-nightly-20250206-fb8a6a5bb", + "@react-native/js-polyfills": "0.79.0-nightly-20250206-fb8a6a5bb", + "@react-native/normalize-colors": "0.79.0-nightly-20250206-fb8a6a5bb", + "@react-native/virtualized-lists": "0.79.0-nightly-20250206-fb8a6a5bb", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", @@ -59,7 +59,7 @@ "pretty-format": "^29.7.0", "promise": "^8.3.0", "react-clone-referenced-element": "^1.0.1", - "react-devtools-core": "^6.0.1", + "react-devtools-core": "^6.1.0", "react-refresh": "^0.14.0", "react-shallow-renderer": "^16.15.0", "regenerator-runtime": "^0.13.2", @@ -73,7 +73,7 @@ "devDependencies": { "@babel/core": "^7.25.2", "@babel/eslint-parser": "^7.25.1", - "@react-native/metro-config": "0.79.0-nightly-20250123-d1028885e", + "@react-native/metro-config": "0.79.0-nightly-20250206-fb8a6a5bb", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.34", "@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.38", @@ -89,14 +89,14 @@ "just-scripts": "^1.3.3", "prettier": "2.8.8", "react": "19.0.0", - "react-native": "0.79.0-nightly-20250123-d1028885e", + "react-native": "0.79.0-nightly-20250206-fb8a6a5bb", "react-native-platform-override": "^1.9.53", "typescript": "5.0.4" }, "peerDependencies": { "@types/react": "^19.0.0", "react": "^19.0.0", - "react-native": "0.79.0-nightly-20250123-d1028885e" + "react-native": "0.79.0-nightly-20250206-fb8a6a5bb" }, "beachball": { "defaultNpmTag": "canary", diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Alert/Alert.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Alert/Alert.win32.js index 384bb2b940a..93bf2f4e829 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Alert/Alert.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Alert/Alert.win32.js @@ -8,44 +8,22 @@ * @flow */ +import type {AlertOptions, AlertType, Buttons} from './Alert.flow'; + // [Windows import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry'; // $FlowFixMe[underconstrained-implicit-instantiation] const PLYAlertManager = TurboModuleRegistry.getEnforcing('Alert'); // Windows] -export type AlertType = - | 'default' - | 'plain-text' - | 'secure-text' - | 'login-password'; -export type AlertButtonStyle = 'default' | 'cancel' | 'destructive'; -export type Buttons = Array<{ - text?: string, - onPress?: ?Function, - isPreferred?: boolean, - style?: AlertButtonStyle, - ... -}>; - -type Options = { - cancelable?: ?boolean, - userInterfaceStyle?: 'unspecified' | 'light' | 'dark', - onDismiss?: ?() => void, - ... -}; +export type * from './Alert.flow'; -/** - * Launches an alert dialog with the specified title and message. - * - * See https://reactnative.dev/docs/alert - */ class Alert { static alert( title: ?string, message?: ?string, buttons?: Buttons, - options?: Options, + options?: AlertOptions, ): void { // [Windows PLYAlertManager.showAlert( @@ -83,7 +61,7 @@ class Alert { type?: ?AlertType = 'plain-text', defaultValue?: string, keyboardType?: string, - options?: Options, + options?: AlertOptions, ): void { // [Windows throw new Error( diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfoWin32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfoWin32.js index fdae98b19af..aa25b5faddc 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfoWin32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfoWin32.js @@ -6,6 +6,6 @@ * @flow */ -export * from '../../../src/private/specs/modules/NativeAccessibilityInfoWin32'; -import NativeAccessibilityInfoWin32 from '../../../src/private/specs/modules/NativeAccessibilityInfoWin32'; +export * from '../../../src/private/specs_DEPRECATED/modules/NativeAccessibilityInfoWin32'; +import NativeAccessibilityInfoWin32 from '../../../src/private/specs_DEPRECATED/modules/NativeAccessibilityInfoWin32'; export default NativeAccessibilityInfoWin32; diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js index b877452262b..2d7993a0b23 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js @@ -13,4 +13,5 @@ // $FlowFixMe[cannot-resolve-module] import typeof DrawerLayoutAndroid from './DrawerLayoutAndroid.android'; -export default require('../UnimplementedViews/UnimplementedView') as $FlowFixMe as DrawerLayoutAndroid; +export default require('../UnimplementedViews/UnimplementedView') + .default as $FlowFixMe as DrawerLayoutAndroid; 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 7beded87e1d..eef1bade639 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 @@ -77,13 +77,13 @@ else if (Platform.OS === 'win32') { } // Windows] -export type ChangeEvent = SyntheticEvent< - $ReadOnly<{ - eventCount: number, - target: number, - text: string, - }>, ->; +export type TextInputChangeEventData = $ReadOnly<{ + eventCount: number, + target: number, + text: string, +}>; + +export type TextInputChangeEvent = SyntheticEvent; export type TextInputEvent = SyntheticEvent< $ReadOnly<{ @@ -98,52 +98,56 @@ export type TextInputEvent = SyntheticEvent< }>, >; -export type ContentSizeChangeEvent = SyntheticEvent< - $ReadOnly<{ - target: number, - contentSize: $ReadOnly<{ - width: number, - height: number, - }>, +export type TextInputContentSizeChangeEventData = $ReadOnly<{ + target: number, + contentSize: $ReadOnly<{ + width: number, + height: number, }>, ->; +}>; -type TargetEvent = SyntheticEvent< - $ReadOnly<{ - target: number, - }>, ->; +export type TextInputContentSizeChangeEvent = + SyntheticEvent; + +export type TargetEvent = $ReadOnly<{ + target: number, +}>; + +export type TextInputFocusEventData = TargetEvent; -export type BlurEvent = TargetEvent; -export type FocusEvent = TargetEvent; +export type TextInputBlurEvent = SyntheticEvent; +export type TextInputFocusEvent = SyntheticEvent; type Selection = $ReadOnly<{ start: number, end: number, }>; -export type SelectionChangeEvent = SyntheticEvent< - $ReadOnly<{ - selection: Selection, - target: number, - }>, ->; +export type TextInputSelectionChangeEventData = $ReadOnly<{ + ...TargetEvent, + selection: Selection, +}>; -export type KeyPressEvent = SyntheticEvent< - $ReadOnly<{ - key: string, - target?: ?number, - eventCount?: ?number, - }>, ->; +export type TextInputSelectionChangeEvent = + SyntheticEvent; -export type EditingEvent = SyntheticEvent< - $ReadOnly<{ - eventCount: number, - text: string, - target: number, - }>, ->; +type TextInputKeyPressEventData = $ReadOnly<{ + ...TargetEvent, + key: string, + target?: ?number, + eventCount?: ?number, +}>; + +export type TextInputKeyPressEvent = SyntheticEvent; + +export type TextInputEndEditingEventData = $ReadOnly<{ + ...TargetEvent, + eventCount: number, + text: string, +}>; + +export type TextInputEditingEvent = + SyntheticEvent; type DataDetectorTypesType = | 'phoneNumber' @@ -157,26 +161,31 @@ type DataDetectorTypesType = | 'all'; export type KeyboardType = - // Cross Platform | 'default' | 'email-address' | 'numeric' | 'phone-pad' | 'number-pad' | 'decimal-pad' - | 'url' - // iOS-only + | 'url'; + +export type KeyboardTypeIOS = | 'ascii-capable' | 'numbers-and-punctuation' | 'name-phone-pad' | 'twitter' | 'web-search' // iOS 10+ only - | 'ascii-capable-number-pad' - // Android-only - | 'visible-password'; + | 'ascii-capable-number-pad'; + +export type KeyboardTypeAndroid = 'visible-password'; + +export type KeyboardTypeOptions = + | KeyboardType + | KeyboardTypeIOS + | KeyboardTypeAndroid; -export type InputMode = +export type InputModeOptions = | 'none' | 'text' | 'decimal' @@ -186,17 +195,9 @@ export type InputMode = | 'email' | 'url'; -export type ReturnKeyType = - // Cross Platform - | 'done' - | 'go' - | 'next' - | 'search' - | 'send' - // Android-only - | 'none' - | 'previous' - // iOS-only +export type ReturnKeyType = 'done' | 'go' | 'next' | 'search' | 'send'; + +export type ReturnKeyTypeIOS = | 'default' | 'emergency-call' | 'google' @@ -204,6 +205,13 @@ export type ReturnKeyType = | 'route' | 'yahoo'; +export type ReturnKeyTypeAndroid = 'none' | 'previous'; + +export type ReturnKeyTypeOptions = + | ReturnKeyType + | ReturnKeyTypeIOS + | ReturnKeyTypeAndroid; + export type SubmitBehavior = 'submit' | 'blurAndSubmit' | 'newline'; export type AutoCapitalize = 'none' | 'sentences' | 'words' | 'characters'; @@ -256,21 +264,20 @@ export type TextContentType = | 'flightNumber' | 'shipmentTrackingNumber'; -export type enterKeyHintType = - // Cross Platform - | 'done' - | 'go' - | 'next' - | 'search' - | 'send' - // Android-only - | 'previous' - // iOS-only - | 'enter'; +export type EnterKeyHintTypeAndroid = 'previous'; + +export type EnterKeyHintTypeIOS = 'enter'; + +export type EnterKeyHintType = 'done' | 'go' | 'next' | 'search' | 'send'; + +export type EnterKeyHintTypeOptions = + | EnterKeyHintType + | EnterKeyHintTypeAndroid + | EnterKeyHintTypeIOS; type PasswordRules = string; -type IOSProps = $ReadOnly<{ +export type TextInputIOSProps = $ReadOnly<{ /** * If true, the keyboard shortcuts (undo/redo and copy buttons) are disabled. The default value is false. * @platform ios @@ -407,7 +414,7 @@ type IOSProps = $ReadOnly<{ smartInsertDelete?: ?boolean, }>; -type AndroidProps = $ReadOnly<{ +export type TextInputAndroidProps = $ReadOnly<{ /** * When provided it will set the color of the cursor (or "caret") in the component. * Unlike the behavior of `selectionColor` the cursor color will be set independently @@ -503,7 +510,7 @@ type SubmitKeyEvent = $ReadOnly<{| code: string, |}>; -type WindowsProps = $ReadOnly<{| +type TextInputWindowsProps = $ReadOnly<{| /** * If `true`, clears the text field synchronously before `onSubmitEditing` is emitted. * @platform windows @@ -519,11 +526,11 @@ type WindowsProps = $ReadOnly<{| // Windows] -export type Props = $ReadOnly<{ +export type TextInputProps = $ReadOnly<{ ...$Diff>, - ...IOSProps, - ...AndroidProps, - ...WindowsProps, // [Windows] + ...TextInputIOSProps, + ...TextInputAndroidProps, + ...TextInputWindowsProps, // [Windows] /** * String to be read by screenreaders to indicate an error state. The acceptable parameters @@ -734,7 +741,7 @@ export type Props = $ReadOnly<{ * - `search` * - `send` */ - enterKeyHint?: ?enterKeyHintType, + enterKeyHint?: ?EnterKeyHintTypeOptions, /** * `inputMode` works like the `inputmode` attribute in HTML, it determines which @@ -751,7 +758,7 @@ export type Props = $ReadOnly<{ * - `email` * - `url` */ - inputMode?: ?InputMode, + inputMode?: ?InputModeOptions, /** * Determines which keyboard to open, e.g.`numeric`. @@ -783,7 +790,7 @@ export type Props = $ReadOnly<{ * - `visible-password` * */ - keyboardType?: ?KeyboardType, + keyboardType?: ?KeyboardTypeOptions, /** * Specifies largest possible scale a font can reach when `allowFontScaling` is enabled. @@ -809,12 +816,12 @@ export type Props = $ReadOnly<{ /** * Callback that is called when the text input is blurred. */ - onBlur?: ?(e: BlurEvent) => mixed, + onBlur?: ?(e: TextInputBlurEvent) => mixed, /** * Callback that is called when the text input's text changes. */ - onChange?: ?(e: ChangeEvent) => mixed, + onChange?: ?(e: TextInputChangeEvent) => mixed, /** * Callback that is called when the text input's text changes. @@ -829,17 +836,17 @@ export type Props = $ReadOnly<{ * * Only called for multiline text inputs. */ - onContentSizeChange?: ?(e: ContentSizeChangeEvent) => mixed, + onContentSizeChange?: ?(e: TextInputContentSizeChangeEvent) => mixed, /** * Callback that is called when text input ends. */ - onEndEditing?: ?(e: EditingEvent) => mixed, + onEndEditing?: ?(e: TextInputEditingEvent) => mixed, /** * Callback that is called when the text input is focused. */ - onFocus?: ?(e: FocusEvent) => mixed, + onFocus?: ?(e: TextInputFocusEvent) => mixed, /** * Callback that is called when a key is pressed. @@ -848,7 +855,7 @@ export type Props = $ReadOnly<{ * the typed-in character otherwise including `' '` for space. * Fires before `onChange` callbacks. */ - onKeyPress?: ?(e: KeyPressEvent) => mixed, + onKeyPress?: ?(e: TextInputKeyPressEvent) => mixed, /** * Called when a single tap gesture is detected. @@ -870,13 +877,13 @@ export type Props = $ReadOnly<{ * This will be called with * `{ nativeEvent: { selection: { start, end } } }`. */ - onSelectionChange?: ?(e: SelectionChangeEvent) => mixed, + onSelectionChange?: ?(e: TextInputSelectionChangeEvent) => mixed, /** * Callback that is called when the text input's submit button is pressed. * Invalid if `multiline={true}` is specified. */ - onSubmitEditing?: ?(e: EditingEvent) => mixed, + onSubmitEditing?: ?(e: TextInputEditingEvent) => mixed, /** * Invoked on content scroll with `{ nativeEvent: { contentOffset: { x, y } } }`. @@ -934,7 +941,7 @@ export type Props = $ReadOnly<{ * - `route` * - `yahoo` */ - returnKeyType?: ?ReturnKeyType, + returnKeyType?: ?ReturnKeyTypeOptions, /** * If `true`, the text input obscures the text entered so that sensitive text @@ -1058,7 +1065,7 @@ function useTextInputStateSynchronization_STATE({ text, viewCommands, }: { - props: Props, + props: TextInputProps, mostRecentEventCount: number, selection: ?Selection, inputRef: React.RefObject, @@ -1139,7 +1146,7 @@ function useTextInputStateSynchronization_REFS({ text, viewCommands, }: { - props: Props, + props: TextInputProps, mostRecentEventCount: number, selection: ?Selection, inputRef: React.RefObject, @@ -1325,7 +1332,7 @@ function useTextInputStateSynchronization_REFS({ * or control this param programmatically with native code. * */ -function InternalTextInput(props: Props): React.Node { +function InternalTextInput(props: TextInputProps): React.Node { const { 'aria-busy': ariaBusy, 'aria-checked': ariaChecked, @@ -1470,7 +1477,7 @@ function InternalTextInput(props: Props): React.Node { const ref = useMergeRefs(setLocalRef, props.forwardedRef); - const _onChange = (event: ChangeEvent) => { + const _onChange = (event: TextInputChangeEvent) => { const currentText = event.nativeEvent.text; props.onChange && props.onChange(event); props.onChangeText && props.onChangeText(currentText); @@ -1489,7 +1496,7 @@ function InternalTextInput(props: Props): React.Node { setMostRecentEventCount(event.nativeEvent.eventCount); }; - const _onSelectionChange = (event: SelectionChangeEvent) => { + const _onSelectionChange = (event: TextInputSelectionChangeEvent) => { props.onSelectionChange && props.onSelectionChange(event); if (inputRef.current == null) { @@ -1504,14 +1511,14 @@ function InternalTextInput(props: Props): React.Node { }); }; - const _onFocus = (event: FocusEvent) => { + const _onFocus = (event: TextInputFocusEvent) => { TextInputState.focusInput(inputRef.current); if (props.onFocus) { props.onFocus(event); } }; - const _onBlur = (event: BlurEvent) => { + const _onBlur = (event: TextInputBlurEvent) => { TextInputState.blurInput(inputRef.current); if (props.onBlur) { props.onBlur(event); @@ -2040,4 +2047,4 @@ const verticalAlignToTextAlignVerticalMap = { }; // $FlowFixMe[unclear-type] Unclear type. Using `any` type is not safe. -module.exports = ((ExportedForwardRef: any): TextInputType); +export default ExportedForwardRef as any as TextInputType; diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/TextInput/TextInputState.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/TextInput/TextInputState.win32.js index e0663966614..b2912f20050 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/TextInput/TextInputState.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/TextInput/TextInputState.win32.js @@ -235,7 +235,7 @@ function isTextInput(textField: HostInstance): boolean { return inputs.has(textField); } -module.exports = { +const TextInputState = { currentlyFocusedInput, focusInput, blurInput, @@ -251,3 +251,5 @@ module.exports = { unregisterInput, isTextInput, }; + +export default TextInputState; diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/ToastAndroid/ToastAndroid.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/ToastAndroid/ToastAndroid.win32.js index ebdd82b59f8..c2e061b6b55 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/ToastAndroid/ToastAndroid.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/ToastAndroid/ToastAndroid.win32.js @@ -42,4 +42,4 @@ const ToastAndroid = { }, }; -module.exports = ToastAndroid; +export default ToastAndroid; 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 10886fa4a0e..32e03776c0a 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 @@ -96,4 +96,4 @@ class TouchableNativeFeedback extends React.Component { } } -module.exports = TouchableNativeFeedback; +export default TouchableNativeFeedback; diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/ReactNativeViewAttributes.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/ReactNativeViewAttributes.win32.js index 181cee7c526..9506473a89a 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/ReactNativeViewAttributes.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Components/View/ReactNativeViewAttributes.win32.js @@ -91,4 +91,4 @@ const ReactNativeViewAttributes = { RCTView: RCTView, }; -module.exports = ReactNativeViewAttributes; +export default ReactNativeViewAttributes; 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 14c1c04f3bb..4b9dc5f4d6f 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 @@ -273,4 +273,4 @@ const View: component( View.displayName = 'View'; -module.exports = View; +export default View; diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Core/Devtools/loadBundleFromServer.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Core/Devtools/loadBundleFromServer.win32.js index 2e7b817f8cd..42db8dea250 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Core/Devtools/loadBundleFromServer.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Core/Devtools/loadBundleFromServer.win32.js @@ -103,7 +103,9 @@ function buildUrlForBundle(bundlePathAndQuery: string) { ); } -module.exports = function (bundlePathAndQuery: string): Promise { +export default function loadBundleFromServer( + bundlePathAndQuery: string, +): Promise { const requestUrl = buildUrlForBundle(bundlePathAndQuery); let loadPromise = cachedPromisesByUrl.get(requestUrl); @@ -150,4 +152,4 @@ module.exports = function (bundlePathAndQuery: string): Promise { cachedPromisesByUrl.set(requestUrl, loadPromise); return loadPromise; -}; +} diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Core/ReactNativeVersionCheck.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Core/ReactNativeVersionCheck.win32.js index 2b1300e9814..5c5d28552c5 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Core/ReactNativeVersionCheck.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Core/ReactNativeVersionCheck.win32.js @@ -21,7 +21,7 @@ const ReactNativeVersion = require('./ReactNativeVersion'); * implementations for other platforms (ex: Windows) may override this module * and rely on its existence as a separate module. */ -const checkVersions = function checkVersions(): void { +export function checkVersions(): void { const nativeVersion = Platform.constants.reactNativeVersion; if ( ReactNativeVersion.version.major !== nativeVersion.major || @@ -39,7 +39,7 @@ const checkVersions = function checkVersions(): void { '`watchman watch-del-all && npx @react-native-community/cli start --reset-cache`.', ); } -}; +} function _formatVersion( version: (typeof Platform)['constants']['reactNativeVersion'], @@ -50,5 +50,3 @@ function _formatVersion( (version.prerelease != undefined ? `-${version.prerelease}` : '') ); } - -module.exports = {checkVersions}; 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 023d459a5a7..c82ba212f20 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 @@ -284,4 +284,4 @@ const styles = StyleSheet.create({ }, }); -module.exports = Image; +export default Image; diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Image/NativeImageLoaderWin32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Image/NativeImageLoaderWin32.js index 18f925daa6f..e02e8a79d70 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Image/NativeImageLoaderWin32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Image/NativeImageLoaderWin32.js @@ -8,6 +8,6 @@ * @format */ -export * from '../../src/private/specs/modules/NativeImageLoaderWin32'; -import NativeImageLoaderWin32 from '../../src/private/specs/modules/NativeImageLoaderWin32'; +export * from '../../src/private/specs_DEPRECATED/modules/NativeImageLoaderWin32'; +import NativeImageLoaderWin32 from '../../src/private/specs_DEPRECATED/modules/NativeImageLoaderWin32'; export default NativeImageLoaderWin32; diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Inspector/Inspector.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Inspector/Inspector.win32.js deleted file mode 100644 index 72add255258..00000000000 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Inspector/Inspector.win32.js +++ /dev/null @@ -1,212 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow - */ - -'use strict'; - -import type {InspectedViewRef} from '../ReactNative/AppContainer-dev'; -import type { - InspectorData, - TouchedViewDataAtPoint, -} from '../Renderer/shims/ReactNativeTypes'; -import type {ViewStyleProp} from '../StyleSheet/StyleSheet'; -import type {ReactDevToolsAgent} from '../Types/ReactDevToolsTypes'; - -import SafeAreaView from '../../src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE'; -import React from 'react'; - -const PressabilityDebug = require('../Pressability/PressabilityDebug'); -const ReactNative = require('../Renderer/shims/ReactNative').default; -const {findNodeHandle} = require('../ReactNative/RendererProxy'); -const StyleSheet = require('../StyleSheet/StyleSheet'); -const Platform = require('../Utilities/Platform'); -const View = require('../Components/View/View'); -const getInspectorDataForViewAtPoint = require('./getInspectorDataForViewAtPoint'); -const InspectorOverlay = require('./InspectorOverlay'); -const InspectorPanel = require('./InspectorPanel'); - -const {useState} = React; - -type PanelPosition = 'top' | 'bottom'; -type SelectedTab = - | 'elements-inspector' - | 'network-profiling' - | 'performance-profiling'; - -export type InspectedElementFrame = TouchedViewDataAtPoint['frame']; -export type InspectedElement = $ReadOnly<{ - frame: InspectedElementFrame, - style?: ViewStyleProp, -}>; -export type ElementsHierarchy = InspectorData['hierarchy']; - -type Props = { - inspectedViewRef: InspectedViewRef, - onRequestRerenderApp: () => void, - reactDevToolsAgent?: ReactDevToolsAgent, -}; - -const UIManager = require('../ReactNative/UIManager'); // [Win32] - -function Inspector({ - inspectedViewRef, - onRequestRerenderApp, - reactDevToolsAgent, -}: Props): React.Node { - const [selectedTab, setSelectedTab] = - useState('elements-inspector'); - - const [panelPosition, setPanelPosition] = useState('bottom'); - const [inspectedElement, setInspectedElement] = - useState(null); - const [selectionIndex, setSelectionIndex] = useState(null); - const [elementsHierarchy, setElementsHierarchy] = - useState(null); - - const setSelection = (i: number) => { - const hierarchyItem = elementsHierarchy?.[i]; - if (hierarchyItem == null) { - return; - } - - // We pass in findNodeHandle as the method is injected - const {measure, props} = hierarchyItem.getInspectorData(findNodeHandle); - - measure((x, y, width, height, left, top) => { - // $FlowFixMe[incompatible-call] `props` from InspectorData are defined as dictionary, which is incompatible with ViewStyleProp - setInspectedElement({ - frame: {left, top, width, height}, - style: props.style, - }); - - setSelectionIndex(i); - }); - }; - - const onTouchPoint = (locationX: number, locationY: number) => { - const setTouchedViewData = (viewData: TouchedViewDataAtPoint) => { - const { - hierarchy, - props, - selectedIndex, - frame, - pointerY, - touchedViewTag, - closestInstance, - } = viewData; - - // Sync the touched view with React DevTools. - // Note: This is Paper only. To support Fabric, - // DevTools needs to be updated to not rely on view tags. - if (reactDevToolsAgent) { - reactDevToolsAgent.selectNode(findNodeHandle(touchedViewTag)); - if (closestInstance != null) { - reactDevToolsAgent.selectNode(closestInstance); - } - } - - // [Win32 Avoid Dimensions call - const node = ReactNative.findNodeHandle(inspectedViewRef); - // $FlowFixMe[incompatible-call] - UIManager.measure(node, (x, y, width, height, left, top) => { - setPanelPosition(pointerY > height / 2 ? 'top' : 'bottom'); - setSelectionIndex(selectedIndex); - setElementsHierarchy(hierarchy); - // $FlowFixMe[incompatible-call] `props` from InspectorData are defined as dictionary, which is incompatible with ViewStyleProp - setInspectedElement({ - frame, - style: props.style, - }); - }); - }; - - // ]Win32 - getInspectorDataForViewAtPoint( - inspectedViewRef.current, - locationX, - locationY, - viewData => { - setTouchedViewData(viewData); - return false; - }, - ); - }; - - const setInspecting = (enabled: boolean) => { - setSelectedTab(enabled ? 'elements-inspector' : null); - setInspectedElement(null); - }; - - const setPerfing = (enabled: boolean) => { - setSelectedTab(enabled ? 'performance-profiling' : null); - setInspectedElement(null); - }; - - const setNetworking = (enabled: boolean) => { - setSelectedTab(enabled ? 'network-profiling' : null); - setInspectedElement(null); - }; - - const setTouchTargeting = (val: boolean) => { - PressabilityDebug.setEnabled(val); - onRequestRerenderApp(); - }; - - const panelContainerStyle = - panelPosition === 'bottom' - ? {bottom: 0} - : Platform.select({ios: {top: 0}, default: {top: 0}}); - - return ( - - {selectedTab === 'elements-inspector' && ( - - )} - - - - - - ); -} - -const styles = StyleSheet.create({ - container: { - position: 'absolute', - backgroundColor: 'transparent', - top: 0, - left: 0, - right: 0, - bottom: 0, - }, - panelContainer: { - position: 'absolute', - left: 0, - right: 0, - }, -}); - -module.exports = Inspector; diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Inspector/InspectorOverlay.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Inspector/InspectorOverlay.win32.js deleted file mode 100644 index 82971616bd9..00000000000 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Inspector/InspectorOverlay.win32.js +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow - */ - -'use strict'; - -import type {PressEvent} from '../Types/CoreEventTypes'; -import type {InspectedElement} from './Inspector'; - -import React from 'react'; -// import Dimensions from '../Utilities/Dimensions'; [Win32] - -const View = require('../Components/View/View'); -const StyleSheet = require('../StyleSheet/StyleSheet'); -const ElementBox = require('./ElementBox'); - -type Props = $ReadOnly<{ - inspected?: ?InspectedElement, - onTouchPoint: (locationX: number, locationY: number) => void, -}>; - -function InspectorOverlay({inspected, onTouchPoint}: Props): React.Node { - const findViewForTouchEvent = (e: PressEvent) => { - const {locationX, locationY} = e.nativeEvent.touches[0]; - - onTouchPoint(locationX, locationY); - }; - - const handleStartShouldSetResponder = (e: PressEvent): boolean => { - findViewForTouchEvent(e); - return true; - }; - - let content = null; - if (inspected) { - content = ; - } - - // [Win32, height replaced with 100% to avoid Dimensions call] - return ( - - {content} - - ); -} - -const styles = StyleSheet.create({ - inspector: { - backgroundColor: 'transparent', - position: 'absolute', - left: 0, - top: 0, - right: 0, - bottom: 0, - }, -}); - -module.exports = InspectorOverlay; diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Network/RCTNetworking.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Network/RCTNetworking.win32.js index 4d528eebdba..e5b2dd572ff 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Network/RCTNetworking.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Network/RCTNetworking.win32.js @@ -29,7 +29,7 @@ const RCTNetworking = { sendRequest( method: string, - trackingName: string, + trackingName: ?string, url: string, headers: {...}, data: RequestBody, diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/ReactNative/PaperUIManager.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/ReactNative/PaperUIManager.win32.js index cf5ee474479..d661523832b 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/ReactNative/PaperUIManager.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/ReactNative/PaperUIManager.win32.js @@ -17,7 +17,7 @@ import nullthrows from 'nullthrows'; const NativeModules = require('../BatchedBridge/NativeModules').default; const defineLazyObjectProperty = require('../Utilities/defineLazyObjectProperty'); const Platform = require('../Utilities/Platform'); -const UIManagerProperties = require('./UIManagerProperties'); +const UIManagerProperties = require('./UIManagerProperties').default; const viewManagerConfigs: {[string]: any | null} = {}; @@ -36,7 +36,6 @@ function getConstants(): Object { function getViewManagerConfig(viewManagerName: string): any { if ( viewManagerConfigs[viewManagerName] === undefined && - global.nativeCallSyncHook && // If we're in the Chrome Debugger, let's not even try calling the sync method NativeUIManager.getConstantsForViewManager ) { try { @@ -207,4 +206,4 @@ if (!global.nativeCallSyncHook) { }); } -module.exports = UIManagerJS; +export default UIManagerJS; diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Settings/Settings.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Settings/Settings.win32.js index 7566621be1b..51f8981f059 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Settings/Settings.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Settings/Settings.win32.js @@ -25,4 +25,4 @@ var Settings = { }, }; -module.exports = Settings; +export default Settings; diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/StyleSheet/StyleSheet.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/StyleSheet/StyleSheet.win32.js index 00191a8b0af..736901b393e 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/StyleSheet/StyleSheet.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/StyleSheet/StyleSheet.win32.js @@ -26,7 +26,8 @@ import type { import composeStyles from '../../src/private/styles/composeStyles'; import flatten from './flattenStyle'; -const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes'); +const ReactNativeStyleAttributes = + require('../Components/View/ReactNativeStyleAttributes').default; const PixelRatio = require('../Utilities/PixelRatio').default; const Platform = require('../Utilities/Platform'); // [Win32] 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 25ad7cf159e..377f7e471bc 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 @@ -574,4 +574,4 @@ const verticalAlignToTextAlignVerticalMap = { middle: 'center', }; -module.exports = Text; +export default Text; 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 05ffe57cb11..abe85563142 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 @@ -287,12 +287,14 @@ export type ScrollEvent = SyntheticEvent< export type BlurEvent = SyntheticEvent< $ReadOnly<{ target: number, + ... }>, >; export type FocusEvent = SyntheticEvent< $ReadOnly<{ target: number, + ... }>, >; diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Utilities/NativePlatformConstantsWin.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Utilities/NativePlatformConstantsWin.js index cfdc82d31f8..bfc0c3e750d 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Utilities/NativePlatformConstantsWin.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Utilities/NativePlatformConstantsWin.js @@ -6,6 +6,6 @@ * @flow strict */ -export * from '../../src/private/specs/modules/NativePlatformConstantsWin'; -import NativePlatformConstantsWin from '../../src/private/specs/modules/NativePlatformConstantsWin'; +export * from '../../src/private/specs_DEPRECATED/modules/NativePlatformConstantsWin'; +import NativePlatformConstantsWin from '../../src/private/specs_DEPRECATED/modules/NativePlatformConstantsWin'; export default NativePlatformConstantsWin; 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 cd3fc91b1c5..ae686c2bcbc 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 @@ -96,7 +96,6 @@ import typeof Platform from './Libraries/Utilities/Platform'; import typeof useColorScheme from './Libraries/Utilities/useColorScheme'; import typeof useWindowDimensions from './Libraries/Utilities/useWindowDimensions'; import typeof Vibration from './Libraries/Vibration/Vibration'; -import typeof YellowBox from './Libraries/YellowBox/YellowBoxDeprecated'; import typeof DevMenu from './src/private/devmenu/DevMenu'; const warnOnce = require('./Libraries/Utilities/warnOnce'); @@ -126,13 +125,13 @@ module.exports = { .default; }, get FlatList(): FlatList { - return require('./Libraries/Lists/FlatList'); + return require('./Libraries/Lists/FlatList').default; }, get Image(): Image { - return require('./Libraries/Image/Image'); + return require('./Libraries/Image/Image').default; }, get ImageBackground(): ImageBackground { - return require('./Libraries/Image/ImageBackground'); + return require('./Libraries/Image/ImageBackground').default; }, get InputAccessoryView(): InputAccessoryView { return require('./Libraries/Components/TextInput/InputAccessoryView') @@ -183,36 +182,39 @@ module.exports = { return require('./Libraries/Components/Switch/Switch').default; }, get Text(): Text { - return require('./Libraries/Text/Text'); + return require('./Libraries/Text/Text').default; }, // $FlowFixMe[value-as-type] get TextInput(): TextInput { - return require('./Libraries/Components/TextInput/TextInput'); + return require('./Libraries/Components/TextInput/TextInput').default; }, get Touchable(): Touchable { return require('./Libraries/Components/Touchable/Touchable').default; }, get TouchableHighlight(): TouchableHighlight { - return require('./Libraries/Components/Touchable/TouchableHighlight'); + return require('./Libraries/Components/Touchable/TouchableHighlight') + .default; }, // $FlowFixMe[value-as-type] get TouchableNativeFeedback(): TouchableNativeFeedback { - return require('./Libraries/Components/Touchable/TouchableNativeFeedback'); + return require('./Libraries/Components/Touchable/TouchableNativeFeedback') + .default; }, get TouchableOpacity(): TouchableOpacity { - return require('./Libraries/Components/Touchable/TouchableOpacity'); + return require('./Libraries/Components/Touchable/TouchableOpacity').default; }, get TouchableWithoutFeedback(): TouchableWithoutFeedback { - return require('./Libraries/Components/Touchable/TouchableWithoutFeedback'); + return require('./Libraries/Components/Touchable/TouchableWithoutFeedback') + .default; }, get View(): View { - return require('./Libraries/Components/View/View'); + return require('./Libraries/Components/View/View').default; }, get VirtualizedList(): VirtualizedList { - return require('./Libraries/Lists/VirtualizedList'); + return require('./Libraries/Lists/VirtualizedList').default; }, get VirtualizedSectionList(): VirtualizedSectionList { - return require('./Libraries/Lists/VirtualizedSectionList'); + return require('./Libraries/Lists/VirtualizedSectionList').default; }, // APIs @@ -232,7 +234,7 @@ module.exports = { return require('./Libraries/Utilities/Appearance'); }, get AppRegistry(): AppRegistry { - return require('./Libraries/ReactNative/AppRegistry'); + return require('./Libraries/ReactNative/AppRegistry').default; }, get AppState(): AppState { return require('./Libraries/AppState/AppState').default; @@ -271,19 +273,19 @@ module.exports = { return require('./Libraries/Utilities/FocusManager'); }, get I18nManager(): I18nManager { - return require('./Libraries/ReactNative/I18nManager'); + return require('./Libraries/ReactNative/I18nManager').default; }, get InteractionManager(): InteractionManager { - return require('./Libraries/Interaction/InteractionManager'); + return require('./Libraries/Interaction/InteractionManager').default; }, get Keyboard(): Keyboard { return require('./Libraries/Components/Keyboard/Keyboard').default; }, get LayoutAnimation(): LayoutAnimation { - return require('./Libraries/LayoutAnimation/LayoutAnimation'); + return require('./Libraries/LayoutAnimation/LayoutAnimation').default; }, get Linking(): Linking { - return require('./Libraries/Linking/Linking'); + return require('./Libraries/Linking/Linking').default; }, get LogBox(): LogBox { return require('./Libraries/LogBox/LogBox').default; @@ -318,10 +320,10 @@ module.exports = { }, // $FlowFixMe[value-as-type] get Settings(): Settings { - return require('./Libraries/Settings/Settings'); + return require('./Libraries/Settings/Settings').default; }, get Share(): Share { - return require('./Libraries/Share/Share'); + return require('./Libraries/Share/Share').default; }, get StyleSheet(): StyleSheet { return require('./Libraries/StyleSheet/StyleSheet'); @@ -331,13 +333,13 @@ module.exports = { }, // $FlowFixMe[value-as-type] get ToastAndroid(): ToastAndroid { - return require('./Libraries/Components/ToastAndroid/ToastAndroid'); + return require('./Libraries/Components/ToastAndroid/ToastAndroid').default; }, get TurboModuleRegistry(): TurboModuleRegistry { return require('./Libraries/TurboModule/TurboModuleRegistry'); }, get UIManager(): UIManager { - return require('./Libraries/ReactNative/UIManager'); + return require('./Libraries/ReactNative/UIManager').default; }, get unstable_batchedUpdates(): $PropertyType< ReactNative, @@ -361,9 +363,6 @@ module.exports = { get Vibration(): Vibration { return require('./Libraries/Vibration/Vibration').default; }, - get YellowBox(): YellowBox { - return require('./Libraries/YellowBox/YellowBoxDeprecated').default; - }, // Plugins get DeviceEventEmitter(): RCTDeviceEventEmitter { @@ -374,7 +373,7 @@ module.exports = { .DynamicColorIOS; }, get NativeAppEventEmitter(): RCTNativeAppEventEmitter { - return require('./Libraries/EventEmitter/RCTNativeAppEventEmitter'); + return require('./Libraries/EventEmitter/RCTNativeAppEventEmitter').default; }, get NativeModules(): NativeModules { return require('./Libraries/BatchedBridge/NativeModules').default; diff --git a/packages/@office-iss/react-native-win32/src-win/src/private/debugging/ReactDevToolsSettingsManager.win32.js b/packages/@office-iss/react-native-win32/src-win/src/private/debugging/ReactDevToolsSettingsManager.win32.js index e80d4c32b44..19520e61f86 100644 --- a/packages/@office-iss/react-native-win32/src-win/src/private/debugging/ReactDevToolsSettingsManager.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/src/private/debugging/ReactDevToolsSettingsManager.win32.js @@ -8,7 +8,7 @@ * @format */ -import NativeReactDevToolsSettingsManager from '../specs/modules/NativeReactDevToolsSettingsManager'; +import NativeReactDevToolsSettingsManager from '../specs_DEPRECATED/modules/NativeReactDevToolsSettingsManager'; module.exports = { setGlobalHookSettings(settings: string) { diff --git a/packages/@office-iss/react-native-win32/src-win/src/private/specs/modules/NativeAccessibilityInfoWin32.js b/packages/@office-iss/react-native-win32/src-win/src/private/specs_DEPRECATED/modules/NativeAccessibilityInfoWin32.js similarity index 100% rename from packages/@office-iss/react-native-win32/src-win/src/private/specs/modules/NativeAccessibilityInfoWin32.js rename to packages/@office-iss/react-native-win32/src-win/src/private/specs_DEPRECATED/modules/NativeAccessibilityInfoWin32.js diff --git a/packages/@office-iss/react-native-win32/src-win/src/private/specs/modules/NativeImageLoaderWin32.js b/packages/@office-iss/react-native-win32/src-win/src/private/specs_DEPRECATED/modules/NativeImageLoaderWin32.js similarity index 100% rename from packages/@office-iss/react-native-win32/src-win/src/private/specs/modules/NativeImageLoaderWin32.js rename to packages/@office-iss/react-native-win32/src-win/src/private/specs_DEPRECATED/modules/NativeImageLoaderWin32.js diff --git a/packages/@office-iss/react-native-win32/src-win/src/private/specs/modules/NativePlatformConstantsWin.js b/packages/@office-iss/react-native-win32/src-win/src/private/specs_DEPRECATED/modules/NativePlatformConstantsWin.js similarity index 100% rename from packages/@office-iss/react-native-win32/src-win/src/private/specs/modules/NativePlatformConstantsWin.js rename to packages/@office-iss/react-native-win32/src-win/src/private/specs_DEPRECATED/modules/NativePlatformConstantsWin.js diff --git a/packages/@react-native-windows/automation-channel/package.json b/packages/@react-native-windows/automation-channel/package.json index 938dda64956..1916fb6c823 100644 --- a/packages/@react-native-windows/automation-channel/package.json +++ b/packages/@react-native-windows/automation-channel/package.json @@ -32,7 +32,7 @@ "just-scripts": "^1.3.2", "prettier": "2.8.8", "react": "19.0.0", - "react-native": "0.79.0-nightly-20250123-d1028885e", + "react-native": "0.79.0-nightly-20250206-fb8a6a5bb", "react-native-windows": "^0.0.0-canary.952", "typescript": "5.0.4" }, diff --git a/packages/@react-native-windows/tester/overrides.json b/packages/@react-native-windows/tester/overrides.json index 47c65ddd41f..3da3b188259 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.79.0-nightly-20250123-d1028885e", + "baseVersion": "0.79.0-nightly-20250206-fb8a6a5bb", "overrides": [ { "type": "derived", @@ -47,17 +47,17 @@ "issue": 12869 }, { - "type": "patch", + "type": "copy", "file": "src/js/examples/FlatList/FlatList-multiColumn.windows.js", "baseFile": "packages/rn-tester/js/examples/FlatList/FlatList-multiColumn.js", - "baseHash": "552b83b0c8e7188471e709f2a6dac2621badcfe9", + "baseHash": "6c6878213062cccfe45a71bbfb3f77edc92bf7de", "issue": 12869 }, { "type": "patch", "file": "src/js/examples/FlatList/FlatList-nested.windows.js", "baseFile": "packages/rn-tester/js/examples/FlatList/FlatList-nested.js", - "baseHash": "cf2755fd167ff54fa86d0bb9a7a236dabf37782f", + "baseHash": "f78128c8241a9f5d3090c88f5cc38adeaaa71f8c", "issue": 12869 }, { @@ -78,7 +78,7 @@ "type": "patch", "file": "src/js/examples/Image/ImageExample.windows.js", "baseFile": "packages/rn-tester/js/examples/Image/ImageExample.js", - "baseHash": "4084d994a59f9f46fc173b54a3619e7268b50fa6", + "baseHash": "e304cd86fcbfb36a13558aa7b1385682a0bea153", "issue": 12869 }, { @@ -104,7 +104,7 @@ "type": "derived", "file": "src/js/examples/Text/TextExample.windows.js", "baseFile": "packages/rn-tester/js/examples/Text/TextExample.android.js", - "baseHash": "fa8a3c8b4faacdeab85d418392009c4243e41158" + "baseHash": "57b504a530b7ecfe38ebfa4092aa2c8554726e74" }, { "type": "derived", @@ -116,7 +116,7 @@ "type": "patch", "file": "src/js/examples/TextInput/TextInputExample.windows.js", "baseFile": "packages/rn-tester/js/examples/TextInput/TextInputExample.android.js", - "baseHash": "fcd8e5e42372bb200be07d8339c644e76dfdb12e", + "baseHash": "8cc115a30795ee2fcf174e91f9cdbf56f4513a93", "issue": 5688 }, { @@ -129,7 +129,7 @@ "type": "patch", "file": "src/js/examples/TurboModule/SampleTurboModuleExample.windows.js", "baseFile": "packages/rn-tester/js/examples/TurboModule/SampleTurboModuleExample.js", - "baseHash": "5c878523dfe3052b6658d29f320f46383774af70", + "baseHash": "900ce95a3ee39c335f92d708b945674a0d1e2557", "issue": 0 }, { diff --git a/packages/@react-native-windows/tester/package.json b/packages/@react-native-windows/tester/package.json index 7d1d28c1da3..bbbbc0b6fdd 100644 --- a/packages/@react-native-windows/tester/package.json +++ b/packages/@react-native-windows/tester/package.json @@ -19,12 +19,12 @@ "peerDependencies": { "@react-native-picker/picker": "2.4.10", "react": "19.0.0", - "react-native": "0.79.0-nightly-20250123-d1028885e", + "react-native": "0.79.0-nightly-20250206-fb8a6a5bb", "react-native-windows": "^0.0.0-canary.952", "react-native-xaml": "^0.0.78" }, "devDependencies": { - "@react-native/tester": "0.78.0-main", + "@react-native/tester": "0.79.0-main", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.34", "@rnw-scripts/just-task": "2.3.51", @@ -32,7 +32,7 @@ "@types/node": "^18.0.0", "eslint": "^8.19.0", "just-scripts": "^1.3.3", - "react-native": "0.79.0-nightly-20250123-d1028885e", + "react-native": "0.79.0-nightly-20250206-fb8a6a5bb", "react-native-platform-override": "^1.9.53", "react-native-windows": "^0.0.0-canary.952", "typescript": "5.0.4" diff --git a/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-multiColumn.windows.js b/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-multiColumn.windows.js index 28edb939410..1a7e530005c 100644 --- a/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-multiColumn.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-multiColumn.windows.js @@ -14,7 +14,7 @@ import type {Item} from '../../components/ListExampleShared'; import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; import type {RenderItemProps} from 'react-native/Libraries/Lists/VirtualizedList'; -const { +import { FooterComponent, HeaderComponent, ItemComponent, @@ -24,136 +24,64 @@ const { getItemLayout, pressItem, renderSmallSwitchOption, -} = require('../../components/ListExampleShared'); -const RNTesterPage = require('../../components/RNTesterPage'); -const React = require('react'); -const {Alert, FlatList, StyleSheet, Text, View} = require('react-native'); -const infoLog = require('react-native/Libraries/Utilities/infoLog'); +} from '../../components/ListExampleShared'; +import RNTesterPage from '../../components/RNTesterPage'; +import RNTesterText from '../../components/RNTesterText'; +import React from 'react'; +import {Alert, FlatList, StyleSheet, View} from 'react-native'; +import infoLog from 'react-native/Libraries/Utilities/infoLog'; -class MultiColumnExample extends React.PureComponent< - $FlowFixMeProps, - $FlowFixMeState, -> { - state: - | any - | {| - data: Array, - filterText: string, - fixedHeight: boolean, - logViewable: boolean, - numColumns: number, - virtualized: boolean, - |} = { - data: genNewerItems(1000), - filterText: '', - fixedHeight: true, - logViewable: false, - numColumns: 2, - virtualized: true, - }; - /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's - * LTI update could not be added via codemod */ - _onChangeFilterText = filterText => { - this.setState(() => ({filterText})); +function MultiColumnExample(): React.Node { + const [data, setData] = React.useState(genNewerItems(1000)); + const [filterText, setFilterText] = React.useState(''); + const [fixedHeight, setFixedHeight] = React.useState(true); + const [logViewable, setLogViewable] = React.useState(false); + const [numColumns, setNumColumns] = React.useState(2); + const [virtualized, setVirtualized] = React.useState(true); + + const _onChangeFilterText = (_filterText: string) => { + setFilterText(_filterText); }; - _onChangeNumColumns = (numColumns: mixed) => { - this.setState(() => ({numColumns: Number(numColumns)})); + const _onChangeNumColumns = (_numColumns: mixed) => { + setNumColumns(Number(_numColumns)); }; - _setBooleanValue: string => boolean => void = key => value => - this.setState({[key]: value}); + const _setBooleanValue = (key: string) => (value: boolean) => { + switch (key) { + case 'virtualized': + setVirtualized(value); + break; + case 'fixedHeight': + setFixedHeight(value); + break; + case 'logViewable': + setLogViewable(value); + break; + } + }; - render(): React.Node { - const filterRegex = new RegExp(String(this.state.filterText), 'i'); - const filter = (item: any | Item) => - filterRegex.test(item.text) || filterRegex.test(item.title); - const filteredData = this.state.data.filter(filter); - return ( - - MultiColumn'} - noScroll={true}> - - - - numColumns: - - - - {renderSmallSwitchOption( - 'Virtualized', - this.state.virtualized, - this._setBooleanValue('virtualized'), - )} - {renderSmallSwitchOption( - 'Fixed Height', - this.state.fixedHeight, - this._setBooleanValue('fixedHeight'), - )} - {renderSmallSwitchOption( - 'Log Viewable', - this.state.logViewable, - this._setBooleanValue('logViewable'), - )} - - - - - Alert.alert('Alert', 'onRefresh: nothing to refresh :P') - } - refreshing={false} - renderItem={this._renderItemComponent} - disableVirtualization={!this.state.virtualized} - onViewableItemsChanged={this._onViewableItemsChanged} - testID="flatlist-multicolumn" - accessible - /> - - ); - } - _getItemLayout( - data: any, - index: number, - ): { - length: number, - offset: number, - index: number, - ... - } { + const _getItemLayout = (_data: any, index: number) => { const length = - getItemLayout(data, index).length + 2 * (CARD_MARGIN + BORDER_WIDTH); + getItemLayout(_data, index).length + 2 * (CARD_MARGIN + BORDER_WIDTH); return {length, offset: length * index, index}; - } - _renderItemComponent = ({item}: RenderItemProps): $FlowFixMe => { + }; + + const _renderItemComponent = ({ + item, + }: RenderItemProps): $FlowFixMe => { return ( ); }; + // This is called when items change viewability by scrolling into or out of the viewable area. - _onViewableItemsChanged = (info: { + const _onViewableItemsChanged = (info: { changed: Array<{ key: string, isViewable: boolean, @@ -165,7 +93,7 @@ class MultiColumnExample extends React.PureComponent< ... }) => { // Impressions can be logged here - if (this.state.logViewable) { + if (logViewable) { infoLog( 'onViewableItemsChanged: ', info.changed.map(v => ({...v, item: '...'})), @@ -173,18 +101,74 @@ class MultiColumnExample extends React.PureComponent< } }; - _pressItem = (key: string) => { + const _pressItem = (key: string) => { const index = Number(key); - const itemState = pressItem(this.state.data[index]); - this.setState(state => ({ - ...state, - data: [ - ...state.data.slice(0, index), - itemState, - ...state.data.slice(index + 1), - ], - })); + const itemState = pressItem(data[index]); + setData(state => [ + ...state.slice(0, index), + itemState, + ...state.slice(index + 1), + ]); }; + + const filterRegex = new RegExp(String(filterText), 'i'); + const filter = (item: any | Item) => + filterRegex.test(item.text) || filterRegex.test(item.title); + const filteredData = data.filter(filter); + + return ( + - MultiColumn'} noScroll={true}> + + + + numColumns: + + + + {renderSmallSwitchOption( + 'Virtualized', + virtualized, + _setBooleanValue('virtualized'), + )} + {renderSmallSwitchOption( + 'Fixed Height', + fixedHeight, + _setBooleanValue('fixedHeight'), + )} + {renderSmallSwitchOption( + 'Log Viewable', + logViewable, + _setBooleanValue('logViewable'), + )} + + + + + Alert.alert('Alert', 'onRefresh: nothing to refresh :P') + } + refreshing={false} + renderItem={_renderItemComponent} + disableVirtualization={virtualized} + onViewableItemsChanged={_onViewableItemsChanged} + /> + + ); } const CARD_MARGIN = 4; diff --git a/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-nested.windows.js b/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-nested.windows.js index b6294a5dd7b..23c2964a56d 100644 --- a/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-nested.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples/FlatList/FlatList-nested.windows.js @@ -9,13 +9,15 @@ */ 'use strict'; + import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; import type {ViewToken} from 'react-native/Libraries/Lists/ViewabilityHelper'; import type {RenderItemProps} from 'react-native/Libraries/Lists/VirtualizedList'; import RNTesterPage from '../../components/RNTesterPage'; +import RNTesterText from '../../components/RNTesterText'; import * as React from 'react'; -import {useCallback, useEffect, useReducer} from 'react'; +import {useCallback, useEffect, useMemo, useReducer} from 'react'; import {FlatList, StyleSheet, Text, View} from 'react-native'; type OuterItem = 'head' | 'vertical' | 'horizontal' | 'filler'; @@ -77,6 +79,14 @@ function reducer(state: ItemsState, action: ItemsAction): ItemsState { function NestedListExample(): React.Node { const [outer, dispatchOuter] = useReducer(reducer, initialItemsState); const [inner, dispatchInner] = useReducer(reducer, initialItemsState); + const sortedInnerViewableItems = useMemo( + () => [...inner.viewableItems].sort((a, b) => a - b).join(', '), + [inner.viewableItems], + ); + const sortedInnerRenderedItems = useMemo( + () => [...inner.renderedItems].sort((a, b) => a - b).join(', '), + [inner.renderedItems], + ); const onViewableItemsChanged = useCallback( ({ @@ -98,30 +108,30 @@ function NestedListExample(): React.Node { return ( - + Outer Viewable:{'\n'} {outerItems .map((item, i) => ({item, i})) .filter(o => outer.viewableItems.includes(o.i)) .map(({item, i}) => `${i} (${item})`) .join(', ')} - - + + Outer Rendered:{'\n'} {outerItems .map((item, i) => ({item, i})) .filter(o => outer.renderedItems.includes(o.i)) .map(({item, i}) => `${i} (${item})`) .join(', ')} - - + + Inner Viewable:{'\n'} - {inner.viewableItems.sort((a, b) => a - b).join(', ')} - - + {sortedInnerViewableItems} + + Inner Rendered:{'\n'} - {inner.renderedItems.sort((a, b) => a - b).join(', ')} - + {sortedInnerRenderedItems} + { - const isEnabled = ReactNativeFeatureFlags.loadVectorDrawablesOnImages(); return ( - Enabled: {isEnabled ? 'true' : 'false'} + + When allowFontScaling is enabled, you can use the maxFontSizeMultiplier + prop to set an upper limit on how much the font size will be scaled. + + + This text will not scale up (max 1x) + + + This text will scale up (max 1.5x) + + + Inherit max (max 1x) + + + + Override inherited max (max 1.5x) + + + + Ignore inherited max (no max) + + + ); +} + function NumberOfLinesExample(props: {}): React.Node { return ( <> @@ -1657,6 +1688,13 @@ const examples = [ return ; }, }, + { + title: 'maxFontSizeMultiplier attribute', + name: 'maxFontSizeMultiplier', + render(): React.Node { + return ; + }, + }, { title: 'selectable attribute', name: 'selectable', diff --git a/packages/@react-native-windows/tester/src/js/examples/TextInput/TextInputExample.windows.js b/packages/@react-native-windows/tester/src/js/examples/TextInput/TextInputExample.windows.js index 1e63252b632..8c1bfc7adf2 100644 --- a/packages/@react-native-windows/tester/src/js/examples/TextInput/TextInputExample.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples/TextInput/TextInputExample.windows.js @@ -544,6 +544,59 @@ const examples: Array = [ ); }, }, + { + title: 'allowFontScaling attribute', + render: function (): React.Node { + return ( + + + By default, text will respect Text Size accessibility setting on + Android. It means that all font sizes will be increased or decreased + depending on the value of the Text Size setting in the OS's Settings + app. + + + + + ); + }, + }, + { + title: 'maxFontSizeMultiplier attribute', + name: 'maxFontSizeMultiplier', + render(): React.Node { + return ( + + + When allowFontScaling is enabled, you can use the + maxFontSizeMultiplier prop to set an upper limit on how much the + font size will be scaled. + + + + + ); + }, + }, { title: 'Auto-expanding', render: function (): React.Node { diff --git a/packages/@react-native-windows/tester/src/js/examples/TurboModule/SampleTurboModuleExample.windows.js b/packages/@react-native-windows/tester/src/js/examples/TurboModule/SampleTurboModuleExample.windows.js index fc7676c1d12..de9761cfa2f 100644 --- a/packages/@react-native-windows/tester/src/js/examples/TurboModule/SampleTurboModuleExample.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples/TurboModule/SampleTurboModuleExample.windows.js @@ -204,7 +204,7 @@ class SampleTurboModuleExample extends React.Component<{}, State> { } componentDidMount(): void { - if (global.__turboModuleProxy == null) { + if (global.__turboModuleProxy == null && global.nativeModuleProxy == null) { throw new Error( 'Cannot load this example because TurboModule is not configured.', ); diff --git a/packages/@react-native/monorepo/overrides.json b/packages/@react-native/monorepo/overrides.json index 9d88e9bea28..df6e79f7cbb 100644 --- a/packages/@react-native/monorepo/overrides.json +++ b/packages/@react-native/monorepo/overrides.json @@ -1,11 +1,11 @@ { - "baseVersion": "0.79.0-nightly-20250123-d1028885e", + "baseVersion": "0.79.0-nightly-20250206-fb8a6a5bb", "overrides": [ { "type": "patch", "file": "package.json", "baseFile": "package.json", - "baseHash": "5bb6beee76087729e093f6223a3fa5dd270e5181" + "baseHash": "6afab29369232ddc5bad62abe9ec3281495d722f" } ] } \ No newline at end of file diff --git a/packages/@react-native/monorepo/package.json b/packages/@react-native/monorepo/package.json index 43c9dfabb50..74da9ac872b 100644 --- a/packages/@react-native/monorepo/package.json +++ b/packages/@react-native/monorepo/package.json @@ -48,8 +48,8 @@ "@definitelytyped/dtslint": "^0.0.127", "@jest/create-cache-key-function": "^29.6.3", "@pkgjs/parseargs": "^0.11.0", - "@react-native/metro-babel-transformer": "0.79.0-nightly-20250123-d1028885e", - "@react-native/metro-config": "0.79.0-nightly-20250123-d1028885e", + "@react-native/metro-babel-transformer": "0.79.0-nightly-20250206-fb8a6a5bb", + "@react-native/metro-config": "0.79.0-nightly-20250206-fb8a6a5bb", "@tsconfig/node18": "1.0.1", "@types/react": "^19.0.0", "@typescript-eslint/parser": "^7.1.1", diff --git a/packages/@react-native/tester/js/examples/ActionSheetIOS/ActionSheetIOSExample.js b/packages/@react-native/tester/js/examples/ActionSheetIOS/ActionSheetIOSExample.js index 2eaaef5fb1b..c31765f8c29 100644 --- a/packages/@react-native/tester/js/examples/ActionSheetIOS/ActionSheetIOSExample.js +++ b/packages/@react-native/tester/js/examples/ActionSheetIOS/ActionSheetIOSExample.js @@ -359,11 +359,11 @@ class ShareActionSheetExample extends React.Component< subject: 'a subject to go in the email heading', excludedActivityTypes: ['com.apple.UIKit.activity.PostToTwitter'], }, - error => Alert.alert('Error', error), + error => Alert.alert('Error', error?.message), (completed, method) => { let text; if (completed) { - text = `Shared via ${method}`; + text = `Shared via ${method ?? 'unknown'}`; } else { text = "You didn't share"; } @@ -410,11 +410,11 @@ class ShareScreenshotExample extends React.Component< url: uri, excludedActivityTypes: ['com.apple.UIKit.activity.PostToTwitter'], }, - error => Alert.alert('Error', error), + error => Alert.alert('Error', error?.message), (completed, method) => { let text; if (completed) { - text = `Shared via ${method}`; + text = `Shared via ${method ?? 'unknown'}`; } else { text = "You didn't share"; } @@ -474,11 +474,11 @@ class ShareScreenshotAnchorExample extends React.Component< ? findNodeHandle(this.anchorRef.current) : undefined, }, - error => Alert.alert('Error', error), + error => Alert.alert('Error', error?.message), (completed, method) => { let text; if (completed) { - text = `Shared via ${method}`; + text = `Shared via ${method ?? 'unknown'}`; } else { text = "You didn't share"; } diff --git a/packages/@react-native/tester/js/examples/FlatList/FlatList-multiColumn.js b/packages/@react-native/tester/js/examples/FlatList/FlatList-multiColumn.js index 0d421693d14..1a7e530005c 100644 --- a/packages/@react-native/tester/js/examples/FlatList/FlatList-multiColumn.js +++ b/packages/@react-native/tester/js/examples/FlatList/FlatList-multiColumn.js @@ -14,7 +14,7 @@ import type {Item} from '../../components/ListExampleShared'; import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; import type {RenderItemProps} from 'react-native/Libraries/Lists/VirtualizedList'; -const { +import { FooterComponent, HeaderComponent, ItemComponent, @@ -24,134 +24,64 @@ const { getItemLayout, pressItem, renderSmallSwitchOption, -} = require('../../components/ListExampleShared'); -const RNTesterPage = require('../../components/RNTesterPage'); -const React = require('react'); -const {Alert, FlatList, StyleSheet, Text, View} = require('react-native'); -const infoLog = require('react-native/Libraries/Utilities/infoLog'); +} from '../../components/ListExampleShared'; +import RNTesterPage from '../../components/RNTesterPage'; +import RNTesterText from '../../components/RNTesterText'; +import React from 'react'; +import {Alert, FlatList, StyleSheet, View} from 'react-native'; +import infoLog from 'react-native/Libraries/Utilities/infoLog'; -class MultiColumnExample extends React.PureComponent< - $FlowFixMeProps, - $FlowFixMeState, -> { - state: - | any - | { - data: Array, - filterText: string, - fixedHeight: boolean, - logViewable: boolean, - numColumns: number, - virtualized: boolean, - } = { - data: genNewerItems(1000), - filterText: '', - fixedHeight: true, - logViewable: false, - numColumns: 2, - virtualized: true, - }; - /* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's - * LTI update could not be added via codemod */ - _onChangeFilterText = filterText => { - this.setState(() => ({filterText})); +function MultiColumnExample(): React.Node { + const [data, setData] = React.useState(genNewerItems(1000)); + const [filterText, setFilterText] = React.useState(''); + const [fixedHeight, setFixedHeight] = React.useState(true); + const [logViewable, setLogViewable] = React.useState(false); + const [numColumns, setNumColumns] = React.useState(2); + const [virtualized, setVirtualized] = React.useState(true); + + const _onChangeFilterText = (_filterText: string) => { + setFilterText(_filterText); }; - _onChangeNumColumns = (numColumns: mixed) => { - this.setState(() => ({numColumns: Number(numColumns)})); + const _onChangeNumColumns = (_numColumns: mixed) => { + setNumColumns(Number(_numColumns)); }; - _setBooleanValue: string => boolean => void = key => value => - this.setState({[key]: value}); + const _setBooleanValue = (key: string) => (value: boolean) => { + switch (key) { + case 'virtualized': + setVirtualized(value); + break; + case 'fixedHeight': + setFixedHeight(value); + break; + case 'logViewable': + setLogViewable(value); + break; + } + }; - render(): React.Node { - const filterRegex = new RegExp(String(this.state.filterText), 'i'); - const filter = (item: any | Item) => - filterRegex.test(item.text) || filterRegex.test(item.title); - const filteredData = this.state.data.filter(filter); - return ( - - MultiColumn'} - noScroll={true}> - - - - numColumns: - - - - {renderSmallSwitchOption( - 'Virtualized', - this.state.virtualized, - this._setBooleanValue('virtualized'), - )} - {renderSmallSwitchOption( - 'Fixed Height', - this.state.fixedHeight, - this._setBooleanValue('fixedHeight'), - )} - {renderSmallSwitchOption( - 'Log Viewable', - this.state.logViewable, - this._setBooleanValue('logViewable'), - )} - - - - - Alert.alert('Alert', 'onRefresh: nothing to refresh :P') - } - refreshing={false} - renderItem={this._renderItemComponent} - disableVirtualization={!this.state.virtualized} - onViewableItemsChanged={this._onViewableItemsChanged} - /> - - ); - } - _getItemLayout( - data: any, - index: number, - ): { - length: number, - offset: number, - index: number, - ... - } { + const _getItemLayout = (_data: any, index: number) => { const length = - getItemLayout(data, index).length + 2 * (CARD_MARGIN + BORDER_WIDTH); + getItemLayout(_data, index).length + 2 * (CARD_MARGIN + BORDER_WIDTH); return {length, offset: length * index, index}; - } - _renderItemComponent = ({item}: RenderItemProps): $FlowFixMe => { + }; + + const _renderItemComponent = ({ + item, + }: RenderItemProps): $FlowFixMe => { return ( ); }; + // This is called when items change viewability by scrolling into or out of the viewable area. - _onViewableItemsChanged = (info: { + const _onViewableItemsChanged = (info: { changed: Array<{ key: string, isViewable: boolean, @@ -163,7 +93,7 @@ class MultiColumnExample extends React.PureComponent< ... }) => { // Impressions can be logged here - if (this.state.logViewable) { + if (logViewable) { infoLog( 'onViewableItemsChanged: ', info.changed.map(v => ({...v, item: '...'})), @@ -171,18 +101,74 @@ class MultiColumnExample extends React.PureComponent< } }; - _pressItem = (key: string) => { + const _pressItem = (key: string) => { const index = Number(key); - const itemState = pressItem(this.state.data[index]); - this.setState(state => ({ - ...state, - data: [ - ...state.data.slice(0, index), - itemState, - ...state.data.slice(index + 1), - ], - })); + const itemState = pressItem(data[index]); + setData(state => [ + ...state.slice(0, index), + itemState, + ...state.slice(index + 1), + ]); }; + + const filterRegex = new RegExp(String(filterText), 'i'); + const filter = (item: any | Item) => + filterRegex.test(item.text) || filterRegex.test(item.title); + const filteredData = data.filter(filter); + + return ( + - MultiColumn'} noScroll={true}> + + + + numColumns: + + + + {renderSmallSwitchOption( + 'Virtualized', + virtualized, + _setBooleanValue('virtualized'), + )} + {renderSmallSwitchOption( + 'Fixed Height', + fixedHeight, + _setBooleanValue('fixedHeight'), + )} + {renderSmallSwitchOption( + 'Log Viewable', + logViewable, + _setBooleanValue('logViewable'), + )} + + + + + Alert.alert('Alert', 'onRefresh: nothing to refresh :P') + } + refreshing={false} + renderItem={_renderItemComponent} + disableVirtualization={virtualized} + onViewableItemsChanged={_onViewableItemsChanged} + /> + + ); } const CARD_MARGIN = 4; diff --git a/packages/@react-native/tester/js/examples/FlatList/FlatList-nested.js b/packages/@react-native/tester/js/examples/FlatList/FlatList-nested.js index be2f8eac525..a4d96e5feb8 100644 --- a/packages/@react-native/tester/js/examples/FlatList/FlatList-nested.js +++ b/packages/@react-native/tester/js/examples/FlatList/FlatList-nested.js @@ -9,13 +9,15 @@ */ 'use strict'; + import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; import type {ViewToken} from 'react-native/Libraries/Lists/ViewabilityHelper'; import type {RenderItemProps} from 'react-native/Libraries/Lists/VirtualizedList'; import RNTesterPage from '../../components/RNTesterPage'; +import RNTesterText from '../../components/RNTesterText'; import * as React from 'react'; -import {useCallback, useEffect, useReducer} from 'react'; +import {useCallback, useEffect, useMemo, useReducer} from 'react'; import {FlatList, StyleSheet, Text, View} from 'react-native'; type OuterItem = 'head' | 'vertical' | 'horizontal' | 'filler'; @@ -77,6 +79,14 @@ function reducer(state: ItemsState, action: ItemsAction): ItemsState { function NestedListExample(): React.Node { const [outer, dispatchOuter] = useReducer(reducer, initialItemsState); const [inner, dispatchInner] = useReducer(reducer, initialItemsState); + const sortedInnerViewableItems = useMemo( + () => [...inner.viewableItems].sort((a, b) => a - b).join(', '), + [inner.viewableItems], + ); + const sortedInnerRenderedItems = useMemo( + () => [...inner.renderedItems].sort((a, b) => a - b).join(', '), + [inner.renderedItems], + ); const onViewableItemsChanged = useCallback( ({ @@ -98,38 +108,30 @@ function NestedListExample(): React.Node { return ( - + Outer Viewable:{'\n'} {outerItems .map((item, i) => ({item, i})) .filter(o => outer.viewableItems.includes(o.i)) .map(({item, i}) => `${i} (${item})`) .join(', ')} - - + + Outer Rendered:{'\n'} {outerItems .map((item, i) => ({item, i})) .filter(o => outer.renderedItems.includes(o.i)) .map(({item, i}) => `${i} (${item})`) .join(', ')} - - + + Inner Viewable:{'\n'} - { - // $FlowFixMe[react-rule-hook-mutation] - // $FlowFixMe[missing-local-annot] - inner.viewableItems.sort((a, b) => a - b).join(', ') - } - - + {sortedInnerViewableItems} + + Inner Rendered:{'\n'} - { - // $FlowFixMe[react-rule-hook-mutation] - // $FlowFixMe[missing-local-annot] - inner.renderedItems.sort((a, b) => a - b).join(', ') - } - + {sortedInnerRenderedItems} + ; diff --git a/packages/@react-native/tester/js/examples/Image/ImageExample.js b/packages/@react-native/tester/js/examples/Image/ImageExample.js index 938eedbe910..b770485f63f 100644 --- a/packages/@react-native/tester/js/examples/Image/ImageExample.js +++ b/packages/@react-native/tester/js/examples/Image/ImageExample.js @@ -579,10 +579,8 @@ class OnPartialLoadExample extends React.Component< } const VectorDrawableExample = () => { - const isEnabled = ReactNativeFeatureFlags.loadVectorDrawablesOnImages(); return ( - Enabled: {isEnabled ? 'true' : 'false'} { const observer = new PerformanceObserver(list => { - setEntries( - list.getEntries().filter(entry => entry.name.startsWith('rntester-')), - ); + const newEntries = list + .getEntries() + .filter(entry => entry.name.startsWith('rntester-')); + if (newEntries.length > 0) { + setEntries(newEntries); + } }); observer.observe({entryTypes: ['mark', 'measure']}); diff --git a/packages/@react-native/tester/js/examples/Snapshot/SnapshotViewIOS.android.js b/packages/@react-native/tester/js/examples/Snapshot/SnapshotViewIOS.android.js index 5e6d840c883..e9109b4bf93 100644 --- a/packages/@react-native/tester/js/examples/Snapshot/SnapshotViewIOS.android.js +++ b/packages/@react-native/tester/js/examples/Snapshot/SnapshotViewIOS.android.js @@ -9,4 +9,5 @@ 'use strict'; -module.exports = require('react-native/Libraries/Components/UnimplementedViews/UnimplementedView'); +module.exports = + require('react-native/Libraries/Components/UnimplementedViews/UnimplementedView').default; diff --git a/packages/@react-native/tester/js/examples/Text/TextExample.android.js b/packages/@react-native/tester/js/examples/Text/TextExample.android.js index b77f4359aa0..15cdfec2979 100644 --- a/packages/@react-native/tester/js/examples/Text/TextExample.android.js +++ b/packages/@react-native/tester/js/examples/Text/TextExample.android.js @@ -482,6 +482,37 @@ function AllowFontScalingExample(props: {}): React.Node { ); } +function MaxFontSizeMultiplierExample(props: {}): React.Node { + return ( + + + When allowFontScaling is enabled, you can use the maxFontSizeMultiplier + prop to set an upper limit on how much the font size will be scaled. + + + This text will not scale up (max 1x) + + + This text will scale up (max 1.5x) + + + Inherit max (max 1x) + + + + Override inherited max (max 1.5x) + + + + Ignore inherited max (no max) + + + ); +} + function NumberOfLinesExample(props: {}): React.Node { return ( <> @@ -1462,6 +1493,13 @@ const examples = [ return ; }, }, + { + title: 'maxFontSizeMultiplier attribute', + name: 'maxFontSizeMultiplier', + render(): React.Node { + return ; + }, + }, { title: 'selectable attribute', name: 'selectable', diff --git a/packages/@react-native/tester/js/examples/Text/TextExample.ios.js b/packages/@react-native/tester/js/examples/Text/TextExample.ios.js index 968472ab3fe..6d80e60dbe3 100644 --- a/packages/@react-native/tester/js/examples/Text/TextExample.ios.js +++ b/packages/@react-native/tester/js/examples/Text/TextExample.ios.js @@ -26,7 +26,8 @@ const { TextInput, View, } = require('react-native'); -const TextAncestor = require('react-native/Libraries/Text/TextAncestor'); +const TextAncestor = + require('react-native/Libraries/Text/TextAncestor').default; // TODO: Is there a cleaner way to flip the TextAncestor value to false? I // suspect apps won't even be able to leverage this workaround because @@ -1175,6 +1176,62 @@ const examples = [ ); }, }, + { + title: 'maxFontSizeMultiplier attribute', + name: 'maxFontSizeMultiplier', + render(): React.Node { + return ( + + + When allowFontScaling is enabled, you can use the + maxFontSizeMultiplier prop to set an upper limit on how much the + font size will be scaled. + + + This text will not scale up (max 1x) + + + This text will scale up (max 1.5x) + + + Inherit max (max 1x) + + + + Override inherited max (max 1.5x) + + + + Ignore inherited max (no max) + + + This text will scale with 'title2' dynamic type ramp (no max) + + + This text will scale with 'title2' dynamic type ramp (max 1.2x) + + + This text uses 'title2' dynamic type ramp but will not scale up (max + 1x) + + + ); + }, + }, { title: 'Inline views', render: (): React.Node => , @@ -1440,9 +1497,27 @@ const examples = [ Title 3 + + Headline + Body + + Callout + + + Subheadline + + + Footnote + + + Caption + + + Caption 2 + Without `dynamicTypeRamp`: @@ -1450,7 +1525,13 @@ const examples = [ Title Title 2 Title 3 + Headline Body + Callout + Subheadline + Footnote + Caption + Caption 2 ); diff --git a/packages/@react-native/tester/js/examples/TextInput/TextInputExample.android.js b/packages/@react-native/tester/js/examples/TextInput/TextInputExample.android.js index 7aaaa032889..948635ff940 100644 --- a/packages/@react-native/tester/js/examples/TextInput/TextInputExample.android.js +++ b/packages/@react-native/tester/js/examples/TextInput/TextInputExample.android.js @@ -305,6 +305,59 @@ const examples: Array = [ ); }, }, + { + title: 'allowFontScaling attribute', + render: function (): React.Node { + return ( + + + By default, text will respect Text Size accessibility setting on + Android. It means that all font sizes will be increased or decreased + depending on the value of the Text Size setting in the OS's Settings + app. + + + + + ); + }, + }, + { + title: 'maxFontSizeMultiplier attribute', + name: 'maxFontSizeMultiplier', + render(): React.Node { + return ( + + + When allowFontScaling is enabled, you can use the + maxFontSizeMultiplier prop to set an upper limit on how much the + font size will be scaled. + + + + + ); + }, + }, { title: 'Text Auto Complete', render: function (): React.Node { diff --git a/packages/@react-native/tester/js/examples/TextInput/TextInputExample.ios.js b/packages/@react-native/tester/js/examples/TextInput/TextInputExample.ios.js index d94a57d4b1b..c04b37a6189 100644 --- a/packages/@react-native/tester/js/examples/TextInput/TextInputExample.ios.js +++ b/packages/@react-native/tester/js/examples/TextInput/TextInputExample.ios.js @@ -14,7 +14,7 @@ import type { RNTesterModule, RNTesterModuleExample, } from '../../types/RNTesterTypes'; -import type {KeyboardType} from 'react-native/Libraries/Components/TextInput/TextInput'; +import type {KeyboardTypeOptions} from 'react-native/Libraries/Components/TextInput/TextInput'; import RNTesterText from '../../components/RNTesterText'; import ExampleTextInput from './ExampleTextInput'; @@ -124,11 +124,11 @@ class TextInputAccessoryViewChangeKeyboardExample extends React.Component< class TextInputAccessoryViewDefaultDoneButtonExample extends React.Component< $ReadOnly<{ - keyboardType: KeyboardType, + keyboardType: KeyboardTypeOptions, }>, {text: string}, > { - constructor(props: void | $ReadOnly<{keyboardType: KeyboardType}>) { + constructor(props: void | $ReadOnly<{keyboardType: KeyboardTypeOptions}>) { // $FlowFixMe[incompatible-call] super(props); this.state = {text: ''}; @@ -633,6 +633,14 @@ const textInputExamples: Array = [ style={styles.multiline} dataDetectorTypes="phoneNumber" /> + ); }, @@ -730,6 +738,61 @@ const textInputExamples: Array = [ ); }, }, + { + title: 'allowFontScaling attribute', + render: function (): React.Node { + return ( + + + By default, text will respect Text Size accessibility setting on + iOS. It means that all font sizes will be increased or decreased + depending on the value of Text Size setting in{' '} + + Settings.app - Display & Brightness - Text Size + + + + + + ); + }, + }, + { + title: 'maxFontSizeMultiplier attribute', + name: 'maxFontSizeMultiplier', + render(): React.Node { + return ( + + + When allowFontScaling is enabled, you can use the + maxFontSizeMultiplier prop to set an upper limit on how much the + font size will be scaled. + + + + + ); + }, + }, { title: 'Auto-expanding', render: function (): React.Node { diff --git a/packages/@react-native/tester/js/examples/TurboModule/NativeCxxModuleExampleExample.js b/packages/@react-native/tester/js/examples/TurboModule/NativeCxxModuleExampleExample.js index ab09da1a832..f4f32dbf5dc 100644 --- a/packages/@react-native/tester/js/examples/TurboModule/NativeCxxModuleExampleExample.js +++ b/packages/@react-native/tester/js/examples/TurboModule/NativeCxxModuleExampleExample.js @@ -261,7 +261,7 @@ class NativeCxxModuleExampleExample extends React.Component<{}, State> { } componentDidMount(): void { - if (global.__turboModuleProxy == null) { + if (global.__turboModuleProxy == null && global.nativeModuleProxy == null) { throw new Error( 'Cannot load this example because TurboModule is not configured.', ); diff --git a/packages/@react-native/tester/js/examples/TurboModule/SampleTurboModuleExample.js b/packages/@react-native/tester/js/examples/TurboModule/SampleTurboModuleExample.js index 36d413618c6..9af1b932694 100644 --- a/packages/@react-native/tester/js/examples/TurboModule/SampleTurboModuleExample.js +++ b/packages/@react-native/tester/js/examples/TurboModule/SampleTurboModuleExample.js @@ -204,7 +204,7 @@ class SampleTurboModuleExample extends React.Component<{}, State> { } componentDidMount(): void { - if (global.__turboModuleProxy == null) { + if (global.__turboModuleProxy == null && global.nativeModuleProxy == null) { throw new Error( 'Cannot load this example because TurboModule is not configured.', ); diff --git a/packages/@react-native/tester/js/utils/useJsStalls.js b/packages/@react-native/tester/js/utils/useJsStalls.js index 5ceac1505d2..e8c4a7fdd27 100644 --- a/packages/@react-native/tester/js/utils/useJsStalls.js +++ b/packages/@react-native/tester/js/utils/useJsStalls.js @@ -56,7 +56,8 @@ const useJsStalls = (): ({ }, []); const onEnableJsStallsTracking = React.useCallback(() => { - const JSEventLoopWatchdog = require('react-native/Libraries/Interaction/JSEventLoopWatchdog'); + const JSEventLoopWatchdog = + require('react-native/Libraries/Interaction/JSEventLoopWatchdog').default; JSEventLoopWatchdog.install({thresholdMS: 25}); diff --git a/packages/@react-native/tester/overrides.json b/packages/@react-native/tester/overrides.json index 8a3b13d90c9..c3b719825e8 100644 --- a/packages/@react-native/tester/overrides.json +++ b/packages/@react-native/tester/overrides.json @@ -1,5 +1,5 @@ { - "baseVersion": "0.79.0-nightly-20250123-d1028885e", + "baseVersion": "0.79.0-nightly-20250206-fb8a6a5bb", "overrides": [ { "type": "copy", @@ -26,7 +26,7 @@ "type": "copy", "directory": "js/examples/ActionSheetIOS", "baseDirectory": "packages/rn-tester/js/examples/ActionSheetIOS", - "baseHash": "cad8a1db4b8142844520247088dfc5649debd52b", + "baseHash": "5b0d13a8c631c5d718965258d56d2030ba745274", "issue": 4054 }, { @@ -152,14 +152,14 @@ "type": "copy", "directory": "js/examples/FlatList", "baseDirectory": "packages/rn-tester/js/examples/FlatList", - "baseHash": "aa8051846d28b31155e940585b5c2250b5c5eb58", + "baseHash": "5313873ce66065760e374653c918524051a5d745", "issue": 4054 }, { "type": "copy", "directory": "js/examples/Image", "baseDirectory": "packages/rn-tester/js/examples/Image", - "baseHash": "e869d06e86817126412e8de812f992daf2b8b628", + "baseHash": "8f7a24f22fd7374ef8ed324bb08adcffb2d00fe8", "issue": 4054 }, { @@ -243,7 +243,7 @@ "type": "copy", "directory": "js/examples/MutationObserver", "baseDirectory": "packages/rn-tester/js/examples/MutationObserver", - "baseHash": "c3f3eca5c49bf5b9511e63ad4399fde6169966d1", + "baseHash": "706616acc950782bdca8d442b7e964cc2bc033cb", "issue": 4054 }, { @@ -292,7 +292,7 @@ "type": "copy", "directory": "js/examples/Performance", "baseDirectory": "packages/rn-tester/js/examples/Performance", - "baseHash": "b024f27ad92d5a60ab9d7273643407d46a073321", + "baseHash": "92bfefb1a48b340fb9728044cd7647464e357997", "issue": 0 }, { @@ -411,7 +411,7 @@ "type": "copy", "directory": "js/examples/Snapshot", "baseDirectory": "packages/rn-tester/js/examples/Snapshot", - "baseHash": "b91c6cfaa07822120657e371138ae70c89a7e5da", + "baseHash": "2c3cc9d2ea4d276daa327925368efefd04d0b7e5", "issue": 4054 }, { @@ -439,7 +439,7 @@ "type": "copy", "directory": "js/examples/Text", "baseDirectory": "packages/rn-tester/js/examples/Text", - "baseHash": "99f58c32641c62d0f9db0baae80bda04ae41d3bb", + "baseHash": "3448bb4b09f3ec11e2923f7fa2463c611ef85006", "issue": 4054 }, { @@ -453,14 +453,14 @@ "type": "copy", "file": "js/examples/TextInput/TextInputExample.android.js", "baseFile": "packages/rn-tester/js/examples/TextInput/TextInputExample.android.js", - "baseHash": "fcd8e5e42372bb200be07d8339c644e76dfdb12e", + "baseHash": "8cc115a30795ee2fcf174e91f9cdbf56f4513a93", "issue": 14292 }, { "type": "copy", "file": "js/examples/TextInput/TextInputExample.ios.js", "baseFile": "packages/rn-tester/js/examples/TextInput/TextInputExample.ios.js", - "baseHash": "5d789b27ca07a69358e6e123c08acda3de5f08e2", + "baseHash": "19cf9695662fde3f6eddcb3346db4a951573553b", "issue": 14292 }, { @@ -523,7 +523,7 @@ "type": "copy", "directory": "js/examples/TurboModule", "baseDirectory": "packages/rn-tester/js/examples/TurboModule", - "baseHash": "9dee4e2dbf17865f0e8e902e6838131d6ac07e50", + "baseHash": "3d725a4186985f9b3072c83d8f92160d49623ffe", "issue": 4054 }, { @@ -621,7 +621,7 @@ "type": "copy", "file": "js/utils/useJsStalls.js", "baseFile": "packages/rn-tester/js/utils/useJsStalls.js", - "baseHash": "4b8631d7c3e20ca834b81b754a233b82b7d658ca", + "baseHash": "249b933993f4fe9d91e6e443035c27dfcdd2d65c", "issue": 4054 }, { @@ -656,7 +656,7 @@ "type": "patch", "file": "package.json", "baseFile": "packages/rn-tester/package.json", - "baseHash": "401e7b3eb6e7f23b08f0a00f2e2cc9d71e60aab1", + "baseHash": "465eafe4a4aa8296d839eb7f0e01b1966cc38044", "issue": 13228 } ] diff --git a/packages/@react-native/tester/package.json b/packages/@react-native/tester/package.json index b552d4cd40e..e28e402fbc3 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.78.0-main", + "version": "0.79.0-main", "private": true, "description": "React Native tester app.", "license": "MIT", diff --git a/packages/@rnw-scripts/babel-react-native-config/package.json b/packages/@rnw-scripts/babel-react-native-config/package.json index f293059508b..8dbbb65eb37 100644 --- a/packages/@rnw-scripts/babel-react-native-config/package.json +++ b/packages/@rnw-scripts/babel-react-native-config/package.json @@ -11,16 +11,16 @@ }, "dependencies": { "@babel/core": "^7.25.2", - "@react-native/babel-preset": "0.79.0-nightly-20250123-d1028885e", + "@react-native/babel-preset": "0.79.0-nightly-20250206-fb8a6a5bb", "babel-plugin-transform-flow-enums": "^0.0.2" }, "devDependencies": { "@babel/core": "^7.25.2", - "@react-native/babel-preset": "0.79.0-nightly-20250123-d1028885e", + "@react-native/babel-preset": "0.79.0-nightly-20250206-fb8a6a5bb", "eslint": "^8.19.0", "prettier": "2.8.8" }, "engines": { "node": ">= 18" } -} \ No newline at end of file +} diff --git a/packages/@rnw-scripts/metro-dev-config/package.json b/packages/@rnw-scripts/metro-dev-config/package.json index 27f39a4dc2c..e8b5fa55e36 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.79.0-nightly-20250123-d1028885e", + "@react-native/metro-config": "0.79.0-nightly-20250206-fb8a6a5bb", "@rnx-kit/metro-config": "^1.3.5", "@rnx-kit/metro-plugin-duplicates-checker": "^2.1.0", "@rnx-kit/metro-serializer": "^1.0.11", diff --git a/packages/e2e-test-app-fabric/package.json b/packages/e2e-test-app-fabric/package.json index 1ec6be2d081..68cd928ce96 100644 --- a/packages/e2e-test-app-fabric/package.json +++ b/packages/e2e-test-app-fabric/package.json @@ -20,7 +20,7 @@ "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "react": "^19.0.0", - "react-native": "0.79.0-nightly-20250123-d1028885e", + "react-native": "0.79.0-nightly-20250206-fb8a6a5bb", "react-native-windows": "^0.0.0-canary.952" }, "devDependencies": { @@ -32,7 +32,7 @@ "@react-native-community/cli": "15.0.0-alpha.2", "@react-native-windows/automation": "^0.3.374", "@react-native-windows/automation-commands": "^0.1.395", - "@react-native/metro-config": "0.79.0-nightly-20250123-d1028885e", + "@react-native/metro-config": "0.79.0-nightly-20250206-fb8a6a5bb", "@rnw-scripts/babel-node-config": "2.3.2", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.34", diff --git a/packages/e2e-test-app-fabric/test/__snapshots__/TextComponentTest.test.ts.snap b/packages/e2e-test-app-fabric/test/__snapshots__/TextComponentTest.test.ts.snap index 1370ced0168..9d526f39324 100644 --- a/packages/e2e-test-app-fabric/test/__snapshots__/TextComponentTest.test.ts.snap +++ b/packages/e2e-test-app-fabric/test/__snapshots__/TextComponentTest.test.ts.snap @@ -306,7 +306,7 @@ exports[`Text Tests Text can have a customized selection color 1`] = ` "Visual Tree": { "Comment": "text-selection-color", "Offset": "0, 0, 0", - "Size": "916, 20", + "Size": "916, 19", "Visual Type": "SpriteVisual", }, } @@ -740,7 +740,7 @@ exports[`Text Tests Text can have borders 1`] = ` "Visual Tree": { "Comment": "text-border", "Offset": "0, 0, 0", - "Size": "916, 385", + "Size": "916, 384", "Visual Type": "SpriteVisual", "__Children": [ { @@ -799,12 +799,12 @@ exports[`Text Tests Text can have borders 1`] = ` }, { "Offset": "100, 127, 0", - "Size": "716, 139", + "Size": "716, 138", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "716, 139", + "Size": "716, 138", "Visual Type": "SpriteVisual", "__Children": [ { @@ -853,12 +853,12 @@ exports[`Text Tests Text can have borders 1`] = ` }, { "Offset": "0, 365, 0", - "Size": "916, 19", + "Size": "916, 20", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "916, 19", + "Size": "916, 20", "Visual Type": "SpriteVisual", }, ], @@ -953,7 +953,7 @@ exports[`Text Tests Text can have inline views/images 1`] = ` "Visual Tree": { "Comment": "text-view", "Offset": "0, 0, 0", - "Size": "916, 26", + "Size": "916, 27", "Visual Type": "SpriteVisual", "__Children": [ { @@ -1037,29 +1037,29 @@ exports[`Text Tests Text can have nested views 1`] = ` "Visual Tree": { "Comment": "text-nested-view", "Offset": "0, 0, 0", - "Size": "916, 40", + "Size": "916, 41", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "916, 20", + "Size": "916, 19", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "916, 20", + "Size": "916, 19", "Visual Type": "SpriteVisual", }, ], }, { "Offset": "0, 18, 0", - "Size": "916, 23", + "Size": "916, 24", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "916, 23", + "Size": "916, 24", "Visual Type": "SpriteVisual", "__Children": [ { @@ -1223,17 +1223,17 @@ exports[`Text Tests Texts can clip inline View/Images 1`] = ` "Visual Tree": { "Comment": "text-view-images-clipped", "Offset": "0, 0, 0", - "Size": "916, 223", + "Size": "916, 222", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "916, 20", + "Size": "916, 19", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "916, 20", + "Size": "916, 19", "Visual Type": "SpriteVisual", }, ], @@ -1286,12 +1286,12 @@ exports[`Text Tests Texts can clip inline View/Images 1`] = ` }, { "Offset": "0, 103, 0", - "Size": "916, 19", + "Size": "916, 20", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "916, 19", + "Size": "916, 20", "Visual Type": "SpriteVisual", }, ], diff --git a/packages/e2e-test-app-fabric/test/__snapshots__/TextInputComponentTest.test.ts.snap b/packages/e2e-test-app-fabric/test/__snapshots__/TextInputComponentTest.test.ts.snap index 06c81d41b1a..1915498214b 100644 --- a/packages/e2e-test-app-fabric/test/__snapshots__/TextInputComponentTest.test.ts.snap +++ b/packages/e2e-test-app-fabric/test/__snapshots__/TextInputComponentTest.test.ts.snap @@ -950,7 +950,7 @@ exports[`TextInput Tests TextInputs can autogrow 1`] = ` "Visual Tree": { "Comment": "textinput-autogrow", "Offset": "0, 0, 0", - "Size": "300, 130", + "Size": "300, 131", "Visual Type": "SpriteVisual", "__Children": [ { @@ -1208,12 +1208,12 @@ exports[`TextInput Tests TextInputs can be defined as a set using accessibilityP }, { "Offset": "0, 62, 0", - "Size": "916, 33", + "Size": "916, 32", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "916, 33", + "Size": "916, 32", "Visual Type": "SpriteVisual", "__Children": [ { @@ -2913,7 +2913,7 @@ exports[`TextInput Tests TextInputs can have custom return key type, done 1`] = "Visual Tree": { "Comment": "textinput-return-done", "Offset": "0, 0, 0", - "Size": "916, 32", + "Size": "916, 33", "Visual Type": "SpriteVisual", "__Children": [ { @@ -3381,7 +3381,7 @@ exports[`TextInput Tests TextInputs can have custom return key type, send 1`] = "Visual Tree": { "Comment": "textinput-return-send", "Offset": "0, 0, 0", - "Size": "916, 33", + "Size": "916, 32", "Visual Type": "SpriteVisual", "__Children": [ { @@ -4255,7 +4255,7 @@ exports[`TextInput Tests TextInputs can have shadows 1`] = ` "Visual Tree": { "Comment": "textinput-shadow", "Offset": "0, 0, 0", - "Size": "916, 32", + "Size": "916, 33", "Visual Type": "SpriteVisual", "__Children": [ { @@ -5968,12 +5968,12 @@ exports[`TextInput Tests TextInputs which have a searchbox role should also supp "__Children": [ { "Offset": "0, 0, 0", - "Size": "916, 32", + "Size": "916, 33", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "916, 32", + "Size": "916, 33", "Visual Type": "SpriteVisual", "__Children": [ { diff --git a/packages/e2e-test-app-fabric/test/__snapshots__/snapshotPages.test.js.snap b/packages/e2e-test-app-fabric/test/__snapshots__/snapshotPages.test.js.snap index 4b21ff071e6..9ba2f48efbb 100644 --- a/packages/e2e-test-app-fabric/test/__snapshots__/snapshotPages.test.js.snap +++ b/packages/e2e-test-app-fabric/test/__snapshots__/snapshotPages.test.js.snap @@ -19743,9 +19743,14 @@ exports[`snapshotAllPages FlatList 9`] = ` > + + When allowFontScaling is enabled, you can use the maxFontSizeMultiplier prop to set an upper limit on how much the font size will be scaled. + + + This text will not scale up (max 1x) + + + This text will scale up (max 1.5x) + + + + Inherit max (max 1x) + + + + + Override inherited max (max 1.5x) + + + + + Ignore inherited max (no max) + + + +`; + +exports[`snapshotAllPages Text 30`] = ` `; -exports[`snapshotAllPages Text 30`] = ` +exports[`snapshotAllPages Text 31`] = ` `; -exports[`snapshotAllPages Text 31`] = ` +exports[`snapshotAllPages Text 32`] = ` `; -exports[`snapshotAllPages Text 32`] = ` +exports[`snapshotAllPages Text 33`] = ` [ @@ -71997,7 +72072,7 @@ exports[`snapshotAllPages Text 33`] = ` `; -exports[`snapshotAllPages Text 34`] = ` +exports[`snapshotAllPages Text 35`] = ` [ @@ -72369,7 +72444,7 @@ exports[`snapshotAllPages Text 35`] = ` `; -exports[`snapshotAllPages Text 36`] = ` +exports[`snapshotAllPages Text 37`] = ` [ `; -exports[`snapshotAllPages Text 38`] = ` +exports[`snapshotAllPages Text 39`] = ` `; -exports[`snapshotAllPages Text 39`] = ` +exports[`snapshotAllPages Text 40`] = ` `; -exports[`snapshotAllPages Text 40`] = ` +exports[`snapshotAllPages Text 41`] = ` `; -exports[`snapshotAllPages Text 41`] = ` +exports[`snapshotAllPages Text 42`] = ` `; -exports[`snapshotAllPages Text 42`] = ` +exports[`snapshotAllPages Text 43`] = ` `; -exports[`snapshotAllPages Text 43`] = ` +exports[`snapshotAllPages Text 44`] = ` `; -exports[`snapshotAllPages Text 44`] = ` +exports[`snapshotAllPages Text 45`] = ` `; -exports[`snapshotAllPages Text 45`] = ` +exports[`snapshotAllPages Text 46`] = ` @@ -73253,7 +73328,7 @@ exports[`snapshotAllPages Text 45`] = ` `; -exports[`snapshotAllPages Text 46`] = ` +exports[`snapshotAllPages Text 47`] = ` `; -exports[`snapshotAllPages Text 47`] = ` +exports[`snapshotAllPages Text 48`] = ` + + By default, text will respect Text Size accessibility setting on Android. It means that all font sizes will be increased or decreased depending on the value of the Text Size setting in the OS's Settings app. + + + + +`; + +exports[`snapshotAllPages TextInput 35`] = ` + + + When allowFontScaling is enabled, you can use the maxFontSizeMultiplier prop to set an upper limit on how much the font size will be scaled. + + + + +`; + +exports[`snapshotAllPages TextInput 36`] = ` `; -exports[`snapshotAllPages TextInput 35`] = ` +exports[`snapshotAllPages TextInput 37`] = ` `; -exports[`snapshotAllPages TextInput 36`] = ` +exports[`snapshotAllPages TextInput 38`] = ` `; -exports[`snapshotAllPages TextInput 37`] = ` +exports[`snapshotAllPages TextInput 39`] = ` `; -exports[`snapshotAllPages TextInput 38`] = ` +exports[`snapshotAllPages TextInput 40`] = ` `; -exports[`snapshotAllPages TextInput 39`] = ` +exports[`snapshotAllPages TextInput 41`] = ` `; -exports[`snapshotAllPages TextInput 40`] = ` +exports[`snapshotAllPages TextInput 42`] = ` Default submit key (Enter): @@ -80621,7 +80808,7 @@ exports[`snapshotAllPages TextInput 40`] = ` `; -exports[`snapshotAllPages TextInput 41`] = ` +exports[`snapshotAllPages TextInput 43`] = ` [ Spell Check Enabled: @@ -80736,7 +80923,7 @@ exports[`snapshotAllPages TextInput 42`] = ` ] `; -exports[`snapshotAllPages TextInput 43`] = ` +exports[`snapshotAllPages TextInput 45`] = ` CaretHidden @@ -80768,7 +80955,7 @@ exports[`snapshotAllPages TextInput 43`] = ` `; -exports[`snapshotAllPages TextInput 44`] = ` +exports[`snapshotAllPages TextInput 46`] = ` Cursorcolor @@ -80800,7 +80987,7 @@ exports[`snapshotAllPages TextInput 44`] = ` `; -exports[`snapshotAllPages TextInput 45`] = ` +exports[`snapshotAllPages TextInput 47`] = ` Shadow @@ -80838,7 +81025,7 @@ exports[`snapshotAllPages TextInput 45`] = ` `; -exports[`snapshotAllPages TextInput 46`] = ` +exports[`snapshotAllPages TextInput 48`] = ` `; -exports[`snapshotAllPages TextInput 47`] = ` +exports[`snapshotAllPages TextInput 49`] = ` { + public: + RD(Runtime& rt) : RuntimeDecorator(rt) {} + + String createStringFromUtf16(const char16_t* utf16, size_t length) + override { + return Runtime::createStringFromUtf16(utf16, length); + } + + PropNameID createPropNameIDFromUtf16(const char16_t* utf16, size_t length) + override { + return Runtime::createPropNameIDFromUtf16(utf16, length); + } + }; + + RD rd = RD(rt); + std::u16string utf16 = u"foobar"; + + auto jsString = String::createFromUtf16(rd, utf16); + EXPECT_EQ(jsString.utf16(rd), utf16); + auto prop = PropNameID::forUtf16(rd, utf16); + EXPECT_EQ(prop.utf16(rd), utf16); + + // 👋 in UTF-16 encoding is 0xd83d 0xdc4b + utf16 = u"hello!\xd83d\xdc4b"; + jsString = String::createFromUtf16(rd, utf16.data(), utf16.length()); + EXPECT_EQ(jsString.utf16(rd), utf16); + prop = PropNameID::forUtf16(rd, utf16); + EXPECT_EQ(prop.utf16(rd), utf16); + + utf16 = u"\xd83d"; + jsString = String::createFromUtf16(rd, utf16.data(), utf16.length()); + /// We need to use charCodeAt instead of UTF16 because the default + /// implementation of UTF16 converts to UTF8, then to UTF16, so we will lose + /// the lone surrogate value. + rd.global().setProperty(rd, "loneSurrogate", jsString); + auto cp = eval("loneSurrogate.charCodeAt(0)").getNumber(); + EXPECT_EQ(cp, 55357); // 0xD83D in decimal +} Windows] */ /* diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp index 087c440fb45..344efffb526 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp @@ -6,10 +6,13 @@ */ #include "NetworkIOAgent.h" -#include +#include "InspectorFlags.h" + #include "Base64.h" #include "Utf8.h" +#include + namespace facebook::react::jsinspector_modern { static constexpr long DEFAULT_BYTES_PER_READ = @@ -27,7 +30,7 @@ static constexpr std::array kTextMIMETypePrefixes{ // namespace { [Windows #13587] struct InitStreamResult { - int httpStatusCode; + uint32_t httpStatusCode; Headers headers; std::shared_ptr stream; }; @@ -113,7 +116,7 @@ class Stream : public NetworkRequestListener, processPending(); } - void onHeaders(int httpStatusCode, const Headers& headers) override { + void onHeaders(uint32_t httpStatusCode, const Headers& headers) override { // Find content-type through case-insensitive search of headers. for (const auto& [name, value] : headers) { std::string lowerName = name; @@ -263,6 +266,14 @@ bool NetworkIOAgent::handleRequest( handleIoClose(req); return true; } + + if (InspectorFlags::getInstance().getNetworkInspectionEnabled()) { + if (req.method == "Network.enable") { + frontendChannel_(cdp::jsonResult(req.id)); + return true; + } + } + return false; } @@ -438,4 +449,4 @@ void NetworkIOAgent::handleIoClose(const cdp::PreparsedRequest& req) { } } -} // namespace facebook::react::jsinspector_modern \ No newline at end of file +} // namespace facebook::react::jsinspector_modern diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h index a3d2fa2d5d8..2f8e4976801 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h @@ -43,7 +43,7 @@ struct ReadStreamParams { struct NetworkResource { bool success{}; std::optional stream; - std::optional httpStatusCode; + std::optional httpStatusCode; std::optional netErrorName; std::optional headers; folly::dynamic toDynamic() const { @@ -111,7 +111,7 @@ class NetworkRequestListener { * \param httpStatusCode The HTTP status code received. * \param headers Response headers as an unordered_map. */ - virtual void onHeaders(int httpStatusCode, const Headers& headers) = 0; + virtual void onHeaders(uint32_t httpStatusCode, const Headers& headers) = 0; /** * To be called by the delegate on receipt of data chunks. diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.cpp index 7fbf8b52ebf..fe11cf6b6c3 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.cpp +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #ifdef RN_DISABLE_OSS_PLUGIN_HEADER #include "Plugins.h" @@ -33,6 +34,19 @@ static RootShadowNode::Shared getCurrentShadowTreeRevision( return shadowTreeRevisionProvider->getCurrentRevision(surfaceId); } +static RootShadowNode::Shared getCurrentShadowTreeRevision( + facebook::jsi::Runtime& runtime, + jsi::Value& nativeNodeReference) { + if (nativeNodeReference.isNumber()) { + return getCurrentShadowTreeRevision( + runtime, static_cast(nativeNodeReference.asNumber())); + } + + return getCurrentShadowTreeRevision( + runtime, + shadowNodeFromValue(runtime, nativeNodeReference)->getSurfaceId()); +} + static facebook::react::PointerEventsProcessor& getPointerEventsProcessorFromRuntime(facebook::jsi::Runtime& runtime) { return facebook::react::UIManagerBinding::getBinding(runtime) @@ -58,81 +72,156 @@ getArrayOfInstanceHandlesFromShadowNodes( return nonNullInstanceHandles; } +static bool isRootShadowNode(const ShadowNode& shadowNode) { + return shadowNode.getTraits().check(ShadowNodeTraits::Trait::RootNodeKind); +} + #pragma mark - NativeDOM NativeDOM::NativeDOM(std::shared_ptr jsInvoker) : NativeDOMCxxSpec(std::move(jsInvoker)) {} -jsi::Value NativeDOM::getParentNode( +#pragma mark - Methods from the Node interface (for ReadOnlyNode). + +double NativeDOM::compareDocumentPosition( jsi::Runtime& rt, - jsi::Value shadowNodeValue) { - auto shadowNode = shadowNodeFromValue(rt, shadowNodeValue); - auto currentRevision = - getCurrentShadowTreeRevision(rt, shadowNode->getSurfaceId()); + jsi::Value nativeNodeReference, + jsi::Value otherNativeNodeReference) { + auto currentRevision = getCurrentShadowTreeRevision(rt, nativeNodeReference); if (currentRevision == nullptr) { - return jsi::Value::undefined(); + return dom::DOCUMENT_POSITION_DISCONNECTED; } - auto parentShadowNode = dom::getParentNode(currentRevision, *shadowNode); - if (parentShadowNode == nullptr) { - return jsi::Value::undefined(); + ShadowNode::Shared shadowNode; + ShadowNode::Shared otherShadowNode; + + // Check if document references are used + if (nativeNodeReference.isNumber() || otherNativeNodeReference.isNumber()) { + if (nativeNodeReference.isNumber() && otherNativeNodeReference.isNumber()) { + // Both are documents (and equality is handled in JS directly). + return dom::DOCUMENT_POSITION_DISCONNECTED; + } else if (nativeNodeReference.isNumber()) { + // Only the first is a document + auto surfaceId = nativeNodeReference.asNumber(); + shadowNode = currentRevision; + otherShadowNode = shadowNodeFromValue(rt, otherNativeNodeReference); + + if (isRootShadowNode(*otherShadowNode)) { + // If the other is a root node, we just need to check if it is its + // documentElement + return (surfaceId == otherShadowNode->getSurfaceId()) + ? dom::DOCUMENT_POSITION_CONTAINED_BY | + dom::DOCUMENT_POSITION_FOLLOWING + : dom::DOCUMENT_POSITION_DISCONNECTED; + } else { + // Otherwise, we'll use the root node to represent the document + // (the result should be the same) + } + } else { + // Only the second is a document + auto otherSurfaceId = otherNativeNodeReference.asNumber(); + shadowNode = shadowNodeFromValue(rt, nativeNodeReference); + otherShadowNode = getCurrentShadowTreeRevision(rt, static_cast(otherSurfaceId)); + + if (isRootShadowNode(*shadowNode)) { + // If this is a root node, we just need to check if the other is its + // document. + return (otherSurfaceId == shadowNode->getSurfaceId()) + ? dom::DOCUMENT_POSITION_CONTAINS | dom::DOCUMENT_POSITION_PRECEDING + : dom::DOCUMENT_POSITION_DISCONNECTED; + } else { + // Otherwise, we'll use the root node to represent the document + // (the result should be the same) + } + } + } else { + shadowNode = shadowNodeFromValue(rt, nativeNodeReference); + otherShadowNode = shadowNodeFromValue(rt, otherNativeNodeReference); } - return parentShadowNode->getInstanceHandle(rt); + return dom::compareDocumentPosition( + currentRevision, *shadowNode, *otherShadowNode); } std::vector NativeDOM::getChildNodes( jsi::Runtime& rt, - jsi::Value shadowNodeValue) { - auto shadowNode = shadowNodeFromValue(rt, shadowNodeValue); - auto currentRevision = - getCurrentShadowTreeRevision(rt, shadowNode->getSurfaceId()); + jsi::Value nativeNodeReference) { + auto currentRevision = getCurrentShadowTreeRevision(rt, nativeNodeReference); if (currentRevision == nullptr) { return std::vector{}; } - auto childNodes = dom::getChildNodes(currentRevision, *shadowNode); + // The only child node of the document is the root node. + if (nativeNodeReference.isNumber()) { + return getArrayOfInstanceHandlesFromShadowNodes({currentRevision}, rt); + } + + auto childNodes = dom::getChildNodes( + currentRevision, *shadowNodeFromValue(rt, nativeNodeReference)); return getArrayOfInstanceHandlesFromShadowNodes(childNodes, rt); } -bool NativeDOM::isConnected(jsi::Runtime& rt, jsi::Value shadowNodeValue) { - auto shadowNode = shadowNodeFromValue(rt, shadowNodeValue); +jsi::Value NativeDOM::getParentNode( + jsi::Runtime& rt, + jsi::Value nativeNodeReference) { + // The document does not have a parent node. + if (nativeNodeReference.isNumber()) { + return jsi::Value::undefined(); + } + + auto shadowNode = shadowNodeFromValue(rt, nativeNodeReference); + if (isRootShadowNode(*shadowNode)) { + // The parent of the root node is the document. + return jsi::Value{shadowNode->getSurfaceId()}; + } + auto currentRevision = getCurrentShadowTreeRevision(rt, shadowNode->getSurfaceId()); if (currentRevision == nullptr) { - return false; + return jsi::Value::undefined(); } - return dom::isConnected(currentRevision, *shadowNode); + auto parentShadowNode = dom::getParentNode(currentRevision, *shadowNode); + if (parentShadowNode == nullptr) { + return jsi::Value::undefined(); + } + + return parentShadowNode->getInstanceHandle(rt); } -double NativeDOM::compareDocumentPosition( - jsi::Runtime& rt, - jsi::Value shadowNodeValue, - jsi::Value otherShadowNodeValue) { - auto shadowNode = shadowNodeFromValue(rt, shadowNodeValue); - auto otherShadowNode = shadowNodeFromValue(rt, otherShadowNodeValue); - auto currentRevision = - getCurrentShadowTreeRevision(rt, shadowNode->getSurfaceId()); - if (otherShadowNode == nullptr || currentRevision == nullptr) { - return 0; +bool NativeDOM::isConnected(jsi::Runtime& rt, jsi::Value nativeNodeReference) { + auto currentRevision = getCurrentShadowTreeRevision(rt, nativeNodeReference); + if (currentRevision == nullptr) { + return false; } - return dom::compareDocumentPosition( - currentRevision, *shadowNode, *otherShadowNode); + // The document is connected because we got a value for current revision. + if (nativeNodeReference.isNumber()) { + return true; + } + + auto shadowNode = shadowNodeFromValue(rt, nativeNodeReference); + return dom::isConnected(currentRevision, *shadowNode); } -std::string NativeDOM::getTextContent( - jsi::Runtime& rt, - jsi::Value shadowNodeValue) { - auto shadowNode = shadowNodeFromValue(rt, shadowNodeValue); +#pragma mark - Methods from the Element interface (for ReactNativeElement). + +std::tuple< + /* topWidth: */ int, + /* rightWidth: */ int, + /* bottomWidth: */ int, + /* leftWidth: */ int> +NativeDOM::getBorderWidth(jsi::Runtime& rt, jsi::Value nativeElementReference) { + auto shadowNode = shadowNodeFromValue(rt, nativeElementReference); auto currentRevision = getCurrentShadowTreeRevision(rt, shadowNode->getSurfaceId()); if (currentRevision == nullptr) { - return ""; + return {0, 0, 0, 0}; } - return dom::getTextContent(currentRevision, *shadowNode); + auto borderWidth = dom::getBorderWidth(currentRevision, *shadowNode); + return std::tuple{ + borderWidth.top, borderWidth.right, borderWidth.bottom, borderWidth.left}; } std::tuple< @@ -142,9 +231,9 @@ std::tuple< /* height: */ double> NativeDOM::getBoundingClientRect( jsi::Runtime& rt, - jsi::Value shadowNodeValue, + jsi::Value nativeElementReference, bool includeTransform) { - auto shadowNode = shadowNodeFromValue(rt, shadowNodeValue); + auto shadowNode = shadowNodeFromValue(rt, nativeElementReference); auto currentRevision = getCurrentShadowTreeRevision(rt, shadowNode->getSurfaceId()); if (currentRevision == nullptr) { @@ -157,31 +246,25 @@ NativeDOM::getBoundingClientRect( return std::tuple{domRect.x, domRect.y, domRect.width, domRect.height}; } -std::tuple< - /* offsetParent: */ jsi::Value, - /* top: */ double, - /* left: */ double> -NativeDOM::getOffset(jsi::Runtime& rt, jsi::Value shadowNodeValue) { - auto shadowNode = shadowNodeFromValue(rt, shadowNodeValue); +std::tuple NativeDOM::getInnerSize( + jsi::Runtime& rt, + jsi::Value nativeElementReference) { + auto shadowNode = shadowNodeFromValue(rt, nativeElementReference); auto currentRevision = getCurrentShadowTreeRevision(rt, shadowNode->getSurfaceId()); if (currentRevision == nullptr) { - return {jsi::Value::undefined(), 0, 0}; + return {0, 0}; } - auto domOffset = dom::getOffset(currentRevision, *shadowNode); - - return std::tuple{ - domOffset.offsetParent == nullptr - ? jsi::Value::undefined() - : domOffset.offsetParent->getInstanceHandle(rt), - domOffset.top, - domOffset.left}; + auto innerSize = dom::getInnerSize(currentRevision, *shadowNode); + return std::tuple{innerSize.width, innerSize.height}; } std::tuple -NativeDOM::getScrollPosition(jsi::Runtime& rt, jsi::Value shadowNodeValue) { - auto shadowNode = shadowNodeFromValue(rt, shadowNodeValue); +NativeDOM::getScrollPosition( + jsi::Runtime& rt, + jsi::Value nativeElementReference) { + auto shadowNode = shadowNodeFromValue(rt, nativeElementReference); auto currentRevision = getCurrentShadowTreeRevision(rt, shadowNode->getSurfaceId()); if (currentRevision == nullptr) { @@ -193,8 +276,8 @@ NativeDOM::getScrollPosition(jsi::Runtime& rt, jsi::Value shadowNodeValue) { } std::tuple -NativeDOM::getScrollSize(jsi::Runtime& rt, jsi::Value shadowNodeValue) { - auto shadowNode = shadowNodeFromValue(rt, shadowNodeValue); +NativeDOM::getScrollSize(jsi::Runtime& rt, jsi::Value nativeElementReference) { + auto shadowNode = shadowNodeFromValue(rt, nativeElementReference); auto currentRevision = getCurrentShadowTreeRevision(rt, shadowNode->getSurfaceId()); if (currentRevision == nullptr) { @@ -205,82 +288,100 @@ NativeDOM::getScrollSize(jsi::Runtime& rt, jsi::Value shadowNodeValue) { return std::tuple{scrollSize.width, scrollSize.height}; } -std::tuple NativeDOM::getInnerSize( +std::string NativeDOM::getTagName( jsi::Runtime& rt, - jsi::Value shadowNodeValue) { - auto shadowNode = shadowNodeFromValue(rt, shadowNodeValue); - auto currentRevision = - getCurrentShadowTreeRevision(rt, shadowNode->getSurfaceId()); - if (currentRevision == nullptr) { - return {0, 0}; - } - - auto innerSize = dom::getInnerSize(currentRevision, *shadowNode); - return std::tuple{innerSize.width, innerSize.height}; + jsi::Value nativeElementReference) { + auto shadowNode = shadowNodeFromValue(rt, nativeElementReference); + return dom::getTagName(*shadowNode); } -std::tuple< - /* topWidth: */ int, - /* rightWidth: */ int, - /* bottomWidth: */ int, - /* leftWidth: */ int> -NativeDOM::getBorderWidth(jsi::Runtime& rt, jsi::Value shadowNodeValue) { - auto shadowNode = shadowNodeFromValue(rt, shadowNodeValue); +std::string NativeDOM::getTextContent( + jsi::Runtime& rt, + jsi::Value nativeNodeReference) { + auto shadowNode = shadowNodeFromValue(rt, nativeNodeReference); auto currentRevision = getCurrentShadowTreeRevision(rt, shadowNode->getSurfaceId()); if (currentRevision == nullptr) { - return {0, 0, 0, 0}; + return ""; } - auto borderWidth = dom::getBorderWidth(currentRevision, *shadowNode); - return std::tuple{ - borderWidth.top, borderWidth.right, borderWidth.bottom, borderWidth.left}; -} - -std::string NativeDOM::getTagName( - jsi::Runtime& rt, - jsi::Value shadowNodeValue) { - auto shadowNode = shadowNodeFromValue(rt, shadowNodeValue); - return dom::getTagName(*shadowNode); + return dom::getTextContent(currentRevision, *shadowNode); } -#pragma mark - Pointer events - bool NativeDOM::hasPointerCapture( jsi::Runtime& rt, - jsi::Value shadowNodeValue, + jsi::Value nativeElementReference, double pointerId) { bool isCapturing = getPointerEventsProcessorFromRuntime(rt).hasPointerCapture( - // [Windows] Cast to fix https://github.com/microsoft/react-native-windows/issues/14251 - static_cast(pointerId), shadowNodeFromValue(rt, shadowNodeValue).get()); + static_cast(pointerId), shadowNodeFromValue(rt, nativeElementReference).get()); return isCapturing; } +void NativeDOM::releasePointerCapture( + jsi::Runtime& rt, + jsi::Value nativeElementReference, + double pointerId) { + getPointerEventsProcessorFromRuntime(rt).releasePointerCapture( + static_cast(pointerId), shadowNodeFromValue(rt, nativeElementReference).get()); +} + void NativeDOM::setPointerCapture( jsi::Runtime& rt, - jsi::Value shadowNodeValue, + jsi::Value nativeElementReference, double pointerId) { getPointerEventsProcessorFromRuntime(rt).setPointerCapture( - // [Windows] Cast to fix https://github.com/microsoft/react-native-windows/issues/14251 - static_cast(pointerId), shadowNodeFromValue(rt, shadowNodeValue)); + static_cast(pointerId), shadowNodeFromValue(rt, nativeElementReference)); } -void NativeDOM::releasePointerCapture( +#pragma mark - Methods from the HTMLElement interface (for ReactNativeElement). + +std::tuple< + /* offsetParent: */ jsi::Value, + /* top: */ double, + /* left: */ double> +NativeDOM::getOffset(jsi::Runtime& rt, jsi::Value nativeElementReference) { + auto shadowNode = shadowNodeFromValue(rt, nativeElementReference); + auto currentRevision = + getCurrentShadowTreeRevision(rt, shadowNode->getSurfaceId()); + if (currentRevision == nullptr) { + return {jsi::Value::undefined(), 0, 0}; + } + + auto domOffset = dom::getOffset(currentRevision, *shadowNode); + + return std::tuple{ + domOffset.offsetParent == nullptr + ? jsi::Value::undefined() + : domOffset.offsetParent->getInstanceHandle(rt), + domOffset.top, + domOffset.left}; +} + +#pragma mark - Special methods to handle the root node. + +jsi::Value NativeDOM::linkRootNode( jsi::Runtime& rt, - jsi::Value shadowNodeValue, - double pointerId) { - getPointerEventsProcessorFromRuntime(rt).releasePointerCapture( - // [Windows] Cast to fix https://github.com/microsoft/react-native-windows/issues/14251 - static_cast(pointerId), shadowNodeFromValue(rt, shadowNodeValue).get()); + SurfaceId surfaceId, + jsi::Value instanceHandle) { + auto currentRevision = getCurrentShadowTreeRevision(rt, surfaceId); + if (currentRevision == nullptr) { + return jsi::Value::undefined(); + } + + auto instanceHandleWrapper = + std::make_shared(rt, instanceHandle, surfaceId); + currentRevision->setInstanceHandle(instanceHandleWrapper); + + return valueFromShadowNode(rt, currentRevision); } -#pragma mark - Legacy RN layout APIs +#pragma mark - Legacy layout APIs (for ReactNativeElement). void NativeDOM::measure( jsi::Runtime& rt, - jsi::Value shadowNodeValue, + jsi::Value nativeElementReference, jsi::Function callback) { - auto shadowNode = shadowNodeFromValue(rt, shadowNodeValue); + auto shadowNode = shadowNodeFromValue(rt, nativeElementReference); auto currentRevision = getCurrentShadowTreeRevision(rt, shadowNode->getSurfaceId()); if (currentRevision == nullptr) { @@ -302,9 +403,9 @@ void NativeDOM::measure( void NativeDOM::measureInWindow( jsi::Runtime& rt, - jsi::Value shadowNodeValue, + jsi::Value nativeElementReference, jsi::Function callback) { - auto shadowNode = shadowNodeFromValue(rt, shadowNodeValue); + auto shadowNode = shadowNodeFromValue(rt, nativeElementReference); auto currentRevision = getCurrentShadowTreeRevision(rt, shadowNode->getSurfaceId()); if (currentRevision == nullptr) { @@ -323,13 +424,13 @@ void NativeDOM::measureInWindow( void NativeDOM::measureLayout( jsi::Runtime& rt, - jsi::Value shadowNodeValue, - jsi::Value relativeToShadowNodeValue, + jsi::Value nativeElementReference, + jsi::Value relativeToNativeElementReference, jsi::Function onFail, jsi::Function onSuccess) { - auto shadowNode = shadowNodeFromValue(rt, shadowNodeValue); + auto shadowNode = shadowNodeFromValue(rt, nativeElementReference); auto relativeToShadowNode = - shadowNodeFromValue(rt, relativeToShadowNodeValue); + shadowNodeFromValue(rt, relativeToNativeElementReference); auto currentRevision = getCurrentShadowTreeRevision(rt, shadowNode->getSurfaceId()); if (currentRevision == nullptr) { @@ -355,4 +456,4 @@ void NativeDOM::measureLayout( jsi::Value{rt, rect.height}}); } -} // namespace facebook::react +} // namespace facebook::react \ No newline at end of file diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.h b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.h new file mode 100644 index 00000000000..5664c22d367 --- /dev/null +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.h @@ -0,0 +1,129 @@ +/* + * 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. + */ + +// [Windows #14654] + +#pragma once + +#include + +#if __has_include("rncoreJSI.h") // Cmake headers on Android +#include "rncoreJSI.h" +#elif __has_include("FBReactNativeSpecJSI.h") // CocoaPod headers on Apple +#include "FBReactNativeSpecJSI.h" +#else +#include +#endif + +#include + +namespace facebook::react { + +class NativeDOM : public NativeDOMCxxSpec { + public: + NativeDOM(std::shared_ptr jsInvoker); + +#pragma mark - Methods from the Node interface (for ReadOnlyNode). + + double compareDocumentPosition( + jsi::Runtime& rt, + jsi::Value nativeNodeReference, + jsi::Value otherNativeNodeReference); + + std::vector getChildNodes( + jsi::Runtime& rt, + jsi::Value nativeNodeReference); + + jsi::Value getParentNode(jsi::Runtime& rt, jsi::Value nativeNodeReference); + + bool isConnected(jsi::Runtime& rt, jsi::Value nativeNodeReference); + +#pragma mark - Methods from the Element interface (for ReactNativeElement). + + std::tuple< + /* topWidth: */ int, + /* rightWidth: */ int, + /* bottomWidth: */ int, + /* leftWidth: */ int> + getBorderWidth(jsi::Runtime& rt, jsi::Value nativeElementReference); + + std::tuple< + /* x: */ double, + /* y: */ double, + /* width: */ double, + /* height: */ double> + getBoundingClientRect( + jsi::Runtime& rt, + jsi::Value nativeElementReference, + bool includeTransform); + + std::tuple getInnerSize( + jsi::Runtime& rt, + jsi::Value nativeElementReference); + + std::tuple + getScrollPosition(jsi::Runtime& rt, jsi::Value nativeElementReference); + + std::tuple getScrollSize( + jsi::Runtime& rt, + jsi::Value nativeElementReference); + + std::string getTagName(jsi::Runtime& rt, jsi::Value nativeElementReference); + + std::string getTextContent(jsi::Runtime& rt, jsi::Value nativeNodeReference); + + bool hasPointerCapture( + jsi::Runtime& rt, + jsi::Value nativeElementReference, + double pointerId); + + void releasePointerCapture( + jsi::Runtime& rt, + jsi::Value nativeElementReference, + double pointerId); + + void setPointerCapture( + jsi::Runtime& rt, + jsi::Value nativeElementReference, + double pointerId); + +#pragma mark - Methods from the HTMLElement interface (for ReactNativeElement). + + std::tuple< + /* offsetParent: */ jsi::Value, + /* top: */ double, + /* left: */ double> + getOffset(jsi::Runtime& rt, jsi::Value nativeElementReference); + +#pragma mark - Special methods to handle the root node. + + jsi::Value linkRootNode( + jsi::Runtime& rt, + SurfaceId surfaceId, + jsi::Value instanceHandle); + +#pragma mark - Legacy layout APIs (for ReactNativeElement). + + void measure( + jsi::Runtime& rt, + jsi::Value nativeElementReference, + jsi::Function callback); + + void measureInWindow( + jsi::Runtime& rt, + jsi::Value nativeElementReference, + jsi::Function callback); + + void measureLayout( + jsi::Runtime& rt, + jsi::Value nativeElementReference, + jsi::Value relativeToNativeElementReference, + jsi::Function onFail, + jsi::Function onSuccess); +}; + +} // namespace facebook::react diff --git a/vnext/codegen/NativeCPUTimeSpec.g.h b/vnext/codegen/NativeCPUTimeSpec.g.h deleted file mode 100644 index 3f344bad4eb..00000000000 --- a/vnext/codegen/NativeCPUTimeSpec.g.h +++ /dev/null @@ -1,41 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - - -struct CPUTimeSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - SyncMethod{0, L"getCPUTimeNanos"}, - SyncMethod{1, L"hasAccurateCPUTimeNanosForBenchmarks"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "getCPUTimeNanos", - " REACT_SYNC_METHOD(getCPUTimeNanos) double getCPUTimeNanos() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getCPUTimeNanos) static double getCPUTimeNanos() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "hasAccurateCPUTimeNanosForBenchmarks", - " REACT_SYNC_METHOD(hasAccurateCPUTimeNanosForBenchmarks) bool hasAccurateCPUTimeNanosForBenchmarks() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(hasAccurateCPUTimeNanosForBenchmarks) static bool hasAccurateCPUTimeNanosForBenchmarks() noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeDOMSpec.g.h b/vnext/codegen/NativeDOMSpec.g.h index 2250ce95837..d0b1f7d9c8e 100644 --- a/vnext/codegen/NativeDOMSpec.g.h +++ b/vnext/codegen/NativeDOMSpec.g.h @@ -17,24 +17,25 @@ namespace Microsoft::ReactNativeSpecs { struct DOMSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { static constexpr auto methods = std::tuple{ - SyncMethod<() noexcept>{0, L"getParentNode"}, + SyncMethod{0, L"compareDocumentPosition"}, SyncMethod() noexcept>{1, L"getChildNodes"}, - SyncMethod{2, L"isConnected"}, - SyncMethod{3, L"compareDocumentPosition"}, - SyncMethod{4, L"getTextContent"}, + SyncMethod<() noexcept>{2, L"getParentNode"}, + SyncMethod{3, L"isConnected"}, + SyncMethod() noexcept>{4, L"getBorderWidth"}, SyncMethod(, bool) noexcept>{5, L"getBoundingClientRect"}, - SyncMethod() noexcept>{6, L"getOffset"}, + SyncMethod() noexcept>{6, L"getInnerSize"}, SyncMethod() noexcept>{7, L"getScrollPosition"}, SyncMethod() noexcept>{8, L"getScrollSize"}, - SyncMethod() noexcept>{9, L"getInnerSize"}, - SyncMethod() noexcept>{10, L"getBorderWidth"}, - SyncMethod{11, L"getTagName"}, - SyncMethod{12, L"hasPointerCapture"}, + SyncMethod{9, L"getTagName"}, + SyncMethod{10, L"getTextContent"}, + SyncMethod{11, L"hasPointerCapture"}, + Method{12, L"releasePointerCapture"}, Method{13, L"setPointerCapture"}, - Method{14, L"releasePointerCapture"}, - Method) noexcept>{15, L"measure"}, - Method) noexcept>{16, L"measureInWindow"}, - Method, Callback) noexcept>{17, L"measureLayout"}, + SyncMethod() noexcept>{14, L"getOffset"}, + SyncMethod<(double, ) noexcept>{15, L"linkRootNode"}, + Method) noexcept>{16, L"measure"}, + Method) noexcept>{17, L"measureInWindow"}, + Method, Callback) noexcept>{18, L"measureLayout"}, }; template @@ -43,94 +44,99 @@ struct DOMSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { REACT_SHOW_METHOD_SPEC_ERRORS( 0, - "getParentNode", - " REACT_SYNC_METHOD(getParentNode) getParentNode( shadowNode) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getParentNode) static getParentNode( shadowNode) noexcept { /* implementation */ }\n"); + "compareDocumentPosition", + " REACT_SYNC_METHOD(compareDocumentPosition) double compareDocumentPosition( nativeNodeReference, otherNativeNodeReference) noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(compareDocumentPosition) static double compareDocumentPosition( nativeNodeReference, otherNativeNodeReference) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 1, "getChildNodes", - " REACT_SYNC_METHOD(getChildNodes) std::vector<> getChildNodes( shadowNode) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getChildNodes) static std::vector<> getChildNodes( shadowNode) noexcept { /* implementation */ }\n"); + " REACT_SYNC_METHOD(getChildNodes) std::vector<> getChildNodes( nativeNodeReference) noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(getChildNodes) static std::vector<> getChildNodes( nativeNodeReference) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 2, - "isConnected", - " REACT_SYNC_METHOD(isConnected) bool isConnected( shadowNode) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(isConnected) static bool isConnected( shadowNode) noexcept { /* implementation */ }\n"); + "getParentNode", + " REACT_SYNC_METHOD(getParentNode) getParentNode( nativeNodeReference) noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(getParentNode) static getParentNode( nativeNodeReference) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 3, - "compareDocumentPosition", - " REACT_SYNC_METHOD(compareDocumentPosition) double compareDocumentPosition( shadowNode, otherShadowNode) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(compareDocumentPosition) static double compareDocumentPosition( shadowNode, otherShadowNode) noexcept { /* implementation */ }\n"); + "isConnected", + " REACT_SYNC_METHOD(isConnected) bool isConnected( nativeNodeReference) noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(isConnected) static bool isConnected( nativeNodeReference) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 4, - "getTextContent", - " REACT_SYNC_METHOD(getTextContent) std::string getTextContent( shadowNode) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getTextContent) static std::string getTextContent( shadowNode) noexcept { /* implementation */ }\n"); + "getBorderWidth", + " REACT_SYNC_METHOD(getBorderWidth) std::vector getBorderWidth( nativeElementReference) noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(getBorderWidth) static std::vector getBorderWidth( nativeElementReference) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 5, "getBoundingClientRect", - " REACT_SYNC_METHOD(getBoundingClientRect) std::vector getBoundingClientRect( shadowNode, bool includeTransform) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getBoundingClientRect) static std::vector getBoundingClientRect( shadowNode, bool includeTransform) noexcept { /* implementation */ }\n"); + " REACT_SYNC_METHOD(getBoundingClientRect) std::vector getBoundingClientRect( nativeElementReference, bool includeTransform) noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(getBoundingClientRect) static std::vector getBoundingClientRect( nativeElementReference, bool includeTransform) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 6, - "getOffset", - " REACT_SYNC_METHOD(getOffset) std::vector<> getOffset( shadowNode) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getOffset) static std::vector<> getOffset( shadowNode) noexcept { /* implementation */ }\n"); + "getInnerSize", + " REACT_SYNC_METHOD(getInnerSize) std::vector getInnerSize( nativeElementReference) noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(getInnerSize) static std::vector getInnerSize( nativeElementReference) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 7, "getScrollPosition", - " REACT_SYNC_METHOD(getScrollPosition) std::vector getScrollPosition( shadowNode) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getScrollPosition) static std::vector getScrollPosition( shadowNode) noexcept { /* implementation */ }\n"); + " REACT_SYNC_METHOD(getScrollPosition) std::vector getScrollPosition( nativeElementReference) noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(getScrollPosition) static std::vector getScrollPosition( nativeElementReference) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 8, "getScrollSize", - " REACT_SYNC_METHOD(getScrollSize) std::vector getScrollSize( shadowNode) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getScrollSize) static std::vector getScrollSize( shadowNode) noexcept { /* implementation */ }\n"); + " REACT_SYNC_METHOD(getScrollSize) std::vector getScrollSize( nativeElementReference) noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(getScrollSize) static std::vector getScrollSize( nativeElementReference) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 9, - "getInnerSize", - " REACT_SYNC_METHOD(getInnerSize) std::vector getInnerSize( shadowNode) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getInnerSize) static std::vector getInnerSize( shadowNode) noexcept { /* implementation */ }\n"); + "getTagName", + " REACT_SYNC_METHOD(getTagName) std::string getTagName( nativeElementReference) noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(getTagName) static std::string getTagName( nativeElementReference) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 10, - "getBorderWidth", - " REACT_SYNC_METHOD(getBorderWidth) std::vector getBorderWidth( shadowNode) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getBorderWidth) static std::vector getBorderWidth( shadowNode) noexcept { /* implementation */ }\n"); + "getTextContent", + " REACT_SYNC_METHOD(getTextContent) std::string getTextContent( nativeElementReference) noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(getTextContent) static std::string getTextContent( nativeElementReference) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 11, - "getTagName", - " REACT_SYNC_METHOD(getTagName) std::string getTagName( shadowNode) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getTagName) static std::string getTagName( shadowNode) noexcept { /* implementation */ }\n"); + "hasPointerCapture", + " REACT_SYNC_METHOD(hasPointerCapture) bool hasPointerCapture( nativeElementReference, double pointerId) noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(hasPointerCapture) static bool hasPointerCapture( nativeElementReference, double pointerId) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 12, - "hasPointerCapture", - " REACT_SYNC_METHOD(hasPointerCapture) bool hasPointerCapture( shadowNode, double pointerId) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(hasPointerCapture) static bool hasPointerCapture( shadowNode, double pointerId) noexcept { /* implementation */ }\n"); + "releasePointerCapture", + " REACT_METHOD(releasePointerCapture) void releasePointerCapture( nativeElementReference, double pointerId) noexcept { /* implementation */ }\n" + " REACT_METHOD(releasePointerCapture) static void releasePointerCapture( nativeElementReference, double pointerId) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 13, "setPointerCapture", - " REACT_METHOD(setPointerCapture) void setPointerCapture( shadowNode, double pointerId) noexcept { /* implementation */ }\n" - " REACT_METHOD(setPointerCapture) static void setPointerCapture( shadowNode, double pointerId) noexcept { /* implementation */ }\n"); + " REACT_METHOD(setPointerCapture) void setPointerCapture( nativeElementReference, double pointerId) noexcept { /* implementation */ }\n" + " REACT_METHOD(setPointerCapture) static void setPointerCapture( nativeElementReference, double pointerId) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 14, - "releasePointerCapture", - " REACT_METHOD(releasePointerCapture) void releasePointerCapture( shadowNode, double pointerId) noexcept { /* implementation */ }\n" - " REACT_METHOD(releasePointerCapture) static void releasePointerCapture( shadowNode, double pointerId) noexcept { /* implementation */ }\n"); + "getOffset", + " REACT_SYNC_METHOD(getOffset) std::vector<> getOffset( nativeElementReference) noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(getOffset) static std::vector<> getOffset( nativeElementReference) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 15, - "measure", - " REACT_METHOD(measure) void measure( shadowNode, std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(measure) static void measure( shadowNode, std::function const & callback) noexcept { /* implementation */ }\n"); + "linkRootNode", + " REACT_SYNC_METHOD(linkRootNode) linkRootNode(double rootTag, instanceHandle) noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(linkRootNode) static linkRootNode(double rootTag, instanceHandle) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 16, - "measureInWindow", - " REACT_METHOD(measureInWindow) void measureInWindow( shadowNode, std::function const & callback) noexcept { /* implementation */ }\n" - " REACT_METHOD(measureInWindow) static void measureInWindow( shadowNode, std::function const & callback) noexcept { /* implementation */ }\n"); + "measure", + " REACT_METHOD(measure) void measure( nativeElementReference, std::function const & callback) noexcept { /* implementation */ }\n" + " REACT_METHOD(measure) static void measure( nativeElementReference, std::function const & callback) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 17, + "measureInWindow", + " REACT_METHOD(measureInWindow) void measureInWindow( nativeElementReference, std::function const & callback) noexcept { /* implementation */ }\n" + " REACT_METHOD(measureInWindow) static void measureInWindow( nativeElementReference, std::function const & callback) noexcept { /* implementation */ }\n"); + REACT_SHOW_METHOD_SPEC_ERRORS( + 18, "measureLayout", - " REACT_METHOD(measureLayout) void measureLayout( shadowNode, relativeNode, std::function const & onFail, std::function const & onSuccess) noexcept { /* implementation */ }\n" - " REACT_METHOD(measureLayout) static void measureLayout( shadowNode, relativeNode, std::function const & onFail, std::function const & onSuccess) noexcept { /* implementation */ }\n"); + " REACT_METHOD(measureLayout) void measureLayout( nativeElementReference, relativeNode, std::function const & onFail, std::function const & onSuccess) noexcept { /* implementation */ }\n" + " REACT_METHOD(measureLayout) static void measureLayout( nativeElementReference, relativeNode, std::function const & onFail, std::function const & onSuccess) noexcept { /* implementation */ }\n"); } }; diff --git a/vnext/codegen/NativeDevMenuSpec.g.h b/vnext/codegen/NativeDevMenuSpec.g.h index 88f498cd3a1..db5e1edf413 100644 --- a/vnext/codegen/NativeDevMenuSpec.g.h +++ b/vnext/codegen/NativeDevMenuSpec.g.h @@ -19,9 +19,8 @@ struct DevMenuSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { static constexpr auto methods = std::tuple{ Method{0, L"show"}, Method{1, L"reload"}, - Method{2, L"debugRemotely"}, - Method{3, L"setProfilingEnabled"}, - Method{4, L"setHotLoadingEnabled"}, + Method{2, L"setProfilingEnabled"}, + Method{3, L"setHotLoadingEnabled"}, }; template @@ -40,16 +39,11 @@ struct DevMenuSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { " REACT_METHOD(reload) static void reload() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 2, - "debugRemotely", - " REACT_METHOD(debugRemotely) void debugRemotely(bool enableDebug) noexcept { /* implementation */ }\n" - " REACT_METHOD(debugRemotely) static void debugRemotely(bool enableDebug) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, "setProfilingEnabled", " REACT_METHOD(setProfilingEnabled) void setProfilingEnabled(bool enabled) noexcept { /* implementation */ }\n" " REACT_METHOD(setProfilingEnabled) static void setProfilingEnabled(bool enabled) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 4, + 3, "setHotLoadingEnabled", " REACT_METHOD(setHotLoadingEnabled) void setHotLoadingEnabled(bool enabled) noexcept { /* implementation */ }\n" " REACT_METHOD(setHotLoadingEnabled) static void setHotLoadingEnabled(bool enabled) noexcept { /* implementation */ }\n"); diff --git a/vnext/codegen/NativeDevSettingsSpec.g.h b/vnext/codegen/NativeDevSettingsSpec.g.h index 09228b9eb97..faea2113e9b 100644 --- a/vnext/codegen/NativeDevSettingsSpec.g.h +++ b/vnext/codegen/NativeDevSettingsSpec.g.h @@ -21,14 +21,13 @@ struct DevSettingsSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { Method{1, L"reloadWithReason"}, Method{2, L"onFastRefresh"}, Method{3, L"setHotLoadingEnabled"}, - Method{4, L"setIsDebuggingRemotely"}, - Method{5, L"setProfilingEnabled"}, - Method{6, L"toggleElementInspector"}, - Method{7, L"addMenuItem"}, - Method{8, L"openDebugger"}, - Method{9, L"addListener"}, - Method{10, L"removeListeners"}, - Method{11, L"setIsShakeToShowDevMenuEnabled"}, + Method{4, L"setProfilingEnabled"}, + Method{5, L"toggleElementInspector"}, + Method{6, L"addMenuItem"}, + Method{7, L"openDebugger"}, + Method{8, L"addListener"}, + Method{9, L"removeListeners"}, + Method{10, L"setIsShakeToShowDevMenuEnabled"}, }; template @@ -57,41 +56,36 @@ struct DevSettingsSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { " REACT_METHOD(setHotLoadingEnabled) static void setHotLoadingEnabled(bool isHotLoadingEnabled) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 4, - "setIsDebuggingRemotely", - " REACT_METHOD(setIsDebuggingRemotely) void setIsDebuggingRemotely(bool isDebuggingRemotelyEnabled) noexcept { /* implementation */ }\n" - " REACT_METHOD(setIsDebuggingRemotely) static void setIsDebuggingRemotely(bool isDebuggingRemotelyEnabled) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 5, "setProfilingEnabled", " REACT_METHOD(setProfilingEnabled) void setProfilingEnabled(bool isProfilingEnabled) noexcept { /* implementation */ }\n" " REACT_METHOD(setProfilingEnabled) static void setProfilingEnabled(bool isProfilingEnabled) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 6, + 5, "toggleElementInspector", " REACT_METHOD(toggleElementInspector) void toggleElementInspector() noexcept { /* implementation */ }\n" " REACT_METHOD(toggleElementInspector) static void toggleElementInspector() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 7, + 6, "addMenuItem", " REACT_METHOD(addMenuItem) void addMenuItem(std::string title) noexcept { /* implementation */ }\n" " REACT_METHOD(addMenuItem) static void addMenuItem(std::string title) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 8, + 7, "openDebugger", " REACT_METHOD(openDebugger) void openDebugger() noexcept { /* implementation */ }\n" " REACT_METHOD(openDebugger) static void openDebugger() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 9, + 8, "addListener", " REACT_METHOD(addListener) void addListener(std::string eventName) noexcept { /* implementation */ }\n" " REACT_METHOD(addListener) static void addListener(std::string eventName) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 10, + 9, "removeListeners", " REACT_METHOD(removeListeners) void removeListeners(double count) noexcept { /* implementation */ }\n" " REACT_METHOD(removeListeners) static void removeListeners(double count) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 11, + 10, "setIsShakeToShowDevMenuEnabled", " REACT_METHOD(setIsShakeToShowDevMenuEnabled) void setIsShakeToShowDevMenuEnabled(bool enabled) noexcept { /* implementation */ }\n" " REACT_METHOD(setIsShakeToShowDevMenuEnabled) static void setIsShakeToShowDevMenuEnabled(bool enabled) noexcept { /* implementation */ }\n"); diff --git a/vnext/codegen/NativeFantomSpec.g.h b/vnext/codegen/NativeFantomSpec.g.h deleted file mode 100644 index acefc9fff95..00000000000 --- a/vnext/codegen/NativeFantomSpec.g.h +++ /dev/null @@ -1,90 +0,0 @@ - -/* - * This file is auto-generated from a NativeModule spec file in js. - * - * This is a C++ Spec class that should be used with MakeTurboModuleProvider to register native modules - * in a way that also verifies at compile time that the native module matches the interface required - * by the TurboModule JS spec. - */ -#pragma once -// clang-format off - -#include -#include - -namespace Microsoft::ReactNativeSpecs { - -struct FantomSpec_RenderFormatOptions { - bool includeRoot; - bool includeLayoutMetrics; -}; - - -inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(FantomSpec_RenderFormatOptions*) noexcept { - winrt::Microsoft::ReactNative::FieldMap fieldMap { - {L"includeRoot", &FantomSpec_RenderFormatOptions::includeRoot}, - {L"includeLayoutMetrics", &FantomSpec_RenderFormatOptions::includeLayoutMetrics}, - }; - return fieldMap; -} - -struct FantomSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { - static constexpr auto methods = std::tuple{ - Method{0, L"startSurface"}, - Method{1, L"stopSurface"}, - Method{2, L"dispatchNativeEvent"}, - SyncMethod(double) noexcept>{3, L"getMountingManagerLogs"}, - Method{4, L"flushMessageQueue"}, - Method{5, L"flushEventQueue"}, - SyncMethod{6, L"getRenderedOutput"}, - Method{7, L"reportTestSuiteResultsJSON"}, - }; - - template - static constexpr void ValidateModule() noexcept { - constexpr auto methodCheckResults = CheckMethods(); - - REACT_SHOW_METHOD_SPEC_ERRORS( - 0, - "startSurface", - " REACT_METHOD(startSurface) void startSurface(double surfaceId, double viewportWidth, double viewportHeight, double devicePixelRatio) noexcept { /* implementation */ }\n" - " REACT_METHOD(startSurface) static void startSurface(double surfaceId, double viewportWidth, double viewportHeight, double devicePixelRatio) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 1, - "stopSurface", - " REACT_METHOD(stopSurface) void stopSurface(double surfaceId) noexcept { /* implementation */ }\n" - " REACT_METHOD(stopSurface) static void stopSurface(double surfaceId) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "dispatchNativeEvent", - " REACT_METHOD(dispatchNativeEvent) void dispatchNativeEvent( shadowNode, std::string type, payload) noexcept { /* implementation */ }\n" - " REACT_METHOD(dispatchNativeEvent) static void dispatchNativeEvent( shadowNode, std::string type, payload) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, - "getMountingManagerLogs", - " REACT_SYNC_METHOD(getMountingManagerLogs) std::vector getMountingManagerLogs(double surfaceId) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getMountingManagerLogs) static std::vector getMountingManagerLogs(double surfaceId) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 4, - "flushMessageQueue", - " REACT_METHOD(flushMessageQueue) void flushMessageQueue() noexcept { /* implementation */ }\n" - " REACT_METHOD(flushMessageQueue) static void flushMessageQueue() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 5, - "flushEventQueue", - " REACT_METHOD(flushEventQueue) void flushEventQueue() noexcept { /* implementation */ }\n" - " REACT_METHOD(flushEventQueue) static void flushEventQueue() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 6, - "getRenderedOutput", - " REACT_SYNC_METHOD(getRenderedOutput) std::string getRenderedOutput(double surfaceId, FantomSpec_RenderFormatOptions && config) noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(getRenderedOutput) static std::string getRenderedOutput(double surfaceId, FantomSpec_RenderFormatOptions && config) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 7, - "reportTestSuiteResultsJSON", - " REACT_METHOD(reportTestSuiteResultsJSON) void reportTestSuiteResultsJSON(std::string results) noexcept { /* implementation */ }\n" - " REACT_METHOD(reportTestSuiteResultsJSON) static void reportTestSuiteResultsJSON(std::string results) noexcept { /* implementation */ }\n"); - } -}; - -} // namespace Microsoft::ReactNativeSpecs diff --git a/vnext/codegen/NativeReactNativeFeatureFlagsSpec.g.h b/vnext/codegen/NativeReactNativeFeatureFlagsSpec.g.h index 33ffbb74d63..6357eed94ef 100644 --- a/vnext/codegen/NativeReactNativeFeatureFlagsSpec.g.h +++ b/vnext/codegen/NativeReactNativeFeatureFlagsSpec.g.h @@ -19,51 +19,46 @@ struct ReactNativeFeatureFlagsSpec : winrt::Microsoft::ReactNative::TurboModuleS static constexpr auto methods = std::tuple{ SyncMethod{0, L"commonTestFlag"}, SyncMethod{1, L"commonTestFlagWithoutNativeImplementation"}, - SyncMethod{2, L"completeReactInstanceCreationOnBgThreadOnAndroid"}, - SyncMethod{3, L"disableMountItemReorderingAndroid"}, - SyncMethod{4, L"enableAccumulatedUpdatesInRawPropsAndroid"}, - SyncMethod{5, L"enableBridgelessArchitecture"}, - SyncMethod{6, L"enableCppPropsIteratorSetter"}, - SyncMethod{7, L"enableDeletionOfUnmountedViews"}, - SyncMethod{8, L"enableEagerRootViewAttachment"}, - SyncMethod{9, L"enableEventEmitterRetentionDuringGesturesOnAndroid"}, - SyncMethod{10, L"enableFabricLogs"}, - SyncMethod{11, L"enableFabricRenderer"}, - SyncMethod{12, L"enableFixForViewCommandRace"}, - SyncMethod{13, L"enableGranularShadowTreeStateReconciliation"}, - SyncMethod{14, L"enableIOSViewClipToPaddingBox"}, - SyncMethod{15, L"enableImagePrefetchingAndroid"}, - SyncMethod{16, L"enableJSRuntimeGCOnMemoryPressureOnIOS"}, - SyncMethod{17, L"enableLayoutAnimationsOnAndroid"}, - SyncMethod{18, L"enableLayoutAnimationsOnIOS"}, - SyncMethod{19, L"enableLongTaskAPI"}, - SyncMethod{20, L"enableNewBackgroundAndBorderDrawables"}, - SyncMethod{21, L"enablePreciseSchedulingForPremountItemsOnAndroid"}, - SyncMethod{22, L"enablePropsUpdateReconciliationAndroid"}, - SyncMethod{23, L"enableReportEventPaintTime"}, - SyncMethod{24, L"enableSynchronousStateUpdates"}, - SyncMethod{25, L"enableUIConsistency"}, - SyncMethod{26, L"enableViewRecycling"}, - SyncMethod{27, L"excludeYogaFromRawProps"}, - SyncMethod{28, L"fixDifferentiatorEmittingUpdatesWithWrongParentTag"}, - SyncMethod{29, L"fixMappingOfEventPrioritiesBetweenFabricAndReact"}, - SyncMethod{30, L"fixMountingCoordinatorReportedPendingTransactionsOnAndroid"}, - SyncMethod{31, L"fuseboxEnabledRelease"}, - SyncMethod{32, L"initEagerTurboModulesOnNativeModulesQueueAndroid"}, - SyncMethod{33, L"lazyAnimationCallbacks"}, - SyncMethod{34, L"loadVectorDrawablesOnImages"}, - SyncMethod{35, L"traceTurboModulePromiseRejectionsOnAndroid"}, - SyncMethod{36, L"useAlwaysAvailableJSErrorHandling"}, - SyncMethod{37, L"useEditTextStockAndroidFocusBehavior"}, - SyncMethod{38, L"useFabricInterop"}, - SyncMethod{39, L"useImmediateExecutorInAndroidBridgeless"}, - SyncMethod{40, L"useNativeViewConfigsInBridgelessMode"}, - SyncMethod{41, L"useOptimisedViewPreallocationOnAndroid"}, - SyncMethod{42, L"useOptimizedEventBatchingOnAndroid"}, - SyncMethod{43, L"useRawPropsJsiValue"}, - SyncMethod{44, L"useRuntimeShadowNodeReferenceUpdate"}, - SyncMethod{45, L"useTurboModuleInterop"}, - SyncMethod{46, L"useTurboModules"}, + SyncMethod{2, L"disableMountItemReorderingAndroid"}, + SyncMethod{3, L"enableAccumulatedUpdatesInRawPropsAndroid"}, + SyncMethod{4, L"enableBridgelessArchitecture"}, + SyncMethod{5, L"enableCppPropsIteratorSetter"}, + SyncMethod{6, L"enableEagerRootViewAttachment"}, + SyncMethod{7, L"enableEventEmitterRetentionDuringGesturesOnAndroid"}, + SyncMethod{8, L"enableFabricLogs"}, + SyncMethod{9, L"enableFabricRenderer"}, + SyncMethod{10, L"enableFixForViewCommandRace"}, + SyncMethod{11, L"enableGranularShadowTreeStateReconciliation"}, + SyncMethod{12, L"enableIOSViewClipToPaddingBox"}, + SyncMethod{13, L"enableImagePrefetchingAndroid"}, + SyncMethod{14, L"enableJSRuntimeGCOnMemoryPressureOnIOS"}, + SyncMethod{15, L"enableLayoutAnimationsOnAndroid"}, + SyncMethod{16, L"enableLayoutAnimationsOnIOS"}, + SyncMethod{17, L"enableLongTaskAPI"}, + SyncMethod{18, L"enableNewBackgroundAndBorderDrawables"}, + SyncMethod{19, L"enablePreciseSchedulingForPremountItemsOnAndroid"}, + SyncMethod{20, L"enablePropsUpdateReconciliationAndroid"}, + SyncMethod{21, L"enableReportEventPaintTime"}, + SyncMethod{22, L"enableSynchronousStateUpdates"}, + SyncMethod{23, L"enableUIConsistency"}, + SyncMethod{24, L"enableViewRecycling"}, + SyncMethod{25, L"excludeYogaFromRawProps"}, + SyncMethod{26, L"fixDifferentiatorEmittingUpdatesWithWrongParentTag"}, + SyncMethod{27, L"fixMappingOfEventPrioritiesBetweenFabricAndReact"}, + SyncMethod{28, L"fixMountingCoordinatorReportedPendingTransactionsOnAndroid"}, + SyncMethod{29, L"fuseboxEnabledRelease"}, + SyncMethod{30, L"fuseboxNetworkInspectionEnabled"}, + SyncMethod{31, L"lazyAnimationCallbacks"}, + SyncMethod{32, L"traceTurboModulePromiseRejectionsOnAndroid"}, + SyncMethod{33, L"useAlwaysAvailableJSErrorHandling"}, + SyncMethod{34, L"useEditTextStockAndroidFocusBehavior"}, + SyncMethod{35, L"useFabricInterop"}, + SyncMethod{36, L"useNativeViewConfigsInBridgelessMode"}, + SyncMethod{37, L"useOptimizedEventBatchingOnAndroid"}, + SyncMethod{38, L"useRawPropsJsiValue"}, + SyncMethod{39, L"useRuntimeShadowNodeReferenceUpdate"}, + SyncMethod{40, L"useTurboModuleInterop"}, + SyncMethod{41, L"useTurboModules"}, }; template @@ -82,226 +77,201 @@ struct ReactNativeFeatureFlagsSpec : winrt::Microsoft::ReactNative::TurboModuleS " REACT_SYNC_METHOD(commonTestFlagWithoutNativeImplementation) static bool commonTestFlagWithoutNativeImplementation() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 2, - "completeReactInstanceCreationOnBgThreadOnAndroid", - " REACT_SYNC_METHOD(completeReactInstanceCreationOnBgThreadOnAndroid) bool completeReactInstanceCreationOnBgThreadOnAndroid() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(completeReactInstanceCreationOnBgThreadOnAndroid) static bool completeReactInstanceCreationOnBgThreadOnAndroid() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, "disableMountItemReorderingAndroid", " REACT_SYNC_METHOD(disableMountItemReorderingAndroid) bool disableMountItemReorderingAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(disableMountItemReorderingAndroid) static bool disableMountItemReorderingAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 4, + 3, "enableAccumulatedUpdatesInRawPropsAndroid", " REACT_SYNC_METHOD(enableAccumulatedUpdatesInRawPropsAndroid) bool enableAccumulatedUpdatesInRawPropsAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableAccumulatedUpdatesInRawPropsAndroid) static bool enableAccumulatedUpdatesInRawPropsAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 5, + 4, "enableBridgelessArchitecture", " REACT_SYNC_METHOD(enableBridgelessArchitecture) bool enableBridgelessArchitecture() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableBridgelessArchitecture) static bool enableBridgelessArchitecture() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 6, + 5, "enableCppPropsIteratorSetter", " REACT_SYNC_METHOD(enableCppPropsIteratorSetter) bool enableCppPropsIteratorSetter() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableCppPropsIteratorSetter) static bool enableCppPropsIteratorSetter() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 7, - "enableDeletionOfUnmountedViews", - " REACT_SYNC_METHOD(enableDeletionOfUnmountedViews) bool enableDeletionOfUnmountedViews() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableDeletionOfUnmountedViews) static bool enableDeletionOfUnmountedViews() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 8, + 6, "enableEagerRootViewAttachment", " REACT_SYNC_METHOD(enableEagerRootViewAttachment) bool enableEagerRootViewAttachment() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableEagerRootViewAttachment) static bool enableEagerRootViewAttachment() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 9, + 7, "enableEventEmitterRetentionDuringGesturesOnAndroid", " REACT_SYNC_METHOD(enableEventEmitterRetentionDuringGesturesOnAndroid) bool enableEventEmitterRetentionDuringGesturesOnAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableEventEmitterRetentionDuringGesturesOnAndroid) static bool enableEventEmitterRetentionDuringGesturesOnAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 10, + 8, "enableFabricLogs", " REACT_SYNC_METHOD(enableFabricLogs) bool enableFabricLogs() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableFabricLogs) static bool enableFabricLogs() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 11, + 9, "enableFabricRenderer", " REACT_SYNC_METHOD(enableFabricRenderer) bool enableFabricRenderer() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableFabricRenderer) static bool enableFabricRenderer() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 12, + 10, "enableFixForViewCommandRace", " REACT_SYNC_METHOD(enableFixForViewCommandRace) bool enableFixForViewCommandRace() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableFixForViewCommandRace) static bool enableFixForViewCommandRace() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 13, + 11, "enableGranularShadowTreeStateReconciliation", " REACT_SYNC_METHOD(enableGranularShadowTreeStateReconciliation) bool enableGranularShadowTreeStateReconciliation() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableGranularShadowTreeStateReconciliation) static bool enableGranularShadowTreeStateReconciliation() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 14, + 12, "enableIOSViewClipToPaddingBox", " REACT_SYNC_METHOD(enableIOSViewClipToPaddingBox) bool enableIOSViewClipToPaddingBox() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableIOSViewClipToPaddingBox) static bool enableIOSViewClipToPaddingBox() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 15, + 13, "enableImagePrefetchingAndroid", " REACT_SYNC_METHOD(enableImagePrefetchingAndroid) bool enableImagePrefetchingAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableImagePrefetchingAndroid) static bool enableImagePrefetchingAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 16, + 14, "enableJSRuntimeGCOnMemoryPressureOnIOS", " REACT_SYNC_METHOD(enableJSRuntimeGCOnMemoryPressureOnIOS) bool enableJSRuntimeGCOnMemoryPressureOnIOS() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableJSRuntimeGCOnMemoryPressureOnIOS) static bool enableJSRuntimeGCOnMemoryPressureOnIOS() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 17, + 15, "enableLayoutAnimationsOnAndroid", " REACT_SYNC_METHOD(enableLayoutAnimationsOnAndroid) bool enableLayoutAnimationsOnAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableLayoutAnimationsOnAndroid) static bool enableLayoutAnimationsOnAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 18, + 16, "enableLayoutAnimationsOnIOS", " REACT_SYNC_METHOD(enableLayoutAnimationsOnIOS) bool enableLayoutAnimationsOnIOS() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableLayoutAnimationsOnIOS) static bool enableLayoutAnimationsOnIOS() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 19, + 17, "enableLongTaskAPI", " REACT_SYNC_METHOD(enableLongTaskAPI) bool enableLongTaskAPI() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableLongTaskAPI) static bool enableLongTaskAPI() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 20, + 18, "enableNewBackgroundAndBorderDrawables", " REACT_SYNC_METHOD(enableNewBackgroundAndBorderDrawables) bool enableNewBackgroundAndBorderDrawables() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableNewBackgroundAndBorderDrawables) static bool enableNewBackgroundAndBorderDrawables() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 21, + 19, "enablePreciseSchedulingForPremountItemsOnAndroid", " REACT_SYNC_METHOD(enablePreciseSchedulingForPremountItemsOnAndroid) bool enablePreciseSchedulingForPremountItemsOnAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enablePreciseSchedulingForPremountItemsOnAndroid) static bool enablePreciseSchedulingForPremountItemsOnAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 22, + 20, "enablePropsUpdateReconciliationAndroid", " REACT_SYNC_METHOD(enablePropsUpdateReconciliationAndroid) bool enablePropsUpdateReconciliationAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enablePropsUpdateReconciliationAndroid) static bool enablePropsUpdateReconciliationAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 23, + 21, "enableReportEventPaintTime", " REACT_SYNC_METHOD(enableReportEventPaintTime) bool enableReportEventPaintTime() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableReportEventPaintTime) static bool enableReportEventPaintTime() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 24, + 22, "enableSynchronousStateUpdates", " REACT_SYNC_METHOD(enableSynchronousStateUpdates) bool enableSynchronousStateUpdates() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableSynchronousStateUpdates) static bool enableSynchronousStateUpdates() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 25, + 23, "enableUIConsistency", " REACT_SYNC_METHOD(enableUIConsistency) bool enableUIConsistency() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableUIConsistency) static bool enableUIConsistency() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 26, + 24, "enableViewRecycling", " REACT_SYNC_METHOD(enableViewRecycling) bool enableViewRecycling() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(enableViewRecycling) static bool enableViewRecycling() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 27, + 25, "excludeYogaFromRawProps", " REACT_SYNC_METHOD(excludeYogaFromRawProps) bool excludeYogaFromRawProps() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(excludeYogaFromRawProps) static bool excludeYogaFromRawProps() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 28, + 26, "fixDifferentiatorEmittingUpdatesWithWrongParentTag", " REACT_SYNC_METHOD(fixDifferentiatorEmittingUpdatesWithWrongParentTag) bool fixDifferentiatorEmittingUpdatesWithWrongParentTag() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(fixDifferentiatorEmittingUpdatesWithWrongParentTag) static bool fixDifferentiatorEmittingUpdatesWithWrongParentTag() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 29, + 27, "fixMappingOfEventPrioritiesBetweenFabricAndReact", " REACT_SYNC_METHOD(fixMappingOfEventPrioritiesBetweenFabricAndReact) bool fixMappingOfEventPrioritiesBetweenFabricAndReact() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(fixMappingOfEventPrioritiesBetweenFabricAndReact) static bool fixMappingOfEventPrioritiesBetweenFabricAndReact() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 30, + 28, "fixMountingCoordinatorReportedPendingTransactionsOnAndroid", " REACT_SYNC_METHOD(fixMountingCoordinatorReportedPendingTransactionsOnAndroid) bool fixMountingCoordinatorReportedPendingTransactionsOnAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(fixMountingCoordinatorReportedPendingTransactionsOnAndroid) static bool fixMountingCoordinatorReportedPendingTransactionsOnAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 31, + 29, "fuseboxEnabledRelease", " REACT_SYNC_METHOD(fuseboxEnabledRelease) bool fuseboxEnabledRelease() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(fuseboxEnabledRelease) static bool fuseboxEnabledRelease() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 32, - "initEagerTurboModulesOnNativeModulesQueueAndroid", - " REACT_SYNC_METHOD(initEagerTurboModulesOnNativeModulesQueueAndroid) bool initEagerTurboModulesOnNativeModulesQueueAndroid() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(initEagerTurboModulesOnNativeModulesQueueAndroid) static bool initEagerTurboModulesOnNativeModulesQueueAndroid() noexcept { /* implementation */ }\n"); + 30, + "fuseboxNetworkInspectionEnabled", + " REACT_SYNC_METHOD(fuseboxNetworkInspectionEnabled) bool fuseboxNetworkInspectionEnabled() noexcept { /* implementation */ }\n" + " REACT_SYNC_METHOD(fuseboxNetworkInspectionEnabled) static bool fuseboxNetworkInspectionEnabled() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 33, + 31, "lazyAnimationCallbacks", " REACT_SYNC_METHOD(lazyAnimationCallbacks) bool lazyAnimationCallbacks() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(lazyAnimationCallbacks) static bool lazyAnimationCallbacks() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 34, - "loadVectorDrawablesOnImages", - " REACT_SYNC_METHOD(loadVectorDrawablesOnImages) bool loadVectorDrawablesOnImages() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(loadVectorDrawablesOnImages) static bool loadVectorDrawablesOnImages() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 35, + 32, "traceTurboModulePromiseRejectionsOnAndroid", " REACT_SYNC_METHOD(traceTurboModulePromiseRejectionsOnAndroid) bool traceTurboModulePromiseRejectionsOnAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(traceTurboModulePromiseRejectionsOnAndroid) static bool traceTurboModulePromiseRejectionsOnAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 36, + 33, "useAlwaysAvailableJSErrorHandling", " REACT_SYNC_METHOD(useAlwaysAvailableJSErrorHandling) bool useAlwaysAvailableJSErrorHandling() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(useAlwaysAvailableJSErrorHandling) static bool useAlwaysAvailableJSErrorHandling() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 37, + 34, "useEditTextStockAndroidFocusBehavior", " REACT_SYNC_METHOD(useEditTextStockAndroidFocusBehavior) bool useEditTextStockAndroidFocusBehavior() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(useEditTextStockAndroidFocusBehavior) static bool useEditTextStockAndroidFocusBehavior() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 38, + 35, "useFabricInterop", " REACT_SYNC_METHOD(useFabricInterop) bool useFabricInterop() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(useFabricInterop) static bool useFabricInterop() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 39, - "useImmediateExecutorInAndroidBridgeless", - " REACT_SYNC_METHOD(useImmediateExecutorInAndroidBridgeless) bool useImmediateExecutorInAndroidBridgeless() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(useImmediateExecutorInAndroidBridgeless) static bool useImmediateExecutorInAndroidBridgeless() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 40, + 36, "useNativeViewConfigsInBridgelessMode", " REACT_SYNC_METHOD(useNativeViewConfigsInBridgelessMode) bool useNativeViewConfigsInBridgelessMode() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(useNativeViewConfigsInBridgelessMode) static bool useNativeViewConfigsInBridgelessMode() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 41, - "useOptimisedViewPreallocationOnAndroid", - " REACT_SYNC_METHOD(useOptimisedViewPreallocationOnAndroid) bool useOptimisedViewPreallocationOnAndroid() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(useOptimisedViewPreallocationOnAndroid) static bool useOptimisedViewPreallocationOnAndroid() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 42, + 37, "useOptimizedEventBatchingOnAndroid", " REACT_SYNC_METHOD(useOptimizedEventBatchingOnAndroid) bool useOptimizedEventBatchingOnAndroid() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(useOptimizedEventBatchingOnAndroid) static bool useOptimizedEventBatchingOnAndroid() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 43, + 38, "useRawPropsJsiValue", " REACT_SYNC_METHOD(useRawPropsJsiValue) bool useRawPropsJsiValue() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(useRawPropsJsiValue) static bool useRawPropsJsiValue() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 44, + 39, "useRuntimeShadowNodeReferenceUpdate", " REACT_SYNC_METHOD(useRuntimeShadowNodeReferenceUpdate) bool useRuntimeShadowNodeReferenceUpdate() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(useRuntimeShadowNodeReferenceUpdate) static bool useRuntimeShadowNodeReferenceUpdate() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 45, + 40, "useTurboModuleInterop", " REACT_SYNC_METHOD(useTurboModuleInterop) bool useTurboModuleInterop() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(useTurboModuleInterop) static bool useTurboModuleInterop() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 46, + 41, "useTurboModules", " REACT_SYNC_METHOD(useTurboModules) bool useTurboModules() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(useTurboModules) static bool useTurboModules() noexcept { /* implementation */ }\n"); diff --git a/vnext/codegen/rnwcoreJSI-generated.cpp b/vnext/codegen/rnwcoreJSI-generated.cpp index 8ce9da08008..a8b260fd0c8 100644 --- a/vnext/codegen/rnwcoreJSI-generated.cpp +++ b/vnext/codegen/rnwcoreJSI-generated.cpp @@ -21,11 +21,6 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_commonT rt ); } -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_completeReactInstanceCreationOnBgThreadOnAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->completeReactInstanceCreationOnBgThreadOnAndroid( - rt - ); -} static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableMountItemReorderingAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->disableMountItemReorderingAndroid( rt @@ -46,11 +41,6 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableC rt ); } -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableDeletionOfUnmountedViews(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableDeletionOfUnmountedViews( - rt - ); -} static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableEagerRootViewAttachment(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->enableEagerRootViewAttachment( rt @@ -171,8 +161,8 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fusebox rt ); } -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_initEagerTurboModulesOnNativeModulesQueueAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->initEagerTurboModulesOnNativeModulesQueueAndroid( +static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fuseboxNetworkInspectionEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->fuseboxNetworkInspectionEnabled( rt ); } @@ -181,11 +171,6 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_lazyAni rt ); } -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_loadVectorDrawablesOnImages(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->loadVectorDrawablesOnImages( - rt - ); -} static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_traceTurboModulePromiseRejectionsOnAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->traceTurboModulePromiseRejectionsOnAndroid( rt @@ -206,21 +191,11 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useFabr rt ); } -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useImmediateExecutorInAndroidBridgeless(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->useImmediateExecutorInAndroidBridgeless( - rt - ); -} static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useNativeViewConfigsInBridgelessMode(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->useNativeViewConfigsInBridgelessMode( rt ); } -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useOptimisedViewPreallocationOnAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->useOptimisedViewPreallocationOnAndroid( - rt - ); -} static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useOptimizedEventBatchingOnAndroid(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->useOptimizedEventBatchingOnAndroid( rt @@ -251,12 +226,10 @@ NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI : TurboModule("NativeReactNativeFeatureFlagsCxx", jsInvoker) { methodMap_["commonTestFlag"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_commonTestFlag}; methodMap_["commonTestFlagWithoutNativeImplementation"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_commonTestFlagWithoutNativeImplementation}; - methodMap_["completeReactInstanceCreationOnBgThreadOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_completeReactInstanceCreationOnBgThreadOnAndroid}; methodMap_["disableMountItemReorderingAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_disableMountItemReorderingAndroid}; methodMap_["enableAccumulatedUpdatesInRawPropsAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableAccumulatedUpdatesInRawPropsAndroid}; methodMap_["enableBridgelessArchitecture"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableBridgelessArchitecture}; methodMap_["enableCppPropsIteratorSetter"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableCppPropsIteratorSetter}; - methodMap_["enableDeletionOfUnmountedViews"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableDeletionOfUnmountedViews}; methodMap_["enableEagerRootViewAttachment"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableEagerRootViewAttachment}; methodMap_["enableEventEmitterRetentionDuringGesturesOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableEventEmitterRetentionDuringGesturesOnAndroid}; methodMap_["enableFabricLogs"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableFabricLogs}; @@ -281,16 +254,13 @@ NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI methodMap_["fixMappingOfEventPrioritiesBetweenFabricAndReact"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fixMappingOfEventPrioritiesBetweenFabricAndReact}; methodMap_["fixMountingCoordinatorReportedPendingTransactionsOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fixMountingCoordinatorReportedPendingTransactionsOnAndroid}; methodMap_["fuseboxEnabledRelease"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fuseboxEnabledRelease}; - methodMap_["initEagerTurboModulesOnNativeModulesQueueAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_initEagerTurboModulesOnNativeModulesQueueAndroid}; + methodMap_["fuseboxNetworkInspectionEnabled"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fuseboxNetworkInspectionEnabled}; methodMap_["lazyAnimationCallbacks"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_lazyAnimationCallbacks}; - methodMap_["loadVectorDrawablesOnImages"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_loadVectorDrawablesOnImages}; methodMap_["traceTurboModulePromiseRejectionsOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_traceTurboModulePromiseRejectionsOnAndroid}; methodMap_["useAlwaysAvailableJSErrorHandling"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useAlwaysAvailableJSErrorHandling}; methodMap_["useEditTextStockAndroidFocusBehavior"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useEditTextStockAndroidFocusBehavior}; methodMap_["useFabricInterop"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useFabricInterop}; - methodMap_["useImmediateExecutorInAndroidBridgeless"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useImmediateExecutorInAndroidBridgeless}; methodMap_["useNativeViewConfigsInBridgelessMode"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useNativeViewConfigsInBridgelessMode}; - methodMap_["useOptimisedViewPreallocationOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useOptimisedViewPreallocationOnAndroid}; methodMap_["useOptimizedEventBatchingOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useOptimizedEventBatchingOnAndroid}; methodMap_["useRawPropsJsiValue"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useRawPropsJsiValue}; methodMap_["useRuntimeShadowNodeReferenceUpdate"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useRuntimeShadowNodeReferenceUpdate}; @@ -1153,22 +1123,6 @@ NativeClipboardCxxSpecJSI::NativeClipboardCxxSpecJSI(std::shared_ptr(&turboModule)->getCPUTimeNanos( - rt - ); -} -static jsi::Value __hostFunction_NativeCPUTimeCxxSpecJSI_hasAccurateCPUTimeNanosForBenchmarks(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->hasAccurateCPUTimeNanosForBenchmarks( - rt - ); -} - -NativeCPUTimeCxxSpecJSI::NativeCPUTimeCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("CPUTimeCxx", jsInvoker) { - methodMap_["getCPUTimeNanos"] = MethodMetadata {0, __hostFunction_NativeCPUTimeCxxSpecJSI_getCPUTimeNanos}; - methodMap_["hasAccurateCPUTimeNanosForBenchmarks"] = MethodMetadata {0, __hostFunction_NativeCPUTimeCxxSpecJSI_hasAccurateCPUTimeNanosForBenchmarks}; -} static jsi::Value __hostFunction_NativeDeviceEventManagerCxxSpecJSI_invokeDefaultBackPressHandler(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { static_cast(&turboModule)->invokeDefaultBackPressHandler( rt @@ -1223,13 +1177,6 @@ static jsi::Value __hostFunction_NativeDevMenuCxxSpecJSI_reload(jsi::Runtime &rt ); return jsi::Value::undefined(); } -static jsi::Value __hostFunction_NativeDevMenuCxxSpecJSI_debugRemotely(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->debugRemotely( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool() - ); - return jsi::Value::undefined(); -} static jsi::Value __hostFunction_NativeDevMenuCxxSpecJSI_setProfilingEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { static_cast(&turboModule)->setProfilingEnabled( rt, @@ -1249,7 +1196,6 @@ NativeDevMenuCxxSpecJSI::NativeDevMenuCxxSpecJSI(std::shared_ptr js : TurboModule("DevMenu", jsInvoker) { methodMap_["show"] = MethodMetadata {0, __hostFunction_NativeDevMenuCxxSpecJSI_show}; methodMap_["reload"] = MethodMetadata {0, __hostFunction_NativeDevMenuCxxSpecJSI_reload}; - methodMap_["debugRemotely"] = MethodMetadata {1, __hostFunction_NativeDevMenuCxxSpecJSI_debugRemotely}; methodMap_["setProfilingEnabled"] = MethodMetadata {1, __hostFunction_NativeDevMenuCxxSpecJSI_setProfilingEnabled}; methodMap_["setHotLoadingEnabled"] = MethodMetadata {1, __hostFunction_NativeDevMenuCxxSpecJSI_setHotLoadingEnabled}; } @@ -1279,13 +1225,6 @@ static jsi::Value __hostFunction_NativeDevSettingsCxxSpecJSI_setHotLoadingEnable ); return jsi::Value::undefined(); } -static jsi::Value __hostFunction_NativeDevSettingsCxxSpecJSI_setIsDebuggingRemotely(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setIsDebuggingRemotely( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asBool() - ); - return jsi::Value::undefined(); -} static jsi::Value __hostFunction_NativeDevSettingsCxxSpecJSI_setProfilingEnabled(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { static_cast(&turboModule)->setProfilingEnabled( rt, @@ -1340,7 +1279,6 @@ NativeDevSettingsCxxSpecJSI::NativeDevSettingsCxxSpecJSI(std::shared_ptr(&turboModule)->startSurface( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber(), - count <= 2 ? throw jsi::JSError(rt, "Expected argument in position 2 to be passed") : args[2].asNumber(), - count <= 3 ? throw jsi::JSError(rt, "Expected argument in position 3 to be passed") : args[3].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeFantomCxxSpecJSI_stopSurface(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->stopSurface( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeFantomCxxSpecJSI_dispatchNativeEvent(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->dispatchNativeEvent( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asString(rt), - count <= 2 || args[2].isUndefined() ? std::nullopt : std::make_optional(jsi::Value(rt, args[2])) - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeFantomCxxSpecJSI_getMountingManagerLogs(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getMountingManagerLogs( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber() - ); -} -static jsi::Value __hostFunction_NativeFantomCxxSpecJSI_flushMessageQueue(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->flushMessageQueue( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeFantomCxxSpecJSI_flushEventQueue(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->flushEventQueue( - rt - ); - return jsi::Value::undefined(); -} -static jsi::Value __hostFunction_NativeFantomCxxSpecJSI_getRenderedOutput(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getRenderedOutput( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asObject(rt) - ); -} -static jsi::Value __hostFunction_NativeFantomCxxSpecJSI_reportTestSuiteResultsJSON(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->reportTestSuiteResultsJSON( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt) - ); - return jsi::Value::undefined(); -} - -NativeFantomCxxSpecJSI::NativeFantomCxxSpecJSI(std::shared_ptr jsInvoker) - : TurboModule("NativeFantomCxx", jsInvoker) { - methodMap_["startSurface"] = MethodMetadata {4, __hostFunction_NativeFantomCxxSpecJSI_startSurface}; - methodMap_["stopSurface"] = MethodMetadata {1, __hostFunction_NativeFantomCxxSpecJSI_stopSurface}; - methodMap_["dispatchNativeEvent"] = MethodMetadata {3, __hostFunction_NativeFantomCxxSpecJSI_dispatchNativeEvent}; - methodMap_["getMountingManagerLogs"] = MethodMetadata {1, __hostFunction_NativeFantomCxxSpecJSI_getMountingManagerLogs}; - methodMap_["flushMessageQueue"] = MethodMetadata {0, __hostFunction_NativeFantomCxxSpecJSI_flushMessageQueue}; - methodMap_["flushEventQueue"] = MethodMetadata {0, __hostFunction_NativeFantomCxxSpecJSI_flushEventQueue}; - methodMap_["getRenderedOutput"] = MethodMetadata {2, __hostFunction_NativeFantomCxxSpecJSI_getRenderedOutput}; - methodMap_["reportTestSuiteResultsJSON"] = MethodMetadata {1, __hostFunction_NativeFantomCxxSpecJSI_reportTestSuiteResultsJSON}; -} static jsi::Value __hostFunction_NativeFileReaderModuleCxxSpecJSI_readAsDataURL(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->readAsDataURL( rt, @@ -3247,10 +3115,11 @@ NativePerformanceCxxSpecJSI::NativePerformanceCxxSpecJSI(std::shared_ptr(&turboModule)->getParentNode( +static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_compareDocumentPosition(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->compareDocumentPosition( rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) + count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]), + count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : jsi::Value(rt, args[1]) ); } static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getChildNodes(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { @@ -3259,21 +3128,20 @@ static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getChildNodes(jsi::Runtime count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) ); } -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_isConnected(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->isConnected( +static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getParentNode(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getParentNode( rt, count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) ); } -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_compareDocumentPosition(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->compareDocumentPosition( +static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_isConnected(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->isConnected( rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]), - count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : jsi::Value(rt, args[1]) + count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) ); } -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getTextContent(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getTextContent( +static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getBorderWidth(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getBorderWidth( rt, count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) ); @@ -3285,8 +3153,8 @@ static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getBoundingClientRect(jsi:: count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asBool() ); } -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getOffset(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getOffset( +static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getInnerSize(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getInnerSize( rt, count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) ); @@ -3303,20 +3171,14 @@ static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getScrollSize(jsi::Runtime count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) ); } -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getInnerSize(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getInnerSize( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) - ); -} -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getBorderWidth(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getBorderWidth( +static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getTagName(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getTagName( rt, count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) ); } -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getTagName(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->getTagName( +static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getTextContent(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getTextContent( rt, count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) ); @@ -3328,22 +3190,35 @@ static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_hasPointerCapture(jsi::Runt count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() ); } -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_setPointerCapture(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->setPointerCapture( +static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_releasePointerCapture(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + static_cast(&turboModule)->releasePointerCapture( rt, count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]), count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() ); return jsi::Value::undefined(); } -static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_releasePointerCapture(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->releasePointerCapture( +static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_setPointerCapture(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + static_cast(&turboModule)->setPointerCapture( rt, count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]), count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : args[1].asNumber() ); return jsi::Value::undefined(); } +static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_getOffset(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->getOffset( + rt, + count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : jsi::Value(rt, args[0]) + ); +} +static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_linkRootNode(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->linkRootNode( + rt, + count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asNumber(), + count <= 1 ? throw jsi::JSError(rt, "Expected argument in position 1 to be passed") : jsi::Value(rt, args[1]) + ); +} static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_measure(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { static_cast(&turboModule)->measure( rt, @@ -3373,21 +3248,22 @@ static jsi::Value __hostFunction_NativeDOMCxxSpecJSI_measureLayout(jsi::Runtime NativeDOMCxxSpecJSI::NativeDOMCxxSpecJSI(std::shared_ptr jsInvoker) : TurboModule("NativeDOMCxx", jsInvoker) { - methodMap_["getParentNode"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getParentNode}; + methodMap_["compareDocumentPosition"] = MethodMetadata {2, __hostFunction_NativeDOMCxxSpecJSI_compareDocumentPosition}; methodMap_["getChildNodes"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getChildNodes}; + methodMap_["getParentNode"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getParentNode}; methodMap_["isConnected"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_isConnected}; - methodMap_["compareDocumentPosition"] = MethodMetadata {2, __hostFunction_NativeDOMCxxSpecJSI_compareDocumentPosition}; - methodMap_["getTextContent"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getTextContent}; + methodMap_["getBorderWidth"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getBorderWidth}; methodMap_["getBoundingClientRect"] = MethodMetadata {2, __hostFunction_NativeDOMCxxSpecJSI_getBoundingClientRect}; - methodMap_["getOffset"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getOffset}; + methodMap_["getInnerSize"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getInnerSize}; methodMap_["getScrollPosition"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getScrollPosition}; methodMap_["getScrollSize"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getScrollSize}; - methodMap_["getInnerSize"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getInnerSize}; - methodMap_["getBorderWidth"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getBorderWidth}; methodMap_["getTagName"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getTagName}; + methodMap_["getTextContent"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getTextContent}; methodMap_["hasPointerCapture"] = MethodMetadata {2, __hostFunction_NativeDOMCxxSpecJSI_hasPointerCapture}; - methodMap_["setPointerCapture"] = MethodMetadata {2, __hostFunction_NativeDOMCxxSpecJSI_setPointerCapture}; methodMap_["releasePointerCapture"] = MethodMetadata {2, __hostFunction_NativeDOMCxxSpecJSI_releasePointerCapture}; + methodMap_["setPointerCapture"] = MethodMetadata {2, __hostFunction_NativeDOMCxxSpecJSI_setPointerCapture}; + methodMap_["getOffset"] = MethodMetadata {1, __hostFunction_NativeDOMCxxSpecJSI_getOffset}; + methodMap_["linkRootNode"] = MethodMetadata {2, __hostFunction_NativeDOMCxxSpecJSI_linkRootNode}; methodMap_["measure"] = MethodMetadata {2, __hostFunction_NativeDOMCxxSpecJSI_measure}; methodMap_["measureInWindow"] = MethodMetadata {2, __hostFunction_NativeDOMCxxSpecJSI_measureInWindow}; methodMap_["measureLayout"] = MethodMetadata {4, __hostFunction_NativeDOMCxxSpecJSI_measureLayout}; diff --git a/vnext/codegen/rnwcoreJSI.h b/vnext/codegen/rnwcoreJSI.h index 4c7c4ecb5ad..d79941ae796 100644 --- a/vnext/codegen/rnwcoreJSI.h +++ b/vnext/codegen/rnwcoreJSI.h @@ -22,12 +22,10 @@ namespace facebook::react { public: virtual bool commonTestFlag(jsi::Runtime &rt) = 0; virtual bool commonTestFlagWithoutNativeImplementation(jsi::Runtime &rt) = 0; - virtual bool completeReactInstanceCreationOnBgThreadOnAndroid(jsi::Runtime &rt) = 0; virtual bool disableMountItemReorderingAndroid(jsi::Runtime &rt) = 0; virtual bool enableAccumulatedUpdatesInRawPropsAndroid(jsi::Runtime &rt) = 0; virtual bool enableBridgelessArchitecture(jsi::Runtime &rt) = 0; virtual bool enableCppPropsIteratorSetter(jsi::Runtime &rt) = 0; - virtual bool enableDeletionOfUnmountedViews(jsi::Runtime &rt) = 0; virtual bool enableEagerRootViewAttachment(jsi::Runtime &rt) = 0; virtual bool enableEventEmitterRetentionDuringGesturesOnAndroid(jsi::Runtime &rt) = 0; virtual bool enableFabricLogs(jsi::Runtime &rt) = 0; @@ -52,16 +50,13 @@ namespace facebook::react { virtual bool fixMappingOfEventPrioritiesBetweenFabricAndReact(jsi::Runtime &rt) = 0; virtual bool fixMountingCoordinatorReportedPendingTransactionsOnAndroid(jsi::Runtime &rt) = 0; virtual bool fuseboxEnabledRelease(jsi::Runtime &rt) = 0; - virtual bool initEagerTurboModulesOnNativeModulesQueueAndroid(jsi::Runtime &rt) = 0; + virtual bool fuseboxNetworkInspectionEnabled(jsi::Runtime &rt) = 0; virtual bool lazyAnimationCallbacks(jsi::Runtime &rt) = 0; - virtual bool loadVectorDrawablesOnImages(jsi::Runtime &rt) = 0; virtual bool traceTurboModulePromiseRejectionsOnAndroid(jsi::Runtime &rt) = 0; virtual bool useAlwaysAvailableJSErrorHandling(jsi::Runtime &rt) = 0; virtual bool useEditTextStockAndroidFocusBehavior(jsi::Runtime &rt) = 0; virtual bool useFabricInterop(jsi::Runtime &rt) = 0; - virtual bool useImmediateExecutorInAndroidBridgeless(jsi::Runtime &rt) = 0; virtual bool useNativeViewConfigsInBridgelessMode(jsi::Runtime &rt) = 0; - virtual bool useOptimisedViewPreallocationOnAndroid(jsi::Runtime &rt) = 0; virtual bool useOptimizedEventBatchingOnAndroid(jsi::Runtime &rt) = 0; virtual bool useRawPropsJsiValue(jsi::Runtime &rt) = 0; virtual bool useRuntimeShadowNodeReferenceUpdate(jsi::Runtime &rt) = 0; @@ -113,14 +108,6 @@ class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::commonTestFlagWithoutNativeImplementation, jsInvoker_, instance_); } - bool completeReactInstanceCreationOnBgThreadOnAndroid(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::completeReactInstanceCreationOnBgThreadOnAndroid) == 1, - "Expected completeReactInstanceCreationOnBgThreadOnAndroid(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::completeReactInstanceCreationOnBgThreadOnAndroid, jsInvoker_, instance_); - } bool disableMountItemReorderingAndroid(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::disableMountItemReorderingAndroid) == 1, @@ -153,14 +140,6 @@ class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::enableCppPropsIteratorSetter, jsInvoker_, instance_); } - bool enableDeletionOfUnmountedViews(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableDeletionOfUnmountedViews) == 1, - "Expected enableDeletionOfUnmountedViews(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableDeletionOfUnmountedViews, jsInvoker_, instance_); - } bool enableEagerRootViewAttachment(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::enableEagerRootViewAttachment) == 1, @@ -353,13 +332,13 @@ class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::fuseboxEnabledRelease, jsInvoker_, instance_); } - bool initEagerTurboModulesOnNativeModulesQueueAndroid(jsi::Runtime &rt) override { + bool fuseboxNetworkInspectionEnabled(jsi::Runtime &rt) override { static_assert( - bridging::getParameterCount(&T::initEagerTurboModulesOnNativeModulesQueueAndroid) == 1, - "Expected initEagerTurboModulesOnNativeModulesQueueAndroid(...) to have 1 parameters"); + bridging::getParameterCount(&T::fuseboxNetworkInspectionEnabled) == 1, + "Expected fuseboxNetworkInspectionEnabled(...) to have 1 parameters"); return bridging::callFromJs( - rt, &T::initEagerTurboModulesOnNativeModulesQueueAndroid, jsInvoker_, instance_); + rt, &T::fuseboxNetworkInspectionEnabled, jsInvoker_, instance_); } bool lazyAnimationCallbacks(jsi::Runtime &rt) override { static_assert( @@ -369,14 +348,6 @@ class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::lazyAnimationCallbacks, jsInvoker_, instance_); } - bool loadVectorDrawablesOnImages(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::loadVectorDrawablesOnImages) == 1, - "Expected loadVectorDrawablesOnImages(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::loadVectorDrawablesOnImages, jsInvoker_, instance_); - } bool traceTurboModulePromiseRejectionsOnAndroid(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::traceTurboModulePromiseRejectionsOnAndroid) == 1, @@ -409,14 +380,6 @@ class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::useFabricInterop, jsInvoker_, instance_); } - bool useImmediateExecutorInAndroidBridgeless(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::useImmediateExecutorInAndroidBridgeless) == 1, - "Expected useImmediateExecutorInAndroidBridgeless(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::useImmediateExecutorInAndroidBridgeless, jsInvoker_, instance_); - } bool useNativeViewConfigsInBridgelessMode(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::useNativeViewConfigsInBridgelessMode) == 1, @@ -425,14 +388,6 @@ class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::useNativeViewConfigsInBridgelessMode, jsInvoker_, instance_); } - bool useOptimisedViewPreallocationOnAndroid(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::useOptimisedViewPreallocationOnAndroid) == 1, - "Expected useOptimisedViewPreallocationOnAndroid(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::useOptimisedViewPreallocationOnAndroid, jsInvoker_, instance_); - } bool useOptimizedEventBatchingOnAndroid(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::useOptimizedEventBatchingOnAndroid) == 1, @@ -2622,69 +2577,6 @@ class JSI_EXPORT NativeClipboardCxxSpec : public TurboModule { }; - class JSI_EXPORT NativeCPUTimeCxxSpecJSI : public TurboModule { -protected: - NativeCPUTimeCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual double getCPUTimeNanos(jsi::Runtime &rt) = 0; - virtual bool hasAccurateCPUTimeNanosForBenchmarks(jsi::Runtime &rt) = 0; - -}; - -template -class JSI_EXPORT NativeCPUTimeCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "CPUTimeCxx"; - -protected: - NativeCPUTimeCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeCPUTimeCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeCPUTimeCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeCPUTimeCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - double getCPUTimeNanos(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::getCPUTimeNanos) == 1, - "Expected getCPUTimeNanos(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::getCPUTimeNanos, jsInvoker_, instance_); - } - bool hasAccurateCPUTimeNanosForBenchmarks(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::hasAccurateCPUTimeNanosForBenchmarks) == 1, - "Expected hasAccurateCPUTimeNanosForBenchmarks(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::hasAccurateCPUTimeNanosForBenchmarks, jsInvoker_, instance_); - } - - private: - friend class NativeCPUTimeCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - class JSI_EXPORT NativeDeviceEventManagerCxxSpecJSI : public TurboModule { protected: NativeDeviceEventManagerCxxSpecJSI(std::shared_ptr jsInvoker); @@ -3113,7 +3005,6 @@ class JSI_EXPORT NativeDevLoadingViewCxxSpec : public TurboModule { public: virtual void show(jsi::Runtime &rt) = 0; virtual void reload(jsi::Runtime &rt) = 0; - virtual void debugRemotely(jsi::Runtime &rt, bool enableDebug) = 0; virtual void setProfilingEnabled(jsi::Runtime &rt, bool enabled) = 0; virtual void setHotLoadingEnabled(jsi::Runtime &rt, bool enabled) = 0; @@ -3162,14 +3053,6 @@ class JSI_EXPORT NativeDevMenuCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::reload, jsInvoker_, instance_); } - void debugRemotely(jsi::Runtime &rt, bool enableDebug) override { - static_assert( - bridging::getParameterCount(&T::debugRemotely) == 2, - "Expected debugRemotely(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::debugRemotely, jsInvoker_, instance_, std::move(enableDebug)); - } void setProfilingEnabled(jsi::Runtime &rt, bool enabled) override { static_assert( bridging::getParameterCount(&T::setProfilingEnabled) == 2, @@ -3205,7 +3088,6 @@ class JSI_EXPORT NativeDevMenuCxxSpec : public TurboModule { virtual void reloadWithReason(jsi::Runtime &rt, jsi::String reason) = 0; virtual void onFastRefresh(jsi::Runtime &rt) = 0; virtual void setHotLoadingEnabled(jsi::Runtime &rt, bool isHotLoadingEnabled) = 0; - virtual void setIsDebuggingRemotely(jsi::Runtime &rt, bool isDebuggingRemotelyEnabled) = 0; virtual void setProfilingEnabled(jsi::Runtime &rt, bool isProfilingEnabled) = 0; virtual void toggleElementInspector(jsi::Runtime &rt) = 0; virtual void addMenuItem(jsi::Runtime &rt, jsi::String title) = 0; @@ -3275,14 +3157,6 @@ class JSI_EXPORT NativeDevSettingsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::setHotLoadingEnabled, jsInvoker_, instance_, std::move(isHotLoadingEnabled)); } - void setIsDebuggingRemotely(jsi::Runtime &rt, bool isDebuggingRemotelyEnabled) override { - static_assert( - bridging::getParameterCount(&T::setIsDebuggingRemotely) == 2, - "Expected setIsDebuggingRemotely(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::setIsDebuggingRemotely, jsInvoker_, instance_, std::move(isDebuggingRemotelyEnabled)); - } void setProfilingEnabled(jsi::Runtime &rt, bool isProfilingEnabled) override { static_assert( bridging::getParameterCount(&T::setProfilingEnabled) == 2, @@ -3928,170 +3802,6 @@ class JSI_EXPORT NativeExceptionsManagerCxxSpec : public TurboModule { }; - -#pragma mark - NativeFantomRenderFormatOptions - -template -struct NativeFantomRenderFormatOptions { - P0 includeRoot; - P1 includeLayoutMetrics; - bool operator==(const NativeFantomRenderFormatOptions &other) const { - return includeRoot == other.includeRoot && includeLayoutMetrics == other.includeLayoutMetrics; - } -}; - -template -struct NativeFantomRenderFormatOptionsBridging { - static T types; - - static T fromJs( - jsi::Runtime &rt, - const jsi::Object &value, - const std::shared_ptr &jsInvoker) { - T result{ - bridging::fromJs(rt, value.getProperty(rt, "includeRoot"), jsInvoker), - bridging::fromJs(rt, value.getProperty(rt, "includeLayoutMetrics"), jsInvoker)}; - return result; - } - -#ifdef DEBUG - static bool includeRootToJs(jsi::Runtime &rt, decltype(types.includeRoot) value) { - return bridging::toJs(rt, value); - } - - static bool includeLayoutMetricsToJs(jsi::Runtime &rt, decltype(types.includeLayoutMetrics) value) { - return bridging::toJs(rt, value); - } -#endif - - static jsi::Object toJs( - jsi::Runtime &rt, - const T &value, - const std::shared_ptr &jsInvoker) { - auto result = facebook::jsi::Object(rt); - result.setProperty(rt, "includeRoot", bridging::toJs(rt, value.includeRoot, jsInvoker)); - result.setProperty(rt, "includeLayoutMetrics", bridging::toJs(rt, value.includeLayoutMetrics, jsInvoker)); - return result; - } -}; - -class JSI_EXPORT NativeFantomCxxSpecJSI : public TurboModule { -protected: - NativeFantomCxxSpecJSI(std::shared_ptr jsInvoker); - -public: - virtual void startSurface(jsi::Runtime &rt, double surfaceId, double viewportWidth, double viewportHeight, double devicePixelRatio) = 0; - virtual void stopSurface(jsi::Runtime &rt, double surfaceId) = 0; - virtual void dispatchNativeEvent(jsi::Runtime &rt, jsi::Value shadowNode, jsi::String type, std::optional payload) = 0; - virtual jsi::Array getMountingManagerLogs(jsi::Runtime &rt, double surfaceId) = 0; - virtual void flushMessageQueue(jsi::Runtime &rt) = 0; - virtual void flushEventQueue(jsi::Runtime &rt) = 0; - virtual jsi::String getRenderedOutput(jsi::Runtime &rt, double surfaceId, jsi::Object config) = 0; - virtual void reportTestSuiteResultsJSON(jsi::Runtime &rt, jsi::String results) = 0; - -}; - -template -class JSI_EXPORT NativeFantomCxxSpec : public TurboModule { -public: - jsi::Value create(jsi::Runtime &rt, const jsi::PropNameID &propName) override { - return delegate_.create(rt, propName); - } - - std::vector getPropertyNames(jsi::Runtime& runtime) override { - return delegate_.getPropertyNames(runtime); - } - - static constexpr std::string_view kModuleName = "NativeFantomCxx"; - -protected: - NativeFantomCxxSpec(std::shared_ptr jsInvoker) - : TurboModule(std::string{NativeFantomCxxSpec::kModuleName}, jsInvoker), - delegate_(reinterpret_cast(this), jsInvoker) {} - - -private: - class Delegate : public NativeFantomCxxSpecJSI { - public: - Delegate(T *instance, std::shared_ptr jsInvoker) : - NativeFantomCxxSpecJSI(std::move(jsInvoker)), instance_(instance) { - - } - - void startSurface(jsi::Runtime &rt, double surfaceId, double viewportWidth, double viewportHeight, double devicePixelRatio) override { - static_assert( - bridging::getParameterCount(&T::startSurface) == 5, - "Expected startSurface(...) to have 5 parameters"); - - return bridging::callFromJs( - rt, &T::startSurface, jsInvoker_, instance_, std::move(surfaceId), std::move(viewportWidth), std::move(viewportHeight), std::move(devicePixelRatio)); - } - void stopSurface(jsi::Runtime &rt, double surfaceId) override { - static_assert( - bridging::getParameterCount(&T::stopSurface) == 2, - "Expected stopSurface(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::stopSurface, jsInvoker_, instance_, std::move(surfaceId)); - } - void dispatchNativeEvent(jsi::Runtime &rt, jsi::Value shadowNode, jsi::String type, std::optional payload) override { - static_assert( - bridging::getParameterCount(&T::dispatchNativeEvent) == 4, - "Expected dispatchNativeEvent(...) to have 4 parameters"); - - return bridging::callFromJs( - rt, &T::dispatchNativeEvent, jsInvoker_, instance_, std::move(shadowNode), std::move(type), std::move(payload)); - } - jsi::Array getMountingManagerLogs(jsi::Runtime &rt, double surfaceId) override { - static_assert( - bridging::getParameterCount(&T::getMountingManagerLogs) == 2, - "Expected getMountingManagerLogs(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getMountingManagerLogs, jsInvoker_, instance_, std::move(surfaceId)); - } - void flushMessageQueue(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::flushMessageQueue) == 1, - "Expected flushMessageQueue(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::flushMessageQueue, jsInvoker_, instance_); - } - void flushEventQueue(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::flushEventQueue) == 1, - "Expected flushEventQueue(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::flushEventQueue, jsInvoker_, instance_); - } - jsi::String getRenderedOutput(jsi::Runtime &rt, double surfaceId, jsi::Object config) override { - static_assert( - bridging::getParameterCount(&T::getRenderedOutput) == 3, - "Expected getRenderedOutput(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::getRenderedOutput, jsInvoker_, instance_, std::move(surfaceId), std::move(config)); - } - void reportTestSuiteResultsJSON(jsi::Runtime &rt, jsi::String results) override { - static_assert( - bridging::getParameterCount(&T::reportTestSuiteResultsJSON) == 2, - "Expected reportTestSuiteResultsJSON(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::reportTestSuiteResultsJSON, jsInvoker_, instance_, std::move(results)); - } - - private: - friend class NativeFantomCxxSpec; - T *instance_; - }; - - Delegate delegate_; -}; - - class JSI_EXPORT NativeFileReaderModuleCxxSpecJSI : public TurboModule { protected: NativeFileReaderModuleCxxSpecJSI(std::shared_ptr jsInvoker); @@ -9221,24 +8931,25 @@ class JSI_EXPORT NativePerformanceCxxSpec : public TurboModule { NativeDOMCxxSpecJSI(std::shared_ptr jsInvoker); public: - virtual jsi::Value getParentNode(jsi::Runtime &rt, jsi::Value shadowNode) = 0; - virtual jsi::Array getChildNodes(jsi::Runtime &rt, jsi::Value shadowNode) = 0; - virtual bool isConnected(jsi::Runtime &rt, jsi::Value shadowNode) = 0; - virtual double compareDocumentPosition(jsi::Runtime &rt, jsi::Value shadowNode, jsi::Value otherShadowNode) = 0; - virtual jsi::String getTextContent(jsi::Runtime &rt, jsi::Value shadowNode) = 0; - virtual jsi::Array getBoundingClientRect(jsi::Runtime &rt, jsi::Value shadowNode, bool includeTransform) = 0; - virtual jsi::Array getOffset(jsi::Runtime &rt, jsi::Value shadowNode) = 0; - virtual jsi::Array getScrollPosition(jsi::Runtime &rt, jsi::Value shadowNode) = 0; - virtual jsi::Array getScrollSize(jsi::Runtime &rt, jsi::Value shadowNode) = 0; - virtual jsi::Array getInnerSize(jsi::Runtime &rt, jsi::Value shadowNode) = 0; - virtual jsi::Array getBorderWidth(jsi::Runtime &rt, jsi::Value shadowNode) = 0; - virtual jsi::String getTagName(jsi::Runtime &rt, jsi::Value shadowNode) = 0; - virtual bool hasPointerCapture(jsi::Runtime &rt, jsi::Value shadowNode, double pointerId) = 0; - virtual void setPointerCapture(jsi::Runtime &rt, jsi::Value shadowNode, double pointerId) = 0; - virtual void releasePointerCapture(jsi::Runtime &rt, jsi::Value shadowNode, double pointerId) = 0; - virtual void measure(jsi::Runtime &rt, jsi::Value shadowNode, jsi::Function callback) = 0; - virtual void measureInWindow(jsi::Runtime &rt, jsi::Value shadowNode, jsi::Function callback) = 0; - virtual void measureLayout(jsi::Runtime &rt, jsi::Value shadowNode, jsi::Value relativeNode, jsi::Function onFail, jsi::Function onSuccess) = 0; + virtual double compareDocumentPosition(jsi::Runtime &rt, jsi::Value nativeNodeReference, jsi::Value otherNativeNodeReference) = 0; + virtual jsi::Array getChildNodes(jsi::Runtime &rt, jsi::Value nativeNodeReference) = 0; + virtual jsi::Value getParentNode(jsi::Runtime &rt, jsi::Value nativeNodeReference) = 0; + virtual bool isConnected(jsi::Runtime &rt, jsi::Value nativeNodeReference) = 0; + virtual jsi::Array getBorderWidth(jsi::Runtime &rt, jsi::Value nativeElementReference) = 0; + virtual jsi::Array getBoundingClientRect(jsi::Runtime &rt, jsi::Value nativeElementReference, bool includeTransform) = 0; + virtual jsi::Array getInnerSize(jsi::Runtime &rt, jsi::Value nativeElementReference) = 0; + virtual jsi::Array getScrollPosition(jsi::Runtime &rt, jsi::Value nativeElementReference) = 0; + virtual jsi::Array getScrollSize(jsi::Runtime &rt, jsi::Value nativeElementReference) = 0; + virtual jsi::String getTagName(jsi::Runtime &rt, jsi::Value nativeElementReference) = 0; + virtual jsi::String getTextContent(jsi::Runtime &rt, jsi::Value nativeElementReference) = 0; + virtual bool hasPointerCapture(jsi::Runtime &rt, jsi::Value nativeElementReference, double pointerId) = 0; + virtual void releasePointerCapture(jsi::Runtime &rt, jsi::Value nativeElementReference, double pointerId) = 0; + virtual void setPointerCapture(jsi::Runtime &rt, jsi::Value nativeElementReference, double pointerId) = 0; + virtual jsi::Array getOffset(jsi::Runtime &rt, jsi::Value nativeElementReference) = 0; + virtual jsi::Value linkRootNode(jsi::Runtime &rt, double rootTag, jsi::Value instanceHandle) = 0; + virtual void measure(jsi::Runtime &rt, jsi::Value nativeElementReference, jsi::Function callback) = 0; + virtual void measureInWindow(jsi::Runtime &rt, jsi::Value nativeElementReference, jsi::Function callback) = 0; + virtual void measureLayout(jsi::Runtime &rt, jsi::Value nativeElementReference, jsi::Value relativeNode, jsi::Function onFail, jsi::Function onSuccess) = 0; }; @@ -9269,149 +8980,157 @@ class JSI_EXPORT NativeDOMCxxSpec : public TurboModule { } - jsi::Value getParentNode(jsi::Runtime &rt, jsi::Value shadowNode) override { + double compareDocumentPosition(jsi::Runtime &rt, jsi::Value nativeNodeReference, jsi::Value otherNativeNodeReference) override { static_assert( - bridging::getParameterCount(&T::getParentNode) == 2, - "Expected getParentNode(...) to have 2 parameters"); + bridging::getParameterCount(&T::compareDocumentPosition) == 3, + "Expected compareDocumentPosition(...) to have 3 parameters"); - return bridging::callFromJs( - rt, &T::getParentNode, jsInvoker_, instance_, std::move(shadowNode)); + return bridging::callFromJs( + rt, &T::compareDocumentPosition, jsInvoker_, instance_, std::move(nativeNodeReference), std::move(otherNativeNodeReference)); } - jsi::Array getChildNodes(jsi::Runtime &rt, jsi::Value shadowNode) override { + jsi::Array getChildNodes(jsi::Runtime &rt, jsi::Value nativeNodeReference) override { static_assert( bridging::getParameterCount(&T::getChildNodes) == 2, "Expected getChildNodes(...) to have 2 parameters"); return bridging::callFromJs( - rt, &T::getChildNodes, jsInvoker_, instance_, std::move(shadowNode)); + rt, &T::getChildNodes, jsInvoker_, instance_, std::move(nativeNodeReference)); } - bool isConnected(jsi::Runtime &rt, jsi::Value shadowNode) override { + jsi::Value getParentNode(jsi::Runtime &rt, jsi::Value nativeNodeReference) override { static_assert( - bridging::getParameterCount(&T::isConnected) == 2, - "Expected isConnected(...) to have 2 parameters"); + bridging::getParameterCount(&T::getParentNode) == 2, + "Expected getParentNode(...) to have 2 parameters"); - return bridging::callFromJs( - rt, &T::isConnected, jsInvoker_, instance_, std::move(shadowNode)); + return bridging::callFromJs( + rt, &T::getParentNode, jsInvoker_, instance_, std::move(nativeNodeReference)); } - double compareDocumentPosition(jsi::Runtime &rt, jsi::Value shadowNode, jsi::Value otherShadowNode) override { + bool isConnected(jsi::Runtime &rt, jsi::Value nativeNodeReference) override { static_assert( - bridging::getParameterCount(&T::compareDocumentPosition) == 3, - "Expected compareDocumentPosition(...) to have 3 parameters"); + bridging::getParameterCount(&T::isConnected) == 2, + "Expected isConnected(...) to have 2 parameters"); - return bridging::callFromJs( - rt, &T::compareDocumentPosition, jsInvoker_, instance_, std::move(shadowNode), std::move(otherShadowNode)); + return bridging::callFromJs( + rt, &T::isConnected, jsInvoker_, instance_, std::move(nativeNodeReference)); } - jsi::String getTextContent(jsi::Runtime &rt, jsi::Value shadowNode) override { + jsi::Array getBorderWidth(jsi::Runtime &rt, jsi::Value nativeElementReference) override { static_assert( - bridging::getParameterCount(&T::getTextContent) == 2, - "Expected getTextContent(...) to have 2 parameters"); + bridging::getParameterCount(&T::getBorderWidth) == 2, + "Expected getBorderWidth(...) to have 2 parameters"); - return bridging::callFromJs( - rt, &T::getTextContent, jsInvoker_, instance_, std::move(shadowNode)); + return bridging::callFromJs( + rt, &T::getBorderWidth, jsInvoker_, instance_, std::move(nativeElementReference)); } - jsi::Array getBoundingClientRect(jsi::Runtime &rt, jsi::Value shadowNode, bool includeTransform) override { + jsi::Array getBoundingClientRect(jsi::Runtime &rt, jsi::Value nativeElementReference, bool includeTransform) override { static_assert( bridging::getParameterCount(&T::getBoundingClientRect) == 3, "Expected getBoundingClientRect(...) to have 3 parameters"); return bridging::callFromJs( - rt, &T::getBoundingClientRect, jsInvoker_, instance_, std::move(shadowNode), std::move(includeTransform)); + rt, &T::getBoundingClientRect, jsInvoker_, instance_, std::move(nativeElementReference), std::move(includeTransform)); } - jsi::Array getOffset(jsi::Runtime &rt, jsi::Value shadowNode) override { + jsi::Array getInnerSize(jsi::Runtime &rt, jsi::Value nativeElementReference) override { static_assert( - bridging::getParameterCount(&T::getOffset) == 2, - "Expected getOffset(...) to have 2 parameters"); + bridging::getParameterCount(&T::getInnerSize) == 2, + "Expected getInnerSize(...) to have 2 parameters"); return bridging::callFromJs( - rt, &T::getOffset, jsInvoker_, instance_, std::move(shadowNode)); + rt, &T::getInnerSize, jsInvoker_, instance_, std::move(nativeElementReference)); } - jsi::Array getScrollPosition(jsi::Runtime &rt, jsi::Value shadowNode) override { + jsi::Array getScrollPosition(jsi::Runtime &rt, jsi::Value nativeElementReference) override { static_assert( bridging::getParameterCount(&T::getScrollPosition) == 2, "Expected getScrollPosition(...) to have 2 parameters"); return bridging::callFromJs( - rt, &T::getScrollPosition, jsInvoker_, instance_, std::move(shadowNode)); + rt, &T::getScrollPosition, jsInvoker_, instance_, std::move(nativeElementReference)); } - jsi::Array getScrollSize(jsi::Runtime &rt, jsi::Value shadowNode) override { + jsi::Array getScrollSize(jsi::Runtime &rt, jsi::Value nativeElementReference) override { static_assert( bridging::getParameterCount(&T::getScrollSize) == 2, "Expected getScrollSize(...) to have 2 parameters"); return bridging::callFromJs( - rt, &T::getScrollSize, jsInvoker_, instance_, std::move(shadowNode)); - } - jsi::Array getInnerSize(jsi::Runtime &rt, jsi::Value shadowNode) override { - static_assert( - bridging::getParameterCount(&T::getInnerSize) == 2, - "Expected getInnerSize(...) to have 2 parameters"); - - return bridging::callFromJs( - rt, &T::getInnerSize, jsInvoker_, instance_, std::move(shadowNode)); + rt, &T::getScrollSize, jsInvoker_, instance_, std::move(nativeElementReference)); } - jsi::Array getBorderWidth(jsi::Runtime &rt, jsi::Value shadowNode) override { + jsi::String getTagName(jsi::Runtime &rt, jsi::Value nativeElementReference) override { static_assert( - bridging::getParameterCount(&T::getBorderWidth) == 2, - "Expected getBorderWidth(...) to have 2 parameters"); + bridging::getParameterCount(&T::getTagName) == 2, + "Expected getTagName(...) to have 2 parameters"); - return bridging::callFromJs( - rt, &T::getBorderWidth, jsInvoker_, instance_, std::move(shadowNode)); + return bridging::callFromJs( + rt, &T::getTagName, jsInvoker_, instance_, std::move(nativeElementReference)); } - jsi::String getTagName(jsi::Runtime &rt, jsi::Value shadowNode) override { + jsi::String getTextContent(jsi::Runtime &rt, jsi::Value nativeElementReference) override { static_assert( - bridging::getParameterCount(&T::getTagName) == 2, - "Expected getTagName(...) to have 2 parameters"); + bridging::getParameterCount(&T::getTextContent) == 2, + "Expected getTextContent(...) to have 2 parameters"); return bridging::callFromJs( - rt, &T::getTagName, jsInvoker_, instance_, std::move(shadowNode)); + rt, &T::getTextContent, jsInvoker_, instance_, std::move(nativeElementReference)); } - bool hasPointerCapture(jsi::Runtime &rt, jsi::Value shadowNode, double pointerId) override { + bool hasPointerCapture(jsi::Runtime &rt, jsi::Value nativeElementReference, double pointerId) override { static_assert( bridging::getParameterCount(&T::hasPointerCapture) == 3, "Expected hasPointerCapture(...) to have 3 parameters"); return bridging::callFromJs( - rt, &T::hasPointerCapture, jsInvoker_, instance_, std::move(shadowNode), std::move(pointerId)); + rt, &T::hasPointerCapture, jsInvoker_, instance_, std::move(nativeElementReference), std::move(pointerId)); } - void setPointerCapture(jsi::Runtime &rt, jsi::Value shadowNode, double pointerId) override { + void releasePointerCapture(jsi::Runtime &rt, jsi::Value nativeElementReference, double pointerId) override { + static_assert( + bridging::getParameterCount(&T::releasePointerCapture) == 3, + "Expected releasePointerCapture(...) to have 3 parameters"); + + return bridging::callFromJs( + rt, &T::releasePointerCapture, jsInvoker_, instance_, std::move(nativeElementReference), std::move(pointerId)); + } + void setPointerCapture(jsi::Runtime &rt, jsi::Value nativeElementReference, double pointerId) override { static_assert( bridging::getParameterCount(&T::setPointerCapture) == 3, "Expected setPointerCapture(...) to have 3 parameters"); return bridging::callFromJs( - rt, &T::setPointerCapture, jsInvoker_, instance_, std::move(shadowNode), std::move(pointerId)); + rt, &T::setPointerCapture, jsInvoker_, instance_, std::move(nativeElementReference), std::move(pointerId)); } - void releasePointerCapture(jsi::Runtime &rt, jsi::Value shadowNode, double pointerId) override { + jsi::Array getOffset(jsi::Runtime &rt, jsi::Value nativeElementReference) override { static_assert( - bridging::getParameterCount(&T::releasePointerCapture) == 3, - "Expected releasePointerCapture(...) to have 3 parameters"); + bridging::getParameterCount(&T::getOffset) == 2, + "Expected getOffset(...) to have 2 parameters"); - return bridging::callFromJs( - rt, &T::releasePointerCapture, jsInvoker_, instance_, std::move(shadowNode), std::move(pointerId)); + return bridging::callFromJs( + rt, &T::getOffset, jsInvoker_, instance_, std::move(nativeElementReference)); + } + jsi::Value linkRootNode(jsi::Runtime &rt, double rootTag, jsi::Value instanceHandle) override { + static_assert( + bridging::getParameterCount(&T::linkRootNode) == 3, + "Expected linkRootNode(...) to have 3 parameters"); + + return bridging::callFromJs( + rt, &T::linkRootNode, jsInvoker_, instance_, std::move(rootTag), std::move(instanceHandle)); } - void measure(jsi::Runtime &rt, jsi::Value shadowNode, jsi::Function callback) override { + void measure(jsi::Runtime &rt, jsi::Value nativeElementReference, jsi::Function callback) override { static_assert( bridging::getParameterCount(&T::measure) == 3, "Expected measure(...) to have 3 parameters"); return bridging::callFromJs( - rt, &T::measure, jsInvoker_, instance_, std::move(shadowNode), std::move(callback)); + rt, &T::measure, jsInvoker_, instance_, std::move(nativeElementReference), std::move(callback)); } - void measureInWindow(jsi::Runtime &rt, jsi::Value shadowNode, jsi::Function callback) override { + void measureInWindow(jsi::Runtime &rt, jsi::Value nativeElementReference, jsi::Function callback) override { static_assert( bridging::getParameterCount(&T::measureInWindow) == 3, "Expected measureInWindow(...) to have 3 parameters"); return bridging::callFromJs( - rt, &T::measureInWindow, jsInvoker_, instance_, std::move(shadowNode), std::move(callback)); + rt, &T::measureInWindow, jsInvoker_, instance_, std::move(nativeElementReference), std::move(callback)); } - void measureLayout(jsi::Runtime &rt, jsi::Value shadowNode, jsi::Value relativeNode, jsi::Function onFail, jsi::Function onSuccess) override { + void measureLayout(jsi::Runtime &rt, jsi::Value nativeElementReference, jsi::Value relativeNode, jsi::Function onFail, jsi::Function onSuccess) override { static_assert( bridging::getParameterCount(&T::measureLayout) == 5, "Expected measureLayout(...) to have 5 parameters"); return bridging::callFromJs( - rt, &T::measureLayout, jsInvoker_, instance_, std::move(shadowNode), std::move(relativeNode), std::move(onFail), std::move(onSuccess)); + rt, &T::measureLayout, jsInvoker_, instance_, std::move(nativeElementReference), std::move(relativeNode), std::move(onFail), std::move(onSuccess)); } private: diff --git a/vnext/overrides.json b/vnext/overrides.json index fc26978b4e9..01ac2eef4ea 100644 --- a/vnext/overrides.json +++ b/vnext/overrides.json @@ -8,7 +8,7 @@ "**/__snapshots__/**", "src-win/rntypes/**" ], - "baseVersion": "0.79.0-nightly-20250123-d1028885e", + "baseVersion": "0.79.0-nightly-20250206-fb8a6a5bb", "overrides": [ { "type": "derived", @@ -72,21 +72,21 @@ "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp", "baseFile": "packages/react-native/ReactCommon/jsi/jsi/test/testlib.cpp", - "baseHash": "bd6f43cb2aaf4928b9bf7e063006d19c5650e546", + "baseHash": "db28bdd74acb9306ef285603bc491137e4a62b1d", "issue": 12210 }, { "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp", "baseFile": "packages/react-native/ReactCommon/jsinspector-modern/NetworkIOAgent.cpp", - "baseHash": "1dda0b2197f5d06ab5bafdd27926203f8e9a861b", + "baseHash": "a0bea220f9bdcbbe4d1cf0eab62b09f46d88081b", "issue": 13587 }, { "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h", "baseFile": "packages/react-native/ReactCommon/jsinspector-modern/NetworkIOAgent.h", - "baseHash": "81f46cd134e7844bcd4d3858b434f95131129883", + "baseHash": "3575887bdd97425ce5968fc9a45a5ead2463c8f3", "issue": 13587 }, { @@ -110,6 +110,20 @@ "baseHash": "e82eb139eab8a6e122421416fb724811bfadd6fb", "issue": 14128 }, + { + "type": "patch", + "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.cpp", + "baseFile": "packages/react-native/ReactCommon/react/nativemodule/dom/NativeDOM.cpp", + "baseHash": "d97a42728cde15f2d48eed71b5642a28fabc0d37", + "issue": 14257 + }, + { + "type": "patch", + "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.h", + "baseFile": "packages/react-native/ReactCommon/react/nativemodule/dom/NativeDOM.h", + "baseHash": "2e7b78e224f658c55105ccfc35d416d1743352e2", + "issue": 14654 + }, { "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp", @@ -175,7 +189,7 @@ "type": "derived", "file": "src-win/index.windows.js", "baseFile": "packages/react-native/index.js", - "baseHash": "21f5672451ddb764217c795a6d3d65a5d416a0c5" + "baseHash": "ec48ab28959a5c8978fb3cceccd9a294e5f6dc7e" }, { "type": "platform", @@ -231,7 +245,7 @@ "type": "patch", "file": "src-win/Libraries/Alert/Alert.windows.js", "baseFile": "packages/react-native/Libraries/Alert/Alert.js", - "baseHash": "82ea5ff7a8a7eb79269f0ab136312c6cf8063773" + "baseHash": "5191de27105f056043f07bf83c1db5d0241fbe96" }, { "type": "platform", @@ -343,13 +357,13 @@ "type": "patch", "file": "src-win/Libraries/Components/TextInput/TextInput.windows.js", "baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.js", - "baseHash": "d3033f628b289a6178466984402bb359f20d3c7a" + "baseHash": "103e01e40f864bb4b5749c02ec526c5ec3720c9d" }, { "type": "patch", "file": "src-win/Libraries/Components/TextInput/TextInputState.windows.js", "baseFile": "packages/react-native/Libraries/Components/TextInput/TextInputState.js", - "baseHash": "7a12ca2e17da0a0f487af5a27c120ef59b2ab9ef" + "baseHash": "2826039a29aa7bd68c64032b260317bae836d078" }, { "type": "derived", @@ -368,44 +382,44 @@ "type": "derived", "file": "src-win/Libraries/Components/Touchable/TouchableBounce.windows.js", "baseFile": "packages/react-native/Libraries/Components/Touchable/TouchableBounce.js", - "baseHash": "5e8a338cf864815d20e7afcfe6f50da3b13c9c19" + "baseHash": "70ff2b1010fb68bff35859d3f7fd24098d0c9e78" }, { "type": "patch", "file": "src-win/Libraries/Components/Touchable/TouchableHighlight.windows.js", "baseFile": "packages/react-native/Libraries/Components/Touchable/TouchableHighlight.js", - "baseHash": "b148161e6ba7e3137b3bb9dbdef583b1578f81d2" + "baseHash": "a3209b6ad76f3142668d8c86ec14d84a3f002b4b" }, { "type": "derived", "file": "src-win/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js", "baseFile": "packages/react-native/Libraries/Components/Touchable/TouchableNativeFeedback.js", - "baseHash": "ee79fc5b491d9dd05bd90eb365324bc16bde1f46" + "baseHash": "5be72257c6d6f421d9eea0c9cc87a32993aa5bec" }, { "type": "patch", "file": "src-win/Libraries/Components/Touchable/TouchableOpacity.windows.js", "baseFile": "packages/react-native/Libraries/Components/Touchable/TouchableOpacity.js", - "baseHash": "7d633775b60b0195b1b779ca7df90f83506a8b72" + "baseHash": "117aff90a7653443dbb613c7a95a170cba191e5a" }, { "type": "patch", "file": "src-win/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js", "baseFile": "packages/react-native/Libraries/Components/Touchable/TouchableWithoutFeedback.js", - "baseHash": "535ee3492ccbaa395f03c7875a1bd90e75a22a48" + "baseHash": "69d573961a0e73cb4deceef321cc6a6551619a3f" }, { "type": "patch", "file": "src-win/Libraries/Components/View/ReactNativeViewAttributes.windows.js", "baseFile": "packages/react-native/Libraries/Components/View/ReactNativeViewAttributes.js", - "baseHash": "4279b8fc936dbb03599892069fb7e3ceeb86b846", + "baseHash": "096d430d02315c4017c5971daaee5790db6787f6", "issue": 9053 }, { "type": "patch", "file": "src-win/Libraries/Components/View/View.windows.js", "baseFile": "packages/react-native/Libraries/Components/View/View.js", - "baseHash": "85d97fc0638ce73353898f67d0f891a86ee83f3f" + "baseHash": "0ab4937047f1469a6e8b5095d1112d0c4892af3d" }, { "type": "derived", @@ -435,7 +449,7 @@ "type": "patch", "file": "src-win/Libraries/Core/Devtools/loadBundleFromServer.windows.js", "baseFile": "packages/react-native/Libraries/Core/Devtools/loadBundleFromServer.js", - "baseHash": "14662281c97222b45893308b744a7dc7c2000801", + "baseHash": "e0158fd16d4a787e5a94d69e2b7a721e81b7c3da", "issue": 12704 }, { @@ -446,20 +460,20 @@ "type": "derived", "file": "src-win/Libraries/Image/AssetSourceResolver.windows.js", "baseFile": "packages/react-native/Libraries/Image/AssetSourceResolver.js", - "baseHash": "b2d608c93b271b2fde8d76966ea1e3a9e3c71ba7" + "baseHash": "a5f9e48adea893ed763fe2dc04793f18e5b2185e" }, { "type": "patch", "file": "src-win/Libraries/Image/Image.windows.js", "baseFile": "packages/react-native/Libraries/Image/Image.ios.js", - "baseHash": "a5abee6de7dca3cb043b834925de3f6f0443c738", + "baseHash": "c0bc913aa95b6d1309ba44ef7968ba58fc488427", "issue": 4590 }, { "type": "patch", "file": "src-win/Libraries/Image/resolveAssetSource.windows.js", "baseFile": "packages/react-native/Libraries/Image/resolveAssetSource.js", - "baseHash": "5f95ed29c1af2c4636331cc663b8fc18cd9a3754", + "baseHash": "6b011a6e50979371f7a0970baea242e5e5771b30", "issue": 10619 }, { @@ -497,7 +511,7 @@ "type": "derived", "file": "src-win/Libraries/Modal/Modal.windows.js", "baseFile": "packages/react-native/Libraries/Modal/Modal.js", - "baseHash": "5e020006917b130b187d0d578f79bddba02b6c27" + "baseHash": "70e27c0080ce810260bfbb7d8efef48e800fe9f4" }, { "type": "derived", @@ -509,13 +523,13 @@ "type": "derived", "file": "src-win/Libraries/NativeModules/specs/NativeDialogManagerWindows.js", "baseFile": "packages/react-native/Libraries/NativeModules/specs/NativeDialogManagerAndroid.js", - "baseHash": "8d5e62de4a21e49992bb92c48b698493346d44c3" + "baseHash": "8f250bac8228a2d9230905e07081ae4296ded704" }, { "type": "copy", "file": "src-win/Libraries/Network/RCTNetworking.windows.js", "baseFile": "packages/react-native/Libraries/Network/RCTNetworking.ios.js", - "baseHash": "9f1622d938405344bc27a2cf61a1c26773518a88" + "baseHash": "cdda150c411ef03de0f52d5dbbd3976d094d136b" }, { "type": "patch", @@ -551,7 +565,7 @@ "type": "patch", "file": "src-win/Libraries/ReactNative/PaperUIManager.windows.js", "baseFile": "packages/react-native/Libraries/ReactNative/PaperUIManager.js", - "baseHash": "be8b8afbf4964018271c06f35219ec17888bc93b" + "baseHash": "0011b1ecbb845e7d634f8a5c62b1fb902c4606ad" }, { "type": "platform", @@ -567,7 +581,7 @@ "type": "derived", "file": "src-win/Libraries/Text/Text.windows.js", "baseFile": "packages/react-native/Libraries/Text/Text.js", - "baseHash": "64cdf1c520112ead78e348bc306c208f212ac3c5" + "baseHash": "f493b2f8d8fddeec94d1603023ff6c6eb10a1c42" }, { "type": "derived", @@ -579,7 +593,7 @@ "type": "patch", "file": "src-win/Libraries/Types/CoreEventTypes.windows.js", "baseFile": "packages/react-native/Libraries/Types/CoreEventTypes.js", - "baseHash": "284aef610312bc89a1ae19acaad698ed740d142a" + "baseHash": "18dd62b3ecabdb9996549b608d159ba47a817969" }, { "type": "copy", @@ -592,7 +606,7 @@ "type": "derived", "file": "src-win/Libraries/Utilities/NativePlatformConstantsWin.js", "baseFile": "packages/react-native/Libraries/Utilities/NativePlatformConstantsIOS.js", - "baseHash": "7b9db1bdc43128938d261961e3765c24d17e68b6" + "baseHash": "092016d462d51606f0b9c32b3a8e3da19b0d7586" }, { "type": "derived", @@ -610,29 +624,29 @@ "type": "copy", "file": "src-win/src/private/debugging/ReactDevToolsSettingsManager.windows.js", "baseFile": "packages/react-native/src/private/debugging/ReactDevToolsSettingsManager.android.js", - "baseHash": "df41b76dc3d2df9455fae588748261d7b0a22d01" + "baseHash": "1e0309d141da6c7a6a9afa571aae831ca221bbe2" }, { "type": "patch", - "file": "src-win/src/private/specs/components/RCTModalHostViewNativeComponent.js", - "baseFile": "packages/react-native/src/private/specs/components/RCTModalHostViewNativeComponent.js", + "file": "src-win/src/private/specs_DEPRECATED/components/RCTModalHostViewNativeComponent.js", + "baseFile": "packages/react-native/src/private/specs_DEPRECATED/components/RCTModalHostViewNativeComponent.js", "baseHash": "dbda84f2de3e0aa3504e38bd4bbb687b1ea671b2", "issue": 0 }, { "type": "platform", - "file": "src-win/src/private/specs/modules/NativeAppTheme.js" + "file": "src-win/src/private/specs_DEPRECATED/modules/NativeAppTheme.js" }, { "type": "derived", - "file": "src-win/src/private/specs/modules/NativeDialogManagerWindows.js", - "baseFile": "packages/react-native/src/private/specs/modules/NativeDialogManagerAndroid.js", + "file": "src-win/src/private/specs_DEPRECATED/modules/NativeDialogManagerWindows.js", + "baseFile": "packages/react-native/src/private/specs_DEPRECATED/modules/NativeDialogManagerAndroid.js", "baseHash": "0aff9f1f951580ae27eca18c83bc8ee016b51e2c" }, { "type": "derived", - "file": "src-win/src/private/specs/modules/NativePlatformConstantsWindows.js", - "baseFile": "packages/react-native/src/private/specs/modules/NativePlatformConstantsAndroid.js", + "file": "src-win/src/private/specs_DEPRECATED/modules/NativePlatformConstantsWindows.js", + "baseFile": "packages/react-native/src/private/specs_DEPRECATED/modules/NativePlatformConstantsAndroid.js", "baseHash": "365c5df75b38b129d364af3f6700cb206ce5bd2a" } ] diff --git a/vnext/package.json b/vnext/package.json index a800025447b..15bba275165 100644 --- a/vnext/package.json +++ b/vnext/package.json @@ -28,13 +28,13 @@ "@react-native-community/cli-platform-ios": "15.0.0-alpha.2", "@react-native-windows/cli": "0.0.0-canary.262", "@react-native/assets": "1.0.0", - "@react-native/assets-registry": "0.79.0-nightly-20250123-d1028885e", - "@react-native/codegen": "0.79.0-nightly-20250123-d1028885e", - "@react-native/community-cli-plugin": "0.79.0-nightly-20250123-d1028885e", - "@react-native/gradle-plugin": "0.79.0-nightly-20250123-d1028885e", - "@react-native/js-polyfills": "0.79.0-nightly-20250123-d1028885e", - "@react-native/normalize-colors": "0.79.0-nightly-20250123-d1028885e", - "@react-native/virtualized-lists": "0.79.0-nightly-20250123-d1028885e", + "@react-native/assets-registry": "0.79.0-nightly-20250206-fb8a6a5bb", + "@react-native/codegen": "0.79.0-nightly-20250206-fb8a6a5bb", + "@react-native/community-cli-plugin": "0.79.0-nightly-20250206-fb8a6a5bb", + "@react-native/gradle-plugin": "0.79.0-nightly-20250206-fb8a6a5bb", + "@react-native/js-polyfills": "0.79.0-nightly-20250206-fb8a6a5bb", + "@react-native/normalize-colors": "0.79.0-nightly-20250206-fb8a6a5bb", + "@react-native/virtualized-lists": "0.79.0-nightly-20250206-fb8a6a5bb", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", @@ -55,7 +55,7 @@ "nullthrows": "^1.1.1", "pretty-format": "^29.7.0", "promise": "^8.3.0", - "react-devtools-core": "^6.0.1", + "react-devtools-core": "^6.1.0", "react-refresh": "^0.14.0", "react-shallow-renderer": "^16.15.0", "regenerator-runtime": "^0.13.2", @@ -69,7 +69,7 @@ }, "devDependencies": { "@react-native-windows/codegen": "0.0.0-canary.121", - "@react-native/metro-config": "0.79.0-nightly-20250123-d1028885e", + "@react-native/metro-config": "0.79.0-nightly-20250206-fb8a6a5bb", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.34", "@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.38", @@ -84,7 +84,7 @@ "just-scripts": "^1.3.3", "prettier": "2.8.8", "react": "19.0.0", - "react-native": "0.79.0-nightly-20250123-d1028885e", + "react-native": "0.79.0-nightly-20250206-fb8a6a5bb", "react-native-platform-override": "^1.9.53", "react-refresh": "^0.14.0", "typescript": "5.0.4" @@ -92,7 +92,7 @@ "peerDependencies": { "@types/react": "^19.0.0", "react": "^19.0.0", - "react-native": "0.79.0-nightly-20250123-d1028885e" + "react-native": "0.79.0-nightly-20250206-fb8a6a5bb" }, "beachball": { "defaultNpmTag": "canary", diff --git a/vnext/src-win/Libraries/Alert/Alert.windows.js b/vnext/src-win/Libraries/Alert/Alert.windows.js index a5125381be1..a939ec33348 100644 --- a/vnext/src-win/Libraries/Alert/Alert.windows.js +++ b/vnext/src-win/Libraries/Alert/Alert.windows.js @@ -4,43 +4,21 @@ * @flow * @format */ + +import type {AlertOptions, AlertType, Buttons} from './Alert.flow'; + import type {DialogOptions} from '../NativeModules/specs/NativeDialogManagerWindows'; const NativeDialogManagerWindows = require('../NativeModules/specs/NativeDialogManagerWindows').default; -export type AlertType = - | 'default' - | 'plain-text' - | 'secure-text' - | 'login-password'; -export type AlertButtonStyle = 'default' | 'cancel' | 'destructive'; -export type Buttons = Array<{ - text?: string, - onPress?: ?Function, - isPreferred?: boolean, - style?: AlertButtonStyle, - ... -}>; - -type Options = { - cancelable?: ?boolean, - userInterfaceStyle?: 'unspecified' | 'light' | 'dark', - onDismiss?: ?() => void, - rootTag?: number, - ... -}; +export type * from './Alert.flow'; -/** - * Launches an alert dialog with the specified title and message. - * - * See https://reactnative.dev/docs/alert - */ class Alert { static alert( title: ?string, message?: ?string, buttons?: Buttons, - options?: Options, + options?: AlertOptions, ): void { if (!NativeDialogManagerWindows) { return; @@ -51,7 +29,6 @@ class Alert { title: title || '', message: message || '', cancelable: false, - rootTag: options && options.rootTag, }; if (options && options.cancelable) { @@ -120,7 +97,7 @@ class Alert { type?: ?AlertType = 'plain-text', defaultValue?: string, keyboardType?: string, - options?: Options, + options?: AlertOptions, ): void { throw new Error( 'Alert.prompt not currently implemented in react-native-windows', diff --git a/vnext/src-win/Libraries/AppTheme/NativeAppTheme.js b/vnext/src-win/Libraries/AppTheme/NativeAppTheme.js index 3c204b66732..b95c1ff15d4 100644 --- a/vnext/src-win/Libraries/AppTheme/NativeAppTheme.js +++ b/vnext/src-win/Libraries/AppTheme/NativeAppTheme.js @@ -6,6 +6,6 @@ * @flow strict-local */ -export * from '../../src/private/specs/modules/NativeAppTheme'; -import NativeAppTheme from '../../src/private/specs/modules/NativeAppTheme'; +export * from '../../src/private/specs_DEPRECATED/modules/NativeAppTheme'; +import NativeAppTheme from '../../src/private/specs_DEPRECATED/modules/NativeAppTheme'; export default NativeAppTheme; diff --git a/vnext/src-win/Libraries/Components/Button.windows.js b/vnext/src-win/Libraries/Components/Button.windows.js index a7dc394b9c1..86f62858ce2 100644 --- a/vnext/src-win/Libraries/Components/Button.windows.js +++ b/vnext/src-win/Libraries/Components/Button.windows.js @@ -152,7 +152,7 @@ type ButtonProps = $ReadOnly<{ accessible?: ?boolean, accessibilityActions?: ?$ReadOnlyArray, onAccessibilityAction?: ?(event: AccessibilityActionEvent) => mixed, - onAccessibilityTap?: ?() => mixed, // Windows + onAccessibilityTap?: ?() => void, // Windows accessibilityState?: ?AccessibilityState, /** diff --git a/vnext/src-win/Libraries/Components/TextInput/TextInput.windows.js b/vnext/src-win/Libraries/Components/TextInput/TextInput.windows.js index 6a372d1d35c..2da4a9f63df 100644 --- a/vnext/src-win/Libraries/Components/TextInput/TextInput.windows.js +++ b/vnext/src-win/Libraries/Components/TextInput/TextInput.windows.js @@ -78,13 +78,13 @@ else if (Platform.OS === 'windows') { } // Windows] -export type ChangeEvent = SyntheticEvent< - $ReadOnly<{ - eventCount: number, - target: number, - text: string, - }>, ->; +export type TextInputChangeEventData = $ReadOnly<{ + eventCount: number, + target: number, + text: string, +}>; + +export type TextInputChangeEvent = SyntheticEvent; export type TextInputEvent = SyntheticEvent< $ReadOnly<{ @@ -99,52 +99,56 @@ export type TextInputEvent = SyntheticEvent< }>, >; -export type ContentSizeChangeEvent = SyntheticEvent< - $ReadOnly<{ - target: number, - contentSize: $ReadOnly<{ - width: number, - height: number, - }>, +export type TextInputContentSizeChangeEventData = $ReadOnly<{ + target: number, + contentSize: $ReadOnly<{ + width: number, + height: number, }>, ->; +}>; -type TargetEvent = SyntheticEvent< - $ReadOnly<{ - target: number, - }>, ->; +export type TextInputContentSizeChangeEvent = + SyntheticEvent; + +export type TargetEvent = $ReadOnly<{ + target: number, +}>; + +export type TextInputFocusEventData = TargetEvent; -export type BlurEvent = TargetEvent; -export type FocusEvent = TargetEvent; +export type TextInputBlurEvent = SyntheticEvent; +export type TextInputFocusEvent = SyntheticEvent; type Selection = $ReadOnly<{ start: number, end: number, }>; -export type SelectionChangeEvent = SyntheticEvent< - $ReadOnly<{ - selection: Selection, - target: number, - }>, ->; +export type TextInputSelectionChangeEventData = $ReadOnly<{ + ...TargetEvent, + selection: Selection, +}>; -export type KeyPressEvent = SyntheticEvent< - $ReadOnly<{ - key: string, - target?: ?number, - eventCount?: ?number, - }>, ->; +export type TextInputSelectionChangeEvent = + SyntheticEvent; -export type EditingEvent = SyntheticEvent< - $ReadOnly<{ - eventCount: number, - text: string, - target: number, - }>, ->; +type TextInputKeyPressEventData = $ReadOnly<{ + ...TargetEvent, + key: string, + target?: ?number, + eventCount?: ?number, +}>; + +export type TextInputKeyPressEvent = SyntheticEvent; + +export type TextInputEndEditingEventData = $ReadOnly<{ + ...TargetEvent, + eventCount: number, + text: string, +}>; + +export type TextInputEditingEvent = + SyntheticEvent; type DataDetectorTypesType = | 'phoneNumber' @@ -158,26 +162,31 @@ type DataDetectorTypesType = | 'all'; export type KeyboardType = - // Cross Platform | 'default' | 'email-address' | 'numeric' | 'phone-pad' | 'number-pad' | 'decimal-pad' - | 'url' - // iOS-only + | 'url'; + +export type KeyboardTypeIOS = | 'ascii-capable' | 'numbers-and-punctuation' | 'name-phone-pad' | 'twitter' | 'web-search' // iOS 10+ only - | 'ascii-capable-number-pad' - // Android-only - | 'visible-password'; + | 'ascii-capable-number-pad'; + +export type KeyboardTypeAndroid = 'visible-password'; + +export type KeyboardTypeOptions = + | KeyboardType + | KeyboardTypeIOS + | KeyboardTypeAndroid; -export type InputMode = +export type InputModeOptions = | 'none' | 'text' | 'decimal' @@ -187,17 +196,9 @@ export type InputMode = | 'email' | 'url'; -export type ReturnKeyType = - // Cross Platform - | 'done' - | 'go' - | 'next' - | 'search' - | 'send' - // Android-only - | 'none' - | 'previous' - // iOS-only +export type ReturnKeyType = 'done' | 'go' | 'next' | 'search' | 'send'; + +export type ReturnKeyTypeIOS = | 'default' | 'emergency-call' | 'google' @@ -205,6 +206,13 @@ export type ReturnKeyType = | 'route' | 'yahoo'; +export type ReturnKeyTypeAndroid = 'none' | 'previous'; + +export type ReturnKeyTypeOptions = + | ReturnKeyType + | ReturnKeyTypeIOS + | ReturnKeyTypeAndroid; + export type SubmitBehavior = 'submit' | 'blurAndSubmit' | 'newline'; export type AutoCapitalize = 'none' | 'sentences' | 'words' | 'characters'; @@ -257,21 +265,20 @@ export type TextContentType = | 'flightNumber' | 'shipmentTrackingNumber'; -export type enterKeyHintType = - // Cross Platform - | 'done' - | 'go' - | 'next' - | 'search' - | 'send' - // Android-only - | 'previous' - // iOS-only - | 'enter'; +export type EnterKeyHintTypeAndroid = 'previous'; + +export type EnterKeyHintTypeIOS = 'enter'; + +export type EnterKeyHintType = 'done' | 'go' | 'next' | 'search' | 'send'; + +export type EnterKeyHintTypeOptions = + | EnterKeyHintType + | EnterKeyHintTypeAndroid + | EnterKeyHintTypeIOS; type PasswordRules = string; -type IOSProps = $ReadOnly<{ +export type TextInputIOSProps = $ReadOnly<{ /** * If true, the keyboard shortcuts (undo/redo and copy buttons) are disabled. The default value is false. * @platform ios @@ -408,7 +415,7 @@ type IOSProps = $ReadOnly<{ smartInsertDelete?: ?boolean, }>; -type AndroidProps = $ReadOnly<{ +export type TextInputAndroidProps = $ReadOnly<{ /** * When provided it will set the color of the cursor (or "caret") in the component. * Unlike the behavior of `selectionColor` the cursor color will be set independently @@ -504,7 +511,7 @@ type SubmitKeyEvent = $ReadOnly<{| code: string, |}>; -type WindowsProps = $ReadOnly<{| +type TextInputWindowsProps = $ReadOnly<{| /** * If `true`, clears the text field synchronously before `onSubmitEditing` is emitted. * @platform windows @@ -553,11 +560,11 @@ type WindowsProps = $ReadOnly<{| // Windows] -export type Props = $ReadOnly<{ +export type TextInputProps = $ReadOnly<{ ...$Diff>, - ...IOSProps, - ...AndroidProps, - ...WindowsProps, // [Windows] + ...TextInputIOSProps, + ...TextInputAndroidProps, + ...TextInputWindowsProps, // [Windows] /** * String to be read by screenreaders to indicate an error state. The acceptable parameters @@ -768,7 +775,7 @@ export type Props = $ReadOnly<{ * - `search` * - `send` */ - enterKeyHint?: ?enterKeyHintType, + enterKeyHint?: ?EnterKeyHintTypeOptions, /** * `inputMode` works like the `inputmode` attribute in HTML, it determines which @@ -785,7 +792,7 @@ export type Props = $ReadOnly<{ * - `email` * - `url` */ - inputMode?: ?InputMode, + inputMode?: ?InputModeOptions, /** * Determines which keyboard to open, e.g.`numeric`. @@ -817,7 +824,7 @@ export type Props = $ReadOnly<{ * - `visible-password` * */ - keyboardType?: ?KeyboardType, + keyboardType?: ?KeyboardTypeOptions, /** * Specifies largest possible scale a font can reach when `allowFontScaling` is enabled. @@ -843,12 +850,12 @@ export type Props = $ReadOnly<{ /** * Callback that is called when the text input is blurred. */ - onBlur?: ?(e: BlurEvent) => mixed, + onBlur?: ?(e: TextInputBlurEvent) => mixed, /** * Callback that is called when the text input's text changes. */ - onChange?: ?(e: ChangeEvent) => mixed, + onChange?: ?(e: TextInputChangeEvent) => mixed, /** * Callback that is called when the text input's text changes. @@ -863,17 +870,17 @@ export type Props = $ReadOnly<{ * * Only called for multiline text inputs. */ - onContentSizeChange?: ?(e: ContentSizeChangeEvent) => mixed, + onContentSizeChange?: ?(e: TextInputContentSizeChangeEvent) => mixed, /** * Callback that is called when text input ends. */ - onEndEditing?: ?(e: EditingEvent) => mixed, + onEndEditing?: ?(e: TextInputEditingEvent) => mixed, /** * Callback that is called when the text input is focused. */ - onFocus?: ?(e: FocusEvent) => mixed, + onFocus?: ?(e: TextInputFocusEvent) => mixed, /** * Callback that is called when a key is pressed. @@ -882,7 +889,7 @@ export type Props = $ReadOnly<{ * the typed-in character otherwise including `' '` for space. * Fires before `onChange` callbacks. */ - onKeyPress?: ?(e: KeyPressEvent) => mixed, + onKeyPress?: ?(e: TextInputKeyPressEvent) => mixed, /** * Called when a single tap gesture is detected. @@ -904,13 +911,13 @@ export type Props = $ReadOnly<{ * This will be called with * `{ nativeEvent: { selection: { start, end } } }`. */ - onSelectionChange?: ?(e: SelectionChangeEvent) => mixed, + onSelectionChange?: ?(e: TextInputSelectionChangeEvent) => mixed, /** * Callback that is called when the text input's submit button is pressed. * Invalid if `multiline={true}` is specified. */ - onSubmitEditing?: ?(e: EditingEvent) => mixed, + onSubmitEditing?: ?(e: TextInputEditingEvent) => mixed, /** * Invoked on content scroll with `{ nativeEvent: { contentOffset: { x, y } } }`. @@ -968,7 +975,7 @@ export type Props = $ReadOnly<{ * - `route` * - `yahoo` */ - returnKeyType?: ?ReturnKeyType, + returnKeyType?: ?ReturnKeyTypeOptions, /** * If `true`, the text input obscures the text entered so that sensitive text @@ -1092,7 +1099,7 @@ function useTextInputStateSynchronization_STATE({ text, viewCommands, }: { - props: Props, + props: TextInputProps, mostRecentEventCount: number, selection: ?Selection, inputRef: React.RefObject, @@ -1173,7 +1180,7 @@ function useTextInputStateSynchronization_REFS({ text, viewCommands, }: { - props: Props, + props: TextInputProps, mostRecentEventCount: number, selection: ?Selection, inputRef: React.RefObject, @@ -1359,7 +1366,7 @@ function useTextInputStateSynchronization_REFS({ * or control this param programmatically with native code. * */ -function InternalTextInput(props: Props): React.Node { +function InternalTextInput(props: TextInputProps): React.Node { const { 'aria-busy': ariaBusy, 'aria-checked': ariaChecked, @@ -1505,7 +1512,7 @@ function InternalTextInput(props: Props): React.Node { const ref = useMergeRefs(setLocalRef, props.forwardedRef); - const _onChange = (event: ChangeEvent) => { + const _onChange = (event: TextInputChangeEvent) => { const currentText = event.nativeEvent.text; props.onChange && props.onChange(event); props.onChangeText && props.onChangeText(currentText); @@ -1524,7 +1531,7 @@ function InternalTextInput(props: Props): React.Node { setMostRecentEventCount(event.nativeEvent.eventCount); }; - const _onSelectionChange = (event: SelectionChangeEvent) => { + const _onSelectionChange = (event: TextInputSelectionChangeEvent) => { props.onSelectionChange && props.onSelectionChange(event); if (inputRef.current == null) { @@ -1539,14 +1546,14 @@ function InternalTextInput(props: Props): React.Node { }); }; - const _onFocus = (event: FocusEvent) => { + const _onFocus = (event: TextInputFocusEvent) => { TextInputState.focusInput(inputRef.current); if (props.onFocus) { props.onFocus(event); } }; - const _onBlur = (event: BlurEvent) => { + const _onBlur = (event: TextInputBlurEvent) => { TextInputState.blurInput(inputRef.current); if (props.onBlur) { props.onBlur(event); @@ -2093,4 +2100,4 @@ const verticalAlignToTextAlignVerticalMap = { }; // $FlowFixMe[unclear-type] Unclear type. Using `any` type is not safe. -module.exports = ((ExportedForwardRef: any): TextInputType); +export default ExportedForwardRef as any as TextInputType; diff --git a/vnext/src-win/Libraries/Components/TextInput/TextInputState.windows.js b/vnext/src-win/Libraries/Components/TextInput/TextInputState.windows.js index b98dd42b287..d1be4b0a55e 100644 --- a/vnext/src-win/Libraries/Components/TextInput/TextInputState.windows.js +++ b/vnext/src-win/Libraries/Components/TextInput/TextInputState.windows.js @@ -211,7 +211,7 @@ function isTextInput(textField: HostInstance): boolean { return inputs.has(textField); } -module.exports = { +const TextInputState = { currentlyFocusedInput, focusInput, blurInput, @@ -225,3 +225,5 @@ module.exports = { unregisterInput, isTextInput, }; + +export default TextInputState; diff --git a/vnext/src-win/Libraries/Components/Touchable/TouchableBounce.windows.js b/vnext/src-win/Libraries/Components/Touchable/TouchableBounce.windows.js index 933c2077ccd..78d1d4eadbb 100644 --- a/vnext/src-win/Libraries/Components/Touchable/TouchableBounce.windows.js +++ b/vnext/src-win/Libraries/Components/Touchable/TouchableBounce.windows.js @@ -221,7 +221,7 @@ class TouchableBounce extends React.Component { } } -module.exports = (React.forwardRef((props, hostRef) => ( +export default (React.forwardRef((props, hostRef) => ( )): component( ref: React.RefSetter, diff --git a/vnext/src-win/Libraries/Components/Touchable/TouchableHighlight.windows.js b/vnext/src-win/Libraries/Components/Touchable/TouchableHighlight.windows.js index 26e3660b199..ae897d5ee3d 100644 --- a/vnext/src-win/Libraries/Components/Touchable/TouchableHighlight.windows.js +++ b/vnext/src-win/Libraries/Components/Touchable/TouchableHighlight.windows.js @@ -405,4 +405,4 @@ const Touchable: component( Touchable.displayName = 'TouchableHighlight'; -module.exports = Touchable; +export default Touchable; diff --git a/vnext/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js b/vnext/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js index c88ec2d4bfb..307e0e7a6cf 100644 --- a/vnext/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js +++ b/vnext/src-win/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js @@ -370,4 +370,4 @@ const getBackgroundProp = TouchableNativeFeedback.displayName = 'TouchableNativeFeedback'; -module.exports = 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 36a0bfe1f4f..88ed49484f9 100644 --- a/vnext/src-win/Libraries/Components/Touchable/TouchableOpacity.windows.js +++ b/vnext/src-win/Libraries/Components/Touchable/TouchableOpacity.windows.js @@ -358,4 +358,4 @@ const Touchable: component( Touchable.displayName = 'TouchableOpacity'; -module.exports = Touchable; +export default Touchable; diff --git a/vnext/src-win/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js b/vnext/src-win/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js index c806f6282ec..7a38f170c55 100644 --- a/vnext/src-win/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +++ b/vnext/src-win/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js @@ -272,4 +272,4 @@ const TouchableWithoutFeedback: React.AbstractComponent< return React.cloneElement(element, {...elementProps, ref}, ...children); }); -module.exports = TouchableWithoutFeedback; +export default TouchableWithoutFeedback; diff --git a/vnext/src-win/Libraries/Components/View/ReactNativeViewAttributes.windows.js b/vnext/src-win/Libraries/Components/View/ReactNativeViewAttributes.windows.js index 497342cf605..4197520e52d 100644 --- a/vnext/src-win/Libraries/Components/View/ReactNativeViewAttributes.windows.js +++ b/vnext/src-win/Libraries/Components/View/ReactNativeViewAttributes.windows.js @@ -61,4 +61,4 @@ const ReactNativeViewAttributes = { RCTView: RCTView, }; -module.exports = ReactNativeViewAttributes; +export default ReactNativeViewAttributes; diff --git a/vnext/src-win/Libraries/Components/View/View.windows.js b/vnext/src-win/Libraries/Components/View/View.windows.js index 6b6fa350e4c..8d2908dcbf0 100644 --- a/vnext/src-win/Libraries/Components/View/View.windows.js +++ b/vnext/src-win/Libraries/Components/View/View.windows.js @@ -355,4 +355,4 @@ const View: component( View.displayName = 'View'; -module.exports = View; +export default View; diff --git a/vnext/src-win/Libraries/Core/Devtools/loadBundleFromServer.windows.js b/vnext/src-win/Libraries/Core/Devtools/loadBundleFromServer.windows.js index 2e7b817f8cd..42db8dea250 100644 --- a/vnext/src-win/Libraries/Core/Devtools/loadBundleFromServer.windows.js +++ b/vnext/src-win/Libraries/Core/Devtools/loadBundleFromServer.windows.js @@ -103,7 +103,9 @@ function buildUrlForBundle(bundlePathAndQuery: string) { ); } -module.exports = function (bundlePathAndQuery: string): Promise { +export default function loadBundleFromServer( + bundlePathAndQuery: string, +): Promise { const requestUrl = buildUrlForBundle(bundlePathAndQuery); let loadPromise = cachedPromisesByUrl.get(requestUrl); @@ -150,4 +152,4 @@ module.exports = function (bundlePathAndQuery: string): Promise { cachedPromisesByUrl.set(requestUrl, loadPromise); return loadPromise; -}; +} diff --git a/vnext/src-win/Libraries/Image/AssetSourceResolver.windows.js b/vnext/src-win/Libraries/Image/AssetSourceResolver.windows.js index 1587607f74f..b8892d60e6f 100644 --- a/vnext/src-win/Libraries/Image/AssetSourceResolver.windows.js +++ b/vnext/src-win/Libraries/Image/AssetSourceResolver.windows.js @@ -232,4 +232,4 @@ class AssetSourceResolver { pickScale; } -module.exports = AssetSourceResolver; +export default AssetSourceResolver; diff --git a/vnext/src-win/Libraries/Image/Image.windows.js b/vnext/src-win/Libraries/Image/Image.windows.js index 35331f566ff..2c228ab23d0 100644 --- a/vnext/src-win/Libraries/Image/Image.windows.js +++ b/vnext/src-win/Libraries/Image/Image.windows.js @@ -293,4 +293,4 @@ const styles = StyleSheet.create({ }, }); -module.exports = Image; +export default Image; diff --git a/vnext/src-win/Libraries/Image/resolveAssetSource.windows.js b/vnext/src-win/Libraries/Image/resolveAssetSource.windows.js index d7900befc87..76f1f0e452c 100644 --- a/vnext/src-win/Libraries/Image/resolveAssetSource.windows.js +++ b/vnext/src-win/Libraries/Image/resolveAssetSource.windows.js @@ -11,12 +11,14 @@ // Utilities for resolving an asset into a `source` for e.g. `Image` import type {ResolvedAssetSource} from './AssetSourceResolver'; +import typeof AssetSourceResolverT from './AssetSourceResolver'; +const Platform = require('../Utilities/Platform'); import type {ImageSource} from './ImageSource'; import SourceCode from '../NativeModules/specs/NativeSourceCode'; -const AssetSourceResolver = require('./AssetSourceResolver'); -const Platform = require('../Utilities/Platform'); +const AssetSourceResolver: AssetSourceResolverT = + require('./AssetSourceResolver').default; const {pickScale} = require('./AssetUtils'); const AssetRegistry = require('@react-native/assets-registry/registry'); @@ -145,4 +147,4 @@ function resolveAssetSource(source: ?ImageSource): ?ResolvedAssetSource { resolveAssetSource.pickScale = pickScale; resolveAssetSource.setCustomSourceTransformer = setCustomSourceTransformer; resolveAssetSource.addCustomSourceTransformer = addCustomSourceTransformer; -module.exports = resolveAssetSource; +export default resolveAssetSource; diff --git a/vnext/src-win/Libraries/Modal/Modal.windows.js b/vnext/src-win/Libraries/Modal/Modal.windows.js index 0e972774884..f52f0c95788 100644 --- a/vnext/src-win/Libraries/Modal/Modal.windows.js +++ b/vnext/src-win/Libraries/Modal/Modal.windows.js @@ -21,9 +21,9 @@ import {VirtualizedListContextResetter} from '@react-native/virtualized-lists'; import React from 'react'; const ScrollView = require('../Components/ScrollView/ScrollView').default; -const View = require('../Components/View/View'); -const AppContainer = require('../ReactNative/AppContainer'); -const I18nManager = require('../ReactNative/I18nManager'); +const View = require('../Components/View/View').default; +const AppContainer = require('../ReactNative/AppContainer').default; +const I18nManager = require('../ReactNative/I18nManager').default; const {RootTagContext} = require('../ReactNative/RootTag'); const StyleSheet = require('../StyleSheet/StyleSheet'); const Platform = require('../Utilities/Platform'); diff --git a/vnext/src-win/Libraries/NativeModules/specs/NativeDialogManagerWindows.js b/vnext/src-win/Libraries/NativeModules/specs/NativeDialogManagerWindows.js index b3278f93559..2d66ef6c8fa 100644 --- a/vnext/src-win/Libraries/NativeModules/specs/NativeDialogManagerWindows.js +++ b/vnext/src-win/Libraries/NativeModules/specs/NativeDialogManagerWindows.js @@ -6,6 +6,6 @@ * @flow strict-local */ -export * from '../../../src/private/specs/modules/NativeDialogManagerWindows'; -import NativeDialogManagerWindows from '../../../src/private/specs/modules/NativeDialogManagerWindows'; +export * from '../../../src/private/specs_DEPRECATED/modules/NativeDialogManagerWindows'; +import NativeDialogManagerWindows from '../../../src/private/specs_DEPRECATED/modules/NativeDialogManagerWindows'; export default NativeDialogManagerWindows; diff --git a/vnext/src-win/Libraries/Network/RCTNetworking.windows.js b/vnext/src-win/Libraries/Network/RCTNetworking.windows.js index 4d528eebdba..e5b2dd572ff 100644 --- a/vnext/src-win/Libraries/Network/RCTNetworking.windows.js +++ b/vnext/src-win/Libraries/Network/RCTNetworking.windows.js @@ -29,7 +29,7 @@ const RCTNetworking = { sendRequest( method: string, - trackingName: string, + trackingName: ?string, url: string, headers: {...}, data: RequestBody, diff --git a/vnext/src-win/Libraries/ReactNative/PaperUIManager.windows.js b/vnext/src-win/Libraries/ReactNative/PaperUIManager.windows.js index cf5ee474479..d661523832b 100644 --- a/vnext/src-win/Libraries/ReactNative/PaperUIManager.windows.js +++ b/vnext/src-win/Libraries/ReactNative/PaperUIManager.windows.js @@ -17,7 +17,7 @@ import nullthrows from 'nullthrows'; const NativeModules = require('../BatchedBridge/NativeModules').default; const defineLazyObjectProperty = require('../Utilities/defineLazyObjectProperty'); const Platform = require('../Utilities/Platform'); -const UIManagerProperties = require('./UIManagerProperties'); +const UIManagerProperties = require('./UIManagerProperties').default; const viewManagerConfigs: {[string]: any | null} = {}; @@ -36,7 +36,6 @@ function getConstants(): Object { function getViewManagerConfig(viewManagerName: string): any { if ( viewManagerConfigs[viewManagerName] === undefined && - global.nativeCallSyncHook && // If we're in the Chrome Debugger, let's not even try calling the sync method NativeUIManager.getConstantsForViewManager ) { try { @@ -207,4 +206,4 @@ if (!global.nativeCallSyncHook) { }); } -module.exports = UIManagerJS; +export default UIManagerJS; diff --git a/vnext/src-win/Libraries/Text/Text.windows.js b/vnext/src-win/Libraries/Text/Text.windows.js index 767a269ce44..758a6b657c8 100644 --- a/vnext/src-win/Libraries/Text/Text.windows.js +++ b/vnext/src-win/Libraries/Text/Text.windows.js @@ -24,7 +24,7 @@ import {NativeText, NativeVirtualText} from './TextNativeComponent'; import * as React from 'react'; import {useContext, useMemo, useState} from 'react'; -const View = require('../Components/View/View'); // [Windows] +const View = require('../Components/View/View').default; // [Windows] import {type ViewStyleProp} from '../StyleSheet/StyleSheet'; // [Windows] type TextForwardRef = React.ElementRef< @@ -596,4 +596,4 @@ const verticalAlignToTextAlignVerticalMap = { middle: 'center', }; -module.exports = Text; +export default Text; diff --git a/vnext/src-win/Libraries/Types/CoreEventTypes.windows.js b/vnext/src-win/Libraries/Types/CoreEventTypes.windows.js index e752fe2abdc..0958f40ef69 100644 --- a/vnext/src-win/Libraries/Types/CoreEventTypes.windows.js +++ b/vnext/src-win/Libraries/Types/CoreEventTypes.windows.js @@ -287,12 +287,14 @@ export type ScrollEvent = SyntheticEvent< export type BlurEvent = SyntheticEvent< $ReadOnly<{ target: number, + ... }>, >; export type FocusEvent = SyntheticEvent< $ReadOnly<{ target: number, + ... }>, >; diff --git a/vnext/src-win/Libraries/Utilities/NativePlatformConstantsWin.js b/vnext/src-win/Libraries/Utilities/NativePlatformConstantsWin.js index af5aef8d9e7..76533ee138c 100644 --- a/vnext/src-win/Libraries/Utilities/NativePlatformConstantsWin.js +++ b/vnext/src-win/Libraries/Utilities/NativePlatformConstantsWin.js @@ -6,6 +6,6 @@ * @flow strict */ -export * from '../../src/private/specs/modules/NativePlatformConstantsWindows'; -import NativePlatformConstantsWin from '../../src/private/specs/modules/NativePlatformConstantsWindows'; +export * from '../../src/private/specs_DEPRECATED/modules/NativePlatformConstantsWindows'; +import NativePlatformConstantsWin from '../../src/private/specs_DEPRECATED/modules/NativePlatformConstantsWindows'; export default NativePlatformConstantsWin; diff --git a/vnext/src-win/Libraries/__tests__/ViewWindows-test.js b/vnext/src-win/Libraries/__tests__/ViewWindows-test.js index 6d17bd0f9c5..4f30208385c 100644 --- a/vnext/src-win/Libraries/__tests__/ViewWindows-test.js +++ b/vnext/src-win/Libraries/__tests__/ViewWindows-test.js @@ -3,7 +3,7 @@ const React = require('react'); const renderer = require('react-native/jest/renderer'); -const View = require('../Components/View/View'); +const View = require('../Components/View/View').default; describe('View', () => { it('renders basic view', async () => { diff --git a/vnext/src-win/index.windows.js b/vnext/src-win/index.windows.js index 06596ce6ad1..781f7da36fe 100644 --- a/vnext/src-win/index.windows.js +++ b/vnext/src-win/index.windows.js @@ -99,7 +99,6 @@ import typeof Platform from './Libraries/Utilities/Platform'; import typeof useColorScheme from './Libraries/Utilities/useColorScheme'; import typeof useWindowDimensions from './Libraries/Utilities/useWindowDimensions'; import typeof Vibration from './Libraries/Vibration/Vibration'; -import typeof YellowBox from './Libraries/YellowBox/YellowBoxDeprecated'; import typeof DevMenu from './src/private/devmenu/DevMenu'; const warnOnce = require('./Libraries/Utilities/warnOnce'); @@ -129,13 +128,13 @@ module.exports = { .default; }, get FlatList(): FlatList { - return require('./Libraries/Lists/FlatList'); + return require('./Libraries/Lists/FlatList').default; }, get Image(): Image { - return require('./Libraries/Image/Image'); + return require('./Libraries/Image/Image').default; }, get ImageBackground(): ImageBackground { - return require('./Libraries/Image/ImageBackground'); + return require('./Libraries/Image/ImageBackground').default; }, get InputAccessoryView(): InputAccessoryView { return require('./Libraries/Components/TextInput/InputAccessoryView') @@ -186,34 +185,37 @@ module.exports = { return require('./Libraries/Components/Switch/Switch').default; }, get Text(): Text { - return require('./Libraries/Text/Text'); + return require('./Libraries/Text/Text').default; }, get TextInput(): TextInput { - return require('./Libraries/Components/TextInput/TextInput'); + return require('./Libraries/Components/TextInput/TextInput').default; }, get Touchable(): Touchable { return require('./Libraries/Components/Touchable/Touchable').default; }, get TouchableHighlight(): TouchableHighlight { - return require('./Libraries/Components/Touchable/TouchableHighlight'); + return require('./Libraries/Components/Touchable/TouchableHighlight') + .default; }, get TouchableNativeFeedback(): TouchableNativeFeedback { - return require('./Libraries/Components/Touchable/TouchableNativeFeedback'); + return require('./Libraries/Components/Touchable/TouchableNativeFeedback') + .default; }, get TouchableOpacity(): TouchableOpacity { - return require('./Libraries/Components/Touchable/TouchableOpacity'); + return require('./Libraries/Components/Touchable/TouchableOpacity').default; }, get TouchableWithoutFeedback(): TouchableWithoutFeedback { - return require('./Libraries/Components/Touchable/TouchableWithoutFeedback'); + return require('./Libraries/Components/Touchable/TouchableWithoutFeedback') + .default; }, get View(): View { - return require('./Libraries/Components/View/View'); + return require('./Libraries/Components/View/View').default; }, get VirtualizedList(): VirtualizedList { - return require('./Libraries/Lists/VirtualizedList'); + return require('./Libraries/Lists/VirtualizedList').default; }, get VirtualizedSectionList(): VirtualizedSectionList { - return require('./Libraries/Lists/VirtualizedSectionList'); + return require('./Libraries/Lists/VirtualizedSectionList').default; }, // APIs @@ -233,7 +235,7 @@ module.exports = { return require('./Libraries/Utilities/Appearance'); }, get AppRegistry(): AppRegistry { - return require('./Libraries/ReactNative/AppRegistry'); + return require('./Libraries/ReactNative/AppRegistry').default; }, get AppState(): AppState { return require('./Libraries/AppState/AppState').default; @@ -269,19 +271,19 @@ module.exports = { return require('./Libraries/ReactNative/RendererProxy').findNodeHandle; }, get I18nManager(): I18nManager { - return require('./Libraries/ReactNative/I18nManager'); + return require('./Libraries/ReactNative/I18nManager').default; }, get InteractionManager(): InteractionManager { - return require('./Libraries/Interaction/InteractionManager'); + return require('./Libraries/Interaction/InteractionManager').default; }, get Keyboard(): Keyboard { return require('./Libraries/Components/Keyboard/Keyboard').default; }, get LayoutAnimation(): LayoutAnimation { - return require('./Libraries/LayoutAnimation/LayoutAnimation'); + return require('./Libraries/LayoutAnimation/LayoutAnimation').default; }, get Linking(): Linking { - return require('./Libraries/Linking/Linking'); + return require('./Libraries/Linking/Linking').default; }, get LogBox(): LogBox { return require('./Libraries/LogBox/LogBox').default; @@ -315,10 +317,10 @@ module.exports = { return require('./Libraries/PushNotificationIOS/PushNotificationIOS'); }, get Settings(): Settings { - return require('./Libraries/Settings/Settings'); + return require('./Libraries/Settings/Settings').default; }, get Share(): Share { - return require('./Libraries/Share/Share'); + return require('./Libraries/Share/Share').default; }, get StyleSheet(): StyleSheet { return require('./Libraries/StyleSheet/StyleSheet'); @@ -328,13 +330,13 @@ module.exports = { }, // $FlowFixMe[value-as-type] get ToastAndroid(): ToastAndroid { - return require('./Libraries/Components/ToastAndroid/ToastAndroid'); + return require('./Libraries/Components/ToastAndroid/ToastAndroid').default; }, get TurboModuleRegistry(): TurboModuleRegistry { return require('./Libraries/TurboModule/TurboModuleRegistry'); }, get UIManager(): UIManager { - return require('./Libraries/ReactNative/UIManager'); + return require('./Libraries/ReactNative/UIManager').default; }, get unstable_batchedUpdates(): $PropertyType< ReactNative, @@ -358,9 +360,6 @@ module.exports = { get Vibration(): Vibration { return require('./Libraries/Vibration/Vibration').default; }, - get YellowBox(): YellowBox { - return require('./Libraries/YellowBox/YellowBoxDeprecated').default; - }, // Plugins get DeviceEventEmitter(): RCTDeviceEventEmitter { @@ -371,7 +370,7 @@ module.exports = { .DynamicColorIOS; }, get NativeAppEventEmitter(): RCTNativeAppEventEmitter { - return require('./Libraries/EventEmitter/RCTNativeAppEventEmitter'); + return require('./Libraries/EventEmitter/RCTNativeAppEventEmitter').default; }, get NativeModules(): NativeModules { return require('./Libraries/BatchedBridge/NativeModules').default; @@ -448,7 +447,7 @@ module.exports = { .HandledEventPhase; }, get ViewWindows(): any { - return require('./Libraries/Components/View/View'); + return require('./Libraries/Components/View/View').default; }, get AppTheme(): AppTheme { return require('./Libraries/AppTheme/AppTheme'); diff --git a/vnext/src-win/src/private/debugging/ReactDevToolsSettingsManager.windows.js b/vnext/src-win/src/private/debugging/ReactDevToolsSettingsManager.windows.js index e80d4c32b44..19520e61f86 100644 --- a/vnext/src-win/src/private/debugging/ReactDevToolsSettingsManager.windows.js +++ b/vnext/src-win/src/private/debugging/ReactDevToolsSettingsManager.windows.js @@ -8,7 +8,7 @@ * @format */ -import NativeReactDevToolsSettingsManager from '../specs/modules/NativeReactDevToolsSettingsManager'; +import NativeReactDevToolsSettingsManager from '../specs_DEPRECATED/modules/NativeReactDevToolsSettingsManager'; module.exports = { setGlobalHookSettings(settings: string) { diff --git a/vnext/src-win/src/private/specs/components/RCTModalHostViewNativeComponent.js b/vnext/src-win/src/private/specs_DEPRECATED/components/RCTModalHostViewNativeComponent.js similarity index 100% rename from vnext/src-win/src/private/specs/components/RCTModalHostViewNativeComponent.js rename to vnext/src-win/src/private/specs_DEPRECATED/components/RCTModalHostViewNativeComponent.js diff --git a/vnext/src-win/src/private/specs/modules/NativeAppTheme.js b/vnext/src-win/src/private/specs_DEPRECATED/modules/NativeAppTheme.js similarity index 100% rename from vnext/src-win/src/private/specs/modules/NativeAppTheme.js rename to vnext/src-win/src/private/specs_DEPRECATED/modules/NativeAppTheme.js diff --git a/vnext/src-win/src/private/specs/modules/NativeDialogManagerWindows.js b/vnext/src-win/src/private/specs_DEPRECATED/modules/NativeDialogManagerWindows.js similarity index 100% rename from vnext/src-win/src/private/specs/modules/NativeDialogManagerWindows.js rename to vnext/src-win/src/private/specs_DEPRECATED/modules/NativeDialogManagerWindows.js diff --git a/vnext/src-win/src/private/specs/modules/NativePlatformConstantsWindows.js b/vnext/src-win/src/private/specs_DEPRECATED/modules/NativePlatformConstantsWindows.js similarity index 100% rename from vnext/src-win/src/private/specs/modules/NativePlatformConstantsWindows.js rename to vnext/src-win/src/private/specs_DEPRECATED/modules/NativePlatformConstantsWindows.js diff --git a/yarn.lock b/yarn.lock index d04152166e4..600ca76289a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2094,28 +2094,28 @@ resolved "https://registry.yarnpkg.com/@react-native-picker/picker/-/picker-2.11.0.tgz#4587fbce6a382adedad74311e96ee10bb2b2d63a" integrity sha512-QuZU6gbxmOID5zZgd/H90NgBnbJ3VV6qVzp6c7/dDrmWdX8S0X5YFYgDcQFjE3dRen9wB9FWnj2VVdPU64adSg== -"@react-native/assets-registry@0.79.0-nightly-20250123-d1028885e": - version "0.79.0-nightly-20250123-d1028885e" - resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.79.0-nightly-20250123-d1028885e.tgz#27842aea1210494ffe6d1f204db9ae11b4bf5e83" - integrity sha512-NaZg/UFnmXdXsNyoKkGxZ7zJQ852fKdzlakMKBjw4hQ1/e9OntFMrfLbDtpXel3pwSUXqzO0UIlPA0i7XADtcg== +"@react-native/assets-registry@0.79.0-nightly-20250206-fb8a6a5bb": + version "0.79.0-nightly-20250206-fb8a6a5bb" + resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.79.0-nightly-20250206-fb8a6a5bb.tgz#835fad1615b1b3891f2a28c81ca0bd557fcf0022" + integrity sha512-1HUksb4/15te7HXYlqVFl+ozodms1TvJEY5VUDbGwI2JlzlEcJde+N9dVwm4XttTlWGo25ibskxx5IcfNRk5dw== "@react-native/assets@1.0.0": version "1.0.0" resolved "https://registry.yarnpkg.com/@react-native/assets/-/assets-1.0.0.tgz#c6f9bf63d274bafc8e970628de24986b30a55c8e" integrity sha512-KrwSpS1tKI70wuKl68DwJZYEvXktDHdZMG0k2AXD/rJVSlB23/X2CB2cutVR0HwNMJIal9HOUOBB2rVfa6UGtQ== -"@react-native/babel-plugin-codegen@0.79.0-nightly-20250123-d1028885e": - version "0.79.0-nightly-20250123-d1028885e" - resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.79.0-nightly-20250123-d1028885e.tgz#a33c521722a641812357f0445539fe00a08a89a3" - integrity sha512-UXUgArUtGEbnptllVkUcwCkRxGSZxTSmd1TFfh+JRKUqIFEaZ/AJaNv1JJCecgnhc+Tx3ZkMVk0HDS/TAYrPkA== +"@react-native/babel-plugin-codegen@0.79.0-nightly-20250206-fb8a6a5bb": + version "0.79.0-nightly-20250206-fb8a6a5bb" + resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.79.0-nightly-20250206-fb8a6a5bb.tgz#acc8d6875feae220004e34dec2a7b0ca25a76bdc" + integrity sha512-Qh194zqx0ewEPnKBWURjSxMh9ExWmx/B45HR9Bxg6eRMzslnS4UJcq0vY7D72oj3l4nN4dSfnMQ/rDgsXKqkUw== dependencies: "@babel/traverse" "^7.25.3" - "@react-native/codegen" "0.79.0-nightly-20250123-d1028885e" + "@react-native/codegen" "0.79.0-nightly-20250206-fb8a6a5bb" -"@react-native/babel-preset@0.79.0-nightly-20250123-d1028885e": - version "0.79.0-nightly-20250123-d1028885e" - resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.79.0-nightly-20250123-d1028885e.tgz#fd1b3b1ef836b1ae3498b341d7ebeb559b3d6dfc" - integrity sha512-x1cvlM9E3n14r30ROAoIICHpLJlNVeAAVcf9SLp2LC91UwcxtSlu5OfMIuOQBhS0lAq1ORH5BP2ALK7B9e08Ow== +"@react-native/babel-preset@0.79.0-nightly-20250206-fb8a6a5bb": + version "0.79.0-nightly-20250206-fb8a6a5bb" + resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.79.0-nightly-20250206-fb8a6a5bb.tgz#a901f595c90761c13523aa30803f9e1e0c80ed2f" + integrity sha512-l0Fs5C1sdCxRCxBUAWeVKzNiMYivoisw3m3+4mFWUdL0oh7TnTspTFuMJ7oO2M/jHnzzMKiEoyGr7FfED9CDvQ== dependencies: "@babel/core" "^7.25.2" "@babel/plugin-proposal-export-default-from" "^7.24.7" @@ -2158,15 +2158,15 @@ "@babel/plugin-transform-typescript" "^7.25.2" "@babel/plugin-transform-unicode-regex" "^7.24.7" "@babel/template" "^7.25.0" - "@react-native/babel-plugin-codegen" "0.79.0-nightly-20250123-d1028885e" + "@react-native/babel-plugin-codegen" "0.79.0-nightly-20250206-fb8a6a5bb" babel-plugin-syntax-hermes-parser "0.25.1" babel-plugin-transform-flow-enums "^0.0.2" react-refresh "^0.14.0" -"@react-native/codegen@0.79.0-nightly-20250123-d1028885e": - version "0.79.0-nightly-20250123-d1028885e" - resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.79.0-nightly-20250123-d1028885e.tgz#48b966e2aec0ed1d12fd40166c780457e82eb9b5" - integrity sha512-ttKR4I3qOZApmiGmOWyF7EkQzP5JCOQAO3y99LCBS/hMNZMMBxe2dV9BO8MdKBPSunYn50P53BgLkOHRYIi7Vg== +"@react-native/codegen@0.79.0-nightly-20250206-fb8a6a5bb": + version "0.79.0-nightly-20250206-fb8a6a5bb" + resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.79.0-nightly-20250206-fb8a6a5bb.tgz#e34a786a5d0c992a15b3a5cfcc47f45a789c2b59" + integrity sha512-uGGLb3vIQ0Sg/mRiPj0nl2eptbwYfSKLsRgm5AOFsqt1wBZARrOAhcJwgXrS2qcobNvptigOgtaIShVHSiO7AQ== dependencies: "@babel/parser" "^7.25.3" glob "^7.1.1" @@ -2176,13 +2176,13 @@ nullthrows "^1.1.1" yargs "^17.6.2" -"@react-native/community-cli-plugin@0.79.0-nightly-20250123-d1028885e": - version "0.79.0-nightly-20250123-d1028885e" - resolved "https://registry.yarnpkg.com/@react-native/community-cli-plugin/-/community-cli-plugin-0.79.0-nightly-20250123-d1028885e.tgz#7cfadc81c68f5ac4006fb3a02b388452ce68df36" - integrity sha512-vJB9IwXrmI/jMIQttw/kvMpPLasp0kS1TUUK+4gVmXz6qgf4CcX4ABtys9fGVpLRc20yalPWB4jpcN8OcrtbyQ== +"@react-native/community-cli-plugin@0.79.0-nightly-20250206-fb8a6a5bb": + version "0.79.0-nightly-20250206-fb8a6a5bb" + resolved "https://registry.yarnpkg.com/@react-native/community-cli-plugin/-/community-cli-plugin-0.79.0-nightly-20250206-fb8a6a5bb.tgz#d5a5f2a9487b0aead1c29a6da777d4f2e62e12ce" + integrity sha512-5E76jl/h1Y739oJZspqjuF++hzt1bwfuxlm5yW1uImqoyurnCSiGnlG7hA7NOjpqzjEQoGoNzfZ8km7SvnXSmA== dependencies: - "@react-native/dev-middleware" "0.79.0-nightly-20250123-d1028885e" - "@react-native/metro-babel-transformer" "0.79.0-nightly-20250123-d1028885e" + "@react-native/dev-middleware" "0.79.0-nightly-20250206-fb8a6a5bb" + "@react-native/metro-babel-transformer" "0.79.0-nightly-20250206-fb8a6a5bb" chalk "^4.0.0" debug "^2.2.0" invariant "^2.2.4" @@ -2192,22 +2192,23 @@ readline "^1.3.0" semver "^7.1.3" -"@react-native/debugger-frontend@0.79.0-nightly-20250123-d1028885e": - version "0.79.0-nightly-20250123-d1028885e" - resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.79.0-nightly-20250123-d1028885e.tgz#1e6e1fd661d3ae5db8711f54ab985d26acaddcfe" - integrity sha512-TqzdEZMCGd6fV1pXfFj6RlpRWGmkOq1ZhillAuHxpjCaIc5AtKMYQnS5fwd3B0bicmbf0T2f35Vqxrxp4Jbh6Q== +"@react-native/debugger-frontend@0.79.0-nightly-20250206-fb8a6a5bb": + version "0.79.0-nightly-20250206-fb8a6a5bb" + resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.79.0-nightly-20250206-fb8a6a5bb.tgz#470fb8c82a6a67848c24fb99a213819f9d9edd65" + integrity sha512-bUiSxvEvFrCToxXrNYyAwrFvL4X0Qshvph+FbKzJrTqlMYyj5C+wh13k183/nnj98Rf5LZjSiGjrk1FS3L3Kxg== -"@react-native/dev-middleware@0.79.0-nightly-20250123-d1028885e": - version "0.79.0-nightly-20250123-d1028885e" - resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.79.0-nightly-20250123-d1028885e.tgz#9c2cd8da7586cfa9baa5574eec6ab7e2643a102a" - integrity sha512-UWBdJaKIgaxiKNRmVCVfkxvNS5hPQY/BUyrUmJ0LrmEwJoFRkMk6rkHT/sYPRCVANHJAmrHbc+L2go5k40TKKQ== +"@react-native/dev-middleware@0.79.0-nightly-20250206-fb8a6a5bb": + version "0.79.0-nightly-20250206-fb8a6a5bb" + resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.79.0-nightly-20250206-fb8a6a5bb.tgz#dab5e88a9521d6a7d7e8c2b1f05cd7e42b14c899" + integrity sha512-+Fj87DQB/H9LeotO+aOfO81M9PyxXZSxw+1l/Bb0Qw+JiJzr9IGJpFwTfsQSdzOQzDIePG4eyhOCO+aTChyldA== dependencies: "@isaacs/ttlcache" "^1.4.1" - "@react-native/debugger-frontend" "0.79.0-nightly-20250123-d1028885e" + "@react-native/debugger-frontend" "0.79.0-nightly-20250206-fb8a6a5bb" chrome-launcher "^0.15.2" chromium-edge-launcher "^0.2.0" connect "^3.6.5" debug "^2.2.0" + invariant "^2.2.4" nullthrows "^1.1.1" open "^7.0.3" selfsigned "^2.4.1" @@ -2237,40 +2238,40 @@ resolved "https://registry.yarnpkg.com/@react-native/eslint-plugin/-/eslint-plugin-0.79.0-nightly-20250123-d1028885e.tgz#7983608a83b724ab2f31d2e84e67fb5f9a7ad3b1" integrity sha512-vYrjxRh3wvL9MmmmsO52keyONK8O7CqayB1gvgSf/EeptcnnCpd0YdJ06NU54aB3zh6p+k4vkxHliNFqpBTFBg== -"@react-native/gradle-plugin@0.79.0-nightly-20250123-d1028885e": - version "0.79.0-nightly-20250123-d1028885e" - resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.79.0-nightly-20250123-d1028885e.tgz#290df4b33dd0ea25c1c36c824a018d0f8c9b3367" - integrity sha512-ZKQYCjYAHWhaawiirLvQpOyAiYVwTa6eZlvXZ1Mee32kGPP4TYMw4mgrFmP6SKySEI1/4pPCLK77I7eukOIVow== +"@react-native/gradle-plugin@0.79.0-nightly-20250206-fb8a6a5bb": + version "0.79.0-nightly-20250206-fb8a6a5bb" + resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.79.0-nightly-20250206-fb8a6a5bb.tgz#27b0595e7a9b876b65e02c2f87690c19af617d0a" + integrity sha512-Tq9+nj2iQTnUVxnSJQK6Iv4B3xxtCb/IIet1C0ibdObynx7yG3832bKR/NWYy6OHKHTB7GIb93mppf386iY0Fw== -"@react-native/js-polyfills@0.79.0-nightly-20250123-d1028885e": - version "0.79.0-nightly-20250123-d1028885e" - resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.79.0-nightly-20250123-d1028885e.tgz#93f36db2f1fc8a0e2fd692108623bc9a141cd1c9" - integrity sha512-kfsivK3v0SogoURYxUs80Cam+7kPpeQSkOdfWUj8gVdde8dA3XAwb78zn1NLUMCl+6nGwWzZ94/y7OZF7Z0EwA== +"@react-native/js-polyfills@0.79.0-nightly-20250206-fb8a6a5bb": + version "0.79.0-nightly-20250206-fb8a6a5bb" + resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.79.0-nightly-20250206-fb8a6a5bb.tgz#d5684dd2b4d280b515103213f2a8326382c17183" + integrity sha512-UwN1SYtQPw6GtWPYKWaGrJOHxQ8yV13W+1glMxUvn36zvcWEkp1ClrG5z4IFCsGxdSEdZirlIgq4mmPR9OF6UQ== -"@react-native/metro-babel-transformer@0.79.0-nightly-20250123-d1028885e": - version "0.79.0-nightly-20250123-d1028885e" - resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.79.0-nightly-20250123-d1028885e.tgz#45d06b98331c86086e9b659dcfc9c2b53e481e27" - integrity sha512-l89671iQtDc+UsbQYpbhC4jguBfVk1+Y9lb1qPTIzb2oRKZB+p4HCsazvrrNZ0GX/iuadUL4YLZnboVEng8kFQ== +"@react-native/metro-babel-transformer@0.79.0-nightly-20250206-fb8a6a5bb": + version "0.79.0-nightly-20250206-fb8a6a5bb" + resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.79.0-nightly-20250206-fb8a6a5bb.tgz#105c1689af95c73215e5879e9c7424cb2ac45e18" + integrity sha512-DxvMTBPuDxaf2cSUa8LDy1cZLcb1FwPUprhkIb8BHnpsqEBRqHp8wTw7c3E3ETZdehKAcgTm983MtATruz21+w== dependencies: "@babel/core" "^7.25.2" - "@react-native/babel-preset" "0.79.0-nightly-20250123-d1028885e" + "@react-native/babel-preset" "0.79.0-nightly-20250206-fb8a6a5bb" hermes-parser "0.25.1" nullthrows "^1.1.1" -"@react-native/metro-config@0.79.0-nightly-20250123-d1028885e": - version "0.79.0-nightly-20250123-d1028885e" - resolved "https://registry.yarnpkg.com/@react-native/metro-config/-/metro-config-0.79.0-nightly-20250123-d1028885e.tgz#0767c94a9f6b7cc23bf924e9e40863373b025c70" - integrity sha512-8YeySMhvRXWroqB1n49WMBXbqX/m4x910VOa7xmAczyzG90VcUI+vORkUk4ZmY3nufVKkDs0a0Y9wOmu0d3xEQ== +"@react-native/metro-config@0.79.0-nightly-20250206-fb8a6a5bb": + version "0.79.0-nightly-20250206-fb8a6a5bb" + resolved "https://registry.yarnpkg.com/@react-native/metro-config/-/metro-config-0.79.0-nightly-20250206-fb8a6a5bb.tgz#cd32a17fcb57a52e4cb6f9fc109daaaee22e8ab2" + integrity sha512-jnrGT87+WCjQyBzfy/k2mU7uUUn4plZykv76NyJfNODYWf9JN4haE5C7LnfXM6OCyQR4m+hefPs632caG7PH4A== dependencies: - "@react-native/js-polyfills" "0.79.0-nightly-20250123-d1028885e" - "@react-native/metro-babel-transformer" "0.79.0-nightly-20250123-d1028885e" + "@react-native/js-polyfills" "0.79.0-nightly-20250206-fb8a6a5bb" + "@react-native/metro-babel-transformer" "0.79.0-nightly-20250206-fb8a6a5bb" metro-config "^0.81.0" metro-runtime "^0.81.0" -"@react-native/normalize-colors@0.79.0-nightly-20250123-d1028885e": - version "0.79.0-nightly-20250123-d1028885e" - resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.79.0-nightly-20250123-d1028885e.tgz#c2f5f3790cea75c4452d7171c503a57cbb329947" - integrity sha512-DUN8UAD+YDL8Jdqi5BIvnnzv5tKNkbc7+Om+l0fKvYkGiOWdw9jAyQPFejNPLBc9sUSG5aBbRcN0qL6kIIkpZw== +"@react-native/normalize-colors@0.79.0-nightly-20250206-fb8a6a5bb": + version "0.79.0-nightly-20250206-fb8a6a5bb" + resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.79.0-nightly-20250206-fb8a6a5bb.tgz#dd915e4440a0fac59ed7fa1fb00ea82abcb94d7e" + integrity sha512-371ERS7FAIeud7eNyHTVvw+PmS3tOh0vTN/o+6d1P4OohU9p2RwBhSvTlGFkvlz7csqqVuU4SpAX8extLzg/3w== "@react-native/popup-menu-android@0.79.0-nightly-20250123-d1028885e": version "0.79.0-nightly-20250123-d1028885e" @@ -2279,10 +2280,10 @@ dependencies: nullthrows "^1.1.1" -"@react-native/virtualized-lists@0.79.0-nightly-20250123-d1028885e": - version "0.79.0-nightly-20250123-d1028885e" - resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.79.0-nightly-20250123-d1028885e.tgz#50e6840c0f9f93547ce94b470efa75bca21cd3a1" - integrity sha512-nhEiOU3tlK5xtaQNgp/Twus2xGgFw6XSsf/29YvUoi2xq6gdG+Xt5vfdu/qq2wrNa50bjSkV9+BjH12kPWDUkg== +"@react-native/virtualized-lists@0.79.0-nightly-20250206-fb8a6a5bb": + version "0.79.0-nightly-20250206-fb8a6a5bb" + resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.79.0-nightly-20250206-fb8a6a5bb.tgz#9019c750fefc357a137a853e2ad0d800ed032cf5" + integrity sha512-e7scyxdBLfzSG9ijLcDnYXeOcTLFDPwr0/GRb0ddt3bwn4qlSct/1t/S9uL7a5TQ2NJw2lVfMbLR0u3ULG9gIA== dependencies: invariant "^2.2.4" nullthrows "^1.1.1" @@ -10007,10 +10008,10 @@ react-clone-referenced-element@^1.0.1: resolved "https://registry.yarnpkg.com/react-clone-referenced-element/-/react-clone-referenced-element-1.1.1.tgz#8d76727dc0459788e461741e804a512d20757381" integrity sha512-LZBPvQV8W0B5dFzXFu+D3Tpil8YHS8tO00iFsfXcTLdtpuH7XyvaHqHcoz4hd4uNPQCZ30fceh+s7mLznzMXvg== -react-devtools-core@^6.0.1: - version "6.1.1" - resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-6.1.1.tgz#7dac74773d039273134c360f8b65cf4f6c795c49" - integrity sha512-TFo1MEnkqE6hzAbaztnyR5uLTMoz6wnEWwWBsCUzNt+sVXJycuRJdDqvL078M4/h65BI/YO5XWTaxZDWVsW0fw== +react-devtools-core@^6.1.0: + version "6.1.2" + resolved "https://registry.yarnpkg.com/react-devtools-core/-/react-devtools-core-6.1.2.tgz#bf4030c4012be8a9201dc1f8a36238c9a5078c98" + integrity sha512-ldFwzufLletzCikNJVYaxlxMLu7swJ3T2VrGfzXlMsVhZhPDKXA38DEROidaYZVgMAmQnIjymrmqto5pyfrwPA== dependencies: shell-quote "^1.6.1" ws "^7" @@ -10042,19 +10043,19 @@ react-native-xaml@^0.0.78: dependencies: "@types/react" "*" -react-native@0.79.0-nightly-20250123-d1028885e: - version "0.79.0-nightly-20250123-d1028885e" - resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.79.0-nightly-20250123-d1028885e.tgz#22848dd2b2afb9fd90cae8916fd07fb47b4e06ff" - integrity sha512-4uVCYZvHWimD0kX8tskSoMOsahfn9o4WhMMjKWyw0V02OxJ8pWhhgZucy+itHc0YWC/tNb9g2aX3EXTpnuqAVA== +react-native@0.79.0-nightly-20250206-fb8a6a5bb: + version "0.79.0-nightly-20250206-fb8a6a5bb" + resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.79.0-nightly-20250206-fb8a6a5bb.tgz#d5bc46d57e9325d213870cd11615fd569620357b" + integrity sha512-bG6WD7CeDtpOjCT5st+/BBBsmpjXVYCbVACYXIR1snX4Xpb9oNTRxDcSqcZDaNAadBmQ3FxQ94N02z9J5Z5m/w== dependencies: "@jest/create-cache-key-function" "^29.6.3" - "@react-native/assets-registry" "0.79.0-nightly-20250123-d1028885e" - "@react-native/codegen" "0.79.0-nightly-20250123-d1028885e" - "@react-native/community-cli-plugin" "0.79.0-nightly-20250123-d1028885e" - "@react-native/gradle-plugin" "0.79.0-nightly-20250123-d1028885e" - "@react-native/js-polyfills" "0.79.0-nightly-20250123-d1028885e" - "@react-native/normalize-colors" "0.79.0-nightly-20250123-d1028885e" - "@react-native/virtualized-lists" "0.79.0-nightly-20250123-d1028885e" + "@react-native/assets-registry" "0.79.0-nightly-20250206-fb8a6a5bb" + "@react-native/codegen" "0.79.0-nightly-20250206-fb8a6a5bb" + "@react-native/community-cli-plugin" "0.79.0-nightly-20250206-fb8a6a5bb" + "@react-native/gradle-plugin" "0.79.0-nightly-20250206-fb8a6a5bb" + "@react-native/js-polyfills" "0.79.0-nightly-20250206-fb8a6a5bb" + "@react-native/normalize-colors" "0.79.0-nightly-20250206-fb8a6a5bb" + "@react-native/virtualized-lists" "0.79.0-nightly-20250206-fb8a6a5bb" abort-controller "^3.0.0" anser "^1.4.9" ansi-regex "^5.0.0" @@ -10074,7 +10075,7 @@ react-native@0.79.0-nightly-20250123-d1028885e: nullthrows "^1.1.1" pretty-format "^29.7.0" promise "^8.3.0" - react-devtools-core "^6.0.1" + react-devtools-core "^6.1.0" react-refresh "^0.14.0" regenerator-runtime "^0.13.2" scheduler "0.25.0"