* Integrate 8/24

* Change files

* Update Overrides

* Update Metro

* Update Packages

* Change files

* Update Snapshots

* Update Pkg Version

* Integrate 9/20

* Change files

* Remove Override

* Remove Override

* Add Files to CICompile

* Fix Build Break

* Format + Overrides + Warnings Fix

* Add Override

* Address Feedback

* Address Feedback

* Try to fix missing-asset-registry-path error

* Remove deleted yoga functions from exported def file

* Force resolution of @react-native/metro-config@0.73.1 and actually use it in our metro config

* Fix Snapshots

* fix bundles

* Fix lib cli-init

* fix playground bundle again

* Yarn

* fix lib again

* Fix Test

---------

Co-authored-by: Jon Thysell <jthysell@microsoft.com>
Co-authored-by: Andrew Coates <30809111+acoates-ms@users.noreply.github.com>
This commit is contained in:
Chiara Mooney 2023-10-05 14:38:33 -07:00 коммит произвёл GitHub
Родитель 1ec7890666
Коммит 4af86020f1
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
136 изменённых файлов: 10683 добавлений и 6494 удалений

Просмотреть файл

@ -92,6 +92,11 @@ steps:
displayName: Init new lib project
workingDirectory: $(Agent.BuildDirectory)
- script: |
rmdir /s /q android
displayName: Remove broken android folder # See issue https://github.com/microsoft/react-native-windows/issues/12209
workingDirectory: $(Agent.BuildDirectory)\testcli
- script: |
call yarn install
call yarn upgrade react@$(reactDevDependency) --dev

3
.vscode/settings.json поставляемый
Просмотреть файл

@ -16,7 +16,8 @@
"regex": "cpp",
"utility": "cpp",
"ratio": "cpp",
"memory": "cpp"
"memory": "cpp",
"array": "cpp"
},
"search.exclude": {
"**/dist/**/*.js": true,

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Integrate 9/20",
"packageName": "@office-iss/react-native-win32",
"email": "34109996+chiaramooney@users.noreply.github.com",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Integrate 9/20",
"packageName": "@react-native-windows/automation-channel",
"email": "34109996+chiaramooney@users.noreply.github.com",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Integrate 9/20",
"packageName": "@react-native-windows/cli",
"email": "34109996+chiaramooney@users.noreply.github.com",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -0,0 +1,7 @@
{
"type": "prerelease",
"comment": "Integrate 9/20",
"packageName": "react-native-windows",
"email": "34109996+chiaramooney@users.noreply.github.com",
"dependentChangeType": "patch"
}

Просмотреть файл

@ -55,15 +55,20 @@
"safe-buffer": "^5.2.1",
"set-value": "^4.0.1",
"strip-ansi": "^6.0.1",
"**/@react-native/metro-config": "0.73.1",
"**/parse-url/normalize-url": "^4.5.1",
"**/@react-native/monorepo/node_modules/jest-junit": "^13.0.0",
"**/@react-native/monorepo/node_modules/ws": "^6.2.2",
"**/@react-native/tester/ws": "^6.2.2",
"**/detox/ws": "^5.2.3",
"@react-native-community/cli-server-api": "12.0.0-alpha.12",
"@react-native-community/cli-tools": "12.0.0-alpha.12",
"xml2js": "^0.5.0",
"z-schema": "^5.0.2"
},
"resolutions.justification": {
"@react-native-community/cli-server-api": "Workaround temporary issue caused by bad upstream dependencies. Should be removed before 0.73 snaps",
"@react-native-community/cli-tools": "Workaround temporary issue caused by bad upstream dependencies. Should be removed before 0.73 snaps",
"z-schema": "CVE-2021-3765 in validator. z-schema is used by rush which is a dependency of lage so should not be executed in this repo"
}
}

Просмотреть файл

@ -5,7 +5,7 @@
"excludePatterns": [
"src/js/examples-win32/**"
],
"baseVersion": "0.73.0-nightly-20230811-68c7cfe62",
"baseVersion": "0.73.0-nightly-20230920-630cf3b21",
"overrides": [
{
"type": "patch",
@ -49,7 +49,7 @@
"type": "derived",
"file": "src/js/utils/RNTesterList.win32.js",
"baseFile": "packages/rn-tester/js/utils/RNTesterList.android.js",
"baseHash": "b74a7b2dbeb16cad3d0cdad80a440a8206f351ad"
"baseHash": "d22105d499212f4aa700d548c313fb15d178a890"
}
]
}

Просмотреть файл

@ -19,7 +19,7 @@
"peerDependencies": {
"@office-iss/react-native-win32": "^0.0.0-canary.216",
"react": "18.0.0",
"react-native": "0.73.0-nightly-20230811-68c7cfe62"
"react-native": "0.73.0-nightly-20230920-630cf3b21"
},
"devDependencies": {
"@office-iss/react-native-win32": "^0.0.0-canary.216",
@ -30,7 +30,7 @@
"@types/node": "^18.0.0",
"eslint": "^8.19.0",
"just-scripts": "^1.3.3",
"react-native": "0.73.0-nightly-20230811-68c7cfe62",
"react-native": "0.73.0-nightly-20230920-630cf3b21",
"react-native-platform-override": "^1.9.15",
"typescript": "^4.9.5"
},

Просмотреть файл

