@office-iss/react-native-win32 0.0.0-canary.291 → 0.0.0-canary.293

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 (191) hide show
  1. package/.flowconfig +1 -1
  2. package/CHANGELOG.json +43 -1
  3. package/CHANGELOG.md +22 -4
  4. package/Libraries/Alert/RCTAlertManager.js +17 -0
  5. package/Libraries/Animated/AnimatedEvent.js +4 -3
  6. package/Libraries/Animated/AnimatedExports.js.flow +2 -0
  7. package/Libraries/Animated/AnimatedImplementation.js +2 -2
  8. package/Libraries/Animated/components/AnimatedScrollView.js +48 -43
  9. package/Libraries/Animated/nodes/AnimatedValue.js +2 -1
  10. package/Libraries/BatchedBridge/MessageQueue.js +2 -2
  11. package/Libraries/Blob/FileReader.js +219 -8
  12. package/Libraries/Blob/URL.js +13 -1
  13. package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.js +17 -0
  14. package/Libraries/Components/Button.js +1 -1
  15. package/Libraries/Components/Button.win32.js +1 -1
  16. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -3
  17. package/Libraries/{Utilities/__mocks__/GlobalPerformanceLogger.js → Components/DrawerAndroid/DrawerLayoutAndroid.ios.js} +3 -4
  18. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +6 -66
  19. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js.flow +18 -0
  20. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidFallback.js +71 -0
  21. package/Libraries/Components/Keyboard/Keyboard.js +4 -2
  22. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +6 -3
  23. package/Libraries/Components/Pressable/Pressable.js +6 -1
  24. package/Libraries/Components/Pressable/Pressable.win32.js +6 -1
  25. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +12 -2
  26. package/Libraries/Components/RefreshControl/RefreshControl.js +1 -1
  27. package/Libraries/Components/ScrollView/ScrollView.d.ts +1 -1
  28. package/Libraries/Components/ScrollView/ScrollView.js +128 -116
  29. package/Libraries/Components/StaticRenderer.js +1 -1
  30. package/Libraries/Components/Switch/Switch.js +7 -3
  31. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +2 -1
  32. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +2 -4
  33. package/Libraries/Components/TextInput/TextInput.flow.js +59 -42
  34. package/Libraries/Components/TextInput/TextInput.flow.win32.js +1208 -0
  35. package/Libraries/Components/TextInput/TextInput.js +67 -1005
  36. package/Libraries/Components/TextInput/TextInput.win32.js +69 -1037
  37. package/Libraries/{Blob/__mocks__/BlobModule.js → Components/ToastAndroid/ToastAndroid.ios.js} +3 -6
  38. package/Libraries/Components/ToastAndroid/ToastAndroid.js +4 -32
  39. package/Libraries/Components/ToastAndroid/ToastAndroid.js.flow +109 -0
  40. package/Libraries/Components/ToastAndroid/ToastAndroid.win32.js +4 -32
  41. package/Libraries/Components/ToastAndroid/ToastAndroidFallback.js +45 -0
  42. package/Libraries/Components/Touchable/Touchable.js +5 -5
  43. package/Libraries/Components/Touchable/Touchable.win32.js +5 -5
  44. package/Libraries/Components/Touchable/TouchableBounce.js +12 -6
  45. package/Libraries/Components/Touchable/TouchableHighlight.js +9 -6
  46. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +4 -4
  47. package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +4 -4
  48. package/Libraries/Components/Touchable/TouchableOpacity.js +11 -5
  49. package/Libraries/Components/View/View.js +18 -21
  50. package/Libraries/Components/View/View.win32.js +21 -24
  51. package/Libraries/Components/View/ViewAccessibility.js +7 -0
  52. package/Libraries/Components/View/ViewAccessibility.win32.js +7 -0
  53. package/Libraries/Components/View/ViewPropTypes.js +1 -1
  54. package/Libraries/Components/View/ViewPropTypes.win32.js +1 -1
  55. package/Libraries/Core/ReactNativeVersion.js +1 -1
  56. package/Libraries/Core/setUpReactDevTools.js +5 -5
  57. package/Libraries/EventEmitter/NativeEventEmitter.js +4 -1
  58. package/Libraries/Image/Image.js +17 -0
  59. package/Libraries/Image/Image.js.flow +2 -2
  60. package/Libraries/Image/ImageInjection.js +1 -1
  61. package/Libraries/Image/ImageProps.js +5 -5
  62. package/Libraries/Image/ImageSource.js +3 -1
  63. package/Libraries/Image/ImageSourceUtils.js +4 -2
  64. package/Libraries/Image/ImageTypes.flow.js +1 -1
  65. package/Libraries/Lists/FlatList.d.ts +2 -2
  66. package/Libraries/Lists/FlatList.js +1 -1
  67. package/Libraries/Lists/SectionList.js +1 -1
  68. package/Libraries/Lists/SectionListModern.js +3 -3
  69. package/Libraries/LogBox/Data/LogBoxData.js +1 -1
  70. package/Libraries/LogBox/LogBoxNotificationContainer.js +1 -1
  71. package/Libraries/Modal/Modal.js +3 -3
  72. package/Libraries/NativeComponent/BaseViewConfig.js +17 -0
  73. package/Libraries/NativeComponent/PlatformBaseViewConfig.js +2 -2
  74. package/Libraries/NativeModules/specs/NativeDevMenu.js +2 -2
  75. package/Libraries/Network/RCTNetworking.js +17 -0
  76. package/Libraries/Network/XMLHttpRequest.js +781 -10
  77. package/Libraries/NewAppScreen/components/DebugInstructions.js +1 -1
  78. package/Libraries/NewAppScreen/components/Header.js +1 -1
  79. package/Libraries/NewAppScreen/components/HermesBadge.js +1 -1
  80. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +3 -3
  81. package/Libraries/NewAppScreen/components/ReloadInstructions.js +1 -1
  82. package/Libraries/Performance/Systrace.js +7 -7
  83. package/Libraries/ReactNative/AppContainer-dev.js +3 -2
  84. package/Libraries/ReactNative/RendererImplementation.js +6 -5
  85. package/Libraries/ReactNative/renderApplication.js +9 -0
  86. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +2 -2
  87. package/Libraries/Renderer/implementations/ReactFabric-dev.js +4840 -4748
  88. package/Libraries/Renderer/implementations/ReactFabric-prod.js +4947 -4829
  89. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3998 -3888
  90. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +5005 -4948
  91. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +2744 -2652
  92. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +5020 -4933
  93. package/Libraries/Renderer/shims/ReactFabric.js +3 -1
  94. package/Libraries/Renderer/shims/ReactFeatureFlags.js +3 -1
  95. package/Libraries/Renderer/shims/ReactNative.js +3 -1
  96. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -1
  97. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +3 -1
  98. package/Libraries/Settings/Settings.js +13 -19
  99. package/Libraries/Settings/Settings.win32.js +19 -20
  100. package/Libraries/Settings/SettingsFallback.js +33 -0
  101. package/Libraries/StyleSheet/PlatformColorValueTypes.js +15 -0
  102. package/Libraries/StyleSheet/Rect.js +1 -0
  103. package/Libraries/StyleSheet/StyleSheet.js.flow +3 -3
  104. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
  105. package/Libraries/StyleSheet/StyleSheetTypes.js +75 -33
  106. package/Libraries/StyleSheet/flattenStyle.js +7 -1
  107. package/Libraries/StyleSheet/processBackgroundImage.js +670 -214
  108. package/Libraries/Text/Text.js +3 -3
  109. package/Libraries/Text/Text.win32.js +3 -3
  110. package/Libraries/Text/TextNativeComponent.js +0 -4
  111. package/Libraries/Text/TextNativeComponent.win32.js +0 -4
  112. package/Libraries/Text/TextProps.js +1 -1
  113. package/Libraries/Text/TextProps.win32.js +1 -1
  114. package/Libraries/Utilities/Appearance.js +2 -0
  115. package/Libraries/Utilities/BackHandler.js +17 -0
  116. package/Libraries/Utilities/Platform.js +17 -0
  117. package/Libraries/Utilities/PlatformTypes.js +2 -0
  118. package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
  119. package/Libraries/WebSocket/WebSocket.js +313 -8
  120. package/flow/global.js +0 -2
  121. package/index.js +1 -288
  122. package/index.win32.js +8 -297
  123. package/overrides.json +29 -23
  124. package/package.json +16 -16
  125. package/src/private/animated/NativeAnimatedHelper.js +1 -1
  126. package/src/private/animated/NativeAnimatedHelper.win32.js +1 -1
  127. package/src/private/animated/createAnimatedPropsHook.js +2 -27
  128. package/src/private/components/{SafeAreaView_INTERNAL_DO_NOT_USE.js → safeareaview/SafeAreaView_INTERNAL_DO_NOT_USE.js} +6 -6
  129. package/src/private/components/{HScrollViewNativeComponents.js → scrollview/HScrollViewNativeComponents.js} +8 -8
  130. package/src/private/components/scrollview/VScrollViewNativeComponents.js +25 -0
  131. package/src/private/{devmenu → devsupport/devmenu}/DevMenu.js +1 -1
  132. package/src/private/{inspector → devsupport/devmenu/elementinspector}/BorderBox.js +3 -3
  133. package/src/private/{inspector → devsupport/devmenu/elementinspector}/BoxInspector.js +6 -5
  134. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementBox.js +8 -6
  135. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementProperties.js +11 -10
  136. package/src/private/{inspector → devsupport/devmenu/elementinspector}/Inspector.js +14 -12
  137. package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorOverlay.js +5 -4
  138. package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorPanel.js +9 -8
  139. package/src/private/{inspector → devsupport/devmenu/elementinspector}/NetworkOverlay.js +10 -9
  140. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ReactDevToolsOverlay.js +7 -7
  141. package/src/private/{inspector → devsupport/devmenu/elementinspector}/StyleInspector.js +7 -6
  142. package/src/private/{inspector → devsupport/devmenu/elementinspector}/XHRInterceptor.js +2 -2
  143. package/src/private/{inspector → devsupport/devmenu/elementinspector}/getInspectorDataForViewAtPoint.js +2 -2
  144. package/src/private/{inspector → devsupport/devmenu/elementinspector}/resolveBoxStyle.js +1 -1
  145. package/src/private/{inspector → devsupport/devmenu/perfmonitor}/PerformanceOverlay.js +6 -5
  146. package/src/private/{specs_DEPRECATED/modules → devsupport/devmenu/specs}/NativeDevMenu.js +2 -2
  147. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.android.js +1 -1
  148. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.ios.js +1 -1
  149. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.win32.js +1 -1
  150. package/src/private/{debugging → devsupport/rndevtools}/setUpFuseboxReactDevToolsDispatcher.js +1 -1
  151. package/src/private/{fusebox → devsupport/rndevtools}/specs/NativeReactDevToolsRuntimeSettingsModule.js +2 -2
  152. package/src/private/{specs_DEPRECATED/modules → devsupport/rndevtools/specs}/NativeReactDevToolsSettingsManager.js +2 -2
  153. package/src/private/featureflags/ReactNativeFeatureFlags.js +37 -43
  154. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +8 -8
  155. package/src/private/renderer/errorhandling/ErrorHandlers.js +2 -2
  156. package/src/private/specs_DEPRECATED/modules/NativeSampleTurboModule.js +3 -0
  157. package/src/private/types/HostComponent.js +1 -1
  158. package/src/private/types/HostInstance.js +12 -4
  159. package/src/private/webapis/performance/Performance.js +1 -3
  160. package/types/index.d.ts +1 -1
  161. package/types/public/ReactNativeTypes.d.ts +2 -2
  162. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js +0 -38
  163. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +0 -22
  164. package/Libraries/Blob/FileReader_new.js +0 -231
  165. package/Libraries/Blob/FileReader_old.js +0 -186
  166. package/Libraries/Blob/__mocks__/FileReaderModule.js +0 -20
  167. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +0 -32
  168. package/Libraries/Core/__mocks__/ErrorUtils.js +0 -33
  169. package/Libraries/Core/__mocks__/NativeExceptionsManager.js +0 -19
  170. package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +0 -49
  171. package/Libraries/Events/CustomEvent.js +0 -32
  172. package/Libraries/Events/EventPolyfill.js +0 -239
  173. package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +0 -118
  174. package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +0 -134
  175. package/Libraries/Network/XMLHttpRequest_new.js +0 -794
  176. package/Libraries/Network/XMLHttpRequest_old.js +0 -701
  177. package/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +0 -58
  178. package/Libraries/Utilities/__mocks__/BackHandler.js +0 -45
  179. package/Libraries/Utilities/__mocks__/PixelRatio.js +0 -25
  180. package/Libraries/WebSocket/WebSocketEvent.js +0 -30
  181. package/Libraries/WebSocket/WebSocket_new.js +0 -325
  182. package/Libraries/WebSocket/WebSocket_old.js +0 -297
  183. package/Libraries/WebSocket/__mocks__/event-target-shim.js +0 -27
  184. package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +0 -30
  185. package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +0 -81
  186. package/jest/__tests__/setup-test.js +0 -18
  187. package/src/private/components/VScrollViewNativeComponents.js +0 -25
  188. package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +0 -267
  189. package/src/types/third_party/event-target-shim.d.ts +0 -392
  190. /package/src/private/{devmenu → devsupport/devmenu}/DevMenu.d.ts +0 -0
  191. /package/src/private/{debugging → devsupport/rndevtools}/FuseboxSessionObserver.js +0 -0
