From 6d63f670f1c67390af55c308df0074ca308acb45 Mon Sep 17 00:00:00 2001 From: Chiara Mooney <34109996+chiaramooney@users.noreply.github.com> Date: Thu, 2 Jan 2025 13:19:45 -0800 Subject: [PATCH 1/5] Integrate 12/10 --- .../react-native-win32-tester/overrides.json | 2 +- .../react-native-win32-tester/package.json | 4 +- .../react-native-win32/overrides.json | 6 +- .../react-native-win32/package.json | 19 +- .../src-win/Libraries/Text/Text.d.ts | 7 +- .../src-win/Libraries/Text/TextProps.win32.js | 4 +- .../automation-channel/package.json | 2 +- .../tester/overrides.json | 2 +- .../@react-native-windows/tester/package.json | 4 +- .../@react-native/monorepo/overrides.json | 4 +- packages/@react-native/monorepo/package.json | 5 +- .../DisplayContents/DisplayContentsExample.js | 2 +- .../IntersectionObserverRootThreshold.js | 8 +- .../TextInput/TextInputExample.ios.js | 2 +- .../TurboModule/SampleLegacyModuleExample.js | 3 +- packages/@react-native/tester/overrides.json | 10 +- packages/e2e-test-app-fabric/package.json | 2 +- packages/e2e-test-app/package.json | 2 +- packages/integration-test-app/package.json | 2 +- packages/playground/package.json | 2 +- packages/sample-app-fabric/package.json | 2 +- packages/sample-apps/package.json | 2 +- packages/sample-custom-component/package.json | 2 +- .../WindowsTextInputComponentDescriptor.h | 7 +- .../WindowsTextInputComponentView.cpp | 4 +- .../TextInput/WindowsTextInputShadowNode.cpp | 22 +- .../TextInput/WindowsTextInputShadowNode.h | 20 +- .../Fabric/FabricUIManagerModule.cpp | 8 +- vnext/ReactCommon/ReactCommon.vcxproj | 2 + .../jsi/jsi/test/testlib.cpp | 29 ++ .../components/textinput/TextInputState.h | 73 ++++ .../react/runtime/ReactInstance.cpp | 162 ++++---- vnext/Shared/Shared.vcxitems | 2 + vnext/codegen/NativePerformanceSpec.g.h | 74 ++-- .../NativeReactNativeFeatureFlagsSpec.g.h | 70 ++-- vnext/codegen/rnwcoreJSI-generated.cpp | 34 +- vnext/codegen/rnwcoreJSI.h | 36 +- vnext/overrides.json | 46 +-- vnext/package.json | 19 +- .../NativeAnimatedAllowlist.windows.js | 122 ------ .../Animated/nodes/AnimatedProps.windows.js | 281 -------------- .../Animated/nodes/AnimatedStyle.windows.js | 251 ------------ .../Libraries/Text/TextProps.windows.js | 4 +- .../animated/useAnimatedPropsMemo.windows.js | 356 ------------------ yarn.lock | 148 ++++---- 45 files changed, 425 insertions(+), 1443 deletions(-) create mode 100644 vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/textinput/TextInputState.h delete mode 100644 vnext/src-win/Libraries/Animated/NativeAnimatedAllowlist.windows.js delete mode 100644 vnext/src-win/Libraries/Animated/nodes/AnimatedProps.windows.js delete mode 100644 vnext/src-win/Libraries/Animated/nodes/AnimatedStyle.windows.js delete mode 100644 vnext/src-win/src/private/animated/useAnimatedPropsMemo.windows.js diff --git a/packages/@office-iss/react-native-win32-tester/overrides.json b/packages/@office-iss/react-native-win32-tester/overrides.json index b72a7f80028..b39e7e9983b 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.78.0-nightly-20241201-91e217ff5", + "baseVersion": "0.78.0-nightly-20241210-6d235853f", "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 11be0042778..a35ff332b5b 100644 --- a/packages/@office-iss/react-native-win32-tester/package.json +++ b/packages/@office-iss/react-native-win32-tester/package.json @@ -19,7 +19,7 @@ "peerDependencies": { "@office-iss/react-native-win32": "^0.0.0-canary.277", "react": "18.0.0", - "react-native": "0.78.0-nightly-20241201-91e217ff5" + "react-native": "0.78.0-nightly-20241210-6d235853f" }, "devDependencies": { "@office-iss/react-native-win32": "^0.0.0-canary.277", @@ -30,7 +30,7 @@ "@types/node": "^18.0.0", "eslint": "^8.19.0", "just-scripts": "^1.3.3", - "react-native": "0.78.0-nightly-20241201-91e217ff5", + "react-native": "0.78.0-nightly-20241210-6d235853f", "react-native-platform-override": "^1.9.49", "typescript": "5.0.4" }, diff --git a/packages/@office-iss/react-native-win32/overrides.json b/packages/@office-iss/react-native-win32/overrides.json index 547c816e3c8..fcbd1db61ec 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.78.0-nightly-20241201-91e217ff5", + "baseVersion": "0.78.0-nightly-20241210-6d235853f", "overrides": [ { "type": "derived", @@ -420,7 +420,7 @@ "type": "derived", "file": "src-win/Libraries/Text/Text.d.ts", "baseFile": "packages/react-native/Libraries/Text/Text.d.ts", - "baseHash": "4b523469a5c8dcfe53749d1739ccf77c0106375e" + "baseHash": "21dab7f71254c429d592827ab313f77c18baeda1" }, { "type": "derived", @@ -439,7 +439,7 @@ "type": "derived", "file": "src-win/Libraries/Text/TextProps.win32.js", "baseFile": "packages/react-native/Libraries/Text/TextProps.js", - "baseHash": "8e56a028dee989ebb8b06f4c01a1d038f074597d" + "baseHash": "ef1efdc0fb302273cd98be71aef2986677dda184" }, { "type": "patch", diff --git a/packages/@office-iss/react-native-win32/package.json b/packages/@office-iss/react-native-win32/package.json index f2b51eace1f..05f757feaca 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.78.0-nightly-20241201-91e217ff5", - "@react-native/codegen": "0.78.0-nightly-20241201-91e217ff5", - "@react-native/community-cli-plugin": "0.78.0-nightly-20241201-91e217ff5", - "@react-native/gradle-plugin": "0.78.0-nightly-20241201-91e217ff5", - "@react-native/js-polyfills": "0.78.0-nightly-20241201-91e217ff5", - "@react-native/normalize-colors": "0.78.0-nightly-20241201-91e217ff5", - "@react-native/virtualized-lists": "0.78.0-nightly-20241201-91e217ff5", + "@react-native/assets-registry": "0.78.0-nightly-20241210-6d235853f", + "@react-native/codegen": "0.78.0-nightly-20241210-6d235853f", + "@react-native/community-cli-plugin": "0.78.0-nightly-20241210-6d235853f", + "@react-native/gradle-plugin": "0.78.0-nightly-20241210-6d235853f", + "@react-native/js-polyfills": "0.78.0-nightly-20241210-6d235853f", + "@react-native/normalize-colors": "0.78.0-nightly-20241210-6d235853f", + "@react-native/virtualized-lists": "0.78.0-nightly-20241210-6d235853f", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", @@ -51,7 +51,6 @@ "glob": "^7.1.1", "invariant": "^2.2.4", "jest-environment-node": "^29.6.3", - "jsc-android": "^250231.0.0", "memoize-one": "^5.0.0", "metro-runtime": "^0.81.0", "metro-source-map": "^0.81.0", @@ -90,14 +89,14 @@ "just-scripts": "^1.3.3", "prettier": "2.8.8", "react": "18.3.1", - "react-native": "0.78.0-nightly-20241201-91e217ff5", + "react-native": "0.78.0-nightly-20241210-6d235853f", "react-native-platform-override": "^1.9.49", "typescript": "5.0.4" }, "peerDependencies": { "@types/react": "^18.2.6", "react": "^18.2.0", - "react-native": "0.78.0-nightly-20241201-91e217ff5" + "react-native": "0.78.0-nightly-20241210-6d235853f" }, "beachball": { "defaultNpmTag": "canary", diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Text/Text.d.ts b/packages/@office-iss/react-native-win32/src-win/Libraries/Text/Text.d.ts index 072f0a4cb61..2cb6cb577d3 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Text/Text.d.ts +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Text/Text.d.ts @@ -12,7 +12,7 @@ import {Constructor} from '../../types/private/Utilities'; import {AccessibilityProps} from '../Components/View/ViewAccessibility'; import {NativeMethods} from '../../types/public/ReactNativeTypes'; import {ColorValue, StyleProp} from '../StyleSheet/StyleSheet'; -import {TextStyle} from '../StyleSheet/StyleSheetTypes'; +import {TextStyle, ViewStyle} from '../StyleSheet/StyleSheetTypes'; import { GestureResponderEvent, LayoutChangeEvent, @@ -294,6 +294,11 @@ export interface TextProps * Specifies smallest possible scale a font can reach when adjustsFontSizeToFit is enabled. (values 0.01-1.0). */ minimumFontScale?: number | undefined; + + /** + * Controls how touch events are handled. Similar to `View`'s `pointerEvents`. + */ + pointerEvents?: ViewStyle['pointerEvents'] | undefined; } /** diff --git a/packages/@office-iss/react-native-win32/src-win/Libraries/Text/TextProps.win32.js b/packages/@office-iss/react-native-win32/src-win/Libraries/Text/TextProps.win32.js index 1c35c98a202..3aa0c893f39 100644 --- a/packages/@office-iss/react-native-win32/src-win/Libraries/Text/TextProps.win32.js +++ b/packages/@office-iss/react-native-win32/src-win/Libraries/Text/TextProps.win32.js @@ -17,7 +17,7 @@ import type { AccessibilityState, Role, } from '../Components/View/ViewAccessibility'; -import type {TextStyleProp} from '../StyleSheet/StyleSheet'; +import type {ColorValue, TextStyleProp} from '../StyleSheet/StyleSheet'; import type { LayoutEvent, PointerEvent, @@ -225,7 +225,7 @@ export type TextProps = $ReadOnly<{ * * See https://reactnative.dev/docs/text#selectioncolor */ - selectionColor?: ?string, + selectionColor?: ?ColorValue, dataDetectorType?: ?('phoneNumber' | 'link' | 'email' | 'none' | 'all'), diff --git a/packages/@react-native-windows/automation-channel/package.json b/packages/@react-native-windows/automation-channel/package.json index 6bf70c26a33..c281cb34552 100644 --- a/packages/@react-native-windows/automation-channel/package.json +++ b/packages/@react-native-windows/automation-channel/package.json @@ -32,7 +32,7 @@ "just-scripts": "^1.3.2", "prettier": "2.8.8", "react": "18.3.1", - "react-native": "0.78.0-nightly-20241201-91e217ff5", + "react-native": "0.78.0-nightly-20241210-6d235853f", "react-native-windows": "^0.0.0-canary.904", "typescript": "5.0.4" }, diff --git a/packages/@react-native-windows/tester/overrides.json b/packages/@react-native-windows/tester/overrides.json index a17f62b8ec8..7a1e0334778 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.78.0-nightly-20241201-91e217ff5", + "baseVersion": "0.78.0-nightly-20241210-6d235853f", "overrides": [ { "type": "derived", diff --git a/packages/@react-native-windows/tester/package.json b/packages/@react-native-windows/tester/package.json index 234b0bc3bd1..76edb650f2c 100644 --- a/packages/@react-native-windows/tester/package.json +++ b/packages/@react-native-windows/tester/package.json @@ -19,7 +19,7 @@ "peerDependencies": { "@react-native-picker/picker": "2.4.10", "react": "18.0.0", - "react-native": "0.78.0-nightly-20241201-91e217ff5", + "react-native": "0.78.0-nightly-20241210-6d235853f", "react-native-windows": "^0.0.0-canary.904", "react-native-xaml": "^0.0.78" }, @@ -32,7 +32,7 @@ "@types/node": "^18.0.0", "eslint": "^8.19.0", "just-scripts": "^1.3.3", - "react-native": "0.78.0-nightly-20241201-91e217ff5", + "react-native": "0.78.0-nightly-20241210-6d235853f", "react-native-platform-override": "^1.9.49", "react-native-windows": "^0.0.0-canary.904", "typescript": "5.0.4" diff --git a/packages/@react-native/monorepo/overrides.json b/packages/@react-native/monorepo/overrides.json index 6a6914b10bc..6c82deb152b 100644 --- a/packages/@react-native/monorepo/overrides.json +++ b/packages/@react-native/monorepo/overrides.json @@ -1,11 +1,11 @@ { - "baseVersion": "0.78.0-nightly-20241201-91e217ff5", + "baseVersion": "0.78.0-nightly-20241210-6d235853f", "overrides": [ { "type": "patch", "file": "package.json", "baseFile": "package.json", - "baseHash": "6957ef21e10235b5be842ed31760651dbe98b429" + "baseHash": "16f7f88737390cba0931fedf86142b3003c6caeb" } ] } \ No newline at end of file diff --git a/packages/@react-native/monorepo/package.json b/packages/@react-native/monorepo/package.json index 241f123f8cd..6bae9275ef7 100644 --- a/packages/@react-native/monorepo/package.json +++ b/packages/@react-native/monorepo/package.json @@ -29,6 +29,7 @@ "test-typescript-offline": "dtslint --localTs node_modules/typescript/lib packages/react-native/types", "test-typescript": "dtslint packages/react-native/types", "test": "jest", + "fantom": "JS_DIR='..' yarn jest --config packages/react-native-fantom/config/jest.config.js", "trigger-react-native-release": "node ./scripts/releases-local/trigger-react-native-release.js", "update-lock": "npx yarn-deduplicate" }, @@ -47,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.78.0-nightly-20241201-91e217ff5", - "@react-native/metro-config": "0.78.0-nightly-20241201-91e217ff5", + "@react-native/metro-babel-transformer": "0.78.0-nightly-20241210-6d235853f", + "@react-native/metro-config": "0.78.0-nightly-20241210-6d235853f", "@tsconfig/node18": "1.0.1", "@types/react": "^18.2.6", "@typescript-eslint/parser": "^7.1.1", diff --git a/packages/@react-native/tester/js/examples/DisplayContents/DisplayContentsExample.js b/packages/@react-native/tester/js/examples/DisplayContents/DisplayContentsExample.js index 754b2adab84..a326cff2d49 100644 --- a/packages/@react-native/tester/js/examples/DisplayContents/DisplayContentsExample.js +++ b/packages/@react-native/tester/js/examples/DisplayContents/DisplayContentsExample.js @@ -13,7 +13,7 @@ import type {RNTesterModule} from '../../types/RNTesterTypes'; import * as React from 'react'; -import {StyleSheet, TextInput, View, Text} from 'react-native'; +import {StyleSheet, Text, TextInput, View} from 'react-native'; const styles = StyleSheet.create({ contents: { diff --git a/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverRootThreshold.js b/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverRootThreshold.js index 5bb844048bc..33803df6f34 100644 --- a/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverRootThreshold.js +++ b/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverRootThreshold.js @@ -24,7 +24,7 @@ import {Button, ScrollView, StyleSheet, Text, View} from 'react-native'; export const name = 'IntersectionObserver Root Threshold'; export const title = name; export const description = - 'Examples of setting threshold and rn_rootThreshold. Views will change background color if they meet their threshold.'; + 'Examples of setting threshold and rnRootThreshold. Views will change background color if they meet their threshold.'; export function render(): React.Node { return ; @@ -112,10 +112,10 @@ function ListItem(props: { entries.forEach(entry => { setIntersectionRatio(entry.intersectionRatio); // $FlowFixMe[prop-missing] - React Native specific entry property - setIntersectionRootRatio(entry.rn_intersectionRootRatio); + setIntersectionRootRatio(entry.rnRootIntersectionRatio); }); }, - {threshold: props.threshold, rn_rootThreshold: props.rootThreshold}, + {threshold: props.threshold, rnRootThreshold: props.rootThreshold}, ); // $FlowFixMe[incompatible-call] @@ -138,7 +138,7 @@ function ListItem(props: { ]} ref={itemRef}> {props.description} - rn_rootThreshold: {props.rootThreshold} + rnRootThreshold: {props.rootThreshold} threshold: {props.threshold} { diff --git a/packages/@react-native/tester/js/examples/TurboModule/SampleLegacyModuleExample.js b/packages/@react-native/tester/js/examples/TurboModule/SampleLegacyModuleExample.js index 322c4de00f8..7d389eaeda3 100644 --- a/packages/@react-native/tester/js/examples/TurboModule/SampleLegacyModuleExample.js +++ b/packages/@react-native/tester/js/examples/TurboModule/SampleLegacyModuleExample.js @@ -63,7 +63,8 @@ function stringify(obj: mixed): string { return value; } - return (JSON.stringify(obj, replacer) || '').replaceAll('"', "'"); + // Change this to don't use replaceAll + return (JSON.stringify(obj, replacer) || '').replace(/"/g, "'"); } class SampleLegacyModuleExample extends React.Component<{||}, State> { diff --git a/packages/@react-native/tester/overrides.json b/packages/@react-native/tester/overrides.json index 7f5261ef24b..d720b51e803 100644 --- a/packages/@react-native/tester/overrides.json +++ b/packages/@react-native/tester/overrides.json @@ -1,5 +1,5 @@ { - "baseVersion": "0.78.0-nightly-20241201-91e217ff5", + "baseVersion": "0.78.0-nightly-20241210-6d235853f", "overrides": [ { "type": "copy", @@ -124,7 +124,7 @@ "type": "copy", "directory": "js/examples/DisplayContents", "baseDirectory": "packages/rn-tester/js/examples/DisplayContents", - "baseHash": "d4976497a0120350f329b460d3c1ff41567ec906", + "baseHash": "c23c101587a77d4e96fca087eef9760792e23f4b", "issue": 4054 }, { @@ -173,7 +173,7 @@ "type": "copy", "directory": "js/examples/IntersectionObserver", "baseDirectory": "packages/rn-tester/js/examples/IntersectionObserver", - "baseHash": "18fa6bfda63981e386186916fd7a0f7530015b89", + "baseHash": "e472434c26d83ac79b0c56c84c5715a64e56fb00", "issue": 4054 }, { @@ -446,7 +446,7 @@ "type": "copy", "directory": "js/examples/TextInput", "baseDirectory": "packages/rn-tester/js/examples/TextInput", - "baseHash": "0a16660c5859076cf463c784bc640e8631d8b2c6", + "baseHash": "c39b13df578338a4bae259138e31b47e15e42c22", "issue": 4054 }, { @@ -488,7 +488,7 @@ "type": "copy", "directory": "js/examples/TurboModule", "baseDirectory": "packages/rn-tester/js/examples/TurboModule", - "baseHash": "a71adf0cb5d86bc8dfc6904f584f575ffbaa3f61", + "baseHash": "2f582e83efe8cb05db597f6bfb126f4de49e7836", "issue": 4054 }, { diff --git a/packages/e2e-test-app-fabric/package.json b/packages/e2e-test-app-fabric/package.json index af1898215ee..2c205a63543 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": "^18.2.0", - "react-native": "0.78.0-nightly-20241201-91e217ff5", + "react-native": "0.78.0-nightly-20241210-6d235853f", "react-native-windows": "^0.0.0-canary.904" }, "devDependencies": { diff --git a/packages/e2e-test-app/package.json b/packages/e2e-test-app/package.json index 5e3ef73042e..d90ea7c1f07 100644 --- a/packages/e2e-test-app/package.json +++ b/packages/e2e-test-app/package.json @@ -20,7 +20,7 @@ "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "react": "^18.2.0", - "react-native": "0.78.0-nightly-20241201-91e217ff5", + "react-native": "0.78.0-nightly-20241210-6d235853f", "react-native-windows": "^0.0.0-canary.904", "react-native-xaml": "^0.0.78" }, diff --git a/packages/integration-test-app/package.json b/packages/integration-test-app/package.json index 2e23ef01f04..95d44e8c380 100644 --- a/packages/integration-test-app/package.json +++ b/packages/integration-test-app/package.json @@ -17,7 +17,7 @@ "@typescript-eslint/parser": "^7.1.1", "chai": "^4.2.0", "react": "^18.2.0", - "react-native": "0.78.0-nightly-20241201-91e217ff5", + "react-native": "0.78.0-nightly-20241210-6d235853f", "react-native-windows": "^0.0.0-canary.904" }, "devDependencies": { diff --git a/packages/playground/package.json b/packages/playground/package.json index 309ab019402..92583454cdd 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -16,7 +16,7 @@ "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "react": "^18.2.0", - "react-native": "0.78.0-nightly-20241201-91e217ff5", + "react-native": "0.78.0-nightly-20241210-6d235853f", "react-native-windows": "^0.0.0-canary.904" }, "devDependencies": { diff --git a/packages/sample-app-fabric/package.json b/packages/sample-app-fabric/package.json index 16ebf2b417a..0e75d86ab1c 100644 --- a/packages/sample-app-fabric/package.json +++ b/packages/sample-app-fabric/package.json @@ -16,7 +16,7 @@ "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "react": "^18.2.0", - "react-native": "0.78.0-nightly-20241201-91e217ff5", + "react-native": "0.78.0-nightly-20241210-6d235853f", "react-native-windows": "^0.0.0-canary.904" }, "devDependencies": { diff --git a/packages/sample-apps/package.json b/packages/sample-apps/package.json index 9568fe3d498..fe308b6a42f 100644 --- a/packages/sample-apps/package.json +++ b/packages/sample-apps/package.json @@ -16,7 +16,7 @@ "@typescript-eslint/eslint-plugin": "^7.1.1", "@typescript-eslint/parser": "^7.1.1", "react": "^18.2.0", - "react-native": "0.78.0-nightly-20241201-91e217ff5", + "react-native": "0.78.0-nightly-20241210-6d235853f", "react-native-windows": "^0.0.0-canary.904" }, "devDependencies": { diff --git a/packages/sample-custom-component/package.json b/packages/sample-custom-component/package.json index a1e74de54fc..15a04dc5667 100644 --- a/packages/sample-custom-component/package.json +++ b/packages/sample-custom-component/package.json @@ -22,7 +22,7 @@ "dependencies": { "@types/react": "^18.2.6", "react": "^18.2.0", - "react-native": "0.78.0-nightly-20241201-91e217ff5", + "react-native": "0.78.0-nightly-20241210-6d235853f", "react-native-windows": "^0.0.0-canary.904" }, "devDependencies": { diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h index 40efbf9c2a5..a39dcdd9c9c 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h @@ -61,8 +61,7 @@ virtual State::Shared createInitialState( } return std::make_shared( - std::make_shared(AndroidTextInputState( - 0, {}, {}, {}, theme.start, theme.end, theme.top, theme.bottom)), + std::make_shared(TextInputState({}, {}, {}, 0)), family); } */ @@ -71,12 +70,10 @@ virtual State::Shared createInitialState( void adopt(ShadowNode &shadowNode) const override { auto &textInputShadowNode = static_cast(shadowNode); - // `ParagraphShadowNode` uses `TextLayoutManager` to measure text content + // `TextInputShadowNode` uses `TextLayoutManager` to measure text content // and communicate text rendering metrics to mounting layer. textInputShadowNode.setTextLayoutManager(m_textLayoutManager); - textInputShadowNode.setContextContainer(const_cast(getContextContainer().get())); - /* int surfaceId = textInputShadowNode.getSurfaceId(); if (surfaceIdToThemePaddingMap_.find(surfaceId) != diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp index 28498a9f5da..85d08542b0e 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp @@ -1070,7 +1070,7 @@ void WindowsTextInputComponentView::updateState( if (m_mostRecentEventCount == m_state->getData().mostRecentEventCount) { m_comingFromState = true; - auto &fragments = m_state->getData().attributedString.getFragments(); + auto &fragments = m_state->getData().attributedStringBox.getValue().getFragments(); UpdateText(fragments.size() ? fragments[0].string : ""); m_comingFromState = false; @@ -1133,7 +1133,7 @@ void WindowsTextInputComponentView::OnTextUpdated() noexcept { // auto newAttributedString = getAttributedString(); // if (data.attributedString == newAttributedString) // return; - data.attributedString = getAttributedString(); + data.reactTreeAttributedString = getAttributedString(); // CHECK data.mostRecentEventCount = m_nativeEventCount; m_state->updateState(std::move(data)); diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp index 08ee3abe5bd..783cf6b09cf 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp @@ -3,7 +3,7 @@ #include "WindowsTextInputShadowNode.h" -#include +#include #include #include #include @@ -12,17 +12,10 @@ #include #include -#include - namespace facebook::react { extern const char WindowsTextInputComponentName[] = "WindowsTextInput"; -void WindowsTextInputShadowNode::setContextContainer(ContextContainer *contextContainer) { - ensureUnsealed(); - m_contextContainer = contextContainer; -} - AttributedString WindowsTextInputShadowNode::getAttributedString(const LayoutContext &layoutContext) const { // Use BaseTextShadowNode to get attributed string from children @@ -106,7 +99,7 @@ AttributedString WindowsTextInputShadowNode::getMostRecentAttributedString(const bool treeAttributedStringChanged = !state.reactTreeAttributedString.compareTextAttributesWithoutFrame(reactTreeAttributedString); - return (!treeAttributedStringChanged ? state.attributedString : reactTreeAttributedString); + return (!treeAttributedStringChanged ? state.attributedStringBox.getValue() : reactTreeAttributedString); } void WindowsTextInputShadowNode::updateStateIfNeeded(const LayoutContext &layoutContext) { @@ -146,15 +139,8 @@ void WindowsTextInputShadowNode::updateStateIfNeeded(const LayoutContext &layout // current attributedString unchanged, and pass in zero for the "event count" // so no changes are applied There's no way to prevent a state update from // flowing to Java, so we just ensure it's a noop in those cases. - setStateData(facebook::react::WindowsTextInputState{ - newEventCount, - newAttributedString, - reactTreeAttributedString, - {}, - state.defaultThemePaddingStart, - state.defaultThemePaddingEnd, - state.defaultThemePaddingTop, - state.defaultThemePaddingBottom}); + setStateData(facebook::react::TextInputState{ + AttributedStringBox(newAttributedString), reactTreeAttributedString, {}, newEventCount}); } #pragma mark - LayoutableShadowNode diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h index 38e1b0022f1..ce0c798dbaf 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h @@ -7,12 +7,12 @@ #include #include "WindowsTextInputEventEmitter.h" #include "WindowsTextInputProps.h" -#include "WindowsTextInputState.h" +#include +#include #include #include -#include #include namespace facebook::react { @@ -26,7 +26,7 @@ class WindowsTextInputShadowNode final : public ConcreteViewShadowNode< WindowsTextInputComponentName, WindowsTextInputProps, WindowsTextInputEventEmitter, - WindowsTextInputState> { + TextInputState> { public: static ShadowNodeTraits BaseTraits() { auto traits = ConcreteViewShadowNode::BaseTraits(); @@ -37,8 +37,6 @@ class WindowsTextInputShadowNode final : public ConcreteViewShadowNode< using ConcreteViewShadowNode::ConcreteViewShadowNode; - void setContextContainer(ContextContainer *contextContainer); - /* * Returns a `AttributedString` which represents text content of the node. */ @@ -47,8 +45,8 @@ class WindowsTextInputShadowNode final : public ConcreteViewShadowNode< /* * Associates a shared TextLayoutManager with the node. - * `ParagraphShadowNode` uses the manager to measure text content - * and construct `ParagraphState` objects. + * `TextInputShadowNode` uses the manager to measure text content + * and construct `TextInputState` objects. */ void setTextLayoutManager(SharedTextLayoutManager textLayoutManager); @@ -58,8 +56,6 @@ class WindowsTextInputShadowNode final : public ConcreteViewShadowNode< void layout(LayoutContext layoutContext) override; private: - ContextContainer *m_contextContainer{}; - /** * Get the most up-to-date attributed string for measurement and State. */ @@ -72,12 +68,6 @@ class WindowsTextInputShadowNode final : public ConcreteViewShadowNode< void updateStateIfNeeded(const LayoutContext &layoutContext); SharedTextLayoutManager m_textLayoutManager; - - /* - * Cached attributed string that represents the content of the subtree started - * from the node. - */ - mutable std::optional m_cachedAttributedString{}; }; } // namespace facebook::react diff --git a/vnext/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp b/vnext/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp index 42339633147..68d46880061 100644 --- a/vnext/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp @@ -230,9 +230,9 @@ void FabricUIManager::RCTPerformMountInstructions( case facebook::react::ShadowViewMutation::Insert: { auto &oldChildShadowView = mutation.oldChildShadowView; auto &newChildShadowView = mutation.newChildShadowView; - auto &parentShadowView = mutation.parentShadowView; + auto &parentTag = mutation.parentTag; auto &newChildViewDescriptor = m_registry.componentViewDescriptorWithTag(newChildShadowView.tag); - auto parentViewDescriptor = m_registry.componentViewDescriptorWithTag(parentShadowView.tag); + auto parentViewDescriptor = m_registry.componentViewDescriptorWithTag(parentTag); auto newChildComponentView = winrt::get_self(newChildViewDescriptor.view); @@ -249,9 +249,9 @@ void FabricUIManager::RCTPerformMountInstructions( case facebook::react::ShadowViewMutation::Remove: { auto &oldChildShadowView = mutation.oldChildShadowView; - auto &parentShadowView = mutation.parentShadowView; + auto &parentTag = mutation.parentTag; auto &oldChildViewDescriptor = m_registry.componentViewDescriptorWithTag(oldChildShadowView.tag); - auto &parentViewDescriptor = m_registry.componentViewDescriptorWithTag(parentShadowView.tag); + auto &parentViewDescriptor = m_registry.componentViewDescriptorWithTag(parentTag); winrt::get_self(parentViewDescriptor.view) ->UnmountChildComponentView(oldChildViewDescriptor.view, mutation.index); break; diff --git a/vnext/ReactCommon/ReactCommon.vcxproj b/vnext/ReactCommon/ReactCommon.vcxproj index 978a5017d95..2d0e21c334f 100644 --- a/vnext/ReactCommon/ReactCommon.vcxproj +++ b/vnext/ReactCommon/ReactCommon.vcxproj @@ -193,6 +193,8 @@ + + diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp index 00c96f5b70a..f56fb89e589 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp @@ -1611,6 +1611,35 @@ TEST_P(JSITest, UTF16Test) { } Windows] */ +TEST_P(JSITest, GetStringDataTest) { + // This Runtime Decorator is used to test the default getStringData + // implementation for VMs that do not provide their own implementation + class RD : public RuntimeDecorator { + public: + RD(Runtime& rt) : RuntimeDecorator(rt) {} + + void getStringData( + const String& str, + void* ctx, + void (*cb)(void* ctx, bool ascii, const void* data, size_t num)) + override { + Runtime::getStringData(str, ctx, cb); + } + }; + + RD rd = RD(rt); + String str = String::createFromUtf8(rd, "hellođź‘‹"); + + std::u16string buf; + auto cb = [&buf](bool ascii, const void* data, size_t num) { + assert(!ascii && "Default implementation is always utf16"); + buf.append((const char16_t*)data, num); + }; + + str.getStringData(rd, cb); + EXPECT_EQ(buf, str.utf16(rd)); +} + INSTANTIATE_TEST_CASE_P( Runtimes, JSITest, diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/textinput/TextInputState.h b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/textinput/TextInputState.h new file mode 100644 index 00000000000..8d6e2c84423 --- /dev/null +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/textinput/TextInputState.h @@ -0,0 +1,73 @@ +/* + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +#pragma once + +#include +#include +#include + +#ifdef ANDROID +#include +#include +#endif + +namespace facebook::react { + +/* + * State for component. + */ +class TextInputState final { + public: + TextInputState() = default; + + TextInputState( + AttributedStringBox attributedStringBox, + AttributedString reactTreeAttributedString, + ParagraphAttributes paragraphAttributes, + int64_t mostRecentEventCount); + +#ifdef ANDROID + TextInputState( + const TextInputState& previousState, + const folly::dynamic& data); + folly::dynamic getDynamic() const; + MapBuffer getMapBuffer() const; +#endif + + /* + * All content of component. + */ + AttributedStringBox attributedStringBox; + + /* + * All content of component represented as an `AttributedString`. + * This stores the previous computed *from the React tree*. This usually + * doesn't change as the TextInput contents are being updated. If it does + * change, we need to wipe out current contents of the TextInput and replace + * with the new value from the tree. + */ + AttributedString reactTreeAttributedString{}; + + /* + * Represents all visual attributes of a paragraph of text represented as + * a ParagraphAttributes. + */ + ParagraphAttributes paragraphAttributes; + + int64_t mostRecentEventCount{0}; + + + /** + * Stores an opaque cache ID used on the Java side to refer to a specific + * AttributedString for measurement purposes only. + */ + int64_t cachedAttributedStringId{0}; + +}; + +} // namespace facebook::react diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp index cab2a5e1dbf..25549a4444a 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp @@ -57,62 +57,48 @@ ReactInstance::ReactInstance( timerManager_(std::move(timerManager)), jsErrorHandler_(std::make_shared(std::move(onJsError))), parentInspectorTarget_(parentInspectorTarget) { - RuntimeExecutor runtimeExecutor = [weakRuntime = std::weak_ptr(runtime_), - weakTimerManager = - std::weak_ptr(timerManager_), - weakJsThread = - std::weak_ptr(jsMessageQueueThread_), - jsErrorHandler = - jsErrorHandler_](auto callback) { - if (weakRuntime.expired()) { - return; - } - - /** - * If a fatal error was caught while executing the main bundle, assume the - * js runtime is invalid. And stop executing any more js. - */ - if (!jsErrorHandler->isRuntimeReady() && - jsErrorHandler->hasHandledFatalError()) { - LOG(INFO) - << "RuntimeExecutor: Detected fatal error. Dropping work on non-js thread." - << std::endl; - return; - } - - if (auto jsThread = weakJsThread.lock()) { - jsThread->runOnQueue([jsErrorHandler, - weakRuntime, - weakTimerManager, - callback = std::move(callback)]() { - auto runtime = weakRuntime.lock(); - if (!runtime) { + RuntimeExecutor runtimeExecutor = + [weakRuntime = std::weak_ptr(runtime_), + weakTimerManager = std::weak_ptr(timerManager_), + weakJsThread = std::weak_ptr(jsMessageQueueThread_), + jsErrorHandler = jsErrorHandler_](auto callback) { + if (weakRuntime.expired()) { return; } - jsi::Runtime& jsiRuntime = runtime->getRuntime(); - SystraceSection s("ReactInstance::_runtimeExecutor[Callback]"); - try { - ShadowNode::setUseRuntimeShadowNodeReferenceUpdateOnThread(true); - callback(jsiRuntime); - - // If we have first-class support for microtasks, - // they would've been called as part of the previous callback. - if (ReactNativeFeatureFlags::disableEventLoopOnBridgeless()) { - if (auto timerManager = weakTimerManager.lock()) { - timerManager->callReactNativeMicrotasks(jsiRuntime); + if (auto jsThread = weakJsThread.lock()) { + jsThread->runOnQueue([jsErrorHandler, + weakRuntime, + weakTimerManager, + callback = std::move(callback)]() { + auto runtime = weakRuntime.lock(); + if (!runtime) { + return; + } + + jsi::Runtime& jsiRuntime = runtime->getRuntime(); + SystraceSection s("ReactInstance::_runtimeExecutor[Callback]"); + try { + ShadowNode::setUseRuntimeShadowNodeReferenceUpdateOnThread(true); + callback(jsiRuntime); + + // If we have first-class support for microtasks, + // they would've been called as part of the previous callback. + if (ReactNativeFeatureFlags::disableEventLoopOnBridgeless()) { + if (auto timerManager = weakTimerManager.lock()) { + timerManager->callReactNativeMicrotasks(jsiRuntime); + } + } + } catch (jsi::JSError& originalError) { + jsErrorHandler->handleError(jsiRuntime, originalError, true); + } catch (std::exception& ex) { + jsi::JSError error( + jsiRuntime, std::string("Non-js exception: ") + ex.what()); + jsErrorHandler->handleError(jsiRuntime, error, true); } - } - } catch (jsi::JSError& originalError) { - jsErrorHandler->handleError(jsiRuntime, originalError, true); - } catch (std::exception& ex) { - jsi::JSError error( - jsiRuntime, std::string("Non-js exception: ") + ex.what()); - jsErrorHandler->handleError(jsiRuntime, error, true); + }); } - }); - } - }; + }; if (parentInspectorTarget_) { auto executor = parentInspectorTarget_->executorFromThis(); @@ -235,47 +221,51 @@ std::string simpleBasename(const std::string& path) { */ void ReactInstance::loadScript( std::unique_ptr script, - const std::string& sourceURL) { + const std::string& sourceURL, + std::function&& completion) { auto buffer = std::make_shared(std::move(script)); std::string scriptName = simpleBasename(sourceURL); - runtimeScheduler_->scheduleWork( - [this, - scriptName, - sourceURL, - buffer = std::move(buffer), - weakBufferedRuntimeExecuter = std::weak_ptr( - bufferedRuntimeExecutor_)](jsi::Runtime& runtime) { - SystraceSection s("ReactInstance::loadScript"); - bool hasLogger(ReactMarker::logTaggedMarkerBridgelessImpl); - if (hasLogger) { - ReactMarker::logTaggedMarkerBridgeless( - ReactMarker::RUN_JS_BUNDLE_START, scriptName.c_str()); - } + runtimeScheduler_->scheduleWork([this, + scriptName, + sourceURL, + buffer = std::move(buffer), + weakBufferedRuntimeExecuter = + std::weak_ptr( + bufferedRuntimeExecutor_), + completion](jsi::Runtime& runtime) { + SystraceSection s("ReactInstance::loadScript"); + bool hasLogger(ReactMarker::logTaggedMarkerBridgelessImpl); + if (hasLogger) { + ReactMarker::logTaggedMarkerBridgeless( + ReactMarker::RUN_JS_BUNDLE_START, scriptName.c_str()); + } - runtime.evaluateJavaScript(buffer, sourceURL); + runtime.evaluateJavaScript(buffer, sourceURL); - /** - * TODO(T183610671): We need a safe/reliable way to enable the js - * pipeline from javascript. Remove this after we figure that out, or - * after we just remove the js pipeline. - */ - if (!jsErrorHandler_->hasHandledFatalError()) { - jsErrorHandler_->setRuntimeReady(); - } + /** + * TODO(T183610671): We need a safe/reliable way to enable the js + * pipeline from javascript. Remove this after we figure that out, or + * after we just remove the js pipeline. + */ + if (!jsErrorHandler_->hasHandledFatalError()) { + jsErrorHandler_->setRuntimeReady(); + } - if (hasLogger) { - ReactMarker::logTaggedMarkerBridgeless( - ReactMarker::RUN_JS_BUNDLE_STOP, scriptName.c_str()); - ReactMarker::logMarkerBridgeless( - ReactMarker::INIT_REACT_RUNTIME_STOP); - ReactMarker::logMarkerBridgeless(ReactMarker::APP_STARTUP_STOP); - } - if (auto strongBufferedRuntimeExecuter = - weakBufferedRuntimeExecuter.lock()) { - strongBufferedRuntimeExecuter->flush(); - } - }); + if (hasLogger) { + ReactMarker::logTaggedMarkerBridgeless( + ReactMarker::RUN_JS_BUNDLE_STOP, scriptName.c_str()); + ReactMarker::logMarkerBridgeless(ReactMarker::INIT_REACT_RUNTIME_STOP); + ReactMarker::logMarkerBridgeless(ReactMarker::APP_STARTUP_STOP); + } + if (auto strongBufferedRuntimeExecuter = + weakBufferedRuntimeExecuter.lock()) { + strongBufferedRuntimeExecuter->flush(); + } + if (completion) { + completion(runtime); + } + }); } /* diff --git a/vnext/Shared/Shared.vcxitems b/vnext/Shared/Shared.vcxitems index 9371302169c..f65cd37c06d 100644 --- a/vnext/Shared/Shared.vcxitems +++ b/vnext/Shared/Shared.vcxitems @@ -593,6 +593,8 @@ + + diff --git a/vnext/codegen/NativePerformanceSpec.g.h b/vnext/codegen/NativePerformanceSpec.g.h index 11cb98fef90..1456b89720b 100644 --- a/vnext/codegen/NativePerformanceSpec.g.h +++ b/vnext/codegen/NativePerformanceSpec.g.h @@ -80,24 +80,22 @@ inline winrt::Microsoft::ReactNative::FieldMap GetStructInfo(PerformanceSpec_Rea struct PerformanceSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { static constexpr auto methods = std::tuple{ SyncMethod{0, L"now"}, - Method{1, L"mark"}, - Method{2, L"measure"}, - SyncMethod{3, L"markWithResult"}, - SyncMethod(std::string, double, double, double, std::string, std::string) noexcept>{4, L"measureWithResult"}, - Method{5, L"clearMarks"}, - Method{6, L"clearMeasures"}, - SyncMethod() noexcept>{7, L"getEntries"}, - SyncMethod(std::string, std::optional) noexcept>{8, L"getEntriesByName"}, - SyncMethod(double) noexcept>{9, L"getEntriesByType"}, - SyncMethod<::React::JSValueArray() noexcept>{10, L"getEventCounts"}, - SyncMethod<::React::JSValue() noexcept>{11, L"getSimpleMemoryInfo"}, - SyncMethod<::React::JSValue() noexcept>{12, L"getReactNativeStartupTiming"}, - SyncMethod<(Callback<>) noexcept>{13, L"createObserver"}, - SyncMethod{14, L"getDroppedEntriesCount"}, - Method{15, L"observe"}, - Method{16, L"disconnect"}, - SyncMethod(, bool) noexcept>{17, L"takeRecords"}, - SyncMethod() noexcept>{18, L"getSupportedPerformanceEntryTypes"}, + SyncMethod{1, L"markWithResult"}, + SyncMethod(std::string, double, double, double, std::string, std::string) noexcept>{2, L"measureWithResult"}, + Method{3, L"clearMarks"}, + Method{4, L"clearMeasures"}, + SyncMethod() noexcept>{5, L"getEntries"}, + SyncMethod(std::string, std::optional) noexcept>{6, L"getEntriesByName"}, + SyncMethod(double) noexcept>{7, L"getEntriesByType"}, + SyncMethod<::React::JSValueArray() noexcept>{8, L"getEventCounts"}, + SyncMethod<::React::JSValue() noexcept>{9, L"getSimpleMemoryInfo"}, + SyncMethod<::React::JSValue() noexcept>{10, L"getReactNativeStartupTiming"}, + SyncMethod<(Callback<>) noexcept>{11, L"createObserver"}, + SyncMethod{12, L"getDroppedEntriesCount"}, + Method{13, L"observe"}, + Method{14, L"disconnect"}, + SyncMethod(, bool) noexcept>{15, L"takeRecords"}, + SyncMethod() noexcept>{16, L"getSupportedPerformanceEntryTypes"}, }; template @@ -111,91 +109,81 @@ struct PerformanceSpec : winrt::Microsoft::ReactNative::TurboModuleSpec { " REACT_SYNC_METHOD(now) static double now() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 1, - "mark", - " REACT_METHOD(mark) void mark(std::string name, double startTime) noexcept { /* implementation */ }\n" - " REACT_METHOD(mark) static void mark(std::string name, double startTime) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 2, - "measure", - " REACT_METHOD(measure) void measure(std::string name, double startTime, double endTime, double duration, std::string startMark, std::string endMark) noexcept { /* implementation */ }\n" - " REACT_METHOD(measure) static void measure(std::string name, double startTime, double endTime, double duration, std::string startMark, std::string endMark) noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 3, "markWithResult", " REACT_SYNC_METHOD(markWithResult) double markWithResult(std::string name, double startTime) noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(markWithResult) static double markWithResult(std::string name, double startTime) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 4, + 2, "measureWithResult", " REACT_SYNC_METHOD(measureWithResult) std::vector measureWithResult(std::string name, double startTime, double endTime, double duration, std::string startMark, std::string endMark) noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(measureWithResult) static std::vector measureWithResult(std::string name, double startTime, double endTime, double duration, std::string startMark, std::string endMark) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 5, + 3, "clearMarks", " REACT_METHOD(clearMarks) void clearMarks(std::string entryName) noexcept { /* implementation */ }\n" " REACT_METHOD(clearMarks) static void clearMarks(std::string entryName) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 6, + 4, "clearMeasures", " REACT_METHOD(clearMeasures) void clearMeasures(std::string entryName) noexcept { /* implementation */ }\n" " REACT_METHOD(clearMeasures) static void clearMeasures(std::string entryName) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 7, + 5, "getEntries", " REACT_SYNC_METHOD(getEntries) std::vector getEntries() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(getEntries) static std::vector getEntries() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 8, + 6, "getEntriesByName", " REACT_SYNC_METHOD(getEntriesByName) std::vector getEntriesByName(std::string entryName, std::optional entryType) noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(getEntriesByName) static std::vector getEntriesByName(std::string entryName, std::optional entryType) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 9, + 7, "getEntriesByType", " REACT_SYNC_METHOD(getEntriesByType) std::vector getEntriesByType(double entryType) noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(getEntriesByType) static std::vector getEntriesByType(double entryType) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 10, + 8, "getEventCounts", " REACT_SYNC_METHOD(getEventCounts) ::React::JSValueArray getEventCounts() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(getEventCounts) static ::React::JSValueArray getEventCounts() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 11, + 9, "getSimpleMemoryInfo", " REACT_SYNC_METHOD(getSimpleMemoryInfo) ::React::JSValue getSimpleMemoryInfo() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(getSimpleMemoryInfo) static ::React::JSValue getSimpleMemoryInfo() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 12, + 10, "getReactNativeStartupTiming", " REACT_SYNC_METHOD(getReactNativeStartupTiming) ::React::JSValue getReactNativeStartupTiming() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(getReactNativeStartupTiming) static ::React::JSValue getReactNativeStartupTiming() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 13, + 11, "createObserver", " REACT_SYNC_METHOD(createObserver) createObserver(std::function const & callback) noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(createObserver) static createObserver(std::function const & callback) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 14, + 12, "getDroppedEntriesCount", " REACT_SYNC_METHOD(getDroppedEntriesCount) double getDroppedEntriesCount( observer) noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(getDroppedEntriesCount) static double getDroppedEntriesCount( observer) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 15, + 13, "observe", " REACT_METHOD(observe) void observe( observer, PerformanceSpec_PerformanceObserverInit && options) noexcept { /* implementation */ }\n" " REACT_METHOD(observe) static void observe( observer, PerformanceSpec_PerformanceObserverInit && options) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 16, + 14, "disconnect", " REACT_METHOD(disconnect) void disconnect( observer) noexcept { /* implementation */ }\n" " REACT_METHOD(disconnect) static void disconnect( observer) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 17, + 15, "takeRecords", " REACT_SYNC_METHOD(takeRecords) std::vector takeRecords( observer, bool sort) noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(takeRecords) static std::vector takeRecords( observer, bool sort) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 18, + 16, "getSupportedPerformanceEntryTypes", " REACT_SYNC_METHOD(getSupportedPerformanceEntryTypes) std::vector getSupportedPerformanceEntryTypes() noexcept { /* implementation */ }\n" " REACT_SYNC_METHOD(getSupportedPerformanceEntryTypes) static std::vector getSupportedPerformanceEntryTypes() noexcept { /* implementation */ }\n"); diff --git a/vnext/codegen/NativeReactNativeFeatureFlagsSpec.g.h b/vnext/codegen/NativeReactNativeFeatureFlagsSpec.g.h index 39f01b7090e..41fa293f871 100644 --- a/vnext/codegen/NativeReactNativeFeatureFlagsSpec.g.h +++ b/vnext/codegen/NativeReactNativeFeatureFlagsSpec.g.h @@ -31,22 +31,22 @@ struct ReactNativeFeatureFlagsSpec : winrt::Microsoft::ReactNative::TurboModuleS SyncMethod{11, L"enableEventEmitterRetentionDuringGesturesOnAndroid"}, SyncMethod{12, L"enableFabricLogs"}, SyncMethod{13, L"enableFabricRenderer"}, - SyncMethod{14, L"enableFabricRendererExclusively"}, - SyncMethod{15, L"enableFixForViewCommandRace"}, - SyncMethod{16, L"enableGranularShadowTreeStateReconciliation"}, - SyncMethod{17, L"enableIOSViewClipToPaddingBox"}, - SyncMethod{18, L"enableImagePrefetchingAndroid"}, - SyncMethod{19, L"enableLayoutAnimationsOnAndroid"}, - SyncMethod{20, L"enableLayoutAnimationsOnIOS"}, - SyncMethod{21, L"enableLongTaskAPI"}, - SyncMethod{22, L"enableNewBackgroundAndBorderDrawables"}, - SyncMethod{23, L"enablePreciseSchedulingForPremountItemsOnAndroid"}, - SyncMethod{24, L"enablePropsUpdateReconciliationAndroid"}, - SyncMethod{25, L"enableReportEventPaintTime"}, - SyncMethod{26, L"enableSynchronousStateUpdates"}, - SyncMethod{27, L"enableUIConsistency"}, - SyncMethod{28, L"enableViewRecycling"}, - SyncMethod{29, L"excludeYogaFromRawProps"}, + SyncMethod{14, L"enableFixForViewCommandRace"}, + SyncMethod{15, L"enableGranularShadowTreeStateReconciliation"}, + SyncMethod{16, L"enableIOSViewClipToPaddingBox"}, + SyncMethod{17, L"enableImagePrefetchingAndroid"}, + SyncMethod{18, L"enableLayoutAnimationsOnAndroid"}, + SyncMethod{19, L"enableLayoutAnimationsOnIOS"}, + SyncMethod{20, L"enableLongTaskAPI"}, + SyncMethod{21, L"enableNewBackgroundAndBorderDrawables"}, + SyncMethod{22, L"enablePreciseSchedulingForPremountItemsOnAndroid"}, + SyncMethod{23, L"enablePropsUpdateReconciliationAndroid"}, + SyncMethod{24, L"enableReportEventPaintTime"}, + SyncMethod{25, L"enableSynchronousStateUpdates"}, + SyncMethod{26, L"enableUIConsistency"}, + SyncMethod{27, L"enableViewRecycling"}, + SyncMethod{28, L"excludeYogaFromRawProps"}, + SyncMethod{29, L"fixDifferentiatorEmittingUpdatesWithWrongParentTag"}, SyncMethod{30, L"fixMappingOfEventPrioritiesBetweenFabricAndReact"}, SyncMethod{31, L"fixMountingCoordinatorReportedPendingTransactionsOnAndroid"}, SyncMethod{32, L"fuseboxEnabledDebug"}, @@ -142,84 +142,84 @@ struct ReactNativeFeatureFlagsSpec : winrt::Microsoft::ReactNative::TurboModuleS " REACT_SYNC_METHOD(enableFabricRenderer) static bool enableFabricRenderer() noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 14, - "enableFabricRendererExclusively", - " REACT_SYNC_METHOD(enableFabricRendererExclusively) bool enableFabricRendererExclusively() noexcept { /* implementation */ }\n" - " REACT_SYNC_METHOD(enableFabricRendererExclusively) static bool enableFabricRendererExclusively() noexcept { /* implementation */ }\n"); - REACT_SHOW_METHOD_SPEC_ERRORS( - 15, "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( - 16, + 15, "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( - 17, + 16, "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( - 18, + 17, "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( - 19, + 18, "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( - 20, + 19, "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( - 21, + 20, "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( - 22, + 21, "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( - 23, + 22, "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( - 24, + 23, "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( - 25, + 24, "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( - 26, + 25, "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( - 27, + 26, "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( - 28, + 27, "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( - 29, + 28, "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( + 29, + "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( 30, "fixMappingOfEventPrioritiesBetweenFabricAndReact", diff --git a/vnext/codegen/rnwcoreJSI-generated.cpp b/vnext/codegen/rnwcoreJSI-generated.cpp index d9d10207154..0e2c09ee97c 100644 --- a/vnext/codegen/rnwcoreJSI-generated.cpp +++ b/vnext/codegen/rnwcoreJSI-generated.cpp @@ -81,11 +81,6 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableF rt ); } -static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableFabricRendererExclusively(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - return static_cast(&turboModule)->enableFabricRendererExclusively( - rt - ); -} static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableFixForViewCommandRace(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->enableFixForViewCommandRace( rt @@ -161,6 +156,11 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_exclude rt ); } +static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fixDifferentiatorEmittingUpdatesWithWrongParentTag(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { + return static_cast(&turboModule)->fixDifferentiatorEmittingUpdatesWithWrongParentTag( + rt + ); +} static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fixMappingOfEventPrioritiesBetweenFabricAndReact(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->fixMappingOfEventPrioritiesBetweenFabricAndReact( rt @@ -263,7 +263,6 @@ NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI methodMap_["enableEventEmitterRetentionDuringGesturesOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableEventEmitterRetentionDuringGesturesOnAndroid}; methodMap_["enableFabricLogs"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableFabricLogs}; methodMap_["enableFabricRenderer"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableFabricRenderer}; - methodMap_["enableFabricRendererExclusively"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableFabricRendererExclusively}; methodMap_["enableFixForViewCommandRace"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableFixForViewCommandRace}; methodMap_["enableGranularShadowTreeStateReconciliation"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableGranularShadowTreeStateReconciliation}; methodMap_["enableIOSViewClipToPaddingBox"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableIOSViewClipToPaddingBox}; @@ -279,6 +278,7 @@ NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI methodMap_["enableUIConsistency"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableUIConsistency}; methodMap_["enableViewRecycling"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableViewRecycling}; methodMap_["excludeYogaFromRawProps"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_excludeYogaFromRawProps}; + methodMap_["fixDifferentiatorEmittingUpdatesWithWrongParentTag"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fixDifferentiatorEmittingUpdatesWithWrongParentTag}; methodMap_["fixMappingOfEventPrioritiesBetweenFabricAndReact"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fixMappingOfEventPrioritiesBetweenFabricAndReact}; methodMap_["fixMountingCoordinatorReportedPendingTransactionsOnAndroid"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fixMountingCoordinatorReportedPendingTransactionsOnAndroid}; methodMap_["fuseboxEnabledDebug"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_fuseboxEnabledDebug}; @@ -3050,26 +3050,6 @@ static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_now(jsi::Runtime &r rt ); } -static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_mark(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->mark( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - 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_NativePerformanceCxxSpecJSI_measure(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { - static_cast(&turboModule)->measure( - rt, - count <= 0 ? throw jsi::JSError(rt, "Expected argument in position 0 to be passed") : args[0].asString(rt), - 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 || args[3].isUndefined() ? std::nullopt : std::make_optional(args[3].asNumber()), - count <= 4 || args[4].isUndefined() ? std::nullopt : std::make_optional(args[4].asString(rt)), - count <= 5 || args[5].isUndefined() ? std::nullopt : std::make_optional(args[5].asString(rt)) - ); - return jsi::Value::undefined(); -} static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_markWithResult(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) { return static_cast(&turboModule)->markWithResult( rt, @@ -3178,8 +3158,6 @@ static jsi::Value __hostFunction_NativePerformanceCxxSpecJSI_getSupportedPerform NativePerformanceCxxSpecJSI::NativePerformanceCxxSpecJSI(std::shared_ptr jsInvoker) : TurboModule("NativePerformanceCxx", jsInvoker) { methodMap_["now"] = MethodMetadata {0, __hostFunction_NativePerformanceCxxSpecJSI_now}; - methodMap_["mark"] = MethodMetadata {2, __hostFunction_NativePerformanceCxxSpecJSI_mark}; - methodMap_["measure"] = MethodMetadata {6, __hostFunction_NativePerformanceCxxSpecJSI_measure}; methodMap_["markWithResult"] = MethodMetadata {2, __hostFunction_NativePerformanceCxxSpecJSI_markWithResult}; methodMap_["measureWithResult"] = MethodMetadata {6, __hostFunction_NativePerformanceCxxSpecJSI_measureWithResult}; methodMap_["clearMarks"] = MethodMetadata {1, __hostFunction_NativePerformanceCxxSpecJSI_clearMarks}; diff --git a/vnext/codegen/rnwcoreJSI.h b/vnext/codegen/rnwcoreJSI.h index ad3f1104852..1fb05a54180 100644 --- a/vnext/codegen/rnwcoreJSI.h +++ b/vnext/codegen/rnwcoreJSI.h @@ -34,7 +34,6 @@ namespace facebook::react { virtual bool enableEventEmitterRetentionDuringGesturesOnAndroid(jsi::Runtime &rt) = 0; virtual bool enableFabricLogs(jsi::Runtime &rt) = 0; virtual bool enableFabricRenderer(jsi::Runtime &rt) = 0; - virtual bool enableFabricRendererExclusively(jsi::Runtime &rt) = 0; virtual bool enableFixForViewCommandRace(jsi::Runtime &rt) = 0; virtual bool enableGranularShadowTreeStateReconciliation(jsi::Runtime &rt) = 0; virtual bool enableIOSViewClipToPaddingBox(jsi::Runtime &rt) = 0; @@ -50,6 +49,7 @@ namespace facebook::react { virtual bool enableUIConsistency(jsi::Runtime &rt) = 0; virtual bool enableViewRecycling(jsi::Runtime &rt) = 0; virtual bool excludeYogaFromRawProps(jsi::Runtime &rt) = 0; + virtual bool fixDifferentiatorEmittingUpdatesWithWrongParentTag(jsi::Runtime &rt) = 0; virtual bool fixMappingOfEventPrioritiesBetweenFabricAndReact(jsi::Runtime &rt) = 0; virtual bool fixMountingCoordinatorReportedPendingTransactionsOnAndroid(jsi::Runtime &rt) = 0; virtual bool fuseboxEnabledDebug(jsi::Runtime &rt) = 0; @@ -209,14 +209,6 @@ class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::enableFabricRenderer, jsInvoker_, instance_); } - bool enableFabricRendererExclusively(jsi::Runtime &rt) override { - static_assert( - bridging::getParameterCount(&T::enableFabricRendererExclusively) == 1, - "Expected enableFabricRendererExclusively(...) to have 1 parameters"); - - return bridging::callFromJs( - rt, &T::enableFabricRendererExclusively, jsInvoker_, instance_); - } bool enableFixForViewCommandRace(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::enableFixForViewCommandRace) == 1, @@ -337,6 +329,14 @@ class JSI_EXPORT NativeReactNativeFeatureFlagsCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::excludeYogaFromRawProps, jsInvoker_, instance_); } + bool fixDifferentiatorEmittingUpdatesWithWrongParentTag(jsi::Runtime &rt) override { + static_assert( + bridging::getParameterCount(&T::fixDifferentiatorEmittingUpdatesWithWrongParentTag) == 1, + "Expected fixDifferentiatorEmittingUpdatesWithWrongParentTag(...) to have 1 parameters"); + + return bridging::callFromJs( + rt, &T::fixDifferentiatorEmittingUpdatesWithWrongParentTag, jsInvoker_, instance_); + } bool fixMappingOfEventPrioritiesBetweenFabricAndReact(jsi::Runtime &rt) override { static_assert( bridging::getParameterCount(&T::fixMappingOfEventPrioritiesBetweenFabricAndReact) == 1, @@ -8789,8 +8789,6 @@ class JSI_EXPORT NativePerformanceCxxSpecJSI : public TurboModule { public: virtual double now(jsi::Runtime &rt) = 0; - virtual void mark(jsi::Runtime &rt, jsi::String name, double startTime) = 0; - virtual void measure(jsi::Runtime &rt, jsi::String name, double startTime, double endTime, std::optional duration, std::optional startMark, std::optional endMark) = 0; virtual double markWithResult(jsi::Runtime &rt, jsi::String name, std::optional startTime) = 0; virtual jsi::Array measureWithResult(jsi::Runtime &rt, jsi::String name, double startTime, double endTime, std::optional duration, std::optional startMark, std::optional endMark) = 0; virtual void clearMarks(jsi::Runtime &rt, std::optional entryName) = 0; @@ -8845,22 +8843,6 @@ class JSI_EXPORT NativePerformanceCxxSpec : public TurboModule { return bridging::callFromJs( rt, &T::now, jsInvoker_, instance_); } - void mark(jsi::Runtime &rt, jsi::String name, double startTime) override { - static_assert( - bridging::getParameterCount(&T::mark) == 3, - "Expected mark(...) to have 3 parameters"); - - return bridging::callFromJs( - rt, &T::mark, jsInvoker_, instance_, std::move(name), std::move(startTime)); - } - void measure(jsi::Runtime &rt, jsi::String name, double startTime, double endTime, std::optional duration, std::optional startMark, std::optional endMark) override { - static_assert( - bridging::getParameterCount(&T::measure) == 7, - "Expected measure(...) to have 7 parameters"); - - return bridging::callFromJs( - rt, &T::measure, jsInvoker_, instance_, std::move(name), std::move(startTime), std::move(endTime), std::move(duration), std::move(startMark), std::move(endMark)); - } double markWithResult(jsi::Runtime &rt, jsi::String name, std::optional startTime) override { static_assert( bridging::getParameterCount(&T::markWithResult) == 3, diff --git a/vnext/overrides.json b/vnext/overrides.json index c7128a98d0e..7ea10a37365 100644 --- a/vnext/overrides.json +++ b/vnext/overrides.json @@ -8,7 +8,7 @@ "**/__snapshots__/**", "src-win/rntypes/**" ], - "baseVersion": "0.78.0-nightly-20241201-91e217ff5", + "baseVersion": "0.78.0-nightly-20241210-6d235853f", "overrides": [ { "type": "derived", @@ -38,31 +38,31 @@ "type": "derived", "file": "Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h", "baseFile": "packages/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputComponentDescriptor.h", - "baseHash": "90409a2a287313a62c5c321cacac46421b43be4c" + "baseHash": "f03c434f1aa9bd962d9a204382dd7c6b809e0226" }, { "type": "derived", "file": "Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp", "baseFile": "packages/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.cpp", - "baseHash": "13c001498a042f76910178d8138678a4f9fd86d6" + "baseHash": "6bbfb03fbf86318973fe40f50d907774ffeeeb9c" }, { "type": "derived", "file": "Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h", "baseFile": "packages/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h", - "baseHash": "84efa5a6b9ca4ce72d39b5d31d58fa192073f284" + "baseHash": "7c3e8d6647779eade9ebfe57f62f00f72ba0dfb0" }, { "type": "derived", "file": "Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp", - "baseFile": "packages/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputState.cpp", - "baseHash": "3a170d866220fe9cbec2fa65ccb4a17023a3d51a" + "baseFile": "packages/react-native/ReactCommon/react/renderer/components/textinput/TextInputState.cpp", + "baseHash": "b6d55e3e9c4071abf7ba0601f3688d3886621fb4" }, { "type": "derived", "file": "Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h", - "baseFile": "packages/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputState.h", - "baseHash": "e0cb62818f80a458ef28430a08a6a685805d3a91" + "baseFile": "packages/react-native/ReactCommon/react/renderer/components/textinput/TextInputState.h", + "baseHash": "44d97403ef1124a493ac799a03077c0297f7be3f" }, { "type": "derived", @@ -102,7 +102,7 @@ "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp", "baseFile": "packages/react-native/ReactCommon/jsi/jsi/test/testlib.cpp", - "baseHash": "dfe475b567eb377514970f9563bfafae8b8b6ef9", + "baseHash": "c13cfc9ae3660a729374a0027aada2f7bd6ad492", "issue": 12210 }, { @@ -197,7 +197,7 @@ "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp", "baseFile": "packages/react-native/ReactCommon/react/runtime/ReactInstance.cpp", - "baseHash": "240a49c5f5bd67f35e79dcbe9a9c6e7f6e6e2a32", + "baseHash": "035d7eb7f908cdf73356fdccd0ccc4a8afb6cf76", "issue": 13172 }, { @@ -265,24 +265,6 @@ "baseFile": "packages/react-native/Libraries/Alert/Alert.js", "baseHash": "173b99e6ae120f14176cf3425877728787d3feed" }, - { - "type": "derived", - "file": "src-win/Libraries/Animated/NativeAnimatedAllowlist.windows.js", - "baseFile": "packages/react-native/Libraries/Animated/NativeAnimatedAllowlist.js", - "baseHash": "337dfc9001bc8967ca8c5da7f09ddde463d29b54" - }, - { - "type": "derived", - "file": "src-win/Libraries/Animated/nodes/AnimatedProps.windows.js", - "baseFile": "packages/react-native/Libraries/Animated/nodes/AnimatedProps.js", - "baseHash": "9157901b6382c2a936010d0d34ec4f33a8baf70b" - }, - { - "type": "derived", - "file": "src-win/Libraries/Animated/nodes/AnimatedStyle.windows.js", - "baseFile": "packages/react-native/Libraries/Animated/nodes/AnimatedStyle.js", - "baseHash": "477711c8194a5ea843ec907c2d97fbed83b94028" - }, { "type": "platform", "file": "src-win/Libraries/AppTheme/AppTheme.js" @@ -604,7 +586,7 @@ "type": "derived", "file": "src-win/Libraries/Text/TextProps.windows.js", "baseFile": "packages/react-native/Libraries/Text/TextProps.js", - "baseHash": "8e56a028dee989ebb8b06f4c01a1d038f074597d" + "baseHash": "ef1efdc0fb302273cd98be71aef2986677dda184" }, { "type": "patch", @@ -637,12 +619,6 @@ "baseFile": "packages/react-native/Libraries/Utilities/Platform.android.js", "baseHash": "33f07d6fddb5290d05c8d4cc490312e3af88c70b" }, - { - "type": "derived", - "file": "src-win/src/private/animated/useAnimatedPropsMemo.windows.js", - "baseFile": "packages/react-native/src/private/animated/useAnimatedPropsMemo.js", - "baseHash": "b1c052ae3653d5771b75aa96afc49cddd794f1bd" - }, { "type": "copy", "file": "src-win/src/private/debugging/ReactDevToolsSettingsManager.windows.js", diff --git a/vnext/package.json b/vnext/package.json index 2e0771e3e2a..f9d1b0847e0 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.251", "@react-native/assets": "1.0.0", - "@react-native/assets-registry": "0.78.0-nightly-20241201-91e217ff5", - "@react-native/codegen": "0.78.0-nightly-20241201-91e217ff5", - "@react-native/community-cli-plugin": "0.78.0-nightly-20241201-91e217ff5", - "@react-native/gradle-plugin": "0.78.0-nightly-20241201-91e217ff5", - "@react-native/js-polyfills": "0.78.0-nightly-20241201-91e217ff5", - "@react-native/normalize-colors": "0.78.0-nightly-20241201-91e217ff5", - "@react-native/virtualized-lists": "0.78.0-nightly-20241201-91e217ff5", + "@react-native/assets-registry": "0.78.0-nightly-20241210-6d235853f", + "@react-native/codegen": "0.78.0-nightly-20241210-6d235853f", + "@react-native/community-cli-plugin": "0.78.0-nightly-20241210-6d235853f", + "@react-native/gradle-plugin": "0.78.0-nightly-20241210-6d235853f", + "@react-native/js-polyfills": "0.78.0-nightly-20241210-6d235853f", + "@react-native/normalize-colors": "0.78.0-nightly-20241210-6d235853f", + "@react-native/virtualized-lists": "0.78.0-nightly-20241210-6d235853f", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", @@ -48,7 +48,6 @@ "glob": "^7.1.1", "invariant": "^2.2.4", "jest-environment-node": "^29.6.3", - "jsc-android": "^250231.0.0", "memoize-one": "^5.0.0", "metro-runtime": "^0.81.0", "metro-source-map": "^0.81.0", @@ -85,7 +84,7 @@ "just-scripts": "^1.3.3", "prettier": "2.8.8", "react": "18.3.1", - "react-native": "0.78.0-nightly-20241201-91e217ff5", + "react-native": "0.78.0-nightly-20241210-6d235853f", "react-native-platform-override": "^1.9.49", "react-refresh": "^0.14.0", "typescript": "5.0.4" @@ -93,7 +92,7 @@ "peerDependencies": { "@types/react": "^18.2.6", "react": "^18.2.0", - "react-native": "0.78.0-nightly-20241201-91e217ff5" + "react-native": "0.78.0-nightly-20241210-6d235853f" }, "beachball": { "defaultNpmTag": "canary", diff --git a/vnext/src-win/Libraries/Animated/NativeAnimatedAllowlist.windows.js b/vnext/src-win/Libraries/Animated/NativeAnimatedAllowlist.windows.js deleted file mode 100644 index ac41c77621e..00000000000 --- a/vnext/src-win/Libraries/Animated/NativeAnimatedAllowlist.windows.js +++ /dev/null @@ -1,122 +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. - * - * @flow strict-local - * @format - */ - -import type {AnimatedPropsAllowlist} from './nodes/AnimatedProps'; - -import * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags'; - -/** - * Styles allowed by the native animated implementation. - * - * In general native animated implementation should support any numeric or color property that - * doesn't need to be updated through the shadow view hierarchy (all non-layout properties). - */ -const SUPPORTED_COLOR_STYLES: {[string]: true} = { - backgroundColor: true, - borderBottomColor: true, - borderColor: true, - borderEndColor: true, - borderLeftColor: true, - borderRightColor: true, - borderStartColor: true, - borderTopColor: true, - color: true, - tintColor: true, -}; - -const SUPPORTED_STYLES: {[string]: true} = { - ...SUPPORTED_COLOR_STYLES, - borderBottomEndRadius: true, - borderBottomLeftRadius: true, - borderBottomRightRadius: true, - borderBottomStartRadius: true, - borderEndEndRadius: true, - borderEndStartRadius: true, - borderRadius: true, - borderTopEndRadius: true, - borderTopLeftRadius: true, - borderTopRightRadius: true, - borderTopStartRadius: true, - borderStartEndRadius: true, - borderStartStartRadius: true, - elevation: true, - opacity: true, - transform: true, - zIndex: true, - /* ios styles */ - shadowOpacity: true, - shadowRadius: true, - /* legacy android transform properties */ - scaleX: true, - scaleY: true, - translateX: true, - translateY: true, -}; - -const SUPPORTED_TRANSFORMS: {[string]: true} = { - translateX: true, - translateY: true, - scale: true, - scaleX: true, - scaleY: true, - rotate: true, - rotateX: true, - rotateY: true, - rotateZ: true, - perspective: true, - skewX: true, - skewY: true, - ...(ReactNativeFeatureFlags.shouldUseAnimatedObjectForTransform() - ? {matrix: true} - : {}), -}; - -const SUPPORTED_INTERPOLATION_PARAMS: {[string]: true} = { - inputRange: true, - outputRange: true, - extrapolate: true, - extrapolateRight: true, - extrapolateLeft: true, -}; - -/** - * Default allowlist for component props that support native animated values. - */ -export default { - style: SUPPORTED_STYLES, -} as AnimatedPropsAllowlist; - -export function allowInterpolationParam(param: string): void { - SUPPORTED_INTERPOLATION_PARAMS[param] = true; -} - -export function allowStyleProp(prop: string): void { - SUPPORTED_STYLES[prop] = true; -} - -export function allowTransformProp(prop: string): void { - SUPPORTED_TRANSFORMS[prop] = true; -} - -export function isSupportedColorStyleProp(prop: string): boolean { - return SUPPORTED_COLOR_STYLES.hasOwnProperty(prop); -} - -export function isSupportedInterpolationParam(param: string): boolean { - return SUPPORTED_INTERPOLATION_PARAMS.hasOwnProperty(param); -} - -export function isSupportedStyleProp(prop: string): boolean { - return SUPPORTED_STYLES.hasOwnProperty(prop); -} - -export function isSupportedTransformProp(prop: string): boolean { - return SUPPORTED_TRANSFORMS.hasOwnProperty(prop); -} diff --git a/vnext/src-win/Libraries/Animated/nodes/AnimatedProps.windows.js b/vnext/src-win/Libraries/Animated/nodes/AnimatedProps.windows.js deleted file mode 100644 index feeaa195550..00000000000 --- a/vnext/src-win/Libraries/Animated/nodes/AnimatedProps.windows.js +++ /dev/null @@ -1,281 +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. - * - * @flow - * @format - */ - -import type {PlatformConfig} from '../AnimatedPlatformConfig'; -import type {AnimatedStyleAllowlist} from './AnimatedStyle'; - -import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper'; -import {findNodeHandle} from '../../ReactNative/RendererProxy'; -import {AnimatedEvent} from '../AnimatedEvent'; -import AnimatedNode from './AnimatedNode'; -import AnimatedObject from './AnimatedObject'; -import AnimatedStyle from './AnimatedStyle'; -import invariant from 'invariant'; - -export type AnimatedPropsAllowlist = $ReadOnly<{ - style?: ?AnimatedStyleAllowlist, - [string]: true, -}>; - -function createAnimatedProps( - inputProps: {[string]: mixed}, - allowlist: ?AnimatedPropsAllowlist, -): [$ReadOnlyArray, $ReadOnlyArray, {[string]: mixed}] { - const nodeKeys: Array = []; - const nodes: Array = []; - const props: {[string]: mixed} = {}; - - const keys = Object.keys(inputProps); - for (let ii = 0, length = keys.length; ii < length; ii++) { - const key = keys[ii]; - const value = inputProps[key]; - - if (allowlist == null || hasOwn(allowlist, key)) { - let node; - if (key === 'style') { - node = AnimatedStyle.from(value, allowlist?.style); - } else if (value instanceof AnimatedNode) { - node = value; - } else { - node = AnimatedObject.from(value); - } - if (node == null) { - props[key] = value; - } else { - nodeKeys.push(key); - nodes.push(node); - props[key] = node; - } - } else { - if (__DEV__) { - // WARNING: This is a potentially expensive check that we should only - // do in development. Without this check in development, it might be - // difficult to identify which props need to be allowlisted. - if (AnimatedObject.from(inputProps[key]) != null) { - console.error( - `AnimatedProps: ${key} is not allowlisted for animation, but it ` + - 'contains AnimatedNode values; props allowing animation: ', - allowlist, - ); - } - } - props[key] = value; - } - } - - return [nodeKeys, nodes, props]; -} - -export default class AnimatedProps extends AnimatedNode { - #animatedView: any = null; - #callback: () => void; - #nodeKeys: $ReadOnlyArray; - #nodes: $ReadOnlyArray; - #props: {[string]: mixed}; - - constructor( - inputProps: {[string]: mixed}, - callback: () => void, - allowlist?: ?AnimatedPropsAllowlist, - ) { - super(); - const [nodeKeys, nodes, props] = createAnimatedProps(inputProps, allowlist); - this.#nodeKeys = nodeKeys; - this.#nodes = nodes; - this.#props = props; - this.#callback = callback; - } - - __getValue(): Object { - const props: {[string]: mixed} = {}; - - const keys = Object.keys(this.#props); - for (let ii = 0, length = keys.length; ii < length; ii++) { - const key = keys[ii]; - const value = this.#props[key]; - - if (value instanceof AnimatedNode) { - props[key] = value.__getValue(); - } else if (value instanceof AnimatedEvent) { - props[key] = value.__getHandler(); - } else { - props[key] = value; - } - } - - return props; - } - - /** - * Creates a new `props` object that contains the same props as the supplied - * `staticProps` object, except with animated nodes for any props that were - * created by this `AnimatedProps` instance. - */ - __getValueWithStaticProps(staticProps: Object): Object { - const props: {[string]: mixed} = {...staticProps}; - - const keys = Object.keys(staticProps); - for (let ii = 0, length = keys.length; ii < length; ii++) { - const key = keys[ii]; - const maybeNode = this.#props[key]; - - if (key === 'style' && maybeNode instanceof AnimatedStyle) { - props[key] = maybeNode.__getValueWithStaticStyle(staticProps.style); - } else if (maybeNode instanceof AnimatedNode) { - props[key] = maybeNode.__getValue(); - } else if (maybeNode instanceof AnimatedEvent) { - props[key] = maybeNode.__getHandler(); - } - } - - return props; - } - - __getAnimatedValue(): Object { - const props: {[string]: mixed} = {}; - - const nodeKeys = this.#nodeKeys; - const nodes = this.#nodes; - for (let ii = 0, length = nodes.length; ii < length; ii++) { - const key = nodeKeys[ii]; - const node = nodes[ii]; - props[key] = node.__getAnimatedValue(); - } - - return props; - } - - __attach(): void { - const nodes = this.#nodes; - for (let ii = 0, length = nodes.length; ii < length; ii++) { - const node = nodes[ii]; - node.__addChild(this); - } - } - - __detach(): void { - if (this.__isNative && this.#animatedView) { - this.__disconnectAnimatedView(); - } - this.#animatedView = null; - - const nodes = this.#nodes; - for (let ii = 0, length = nodes.length; ii < length; ii++) { - const node = nodes[ii]; - node.__removeChild(this); - } - - super.__detach(); - } - - update(): void { - this.#callback(); - } - - __makeNative(platformConfig: ?PlatformConfig): void { - const nodes = this.#nodes; - for (let ii = 0, length = nodes.length; ii < length; ii++) { - const node = nodes[ii]; - node.__makeNative(platformConfig); - } - - if (!this.__isNative) { - this.__isNative = true; - - // Since this does not call the super.__makeNative, we need to store the - // supplied platformConfig here, before calling __connectAnimatedView - // where it will be needed to traverse the graph of attached values. - super.__setPlatformConfig(platformConfig); - - if (this.#animatedView) { - this.__connectAnimatedView(); - } - } - } - - setNativeView(animatedView: any): void { - if (this.#animatedView === animatedView) { - return; - } - this.#animatedView = animatedView; - if (this.__isNative) { - this.__connectAnimatedView(); - } - } - - __connectAnimatedView(): void { - invariant(this.__isNative, 'Expected node to be marked as "native"'); - let nativeViewTag: ?number = findNodeHandle(this.#animatedView); - if (nativeViewTag == null) { - if (process.env.NODE_ENV === 'test') { - nativeViewTag = -1; - } else { - throw new Error('Unable to locate attached view in the native tree'); - } - } - NativeAnimatedHelper.API.connectAnimatedNodeToView( - this.__getNativeTag(), - nativeViewTag, - ); - } - - __disconnectAnimatedView(): void { - invariant(this.__isNative, 'Expected node to be marked as "native"'); - let nativeViewTag: ?number = findNodeHandle(this.#animatedView); - if (nativeViewTag == null) { - if (process.env.NODE_ENV === 'test') { - nativeViewTag = -1; - } else { - throw new Error('Unable to locate attached view in the native tree'); - } - } - NativeAnimatedHelper.API.disconnectAnimatedNodeFromView( - this.__getNativeTag(), - nativeViewTag, - ); - } - - __restoreDefaultValues(): void { - // When using the native driver, view properties need to be restored to - // their default values manually since react no longer tracks them. This - // is needed to handle cases where a prop driven by native animated is removed - // after having been changed natively by an animation. - if (this.__isNative) { - NativeAnimatedHelper.API.restoreDefaultValues(this.__getNativeTag()); - } - } - - __getNativeConfig(): Object { - const platformConfig = this.__getPlatformConfig(); - const propsConfig: {[string]: number} = {}; - - const nodeKeys = this.#nodeKeys; - const nodes = this.#nodes; - for (let ii = 0, length = nodes.length; ii < length; ii++) { - const key = nodeKeys[ii]; - const node = nodes[ii]; - node.__makeNative(platformConfig); - propsConfig[key] = node.__getNativeTag(); - } - - return { - type: 'props', - props: propsConfig, - }; - } -} - -// Supported versions of JSC do not implement the newer Object.hasOwn. Remove -// this shim when they do. -// $FlowIgnore[method-unbinding] -const _hasOwnProp = Object.prototype.hasOwnProperty; -const hasOwn: (obj: $ReadOnly<{...}>, prop: string) => boolean = - // $FlowIgnore[method-unbinding] - Object.hasOwn ?? ((obj, prop) => _hasOwnProp.call(obj, prop)); diff --git a/vnext/src-win/Libraries/Animated/nodes/AnimatedStyle.windows.js b/vnext/src-win/Libraries/Animated/nodes/AnimatedStyle.windows.js deleted file mode 100644 index 359d2e7228a..00000000000 --- a/vnext/src-win/Libraries/Animated/nodes/AnimatedStyle.windows.js +++ /dev/null @@ -1,251 +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. - * - * @flow - * @format - */ - -import type {PlatformConfig} from '../AnimatedPlatformConfig'; - -import {validateStyles} from '../../../src/private/animated/NativeAnimatedValidation'; -import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags'; -import flattenStyle from '../../StyleSheet/flattenStyle'; -import Platform from '../../Utilities/Platform'; -import AnimatedNode from './AnimatedNode'; -import AnimatedObject from './AnimatedObject'; -import AnimatedTransform from './AnimatedTransform'; -import AnimatedWithChildren from './AnimatedWithChildren'; - -export type AnimatedStyleAllowlist = $ReadOnly<{[string]: true}>; - -function createAnimatedStyle( - inputStyle: {[string]: mixed}, - allowlist: ?AnimatedStyleAllowlist, - keepUnanimatedValues: boolean, -): [$ReadOnlyArray, $ReadOnlyArray, {[string]: mixed}] { - const nodeKeys: Array = []; - const nodes: Array = []; - const style: {[string]: mixed} = {}; - - const keys = Object.keys(inputStyle); - for (let ii = 0, length = keys.length; ii < length; ii++) { - const key = keys[ii]; - const value = inputStyle[key]; - - if (allowlist == null || hasOwn(allowlist, key)) { - let node; - if (value != null && key === 'transform') { - node = ReactNativeFeatureFlags.shouldUseAnimatedObjectForTransform() - ? AnimatedObject.from(value) - : // $FlowFixMe[incompatible-call] - `value` is mixed. - AnimatedTransform.from(value); - } else if (value instanceof AnimatedNode) { - node = value; - } else { - node = AnimatedObject.from(value); - } - if (node == null) { - if (keepUnanimatedValues) { - style[key] = value; - } - } else { - nodeKeys.push(key); - nodes.push(node); - style[key] = node; - } - } else { - if (__DEV__) { - // WARNING: This is a potentially expensive check that we should only - // do in development. Without this check in development, it might be - // difficult to identify which styles need to be allowlisted. - if (AnimatedObject.from(inputStyle[key]) != null) { - console.error( - `AnimatedStyle: ${key} is not allowlisted for animation, but it ` + - 'contains AnimatedNode values; styles allowing animation: ', - allowlist, - ); - } - } - if (keepUnanimatedValues) { - style[key] = value; - } - } - } - - return [nodeKeys, nodes, style]; -} - -export default class AnimatedStyle extends AnimatedWithChildren { - #inputStyle: any; - #nodeKeys: $ReadOnlyArray; - #nodes: $ReadOnlyArray; - #style: {[string]: mixed}; - - /** - * Creates an `AnimatedStyle` if `value` contains `AnimatedNode` instances. - * Otherwise, returns `null`. - */ - static from( - inputStyle: any, - allowlist: ?AnimatedStyleAllowlist, - ): ?AnimatedStyle { - const flatStyle = flattenStyle(inputStyle); - if (flatStyle == null) { - return null; - } - const [nodeKeys, nodes, style] = createAnimatedStyle( - flatStyle, - allowlist, - Platform.OS !== 'web', - ); - if (nodes.length === 0) { - return null; - } - return new AnimatedStyle(nodeKeys, nodes, style, inputStyle); - } - - constructor( - nodeKeys: $ReadOnlyArray, - nodes: $ReadOnlyArray, - style: {[string]: mixed}, - inputStyle: any, - ) { - super(); - this.#nodeKeys = nodeKeys; - this.#nodes = nodes; - this.#style = style; - this.#inputStyle = inputStyle; - } - - __getValue(): Object | Array { - const style: {[string]: mixed} = {}; - - const keys = Object.keys(this.#style); - for (let ii = 0, length = keys.length; ii < length; ii++) { - const key = keys[ii]; - const value = this.#style[key]; - - if (value instanceof AnimatedNode) { - style[key] = value.__getValue(); - } else { - style[key] = value; - } - } - - /* $FlowFixMe[incompatible-type] Error found due to incomplete typing of - * Platform.flow.js */ - return Platform.OS === 'web' ? [this.#inputStyle, style] : style; - } - - /** - * Creates a new `style` object that contains the same style properties as - * the supplied `staticStyle` object, except with animated nodes for any - * style properties that were created by this `AnimatedStyle` instance. - */ - __getValueWithStaticStyle(staticStyle: Object): Object | Array { - const flatStaticStyle = flattenStyle(staticStyle); - const style: {[string]: mixed} = - flatStaticStyle == null - ? {} - : flatStaticStyle === staticStyle - ? // Copy the input style, since we'll mutate it below. - {...flatStaticStyle} - : // Reuse `flatStaticStyle` if it is a newly created object. - flatStaticStyle; - - const keys = Object.keys(style); - for (let ii = 0, length = keys.length; ii < length; ii++) { - const key = keys[ii]; - const maybeNode = this.#style[key]; - - if (key === 'transform' && maybeNode instanceof AnimatedTransform) { - style[key] = maybeNode.__getValueWithStaticTransforms( - // NOTE: This check should not be necessary, but the types are not - // enforced as of this writing. - Array.isArray(style[key]) ? style[key] : [], - ); - } else if (maybeNode instanceof AnimatedObject) { - style[key] = maybeNode.__getValueWithStaticObject(style[key]); - } else if (maybeNode instanceof AnimatedNode) { - style[key] = maybeNode.__getValue(); - } - } - - /* $FlowFixMe[incompatible-type] Error found due to incomplete typing of - * Platform.flow.js */ - return Platform.OS === 'web' ? [this.#inputStyle, style] : style; - } - - __getAnimatedValue(): Object { - const style: {[string]: mixed} = {}; - - const nodeKeys = this.#nodeKeys; - const nodes = this.#nodes; - for (let ii = 0, length = nodes.length; ii < length; ii++) { - const key = nodeKeys[ii]; - const node = nodes[ii]; - style[key] = node.__getAnimatedValue(); - } - - return style; - } - - __attach(): void { - const nodes = this.#nodes; - for (let ii = 0, length = nodes.length; ii < length; ii++) { - const node = nodes[ii]; - node.__addChild(this); - } - } - - __detach(): void { - const nodes = this.#nodes; - for (let ii = 0, length = nodes.length; ii < length; ii++) { - const node = nodes[ii]; - node.__removeChild(this); - } - super.__detach(); - } - - __makeNative(platformConfig: ?PlatformConfig) { - const nodes = this.#nodes; - for (let ii = 0, length = nodes.length; ii < length; ii++) { - const node = nodes[ii]; - node.__makeNative(platformConfig); - } - super.__makeNative(platformConfig); - } - - __getNativeConfig(): Object { - const platformConfig = this.__getPlatformConfig(); - const styleConfig: {[string]: ?number} = {}; - - const nodeKeys = this.#nodeKeys; - const nodes = this.#nodes; - for (let ii = 0, length = nodes.length; ii < length; ii++) { - const key = nodeKeys[ii]; - const node = nodes[ii]; - node.__makeNative(platformConfig); - styleConfig[key] = node.__getNativeTag(); - } - - if (__DEV__) { - validateStyles(styleConfig); - } - return { - type: 'style', - style: styleConfig, - }; - } -} - -// Supported versions of JSC do not implement the newer Object.hasOwn. Remove -// this shim when they do. -// $FlowIgnore[method-unbinding] -const _hasOwnProp = Object.prototype.hasOwnProperty; -const hasOwn: (obj: $ReadOnly<{...}>, prop: string) => boolean = - // $FlowIgnore[method-unbinding] - Object.hasOwn ?? ((obj, prop) => _hasOwnProp.call(obj, prop)); diff --git a/vnext/src-win/Libraries/Text/TextProps.windows.js b/vnext/src-win/Libraries/Text/TextProps.windows.js index 23ab44f8005..ac60f2b0203 100644 --- a/vnext/src-win/Libraries/Text/TextProps.windows.js +++ b/vnext/src-win/Libraries/Text/TextProps.windows.js @@ -17,7 +17,7 @@ import type { AccessibilityState, Role, } from '../Components/View/ViewAccessibility'; -import type {TextStyleProp} from '../StyleSheet/StyleSheet'; +import type {ColorValue, TextStyleProp} from '../StyleSheet/StyleSheet'; import type { LayoutEvent, PointerEvent, @@ -222,7 +222,7 @@ export type TextProps = $ReadOnly<{ * * See https://reactnative.dev/docs/text#selectioncolor */ - selectionColor?: ?string, + selectionColor?: ?ColorValue, dataDetectorType?: ?('phoneNumber' | 'link' | 'email' | 'none' | 'all'), diff --git a/vnext/src-win/src/private/animated/useAnimatedPropsMemo.windows.js b/vnext/src-win/src/private/animated/useAnimatedPropsMemo.windows.js deleted file mode 100644 index 1f093c205a9..00000000000 --- a/vnext/src-win/src/private/animated/useAnimatedPropsMemo.windows.js +++ /dev/null @@ -1,356 +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. - * - * @flow strict-local - * @format - * @oncall react_native - */ - -import type AnimatedProps from '../../../Libraries/Animated/nodes/AnimatedProps'; -import type {AnimatedPropsAllowlist} from '../../../Libraries/Animated/nodes/AnimatedProps'; -import type {AnimatedStyleAllowlist} from '../../../Libraries/Animated/nodes/AnimatedStyle'; - -import {AnimatedEvent} from '../../../Libraries/Animated/AnimatedEvent'; -import AnimatedNode from '../../../Libraries/Animated/nodes/AnimatedNode'; -import {isPlainObject} from '../../../Libraries/Animated/nodes/AnimatedObject'; -import flattenStyle from '../../../Libraries/StyleSheet/flattenStyle'; -import nullthrows from 'nullthrows'; -import {useMemo, useState} from 'react'; - -type CompositeKey = { - style?: {[string]: CompositeKeyComponent}, - [string]: - | CompositeKeyComponent - | AnimatedEvent - | $ReadOnlyArray - | $ReadOnly<{[string]: mixed}>, -}; - -type CompositeKeyComponent = - | AnimatedNode - | Array - | {[string]: CompositeKeyComponent}; - -type $ReadOnlyCompositeKey = $ReadOnly<{ - style?: $ReadOnly<{[string]: CompositeKeyComponent}>, - [string]: - | $ReadOnlyCompositeKeyComponent - | AnimatedEvent - | $ReadOnlyArray - | $ReadOnly<{[string]: mixed}>, -}>; - -type $ReadOnlyCompositeKeyComponent = - | AnimatedNode - | $ReadOnlyArray<$ReadOnlyCompositeKeyComponent | null> - | $ReadOnly<{[string]: $ReadOnlyCompositeKeyComponent}>; - -/** - * A hook that returns an `AnimatedProps` object that is memoized based on the - * subset of `props` that are instances of `AnimatedNode` or `AnimatedEvent`. - */ -export function useAnimatedPropsMemo( - create: () => AnimatedProps, - // TODO: Make this two separate arguments after the experiment is over. This - // is only an array-like structure to make it easier to experiment with this - // and `useMemo`. - [allowlist, props]: [?AnimatedPropsAllowlist, {[string]: mixed}], -): AnimatedProps { - const compositeKey = useMemo( - () => createCompositeKeyForProps(props, allowlist), - [allowlist, props], - ); - - const [state, setState] = useState<{ - allowlist: ?AnimatedPropsAllowlist, - compositeKey: $ReadOnlyCompositeKey | null, - value: AnimatedProps, - }>(() => ({ - allowlist, - compositeKey, - value: create(), - })); - - if ( - state.allowlist !== allowlist || - !areCompositeKeysEqual(state.compositeKey, compositeKey) - ) { - setState({ - allowlist, - compositeKey, - value: create(), - }); - } - return state.value; -} - -/** - * Creates a new composite key for a `props` object that can be used to detect - * whether a new `AnimatedProps` instance must be created. - * - * - With an allowlist, those props are searched for `AnimatedNode` instances. - * - Without an allowlist, `style` is searched for `AnimatedNode` instances, - * but all other objects and arrays are included (not searched). We do not - * search objects and arrays without an allowlist in case they are very large - * data structures. We safely traverse `style` becuase it is bounded. - * - * Any `AnimatedEvent` instances at the first depth are always included. - * - * If `props` contains no `AnimatedNode` or `AnimatedEvent` instances, this - * returns null. - */ -export function createCompositeKeyForProps( - props: $ReadOnly<{[string]: mixed}>, - allowlist: ?AnimatedPropsAllowlist, -): $ReadOnlyCompositeKey | null { - let compositeKey: CompositeKey | null = null; - - const keys = Object.keys(props); - for (let ii = 0, length = keys.length; ii < length; ii++) { - const key = keys[ii]; - const value = props[key]; - - if (allowlist == null || hasOwn(allowlist, key)) { - let compositeKeyComponent; - if (key === 'style') { - // $FlowFixMe[incompatible-call] - `style` is a valid argument. - // $FlowFixMe[incompatible-type] - `flattenStyle` returns an object. - const flatStyle: ?{[string]: mixed} = flattenStyle(value); - if (flatStyle != null) { - compositeKeyComponent = createCompositeKeyForObject( - flatStyle, - allowlist?.style, - ); - } - } else if ( - value instanceof AnimatedNode || - value instanceof AnimatedEvent - ) { - compositeKeyComponent = value; - } else if (Array.isArray(value)) { - compositeKeyComponent = - allowlist == null ? value : createCompositeKeyForArray(value); - } else if (isPlainObject(value)) { - compositeKeyComponent = - allowlist == null ? value : createCompositeKeyForObject(value); - } - if (compositeKeyComponent != null) { - if (compositeKey == null) { - compositeKey = {} as CompositeKey; - } - compositeKey[key] = compositeKeyComponent; - } - } - } - - return compositeKey; -} - -/** - * Creates a new composite key for an array that retains all values that are or - * contain `AnimatedNode` instances, and `null` for the rest. - * - * If `array` contains no `AnimatedNode` instances, this returns null. - */ -function createCompositeKeyForArray( - array: $ReadOnlyArray, -): $ReadOnlyArray<$ReadOnlyCompositeKeyComponent | null> | null { - let compositeKey: Array<$ReadOnlyCompositeKeyComponent | null> | null = null; - - for (let ii = 0, length = array.length; ii < length; ii++) { - const value = array[ii]; - - let compositeKeyComponent; - if (value instanceof AnimatedNode) { - compositeKeyComponent = value; - } else if (Array.isArray(value)) { - compositeKeyComponent = createCompositeKeyForArray(value); - } else if (isPlainObject(value)) { - compositeKeyComponent = createCompositeKeyForObject(value); - } - if (compositeKeyComponent != null) { - if (compositeKey == null) { - compositeKey = new Array<$ReadOnlyCompositeKeyComponent | null>( - array.length, - ).fill(null); - } - compositeKey[ii] = compositeKeyComponent; - } - } - - return compositeKey; -} - -/** - * Creates a new composite key for an object that retains only properties that - * are or contain `AnimatedNode` instances. - * - * When used to create composite keys for `style` props: - * - * - With an allowlist, those properties are searched. - * - Without an allowlist, every property is searched. - * - * If `object` contains no `AnimatedNode` instances, this returns null. - */ -function createCompositeKeyForObject( - object: $ReadOnly<{[string]: mixed}>, - allowlist?: ?AnimatedStyleAllowlist, -): $ReadOnly<{[string]: $ReadOnlyCompositeKeyComponent}> | null { - let compositeKey: {[string]: $ReadOnlyCompositeKeyComponent} | null = null; - - const keys = Object.keys(object); - for (let ii = 0, length = keys.length; ii < length; ii++) { - const key = keys[ii]; - - if (allowlist == null || hasOwn(allowlist, key)) { - const value = object[key]; - - let compositeKeyComponent; - if (value instanceof AnimatedNode) { - compositeKeyComponent = value; - } else if (Array.isArray(value)) { - compositeKeyComponent = createCompositeKeyForArray(value); - } else if (isPlainObject(value)) { - compositeKeyComponent = createCompositeKeyForObject(value); - } - if (compositeKeyComponent != null) { - if (compositeKey == null) { - compositeKey = {} as {[string]: $ReadOnlyCompositeKeyComponent}; - } - compositeKey[key] = compositeKeyComponent; - } - } - } - - return compositeKey; -} - -export function areCompositeKeysEqual( - maybePrev: $ReadOnlyCompositeKey | null, - maybeNext: $ReadOnlyCompositeKey | null, - allowlist: ?AnimatedPropsAllowlist, -): boolean { - if (maybePrev === maybeNext) { - return true; - } - if (maybePrev === null || maybeNext === null) { - return false; - } - // Help Flow retain the type refinements of these. - const prev = maybePrev; - const next = maybeNext; - - const keys = Object.keys(prev); - const length = keys.length; - if (length !== Object.keys(next).length) { - return false; - } - for (let ii = 0; ii < length; ii++) { - const key = keys[ii]; - if (!hasOwn(next, key)) { - return false; - } - const prevComponent = prev[key]; - const nextComponent = next[key]; - - if (key === 'style') { - // We know style components are objects with non-mixed values. - if ( - !areCompositeKeyComponentsEqual( - // $FlowIgnore[incompatible-cast] - prevComponent as $ReadOnlyCompositeKeyComponent, - // $FlowIgnore[incompatible-cast] - nextComponent as $ReadOnlyCompositeKeyComponent, - ) - ) { - return false; - } - } else if ( - prevComponent instanceof AnimatedNode || - prevComponent instanceof AnimatedEvent - ) { - if (prevComponent !== nextComponent) { - return false; - } - } else { - // When `allowlist` is null, the components must be the same. Otherwise, - // we created the components using deep traversal, so deep compare them. - if (allowlist == null) { - if (prevComponent !== nextComponent) { - return false; - } - } else { - if ( - !areCompositeKeyComponentsEqual( - // $FlowIgnore[incompatible-cast] - prevComponent as $ReadOnlyCompositeKeyComponent, - // $FlowIgnore[incompatible-cast] - nextComponent as $ReadOnlyCompositeKeyComponent, - ) - ) { - return false; - } - } - } - } - return true; -} - -function areCompositeKeyComponentsEqual( - prev: $ReadOnlyCompositeKeyComponent | null, - next: $ReadOnlyCompositeKeyComponent | null, -): boolean { - if (prev === next) { - return true; - } - if (prev instanceof AnimatedNode) { - return prev === next; - } - if (Array.isArray(prev)) { - if (!Array.isArray(next)) { - return false; - } - const length = prev.length; - if (length !== next.length) { - return false; - } - for (let ii = 0; ii < length; ii++) { - if (!areCompositeKeyComponentsEqual(prev[ii], next[ii])) { - return false; - } - } - return true; - } - if (isPlainObject(prev)) { - if (!isPlainObject(next)) { - return false; - } - const keys = Object.keys(prev); - const length = keys.length; - if (length !== Object.keys(next).length) { - return false; - } - for (let ii = 0; ii < length; ii++) { - const key = keys[ii]; - if ( - !hasOwn(nullthrows(next), key) || - !areCompositeKeyComponentsEqual(prev[key], next[key]) - ) { - return false; - } - } - return true; - } - return false; -} - -// Supported versions of JSC do not implement the newer Object.hasOwn. Remove -// this shim when they do. -// $FlowIgnore[method-unbinding] -const _hasOwnProp = Object.prototype.hasOwnProperty; -const hasOwn: (obj: $ReadOnly<{...}>, prop: string) => boolean = - // $FlowIgnore[method-unbinding] - Object.hasOwn ?? ((obj, prop) => _hasOwnProp.call(obj, prop)); diff --git a/yarn.lock b/yarn.lock index 1458b9f8c91..446bb29b506 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2090,10 +2090,10 @@ resolved "https://registry.yarnpkg.com/@react-native-picker/picker/-/picker-2.10.2.tgz#92870eaefdde5cf06a0bb18dde593b9675c0bcab" integrity sha512-kr3OvCRwTYjR/OKlb52k4xmQVU7dPRIALqpyiihexdJxEgvc1smnepgqCeM9oXmNSG4YaV5/RSxFlLC5Z/T/Eg== -"@react-native/assets-registry@0.78.0-nightly-20241201-91e217ff5": - version "0.78.0-nightly-20241201-91e217ff5" - resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.78.0-nightly-20241201-91e217ff5.tgz#97482fc0306859d3edc0f1e42122312debf2c8bd" - integrity sha512-PzzKMtljZCZB/uTSangInVNA1OxLhITy/VQBwn7cyX/k2pKNySrc91bPFklTQa619v65FzZ8qxGkS79ftIJ0Vw== +"@react-native/assets-registry@0.78.0-nightly-20241210-6d235853f": + version "0.78.0-nightly-20241210-6d235853f" + resolved "https://registry.yarnpkg.com/@react-native/assets-registry/-/assets-registry-0.78.0-nightly-20241210-6d235853f.tgz#aa83537291d3019ed5a64df925ca992ed26a6f85" + integrity sha512-OnYm4Pzoid1+jTHDgUFs/8qHibHJu0aMsSbrbpBLyCrDR9SQDdfovZUFXkzD80tA70H+va+fDE4obeahh4npVw== "@react-native/assets@1.0.0": version "1.0.0" @@ -2116,13 +2116,13 @@ "@babel/traverse" "^7.25.3" "@react-native/codegen" "0.77.0-nightly-20241020-e7a3f479f" -"@react-native/babel-plugin-codegen@0.78.0-nightly-20241201-91e217ff5": - version "0.78.0-nightly-20241201-91e217ff5" - resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.78.0-nightly-20241201-91e217ff5.tgz#e04574f248ad7f55cd66cc06be06b5ec66ab8a57" - integrity sha512-+flg3J2Spix1SH+cVocxRp7kmOZGxYU4LLMhoFta+QlBi8X5vZGYzuCiLqfm9DA+jfDvnXulT195C4uSXpmCdw== +"@react-native/babel-plugin-codegen@0.78.0-nightly-20241210-6d235853f": + version "0.78.0-nightly-20241210-6d235853f" + resolved "https://registry.yarnpkg.com/@react-native/babel-plugin-codegen/-/babel-plugin-codegen-0.78.0-nightly-20241210-6d235853f.tgz#d91801ac06c0a12ea522899fcc40b52a0891755d" + integrity sha512-09asCuh1R9OwhltTua+FFFrGSusQS8Wf0QQPz/EK6j8wgz/cui6NQMIWZcPaAgqY8CT1+CbOmPkJShPx+PaMoQ== dependencies: "@babel/traverse" "^7.25.3" - "@react-native/codegen" "0.78.0-nightly-20241201-91e217ff5" + "@react-native/codegen" "0.78.0-nightly-20241210-6d235853f" "@react-native/babel-preset@0.77.0-nightly-20241001-223e98cc4": version "0.77.0-nightly-20241001-223e98cc4" @@ -2226,10 +2226,10 @@ babel-plugin-transform-flow-enums "^0.0.2" react-refresh "^0.14.0" -"@react-native/babel-preset@0.78.0-nightly-20241201-91e217ff5": - version "0.78.0-nightly-20241201-91e217ff5" - resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.78.0-nightly-20241201-91e217ff5.tgz#ed3e59b2e0dc9b13f8a05168fc18775f540eb5f7" - integrity sha512-u8BiS84tTQ1wgPY8MA2JE6L60Hp8FyRILNvfhz/d3fwRe86BYvrP/9oBaEUuLdX8K7VTYkpaJYkH+mTsnyu2dQ== +"@react-native/babel-preset@0.78.0-nightly-20241210-6d235853f": + version "0.78.0-nightly-20241210-6d235853f" + resolved "https://registry.yarnpkg.com/@react-native/babel-preset/-/babel-preset-0.78.0-nightly-20241210-6d235853f.tgz#2f962752edeb4d00390c97a0da30b469b58c7245" + integrity sha512-VKxlthp6H0VaNt/sIYLBtUF56EFnt1DqzGzuGPvLYHM+wylys5X2EF9ejY68IvewHVW2O1xIJi8cvajtA0bnVQ== dependencies: "@babel/core" "^7.25.2" "@babel/plugin-proposal-export-default-from" "^7.24.7" @@ -2272,7 +2272,7 @@ "@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.78.0-nightly-20241201-91e217ff5" + "@react-native/babel-plugin-codegen" "0.78.0-nightly-20241210-6d235853f" babel-plugin-syntax-hermes-parser "0.25.1" babel-plugin-transform-flow-enums "^0.0.2" react-refresh "^0.14.0" @@ -2303,10 +2303,10 @@ nullthrows "^1.1.1" yargs "^17.6.2" -"@react-native/codegen@0.78.0-nightly-20241201-91e217ff5": - version "0.78.0-nightly-20241201-91e217ff5" - resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.78.0-nightly-20241201-91e217ff5.tgz#571ebeedf471fbd45b1c4f6a2e10ef8489ec5108" - integrity sha512-gHG2pqtCM1yq6ew7pi6FMOFn1Ma1VQfAGYJ6pVajtcI+8Bhq8GGfZVRcsHfDiLgEpmPBwM0omV/8uYmrMiHqpA== +"@react-native/codegen@0.78.0-nightly-20241210-6d235853f": + version "0.78.0-nightly-20241210-6d235853f" + resolved "https://registry.yarnpkg.com/@react-native/codegen/-/codegen-0.78.0-nightly-20241210-6d235853f.tgz#a9d1b3ac1ec857955e176ad309a90bebd4c47acd" + integrity sha512-DL1j+5sYs+qM5BiP8rmTH6IVGJxE4uICn84038o71/fSTzk8RWifLZfMFiROJPRCz8s7fVHs6y0ocgOHc/7YZA== dependencies: "@babel/parser" "^7.25.3" glob "^7.1.1" @@ -2316,13 +2316,13 @@ nullthrows "^1.1.1" yargs "^17.6.2" -"@react-native/community-cli-plugin@0.78.0-nightly-20241201-91e217ff5": - version "0.78.0-nightly-20241201-91e217ff5" - resolved "https://registry.yarnpkg.com/@react-native/community-cli-plugin/-/community-cli-plugin-0.78.0-nightly-20241201-91e217ff5.tgz#4a600f48a23ce1d8041e3cf5978c3fe8d21f16ac" - integrity sha512-9d3zfTslM9E4ZKP94XTUe4tMTaRhxIqjCh+CSzd7/PN+2ktZgeCWko1gBgBIJUHOyUvTVmlDVaK5m91vsONCXg== +"@react-native/community-cli-plugin@0.78.0-nightly-20241210-6d235853f": + version "0.78.0-nightly-20241210-6d235853f" + resolved "https://registry.yarnpkg.com/@react-native/community-cli-plugin/-/community-cli-plugin-0.78.0-nightly-20241210-6d235853f.tgz#d504a223581d20785f85b10a346329dcf0458ee5" + integrity sha512-Otn1t9mJda5/ifUqHnpPPEp+V5CmTd8FL3Flil6uTKlHuKPmIYzig62pWab5Nd/RJk4bZ7wI2516/S/gm+GG1Q== dependencies: - "@react-native/dev-middleware" "0.78.0-nightly-20241201-91e217ff5" - "@react-native/metro-babel-transformer" "0.78.0-nightly-20241201-91e217ff5" + "@react-native/dev-middleware" "0.78.0-nightly-20241210-6d235853f" + "@react-native/metro-babel-transformer" "0.78.0-nightly-20241210-6d235853f" chalk "^4.0.0" debug "^2.2.0" invariant "^2.2.4" @@ -2332,18 +2332,18 @@ readline "^1.3.0" semver "^7.1.3" -"@react-native/debugger-frontend@0.78.0-nightly-20241201-91e217ff5": - version "0.78.0-nightly-20241201-91e217ff5" - resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.78.0-nightly-20241201-91e217ff5.tgz#6ce5e6e5692612938cbd0ca54593801852f43194" - integrity sha512-8Kd+AaXyb7iB1xZzbOeoZfsVwV7wa5sjHfjLuGTA0D7UDUlquXxnKkBKis0SnK3sSFoamXDiJb+ht5TGkqHKaw== +"@react-native/debugger-frontend@0.78.0-nightly-20241210-6d235853f": + version "0.78.0-nightly-20241210-6d235853f" + resolved "https://registry.yarnpkg.com/@react-native/debugger-frontend/-/debugger-frontend-0.78.0-nightly-20241210-6d235853f.tgz#0478fa04a272584e729fe0ecae4ea83450221d17" + integrity sha512-vH4zPS7+ahWua44CMxQ1x/DUHXIopfqwYH5vLk8ynVYooRY9y+eBXMmDLwJ+mt6q/k5ctv8rM/V5NvnDvznj4g== -"@react-native/dev-middleware@0.78.0-nightly-20241201-91e217ff5": - version "0.78.0-nightly-20241201-91e217ff5" - resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.78.0-nightly-20241201-91e217ff5.tgz#fd906cd98b537d5648451ccd092f537709b4025a" - integrity sha512-GjFV6RryBm5ZIGT9JatvsLXIpnXfYHunr+9Tz4tscT8nAusAHZ0rjGO3zTe9odgpilHBkAEFHiqHGR/MfCguDw== +"@react-native/dev-middleware@0.78.0-nightly-20241210-6d235853f": + version "0.78.0-nightly-20241210-6d235853f" + resolved "https://registry.yarnpkg.com/@react-native/dev-middleware/-/dev-middleware-0.78.0-nightly-20241210-6d235853f.tgz#e2b43062192344a6dba75693f6f25840500d89f7" + integrity sha512-bYXI+YIAwhZpDlv6JmhgrUFAux+rcnu0YHbBHqT/TmiyYvaln4d+ChgyndNAvXfZaDcXymi2cKocrXQHFZ0BSw== dependencies: "@isaacs/ttlcache" "^1.4.1" - "@react-native/debugger-frontend" "0.78.0-nightly-20241201-91e217ff5" + "@react-native/debugger-frontend" "0.78.0-nightly-20241210-6d235853f" chrome-launcher "^0.15.2" chromium-edge-launcher "^0.2.0" connect "^3.6.5" @@ -2377,10 +2377,10 @@ resolved "https://registry.yarnpkg.com/@react-native/eslint-plugin/-/eslint-plugin-0.77.0-nightly-20241001-223e98cc4.tgz#33aa61842c0933b4276ae340911484f2ad7900ed" integrity sha512-IMv29Jyh4z2sh6n2QB2XjgxHAJuGFfKVqvrxLSwzuOgJIbN7xCVIClIHVe2nX+6LxW5Wl4Zu+lgJpOjTN/vu+g== -"@react-native/gradle-plugin@0.78.0-nightly-20241201-91e217ff5": - version "0.78.0-nightly-20241201-91e217ff5" - resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.78.0-nightly-20241201-91e217ff5.tgz#9b36b4ba89b6af1d4d1b9a82e93a6d71451bc7ed" - integrity sha512-2rbQSoeX7ABLgxcUzx6U64+HSZr+uhJUwTPbsl3/5j3mvDFh5s0NhF4z8VTOP+LUybWpJiACFBF87K+uA8S2xQ== +"@react-native/gradle-plugin@0.78.0-nightly-20241210-6d235853f": + version "0.78.0-nightly-20241210-6d235853f" + resolved "https://registry.yarnpkg.com/@react-native/gradle-plugin/-/gradle-plugin-0.78.0-nightly-20241210-6d235853f.tgz#2a3219b1021f995d508c4d4c2ec748e930ec579e" + integrity sha512-bt4bj3f6jW/2VKxESRVJl4nQP/qodMMftdl3+76U123Ul+FeiZu/nQg2akw6BUePNxB7Fvigewr08gs4sNMmjQ== "@react-native/js-polyfills@0.77.0-nightly-20241001-223e98cc4": version "0.77.0-nightly-20241001-223e98cc4" @@ -2392,10 +2392,10 @@ resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.77.0-nightly-20241020-e7a3f479f.tgz#ebebed85d3791041699f10d40c00beb676b960ce" integrity sha512-Zj3LOOrrrfzZW8OnAcHGtEBGLkKc1gvhlMz/zSzDzhWlHH+EDCfTP6QcA/z8roTIKq1QkubDLEAiMOLe+koGsg== -"@react-native/js-polyfills@0.78.0-nightly-20241201-91e217ff5": - version "0.78.0-nightly-20241201-91e217ff5" - resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.78.0-nightly-20241201-91e217ff5.tgz#6728c665eb6353ec2d48beeb533880f40a926a37" - integrity sha512-O7NJW5LUh8sqyOgF7ciJ4iJYNdlMDJreZeeIZp7/p3A6/Dh37x068axemg2AROik/vUYwpZCCaIfsnrRDKIb7w== +"@react-native/js-polyfills@0.78.0-nightly-20241210-6d235853f": + version "0.78.0-nightly-20241210-6d235853f" + resolved "https://registry.yarnpkg.com/@react-native/js-polyfills/-/js-polyfills-0.78.0-nightly-20241210-6d235853f.tgz#1e480118bbd69bfe4f875629437886fe4a36dc89" + integrity sha512-JAYZGrULI8R6CC8jcJqu0VcqEUHUboModgxyd8fV172VwkdPNAxMt9YkzlycSxkYL2M7CJwkNZSIhTCNxP4qtA== "@react-native/metro-babel-transformer@0.77.0-nightly-20241001-223e98cc4": version "0.77.0-nightly-20241001-223e98cc4" @@ -2417,13 +2417,13 @@ hermes-parser "0.24.0" nullthrows "^1.1.1" -"@react-native/metro-babel-transformer@0.78.0-nightly-20241201-91e217ff5": - version "0.78.0-nightly-20241201-91e217ff5" - resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.78.0-nightly-20241201-91e217ff5.tgz#8b8a7e8cf3301ce2159ba070ca11bdb494e98a35" - integrity sha512-JmWwNxISz5+HSV5MuD6XfiE9RsnfjScSBIcnYWXmHRZBTw7yyKM0Pqb3j1p8RsDM+56utS3/mL/dRfl6vzs/Fw== +"@react-native/metro-babel-transformer@0.78.0-nightly-20241210-6d235853f": + version "0.78.0-nightly-20241210-6d235853f" + resolved "https://registry.yarnpkg.com/@react-native/metro-babel-transformer/-/metro-babel-transformer-0.78.0-nightly-20241210-6d235853f.tgz#be3fd059b057f8c363da6c6f9e0dc97e52a35966" + integrity sha512-AFQw5OEQSI529/jl7tLdyrZ45MzBL2CNpy2fg0pYX1Lz4LZiA58CiQFPwJxgl12lAu30jStX0aPlHCUU5aIg+Q== dependencies: "@babel/core" "^7.25.2" - "@react-native/babel-preset" "0.78.0-nightly-20241201-91e217ff5" + "@react-native/babel-preset" "0.78.0-nightly-20241210-6d235853f" hermes-parser "0.25.1" nullthrows "^1.1.1" @@ -2447,20 +2447,20 @@ metro-config "^0.81.0" metro-runtime "^0.81.0" -"@react-native/metro-config@0.78.0-nightly-20241201-91e217ff5": - version "0.78.0-nightly-20241201-91e217ff5" - resolved "https://registry.yarnpkg.com/@react-native/metro-config/-/metro-config-0.78.0-nightly-20241201-91e217ff5.tgz#07f70fbf76ff79152799bef27f14d06a171957e4" - integrity sha512-oUrVj1LLp4QugKb24f2mh2O2zEA/iIQ3jcwWRnaxz8pc1mEB79DFjZq/Z7S/70OISo8b1bsOtqXLJ9hZO6MvEw== +"@react-native/metro-config@0.78.0-nightly-20241210-6d235853f": + version "0.78.0-nightly-20241210-6d235853f" + resolved "https://registry.yarnpkg.com/@react-native/metro-config/-/metro-config-0.78.0-nightly-20241210-6d235853f.tgz#62b5be27e9bdf863a89c12217eba4600c8e5c612" + integrity sha512-fqnHdFU7AyWIoe2gSq489NYHYMDcVKuxog6HLWZXMpRJZTwp/7uBIYQlBmhzlJlF06+7DUygFkq0jSeVX5YGNg== dependencies: - "@react-native/js-polyfills" "0.78.0-nightly-20241201-91e217ff5" - "@react-native/metro-babel-transformer" "0.78.0-nightly-20241201-91e217ff5" + "@react-native/js-polyfills" "0.78.0-nightly-20241210-6d235853f" + "@react-native/metro-babel-transformer" "0.78.0-nightly-20241210-6d235853f" metro-config "^0.81.0" metro-runtime "^0.81.0" -"@react-native/normalize-colors@0.78.0-nightly-20241201-91e217ff5": - version "0.78.0-nightly-20241201-91e217ff5" - resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.78.0-nightly-20241201-91e217ff5.tgz#a05409f6c89544dbcf5a0e7c43cd3ded2c4b2a89" - integrity sha512-uXfF7dSjeZ8aChJM3kIjVLLAH9knmLbUWWqLjyVJyLZvhmWJAz93gnzb+BjDHvPg+EvHQSQs1t9D5wsDugsYgw== +"@react-native/normalize-colors@0.78.0-nightly-20241210-6d235853f": + version "0.78.0-nightly-20241210-6d235853f" + resolved "https://registry.yarnpkg.com/@react-native/normalize-colors/-/normalize-colors-0.78.0-nightly-20241210-6d235853f.tgz#d1b1855f1a8732b0227f4eab3e08737332c70200" + integrity sha512-v3DrGpbZnNBfWagJU17pUayffmhHLtuyEcVSL2DvEtndIQJvQLXopauyrHBUcXDODttAcUMkD/To717Zg2wWJQ== "@react-native/popup-menu-android@0.77.0-nightly-20241001-223e98cc4": version "0.77.0-nightly-20241001-223e98cc4" @@ -2469,10 +2469,10 @@ dependencies: nullthrows "^1.1.1" -"@react-native/virtualized-lists@0.78.0-nightly-20241201-91e217ff5": - version "0.78.0-nightly-20241201-91e217ff5" - resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.78.0-nightly-20241201-91e217ff5.tgz#34c58453cb395f2982dc66c595bdf756fb5dea28" - integrity sha512-gf35tZNNmBHRPQKNuYrPFj+QcO9q82u4ObzOiGLkY4+nBLHeCUS4fgMxku/Jx0krIQtQJnlqcPhlmLSA09F4gg== +"@react-native/virtualized-lists@0.78.0-nightly-20241210-6d235853f": + version "0.78.0-nightly-20241210-6d235853f" + resolved "https://registry.yarnpkg.com/@react-native/virtualized-lists/-/virtualized-lists-0.78.0-nightly-20241210-6d235853f.tgz#5d079ee4d73a46e1dedba818d7820848c98227da" + integrity sha512-7rBhl5GKxLqe4OSz/LPCZ+bnWJ8oT0InFCdZabhPyVWA80pzNjf6FsNmrRGBy3+9kBJI0F7NtEiENve8Odu7XQ== dependencies: invariant "^2.2.4" nullthrows "^1.1.1" @@ -8037,11 +8037,6 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg== -jsc-android@^250231.0.0: - version "250231.0.0" - resolved "https://registry.yarnpkg.com/jsc-android/-/jsc-android-250231.0.0.tgz#91720f8df382a108872fa4b3f558f33ba5e95262" - integrity sha512-rS46PvsjYmdmuz1OAWXY/1kCYG7pnf1TBqeTiOJr1iDz7s5DLxxC9n/ZMknLDxzYzNVfI7R95MH10emSSG1Wuw== - jsc-safe-url@^0.2.2: version "0.2.4" resolved "https://registry.yarnpkg.com/jsc-safe-url/-/jsc-safe-url-0.2.4.tgz#141c14fbb43791e88d5dc64e85a374575a83477a" @@ -10088,19 +10083,19 @@ react-native-xaml@^0.0.78: dependencies: "@types/react" "*" -react-native@0.78.0-nightly-20241201-91e217ff5: - version "0.78.0-nightly-20241201-91e217ff5" - resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.78.0-nightly-20241201-91e217ff5.tgz#2cf0bfead72fcdba8f45f308d88da68450128f6a" - integrity sha512-Hu+snUKEQGt088d+V0bgBqeGJ5XpkCB181ItRcaGSIHt+VJHFrWbE5QjzfZdAd079+lpEfyzVatL1/fIoQArQw== +react-native@0.78.0-nightly-20241210-6d235853f: + version "0.78.0-nightly-20241210-6d235853f" + resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.78.0-nightly-20241210-6d235853f.tgz#e57744b4964c4c71eea93a31550b9adfa54c5d91" + integrity sha512-Ha7K/BrvrenukrsGPpZngJFgaWt61bzxspTQkxtCFsz4SF16pKYHt5+PYpEiojEJzkXH8R1ns5bWr3wnFQuQHQ== dependencies: "@jest/create-cache-key-function" "^29.6.3" - "@react-native/assets-registry" "0.78.0-nightly-20241201-91e217ff5" - "@react-native/codegen" "0.78.0-nightly-20241201-91e217ff5" - "@react-native/community-cli-plugin" "0.78.0-nightly-20241201-91e217ff5" - "@react-native/gradle-plugin" "0.78.0-nightly-20241201-91e217ff5" - "@react-native/js-polyfills" "0.78.0-nightly-20241201-91e217ff5" - "@react-native/normalize-colors" "0.78.0-nightly-20241201-91e217ff5" - "@react-native/virtualized-lists" "0.78.0-nightly-20241201-91e217ff5" + "@react-native/assets-registry" "0.78.0-nightly-20241210-6d235853f" + "@react-native/codegen" "0.78.0-nightly-20241210-6d235853f" + "@react-native/community-cli-plugin" "0.78.0-nightly-20241210-6d235853f" + "@react-native/gradle-plugin" "0.78.0-nightly-20241210-6d235853f" + "@react-native/js-polyfills" "0.78.0-nightly-20241210-6d235853f" + "@react-native/normalize-colors" "0.78.0-nightly-20241210-6d235853f" + "@react-native/virtualized-lists" "0.78.0-nightly-20241210-6d235853f" abort-controller "^3.0.0" anser "^1.4.9" ansi-regex "^5.0.0" @@ -10114,7 +10109,6 @@ react-native@0.78.0-nightly-20241201-91e217ff5: glob "^7.1.1" invariant "^2.2.4" jest-environment-node "^29.6.3" - jsc-android "^250231.0.0" memoize-one "^5.0.0" metro-runtime "^0.81.0" metro-source-map "^0.81.0" From fc802706a82afdbb7762fa35e63e913a9d945e86 Mon Sep 17 00:00:00 2001 From: Chiara Mooney <34109996+chiaramooney@users.noreply.github.com> Date: Thu, 2 Jan 2025 13:19:59 -0800 Subject: [PATCH 2/5] Change files --- ...-native-win32-3ba47e36-878e-48d3-8013-b27450565d97.json | 7 +++++++ ...ation-channel-51dc9ea4-7c63-4224-a607-763b21375a11.json | 7 +++++++ ...ative-windows-24fcdda6-e835-4e12-bee8-5699ae6ca2af.json | 7 +++++++ 3 files changed, 21 insertions(+) create mode 100644 change/@office-iss-react-native-win32-3ba47e36-878e-48d3-8013-b27450565d97.json create mode 100644 change/@react-native-windows-automation-channel-51dc9ea4-7c63-4224-a607-763b21375a11.json create mode 100644 change/react-native-windows-24fcdda6-e835-4e12-bee8-5699ae6ca2af.json diff --git a/change/@office-iss-react-native-win32-3ba47e36-878e-48d3-8013-b27450565d97.json b/change/@office-iss-react-native-win32-3ba47e36-878e-48d3-8013-b27450565d97.json new file mode 100644 index 00000000000..2d15e324b95 --- /dev/null +++ b/change/@office-iss-react-native-win32-3ba47e36-878e-48d3-8013-b27450565d97.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Integrate 12/10", + "packageName": "@office-iss/react-native-win32", + "email": "34109996+chiaramooney@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/change/@react-native-windows-automation-channel-51dc9ea4-7c63-4224-a607-763b21375a11.json b/change/@react-native-windows-automation-channel-51dc9ea4-7c63-4224-a607-763b21375a11.json new file mode 100644 index 00000000000..4b48e5db805 --- /dev/null +++ b/change/@react-native-windows-automation-channel-51dc9ea4-7c63-4224-a607-763b21375a11.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Integrate 12/10", + "packageName": "@react-native-windows/automation-channel", + "email": "34109996+chiaramooney@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/change/react-native-windows-24fcdda6-e835-4e12-bee8-5699ae6ca2af.json b/change/react-native-windows-24fcdda6-e835-4e12-bee8-5699ae6ca2af.json new file mode 100644 index 00000000000..643720f7409 --- /dev/null +++ b/change/react-native-windows-24fcdda6-e835-4e12-bee8-5699ae6ca2af.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Integrate 12/10", + "packageName": "react-native-windows", + "email": "34109996+chiaramooney@users.noreply.github.com", + "dependentChangeType": "patch" +} From a47ed451a6120b5a7a74e6d9e24cf222fc4e2a54 Mon Sep 17 00:00:00 2001 From: Chiara Mooney <34109996+chiaramooney@users.noreply.github.com> Date: Thu, 2 Jan 2025 14:04:26 -0800 Subject: [PATCH 3/5] Disable Test Case --- .../TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp index f56fb89e589..520d84aeba4 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp @@ -1611,6 +1611,8 @@ TEST_P(JSITest, UTF16Test) { } Windows] */ +/* +[Windows TEST_P(JSITest, GetStringDataTest) { // This Runtime Decorator is used to test the default getStringData // implementation for VMs that do not provide their own implementation @@ -1639,6 +1641,7 @@ TEST_P(JSITest, GetStringDataTest) { str.getStringData(rd, cb); EXPECT_EQ(buf, str.utf16(rd)); } +Windows] */ INSTANTIATE_TEST_CASE_P( Runtimes, From 5d8ea827e44febd02f36711b3c7f4b6c45b82746 Mon Sep 17 00:00:00 2001 From: Chiara Mooney <34109996+chiaramooney@users.noreply.github.com> Date: Fri, 3 Jan 2025 12:09:03 -0800 Subject: [PATCH 4/5] Fix TextInput --- .../WindowsTextInputComponentDescriptor.h | 5 +- .../WindowsTextInputComponentView.cpp | 6 +- .../TextInput/WindowsTextInputShadowNode.cpp | 2 +- .../TextInput/WindowsTextInputShadowNode.h | 2 +- .../TextInput/WindowsTextInputState.cpp | 34 --------- .../TextInput/WindowsTextInputState.h | 71 ------------------- vnext/Shared/Shared.vcxitems | 4 -- vnext/Shared/Shared.vcxitems.filters | 6 -- vnext/overrides.json | 12 ---- 9 files changed, 8 insertions(+), 134 deletions(-) delete mode 100644 vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp delete mode 100644 vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h index a39dcdd9c9c..8a5c5ec6b00 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h @@ -61,7 +61,8 @@ virtual State::Shared createInitialState( } return std::make_shared( - std::make_shared(TextInputState({}, {}, {}, 0)), + std::make_shared(AndroidTextInputState( + 0, {}, {}, {}, theme.start, theme.end, theme.top, theme.bottom)), family); } */ @@ -162,4 +163,4 @@ virtual State::Shared createInitialState( mutable std::unordered_map surfaceIdToThemePaddingMap_; }; -} // namespace facebook::react +} // namespace facebook::react \ No newline at end of file diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp index 85d08542b0e..489723635ed 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include @@ -18,7 +19,6 @@ #include "../RootComponentView.h" #include "JSValueReader.h" #include "WindowsTextInputShadowNode.h" -#include "WindowsTextInputState.h" #include "guid/msoGuid.h" #include @@ -1133,7 +1133,7 @@ void WindowsTextInputComponentView::OnTextUpdated() noexcept { // auto newAttributedString = getAttributedString(); // if (data.attributedString == newAttributedString) // return; - data.reactTreeAttributedString = getAttributedString(); // CHECK + data.attributedStringBox = facebook::react::AttributedStringBox(getAttributedString()); data.mostRecentEventCount = m_nativeEventCount; m_state->updateState(std::move(data)); @@ -1525,4 +1525,4 @@ void WindowsTextInputComponentView::autoCapitalizeOnUpdateProps( } } -} // namespace winrt::Microsoft::ReactNative::Composition::implementation +} // namespace winrt::Microsoft::ReactNative::Composition::implementation \ No newline at end of file diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp index 783cf6b09cf..83754b4ef7b 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp @@ -188,4 +188,4 @@ void WindowsTextInputShadowNode::layout(LayoutContext layoutContext) { ConcreteViewShadowNode::layout(layoutContext); } -} // namespace facebook::react +} // namespace facebook::react \ No newline at end of file diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h index ce0c798dbaf..5ef40cc2f55 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h @@ -70,4 +70,4 @@ class WindowsTextInputShadowNode final : public ConcreteViewShadowNode< SharedTextLayoutManager m_textLayoutManager; }; -} // namespace facebook::react +} // namespace facebook::react \ No newline at end of file diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp deleted file mode 100644 index 77d89ae820d..00000000000 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +++ /dev/null @@ -1,34 +0,0 @@ - -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -#include "WindowsTextInputState.h" - -#include -#include -#include -#include - -#include - -namespace facebook::react { - -WindowsTextInputState::WindowsTextInputState( - int64_t mostRecentEventCount, - AttributedString attributedString, - AttributedString reactTreeAttributedString, - ParagraphAttributes paragraphAttributes, - double defaultThemePaddingStart, - double defaultThemePaddingEnd, - double defaultThemePaddingTop, - double defaultThemePaddingBottom) - : mostRecentEventCount(mostRecentEventCount), - attributedString(std::move(attributedString)), - reactTreeAttributedString(std::move(reactTreeAttributedString)), - paragraphAttributes(std::move(paragraphAttributes)), - defaultThemePaddingStart(defaultThemePaddingStart), - defaultThemePaddingEnd(defaultThemePaddingEnd), - defaultThemePaddingTop(defaultThemePaddingTop), - defaultThemePaddingBottom(defaultThemePaddingBottom) {} - -} // namespace facebook::react diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h deleted file mode 100644 index 0e8cd188df1..00000000000 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h +++ /dev/null @@ -1,71 +0,0 @@ -// Copyright (c) Microsoft Corporation. -// Licensed under the MIT License. - -#pragma once - -#include -#include -#include -#include -#include -#include - -namespace facebook::react { - -/* - * State for component. - */ -class WindowsTextInputState final { - public: - int64_t mostRecentEventCount{0}; - - /** - * Stores an opaque cache ID used on the Java side to refer to a specific - * AttributedString for measurement purposes only. - */ - int64_t cachedAttributedStringId{0}; - - /* - * All content of component represented as an `AttributedString`. - * Only set if changed from the React tree's perspective. - */ - AttributedString attributedString{}; - - /* - * All content of component represented as an `AttributedString`. - * This stores the previous computed *from the React tree*. This usually - * doesn't change as the TextInput contents are being updated. If it does - * change, we need to wipe out current contents of the TextInput and replace - * with the new value from the tree. - */ - AttributedString reactTreeAttributedString{}; - - /* - * Represents all visual attributes of a paragraph of text represented as - * a ParagraphAttributes. - */ - ParagraphAttributes paragraphAttributes{}; - - /** - * Communicates Android theme padding back to the ShadowNode / Component - * Descriptor for layout. - */ - double defaultThemePaddingStart{NAN}; - double defaultThemePaddingEnd{NAN}; - double defaultThemePaddingTop{NAN}; - double defaultThemePaddingBottom{NAN}; - - WindowsTextInputState( - int64_t mostRecentEventCount, - AttributedString attributedString, - AttributedString reactTreeAttributedString, - ParagraphAttributes paragraphAttributes, - double defaultThemePaddingStart, - double defaultThemePaddingEnd, - double defaultThemePaddingTop, - double defaultThemePaddingBottom); - - WindowsTextInputState() = default; -}; - -} // namespace facebook::react diff --git a/vnext/Shared/Shared.vcxitems b/vnext/Shared/Shared.vcxitems index f65cd37c06d..2695bd12fbc 100644 --- a/vnext/Shared/Shared.vcxitems +++ b/vnext/Shared/Shared.vcxitems @@ -141,9 +141,6 @@ true - - true - true $(ReactNativeWindowsDir)Microsoft.ReactNative\Theme.idl @@ -324,7 +321,6 @@ - diff --git a/vnext/Shared/Shared.vcxitems.filters b/vnext/Shared/Shared.vcxitems.filters index a563dd848cd..5cc7bafe2ba 100644 --- a/vnext/Shared/Shared.vcxitems.filters +++ b/vnext/Shared/Shared.vcxitems.filters @@ -203,9 +203,6 @@ Source Files\Fabric\Composition\TextInput - - Source Files\Fabric\Composition\TextInput - Source Files\Fabric\Composition @@ -759,9 +756,6 @@ Header Files\Fabric\Composition\TextInput - - Header Files\Fabric\Composition\TextInput - Header Files\Fabric\Composition diff --git a/vnext/overrides.json b/vnext/overrides.json index 7ea10a37365..69d7b39814c 100644 --- a/vnext/overrides.json +++ b/vnext/overrides.json @@ -52,18 +52,6 @@ "baseFile": "packages/react-native/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h", "baseHash": "7c3e8d6647779eade9ebfe57f62f00f72ba0dfb0" }, - { - "type": "derived", - "file": "Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp", - "baseFile": "packages/react-native/ReactCommon/react/renderer/components/textinput/TextInputState.cpp", - "baseHash": "b6d55e3e9c4071abf7ba0601f3688d3886621fb4" - }, - { - "type": "derived", - "file": "Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h", - "baseFile": "packages/react-native/ReactCommon/react/renderer/components/textinput/TextInputState.h", - "baseHash": "44d97403ef1124a493ac799a03077c0297f7be3f" - }, { "type": "derived", "file": "Microsoft.ReactNative/Fabric/ImageRequest.cpp", From 9f928f198421ee11ff86c857b1af9bb85b657265 Mon Sep 17 00:00:00 2001 From: Chiara Mooney <34109996+chiaramooney@users.noreply.github.com> Date: Fri, 3 Jan 2025 13:52:04 -0800 Subject: [PATCH 5/5] Fix Snapshots --- .../ImageComponentTest.test.ts.snap | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/packages/e2e-test-app-fabric/test/__snapshots__/ImageComponentTest.test.ts.snap b/packages/e2e-test-app-fabric/test/__snapshots__/ImageComponentTest.test.ts.snap index 7526823f515..a29f9757651 100644 --- a/packages/e2e-test-app-fabric/test/__snapshots__/ImageComponentTest.test.ts.snap +++ b/packages/e2e-test-app-fabric/test/__snapshots__/ImageComponentTest.test.ts.snap @@ -598,12 +598,12 @@ exports[`Image Tests An Image can be nested inside of a component 1`] = ` }, { "Offset": "12, 20, 0", - "Size": "52, 19", + "Size": "52, 20", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "52, 19", + "Size": "52, 20", "Visual Type": "SpriteVisual", }, ], @@ -1428,12 +1428,12 @@ exports[`Image Tests An Image can have a tint color 1`] = ` }, { "Offset": "0, 29, 0", - "Size": "916, 19", + "Size": "916, 20", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "916, 19", + "Size": "916, 20", "Visual Type": "SpriteVisual", }, ], @@ -1488,12 +1488,12 @@ exports[`Image Tests An Image can have a tint color 1`] = ` }, { "Offset": "0, 82, 0", - "Size": "916, 20", + "Size": "916, 19", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "916, 20", + "Size": "916, 19", "Visual Type": "SpriteVisual", }, ], @@ -2425,12 +2425,12 @@ exports[`Image Tests An Image customized how it is rendered within the frame usi "__Children": [ { "Offset": "0, 0, 0", - "Size": "90, 16", + "Size": "90, 15", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "90, 16", + "Size": "90, 15", "Visual Type": "SpriteVisual", }, ], @@ -2491,12 +2491,12 @@ exports[`Image Tests An Image customized how it is rendered within the frame usi }, { "Offset": "100, 0, 0", - "Size": "90, 16", + "Size": "90, 15", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "90, 16", + "Size": "90, 15", "Visual Type": "SpriteVisual", }, ], @@ -2689,12 +2689,12 @@ exports[`Image Tests An Image customized how it is rendered within the frame usi }, { "Offset": "0, 155, 0", - "Size": "90, 15", + "Size": "90, 16", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "90, 15", + "Size": "90, 16", "Visual Type": "SpriteVisual", }, ], @@ -2755,12 +2755,12 @@ exports[`Image Tests An Image customized how it is rendered within the frame usi }, { "Offset": "0, 233, 0", - "Size": "90, 16", + "Size": "90, 15", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "90, 16", + "Size": "90, 15", "Visual Type": "SpriteVisual", }, ], @@ -2821,12 +2821,12 @@ exports[`Image Tests An Image customized how it is rendered within the frame usi }, { "Offset": "100, 233, 0", - "Size": "90, 16", + "Size": "90, 15", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "90, 16", + "Size": "90, 15", "Visual Type": "SpriteVisual", }, ], @@ -3019,12 +3019,12 @@ exports[`Image Tests An Image customized how it is rendered within the frame usi }, { "Offset": "0, 388, 0", - "Size": "90, 15", + "Size": "90, 16", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "90, 15", + "Size": "90, 16", "Visual Type": "SpriteVisual", }, ], @@ -3450,7 +3450,7 @@ exports[`Image Tests Images have multiple resize modes 1`] = ` "Visual Tree": { "Comment": "image-resize-mode", "Offset": "0, 0, 0", - "Size": "916, 465", + "Size": "916, 466", "Visual Type": "SpriteVisual", "__Children": [ { @@ -3587,12 +3587,12 @@ exports[`Image Tests Images have multiple resize modes 1`] = ` }, { "Offset": "0, 78, 0", - "Size": "90, 15", + "Size": "90, 16", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "90, 15", + "Size": "90, 16", "Visual Type": "SpriteVisual", }, ], @@ -3653,12 +3653,12 @@ exports[`Image Tests Images have multiple resize modes 1`] = ` }, { "Offset": "100, 78, 0", - "Size": "90, 15", + "Size": "90, 16", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "90, 15", + "Size": "90, 16", "Visual Type": "SpriteVisual", }, ], @@ -3719,12 +3719,12 @@ exports[`Image Tests Images have multiple resize modes 1`] = ` }, { "Offset": "200, 78, 0", - "Size": "90, 15", + "Size": "90, 16", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "90, 15", + "Size": "90, 16", "Visual Type": "SpriteVisual", }, ], @@ -3785,12 +3785,12 @@ exports[`Image Tests Images have multiple resize modes 1`] = ` }, { "Offset": "0, 155, 0", - "Size": "90, 16", + "Size": "90, 15", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "90, 16", + "Size": "90, 15", "Visual Type": "SpriteVisual", }, ], @@ -3983,12 +3983,12 @@ exports[`Image Tests Images have multiple resize modes 1`] = ` }, { "Offset": "0, 311, 0", - "Size": "90, 15", + "Size": "90, 16", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "90, 15", + "Size": "90, 16", "Visual Type": "SpriteVisual", }, ], @@ -4049,12 +4049,12 @@ exports[`Image Tests Images have multiple resize modes 1`] = ` }, { "Offset": "100, 311, 0", - "Size": "90, 15", + "Size": "90, 16", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "90, 15", + "Size": "90, 16", "Visual Type": "SpriteVisual", }, ], @@ -4115,12 +4115,12 @@ exports[`Image Tests Images have multiple resize modes 1`] = ` }, { "Offset": "200, 311, 0", - "Size": "90, 15", + "Size": "90, 16", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "90, 15", + "Size": "90, 16", "Visual Type": "SpriteVisual", }, ], @@ -4181,12 +4181,12 @@ exports[`Image Tests Images have multiple resize modes 1`] = ` }, { "Offset": "0, 388, 0", - "Size": "90, 16", + "Size": "90, 15", "Visual Type": "SpriteVisual", "__Children": [ { "Offset": "0, 0, 0", - "Size": "90, 16", + "Size": "90, 15", "Visual Type": "SpriteVisual", }, ],