@office-iss/react-native-win32 0.0.0-canary.291 → 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 (127) hide show
  1. package/.flowconfig +1 -1
  2. package/CHANGELOG.json +16 -1
  3. package/CHANGELOG.md +12 -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/Modal/Modal.js +3 -3
  62. package/Libraries/NativeComponent/BaseViewConfig.js +17 -0
  63. package/Libraries/NativeComponent/PlatformBaseViewConfig.js +2 -2
  64. package/Libraries/Network/RCTNetworking.js +17 -0
  65. package/Libraries/Network/XMLHttpRequest.js +781 -10
  66. package/Libraries/NewAppScreen/components/DebugInstructions.js +1 -1
  67. package/Libraries/NewAppScreen/components/Header.js +1 -1
  68. package/Libraries/NewAppScreen/components/HermesBadge.js +1 -1
  69. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +3 -3
  70. package/Libraries/NewAppScreen/components/ReloadInstructions.js +1 -1
  71. package/Libraries/Performance/Systrace.js +7 -7
  72. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +2 -2
  73. package/Libraries/Settings/Settings.js +13 -19
  74. package/Libraries/Settings/Settings.win32.js +19 -20
  75. package/Libraries/Settings/SettingsFallback.js +33 -0
  76. package/Libraries/StyleSheet/PlatformColorValueTypes.js +15 -0
  77. package/Libraries/StyleSheet/Rect.js +1 -0
  78. package/Libraries/StyleSheet/StyleSheet.js.flow +3 -3
  79. package/Libraries/StyleSheet/StyleSheetTypes.js +28 -30
  80. package/Libraries/StyleSheet/flattenStyle.js +7 -1
  81. package/Libraries/Text/Text.js +3 -3
  82. package/Libraries/Text/Text.win32.js +3 -3
  83. package/Libraries/Text/TextProps.js +1 -1
  84. package/Libraries/Text/TextProps.win32.js +1 -1
  85. package/Libraries/Utilities/Appearance.js +2 -0
  86. package/Libraries/Utilities/BackHandler.js +17 -0
  87. package/Libraries/Utilities/Platform.js +17 -0
  88. package/Libraries/Utilities/PlatformTypes.js +2 -0
  89. package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
  90. package/Libraries/WebSocket/WebSocket.js +313 -8
  91. package/flow/global.js +0 -2
  92. package/index.win32.js +5 -5
  93. package/overrides.json +23 -17
  94. package/package.json +12 -12
  95. package/src/private/animated/NativeAnimatedHelper.js +1 -1
  96. package/src/private/animated/NativeAnimatedHelper.win32.js +1 -1
  97. package/src/private/animated/createAnimatedPropsHook.js +2 -27
  98. package/src/private/components/{SafeAreaView_INTERNAL_DO_NOT_USE.js → safeareaview/SafeAreaView_INTERNAL_DO_NOT_USE.js} +6 -6
  99. package/src/private/components/{HScrollViewNativeComponents.js → scrollview/HScrollViewNativeComponents.js} +8 -8
  100. package/src/private/components/scrollview/VScrollViewNativeComponents.js +25 -0
  101. package/src/private/featureflags/ReactNativeFeatureFlags.js +21 -32
  102. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +5 -6
  103. package/src/private/inspector/BorderBox.js +1 -1
  104. package/src/private/inspector/BoxInspector.js +1 -1
  105. package/src/private/inspector/ElementBox.js +1 -1
  106. package/src/private/inspector/ElementProperties.js +1 -1
  107. package/src/private/inspector/Inspector.js +2 -2
  108. package/src/private/inspector/InspectorOverlay.js +1 -1
  109. package/src/private/inspector/InspectorPanel.js +1 -1
  110. package/src/private/inspector/NetworkOverlay.js +1 -1
  111. package/src/private/inspector/PerformanceOverlay.js +1 -1
  112. package/src/private/inspector/StyleInspector.js +1 -1
  113. package/src/private/types/HostComponent.js +1 -1
  114. package/src/private/types/HostInstance.js +10 -2
  115. package/src/private/webapis/performance/Performance.js +1 -3
  116. package/Libraries/Blob/FileReader_new.js +0 -231
  117. package/Libraries/Blob/FileReader_old.js +0 -186
  118. package/Libraries/Events/CustomEvent.js +0 -32
  119. package/Libraries/Events/EventPolyfill.js +0 -239
  120. package/Libraries/Network/XMLHttpRequest_new.js +0 -794
  121. package/Libraries/Network/XMLHttpRequest_old.js +0 -701
  122. package/Libraries/WebSocket/WebSocketEvent.js +0 -30
  123. package/Libraries/WebSocket/WebSocket_new.js +0 -325
  124. package/Libraries/WebSocket/WebSocket_old.js +0 -297
  125. package/Libraries/WebSocket/__mocks__/event-target-shim.js +0 -27
  126. package/src/private/components/VScrollViewNativeComponents.js +0 -25
  127. package/src/types/third_party/event-target-shim.d.ts +0 -392
@@ -21,12 +21,13 @@ import type {
21
21
  LayoutChangeEvent,
22
22
  NativeSyntheticEvent,
23
23
  } from '../Types/CoreEventTypes';
24
- import typeof Image from './Image';
24
+ import type {ImageType} from './ImageTypes.flow';
25
25
  import type {ImageResizeMode} from './ImageResizeMode';
26
26
  import type {ImageSource, ImageURISource} from './ImageSource';