@@ -11,7 +11,7 @@
11
11
  import StyleSheet from '../../StyleSheet/StyleSheet';
12
12
  import Text from '../../Text/Text';
13
13
  import Platform from '../../Utilities/Platform';
14
- import React from 'react';
14
+ import * as React from 'react';
15
15
 
16
16
  const styles = StyleSheet.create({
17
17
  highlight: {
@@ -14,7 +14,7 @@ import Text from '../../Text/Text';
14
14
  import useColorScheme from '../../Utilities/useColorScheme';
15
15
  import Colors from './Colors';
16
16
  import HermesBadge from './HermesBadge';
17
- import React from 'react';
17
+ import * as React from 'react';
18
18
 
19
19
  const Header = (): React.Node => {
20
20
  const isDarkMode = useColorScheme() === 'dark';
@@ -13,7 +13,7 @@ import StyleSheet from '../../StyleSheet/StyleSheet';
13
13
  import Text from '../../Text/Text';
14
14
  import useColorScheme from '../../Utilities/useColorScheme';
15
15
  import Colors from './Colors';
16
- import React from 'react';
16
+ import * as React from 'react';
17
17
 
18
18
  const HermesBadge = (): React.Node => {
19
19
  const isDarkMode = useColorScheme() === 'dark';
@@ -15,7 +15,7 @@ import StyleSheet from '../../StyleSheet/StyleSheet';
15
15
  import Text from '../../Text/Text';
16
16
  import useColorScheme from '../../Utilities/useColorScheme';
17
17
  import Colors from './Colors';
18
- import React, {Fragment} from 'react';
18
+ import * as React from 'react';
19
19
 
20
20
  const links = [
21
21
  {
@@ -84,7 +84,7 @@ const LinkList = (): React.Node => {
84
84
  return (
85
85
  <View style={styles.container}>
86
86
  {links.map(({id, title, link, description}) => (
87
- <Fragment key={id}>
87
+ <React.Fragment key={id}>
88
88
  <View
89
89
  style={[
90
90
  styles.separator,
@@ -108,7 +108,7 @@ const LinkList = (): React.Node => {
108
108
  {description}
109
109
  </Text>
110
110
  </TouchableOpacity>
111
- </Fragment>
111
+ </React.Fragment>
112
112
  ))}
113
113
  </View>
114
114
  );
@@ -11,7 +11,7 @@
11
11
  import StyleSheet from '../../StyleSheet/StyleSheet';
12
12
  import Text from '../../Text/Text';
13
13
  import Platform from '../../Utilities/Platform';
14
- import React from 'react';
14
+ import * as React from 'react';
15
15
 
16
16
  const styles = StyleSheet.create({
17
17
  highlight: {
@@ -10,7 +10,7 @@
10
10
 
11
11
  import typeof * as SystraceModule from './Systrace';
12
12
 
13
- const TRACE_TAG_REACT_APPS = 1 << 17; // eslint-disable-line no-bitwise
13
+ const TRACE_TAG_REACT = 1 << 13; // eslint-disable-line no-bitwise
14
14
 
15
15
  let _asyncCookie = 0;
16
16
 
@@ -32,7 +32,7 @@ type EventArgs = ?{[string]: string};
32
32
  */
33
33
  export function isEnabled(): boolean {
34
34
  return global.nativeTraceIsTracing
35
- ? global.nativeTraceIsTracing(TRACE_TAG_REACT_APPS)
35
+ ? global.nativeTraceIsTracing(TRACE_TAG_REACT)
36
36
  : Boolean(global.__RCTProfileIsProfiling);
37
37
  }
38
38
 
@@ -52,7 +52,7 @@ export function beginEvent(eventName: EventName, args?: EventArgs): void {
52
52
  if (isEnabled()) {
53
53
  const eventNameString =
54
54
  typeof eventName === 'function' ? eventName() : eventName;
55
- global.nativeTraceBeginSection(TRACE_TAG_REACT_APPS, eventNameString, args);
55
+ global.nativeTraceBeginSection(TRACE_TAG_REACT, eventNameString, args);
56
56
  }
57
57
  }
58
58
 
@@ -61,7 +61,7 @@ export function beginEvent(eventName: EventName, args?: EventArgs): void {
61
61
  */
62
62
  export function endEvent(args?: EventArgs): void {
63
63
  if (isEnabled()) {
64
- global.nativeTraceEndSection(TRACE_TAG_REACT_APPS, args);
64
+ global.nativeTraceEndSection(TRACE_TAG_REACT, args);
65
65
  }
66
66
  }
67
67
 
@@ -80,7 +80,7 @@ export function beginAsyncEvent(
80
80
  const eventNameString =
81
81
  typeof eventName === 'function' ? eventName() : eventName;
82
82
  global.nativeTraceBeginAsyncSection(
83
- TRACE_TAG_REACT_APPS,
83
+ TRACE_TAG_REACT,
84
84
  eventNameString,
85
85
  cookie,
86
86
  args,
@@ -102,7 +102,7 @@ export function endAsyncEvent(
102
102
  const eventNameString =
103
103
  typeof eventName === 'function' ? eventName() : eventName;
104
104
  global.nativeTraceEndAsyncSection(
105
- TRACE_TAG_REACT_APPS,
105
+ TRACE_TAG_REACT,
106
106
  eventNameString,
107
107
  cookie,
108
108
  args,
@@ -118,7 +118,7 @@ export function counterEvent(eventName: EventName, value: number): void {
118
118
  const eventNameString =
119
119
  typeof eventName === 'function' ? eventName() : eventName;
120
120
  global.nativeTraceCounter &&
121
- global.nativeTraceCounter(TRACE_TAG_REACT_APPS, eventNameString, value);
121
+ global.nativeTraceCounter(TRACE_TAG_REACT, eventNameString, value);
122
122
  }
123
123
  }
124
124
 
@@ -53,7 +53,8 @@ const InspectorDeferred = ({
53
53
  }: InspectorDeferredProps) => {
54
54
  // D39382967 adds a require cycle: InitializeCore -> AppContainer -> Inspector -> InspectorPanel -> ScrollView -> InitializeCore
55
55
  // We can't remove it yet, fallback to dynamic require for now. This is the only reason why this logic is in a separate function.
56
- const Inspector = require('../../src/private/inspector/Inspector').default;
56
+ const Inspector =
57
+ require('../../src/private/devsupport/devmenu/elementinspector/Inspector').default;
57
58
 
58
59
  return (
59
60
  <Inspector
@@ -74,7 +75,7 @@ const ReactDevToolsOverlayDeferred = ({
74
75
  reactDevToolsAgent,
75
76
  }: ReactDevToolsOverlayDeferredProps) => {
76
77
  const ReactDevToolsOverlay =
77
- require('../../src/private/inspector/ReactDevToolsOverlay').default;
78
+ require('../../src/private/devsupport/devmenu/elementinspector/ReactDevToolsOverlay').default;
78
79
 
79
80
  return (
80
81
  <ReactDevToolsOverlay
@@ -13,7 +13,6 @@ import type {
13
13
  InternalInstanceHandle,
14
14
  Node,
15
15
  } from '../Renderer/shims/ReactNativeTypes';
16
- import type {ElementRef, ElementType} from 'react';
17
16
 
18
17
  import {
19
18
  onCaughtError,
@@ -21,6 +20,8 @@ import {
21
20
  onUncaughtError,
22
21
  } from '../../src/private/renderer/errorhandling/ErrorHandlers';
23
22
  import {type RootTag} from './RootTag';
23
+ import * as React from 'react';
24
+
24
25
  export function renderElement({
25
26
  element,
26
27
  rootTag,
@@ -58,9 +59,9 @@ export function renderElement({
58
59
  }
59
60
  }
60
61
 
61
- export function findHostInstance_DEPRECATED<TElementType: ElementType>(
62
+ export function findHostInstance_DEPRECATED<TElementType: React.ElementType>(
62
63
  // $FlowFixMe[incompatible-call]
63
- componentOrHandle: ?(ElementRef<TElementType> | number),
64
+ componentOrHandle: ?(React.ElementRef<TElementType> | number),
64
65
  ): ?HostInstance {
65
66
  return require('../Renderer/shims/ReactNative').default.findHostInstance_DEPRECATED(
66
67
  // $FlowFixMe[incompatible-call]
@@ -68,9 +69,9 @@ export function findHostInstance_DEPRECATED<TElementType: ElementType>(
68
69
  );
69
70
  }
70
71
 
71
- export function findNodeHandle<TElementType: ElementType>(
72
+ export function findNodeHandle<TElementType: React.ElementType>(
72
73
  // $FlowFixMe[incompatible-call]
73
- componentOrHandle: ?(ElementRef<TElementType> | number),
74
+ componentOrHandle: ?(React.ElementRef<TElementType> | number),
74
75
  ): ?number {
75
76
  return require('../Renderer/shims/ReactNative').default.findNodeHandle(
76
77
  // $FlowFixMe[incompatible-call]
@@ -13,6 +13,7 @@ import type {IPerformanceLogger} from '../Utilities/createPerformanceLogger';
13
13
 
14
14
  import GlobalPerformanceLogger from '../Utilities/GlobalPerformanceLogger';
15
15
  import PerformanceLoggerContext from '../Utilities/PerformanceLoggerContext';
16
+ import warnOnce from '../Utilities/warnOnce';
16
17
  import AppContainer from './AppContainer';
17
18
  import DisplayMode, {type DisplayModeType} from './DisplayMode';
18
19
  import getCachedComponentWithDebugName from './getCachedComponentWithDebugName';
@@ -104,5 +105,13 @@ export default function renderApplication<Props: Object>(
104
105
  useFabric: Boolean(fabric),
105
106
  useConcurrentRoot,
106
107
  });
108
+
109
+ const newArchitecture = !!fabric;
110
+ if (!newArchitecture) {
111
+ warnOnce(
112
+ '[OSS][OldArchDeprecatedWarning]',
113
+ 'The app is running using the Legacy Architecture. The Legacy Architecture is deprecated and will be removed in a future version of React Native. Please consider migrating to the New Architecture. For more information, please see https://reactnative.dev/blog/2024/10/23/the-new-architecture-is-here',
114
+ );
115
+ }
107
116
  performanceLogger.stopTimespan('renderApplication_React_render');
108
117
  }
@@ -8,6 +8,7 @@
8
8
  * @flow strict-local
9
9
  */
10
10
 
11
+ import typeof CustomEvent from '../../src/private/webapis/dom/events/CustomEvent';
11
12
  import typeof BatchedBridge from '../BatchedBridge/BatchedBridge';
12
13
  import typeof legacySendAccessibilityEvent from '../Components/AccessibilityInfo/legacySendAccessibilityEvent';
13
14
  import typeof TextInputState from '../Components/TextInput/TextInputState';
@@ -15,7 +16,6 @@ import typeof ExceptionsManager from '../Core/ExceptionsManager';
15
16
  import typeof RawEventEmitter from '../Core/RawEventEmitter';
16
17
  import typeof ReactFiberErrorDialog from '../Core/ReactFiberErrorDialog';
17
18
  import typeof RCTEventEmitter from '../EventEmitter/RCTEventEmitter';
18
- import typeof CustomEvent from '../Events/CustomEvent';
19
19
  import typeof {
20
20
  createPublicInstance,
21
21
  createPublicRootInstance,
@@ -99,7 +99,7 @@ module.exports = {
99
99
  return require('../Core/RawEventEmitter').default;
100
100
  },
101
101
  get CustomEvent(): CustomEvent {
102
- return require('../Events/CustomEvent').default;
102
+ return require('../../src/private/webapis/dom/events/CustomEvent').default;
103
103
  },
104
104
  get createAttributePayload(): createAttributePayload {
105
105
  return require('../ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload')