@office-iss/react-native-win32 0.0.0-canary.247 → 0.0.0-canary.248

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.
Files changed (61) hide show
  1. package/.flowconfig +3 -2
  2. package/CHANGELOG.json +46 -1
  3. package/CHANGELOG.md +21 -8
  4. package/Libraries/Animated/NativeAnimatedHelper.js +4 -0
  5. package/Libraries/Animated/NativeAnimatedHelper.win32.js +4 -0
  6. package/Libraries/Animated/createAnimatedComponent.js +10 -4
  7. package/Libraries/Animated/useAnimatedProps.js +1 -0
  8. package/Libraries/BatchedBridge/MessageQueue.js +1 -0
  9. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +2 -0
  10. package/Libraries/Components/ScrollView/ScrollView.js +9 -1
  11. package/Libraries/Components/TextInput/TextInput.js +6 -0
  12. package/Libraries/Components/TextInput/TextInput.win32.js +6 -0
  13. package/Libraries/Components/Touchable/TouchableBounce.js +1 -0
  14. package/Libraries/Components/Touchable/TouchableOpacity.js +1 -0
  15. package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
  16. package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +1 -0
  17. package/Libraries/Components/View/View.js +0 -11
  18. package/Libraries/Components/View/View.win32.js +0 -11
  19. package/Libraries/Components/View/ViewPropTypes.d.ts +7 -0
  20. package/Libraries/Components/View/ViewPropTypes.js +7 -0
  21. package/Libraries/Components/View/ViewPropTypes.win32.js +7 -0
  22. package/Libraries/Core/ReactNativeVersion.js +1 -1
  23. package/Libraries/Image/ImageUtils.js +1 -0
  24. package/Libraries/Inspector/ElementBox.js +4 -0
  25. package/Libraries/NativeComponent/BaseViewConfig.android.js +2 -0
  26. package/Libraries/NativeComponent/BaseViewConfig.ios.js +2 -0
  27. package/Libraries/NativeComponent/BaseViewConfig.win32.js +2 -0
  28. package/Libraries/NativeComponent/StaticViewConfigValidator.js +3 -0
  29. package/Libraries/Network/XMLHttpRequest.js +1 -0
  30. package/Libraries/ReactNative/AppRegistry.js +2 -4
  31. package/Libraries/ReactNative/ReactFabricPublicInstance/warnForStyleProps.js +1 -0
  32. package/Libraries/Renderer/shims/ReactFabric.js +0 -3
  33. package/Libraries/Renderer/shims/ReactFeatureFlags.js +0 -3
  34. package/Libraries/Renderer/shims/ReactNative.js +0 -3
  35. package/Libraries/Renderer/shims/ReactNativeTypes.js +0 -3
  36. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +0 -3
  37. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +0 -3
  38. package/Libraries/StyleSheet/StyleSheet.js +3 -10
  39. package/Libraries/StyleSheet/StyleSheet.win32.js +3 -10
  40. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +18 -18
  41. package/Libraries/StyleSheet/StyleSheetTypes.js +13 -13
  42. package/Libraries/StyleSheet/flattenStyle.js +1 -0
  43. package/Libraries/TurboModule/TurboModuleRegistry.js +2 -1
  44. package/Libraries/Utilities/Dimensions.js +1 -0
  45. package/Libraries/Utilities/Dimensions.win32.js +1 -0
  46. package/Libraries/Utilities/RCTLog.js +1 -0
  47. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +11 -6
  48. package/overrides.json +11 -11
  49. package/package.json +15 -15
  50. package/src/private/core/composeStyles.js +27 -0
  51. package/src/private/featureflags/ReactNativeFeatureFlags.js +29 -14
  52. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +7 -4
  53. package/src/private/webapis/dom/geometry/DOMRectReadOnly.js +24 -24
  54. package/src/private/webapis/dom/nodes/ReactNativeElement.js +4 -4
  55. package/src/private/webapis/dom/oldstylecollections/DOMRectList.js +4 -4
  56. package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +4 -4
  57. package/src/private/webapis/dom/oldstylecollections/NodeList.js +5 -5
  58. package/src/private/webapis/performance/MemoryInfo.js +9 -9
  59. package/src/private/webapis/performance/PerformanceObserver.js +16 -16
  60. package/src/private/webapis/performance/ReactNativeStartupTiming.js +18 -18
  61. package/src-win/Libraries/Components/View/ViewPropTypes.d.ts +7 -0
@@ -23,6 +23,8 @@ import type {
23
23
  ____ViewStyleProp_Internal,
24
24
  } from './StyleSheetTypes';
25
25
 
26
+ import composeStyles from '../../src/private/core/composeStyles';
27
+
26
28
  const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes');
27
29
  const PixelRatio = require('../Utilities/PixelRatio').default;
28
30
  const flatten = require('./flattenStyle');
@@ -268,16 +270,7 @@ module.exports = {
268
270
  * array, saving allocations and maintaining reference equality for
269
271
  * PureComponent checks.
270
272
  */
271
- compose<T: DangerouslyImpreciseStyleProp>(
272
- style1: ?T,
273
- style2: ?T,
274
- ): ?T | $ReadOnlyArray<T> {
275
- if (style1 != null && style2 != null) {
276
- return ([style1, style2]: $ReadOnlyArray<T>);
277
- } else {
278
- return style1 != null ? style1 : style2;
279
- }
280
- },
273
+ compose: composeStyles,
281
274
 
282
275
  /**
283
276
  * Flattens an array of style objects, into one aggregated style object.
@@ -23,6 +23,8 @@ import type {
23
23
  ____ViewStyleProp_Internal,
24
24
  } from './StyleSheetTypes';
25
25
 
26
+ import composeStyles from '../../src/private/core/composeStyles';
27
+
26
28
  const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes');
27
29
  const PixelRatio = require('../Utilities/PixelRatio').default;
28
30
  const Platform = require('../Utilities/Platform'); // [Win32]
@@ -270,16 +272,7 @@ module.exports = {
270
272
  * array, saving allocations and maintaining reference equality for
271
273
  * PureComponent checks.
272
274
  */
273
- compose<T: DangerouslyImpreciseStyleProp>(
274
- style1: ?T,
275
- style2: ?T,
276
- ): ?T | $ReadOnlyArray<T> {
277
- if (style1 != null && style2 != null) {
278
- return ([style1, style2]: $ReadOnlyArray<T>);
279
- } else {
280
- return style1 != null ? style1 : style2;
281
- }
282
- },
275
+ compose: composeStyles,
283
276
 
284
277
  /**
285
278
  * Flattens an array of style objects, into one aggregated style object.
@@ -237,10 +237,10 @@ export interface ViewStyle extends FlexStyle, ShadowStyleIOS, TransformsStyle {
237
237
  borderBlockEndColor?: ColorValue | undefined;
238
238
  borderBlockStartColor?: ColorValue | undefined;
239
239
  borderBottomColor?: ColorValue | undefined;
240
- borderBottomEndRadius?: AnimatableNumericValue | undefined;
241
- borderBottomLeftRadius?: AnimatableNumericValue | undefined;
242
- borderBottomRightRadius?: AnimatableNumericValue | undefined;
243
- borderBottomStartRadius?: AnimatableNumericValue | undefined;
240
+ borderBottomEndRadius?: AnimatableNumericValue | string | undefined;
241
+ borderBottomLeftRadius?: AnimatableNumericValue | string | undefined;
242
+ borderBottomRightRadius?: AnimatableNumericValue | string | undefined;
243
+ borderBottomStartRadius?: AnimatableNumericValue | string | undefined;
244
244
  borderColor?: ColorValue | undefined;
245
245
  /**
246
246
  * On iOS 13+, it is possible to change the corner curve of borders.
@@ -248,20 +248,20 @@ export interface ViewStyle extends FlexStyle, ShadowStyleIOS, TransformsStyle {
248
248
  */
249
249
  borderCurve?: 'circular' | 'continuous' | undefined;
250
250
  borderEndColor?: ColorValue | undefined;
251
- borderEndEndRadius?: AnimatableNumericValue | undefined;
252
- borderEndStartRadius?: AnimatableNumericValue | undefined;
251
+ borderEndEndRadius?: AnimatableNumericValue | string | undefined;
252
+ borderEndStartRadius?: AnimatableNumericValue | string | undefined;
253
253
  borderLeftColor?: ColorValue | undefined;
254
- borderRadius?: AnimatableNumericValue | undefined;
254
+ borderRadius?: AnimatableNumericValue | string | undefined;
255
255
  borderRightColor?: ColorValue | undefined;
256
256
  borderStartColor?: ColorValue | undefined;
257
- borderStartEndRadius?: AnimatableNumericValue | undefined;
258
- borderStartStartRadius?: AnimatableNumericValue | undefined;
257
+ borderStartEndRadius?: AnimatableNumericValue | string | undefined;
258
+ borderStartStartRadius?: AnimatableNumericValue | string | undefined;
259
259
  borderStyle?: 'solid' | 'dotted' | 'dashed' | undefined;
260
260
  borderTopColor?: ColorValue | undefined;
261
- borderTopEndRadius?: AnimatableNumericValue | undefined;
262
- borderTopLeftRadius?: AnimatableNumericValue | undefined;
263
- borderTopRightRadius?: AnimatableNumericValue | undefined;
264
- borderTopStartRadius?: AnimatableNumericValue | undefined;
261
+ borderTopEndRadius?: AnimatableNumericValue | string | undefined;
262
+ borderTopLeftRadius?: AnimatableNumericValue | string | undefined;
263
+ borderTopRightRadius?: AnimatableNumericValue | string | undefined;
264
+ borderTopStartRadius?: AnimatableNumericValue | string | undefined;
265
265
  opacity?: AnimatableNumericValue | undefined;
266
266
  /**
267
267
  * Sets the elevation of a view, using Android's underlying
@@ -394,13 +394,13 @@ export interface TextStyle extends TextStyleIOS, TextStyleAndroid, ViewStyle {
394
394
  export interface ImageStyle extends FlexStyle, ShadowStyleIOS, TransformsStyle {
395
395
  resizeMode?: ImageResizeMode | undefined;
396
396
  backfaceVisibility?: 'visible' | 'hidden' | undefined;
397
- borderBottomLeftRadius?: AnimatableNumericValue | undefined;
398
- borderBottomRightRadius?: AnimatableNumericValue | undefined;
397
+ borderBottomLeftRadius?: AnimatableNumericValue | string | undefined;
398
+ borderBottomRightRadius?: AnimatableNumericValue | string | undefined;
399
399
  backgroundColor?: ColorValue | undefined;
400
400
  borderColor?: ColorValue | undefined;
401
- borderRadius?: AnimatableNumericValue | undefined;
402
- borderTopLeftRadius?: AnimatableNumericValue | undefined;
403
- borderTopRightRadius?: AnimatableNumericValue | undefined;
401
+ borderRadius?: AnimatableNumericValue | string | undefined;
402
+ borderTopLeftRadius?: AnimatableNumericValue | string | undefined;
403
+ borderTopRightRadius?: AnimatableNumericValue | string | undefined;
404
404
  overflow?: 'visible' | 'hidden' | undefined;
405
405
  overlayColor?: ColorValue | undefined;
406
406
  tintColor?: ColorValue | undefined;
@@ -707,19 +707,19 @@ export type ____ViewStyle_InternalCore = $ReadOnly<{
707
707
  borderBlockColor?: ____ColorValue_Internal,
708
708
  borderBlockEndColor?: ____ColorValue_Internal,
709
709
  borderBlockStartColor?: ____ColorValue_Internal,
710
- borderRadius?: AnimatableNumericValue,
711
- borderBottomEndRadius?: AnimatableNumericValue,
712
- borderBottomLeftRadius?: AnimatableNumericValue,
713
- borderBottomRightRadius?: AnimatableNumericValue,
714
- borderBottomStartRadius?: AnimatableNumericValue,
715
- borderEndEndRadius?: AnimatableNumericValue,
716
- borderEndStartRadius?: AnimatableNumericValue,
717
- borderStartEndRadius?: AnimatableNumericValue,
718
- borderStartStartRadius?: AnimatableNumericValue,
719
- borderTopEndRadius?: AnimatableNumericValue,
720
- borderTopLeftRadius?: AnimatableNumericValue,
721
- borderTopRightRadius?: AnimatableNumericValue,
722
- borderTopStartRadius?: AnimatableNumericValue,
710
+ borderRadius?: AnimatableNumericValue | string,
711
+ borderBottomEndRadius?: AnimatableNumericValue | string,
712
+ borderBottomLeftRadius?: AnimatableNumericValue | string,
713
+ borderBottomRightRadius?: AnimatableNumericValue | string,
714
+ borderBottomStartRadius?: AnimatableNumericValue | string,
715
+ borderEndEndRadius?: AnimatableNumericValue | string,
716
+ borderEndStartRadius?: AnimatableNumericValue | string,
717
+ borderStartEndRadius?: AnimatableNumericValue | string,
718
+ borderStartStartRadius?: AnimatableNumericValue | string,
719
+ borderTopEndRadius?: AnimatableNumericValue | string,
720
+ borderTopLeftRadius?: AnimatableNumericValue | string,
721
+ borderTopRightRadius?: AnimatableNumericValue | string,
722
+ borderTopStartRadius?: AnimatableNumericValue | string,
723
723
  borderStyle?: 'solid' | 'dotted' | 'dashed',
724
724
  borderWidth?: AnimatableNumericValue,
725
725
  borderBottomWidth?: AnimatableNumericValue,
@@ -34,6 +34,7 @@ function flattenStyle<TStyleProp: DangerouslyImpreciseStyleProp>(
34
34
  // $FlowFixMe[invalid-in-rhs]
35
35
  for (const key in computedStyle) {
36
36
  // $FlowFixMe[incompatible-use]
37
+ // $FlowFixMe[invalid-computed-prop]
37
38
  result[key] = computedStyle[key];
38
39
  }
39
40
  }
@@ -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 += 'Bridgeless mode: ' + (isBridgeless() ? 'true' : 'false') + '. ';
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
  }
@@ -38,6 +38,7 @@ const RCTLog = {
38
38
 
39
39
  // Log to console regardless of nativeLoggingHook
40
40
  logToConsole(level: string, ...args: Array<mixed>): void {
41
+ // $FlowFixMe[invalid-computed-prop]
41
42
  const logFn = levelsMap[level];
42
43
  invariant(
43
44
  logFn,
@@ -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 Object.keys(viewConfig[propName])
112
- .filter(prop => !PlatformBaseViewConfig[propName][prop])
113
- .reduce<{[string]: any}>((obj, prop) => {
114
- obj[prop] = viewConfig[propName][prop];
115
- return obj;
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/overrides.json CHANGED
@@ -7,13 +7,13 @@
7
7
  "**/__snapshots__/**",
8
8
  "src-win/rntypes/**"
9
9
  ],
10
- "baseVersion": "0.75.0-nightly-20240420-03a51da72",
10
+ "baseVersion": "0.75.0-nightly-20240502-88de74b2d",
11
11
  "overrides": [
12
12
  {
13
13
  "type": "derived",
14
14
  "file": ".flowconfig",
15
15
  "baseFile": ".flowconfig",
16
- "baseHash": "4f8e1f39d8ed29d7d0e21455cac407d352a6824d"
16
+ "baseHash": "7fb09c6da9376ca799b198fecab3baa0ff1378f8"
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": "96eb39e775435801b031cd1a41265ed73705cd72",
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": "b1ef5981a6abbb0548fc5fd835ad711c10712d61"
119
+ "baseHash": "8bb1dc7825f1994010d4d0ab2d8ed3fbc3d34e5d"
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": "0aabb0825ab9d65cb39f526ad3ac10874d6cde7e"
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": "d621a2fb669bbc2fc0657db1233c9a930a073fba"
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": "59baf00fff15e8fefbc0bce732af1c247d4695be"
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": "6eecfbf0d3028d1838463a66b3acbda6f9a2c651",
207
+ "baseHash": "50bd550ba0710173ca3533b7b103075ecdda6b56",
208
208
  "issue": 6240
209
209
  },
210
210
  {
@@ -337,7 +337,7 @@
337
337
  "type": "derived",
338
338
  "file": "src-win/Libraries/NativeComponent/BaseViewConfig.win32.js",
339
339
  "baseFile": "packages/react-native/Libraries/NativeComponent/BaseViewConfig.ios.js",
340
- "baseHash": "ae7bdcfff1117d4a349b7b9bcc108a22ae7099ae"
340
+ "baseHash": "2a5e0ee3fed39205087dc49e2a7b180b6438f589"
341
341
  },
342
342
  {
343
343
  "type": "copy",
@@ -420,7 +420,7 @@
420
420
  "type": "patch",
421
421
  "file": "src-win/Libraries/StyleSheet/StyleSheet.win32.js",
422
422
  "baseFile": "packages/react-native/Libraries/StyleSheet/StyleSheet.js",
423
- "baseHash": "7c42da708bc5cf4e3135ae81a45dddae48e0bfec"
423
+ "baseHash": "5c01bd55040fb9d31534bd27b98fe9c3671994c0"
424
424
  },
425
425
  {
426
426
  "type": "derived",
@@ -471,7 +471,7 @@
471
471
  "type": "derived",
472
472
  "file": "src-win/Libraries/Utilities/Dimensions.win32.js",
473
473
  "baseFile": "packages/react-native/Libraries/Utilities/Dimensions.js",
474
- "baseHash": "e2c1d4379abf083b11f3e853d160068ad6b55ba0"
474
+ "baseHash": "bac146d616013f6da06bba9f6c0f52633e4a0737"
475
475
  },
476
476
  {
477
477
  "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.247",
3
+ "version": "0.0.0-canary.248",
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-20240420-03a51da72",
34
- "@react-native/codegen": "0.75.0-nightly-20240420-03a51da72",
35
- "@react-native/community-cli-plugin": "0.75.0-nightly-20240420-03a51da72",
36
- "@react-native/gradle-plugin": "0.75.0-nightly-20240420-03a51da72",
37
- "@react-native/js-polyfills": "0.75.0-nightly-20240420-03a51da72",
38
- "@react-native/normalize-colors": "0.75.0-nightly-20240420-03a51da72",
39
- "@react-native/virtualized-lists": "0.75.0-nightly-20240420-03a51da72",
33
+ "@react-native/assets-registry": "0.75.0-nightly-20240502-88de74b2d",
34
+ "@react-native/codegen": "0.75.0-nightly-20240502-88de74b2d",
35
+ "@react-native/community-cli-plugin": "0.75.0-nightly-20240502-88de74b2d",
36
+ "@react-native/gradle-plugin": "0.75.0-nightly-20240502-88de74b2d",
37
+ "@react-native/js-polyfills": "0.75.0-nightly-20240502-88de74b2d",
38
+ "@react-native/normalize-colors": "0.75.0-nightly-20240502-88de74b2d",
39
+ "@react-native/virtualized-lists": "0.75.0-nightly-20240502-88de74b2d",
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-20240420-03a51da72",
73
+ "@react-native/metro-config": "0.75.0-nightly-20240502-88de74b2d",
74
74
  "@rnw-scripts/babel-react-native-config": "0.0.0",
75
- "@rnw-scripts/eslint-config": "1.2.17",
76
- "@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.21",
77
- "@rnw-scripts/just-task": "2.3.33",
75
+ "@rnw-scripts/eslint-config": "1.2.18",
76
+ "@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.22",
77
+ "@rnw-scripts/just-task": "2.3.34",
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",
@@ -86,14 +86,14 @@
86
86
  "just-scripts": "^1.3.3",
87
87
  "prettier": "2.8.8",
88
88
  "react": "18.2.0",
89
- "react-native": "0.75.0-nightly-20240420-03a51da72",
90
- "react-native-platform-override": "^1.9.34",
89
+ "react-native": "0.75.0-nightly-20240502-88de74b2d",
90
+ "react-native-platform-override": "^1.9.35",
91
91
  "typescript": "5.0.4"
92
92
  },
93
93
  "peerDependencies": {
94
94
  "@types/react": "^18.2.6",
95
95
  "react": "18.2.0",
96
- "react-native": "0.75.0-nightly-20240420-03a51da72"
96
+ "react-native": "0.75.0-nightly-20240502-88de74b2d"
97
97
  },
98
98
  "beachball": {
99
99
  "defaultNpmTag": "canary",
@@ -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<<0e0858557eb27f3eebfecae18ee13c0b>>
7
+ * @generated SignedSource<<aff7e65ca1f679a79456b2b622dc070f>>
8
8
  * @flow strict-local
9
9
  */
10
10
 
@@ -41,18 +41,21 @@ 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
- enableCustomDrawOrderFabric: Getter<boolean>,
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>,
54
+ fixMountedFlagAndFixPreallocationClone: Getter<boolean>,
53
55
  forceBatchingMountItemsOnAndroid: Getter<boolean>,
54
56
  inspectorEnableCxxInspectorPackagerConnection: Getter<boolean>,
55
57
  inspectorEnableModernCDPRegistry: Getter<boolean>,
58
+ lazyAnimationCallbacks: Getter<boolean>,
56
59
  preventDoubleTextMeasure: Getter<boolean>,
57
60
  useModernRuntimeScheduler: Getter<boolean>,
58
61
  useNativeViewConfigsInBridgelessMode: Getter<boolean>,
@@ -103,10 +106,22 @@ export const shouldUseSetNativePropsInFabric: Getter<boolean> = createJavaScript
103
106
  * Common flag for testing. Do NOT modify.
104
107
  */
105
108
  export const commonTestFlag: Getter<boolean> = createNativeFlagGetter('commonTestFlag', false);
109
+ /**
110
+ * Enables the differentiator to understand the "collapsableChildren" prop
111
+ */
112
+ export const allowCollapsableChildren: Getter<boolean> = createNativeFlagGetter('allowCollapsableChildren', true);
113
+ /**
114
+ * To be used with batchRenderingUpdatesInEventLoop. When enbled, the Android mounting layer will concatenate pending transactions to ensure they're applied atomatically
115
+ */
116
+ export const androidEnablePendingFabricTransactions: Getter<boolean> = createNativeFlagGetter('androidEnablePendingFabricTransactions', false);
106
117
  /**
107
118
  * 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
119
  */
109
120
  export const batchRenderingUpdatesInEventLoop: Getter<boolean> = createNativeFlagGetter('batchRenderingUpdatesInEventLoop', false);
121
+ /**
122
+ * When enabled, ReactInstanceManager will clean up Fabric surfaces on destroy().
123
+ */
124
+ export const destroyFabricSurfacesInReactInstanceManager: Getter<boolean> = createNativeFlagGetter('destroyFabricSurfacesInReactInstanceManager', false);
110
125
  /**
111
126
  * 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
127
  */
@@ -116,21 +131,13 @@ export const enableBackgroundExecutor: Getter<boolean> = createNativeFlagGetter(
116
131
  */
117
132
  export const enableCleanTextInputYogaNode: Getter<boolean> = createNativeFlagGetter('enableCleanTextInputYogaNode', false);
118
133
  /**
119
- * When enabled, Fabric will use customDrawOrder in ReactViewGroup (similar to old architecture).
134
+ * When enabled, the renderer would only fail commits when they propagate state and the last commit that updated state changed before committing.
120
135
  */
121
- export const enableCustomDrawOrderFabric: Getter<boolean> = createNativeFlagGetter('enableCustomDrawOrderFabric', false);
136
+ export const enableGranularShadowTreeStateReconciliation: Getter<boolean> = createNativeFlagGetter('enableGranularShadowTreeStateReconciliation', false);
122
137
  /**
123
138
  * Enables the use of microtasks in Hermes (scheduling) and RuntimeScheduler (execution).
124
139
  */
125
140
  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
141
  /**
135
142
  * Dispatches state updates synchronously in Fabric (e.g.: updates the scroll position in the shadow tree synchronously from the main thread).
136
143
  */
@@ -139,6 +146,10 @@ export const enableSynchronousStateUpdates: Getter<boolean> = createNativeFlagGe
139
146
  * Ensures that JavaScript always has a consistent view of the state of the UI (e.g.: commits done in other threads are not immediately propagated to JS during its execution).
140
147
  */
141
148
  export const enableUIConsistency: Getter<boolean> = createNativeFlagGetter('enableUIConsistency', false);
149
+ /**
150
+ * Splits hasBeenMounted and promoted.
151
+ */
152
+ export const fixMountedFlagAndFixPreallocationClone: Getter<boolean> = createNativeFlagGetter('fixMountedFlagAndFixPreallocationClone', false);
142
153
  /**
143
154
  * Forces the mounting layer on Android to always batch mount items instead of dispatching them immediately. This might fix some crashes related to synchronous state updates, where some views dispatch state updates during mount.
144
155
  */
@@ -151,6 +162,10 @@ export const inspectorEnableCxxInspectorPackagerConnection: Getter<boolean> = cr
151
162
  * Flag determining if the modern CDP backend should be enabled. This flag is global and should not be changed across React Host lifetimes.
152
163
  */
153
164
  export const inspectorEnableModernCDPRegistry: Getter<boolean> = createNativeFlagGetter('inspectorEnableModernCDPRegistry', false);
165
+ /**
166
+ * Only enqueue Choreographer calls if there is an ongoing animation, instead of enqueueing every frame.
167
+ */
168
+ export const lazyAnimationCallbacks: Getter<boolean> = createNativeFlagGetter('lazyAnimationCallbacks', false);
154
169
  /**
155
170
  * When enabled, ParagraphShadowNode will no longer call measure twice.
156
171
  */
@@ -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<<4ba909c3b360c6a4fc9c6ed5996b6a13>>
7
+ * @generated SignedSource<<22d2fc7d575d13cf21c782f5f5192580>>
8
8
  * @flow strict-local
9
9
  */
10
10
 
@@ -24,18 +24,21 @@ 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
- +enableCustomDrawOrderFabric?: () => boolean;
33
+ +enableGranularShadowTreeStateReconciliation?: () => boolean;
31
34
  +enableMicrotasks?: () => boolean;
32
- +enableMountHooksAndroid?: () => boolean;
33
- +enableSpannableBuildingUnification?: () => boolean;
34
35
  +enableSynchronousStateUpdates?: () => boolean;
35
36
  +enableUIConsistency?: () => boolean;
37
+ +fixMountedFlagAndFixPreallocationClone?: () => boolean;
36
38
  +forceBatchingMountItemsOnAndroid?: () => boolean;
37
39
  +inspectorEnableCxxInspectorPackagerConnection?: () => boolean;
38
40
  +inspectorEnableModernCDPRegistry?: () => boolean;
41
+ +lazyAnimationCallbacks?: () => boolean;
39
42
  +preventDoubleTextMeasure?: () => boolean;
40
43
  +useModernRuntimeScheduler?: () => boolean;
41
44
  +useNativeViewConfigsInBridgelessMode?: () => boolean;