@office-iss/react-native-win32 0.0.0-canary.247 → 0.0.0-canary.249
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.flowconfig +3 -3
- package/CHANGELOG.json +93 -1
- package/CHANGELOG.md +33 -8
- package/Libraries/Animated/NativeAnimatedHelper.js +4 -0
- package/Libraries/Animated/NativeAnimatedHelper.win32.js +4 -0
- package/Libraries/Animated/createAnimatedComponent.js +10 -4
- package/Libraries/Animated/useAnimatedProps.js +1 -0
- package/Libraries/BatchedBridge/MessageQueue.js +1 -0
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +3 -0
- package/Libraries/Components/ScrollView/ScrollView.js +9 -1
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +2 -1
- package/Libraries/Components/TextInput/TextInput.js +12 -3
- package/Libraries/Components/TextInput/TextInput.win32.js +12 -3
- package/Libraries/Components/Touchable/TouchableBounce.js +1 -0
- package/Libraries/Components/Touchable/TouchableOpacity.js +1 -0
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +6 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +1 -0
- package/Libraries/Components/View/View.js +0 -11
- package/Libraries/Components/View/View.win32.js +0 -11
- package/Libraries/Components/View/ViewPropTypes.d.ts +7 -0
- package/Libraries/Components/View/ViewPropTypes.js +7 -0
- package/Libraries/Components/View/ViewPropTypes.win32.js +7 -0
- package/Libraries/Core/Devtools/loadBundleFromServer.win32.js +153 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/ImageUtils.js +1 -0
- package/Libraries/Inspector/ElementBox.js +4 -0
- package/Libraries/IntersectionObserver/IntersectionObserverManager.js +6 -26
- package/Libraries/LogBox/Data/LogBoxData.js +0 -25
- package/Libraries/NativeComponent/BaseViewConfig.android.js +5 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +5 -0
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +5 -0
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +3 -0
- package/Libraries/Network/XMLHttpRequest.js +1 -0
- package/Libraries/ReactNative/AppRegistry.js +2 -4
- package/Libraries/ReactNative/ReactFabricPublicInstance/warnForStyleProps.js +1 -0
- package/Libraries/Renderer/shims/ReactFabric.js +0 -3
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +0 -3
- package/Libraries/Renderer/shims/ReactNative.js +0 -3
- package/Libraries/Renderer/shims/ReactNativeTypes.js +0 -3
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +0 -3
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +0 -3
- package/Libraries/StyleSheet/StyleSheet.js +3 -10
- package/Libraries/StyleSheet/StyleSheet.win32.js +3 -10
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +18 -18
- package/Libraries/StyleSheet/StyleSheetTypes.js +19 -13
- package/Libraries/StyleSheet/flattenStyle.js +1 -0
- package/Libraries/StyleSheet/processFilter.js +132 -0
- package/Libraries/TurboModule/TurboModuleRegistry.js +2 -1
- package/Libraries/Utilities/Dimensions.js +1 -0
- package/Libraries/Utilities/Dimensions.win32.js +1 -0
- package/Libraries/Utilities/RCTLog.js +1 -0
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +11 -6
- package/jest/mockComponent.js +7 -0
- package/overrides.json +18 -11
- package/package.json +17 -17
- package/rn-get-polyfills.js +1 -0
- package/src/private/core/composeStyles.js +27 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +24 -14
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +6 -4
- package/src/private/webapis/dom/geometry/DOMRectReadOnly.js +24 -24
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +4 -4
- package/src/private/webapis/dom/oldstylecollections/DOMRectList.js +4 -4
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +4 -4
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +5 -5
- package/src/private/webapis/performance/MemoryInfo.js +9 -9
- package/src/private/webapis/performance/PerformanceObserver.js +16 -16
- package/src/private/webapis/performance/ReactNativeStartupTiming.js +18 -18
- package/src-win/Libraries/Components/View/ViewPropTypes.d.ts +7 -0
- package/jest/ReactNativeInternalFeatureFlagsMock.js +0 -13
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @format
|
|
8
|
+
* @flow
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
export type FilterPrimitive =
|
|
14
|
+
| {brightness: number | string}
|
|
15
|
+
| {blur: number | string}
|
|
16
|
+
| {contrast: number | string}
|
|
17
|
+
| {grayscale: number | string}
|
|
18
|
+
| {hueRotate: number | string}
|
|
19
|
+
| {invert: number | string}
|
|
20
|
+
| {opacity: number | string}
|
|
21
|
+
| {saturate: number | string}
|
|
22
|
+
| {sepia: number | string};
|
|
23
|
+
|
|
24
|
+
export default function processFilter(
|
|
25
|
+
filter: $ReadOnlyArray<FilterPrimitive> | string,
|
|
26
|
+
): $ReadOnlyArray<FilterPrimitive> {
|
|
27
|
+
let result: Array<FilterPrimitive> = [];
|
|
28
|
+
if (typeof filter === 'string') {
|
|
29
|
+
// matches on functions with args like "brightness(1.5)"
|
|
30
|
+
const regex = new RegExp(/(\w+)\(([^)]+)\)/g);
|
|
31
|
+
let matches;
|
|
32
|
+
|
|
33
|
+
while ((matches = regex.exec(filter))) {
|
|
34
|
+
const amount = _getFilterAmount(matches[1], matches[2]);
|
|
35
|
+
|
|
36
|
+
if (amount != null) {
|
|
37
|
+
const filterPrimitive = {};
|
|
38
|
+
// $FlowFixMe The key will be the correct one but flow can't see that.
|
|
39
|
+
filterPrimitive[matches[1]] = amount;
|
|
40
|
+
// $FlowFixMe The key will be the correct one but flow can't see that.
|
|
41
|
+
result.push(filterPrimitive);
|
|
42
|
+
} else {
|
|
43
|
+
// If any primitive is invalid then apply none of the filters. This is how
|
|
44
|
+
// web works and makes it clear that something is wrong becuase no
|
|
45
|
+
// graphical effects are happening.
|
|
46
|
+
return [];
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
} else {
|
|
50
|
+
for (const filterPrimitive of filter) {
|
|
51
|
+
const [filterName, filterValue] = Object.entries(filterPrimitive)[0];
|
|
52
|
+
const amount = _getFilterAmount(filterName, filterValue);
|
|
53
|
+
|
|
54
|
+
if (amount != null) {
|
|
55
|
+
const resultObject = {};
|
|
56
|
+
// $FlowFixMe
|
|
57
|
+
resultObject[filterName] = amount;
|
|
58
|
+
// $FlowFixMe
|
|
59
|
+
result.push(resultObject);
|
|
60
|
+
} else {
|
|
61
|
+
// If any primitive is invalid then apply none of the filters. This is how
|
|
62
|
+
// web works and makes it clear that something is wrong becuase no
|
|
63
|
+
// graphical effects are happening.
|
|
64
|
+
return [];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return result;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function _getFilterAmount(filterName: string, filterArgs: mixed): ?number {
|
|
73
|
+
let filterArgAsNumber: number;
|
|
74
|
+
let unit: string;
|
|
75
|
+
if (typeof filterArgs === 'string') {
|
|
76
|
+
// matches on args with units like "1.5 5% -80deg"
|
|
77
|
+
const argsWithUnitsRegex = new RegExp(/([+-]?\d*(\.\d+)?)([a-zA-Z%]+)?/g);
|
|
78
|
+
const match = argsWithUnitsRegex.exec(filterArgs);
|
|
79
|
+
|
|
80
|
+
if (!match || isNaN(Number(match[1]))) {
|
|
81
|
+
return undefined;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
filterArgAsNumber = Number(match[1]);
|
|
85
|
+
unit = match[3];
|
|
86
|
+
} else if (typeof filterArgs === 'number') {
|
|
87
|
+
filterArgAsNumber = filterArgs;
|
|
88
|
+
} else {
|
|
89
|
+
return undefined;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
switch (filterName) {
|
|
93
|
+
// Hue rotate takes some angle that can have a unit and can be
|
|
94
|
+
// negative. Additionally, 0 with no unit is allowed.
|
|
95
|
+
case 'hueRotate':
|
|
96
|
+
if (filterArgAsNumber === 0) {
|
|
97
|
+
return 0;
|
|
98
|
+
}
|
|
99
|
+
if (unit !== 'deg' && unit !== 'rad') {
|
|
100
|
+
return undefined;
|
|
101
|
+
}
|
|
102
|
+
return unit === 'rad'
|
|
103
|
+
? (180 * filterArgAsNumber) / Math.PI
|
|
104
|
+
: filterArgAsNumber;
|
|
105
|
+
// blur takes any positive CSS length that is not a percent. In RN
|
|
106
|
+
// we currently only have DIPs, so we are not parsing units here.
|
|
107
|
+
case 'blur':
|
|
108
|
+
if ((unit && unit !== 'px') || filterArgAsNumber < 0) {
|
|
109
|
+
return undefined;
|
|
110
|
+
}
|
|
111
|
+
return filterArgAsNumber;
|
|
112
|
+
// All other filters except take a non negative number or percentage. There
|
|
113
|
+
// are no units associated with this value and percentage numbers map 1-to-1
|
|
114
|
+
// to a non-percentage number (e.g. 50% == 0.5).
|
|
115
|
+
case 'brightness':
|
|
116
|
+
case 'contrast':
|
|
117
|
+
case 'grayscale':
|
|
118
|
+
case 'invert':
|
|
119
|
+
case 'opacity':
|
|
120
|
+
case 'saturate':
|
|
121
|
+
case 'sepia':
|
|
122
|
+
if ((unit && unit !== '%' && unit !== 'px') || filterArgAsNumber < 0) {
|
|
123
|
+
return undefined;
|
|
124
|
+
}
|
|
125
|
+
if (unit === '%') {
|
|
126
|
+
filterArgAsNumber /= 100;
|
|
127
|
+
}
|
|
128
|
+
return filterArgAsNumber;
|
|
129
|
+
default:
|
|
130
|
+
return undefined;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
@@ -76,7 +76,8 @@ export function getEnforcing<T: TurboModule>(name: string): T {
|
|
|
76
76
|
'Verify that a module by this name is registered in the native binary.';
|
|
77
77
|
|
|
78
78
|
if (shouldReportDebugInfo()) {
|
|
79
|
-
message +=
|
|
79
|
+
message +=
|
|
80
|
+
' Bridgeless mode: ' + (isBridgeless() ? 'true' : 'false') + '. ';
|
|
80
81
|
message +=
|
|
81
82
|
'TurboModule interop: ' +
|
|
82
83
|
(isTurboModuleInteropEnabled() ? 'true' : 'false') +
|
|
@@ -44,6 +44,7 @@ class Dimensions {
|
|
|
44
44
|
* @returns {DisplayMetrics? | DisplayMetricsAndroid?} Value for the dimension.
|
|
45
45
|
*/
|
|
46
46
|
static get(dim: string): DisplayMetrics | DisplayMetricsAndroid {
|
|
47
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
47
48
|
invariant(dimensions[dim], 'No dimension set for key ' + dim);
|
|
48
49
|
return dimensions[dim];
|
|
49
50
|
}
|
|
@@ -48,6 +48,7 @@ class Dimensions {
|
|
|
48
48
|
* @returns {DisplayMetrics? | DisplayMetricsAndroid?} Value for the dimension.
|
|
49
49
|
*/
|
|
50
50
|
static get(dim: string): DisplayMetrics | DisplayMetricsAndroid {
|
|
51
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
51
52
|
invariant(dimensions[dim], 'No dimension set for key ' + dim);
|
|
52
53
|
return dimensions[dim];
|
|
53
54
|
}
|
|
@@ -104,16 +104,21 @@ export function getConfigWithoutViewProps(
|
|
|
104
104
|
viewConfig: ViewConfig,
|
|
105
105
|
propName: string,
|
|
106
106
|
): {...} {
|
|
107
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
107
108
|
if (!viewConfig[propName]) {
|
|
108
109
|
return {};
|
|
109
110
|
}
|
|
110
111
|
|
|
111
|
-
return
|
|
112
|
-
.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
112
|
+
return (
|
|
113
|
+
Object.keys(viewConfig[propName])
|
|
114
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
115
|
+
.filter(prop => !PlatformBaseViewConfig[propName][prop])
|
|
116
|
+
.reduce<{[string]: any}>((obj, prop) => {
|
|
117
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
118
|
+
obj[prop] = viewConfig[propName][prop];
|
|
119
|
+
return obj;
|
|
120
|
+
}, {})
|
|
121
|
+
);
|
|
117
122
|
}
|
|
118
123
|
|
|
119
124
|
export function stringifyViewConfig(viewConfig: any): string {
|
package/jest/mockComponent.js
CHANGED
|
@@ -50,6 +50,13 @@ module.exports = (moduleName, instanceMethods, isESModule) => {
|
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
+
Object.defineProperty(Component, 'name', {
|
|
54
|
+
value: name,
|
|
55
|
+
writable: false,
|
|
56
|
+
enumerable: false,
|
|
57
|
+
configurable: true,
|
|
58
|
+
});
|
|
59
|
+
|
|
53
60
|
Component.displayName = nameWithoutPrefix;
|
|
54
61
|
|
|
55
62
|
Object.keys(RealComponent).forEach(classStatic => {
|
package/overrides.json
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
"**/__snapshots__/**",
|
|
8
8
|
"src-win/rntypes/**"
|
|
9
9
|
],
|
|
10
|
-
"baseVersion": "0.75.0-nightly-
|
|
10
|
+
"baseVersion": "0.75.0-nightly-20240511-3f17c8b5f",
|
|
11
11
|
"overrides": [
|
|
12
12
|
{
|
|
13
13
|
"type": "derived",
|
|
14
14
|
"file": ".flowconfig",
|
|
15
15
|
"baseFile": ".flowconfig",
|
|
16
|
-
"baseHash": "
|
|
16
|
+
"baseHash": "bd274caf8faae09b1f0513a4086c07b778072e78"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"type": "derived",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"type": "derived",
|
|
36
36
|
"file": "src-win/Libraries/Animated/NativeAnimatedHelper.win32.js",
|
|
37
37
|
"baseFile": "packages/react-native/Libraries/Animated/NativeAnimatedHelper.js",
|
|
38
|
-
"baseHash": "
|
|
38
|
+
"baseHash": "2cefe6e59aa26f98158be3f35452f9a49d8395c4",
|
|
39
39
|
"issue": 11041
|
|
40
40
|
},
|
|
41
41
|
{
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
"type": "derived",
|
|
117
117
|
"file": "src-win/Libraries/Components/TextInput/TextInput.win32.js",
|
|
118
118
|
"baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.js",
|
|
119
|
-
"baseHash": "
|
|
119
|
+
"baseHash": "dad569fd3dd81f212afd7b35ffe75108e926eb5e"
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
"type": "patch",
|
|
@@ -174,13 +174,13 @@
|
|
|
174
174
|
"type": "patch",
|
|
175
175
|
"file": "src-win/Libraries/Components/View/ReactNativeViewAttributes.win32.js",
|
|
176
176
|
"baseFile": "packages/react-native/Libraries/Components/View/ReactNativeViewAttributes.js",
|
|
177
|
-
"baseHash": "
|
|
177
|
+
"baseHash": "8fc645a55ff86ceeac9c45f09d232586589ee7dc"
|
|
178
178
|
},
|
|
179
179
|
{
|
|
180
180
|
"type": "patch",
|
|
181
181
|
"file": "src-win/Libraries/Components/View/View.win32.js",
|
|
182
182
|
"baseFile": "packages/react-native/Libraries/Components/View/View.js",
|
|
183
|
-
"baseHash": "
|
|
183
|
+
"baseHash": "1905f72f4d202d466ea7d8ed4b36df0845f2c310"
|
|
184
184
|
},
|
|
185
185
|
{
|
|
186
186
|
"type": "derived",
|
|
@@ -198,13 +198,13 @@
|
|
|
198
198
|
"type": "derived",
|
|
199
199
|
"file": "src-win/Libraries/Components/View/ViewPropTypes.d.ts",
|
|
200
200
|
"baseFile": "packages/react-native/Libraries/Components/View/ViewPropTypes.d.ts",
|
|
201
|
-
"baseHash": "
|
|
201
|
+
"baseHash": "8e33800dfdd3b50e26c3331abb8b4682c091602f"
|
|
202
202
|
},
|
|
203
203
|
{
|
|
204
204
|
"type": "patch",
|
|
205
205
|
"file": "src-win/Libraries/Components/View/ViewPropTypes.win32.js",
|
|
206
206
|
"baseFile": "packages/react-native/Libraries/Components/View/ViewPropTypes.js",
|
|
207
|
-
"baseHash": "
|
|
207
|
+
"baseHash": "50bd550ba0710173ca3533b7b103075ecdda6b56",
|
|
208
208
|
"issue": 6240
|
|
209
209
|
},
|
|
210
210
|
{
|
|
@@ -217,6 +217,13 @@
|
|
|
217
217
|
"type": "platform",
|
|
218
218
|
"file": "src-win/Libraries/Components/View/ViewWin32.js"
|
|
219
219
|
},
|
|
220
|
+
{
|
|
221
|
+
"type": "patch",
|
|
222
|
+
"file": "src-win/Libraries/Core/Devtools/loadBundleFromServer.win32.js",
|
|
223
|
+
"baseFile": "packages/react-native/Libraries/Core/Devtools/loadBundleFromServer.js",
|
|
224
|
+
"baseHash": "14662281c97222b45893308b744a7dc7c2000801",
|
|
225
|
+
"issue": 12704
|
|
226
|
+
},
|
|
220
227
|
{
|
|
221
228
|
"type": "patch",
|
|
222
229
|
"file": "src-win/Libraries/Core/ReactNativeVersionCheck.win32.js",
|
|
@@ -337,7 +344,7 @@
|
|
|
337
344
|
"type": "derived",
|
|
338
345
|
"file": "src-win/Libraries/NativeComponent/BaseViewConfig.win32.js",
|
|
339
346
|
"baseFile": "packages/react-native/Libraries/NativeComponent/BaseViewConfig.ios.js",
|
|
340
|
-
"baseHash": "
|
|
347
|
+
"baseHash": "d7b9540d5e637cb86b29d119838a4024bfc2b7d6"
|
|
341
348
|
},
|
|
342
349
|
{
|
|
343
350
|
"type": "copy",
|
|
@@ -420,7 +427,7 @@
|
|
|
420
427
|
"type": "patch",
|
|
421
428
|
"file": "src-win/Libraries/StyleSheet/StyleSheet.win32.js",
|
|
422
429
|
"baseFile": "packages/react-native/Libraries/StyleSheet/StyleSheet.js",
|
|
423
|
-
"baseHash": "
|
|
430
|
+
"baseHash": "5c01bd55040fb9d31534bd27b98fe9c3671994c0"
|
|
424
431
|
},
|
|
425
432
|
{
|
|
426
433
|
"type": "derived",
|
|
@@ -471,7 +478,7 @@
|
|
|
471
478
|
"type": "derived",
|
|
472
479
|
"file": "src-win/Libraries/Utilities/Dimensions.win32.js",
|
|
473
480
|
"baseFile": "packages/react-native/Libraries/Utilities/Dimensions.js",
|
|
474
|
-
"baseHash": "
|
|
481
|
+
"baseHash": "bac146d616013f6da06bba9f6c0f52633e4a0737"
|
|
475
482
|
},
|
|
476
483
|
{
|
|
477
484
|
"type": "platform",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
|
-
"version": "0.0.0-canary.
|
|
3
|
+
"version": "0.0.0-canary.249",
|
|
4
4
|
"description": "Implementation of react native on top of Office's Win32 platform.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"@react-native-community/cli-platform-android": "14.0.0-alpha.2",
|
|
31
31
|
"@react-native-community/cli-platform-ios": "14.0.0-alpha.2",
|
|
32
32
|
"@react-native/assets": "1.0.0",
|
|
33
|
-
"@react-native/assets-registry": "0.75.0-nightly-
|
|
34
|
-
"@react-native/codegen": "0.75.0-nightly-
|
|
35
|
-
"@react-native/community-cli-plugin": "0.75.0-nightly-
|
|
36
|
-
"@react-native/gradle-plugin": "0.75.0-nightly-
|
|
37
|
-
"@react-native/js-polyfills": "0.75.0-nightly-
|
|
38
|
-
"@react-native/normalize-colors": "0.75.0-nightly-
|
|
39
|
-
"@react-native/virtualized-lists": "0.75.0-nightly-
|
|
33
|
+
"@react-native/assets-registry": "0.75.0-nightly-20240511-3f17c8b5f",
|
|
34
|
+
"@react-native/codegen": "0.75.0-nightly-20240511-3f17c8b5f",
|
|
35
|
+
"@react-native/community-cli-plugin": "0.75.0-nightly-20240511-3f17c8b5f",
|
|
36
|
+
"@react-native/gradle-plugin": "0.75.0-nightly-20240511-3f17c8b5f",
|
|
37
|
+
"@react-native/js-polyfills": "0.75.0-nightly-20240511-3f17c8b5f",
|
|
38
|
+
"@react-native/normalize-colors": "0.75.0-nightly-20240511-3f17c8b5f",
|
|
39
|
+
"@react-native/virtualized-lists": "0.75.0-nightly-20240511-3f17c8b5f",
|
|
40
40
|
"abort-controller": "^3.0.0",
|
|
41
41
|
"anser": "^1.4.9",
|
|
42
42
|
"ansi-regex": "^5.0.0",
|
|
@@ -70,11 +70,11 @@
|
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@babel/core": "^7.20.0",
|
|
72
72
|
"@babel/eslint-parser": "^7.20.0",
|
|
73
|
-
"@react-native/metro-config": "0.75.0-nightly-
|
|
73
|
+
"@react-native/metro-config": "0.75.0-nightly-20240511-3f17c8b5f",
|
|
74
74
|
"@rnw-scripts/babel-react-native-config": "0.0.0",
|
|
75
|
-
"@rnw-scripts/eslint-config": "1.2.
|
|
76
|
-
"@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.
|
|
77
|
-
"@rnw-scripts/just-task": "2.3.
|
|
75
|
+
"@rnw-scripts/eslint-config": "1.2.19",
|
|
76
|
+
"@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.23",
|
|
77
|
+
"@rnw-scripts/just-task": "2.3.35",
|
|
78
78
|
"@rnw-scripts/metro-dev-config": "0.0.0",
|
|
79
79
|
"@rnx-kit/jest-preset": "^0.1.0",
|
|
80
80
|
"@types/node": "^18.0.0",
|
|
@@ -85,15 +85,15 @@
|
|
|
85
85
|
"jscodeshift": "^0.14.0",
|
|
86
86
|
"just-scripts": "^1.3.3",
|
|
87
87
|
"prettier": "2.8.8",
|
|
88
|
-
"react": "18.
|
|
89
|
-
"react-native": "0.75.0-nightly-
|
|
90
|
-
"react-native-platform-override": "^1.9.
|
|
88
|
+
"react": "18.3.1",
|
|
89
|
+
"react-native": "0.75.0-nightly-20240511-3f17c8b5f",
|
|
90
|
+
"react-native-platform-override": "^1.9.36",
|
|
91
91
|
"typescript": "5.0.4"
|
|
92
92
|
},
|
|
93
93
|
"peerDependencies": {
|
|
94
94
|
"@types/react": "^18.2.6",
|
|
95
|
-
"react": "18.2.0",
|
|
96
|
-
"react-native": "0.75.0-nightly-
|
|
95
|
+
"react": "^18.2.0",
|
|
96
|
+
"react-native": "0.75.0-nightly-20240511-3f17c8b5f"
|
|
97
97
|
},
|
|
98
98
|
"beachball": {
|
|
99
99
|
"defaultNpmTag": "canary",
|
package/rn-get-polyfills.js
CHANGED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @flow strict
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Combines two styles such that `style2` will override any styles in `style1`.
|
|
13
|
+
* If either style is null or undefined, the other one is returned without
|
|
14
|
+
* allocating an array, saving allocations and enabling memoization.
|
|
15
|
+
*/
|
|
16
|
+
export default function composeStyles<T1, T2>(
|
|
17
|
+
style1: ?T1,
|
|
18
|
+
style2: ?T2,
|
|
19
|
+
): ?(T1 | T2 | $ReadOnlyArray<T1 | T2>) {
|
|
20
|
+
if (style1 == null) {
|
|
21
|
+
return style2;
|
|
22
|
+
}
|
|
23
|
+
if (style2 == null) {
|
|
24
|
+
return style1;
|
|
25
|
+
}
|
|
26
|
+
return [style1, style2];
|
|
27
|
+
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<953d2d7e7adb016bf30c2be62ee0d89a>>
|
|
8
8
|
* @flow strict-local
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -41,18 +41,20 @@ export type ReactNativeFeatureFlagsJsOnlyOverrides = Partial<ReactNativeFeatureF
|
|
|
41
41
|
export type ReactNativeFeatureFlags = {
|
|
42
42
|
...ReactNativeFeatureFlagsJsOnly,
|
|
43
43
|
commonTestFlag: Getter<boolean>,
|
|
44
|
+
allowCollapsableChildren: Getter<boolean>,
|
|
45
|
+
androidEnablePendingFabricTransactions: Getter<boolean>,
|
|
44
46
|
batchRenderingUpdatesInEventLoop: Getter<boolean>,
|
|
47
|
+
destroyFabricSurfacesInReactInstanceManager: Getter<boolean>,
|
|
45
48
|
enableBackgroundExecutor: Getter<boolean>,
|
|
46
49
|
enableCleanTextInputYogaNode: Getter<boolean>,
|
|
47
|
-
|
|
50
|
+
enableGranularShadowTreeStateReconciliation: Getter<boolean>,
|
|
48
51
|
enableMicrotasks: Getter<boolean>,
|
|
49
|
-
enableMountHooksAndroid: Getter<boolean>,
|
|
50
|
-
enableSpannableBuildingUnification: Getter<boolean>,
|
|
51
52
|
enableSynchronousStateUpdates: Getter<boolean>,
|
|
52
53
|
enableUIConsistency: Getter<boolean>,
|
|
53
54
|
forceBatchingMountItemsOnAndroid: Getter<boolean>,
|
|
54
55
|
inspectorEnableCxxInspectorPackagerConnection: Getter<boolean>,
|
|
55
56
|
inspectorEnableModernCDPRegistry: Getter<boolean>,
|
|
57
|
+
lazyAnimationCallbacks: Getter<boolean>,
|
|
56
58
|
preventDoubleTextMeasure: Getter<boolean>,
|
|
57
59
|
useModernRuntimeScheduler: Getter<boolean>,
|
|
58
60
|
useNativeViewConfigsInBridgelessMode: Getter<boolean>,
|
|
@@ -103,10 +105,22 @@ export const shouldUseSetNativePropsInFabric: Getter<boolean> = createJavaScript
|
|
|
103
105
|
* Common flag for testing. Do NOT modify.
|
|
104
106
|
*/
|
|
105
107
|
export const commonTestFlag: Getter<boolean> = createNativeFlagGetter('commonTestFlag', false);
|
|
108
|
+
/**
|
|
109
|
+
* Enables the differentiator to understand the "collapsableChildren" prop
|
|
110
|
+
*/
|
|
111
|
+
export const allowCollapsableChildren: Getter<boolean> = createNativeFlagGetter('allowCollapsableChildren', true);
|
|
112
|
+
/**
|
|
113
|
+
* To be used with batchRenderingUpdatesInEventLoop. When enbled, the Android mounting layer will concatenate pending transactions to ensure they're applied atomatically
|
|
114
|
+
*/
|
|
115
|
+
export const androidEnablePendingFabricTransactions: Getter<boolean> = createNativeFlagGetter('androidEnablePendingFabricTransactions', false);
|
|
106
116
|
/**
|
|
107
117
|
* When enabled, the RuntimeScheduler processing the event loop will batch all rendering updates and dispatch them together at the end of each iteration of the loop.
|
|
108
118
|
*/
|
|
109
119
|
export const batchRenderingUpdatesInEventLoop: Getter<boolean> = createNativeFlagGetter('batchRenderingUpdatesInEventLoop', false);
|
|
120
|
+
/**
|
|
121
|
+
* When enabled, ReactInstanceManager will clean up Fabric surfaces on destroy().
|
|
122
|
+
*/
|
|
123
|
+
export const destroyFabricSurfacesInReactInstanceManager: Getter<boolean> = createNativeFlagGetter('destroyFabricSurfacesInReactInstanceManager', false);
|
|
110
124
|
/**
|
|
111
125
|
* Enables the use of a background executor to compute layout and commit updates on Fabric (this system is deprecated and should not be used).
|
|
112
126
|
*/
|
|
@@ -116,21 +130,13 @@ export const enableBackgroundExecutor: Getter<boolean> = createNativeFlagGetter(
|
|
|
116
130
|
*/
|
|
117
131
|
export const enableCleanTextInputYogaNode: Getter<boolean> = createNativeFlagGetter('enableCleanTextInputYogaNode', false);
|
|
118
132
|
/**
|
|
119
|
-
* When enabled,
|
|
133
|
+
* When enabled, the renderer would only fail commits when they propagate state and the last commit that updated state changed before committing.
|
|
120
134
|
*/
|
|
121
|
-
export const
|
|
135
|
+
export const enableGranularShadowTreeStateReconciliation: Getter<boolean> = createNativeFlagGetter('enableGranularShadowTreeStateReconciliation', false);
|
|
122
136
|
/**
|
|
123
137
|
* Enables the use of microtasks in Hermes (scheduling) and RuntimeScheduler (execution).
|
|
124
138
|
*/
|
|
125
139
|
export const enableMicrotasks: Getter<boolean> = createNativeFlagGetter('enableMicrotasks', false);
|
|
126
|
-
/**
|
|
127
|
-
* Enables the notification of mount operations to mount hooks on Android.
|
|
128
|
-
*/
|
|
129
|
-
export const enableMountHooksAndroid: Getter<boolean> = createNativeFlagGetter('enableMountHooksAndroid', false);
|
|
130
|
-
/**
|
|
131
|
-
* Uses new, deduplicated logic for constructing Android Spannables from text fragments
|
|
132
|
-
*/
|
|
133
|
-
export const enableSpannableBuildingUnification: Getter<boolean> = createNativeFlagGetter('enableSpannableBuildingUnification', false);
|
|
134
140
|
/**
|
|
135
141
|
* Dispatches state updates synchronously in Fabric (e.g.: updates the scroll position in the shadow tree synchronously from the main thread).
|
|
136
142
|
*/
|
|
@@ -151,6 +157,10 @@ export const inspectorEnableCxxInspectorPackagerConnection: Getter<boolean> = cr
|
|
|
151
157
|
* Flag determining if the modern CDP backend should be enabled. This flag is global and should not be changed across React Host lifetimes.
|
|
152
158
|
*/
|
|
153
159
|
export const inspectorEnableModernCDPRegistry: Getter<boolean> = createNativeFlagGetter('inspectorEnableModernCDPRegistry', false);
|
|
160
|
+
/**
|
|
161
|
+
* Only enqueue Choreographer calls if there is an ongoing animation, instead of enqueueing every frame.
|
|
162
|
+
*/
|
|
163
|
+
export const lazyAnimationCallbacks: Getter<boolean> = createNativeFlagGetter('lazyAnimationCallbacks', false);
|
|
154
164
|
/**
|
|
155
165
|
* When enabled, ParagraphShadowNode will no longer call measure twice.
|
|
156
166
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<446991ce24c5765399940bfda55c0e5c>>
|
|
8
8
|
* @flow strict-local
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -24,18 +24,20 @@ import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboMod
|
|
|
24
24
|
|
|
25
25
|
export interface Spec extends TurboModule {
|
|
26
26
|
+commonTestFlag?: () => boolean;
|
|
27
|
+
+allowCollapsableChildren?: () => boolean;
|
|
28
|
+
+androidEnablePendingFabricTransactions?: () => boolean;
|
|
27
29
|
+batchRenderingUpdatesInEventLoop?: () => boolean;
|
|
30
|
+
+destroyFabricSurfacesInReactInstanceManager?: () => boolean;
|
|
28
31
|
+enableBackgroundExecutor?: () => boolean;
|
|
29
32
|
+enableCleanTextInputYogaNode?: () => boolean;
|
|
30
|
-
+
|
|
33
|
+
+enableGranularShadowTreeStateReconciliation?: () => boolean;
|
|
31
34
|
+enableMicrotasks?: () => boolean;
|
|
32
|
-
+enableMountHooksAndroid?: () => boolean;
|
|
33
|
-
+enableSpannableBuildingUnification?: () => boolean;
|
|
34
35
|
+enableSynchronousStateUpdates?: () => boolean;
|
|
35
36
|
+enableUIConsistency?: () => boolean;
|
|
36
37
|
+forceBatchingMountItemsOnAndroid?: () => boolean;
|
|
37
38
|
+inspectorEnableCxxInspectorPackagerConnection?: () => boolean;
|
|
38
39
|
+inspectorEnableModernCDPRegistry?: () => boolean;
|
|
40
|
+
+lazyAnimationCallbacks?: () => boolean;
|
|
39
41
|
+preventDoubleTextMeasure?: () => boolean;
|
|
40
42
|
+useModernRuntimeScheduler?: () => boolean;
|
|
41
43
|
+useNativeViewConfigsInBridgelessMode?: () => boolean;
|