@office-iss/react-native-win32 0.75.2 → 0.76.0-preview.2

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 (178) hide show
  1. package/.eslintrc.js +11 -0
  2. package/.flowconfig +5 -4
  3. package/CHANGELOG.json +191 -47
  4. package/CHANGELOG.md +63 -28
  5. package/Libraries/Alert/Alert.js +3 -0
  6. package/Libraries/Animated/AnimatedEvent.js +1 -1
  7. package/Libraries/Animated/AnimatedImplementation.js +7 -7
  8. package/Libraries/Animated/NativeAnimatedAllowlist.js +111 -0
  9. package/Libraries/Animated/animations/Animation.js +11 -1
  10. package/Libraries/Animated/animations/DecayAnimation.js +1 -1
  11. package/Libraries/Animated/animations/SpringAnimation.js +1 -1
  12. package/Libraries/Animated/animations/TimingAnimation.js +2 -1
  13. package/Libraries/Animated/components/AnimatedScrollView.js +3 -2
  14. package/Libraries/Animated/createAnimatedComponent.js +10 -9
  15. package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
  16. package/Libraries/Animated/nodes/AnimatedInterpolation.js +3 -2
  17. package/Libraries/Animated/nodes/AnimatedNode.js +42 -33
  18. package/Libraries/Animated/nodes/AnimatedObject.js +56 -50
  19. package/Libraries/Animated/nodes/AnimatedProps.js +77 -40
  20. package/Libraries/Animated/nodes/AnimatedStyle.js +103 -59
  21. package/Libraries/Animated/nodes/AnimatedTracking.js +1 -1
  22. package/Libraries/Animated/nodes/AnimatedTransform.js +102 -67
  23. package/Libraries/Animated/nodes/AnimatedValue.js +2 -1
  24. package/Libraries/Animated/nodes/AnimatedWithChildren.js +21 -22
  25. package/Libraries/Animated/useAnimatedProps.js +142 -7
  26. package/Libraries/BatchedBridge/NativeModules.js +2 -0
  27. package/Libraries/Blob/FileReader.js +1 -1
  28. package/Libraries/Blob/URL.js +2 -62
  29. package/Libraries/Blob/URLSearchParams.js +71 -0
  30. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -1
  31. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +17 -0
  32. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +1 -1
  33. package/Libraries/Components/ScrollView/ScrollView.js +131 -169
  34. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +3 -0
  35. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
  36. package/Libraries/Components/StatusBar/StatusBar.js +3 -1
  37. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +10 -0
  38. package/Libraries/Components/TextInput/TextInput.d.ts +32 -2
  39. package/Libraries/Components/TextInput/TextInput.js +230 -94
  40. package/Libraries/Components/TextInput/TextInput.win32.js +230 -100
  41. package/Libraries/Components/View/ReactNativeStyleAttributes.js +23 -1
  42. package/Libraries/Components/View/ReactNativeViewAttributes.js +2 -0
  43. package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +2 -0
  44. package/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
  45. package/Libraries/Components/View/ViewNativeComponent.js +0 -1
  46. package/Libraries/Components/View/ViewPropTypes.js +14 -0
  47. package/Libraries/Components/View/ViewPropTypes.win32.js +14 -0
  48. package/Libraries/Core/ExceptionsManager.js +2 -0
  49. package/Libraries/Core/InitializeCore.js +3 -1
  50. package/Libraries/Core/ReactFiberErrorDialog.js +3 -0
  51. package/Libraries/Core/ReactNativeVersion.js +4 -4
  52. package/Libraries/Core/ReactNativeVersionCheck.win32.js +1 -1
  53. package/Libraries/Core/setUpDeveloperTools.js +5 -1
  54. package/Libraries/Core/setUpErrorHandling.js +7 -1
  55. package/Libraries/Core/setUpGlobals.js +1 -0
  56. package/Libraries/Core/setUpReactRefresh.js +0 -4
  57. package/Libraries/Image/AssetSourceResolver.js +28 -1
  58. package/Libraries/Image/Image.android.js +9 -14
  59. package/Libraries/Image/Image.ios.js +11 -22
  60. package/Libraries/Image/Image.win32.js +11 -24
  61. package/Libraries/Image/ImageBackground.js +1 -8
  62. package/Libraries/Image/ImageUtils.js +9 -9
  63. package/Libraries/Image/ImageViewNativeComponent.js +1 -0
  64. package/Libraries/Inspector/Inspector.js +3 -2
  65. package/Libraries/Inspector/Inspector.win32.js +3 -2
  66. package/Libraries/Inspector/InspectorPanel.js +16 -10
  67. package/Libraries/Inspector/NetworkOverlay.js +1 -1
  68. package/Libraries/Interaction/TaskQueue.js +1 -0
  69. package/Libraries/Lists/FlatList.js +1 -1
  70. package/Libraries/Lists/SectionList.js +2 -2
  71. package/Libraries/Lists/SectionListModern.js +3 -3
  72. package/Libraries/LogBox/Data/LogBoxData.js +24 -3
  73. package/Libraries/LogBox/LogBoxNotificationContainer.js +3 -2
  74. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +9 -8
  75. package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +9 -29
  76. package/Libraries/Modal/Modal.js +0 -1
  77. package/Libraries/NativeComponent/BaseViewConfig.android.js +9 -1
  78. package/Libraries/NativeComponent/BaseViewConfig.ios.js +17 -1
  79. package/Libraries/NativeComponent/BaseViewConfig.win32.js +17 -1
  80. package/Libraries/NativeComponent/NativeComponentRegistry.js +22 -22
  81. package/Libraries/NativeComponent/StaticViewConfigValidator.js +0 -21
  82. package/Libraries/Network/XMLHttpRequest.js +4 -2
  83. package/Libraries/ReactNative/AppContainer-dev.js +1 -5
  84. package/Libraries/ReactNative/AppContainer-prod.js +1 -5
  85. package/Libraries/ReactNative/AppContainer.js +0 -1
  86. package/Libraries/ReactNative/AppRegistry.js +0 -6
  87. package/Libraries/ReactNative/BridgelessUIManager.js +1 -0
  88. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +1 -1
  89. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +5 -5
  90. package/Libraries/ReactNative/RendererImplementation.js +26 -4
  91. package/Libraries/ReactNative/getNativeComponentAttributes.js +12 -0
  92. package/Libraries/ReactNative/renderApplication.js +0 -2
  93. package/Libraries/Renderer/shims/ReactNativeTypes.js +11 -4
  94. package/Libraries/StyleSheet/StyleSheet.js +1 -1
  95. package/Libraries/StyleSheet/StyleSheet.win32.js +1 -1
  96. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +152 -2
  97. package/Libraries/StyleSheet/StyleSheetTypes.js +60 -5
  98. package/Libraries/StyleSheet/processBackgroundImage.js +384 -0
  99. package/Libraries/StyleSheet/processBoxShadow.js +209 -0
  100. package/Libraries/StyleSheet/processFilter.js +231 -42
  101. package/Libraries/Text/Text.js +394 -196
  102. package/Libraries/Text/Text.win32.js +442 -229
  103. package/Libraries/Text/TextNativeComponent.js +2 -1
  104. package/Libraries/Text/TextNativeComponent.win32.js +1 -1
  105. package/Libraries/TurboModule/TurboModuleRegistry.js +13 -50
  106. package/Libraries/Types/CodegenTypes.js +3 -1
  107. package/Libraries/Utilities/Appearance.js +108 -84
  108. package/Libraries/Utilities/DevLoadingView.js +2 -4
  109. package/Libraries/Utilities/HMRClient.js +8 -6
  110. package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
  111. package/Libraries/Utilities/createPerformanceLogger.js +0 -9
  112. package/Libraries/Utilities/stringifyViewConfig.js +22 -0
  113. package/Libraries/Utilities/useColorScheme.js +3 -3
  114. package/Libraries/WebSocket/WebSocket.js +1 -1
  115. package/Libraries/promiseRejectionTrackingOptions.js +1 -1
  116. package/Libraries/vendor/emitter/EventEmitter.js +6 -5
  117. package/flow/jest.js +2 -2
  118. package/index.js +3 -1
  119. package/index.win32.js +3 -1
  120. package/jest/mockComponent.js +4 -1
  121. package/jest/mockModal.js +1 -3
  122. package/jest/mockScrollView.js +1 -1
  123. package/jest/renderer.js +2 -2
  124. package/jest/setup.js +16 -13
  125. package/jest.config.js +1 -2
  126. package/overrides.json +22 -22
  127. package/package.json +32 -30
  128. package/src/private/animated/NativeAnimatedHelper.js +438 -0
  129. package/src/private/animated/NativeAnimatedHelper.win32.js +440 -0
  130. package/src/private/animated/NativeAnimatedValidation.js +64 -0
  131. package/src/private/components/HScrollViewNativeComponents.js +56 -0
  132. package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +29 -0
  133. package/src/private/components/VScrollViewNativeComponents.js +48 -0
  134. package/src/private/components/useSyncOnScroll.js +48 -0
  135. package/src/private/featureflags/ReactNativeFeatureFlags.js +166 -16
  136. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +29 -5
  137. package/src/private/fusebox/FuseboxSessionObserver.js +42 -0
  138. package/{Libraries/Core → src/private/renderer/errorhandling}/ErrorHandlers.js +14 -4
  139. package/src/private/setup/setUpDOM.js +28 -0
  140. package/src/private/setup/setUpIntersectionObserver.js +27 -0
  141. package/src/private/setup/setUpMutationObserver.js +26 -0
  142. package/src/private/setup/setUpPerformanceObserver.js +64 -0
  143. package/src/private/specs/modules/NativeAppearance.js +3 -3
  144. package/src/private/specs/modules/NativeLinkingManager.js +1 -1
  145. package/src/private/specs/modules/NativePlatformConstantsWin.js +7 -0
  146. package/src/private/specs/modules/NativeSampleTurboModule.js +14 -1
  147. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +6 -4
  148. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserver.js +5 -3
  149. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverEntry.js +3 -3
  150. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverManager.js +14 -17
  151. package/src/private/{specs/modules → webapis/intersectionobserver/specs}/NativeIntersectionObserver.js +2 -2
  152. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver/specs}/__mocks__/NativeIntersectionObserver.js +4 -4
  153. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserver.js +5 -3
  154. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserverManager.js +24 -15
  155. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationRecord.js +4 -6
  156. package/src/private/{specs/modules → webapis/mutationobserver/specs}/NativeMutationObserver.js +2 -2
  157. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver/specs}/__mocks__/NativeMutationObserver.js +5 -5
  158. package/src/private/webapis/performance/{EventCounts.js → EventTiming.js} +65 -3
  159. package/src/private/webapis/performance/LongTasks.js +39 -0
  160. package/src/private/webapis/performance/Performance.js +22 -9
  161. package/src/private/webapis/performance/PerformanceEntry.js +36 -18
  162. package/src/private/webapis/performance/PerformanceObserver.js +29 -43
  163. package/src/private/webapis/performance/RawPerformanceEntry.js +24 -1
  164. package/src/private/webapis/performance/UserTiming.js +17 -12
  165. package/src/private/webapis/performance/specs/NativePerformanceObserver.js +1 -1
  166. package/src-win/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
  167. package/types/experimental.d.ts +12 -98
  168. package/Libraries/Animated/NativeAnimatedHelper.js +0 -615
  169. package/Libraries/Animated/NativeAnimatedHelper.win32.js +0 -617
  170. package/Libraries/Core/setUpIntersectionObserver.js +0 -16
  171. package/Libraries/Core/setUpMutationObserver.js +0 -16
  172. package/Libraries/Core/setUpPerformanceObserver.js +0 -18
  173. package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +0 -13
  174. package/Libraries/MutationObserver/NativeMutationObserver.js +0 -13
  175. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +0 -135
  176. package/src/private/core/setUpDOM.js +0 -18
  177. package/src/private/webapis/performance/PerformanceEventTiming.js +0 -55
  178. /package/src/private/{core → styles}/composeStyles.js +0 -0
@@ -218,7 +218,6 @@ class Modal extends React.Component<Props, State> {
218
218
  }
219
219
 
220
220
  componentWillUnmount() {
221
- this.setState({isRendered: false});
222
221
  if (this._eventSubscription) {
223
222
  this._eventSubscription.remove();
224
223
  }
@@ -166,9 +166,17 @@ const validAttributesForNonEventProps = {
166
166
  backgroundColor: {process: require('../StyleSheet/processColor').default},
167
167
  transform: true,
168
168
  transformOrigin: true,
169
- experimental_filter: {
169
+ experimental_backgroundImage: {
170
+ process: require('../StyleSheet/processBackgroundImage').default,
171
+ },
172
+ boxShadow: {
173
+ process: require('../StyleSheet/processBoxShadow').default,
174
+ },
175
+ filter: {
170
176
  process: require('../StyleSheet/processFilter').default,
171
177
  },
178
+ experimental_mixBlendMode: true,
179
+ isolation: true,
172
180
  opacity: true,
173
181
  elevation: true,
174
182
  shadowColor: {process: require('../StyleSheet/processColor').default},
@@ -193,9 +193,12 @@ const validAttributesForNonEventProps = {
193
193
  accessibilityViewIsModal: true,
194
194
  accessibilityElementsHidden: true,
195
195
  accessibilityIgnoresInvertColors: true,
196
+ accessibilityShowsLargeContentViewer: true,
197
+ accessibilityLargeContentTitle: true,
196
198
  testID: true,
197
199
  backgroundColor: {process: require('../StyleSheet/processColor').default},
198
200
  backfaceVisibility: true,
201
+ cursor: true,
199
202
  opacity: true,
200
203
  shadowColor: {process: require('../StyleSheet/processColor').default},
201
204
  shadowOffset: {diff: require('../Utilities/differ/sizesDiffer')},
@@ -214,15 +217,22 @@ const validAttributesForNonEventProps = {
214
217
  role: true,
215
218
  borderRadius: true,
216
219
  borderColor: {process: require('../StyleSheet/processColor').default},
220
+ borderBlockColor: {process: require('../StyleSheet/processColor').default},
217
221
  borderCurve: true,
218
222
  borderWidth: true,
223
+ borderBlockWidth: true,
219
224
  borderStyle: true,
220
225
  hitSlop: {diff: require('../Utilities/differ/insetsDiffer')},
221
226
  collapsable: true,
222
227
  collapsableChildren: true,
223
- experimental_filter: {
228
+ filter: {
224
229
  process: require('../StyleSheet/processFilter').default,
225
230
  },
231
+ boxShadow: {
232
+ process: require('../StyleSheet/processBoxShadow').default,
233
+ },
234
+ experimental_mixBlendMode: true,
235
+ isolation: true,
226
236
 
227
237
  borderTopWidth: true,
228
238
  borderTopColor: {process: require('../StyleSheet/processColor').default},
@@ -233,9 +243,15 @@ const validAttributesForNonEventProps = {
233
243
  borderLeftWidth: true,
234
244
  borderLeftColor: {process: require('../StyleSheet/processColor').default},
235
245
  borderStartWidth: true,
246
+ borderBlockStartWidth: true,
236
247
  borderStartColor: {process: require('../StyleSheet/processColor').default},
248
+ borderBlockStartColor: {
249
+ process: require('../StyleSheet/processColor').default,
250
+ },
237
251
  borderEndWidth: true,
252
+ borderBlockEndWidth: true,
238
253
  borderEndColor: {process: require('../StyleSheet/processColor').default},
254
+ borderBlockEndColor: {process: require('../StyleSheet/processColor').default},
239
255
 
240
256
  borderTopLeftRadius: true,
241
257
  borderTopRightRadius: true,
@@ -193,9 +193,12 @@ const validAttributesForNonEventProps = {
193
193
  accessibilityViewIsModal: true,
194
194
  accessibilityElementsHidden: true,
195
195
  accessibilityIgnoresInvertColors: true,
196
+ accessibilityShowsLargeContentViewer: true,
197
+ accessibilityLargeContentTitle: true,
196
198
  testID: true,
197
199
  backgroundColor: {process: require('../StyleSheet/processColor').default},
198
200
  backfaceVisibility: true,
201
+ cursor: true,
199
202
  opacity: true,
200
203
  shadowColor: {process: require('../StyleSheet/processColor').default},
201
204
  shadowOffset: {diff: require('../Utilities/differ/sizesDiffer')},
@@ -214,15 +217,22 @@ const validAttributesForNonEventProps = {
214
217
  role: true,
215
218
  borderRadius: true,
216
219
  borderColor: {process: require('../StyleSheet/processColor').default},
220
+ borderBlockColor: {process: require('../StyleSheet/processColor').default},
217
221
  borderCurve: true,
218
222
  borderWidth: true,
223
+ borderBlockWidth: true,
219
224
  borderStyle: true,
220
225
  hitSlop: {diff: require('../Utilities/differ/insetsDiffer')},
221
226
  collapsable: true,
222
227
  collapsableChildren: true,
223
- experimental_filter: {
228
+ filter: {
224
229
  process: require('../StyleSheet/processFilter').default,
225
230
  },
231
+ boxShadow: {
232
+ process: require('../StyleSheet/processBoxShadow').default,
233
+ },
234
+ experimental_mixBlendMode: true,
235
+ isolation: true,
226
236
 
227
237
  borderTopWidth: true,
228
238
  borderTopColor: {process: require('../StyleSheet/processColor').default},
@@ -233,9 +243,15 @@ const validAttributesForNonEventProps = {
233
243
  borderLeftWidth: true,
234
244
  borderLeftColor: {process: require('../StyleSheet/processColor').default},
235
245
  borderStartWidth: true,
246
+ borderBlockStartWidth: true,
236
247
  borderStartColor: {process: require('../StyleSheet/processColor').default},
248
+ borderBlockStartColor: {
249
+ process: require('../StyleSheet/processColor').default,
250
+ },
237
251
  borderEndWidth: true,
252
+ borderBlockEndWidth: true,
238
253
  borderEndColor: {process: require('../StyleSheet/processColor').default},
254
+ borderBlockEndColor: {process: require('../StyleSheet/processColor').default},
239
255
 
240
256
  borderTopLeftRadius: true,
241
257
  borderTopRightRadius: true,
@@ -11,12 +11,12 @@
11
11
  import type {
12
12
  HostComponent,
13
13
  PartialViewConfig,
14
+ ViewConfig,
14
15
  } from '../Renderer/shims/ReactNativeTypes';
15
16
 
16
17
  import getNativeComponentAttributes from '../ReactNative/getNativeComponentAttributes';
17
18
  import UIManager from '../ReactNative/UIManager';
18
19
  import * as ReactNativeViewConfigRegistry from '../Renderer/shims/ReactNativeViewConfigRegistry';
19
- import verifyComponentAttributeEquivalence from '../Utilities/verifyComponentAttributeEquivalence';
20
20
  import * as StaticViewConfigValidator from './StaticViewConfigValidator';
21
21
  import {createViewConfig} from './ViewConfig';
22
22
  import invariant from 'invariant';
@@ -34,7 +34,6 @@ let getRuntimeConfig;
34
34
  export function setRuntimeConfigProvider(
35
35
  runtimeConfigProvider: (name: string) => ?{
36
36
  native: boolean,
37
- strict: boolean,
38
37
  verify: boolean,
39
38
  },
40
39
  ): void {
@@ -54,13 +53,12 @@ export function get<Config>(
54
53
  viewConfigProvider: () => PartialViewConfig,
55
54
  ): HostComponent<Config> {
56
55
  ReactNativeViewConfigRegistry.register(name, () => {
57
- const {native, strict, verify} = getRuntimeConfig?.(name) ?? {
56
+ const {native, verify} = getRuntimeConfig?.(name) ?? {
58
57
  native: !global.RN$Bridgeless,
59
- strict: false,
60
58
  verify: false,
61
59
  };
62
60
 
63
- let viewConfig;
61
+ let viewConfig: ViewConfig;
64
62
  if (native) {
65
63
  viewConfig =
66
64
  getNativeComponentAttributes(name) ??
@@ -81,27 +79,29 @@ export function get<Config>(
81
79
  const nativeViewConfig = native
82
80
  ? viewConfig
83
81
  : getNativeComponentAttributes(name);
84
- const staticViewConfig = native
82
+
83
+ if (nativeViewConfig == null) {
84
+ // Defer to static view config if native view config is missing.
85
+ return viewConfig;
86
+ }
87
+
88
+ const staticViewConfig: ViewConfig = native
85
89
  ? createViewConfig(viewConfigProvider())
86
90
  : viewConfig;
87
91
 
88
- if (strict) {
89
- const validationOutput = StaticViewConfigValidator.validate(
90
- name,
91
- nativeViewConfig,
92
- staticViewConfig,
92
+ const validationOutput = StaticViewConfigValidator.validate(
93
+ name,
94
+ nativeViewConfig,
95
+ staticViewConfig,
96
+ );
97
+
98
+ if (validationOutput.type === 'invalid') {
99
+ console.error(
100
+ StaticViewConfigValidator.stringifyValidationResult(
101
+ name,
102
+ validationOutput,
103
+ ),
93
104
  );
94
-
95
- if (validationOutput.type === 'invalid') {
96
- console.error(
97
- StaticViewConfigValidator.stringifyValidationResult(
98
- name,
99
- validationOutput,
100
- ),
101
- );
102
- }
103
- } else {
104
- verifyComponentAttributeEquivalence(nativeViewConfig, staticViewConfig);
105
105
  }
106
106
  }
107
107
 
@@ -22,11 +22,6 @@ export type Difference =
22
22
  path: Array<string>,
23
23
  nativeValue: mixed,
24
24
  staticValue: mixed,
25
- }
26
- | {
27
- type: 'unexpected',
28
- path: Array<string>,
29
- staticValue: mixed,
30
25
  };
31
26
 
32
27
  export type ValidationResult = ValidResult | InvalidResult;
@@ -90,8 +85,6 @@ export function stringifyValidationResult(
90
85
  return `- '${path.join('.')}' is missing.`;
91
86
  case 'unequal':
92
87
  return `- '${path.join('.')}' is the wrong value.`;
93
- case 'unexpected':
94
- return `- '${path.join('.')}' is present but not expected to be.`;
95
88
  }
96
89
  }),
97
90
  '',
@@ -145,20 +138,6 @@ function accumulateDifferences(
145
138
  });
146
139
  }
147
140
  }
148
-
149
- for (const staticKey in staticObject) {
150
- if (
151
- !nativeObject.hasOwnProperty(staticKey) &&
152
- // $FlowFixMe[invalid-computed-prop]
153
- !isIgnored(staticObject[staticKey])
154
- ) {
155
- differences.push({
156
- path: [...path, staticKey],
157
- type: 'unexpected',
158
- staticValue: staticObject[staticKey],
159
- });
160
- }
161
- }
162
141
  }
163
142
 
164
143
  function ifObject(value: mixed): ?{...} {
@@ -78,7 +78,9 @@ const REQUEST_EVENTS = [
78
78
 
79
79
  const XHR_EVENTS = REQUEST_EVENTS.concat('readystatechange');
80
80
 
81
- class XMLHttpRequestEventTarget extends (EventTarget(...REQUEST_EVENTS): any) {
81
+ class XMLHttpRequestEventTarget extends (EventTarget(
82
+ ...REQUEST_EVENTS,
83
+ ): typeof EventTarget) {
82
84
  onload: ?Function;
83
85
  onloadstart: ?Function;
84
86
  onprogress: ?Function;
@@ -91,7 +93,7 @@ class XMLHttpRequestEventTarget extends (EventTarget(...REQUEST_EVENTS): any) {
91
93
  /**
92
94
  * Shared base for platform-specific XMLHttpRequest implementations.
93
95
  */
94
- class XMLHttpRequest extends (EventTarget(...XHR_EVENTS): any) {
96
+ class XMLHttpRequest extends (EventTarget(...XHR_EVENTS): typeof EventTarget) {
95
97
  static UNSENT: number = UNSENT;
96
98
  static OPENED: number = OPENED;
97
99
  static HEADERS_RECEIVED: number = HEADERS_RECEIVED;
@@ -90,7 +90,6 @@ const AppContainer = ({
90
90
  internal_excludeInspector = false,
91
91
  internal_excludeLogBox = false,
92
92
  rootTag,
93
- showArchitectureIndicator,
94
93
  WrapperComponent,
95
94
  rootViewStyle,
96
95
  }: Props): React.Node => {
@@ -150,10 +149,7 @@ const AppContainer = ({
150
149
 
151
150
  if (WrapperComponent != null) {
152
151
  innerView = (
153
- <WrapperComponent
154
- initialProps={initialProps}
155
- fabric={fabric === true}
156
- showArchitectureIndicator={showArchitectureIndicator === true}>
152
+ <WrapperComponent initialProps={initialProps} fabric={fabric === true}>
157
153
  {innerView}
158
154
  </WrapperComponent>
159
155
  );
@@ -21,7 +21,6 @@ const AppContainer = ({
21
21
  fabric,
22
22
  initialProps,
23
23
  rootTag,
24
- showArchitectureIndicator,
25
24
  WrapperComponent,
26
25
  rootViewStyle,
27
26
  }: Props): React.Node => {
@@ -29,10 +28,7 @@ const AppContainer = ({
29
28
 
30
29
  if (WrapperComponent != null) {
31
30
  innerView = (
32
- <WrapperComponent
33
- initialProps={initialProps}
34
- fabric={fabric === true}
35
- showArchitectureIndicator={showArchitectureIndicator === true}>
31
+ <WrapperComponent initialProps={initialProps} fabric={fabric === true}>
36
32
  {innerView}
37
33
  </WrapperComponent>
38
34
  );
@@ -18,7 +18,6 @@ export type Props = $ReadOnly<{|
18
18
  fabric?: boolean,
19
19
  rootTag: number | RootTag,
20
20
  initialProps?: {...},
21
- showArchitectureIndicator?: boolean,
22
21
  WrapperComponent?: ?React.ComponentType<any>,
23
22
  rootViewStyle?: ?ViewStyleProp,
24
23
  internal_excludeLogBox?: boolean,
@@ -73,7 +73,6 @@ let componentProviderInstrumentationHook: ComponentProviderInstrumentationHook =
73
73
 
74
74
  let wrapperComponentProvider: ?WrapperComponentProvider;
75
75
  let rootViewStyleProvider: ?RootViewStyleProvider;
76
- let showArchitectureIndicator = false;
77
76
 
78
77
  /**
79
78
  * `AppRegistry` is the JavaScript entry point to running all React Native apps.
@@ -89,10 +88,6 @@ const AppRegistry = {
89
88
  rootViewStyleProvider = provider;
90
89
  },
91
90
 
92
- enableArchitectureIndicator(enabled: boolean): void {
93
- showArchitectureIndicator = enabled;
94
- },
95
-
96
91
  registerConfig(config: Array<AppConfig>): void {
97
92
  config.forEach(appConfig => {
98
93
  if (appConfig.run) {
@@ -139,7 +134,6 @@ const AppRegistry = {
139
134
  wrapperComponentProvider && wrapperComponentProvider(appParameters),
140
135
  rootViewStyleProvider && rootViewStyleProvider(appParameters),
141
136
  appParameters.fabric,
142
- showArchitectureIndicator,
143
137
  scopedPerformanceLogger,
144
138
  appKey === 'LogBox', // is logbox
145
139
  appKey,
@@ -382,6 +382,7 @@ const UIManagerJS: UIManagerJSInterface & {[string]: any} = {
382
382
  shadowNode,
383
383
  );
384
384
 
385
+ // eslint-disable-next-line no-bitwise
385
386
  let isAncestor = (result & DOCUMENT_POSITION_CONTAINED_BY) !== 0;
386
387
 
387
388
  callback([isAncestor]);
@@ -20,7 +20,7 @@ import type {
20
20
  import type {ElementRef} from 'react';
21
21
 
22
22
  import TextInputState from '../../Components/TextInput/TextInputState';
23
- import {getNodeFromInternalInstanceHandle} from '../../Renderer/shims/ReactFabric';
23
+ import {getNodeFromInternalInstanceHandle} from '../../ReactNative/RendererProxy';
24
24
  import {getFabricUIManager} from '../FabricUIManager';
25
25
  import {create} from './ReactNativeAttributePayload';
26
26
  import warnForStyleProps from './warnForStyleProps';
@@ -15,7 +15,7 @@
15
15
 
16
16
  import type ReactNativeElement from '../../../src/private/webapis/dom/nodes/ReactNativeElement';
17
17
  import type ReadOnlyText from '../../../src/private/webapis/dom/nodes/ReadOnlyText';
18
- import typeof ReactFabricType from '../../Renderer/shims/ReactFabric';
18
+ import typeof * as RendererProxyT from '../../ReactNative/RendererProxy';
19
19
  import type {
20
20
  InternalInstanceHandle,
21
21
  Node,
@@ -32,7 +32,7 @@ let PublicInstanceClass:
32
32
  let ReadOnlyTextClass: Class<ReadOnlyText>;
33
33
 
34
34
  // Lazy loaded to avoid evaluating the module when using the legacy renderer.
35
- let ReactFabric: ReactFabricType;
35
+ let RendererProxy: RendererProxyT;
36
36
 
37
37
  export function createPublicInstance(
38
38
  tag: number,
@@ -78,10 +78,10 @@ export function getNodeFromPublicInstance(
78
78
  return null;
79
79
  }
80
80
 
81
- if (ReactFabric == null) {
82
- ReactFabric = require('../../Renderer/shims/ReactFabric');
81
+ if (RendererProxy == null) {
82
+ RendererProxy = require('../../ReactNative/RendererProxy');
83
83
  }
84
- return ReactFabric.getNodeFromInternalInstanceHandle(
84
+ return RendererProxy.getNodeFromInternalInstanceHandle(
85
85
  publicInstance.__internalInstanceHandle,
86
86
  );
87
87
  }
@@ -8,15 +8,19 @@
8
8
  * @flow strict-local
9
9
  */
10
10
 
11
- import type {HostComponent} from '../Renderer/shims/ReactNativeTypes';
11
+ import type {
12
+ HostComponent,
13
+ InternalInstanceHandle,
14
+ Node,
15
+ } from '../Renderer/shims/ReactNativeTypes';
12
16
  import type ReactFabricHostComponent from './ReactFabricPublicInstance/ReactFabricHostComponent';
13
- import type {Element, ElementRef, ElementType} from 'react';
17
+ import type {ElementRef, ElementType} from 'react';
14
18
 
15
19
  import {
16
20
  onCaughtError,
17
21
  onRecoverableError,
18
22
  onUncaughtError,
19
- } from '../Core/ErrorHandlers';
23
+ } from '../../src/private/renderer/errorhandling/ErrorHandlers';
20
24
  import {type RootTag} from './RootTag';
21
25
  export function renderElement({
22
26
  element,
@@ -24,7 +28,7 @@ export function renderElement({
24
28
  useFabric,
25
29
  useConcurrentRoot,
26
30
  }: {
27
- element: Element<ElementType>,
31
+ element: React.MixedElement,
28
32
  rootTag: number,
29
33
  useFabric: boolean,
30
34
  useConcurrentRoot: boolean,
@@ -139,3 +143,21 @@ export function isChildPublicInstance(
139
143
  childInstance,
140
144
  );
141
145
  }
146
+
147
+ export function getNodeFromInternalInstanceHandle(
148
+ internalInstanceHandle: InternalInstanceHandle,
149
+ ): ?Node {
150
+ // This is only available in Fabric
151
+ return require('../Renderer/shims/ReactFabric').getNodeFromInternalInstanceHandle(
152
+ internalInstanceHandle,
153
+ );
154
+ }
155
+
156
+ export function getPublicInstanceFromInternalInstanceHandle(
157
+ internalInstanceHandle: InternalInstanceHandle,
158
+ ): mixed /*PublicInstance | PublicTextInstance | null*/ {
159
+ // This is only available in Fabric
160
+ return require('../Renderer/shims/ReactFabric').getPublicInstanceFromInternalInstanceHandle(
161
+ internalInstanceHandle,
162
+ );
163
+ }
@@ -10,8 +10,12 @@
10
10
 
11
11
  'use strict';
12
12
 
13
+ import processBoxShadow from '../StyleSheet/processBoxShadow';
14
+
13
15
  const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes');
14
16
  const resolveAssetSource = require('../Image/resolveAssetSource');
17
+ const processBackgroundImage =
18
+ require('../StyleSheet/processBackgroundImage').default;
15
19
  const processColor = require('../StyleSheet/processColor').default;
16
20
  const processColorArray = require('../StyleSheet/processColorArray');
17
21
  const processFilter = require('../StyleSheet/processFilter').default;
@@ -184,6 +188,10 @@ function getProcessorForType(typeName: string): ?(nextProp: any) => any {
184
188
  case 'UIImage':
185
189
  case 'RCTImageSource':
186
190
  return resolveAssetSource;
191
+ case 'BoxShadowArray':
192
+ return processBoxShadow;
193
+ case 'FilterArray':
194
+ return processFilter;
187
195
  // Android Types
188
196
  case 'Color':
189
197
  return processColor;
@@ -191,8 +199,12 @@ function getProcessorForType(typeName: string): ?(nextProp: any) => any {
191
199
  return processColorArray;
192
200
  case 'Filter':
193
201
  return processFilter;
202
+ case 'BackgroundImage':
203
+ return processBackgroundImage;
194
204
  case 'ImageSource':
195
205
  return resolveAssetSource;
206
+ case 'BoxShadow':
207
+ return processBoxShadow;
196
208
  }
197
209
  return null;
198
210
  }
@@ -35,7 +35,6 @@ export default function renderApplication<Props: Object>(
35
35
  WrapperComponent?: ?React.ComponentType<any>,
36
36
  rootViewStyle?: ?ViewStyleProp,
37
37
  fabric?: boolean,
38
- showArchitectureIndicator?: boolean,
39
38
  scopedPerformanceLogger?: IPerformanceLogger,
40
39
  isLogBox?: boolean,
41
40
  debugName?: string,
@@ -52,7 +51,6 @@ export default function renderApplication<Props: Object>(
52
51
  <AppContainer
53
52
  rootTag={rootTag}
54
53
  fabric={fabric}
55
- showArchitectureIndicator={showArchitectureIndicator}
56
54
  WrapperComponent={WrapperComponent}
57
55
  rootViewStyle={rootViewStyle}
58
56
  initialProps={initialProps ?? Object.freeze({})}
@@ -7,10 +7,15 @@
7
7
  * @noformat
8
8
  * @nolint
9
9
  * @flow strict
10
- * @generated SignedSource<<e7a1421518e1d99f18c5b14e85f44843>>
10
+ * @generated SignedSource<<89361333bb6b688486e35849a9c669a6>>
11
11
  */
12
12
 
13
- import type {ElementRef, ElementType, Element, AbstractComponent} from 'react';
13
+ import type {
14
+ ElementRef,
15
+ ElementType,
16
+ MixedElement,
17
+ AbstractComponent,
18
+ } from 'react';
14
19
 
15
20
  export type MeasureOnSuccessCallback = (
16
21
  x: number,
@@ -86,6 +91,7 @@ export type ViewConfig = $ReadOnly<{
86
91
  }>,
87
92
  ...
88
93
  }>,
94
+ supportsRawText?: boolean,
89
95
  uiViewClassName: string,
90
96
  validAttributes: AttributeConfiguration,
91
97
  }>;
@@ -93,6 +99,7 @@ export type ViewConfig = $ReadOnly<{
93
99
  export type PartialViewConfig = $ReadOnly<{
94
100
  bubblingEventTypes?: $PropertyType<ViewConfig, 'bubblingEventTypes'>,
95
101
  directEventTypes?: $PropertyType<ViewConfig, 'directEventTypes'>,
102
+ supportsRawText?: boolean,
96
103
  uiViewClassName: string,
97
104
  validAttributes?: PartialAttributeConfiguration,
98
105
  }>;
@@ -220,7 +227,7 @@ export type ReactNativeType = {
220
227
  eventType: string,
221
228
  ): void,
222
229
  render(
223
- element: Element<ElementType>,
230
+ element: MixedElement,
224
231
  containerTag: number,
225
232
  callback: ?() => void,
226
233
  options: ?RenderRootOptions,
@@ -255,7 +262,7 @@ export type ReactFabricType = {
255
262
  eventType: string,
256
263
  ): void,
257
264
  render(
258
- element: Element<ElementType>,
265
+ element: MixedElement,
259
266
  containerTag: number,
260
267
  callback: ?() => void,
261
268
  concurrentRoot: ?boolean,
@@ -23,7 +23,7 @@ import type {
23
23
  ____ViewStyleProp_Internal,
24
24
  } from './StyleSheetTypes';
25
25
 
26
- import composeStyles from '../../src/private/core/composeStyles';
26
+ import composeStyles from '../../src/private/styles/composeStyles';
27
27
 
28
28
  const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes');
29
29
  const PixelRatio = require('../Utilities/PixelRatio').default;
@@ -23,7 +23,7 @@ import type {
23
23
  ____ViewStyleProp_Internal,
24
24
  } from './StyleSheetTypes';
25
25
 
26
- import composeStyles from '../../src/private/core/composeStyles';
26
+ import composeStyles from '../../src/private/styles/composeStyles';
27
27
 
28
28
  const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes');
29
29
  const PixelRatio = require('../Utilities/PixelRatio').default;