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

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 (174) hide show
  1. package/.eslintrc.js +11 -0
  2. package/.flowconfig +5 -4
  3. package/CHANGELOG.json +164 -47
  4. package/CHANGELOG.md +53 -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/RefreshControl/__mocks__/RefreshControlMock.js +1 -1
  32. package/Libraries/Components/ScrollView/ScrollView.js +131 -169
  33. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
  34. package/Libraries/Components/StatusBar/StatusBar.js +3 -1
  35. package/Libraries/Components/TextInput/TextInput.d.ts +32 -2
  36. package/Libraries/Components/TextInput/TextInput.js +230 -94
  37. package/Libraries/Components/TextInput/TextInput.win32.js +230 -100
  38. package/Libraries/Components/View/ReactNativeStyleAttributes.js +22 -0
  39. package/Libraries/Components/View/ReactNativeViewAttributes.js +2 -0
  40. package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +2 -0
  41. package/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
  42. package/Libraries/Components/View/ViewNativeComponent.js +0 -1
  43. package/Libraries/Components/View/ViewPropTypes.js +14 -0
  44. package/Libraries/Components/View/ViewPropTypes.win32.js +14 -0
  45. package/Libraries/Core/ExceptionsManager.js +2 -0
  46. package/Libraries/Core/InitializeCore.js +3 -1
  47. package/Libraries/Core/ReactFiberErrorDialog.js +3 -0
  48. package/Libraries/Core/ReactNativeVersion.js +4 -4
  49. package/Libraries/Core/ReactNativeVersionCheck.win32.js +1 -1
  50. package/Libraries/Core/setUpErrorHandling.js +7 -1
  51. package/Libraries/Core/setUpGlobals.js +1 -0
  52. package/Libraries/Core/setUpReactRefresh.js +0 -4
  53. package/Libraries/Image/AssetSourceResolver.js +28 -1
  54. package/Libraries/Image/Image.android.js +9 -14
  55. package/Libraries/Image/Image.ios.js +11 -22
  56. package/Libraries/Image/Image.win32.js +11 -24
  57. package/Libraries/Image/ImageBackground.js +1 -8
  58. package/Libraries/Image/ImageUtils.js +9 -9
  59. package/Libraries/Image/ImageViewNativeComponent.js +1 -0
  60. package/Libraries/Inspector/Inspector.js +3 -2
  61. package/Libraries/Inspector/Inspector.win32.js +3 -2
  62. package/Libraries/Inspector/InspectorPanel.js +16 -10
  63. package/Libraries/Inspector/NetworkOverlay.js +1 -1
  64. package/Libraries/Interaction/TaskQueue.js +1 -0
  65. package/Libraries/Lists/FlatList.js +1 -1
  66. package/Libraries/Lists/SectionList.js +2 -2
  67. package/Libraries/Lists/SectionListModern.js +3 -3
  68. package/Libraries/LogBox/Data/LogBoxData.js +24 -3
  69. package/Libraries/LogBox/LogBoxNotificationContainer.js +3 -2
  70. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +9 -8
  71. package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +9 -29
  72. package/Libraries/Modal/Modal.js +0 -1
  73. package/Libraries/NativeComponent/BaseViewConfig.android.js +8 -0
  74. package/Libraries/NativeComponent/BaseViewConfig.ios.js +7 -0
  75. package/Libraries/NativeComponent/BaseViewConfig.win32.js +7 -0
  76. package/Libraries/NativeComponent/NativeComponentRegistry.js +22 -22
  77. package/Libraries/NativeComponent/StaticViewConfigValidator.js +0 -21
  78. package/Libraries/Network/XMLHttpRequest.js +4 -2
  79. package/Libraries/ReactNative/AppContainer-dev.js +1 -5
  80. package/Libraries/ReactNative/AppContainer-prod.js +1 -5
  81. package/Libraries/ReactNative/AppContainer.js +0 -1
  82. package/Libraries/ReactNative/AppRegistry.js +0 -6
  83. package/Libraries/ReactNative/BridgelessUIManager.js +1 -0
  84. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +1 -1
  85. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +5 -5
  86. package/Libraries/ReactNative/RendererImplementation.js +26 -4
  87. package/Libraries/ReactNative/getNativeComponentAttributes.js +8 -0
  88. package/Libraries/ReactNative/renderApplication.js +0 -2
  89. package/Libraries/Renderer/shims/ReactNativeTypes.js +11 -4
  90. package/Libraries/StyleSheet/StyleSheet.js +1 -1
  91. package/Libraries/StyleSheet/StyleSheet.win32.js +1 -1
  92. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +57 -0
  93. package/Libraries/StyleSheet/StyleSheetTypes.js +60 -5
  94. package/Libraries/StyleSheet/processBackgroundImage.js +384 -0
  95. package/Libraries/StyleSheet/processBoxShadow.js +211 -0
  96. package/Libraries/StyleSheet/processFilter.js +231 -42
  97. package/Libraries/Text/Text.js +394 -196
  98. package/Libraries/Text/Text.win32.js +442 -229
  99. package/Libraries/Text/TextNativeComponent.js +2 -1
  100. package/Libraries/Text/TextNativeComponent.win32.js +1 -1
  101. package/Libraries/TurboModule/TurboModuleRegistry.js +13 -50
  102. package/Libraries/Types/CodegenTypes.js +3 -1
  103. package/Libraries/Utilities/Appearance.js +108 -84
  104. package/Libraries/Utilities/DevLoadingView.js +2 -4
  105. package/Libraries/Utilities/HMRClient.js +2 -1
  106. package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
  107. package/Libraries/Utilities/createPerformanceLogger.js +0 -9
  108. package/Libraries/Utilities/stringifyViewConfig.js +22 -0
  109. package/Libraries/Utilities/useColorScheme.js +3 -3
  110. package/Libraries/WebSocket/WebSocket.js +1 -1
  111. package/Libraries/promiseRejectionTrackingOptions.js +1 -1
  112. package/Libraries/vendor/emitter/EventEmitter.js +6 -5
  113. package/flow/jest.js +2 -2
  114. package/index.js +3 -1
  115. package/index.win32.js +3 -1
  116. package/jest/mockComponent.js +4 -1
  117. package/jest/mockModal.js +1 -3
  118. package/jest/mockScrollView.js +1 -1
  119. package/jest/renderer.js +2 -2
  120. package/jest/setup.js +16 -13
  121. package/jest.config.js +1 -2
  122. package/overrides.json +22 -22
  123. package/package.json +30 -30
  124. package/src/private/animated/NativeAnimatedHelper.js +438 -0
  125. package/src/private/animated/NativeAnimatedHelper.win32.js +440 -0
  126. package/src/private/animated/NativeAnimatedValidation.js +64 -0
  127. package/src/private/components/HScrollViewNativeComponents.js +56 -0
  128. package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +27 -0
  129. package/src/private/components/VScrollViewNativeComponents.js +48 -0
  130. package/src/private/components/useSyncOnScroll.js +48 -0
  131. package/src/private/featureflags/ReactNativeFeatureFlags.js +166 -16
  132. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +29 -5
  133. package/src/private/fusebox/FuseboxSessionObserver.js +42 -0
  134. package/{Libraries/Core → src/private/renderer/errorhandling}/ErrorHandlers.js +14 -4
  135. package/src/private/setup/setUpDOM.js +28 -0
  136. package/src/private/setup/setUpIntersectionObserver.js +27 -0
  137. package/src/private/setup/setUpMutationObserver.js +26 -0
  138. package/src/private/setup/setUpPerformanceObserver.js +64 -0
  139. package/src/private/specs/modules/NativeAppearance.js +3 -3
  140. package/src/private/specs/modules/NativeLinkingManager.js +1 -1
  141. package/src/private/specs/modules/NativePlatformConstantsWin.js +7 -0
  142. package/src/private/specs/modules/NativeSampleTurboModule.js +14 -1
  143. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +6 -4
  144. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserver.js +5 -3
  145. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverEntry.js +3 -3
  146. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverManager.js +14 -17
  147. package/src/private/{specs/modules → webapis/intersectionobserver/specs}/NativeIntersectionObserver.js +2 -2
  148. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver/specs}/__mocks__/NativeIntersectionObserver.js +4 -4
  149. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserver.js +5 -3
  150. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserverManager.js +24 -15
  151. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationRecord.js +4 -6
  152. package/src/private/{specs/modules → webapis/mutationobserver/specs}/NativeMutationObserver.js +2 -2
  153. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver/specs}/__mocks__/NativeMutationObserver.js +5 -5
  154. package/src/private/webapis/performance/{EventCounts.js → EventTiming.js} +65 -3
  155. package/src/private/webapis/performance/LongTasks.js +39 -0
  156. package/src/private/webapis/performance/Performance.js +22 -9
  157. package/src/private/webapis/performance/PerformanceEntry.js +36 -18
  158. package/src/private/webapis/performance/PerformanceObserver.js +29 -43
  159. package/src/private/webapis/performance/RawPerformanceEntry.js +24 -1
  160. package/src/private/webapis/performance/UserTiming.js +17 -12
  161. package/src/private/webapis/performance/specs/NativePerformanceObserver.js +1 -1
  162. package/src-win/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
  163. package/types/experimental.d.ts +20 -1
  164. package/Libraries/Animated/NativeAnimatedHelper.js +0 -615
  165. package/Libraries/Animated/NativeAnimatedHelper.win32.js +0 -617
  166. package/Libraries/Core/setUpIntersectionObserver.js +0 -16
  167. package/Libraries/Core/setUpMutationObserver.js +0 -16
  168. package/Libraries/Core/setUpPerformanceObserver.js +0 -18
  169. package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +0 -13
  170. package/Libraries/MutationObserver/NativeMutationObserver.js +0 -13
  171. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +0 -135
  172. package/src/private/core/setUpDOM.js +0 -18
  173. package/src/private/webapis/performance/PerformanceEventTiming.js +0 -55
  174. /package/src/private/{core → styles}/composeStyles.js +0 -0
