@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.
- package/.flowconfig +1 -1
- package/CHANGELOG.json +43 -1
- package/CHANGELOG.md +22 -4
- package/Libraries/Alert/RCTAlertManager.js +17 -0
- package/Libraries/Animated/AnimatedEvent.js +4 -3
- package/Libraries/Animated/AnimatedExports.js.flow +2 -0
- package/Libraries/Animated/AnimatedImplementation.js +2 -2
- package/Libraries/Animated/components/AnimatedScrollView.js +48 -43
- package/Libraries/Animated/nodes/AnimatedValue.js +2 -1
- package/Libraries/BatchedBridge/MessageQueue.js +2 -2
- package/Libraries/Blob/FileReader.js +219 -8
- package/Libraries/Blob/URL.js +13 -1
- package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.js +17 -0
- package/Libraries/Components/Button.js +1 -1
- package/Libraries/Components/Button.win32.js +1 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -3
- package/Libraries/{Utilities/__mocks__/GlobalPerformanceLogger.js → Components/DrawerAndroid/DrawerLayoutAndroid.ios.js} +3 -4
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +6 -66
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js.flow +18 -0
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidFallback.js +71 -0
- package/Libraries/Components/Keyboard/Keyboard.js +4 -2
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +6 -3
- package/Libraries/Components/Pressable/Pressable.js +6 -1
- package/Libraries/Components/Pressable/Pressable.win32.js +6 -1
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +12 -2
- package/Libraries/Components/RefreshControl/RefreshControl.js +1 -1
- package/Libraries/Components/ScrollView/ScrollView.d.ts +1 -1
- package/Libraries/Components/ScrollView/ScrollView.js +128 -116
- package/Libraries/Components/StaticRenderer.js +1 -1
- package/Libraries/Components/Switch/Switch.js +7 -3
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +2 -1
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +2 -4
- package/Libraries/Components/TextInput/TextInput.flow.js +59 -42
- package/Libraries/Components/TextInput/TextInput.flow.win32.js +1208 -0
- package/Libraries/Components/TextInput/TextInput.js +67 -1005
- package/Libraries/Components/TextInput/TextInput.win32.js +69 -1037
- package/Libraries/{Blob/__mocks__/BlobModule.js → Components/ToastAndroid/ToastAndroid.ios.js} +3 -6
- package/Libraries/Components/ToastAndroid/ToastAndroid.js +4 -32
- package/Libraries/Components/ToastAndroid/ToastAndroid.js.flow +109 -0
- package/Libraries/Components/ToastAndroid/ToastAndroid.win32.js +4 -32
- package/Libraries/Components/ToastAndroid/ToastAndroidFallback.js +45 -0
- package/Libraries/Components/Touchable/Touchable.js +5 -5
- package/Libraries/Components/Touchable/Touchable.win32.js +5 -5
- package/Libraries/Components/Touchable/TouchableBounce.js +12 -6
- package/Libraries/Components/Touchable/TouchableHighlight.js +9 -6
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +4 -4
- package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +4 -4
- package/Libraries/Components/Touchable/TouchableOpacity.js +11 -5
- package/Libraries/Components/View/View.js +18 -21
- package/Libraries/Components/View/View.win32.js +21 -24
- package/Libraries/Components/View/ViewAccessibility.js +7 -0
- package/Libraries/Components/View/ViewAccessibility.win32.js +7 -0
- package/Libraries/Components/View/ViewPropTypes.js +1 -1
- package/Libraries/Components/View/ViewPropTypes.win32.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/setUpReactDevTools.js +5 -5
- package/Libraries/EventEmitter/NativeEventEmitter.js +4 -1
- package/Libraries/Image/Image.js +17 -0
- package/Libraries/Image/Image.js.flow +2 -2
- package/Libraries/Image/ImageInjection.js +1 -1
- package/Libraries/Image/ImageProps.js +5 -5
- package/Libraries/Image/ImageSource.js +3 -1
- package/Libraries/Image/ImageSourceUtils.js +4 -2
- package/Libraries/Image/ImageTypes.flow.js +1 -1
- package/Libraries/Lists/FlatList.d.ts +2 -2
- package/Libraries/Lists/FlatList.js +1 -1
- package/Libraries/Lists/SectionList.js +1 -1
- package/Libraries/Lists/SectionListModern.js +3 -3
- package/Libraries/LogBox/Data/LogBoxData.js +1 -1
- package/Libraries/LogBox/LogBoxNotificationContainer.js +1 -1
- package/Libraries/Modal/Modal.js +3 -3
- package/Libraries/NativeComponent/BaseViewConfig.js +17 -0
- package/Libraries/NativeComponent/PlatformBaseViewConfig.js +2 -2
- package/Libraries/NativeModules/specs/NativeDevMenu.js +2 -2
- package/Libraries/Network/RCTNetworking.js +17 -0
- package/Libraries/Network/XMLHttpRequest.js +781 -10
- package/Libraries/NewAppScreen/components/DebugInstructions.js +1 -1
- package/Libraries/NewAppScreen/components/Header.js +1 -1
- package/Libraries/NewAppScreen/components/HermesBadge.js +1 -1
- package/Libraries/NewAppScreen/components/LearnMoreLinks.js +3 -3
- package/Libraries/NewAppScreen/components/ReloadInstructions.js +1 -1
- package/Libraries/Performance/Systrace.js +7 -7
- package/Libraries/ReactNative/AppContainer-dev.js +3 -2
- package/Libraries/ReactNative/RendererImplementation.js +6 -5
- package/Libraries/ReactNative/renderApplication.js +9 -0
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +2 -2
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +4840 -4748
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +4947 -4829
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3998 -3888
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +5005 -4948
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +2744 -2652
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +5020 -4933
- package/Libraries/Renderer/shims/ReactFabric.js +3 -1
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +3 -1
- package/Libraries/Renderer/shims/ReactNative.js +3 -1
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -1
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +3 -1
- package/Libraries/Settings/Settings.js +13 -19
- package/Libraries/Settings/Settings.win32.js +19 -20
- package/Libraries/Settings/SettingsFallback.js +33 -0
- package/Libraries/StyleSheet/PlatformColorValueTypes.js +15 -0
- package/Libraries/StyleSheet/Rect.js +1 -0
- package/Libraries/StyleSheet/StyleSheet.js.flow +3 -3
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.js +75 -33
- package/Libraries/StyleSheet/flattenStyle.js +7 -1
- package/Libraries/StyleSheet/processBackgroundImage.js +670 -214
- package/Libraries/Text/Text.js +3 -3
- package/Libraries/Text/Text.win32.js +3 -3
- package/Libraries/Text/TextNativeComponent.js +0 -4
- package/Libraries/Text/TextNativeComponent.win32.js +0 -4
- package/Libraries/Text/TextProps.js +1 -1
- package/Libraries/Text/TextProps.win32.js +1 -1
- package/Libraries/Utilities/Appearance.js +2 -0
- package/Libraries/Utilities/BackHandler.js +17 -0
- package/Libraries/Utilities/Platform.js +17 -0
- package/Libraries/Utilities/PlatformTypes.js +2 -0
- package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
- package/Libraries/WebSocket/WebSocket.js +313 -8
- package/flow/global.js +0 -2
- package/index.js +1 -288
- package/index.win32.js +8 -297
- package/overrides.json +29 -23
- package/package.json +16 -16
- package/src/private/animated/NativeAnimatedHelper.js +1 -1
- package/src/private/animated/NativeAnimatedHelper.win32.js +1 -1
- package/src/private/animated/createAnimatedPropsHook.js +2 -27
- package/src/private/components/{SafeAreaView_INTERNAL_DO_NOT_USE.js → safeareaview/SafeAreaView_INTERNAL_DO_NOT_USE.js} +6 -6
- package/src/private/components/{HScrollViewNativeComponents.js → scrollview/HScrollViewNativeComponents.js} +8 -8
- package/src/private/components/scrollview/VScrollViewNativeComponents.js +25 -0
- package/src/private/{devmenu → devsupport/devmenu}/DevMenu.js +1 -1
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/BorderBox.js +3 -3
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/BoxInspector.js +6 -5
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementBox.js +8 -6
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementProperties.js +11 -10
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/Inspector.js +14 -12
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorOverlay.js +5 -4
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorPanel.js +9 -8
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/NetworkOverlay.js +10 -9
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/ReactDevToolsOverlay.js +7 -7
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/StyleInspector.js +7 -6
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/XHRInterceptor.js +2 -2
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/getInspectorDataForViewAtPoint.js +2 -2
- package/src/private/{inspector → devsupport/devmenu/elementinspector}/resolveBoxStyle.js +1 -1
- package/src/private/{inspector → devsupport/devmenu/perfmonitor}/PerformanceOverlay.js +6 -5
- package/src/private/{specs_DEPRECATED/modules → devsupport/devmenu/specs}/NativeDevMenu.js +2 -2
- package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.android.js +1 -1
- package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.ios.js +1 -1
- package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.win32.js +1 -1
- package/src/private/{debugging → devsupport/rndevtools}/setUpFuseboxReactDevToolsDispatcher.js +1 -1
- package/src/private/{fusebox → devsupport/rndevtools}/specs/NativeReactDevToolsRuntimeSettingsModule.js +2 -2
- package/src/private/{specs_DEPRECATED/modules → devsupport/rndevtools/specs}/NativeReactDevToolsSettingsManager.js +2 -2
- package/src/private/featureflags/ReactNativeFeatureFlags.js +37 -43
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +8 -8
- package/src/private/renderer/errorhandling/ErrorHandlers.js +2 -2
- package/src/private/specs_DEPRECATED/modules/NativeSampleTurboModule.js +3 -0
- package/src/private/types/HostComponent.js +1 -1
- package/src/private/types/HostInstance.js +12 -4
- package/src/private/webapis/performance/Performance.js +1 -3
- package/types/index.d.ts +1 -1
- package/types/public/ReactNativeTypes.d.ts +2 -2
- package/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js +0 -38
- package/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +0 -22
- package/Libraries/Blob/FileReader_new.js +0 -231
- package/Libraries/Blob/FileReader_old.js +0 -186
- package/Libraries/Blob/__mocks__/FileReaderModule.js +0 -20
- package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +0 -32
- package/Libraries/Core/__mocks__/ErrorUtils.js +0 -33
- package/Libraries/Core/__mocks__/NativeExceptionsManager.js +0 -19
- package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +0 -49
- package/Libraries/Events/CustomEvent.js +0 -32
- package/Libraries/Events/EventPolyfill.js +0 -239
- package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +0 -118
- package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +0 -134
- package/Libraries/Network/XMLHttpRequest_new.js +0 -794
- package/Libraries/Network/XMLHttpRequest_old.js +0 -701
- package/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +0 -58
- package/Libraries/Utilities/__mocks__/BackHandler.js +0 -45
- package/Libraries/Utilities/__mocks__/PixelRatio.js +0 -25
- package/Libraries/WebSocket/WebSocketEvent.js +0 -30
- package/Libraries/WebSocket/WebSocket_new.js +0 -325
- package/Libraries/WebSocket/WebSocket_old.js +0 -297
- package/Libraries/WebSocket/__mocks__/event-target-shim.js +0 -27
- package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +0 -30
- package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +0 -81
- package/jest/__tests__/setup-test.js +0 -18
- package/src/private/components/VScrollViewNativeComponents.js +0 -25
- package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +0 -267
- package/src/types/third_party/event-target-shim.d.ts +0 -392
- /package/src/private/{devmenu → devsupport/devmenu}/DevMenu.d.ts +0 -0
- /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
|
|
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
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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 =
|
|
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/
|
|
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('
|
|
102
|
+
return require('../../src/private/webapis/dom/events/CustomEvent').default;
|
|
103
103
|
},
|
|
104
104
|
get createAttributePayload(): createAttributePayload {
|
|
105
105
|
return require('../ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload')
|