27
- import type React from 'react';
28
27
  import type {ElementRef, RefSetter} from 'react';
29
28
 
29
+ import * as React from 'react';
30
+
30
31
  export type ImageSourcePropType = ImageSource;
31
32
 
32
33
  type ImageProgressEventDataIOS = {
@@ -128,7 +129,7 @@ export type ImagePropsAndroid = $ReadOnly<{
128
129
  }>;
129
130
 
130
131
  export type ImagePropsBase = $ReadOnly<{
131
- ...$Diff<ViewProps, $ReadOnly<{style: ?ViewStyleProp}>>,
132
+ ...Omit<ViewProps, 'style'>,
132
133
  /**
133
134
  * When true, indicates the image is an accessibility element.
134
135
  *
@@ -367,5 +368,5 @@ export type ImageBackgroundProps = $ReadOnly<{
367
368
  *
368
369
  * See https://reactnative.dev/docs/imagebackground#imageref
369
370
  */
370
- imageRef?: RefSetter<ElementRef<Image>>,
371
+ imageRef?: RefSetter<ElementRef<ImageType>>,
371
372
  }>;
@@ -83,6 +83,6 @@ export type AbstractImageIOS = component(
83
83
 
84
84
  export type ImageIOS = AbstractImageIOS & ImageComponentStaticsIOS;
85
85
 
86
- export type Image = ImageIOS | ImageAndroid;
86
+ export type ImageType = ImageIOS | ImageAndroid;
87
87
 
88
88
  export type {ImageProps} from './ImageProps';
@@ -22,7 +22,7 @@ import {type ScrollResponderType} from '../Components/ScrollView/ScrollView';
22
22
  import View from '../Components/View/View';
23
23
  import VirtualizedLists from '@react-native/virtualized-lists';
24
24
  import memoizeOne from 'memoize-one';
25
- import React from 'react';
25
+ import * as React from 'react';
26
26
 
27
27
  const StyleSheet = require('../StyleSheet/StyleSheet').default;
28
28
  const deepDiffer = require('../Utilities/differ/deepDiffer').default;
@@ -170,7 +170,7 @@ export type SectionListProps<ItemT, SectionT = DefaultSectionT> = {
170
170
  *
171
171
  */
172
172
  export default class SectionList<
173
- ItemT,
173
+ ItemT = any,
174
174
  SectionT = DefaultSectionT,
175
175
  > extends React.PureComponent<SectionListProps<ItemT, SectionT>> {
176
176
  props: SectionListProps<ItemT, SectionT>;
@@ -21,7 +21,8 @@ import type {ElementRef} from 'react';
21
21
 
22
22
  import Platform from '../Utilities/Platform';
23
23
  import VirtualizedLists from '@react-native/virtualized-lists';
24
- import React, {forwardRef, useImperativeHandle, useRef} from 'react';
24
+ import * as React from 'react';
25
+ import {forwardRef, useImperativeHandle, useRef} from 'react';
25
26
 
26
27
  const VirtualizedSectionList = VirtualizedLists.VirtualizedSectionList;
27
28
 
@@ -8,7 +8,7 @@
8
8
  * @format
9
9
  */
10
10
 
11
- import SafeAreaView from '../../src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE';
11
+ import SafeAreaView from '../../src/private/components/safeareaview/SafeAreaView_INTERNAL_DO_NOT_USE';
12
12
  import View from '../Components/View/View';
13
13
  import StyleSheet from '../StyleSheet/StyleSheet';
14
14
  import * as LogBoxData from './Data/LogBoxData';
@@ -19,7 +19,7 @@ import {type EventSubscription} from '../vendor/emitter/EventEmitter';
19
19
  import NativeModalManager from './NativeModalManager';
20
20
  import RCTModalHostView from './RCTModalHostViewNativeComponent';
21
21
  import VirtualizedLists from '@react-native/virtualized-lists';
22
- import React from 'react';
22
+ import * as React from 'react';
23
23
 
24
24
  const ScrollView = require('../Components/ScrollView/ScrollView').default;
25
25
  const View = require('../Components/View/View').default;
@@ -197,11 +197,11 @@ function confirmProps(props: ModalProps) {
197
197
 
198
198
  // Create a state to track whether the Modal is rendering or not.
199
199
  // This is the only prop that controls whether the modal is rendered or not.
200
- type State = {
200
+ type ModalState = {
201
201
  isRendered: boolean,
202
202
  };
203
203
 
204
- class Modal extends React.Component<ModalProps, State> {
204
+ class Modal extends React.Component<ModalProps, ModalState> {
205
205
  static defaultProps: {hardwareAccelerated: boolean, visible: boolean} = {
206
206
  visible: true,
207
207
  hardwareAccelerated: false,
@@ -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 BaseViewConfig from './BaseViewConfig';
16
+
17
+ export default BaseViewConfig;
@@ -12,9 +12,9 @@ import type {PartialViewConfig} from '../Renderer/shims/ReactNativeTypes';
12
12
 
13
13
  import BaseViewConfig from './BaseViewConfig';
14
14
 
15
- export type PartialViewConfigWithoutName = $Rest<
15
+ export type PartialViewConfigWithoutName = Omit<
16
16
  PartialViewConfig,
17
- {uiViewClassName: string},
17
+ 'uiViewClassName',
18
18
  >;
19
19
 
20
20
  const PlatformBaseViewConfig: PartialViewConfigWithoutName = BaseViewConfig;
@@ -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 RCTNetworking from './RCTNetworking';
16
+
17
+ export default RCTNetworking;