@ -304,6 +304,10 @@ const APIs: Array<RNTesterModuleInfo> = ([
category: 'Basic',
module: require('../examples/TurboModule/TurboModuleExample'),
},
{
key: 'LegacyModuleExample',
module: require('../examples/TurboModule/LegacyModuleExample'),
},
{
key: 'TurboCxxModuleExample',
category: 'Basic',

Просмотреть файл

@ -63,8 +63,6 @@
; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/
; Flow doesn't support platforms
.*/packages/react-native/Libraries/Utilities/LoadingView.js
; Ignore the src folder - flow files are combined with ones from react-native into the root Libraries folder
.*/react-native-win32/src/.*
@ -73,6 +71,9 @@
.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$
; Checked-in build output
<PROJECT_ROOT>/packages/debugger-frontend/dist/
[untyped]
.*/node_modules/@react-native-community/cli/.*/.*
; Should work out how to do this properly
@ -101,12 +102,18 @@ module.file_ext=.js
module.file_ext=.json
module.file_ext=.win32.js
; [Win32]
;experimental.multi_platform=true
;experimental.multi_platform.extensions=.ios
;experimental.multi_platform.extensions=.android
munge_underscores=true
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/index.win32.js'
module.name_mapper='^@office-iss/react-native-win32$' -> '<PROJECT_ROOT>/index.win32.js'
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/\1'
module.name_mapper='^@office-iss/react-native-win32/\(.*\)$' -> '<PROJECT_ROOT>\/1'
module.name_mapper='^@react-native/dev-middleware$' -> '<PROJECT_ROOT>/\1'
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/Libraries/Image/RelativeImageStub'
suppress_type=$FlowIssue
@ -139,4 +146,4 @@ untyped-import
untyped-type-import
[version]
^0.214.0
^0.216.1

Просмотреть файл

@ -7,13 +7,13 @@
"**/__snapshots__/**",
"src/rntypes/**"
],
"baseVersion": "0.73.0-nightly-20230811-68c7cfe62",
"baseVersion": "0.73.0-nightly-20230920-630cf3b21",
"overrides": [
{
"type": "derived",
"file": ".flowconfig",
"baseFile": ".flowconfig",
"baseHash": "314ff8652c2a9480d2d72fa6366d3772508acb1d"
"baseHash": "df2115e026fe77aef6f344f7523b09dd83be5626"
},
{
"type": "derived",
@ -81,27 +81,27 @@
"type": "patch",
"file": "src/Libraries/Components/Pressable/Pressable.win32.js",
"baseFile": "packages/react-native/Libraries/Components/Pressable/Pressable.js",
"baseHash": "319edc1911def764992d91bdb8b028a64273fa27",
"baseHash": "6fb2aede8cff4c47e8e965fed9ed1a9d55d33cfc",
"issue": 6240
},
{
"type": "copy",
"type": "patch",
"file": "src/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js",
"baseFile": "packages/react-native/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js",
"baseHash": "09f143fc3f2ee80463764e1c2b3f23107d501a4c",
"issue": 4378
"baseHash": "e69c4f61d26361e6aeb62b6d3f31d1c1bb78e4ae",
"issue": 0
},
{
"type": "copy",
"file": "src/Libraries/Components/SafeAreaView/SafeAreaView.win32.js",
"baseFile": "packages/react-native/Libraries/Components/SafeAreaView/SafeAreaView.js",
"baseHash": "8dbe05a71b7393e987b02d72af55d9ea3e0aa274"
"baseHash": "ae5845b576484b3600e395d3b1ee03223530b8f7"
},
{
"type": "derived",
"file": "src/Libraries/Components/ScrollView/ScrollView.win32.js",
"baseFile": "packages/react-native/Libraries/Components/ScrollView/ScrollView.js",
"baseHash": "7d162bb43bce3f9da78b7c304530b3f804d21658"
"baseHash": "1254528d4082b82fe26d147676b812940bff63ac"
},
{
"type": "platform",
@ -183,7 +183,7 @@
"type": "patch",
"file": "src/Libraries/Components/View/View.win32.js",
"baseFile": "packages/react-native/Libraries/Components/View/View.js",
"baseHash": "e5f834b15f3c739957547f627f50d14b607c3c5e"
"baseHash": "f6813acaf2043e39f0d57fa9f667c5bbb5202daa"
},
{
"type": "derived",
@ -340,7 +340,7 @@
"type": "derived",
"file": "src/Libraries/NativeComponent/BaseViewConfig.win32.js",
"baseFile": "packages/react-native/Libraries/NativeComponent/BaseViewConfig.ios.js",
"baseHash": "97b5ae2c84de4ad043dc44a3f647611ba869a03e"
"baseHash": "ae7bdcfff1117d4a349b7b9bcc108a22ae7099ae"
},
{
"type": "copy",
@ -482,14 +482,13 @@
"type": "derived",
"file": "src/Libraries/Utilities/NativePlatformConstantsWin.js",
"baseFile": "packages/react-native/Libraries/Utilities/NativePlatformConstantsIOS.js",
"baseHash": "828c7596bdb33933178082e334057cd849d50359"
"baseHash": "77a07a52a5d20150d5596574e251aba1b767a9cd"
},
{
"type": "derived",
"file": "src/Libraries/Utilities/Platform.flow.win32.js",
"baseFile": "packages/react-native/Libraries/Utilities/Platform.flow.js",
"baseHash": "c0a203e8d15f99ff00edaab6c4a40a49606a99f0",
"issue": 0
"baseHash": "c0a203e8d15f99ff00edaab6c4a40a49606a99f0"
},
{
"type": "derived",

Просмотреть файл

@ -25,31 +25,33 @@
},
"dependencies": {
"@babel/runtime": "^7.0.0",
"@jest/create-cache-key-function": "^29.2.1",
"@react-native-community/cli": "12.0.0-alpha.7",
"@react-native-community/cli-platform-android": "12.0.0-alpha.7",
"@react-native-community/cli-platform-ios": "12.0.0-alpha.7",
"@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/assets": "1.0.0",
"@react-native/assets-registry": "0.73.0-nightly-20230622-0201e51bb",
"@react-native/codegen": "0.73.0-nightly-20230711-f396067cc",
"@react-native/gradle-plugin": "0.73.0-nightly-20230726-bae63d492",
"@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/metro-config": "^0.73.0",
"@react-native/normalize-colors": "0.73.0-nightly-20230622-0201e51bb",
"@react-native/virtualized-lists": "0.73.0-nightly-20230728-c168a4f88",
"@react-native/virtualized-lists": "0.73.0-nightly-20230912-0e5ea2890",
"abort-controller": "^3.0.0",
"anser": "^1.4.9",
"ansi-regex": "^5.0.0",
"art": "^0.10.0",
"base64-js": "^1.5.1",
"deprecated-react-native-prop-types": "4.2.0",
"deprecated-react-native-prop-types": "4.2.1",
"event-target-shim": "^5.0.1",
"flow-enums-runtime": "^0.0.6",
"invariant": "^2.2.4",
"jest-environment-node": "^29.2.1",
"jest-environment-node": "^29.6.3",
"jsc-android": "^250231.0.0",
"memoize-one": "^5.0.0",
"metro-runtime": "0.76.7",
"metro-source-map": "0.76.7",
"metro-runtime": "0.79.1",
"metro-source-map": "0.79.1",
"mkdirp": "^0.5.1",
"nullthrows": "^1.1.1",
"pretty-format": "^26.5.2",
@ -78,18 +80,18 @@
"@types/prop-types": "15.7.1",
"@types/react": "^18.0.18",
"eslint": "^8.19.0",
"flow-bin": "^0.214.0",
"flow-bin": "^0.215.0",
"jscodeshift": "^0.14.0",
"just-scripts": "^1.3.3",
"prettier": "^2.4.1",
"react": "18.2.0",
"react-native": "0.73.0-nightly-20230811-68c7cfe62",
"react-native": "0.73.0-nightly-20230920-630cf3b21",
"react-native-platform-override": "^1.9.15",
"typescript": "^4.9.5"
},
"peerDependencies": {
"react": "18.2.0",
"react-native": "0.73.0-nightly-20230811-68c7cfe62"
"react-native": "0.73.0-nightly-20230920-630cf3b21"
},
"beachball": {
"defaultNpmTag": "canary",

Просмотреть файл

@ -28,6 +28,7 @@ import type {
import {PressabilityDebugView} from '../../Pressability/PressabilityDebug';
import usePressability from '../../Pressability/usePressability';
import {type RectOrSize} from '../../StyleSheet/Rect';
import useMergeRefs from '../../Utilities/useMergeRefs';
import useAndroidRippleForView, {
type RippleConfig,
} from './useAndroidRippleForView';
@ -290,7 +291,7 @@ function Pressable(props: Props, forwardedRef): React.Node {
} = props;
const viewRef = useRef<React.ElementRef<typeof View> | null>(null);
useImperativeHandle(forwardedRef, () => viewRef.current);
const mergedRef = useMergeRefs(forwardedRef, viewRef);
const android_rippleConfig = useAndroidRippleForView(android_ripple, viewRef);
@ -407,7 +408,7 @@ function Pressable(props: Props, forwardedRef): React.Node {
<View
{...restPropsWithDefaults}
{...eventHandlers}
ref={viewRef}
ref={mergedRef}
style={typeof style === 'function' ? style({pressed}) : style}>
{typeof children === 'function' ? children({pressed}) : children}
{__DEV__ ? <PressabilityDebugView color="red" hitSlop={hitSlop} /> : null}

Просмотреть файл

@ -14,8 +14,6 @@ import Platform from '../../Utilities/Platform';
import View from '../View/View';
import * as React from 'react';
let exported: React.AbstractComponent<ViewProps, React.ElementRef<typeof View>>;
/**
* Renders nested content and automatically applies paddings reflect the portion
* of the view that is not covered by navigation bars, tab bars, toolbars, and
@ -25,7 +23,10 @@ let exported: React.AbstractComponent<ViewProps, React.ElementRef<typeof View>>;
* limitation of the screen, such as rounded corners or camera notches (aka
* sensor housing area on iPhone X).
*/
exported = Platform.select({
const exported: React.AbstractComponent<
ViewProps,
React.ElementRef<typeof View>,
> = Platform.select({
ios: require('./RCTSafeAreaViewNativeComponent').default,
default: View,
});

Просмотреть файл

@ -1700,7 +1700,6 @@ class ScrollView extends React.Component<Props, State> {
return (
<StickyHeaderComponent
key={key}
nativeID={'StickyHeader-' + key} /* TODO: T68258846. */
ref={ref => this._setStickyHeaderRef(key, ref)}
nextHeaderLayoutY={this._headerLayoutYs.get(
this._getKeyForIndex(nextIndex, childArray),

Просмотреть файл

@ -10,6 +10,7 @@
import type {ViewProps} from './ViewPropTypes';
import ReactNativeFeatureFlags from '../../ReactNative/ReactNativeFeatureFlags';
import flattenStyle from '../../StyleSheet/flattenStyle';
import TextAncestor from '../../Text/TextAncestor';
import ViewNativeComponent from './ViewNativeComponent';
@ -122,6 +123,15 @@ const View: React.AbstractComponent<
let style = flattenStyle(otherProps.style);
const newPointerEvents = style?.pointerEvents || pointerEvents;
const collapsableOverride =
ReactNativeFeatureFlags.shouldForceUnflattenForElevation()
? {
collapsable:
style != null && style.elevation != null && style.elevation !== 0
? false
: otherProps.collapsable,
}
: {};
const _keyDown = (event: KeyEvent) => {
if (otherProps.keyDownEvents && event.isPropagationStopped() !== true) {
@ -209,6 +219,7 @@ const View: React.AbstractComponent<
return (
<ViewNativeComponent
{...otherProps}
{...collapsableOverride}
accessibilityControls={ariaControls ?? accessibilityControls} // Win32
accessibilityDescribedBy={
ariaDescribedBy ?? accessibilityDescribedBy

Просмотреть файл

@ -205,6 +205,7 @@ const validAttributesForNonEventProps = {
overflow: true,
shouldRasterizeIOS: true,
transform: {diff: require('../Utilities/differ/matricesDiffer')},
transformOrigin: true,
accessibilityRole: true,
accessibilityState: true,
nativeID: true,

Просмотреть файл

@ -10,18 +10,20 @@ import type {TurboModule} from '../TurboModule/RCTExport';
import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';
export type PlatformConstantsWin32 = {|
isTesting: boolean,
isDisableAnimations?: boolean,
reactNativeVersion: {|
major: number,
minor: number,
patch: number,
prerelease: ?string | number,
|},
osVersion: number,
|};
export interface Spec extends TurboModule {
+getConstants: () => {|
isTesting: boolean,
isDisableAnimations?: boolean,
reactNativeVersion: {|
major: number,
minor: number,
patch: number,
prerelease: ?string | number,
|},
osVersion: number,
|};
+getConstants: () => PlatformConstantsWin32;
}
export default (TurboModuleRegistry.getEnforcing<Spec>(

Просмотреть файл

@ -31,7 +31,7 @@
"just-scripts": "^1.3.2",
"prettier": "^2.4.1",
"react": "18.2.0",
"react-native": "0.73.0-nightly-20230811-68c7cfe62",
"react-native": "0.73.0-nightly-20230920-630cf3b21",
"react-native-windows": "^0.0.0-canary.713",
"typescript": "^4.9.5"
},

Просмотреть файл

@ -40,8 +40,8 @@
"xpath": "^0.0.27"
},
"devDependencies": {
"@react-native-community/cli-doctor": "^12.0.0-alpha.3",
"@react-native-community/cli-types": "^12.0.0-alpha.3",
"@react-native-community/cli-doctor": "12.0.0-alpha.12",
"@react-native-community/cli-types": "12.0.0-alpha.12",
"@rnw-scripts/eslint-config": "1.2.2",
"@rnw-scripts/jest-unittest-config": "1.5.6",
"@rnw-scripts/just-task": "2.3.16",

Просмотреть файл

@ -5,7 +5,7 @@
"excludePatterns": [
"src/js/examples-win/**"
],
"baseVersion": "0.73.0-nightly-20230811-68c7cfe62",
"baseVersion": "0.73.0-nightly-20230920-630cf3b21",
"overrides": [
{
"type": "patch",
@ -38,7 +38,7 @@
"type": "patch",
"file": "src/js/examples/Pressable/PressableExample.windows.js",
"baseFile": "packages/rn-tester/js/examples/Pressable/PressableExample.js",
"baseHash": "52addf0c993863131d5332f89087baaefeba604f",
"baseHash": "2b48a1872f6861b5fb5300a2407f01100f42e291",
"issue": 6240
},
{
@ -65,7 +65,7 @@
"type": "derived",
"file": "src/js/utils/RNTesterList.windows.js",
"baseFile": "packages/rn-tester/js/utils/RNTesterList.android.js",
"baseHash": "b74a7b2dbeb16cad3d0cdad80a440a8206f351ad"
"baseHash": "d22105d499212f4aa700d548c313fb15d178a890"
}
]
}

Просмотреть файл

@ -18,7 +18,7 @@
"peerDependencies": {
"@react-native-picker/picker": "2.4.10",
"react": "18.0.0",
"react-native": "0.73.0-nightly-20230811-68c7cfe62",
"react-native": "0.73.0-nightly-20230920-630cf3b21",
"react-native-windows": "^0.0.0-canary.713",
"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-20230811-68c7cfe62",
"react-native": "0.73.0-nightly-20230920-630cf3b21",
"react-native-platform-override": "^1.9.15",
"react-native-windows": "^0.0.0-canary.713",
"typescript": "^4.9.5"

Просмотреть файл

@ -50,7 +50,9 @@ function ContentPress() {
setTimesPressed(current => current + 1);
}}>
{({pressed}) => (
<Text style={styles.text}>{pressed ? 'Pressed!' : 'Press Me'}</Text>
<Text testID="one_press_me_button" style={styles.text}>
{pressed ? 'Pressed!' : 'Press Me'}
</Text>
)}
</Pressable>
</View>

Просмотреть файл

@ -378,6 +378,10 @@ const APIs: Array<RNTesterModuleInfo> = ([
category: 'Basic',
module: require('../examples/TurboModule/TurboModuleExample'),
},
{
key: 'LegacyModuleExample',
module: require('../examples/TurboModule/LegacyModuleExample'),
},
{
key: 'TurboCxxModuleExample',
category: 'Basic',

Просмотреть файл

@ -1,11 +1,11 @@
{
"baseVersion": "0.73.0-nightly-20230811-68c7cfe62",
"baseVersion": "0.73.0-nightly-20230920-630cf3b21",
"overrides": [
{
"type": "patch",
"file": "package.json",
"baseFile": "package.json",
"baseHash": "6f42581aee34d44963db02cccb3531a31dee18e5"
"baseHash": "af476573ff9850102d77fc10617129d0d1a96315"
}
]
}

Просмотреть файл

@ -16,8 +16,7 @@
"bump-all-updated-packages": "node ./scripts/monorepo/bump-all-updated-packages",
"clang-format": "clang-format -i --glob=*/**/*.{h,cpp,m,mm}",
"clean": "node ./scripts/build/clean.js",
"flow-check-android": "flow check --flowconfig-name .flowconfig.android",
"flow-check-ios": "flow check",
"flow-check": "flow check",
"flow": "flow",
"format-check": "prettier --list-different \"./**/*.{js,md,yml,ts,tsx}\"",
"format": "npm run prettier && npm run clang-format",
@ -37,7 +36,8 @@
"update-lock": "npx yarn-deduplicate"
},
"workspaces": [
"packages/*"
"packages/*",
"tools/*"
],
"peerDependencies": {
"react": "18.2.0"
@ -50,13 +50,14 @@
"@babel/preset-env": "^7.20.0",
"@babel/preset-flow": "^7.20.0",
"@definitelytyped/dtslint": "^0.0.127",
"@jest/create-cache-key-function": "^29.2.1",
"@jest/create-cache-key-function": "^29.6.3",
"@pkgjs/parseargs": "^0.11.0",
"@react-native/metro-babel-transformer": "^0.73.11",
"@react-native/metro-config": "^0.73.0",
"@reactions/component": "^2.0.2",
"@tsconfig/node18": "1.0.1",
"@types/react": "^18.0.18",
"@typescript-eslint/parser": "^5.57.1",
"ansi-styles": "^4.2.1",
"async": "^3.2.2",
"babel-plugin-minify-dead-code-elimination": "^0.5.2",
"babel-plugin-transform-define": "^2.1.2",
@ -65,7 +66,7 @@
"chalk": "^4.0.0",
"clang-format": "^1.8.0",
"connect": "^3.6.5",
"eslint": "^8.19.0",
"eslint": "^8.23.1",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-babel": "^5.3.1",
"eslint-plugin-eslint-comments": "^3.2.0",
@ -79,15 +80,16 @@
"eslint-plugin-react-native": "^4.0.0",
"eslint-plugin-redundant-undefined": "^0.4.0",
"eslint-plugin-relay": "^1.8.3",
"flow-bin": "^0.214.0",
"flow-api-translator": "0.15.0",
"flow-bin": "^0.216.1",
"glob": "^7.1.1",
"hermes-eslint": "0.15.0",
"inquirer": "^7.1.0",
"jest": "^29.2.1",
"jest": "^29.6.3",
"jest-junit": "^10.0.0",
"jscodeshift": "^0.14.0",
"metro-babel-register": "0.77.0",
"metro-memory-fs": "0.77.0",
"metro-babel-register": "0.79.1",
"metro-memory-fs": "0.79.1",
"micromatch": "^4.0.4",
"mkdirp": "^0.5.1",
"mock-fs": "^5.1.4",
@ -96,8 +98,10 @@
"prettier-plugin-hermes-parser": "0.14.0",
"react": "18.2.0",
"react-test-renderer": "18.2.0",
"rimraf": "^3.0.2",
"shelljs": "^0.8.5",
"signedsource": "^1.0.0",
"supports-color": "^7.1.0",
"typescript": "5.0.4",
"ws": "^6.2.2"
}

Просмотреть файл

@ -42,7 +42,7 @@ export default function RNTOption(props: Props): React.Node {
: props.selected
}
hitSlop={4}
onPress={props.onPress}
onPress={props.disabled === true ? undefined : props.onPress}
onPressIn={() => setPressed(true)}
onPressOut={() => setPressed(false)}
testID={props.testID}>

Просмотреть файл

@ -52,7 +52,6 @@ const styles = StyleSheet.create({
},
noscrollWrapper: {
flex: 1,
paddingVertical: 10,
rowGap: 30,
},
scrollWrapper: {

Просмотреть файл

@ -73,6 +73,8 @@ exports.examples = [
<ActivityIndicator
style={[styles.centering, styles.gray]}
color="white"
testID="default_activity_indicator"
accessibilityLabel="Wait for content to load!"
/>
);
},

Просмотреть файл

@ -158,6 +158,7 @@ class FlatListExample extends React.PureComponent<Props, State> {
<View style={styles.searchRow}>
<View style={styles.options}>
<PlainInput
testID="search_bar_flat_list"
onChangeText={this._onChangeFilterText}
placeholder="Search..."
value={this.state.filterText}

Просмотреть файл

@ -33,7 +33,9 @@ const Separator =
styles.separator,
{backgroundColor: highlighted ? highlightColor : defaultColor},
]}>
<Text style={styles.separatorText}>{text}</Text>
<Text testID="flat_list_separator" style={styles.separatorText}>
{text}
</Text>
</View>
);
};

Просмотреть файл

@ -41,7 +41,7 @@ exports.examples = [
views[i] = (
<View key={i} style={styles.row} collapsable={false}>
<View style={styles.touchable_area} collapsable={false}>
<Text>I am row {i}</Text>
<Text testID="row_js_responder_handler">I am row {i}</Text>
</View>
</View>
);

Просмотреть файл

@ -37,7 +37,11 @@ const TextInputForm = () => {
<TextInput placeholder="Username" style={styles.textInput} />
<TextInput placeholder="Password" style={styles.textInput} />
<TextInput placeholder="Confirm Password" style={styles.textInput} />
<Button title="Register" onPress={onButtonPress} />
<Button
testID="register_button"
title="Register"
onPress={onButtonPress}
/>
</View>
);
};
@ -114,7 +118,9 @@ const KeyboardAvoidingViewBehaviour = () => {
</Modal>
<View>
<Pressable onPress={() => setModalOpen(true)}>
<Text>Open Example</Text>
<Text testID="keyboard_avoiding_view_behaviors_open">
Open Example
</Text>
</Pressable>
</View>
</View>

Просмотреть файл

@ -13,18 +13,10 @@
import * as React from 'react';
import {Modal, Platform, StyleSheet, Switch, Text, View} from 'react-native';
import type {RNTesterModuleExample} from '../../types/RNTesterTypes';
import type {Props as ModalProps} from 'react-native/Libraries/Modal/Modal';
import RNTOption from '../../components/RNTOption';
const RNTesterButton = require('../../components/RNTesterButton');
const supportedOrientations = {
Portrait: ['portrait'],
Landscape: ['landscape'],
'Landscape Left': ['landscape-left'],
'Portrait and Landscape Right': ['portrait', 'landscape-right'],
'Portrait and Landscape': ['portrait', 'landscape'],
Default: [],
};
const animationTypes = ['slide', 'none', 'fade'];
const presentationStyles = [
'fullScreen',
@ -32,76 +24,220 @@ const presentationStyles = [
'formSheet',
'overFullScreen',
];
const iOSActions = ['None', 'On Dismiss', 'On Show'];
const noniOSActions = ['None', 'On Show'];
const supportedOrientations = [
'portrait',
'portrait-upside-down',
'landscape',
'landscape-left',
'landscape-right',
];
function ModalPresentation() {
const [animationType, setAnimationType] = React.useState('none');
const [transparent, setTransparent] = React.useState(false);
const [visible, setVisible] = React.useState(false);
const [hardwareAccelerated, setHardwareAccelerated] = React.useState(false);
const [statusBarTranslucent, setStatusBarTranslucent] = React.useState(false);
const [presentationStyle, setPresentationStyle] =
React.useState('fullScreen');
const [supportedOrientationKey, setSupportedOrientationKey] =
React.useState('Portrait');
const [currentOrientation, setCurrentOrientation] = React.useState('unknown');
const [action, setAction] = React.useState('None');
const actions = Platform.OS === 'ios' ? iOSActions : noniOSActions;
const onDismiss = () => {
setVisible(false);
if (action === 'onDismiss') {
alert('onDismiss');
}
};
const onDismiss = React.useCallback(() => {
alert('onDismiss');
}, []);
const onShow = React.useCallback(() => {
alert('onShow');
}, []);
const onRequestClose = React.useCallback(() => {
console.log('onRequestClose');
}, []);
const [props, setProps] = React.useState<ModalProps>({
animationType: 'none',
transparent: false,
hardwareAccelerated: false,
statusBarTranslucent: false,
presentationStyle: Platform.select({
ios: 'fullScreen',
default: undefined,
}),
supportedOrientations: Platform.select({
ios: ['portrait'],
default: undefined,
}),
onDismiss: undefined,
onShow: undefined,
visible: false,
});
const presentationStyle = props.presentationStyle;
const hardwareAccelerated = props.hardwareAccelerated;
const statusBarTranslucent = props.statusBarTranslucent;
const [currentOrientation, setCurrentOrientation] = React.useState('unknown');
const onShow = () => {
if (action === 'onShow') {
alert('onShow');
}
};
/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's
* LTI update could not be added via codemod */
const onOrientationChange = event =>
setCurrentOrientation(event.nativeEvent.orientation);
const modalBackgroundStyle = {
backgroundColor: transparent ? 'rgba(0, 0, 0, 0.5)' : '#f5fcff',
};
const innerContainerTransparentStyle = transparent
? {backgroundColor: '#fff', padding: 20}
: null;
const controls = (
<>
<View style={styles.inlineBlock}>
<Text style={styles.title}>Status Bar Translucent 🟢</Text>
<Switch
value={statusBarTranslucent}
onValueChange={enabled =>
setProps(prev => ({...prev, statusBarTranslucent: enabled}))
}
/>
</View>
<View style={styles.inlineBlock}>
<Text style={styles.title}>Hardware Acceleration 🟢</Text>
<Switch
value={hardwareAccelerated}
onValueChange={enabled =>
setProps(prev => ({
...prev,
hardwareAccelerated: enabled,
}))
}
/>
</View>
<View style={styles.block}>
<Text style={styles.title}>Presentation Style </Text>
<View style={styles.row}>
{presentationStyles.map(type => (
<RNTOption
key={type}
disabled={Platform.OS !== 'ios'}
style={styles.option}
label={type}
multiSelect={true}
onPress={() =>
setProps(prev => {
if (type === 'overFullScreen' && prev.transparent === true) {
return {
...prev,
presentationStyle: type,
transparent: false,
};
}
return {
...prev,
presentationStyle:
type === prev.presentationStyle ? undefined : type,
};
})
}
selected={type === presentationStyle}
/>
))}
</View>
</View>
<View style={styles.block}>
<View style={styles.rowWithSpaceBetween}>
<Text style={styles.title}>Transparent</Text>
<Switch
value={props.transparent}
onValueChange={enabled =>
setProps(prev => ({...prev, transparent: enabled}))
}
/>
</View>
{Platform.OS === 'ios' && presentationStyle !== 'overFullScreen' ? (
<Text style={styles.warning}>
iOS Modal can only be transparent with 'overFullScreen' Presentation
Style
</Text>
) : null}
</View>
<View style={styles.block}>
<Text style={styles.title}>Supported Orientation </Text>
<View style={styles.row}>
{supportedOrientations.map(orientation => (
<RNTOption
key={orientation}
disabled={Platform.OS !== 'ios'}
style={styles.option}
label={orientation}
multiSelect={true}
onPress={() =>
setProps(prev => {
if (prev.supportedOrientations?.includes(orientation)) {
return {
...prev,
supportedOrientations: prev.supportedOrientations?.filter(
o => o !== orientation,
),
};
}
return {
...prev,
supportedOrientations: [
...(prev.supportedOrientations ?? []),
orientation,
],
};
})
}
selected={props.supportedOrientations?.includes(orientation)}
/>
))}
</View>
</View>
<View style={styles.block}>
<Text style={styles.title}>Actions</Text>
<View style={styles.row}>
<RNTOption
key="onShow"
style={styles.option}
label="onShow"
multiSelect={true}
onPress={() =>
setProps(prev => ({
...prev,
onShow: prev.onShow ? undefined : onShow,
}))
}
selected={!!props.onShow}
/>
<RNTOption
key="onDismiss"
style={styles.option}
label="onDismiss ⚫️"
disabled={Platform.OS !== 'ios'}
onPress={() =>
setProps(prev => ({
...prev,
onDismiss: prev.onDismiss ? undefined : onDismiss,
}))
}
selected={!!props.onDismiss}
/>
</View>
</View>
</>
);
return (
<View>
<RNTesterButton onPress={() => setVisible(true)}>
<RNTesterButton
onPress={() => setProps(prev => ({...prev, visible: true}))}>
Show Modal
</RNTesterButton>
<Modal
animationType={animationType}
presentationStyle={presentationStyle}
transparent={transparent}
hardwareAccelerated={hardwareAccelerated}
statusBarTranslucent={statusBarTranslucent}
visible={visible}
onRequestClose={onDismiss}
supportedOrientations={supportedOrientations[supportedOrientationKey]}
onOrientationChange={onOrientationChange}
onDismiss={onDismiss}
onShow={onShow}>
<View style={[styles.modalContainer, modalBackgroundStyle]}>
<View
style={[
styles.modalInnerContainer,
innerContainerTransparentStyle,
]}>
<Text>
This modal was presented with animationType: '{animationType}'
{...props}
onRequestClose={onRequestClose}
onOrientationChange={onOrientationChange}>
<View style={styles.modalContainer}>
<View style={styles.modalInnerContainer}>
<Text testID="modal_animationType_text">
This modal was presented with animationType: '
{props.animationType}'
</Text>
{Platform.OS === 'ios' ? (
<Text>
It is currently displayed in {currentOrientation} mode.
</Text>
) : null}
<RNTesterButton onPress={onDismiss}>Close</RNTesterButton>
<RNTesterButton
onPress={() => setProps(prev => ({...prev, visible: false}))}>
Close
</RNTesterButton>
{controls}
</View>
</View>
</Modal>
@ -113,101 +249,13 @@ function ModalPresentation() {
key={type}
style={styles.option}
label={type}
onPress={() => setAnimationType(type)}
selected={type === animationType}
onPress={() => setProps(prev => ({...prev, animationType: type}))}
selected={type === props.animationType}
/>
))}
</View>
</View>
{Platform.OS === 'android' && Platform.isTV !== true ? (
<>
<View style={styles.inlineBlock}>
<Text style={styles.title}>Status Bar Translucent</Text>
<Switch
value={statusBarTranslucent}
onValueChange={() =>
setStatusBarTranslucent(!statusBarTranslucent)
}
/>
</View>
<View style={styles.inlineBlock}>
<Text style={styles.title}>Hardware Acceleration</Text>
<Switch
value={hardwareAccelerated}
onValueChange={() => setHardwareAccelerated(!hardwareAccelerated)}
/>
</View>
</>
) : null}
{Platform.isTV !== true ? (
<>
{Platform.OS === 'ios' ? (
<View style={styles.block}>
<Text style={styles.title}>Presentation Style</Text>
<View style={styles.row}>
{presentationStyles.map(type => (
<RNTOption
key={type}
style={styles.option}
label={type}
onPress={() => {
if (type !== 'overFullScreen' && transparent) {
setTransparent(false);
}
setPresentationStyle(type);
}}
selected={type === presentationStyle}
/>
))}
</View>
</View>
) : null}
<View style={styles.block}>
<View style={styles.rowWithSpaceBetween}>
<Text style={styles.title}>Transparent</Text>
<Switch
value={transparent}
disabled={presentationStyle !== 'overFullScreen'}
onValueChange={() => setTransparent(!transparent)}
/>
</View>
{Platform.OS === 'ios' && presentationStyle !== 'overFullScreen' ? (
<Text style={styles.warning}>
iOS Modal can only be transparent with 'overFullScreen'
Presentation Style
</Text>
) : null}
</View>
<View style={styles.block}>
<Text style={styles.title}>Supported Orientation</Text>
<View style={styles.row}>
{Object.keys(supportedOrientations).map(label => (
<RNTOption
key={label}
style={styles.option}
label={label}
onPress={() => setSupportedOrientationKey(label)}
selected={label === supportedOrientationKey}
/>
))}
</View>
</View>
<View style={styles.block}>
<Text style={styles.title}>Actions</Text>
<View style={styles.row}>
{actions.map(value => (
<RNTOption
key={value}
style={styles.option}
label={value}
onPress={() => setAction(value)}
selected={value === action}
/>
))}
</View>
</View>
</>
) : null}
{controls}
</View>
);
}
@ -249,7 +297,8 @@ const styles = StyleSheet.create({
},
modalInnerContainer: {
borderRadius: 10,
alignItems: 'center',
backgroundColor: '#fff',
padding: 10,
},
warning: {
margin: 3,

Просмотреть файл

@ -70,24 +70,22 @@ function StartupTimingExample(): React.Node {
title="Click to update React startup timing"
/>
<View>
<Text>{`startTime: ${
startUpTiming == null ? 'N/A' : startUpTiming.startTime
} ms`}</Text>
<Text>{`startTime: ${String(startUpTiming?.startTime)} ms`}</Text>
<Text>{`initializeRuntimeStart: ${String(
startUpTiming?.initializeRuntimeStart,
)} ms`}</Text>
<Text>
{`executeJavaScriptBundleEntryPointStart: ${
startUpTiming == null
? 'N/A'
: startUpTiming.executeJavaScriptBundleEntryPointStart
} ms`}
{`executeJavaScriptBundleEntryPointStart: ${String(
startUpTiming?.executeJavaScriptBundleEntryPointStart,
)} ms`}
</Text>
<Text>{`executeJavaScriptBundleEntryPointEnd: ${
startUpTiming == null
? 'N/A'
: startUpTiming.executeJavaScriptBundleEntryPointEnd
} ms`}</Text>
<Text>{`endTime: ${
startUpTiming == null ? 'N/A' : startUpTiming.endTime
} ms`}</Text>
<Text>{`executeJavaScriptBundleEntryPointEnd: ${String(
startUpTiming?.executeJavaScriptBundleEntryPointEnd,
)} ms`}</Text>
<Text>{`initializeRuntimeEnd: ${String(
startUpTiming?.initializeRuntimeEnd,
)} ms`}</Text>
<Text>{`endTime: ${String(startUpTiming?.endTime)} ms`}</Text>
</View>
</View>
</RNTesterPage>

Просмотреть файл

@ -0,0 +1,131 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
* @oncall react_native
*/
'use strict';
import type {ItemDataType} from '../components/itemData';
import * as React from 'react';
import {useState, useEffect, useCallback, StrictMode} from 'react';
import {Text} from 'react-native';
import {generateRandomItems} from '../components/itemData';
import ItemList from '../components/ItemList';
const TIMEOUT = 500;
const FETCH_COUNT = 250;
const ItemListMemo = React.memo(ItemList);
function ItemFetcherBadExample(props: {
onFetched: (items: ItemDataType[]) => void,
count: number,
}): React.Node {
const {onFetched, count} = props;
const fetchMoreItems = async (
itemsCount: number,
): Promise<ItemDataType[]> => {
return new Promise(resolve => {
setTimeout(() => {
resolve(generateRandomItems(itemsCount));
}, TIMEOUT);
});
};
fetchMoreItems(count).then((items: ItemDataType[]) => {
onFetched(items);
}, console.error);
}
function ItemFetcherGoodExample(props: {
onFetched: (items: ItemDataType[]) => void,
count: number,
}): React.Node {
const {onFetched, count} = props;
useEffect(() => {
const fetchMoreItems = async (
itemsCount: number,
): Promise<ItemDataType[]> => {
return new Promise(resolve => {
setTimeout(() => {
resolve(generateRandomItems(itemsCount));
}, TIMEOUT);
});
};
fetchMoreItems(count).then((items: ItemDataType[]) => {
onFetched(items);
}, console.error);
}, [onFetched, count]);
}
const ItemFetcherBadExampleMemo = React.memo(ItemFetcherBadExample);
const ItemFetcherGoodExampleMemo = React.memo(ItemFetcherGoodExample);
function EffectInRenderBadExample(): React.Node {
const [visibleItems, setVisibleItems] = useState<ItemDataType[]>([]);
const [fetchedItems, setFetchedItems] = useState<ItemDataType[]>([]);
const onMoreItemFetched = useCallback(
(items: ItemDataType[]) => {
setFetchedItems(items);
},
[setFetchedItems],
);
if (fetchedItems.length > 0) {
setVisibleItems(visibleItems.concat(fetchedItems));
setFetchedItems([]);
}
return (
<StrictMode>
<Text>{`Items count in list: ${visibleItems.length}`}</Text>
<ItemFetcherBadExampleMemo
onFetched={onMoreItemFetched}
count={FETCH_COUNT}
/>
<ItemListMemo data={visibleItems} />
</StrictMode>
);
}
function EffectInRenderGoodExample(): React.Node {
const [visibleItems, setVisibleItems] = useState<ItemDataType[]>([]);
const [fetchedItems, setFetchedItems] = useState<ItemDataType[]>([]);
const onMoreItemFetched = useCallback(
(items: ItemDataType[]) => {
setFetchedItems(items);
},
[setFetchedItems],
);
if (fetchedItems.length > 0) {
setVisibleItems(visibleItems.concat(fetchedItems));
setFetchedItems([]);
}
return (
<StrictMode>
<Text>{`Items count in list: ${visibleItems.length}`}</Text>
<ItemFetcherGoodExampleMemo
onFetched={onMoreItemFetched}
count={FETCH_COUNT}
/>
<ItemListMemo data={visibleItems} />
</StrictMode>
);
}
export default {
title:
'Directly trigger side effect in render may run multiple times and cause error state or re-renders',
description:
'Trigger a side effect in render method without using effect hook in <StrictMode>. This will force render component two times, and the side effect in bad example caused append items to the list two times unexpectedly.',
Bad: EffectInRenderBadExample,
Good: EffectInRenderGoodExample,
};

Просмотреть файл

@ -0,0 +1,66 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
* @oncall react_native
*/
'use strict';
import * as React from 'react';
import {Text} from 'react-native';
import RNTesterButton from '../../../components/RNTesterButton';
const {useState, useMemo} = React;
function NotMemoizeExpensiveTaskExampleBadExample(): React.Node {
const [count, setCount] = useState(0);
let expensiveResult = 0;
for (let i = 0; i < 50000000; i++) {
expensiveResult += i;
}
return (
<>
<Text>{`Expensive Result: ${expensiveResult}`}</Text>
<RNTesterButton onPress={() => setCount(count + 1)}>
{`Click me to count: ${count}`}
</RNTesterButton>
</>
);
}
function NotMemoizeExpensiveTaskExampleGoodExample(): React.Node {
const [count, setCount] = useState(0);
const expensiveResult = useMemo(() => {
let sum = 0;
for (let i = 0; i < 50000000; i++) {
sum += i;
}
return sum;
}, []);
return (
<>
<Text>{`Expensive Result: ${expensiveResult}`}</Text>
<RNTesterButton onPress={() => setCount(count + 1)}>
{`Click me to count: ${count}`}
</RNTesterButton>
</>
);
}
export default {
title:
'Expensive tasks should be memoized to avoid unnecessary long JS tasks',
description:
'Each re-render will run expensive job to get a result. The result should be memoized to avoid unnecessary re-computation',
Bad: NotMemoizeExpensiveTaskExampleBadExample,
Good: NotMemoizeExpensiveTaskExampleGoodExample,
};

Просмотреть файл

@ -57,7 +57,7 @@ function ReRenderWithNonPureChildGoodExample(): React.Node {
export default {
title: 'List re-render due to not pure or memoized',
description:
'The List component is not pure in the bad example. Even though all props are not changed, it will still re-render when parent re-renders.',
'Get horizontal scroll offset.\nThe List component is not pure in the bad example. Even though all props are not changed, it will still re-render when parent re-renders.',
Bad: ReRenderWithNonPureChildBadExample,
Good: ReRenderWithNonPureChildGoodExample,
};

Просмотреть файл

@ -55,7 +55,7 @@ function ReRenderWithObjectPropGoodExample(): React.Node {
export default {
title: 'Re-render from new object reference in prop',
description:
'Even with pure or memoized child component, if a new object reference is passed down as prop, the child component will still re-render unnecessarily. The onScroll callback is passed without useCallback hook in the bad example and caused performance issues.',
'Get horizontal scroll offset.\nEven with pure or memoized child component, if a new object reference is passed down as prop, the child component will still re-render unnecessarily. The onScroll callback is passed without useCallback hook in the bad example and caused performance issues.',
Bad: ReRenderWithObjectPropBadExample,
Good: ReRenderWithObjectPropGoodExample,
};

Просмотреть файл

@ -0,0 +1,36 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow strict-local
* @format
* @oncall react_native
*/
'use strict';
import * as React from 'react';
import ItemList from '../components/ItemList';
import {LIST_100_ITEMS} from '../components/itemData';
const ItemListMemo = React.memo(ItemList);
function RenderOffscreenContentBadExample(): React.Node {
return <ItemListMemo data={LIST_100_ITEMS} />;
}
function RenderOffscreenContentGoodExample(): React.Node {
return (
<ItemListMemo useFlatList data={LIST_100_ITEMS} initialNumToRender={2} />
);
}
export default {
title: 'Do not render offscreen content',
description:
'Render long list with ScrollView vs FlatList + initialNumToRender prop.\nNever render offscreen content when not needed.',
Bad: RenderOffscreenContentBadExample,
Good: RenderOffscreenContentGoodExample,
};

Просмотреть файл

@ -12,3 +12,6 @@
export {default as ReRenderWithNonPureChildExample} from './ReRenderWithNonPureChildExample';
export {default as ReRenderWithObjectPropExample} from './ReRenderWithObjectPropExample';
export {default as SetStateInWrongEffectExample} from './SetStateInWrongEffectExample';
export {default as RenderOffscreenContentExample} from './RenderOffscreenContentExample';
export {default as NotMemoizeExpensiveTaskExample} from './NotMemoizeExpensiveTaskExample';
export {default as EffectInRenderExample} from './EffectInRenderExample';

Просмотреть файл

@ -48,7 +48,9 @@ function ContentPress() {
setTimesPressed(current => current + 1);
}}>
{({pressed}) => (
<Text style={styles.text}>{pressed ? 'Pressed!' : 'Press Me'}</Text>
<Text testID="one_press_me_button" style={styles.text}>
{pressed ? 'Pressed!' : 'Press Me'}
</Text>
)}
</Pressable>
</View>

Просмотреть файл

@ -45,7 +45,7 @@ class Row extends React.Component {
return (
<TouchableWithoutFeedback onPress={this._onClick}>
<View style={styles.row}>
<Text style={styles.text}>
<Text testID="refresh_control_row" style={styles.text}>
{this.props.data.text + ' (' + this.props.data.clicks + ' clicks)'}
</Text>
</View>

Просмотреть файл

@ -0,0 +1,165 @@
/**
* 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.
*/
'use strict';
import * as React from 'react';
import {
ScrollView,
FlatList,
StyleSheet,
Switch,
Text,
TextInput,
View,
} from 'react-native';
export function ScrollViewKeyboardInsetsExample() {
const [automaticallyAdjustKeyboardInsets, setAutomaticallyAdjustKeyboardInsets] = React.useState(true);
const [flatList, setFlatList] = React.useState(false);
const [inverted, setInverted] = React.useState(false);
const [heightRestricted, setHeightRestricted] = React.useState(false);
const scrollViewProps = {
style: heightRestricted && styles.scrollViewHeightRestricted,
contentContainerStyle: styles.scrollViewContent,
automaticallyAdjustKeyboardInsets: automaticallyAdjustKeyboardInsets,
keyboardDismissMode: 'interactive',
};
const data = [...Array(20).keys()];
const renderItem = ({ item, index }) => {
const largeInput = (index % 5) === 4;
return (
<View key={item} style={styles.textInputRow}>
<TextInput placeholder={item.toString()}
multiline={largeInput}
style={[styles.textInput, largeInput && styles.textInputLarger]}/>
</View>
);
};
return (
<View style={styles.container}>
<View style={styles.controlRow}>
<Text><Text style={styles.code}>automaticallyAdjustKeyboardInsets</Text> is {automaticallyAdjustKeyboardInsets + ''}</Text>
<Switch
onValueChange={v => setAutomaticallyAdjustKeyboardInsets(v)}
value={automaticallyAdjustKeyboardInsets}
style={styles.controlSwitch}/>
</View>
<View style={styles.controlRow}>
<Text><Text style={styles.code}>FlatList</Text> is {flatList + ''}</Text>
<Switch
onValueChange={v => setFlatList(v)}
value={flatList}
style={styles.controlSwitch}/>
</View>
{flatList && (
<View style={styles.controlRow}>
<Text><Text style={styles.code}>inverted</Text> is {inverted + ''}</Text>
<Switch
onValueChange={v => setInverted(v)}
value={inverted}
style={styles.controlSwitch}/>
</View>
)}
<View style={styles.controlRow}>
<Text><Text style={styles.code}>HeightRestricted</Text> is {heightRestricted + ''}</Text>
<Switch
onValueChange={v => setHeightRestricted(v)}
value={heightRestricted}
style={styles.controlSwitch}/>
</View>
<View style={styles.controlRow}>
<TextInput placeholder={'Text input outside scroll view'} style={styles.controlTextInput} />
</View>
{flatList
? (
<FlatList
{...scrollViewProps}
inverted={inverted}
data={data}
renderItem={renderItem}/>
)
: (
<ScrollView {...scrollViewProps}>
{data.map((item, index) => renderItem({ item, index }))}
</ScrollView>
)
}
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'stretch',
justifyContent: 'flex-start',
},
scrollViewHeightRestricted: {
marginVertical: 50,
borderColor: '#f00',
borderWidth: 1,
},
scrollViewContent: {
paddingVertical: 5,
paddingHorizontal: 10,
},
textInputRow: {
borderWidth: 1,
marginVertical: 8,
borderColor: '#999',
},
textInput: {
width: '100%',
backgroundColor: '#fff',
fontSize: 24,
padding: 8,
},
textInputLarger: {
minHeight: 200,
},
controlRow: {
padding: 10,
alignItems: 'center',
flexDirection: 'row',
justifyContent: 'space-between',
backgroundColor: '#fff',
borderTopWidth: 1,
borderTopColor: '#ccc',
borderBottomWidth: 1,
borderBottomColor: '#ccc',
},
controlSwitch: {
},
controlTextInput: {
flex: 1,
paddingVertical: 10,
paddingHorizontal: 10,
borderWidth: 2,
borderColor: '#ccc',
borderRadius: 8,
},
code: {
fontSize: 12,
fontFamily: 'Courier',
},
});
exports.title = 'ScrollViewKeyboardInsets';
exports.category = 'iOS';
exports.description =
'ScrollView automaticallyAdjustKeyboardInsets adjusts keyboard insets when soft keyboard is activated.';
exports.examples = [
{
title: '<ScrollView> automaticallyAdjustKeyboardInsets Example',
render: (): React.Node => <ScrollViewKeyboardInsetsExample/>,
},
];

Просмотреть файл

@ -30,7 +30,7 @@ class ScrollViewSimpleExample extends React.Component<{...}> {
for (let i = 0; i < nItems; i++) {
items[i] = (
<TouchableOpacity key={i} style={styles}>
<Text>{'Item ' + i}</Text>
<Text testID="scroll_view_item">{'Item ' + i}</Text>
</TouchableOpacity>
);
}

Просмотреть файл

@ -0,0 +1,15 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/
'use strict';
import type {RNTesterModule} from '../../types/RNTesterTypes';
declare module.exports: RNTesterModule;

Просмотреть файл

@ -0,0 +1,15 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/
'use strict';
import type {RNTesterModule} from '../../types/RNTesterTypes';
declare module.exports: RNTesterModule;

Просмотреть файл

@ -9,7 +9,7 @@
*/
import React, {useEffect, useState} from 'react';
import {Animated, StyleSheet, Text, View} from 'react-native';
import {Animated, StyleSheet, Text, View, Easing} from 'react-native';
import type {Node, Element} from 'react';
@ -50,6 +50,39 @@ function AnimateTransformSingleProp() {
);
}
function TransformOriginExample() {
const rotateAnim = React.useRef(new Animated.Value(0)).current;
useEffect(() => {
Animated.loop(
Animated.timing(rotateAnim, {
toValue: 1,
duration: 5000,
easing: Easing.linear,
useNativeDriver: true,
}),
).start();
}, [rotateAnim]);
const spin = rotateAnim.interpolate({
inputRange: [0, 1],
outputRange: ['0deg', '360deg'],
});
return (
<View style={styles.transformOriginWrapper}>
<Animated.View
style={[
styles.transformOriginView,
{
transform: [{rotate: spin}],
},
]}
/>
</View>
);
}
function Flip() {
const [theta] = useState(new Animated.Value(45));
const animate = () => {
@ -222,6 +255,7 @@ const styles = StyleSheet.create({
justifyContent: 'center',
backgroundColor: 'blue',
backfaceVisibility: 'hidden',
zIndex: 1024,
},
flipCard1: {
position: 'absolute',
@ -234,6 +268,15 @@ const styles = StyleSheet.create({
color: 'white',
fontWeight: 'bold',
},
transformOriginWrapper: {
alignItems: 'center',
},
transformOriginView: {
backgroundColor: 'pink',
width: 100,
height: 100,
transformOrigin: 'top left',
},
});
exports.title = 'Transforms';
@ -346,4 +389,11 @@ exports.examples = [
);
},
},
{
title: 'Transform origin',
description: "transformOrigin: 'top left'",
render(): Node {
return <TransformOriginExample />;
},
},
];

Просмотреть файл

@ -18,6 +18,7 @@ import {
Text,
TouchableOpacity,
View,
Platform,
} from 'react-native';
import styles from './TurboModuleExampleCommon';
@ -58,57 +59,97 @@ class SampleLegacyModuleExample extends React.Component<{||}, State> {
// Add calls to methods in TurboModule here
// $FlowFixMe[missing-local-annot]
_tests = {
voidFunc: () => getSampleLegacyModule()?.voidFunc(),
getBool: () => getSampleLegacyModule()?.getBool(true),
getEnum: () => getSampleLegacyModule()?.getEnum(1.0),
getNumber: () => getSampleLegacyModule()?.getNumber(99.95),
getFloat: () => getSampleLegacyModule()?.getNumber(99.95),
getInt: () => getSampleLegacyModule()?.getInt(99),
getLongLong: () => getSampleLegacyModule()?.getLongLong(99),
getUnsignedLongLong: () => getSampleLegacyModule()?.getUnsignedLongLong(99),
getNSInteger: () => getSampleLegacyModule()?.getNSInteger(99),
getNSUInteger: () => getSampleLegacyModule()?.getNSUInteger(99),
getArray: () =>
getSampleLegacyModule()?.getArray([
{a: 1, b: 'foo'},
{a: 2, b: 'bar'},
null,
]),
getObject: () =>
getSampleLegacyModule()?.getObject({a: 1, b: 'foo', c: null}),
getString: () => getSampleLegacyModule()?.getString('Hello'),
getNullString: () => getSampleLegacyModule()?.getString(null),
getNSNumber: () => getSampleLegacyModule()?.getNSNumber(20.0),
getUnsafeObject: () =>
getSampleLegacyModule()?.getObject({a: 1, b: 'foo', c: null}),
getRootTag: () => getSampleLegacyModule()?.getRootTag(this.context),
getValue: () =>
getSampleLegacyModule()?.getValue(5, 'test', {a: 1, b: 'foo'}),
callback: () =>
getSampleLegacyModule()?.getValueWithCallback(callbackValue =>
this._setResult('callback', callbackValue),
),
promise: () =>
getSampleLegacyModule()
?.getValueWithPromise(false)
.then(valuePromise => this._setResult('promise', valuePromise)),
rejectPromise: () =>
getSampleLegacyModule()
?.getValueWithPromise(true)
.then(() => {})
.catch(e => this._setResult('rejectPromise', e.message)),
// voidFuncThrows: () => getSampleLegacyModule()?.voidFuncThrows(),
// getObjectThrows: () => getSampleLegacyModule()?.getObjectThrows({}),
// promiseThrows: () => getSampleLegacyModule()?.promiseThrows(true),
// voidFuncAssert: () => getSampleLegacyModule()?.voidFuncAssert(),
// getObjectAssert: () => getSampleLegacyModule()?.getObjectAssert({}),
// promiseAssert: () => getSampleLegacyModule()?.promiseAssert(true),
getConstants: () => getSampleLegacyModule()?.getConstants(),
getConst1: () => getSampleLegacyModule()?.const1,
getConst2: () => getSampleLegacyModule()?.const2,
getConst3: () => getSampleLegacyModule()?.const3,
};
_tests =
Platform.OS === 'ios'
? {
voidFunc: () => getSampleLegacyModule()?.voidFunc(),
getBool: () => getSampleLegacyModule()?.getBool(true),
getEnum: () => getSampleLegacyModule()?.getEnum(1.0),
getNumber: () => getSampleLegacyModule()?.getNumber(99.95),
getFloat: () => getSampleLegacyModule()?.getNumber(99.95),
getInt: () => getSampleLegacyModule()?.getInt(99),
getLongLong: () => getSampleLegacyModule()?.getLongLong(99),
getUnsignedLongLong: () =>
getSampleLegacyModule()?.getUnsignedLongLong(99),
getNSInteger: () => getSampleLegacyModule()?.getNSInteger(99),
getNSUInteger: () => getSampleLegacyModule()?.getNSUInteger(99),
getArray: () =>
getSampleLegacyModule()?.getArray([
{a: 1, b: 'foo'},
{a: 2, b: 'bar'},
null,
]),
getObject: () =>
getSampleLegacyModule()?.getObject({a: 1, b: 'foo', c: null}),
getString: () => getSampleLegacyModule()?.getString('Hello'),
getNullString: () => getSampleLegacyModule()?.getString(null),
getNSNumber: () => getSampleLegacyModule()?.getNSNumber(20.0),
getUnsafeObject: () =>
getSampleLegacyModule()?.getObject({a: 1, b: 'foo', c: null}),
getRootTag: () => getSampleLegacyModule()?.getRootTag(this.context),
getValue: () =>
getSampleLegacyModule()?.getValue(5, 'test', {a: 1, b: 'foo'}),
callback: () =>
getSampleLegacyModule()?.getValueWithCallback(callbackValue =>
this._setResult('callback', callbackValue),
),
promise: () =>
getSampleLegacyModule()
?.getValueWithPromise(false)
.then(valuePromise => this._setResult('promise', valuePromise)),
rejectPromise: () =>
getSampleLegacyModule()
?.getValueWithPromise(true)
.then(() => {})
.catch(e => this._setResult('rejectPromise', e.message)),
getConstants: () => getSampleLegacyModule()?.getConstants(),
getConst1: () => getSampleLegacyModule()?.const1,
getConst2: () => getSampleLegacyModule()?.const2,
getConst3: () => getSampleLegacyModule()?.const3,
}
: {
voidFunc: () => getSampleLegacyModule()?.voidFunc(),
getBool: () => getSampleLegacyModule()?.getBool(true),
getEnum: () => getSampleLegacyModule()?.getEnum(1.0),
getDouble: () => getSampleLegacyModule()?.getDouble(99.95),
getInt: () => getSampleLegacyModule()?.getInt(99),
getFloat: () => getSampleLegacyModule()?.getFloat(99.95),
getObjectDouble: () =>
getSampleLegacyModule()?.getObjectDouble(99.95),
getObjectInteger: () => getSampleLegacyModule()?.getObjectInteger(99),
getObjectFloat: () => getSampleLegacyModule()?.getObjectFloat(99.95),
getString: () => getSampleLegacyModule()?.getString('Hello'),
getRootTag: () => getSampleLegacyModule()?.getRootTag(this.context),
getObject: () =>
getSampleLegacyModule()?.getObject({a: 1, b: 'foo', c: null}),
getUnsafeObject: () =>
getSampleLegacyModule()?.getObject({a: 1, b: 'foo', c: null}),
getValue: () =>
getSampleLegacyModule()?.getValue(5, 'test', {a: 1, b: 'foo'}),
callback: () =>
getSampleLegacyModule()?.getValueWithCallback(callbackValue =>
this._setResult('callback', callbackValue),
),
getArray: () =>
getSampleLegacyModule()?.getArray([
{a: 1, b: 'foo'},
{a: 2, b: 'bar'},
null,
]),
promise: () =>
getSampleLegacyModule()
?.getValueWithPromise(false)
.then(valuePromise => this._setResult('promise', valuePromise)),
rejectPromise: () =>
getSampleLegacyModule()
?.getValueWithPromise(true)
.then(() => {})
.catch(e => this._setResult('rejectPromise', e.message)),
getConstants: () => getSampleLegacyModule()?.getConstants(),
getConst1: () => getSampleLegacyModule()?.const1,
getConst2: () => getSampleLegacyModule()?.const2,
getConst3: () => getSampleLegacyModule()?.const3,
};
_setResult(name: string, result: mixed) {
this.setState(({testResults}) => ({

Просмотреть файл

@ -312,6 +312,10 @@ const APIs: Array<RNTesterModuleInfo> = ([
category: 'Basic',
module: require('../examples/TurboModule/TurboModuleExample'),
},
{
key: 'LegacyModuleExample',
module: require('../examples/TurboModule/LegacyModuleExample'),
},
{
key: 'TurboCxxModuleExample',
category: 'Basic',

Просмотреть файл

@ -89,6 +89,10 @@ const Components: Array<RNTesterModuleInfo> = [
key: 'ScrollViewIndicatorInsetsExample',
module: require('../examples/ScrollView/ScrollViewIndicatorInsetsIOSExample'),
},
{
key: 'ScrollViewKeyboardInsetsExample',
module: require('../examples/ScrollView/ScrollViewKeyboardInsetsIOSExample'),
},
{
key: 'SectionListIndex',
module: require('../examples/SectionList/SectionListIndex'),

Просмотреть файл

@ -0,0 +1,19 @@
/**
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/
'use strict';
import type {RNTesterModuleInfo} from '../types/RNTesterTypes';
declare const APIs: Array<RNTesterModuleInfo>;
declare const Components: Array<RNTesterModuleInfo>;
declare const Modules: {...};
module.exports = {APIs, Components, Modules};

Просмотреть файл

@ -1,5 +1,5 @@
{
"baseVersion": "0.73.0-nightly-20230811-68c7cfe62",
"baseVersion": "0.73.0-nightly-20230920-630cf3b21",
"overrides": [
{
"type": "copy",
@ -12,7 +12,7 @@
"type": "copy",
"directory": "js/components",
"baseDirectory": "packages/rn-tester/js/components",
"baseHash": "58010afc63a6477ad2ca6bc451b7c1933002d520",
"baseHash": "8ca1f34b2a6e9309f69d20752248e66e34f0d8cf",
"issue": 4054
},
{
@ -33,7 +33,7 @@
"type": "copy",
"directory": "js/examples/ActivityIndicator",
"baseDirectory": "packages/rn-tester/js/examples/ActivityIndicator",
"baseHash": "b54d1c14280ff578c41670baf28c2eefd4fd604c",
"baseHash": "d2a4c72a1349c5c7c118738f16b2b9d10c3333c0",
"issue": 4054
},
{
@ -131,7 +131,7 @@
"type": "copy",
"directory": "js/examples/FlatList",
"baseDirectory": "packages/rn-tester/js/examples/FlatList",
"baseHash": "66135399742a11d8346d2477f6f001cf3cf3137a",
"baseHash": "b269fa4b6e0bd62df276813a6c84274d1be675d5",
"issue": 4054
},
{
@ -166,7 +166,7 @@
"type": "copy",
"directory": "js/examples/JSResponderHandlerExample",
"baseDirectory": "packages/rn-tester/js/examples/JSResponderHandlerExample",
"baseHash": "14a8dc698f0bd3a768d2c02729af9dae27dd72fb",
"baseHash": "ebcfc055facebd2721507f2a88c596cfbeb95d76",
"issue": 4054
},
{
@ -180,7 +180,7 @@
"type": "copy",
"directory": "js/examples/KeyboardAvoidingView",
"baseDirectory": "packages/rn-tester/js/examples/KeyboardAvoidingView",
"baseHash": "556682ced490a792cfffa6aecd8fdfeb434aa001",
"baseHash": "ee7ac22701dc1cae7fc72eac5899b09025f78531",
"issue": 4054
},
{
@ -201,7 +201,7 @@
"type": "copy",
"directory": "js/examples/Modal",
"baseDirectory": "packages/rn-tester/js/examples/Modal",
"baseHash": "efd4c7a2e23d38feaa31d1884964a5ba61ad1a54",
"baseHash": "001538a36b042121585cda87b511987ac6b32519",
"issue": 4054
},
{
@ -250,7 +250,7 @@
"type": "copy",
"directory": "js/examples/Performance",
"baseDirectory": "packages/rn-tester/js/examples/Performance",
"baseHash": "0d49d4b44b5d4844eadac22355e27d77762f22b9",
"baseHash": "4f48fd2047556bd0d82f3b4a321aa2e0ac21ee48",
"issue": 0
},
{
@ -278,7 +278,7 @@
"type": "copy",
"directory": "js/examples/Pressable",
"baseDirectory": "packages/rn-tester/js/examples/Pressable",
"baseHash": "8b4c67676a6057566d37b3e9b723fd0d35f3cacf",
"baseHash": "aea3af3c27e5db79bb2a92ee6546ee047a83b5b5",
"issue": 4054
},
{
@ -292,7 +292,7 @@
"type": "copy",
"directory": "js/examples/RefreshControl",
"baseDirectory": "packages/rn-tester/js/examples/RefreshControl",
"baseHash": "fcebaef2c305644ecc94d2bb4c1b47fe81571e0c",
"baseHash": "13cf3e9fee0bae1cc971b16871cd4b8bcc80dcb2",
"issue": 4054
},
{
@ -320,7 +320,7 @@
"type": "copy",
"directory": "js/examples/ScrollView",
"baseDirectory": "packages/rn-tester/js/examples/ScrollView",
"baseHash": "fdedf87695c4108c8238b543984c6d76941b111e",
"baseHash": "b08c72fcc2839032d0395598c5c47940c5ec304f",
"issue": 4054
},
{
@ -376,14 +376,14 @@
"type": "copy",
"directory": "js/examples/Text",
"baseDirectory": "packages/rn-tester/js/examples/Text",
"baseHash": "e154fcbf15afa81ec3355b751e5a0a6f82a7d43a",
"baseHash": "9d12b1d84be30fa58e430079752338fb9745e199",
"issue": 4054
},
{
"type": "copy",
"directory": "js/examples/TextInput",
"baseDirectory": "packages/rn-tester/js/examples/TextInput",
"baseHash": "bef0609b40ac07fc2f605a44bc1405f55618532f",
"baseHash": "aa485f475435de9126b4d9110f1aff0014806769",
"issue": 4054
},
{
@ -411,7 +411,7 @@
"type": "copy",
"directory": "js/examples/Transform",
"baseDirectory": "packages/rn-tester/js/examples/Transform",
"baseHash": "22d9b2105d794f25397a01606fb048127686fc8e",
"baseHash": "b6d61730c522f2a71d7bbc12b27bd379a5db6ac7",
"issue": 4054
},
{
@ -425,7 +425,7 @@
"type": "copy",
"directory": "js/examples/TurboModule",
"baseDirectory": "packages/rn-tester/js/examples/TurboModule",
"baseHash": "be21981af80f207effaabe15b07b5e796696733c",
"baseHash": "ca77c10cb5eec44375e9c3fe09125ac9b12dace4",
"issue": 4054
},
{
@ -488,7 +488,7 @@
"type": "copy",
"directory": "js/utils",
"baseDirectory": "packages/rn-tester/js/utils",
"baseHash": "bfdb7156f819e6a39959235af7f2dc80742e9311",
"baseHash": "e559948677e4ab804f94dc9066b77b3cae2874df",
"issue": 4054
},
{
@ -523,7 +523,7 @@
"type": "copy",
"file": "package.json",
"baseFile": "packages/rn-tester/package.json",
"baseHash": "142175d981ef803b9038044af4e8227a25f3d391",
"baseHash": "f98df2702420d6a05214aab7467ca13b8bbf0947",
"issue": 4054
}
]

Просмотреть файл

@ -14,7 +14,7 @@
},
"scripts": {
"start": "react-native start",
"android": "react-native run-android --mode HermesDebug --appId 'com.facebook.react.uiapp' --main-activity 'com.facebook.react.uiapp.RNTesterActivity'",
"android": "react-native run-android --mode HermesDebug",
"install-android-jsc": "../../gradlew :packages:rn-tester:android:app:installJscDebug",
"install-android-hermes": "../../gradlew :packages:rn-tester:android:app:installHermesDebug",
"clean-android": "rm -rf android/app/build",

Просмотреть файл

@ -11,13 +11,13 @@
},
"dependencies": {
"@babel/core": "^7.14.0",
"babel-plugin-transform-flow-enums": "^0.0.2",
"@react-native/babel-preset": "0.73.16"
"@react-native/babel-preset": "0.73.16",
"babel-plugin-transform-flow-enums": "^0.0.2"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"eslint": "^8.19.0",
"@react-native/babel-preset": "0.73.16",
"eslint": "^8.19.0",
"prettier": "^2.4.1"
},
"engines": {

Просмотреть файл

@ -17,6 +17,7 @@ const {
function makeMetroConfig(customConfig = {}) {
return mergeConfig(MetroConfig.makeMetroConfig(customConfig), {
resolver: {
enableGlobalPackages: true,
blockList: MetroConfig.exclusionList([
// This prevents "react-native run-windows" from hitting: EBUSY: resource
// busy or locked for files produced by MSBuild

Просмотреть файл

@ -17,12 +17,12 @@
"lint:fix": "rnw-scripts lint:fix"
},
"dependencies": {
"@react-native/metro-config": "^0.73.0",
"@rnx-kit/metro-config": "^1.3.5",
"@rnx-kit/metro-plugin-duplicates-checker": "^2.1.0",
"@rnx-kit/metro-serializer": "^1.0.11",
"@typescript-eslint/eslint-plugin": "^5.30.5",
"@typescript-eslint/parser": "^5.57.1",
"@react-native/metro-config": "^0.73.0"
"@typescript-eslint/parser": "^5.57.1"
},
"devDependencies": {
"@rnw-scripts/eslint-config": "1.2.2",

1
packages/e2e-test-app-fabric/.gitignore поставляемый
Просмотреть файл

@ -7,3 +7,4 @@
/dist
/windows/RNTesterApp-Fabric/Bundle/
msbuild.binlog
/Bundle

Просмотреть файл

@ -1,2 +1,2 @@
const {makeMetroConfig} = require('@rnw-scripts/metro-dev-config');
module.exports = makeMetroConfig();
module.exports = makeMetroConfig({projectRoot: __dirname});

Просмотреть файл

@ -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-20230811-68c7cfe62",
"react-native": "0.73.0-nightly-20230920-630cf3b21",
"react-native-windows": "^0.0.0-canary.713"
},
"devDependencies": {
@ -30,6 +30,8 @@
"@react-native-windows/automation": "^0.3.134",
"@react-native-windows/automation-commands": "^0.1.154",
"@react-native/babel-plugin-codegen": "0.73.0",
"@react-native/metro-config": "^0.73.0",
"@react-native/metro-babel-transformer": "0.73.12",
"@rnw-scripts/babel-node-config": "2.3.1",
"@rnw-scripts/babel-react-native-config": "0.0.0",
"@rnw-scripts/eslint-config": "1.2.2",
@ -44,7 +46,6 @@
"babel-jest": "^29.3.0",
"eslint": "^8.19.0",
"jest": "^29.2.1",
"@react-native/metro-babel-transformer": "0.73.12",
"prettier": "^2.4.1",
"react-test-renderer": "18.2.0",
"sanitize-filename": "^1.6.3",

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -33,8 +33,8 @@ struct DeviceInfo {
}
REACT_GET_CONSTANTS(GetConstants)
Microsoft::ReactNativeSpecs::DeviceInfoSpec_Constants GetConstants() noexcept {
Microsoft::ReactNativeSpecs::DeviceInfoSpec_Constants constants;
Microsoft::ReactNativeSpecs::DeviceInfoSpec_DeviceInfoConstants GetConstants() noexcept {
Microsoft::ReactNativeSpecs::DeviceInfoSpec_DeviceInfoConstants constants;
Microsoft::ReactNativeSpecs::DeviceInfoSpec_DisplayMetrics screenDisplayMetrics;
screenDisplayMetrics.fontScale = 1;
screenDisplayMetrics.height = 1024;

Просмотреть файл

@ -1,2 +1,2 @@
const {makeMetroConfig} = require('@rnw-scripts/metro-dev-config');
module.exports = makeMetroConfig();
module.exports = makeMetroConfig({projectRoot: __dirname});

Просмотреть файл

@ -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-20230811-68c7cfe62",
"react-native": "0.73.0-nightly-20230920-630cf3b21",
"react-native-windows": "^0.0.0-canary.713",
"react-native-xaml": "^0.0.76"
},
@ -32,6 +32,8 @@
"@react-native-windows/automation": "^0.3.134",
"@react-native-windows/automation-commands": "^0.1.154",
"@react-native/babel-plugin-codegen": "0.73.0",
"@react-native/metro-config": "^0.73.0",
"@react-native/metro-babel-transformer": "0.73.12",
"@rnw-scripts/babel-node-config": "2.3.1",
"@rnw-scripts/babel-react-native-config": "0.0.0",
"@rnw-scripts/eslint-config": "1.2.2",
@ -45,7 +47,6 @@
"babel-jest": "^29.3.0",
"eslint": "^8.19.0",
"jest": "^29.2.1",
"@react-native/metro-babel-transformer": "0.73.12",
"prettier": "^2.4.1",
"react-test-renderer": "18.2.0",
"sanitize-filename": "^1.6.3",

Просмотреть файл

@ -1,2 +1,2 @@
const {makeMetroConfig} = require('@rnw-scripts/metro-dev-config');
module.exports = makeMetroConfig();
module.exports = makeMetroConfig({projectRoot: __dirname});

Просмотреть файл

@ -16,7 +16,7 @@
"@typescript-eslint/parser": "^5.21.0",
"chai": "^4.2.0",
"react": "18.2.0",
"react-native": "0.73.0-nightly-20230811-68c7cfe62",
"react-native": "0.73.0-nightly-20230920-630cf3b21",
"react-native-windows": "^0.0.0-canary.713"
},
"devDependencies": {
@ -26,6 +26,7 @@
"@babel/preset-typescript": "^7.11.5",
"@babel/traverse": "^7.11.5",
"@babel/types": "^7.11.5",
"@react-native/metro-config": "^0.73.0",
"@rnw-scripts/babel-node-config": "2.3.1",
"@rnw-scripts/eslint-config": "^1.2.2",
"@rnw-scripts/just-task": "^2.3.16",

Просмотреть файл

@ -15,13 +15,14 @@
"@typescript-eslint/eslint-plugin": "^5.21.0",
"@typescript-eslint/parser": "^5.21.0",
"react": "18.2.0",
"react-native": "0.73.0-nightly-20230811-68c7cfe62",
"react-native": "0.73.0-nightly-20230920-630cf3b21",
"react-native-windows": "^0.0.0-canary.713"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/runtime": "^7.8.4",
"@react-native/babel-plugin-codegen": "0.73.0",
"@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",

Просмотреть файл

@ -157,8 +157,8 @@ struct DeviceInfo {
}
REACT_GET_CONSTANTS(GetConstants)
Microsoft::ReactNativeSpecs::DeviceInfoSpec_Constants GetConstants() noexcept {
Microsoft::ReactNativeSpecs::DeviceInfoSpec_Constants constants;
Microsoft::ReactNativeSpecs::DeviceInfoSpec_DeviceInfoConstants GetConstants() noexcept {
Microsoft::ReactNativeSpecs::DeviceInfoSpec_DeviceInfoConstants constants;
Microsoft::ReactNativeSpecs::DeviceInfoSpec_DisplayMetrics screenDisplayMetrics;
screenDisplayMetrics.fontScale = 1;
screenDisplayMetrics.height = 1024;

Просмотреть файл

@ -2,150 +2,29 @@
"version": 1,
"dependencies": {
"native,Version=v0.0": {
"Microsoft.JavaScript.Hermes": {
"Microsoft.Windows.CppWinRT": {
"type": "Direct",
"requested": "[0.1.15, )",
"resolved": "0.1.15",
"contentHash": "My/u5RvxoymtwWokoweU6iVpuP79w271UjadcmSNqnQ9ESIv00tlVP4sHnIiN3t2lJNDeciyE1EVF4swGPECKQ=="
"requested": "[2.0.210312.4, 2.0.210312.4]",
"resolved": "2.0.210312.4",
"contentHash": "uRxz7Z8Scm7A2JjaaxCzQWTMrQC9RvXYhb7RU8pSqGo/0i0aPJszUeA3N6EhcJU5+FsDr2xzk2iln0x2Lwa6AA=="
},
"Microsoft.UI.Xaml": {
"type": "Direct",
"requested": "[2.8.0, )",
"requested": "[2.8.0, 2.8.0]",
"resolved": "2.8.0",
"contentHash": "vxdHxTr63s5KVtNddMFpgvjBjUH50z7seq/5jLWmmSuf8poxg+sXrywkofUdE8ZstbpO9y3FL/IXXUcPYbeesA==",
"dependencies": {
"Microsoft.Web.WebView2": "1.0.1264.42"
}
"contentHash": "vxdHxTr63s5KVtNddMFpgvjBjUH50z7seq/5jLWmmSuf8poxg+sXrywkofUdE8ZstbpO9y3FL/IXXUcPYbeesA=="
},
"Microsoft.Windows.CppWinRT": {
"Microsoft.WinUI": {
"type": "Direct",
"requested": "[2.0.211028.7, )",
"resolved": "2.0.211028.7",
"contentHash": "JBGI0c3WLoU6aYJRy9Qo0MLDQfObEp+d4nrhR95iyzf7+HOgjRunHDp/6eGFREd7xq3OI1mll9ecJrMfzBvlyg=="
"requested": "[3.0.0-preview4.210210.4, 3.0.0-preview4.210210.4]",
"resolved": "3.0.0-preview4.210210.4",
"contentHash": "fMo1Llbprv3+7nVyUvBxc/lQtMmwBFCGHdeH7sTPIeFKPneNOs0qW2XqnYBorGRRitbPUxxmLKgxOM8zR5dAgA=="
},
"boost": {
"type": "Transitive",
"resolved": "1.76.0",
"contentHash": "p+w3YvNdXL8Cu9Fzrmexssu0tZbWxuf6ywsQqHjDlKFE5ojXHof1HIyMC3zDLfLnh80dIeFcEUAuR2Asg/XHRA=="
},
"Microsoft.Build.Tasks.Git": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "AT3HlgTjsqHnWpBHSNeR0KxbLZD7bztlZVj7I8vgeYG9SYqbeFGh0TM/KVtC6fg53nrWHl3VfZFvb5BiQFcY6Q=="
},
"Microsoft.SourceLink.Common": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg=="
},
"Microsoft.SourceLink.GitHub": {
"type": "Transitive",
"resolved": "1.1.1",
"contentHash": "IaJGnOv/M7UQjRJks7B6p7pbPnOwisYGOIzqCz5ilGFTApZ3ktOR+6zJ12ZRPInulBmdAf1SrGdDG2MU8g6XTw==",
"dependencies": {
"Microsoft.Build.Tasks.Git": "1.1.1",
"Microsoft.SourceLink.Common": "1.1.1"
}
},
"Microsoft.Web.WebView2": {
"type": "Transitive",
"resolved": "1.0.1264.42",
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
},
"common": {
"type": "Project"
},
"fmt": {
"type": "Project"
},
"folly": {
"type": "Project",
"dependencies": {
"boost": "[1.76.0, )",
"fmt": "[1.0.0, )"
}
},
"microsoft.reactnative": {
"type": "Project",
"dependencies": {
"Common": "[1.0.0, )",
"Folly": "[1.0.0, )",
"Microsoft.JavaScript.Hermes": "[0.1.15, )",
"Microsoft.SourceLink.GitHub": "[1.1.1, )",
"Microsoft.UI.Xaml": "[2.8.0, )",
"ReactCommon": "[1.0.0, )",
"boost": "[1.76.0, )"
}
},
"playgroundnativemodules": {
"type": "Project",
"dependencies": {
"Microsoft.ReactNative": "[1.0.0, )",
"Microsoft.UI.Xaml": "[2.8.0, )"
}
},
"reactcommon": {
"type": "Project",
"dependencies": {
"Folly": "[1.0.0, )",
"boost": "[1.76.0, )"
}
},
"reactnativepicker": {
"type": "Project",
"dependencies": {
"Microsoft.ReactNative": "[1.0.0, )",
"Microsoft.UI.Xaml": "[2.8.0, )"
}
}
},
"native,Version=v0.0/win10-arm": {
"Microsoft.Web.WebView2": {
"type": "Transitive",
"resolved": "1.0.1264.42",
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
}
},
"native,Version=v0.0/win10-arm-aot": {
"Microsoft.Web.WebView2": {
"type": "Transitive",
"resolved": "1.0.1264.42",
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
}
},
"native,Version=v0.0/win10-arm64-aot": {
"Microsoft.Web.WebView2": {
"type": "Transitive",
"resolved": "1.0.1264.42",
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
}
},
"native,Version=v0.0/win10-x64": {
"Microsoft.Web.WebView2": {
"type": "Transitive",
"resolved": "1.0.1264.42",
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
}
},
"native,Version=v0.0/win10-x64-aot": {
"Microsoft.Web.WebView2": {
"type": "Transitive",
"resolved": "1.0.1264.42",
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
}
},
"native,Version=v0.0/win10-x86": {
"Microsoft.Web.WebView2": {
"type": "Transitive",
"resolved": "1.0.1264.42",
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
}
},
"native,Version=v0.0/win10-x86-aot": {
"Microsoft.Web.WebView2": {
"type": "Transitive",
"resolved": "1.0.1264.42",
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
"Microsoft.JavaScript.Hermes": {
"type": "Direct",
"requested": "[0.1.15, 0.1.15]",
"resolved": "0.1.15",
"contentHash": "My/u5RvxoymtwWokoweU6iVpuP79w271UjadcmSNqnQ9ESIv00tlVP4sHnIiN3t2lJNDeciyE1EVF4swGPECKQ=="
}
}
}

Просмотреть файл

@ -15,15 +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-20230811-68c7cfe62",
"react-native": "0.73.0-nightly-20230920-630cf3b21",
"react-native-windows": "^0.0.0-canary.713"
},
"devDependencies": {
"@babel/core": "^7.20.0",
"@babel/eslint-parser": "^7.20.0",
"@babel/runtime": "^7.8.4",
"@react-native-windows/codegen": "0.0.0-canary.70",
"@react-native/metro-config": "^0.73.0",
"@react-native-windows/cli": "0.0.0-canary.190",
"@react-native-windows/codegen": "0.0.0-canary.70",
"@rnw-scripts/babel-react-native-config": "0.0.0",
"@rnw-scripts/eslint-config": "1.2.2",
"@rnw-scripts/just-task": "2.3.16",

Просмотреть файл

@ -11,6 +11,7 @@
<PROJECT_ROOT>/Libraries/Alert/Alert.js
<PROJECT_ROOT>/Libraries/Components/Button.js
<PROJECT_ROOT>/Libraries/Components/Picker/RCTPickerNativeComponent.js
<PROJECT_ROOT>/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js
<PROJECT_ROOT>/Libraries/Components/RefreshControl/RefreshControl.js
<PROJECT_ROOT>/Libraries/Components/SafeAreaView/SafeAreaView.js
<PROJECT_ROOT>/Libraries/Components/ScrollView/ScrollView.js
@ -63,14 +64,14 @@
; Ignore "BUCK" generated dirs
<PROJECT_ROOT>/\.buckd/
; Flow doesn't support platforms
.*/packages/react-native/Libraries/Utilities/LoadingView.js
; Ignore the src folder - flow files are combined with ones from react-native into the root Libraries folder
.*/vnext/src/.*
.*/node_modules/resolve/test/resolver/malformed_package_json/package\.json$
; Checked-in build output
<PROJECT_ROOT>/packages/debugger-frontend/dist/
[untyped]
.*/node_modules/@react-native-community/cli/.*/.*
@ -97,12 +98,18 @@ module.file_ext=.js
module.file_ext=.json
module.file_ext=.windows.js
;[Windows]
;experimental.multi_platform=true
;experimental.multi_platform.extensions=.ios
;experimental.multi_platform.extensions=.android
munge_underscores=true
module.name_mapper='^react-native$' -> '<PROJECT_ROOT>/index.windows.js'
module.name_mapper='^react-native-windows$' -> '<PROJECT_ROOT>/index.windows.js'
module.name_mapper='^react-native/\(.*\)$' -> '<PROJECT_ROOT>/\1'
module.name_mapper='^react-native-windows/\(.*\)$' -> '<PROJECT_ROOT>/\1'
module.name_mapper='^@react-native/dev-middleware$' -> '<PROJECT_ROOT>/\1'
module.name_mapper='^@?[./a-zA-Z0-9$_-]+\.\(bmp\|gif\|jpg\|jpeg\|png\|psd\|svg\|webp\|m4v\|mov\|mp4\|mpeg\|mpg\|webm\|aac\|aiff\|caf\|m4a\|mp3\|wav\|html\|pdf\)$' -> '<PROJECT_ROOT>/Libraries/Image/RelativeImageStub'
suppress_type=$FlowIssue
@ -134,4 +141,4 @@ untyped-import
untyped-type-import
[version]
^0.214.0
^0.216.1

Просмотреть файл

@ -71,14 +71,9 @@ MicrosoftReactGetRuntimeOptionBool
MicrosoftReactGetRuntimeOptionInt
MicrosoftReactGetRuntimeOptionString
YGAssert
YGAssertWithConfig
YGAssertWithNode
YGConfigCopy
YGConfigFree
YGConfigGetContext
YGConfigGetDefault
YGConfigGetInstanceCount
YGConfigGetUseWebDefaults
YGConfigIsExperimentalFeatureEnabled
YGConfigNew
@ -86,7 +81,6 @@ YGConfigSetContext
YGConfigSetExperimentalFeatureEnabled
YGConfigSetLogger
YGConfigSetPointScaleFactor
YGConfigSetUseLegacyStretchBehaviour
YGConfigSetUseWebDefaults
YGFloatIsUndefined
YGNodeCalculateLayout

Просмотреть файл

@ -71,14 +71,9 @@ MicrosoftReactGetRuntimeOptionInt
MicrosoftReactGetRuntimeOptionString
_YGAlignToString@4
_YGAssert@8
_YGAssertWithConfig@12
_YGAssertWithNode@12
_YGConfigCopy@8
_YGConfigFree@4
_YGConfigGetContext@4
_YGConfigGetDefault@0
_YGConfigGetInstanceCount@0
_YGConfigGetUseWebDefaults@4
_YGConfigIsExperimentalFeatureEnabled@8
_YGConfigNew@0
@ -86,7 +81,6 @@ _YGConfigSetContext@8
_YGConfigSetExperimentalFeatureEnabled@12
_YGConfigSetLogger@8
_YGConfigSetPointScaleFactor@8
_YGConfigSetUseLegacyStretchBehaviour@8
_YGConfigSetUseWebDefaults@8
_YGDimensionToString@4
_YGDirectionToString@4

Просмотреть файл

@ -22,8 +22,8 @@ struct DeviceInfo {
}
REACT_GET_CONSTANTS(GetConstants)
::Microsoft::ReactNativeSpecs::DeviceInfoSpec_Constants GetConstants() noexcept {
::Microsoft::ReactNativeSpecs::DeviceInfoSpec_Constants constants;
::Microsoft::ReactNativeSpecs::DeviceInfoSpec_DeviceInfoConstants GetConstants() noexcept {
::Microsoft::ReactNativeSpecs::DeviceInfoSpec_DeviceInfoConstants constants;
::Microsoft::ReactNativeSpecs::DeviceInfoSpec_DisplayMetrics screenDisplayMetrics;
screenDisplayMetrics.fontScale = 1;
screenDisplayMetrics.height = 1024;

Просмотреть файл

@ -42,7 +42,7 @@ facebook::react::ShadowNode::Shared AbiViewComponentDescriptor::createShadowNode
facebook::react::ShadowNodeFamily::Shared const &family) const {
auto shadowNode = std::make_shared<ShadowNodeT>(fragment, family, getTraits());
adopt(shadowNode);
adopt(*shadowNode);
return shadowNode;
}
@ -52,7 +52,7 @@ facebook::react::ShadowNode::Unshared AbiViewComponentDescriptor::cloneShadowNod
const facebook::react::ShadowNodeFragment &fragment) const {
auto shadowNode = std::make_shared<ShadowNodeT>(sourceShadowNode, fragment);
adopt(shadowNode);
adopt(*shadowNode);
return shadowNode;
}
@ -153,9 +153,9 @@ facebook::react::SharedEventEmitter AbiViewComponentDescriptor::createEventEmitt
* - Set `ShadowNode`'s size from state in
* `ModalHostViewComponentDescriptor`.
*/
void AbiViewComponentDescriptor::adopt(facebook::react::ShadowNode::Unshared const &shadowNode) const {
void AbiViewComponentDescriptor::adopt(facebook::react::ShadowNode &shadowNode) const {
// Default implementation does nothing.
react_native_assert(shadowNode->getComponentHandle() == getComponentHandle());
react_native_assert(shadowNode.getComponentHandle() == getComponentHandle());
}
} // namespace Microsoft::ReactNative

Просмотреть файл

@ -79,7 +79,7 @@ class AbiViewComponentDescriptor : public facebook::react::ComponentDescriptor {
* - Set `ShadowNode`'s size from state in
* `ModalHostViewComponentDescriptor`.
*/
virtual void adopt(facebook::react::ShadowNode::Unshared const &shadowNode) const;
virtual void adopt(facebook::react::ShadowNode &shadowNode) const;
private:
winrt::Microsoft::ReactNative::IReactViewComponentBuilder m_builder;

Просмотреть файл

@ -5,9 +5,11 @@
#include "WindowsTextInputShadowNode.h"
#include <yoga/CompactValue.h>
#include <yoga/YGEnums.h>
#include <yoga/YGValue.h>
#include <yoga/style/CompactValue.h>
#include <unordered_map>
#include <react/renderer/core/ConcreteComponentDescriptor.h>
@ -18,7 +20,7 @@ namespace facebook::react {
*/
class WindowsTextInputComponentDescriptor final : public ConcreteComponentDescriptor<WindowsTextInputShadowNode> {
public:
WindowsTextInputComponentDescriptor(ComponentDescriptorParameters const &parameters)
WindowsTextInputComponentDescriptor(const ComponentDescriptorParameters &parameters)
: ConcreteComponentDescriptor<WindowsTextInputShadowNode>(parameters) {
// Every single `WindowsTextInputShadowNode` will have a reference to
// a shared `TextLayoutManager`.
@ -63,7 +65,7 @@ class WindowsTextInputComponentDescriptor final : public ConcreteComponentDescri
}
return std::make_shared<AndroidTextInputShadowNode::ConcreteState>(
std::make_shared<AndroidTextInputState const>(AndroidTextInputState(
std::make_shared<const AndroidTextInputState>(AndroidTextInputState(
0,
{},
{},
@ -77,8 +79,8 @@ class WindowsTextInputComponentDescriptor final : public ConcreteComponentDescri
*/
protected:
void adopt(ShadowNode::Unshared const &shadowNode) const override {
auto &textInputShadowNode = static_cast<WindowsTextInputShadowNode &>(*shadowNode);
void adopt(ShadowNode &shadowNode) const override {
auto &textInputShadowNode = static_cast<WindowsTextInputShadowNode &>(shadowNode);
// `ParagraphShadowNode` uses `TextLayoutManager` to measure text content
// and communicate text rendering metrics to mounting layer.
@ -90,14 +92,14 @@ class WindowsTextInputComponentDescriptor final : public ConcreteComponentDescri
int surfaceId = textInputShadowNode->getSurfaceId();
if (surfaceIdToThemePaddingMap_.find(surfaceId) !=
surfaceIdToThemePaddingMap_.end()) {
YGStyle::Edges theme = surfaceIdToThemePaddingMap_[surfaceId];
yoga::Style::Edges theme = surfaceIdToThemePaddingMap_[surfaceId];
// Override padding
// Node is still unsealed during adoption, before layout is complete
// TODO: T62959168 account for RTL and paddingLeft when setting default
// paddingStart, and vice-versa with paddingRight/paddingEnd.
// For now this assumes no RTL.
YGStyle::Edges result =
yoga::Style::Edges result =
textInputShadowNode->getConcreteProps().yogaStyle.padding();
bool changedPadding = false;
if (!textInputShadowNode->getConcreteProps().hasPadding &&

Просмотреть файл

@ -16,7 +16,7 @@ struct CompWindowsTextInputSelectionStruct {
static inline void
fromRawValue(const PropsParserContext &context, const RawValue &value, CompWindowsTextInputSelectionStruct &result) {
auto map = (butter::map<std::string, RawValue>)value;
auto map = (std::unordered_map<std::string, RawValue>)value;
auto tmp_start = map.find("start");
if (tmp_start != map.end()) {
@ -44,7 +44,7 @@ static inline void fromRawValue(
const PropsParserContext &context,
const RawValue &value,
CompWindowsTextInputSubmitKeyEventsStruct &result) {
auto map = (butter::map<std::string, RawValue>)value;
auto map = (std::unordered_map<std::string, RawValue>)value;
auto tmp_altKey = map.find("altKey");
if (tmp_altKey != map.end()) {

Просмотреть файл

@ -86,7 +86,7 @@ void WindowsTextInputShadowNode::setTextLayoutManager(SharedTextLayoutManager te
}
AttributedString WindowsTextInputShadowNode::getMostRecentAttributedString() const {
auto const &state = getStateData();
const auto &state = getStateData();
auto reactTreeAttributedString = getAttributedString();
@ -104,7 +104,7 @@ void WindowsTextInputShadowNode::updateStateIfNeeded() {
ensureUnsealed();
auto reactTreeAttributedString = getAttributedString();
auto const &state = getStateData();
const auto &state = getStateData();
// Tree is often out of sync with the value of the TextInput.
// This is by design - don't change the value of the TextInput in the State,
@ -151,8 +151,8 @@ void WindowsTextInputShadowNode::updateStateIfNeeded() {
#pragma mark - LayoutableShadowNode
Size WindowsTextInputShadowNode::measureContent(
LayoutContext const & /*layoutContext*/,
LayoutConstraints const &layoutConstraints) const {
const LayoutContext & /*layoutContext*/,
const LayoutConstraints &layoutConstraints) const {
if (getStateData().cachedAttributedStringId != 0) {
return m_textLayoutManager
->measureCachedSpannableById(

Просмотреть файл

@ -3,8 +3,8 @@
#pragma once
#include <butter/map.h>
#include <react/renderer/components/rnwcore/EventEmitters.h>
#include <unordered_map>
#include "WindowsTextInputEventEmitter.h"
#include "WindowsTextInputProps.h"
#include "WindowsTextInputState.h"
@ -54,7 +54,7 @@ class WindowsTextInputShadowNode final : public ConcreteViewShadowNode<
#pragma mark - LayoutableShadowNode
Size measureContent(LayoutContext const &layoutContext, LayoutConstraints const &layoutConstraints) const override;
Size measureContent(const LayoutContext &layoutContext, const LayoutConstraints &layoutConstraints) const override;
void layout(LayoutContext layoutContext) override;
private:

Просмотреть файл

@ -34,7 +34,7 @@ WindowsTextInputState::WindowsTextInputState(
defaultThemePaddingTop(defaultThemePaddingTop),
defaultThemePaddingBottom(defaultThemePaddingBottom) {}
WindowsTextInputState::WindowsTextInputState(WindowsTextInputState const &previousState, folly::dynamic const &data)
WindowsTextInputState::WindowsTextInputState(const WindowsTextInputState &previousState, const folly::dynamic &data)
: mostRecentEventCount(data.getDefault("mostRecentEventCount", previousState.mostRecentEventCount).getInt()),
cachedAttributedStringId(data.getDefault("opaqueCacheId", previousState.cachedAttributedStringId).getInt()),
attributedString(previousState.attributedString),

Просмотреть файл

@ -64,7 +64,7 @@ class WindowsTextInputState final {
float defaultThemePaddingBottom);
WindowsTextInputState() = default;
WindowsTextInputState(WindowsTextInputState const &previousState, folly::dynamic const &data);
WindowsTextInputState(const WindowsTextInputState &previousState, const folly::dynamic &data);
folly::dynamic getDynamic() const;
MapBuffer getMapBuffer() const;
};

Просмотреть файл

@ -15,7 +15,7 @@ HostPlatformViewProps::HostPlatformViewProps(
const HostPlatformViewProps &sourceProps,
const RawProps &rawProps,
bool shouldSetRawProps)
: BaseViewProps(context, sourceProps, rawProps, shouldSetRawProps),
: BaseViewProps(context, sourceProps, rawProps),
windowsEvents(
CoreFeatures::enablePropIteratorSetter ? sourceProps.windowsEvents
: convertRawProp(context, rawProps, sourceProps.windowsEvents, {})),

Просмотреть файл

@ -71,8 +71,8 @@ struct HandledKeyEvent : BaseKeyEvent {
};
inline void fromRawValue(const PropsParserContext &context, const RawValue &value, HandledKeyEvent &result) {
if (value.hasType<butter::map<std::string, RawValue>>()) {
auto map = (butter::map<std::string, RawValue>)value;
if (value.hasType<std::unordered_map<std::string, RawValue>>()) {
auto map = (std::unordered_map<std::string, RawValue>)value;
auto attrIterator = map.find("handledEventPhase");
if (attrIterator != map.end())

Просмотреть файл

@ -7,7 +7,8 @@
#pragma once
#include <butter/map.h>
#include <unordered_map>
#include <glog/logging.h>
#include <react/debug/react_native_expect.h>
#include <react/renderer/core/PropsParserContext.h>
@ -46,8 +47,8 @@ inline void fromRawValue(const PropsParserContext &context, const RawValue &valu
colorComponents.blue = items.at(2);
colorComponents.alpha = length == 4 ? items.at(3) : 1.0f;
// [Windows - Embed WindowBrush into SharedColor instead of trying to parse PlatformColor into RGB
} else if (value.hasType<butter::map<std::string, std::vector<std::string>>>()) {
auto map = (butter::map<std::string, std::vector<std::string>>)value;
} else if (value.hasType<std::unordered_map<std::string, std::vector<std::string>>>()) {
auto map = (std::unordered_map<std::string, std::vector<std::string>>)value;
if (map.find("windowsbrush") != map.end()) {
result = SharedColor(std::move(map["windowsbrush"]));
return;
@ -76,8 +77,8 @@ inline std::string toString(const SharedColor &value) {
#pragma mark - Geometry
inline void fromRawValue(const PropsParserContext &context, const RawValue &value, Point &result) {
if (value.hasType<butter::map<std::string, Float>>()) {
auto map = (butter::map<std::string, Float>)value;
if (value.hasType<std::unordered_map<std::string, Float>>()) {
auto map = (std::unordered_map<std::string, Float>)value;
for (const auto &pair : map) {
if (pair.first == "x") {
result.x = pair.second;
@ -104,8 +105,8 @@ inline void fromRawValue(const PropsParserContext &context, const RawValue &valu
}
inline void fromRawValue(const PropsParserContext &context, const RawValue &value, Size &result) {
if (value.hasType<butter::map<std::string, Float>>()) {
auto map = (butter::map<std::string, Float>)value;
if (value.hasType<std::unordered_map<std::string, Float>>()) {
auto map = (std::unordered_map<std::string, Float>)value;
for (const auto &pair : map) {
if (pair.first == "width") {
result.width = pair.second;
@ -141,8 +142,8 @@ inline void fromRawValue(const PropsParserContext &context, const RawValue &valu
return;
}
if (value.hasType<butter::map<std::string, Float>>()) {
auto map = (butter::map<std::string, Float>)value;
if (value.hasType<std::unordered_map<std::string, Float>>()) {
auto map = (std::unordered_map<std::string, Float>)value;
for (const auto &pair : map) {
if (pair.first == "top") {
result.top = pair.second;
@ -182,8 +183,8 @@ inline void fromRawValue(const PropsParserContext &context, const RawValue &valu
return;
}
if (value.hasType<butter::map<std::string, Float>>()) {
auto map = (butter::map<std::string, Float>)value;
if (value.hasType<std::unordered_map<std::string, Float>>()) {
auto map = (std::unordered_map<std::string, Float>)value;
for (const auto &pair : map) {
if (pair.first == "topLeft") {
result.topLeft = pair.second;

Просмотреть файл

@ -13,7 +13,7 @@
namespace facebook::react {
bool isColorMeaningful(SharedColor const &color) noexcept {
bool isColorMeaningful(const SharedColor &color) noexcept {
if (!color) {
return false;
}

Просмотреть файл

@ -105,7 +105,7 @@ class SharedColor {
std::shared_ptr<Color> m_color;
};
bool isColorMeaningful(SharedColor const &color) noexcept;
bool isColorMeaningful(const SharedColor &color) noexcept;
SharedColor colorFromComponents(ColorComponents components);
ColorComponents colorComponentsFromColor(SharedColor const &color);

Просмотреть файл

@ -88,7 +88,7 @@ void AppState::RemoveListeners(double /*count*/) noexcept {
// noop
}
ReactNativeSpecs::AppStateSpec_Constants AppState::GetConstants() noexcept {
ReactNativeSpecs::AppStateSpec_AppStateConstants AppState::GetConstants() noexcept {
return {GetAppState()};
}

Просмотреть файл

@ -14,7 +14,7 @@ namespace Microsoft::ReactNative {
REACT_MODULE(AppState)
struct AppState : public std::enable_shared_from_this<AppState> {
using ModuleSpec = ReactNativeSpecs::AppStateSpec;
using AppStateChangeArgs = ReactNativeSpecs::AppStateSpec_getCurrentAppState_success_appState;
using AppStateChangeArgs = ReactNativeSpecs::AppStateSpec_AppState;
REACT_INIT(Initialize)
void Initialize(winrt::Microsoft::ReactNative::ReactContext const &reactContext) noexcept;
@ -31,7 +31,7 @@ struct AppState : public std::enable_shared_from_this<AppState> {
void RemoveListeners(double count) noexcept;
REACT_GET_CONSTANTS(GetConstants)
ReactNativeSpecs::AppStateSpec_Constants GetConstants() noexcept;
ReactNativeSpecs::AppStateSpec_AppStateConstants GetConstants() noexcept;
REACT_EVENT(AppStateDidChange, L"appStateDidChange")
std::function<void(AppStateChangeArgs const &)> AppStateDidChange;

Просмотреть файл

@ -177,8 +177,8 @@ void DeviceInfoHolder::updateDeviceInfo() noexcept {
}
}
ReactNativeSpecs::DeviceInfoSpec_Constants DeviceInfo::GetConstants() noexcept {
ReactNativeSpecs::DeviceInfoSpec_Constants constants;
ReactNativeSpecs::DeviceInfoSpec_DeviceInfoConstants DeviceInfo::GetConstants() noexcept {
ReactNativeSpecs::DeviceInfoSpec_DeviceInfoConstants constants;
constants.Dimensions = DeviceInfoHolder::GetDimensions(m_context.Properties());
return constants;
}

Просмотреть файл

@ -56,7 +56,7 @@ struct DeviceInfo : public std::enable_shared_from_this<DeviceInfo> {
void Initialize(React::ReactContext const &reactContext) noexcept;
REACT_GET_CONSTANTS(GetConstants)
ReactNativeSpecs::DeviceInfoSpec_Constants GetConstants() noexcept;
ReactNativeSpecs::DeviceInfoSpec_DeviceInfoConstants GetConstants() noexcept;
private:
winrt::Microsoft::ReactNative::ReactContext m_context;

Просмотреть файл

@ -61,7 +61,7 @@ void I18nManager::SwapLeftAndRightInRTL(bool /*flipStyles*/) noexcept {
// TODO - https://github.com/microsoft/react-native-windows/issues/4662
}
ReactNativeSpecs::I18nManagerSpec_Constants I18nManager::GetConstants() noexcept {
ReactNativeSpecs::I18nManagerSpec_I18nManagerConstants I18nManager::GetConstants() noexcept {
std::string locale = "en-us";
auto langs = winrt::Windows::Globalization::ApplicationLanguages::Languages();
@ -69,7 +69,7 @@ ReactNativeSpecs::I18nManagerSpec_Constants I18nManager::GetConstants() noexcept
locale = Microsoft::Common::Unicode::Utf16ToUtf8(langs.GetAt(0));
}
ReactNativeSpecs::I18nManagerSpec_Constants constants;
ReactNativeSpecs::I18nManagerSpec_I18nManagerConstants constants;
constants.localeIdentifier = locale;
constants.doLeftAndRightSwapInRTL = false;
constants.isRTL = IsRTL(m_context.Properties());

Просмотреть файл

@ -24,7 +24,7 @@ struct I18nManager {
void Initialize(React::ReactContext const &reactContext) noexcept;
REACT_GET_CONSTANTS(GetConstants)
ReactNativeSpecs::I18nManagerSpec_Constants GetConstants() noexcept;
ReactNativeSpecs::I18nManagerSpec_I18nManagerConstants GetConstants() noexcept;
REACT_METHOD(AllowRTL, L"allowRTL")
void AllowRTL(bool allowRTL) noexcept;

Просмотреть файл

@ -42,8 +42,8 @@ static inline bool YogaFloatEquals(float x, float y) {
#if defined(_DEBUG)
static int YogaLog(
const YGConfigRef /*config*/,
const YGNodeRef /*node*/,
const YGConfigConstRef /*config*/,
const YGNodeConstRef /*node*/,
YGLogLevel /*level*/,
const char *format,
va_list args) {
@ -835,8 +835,8 @@ void NativeUIManager::RemoveView(ShadowNode &shadowNode, bool removeChildren /*=
YGNodeRef yogaNode = pViewManager->RequiresYogaNode() ? GetYogaNode(node.m_tag) : nullptr;
if (yogaNode != nullptr && !pViewManager->IsNativeControlWithSelfLayout()) {
uint32_t childCount = YGNodeGetChildCount(yogaNode);
for (uint32_t i = childCount; i > 0; --i) {
auto childCount = YGNodeGetChildCount(yogaNode);
for (auto i = childCount; i > 0; --i) {
YGNodeRef yogaNodeToRemove = YGNodeGetChild(yogaNode, i - 1);
YGNodeRemoveChild(yogaNode, yogaNodeToRemove);
}

Просмотреть файл

@ -46,7 +46,7 @@ float GetConstrainedResult(float constrainTo, float measuredSize, YGMeasureMode
}
YGSize DefaultYogaSelfMeasureFunc(
YGNodeRef node,
YGNodeConstRef node,
float width,
YGMeasureMode widthMode,
float height,

Просмотреть файл

@ -25,7 +25,7 @@ struct YogaContext {
};
REACTWINDOWS_EXPORT YGSize DefaultYogaSelfMeasureFunc(
YGNodeRef node,
YGNodeConstRef node,
float width,
YGMeasureMode widthMode,
float height,

Просмотреть файл

@ -26,9 +26,12 @@
},
"Microsoft.UI.Xaml": {
"type": "Direct",
"requested": "[2.7.0-prerelease.210913003, )",
"resolved": "2.7.0-prerelease.210913003",
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
"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",
@ -46,6 +49,11 @@
"resolved": "1.1.1",
"contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg=="
},
"Microsoft.Web.WebView2": {
"type": "Transitive",
"resolved": "1.0.1264.42",
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
},
"common": {
"type": "Project"
},
@ -68,59 +76,52 @@
}
},
"native,Version=v0.0/win10-arm": {
"Microsoft.UI.Xaml": {
"type": "Direct",
"requested": "[2.7.0-prerelease.210913003, )",
"resolved": "2.7.0-prerelease.210913003",
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
"Microsoft.Web.WebView2": {
"type": "Transitive",
"resolved": "1.0.1264.42",
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
}
},
"native,Version=v0.0/win10-arm-aot": {
"Microsoft.UI.Xaml": {
"type": "Direct",
"requested": "[2.7.0-prerelease.210913003, )",
"resolved": "2.7.0-prerelease.210913003",
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
"Microsoft.Web.WebView2": {
"type": "Transitive",
"resolved": "1.0.1264.42",
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
}
},
"native,Version=v0.0/win10-arm64-aot": {
"Microsoft.UI.Xaml": {
"type": "Direct",
"requested": "[2.7.0-prerelease.210913003, )",
"resolved": "2.7.0-prerelease.210913003",
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
"Microsoft.Web.WebView2": {
"type": "Transitive",
"resolved": "1.0.1264.42",
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
}
},
"native,Version=v0.0/win10-x64": {
"Microsoft.UI.Xaml": {
"type": "Direct",
"requested": "[2.7.0-prerelease.210913003, )",
"resolved": "2.7.0-prerelease.210913003",
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
"Microsoft.Web.WebView2": {
"type": "Transitive",
"resolved": "1.0.1264.42",
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
}
},
"native,Version=v0.0/win10-x64-aot": {
"Microsoft.UI.Xaml": {
"type": "Direct",
"requested": "[2.7.0-prerelease.210913003, )",
"resolved": "2.7.0-prerelease.210913003",
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
"Microsoft.Web.WebView2": {
"type": "Transitive",
"resolved": "1.0.1264.42",
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
}
},
"native,Version=v0.0/win10-x86": {
"Microsoft.UI.Xaml": {
"type": "Direct",
"requested": "[2.7.0-prerelease.210913003, )",
"resolved": "2.7.0-prerelease.210913003",
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
"Microsoft.Web.WebView2": {
"type": "Transitive",
"resolved": "1.0.1264.42",
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
}
},
"native,Version=v0.0/win10-x86-aot": {
"Microsoft.UI.Xaml": {
"type": "Direct",
"requested": "[2.7.0-prerelease.210913003, )",
"resolved": "2.7.0-prerelease.210913003",
"contentHash": "eLUEu31PenwzXowSTm/HPRaaEClPd0FKPLirfHLM84wH3nPDHX18l/ngHm1Ny2rnwVyc1cYngPjYEv6DOQmw1A=="
"Microsoft.Web.WebView2": {
"type": "Transitive",
"resolved": "1.0.1264.42",
"contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
}
}
}

Просмотреть файл

@ -23,7 +23,7 @@
C4324 - structure was padded due to __declspec(align())
C5205 - delete of an abstract class that has a non-virtual destructor results in undefined behavior
-->
<ExtraWarningsToDisable>4068;4100;4101;4127;4189;4290;4309;4324;5205;$(DisableSpecificWarnings)</ExtraWarningsToDisable>
<ExtraWarningsToDisable>4068;4100;4101;4127;4189;4290;4309;4324;5205;4251;$(DisableSpecificWarnings)</ExtraWarningsToDisable>
</PropertyGroup>
<ItemDefinitionGroup>

Просмотреть файл

@ -131,15 +131,20 @@
<ClCompile Include="$(ReactNativeDir)\ReactCommon\jsinspector\InspectorInterfaces.cpp" />
<ClCompile Include="$(ReactNativeDir)\ReactCommon\logger\react_native_log.cpp" />
<CLCompile Include="$(ReactNativeDir)\ReactCommon\reactperflogger\reactperflogger\BridgeNativeModulePerfLogger.cpp" />
<ClCompile Include="$(YogaDir)\yoga\log.cpp" />
<ClCompile Include="$(YogaDir)\yoga\Utils.cpp" />
<ClCompile Include="$(YogaDir)\yoga\YGConfig.cpp" />
<ClCompile Include="$(YogaDir)\yoga\YGEnums.cpp" />
<ClCompile Include="$(YogaDir)\yoga\YGLayout.cpp" />
<ClCompile Include="$(YogaDir)\yoga\YGNode.cpp" />
<ClCompile Include="$(YogaDir)\yoga\YGNodePrint.cpp" />
<ClCompile Include="$(YogaDir)\yoga\YGStyle.cpp" />
<ClCompile Include="$(YogaDir)\yoga\YGValue.cpp" />
<ClCompile Include="$(YogaDir)\yoga\algorithm\Baseline.cpp" />
<ClCompile Include="$(YogaDir)\yoga\algorithm\Cache.cpp" />
<ClCompile Include="$(YogaDir)\yoga\algorithm\CalculateLayout.cpp" />
<ClCompile Include="$(YogaDir)\yoga\algorithm\FlexLine.cpp" />
<ClCompile Include="$(YogaDir)\yoga\algorithm\PixelGrid.cpp" />
<ClCompile Include="$(YogaDir)\yoga\config\Config.cpp" />
<ClCompile Include="$(YogaDir)\yoga\debug\AssertFatal.cpp" />
<ClCompile Include="$(YogaDir)\yoga\debug\Log.cpp" />
<ClCompile Include="$(YogaDir)\yoga\debug\NodeToString.cpp" />
<ClCompile Include="$(YogaDir)\yoga\node\LayoutResults.cpp" />
<ClCompile Include="$(YogaDir)\yoga\node\Node.cpp" />
<ClCompile Include="$(YogaDir)\yoga\style\Style.cpp" />
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\core\Sealable.cpp" />
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\debug\DebugStringConvertible.cpp" />
<ClCompile Include="$(ReactNativeDir)\ReactCommon\react\renderer\debug\DebugStringConvertibleItem.cpp" />

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше