diff --git a/change/@office-iss-react-native-win32-83c16855-8b70-49d9-b92c-8b97d00d9113.json b/change/@office-iss-react-native-win32-83c16855-8b70-49d9-b92c-8b97d00d9113.json new file mode 100644 index 00000000000..14acc70cdde --- /dev/null +++ b/change/@office-iss-react-native-win32-83c16855-8b70-49d9-b92c-8b97d00d9113.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Integrate 9/25", + "packageName": "@office-iss/react-native-win32", + "email": "yajurgrover24@gmail.com", + "dependentChangeType": "patch" +} diff --git a/change/@react-native-windows-automation-channel-c5f4027a-1349-40ce-a71d-66953f7e3bcf.json b/change/@react-native-windows-automation-channel-c5f4027a-1349-40ce-a71d-66953f7e3bcf.json new file mode 100644 index 00000000000..2e998b8c2ca --- /dev/null +++ b/change/@react-native-windows-automation-channel-c5f4027a-1349-40ce-a71d-66953f7e3bcf.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Integrate 9/25", + "packageName": "@react-native-windows/automation-channel", + "email": "yajurgrover24@gmail.com", + "dependentChangeType": "patch" +} diff --git a/change/react-native-windows-651197b4-818e-4844-9f9c-2d6d77d6e427.json b/change/react-native-windows-651197b4-818e-4844-9f9c-2d6d77d6e427.json new file mode 100644 index 00000000000..8be9751c1ff --- /dev/null +++ b/change/react-native-windows-651197b4-818e-4844-9f9c-2d6d77d6e427.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Integrate 9/25", + "packageName": "react-native-windows", + "email": "yajurgrover24@gmail.com", + "dependentChangeType": "patch" +} diff --git a/packages/@office-iss/react-native-win32-tester/overrides.json b/packages/@office-iss/react-native-win32-tester/overrides.json index 45665e8273c..b174bcf32fe 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.73.0-nightly-20230920-630cf3b21", + "baseVersion": "0.73.0-nightly-20230925-2de964cfd", "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 099e71b3a91..c6c9425801c 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.217", "react": "18.0.0", - "react-native": "0.73.0-nightly-20230920-630cf3b21" + "react-native": "0.73.0-nightly-20230925-2de964cfd" }, "devDependencies": { "@office-iss/react-native-win32": "^0.0.0-canary.217", @@ -30,7 +30,7 @@ "@types/node": "^18.0.0", "eslint": "^8.19.0", "just-scripts": "^1.3.3", - "react-native": "0.73.0-nightly-20230920-630cf3b21", + "react-native": "0.73.0-nightly-20230925-2de964cfd", "react-native-platform-override": "^1.9.15", "typescript": "^4.9.5" }, diff --git a/packages/@office-iss/react-native-win32/.flowconfig b/packages/@office-iss/react-native-win32/.flowconfig index d5ffc7fee96..ca78a1edfc8 100644 --- a/packages/@office-iss/react-native-win32/.flowconfig +++ b/packages/@office-iss/react-native-win32/.flowconfig @@ -146,4 +146,4 @@ untyped-import untyped-type-import [version] -^0.216.1 +^0.217.0 diff --git a/packages/@office-iss/react-native-win32/overrides.json b/packages/@office-iss/react-native-win32/overrides.json index f558f967b35..40a050b42c3 100644 --- a/packages/@office-iss/react-native-win32/overrides.json +++ b/packages/@office-iss/react-native-win32/overrides.json @@ -7,13 +7,13 @@ "**/__snapshots__/**", "src/rntypes/**" ], - "baseVersion": "0.73.0-nightly-20230920-630cf3b21", + "baseVersion": "0.73.0-nightly-20230925-2de964cfd", "overrides": [ { "type": "derived", "file": ".flowconfig", "baseFile": ".flowconfig", - "baseHash": "df2115e026fe77aef6f344f7523b09dd83be5626" + "baseHash": "fd2609719419d6fd262c1e7f993eb566ad2444f6" }, { "type": "derived", @@ -101,7 +101,7 @@ "type": "derived", "file": "src/Libraries/Components/ScrollView/ScrollView.win32.js", "baseFile": "packages/react-native/Libraries/Components/ScrollView/ScrollView.js", - "baseHash": "1254528d4082b82fe26d147676b812940bff63ac" + "baseHash": "87a276aff215fedb38d7ced5d9aef61224ebe0c2" }, { "type": "platform", @@ -119,7 +119,7 @@ "type": "derived", "file": "src/Libraries/Components/TextInput/TextInput.win32.js", "baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.js", - "baseHash": "b3075e093f75337144dc7e54194d9d01d4a82aa1" + "baseHash": "4e2811777a14ba8f87dc0a36ca11fcf390bd8def" }, { "type": "patch", @@ -183,7 +183,7 @@ "type": "patch", "file": "src/Libraries/Components/View/View.win32.js", "baseFile": "packages/react-native/Libraries/Components/View/View.js", - "baseHash": "f6813acaf2043e39f0d57fa9f667c5bbb5202daa" + "baseHash": "f25ca9bd8f25d1dd05d98d40946a41b19fac87f1" }, { "type": "derived", @@ -241,7 +241,7 @@ "type": "derived", "file": "src/Libraries/Image/Image.win32.js", "baseFile": "packages/react-native/Libraries/Image/Image.ios.js", - "baseHash": "69dca1ad9864b7f2468e8f6026203cb98332c690", + "baseHash": "ead4aaa048a5ae0186d3f8ade054b970a2115a3a", "issue": 4320 }, { @@ -423,13 +423,13 @@ "type": "patch", "file": "src/Libraries/StyleSheet/StyleSheet.win32.js", "baseFile": "packages/react-native/Libraries/StyleSheet/StyleSheet.js", - "baseHash": "e28351df47b41e47fce71a2a5850f70bd337b78f" + "baseHash": "e73098e3a22f8f74328e0a9f387839bb03322bb6" }, { "type": "derived", "file": "src/Libraries/Text/Text.win32.js", "baseFile": "packages/react-native/Libraries/Text/Text.js", - "baseHash": "f56a969c163de4f20bcdefaa42792f31c3497888" + "baseHash": "02a8ebee89958ab16c6014c2fe1d5b6253113918" }, { "type": "derived", diff --git a/packages/@office-iss/react-native-win32/package.json b/packages/@office-iss/react-native-win32/package.json index bce76908ee3..3ec6d10e5d5 100644 --- a/packages/@office-iss/react-native-win32/package.json +++ b/packages/@office-iss/react-native-win32/package.json @@ -26,18 +26,18 @@ "dependencies": { "@babel/runtime": "^7.0.0", "@jest/create-cache-key-function": "^29.6.3", - "@react-native-community/cli": "12.0.0-alpha.12", - "@react-native-community/cli-platform-android": "12.0.0-alpha.12", - "@react-native-community/cli-platform-ios": "12.0.0-alpha.12", + "@react-native-community/cli": "12.0.0-alpha.15", + "@react-native-community/cli-platform-android": "12.0.0-alpha.15", + "@react-native-community/cli-platform-ios": "12.0.0-alpha.15", "@react-native/assets": "1.0.0", - "@react-native/assets-registry": "0.73.0-nightly-20230622-0201e51bb", - "@react-native/codegen": "0.73.0-nightly-20230918-1ac3dab6e", - "@react-native/community-cli-plugin": "^0.73.0", - "@react-native/gradle-plugin": "0.73.0-nightly-20230918-1ac3dab6e", - "@react-native/js-polyfills": "0.73.0-nightly-20230622-0201e51bb", + "@react-native/assets-registry": "0.73.0-nightly-20230925-2de964cfd", + "@react-native/codegen": "0.73.0-nightly-20230925-2de964cfd", + "@react-native/community-cli-plugin": "0.73.0-nightly-20230925-2de964cfd", + "@react-native/gradle-plugin": "0.73.0-nightly-20230925-2de964cfd", + "@react-native/js-polyfills": "0.73.0-nightly-20230925-2de964cfd", "@react-native/metro-config": "^0.73.0", - "@react-native/normalize-colors": "0.73.0-nightly-20230622-0201e51bb", - "@react-native/virtualized-lists": "0.73.0-nightly-20230912-0e5ea2890", + "@react-native/normalize-colors": "0.73.0-nightly-20230925-2de964cfd", + "@react-native/virtualized-lists": "0.73.0-nightly-20230925-2de964cfd", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", @@ -58,7 +58,7 @@ "promise": "^8.3.0", "react-clone-referenced-element": "^1.0.1", "react-devtools-core": "^4.27.7", - "react-refresh": "^0.4.0", + "react-refresh": "^0.14.0", "react-shallow-renderer": "^16.15.0", "regenerator-runtime": "^0.13.2", "scheduler": "0.24.0-canary-efb381bbf-20230505", @@ -85,13 +85,13 @@ "just-scripts": "^1.3.3", "prettier": "^2.4.1", "react": "18.2.0", - "react-native": "0.73.0-nightly-20230920-630cf3b21", + "react-native": "0.73.0-nightly-20230925-2de964cfd", "react-native-platform-override": "^1.9.15", "typescript": "^4.9.5" }, "peerDependencies": { "react": "18.2.0", - "react-native": "0.73.0-nightly-20230920-630cf3b21" + "react-native": "0.73.0-nightly-20230925-2de964cfd" }, "beachball": { "defaultNpmTag": "canary", diff --git a/packages/@office-iss/react-native-win32/src/Libraries/Components/ScrollView/ScrollView.win32.js b/packages/@office-iss/react-native-win32/src/Libraries/Components/ScrollView/ScrollView.win32.js index bbcd62726e8..512d521ea74 100644 --- a/packages/@office-iss/react-native-win32/src/Libraries/Components/ScrollView/ScrollView.win32.js +++ b/packages/@office-iss/react-native-win32/src/Libraries/Components/ScrollView/ScrollView.win32.js @@ -1665,6 +1665,7 @@ class ScrollView extends React.Component { // $FlowFixMe[underconstrained-implicit-instantiation] const style = flattenStyle(this.props.style); const childLayoutProps = ['alignItems', 'justifyContent'].filter( + // $FlowFixMe[incompatible-use] prop => style && style[prop] !== undefined, ); invariant( @@ -1837,6 +1838,7 @@ class ScrollView extends React.Component { // Note: we should split props.style on the inner and outer props // however, the ScrollView still needs the baseStyle to be scrollable // $FlowFixMe[underconstrained-implicit-instantiation] + // $FlowFixMe[incompatible-call] const {outer, inner} = splitLayoutProps(flattenStyle(props.style)); return React.cloneElement( refreshControl, @@ -1924,6 +1926,7 @@ function Wrapper(props, ref: (mixed => mixed) | {current: mixed, ...}) { return ; } Wrapper.displayName = 'ScrollView'; +// $FlowFixMe[incompatible-call] const ForwardedScrollView = React.forwardRef(Wrapper); // $FlowFixMe[prop-missing] Add static context to ForwardedScrollView diff --git a/packages/@office-iss/react-native-win32/src/Libraries/Components/TextInput/TextInput.win32.js b/packages/@office-iss/react-native-win32/src/Libraries/Components/TextInput/TextInput.win32.js index c2c9658804f..a1777ea8739 100644 --- a/packages/@office-iss/react-native-win32/src/Libraries/Components/TextInput/TextInput.win32.js +++ b/packages/@office-iss/react-native-win32/src/Libraries/Components/TextInput/TextInput.win32.js @@ -1777,6 +1777,7 @@ const autoCompleteWebToTextContentTypeMap = { const ExportedForwardRef: React.AbstractComponent< React.ElementConfig, TextInputInstance, + // $FlowFixMe[incompatible-call] > = React.forwardRef(function TextInput( { allowFontScaling = true, @@ -1799,8 +1800,13 @@ const ExportedForwardRef: React.AbstractComponent< let style = flattenStyle(restProps.style); if (style?.verticalAlign != null) { + // $FlowFixMe[prop-missing] + // $FlowFixMe[cannot-write] style.textAlignVertical = + // $FlowFixMe[invalid-computed-prop] verticalAlignToTextAlignVerticalMap[style.verticalAlign]; + // $FlowFixMe[prop-missing] + // $FlowFixMe[cannot-write] delete style.verticalAlign; } diff --git a/packages/@office-iss/react-native-win32/src/Libraries/Components/View/View.win32.js b/packages/@office-iss/react-native-win32/src/Libraries/Components/View/View.win32.js index 35d5545374d..88c9579c45d 100644 --- a/packages/@office-iss/react-native-win32/src/Libraries/Components/View/View.win32.js +++ b/packages/@office-iss/react-native-win32/src/Libraries/Components/View/View.win32.js @@ -122,6 +122,7 @@ const View: React.AbstractComponent< // $FlowFixMe[underconstrained-implicit-instantiation] let style = flattenStyle(otherProps.style); + // $FlowFixMe[sketchy-null-mixed] const newPointerEvents = style?.pointerEvents || pointerEvents; const collapsableOverride = ReactNativeFeatureFlags.shouldForceUnflattenForElevation() @@ -252,6 +253,7 @@ const View: React.AbstractComponent< } nativeID={id ?? nativeID} style={style} + // $FlowFixMe[incompatible-type] pointerEvents={newPointerEvents} ref={forwardedRef} onKeyDown={_keyDown} diff --git a/packages/@office-iss/react-native-win32/src/Libraries/Image/Image.win32.js b/packages/@office-iss/react-native-win32/src/Libraries/Image/Image.win32.js index c7d0a5c307e..60e7da6cc81 100644 --- a/packages/@office-iss/react-native-win32/src/Libraries/Image/Image.win32.js +++ b/packages/@office-iss/react-native-win32/src/Libraries/Image/Image.win32.js @@ -156,7 +156,8 @@ const BaseImage = (props: ImagePropsType, forwardedRef) => { const objectFit = // $FlowFixMe[prop-missing] style && style.objectFit - ? convertObjectFitToResizeMode(style.objectFit) + ? // $FlowFixMe[incompatible-call] + convertObjectFitToResizeMode(style.objectFit) : null; const resizeMode = // $FlowFixMe[prop-missing] @@ -210,12 +211,13 @@ const BaseImage = (props: ImagePropsType, forwardedRef) => { {analyticTag => { return ( (obj: S): $ReadOnly { // TODO: This should return S as the return type. But first, // we need to codemod all the callsites that are typing this diff --git a/packages/@office-iss/react-native-win32/src/Libraries/Text/Text.win32.js b/packages/@office-iss/react-native-win32/src/Libraries/Text/Text.win32.js index d45b3e3a4e7..a6c7319e859 100644 --- a/packages/@office-iss/react-native-win32/src/Libraries/Text/Text.win32.js +++ b/packages/@office-iss/react-native-win32/src/Libraries/Text/Text.win32.js @@ -233,18 +233,28 @@ const Text: React.AbstractComponent< style = flattenStyle(style); if (typeof style?.fontWeight === 'number') { + // $FlowFixMe[prop-missing] + // $FlowFixMe[cannot-write] style.fontWeight = style?.fontWeight.toString(); } let _selectable = restProps.selectable; if (style?.userSelect != null) { + // $FlowFixMe[invalid-computed-prop] _selectable = userSelectToSelectableMap[style.userSelect]; + // $FlowFixMe[prop-missing] + // $FlowFixMe[cannot-write] delete style.userSelect; } if (style?.verticalAlign != null) { + // $FlowFixMe[prop-missing] + // $FlowFixMe[cannot-write] style.textAlignVertical = + // $FlowFixMe[invalid-computed-prop] verticalAlignToTextAlignVerticalMap[style.verticalAlign]; + // $FlowFixMe[prop-missing] + // $FlowFixMe[cannot-write] delete style.verticalAlign; } diff --git a/packages/@react-native-windows/automation-channel/package.json b/packages/@react-native-windows/automation-channel/package.json index 4fa0c7abdfa..61b956fae38 100644 --- a/packages/@react-native-windows/automation-channel/package.json +++ b/packages/@react-native-windows/automation-channel/package.json @@ -31,7 +31,7 @@ "just-scripts": "^1.3.2", "prettier": "^2.4.1", "react": "18.2.0", - "react-native": "0.73.0-nightly-20230920-630cf3b21", + "react-native": "0.73.0-nightly-20230925-2de964cfd", "react-native-windows": "^0.0.0-canary.716", "typescript": "^4.9.5" }, diff --git a/packages/@react-native-windows/tester/overrides.json b/packages/@react-native-windows/tester/overrides.json index aaa77e8a14f..4f409057f68 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.73.0-nightly-20230920-630cf3b21", + "baseVersion": "0.73.0-nightly-20230925-2de964cfd", "overrides": [ { "type": "patch", diff --git a/packages/@react-native-windows/tester/package.json b/packages/@react-native-windows/tester/package.json index 4d4ce448819..22b86ac4e14 100644 --- a/packages/@react-native-windows/tester/package.json +++ b/packages/@react-native-windows/tester/package.json @@ -18,7 +18,7 @@ "peerDependencies": { "@react-native-picker/picker": "2.4.10", "react": "18.0.0", - "react-native": "0.73.0-nightly-20230920-630cf3b21", + "react-native": "0.73.0-nightly-20230925-2de964cfd", "react-native-windows": "^0.0.0-canary.716", "react-native-xaml": "^0.0.50" }, @@ -31,7 +31,7 @@ "@types/node": "^18.0.0", "eslint": "^8.19.0", "just-scripts": "^1.3.3", - "react-native": "0.73.0-nightly-20230920-630cf3b21", + "react-native": "0.73.0-nightly-20230925-2de964cfd", "react-native-platform-override": "^1.9.15", "react-native-windows": "^0.0.0-canary.716", "typescript": "^4.9.5" diff --git a/packages/@react-native/monorepo/overrides.json b/packages/@react-native/monorepo/overrides.json index 6f0770fd15d..4d9ae676d58 100644 --- a/packages/@react-native/monorepo/overrides.json +++ b/packages/@react-native/monorepo/overrides.json @@ -1,11 +1,11 @@ { - "baseVersion": "0.73.0-nightly-20230920-630cf3b21", + "baseVersion": "0.73.0-nightly-20230925-2de964cfd", "overrides": [ { "type": "patch", "file": "package.json", "baseFile": "package.json", - "baseHash": "af476573ff9850102d77fc10617129d0d1a96315" + "baseHash": "a110b5f1bcfdf1f6fd31230a44a7f6d4dcb3a6a7" } ] } \ No newline at end of file diff --git a/packages/@react-native/monorepo/package.json b/packages/@react-native/monorepo/package.json index 667444057cc..5ff1ba2abf9 100644 --- a/packages/@react-native/monorepo/package.json +++ b/packages/@react-native/monorepo/package.json @@ -81,7 +81,7 @@ "eslint-plugin-redundant-undefined": "^0.4.0", "eslint-plugin-relay": "^1.8.3", "flow-api-translator": "0.15.0", - "flow-bin": "^0.216.1", + "flow-bin": "^0.217.0", "glob": "^7.1.1", "hermes-eslint": "0.15.0", "inquirer": "^7.1.0", diff --git a/packages/@react-native/tester/js/examples/FlatList/BaseFlatListExample.js b/packages/@react-native/tester/js/examples/FlatList/BaseFlatListExample.js index d4bf8709b61..bcbd8715954 100644 --- a/packages/@react-native/tester/js/examples/FlatList/BaseFlatListExample.js +++ b/packages/@react-native/tester/js/examples/FlatList/BaseFlatListExample.js @@ -68,6 +68,7 @@ type Props = { }; const BaseFlatListExample = React.forwardRef( + // $FlowFixMe[incompatible-call] ( props: Props, ref: diff --git a/packages/@react-native/tester/overrides.json b/packages/@react-native/tester/overrides.json index f7bd26c2ca0..e8a9800be34 100644 --- a/packages/@react-native/tester/overrides.json +++ b/packages/@react-native/tester/overrides.json @@ -1,5 +1,5 @@ { - "baseVersion": "0.73.0-nightly-20230920-630cf3b21", + "baseVersion": "0.73.0-nightly-20230925-2de964cfd", "overrides": [ { "type": "copy", @@ -131,7 +131,7 @@ "type": "copy", "directory": "js/examples/FlatList", "baseDirectory": "packages/rn-tester/js/examples/FlatList", - "baseHash": "b269fa4b6e0bd62df276813a6c84274d1be675d5", + "baseHash": "d2ff0b9731d3cda9476defe61d56f8ba7df3dc0c", "issue": 4054 }, { diff --git a/packages/e2e-test-app-fabric/package.json b/packages/e2e-test-app-fabric/package.json index de52db1edfe..661bd4d23ae 100644 --- a/packages/e2e-test-app-fabric/package.json +++ b/packages/e2e-test-app-fabric/package.json @@ -18,7 +18,7 @@ "@typescript-eslint/eslint-plugin": "^5.21.0", "@typescript-eslint/parser": "^5.21.0", "react": "18.2.0", - "react-native": "0.73.0-nightly-20230920-630cf3b21", + "react-native": "0.73.0-nightly-20230925-2de964cfd", "react-native-windows": "^0.0.0-canary.716" }, "devDependencies": { @@ -30,8 +30,8 @@ "@react-native-windows/automation": "^0.3.137", "@react-native-windows/automation-commands": "^0.1.157", "@react-native/babel-plugin-codegen": "0.73.0", - "@react-native/metro-config": "^0.73.0", "@react-native/metro-babel-transformer": "0.73.12", + "@react-native/metro-config": "^0.73.0", "@rnw-scripts/babel-node-config": "2.3.1", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.2", diff --git a/packages/e2e-test-app/package.json b/packages/e2e-test-app/package.json index 19a8b9c2438..f15143d02a1 100644 --- a/packages/e2e-test-app/package.json +++ b/packages/e2e-test-app/package.json @@ -19,7 +19,7 @@ "@typescript-eslint/eslint-plugin": "^5.21.0", "@typescript-eslint/parser": "^5.21.0", "react": "18.2.0", - "react-native": "0.73.0-nightly-20230920-630cf3b21", + "react-native": "0.73.0-nightly-20230925-2de964cfd", "react-native-windows": "^0.0.0-canary.716", "react-native-xaml": "^0.0.76" }, @@ -32,8 +32,8 @@ "@react-native-windows/automation": "^0.3.137", "@react-native-windows/automation-commands": "^0.1.157", "@react-native/babel-plugin-codegen": "0.73.0", - "@react-native/metro-config": "^0.73.0", "@react-native/metro-babel-transformer": "0.73.12", + "@react-native/metro-config": "^0.73.0", "@rnw-scripts/babel-node-config": "2.3.1", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.2", diff --git a/packages/integration-test-app/package.json b/packages/integration-test-app/package.json index 22b6c412497..9ec0db30f6d 100644 --- a/packages/integration-test-app/package.json +++ b/packages/integration-test-app/package.json @@ -16,7 +16,7 @@ "@typescript-eslint/parser": "^5.21.0", "chai": "^4.2.0", "react": "18.2.0", - "react-native": "0.73.0-nightly-20230920-630cf3b21", + "react-native": "0.73.0-nightly-20230925-2de964cfd", "react-native-windows": "^0.0.0-canary.716" }, "devDependencies": { diff --git a/packages/playground/package.json b/packages/playground/package.json index 3f0b2e9d0cf..368c9d0a662 100644 --- a/packages/playground/package.json +++ b/packages/playground/package.json @@ -15,7 +15,7 @@ "@typescript-eslint/eslint-plugin": "^5.21.0", "@typescript-eslint/parser": "^5.21.0", "react": "18.2.0", - "react-native": "0.73.0-nightly-20230920-630cf3b21", + "react-native": "0.73.0-nightly-20230925-2de964cfd", "react-native-windows": "^0.0.0-canary.716" }, "devDependencies": { diff --git a/packages/sample-apps/package.json b/packages/sample-apps/package.json index d426b38e937..e45d05a07a2 100644 --- a/packages/sample-apps/package.json +++ b/packages/sample-apps/package.json @@ -15,16 +15,16 @@ "@typescript-eslint/eslint-plugin": "^5.30.5", "@typescript-eslint/parser": "^5.57.1", "react": "18.2.0", - "react-native": "0.73.0-nightly-20230920-630cf3b21", + "react-native": "0.73.0-nightly-20230925-2de964cfd", "react-native-windows": "^0.0.0-canary.716" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/eslint-parser": "^7.20.0", "@babel/runtime": "^7.8.4", - "@react-native/metro-config": "^0.73.0", "@react-native-windows/cli": "0.0.0-canary.191", "@react-native-windows/codegen": "0.0.0-canary.70", + "@react-native/metro-config": "^0.73.0", "@rnw-scripts/babel-react-native-config": "0.0.0", "@rnw-scripts/eslint-config": "1.2.2", "@rnw-scripts/just-task": "2.3.16", diff --git a/vnext/.flowconfig b/vnext/.flowconfig index 503ff88549c..23d800ae08a 100644 --- a/vnext/.flowconfig +++ b/vnext/.flowconfig @@ -141,4 +141,4 @@ untyped-import untyped-type-import [version] -^0.216.1 +^0.217.0 diff --git a/vnext/Microsoft.ReactNative.IntegrationTests/codegen/msrnIntegrationTestsJSI-generated.cpp b/vnext/Microsoft.ReactNative.IntegrationTests/codegen/msrnIntegrationTestsJSI-generated.cpp index 0e8fff4c338..cd150329a8e 100644 --- a/vnext/Microsoft.ReactNative.IntegrationTests/codegen/msrnIntegrationTestsJSI-generated.cpp +++ b/vnext/Microsoft.ReactNative.IntegrationTests/codegen/msrnIntegrationTestsJSI-generated.cpp @@ -4,7 +4,7 @@ * Do not edit this file as changes may cause incorrect behavior and will be lost * once the code is regenerated. * - * @generated by codegen project: GenerateModuleH.js + * @generated by codegen project: GenerateModuleCpp.js */ #include "msrnIntegrationTestsJSI.h" diff --git a/vnext/Microsoft.ReactNative/packages.lock.json b/vnext/Microsoft.ReactNative/packages.lock.json index 0f5612becc6..749b8730d7b 100644 --- a/vnext/Microsoft.ReactNative/packages.lock.json +++ b/vnext/Microsoft.ReactNative/packages.lock.json @@ -24,21 +24,21 @@ "Microsoft.SourceLink.Common": "1.1.1" } }, - "Microsoft.UI.Xaml": { - "type": "Direct", - "requested": "[2.8.0, )", - "resolved": "2.8.0", - "contentHash": "vxdHxTr63s5KVtNddMFpgvjBjUH50z7seq/5jLWmmSuf8poxg+sXrywkofUdE8ZstbpO9y3FL/IXXUcPYbeesA==", - "dependencies": { - "Microsoft.Web.WebView2": "1.0.1264.42" - } - }, "Microsoft.Windows.CppWinRT": { "type": "Direct", "requested": "[2.0.211028.7, )", "resolved": "2.0.211028.7", "contentHash": "JBGI0c3WLoU6aYJRy9Qo0MLDQfObEp+d4nrhR95iyzf7+HOgjRunHDp/6eGFREd7xq3OI1mll9ecJrMfzBvlyg==" }, + "Microsoft.WindowsAppSDK": { + "type": "Direct", + "requested": "[1.4.230913002, )", + "resolved": "1.4.230913002", + "contentHash": "l+9RshN4TsTuxL0ijFp5smbs3Y07RO7CxKBHNM/RsrsGtWvuk6edITMp4oqL9C3ufEAmpYk3dqOZRSf+sFH4Zg==", + "dependencies": { + "Microsoft.Windows.SDK.BuildTools": "10.0.22621.1" + } + }, "Microsoft.Build.Tasks.Git": { "type": "Transitive", "resolved": "1.1.1", @@ -49,10 +49,10 @@ "resolved": "1.1.1", "contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg==" }, - "Microsoft.Web.WebView2": { + "Microsoft.Windows.SDK.BuildTools": { "type": "Transitive", - "resolved": "1.0.1264.42", - "contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA==" + "resolved": "10.0.22621.1", + "contentHash": "Sp1DkYvg7yxuhamwxv+qFC66KC3paKQpwK8Q1J6XuAh6nzXIInmsDcpJ3szr0XGud4ysXojqwTfGdW01gvZ/0g==" }, "common": { "type": "Project" @@ -76,52 +76,80 @@ } }, "native,Version=v0.0/win10-arm": { - "Microsoft.Web.WebView2": { - "type": "Transitive", - "resolved": "1.0.1264.42", - "contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA==" + "Microsoft.WindowsAppSDK": { + "type": "Direct", + "requested": "[1.4.230913002, )", + "resolved": "1.4.230913002", + "contentHash": "l+9RshN4TsTuxL0ijFp5smbs3Y07RO7CxKBHNM/RsrsGtWvuk6edITMp4oqL9C3ufEAmpYk3dqOZRSf+sFH4Zg==", + "dependencies": { + "Microsoft.Windows.SDK.BuildTools": "10.0.22621.1" + } } }, "native,Version=v0.0/win10-arm-aot": { - "Microsoft.Web.WebView2": { - "type": "Transitive", - "resolved": "1.0.1264.42", - "contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA==" + "Microsoft.WindowsAppSDK": { + "type": "Direct", + "requested": "[1.4.230913002, )", + "resolved": "1.4.230913002", + "contentHash": "l+9RshN4TsTuxL0ijFp5smbs3Y07RO7CxKBHNM/RsrsGtWvuk6edITMp4oqL9C3ufEAmpYk3dqOZRSf+sFH4Zg==", + "dependencies": { + "Microsoft.Windows.SDK.BuildTools": "10.0.22621.1" + } } }, "native,Version=v0.0/win10-arm64-aot": { - "Microsoft.Web.WebView2": { - "type": "Transitive", - "resolved": "1.0.1264.42", - "contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA==" + "Microsoft.WindowsAppSDK": { + "type": "Direct", + "requested": "[1.4.230913002, )", + "resolved": "1.4.230913002", + "contentHash": "l+9RshN4TsTuxL0ijFp5smbs3Y07RO7CxKBHNM/RsrsGtWvuk6edITMp4oqL9C3ufEAmpYk3dqOZRSf+sFH4Zg==", + "dependencies": { + "Microsoft.Windows.SDK.BuildTools": "10.0.22621.1" + } } }, "native,Version=v0.0/win10-x64": { - "Microsoft.Web.WebView2": { - "type": "Transitive", - "resolved": "1.0.1264.42", - "contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA==" + "Microsoft.WindowsAppSDK": { + "type": "Direct", + "requested": "[1.4.230913002, )", + "resolved": "1.4.230913002", + "contentHash": "l+9RshN4TsTuxL0ijFp5smbs3Y07RO7CxKBHNM/RsrsGtWvuk6edITMp4oqL9C3ufEAmpYk3dqOZRSf+sFH4Zg==", + "dependencies": { + "Microsoft.Windows.SDK.BuildTools": "10.0.22621.1" + } } }, "native,Version=v0.0/win10-x64-aot": { - "Microsoft.Web.WebView2": { - "type": "Transitive", - "resolved": "1.0.1264.42", - "contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA==" + "Microsoft.WindowsAppSDK": { + "type": "Direct", + "requested": "[1.4.230913002, )", + "resolved": "1.4.230913002", + "contentHash": "l+9RshN4TsTuxL0ijFp5smbs3Y07RO7CxKBHNM/RsrsGtWvuk6edITMp4oqL9C3ufEAmpYk3dqOZRSf+sFH4Zg==", + "dependencies": { + "Microsoft.Windows.SDK.BuildTools": "10.0.22621.1" + } } }, "native,Version=v0.0/win10-x86": { - "Microsoft.Web.WebView2": { - "type": "Transitive", - "resolved": "1.0.1264.42", - "contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA==" + "Microsoft.WindowsAppSDK": { + "type": "Direct", + "requested": "[1.4.230913002, )", + "resolved": "1.4.230913002", + "contentHash": "l+9RshN4TsTuxL0ijFp5smbs3Y07RO7CxKBHNM/RsrsGtWvuk6edITMp4oqL9C3ufEAmpYk3dqOZRSf+sFH4Zg==", + "dependencies": { + "Microsoft.Windows.SDK.BuildTools": "10.0.22621.1" + } } }, "native,Version=v0.0/win10-x86-aot": { - "Microsoft.Web.WebView2": { - "type": "Transitive", - "resolved": "1.0.1264.42", - "contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA==" + "Microsoft.WindowsAppSDK": { + "type": "Direct", + "requested": "[1.4.230913002, )", + "resolved": "1.4.230913002", + "contentHash": "l+9RshN4TsTuxL0ijFp5smbs3Y07RO7CxKBHNM/RsrsGtWvuk6edITMp4oqL9C3ufEAmpYk3dqOZRSf+sFH4Zg==", + "dependencies": { + "Microsoft.Windows.SDK.BuildTools": "10.0.22621.1" + } } } } diff --git a/vnext/ReactCommon/ReactCommon.vcxproj b/vnext/ReactCommon/ReactCommon.vcxproj index 0a8fe472d7a..ff8a4f741ab 100644 --- a/vnext/ReactCommon/ReactCommon.vcxproj +++ b/vnext/ReactCommon/ReactCommon.vcxproj @@ -144,7 +144,6 @@ - diff --git a/vnext/ReactCommon/ReactCommon.vcxproj.filters b/vnext/ReactCommon/ReactCommon.vcxproj.filters index 57de1928d50..396ab880909 100644 --- a/vnext/ReactCommon/ReactCommon.vcxproj.filters +++ b/vnext/ReactCommon/ReactCommon.vcxproj.filters @@ -132,9 +132,6 @@ yoga - - yoga - jsi\jsi diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/YogaLayoutableShadowNode.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/YogaLayoutableShadowNode.cpp index 9571ddd1cf3..cae9474888f 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/YogaLayoutableShadowNode.cpp +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/YogaLayoutableShadowNode.cpp @@ -532,8 +532,10 @@ void YogaLayoutableShadowNode::setSize(Size size) const { ensureUnsealed(); auto style = yogaNode_.getStyle(); - style.dimensions()[YGDimensionWidth] = yogaStyleValueFromFloat(size.width); - style.dimensions()[YGDimensionHeight] = yogaStyleValueFromFloat(size.height); + style.setDimension( + YGDimensionWidth, yoga::CompactValue::ofMaybe(size.width)); + style.setDimension( + YGDimensionHeight, yoga::CompactValue::ofMaybe(size.height)); yogaNode_.setStyle(style); yogaNode_.setDirty(true); } @@ -543,19 +545,23 @@ void YogaLayoutableShadowNode::setPadding(RectangleEdges padding) const { auto style = yogaNode_.getStyle(); - auto leftPadding = yogaStyleValueFromFloat(padding.left); - auto topPadding = yogaStyleValueFromFloat(padding.top); - auto rightPadding = yogaStyleValueFromFloat(padding.right); - auto bottomPadding = yogaStyleValueFromFloat(padding.bottom); + auto leftPadding = yoga::CompactValue::ofMaybe(padding.left); + auto topPadding = yoga::CompactValue::ofMaybe(padding.top); + auto rightPadding = yoga::CompactValue::ofMaybe(padding.right); + auto bottomPadding = yoga::CompactValue::ofMaybe(padding.bottom); if (leftPadding != style.padding()[YGEdgeLeft] || topPadding != style.padding()[YGEdgeTop] || rightPadding != style.padding()[YGEdgeRight] || bottomPadding != style.padding()[YGEdgeBottom]) { - style.padding()[YGEdgeTop] = yogaStyleValueFromFloat(padding.top); - style.padding()[YGEdgeLeft] = yogaStyleValueFromFloat(padding.left); - style.padding()[YGEdgeRight] = yogaStyleValueFromFloat(padding.right); - style.padding()[YGEdgeBottom] = yogaStyleValueFromFloat(padding.bottom); + style.padding()[YGEdgeTop] = + yoga::CompactValue::ofMaybe(padding.top); + style.padding()[YGEdgeLeft] = + yoga::CompactValue::ofMaybe(padding.left); + style.padding()[YGEdgeRight] = + yoga::CompactValue::ofMaybe(padding.right); + style.padding()[YGEdgeBottom] = + yoga::CompactValue::ofMaybe(padding.bottom); yogaNode_.setStyle(style); yogaNode_.setDirty(true); } @@ -624,22 +630,21 @@ void YogaLayoutableShadowNode::layoutTree( auto ownerWidth = yogaFloatFromFloat(maximumSize.width); auto ownerHeight = yogaFloatFromFloat(maximumSize.height); - yogaStyle.maxDimensions()[YGDimensionWidth] = std::isfinite(maximumSize.width) - ? yogaStyleValueFromFloat(maximumSize.width) - : YGValueUndefined; + yogaStyle.setMaxDimension( + YGDimensionWidth, + yoga::CompactValue::ofMaybe(maximumSize.width)); - yogaStyle.maxDimensions()[YGDimensionHeight] = - std::isfinite(maximumSize.height) - ? yogaStyleValueFromFloat(maximumSize.height) - : YGValueUndefined; + yogaStyle.setMaxDimension( + YGDimensionHeight, + yoga::CompactValue::ofMaybe(maximumSize.height)); - yogaStyle.minDimensions()[YGDimensionWidth] = minimumSize.width > 0 - ? yogaStyleValueFromFloat(minimumSize.width) - : YGValueUndefined; + yogaStyle.setMinDimension( + YGDimensionWidth, + yoga::CompactValue::ofMaybe(minimumSize.width)); - yogaStyle.minDimensions()[YGDimensionHeight] = minimumSize.height > 0 - ? yogaStyleValueFromFloat(minimumSize.height) - : YGValueUndefined; + yogaStyle.setMinDimension( + YGDimensionHeight, + yoga::CompactValue::ofMaybe(minimumSize.height)); auto direction = yogaDirectionFromLayoutDirection(layoutConstraints.layoutDirection); diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/YogaStylableProps.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/YogaStylableProps.cpp index eecd4bf741e..697a9d634e1 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/YogaStylableProps.cpp +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/YogaStylableProps.cpp @@ -181,9 +181,19 @@ static inline T const getFieldValue( return; \ } -#define REBUILD_FIELD_YG_DIMENSION(field, widthStr, heightStr) \ - REBUILD_YG_FIELD_SWITCH_CASE_INDEXED(field, YGDimensionWidth, widthStr); \ - REBUILD_YG_FIELD_SWITCH_CASE_INDEXED(field, YGDimensionHeight, heightStr); +#define REBUILD_YG_FIELD_SWITCH_CASE_INDEXED_SETTER( \ + field, setter, index, fieldName) \ + case CONSTEXPR_RAW_PROPS_KEY_HASH(fieldName): { \ + yogaStyle.setter( \ + index, getFieldValue(context, value, ygDefaults.field(index))); \ + return; \ + } + +#define REBUILD_FIELD_YG_DIMENSION(field, setter, widthStr, heightStr) \ + REBUILD_YG_FIELD_SWITCH_CASE_INDEXED_SETTER( \ + field, setter, YGDimensionWidth, widthStr); \ + REBUILD_YG_FIELD_SWITCH_CASE_INDEXED_SETTER( \ + field, setter, YGDimensionHeight, heightStr); #define REBUILD_FIELD_YG_GUTTER(field, rowGapStr, columnGapStr, gapStr) \ REBUILD_YG_FIELD_SWITCH_CASE_INDEXED(field, YGGutterRow, rowGapStr); \ @@ -242,9 +252,11 @@ void YogaStylableProps::setProp( REBUILD_FIELD_SWITCH_CASE2(positionType, "position"); REBUILD_FIELD_YG_GUTTER(gap, "rowGap", "columnGap", "gap"); REBUILD_FIELD_SWITCH_CASE_YSP(aspectRatio); - REBUILD_FIELD_YG_DIMENSION(dimensions, "width", "height"); - REBUILD_FIELD_YG_DIMENSION(minDimensions, "minWidth", "minHeight"); - REBUILD_FIELD_YG_DIMENSION(maxDimensions, "maxWidth", "maxHeight"); + REBUILD_FIELD_YG_DIMENSION(dimension, setDimension, "width", "height"); + REBUILD_FIELD_YG_DIMENSION( + minDimension, setMinDimension, "minWidth", "minHeight"); + REBUILD_FIELD_YG_DIMENSION( + maxDimension, setMaxDimension, "maxWidth", "maxHeight"); REBUILD_FIELD_YG_EDGES_POSITION(); REBUILD_FIELD_YG_EDGES(margin, "margin", ""); REBUILD_FIELD_YG_EDGES(padding, "padding", ""); @@ -336,15 +348,29 @@ SharedDebugStringConvertibleList YogaStylableProps::getDebugProps() const { debugStringConvertibleItem( "border", yogaStyle.border(), defaultYogaStyle.border()), debugStringConvertibleItem( - "dimensions", yogaStyle.dimensions(), defaultYogaStyle.dimensions()), + "width", + yogaStyle.dimension(YGDimensionWidth), + defaultYogaStyle.dimension(YGDimensionWidth)), + debugStringConvertibleItem( + "height", + yogaStyle.dimension(YGDimensionHeight), + defaultYogaStyle.dimension(YGDimensionHeight)), + debugStringConvertibleItem( + "minWidth", + yogaStyle.minDimension(YGDimensionWidth), + defaultYogaStyle.minDimension(YGDimensionWidth)), + debugStringConvertibleItem( + "minHeight", + yogaStyle.minDimension(YGDimensionHeight), + defaultYogaStyle.minDimension(YGDimensionHeight)), debugStringConvertibleItem( - "minDimensions", - yogaStyle.minDimensions(), - defaultYogaStyle.minDimensions()), + "maxWidth", + yogaStyle.maxDimension(YGDimensionWidth), + defaultYogaStyle.maxDimension(YGDimensionWidth)), debugStringConvertibleItem( - "maxDimensions", - yogaStyle.maxDimensions(), - defaultYogaStyle.maxDimensions()), + "maxHeight", + yogaStyle.maxDimension(YGDimensionHeight), + defaultYogaStyle.maxDimension(YGDimensionHeight)), debugStringConvertibleItem( "aspectRatio", yogaStyle.aspectRatio(), diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/conversions.h b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/conversions.h index a66165d9ce1..e38ab6b7b51 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/conversions.h +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/conversions.h @@ -81,22 +81,6 @@ inline yoga::FloatOptional yogaOptionalFloatFromFloat(Float value) { return yoga::FloatOptional((float)value); } -/* - * `YGValue` <-> `React Native's `Float` - * - * `YGValue` represents optional dimensionful (a real number and some unit, e.g. - * pixels). - */ -inline YGValue yogaStyleValueFromFloat( - const Float& value, - YGUnit unit = YGUnitPoint) { - if (!std::isfinite(value)) { - return YGValueUndefined; - } - - return {(float)value, unit}; -} - inline std::optional optionalFloatFromYogaValue( const YGValue value, std::optional base = {}) { @@ -409,7 +393,7 @@ inline void fromRawValue( const RawValue& value, yoga::Style::ValueRepr& result) { if (value.hasType()) { - result = yogaStyleValueFromFloat((Float)value); + result = yoga::CompactValue::ofMaybe((float)value); return; } else if (value.hasType()) { const auto stringValue = (std::string)value; diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.h b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.h index adad3cc0077..1d05d96ba91 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.h +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.h @@ -22,7 +22,6 @@ struct LayoutResults { static constexpr int32_t MaxCachedMeasurements = 8; std::array position = {}; - std::array dimensions = {{YGUndefined, YGUndefined}}; std::array margin = {}; std::array border = {}; std::array padding = {}; @@ -31,6 +30,9 @@ struct LayoutResults { Direction direction_ = Direction::Inherit; bool hadOverflow_ = false; + std::array dimensions_ = {{YGUndefined, YGUndefined}}; + std::array measuredDimensions_ = {{YGUndefined, YGUndefined}}; + public: uint32_t computedFlexBasisGeneration = 0; FloatOptional computedFlexBasis = {}; @@ -42,7 +44,6 @@ struct LayoutResults { uint32_t nextCachedMeasurementsIndex = 0; std::array cachedMeasurements = {}; - std::array measuredDimensions = {{YGUndefined, YGUndefined}}; CachedMeasurement cachedLayout{}; @@ -57,10 +58,27 @@ struct LayoutResults { bool hadOverflow() const { return hadOverflow_; } + void setHadOverflow(bool hadOverflow) { hadOverflow_ = hadOverflow; } + float dimension(YGDimension axis) const { + return dimensions_[axis]; + } + + void setDimension(YGDimension axis, float dimension) { + dimensions_[axis] = dimension; + } + + float measuredDimension(YGDimension axis) const { + return measuredDimensions_[axis]; + } + + void setMeasuredDimension(YGDimension axis, float dimension) { + measuredDimensions_[axis] = dimension; + } + bool operator==(LayoutResults layout) const; bool operator!=(LayoutResults layout) const { return !(*this == layout); diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/Node.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/Node.cpp index 0dce9f7dcac..32e33435707 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/Node.cpp +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/Node.cpp @@ -340,8 +340,7 @@ void Node::setLayoutComputedFlexBasisGeneration( void Node::setLayoutMeasuredDimension( float measuredDimension, YGDimension dimension) { - layout_.measuredDimensions[static_cast(dimension)] = - measuredDimension; + layout_.setMeasuredDimension(dimension, measuredDimension); } void Node::setLayoutHadOverflow(bool hadOverflow) { @@ -349,7 +348,7 @@ void Node::setLayoutHadOverflow(bool hadOverflow) { } void Node::setLayoutDimension(float dimensionValue, YGDimension dimension) { - layout_.dimensions[static_cast(dimension)] = dimensionValue; + layout_.setDimension(dimension, dimensionValue); } // If both left and right are defined, then use left. Otherwise return +left or @@ -437,12 +436,11 @@ void Node::resolveDimension() { using namespace yoga; const Style& style = getStyle(); for (auto dim : {YGDimensionWidth, YGDimensionHeight}) { - if (!style.maxDimensions()[dim].isUndefined() && - yoga::inexactEquals( - style.maxDimensions()[dim], style.minDimensions()[dim])) { - resolvedDimensions_[dim] = style.maxDimensions()[dim]; + if (!style.maxDimension(dim).isUndefined() && + yoga::inexactEquals(style.maxDimension(dim), style.minDimension(dim))) { + resolvedDimensions_[dim] = style.maxDimension(dim); } else { - resolvedDimensions_[dim] = style.dimensions()[dim]; + resolvedDimensions_[dim] = style.dimension(dim); } } } diff --git a/vnext/ReactCommon/Yoga.cpp b/vnext/ReactCommon/Yoga.cpp index 3617f86a98d..5fae77c457d 100644 --- a/vnext/ReactCommon/Yoga.cpp +++ b/vnext/ReactCommon/Yoga.cpp @@ -418,6 +418,15 @@ void updateIndexedStyleProp( [idx, prop](Style& s, CompactValue x) { (s.*prop)()[idx] = x; }); } +template +void updateIndexedStyleProp(YGNodeRef node, IdxT idx, CompactValue value) { + updateStyle( + resolveRef(node), + value, + [idx](Style& s, CompactValue x) { return (s.*GetterT)(idx) != x; }, + [idx](Style& s, CompactValue x) { (s.*SetterT)(idx, x); }); +} + } // namespace // MSVC has trouble inferring the return type of pointer to member functions @@ -513,12 +522,10 @@ YGDisplay YGNodeStyleGetDisplay(const YGNodeConstRef node) { return unscopedEnum(resolveRef(node)->getStyle().display()); } -// TODO(T26792433): Change the API to accept FloatOptional. void YGNodeStyleSetFlex(const YGNodeRef node, const float flex) { updateStyle(node, &Style::flex, FloatOptional{flex}); } -// TODO(T26792433): Change the API to accept FloatOptional. float YGNodeStyleGetFlex(const YGNodeConstRef nodeRef) { const auto node = resolveRef(nodeRef); return node->getStyle().flex().isUndefined() @@ -526,13 +533,11 @@ float YGNodeStyleGetFlex(const YGNodeConstRef nodeRef) { : node->getStyle().flex().unwrap(); } -// TODO(T26792433): Change the API to accept FloatOptional. void YGNodeStyleSetFlexGrow(const YGNodeRef node, const float flexGrow) { updateStyle( node, &Style::flexGrow, FloatOptional{flexGrow}); } -// TODO(T26792433): Change the API to accept FloatOptional. void YGNodeStyleSetFlexShrink(const YGNodeRef node, const float flexShrink) { updateStyle( node, &Style::flexShrink, FloatOptional{flexShrink}); @@ -541,7 +546,6 @@ void YGNodeStyleSetFlexShrink(const YGNodeRef node, const float flexShrink) { YGValue YGNodeStyleGetFlexBasis(const YGNodeConstRef node) { YGValue flexBasis = resolveRef(node)->getStyle().flexBasis(); if (flexBasis.unit == YGUnitUndefined || flexBasis.unit == YGUnitAuto) { - // TODO(T26792433): Get rid off the use of YGUndefined at client side flexBasis.value = YGUndefined; } return flexBasis; @@ -608,7 +612,6 @@ YGValue YGNodeStyleGetPadding(YGNodeConstRef node, YGEdge edge) { return resolveRef(node)->getStyle().padding()[edge]; } -// TODO(T26792433): Change the API to accept FloatOptional. void YGNodeStyleSetBorder( const YGNodeRef node, const YGEdge edge, @@ -620,8 +623,6 @@ void YGNodeStyleSetBorder( float YGNodeStyleGetBorder(const YGNodeConstRef node, const YGEdge edge) { auto border = resolveRef(node)->getStyle().border()[edge]; if (border.isUndefined() || border.isAuto()) { - // TODO(T26792433): Rather than returning YGUndefined, change the api to - // return FloatOptional. return YGUndefined; } @@ -639,8 +640,6 @@ void YGNodeStyleSetGap( float YGNodeStyleGetGap(const YGNodeConstRef node, const YGGutter gutter) { auto gapLength = resolveRef(node)->getStyle().gap()[gutter]; if (gapLength.isUndefined() || gapLength.isAuto()) { - // TODO(T26792433): Rather than returning YGUndefined, change the api to - // return FloatOptional. return YGUndefined; } @@ -649,13 +648,11 @@ float YGNodeStyleGetGap(const YGNodeConstRef node, const YGGutter gutter) { // Yoga specific properties, not compatible with flexbox specification -// TODO(T26792433): Change the API to accept FloatOptional. float YGNodeStyleGetAspectRatio(const YGNodeConstRef node) { const FloatOptional op = resolveRef(node)->getStyle().aspectRatio(); return op.isUndefined() ? YGUndefined : op.unwrap(); } -// TODO(T26792433): Change the API to accept FloatOptional. void YGNodeStyleSetAspectRatio(const YGNodeRef node, const float aspectRatio) { updateStyle( node, &Style::aspectRatio, FloatOptional{aspectRatio}); @@ -663,98 +660,98 @@ void YGNodeStyleSetAspectRatio(const YGNodeRef node, const float aspectRatio) { void YGNodeStyleSetWidth(YGNodeRef node, float points) { auto value = CompactValue::ofMaybe(points); - updateIndexedStyleProp( - node, &Style::dimensions, YGDimensionWidth, value); + updateIndexedStyleProp<&Style::dimension, &Style::setDimension>( + node, YGDimensionWidth, value); } void YGNodeStyleSetWidthPercent(YGNodeRef node, float percent) { auto value = CompactValue::ofMaybe(percent); - updateIndexedStyleProp( - node, &Style::dimensions, YGDimensionWidth, value); + updateIndexedStyleProp<&Style::dimension, &Style::setDimension>( + node, YGDimensionWidth, value); } void YGNodeStyleSetWidthAuto(YGNodeRef node) { - updateIndexedStyleProp( - node, &Style::dimensions, YGDimensionWidth, CompactValue::ofAuto()); + updateIndexedStyleProp<&Style::dimension, &Style::setDimension>( + node, YGDimensionWidth, CompactValue::ofAuto()); } YGValue YGNodeStyleGetWidth(YGNodeConstRef node) { - return resolveRef(node)->getStyle().dimensions()[YGDimensionWidth]; + return resolveRef(node)->getStyle().dimension(YGDimensionWidth); } void YGNodeStyleSetHeight(YGNodeRef node, float points) { auto value = CompactValue::ofMaybe(points); - updateIndexedStyleProp( - node, &Style::dimensions, YGDimensionHeight, value); + updateIndexedStyleProp<&Style::dimension, &Style::setDimension>( + node, YGDimensionHeight, value); } void YGNodeStyleSetHeightPercent(YGNodeRef node, float percent) { auto value = CompactValue::ofMaybe(percent); - updateIndexedStyleProp( - node, &Style::dimensions, YGDimensionHeight, value); + updateIndexedStyleProp<&Style::dimension, &Style::setDimension>( + node, YGDimensionHeight, value); } void YGNodeStyleSetHeightAuto(YGNodeRef node) { - updateIndexedStyleProp( - node, &Style::dimensions, YGDimensionHeight, CompactValue::ofAuto()); + updateIndexedStyleProp<&Style::dimension, &Style::setDimension>( + node, YGDimensionHeight, CompactValue::ofAuto()); } YGValue YGNodeStyleGetHeight(YGNodeConstRef node) { - return resolveRef(node)->getStyle().dimensions()[YGDimensionHeight]; + return resolveRef(node)->getStyle().dimension(YGDimensionHeight); } void YGNodeStyleSetMinWidth(const YGNodeRef node, const float minWidth) { auto value = CompactValue::ofMaybe(minWidth); - updateIndexedStyleProp( - node, &Style::minDimensions, YGDimensionWidth, value); + updateIndexedStyleProp<&Style::minDimension, &Style::setMinDimension>( + node, YGDimensionWidth, value); } void YGNodeStyleSetMinWidthPercent(const YGNodeRef node, const float minWidth) { auto value = CompactValue::ofMaybe(minWidth); - updateIndexedStyleProp( - node, &Style::minDimensions, YGDimensionWidth, value); + updateIndexedStyleProp<&Style::minDimension, &Style::setMinDimension>( + node, YGDimensionWidth, value); } YGValue YGNodeStyleGetMinWidth(const YGNodeConstRef node) { - return resolveRef(node)->getStyle().minDimensions()[YGDimensionWidth]; + return resolveRef(node)->getStyle().minDimension(YGDimensionWidth); } void YGNodeStyleSetMinHeight(const YGNodeRef node, const float minHeight) { auto value = CompactValue::ofMaybe(minHeight); - updateIndexedStyleProp( - node, &Style::minDimensions, YGDimensionHeight, value); + updateIndexedStyleProp<&Style::minDimension, &Style::setMinDimension>( + node, YGDimensionHeight, value); } void YGNodeStyleSetMinHeightPercent( const YGNodeRef node, const float minHeight) { auto value = CompactValue::ofMaybe(minHeight); - updateIndexedStyleProp( - node, &Style::minDimensions, YGDimensionHeight, value); + updateIndexedStyleProp<&Style::minDimension, &Style::setMinDimension>( + node, YGDimensionHeight, value); } YGValue YGNodeStyleGetMinHeight(const YGNodeConstRef node) { - return resolveRef(node)->getStyle().minDimensions()[YGDimensionHeight]; + return resolveRef(node)->getStyle().minDimension(YGDimensionHeight); } void YGNodeStyleSetMaxWidth(const YGNodeRef node, const float maxWidth) { auto value = CompactValue::ofMaybe(maxWidth); - updateIndexedStyleProp( - node, &Style::maxDimensions, YGDimensionWidth, value); + updateIndexedStyleProp<&Style::maxDimension, &Style::setMaxDimension>( + node, YGDimensionWidth, value); } void YGNodeStyleSetMaxWidthPercent(const YGNodeRef node, const float maxWidth) { auto value = CompactValue::ofMaybe(maxWidth); - updateIndexedStyleProp( - node, &Style::maxDimensions, YGDimensionWidth, value); + updateIndexedStyleProp<&Style::maxDimension, &Style::setMaxDimension>( + node, YGDimensionWidth, value); } YGValue YGNodeStyleGetMaxWidth(const YGNodeConstRef node) { - return resolveRef(node)->getStyle().maxDimensions()[YGDimensionWidth]; + return resolveRef(node)->getStyle().maxDimension(YGDimensionWidth); } void YGNodeStyleSetMaxHeight(const YGNodeRef node, const float maxHeight) { auto value = CompactValue::ofMaybe(maxHeight); - updateIndexedStyleProp( - node, &Style::maxDimensions, YGDimensionHeight, value); + updateIndexedStyleProp<&Style::maxDimension, &Style::setMaxDimension>( + node, YGDimensionHeight, value); } void YGNodeStyleSetMaxHeightPercent( const YGNodeRef node, const float maxHeight) { auto value = CompactValue::ofMaybe(maxHeight); - updateIndexedStyleProp( - node, &Style::maxDimensions, YGDimensionHeight, value); + updateIndexedStyleProp<&Style::maxDimension, &Style::setMaxDimension>( + node, YGDimensionHeight, value); } YGValue YGNodeStyleGetMaxHeight(const YGNodeConstRef node) { - return resolveRef(node)->getStyle().maxDimensions()[YGDimensionHeight]; + return resolveRef(node)->getStyle().maxDimension(YGDimensionHeight); } namespace { @@ -807,11 +804,11 @@ float YGNodeLayoutGetBottom(const YGNodeConstRef node) { } float YGNodeLayoutGetWidth(const YGNodeConstRef node) { - return resolveRef(node)->getLayout().dimensions[YGDimensionWidth]; + return resolveRef(node)->getLayout().dimension(YGDimensionWidth); } float YGNodeLayoutGetHeight(const YGNodeConstRef node) { - return resolveRef(node)->getLayout().dimensions[YGDimensionHeight]; + return resolveRef(node)->getLayout().dimension(YGDimensionHeight); } YGDirection YGNodeLayoutGetDirection(const YGNodeConstRef node) { diff --git a/vnext/codegen/rnwcoreJSI-generated.cpp b/vnext/codegen/rnwcoreJSI-generated.cpp index ec785d07221..fa8eb45714a 100644 --- a/vnext/codegen/rnwcoreJSI-generated.cpp +++ b/vnext/codegen/rnwcoreJSI-generated.cpp @@ -4,7 +4,7 @@ * Do not edit this file as changes may cause incorrect behavior and will be lost * once the code is regenerated. * - * @generated by codegen project: GenerateModuleH.js + * @generated by codegen project: GenerateModuleCpp.js */ #include "rnwcoreJSI.h" diff --git a/vnext/overrides.json b/vnext/overrides.json index 9871b2e5f77..27ce337e8a7 100644 --- a/vnext/overrides.json +++ b/vnext/overrides.json @@ -8,13 +8,13 @@ "**/__snapshots__/**", "src/rntypes/**" ], - "baseVersion": "0.73.0-nightly-20230920-630cf3b21", + "baseVersion": "0.73.0-nightly-20230925-2de964cfd", "overrides": [ { "type": "derived", "file": ".flowconfig", "baseFile": ".flowconfig", - "baseHash": "df2115e026fe77aef6f344f7523b09dd83be5626" + "baseHash": "fd2609719419d6fd262c1e7f993eb566ad2444f6" }, { "type": "derived", @@ -84,14 +84,14 @@ "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/conversions.h", "baseFile": "packages/react-native/ReactCommon/react/renderer/components/view/conversions.h", - "baseHash": "d35c79f6fb115a9697f6073298c65d0bb0f36181", + "baseHash": "bba752626a7f04ea611a8de6a64e6dea587be2b6", "issue": 12194 }, { "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/YogaLayoutableShadowNode.cpp", "baseFile": "packages/react-native/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp", - "baseHash": "047770f470684457e40e20fb4e445e75e173fbeb", + "baseHash": "fdd521a20bbe5d52c7f2d67daa4f6f56396b5c1b", "issue": 12194 }, { @@ -126,14 +126,14 @@ "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.h", "baseFile": "packages/react-native/ReactCommon/yoga/yoga/node/LayoutResults.h", - "baseHash": "bce90f359ab86c20a9d4a3b1dcf1a85f45b421b0", + "baseHash": "7a3bfa391567fd51b10d205a98399bc972048feb", "issue": 12195 }, { "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/Node.cpp", "baseFile": "packages/react-native/ReactCommon/yoga/yoga/node/Node.cpp", - "baseHash": "f264594ad7693905cacb1eced2c593ca279a5606", + "baseHash": "645ebb0c8be1bc35ba18ef4e27b1043d1fe8f044", "issue": 12194 }, { @@ -147,7 +147,7 @@ "type": "patch", "file": "ReactCommon/Yoga.cpp", "baseFile": "packages/react-native/ReactCommon/yoga/yoga/Yoga.cpp", - "baseHash": "1fe1bfaa69a2952b110bcd39ca48b44e972ccc89", + "baseHash": "26324497c09eae95743eb2fbd4b85c40a36cd100", "issue": 3994 }, { @@ -329,7 +329,7 @@ "type": "derived", "file": "src/Libraries/Components/ScrollView/ScrollView.windows.js", "baseFile": "packages/react-native/Libraries/Components/ScrollView/ScrollView.js", - "baseHash": "1254528d4082b82fe26d147676b812940bff63ac" + "baseHash": "87a276aff215fedb38d7ced5d9aef61224ebe0c2" }, { "type": "derived", @@ -341,13 +341,13 @@ "type": "derived", "file": "src/Libraries/Components/Switch/Switch.windows.js", "baseFile": "packages/react-native/Libraries/Components/Switch/Switch.js", - "baseHash": "31b8cd62b5acb1a237f5373d1618869f5afebdd3" + "baseHash": "e34649d5441548e6c8c55ebefb472048480ecc4c" }, { "type": "patch", "file": "src/Libraries/Components/TextInput/TextInput.windows.js", "baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.js", - "baseHash": "b3075e093f75337144dc7e54194d9d01d4a82aa1" + "baseHash": "4e2811777a14ba8f87dc0a36ca11fcf390bd8def" }, { "type": "patch", @@ -382,13 +382,13 @@ "type": "patch", "file": "src/Libraries/Components/Touchable/TouchableOpacity.windows.js", "baseFile": "packages/react-native/Libraries/Components/Touchable/TouchableOpacity.js", - "baseHash": "1de89d328e0e4c36a18aa488c8663397e860ef2c" + "baseHash": "32207d2986dfdf5bae921fec345e4043924fb02c" }, { "type": "patch", "file": "src/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js", "baseFile": "packages/react-native/Libraries/Components/Touchable/TouchableWithoutFeedback.js", - "baseHash": "e4c1120a4e8338914b6ad5639811ef2b09b391cc" + "baseHash": "67f68a4a8ccb4834a680af7fb2f75ed9360bbc91" }, { "type": "patch", @@ -401,7 +401,7 @@ "type": "patch", "file": "src/Libraries/Components/View/View.windows.js", "baseFile": "packages/react-native/Libraries/Components/View/View.js", - "baseHash": "f6813acaf2043e39f0d57fa9f667c5bbb5202daa" + "baseHash": "f25ca9bd8f25d1dd05d98d40946a41b19fac87f1" }, { "type": "derived", @@ -437,7 +437,7 @@ "type": "patch", "file": "src/Libraries/Image/Image.windows.js", "baseFile": "packages/react-native/Libraries/Image/Image.ios.js", - "baseHash": "69dca1ad9864b7f2468e8f6026203cb98332c690", + "baseHash": "ead4aaa048a5ae0186d3f8ade054b970a2115a3a", "issue": 4590 }, { @@ -526,7 +526,7 @@ "type": "derived", "file": "src/Libraries/Text/Text.windows.js", "baseFile": "packages/react-native/Libraries/Text/Text.js", - "baseHash": "f56a969c163de4f20bcdefaa42792f31c3497888" + "baseHash": "02a8ebee89958ab16c6014c2fe1d5b6253113918" }, { "type": "derived", diff --git a/vnext/package.json b/vnext/package.json index 19b0ec3e14f..519c1f26dcc 100644 --- a/vnext/package.json +++ b/vnext/package.json @@ -23,18 +23,18 @@ "dependencies": { "@babel/runtime": "^7.0.0", "@jest/create-cache-key-function": "^29.6.3", - "@react-native-community/cli": "12.0.0-alpha.12", - "@react-native-community/cli-platform-android": "12.0.0-alpha.12", - "@react-native-community/cli-platform-ios": "12.0.0-alpha.12", + "@react-native-community/cli": "12.0.0-alpha.15", + "@react-native-community/cli-platform-android": "12.0.0-alpha.15", + "@react-native-community/cli-platform-ios": "12.0.0-alpha.15", "@react-native-windows/cli": "0.0.0-canary.191", "@react-native/assets": "1.0.0", - "@react-native/assets-registry": "0.73.0-nightly-20230622-0201e51bb", - "@react-native/codegen": "0.73.0-nightly-20230918-1ac3dab6e", - "@react-native/community-cli-plugin": "^0.73.0", - "@react-native/gradle-plugin": "0.73.0-nightly-20230918-1ac3dab6e", - "@react-native/js-polyfills": "0.73.0-nightly-20230622-0201e51bb", - "@react-native/normalize-colors": "0.73.0-nightly-20230622-0201e51bb", - "@react-native/virtualized-lists": "0.73.0-nightly-20230912-0e5ea2890", + "@react-native/assets-registry": "0.73.0-nightly-20230925-2de964cfd", + "@react-native/codegen": "0.73.0-nightly-20230925-2de964cfd", + "@react-native/community-cli-plugin": "0.73.0-nightly-20230925-2de964cfd", + "@react-native/gradle-plugin": "0.73.0-nightly-20230925-2de964cfd", + "@react-native/js-polyfills": "0.73.0-nightly-20230925-2de964cfd", + "@react-native/normalize-colors": "0.73.0-nightly-20230925-2de964cfd", + "@react-native/virtualized-lists": "0.73.0-nightly-20230925-2de964cfd", "abort-controller": "^3.0.0", "anser": "^1.4.9", "ansi-regex": "^5.0.0", @@ -53,7 +53,7 @@ "pretty-format": "^26.5.2", "promise": "^8.3.0", "react-devtools-core": "^4.27.7", - "react-refresh": "^0.4.0", + "react-refresh": "^0.14.0", "react-shallow-renderer": "^16.15.0", "regenerator-runtime": "^0.13.2", "scheduler": "0.24.0-canary-efb381bbf-20230505", @@ -81,14 +81,14 @@ "just-scripts": "^1.3.3", "prettier": "^2.4.1", "react": "18.2.0", - "react-native": "0.73.0-nightly-20230920-630cf3b21", + "react-native": "0.73.0-nightly-20230925-2de964cfd", "react-native-platform-override": "^1.9.15", "react-refresh": "^0.4.0", "typescript": "^4.9.5" }, "peerDependencies": { "react": "18.2.0", - "react-native": "0.73.0-nightly-20230920-630cf3b21" + "react-native": "0.73.0-nightly-20230925-2de964cfd" }, "beachball": { "defaultNpmTag": "canary", diff --git a/vnext/src/Libraries/Components/Glyph/Glyph.js b/vnext/src/Libraries/Components/Glyph/Glyph.js index 6868b1e781e..fd2b0788d26 100644 --- a/vnext/src/Libraries/Components/Glyph/Glyph.js +++ b/vnext/src/Libraries/Components/Glyph/Glyph.js @@ -36,7 +36,7 @@ export const Glyph: React.AbstractComponent< const nativeSwitchRef = React.useRef | null>(null); - + // $FlowFixMe[incompatible-call] const ref = useMergeRefs(nativeSwitchRef, forwardedRef); return ; diff --git a/vnext/src/Libraries/Components/ScrollView/ScrollView.windows.js b/vnext/src/Libraries/Components/ScrollView/ScrollView.windows.js index bbcd62726e8..512d521ea74 100644 --- a/vnext/src/Libraries/Components/ScrollView/ScrollView.windows.js +++ b/vnext/src/Libraries/Components/ScrollView/ScrollView.windows.js @@ -1665,6 +1665,7 @@ class ScrollView extends React.Component { // $FlowFixMe[underconstrained-implicit-instantiation] const style = flattenStyle(this.props.style); const childLayoutProps = ['alignItems', 'justifyContent'].filter( + // $FlowFixMe[incompatible-use] prop => style && style[prop] !== undefined, ); invariant( @@ -1837,6 +1838,7 @@ class ScrollView extends React.Component { // Note: we should split props.style on the inner and outer props // however, the ScrollView still needs the baseStyle to be scrollable // $FlowFixMe[underconstrained-implicit-instantiation] + // $FlowFixMe[incompatible-call] const {outer, inner} = splitLayoutProps(flattenStyle(props.style)); return React.cloneElement( refreshControl, @@ -1924,6 +1926,7 @@ function Wrapper(props, ref: (mixed => mixed) | {current: mixed, ...}) { return ; } Wrapper.displayName = 'ScrollView'; +// $FlowFixMe[incompatible-call] const ForwardedScrollView = React.forwardRef(Wrapper); // $FlowFixMe[prop-missing] Add static context to ForwardedScrollView diff --git a/vnext/src/Libraries/Components/Switch/Switch.windows.js b/vnext/src/Libraries/Components/Switch/Switch.windows.js index d1c83cf33b0..a516819513c 100644 --- a/vnext/src/Libraries/Components/Switch/Switch.windows.js +++ b/vnext/src/Libraries/Components/Switch/Switch.windows.js @@ -156,6 +156,7 @@ const SwitchWithForwardedRef: React.AbstractComponent< typeof SwitchNativeComponent | typeof AndroidSwitchNativeComponent, > | null>(null); + // $FlowFixMe[incompatible-call] const ref = useMergeRefs(nativeSwitchRef, forwardedRef); const [native, setNative] = React.useState({value: (null: ?boolean)}); diff --git a/vnext/src/Libraries/Components/TextInput/TextInput.windows.js b/vnext/src/Libraries/Components/TextInput/TextInput.windows.js index f714bde2608..0dd1e85ac67 100644 --- a/vnext/src/Libraries/Components/TextInput/TextInput.windows.js +++ b/vnext/src/Libraries/Components/TextInput/TextInput.windows.js @@ -1810,6 +1810,7 @@ const autoCompleteWebToTextContentTypeMap = { const ExportedForwardRef: React.AbstractComponent< React.ElementConfig, TextInputInstance, + // $FlowFixMe[incompatible-call] > = React.forwardRef(function TextInput( { allowFontScaling = true, @@ -1832,8 +1833,13 @@ const ExportedForwardRef: React.AbstractComponent< let style = flattenStyle(restProps.style); if (style?.verticalAlign != null) { + // $FlowFixMe[prop-missing] + // $FlowFixMe[cannot-write] style.textAlignVertical = + // $FlowFixMe[invalid-computed-prop] verticalAlignToTextAlignVerticalMap[style.verticalAlign]; + // $FlowFixMe[prop-missing] + // $FlowFixMe[cannot-write] delete style.verticalAlign; } diff --git a/vnext/src/Libraries/Components/Touchable/TouchableOpacity.windows.js b/vnext/src/Libraries/Components/Touchable/TouchableOpacity.windows.js index fed33ca0a09..c5915ad65c1 100644 --- a/vnext/src/Libraries/Components/Touchable/TouchableOpacity.windows.js +++ b/vnext/src/Libraries/Components/Touchable/TouchableOpacity.windows.js @@ -209,6 +209,7 @@ class TouchableOpacity extends React.Component { _getChildStyleOpacityWithDefault(): number { // $FlowFixMe[underconstrained-implicit-instantiation] + // $FlowFixMe[prop-missing] const opacity = flattenStyle(this.props.style)?.opacity; return typeof opacity === 'number' ? opacity : 1; } @@ -318,8 +319,10 @@ class TouchableOpacity extends React.Component { if ( this.props.disabled !== prevProps.disabled || // $FlowFixMe[underconstrained-implicit-instantiation] + // $FlowFixMe[prop-missing] flattenStyle(prevProps.style)?.opacity !== // $FlowFixMe[underconstrained-implicit-instantiation] + // $FlowFixMe[prop-missing] flattenStyle(this.props.style)?.opacity ) { this._opacityInactive(250); diff --git a/vnext/src/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js b/vnext/src/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js index a7479313ff8..bcf452288e2 100644 --- a/vnext/src/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +++ b/vnext/src/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js @@ -196,6 +196,7 @@ class TouchableWithoutFeedback extends React.Component { } } + // $FlowFixMe[incompatible-call] return React.cloneElement(element, elementProps, ...children); } diff --git a/vnext/src/Libraries/Components/View/View.windows.js b/vnext/src/Libraries/Components/View/View.windows.js index b094203ff2f..5367fe62da8 100644 --- a/vnext/src/Libraries/Components/View/View.windows.js +++ b/vnext/src/Libraries/Components/View/View.windows.js @@ -110,6 +110,7 @@ const View: React.AbstractComponent< // $FlowFixMe[underconstrained-implicit-instantiation] let style = flattenStyle(otherProps.style); + // $FlowFixMe[sketchy-null-mixed] const newPointerEvents = style?.pointerEvents || pointerEvents; const collapsableOverride = ReactNativeFeatureFlags.shouldForceUnflattenForElevation() @@ -250,6 +251,7 @@ const View: React.AbstractComponent< } nativeID={id ?? nativeID} style={style} + // $FlowFixMe[incompatible-type] pointerEvents={newPointerEvents} ref={forwardedRef} onKeyDown={_keyDown} diff --git a/vnext/src/Libraries/Image/Image.windows.js b/vnext/src/Libraries/Image/Image.windows.js index 8fd1cd7e725..81b5c168903 100644 --- a/vnext/src/Libraries/Image/Image.windows.js +++ b/vnext/src/Libraries/Image/Image.windows.js @@ -135,7 +135,8 @@ const BaseImage = (props: ImagePropsType, forwardedRef) => { const objectFit = // $FlowFixMe[prop-missing] style && style.objectFit - ? convertObjectFitToResizeMode(style.objectFit) + ? // $FlowFixMe[incompatible-call] + convertObjectFitToResizeMode(style.objectFit) : null; const resizeMode = // $FlowFixMe[prop-missing] @@ -185,11 +186,12 @@ const BaseImage = (props: ImagePropsType, forwardedRef) => { return (