From 08bea177618efe74c69e29f89c38c42d2ce7acf0 Mon Sep 17 00:00:00 2001 From: TatianaKapos Date: Mon, 17 Oct 2022 11:11:52 -0700 Subject: [PATCH 1/3] integration --- .../react-native-win32-tester/overrides.json | 2 +- .../react-native-win32-tester/package.json | 4 +- .../react-native-win32/.flowconfig | 2 +- .../react-native-win32/overrides.json | 16 +- .../react-native-win32/package.json | 18 +- .../AccessibilityInfo.win32.js | 32 ++- .../DatePicker/DatePickerIOS.win32.js | 3 +- .../Components/View/ViewPropTypes.win32.js | 4 + .../Libraries/Inspector/Inspector.win32.js | 38 --- .../Libraries/StyleSheet/StyleSheet.win32.js | 7 +- .../automation-channel/package.json | 2 +- .../tester/overrides.json | 4 +- .../@react-native-windows/tester/package.json | 4 +- .../Flyout/FlyoutExample.windows.tsx | 3 +- .../TextInput/TextInputExample.windows.js | 50 +++- .../virtualized-list/.flowconfig | 2 +- .../virtualized-list/overrides.json | 4 +- .../virtualized-list/package.json | 6 +- .../@react-native/repo-config/overrides.json | 4 +- .../@react-native/repo-config/package.json | 6 +- .../Accessibility/AccessibilityExample.js | 16 ++ .../PointerEventAttributesNoHoverPointers.js | 5 +- .../Experimental/W3CPointerEventsExample.js | 18 ++ .../js/examples/FlatList/FlatList-basic.js | 53 ++-- .../tester/js/examples/RTL/RTLExample.js | 1 + .../TextInput/TextInputExample.android.js | 50 +++- .../TextInput/TextInputExample.ios.js | 29 ++ packages/@react-native/tester/overrides.json | 4 +- .../metro-dev-config/package.json | 2 +- packages/e2e-test-app/package.json | 2 +- packages/integration-test-app/package.json | 2 +- packages/playground/package.json | 2 +- packages/sample-apps/package.json | 2 +- vnext/.flowconfig | 2 +- .../TextInput/WindowsTextInputState.cpp | 42 +++ .../TextInput/WindowsTextInputState.h | 2 + .../IntegrationTests/AppEventsTest.js | 1 - .../NativeAccessibilityManagerSpec.g.h | 28 +- vnext/overrides.json | 28 +- vnext/package.json | 18 +- .../AccessibilityInfo.windows.js | 32 ++- .../Libraries/Components/Button.windows.js | 3 +- .../DatePicker/DatePickerIOS.windows.js | 3 +- .../Components/TextInput/TextInput.windows.js | 18 ++ .../Components/View/ViewPropTypes.windows.js | 4 + .../StyleSheet/processTransform.windows.js | 113 +------- yarn.lock | 270 ++++++++++++------ 47 files changed, 602 insertions(+), 359 deletions(-) diff --git a/packages/@office-iss/react-native-win32-tester/overrides.json b/packages/@office-iss/react-native-win32-tester/overrides.json index d69b2b1856d..ab784cc1784 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.0.0-20220812-2104-23429330a", + "baseVersion": "0.0.0-20220826-2018-9ac437f25", "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 e9bb4370f17..17516f16afd 100644 --- a/packages/@office-iss/react-native-win32-tester/package.json +++ b/packages/@office-iss/react-native-win32-tester/package.json @@ -18,7 +18,7 @@ "peerDependencies": { "@office-iss/react-native-win32": "^0.0.0-canary.163", "react": "18.0.0", - "react-native": "0.0.0-20220812-2104-23429330a" + "react-native": "0.0.0-20220826-2018-9ac437f25" }, "devDependencies": { "@office-iss/react-native-win32": "^0.0.0-canary.163", @@ -29,7 +29,7 @@ "@types/node": "^14.14.22", "eslint": "^8.19.0", "just-scripts": "^1.3.3", - "react-native": "0.0.0-20220812-2104-23429330a", + "react-native": "0.0.0-20220826-2018-9ac437f25", "react-native-platform-override": "^1.7.1", "typescript": "^4.4.4" }, diff --git a/packages/@office-iss/react-native-win32/.flowconfig b/packages/@office-iss/react-native-win32/.flowconfig index da32b6a4314..f35056aafd3 100644 --- a/packages/@office-iss/react-native-win32/.flowconfig +++ b/packages/@office-iss/react-native-win32/.flowconfig @@ -124,4 +124,4 @@ untyped-import untyped-type-import [version] -^0.184.0 +^0.185.1 diff --git a/packages/@office-iss/react-native-win32/overrides.json b/packages/@office-iss/react-native-win32/overrides.json index c107f333604..fdf810c4506 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.0.0-20220812-2104-23429330a", + "baseVersion": "0.0.0-20220826-2018-9ac437f25", "overrides": [ { "type": "derived", "file": ".flowconfig", "baseFile": ".flowconfig", - "baseHash": "e7e5f1d81cb946157ecfb9392585958b5fac442d" + "baseHash": "96ff12c38ea31691ca99dd8848e38217ffbd1417" }, { "type": "derived", @@ -31,7 +31,7 @@ "type": "patch", "file": "src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js", "baseFile": "Libraries/Components/AccessibilityInfo/AccessibilityInfo.js", - "baseHash": "318fa0b04d231c747d95bc4fb34a9a4152009786", + "baseHash": "86911d26a839aa1ebe91b6abc0fe910e09ba62e5", "issue": 4578 }, { @@ -53,7 +53,7 @@ "type": "copy", "file": "src/Libraries/Components/DatePicker/DatePickerIOS.win32.js", "baseFile": "Libraries/Components/DatePicker/DatePickerIOS.android.js", - "baseHash": "3c5bb9a7284f3a0a19d309bdf54701b865f9c56b", + "baseHash": "d4d3f2157abce118c9b9ad63ab2cad0cfa1979a0", "issue": 4378 }, { @@ -117,7 +117,7 @@ "type": "derived", "file": "src/Libraries/Components/TextInput/TextInput.win32.tsx", "baseFile": "Libraries/Components/TextInput/TextInput.js", - "baseHash": "44fadc4a6bc51291e44f6bb8d7f38563e63bcbff" + "baseHash": "9cff22dbd054762b03f9e40ce45b03cca67a62f5" }, { "type": "patch", @@ -183,7 +183,7 @@ "type": "patch", "file": "src/Libraries/Components/View/ViewPropTypes.win32.js", "baseFile": "Libraries/Components/View/ViewPropTypes.js", - "baseHash": "52170daa86f15afc549b4f284371e4c4154aa3dd", + "baseHash": "40cda23c445a8edaa16e6d7b924963da70bc374c", "issue": 6240 }, { @@ -259,7 +259,7 @@ "type": "patch", "file": "src/Libraries/Inspector/Inspector.win32.js", "baseFile": "Libraries/Inspector/Inspector.js", - "baseHash": "a335353c8e7299f8de2601104e2056eeb16ea041" + "baseHash": "f3f862f878ce5252067ecb9f86b3a6057493b8dc" }, { "type": "patch", @@ -429,7 +429,7 @@ "type": "patch", "file": "src/Libraries/StyleSheet/StyleSheet.win32.js", "baseFile": "Libraries/StyleSheet/StyleSheet.js", - "baseHash": "975f5840fa52fd7e66e136d0ff1ae805be119419" + "baseHash": "3e851444e5a21392bcd1a84418729feedd25a527" }, { "type": "derived", diff --git a/packages/@office-iss/react-native-win32/package.json b/packages/@office-iss/react-native-win32/package.json index 74bb5b5add1..29adf541466 100644 --- a/packages/@office-iss/react-native-win32/package.json +++ b/packages/@office-iss/react-native-win32/package.json @@ -22,9 +22,9 @@ "dependencies": { "@babel/runtime": "^7.0.0", "@jest/create-cache-key-function": "^27.0.1", - "@react-native-community/cli": "^9.0.0-alpha.11", - "@react-native-community/cli-platform-android": "^9.0.0-alpha.10", - "@react-native-community/cli-platform-ios": "^9.0.0-alpha.10", + "@react-native-community/cli": "^9.0.0", + "@react-native-community/cli-platform-android": "^9.0.0", + "@react-native-community/cli-platform-ios": "^9.0.0", "@react-native-windows/virtualized-list": "0.0.0-canary.52", "@react-native/assets": "1.0.0", "@react-native/normalize-color": "2.0.0", @@ -37,9 +37,9 @@ "invariant": "^2.2.4", "jsc-android": "^250230.2.1", "memoize-one": "^5.0.0", - "metro-react-native-babel-transformer": "0.72.0", - "metro-runtime": "0.72.0", - "metro-source-map": "0.72.0", + "metro-react-native-babel-transformer": "0.72.1", + "metro-runtime": "0.72.1", + "metro-source-map": "0.72.1", "mkdirp": "^0.5.1", "nullthrows": "^1.1.1", "pretty-format": "^26.5.2", @@ -71,19 +71,19 @@ "@types/react": "^18.0.0", "@types/react-native": "^0.66.17", "eslint": "^8.19.0", - "flow-bin": "^0.184.0", + "flow-bin": "^0.185.1", "jscodeshift": "^0.13.1", "just-scripts": "^1.3.3", "prettier": "^2.4.1", "react": "18.2.0", - "react-native": "0.0.0-20220812-2104-23429330a", + "react-native": "0.0.0-20220826-2018-9ac437f25", "react-native-platform-override": "^1.7.1", "react-shallow-renderer": "16.14.1", "typescript": "^4.4.4" }, "peerDependencies": { "react": "18.2.0", - "react-native": "0.0.0-20220812-2104-23429330a" + "react-native": "0.0.0-20220826-2018-9ac437f25" }, "beachball": { "defaultNpmTag": "canary", diff --git a/packages/@office-iss/react-native-win32/src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js b/packages/@office-iss/react-native-win32/src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js index 1ad180e478f..71253d75baa 100644 --- a/packages/@office-iss/react-native-win32/src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +++ b/packages/@office-iss/react-native-win32/src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js @@ -17,6 +17,7 @@ import NativeAccessibilityInfo from './NativeAccessibilityInfo'; import NativeAccessibilityManagerIOS from './NativeAccessibilityManager'; import legacySendAccessibilityEvent from './legacySendAccessibilityEvent'; import type {ElementRef} from 'react'; +import type {AccessibilityInfo as AccessibilityInfoType} from './AccessibilityInfo.flow'; // Events that are only supported on Android. type AccessibilityEventDefinitionsAndroid = { @@ -79,7 +80,7 @@ const EventNames: Map< * * See https://reactnative.dev/docs/accessibilityinfo */ -const AccessibilityInfo = { +const AccessibilityInfo: AccessibilityInfoType = { /** * Query whether bold text is currently enabled. * @@ -184,6 +185,34 @@ const AccessibilityInfo = { }); }, + /** + * Query whether reduce motion and prefer cross-fade transitions settings are currently enabled. + * + * Returns a promise which resolves to a boolean. + * The result is `true` when prefer cross-fade transitions is enabled and `false` otherwise. + * + * See https://reactnative.dev/docs/accessibilityinfo#prefersCrossFadeTransitions + */ + prefersCrossFadeTransitions(): Promise { + return new Promise((resolve, reject) => { + if (Platform.OS === 'android') { + return Promise.resolve(false); + } else { + if ( + NativeAccessibilityManagerIOS?.getCurrentPrefersCrossFadeTransitionsState != + null + ) { + NativeAccessibilityManagerIOS.getCurrentPrefersCrossFadeTransitionsState( + resolve, + reject, + ); + } else { + reject(null); + } + } + }); + }, + /** * Query whether reduced transparency is currently enabled. * @@ -301,6 +330,7 @@ const AccessibilityInfo = { */ addEventListener>( eventName: K, + // $FlowIssue[incompatible-type] - Flow bug with unions and generics (T128099423) handler: (...$ElementType) => void, ): EventSubscription { const deviceEventName = EventNames.get(eventName); diff --git a/packages/@office-iss/react-native-win32/src/Libraries/Components/DatePicker/DatePickerIOS.win32.js b/packages/@office-iss/react-native-win32/src/Libraries/Components/DatePicker/DatePickerIOS.win32.js index e97edf657c2..738d08c51f3 100644 --- a/packages/@office-iss/react-native-win32/src/Libraries/Components/DatePicker/DatePickerIOS.win32.js +++ b/packages/@office-iss/react-native-win32/src/Libraries/Components/DatePicker/DatePickerIOS.win32.js @@ -12,6 +12,7 @@ import * as React from 'react'; import StyleSheet from '../../StyleSheet/StyleSheet'; import Text from '../../Text/Text'; import View from '../View/View'; +import type {DatePickerIOSType} from './DatePickerIOS.flow'; class DummyDatePickerIOS extends React.Component { render() { @@ -42,4 +43,4 @@ const styles = StyleSheet.create({ }, }); -module.exports = DummyDatePickerIOS; +module.exports = (DummyDatePickerIOS: DatePickerIOSType); diff --git a/packages/@office-iss/react-native-win32/src/Libraries/Components/View/ViewPropTypes.win32.js b/packages/@office-iss/react-native-win32/src/Libraries/Components/View/ViewPropTypes.win32.js index 1aa9cb7991d..ed56e3333d2 100644 --- a/packages/@office-iss/react-native-win32/src/Libraries/Components/View/ViewPropTypes.win32.js +++ b/packages/@office-iss/react-native-win32/src/Libraries/Components/View/ViewPropTypes.win32.js @@ -99,6 +99,10 @@ type PointerEventProps = $ReadOnly<{| onPointerDownCapture?: ?(e: PointerEvent) => void, onPointerUp?: ?(e: PointerEvent) => void, onPointerUpCapture?: ?(e: PointerEvent) => void, + onPointerOver?: ?(e: PointerEvent) => void, + onPointerOverCapture?: ?(e: PointerEvent) => void, + onPointerOut?: ?(e: PointerEvent) => void, + onPointerOutCapture?: ?(e: PointerEvent) => void, |}>; type FocusEventProps = $ReadOnly<{| diff --git a/packages/@office-iss/react-native-win32/src/Libraries/Inspector/Inspector.win32.js b/packages/@office-iss/react-native-win32/src/Libraries/Inspector/Inspector.win32.js index daad9482bac..6baa2668a6e 100644 --- a/packages/@office-iss/react-native-win32/src/Libraries/Inspector/Inspector.win32.js +++ b/packages/@office-iss/react-native-win32/src/Libraries/Inspector/Inspector.win32.js @@ -146,8 +146,6 @@ class Inspector extends React.Component< } _attachToDevtools = (agent: Object) => { - agent.addListener('hideNativeHighlight', this._onAgentHideNativeHighlight); - agent.addListener('showNativeHighlight', this._onAgentShowNativeHighlight); agent.addListener('shutdown', this._onAgentShutdown); this.setState({ @@ -155,45 +153,9 @@ class Inspector extends React.Component< }); }; - _onAgentHideNativeHighlight = () => { - if (this.state.inspected === null) { - return; - } - // we wait to actually hide in order to avoid flicker - this._hideTimeoutID = setTimeout(() => { - this.setState({ - inspected: null, - }); - }, 100); - }; - - _onAgentShowNativeHighlight = (node: any) => { - clearTimeout(this._hideTimeoutID); - - // Shape of `node` is different in Fabric. - const component = node.canonical ?? node; - - component.measure((x, y, width, height, left, top) => { - this.setState({ - hierarchy: [], - inspected: { - frame: {left, top, width, height}, - }, - }); - }); - }; - _onAgentShutdown = () => { const agent = this.state.devtoolsAgent; if (agent != null) { - agent.removeListener( - 'hideNativeHighlight', - this._onAgentHideNativeHighlight, - ); - agent.removeListener( - 'showNativeHighlight', - this._onAgentShowNativeHighlight, - ); agent.removeListener('shutdown', this._onAgentShutdown); this.setState({devtoolsAgent: null}); diff --git a/packages/@office-iss/react-native-win32/src/Libraries/StyleSheet/StyleSheet.win32.js b/packages/@office-iss/react-native-win32/src/Libraries/StyleSheet/StyleSheet.win32.js index 47549975d37..d146834296c 100644 --- a/packages/@office-iss/react-native-win32/src/Libraries/StyleSheet/StyleSheet.win32.js +++ b/packages/@office-iss/react-native-win32/src/Libraries/StyleSheet/StyleSheet.win32.js @@ -349,7 +349,12 @@ module.exports = { return; } - if (__DEV__ && typeof value.process === 'function') { + if ( + __DEV__ && + typeof value.process === 'function' && + typeof ReactNativeStyleAttributes[property]?.process === 'function' && + value.process !== ReactNativeStyleAttributes[property]?.process + ) { console.warn(`Overwriting ${property} style attribute preprocessor`); } diff --git a/packages/@react-native-windows/automation-channel/package.json b/packages/@react-native-windows/automation-channel/package.json index aa6cd3114c5..04808069595 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.0.0-20220812-2104-23429330a", + "react-native": "0.0.0-20220826-2018-9ac437f25", "react-native-windows": "^0.0.0-canary.564", "typescript": "^4.4.4" }, diff --git a/packages/@react-native-windows/tester/overrides.json b/packages/@react-native-windows/tester/overrides.json index c09d1b65d8e..7a237f9f6f8 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.0.0-20220812-2104-23429330a", + "baseVersion": "0.0.0-20220826-2018-9ac437f25", "overrides": [ { "type": "patch", @@ -25,7 +25,7 @@ "type": "patch", "file": "src/js/examples/TextInput/TextInputExample.windows.js", "baseFile": "packages/rn-tester/js/examples/TextInput/TextInputExample.android.js", - "baseHash": "75b31e8bd6e2f4eeb8f0fd4f9b35085350cfe364", + "baseHash": "332de8eb4961a98492b88178b0e21fab52cd5155", "issue": 5688 }, { diff --git a/packages/@react-native-windows/tester/package.json b/packages/@react-native-windows/tester/package.json index 4ea291ae039..6848b8efef8 100644 --- a/packages/@react-native-windows/tester/package.json +++ b/packages/@react-native-windows/tester/package.json @@ -17,7 +17,7 @@ "peerDependencies": { "@react-native-picker/picker": "2.2.0", "react": "18.0.0", - "react-native": "0.0.0-20220812-2104-23429330a", + "react-native": "0.0.0-20220826-2018-9ac437f25", "react-native-windows": "^0.0.0-canary.564", "react-native-xaml": "^0.0.50" }, @@ -30,7 +30,7 @@ "@types/node": "^14.14.22", "eslint": "^8.19.0", "just-scripts": "^1.3.3", - "react-native": "0.0.0-20220812-2104-23429330a", + "react-native": "0.0.0-20220826-2018-9ac437f25", "react-native-platform-override": "^1.7.1", "react-native-windows": "^0.0.0-canary.564", "typescript": "^4.4.4" diff --git a/packages/@react-native-windows/tester/src/js/examples-win/Flyout/FlyoutExample.windows.tsx b/packages/@react-native-windows/tester/src/js/examples-win/Flyout/FlyoutExample.windows.tsx index a7e1a8fb416..ba54b5a0146 100644 --- a/packages/@react-native-windows/tester/src/js/examples-win/Flyout/FlyoutExample.windows.tsx +++ b/packages/@react-native-windows/tester/src/js/examples-win/Flyout/FlyoutExample.windows.tsx @@ -39,9 +39,8 @@ const placementValues: string[] = [ ]; class FlyoutExample extends React.Component<{}, IFlyoutExampleState> { - // eslint-disable-next-line @typescript-eslint/prefer-readonly private _anchor: any; - // eslint-disable-next-line @typescript-eslint/prefer-readonly + private _anchorTwo: any; public state: IFlyoutExampleState = { diff --git a/packages/@react-native-windows/tester/src/js/examples/TextInput/TextInputExample.windows.js b/packages/@react-native-windows/tester/src/js/examples/TextInput/TextInputExample.windows.js index c19b19c5137..f2554754a3d 100644 --- a/packages/@react-native-windows/tester/src/js/examples/TextInput/TextInputExample.windows.js +++ b/packages/@react-native-windows/tester/src/js/examples/TextInput/TextInputExample.windows.js @@ -244,6 +244,13 @@ const styles = StyleSheet.create({ singleLineWithHeightTextInput: { height: 30, }, + default: { + borderWidth: StyleSheet.hairlineWidth, + borderColor: '#0f0f0f', + flex: 1, + fontSize: 13, + padding: 4, + }, }); exports.title = 'TextInput'; @@ -443,6 +450,35 @@ exports.examples = ([ ); }, }, + { + title: 'Editable and Read only', + render: function (): React.Node { + return ( + + + + + + + ); + }, + }, { title: 'Fixed number of lines', platform: 'android', @@ -452,12 +488,22 @@ exports.examples = ([ + + ); diff --git a/packages/@react-native-windows/virtualized-list/.flowconfig b/packages/@react-native-windows/virtualized-list/.flowconfig index 123989f953a..adba3263af5 100644 --- a/packages/@react-native-windows/virtualized-list/.flowconfig +++ b/packages/@react-native-windows/virtualized-list/.flowconfig @@ -76,4 +76,4 @@ untyped-import untyped-type-import [version] -^0.184.0 +^0.185.1 diff --git a/packages/@react-native-windows/virtualized-list/overrides.json b/packages/@react-native-windows/virtualized-list/overrides.json index 09c8b39f409..b6a32fa3b23 100644 --- a/packages/@react-native-windows/virtualized-list/overrides.json +++ b/packages/@react-native-windows/virtualized-list/overrides.json @@ -3,13 +3,13 @@ ".flowconfig", "src/**" ], - "baseVersion": "0.0.0-20220812-2104-23429330a", + "baseVersion": "0.0.0-20220826-2018-9ac437f25", "overrides": [ { "type": "derived", "file": ".flowconfig", "baseFile": ".flowconfig", - "baseHash": "e7e5f1d81cb946157ecfb9392585958b5fac442d" + "baseHash": "96ff12c38ea31691ca99dd8848e38217ffbd1417" }, { "type": "copy", diff --git a/packages/@react-native-windows/virtualized-list/package.json b/packages/@react-native-windows/virtualized-list/package.json index 5f4f171ca4a..35a4c75e5e7 100644 --- a/packages/@react-native-windows/virtualized-list/package.json +++ b/packages/@react-native-windows/virtualized-list/package.json @@ -22,15 +22,15 @@ "@rnw-scripts/just-task": "2.2.6", "eslint": "^8.19.0", "eslint-plugin-prettier": "^4.2.1", - "flow-bin": "^0.184.0", + "flow-bin": "^0.185.1", "prettier": "^2.4.1", "react": "18.2.0", - "react-native": "0.0.0-20220812-2104-23429330a", + "react-native": "0.0.0-20220826-2018-9ac437f25", "react-native-platform-override": "^1.7.1" }, "peerDependencies": { "react": "18.0.0", - "react-native": "0.0.0-20220812-2104-23429330a" + "react-native": "0.0.0-20220826-2018-9ac437f25" }, "beachball": { "defaultNpmTag": "canary", diff --git a/packages/@react-native/repo-config/overrides.json b/packages/@react-native/repo-config/overrides.json index b16fa405d6c..1a32df8e0d0 100644 --- a/packages/@react-native/repo-config/overrides.json +++ b/packages/@react-native/repo-config/overrides.json @@ -1,11 +1,11 @@ { - "baseVersion": "0.0.0-20220812-2104-23429330a", + "baseVersion": "0.0.0-20220826-2018-9ac437f25", "overrides": [ { "type": "copy", "file": "package.json", "baseFile": "repo-config/package.json", - "baseHash": "5d293f63bb3aa0fd67795e6b92dab44c70abe5b6" + "baseHash": "12519365d1dcf8cd0c46235b2224eb1291a3aef7" } ] } \ No newline at end of file diff --git a/packages/@react-native/repo-config/package.json b/packages/@react-native/repo-config/package.json index 9b4f7df2b23..552a56e85c2 100644 --- a/packages/@react-native/repo-config/package.json +++ b/packages/@react-native/repo-config/package.json @@ -32,13 +32,13 @@ "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-native": "^4.0.0", "eslint-plugin-relay": "^1.8.3", - "flow-bin": "^0.184.0", + "flow-bin": "^0.185.1", "inquirer": "^7.1.0", "jest": "^26.6.3", "jest-junit": "^10.0.0", "jscodeshift": "^0.13.1", - "metro-babel-register": "0.72.0", - "metro-memory-fs": "0.72.0", + "metro-babel-register": "0.72.1", + "metro-memory-fs": "0.72.1", "mkdirp": "^0.5.1", "prettier": "^2.4.1", "react": "18.2.0", diff --git a/packages/@react-native/tester/js/examples/Accessibility/AccessibilityExample.js b/packages/@react-native/tester/js/examples/Accessibility/AccessibilityExample.js index 294db3d0e28..e3c6e333300 100644 --- a/packages/@react-native/tester/js/examples/Accessibility/AccessibilityExample.js +++ b/packages/@react-native/tester/js/examples/Accessibility/AccessibilityExample.js @@ -27,6 +27,7 @@ const { StyleSheet, Slider, Platform, + Switch, } = require('react-native'); import type {EventSubscription} from 'react-native/Libraries/vendor/emitter/EventEmitter'; @@ -228,6 +229,16 @@ class AccessibilityExample extends React.Component<{}> { /> + + + Enable Notifications + + + ); } @@ -1172,6 +1183,11 @@ class DisplayOptionsStatusExample extends React.Component<{}> { optionChecker={AccessibilityInfo.isReduceMotionEnabled} notification={'reduceMotionChanged'} /> + void}) { log={log} style={StyleSheet.compose(styles.eventfulView, styles.parent)} onUp + onOver + onOut onDown onEnter onLeave @@ -137,6 +151,8 @@ function RelativeChildExample({log}: {log: string => void}) { void}) { { }; _onChangeScrollToIndex = (text: mixed) => { - this._listRef.scrollToIndex({viewPosition: 0.5, index: Number(text)}); + this._listRef?.scrollToIndex({viewPosition: 0.5, index: Number(text)}); }; // $FlowFixMe[missing-local-annot] @@ -111,7 +112,7 @@ class FlatListExample extends React.PureComponent { ); componentDidUpdate() { - this._listRef.recordInteraction(); // e.g. flipping logViewable switch + this._listRef?.recordInteraction(); // e.g. flipping logViewable switch } _setBooleanValue: string => boolean => void = key => value => @@ -270,7 +271,7 @@ class FlatListExample extends React.PureComponent { React.ElementConfig, React.ElementRef, >, - >, + > | null, ) => { this._listRef = ref; }; @@ -297,31 +298,25 @@ class FlatListExample extends React.PureComponent { _onRefresh = () => Alert.alert('onRefresh: nothing to refresh :P'); // $FlowFixMe[missing-local-annot] _renderItemComponent = () => { - const flatListPropKey = this.state.useFlatListItemComponent - ? 'ListItemComponent' - : 'renderItem'; - - return { - renderItem: undefined, - /* $FlowFixMe[invalid-computed-prop] (>=0.111.0 site=react_native_fb) - * This comment suppresses an error found when Flow v0.111 was deployed. - * To see the error, delete this comment and run Flow. */ - /* $FlowFixMe[missing-local-annot] The type annotation(s) required by - * Flow's LTI update could not be added via codemod */ - [flatListPropKey]: ({item, separators}) => { - return ( - - ); - }, + const renderProp = ({item, separators}: RenderItemProps) => { + return ( + + ); }; + return this.state.useFlatListItemComponent + ? { + renderItem: undefined, + ListItemComponent: renderProp, + } + : {renderItem: renderProp}; }; // This is called when items change viewability by scrolling into or out of // the viewable area. @@ -346,7 +341,7 @@ class FlatListExample extends React.PureComponent { }; _pressItem = (key: string) => { - this._listRef && this._listRef.recordInteraction(); + this._listRef?.recordInteraction(); const index = Number(key); const itemState = pressItem(this.state.data[index]); this.setState(state => ({ @@ -359,7 +354,7 @@ class FlatListExample extends React.PureComponent { })); }; - _listRef: React.ElementRef; + _listRef: React.ElementRef | null; } const styles = StyleSheet.create({ diff --git a/packages/@react-native/tester/js/examples/RTL/RTLExample.js b/packages/@react-native/tester/js/examples/RTL/RTLExample.js index 9afedab7ffc..01bf6deea3e 100644 --- a/packages/@react-native/tester/js/examples/RTL/RTLExample.js +++ b/packages/@react-native/tester/js/examples/RTL/RTLExample.js @@ -167,6 +167,7 @@ function withRTLState( }; } + // $FlowFixMe[missing-local-annot] render() { const setRTL = (isRTL: boolean) => this.setState({isRTL: isRTL}); return ( diff --git a/packages/@react-native/tester/js/examples/TextInput/TextInputExample.android.js b/packages/@react-native/tester/js/examples/TextInput/TextInputExample.android.js index bf41299b8d3..2a4b1f704ab 100644 --- a/packages/@react-native/tester/js/examples/TextInput/TextInputExample.android.js +++ b/packages/@react-native/tester/js/examples/TextInput/TextInputExample.android.js @@ -148,6 +148,13 @@ const styles = StyleSheet.create({ singleLineWithHeightTextInput: { height: 30, }, + default: { + borderWidth: StyleSheet.hairlineWidth, + borderColor: '#0f0f0f', + flex: 1, + fontSize: 13, + padding: 4, + }, }); exports.title = 'TextInput'; @@ -347,6 +354,35 @@ exports.examples = ([ ); }, }, + { + title: 'Editable and Read only', + render: function (): React.Node { + return ( + + + + + + + ); + }, + }, { title: 'Fixed number of lines', platform: 'android', @@ -356,12 +392,22 @@ exports.examples = ([ + + ); diff --git a/packages/@react-native/tester/js/examples/TextInput/TextInputExample.ios.js b/packages/@react-native/tester/js/examples/TextInput/TextInputExample.ios.js index ba2be2aaf8e..b3940a1f833 100644 --- a/packages/@react-native/tester/js/examples/TextInput/TextInputExample.ios.js +++ b/packages/@react-native/tester/js/examples/TextInput/TextInputExample.ios.js @@ -621,6 +621,35 @@ exports.examples = ([ ); }, }, + { + title: 'Editable and Read only', + render: function (): React.Node { + return ( + + + + + + + ); + }, + }, { title: 'TextInput Intrinsic Size', render: function (): React.Node { diff --git a/packages/@react-native/tester/overrides.json b/packages/@react-native/tester/overrides.json index 82bb81057de..3c59775f113 100644 --- a/packages/@react-native/tester/overrides.json +++ b/packages/@react-native/tester/overrides.json @@ -1,11 +1,11 @@ { - "baseVersion": "0.0.0-20220812-2104-23429330a", + "baseVersion": "0.0.0-20220826-2018-9ac437f25", "overrides": [ { "type": "copy", "directory": "js", "baseDirectory": "packages/rn-tester/js", - "baseHash": "fec64c0b4e275a212fca16a018523a60957a764a", + "baseHash": "c30ede0970624e8b5225108cf0561d7a7470dc58", "issue": 4054 }, { diff --git a/packages/@rnw-scripts/metro-dev-config/package.json b/packages/@rnw-scripts/metro-dev-config/package.json index 0b5663b74c3..b5e1108e998 100644 --- a/packages/@rnw-scripts/metro-dev-config/package.json +++ b/packages/@rnw-scripts/metro-dev-config/package.json @@ -33,4 +33,4 @@ "engines": { "node": ">= 12.0.0" } -} \ No newline at end of file +} diff --git a/packages/e2e-test-app/package.json b/packages/e2e-test-app/package.json index d5c9312e2fa..1d8a5d1a7e8 100644 --- a/packages/e2e-test-app/package.json +++ b/packages/e2e-test-app/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.0.0-20220812-2104-23429330a", + "react-native": "0.0.0-20220826-2018-9ac437f25", "react-native-windows": "^0.0.0-canary.564", "react-native-xaml": "^0.0.68" }, diff --git a/packages/integration-test-app/package.json b/packages/integration-test-app/package.json index b740201b96d..f052ddb0432 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.0.0-20220812-2104-23429330a", + "react-native": "0.0.0-20220826-2018-9ac437f25", "react-native-windows": "^0.0.0-canary.564" }, "devDependencies": { diff --git a/packages/playground/package.json b/packages/playground/package.json index dc92a0e7ea1..2e80e783409 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.0.0-20220812-2104-23429330a", + "react-native": "0.0.0-20220826-2018-9ac437f25", "react-native-windows": "^0.0.0-canary.564" }, "devDependencies": { diff --git a/packages/sample-apps/package.json b/packages/sample-apps/package.json index 53fa0202343..dd18f961b9c 100644 --- a/packages/sample-apps/package.json +++ b/packages/sample-apps/package.json @@ -15,7 +15,7 @@ "@typescript-eslint/eslint-plugin": "^5.30.5", "@typescript-eslint/parser": "^5.30.5", "react": "18.2.0", - "react-native": "0.0.0-20220812-2104-23429330a", + "react-native": "0.0.0-20220826-2018-9ac437f25", "react-native-windows": "^0.0.0-canary.564" }, "devDependencies": { diff --git a/vnext/.flowconfig b/vnext/.flowconfig index 375463805da..c98235d16c1 100644 --- a/vnext/.flowconfig +++ b/vnext/.flowconfig @@ -123,4 +123,4 @@ untyped-import untyped-type-import [version] -^0.184.0 +^0.185.1 diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp index 29cd20370c8..2cecdb4e1b2 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp @@ -7,6 +7,11 @@ #include #include +#ifdef ANDROID +#include +#include +#endif + #include namespace facebook { @@ -49,5 +54,42 @@ WindowsTextInputState::WindowsTextInputState(WindowsTextInputState const &previo defaultThemePaddingBottom( data.getDefault("themePaddingBottom", previousState.defaultThemePaddingBottom).getDouble()){}; +#ifdef ANDROID +folly::dynamic AndroidTextInputState::getDynamic() const { + // Java doesn't need all fields, so we don't pass them all along. + folly::dynamic newState = folly::dynamic::object(); + + // If we have a `cachedAttributedStringId` we know that we're (1) not trying + // to set a new string, so we don't need to pass it along; (2) setState was + // called from Java to trigger a relayout with a `cachedAttributedStringId`, + // so Java has all up-to-date information and we should pass an empty map + // through. + if (cachedAttributedStringId == 0) { + newState["mostRecentEventCount"] = mostRecentEventCount; + newState["attributedString"] = toDynamic(attributedString); + newState["hash"] = newState["attributedString"]["hash"]; + newState["paragraphAttributes"] = toDynamic(paragraphAttributes); // TODO: can we memoize this in Java? + } + return newState; +} + +MapBuffer AndroidTextInputState::getMapBuffer() const { + auto builder = MapBufferBuilder(); + // See comment in getDynamic block. + if (cachedAttributedStringId == 0) { + builder.putInt(TX_STATE_KEY_MOST_RECENT_EVENT_COUNT, mostRecentEventCount); + + auto attStringMapBuffer = toMapBuffer(attributedString); + builder.putMapBuffer(TX_STATE_KEY_ATTRIBUTED_STRING, attStringMapBuffer); + auto paMapBuffer = toMapBuffer(paragraphAttributes); + builder.putMapBuffer(TX_STATE_KEY_PARAGRAPH_ATTRIBUTES, paMapBuffer); + + builder.putInt(TX_STATE_KEY_HASH, attStringMapBuffer.getInt(AS_KEY_HASH)); + } + return builder.build(); +} + +#endif + } // namespace react } // namespace facebook diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h index 1b606c88019..bb59b8cc2c7 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h @@ -5,6 +5,7 @@ #include #include +#include #include namespace facebook::react { @@ -81,6 +82,7 @@ class WindowsTextInputState final { WindowsTextInputState() = default; WindowsTextInputState(WindowsTextInputState const &previousState, folly::dynamic const &data); folly::dynamic getDynamic() const; + MapBuffer getMapBuffer() const; }; } // namespace facebook::react diff --git a/vnext/ReactCopies/IntegrationTests/AppEventsTest.js b/vnext/ReactCopies/IntegrationTests/AppEventsTest.js index 5ff829b20c5..e1736962006 100644 --- a/vnext/ReactCopies/IntegrationTests/AppEventsTest.js +++ b/vnext/ReactCopies/IntegrationTests/AppEventsTest.js @@ -38,7 +38,6 @@ class AppEventsTest extends React.Component<{...}, State> { NativeAppEventEmitter.addListener('testEvent', this.receiveEvent); const event = {data: TEST_PAYLOAD, ts: Date.now()}; TestModule.sendAppEvent('testEvent', event); - // eslint-disable-next-line react/no-did-mount-set-state this.setState({sent: event}); } diff --git a/vnext/codegen/NativeAccessibilityManagerSpec.g.h b/vnext/codegen/NativeAccessibilityManagerSpec.g.h index 6880a3b618f..ddc35ab0b8a 100644 --- a/vnext/codegen/NativeAccessibilityManagerSpec.g.h +++ b/vnext/codegen/NativeAccessibilityManagerSpec.g.h @@ -53,12 +53,13 @@ struct AccessibilityManagerSpec : winrt::Microsoft::ReactNative::TurboModuleSpec Method, Callback<::React::JSValue>) noexcept>{1, L"getCurrentGrayscaleState"}, Method, Callback<::React::JSValue>) noexcept>{2, L"getCurrentInvertColorsState"}, Method, Callback<::React::JSValue>) noexcept>{3, L"getCurrentReduceMotionState"}, - Method, Callback<::React::JSValue>) noexcept>{4, L"getCurrentReduceTransparencyState"}, - Method, Callback<::React::JSValue>) noexcept>{5, L"getCurrentVoiceOverState"}, - Method{6, L"setAccessibilityContentSizeMultipliers"}, - Method{7, L"setAccessibilityFocus"}, - Method{8, L"announceForAccessibility"}, - Method{9, L"announceForAccessibilityWithOptions"}, + Method, Callback<::React::JSValue>) noexcept>{4, L"getCurrentPrefersCrossFadeTransitionsState"}, + Method, Callback<::React::JSValue>) noexcept>{5, L"getCurrentReduceTransparencyState"}, + Method, Callback<::React::JSValue>) noexcept>{6, L"getCurrentVoiceOverState"}, + Method{7, L"setAccessibilityContentSizeMultipliers"}, + Method{8, L"setAccessibilityFocus"}, + Method{9, L"announceForAccessibility"}, + Method{10, L"announceForAccessibilityWithOptions"}, }; template @@ -87,31 +88,36 @@ struct AccessibilityManagerSpec : winrt::Microsoft::ReactNative::TurboModuleSpec " REACT_METHOD(getCurrentReduceMotionState) static void getCurrentReduceMotionState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( 4, + "getCurrentPrefersCrossFadeTransitionsState", + " REACT_METHOD(getCurrentPrefersCrossFadeTransitionsState) void getCurrentPrefersCrossFadeTransitionsState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n" + " REACT_METHOD(getCurrentPrefersCrossFadeTransitionsState) static void getCurrentPrefersCrossFadeTransitionsState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n"); + REACT_SHOW_METHOD_SPEC_ERRORS( + 5, "getCurrentReduceTransparencyState", " REACT_METHOD(getCurrentReduceTransparencyState) void getCurrentReduceTransparencyState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n" " REACT_METHOD(getCurrentReduceTransparencyState) static void getCurrentReduceTransparencyState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 5, + 6, "getCurrentVoiceOverState", " REACT_METHOD(getCurrentVoiceOverState) void getCurrentVoiceOverState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n" " REACT_METHOD(getCurrentVoiceOverState) static void getCurrentVoiceOverState(std::function const & onSuccess, std::function const & onError) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 6, + 7, "setAccessibilityContentSizeMultipliers", " REACT_METHOD(setAccessibilityContentSizeMultipliers) void setAccessibilityContentSizeMultipliers(AccessibilityManagerSpec_setAccessibilityContentSizeMultipliers_JSMultipliers && JSMultipliers) noexcept { /* implementation */ }\n" " REACT_METHOD(setAccessibilityContentSizeMultipliers) static void setAccessibilityContentSizeMultipliers(AccessibilityManagerSpec_setAccessibilityContentSizeMultipliers_JSMultipliers && JSMultipliers) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 7, + 8, "setAccessibilityFocus", " REACT_METHOD(setAccessibilityFocus) void setAccessibilityFocus(double reactTag) noexcept { /* implementation */ }\n" " REACT_METHOD(setAccessibilityFocus) static void setAccessibilityFocus(double reactTag) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 8, + 9, "announceForAccessibility", " REACT_METHOD(announceForAccessibility) void announceForAccessibility(std::string announcement) noexcept { /* implementation */ }\n" " REACT_METHOD(announceForAccessibility) static void announceForAccessibility(std::string announcement) noexcept { /* implementation */ }\n"); REACT_SHOW_METHOD_SPEC_ERRORS( - 9, + 10, "announceForAccessibilityWithOptions", " REACT_METHOD(announceForAccessibilityWithOptions) void announceForAccessibilityWithOptions(std::string announcement, AccessibilityManagerSpec_announceForAccessibilityWithOptions_options && options) noexcept { /* implementation */ }\n" " REACT_METHOD(announceForAccessibilityWithOptions) static void announceForAccessibilityWithOptions(std::string announcement, AccessibilityManagerSpec_announceForAccessibilityWithOptions_options && options) noexcept { /* implementation */ }\n"); diff --git a/vnext/overrides.json b/vnext/overrides.json index 0d773bc763b..bf67a687781 100644 --- a/vnext/overrides.json +++ b/vnext/overrides.json @@ -8,13 +8,13 @@ "**/__snapshots__/**", "src/rntypes/**" ], - "baseVersion": "0.0.0-20220812-2104-23429330a", + "baseVersion": "0.0.0-20220826-2018-9ac437f25", "overrides": [ { "type": "derived", "file": ".flowconfig", "baseFile": ".flowconfig", - "baseHash": "e7e5f1d81cb946157ecfb9392585958b5fac442d" + "baseHash": "96ff12c38ea31691ca99dd8848e38217ffbd1417" }, { "type": "derived", @@ -38,13 +38,13 @@ "type": "derived", "file": "Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp", "baseFile": "ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputState.cpp", - "baseHash": "ab386b821cfe714d9aaaa394d82785227762ab6b" + "baseHash": "bc236a623b51fc05c2d9e7487071ed68c85a1f88" }, { "type": "derived", "file": "Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h", "baseFile": "ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputState.h", - "baseHash": "86ac95fb195394bc314b2481907026d2568a0c45" + "baseHash": "c945b4b95344c40d5505dec2debd8e9ceda09015" }, { "type": "derived", @@ -77,7 +77,7 @@ "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/decorator.h", "baseFile": "ReactCommon/jsi/jsi/decorator.h", - "baseHash": "8e7642194d662f6b93203cb151b8ad3e24e11bc6", + "baseHash": "b722ac2e112077dab320e48bb16dc7203faeebf2", "issue": 9791 }, { @@ -91,14 +91,14 @@ "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/jsi.cpp", "baseFile": "ReactCommon/jsi/jsi/jsi.cpp", - "baseHash": "45901861cb39be3f58fac072a6145a39d0a34cb8", + "baseHash": "dcb4926c7ad2cdfea5306f16b35dac269e0b382c", "issue": 9791 }, { "type": "patch", "file": "ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/jsi.h", "baseFile": "ReactCommon/jsi/jsi/jsi.h", - "baseHash": "9022689490930d324d3915d1e3cc3c3541005988", + "baseHash": "7aa352254a0cd52964a3370c78b7557508393603", "issue": 9791 }, { @@ -131,7 +131,7 @@ "type": "copy", "directory": "ReactCopies/IntegrationTests", "baseDirectory": "IntegrationTests", - "baseHash": "243c082ddf2880ca3c5d9ef10099cae6d8357737", + "baseHash": "c5aa96ea81e29f4e9e6feccf1bed0cb3f0cf1270", "issue": 4054 }, { @@ -225,7 +225,7 @@ "type": "patch", "file": "src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js", "baseFile": "Libraries/Components/AccessibilityInfo/AccessibilityInfo.js", - "baseHash": "318fa0b04d231c747d95bc4fb34a9a4152009786", + "baseHash": "86911d26a839aa1ebe91b6abc0fe910e09ba62e5", "issue": 4578 }, { @@ -239,13 +239,13 @@ "type": "patch", "file": "src/Libraries/Components/Button.windows.js", "baseFile": "Libraries/Components/Button.js", - "baseHash": "fe364c49ba5f393323b41202bc80bf58834ef259" + "baseHash": "ec7b9eddd8393c6a588cc229120bc994255053ec" }, { "type": "copy", "file": "src/Libraries/Components/DatePicker/DatePickerIOS.windows.js", "baseFile": "Libraries/Components/DatePicker/DatePickerIOS.android.js", - "baseHash": "3c5bb9a7284f3a0a19d309bdf54701b865f9c56b" + "baseHash": "d4d3f2157abce118c9b9ad63ab2cad0cfa1979a0" }, { "type": "derived", @@ -319,7 +319,7 @@ "type": "patch", "file": "src/Libraries/Components/TextInput/TextInput.windows.js", "baseFile": "Libraries/Components/TextInput/TextInput.js", - "baseHash": "44fadc4a6bc51291e44f6bb8d7f38563e63bcbff" + "baseHash": "9cff22dbd054762b03f9e40ce45b03cca67a62f5" }, { "type": "patch", @@ -385,7 +385,7 @@ "type": "patch", "file": "src/Libraries/Components/View/ViewPropTypes.windows.js", "baseFile": "Libraries/Components/View/ViewPropTypes.js", - "baseHash": "52170daa86f15afc549b4f284371e4c4154aa3dd" + "baseHash": "40cda23c445a8edaa16e6d7b924963da70bc374c" }, { "type": "platform", @@ -523,7 +523,7 @@ "type": "patch", "file": "src/Libraries/StyleSheet/processTransform.windows.js", "baseFile": "Libraries/StyleSheet/processTransform.js", - "baseHash": "038d42bba39060567bbe906f905ad798cb35293a", + "baseHash": "2b5505372781ddd1d526b6badc7aed53b85e9545", "issue": 9797 }, { diff --git a/vnext/package.json b/vnext/package.json index 70e36ee8e63..824acc2a882 100644 --- a/vnext/package.json +++ b/vnext/package.json @@ -23,9 +23,9 @@ "dependencies": { "@babel/runtime": "^7.0.0", "@jest/create-cache-key-function": "^27.0.1", - "@react-native-community/cli": "^9.0.0-alpha.11", - "@react-native-community/cli-platform-android": "^9.0.0-alpha.10", - "@react-native-community/cli-platform-ios": "^9.0.0-alpha.10", + "@react-native-community/cli": "^9.0.0", + "@react-native-community/cli-platform-android": "^9.0.0", + "@react-native-community/cli-platform-ios": "^9.0.0", "@react-native-windows/cli": "0.0.0-canary.139", "@react-native-windows/virtualized-list": "0.0.0-canary.52", "@react-native/assets": "1.0.0", @@ -38,9 +38,9 @@ "invariant": "^2.2.4", "jsc-android": "^250230.2.1", "memoize-one": "^5.0.0", - "metro-react-native-babel-transformer": "0.72.0", - "metro-runtime": "0.72.0", - "metro-source-map": "0.72.0", + "metro-react-native-babel-transformer": "0.72.1", + "metro-runtime": "0.72.1", + "metro-source-map": "0.72.1", "mkdirp": "^0.5.1", "nullthrows": "^1.1.1", "pretty-format": "^26.5.2", @@ -71,13 +71,13 @@ "@types/react-native": "^0.66.17", "eslint": "^8.19.0", "eslint-plugin-prettier": "^4.2.1", - "flow-bin": "^0.184.0", + "flow-bin": "^0.185.1", "jscodeshift": "^0.13.1", "just-scripts": "^1.3.3", "metro-config": "0.72.3", "prettier": "^2.4.1", "react": "18.2.0", - "react-native": "0.0.0-20220812-2104-23429330a", + "react-native": "0.0.0-20220826-2018-9ac437f25", "react-native-platform-override": "^1.7.1", "react-refresh": "^0.4.0", "react-shallow-renderer": "16.14.1", @@ -85,7 +85,7 @@ }, "peerDependencies": { "react": "18.2.0", - "react-native": "0.0.0-20220812-2104-23429330a" + "react-native": "0.0.0-20220826-2018-9ac437f25" }, "beachball": { "defaultNpmTag": "canary", diff --git a/vnext/src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js b/vnext/src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js index 0a7e161226e..a789a789d72 100644 --- a/vnext/src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +++ b/vnext/src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js @@ -17,6 +17,7 @@ import NativeAccessibilityInfo from './NativeAccessibilityInfo'; import NativeAccessibilityManagerIOS from './NativeAccessibilityManager'; import legacySendAccessibilityEvent from './legacySendAccessibilityEvent'; import type {ElementRef} from 'react'; +import type {AccessibilityInfo as AccessibilityInfoType} from './AccessibilityInfo.flow'; // Events that are only supported on Android. type AccessibilityEventDefinitionsAndroid = { @@ -79,7 +80,7 @@ const EventNames: Map< * * See https://reactnative.dev/docs/accessibilityinfo */ -const AccessibilityInfo = { +const AccessibilityInfo: AccessibilityInfoType = { /** * Query whether bold text is currently enabled. * @@ -184,6 +185,34 @@ const AccessibilityInfo = { }); }, + /** + * Query whether reduce motion and prefer cross-fade transitions settings are currently enabled. + * + * Returns a promise which resolves to a boolean. + * The result is `true` when prefer cross-fade transitions is enabled and `false` otherwise. + * + * See https://reactnative.dev/docs/accessibilityinfo#prefersCrossFadeTransitions + */ + prefersCrossFadeTransitions(): Promise { + return new Promise((resolve, reject) => { + if (Platform.OS === 'android') { + return Promise.resolve(false); + } else { + if ( + NativeAccessibilityManagerIOS?.getCurrentPrefersCrossFadeTransitionsState != + null + ) { + NativeAccessibilityManagerIOS.getCurrentPrefersCrossFadeTransitionsState( + resolve, + reject, + ); + } else { + reject(null); + } + } + }); + }, + /** * Query whether reduced transparency is currently enabled. * @@ -301,6 +330,7 @@ const AccessibilityInfo = { */ addEventListener>( eventName: K, + // $FlowIssue[incompatible-type] - Flow bug with unions and generics (T128099423) handler: (...$ElementType) => void, ): EventSubscription { const deviceEventName = EventNames.get(eventName); diff --git a/vnext/src/Libraries/Components/Button.windows.js b/vnext/src/Libraries/Components/Button.windows.js index 890469a1f66..a4015a235b2 100644 --- a/vnext/src/Libraries/Components/Button.windows.js +++ b/vnext/src/Libraries/Components/Button.windows.js @@ -21,6 +21,7 @@ import {PlatformColor} from '../StyleSheet/PlatformColorValueTypes'; // Windows] import View from './View/View'; import invariant from 'invariant'; +import type {Button as ButtonType} from './Button.flow'; import type { AccessibilityState, @@ -549,4 +550,4 @@ const styles = StyleSheet.create({ // Windows] }); -module.exports = Button; +module.exports = (Button: ButtonType); diff --git a/vnext/src/Libraries/Components/DatePicker/DatePickerIOS.windows.js b/vnext/src/Libraries/Components/DatePicker/DatePickerIOS.windows.js index e97edf657c2..738d08c51f3 100644 --- a/vnext/src/Libraries/Components/DatePicker/DatePickerIOS.windows.js +++ b/vnext/src/Libraries/Components/DatePicker/DatePickerIOS.windows.js @@ -12,6 +12,7 @@ import * as React from 'react'; import StyleSheet from '../../StyleSheet/StyleSheet'; import Text from '../../Text/Text'; import View from '../View/View'; +import type {DatePickerIOSType} from './DatePickerIOS.flow'; class DummyDatePickerIOS extends React.Component { render() { @@ -42,4 +43,4 @@ const styles = StyleSheet.create({ }, }); -module.exports = DummyDatePickerIOS; +module.exports = (DummyDatePickerIOS: DatePickerIOSType); diff --git a/vnext/src/Libraries/Components/TextInput/TextInput.windows.js b/vnext/src/Libraries/Components/TextInput/TextInput.windows.js index 82fc7e48934..72dc950ce52 100644 --- a/vnext/src/Libraries/Components/TextInput/TextInput.windows.js +++ b/vnext/src/Libraries/Components/TextInput/TextInput.windows.js @@ -463,6 +463,13 @@ type AndroidProps = $ReadOnly<{| */ returnKeyLabel?: ?string, + /** + * Sets the number of rows for a `TextInput`. Use it with multiline set to + * `true` to be able to fill the lines. + * @platform android + */ + rows?: ?number, + /** * When `false`, it will prevent the soft keyboard from showing when the field is focused. * Defaults to `true`. @@ -747,6 +754,13 @@ export type Props = $ReadOnly<{| */ placeholderTextColor?: ?ColorValue, + /** `readOnly` works like the `readonly` attribute in HTML. + * If `true`, text is not editable. The default value is `false`. + * See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly + * for more details. + */ + readOnly?: ?boolean, + /** * Determines how the return key should look. On Android you can also use * `returnKeyLabel`. @@ -1440,6 +1454,7 @@ function InternalTextInput(props: Props): React.Node { disableFullscreenUI={props.disableFullscreenUI} focusable={focusable} mostRecentEventCount={mostRecentEventCount} + numberOfLines={props.rows ?? props.numberOfLines} onBlur={_onBlur} onChange={_onChange} onFocus={_onFocus} @@ -1497,6 +1512,8 @@ const ExportedForwardRef: React.AbstractComponent< allowFontScaling = true, rejectResponderTermination = true, underlineColorAndroid = 'transparent', + readOnly, + editable, ...restProps }, forwardedRef: ReactRefSetter< @@ -1508,6 +1525,7 @@ const ExportedForwardRef: React.AbstractComponent< allowFontScaling={allowFontScaling} rejectResponderTermination={rejectResponderTermination} underlineColorAndroid={underlineColorAndroid} + editable={readOnly !== undefined ? !readOnly : editable} {...restProps} forwardedRef={forwardedRef} /> diff --git a/vnext/src/Libraries/Components/View/ViewPropTypes.windows.js b/vnext/src/Libraries/Components/View/ViewPropTypes.windows.js index 1aa9cb7991d..ed56e3333d2 100644 --- a/vnext/src/Libraries/Components/View/ViewPropTypes.windows.js +++ b/vnext/src/Libraries/Components/View/ViewPropTypes.windows.js @@ -99,6 +99,10 @@ type PointerEventProps = $ReadOnly<{| onPointerDownCapture?: ?(e: PointerEvent) => void, onPointerUp?: ?(e: PointerEvent) => void, onPointerUpCapture?: ?(e: PointerEvent) => void, + onPointerOver?: ?(e: PointerEvent) => void, + onPointerOverCapture?: ?(e: PointerEvent) => void, + onPointerOut?: ?(e: PointerEvent) => void, + onPointerOutCapture?: ?(e: PointerEvent) => void, |}>; type FocusEventProps = $ReadOnly<{| diff --git a/vnext/src/Libraries/StyleSheet/processTransform.windows.js b/vnext/src/Libraries/StyleSheet/processTransform.windows.js index 968100d9433..7b065c04037 100644 --- a/vnext/src/Libraries/StyleSheet/processTransform.windows.js +++ b/vnext/src/Libraries/StyleSheet/processTransform.windows.js @@ -10,9 +10,6 @@ 'use strict'; -const MatrixMath = require('../Utilities/MatrixMath'); -const Platform = require('../Utilities/Platform'); - const invariant = require('invariant'); const stringifySafe = require('../Utilities/stringifySafe').default; @@ -31,115 +28,7 @@ function processTransform( _validateTransforms(transform); } - // Android & iOS implementations of transform property accept the list of - // transform properties as opposed to a transform Matrix. This is necessary - // to control transform property updates completely on the native thread. - if ( - Platform.OS === 'android' || - Platform.OS === 'ios' || - Platform.OS === 'windows' - ) { - return transform; - } - - const result = MatrixMath.createIdentityMatrix(); - - transform.forEach(transformation => { - const key = Object.keys(transformation)[0]; - const value = transformation[key]; - - switch (key) { - case 'matrix': - MatrixMath.multiplyInto(result, result, value); - break; - case 'perspective': - _multiplyTransform(result, MatrixMath.reusePerspectiveCommand, [value]); - break; - case 'rotateX': - _multiplyTransform(result, MatrixMath.reuseRotateXCommand, [ - _convertToRadians(value), - ]); - break; - case 'rotateY': - _multiplyTransform(result, MatrixMath.reuseRotateYCommand, [ - _convertToRadians(value), - ]); - break; - case 'rotate': - case 'rotateZ': - _multiplyTransform(result, MatrixMath.reuseRotateZCommand, [ - _convertToRadians(value), - ]); - break; - case 'scale': - _multiplyTransform(result, MatrixMath.reuseScaleCommand, [value]); - break; - case 'scaleX': - _multiplyTransform(result, MatrixMath.reuseScaleXCommand, [value]); - break; - case 'scaleY': - _multiplyTransform(result, MatrixMath.reuseScaleYCommand, [value]); - break; - case 'translate': - _multiplyTransform(result, MatrixMath.reuseTranslate3dCommand, [ - value[0], - value[1], - value[2] || 0, - ]); - break; - case 'translateX': - _multiplyTransform(result, MatrixMath.reuseTranslate2dCommand, [ - value, - 0, - ]); - break; - case 'translateY': - _multiplyTransform(result, MatrixMath.reuseTranslate2dCommand, [ - 0, - value, - ]); - break; - case 'skewX': - _multiplyTransform(result, MatrixMath.reuseSkewXCommand, [ - _convertToRadians(value), - ]); - break; - case 'skewY': - _multiplyTransform(result, MatrixMath.reuseSkewYCommand, [ - _convertToRadians(value), - ]); - break; - default: - throw new Error('Invalid transform name: ' + key); - } - }); - - return result; -} - -/** - * Performs a destructive operation on a transform matrix. - */ -/* $FlowFixMe[missing-this-annot] The 'this' type annotation(s) required by - * Flow's LTI update could not be added via codemod */ -function _multiplyTransform( - result: Array, - matrixMathFunction: Function, - args: Array, -): void { - const matrixToApply = MatrixMath.createIdentityMatrix(); - const argsWithIdentity = [matrixToApply].concat(args); - matrixMathFunction.apply(this, argsWithIdentity); - MatrixMath.multiplyInto(result, result, matrixToApply); -} - -/** - * Parses a string like '0.5rad' or '60deg' into radians expressed in a float. - * Note that validation on the string is done in `_validateTransform()`. - */ -function _convertToRadians(value: string): number { - const floatValue = parseFloat(value); - return value.indexOf('rad') > -1 ? floatValue : (floatValue * Math.PI) / 180; + return transform; } function _validateTransforms(transform: Array): void { diff --git a/yarn.lock b/yarn.lock index 8247ffd3e1b..2aa84fa5e84 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1805,22 +1805,22 @@ resolved "https://registry.yarnpkg.com/@opentelemetry/semantic-conventions/-/semantic-conventions-1.0.1.tgz#9349c3860a53468fa2108b5df09aa843f22dbf94" integrity sha512-7XU1sfQ8uCVcXLxtAHA8r3qaLJ2oq7sKtEwzZhzuEXqYmjW+n+J4yM3kNo0HQo3Xp1eUe47UM6Wy6yuAvIyllg== -"@react-native-community/cli-clean@^9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-9.1.0.tgz#8d6c3591dbaa52a02bf345dcd79c3a997df6ade5" - integrity sha512-3HznNw8EBQtLsVyV8b8+h76M9EeJcJgYn5wZVGQ5mghAOhqnSWVbwRvpDdb8ITXaiTIXFGNOxXnGKMXsu0CYTw== +"@react-native-community/cli-clean@^9.2.1": + version "9.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-clean/-/cli-clean-9.2.1.tgz#198c5dd39c432efb5374582073065ff75d67d018" + integrity sha512-dyNWFrqRe31UEvNO+OFWmQ4hmqA07bR9Ief/6NnGwx67IO9q83D5PEAf/o96ML6jhSbDwCmpPKhPwwBbsyM3mQ== dependencies: - "@react-native-community/cli-tools" "^9.1.0" + "@react-native-community/cli-tools" "^9.2.1" chalk "^4.1.2" execa "^1.0.0" prompts "^2.4.0" -"@react-native-community/cli-config@^9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-9.1.0.tgz#f5775b920742672e222e531c04ed3075a6465cf9" - integrity sha512-6G9d5weedQ6EMz37ZYXrFHCU2DG3yqvdLs4Jo2383cSxal+oO+kggaTgqLBKoMETz/S80KsMeC/l+MoRjc1pzw== +"@react-native-community/cli-config@^9.2.1": + version "9.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-config/-/cli-config-9.2.1.tgz#54eb026d53621ccf3a9df8b189ac24f6e56b8750" + integrity sha512-gHJlBBXUgDN9vrr3aWkRqnYrPXZLztBDQoY97Mm5Yo6MidsEpYo2JIP6FH4N/N2p1TdjxJL4EFtdd/mBpiR2MQ== dependencies: - "@react-native-community/cli-tools" "^9.1.0" + "@react-native-community/cli-tools" "^9.2.1" cosmiconfig "^5.1.0" deepmerge "^3.2.0" glob "^7.1.3" @@ -1833,14 +1833,14 @@ dependencies: serve-static "^1.13.1" -"@react-native-community/cli-doctor@^9.1.2": - version "9.1.2" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-9.1.2.tgz#b82e5b709e2829d0fd3bbdd8f9d531b2886a0afe" - integrity sha512-BmacbikyaxR4s54kq17LE0bBK7g8bcjc679ee36DqkX+Xij2VHHynLzTpuDJ8y6iHI2v13vauEMjnh4j612u5w== +"@react-native-community/cli-doctor@^9.2.1": + version "9.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-doctor/-/cli-doctor-9.2.1.tgz#04859a93f0ea87d78cc7050362b6ce2b1c54fd36" + integrity sha512-RpUax0pkKumXJ5hcRG0Qd+oYWsA2RFeMWKY+Npg8q05Cwd1rqDQfWGprkHC576vz26+FPuvwEagoAf6fR2bvJA== dependencies: - "@react-native-community/cli-config" "^9.1.0" - "@react-native-community/cli-platform-ios" "^9.1.2" - "@react-native-community/cli-tools" "^9.1.0" + "@react-native-community/cli-config" "^9.2.1" + "@react-native-community/cli-platform-ios" "^9.2.1" + "@react-native-community/cli-tools" "^9.2.1" chalk "^4.1.2" command-exists "^1.2.8" envinfo "^7.7.2" @@ -1855,23 +1855,23 @@ sudo-prompt "^9.0.0" wcwidth "^1.0.1" -"@react-native-community/cli-hermes@^9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-9.1.0.tgz#7e98f89767401dcf0be8c6fc8e36228557244014" - integrity sha512-Ly4dnlRZZ7FckFfSWnaD5BxszuEe9/WcJ6A7srW5UobqnnmEznDv1IY0oBTq1ggnmzIquM9dJQZ0UbcZeQjkoA== +"@react-native-community/cli-hermes@^9.2.1": + version "9.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-hermes/-/cli-hermes-9.2.1.tgz#c4aeadc4aa2b55cd0dd931a1a1c1909fd426f31a" + integrity sha512-723/NMb7egXzJrbWT1uEkN2hOpw+OOtWTG2zKJ3j7KKgUd8u/pP+/z5jO8xVrq+eYJEMjDK0FBEo1Xj7maR4Sw== dependencies: - "@react-native-community/cli-platform-android" "^9.1.0" - "@react-native-community/cli-tools" "^9.1.0" + "@react-native-community/cli-platform-android" "^9.2.1" + "@react-native-community/cli-tools" "^9.2.1" chalk "^4.1.2" hermes-profile-transformer "^0.0.6" ip "^1.1.5" -"@react-native-community/cli-platform-android@^9.0.0-alpha.10", "@react-native-community/cli-platform-android@^9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-9.1.0.tgz#3f80c202196c3874b86395b7f3f5fc13093d2d9e" - integrity sha512-OZ/Krq0wH6T7LuAvwFdJYe47RrHG8IOcoab47H4QQdYGTmJgTS3SlVkr6gn79pZyBGyp7xVizD30QJrIIyDjnw== +"@react-native-community/cli-platform-android@^9.0.0", "@react-native-community/cli-platform-android@^9.2.1": + version "9.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-android/-/cli-platform-android-9.2.1.tgz#cd73cb6bbaeb478cafbed10bd12dfc01b484d488" + integrity sha512-VamCZ8nido3Q3Orhj6pBIx48itORNPLJ7iTfy3nucD1qISEDih3DOzCaQCtmqdEBgUkNkNl0O+cKgq5A3th3Zg== dependencies: - "@react-native-community/cli-tools" "^9.1.0" + "@react-native-community/cli-tools" "^9.2.1" chalk "^4.1.2" execa "^1.0.0" fs-extra "^8.1.0" @@ -1879,24 +1879,24 @@ logkitty "^0.7.1" slash "^3.0.0" -"@react-native-community/cli-platform-ios@^9.0.0-alpha.10", "@react-native-community/cli-platform-ios@^9.1.2": - version "9.1.2" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-9.1.2.tgz#fd59b2aadee8d54317f204b3c640767dca5e6225" - integrity sha512-XpgA9ymm76yjvtYPByqFF1LP7eM/lH5K3zpkZkV9MJLStOIo3mrzN2ywRDZ/xVOheh5LafS4YMmrjIajf11oIQ== +"@react-native-community/cli-platform-ios@^9.0.0", "@react-native-community/cli-platform-ios@^9.2.1": + version "9.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-platform-ios/-/cli-platform-ios-9.2.1.tgz#d90740472216ffae5527dfc5f49063ede18a621f" + integrity sha512-dEgvkI6CFgPk3vs8IOR0toKVUjIFwe4AsXFvWWJL5qhrIzW9E5Owi0zPkSvzXsMlfYMbVX0COfVIK539ZxguSg== dependencies: - "@react-native-community/cli-tools" "^9.1.0" + "@react-native-community/cli-tools" "^9.2.1" chalk "^4.1.2" execa "^1.0.0" glob "^7.1.3" ora "^5.4.1" -"@react-native-community/cli-plugin-metro@^9.1.3": - version "9.1.3" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-9.1.3.tgz#3c701110dadded44cc2dcbd7067dcbf35a669779" - integrity sha512-eLZiGIMybNwkbfKRd8wfNP1u5pnsGYLD3YHlNQyRlfS7AMG7NCQN8bk2uWWJJmWAv632KFLConwJGcLhk6ZNMQ== +"@react-native-community/cli-plugin-metro@^9.2.1": + version "9.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-plugin-metro/-/cli-plugin-metro-9.2.1.tgz#0ec207e78338e0cc0a3cbe1b43059c24afc66158" + integrity sha512-byBGBH6jDfUvcHGFA45W/sDwMlliv7flJ8Ns9foCh3VsIeYYPoDjjK7SawE9cPqRdMAD4SY7EVwqJnOtRbwLiQ== dependencies: - "@react-native-community/cli-server-api" "^9.1.0" - "@react-native-community/cli-tools" "^9.1.0" + "@react-native-community/cli-server-api" "^9.2.1" + "@react-native-community/cli-tools" "^9.2.1" chalk "^4.1.2" metro "0.72.3" metro-config "0.72.3" @@ -1906,13 +1906,13 @@ metro-runtime "0.72.3" readline "^1.3.0" -"@react-native-community/cli-server-api@^9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-9.1.0.tgz#efe04975ea6ea24f86a16d207288e8ac581e6509" - integrity sha512-Xf3hUqUc99hVmWOsmfNqUQ+sxhut9MIHlINzlo7Azxlmg9v9U/vtwJVJSIPD6iwPzvaPH1qeshzwy/r0GUR7fg== +"@react-native-community/cli-server-api@^9.2.1": + version "9.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-server-api/-/cli-server-api-9.2.1.tgz#41ac5916b21d324bccef447f75600c03b2f54fbe" + integrity sha512-EI+9MUxEbWBQhWw2PkhejXfkcRqPl+58+whlXJvKHiiUd7oVbewFs0uLW0yZffUutt4FGx6Uh88JWEgwOzAdkw== dependencies: "@react-native-community/cli-debugger-ui" "^9.0.0" - "@react-native-community/cli-tools" "^9.1.0" + "@react-native-community/cli-tools" "^9.2.1" compression "^1.7.1" connect "^3.6.5" errorhandler "^1.5.0" @@ -1921,10 +1921,10 @@ serve-static "^1.13.1" ws "^7.5.1" -"@react-native-community/cli-tools@^9.1.0": - version "9.1.0" - resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-9.1.0.tgz#81daf5c2aab2f7d681bb4a6a34246f043ef567c4" - integrity sha512-07Z1hyy4cYty84P9cGq+Xf8Vb0S/0ffxLVdVQEMmLjU71sC9YTUv1anJdZyt6f9uUPvA9+e/YIXw5Bu0rvuXIw== +"@react-native-community/cli-tools@^9.2.1": + version "9.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli-tools/-/cli-tools-9.2.1.tgz#c332324b1ea99f9efdc3643649bce968aa98191c" + integrity sha512-bHmL/wrKmBphz25eMtoJQgwwmeCylbPxqFJnFSbkqJPXQz3ManQ6q/gVVMqFyz7D3v+riaus/VXz3sEDa97uiQ== dependencies: appdirsjs "^1.2.4" chalk "^4.1.2" @@ -1950,19 +1950,19 @@ dependencies: joi "^17.2.1" -"@react-native-community/cli@^9.0.0-alpha.11": - version "9.1.3" - resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-9.1.3.tgz#abe5e406214edb2ca828c51fbdaed7baf776298c" - integrity sha512-dfiBxNvqSwxkMduH0eAEJNS+LBbwxm1rOlTO7bN+FZvUwZNCCgIYrixfRo+ifqDUv8N5AbpQB5umnLbs0AjPaA== +"@react-native-community/cli@^9.0.0": + version "9.2.1" + resolved "https://registry.yarnpkg.com/@react-native-community/cli/-/cli-9.2.1.tgz#15cc32531fc323d4232d57b1f2d7c571816305ac" + integrity sha512-feMYS5WXXKF4TSWnCXozHxtWq36smyhGaENXlkiRESfYZ1mnCUlPfOanNCAvNvBqdyh9d4o0HxhYKX1g9l6DCQ== dependencies: - "@react-native-community/cli-clean" "^9.1.0" - "@react-native-community/cli-config" "^9.1.0" + "@react-native-community/cli-clean" "^9.2.1" + "@react-native-community/cli-config" "^9.2.1" "@react-native-community/cli-debugger-ui" "^9.0.0" - "@react-native-community/cli-doctor" "^9.1.2" - "@react-native-community/cli-hermes" "^9.1.0" - "@react-native-community/cli-plugin-metro" "^9.1.3" - "@react-native-community/cli-server-api" "^9.1.0" - "@react-native-community/cli-tools" "^9.1.0" + "@react-native-community/cli-doctor" "^9.2.1" + "@react-native-community/cli-hermes" "^9.2.1" + "@react-native-community/cli-plugin-metro" "^9.2.1" + "@react-native-community/cli-server-api" "^9.2.1" + "@react-native-community/cli-tools" "^9.2.1" "@react-native-community/cli-types" "^9.1.0" chalk "^4.1.2" commander "^9.4.0" @@ -5628,10 +5628,10 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.5.tgz#76c8584f4fc843db64702a6bd04ab7a8bd666da3" integrity sha512-WIWGi2L3DyTUvUrwRKgGi9TwxQMUEqPOPQBVi71R96jZXJdFskXEmf54BoZaS1kknGODoIGASGEzBUYdyMCBJg== -flow-bin@^0.184.0: - version "0.184.0" - resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.184.0.tgz#0256b3c302ce465b60d0f0296273840d38d3f9e6" - integrity sha512-HiHuxhO06dqhV7YabluSswm3ZgxVi2L+aArcuIJMON/CRzqkGQrRjIVNbKllMs95rFk6aeuFR3FdVCCUa0SbGw== +flow-bin@^0.185.1: + version "0.185.2" + resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.185.2.tgz#b45a07d45cf641198e86e47848e35f64b0688c4c" + integrity sha512-Vphs8Z4Qo17dzlPKe/l8M85JvGn1Tf5NV6xESZLg8p9ktdIbNUYaxnq/WBQPoESiLrGdrC2v+rfezfh3tvxkvQ== flow-parser@0.*: version "0.176.2" @@ -7991,10 +7991,10 @@ merge2@^1.2.3, merge2@^1.3.0, merge2@^1.4.1: resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.4.1.tgz#4368892f885e907455a6fd7dc55c0c9d404990ae" integrity sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg== -metro-babel-register@0.72.0: - version "0.72.0" - resolved "https://registry.yarnpkg.com/metro-babel-register/-/metro-babel-register-0.72.0.tgz#6d486cc08b803236ac8d67faf518a0d2e77a05c3" - integrity sha512-pu+3cNcfUPiNqt66gc7WVVgBYhJdmx849/Ra2lgI9BHGCTpx8IUeUexLS7eWcNLA/zQNGmDdT25jdWhoQO+CUg== +metro-babel-register@0.72.1: + version "0.72.1" + resolved "https://registry.yarnpkg.com/metro-babel-register/-/metro-babel-register-0.72.1.tgz#48bd7309639463cc6466939563c2e09d13d444b6" + integrity sha512-nHTRyiP+fNu70CMcyWneIa7kU7HvBU4M4UpTNDvV8OXenOBKdLhCAyZkeFWBJnVxTpZW5lEZA7C+SeWxnFIbIg== dependencies: "@babel/core" "^7.14.0" "@babel/plugin-proposal-nullish-coalescing-operator" "^7.0.0" @@ -8017,6 +8017,16 @@ metro-babel-transformer@0.72.0: metro-source-map "0.72.0" nullthrows "^1.1.1" +metro-babel-transformer@0.72.1: + version "0.72.1" + resolved "https://registry.yarnpkg.com/metro-babel-transformer/-/metro-babel-transformer-0.72.1.tgz#53129a496f7309cd434cfc9f8d978317e928cae1" + integrity sha512-VK7A9gepnhrKC0DMoxtPjYYHjkkfNwzLMYJgeL6Il6IaX/K/VHTILSEqgpxfNDos2jrXazuR5+rXDLE/RCzqmw== + dependencies: + "@babel/core" "^7.14.0" + hermes-parser "0.8.0" + metro-source-map "0.72.1" + nullthrows "^1.1.1" + metro-babel-transformer@0.72.3: version "0.72.3" resolved "https://registry.yarnpkg.com/metro-babel-transformer/-/metro-babel-transformer-0.72.3.tgz#2c60493a4eb7a8d20cc059f05e0e505dc1684d01" @@ -8095,10 +8105,10 @@ metro-inspector-proxy@0.72.3: ws "^7.5.1" yargs "^15.3.1" -metro-memory-fs@0.72.0: - version "0.72.0" - resolved "https://registry.yarnpkg.com/metro-memory-fs/-/metro-memory-fs-0.72.0.tgz#ddf4d5c13d6eafb30bbfa2ae8282ad671adde351" - integrity sha512-jp5G/N3iozgA1tRIzBZVJbd5p9GGHMo+WKpHp75n439qaZ7OG4uakTFp/WMVVEm0EEkOmZyKt00NxZvB5bxz2g== +metro-memory-fs@0.72.1: + version "0.72.1" + resolved "https://registry.yarnpkg.com/metro-memory-fs/-/metro-memory-fs-0.72.1.tgz#85511f6b2c817f8d659c993569595c7306e8b807" + integrity sha512-NUr99OVn9vr9/VRuJOrdi0t7LiQhAJASax3YfQbT1zf4EjnHZb1UB4uTCGXzwTqAF2DYgrOhlErkGT/87cI3EQ== metro-minify-uglify@0.72.3: version "0.72.3" @@ -8152,6 +8162,51 @@ metro-react-native-babel-preset@0.72.0: "@babel/template" "^7.0.0" react-refresh "^0.4.0" +metro-react-native-babel-preset@0.72.1: + version "0.72.1" + resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.72.1.tgz#6da276375f20312306c1545c47c439e445b9c628" + integrity sha512-DlvMw2tFrCqD9OXBoN11fPM09kHC22FZpnkTmG4Pr4kecV+aDmEGxwakjUcjELrX1JCXz2MLPvqeJkbiP1f5CA== + dependencies: + "@babel/core" "^7.14.0" + "@babel/plugin-proposal-async-generator-functions" "^7.0.0" + "@babel/plugin-proposal-class-properties" "^7.0.0" + "@babel/plugin-proposal-export-default-from" "^7.0.0" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.0.0" + "@babel/plugin-proposal-object-rest-spread" "^7.0.0" + "@babel/plugin-proposal-optional-catch-binding" "^7.0.0" + "@babel/plugin-proposal-optional-chaining" "^7.0.0" + "@babel/plugin-syntax-dynamic-import" "^7.0.0" + "@babel/plugin-syntax-export-default-from" "^7.0.0" + "@babel/plugin-syntax-flow" "^7.2.0" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.0.0" + "@babel/plugin-syntax-optional-chaining" "^7.0.0" + "@babel/plugin-transform-arrow-functions" "^7.0.0" + "@babel/plugin-transform-async-to-generator" "^7.0.0" + "@babel/plugin-transform-block-scoping" "^7.0.0" + "@babel/plugin-transform-classes" "^7.0.0" + "@babel/plugin-transform-computed-properties" "^7.0.0" + "@babel/plugin-transform-destructuring" "^7.0.0" + "@babel/plugin-transform-exponentiation-operator" "^7.0.0" + "@babel/plugin-transform-flow-strip-types" "^7.0.0" + "@babel/plugin-transform-function-name" "^7.0.0" + "@babel/plugin-transform-literals" "^7.0.0" + "@babel/plugin-transform-modules-commonjs" "^7.0.0" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.0.0" + "@babel/plugin-transform-parameters" "^7.0.0" + "@babel/plugin-transform-react-display-name" "^7.0.0" + "@babel/plugin-transform-react-jsx" "^7.0.0" + "@babel/plugin-transform-react-jsx-self" "^7.0.0" + "@babel/plugin-transform-react-jsx-source" "^7.0.0" + "@babel/plugin-transform-runtime" "^7.0.0" + "@babel/plugin-transform-shorthand-properties" "^7.0.0" + "@babel/plugin-transform-spread" "^7.0.0" + "@babel/plugin-transform-sticky-regex" "^7.0.0" + "@babel/plugin-transform-template-literals" "^7.0.0" + "@babel/plugin-transform-typescript" "^7.5.0" + "@babel/plugin-transform-unicode-regex" "^7.0.0" + "@babel/template" "^7.0.0" + react-refresh "^0.4.0" + metro-react-native-babel-preset@0.72.3, metro-react-native-babel-preset@^0.72.0: version "0.72.3" resolved "https://registry.yarnpkg.com/metro-react-native-babel-preset/-/metro-react-native-babel-preset-0.72.3.tgz#e549199fa310fef34364fdf19bd210afd0c89432" @@ -8210,6 +8265,19 @@ metro-react-native-babel-transformer@0.72.0: metro-source-map "0.72.0" nullthrows "^1.1.1" +metro-react-native-babel-transformer@0.72.1: + version "0.72.1" + resolved "https://registry.yarnpkg.com/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.72.1.tgz#e2611c2c1afde1eaaa127d72fe92d94a2d8d9058" + integrity sha512-hMnN0MOgVloAk94YuXN7sLeDaZ51Y6xIcJXxIU1s/KaygAGXk6o7VAdwf2MY/IV1SIct5lkW4Gn71u/9/EvfXA== + dependencies: + "@babel/core" "^7.14.0" + babel-preset-fbjs "^3.4.0" + hermes-parser "0.8.0" + metro-babel-transformer "0.72.1" + metro-react-native-babel-preset "0.72.1" + metro-source-map "0.72.1" + nullthrows "^1.1.1" + metro-react-native-babel-transformer@0.72.3: version "0.72.3" resolved "https://registry.yarnpkg.com/metro-react-native-babel-transformer/-/metro-react-native-babel-transformer-0.72.3.tgz#f8eda8c07c0082cbdbef47a3293edc41587c6b5a" @@ -8230,12 +8298,13 @@ metro-resolver@0.72.3: dependencies: absolute-path "^0.0.0" -metro-runtime@0.72.0: - version "0.72.0" - resolved "https://registry.yarnpkg.com/metro-runtime/-/metro-runtime-0.72.0.tgz#f72b158fc5072a83b6274d6eae1db41fb065d77e" - integrity sha512-ZY372filZa8KApndcC2MuuObUufW8A4UEYHaKv6onIT0maCX2mzNGaDIiOXs6i5gHjb801qaR0a3UqCVxhGgeQ== +metro-runtime@0.72.1: + version "0.72.1" + resolved "https://registry.yarnpkg.com/metro-runtime/-/metro-runtime-0.72.1.tgz#155d7042b68215f688d56d5d0d709b0f15d5978c" + integrity sha512-CO+fvJKYHKuR2vo7kjsegQ2oF3FMwa4YhnUInQ+xPVxWoy8DbOpmruKBoTsQVgHwyIziXzvJa+mze/6CFvT+3A== dependencies: "@babel/runtime" "^7.0.0" + react-refresh "^0.4.0" metro-runtime@0.72.3: version "0.72.3" @@ -8259,6 +8328,20 @@ metro-source-map@0.72.0: source-map "^0.5.6" vlq "^1.0.0" +metro-source-map@0.72.1: + version "0.72.1" + resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.72.1.tgz#2869058e3ef4cf9161b7b53dc6ba94980f26dd93" + integrity sha512-77TZuf10Ru+USo97HwDT8UceSzOGBZB8EYTObOsR0n1sjQHjvKsMflLA9Pco13o9NsIYAG6c6P/0vIpiHKqaKA== + dependencies: + "@babel/traverse" "^7.14.0" + "@babel/types" "^7.0.0" + invariant "^2.2.4" + metro-symbolicate "0.72.1" + nullthrows "^1.1.1" + ob1 "0.72.1" + source-map "^0.5.6" + vlq "^1.0.0" + metro-source-map@0.72.3: version "0.72.3" resolved "https://registry.yarnpkg.com/metro-source-map/-/metro-source-map-0.72.3.tgz#5efcf354413804a62ff97864e797f60ef3cc689e" @@ -8285,6 +8368,18 @@ metro-symbolicate@0.72.0: through2 "^2.0.1" vlq "^1.0.0" +metro-symbolicate@0.72.1: + version "0.72.1" + resolved "https://registry.yarnpkg.com/metro-symbolicate/-/metro-symbolicate-0.72.1.tgz#8ae41085e888a3bbe49c89904e7c482e1f6bda9b" + integrity sha512-ScC3dVd2XrfZSd6kubOw7EJNp2oHdjrqOjGpFohtcXGjhqkzDosp7Fg84VgwQGN8g720xvUyEBfSMmUCXcicOQ== + dependencies: + invariant "^2.2.4" + metro-source-map "0.72.1" + nullthrows "^1.1.1" + source-map "^0.5.6" + through2 "^2.0.1" + vlq "^1.0.0" + metro-symbolicate@0.72.3: version "0.72.3" resolved "https://registry.yarnpkg.com/metro-symbolicate/-/metro-symbolicate-0.72.3.tgz#093d4f8c7957bcad9ca2ab2047caa90b1ee1b0c1" @@ -8796,6 +8891,11 @@ ob1@0.72.0: resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.72.0.tgz#13fa85d2fd1444d534156ac701c492fa6c17c956" integrity sha512-QwCDyk1SvGg6KVEgpvAK9xG+7+0sEUZYuzNBT+aucFFVDkw0nHmsgfpzxNiiZwcSpWb04IxGp4CKAmFQBmLQPw== +ob1@0.72.1: + version "0.72.1" + resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.72.1.tgz#043943baf35a3fff1c1a436ad29410cfada8b912" + integrity sha512-TyQX2gO08klGTMuzD+xm3iVrzXiIygCB7t+NWeicOR05hkzgeWOiAZ8q40uMfIDRfEAc6hd66sJdIEhU/yUZZA== + ob1@0.72.3: version "0.72.3" resolved "https://registry.yarnpkg.com/ob1/-/ob1-0.72.3.tgz#fc1efcfe156f12ed23615f2465a796faad8b91e4" @@ -9592,15 +9692,15 @@ react-native-xaml@^0.0.68: "@types/react-native" "*" typescript "^4.4.3" -react-native@0.0.0-20220812-2104-23429330a: - version "0.0.0-20220812-2104-23429330a" - resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.0.0-20220812-2104-23429330a.tgz#c213951881a916729d761123db7c36851fa9bd30" - integrity sha512-6KPlxs/RDEXBhHWM8k9UDixonkjBOlHLpzYZrLyLsBa7sA5OxWXBDSBZm1hPqpWNkw++diSqORU6QJetgxCgEA== +react-native@0.0.0-20220826-2018-9ac437f25: + version "0.0.0-20220826-2018-9ac437f25" + resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.0.0-20220826-2018-9ac437f25.tgz#108e7d3245911ae73e46c5ae068c06753bf46d29" + integrity sha512-LRapoqKRETF8hkCP86H/ZJ8jPU4ddNrtsnOC+vBwc2TGyNgxZQtzIMzlBHO24Z3NEO9ItCg62WtyxKcAILRtLw== dependencies: "@jest/create-cache-key-function" "^27.0.1" - "@react-native-community/cli" "^9.0.0-alpha.11" - "@react-native-community/cli-platform-android" "^9.0.0-alpha.10" - "@react-native-community/cli-platform-ios" "^9.0.0-alpha.10" + "@react-native-community/cli" "^9.0.0" + "@react-native-community/cli-platform-android" "^9.0.0" + "@react-native-community/cli-platform-ios" "^9.0.0" "@react-native/assets" "1.0.0" "@react-native/normalize-color" "2.0.0" "@react-native/polyfills" "2.0.0" @@ -9611,9 +9711,9 @@ react-native@0.0.0-20220812-2104-23429330a: invariant "^2.2.4" jsc-android "^250230.2.1" memoize-one "^5.0.0" - metro-react-native-babel-transformer "0.72.0" - metro-runtime "0.72.0" - metro-source-map "0.72.0" + metro-react-native-babel-transformer "0.72.1" + metro-runtime "0.72.1" + metro-source-map "0.72.1" mkdirp "^0.5.1" nullthrows "^1.1.1" pretty-format "^26.5.2" From cac2be9ea26c6b07933b822098ae7ed5d25e9d9d Mon Sep 17 00:00:00 2001 From: TatianaKapos Date: Mon, 17 Oct 2022 11:14:11 -0700 Subject: [PATCH 2/3] Change files --- ...-native-win32-2dea3ad5-977b-4636-904e-2c352c31c503.json | 7 +++++++ ...ation-channel-cbdb4f9a-0579-4024-87fb-49ca84462ad5.json | 7 +++++++ ...tualized-list-043e7a3b-a1c9-4008-8b7c-c8a607f50d1c.json | 7 +++++++ ...ative-windows-f68da6af-2da2-4fe0-b718-6bc1435802a3.json | 7 +++++++ 4 files changed, 28 insertions(+) create mode 100644 change/@office-iss-react-native-win32-2dea3ad5-977b-4636-904e-2c352c31c503.json create mode 100644 change/@react-native-windows-automation-channel-cbdb4f9a-0579-4024-87fb-49ca84462ad5.json create mode 100644 change/@react-native-windows-virtualized-list-043e7a3b-a1c9-4008-8b7c-c8a607f50d1c.json create mode 100644 change/react-native-windows-f68da6af-2da2-4fe0-b718-6bc1435802a3.json diff --git a/change/@office-iss-react-native-win32-2dea3ad5-977b-4636-904e-2c352c31c503.json b/change/@office-iss-react-native-win32-2dea3ad5-977b-4636-904e-2c352c31c503.json new file mode 100644 index 00000000000..ecb90889b46 --- /dev/null +++ b/change/@office-iss-react-native-win32-2dea3ad5-977b-4636-904e-2c352c31c503.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "integration 8/26/22", + "packageName": "@office-iss/react-native-win32", + "email": "tatianakapos@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@react-native-windows-automation-channel-cbdb4f9a-0579-4024-87fb-49ca84462ad5.json b/change/@react-native-windows-automation-channel-cbdb4f9a-0579-4024-87fb-49ca84462ad5.json new file mode 100644 index 00000000000..f991cab07e2 --- /dev/null +++ b/change/@react-native-windows-automation-channel-cbdb4f9a-0579-4024-87fb-49ca84462ad5.json @@ -0,0 +1,7 @@ +{ + "type": "minor", + "comment": "integration 8/26/22", + "packageName": "@react-native-windows/automation-channel", + "email": "tatianakapos@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@react-native-windows-virtualized-list-043e7a3b-a1c9-4008-8b7c-c8a607f50d1c.json b/change/@react-native-windows-virtualized-list-043e7a3b-a1c9-4008-8b7c-c8a607f50d1c.json new file mode 100644 index 00000000000..fe3df8d9a77 --- /dev/null +++ b/change/@react-native-windows-virtualized-list-043e7a3b-a1c9-4008-8b7c-c8a607f50d1c.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "integration 8/26/22", + "packageName": "@react-native-windows/virtualized-list", + "email": "tatianakapos@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/react-native-windows-f68da6af-2da2-4fe0-b718-6bc1435802a3.json b/change/react-native-windows-f68da6af-2da2-4fe0-b718-6bc1435802a3.json new file mode 100644 index 00000000000..58342d4688f --- /dev/null +++ b/change/react-native-windows-f68da6af-2da2-4fe0-b718-6bc1435802a3.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "integration 8/26/22", + "packageName": "react-native-windows", + "email": "tatianakapos@microsoft.com", + "dependentChangeType": "patch" +} From af9acb6c855023b463ac0ef2a26d1d961add0cb9 Mon Sep 17 00:00:00 2001 From: TatianaKapos Date: Mon, 17 Oct 2022 11:33:57 -0700 Subject: [PATCH 3/3] remove processTransform override --- vnext/overrides.json | 7 - .../StyleSheet/processTransform.windows.js | 163 ------------------ 2 files changed, 170 deletions(-) delete mode 100644 vnext/src/Libraries/StyleSheet/processTransform.windows.js diff --git a/vnext/overrides.json b/vnext/overrides.json index bf67a687781..f3e330c8de9 100644 --- a/vnext/overrides.json +++ b/vnext/overrides.json @@ -519,13 +519,6 @@ "type": "platform", "file": "src/Libraries/StyleSheet/PlatformColorValueTypes.windows.js" }, - { - "type": "patch", - "file": "src/Libraries/StyleSheet/processTransform.windows.js", - "baseFile": "Libraries/StyleSheet/processTransform.js", - "baseHash": "2b5505372781ddd1d526b6badc7aed53b85e9545", - "issue": 9797 - }, { "type": "derived", "file": "src/Libraries/Text/Text.windows.js", diff --git a/vnext/src/Libraries/StyleSheet/processTransform.windows.js b/vnext/src/Libraries/StyleSheet/processTransform.windows.js deleted file mode 100644 index 7b065c04037..00000000000 --- a/vnext/src/Libraries/StyleSheet/processTransform.windows.js +++ /dev/null @@ -1,163 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @format - * @flow - */ - -'use strict'; - -const invariant = require('invariant'); -const stringifySafe = require('../Utilities/stringifySafe').default; - -/** - * Generate a transform matrix based on the provided transforms, and use that - * within the style object instead. - * - * This allows us to provide an API that is similar to CSS, where transforms may - * be applied in an arbitrary order, and yet have a universal, singular - * interface to native code. - */ -function processTransform( - transform: Array, -): Array | Array { - if (__DEV__) { - _validateTransforms(transform); - } - - return transform; -} - -function _validateTransforms(transform: Array): void { - transform.forEach(transformation => { - const keys = Object.keys(transformation); - invariant( - keys.length === 1, - 'You must specify exactly one property per transform object. Passed properties: %s', - stringifySafe(transformation), - ); - const key = keys[0]; - const value = transformation[key]; - _validateTransform(key, value, transformation); - }); -} - -function _validateTransform( - key: - | string - | $TEMPORARY$string<'matrix'> - | $TEMPORARY$string<'perspective'> - | $TEMPORARY$string<'rotate'> - | $TEMPORARY$string<'rotateX'> - | $TEMPORARY$string<'rotateY'> - | $TEMPORARY$string<'rotateZ'> - | $TEMPORARY$string<'scale'> - | $TEMPORARY$string<'scaleX'> - | $TEMPORARY$string<'scaleY'> - | $TEMPORARY$string<'skewX'> - | $TEMPORARY$string<'skewY'> - | $TEMPORARY$string<'translate'> - | $TEMPORARY$string<'translateX'> - | $TEMPORARY$string<'translateY'>, - value: any | number | string, - transformation: any, -) { - invariant( - !value.getValue, - 'You passed an Animated.Value to a normal component. ' + - 'You need to wrap that component in an Animated. For example, ' + - 'replace by .', - ); - - const multivalueTransforms = ['matrix', 'translate']; - if (multivalueTransforms.indexOf(key) !== -1) { - invariant( - Array.isArray(value), - 'Transform with key of %s must have an array as the value: %s', - key, - stringifySafe(transformation), - ); - } - switch (key) { - case 'matrix': - invariant( - value.length === 9 || value.length === 16, - 'Matrix transform must have a length of 9 (2d) or 16 (3d). ' + - 'Provided matrix has a length of %s: %s', - /* $FlowFixMe[prop-missing] (>=0.84.0 site=react_native_fb) This - * comment suppresses an error found when Flow v0.84 was deployed. To - * see the error, delete this comment and run Flow. */ - value.length, - stringifySafe(transformation), - ); - break; - case 'translate': - invariant( - value.length === 2 || value.length === 3, - 'Transform with key translate must be an array of length 2 or 3, found %s: %s', - /* $FlowFixMe[prop-missing] (>=0.84.0 site=react_native_fb) This - * comment suppresses an error found when Flow v0.84 was deployed. To - * see the error, delete this comment and run Flow. */ - value.length, - stringifySafe(transformation), - ); - break; - case 'rotateX': - case 'rotateY': - case 'rotateZ': - case 'rotate': - case 'skewX': - case 'skewY': - invariant( - typeof value === 'string', - 'Transform with key of "%s" must be a string: %s', - key, - stringifySafe(transformation), - ); - invariant( - value.indexOf('deg') > -1 || value.indexOf('rad') > -1, - 'Rotate transform must be expressed in degrees (deg) or radians ' + - '(rad): %s', - stringifySafe(transformation), - ); - break; - case 'perspective': - invariant( - typeof value === 'number', - 'Transform with key of "%s" must be a number: %s', - key, - stringifySafe(transformation), - ); - invariant( - value !== 0, - 'Transform with key of "%s" cannot be zero: %s', - key, - stringifySafe(transformation), - ); - break; - case 'translateX': - case 'translateY': - case 'scale': - case 'scaleX': - case 'scaleY': - invariant( - typeof value === 'number', - 'Transform with key of "%s" must be a number: %s', - key, - stringifySafe(transformation), - ); - break; - default: - invariant( - false, - 'Invalid transform %s: %s', - key, - stringifySafe(transformation), - ); - } -} - -module.exports = processTransform;