@office-iss/react-native-win32 0.0.0-canary.246 → 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 (67) hide show
  1. package/.flowconfig +3 -2
  2. package/CHANGELOG.json +85 -1
  3. package/CHANGELOG.md +34 -9
  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/ErrorHandlers.js +116 -0
  23. package/Libraries/Core/ReactNativeVersion.js +1 -1
  24. package/Libraries/Core/setUpReactDevTools.js +70 -10
  25. package/Libraries/Debugging/DebuggingOverlayRegistry.js +1 -1
  26. package/Libraries/Image/ImageUtils.js +1 -0
  27. package/Libraries/Inspector/ElementBox.js +4 -0
  28. package/Libraries/NativeComponent/BaseViewConfig.android.js +2 -0
  29. package/Libraries/NativeComponent/BaseViewConfig.ios.js +2 -0
  30. package/Libraries/NativeComponent/BaseViewConfig.win32.js +2 -0
  31. package/Libraries/NativeComponent/NativeComponentRegistry.js +12 -5
  32. package/Libraries/NativeComponent/StaticViewConfigValidator.js +3 -0
  33. package/Libraries/Network/XMLHttpRequest.js +1 -0
  34. package/Libraries/ReactNative/AppRegistry.js +2 -4
  35. package/Libraries/ReactNative/BridgelessUIManager.js +1 -21
  36. package/Libraries/ReactNative/ReactFabricPublicInstance/warnForStyleProps.js +1 -0
  37. package/Libraries/ReactNative/RendererImplementation.js +20 -2
  38. package/Libraries/ReactNative/UIManager.d.ts +0 -21
  39. package/Libraries/ReactNative/UIManagerProperties.js +0 -3
  40. package/Libraries/ReactNative/getNativeComponentAttributes.js +3 -6
  41. package/Libraries/Renderer/shims/ReactNativeTypes.js +22 -1
  42. package/Libraries/StyleSheet/StyleSheet.js +3 -10
  43. package/Libraries/StyleSheet/StyleSheet.win32.js +3 -10
  44. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +21 -21
  45. package/Libraries/StyleSheet/StyleSheetTypes.js +16 -16
  46. package/Libraries/StyleSheet/flattenStyle.js +1 -0
  47. package/Libraries/TurboModule/TurboModuleRegistry.js +2 -1
  48. package/Libraries/Utilities/Dimensions.js +1 -0
  49. package/Libraries/Utilities/Dimensions.win32.js +1 -0
  50. package/Libraries/Utilities/RCTLog.js +1 -0
  51. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +11 -6
  52. package/overrides.json +11 -11
  53. package/package.json +16 -16
  54. package/src/private/core/composeStyles.js +27 -0
  55. package/src/private/featureflags/ReactNativeFeatureFlags.js +34 -14
  56. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +8 -4
  57. package/src/private/fusebox/setUpFuseboxReactDevToolsDispatcher.js +1 -1
  58. package/src/private/specs/modules/NativeUIManager.js +0 -7
  59. package/src/private/webapis/dom/geometry/DOMRectReadOnly.js +24 -24
  60. package/src/private/webapis/dom/nodes/ReactNativeElement.js +4 -4
  61. package/src/private/webapis/dom/oldstylecollections/DOMRectList.js +4 -4
  62. package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +4 -4
  63. package/src/private/webapis/dom/oldstylecollections/NodeList.js +5 -5
  64. package/src/private/webapis/performance/MemoryInfo.js +9 -9
  65. package/src/private/webapis/performance/PerformanceObserver.js +16 -16
  66. package/src/private/webapis/performance/ReactNativeStartupTiming.js +18 -18
  67. package/src-win/Libraries/Components/View/ViewPropTypes.d.ts +7 -0
package/.flowconfig CHANGED
@@ -55,7 +55,8 @@
55
55
  .*/node_modules/playground/.*
56
56
 
57
57
  ; Ignore templates for 'react-native init'
58
- <PROJECT_ROOT>/template/.*
58
+ <PROJECT_ROOT>/packages/react-native/template/.*
59
+ <PROJECT_ROOT>/packages/react-native/sdks/.*
59
60
 
60
61
  ; Ignore the Dangerfile
