@office-iss/react-native-win32 0.0.0-canary.290 → 0.0.0-canary.292

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 (128) hide show
  1. package/.flowconfig +1 -1
  2. package/CHANGELOG.json +31 -1
  3. package/CHANGELOG.md +20 -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/Components/AccessibilityInfo/legacySendAccessibilityEvent.js +17 -0
  13. package/Libraries/Components/Button.js +1 -1
  14. package/Libraries/Components/Button.win32.js +1 -1
  15. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -3
  16. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.ios.js +15 -0
  17. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +6 -66
  18. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js.flow +18 -0
  19. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidFallback.js +71 -0
  20. package/Libraries/Components/Keyboard/Keyboard.js +4 -2
  21. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +6 -3
  22. package/Libraries/Components/Pressable/Pressable.js +2 -0
  23. package/Libraries/Components/Pressable/Pressable.win32.js +2 -0
  24. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +12 -2
  25. package/Libraries/Components/RefreshControl/RefreshControl.js +1 -1
  26. package/Libraries/Components/ScrollView/ScrollView.js +128 -116
  27. package/Libraries/Components/StaticRenderer.js +1 -1
  28. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +1 -1
  29. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -4
  30. package/Libraries/Components/TextInput/TextInput.flow.js +35 -43
  31. package/Libraries/Components/TextInput/TextInput.flow.win32.js +1184 -0
  32. package/Libraries/Components/TextInput/TextInput.js +65 -1005
  33. package/Libraries/Components/TextInput/TextInput.win32.js +67 -1037
  34. package/Libraries/Components/ToastAndroid/ToastAndroid.ios.js +13 -0
  35. package/Libraries/Components/ToastAndroid/ToastAndroid.js +4 -32
  36. package/Libraries/Components/ToastAndroid/ToastAndroid.js.flow +109 -0
  37. package/Libraries/Components/ToastAndroid/ToastAndroid.win32.js +4 -32
  38. package/Libraries/Components/ToastAndroid/ToastAndroidFallback.js +45 -0
  39. package/Libraries/Components/Touchable/Touchable.js +5 -5
  40. package/Libraries/Components/Touchable/Touchable.win32.js +5 -5
  41. package/Libraries/Components/Touchable/TouchableBounce.js +12 -6
  42. package/Libraries/Components/Touchable/TouchableHighlight.js +9 -6
  43. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +4 -4
  44. package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +4 -4
  45. package/Libraries/Components/Touchable/TouchableOpacity.js +11 -5
  46. package/Libraries/Components/View/ViewAccessibility.js +7 -0
  47. package/Libraries/Components/View/ViewAccessibility.win32.js +7 -0
  48. package/Libraries/Components/View/ViewPropTypes.js +1 -1
  49. package/Libraries/Components/View/ViewPropTypes.win32.js +1 -1
  50. package/Libraries/Core/ReactNativeVersion.js +1 -1
  51. package/Libraries/EventEmitter/NativeEventEmitter.js +4 -1
  52. package/Libraries/Image/Image.js +17 -0
  53. package/Libraries/Image/Image.js.flow +2 -2
  54. package/Libraries/Image/ImageInjection.js +1 -1
  55. package/Libraries/Image/ImageProps.js +5 -4
  56. package/Libraries/Image/ImageTypes.flow.js +1 -1
  57. package/Libraries/Lists/FlatList.js +1 -1
  58. package/Libraries/Lists/SectionList.js +1 -1
  59. package/Libraries/Lists/SectionListModern.js +2 -1
  60. package/Libraries/LogBox/LogBoxNotificationContainer.js +1 -1
  61. package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.win32.js +140 -0
  62. package/Libraries/Modal/Modal.js +3 -3
  63. package/Libraries/NativeComponent/BaseViewConfig.js +17 -0
  64. package/Libraries/NativeComponent/PlatformBaseViewConfig.js +2 -2
  65. package/Libraries/Network/RCTNetworking.js +17 -0
  66. package/Libraries/Network/XMLHttpRequest.js +781 -10
  67. package/Libraries/NewAppScreen/components/DebugInstructions.js +1 -1
  68. package/Libraries/NewAppScreen/components/Header.js +1 -1
  69. package/Libraries/NewAppScreen/components/HermesBadge.js +1 -1
  70. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +3 -3
  71. package/Libraries/NewAppScreen/components/ReloadInstructions.js +1 -1
  72. package/Libraries/Performance/Systrace.js +7 -7
  73. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +2 -2
  74. package/Libraries/Settings/Settings.js +13 -19
  75. package/Libraries/Settings/Settings.win32.js +19 -20
  76. package/Libraries/Settings/SettingsFallback.js +33 -0
  77. package/Libraries/StyleSheet/PlatformColorValueTypes.js +15 -0
  78. package/Libraries/StyleSheet/Rect.js +1 -0
  79. package/Libraries/StyleSheet/StyleSheet.js.flow +3 -3
  80. package/Libraries/StyleSheet/StyleSheetTypes.js +28 -30
  81. package/Libraries/StyleSheet/flattenStyle.js +7 -1
  82. package/Libraries/Text/Text.js +3 -3
  83. package/Libraries/Text/Text.win32.js +3 -3
  84. package/Libraries/Text/TextProps.js +1 -1
  85. package/Libraries/Text/TextProps.win32.js +1 -1
  86. package/Libraries/Utilities/Appearance.js +2 -0
  87. package/Libraries/Utilities/BackHandler.js +17 -0
  88. package/Libraries/Utilities/Platform.js +17 -0
  89. package/Libraries/Utilities/PlatformTypes.js +2 -0
  90. package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
  91. package/Libraries/WebSocket/WebSocket.js +313 -8
  92. package/flow/global.js +0 -2
  93. package/index.win32.js +5 -5
  94. package/overrides.json +29 -17
  95. package/package.json +12 -12
  96. package/src/private/animated/NativeAnimatedHelper.js +1 -1
  97. package/src/private/animated/NativeAnimatedHelper.win32.js +1 -1
  98. package/src/private/animated/createAnimatedPropsHook.js +2 -27
  99. package/src/private/components/{SafeAreaView_INTERNAL_DO_NOT_USE.js → safeareaview/SafeAreaView_INTERNAL_DO_NOT_USE.js} +6 -6
  100. package/src/private/components/{HScrollViewNativeComponents.js → scrollview/HScrollViewNativeComponents.js} +8 -8
  101. package/src/private/components/scrollview/VScrollViewNativeComponents.js +25 -0
  102. package/src/private/featureflags/ReactNativeFeatureFlags.js +21 -32
  103. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +5 -6
  104. package/src/private/inspector/BorderBox.js +1 -1
  105. package/src/private/inspector/BoxInspector.js +1 -1
  106. package/src/private/inspector/ElementBox.js +1 -1
  107. package/src/private/inspector/ElementProperties.js +1 -1
  108. package/src/private/inspector/Inspector.js +2 -2
  109. package/src/private/inspector/InspectorOverlay.js +1 -1
  110. package/src/private/inspector/InspectorPanel.js +1 -1
  111. package/src/private/inspector/NetworkOverlay.js +1 -1
  112. package/src/private/inspector/PerformanceOverlay.js +1 -1
  113. package/src/private/inspector/StyleInspector.js +1 -1
  114. package/src/private/types/HostComponent.js +1 -1
  115. package/src/private/types/HostInstance.js +10 -2
  116. package/src/private/webapis/performance/Performance.js +1 -3
  117. package/Libraries/Blob/FileReader_new.js +0 -231
  118. package/Libraries/Blob/FileReader_old.js +0 -186
  119. package/Libraries/Events/CustomEvent.js +0 -32
  120. package/Libraries/Events/EventPolyfill.js +0 -239
  121. package/Libraries/Network/XMLHttpRequest_new.js +0 -794
  122. package/Libraries/Network/XMLHttpRequest_old.js +0 -701
  123. package/Libraries/WebSocket/WebSocketEvent.js +0 -30
  124. package/Libraries/WebSocket/WebSocket_new.js +0 -325
  125. package/Libraries/WebSocket/WebSocket_old.js +0 -297
  126. package/Libraries/WebSocket/__mocks__/event-target-shim.js +0 -27
  127. package/src/private/components/VScrollViewNativeComponents.js +0 -25
  128. package/src/types/third_party/event-target-shim.d.ts +0 -392
@@ -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
 
@@ -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')
@@ -8,26 +8,20 @@
8
8
  * @flow
9
9
  */
10
10
 
11
- 'use strict';
11
+ import Platform from '../Utilities/Platform';
12
12
 
13
- const Settings = {
14
- get(key: string): any {
15
- console.warn('Settings is not yet supported on this platform.');
16
- return null;
17
- },
18
-
19
- set(settings: Object) {
20
- console.warn('Settings is not yet supported on this platform.');
21
- },
22
-
23
- watchKeys(keys: string | Array<string>, callback: () => void): number {
24
- console.warn('Settings is not yet supported on this platform.');
25
- return -1;
26
- },
27
-
28
- clearWatch(watchId: number) {
29
- console.warn('Settings is not yet supported on this platform.');
30
- },
13
+ let Settings: {
14
+ get(key: string): any,
15
+ set(settings: Object): void,
16
+ watchKeys(keys: string | Array<string>, callback: () => void): number,
17
+ clearWatch(watchId: number): void,
18
+ ...
31
19
  };
32
20
 
21
+ if (Platform.OS === 'ios') {
22
+ Settings = require('./Settings').default;
23
+ } else {
24
+ Settings = require('./SettingsFallback').default;
25
+ }
26
+
33
27
  export default Settings;
@@ -1,28 +1,27 @@
1
1
  /**
2
- * Copyright (c) Microsoft Corporation.
3
- * Licensed under the MIT License.
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow
4
8
  * @format
5
9
  */
6
- 'use strict';
7
10
 
8
- var Settings = {
9
- get(key: string): any {
10
- console.warn('Settings is not yet supported on Win32');
11
- return null;
12
- },
11
+ import Platform from '../Utilities/Platform';
13
12
 
14
- set(settings: Object) {
15
- console.warn('Settings is not yet supported on Win32');
16
- },
17
-
18
- watchKeys(keys: string | Array<string>, callback: () => void): number {
19
- console.warn('Settings is not yet supported on Win32');
20
- return -1;
21
- },
22
-
23
- clearWatch(watchId: number) {
24
- console.warn('Settings is not yet supported on Win32');
25
- },
13
+ let Settings: {
14
+ get(key: string): any,
15
+ set(settings: Object): void,
16
+ watchKeys(keys: string | Array<string>, callback: () => void): number,
17
+ clearWatch(watchId: number): void,
18
+ ...
26
19
  };
27
20
 
21
+ if (Platform.OS === 'ios') {
22
+ Settings = require('./Settings').default;
23
+ } else {
24
+ Settings = require('./SettingsFallback').default;
25
+ }
26
+
28
27
  export default Settings;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @format
8
+ * @flow
9
+ */
10
+
11
+ 'use strict';
12
+
13
+ const Settings = {
14
+ get(key: string): any {
15
+ console.warn('Settings is not yet supported on this platform.');
16
+ return null;
17
+ },
18
+
19
+ set(settings: Object) {
20
+ console.warn('Settings is not yet supported on this platform.');
21
+ },
22
+
23
+ watchKeys(keys: string | Array<string>, callback: () => void): number {
24
+ console.warn('Settings is not yet supported on this platform.');
25
+ return -1;
26
+ },
27
+
28
+ clearWatch(watchId: number) {
29
+ console.warn('Settings is not yet supported on this platform.');
30
+ },
31
+ };
32
+
33
+ export default Settings;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow strict-local
8
+ * @format
9
+ */
10
+
11
+ // NOTE: This file supports backwards compatibility of subpath (deep) imports
12
+ // from 'react-native' with platform-specific extensions. It can be deleted
13
+ // once we remove the "./*" mapping from package.json "exports".
14
+
15
+ export * from './PlatformColorValueTypes';
@@ -15,6 +15,7 @@ export type Rect = $ReadOnly<{
15
15
  top?: ?number,
16
16
  }>;
17
17
 
18
+ export type Insets = Rect;
18
19
  export type RectOrSize = Rect | number;
19
20
 
20
21
  export function createSquare(size: number): Rect {
@@ -26,9 +26,10 @@ import type {
26
26
  } from './StyleSheetTypes';
27
27
 
28
28
  export type {
29
- StyleProp,
30
29
  BoxShadowValue,
31
30
  FilterFunction,
31
+ NativeColorValue,
32
+ StyleProp,
32
33
  } from './StyleSheetTypes';
33
34
 
34
35
  export type StyleSheetProperties = {
@@ -36,8 +37,6 @@ export type StyleSheetProperties = {
36
37
  flatten<T: string>(style: T): T,
37
38
  };
38
39
 
39
- export type {NativeColorValue} from './StyleSheetTypes';
40
-
41
40
  /**
42
41
  * This type should be used as the type for anything that is a color. It is
43
42
  * most useful when using DynamicColorIOS which can be a string or a dynamic
@@ -49,6 +48,7 @@ export type ColorValue = ____ColorValue_Internal;
49
48
 
50
49
  /**
51
50
  * Expose the opaque type for NativeColorValue.
51
+ * @deprecated Use NativeColorValue instead.
52
52
  */
53
53
  export type OpaqueColorValue = NativeColorValue;
54
54
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- import type {AnimatedBaseProps} from '../Animated/createAnimatedComponent';
13
+ import type {WithAnimatedValue} from '../Animated/createAnimatedComponent';
14
14
  import type AnimatedNode from '../Animated/nodes/AnimatedNode';
15
15
  import type {ImageResizeMode} from './../Image/ImageResizeMode';
16
16
  import type {
@@ -38,8 +38,7 @@ export type EdgeInsetsValue = {
38
38
  bottom: number,
39
39
  };
40
40
 
41
- export type DimensionValue = number | string | 'auto' | AnimatedNode | null;
42
- export type AnimatableNumericValue = number | AnimatedNode;
41
+ export type DimensionValue = number | string | 'auto' | null;
43
42
 
44
43
  export type CursorValue = 'auto' | 'pointer';
45
44
 
@@ -694,7 +693,7 @@ export type ____ShadowStyle_InternalCore = $ReadOnly<{
694
693
  * Sets the drop shadow opacity (multiplied by the color's alpha component)
695
694
  * @platform ios
696
695
  */
697
- shadowOpacity?: AnimatableNumericValue,
696
+ shadowOpacity?: number,
698
697
  /**
699
698
  * Sets the drop shadow blur radius
700
699
  * @platform ios
@@ -777,32 +776,32 @@ export type ____ViewStyle_InternalBase = $ReadOnly<{
777
776
  borderBlockColor?: ____ColorValue_Internal,
778
777
  borderBlockEndColor?: ____ColorValue_Internal,
779
778
  borderBlockStartColor?: ____ColorValue_Internal,
780
- borderRadius?: AnimatableNumericValue | string,
781
- borderBottomEndRadius?: AnimatableNumericValue | string,
782
- borderBottomLeftRadius?: AnimatableNumericValue | string,
783
- borderBottomRightRadius?: AnimatableNumericValue | string,
784
- borderBottomStartRadius?: AnimatableNumericValue | string,
785
- borderEndEndRadius?: AnimatableNumericValue | string,
786
- borderEndStartRadius?: AnimatableNumericValue | string,
787
- borderStartEndRadius?: AnimatableNumericValue | string,
788
- borderStartStartRadius?: AnimatableNumericValue | string,
789
- borderTopEndRadius?: AnimatableNumericValue | string,
790
- borderTopLeftRadius?: AnimatableNumericValue | string,
791
- borderTopRightRadius?: AnimatableNumericValue | string,
792
- borderTopStartRadius?: AnimatableNumericValue | string,
779
+ borderRadius?: number | string,
780
+ borderBottomEndRadius?: number | string,
781
+ borderBottomLeftRadius?: number | string,
782
+ borderBottomRightRadius?: number | string,
783
+ borderBottomStartRadius?: number | string,
784
+ borderEndEndRadius?: number | string,
785
+ borderEndStartRadius?: number | string,
786
+ borderStartEndRadius?: number | string,
787
+ borderStartStartRadius?: number | string,
788
+ borderTopEndRadius?: number | string,
789
+ borderTopLeftRadius?: number | string,
790
+ borderTopRightRadius?: number | string,
791
+ borderTopStartRadius?: number | string,
793
792
  borderStyle?: 'solid' | 'dotted' | 'dashed',
794
- borderWidth?: AnimatableNumericValue,
795
- borderBottomWidth?: AnimatableNumericValue,
796
- borderEndWidth?: AnimatableNumericValue,
797
- borderLeftWidth?: AnimatableNumericValue,
798
- borderRightWidth?: AnimatableNumericValue,
799
- borderStartWidth?: AnimatableNumericValue,
800
- borderTopWidth?: AnimatableNumericValue,
801
- opacity?: AnimatableNumericValue,
793
+ borderWidth?: number,
794
+ borderBottomWidth?: number,
795
+ borderEndWidth?: number,
796
+ borderLeftWidth?: number,
797
+ borderRightWidth?: number,
798
+ borderStartWidth?: number,
799
+ borderTopWidth?: number,
800
+ opacity?: number,
802
801
  outlineColor?: ____ColorValue_Internal,
803
- outlineOffset?: AnimatableNumericValue,
802
+ outlineOffset?: number,
804
803
  outlineStyle?: 'solid' | 'dotted' | 'dashed',
805
- outlineWidth?: AnimatableNumericValue,
804
+ outlineWidth?: number,
806
805
  elevation?: number,
807
806
  pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only',
808
807
  cursor?: CursorValue,
@@ -992,9 +991,8 @@ export type ____DangerouslyImpreciseStyleProp_Internal = StyleProp<
992
991
  Partial<____DangerouslyImpreciseStyle_Internal>,
993
992
  >;
994
993
 
995
- export type ____DangerouslyImpreciseAnimatedStyleProp_Internal = StyleProp<
996
- Partial<AnimatedBaseProps<____DangerouslyImpreciseStyle_Internal>>,
997
- >;
994
+ export type ____DangerouslyImpreciseAnimatedStyleProp_Internal =
995
+ WithAnimatedValue<StyleProp<Partial<____DangerouslyImpreciseStyle_Internal>>>;
998
996
 
999
997
  export type ____ViewStyleProp_Internal = StyleProp<
1000
998
  $ReadOnly<Partial<____ViewStyle_Internal>>,
@@ -10,17 +10,22 @@
10
10
 
11
11
  'use strict';
12
12
 
13
+ import type AnimatedNode from '../Animated/nodes/AnimatedNode';
13
14
  import type {
14
15
  ____DangerouslyImpreciseAnimatedStyleProp_Internal,
15
16
  ____FlattenStyleProp_Internal,
16
17
  } from './StyleSheetTypes';
17
18
 
19
+ type NonAnimatedNodeObject<TStyleProp> = TStyleProp extends AnimatedNode
20
+ ? empty
21
+ : TStyleProp;
22
+
18
23
  function flattenStyle<
19
24
  TStyleProp: ____DangerouslyImpreciseAnimatedStyleProp_Internal,
20
25
  >(
21
26
  style: ?TStyleProp,
22
27
  // $FlowFixMe[underconstrained-implicit-instantiation]
23
- ): ?____FlattenStyleProp_Internal<TStyleProp> {
28
+ ): ?NonAnimatedNodeObject<____FlattenStyleProp_Internal<TStyleProp>> {
24
29
  if (style === null || typeof style !== 'object') {
25
30
  return undefined;
26
31
  }
@@ -39,6 +44,7 @@ function flattenStyle<
39
44
  for (const key in computedStyle) {
40
45
  // $FlowFixMe[incompatible-use]
41
46
  // $FlowFixMe[invalid-computed-prop]
47
+ // $FlowFixMe[prop-missing]
42
48
  result[key] = computedStyle[key];
43
49
  }
44
50
  }
@@ -35,7 +35,7 @@ type TextForwardRef = React.ElementRef<
35
35
  *
36
36
  * @see https://reactnative.dev/docs/text
37
37
  */
38
- const Text: component(
38
+ const TextImpl: component(
39
39
  ref?: React.RefSetter<TextForwardRef>,
40
40
  ...props: TextProps
41
41
  ) = React.forwardRef(
@@ -330,7 +330,7 @@ const Text: component(
330
330
  },
331
331
  );
332
332
 
333
- Text.displayName = 'Text';
333
+ TextImpl.displayName = 'Text';
334
334
 
335
335
  type TextPressabilityProps = $ReadOnly<{
336
336
  onLongPress?: ?(event: GestureResponderEvent) => mixed,
@@ -536,4 +536,4 @@ const verticalAlignToTextAlignVerticalMap = {
536
536
  middle: 'center',
537
537
  };
538
538
 
539
- export default Text;
539
+ export default TextImpl;
@@ -35,7 +35,7 @@ type TextForwardRef = React.ElementRef<
35
35
  *
36
36
  * @see https://reactnative.dev/docs/text
37
37
  */
38
- const Text: component(
38
+ const TextImpl: component(
39
39
  ref?: React.RefSetter<TextForwardRef>,
40
40
  ...props: TextProps
41
41
  ) = React.forwardRef(
@@ -370,7 +370,7 @@ const Text: component(
370
370
  },
371
371
  );
372
372
 
373
- Text.displayName = 'Text';
373
+ TextImpl.displayName = 'Text';
374
374
 
375
375
  type TextPressabilityProps = $ReadOnly<{
376
376
  onLongPress?: ?(event: GestureResponderEvent) => mixed,
@@ -576,4 +576,4 @@ const verticalAlignToTextAlignVerticalMap = {
576
576
  middle: 'center',
577
577
  };
578
578
 
579
- export default Text;
579
+ export default TextImpl;
@@ -25,7 +25,7 @@ import type {
25
25
  TextLayoutEvent,
26
26
  } from '../Types/CoreEventTypes';
27
27
 
28
- import React from 'react';
28
+ import * as React from 'react';
29
29
 
30
30
  export type PressRetentionOffset = $ReadOnly<{
31
31
  top: number,
@@ -25,7 +25,7 @@ import type {
25
25
  TextLayoutEvent,
26
26
  } from '../Types/CoreEventTypes';
27
27
 
28
- import React from 'react';
28
+ import * as React from 'react';
29
29
 
30
30
  export type PressRetentionOffset = $ReadOnly<{
31
31
  top: number,
@@ -16,6 +16,8 @@ import NativeEventEmitter from '../EventEmitter/NativeEventEmitter';
16
16
  import EventEmitter from '../vendor/emitter/EventEmitter';
17
17
  import invariant from 'invariant';
18
18
 
19
+ export type {AppearancePreferences};
20
+
19
21
  type Appearance = {
20
22
  colorScheme: ?ColorSchemeName,
21
23
  };
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow strict-local
8
+ * @format
9
+ */
10
+
11
+ // NOTE: This file supports backwards compatibility of subpath (deep) imports
12
+ // from 'react-native' with platform-specific extensions. It can be deleted
13
+ // once we remove the "./*" mapping from package.json "exports".
14
+
15
+ import BackHandler from './BackHandler';
16
+
17
+ export default BackHandler;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @format
8
+ * @flow strict
9
+ */
10
+
11
+ // NOTE: This file supports backwards compatibility of subpath (deep) imports
12
+ // from 'react-native' with platform-specific extensions. It can be deleted
13
+ // once we remove the "./*" mapping from package.json "exports".
14
+
15
+ import Platform from './Platform';
16
+
17
+ export default Platform;
@@ -196,6 +196,8 @@ type Win32Platform = {
196
196
  type WebPlatform = {
197
197
  OS: 'web',
198
198
  // $FlowFixMe[unsafe-getters-setters]
199
+ get Version(): void,
200
+ // $FlowFixMe[unsafe-getters-setters]
199
201
  get constants(): {
200
202
  reactNativeVersion: {
201
203
  major: number,
@@ -13,7 +13,7 @@
13
13
  import type {ReactTestRenderer as ReactTestRendererType} from 'react-test-renderer';
14
14
 
15
15
  import TouchableWithoutFeedback from '../Components/Touchable/TouchableWithoutFeedback';
16
- import React from 'react';
16
+ import * as React from 'react';
17
17
  import ReactTestRenderer from 'react-test-renderer';
18
18
 
19
19
  const Switch = require('../Components/Switch/Switch').default;