@@ -166,9 +166,17 @@ const validAttributesForNonEventProps = {
166
166
  backgroundColor: {process: require('../StyleSheet/processColor').default},
167
167
  transform: true,
168
168
  transformOrigin: true,
169
+ experimental_backgroundImage: {
170
+ process: require('../StyleSheet/processBackgroundImage').default,
171
+ },
172
+ experimental_boxShadow: {
173
+ process: require('../StyleSheet/processBoxShadow').default,
174
+ },
169
175
  experimental_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,6 +193,8 @@ 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,
@@ -223,6 +225,11 @@ const validAttributesForNonEventProps = {
223
225
  experimental_filter: {
224
226
  process: require('../StyleSheet/processFilter').default,
225
227
  },
228
+ experimental_boxShadow: {
229
+ process: require('../StyleSheet/processBoxShadow').default,
230
+ },
231
+ experimental_mixBlendMode: true,
232
+ isolation: true,
226
233
 
227
234
  borderTopWidth: true,
228
235
  borderTopColor: {process: require('../StyleSheet/processColor').default},
@@ -193,6 +193,8 @@ 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,
@@ -223,6 +225,11 @@ const validAttributesForNonEventProps = {
223
225
  experimental_filter: {
224
226
  process: require('../StyleSheet/processFilter').default,
225
227
  },
228
+ experimental_boxShadow: {
229
+ process: require('../StyleSheet/processBoxShadow').default,
230
+ },
231
+ experimental_mixBlendMode: true,
232
+ isolation: true,
226
233
 
227
234
  borderTopWidth: true,
228
235
  borderTopColor: {process: require('../StyleSheet/processColor').default},
@@ -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;
@@ -191,8 +195,12 @@ function getProcessorForType(typeName: string): ?(nextProp: any) => any {
191
195
  return processColorArray;
192
196
  case 'Filter':
193
197
  return processFilter;
198
+ case 'BackgroundImage':
199
+ return processBackgroundImage;
194
200
  case 'ImageSource':
195
201
  return resolveAssetSource;
202
+ case 'BoxShadow':
203
+ return processBoxShadow;
196
204
  }
197
205
  return null;
198
206
  }
@@ -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;
@@ -229,6 +229,62 @@ export interface TransformsStyle {
229
229
  translateY?: AnimatableNumericValue | undefined;
230
230
  }
231
231
 
232
+ export type FilterFunction =
233
+ | {brightness: number | string}
234
+ | {blur: number | string}
235
+ | {contrast: number | string}
236
+ | {grayscale: number | string}
237
+ | {hueRotate: number | string}
238
+ | {invert: number | string}
239
+ | {opacity: number | string}
240
+ | {saturate: number | string}
241
+ | {sepia: number | string}
242
+ | {dropShadow: DropShadowPrimitive | string};
243
+
244
+ export type DropShadowPrimitive = {
245
+ offsetX: number | string;
246
+ offsetY: number | string;
247
+ standardDeviation?: number | string | undefined;
248
+ color?: ColorValue | number | undefined;
249
+ };
250
+
251
+ export type BoxShadowPrimitive = {
252
+ offsetX: number | string;
253
+ offsetY: number | string;
254
+ color?: string | undefined;
255
+ blurRadius?: ColorValue | number | undefined;
256
+ spreadDistance?: number | string | undefined;
257
+ inset?: boolean | undefined;
258
+ };
259
+
260
+ export type BlendMode =
261
+ | 'normal'
262
+ | 'multiply'
263
+ | 'screen'
264
+ | 'overlay'
265
+ | 'darken'
266
+ | 'lighten'
267
+ | 'color-dodge'
268
+ | 'color-burn'
269
+ | 'hard-light'
270
+ | 'soft-light'
271
+ | 'difference'
272
+ | 'exclusion'
273
+ | 'hue'
274
+ | 'saturation'
275
+ | 'color'
276
+ | 'luminosity';
277
+
278
+ export type GradientValue = {
279
+ type: 'linearGradient';
280
+ // Angle or direction enums
281
+ direction?: string | undefined;
282
+ colorStops: ReadonlyArray<{
283
+ color: ColorValue;
284
+ positions?: ReadonlyArray<string[]> | undefined;
285
+ }>;
286
+ };
287
+
232
288
  /**
233
289
  * @see https://reactnative.dev/docs/view#style
234
290
  */
@@ -278,6 +334,7 @@ export interface ViewStyle extends FlexStyle, ShadowStyleIOS, TransformsStyle {
278
334
  * Controls whether the View can be the target of touch events.
279
335
  */
280
336
  pointerEvents?: 'box-none' | 'none' | 'box-only' | 'auto' | undefined;
337
+ isolation?: 'auto' | 'isolate' | undefined;
281
338
  cursor?: CursorValue | undefined;
282
339
  }
283
340
 
@@ -11,7 +11,6 @@
11
11
  'use strict';
12
12
 
13
13
  import type AnimatedNode from '../Animated/nodes/AnimatedNode';
14
- import type {FilterPrimitive} from '../StyleSheet/processFilter';
15
14
  import type {
16
15
  ____DangerouslyImpreciseStyle_InternalOverrides,
17
16
  ____ImageStyle_InternalOverrides,
@@ -691,15 +690,66 @@ export type ____ShadowStyle_Internal = $ReadOnly<{
691
690
  ...____ShadowStyle_InternalOverrides,
692
691
  }>;
693
692
 
694
- type ____FilterStyle_Internal = $ReadOnly<{
695
- experimental_filter?: $ReadOnlyArray<FilterPrimitive>,
696
- }>;
693
+ export type FilterFunction =
694
+ | {brightness: number | string}
695
+ | {blur: number | string}
696
+ | {contrast: number | string}
697
+ | {grayscale: number | string}
698
+ | {hueRotate: number | string}
699
+ | {invert: number | string}
700
+ | {opacity: number | string}
701
+ | {saturate: number | string}
702
+ | {sepia: number | string}
703
+ | {dropShadow: DropShadowPrimitive | string};
704
+
705
+ export type DropShadowPrimitive = {
706
+ offsetX: number | string,
707
+ offsetY: number | string,
708
+ standardDeviation?: number | string,
709
+ color?: ____ColorValue_Internal,
710
+ };
711
+
712
+ export type GradientValue = {
713
+ type: 'linearGradient',
714
+ // Angle or direction enums
715
+ direction?: string,
716
+ colorStops: $ReadOnlyArray<{
717
+ color: ____ColorValue_Internal,
718
+ positions?: $ReadOnlyArray<string>,
719
+ }>,
720
+ };
721
+
722
+ export type BoxShadowPrimitive = {
723
+ offsetX: number | string,
724
+ offsetY: number | string,
725
+ color?: ____ColorValue_Internal,
726
+ blurRadius?: number | string,
727
+ spreadDistance?: number | string,
728
+ inset?: boolean,
729
+ };
730
+
731
+ type ____BlendMode_Internal =
732
+ | 'normal'
733
+ | 'multiply'
734
+ | 'screen'
735
+ | 'overlay'
736
+ | 'darken'
737
+ | 'lighten'
738
+ | 'color-dodge'
739
+ | 'color-burn'
740
+ | 'hard-light'
741
+ | 'soft-light'
742
+ | 'difference'
743
+ | 'exclusion'
744
+ | 'hue'
745
+ | 'saturation'
746
+ | 'color'
747
+ | 'luminosity';
697
748
 
698
749
  export type ____ViewStyle_InternalCore = $ReadOnly<{
699
750
  ...$Exact<____LayoutStyle_Internal>,
700
751
  ...$Exact<____ShadowStyle_Internal>,
701
752
  ...$Exact<____TransformStyle_Internal>,
702
- ...____FilterStyle_Internal,
703
753
  backfaceVisibility?: 'visible' | 'hidden',
704
754
  backgroundColor?: ____ColorValue_Internal,
705
755
  borderColor?: ____ColorValue_Internal,
@@ -738,6 +788,11 @@ export type ____ViewStyle_InternalCore = $ReadOnly<{
738
788
  elevation?: number,
739
789
  pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only',
740
790
  cursor?: CursorValue,
791
+ experimental_boxShadow?: $ReadOnlyArray<BoxShadowPrimitive> | string,
792
+ experimental_filter?: $ReadOnlyArray<FilterFunction> | string,
793
+ experimental_mixBlendMode?: ____BlendMode_Internal,
794
+ experimental_backgroundImage?: $ReadOnlyArray<GradientValue> | string,
795
+ isolation?: 'auto' | 'isolate',
741
796
  }>;
742
797
 
743
798
  export type ____ViewStyle_Internal = $ReadOnly<{