61
62
  <PROJECT_ROOT>/packages/react-native-bots/dangerfile.js
@@ -153,4 +154,4 @@ untyped-import
153
154
  untyped-type-import
154
155
 
155
156
  [version]
156
- ^0.233.0
157
+ ^0.235.1
package/CHANGELOG.json CHANGED
@@ -2,7 +2,91 @@
2
2
  "name": "@office-iss/react-native-win32",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 15 May 2024 05:12:44 GMT",
5
+ "date": "Thu, 23 May 2024 05:15:43 GMT",
6
+ "version": "0.0.0-canary.248",
7
+ "tag": "@office-iss/react-native-win32_v0.0.0-canary.248",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "1422161+marlenecota@users.noreply.github.com",
12
+ "package": "@office-iss/react-native-win32",
13
+ "commit": "3d221a9e154753fce6c1d22bdf6f2e17d6bc41b5",
14
+ "comment": "RN Integration 04/27"
15
+ },
16
+ {
17
+ "author": "1422161+marlenecota@users.noreply.github.com",
18
+ "package": "@office-iss/react-native-win32",
19
+ "commit": "9a5ddf602612fcbe088fafbaa80993d7b9f9aace",
20
+ "comment": "RN Integration 05/02"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@office-iss/react-native-win32",
25
+ "comment": "Bump @rnw-scripts/eslint-config to v1.2.18",
26
+ "commit": "not available"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@office-iss/react-native-win32",
31
+ "comment": "Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.22",
32
+ "commit": "not available"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@office-iss/react-native-win32",
37
+ "comment": "Bump @rnw-scripts/just-task to v2.3.34",
38
+ "commit": "not available"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@office-iss/react-native-win32",
43
+ "comment": "Bump react-native-platform-override to v1.9.35",
44
+ "commit": "not available"
45
+ }
46
+ ]
47
+ }
48
+ },
49
+ {
50
+ "date": "Wed, 22 May 2024 05:18:16 GMT",
51
+ "version": "0.0.0-canary.247",
52
+ "tag": "@office-iss/react-native-win32_v0.0.0-canary.247",
53
+ "comments": {
54
+ "prerelease": [
55
+ {
56
+ "author": "1422161+marlenecota@users.noreply.github.com",
57
+ "package": "@office-iss/react-native-win32",
58
+ "commit": "ef55e6fc47b9adc83afc6ddcae92d7461013512b",
59
+ "comment": "RN Integration 04/20"
60
+ },
61
+ {
62
+ "author": "beachball",
63
+ "package": "@office-iss/react-native-win32",
64
+ "comment": "Bump @rnw-scripts/eslint-config to v1.2.17",
65
+ "commit": "not available"
66
+ },
67
+ {
68
+ "author": "beachball",
69
+ "package": "@office-iss/react-native-win32",
70
+ "comment": "Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.21",
71
+ "commit": "not available"
72
+ },
73
+ {
74
+ "author": "beachball",
75
+ "package": "@office-iss/react-native-win32",
76
+ "comment": "Bump @rnw-scripts/just-task to v2.3.33",
77
+ "commit": "not available"
78
+ },
79
+ {
80
+ "author": "beachball",
81
+ "package": "@office-iss/react-native-win32",
82
+ "comment": "Bump react-native-platform-override to v1.9.34",
83
+ "commit": "not available"
84
+ }
85
+ ]
86
+ }
87
+ },
88
+ {
89
+ "date": "Wed, 15 May 2024 05:14:52 GMT",
6
90
  "version": "0.0.0-canary.246",
7
91
  "tag": "@office-iss/react-native-win32_v0.0.0-canary.246",
8
92
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,22 +1,47 @@
1
1
  # Change Log - @office-iss/react-native-win32
2
2
 
3
- This log was last generated on Wed, 15 May 2024 05:12:44 GMT and should not be manually modified.
3
+ This log was last generated on Thu, 23 May 2024 05:15:43 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## 0.0.0-canary.246
7
+ ## 0.0.0-canary.248
8
8
 
9
- Wed, 15 May 2024 05:12:44 GMT
9
+ Thu, 23 May 2024 05:15:43 GMT
10
10
 
11
11
  ### Changes
12
12
 
13
- - Remove unneeded scrollview.win32.js override (30809111+acoates-ms@users.noreply.github.com)
14
- - 0413 integration (email not defined)
15
- - Bump @rnw-scripts/eslint-config to v1.2.16
16
- - Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.20
17
- - Bump @rnw-scripts/just-task to v2.3.32
18
- - Bump react-native-platform-override to v1.9.33
13
+ - RN Integration 04/27 (1422161+marlenecota@users.noreply.github.com)
14
+ - RN Integration 05/02 (1422161+marlenecota@users.noreply.github.com)
15
+ - Bump @rnw-scripts/eslint-config to v1.2.18
16
+ - Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.22
17
+ - Bump @rnw-scripts/just-task to v2.3.34
18
+ - Bump react-native-platform-override to v1.9.35
19
19
 
20
+ ## 0.0.0-canary.247
21
+
22
+ Wed, 22 May 2024 05:18:16 GMT
23
+
24
+ ### Changes
25
+
26
+ - RN Integration 04/20 (1422161+marlenecota@users.noreply.github.com)
27
+ - Bump @rnw-scripts/eslint-config to v1.2.17
28
+ - Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.21
29
+ - Bump @rnw-scripts/just-task to v2.3.33
30
+ - Bump react-native-platform-override to v1.9.34
31
+
32
+ ## 0.0.0-canary.246
33
+
34
+ Wed, 15 May 2024 05:14:52 GMT
35
+
36
+ ### Changes
37
+
38
+ - Remove unneeded scrollview.win32.js override (30809111+acoates-ms@users.noreply.github.com)
39
+ - 0413 integration (email not defined)
40
+ - Bump @rnw-scripts/eslint-config to v1.2.16
41
+ - Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.20
42
+ - Bump @rnw-scripts/just-task to v2.3.32
43
+ - Bump react-native-platform-override to v1.9.33
44
+
20
45
  ## 0.0.0-canary.245
21
46
 
22
47
  Sat, 11 May 2024 05:18:28 GMT
@@ -455,18 +455,22 @@ function addWhitelistedInterpolationParam(param: string): void {
455
455
  }
456
456
 
457
457
  function isSupportedColorStyleProp(prop: string): boolean {
458
+ // $FlowFixMe[invalid-computed-prop]
458
459
  return SUPPORTED_COLOR_STYLES[prop] === true;
459
460
  }
460
461
 
461
462
  function isSupportedStyleProp(prop: string): boolean {
463
+ // $FlowFixMe[invalid-computed-prop]
462
464
  return SUPPORTED_STYLES[prop] === true;
463
465
  }
464
466
 
465
467
  function isSupportedTransformProp(prop: string): boolean {
468
+ // $FlowFixMe[invalid-computed-prop]
466
469
  return SUPPORTED_TRANSFORMS[prop] === true;
467
470
  }
468
471
 
469
472
  function isSupportedInterpolationParam(param: string): boolean {
473
+ // $FlowFixMe[invalid-computed-prop]
470
474
  return SUPPORTED_INTERPOLATION_PARAMS[param] === true;
471
475
  }
472
476
 
@@ -457,18 +457,22 @@ function addWhitelistedInterpolationParam(param: string): void {
457
457
  }
458
458
 
459
459
  function isSupportedColorStyleProp(prop: string): boolean {
460
+ // $FlowFixMe[invalid-computed-prop]
460
461
  return SUPPORTED_COLOR_STYLES[prop] === true;
461
462
  }
462
463
 
463
464
  function isSupportedStyleProp(prop: string): boolean {
465
+ // $FlowFixMe[invalid-computed-prop]
464
466
  return SUPPORTED_STYLES[prop] === true;
465
467
  }
466
468
 
467
469
  function isSupportedTransformProp(prop: string): boolean {
470
+ // $FlowFixMe[invalid-computed-prop]
468
471
  return SUPPORTED_TRANSFORMS[prop] === true;
469
472
  }
470
473
 
471
474
  function isSupportedInterpolationParam(param: string): boolean {
475
+ // $FlowFixMe[invalid-computed-prop]
472
476
  return SUPPORTED_INTERPOLATION_PARAMS[param] === true;
473
477
  }
474
478
 
@@ -8,10 +8,12 @@
8
8
  * @format
9
9
  */
10
10
 
11
+ import composeStyles from '../../src/private/core/composeStyles';
11
12
  import View from '../Components/View/View';
12
13
  import useMergeRefs from '../Utilities/useMergeRefs';
13
14
  import useAnimatedProps from './useAnimatedProps';
14
15
  import * as React from 'react';
16
+ import {useMemo} from 'react';
15
17
 
16
18
  // $FlowFixMe[deprecated-type]
17
19
  export type AnimatedProps<Props: {...}> = $ObjMap<
@@ -44,14 +46,18 @@ export default function createAnimatedComponent<TProps: {...}, TInstance>(
44
46
  // without these passthrough values.
45
47
  // $FlowFixMe[prop-missing]
46
48
  const {passthroughAnimatedPropExplicitValues, style} = reducedProps;
47
- const {style: passthroughStyle, ...passthroughProps} =
48
- passthroughAnimatedPropExplicitValues ?? {};
49
- const mergedStyle = {...style, ...passthroughStyle};
49
+ const passthroughStyle = passthroughAnimatedPropExplicitValues?.style;
50
+ const mergedStyle = useMemo(
51
+ () => composeStyles(style, passthroughStyle),
52
+ [passthroughStyle, style],
53
+ );
50
54
 
55
+ // NOTE: It is important that `passthroughAnimatedPropExplicitValues` is
56
+ // spread after `reducedProps` but before `style`.
51
57
  return (
52
58
  <Component
53
59
  {...reducedProps}
54
- {...passthroughProps}
60
+ {...passthroughAnimatedPropExplicitValues}
55
61
  style={mergedStyle}
56
62
  ref={ref}
57
63
  />
@@ -141,6 +141,7 @@ export default function useAnimatedProps<TProps: {...}, TInstance>(
141
141
  const events = [];
142
142
 
143
143
  for (const propName in props) {
144
+ // $FlowFixMe[invalid-computed-prop]
144
145
  const propValue = props[propName];
145
146
  if (propValue instanceof AnimatedEvent && propValue.__isNative) {
146
147
  propValue.__attach(target, propName);
@@ -424,6 +424,7 @@ class MessageQueue {
424
424
  A frequent cause of the error is that the application entry file path is incorrect. This can also happen when the JS bundle is corrupt or there is an early initialization error when loading React Native.`,
425
425
  );
426
426
  }
427
+ // $FlowFixMe[invalid-computed-prop]
427
428
  if (!moduleMethods[method]) {
428
429
  invariant(
429
430
  false,
@@ -23,6 +23,7 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {
23
23
  validAttributes: {
24
24
  decelerationRate: true,
25
25
  disableIntervalMomentum: true,
26
+ maintainVisibleContentPosition: true,
26
27
  endFillColor: {process: require('../../StyleSheet/processColor').default},
27
28
  fadingEdgeLength: true,
28
29
  nestedScrollEnabled: true,
@@ -31,6 +32,7 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {
31
32
  persistentScrollbar: true,
32
33
  horizontal: true,
33
34
  scrollEnabled: true,
35
+ scrollEventThrottle: true,
34
36
  scrollPerfTag: true,
35
37
  sendMomentumEvents: true,
36
38
  showsHorizontalScrollIndicator: true,
@@ -1764,6 +1764,13 @@ class ScrollView extends React.Component<Props, State> {
1764
1764
  const hasStickyHeaders =
1765
1765
  Array.isArray(stickyHeaderIndices) && stickyHeaderIndices.length > 0;
1766
1766
 
1767
+ // Some ScrollView native component behaviors rely on using the metrics
1768
+ // of mounted views for anchoring. Make sure not to flatten children if
1769
+ // this is the case.
1770
+ const preserveChildren =
1771
+ this.props.maintainVisibleContentPosition != null ||
1772
+ (Platform.OS === 'android' && this.props.snapToAlignment != null);
1773
+
1767
1774
  const contentContainer = (
1768
1775
  <NativeDirectionalScrollContentView
1769
1776
  {...contentSizeChangeProps}
@@ -1776,7 +1783,8 @@ class ScrollView extends React.Component<Props, State> {
1776
1783
  ? false
1777
1784
  : this.props.removeClippedSubviews
1778
1785
  }
1779
- collapsable={false}>
1786
+ collapsable={false}
1787
+ collapsableChildren={!preserveChildren}>
1780
1788
  {children}
1781
1789
  </NativeDirectionalScrollContentView>
1782
1790
  );
@@ -1401,6 +1401,12 @@ function InternalTextInput(props: Props): React.Node {
1401
1401
 
1402
1402
  const style = flattenStyle<TextStyleProp>(props.style);
1403
1403
 
1404
+ if (typeof style?.fontWeight === 'number') {
1405
+ // $FlowFixMe[prop-missing]
1406
+ // $FlowFixMe[cannot-write]
1407
+ style.fontWeight = style?.fontWeight.toString();
1408
+ }
1409
+
1404
1410
  if (Platform.OS === 'ios') {
1405
1411
  const RCTTextInputView =
1406
1412
  props.multiline === true
@@ -1514,6 +1514,12 @@ function InternalTextInput(props: Props): React.Node {
1514
1514
 
1515
1515
  const style = flattenStyle<TextStyleProp>(props.style);
1516
1516
 
1517
+ if (typeof style?.fontWeight === 'number') {
1518
+ // $FlowFixMe[prop-missing]
1519
+ // $FlowFixMe[cannot-write]
1520
+ style.fontWeight = style?.fontWeight.toString();
1521
+ }
1522
+
1517
1523
  if (Platform.OS === 'ios') {
1518
1524
  const RCTTextInputView =
1519
1525
  props.multiline === true
@@ -209,6 +209,7 @@ class TouchableBounce extends React.Component<Props, State> {
209
209
 
210
210
  componentWillUnmount(): void {
211
211
  this.state.pressability.reset();
212
+ this.state.scale.resetAnimation();
212
213
  }
213
214
  }
214
215
 
@@ -320,6 +320,7 @@ class TouchableOpacity extends React.Component<Props, State> {
320
320
 
321
321
  componentWillUnmount(): void {
322
322
  this.state.pressability.reset();
323
+ this.state.anim.resetAnimation();
323
324
  }
324
325
  }
325
326
 
@@ -33,6 +33,7 @@ const UIView = {
33
33
  onMagicTap: true,
34
34
  onAccessibilityEscape: true,
35
35
  collapsable: true,
36
+ collapsableChildren: true,
36
37
  needsOffscreenAlphaCompositing: true,
37
38
  style: ReactNativeStyleAttributes,
38
39
  role: true,
@@ -33,6 +33,7 @@ const UIView = {
33
33
  onMagicTap: true,
34
34
  onAccessibilityEscape: true,
35
35
  collapsable: true,
36
+ collapsableChildren: true,
36
37
  needsOffscreenAlphaCompositing: true,
37
38
  style: ReactNativeStyleAttributes,
38
39
  role: true,
@@ -10,7 +10,6 @@
10
10
 
11
11
  import type {ViewProps} from './ViewPropTypes';
12
12
 
13
- import flattenStyle from '../../StyleSheet/flattenStyle';
14
13
  import TextAncestor from '../../Text/TextAncestor';
15
14
  import ViewNativeComponent from './ViewNativeComponent';
16
15
  import * as React from 'react';
@@ -53,7 +52,6 @@ const View: React.AbstractComponent<
53
52
  id,
54
53
  importantForAccessibility,
55
54
  nativeID,
56
- pointerEvents,
57
55
  tabIndex,
58
56
  ...otherProps
59
57
  }: ViewProps,
@@ -96,12 +94,6 @@ const View: React.AbstractComponent<
96
94
  };
97
95
  }
98
96
 
99
- // $FlowFixMe[underconstrained-implicit-instantiation]
100
- let style = flattenStyle(otherProps.style);
101
-
102
- // $FlowFixMe[sketchy-null-mixed]
103
- const newPointerEvents = style?.pointerEvents || pointerEvents;
104
-
105
97
  const actualView = (
106
98
  <ViewNativeComponent
107
99
  {...otherProps}
@@ -120,9 +112,6 @@ const View: React.AbstractComponent<
120
112
  : importantForAccessibility
121
113
  }
122
114
  nativeID={id ?? nativeID}
123
- style={style}
124
- // $FlowFixMe[incompatible-type]
125
- pointerEvents={newPointerEvents}
126
115
  ref={forwardedRef}
127
116
  />
128
117
  );
@@ -10,7 +10,6 @@
10
10
 
11
11
  import type {ViewProps} from './ViewPropTypes';
12
12
 
13
- import flattenStyle from '../../StyleSheet/flattenStyle';
14
13
  import TextAncestor from '../../Text/TextAncestor';
15
14
  import ViewNativeComponent from './ViewNativeComponent';
16
15
  import * as React from 'react';
@@ -71,7 +70,6 @@ const View: React.AbstractComponent<
71
70
  id,
72
71
  importantForAccessibility,
73
72
  nativeID,
74
- pointerEvents,
75
73
  tabIndex,
76
74
  ...otherProps
77
75
  }: ViewProps,
@@ -118,12 +116,6 @@ const View: React.AbstractComponent<
118
116
  };
119
117
  }
120
118
 
121
- // $FlowFixMe[underconstrained-implicit-instantiation]
122
- let style = flattenStyle(otherProps.style);
123
-
124
- // $FlowFixMe[sketchy-null-mixed]
125
- const newPointerEvents = style?.pointerEvents || pointerEvents;
126
-
127
119
  const _keyDown = (event: KeyEvent) => {
128
120
  if (otherProps.keyDownEvents && event.isPropagationStopped() !== true) {
129
121
  // $FlowFixMe - keyDownEvents was already checked to not be undefined
@@ -253,9 +245,6 @@ const View: React.AbstractComponent<
253
245
  : importantForAccessibility
254
246
  }
255
247
  nativeID={id ?? nativeID}
256
- style={style}
257
- // $FlowFixMe[incompatible-type]
258
- pointerEvents={newPointerEvents}
259
248
  ref={forwardedRef}
260
249
  onKeyDown={_keyDown}
261
250
  onKeyDownCapture={_keyDownCapture}
@@ -88,6 +88,13 @@ export interface ViewPropsAndroid {
88
88
  */
89
89
  collapsable?: boolean | undefined;
90
90
 
91
+ /**
92
+ * Setting to false prevents direct children of the view from being removed
93
+ * from the native view hierarchy, similar to the effect of setting
94
+ * `collapsable={false}` on each child.
95
+ */
96
+ collapsableChildren?: boolean | undefined;
97
+
91
98
  /**
92
99
  * Whether this view should render itself (and all of its children) into a single hardware texture on the GPU.
93
100
  *
@@ -560,6 +560,13 @@ export type ViewProps = $ReadOnly<{|
560
560
  */
561
561
  collapsable?: ?boolean,
562
562
 
563
+ /**
564
+ * Setting to false prevents direct children of the view from being removed
565
+ * from the native view hierarchy, similar to the effect of setting
566
+ * `collapsable={false}` on each child.
567
+ */
568
+ collapsableChildren?: ?boolean,
569
+
563
570
  /**
564
571
  * Contols whether this view, and its transitive children, are laid in a way
565
572
  * consistent with web browsers ('strict'), or consistent with existing
@@ -621,6 +621,13 @@ export type ViewProps = $ReadOnly<{|
621
621
  */
622
622
  collapsable?: ?boolean,
623
623
 
624
+ /**
625
+ * Setting to false prevents direct children of the view from being removed
626
+ * from the native view hierarchy, similar to the effect of setting
627
+ * `collapsable={false}` on each child.
628
+ */
629
+ collapsableChildren?: ?boolean,
630
+
624
631
  /**
625
632
  * Contols whether this view, and its transitive children, are laid in a way
626
633
  * consistent with web browsers ('strict'), or consistent with existing
@@ -0,0 +1,116 @@
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 strict
9
+ */
10
+
11
+ 'use strict';
12
+
13
+ import type {ExtendedError} from './ExtendedError';
14
+
15
+ import {SyntheticError, handleException} from './ExceptionsManager';
16
+
17
+ type ErrorInfo = {
18
+ +componentStack?: ?string,
19
+ // $FlowFixMe[unclear-type] unknown props and state.
20
+ +errorBoundary?: ?React$Component<any, any>,
21
+ };
22
+
23
+ export function onUncaughtError(errorValue: mixed, errorInfo: ErrorInfo): void {
24
+ let error;
25
+
26
+ // Typically, `errorValue` should be an error. However, other values such as
27
+ // strings (or even null) are sometimes thrown.
28
+ if (errorValue instanceof Error) {
29
+ /* $FlowFixMe[class-object-subtyping] added when improving typing for
30
+ * this parameters */
31
+ error = (errorValue: ExtendedError);
32
+ } else if (typeof errorValue === 'string') {
33
+ /* $FlowFixMe[class-object-subtyping] added when improving typing for
34
+ * this parameters */
35
+ error = (new SyntheticError(errorValue): ExtendedError);
36
+ } else {
37
+ /* $FlowFixMe[class-object-subtyping] added when improving typing for
38
+ * this parameters */
39
+ error = (new SyntheticError('Unspecified error'): ExtendedError);
40
+ }
41
+ try {
42
+ // $FlowFixMe[incompatible-use] this is in try/catch.
43
+ error.componentStack = errorInfo.componentStack;
44
+ error.isComponentError = true;
45
+ } catch {
46
+ // Ignored.
47
+ }
48
+
49
+ // Uncaught errors are fatal.
50
+ handleException(error, true);
51
+ }
52
+
53
+ export function onCaughtError(errorValue: mixed, errorInfo: ErrorInfo): void {
54
+ let error;
55
+
56
+ // Typically, `errorValue` should be an error. However, other values such as
57
+ // strings (or even null) are sometimes thrown.
58
+ if (errorValue instanceof Error) {
59
+ /* $FlowFixMe[class-object-subtyping] added when improving typing for
60
+ * this parameters */
61
+ error = (errorValue: ExtendedError);
62
+ } else if (typeof errorValue === 'string') {
63
+ /* $FlowFixMe[class-object-subtyping] added when improving typing for
64
+ * this parameters */
65
+ error = (new SyntheticError(errorValue): ExtendedError);
66
+ } else {
67
+ /* $FlowFixMe[class-object-subtyping] added when improving typing for
68
+ * this parameters */
69
+ error = (new SyntheticError('Unspecified error'): ExtendedError);
70
+ }
71
+ try {
72
+ // $FlowFixMe[incompatible-use] this is in try/catch.
73
+ error.componentStack = errorInfo.componentStack;
74
+ error.isComponentError = true;
75
+ } catch {
76
+ // Ignored.
77
+ }
78
+
79
+ // Caught errors are not fatal.
80
+ handleException(error, false);
81
+ }
82
+
83
+ export function onRecoverableError(
84
+ errorValue: mixed,
85
+ errorInfo: ErrorInfo,
86
+ ): void {
87
+ let error;
88
+
89
+ // Typically, `errorValue` should be an error. However, other values such as
90
+ // strings (or even null) are sometimes thrown.
91
+ if (errorValue instanceof Error) {
92
+ /* $FlowFixMe[class-object-subtyping] added when improving typing for
93
+ * this parameters */
94
+ error = (errorValue: ExtendedError);
95
+ } else if (typeof errorValue === 'string') {
96
+ /* $FlowFixMe[class-object-subtyping] added when improving typing for
97
+ * this parameters */
98
+ error = (new SyntheticError(errorValue): ExtendedError);
99
+ } else {
100
+ /* $FlowFixMe[class-object-subtyping] added when improving typing for
101
+ * this parameters */
102
+ error = (new SyntheticError('Unspecified error'): ExtendedError);
103
+ }
104
+ try {
105
+ // $FlowFixMe[incompatible-use] this is in try/catch.
106
+ error.componentStack = errorInfo.componentStack;
107
+ error.isComponentError = true;
108
+ } catch {
109
+ // Ignored.
110
+ }
111
+
112
+ // Recoverable errors should only be warnings.
113
+ // This will make it a soft error in LogBox.
114
+ // TODO: improve the logging for recoverable errors in prod.
115
+ console.warn(error);
116
+ }
@@ -17,7 +17,7 @@ const version: $ReadOnly<{
17
17
  major: 0,
18
18
  minor: 75,
19
19
  patch: 0,
20
- prerelease: 'nightly-20240413-1b152f6ec',
20
+ prerelease: 'nightly-20240502-88de74b2d',
21
21
  };
22
22
 
23
23
  module.exports = {version};