@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
@@ -9,21 +9,21 @@
9
9
  * @oncall react_native
10
10
  */
11
11
 
12
- import type {ViewProps} from '../../../Libraries/Components/View/ViewPropTypes';
12
+ import type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';
13
13
 
14
- import View from '../../../Libraries/Components/View/View';
15
- import UIManager from '../../../Libraries/ReactNative/UIManager';
16
- import Platform from '../../../Libraries/Utilities/Platform';
14
+ import View from '../../../../Libraries/Components/View/View';
15
+ import UIManager from '../../../../Libraries/ReactNative/UIManager';
16
+ import Platform from '../../../../Libraries/Utilities/Platform';
17
17
  import * as React from 'react';
18
18
 
19
19
  const exported: component(
20
20
  ref?: React.RefSetter<React.ElementRef<typeof View>>,
21
21
  ...ViewProps
22
22
  ) = Platform.select({
23
- ios: require('../../../src/private/specs_DEPRECATED/components/RCTSafeAreaViewNativeComponent')
23
+ ios: require('../../../../src/private/specs_DEPRECATED/components/RCTSafeAreaViewNativeComponent')
24
24
  .default,
25
25
  android: UIManager.hasViewManagerConfig('RCTSafeAreaView')
26
- ? require('../../../src/private/specs_DEPRECATED/components/RCTSafeAreaViewNativeComponent')
26
+ ? require('../../../../src/private/specs_DEPRECATED/components/RCTSafeAreaViewNativeComponent')
27
27
  .default
28
28
  : View,
29
29
  default: View,
@@ -9,15 +9,15 @@
9
9
  * @oncall react_native
10
10
  */
11
11
 
12
- import type {ScrollViewNativeProps} from '../../../Libraries/Components/ScrollView/ScrollViewNativeComponentType';
13
- import type {ViewProps} from '../../../Libraries/Components/View/ViewPropTypes';
14
- import type {HostComponent} from '../types/HostComponent';
12
+ import type {ScrollViewNativeProps} from '../../../../Libraries/Components/ScrollView/ScrollViewNativeComponentType';
13
+ import type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';
14
+ import type {HostComponent} from '../../types/HostComponent';
15
15
 
16
- import AndroidHorizontalScrollViewNativeComponent from '../../../Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent';
17
- import ScrollContentViewNativeComponent from '../../../Libraries/Components/ScrollView/ScrollContentViewNativeComponent';
18
- import ScrollViewNativeComponent from '../../../Libraries/Components/ScrollView/ScrollViewNativeComponent';
19
- import Platform from '../../../Libraries/Utilities/Platform';
20
- import AndroidHorizontalScrollContentViewNativeComponent from '../specs_DEPRECATED/components/AndroidHorizontalScrollContentViewNativeComponent';
16
+ import AndroidHorizontalScrollViewNativeComponent from '../../../../Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent';
17
+ import ScrollContentViewNativeComponent from '../../../../Libraries/Components/ScrollView/ScrollContentViewNativeComponent';
18
+ import ScrollViewNativeComponent from '../../../../Libraries/Components/ScrollView/ScrollViewNativeComponent';
19
+ import Platform from '../../../../Libraries/Utilities/Platform';
20
+ import AndroidHorizontalScrollContentViewNativeComponent from '../../specs_DEPRECATED/components/AndroidHorizontalScrollContentViewNativeComponent';
21
21
 
22
22
  export const HScrollViewNativeComponent: HostComponent<ScrollViewNativeProps> =
23
23
  Platform.OS === 'android'
@@ -0,0 +1,25 @@
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
+ * @oncall react_native
10
+ */
11
+
12
+ import type {ScrollViewNativeProps} from '../../../../Libraries/Components/ScrollView/ScrollViewNativeComponentType';
13
+ import type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';
14
+ import type {HostComponent} from '../../types/HostComponent';
15
+
16
+ import ScrollContentViewNativeComponent from '../../../../Libraries/Components/ScrollView/ScrollContentViewNativeComponent';
17
+ import ScrollViewNativeComponent from '../../../../Libraries/Components/ScrollView/ScrollViewNativeComponent';
18
+ import View from '../../../../Libraries/Components/View/View';
19
+ import Platform from '../../../../Libraries/Utilities/Platform';
20
+
21
+ export const VScrollViewNativeComponent: HostComponent<ScrollViewNativeProps> =
22
+ ScrollViewNativeComponent;
23
+
24
+ export const VScrollContentViewNativeComponent: HostComponent<ViewProps> =
25
+ Platform.OS === 'android' ? View : ScrollContentViewNativeComponent;
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<b4da778c80a82ff5c93c7d799ff0c580>>
7
+ * @generated SignedSource<<c017072b56932e3a721a3151b725761a>>
8
8
  * @flow strict
9
9
  */
10
10
 
@@ -30,7 +30,6 @@ export type ReactNativeFeatureFlagsJsOnly = $ReadOnly<{
30
30
  jsOnlyTestFlag: Getter<boolean>,
31
31
  animatedShouldDebounceQueueFlush: Getter<boolean>,
32
32
  animatedShouldUseSingleOp: Getter<boolean>,
33
- avoidAnimatedRefInvalidation: Getter<boolean>,
34
33
  avoidStateUpdateInAnimatedPropsMemo: Getter<boolean>,
35
34
  disableInteractionManager: Getter<boolean>,
36
35
  enableAccessToHostTreeInFabric: Getter<boolean>,
@@ -50,36 +49,35 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
50
49
  commonTestFlagWithoutNativeImplementation: Getter<boolean>,
51
50
  animatedShouldSignalBatch: Getter<boolean>,
52
51
  cxxNativeAnimatedEnabled: Getter<boolean>,
52
+ disableMainQueueSyncDispatchIOS: Getter<boolean>,
53
53
  disableMountItemReorderingAndroid: Getter<boolean>,
54
+ disableShadowNodeOnNewArchitectureAndroid: Getter<boolean>,
55
+ enableAccessibilityOrder: Getter<boolean>,
54
56
  enableAccumulatedUpdatesInRawPropsAndroid: Getter<boolean>,
55
57
  enableBridgelessArchitecture: Getter<boolean>,
56
58
  enableCppPropsIteratorSetter: Getter<boolean>,
57
59
  enableEagerRootViewAttachment: Getter<boolean>,
58
60
  enableFabricLogs: Getter<boolean>,
59
61
  enableFabricRenderer: Getter<boolean>,
62
+ enableFontScaleChangesUpdatingLayout: Getter<boolean>,
60
63
  enableIOSViewClipToPaddingBox: Getter<boolean>,
61
- enableImagePrefetchingAndroid: Getter<boolean>,
62
64
  enableJSRuntimeGCOnMemoryPressureOnIOS: Getter<boolean>,
63
65
  enableLayoutAnimationsOnAndroid: Getter<boolean>,
64
66
  enableLayoutAnimationsOnIOS: Getter<boolean>,
65
- enableLongTaskAPI: Getter<boolean>,
66
67
  enableMainQueueModulesOnIOS: Getter<boolean>,
67
68
  enableNativeCSSParsing: Getter<boolean>,
68
69
  enableNewBackgroundAndBorderDrawables: Getter<boolean>,
69
70
  enablePropsUpdateReconciliationAndroid: Getter<boolean>,
70
71
  enableReportEventPaintTime: Getter<boolean>,
71
72
  enableSynchronousStateUpdates: Getter<boolean>,
72
- enableUIConsistency: Getter<boolean>,
73
73
  enableViewCulling: Getter<boolean>,
74
74
  enableViewRecycling: Getter<boolean>,
75
75
  enableViewRecyclingForText: Getter<boolean>,
76
76
  enableViewRecyclingForView: Getter<boolean>,
77
77
  fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean>,
78
- fixMountingCoordinatorReportedPendingTransactionsOnAndroid: Getter<boolean>,
79
78
  fuseboxEnabledRelease: Getter<boolean>,
80
79
  fuseboxNetworkInspectionEnabled: Getter<boolean>,
81
80
  removeTurboModuleManagerDelegateMutex: Getter<boolean>,
82
- throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS: Getter<boolean>,
83
81
  traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean>,
84
82
  useAlwaysAvailableJSErrorHandling: Getter<boolean>,
85
83
  useEditTextStockAndroidFocusBehavior: Getter<boolean>,
@@ -106,11 +104,6 @@ export const animatedShouldDebounceQueueFlush: Getter<boolean> = createJavaScrip
106
104
  */
107
105
  export const animatedShouldUseSingleOp: Getter<boolean> = createJavaScriptFlagGetter('animatedShouldUseSingleOp', false);
108
106
 
109
- /**
110
- * Changes `useAnimatedProps` to avoid invalidating the callback ref whenever `props` changes.
111
- */
112
- export const avoidAnimatedRefInvalidation: Getter<boolean> = createJavaScriptFlagGetter('avoidAnimatedRefInvalidation', false);
113
-
114
107
  /**
115
108
  * Changes `useAnimatedPropsMemo` to avoid state updates to invalidate the cached `AnimatedProps`.
116
109
  */
@@ -172,10 +165,22 @@ export const animatedShouldSignalBatch: Getter<boolean> = createNativeFlagGetter
172
165
  * Use a C++ implementation of Native Animated instead of the platform implementation.
173
166
  */
174
167
  export const cxxNativeAnimatedEnabled: Getter<boolean> = createNativeFlagGetter('cxxNativeAnimatedEnabled', false);
168
+ /**
169
+ * Disable sync dispatch on the main queue on iOS
170
+ */
171
+ export const disableMainQueueSyncDispatchIOS: Getter<boolean> = createNativeFlagGetter('disableMainQueueSyncDispatchIOS', false);
175
172
  /**
176
173
  * Prevent FabricMountingManager from reordering mountItems, which may lead to invalid state on the UI thread
177
174
  */
178
175
  export const disableMountItemReorderingAndroid: Getter<boolean> = createNativeFlagGetter('disableMountItemReorderingAndroid', false);
176
+ /**
177
+ * Disables the use of ShadowNode (to calculate ViewConfigs) on apps that are fully running on the new architecture on Android
178
+ */
179
+ export const disableShadowNodeOnNewArchitectureAndroid: Getter<boolean> = createNativeFlagGetter('disableShadowNodeOnNewArchitectureAndroid', true);
180
+ /**
181
+ * When enabled, the accessibilityOrder prop will propagate to native platforms and define the accessibility order.
182
+ */
183
+ export const enableAccessibilityOrder: Getter<boolean> = createNativeFlagGetter('enableAccessibilityOrder', false);
179
184
  /**
180
185
  * When enabled, Android will accumulate updates in rawProps to reduce the number of mounting instructions for cascading re-renders.
181
186
  */
@@ -201,13 +206,13 @@ export const enableFabricLogs: Getter<boolean> = createNativeFlagGetter('enableF
201
206
  */
202
207
  export const enableFabricRenderer: Getter<boolean> = createNativeFlagGetter('enableFabricRenderer', false);
203
208
  /**
204
- * iOS Views will clip to their padding box vs border box
209
+ * Enables font scale changes updating layout for measurable nodes.
205
210
  */
206
- export const enableIOSViewClipToPaddingBox: Getter<boolean> = createNativeFlagGetter('enableIOSViewClipToPaddingBox', false);
211
+ export const enableFontScaleChangesUpdatingLayout: Getter<boolean> = createNativeFlagGetter('enableFontScaleChangesUpdatingLayout', false);
207
212
  /**
208
- * When enabled, Android will build and initiate image prefetch requests on ImageShadowNode::layout
213
+ * iOS Views will clip to their padding box vs border box
209
214
  */
210
- export const enableImagePrefetchingAndroid: Getter<boolean> = createNativeFlagGetter('enableImagePrefetchingAndroid', false);
215
+ export const enableIOSViewClipToPaddingBox: Getter<boolean> = createNativeFlagGetter('enableIOSViewClipToPaddingBox', false);
211
216
  /**
212
217
  * Trigger JS runtime GC on memory pressure event on iOS
213
218
  */
@@ -220,10 +225,6 @@ export const enableLayoutAnimationsOnAndroid: Getter<boolean> = createNativeFlag
220
225
  * When enabled, LayoutAnimations API will animate state changes on iOS.
221
226
  */
222
227
  export const enableLayoutAnimationsOnIOS: Getter<boolean> = createNativeFlagGetter('enableLayoutAnimationsOnIOS', true);
223
- /**
224
- * Enables the reporting of long tasks through `PerformanceObserver`. Only works if the event loop is enabled.
225
- */
226
- export const enableLongTaskAPI: Getter<boolean> = createNativeFlagGetter('enableLongTaskAPI', false);
227
228
  /**
228
229
  * Makes modules requiring main queue setup initialize on the main thread, during React Native init.
229
230
  */
@@ -248,10 +249,6 @@ export const enableReportEventPaintTime: Getter<boolean> = createNativeFlagGette
248
249
  * Dispatches state updates synchronously in Fabric (e.g.: updates the scroll position in the shadow tree synchronously from the main thread).
249
250
  */
250
251
  export const enableSynchronousStateUpdates: Getter<boolean> = createNativeFlagGetter('enableSynchronousStateUpdates', false);
251
- /**
252
- * Ensures that JavaScript always has a consistent view of the state of the UI (e.g.: commits done in other threads are not immediately propagated to JS during its execution).
253
- */
254
- export const enableUIConsistency: Getter<boolean> = createNativeFlagGetter('enableUIConsistency', false);
255
252
  /**
256
253
  * Enables View Culling: as soon as a view goes off screen, it can be reused anywhere in the UI and pieced together with other items to create new UI elements.
257
254
  */
@@ -272,10 +269,6 @@ export const enableViewRecyclingForView: Getter<boolean> = createNativeFlagGette
272
269
  * Uses the default event priority instead of the discreet event priority by default when dispatching events from Fabric to React.
273
270
  */
274
271
  export const fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean> = createNativeFlagGetter('fixMappingOfEventPrioritiesBetweenFabricAndReact', false);
275
- /**
276
- * Fixes a limitation on Android where the mounting coordinator would report there are no pending transactions but some of them were actually not processed due to the use of the push model.
277
- */
278
- export const fixMountingCoordinatorReportedPendingTransactionsOnAndroid: Getter<boolean> = createNativeFlagGetter('fixMountingCoordinatorReportedPendingTransactionsOnAndroid', false);
279
272
  /**
280
273
  * Flag determining if the React Native DevTools (Fusebox) CDP backend should be enabled in release builds. This flag is global and should not be changed across React Host lifetimes.
281
274
  */
@@ -288,10 +281,6 @@ export const fuseboxNetworkInspectionEnabled: Getter<boolean> = createNativeFlag
288
281
  * When enabled, mutex _turboModuleManagerDelegateMutex in RCTTurboModuleManager will not be used
289
282
  */
290
283
  export const removeTurboModuleManagerDelegateMutex: Getter<boolean> = createNativeFlagGetter('removeTurboModuleManagerDelegateMutex', false);
291
- /**
292
- * Throw an exception instead of deadlocking when a TurboModule that requires main queue setup is initialized during a synchronous render on iOS.
293
- */
294
- export const throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS: Getter<boolean> = createNativeFlagGetter('throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS', false);
295
284
  /**
296
285
  * Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
297
286
  */
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<8a9e88c68d78cde54e51477a0f06c643>>
7
+ * @generated SignedSource<<ae87b24892dd7d9ec92847647be25bab>>
8
8
  * @flow strict
9
9
  */
10
10
 
@@ -27,36 +27,35 @@ export interface Spec extends TurboModule {
27
27
  +commonTestFlagWithoutNativeImplementation?: () => boolean;
28
28
  +animatedShouldSignalBatch?: () => boolean;
29
29
  +cxxNativeAnimatedEnabled?: () => boolean;
30
+ +disableMainQueueSyncDispatchIOS?: () => boolean;
30
31
  +disableMountItemReorderingAndroid?: () => boolean;
32
+ +disableShadowNodeOnNewArchitectureAndroid?: () => boolean;
33
+ +enableAccessibilityOrder?: () => boolean;
31
34
  +enableAccumulatedUpdatesInRawPropsAndroid?: () => boolean;
32
35
  +enableBridgelessArchitecture?: () => boolean;
33
36
  +enableCppPropsIteratorSetter?: () => boolean;
34
37
  +enableEagerRootViewAttachment?: () => boolean;
35
38
  +enableFabricLogs?: () => boolean;
36
39
  +enableFabricRenderer?: () => boolean;
40
+ +enableFontScaleChangesUpdatingLayout?: () => boolean;
37
41
  +enableIOSViewClipToPaddingBox?: () => boolean;
38
- +enableImagePrefetchingAndroid?: () => boolean;
39
42
  +enableJSRuntimeGCOnMemoryPressureOnIOS?: () => boolean;
40
43
  +enableLayoutAnimationsOnAndroid?: () => boolean;
41
44
  +enableLayoutAnimationsOnIOS?: () => boolean;
42
- +enableLongTaskAPI?: () => boolean;
43
45
  +enableMainQueueModulesOnIOS?: () => boolean;
44
46
  +enableNativeCSSParsing?: () => boolean;
45
47
  +enableNewBackgroundAndBorderDrawables?: () => boolean;
46
48
  +enablePropsUpdateReconciliationAndroid?: () => boolean;
47
49
  +enableReportEventPaintTime?: () => boolean;
48
50
  +enableSynchronousStateUpdates?: () => boolean;
49
- +enableUIConsistency?: () => boolean;
50
51
  +enableViewCulling?: () => boolean;
51
52
  +enableViewRecycling?: () => boolean;
52
53
  +enableViewRecyclingForText?: () => boolean;
53
54
  +enableViewRecyclingForView?: () => boolean;
54
55
  +fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean;
55
- +fixMountingCoordinatorReportedPendingTransactionsOnAndroid?: () => boolean;
56
56
  +fuseboxEnabledRelease?: () => boolean;
57
57
  +fuseboxNetworkInspectionEnabled?: () => boolean;
58
58
  +removeTurboModuleManagerDelegateMutex?: () => boolean;
59
- +throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS?: () => boolean;
60
59
  +traceTurboModulePromiseRejectionsOnAndroid?: () => boolean;
61
60
  +useAlwaysAvailableJSErrorHandling?: () => boolean;
62
61
  +useEditTextStockAndroidFocusBehavior?: () => boolean;
@@ -12,7 +12,7 @@
12
12
 
13
13
  import type {ViewStyleProp} from '../../../Libraries/StyleSheet/StyleSheet';
14
14
 
15
- import React from 'react';
15
+ import * as React from 'react';
16
16
 
17
17
  const View = require('../../../Libraries/Components/View/View').default;
18
18
 
@@ -16,7 +16,7 @@ import type {
16
16
  } from '../../../Libraries/StyleSheet/StyleSheet';
17
17
  import type {InspectedElementFrame} from './Inspector';
18
18
 
19
- import React from 'react';
19
+ import * as React from 'react';
20
20
 
21
21
  const View = require('../../../Libraries/Components/View/View').default;
22
22
  const StyleSheet = require('../../../Libraries/StyleSheet/StyleSheet').default;
@@ -13,7 +13,7 @@
13
13
  import type {ViewStyleProp} from '../../../Libraries/StyleSheet/StyleSheet';
14
14
  import type {InspectedElementFrame} from './Inspector';
15
15
 
16
- import React from 'react';
16
+ import * as React from 'react';
17
17
 
18
18
  const View = require('../../../Libraries/Components/View/View').default;
19
19
  const flattenStyle =
@@ -13,7 +13,7 @@
13
13
  import type {InspectorData} from '../../../Libraries/Renderer/shims/ReactNativeTypes';
14
14
  import type {ViewStyleProp} from '../../../Libraries/StyleSheet/StyleSheet';
15
15
 
16
- import React from 'react';
16
+ import * as React from 'react';
17
17
 
18
18
  const TouchableHighlight =
19
19
  require('../../../Libraries/Components/Touchable/TouchableHighlight').default;
@@ -18,8 +18,8 @@ import type {
18
18
  import type {ViewStyleProp} from '../../../Libraries/StyleSheet/StyleSheet';
19
19
  import type {ReactDevToolsAgent} from '../../../Libraries/Types/ReactDevToolsTypes';
20
20
 
21
- import SafeAreaView from '../components/SafeAreaView_INTERNAL_DO_NOT_USE';
22
- import React from 'react';
21
+ import SafeAreaView from '../components/safeareaview/SafeAreaView_INTERNAL_DO_NOT_USE';
22
+ import * as React from 'react';
23
23
 
24
24
  const View = require('../../../Libraries/Components/View/View').default;
25
25
  const PressabilityDebug = require('../../../Libraries/Pressability/PressabilityDebug');
@@ -13,7 +13,7 @@
13
13
  import type {GestureResponderEvent} from '../../../Libraries/Types/CoreEventTypes';
14
14
  import type {InspectedElement} from './Inspector';
15
15
 
16
- import React from 'react';
16
+ import * as React from 'react';
17
17
 
18
18
  const View = require('../../../Libraries/Components/View/View').default;
19
19
  const StyleSheet = require('../../../Libraries/StyleSheet/StyleSheet').default;
@@ -13,7 +13,7 @@
13
13
  import type {ElementsHierarchy, InspectedElement} from './Inspector';
14
14
 
15
15
  import SafeAreaView from '../../../Libraries/Components/SafeAreaView/SafeAreaView';
16
- import React from 'react';
16
+ import * as React from 'react';
17
17
 
18
18
  const ScrollView =
19
19
  require('../../../Libraries/Components/ScrollView/ScrollView').default;
@@ -14,7 +14,7 @@ import type XMLHttpRequest from '../../../Libraries/Network/XMLHttpRequest';
14
14
  import type {ListRenderItemInfo} from '@react-native/virtualized-lists';
15
15
 
16
16
  import ScrollView from '../../../Libraries/Components/ScrollView/ScrollView';
17
- import React from 'react';
17
+ import * as React from 'react';
18
18
 
19
19
  const TouchableHighlight =
20
20
  require('../../../Libraries/Components/Touchable/TouchableHighlight').default;
@@ -10,7 +10,7 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- import React from 'react';
13
+ import * as React from 'react';
14
14
 
15
15
  const View = require('../../../Libraries/Components/View/View').default;
16
16
  const StyleSheet = require('../../../Libraries/StyleSheet/StyleSheet').default;
@@ -13,7 +13,7 @@
13
13
  import type {ViewStyleProp} from '../../../Libraries/StyleSheet/StyleSheet';
14
14
  import type {____FlattenStyleProp_Internal} from '../../../Libraries/StyleSheet/StyleSheetTypes';
15
15
 
16
- import React from 'react';
16
+ import * as React from 'react';
17
17
 
18
18
  const View = require('../../../Libraries/Components/View/View').default;
19
19
  const StyleSheet = require('../../../Libraries/StyleSheet/StyleSheet').default;
@@ -11,6 +11,6 @@
11
11
  import type {HostInstance} from './HostInstance';
12
12
 
13
13
  export type HostComponent<Config: {...}> = component(
14
- ref: React.RefSetter<HostInstance>,
14
+ ref?: React.RefSetter<HostInstance>,
15
15
  ...Config
16
16
  );
@@ -41,7 +41,7 @@ export type MeasureLayoutOnSuccessCallback = (
41
41
  * For more information, see [Direct Manipulation](https://reactnative.dev/docs/direct-manipulation).
42
42
  * @see https://github.com/facebook/react-native/blob/master/Libraries/Renderer/shims/ReactNativeTypes.js#L87
43
43
  */
44
- export interface NativeMethods {
44
+ export interface LegacyHostInstanceMethods {
45
45
  /**
46
46
  * Removes focus from an input or view. This is the opposite of `focus()`.
47
47
  */
@@ -105,4 +105,12 @@ export interface NativeMethods {
105
105
  setNativeProps(nativeProps: {...}): void;
106
106
  }
107
107
 
108
- export type HostInstance = NativeMethods;
108
+ export type HostInstance = LegacyHostInstanceMethods;
109
+
110
+ /** @deprecated Use HostInstance instead */
111
+ export type NativeMethods = LegacyHostInstanceMethods;
112
+
113
+ /**
114
+ * @deprecated Use HostInstance instead.
115
+ */
116
+ export type NativeMethodsMixin = LegacyHostInstanceMethods;
@@ -226,9 +226,7 @@ export default class Performance {
226
226
  * Returns a double, measured in milliseconds.
227
227
  * https://developer.mozilla.org/en-US/docs/Web/API/Performance/now
228
228
  */
229
- now(): DOMHighResTimeStamp {
230
- return getCurrentTimeStamp();
231
- }
229
+ now: () => DOMHighResTimeStamp = getCurrentTimeStamp;
232
230
 
233
231
  /**
234
232
  * An extension that allows to get back to JS all currently logged marks/measures
@@ -1,231 +0,0 @@
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
8
- * @format
9
- */
10
-
11
- import type {EventCallback} from '../../src/private/webapis/dom/events/EventTarget';
12
- import type Blob from './Blob';
13
-
14
- import Event from '../../src/private/webapis/dom/events/Event';
15
- import {
16
- getEventHandlerAttribute,
17
- setEventHandlerAttribute,
18
- } from '../../src/private/webapis/dom/events/EventHandlerAttributes';
19
- import EventTarget from '../../src/private/webapis/dom/events/EventTarget';
20
- import NativeFileReaderModule from './NativeFileReaderModule';
21
- import {toByteArray} from 'base64-js';
22
-
23
- type ReadyState =
24
- | 0 // EMPTY
25
- | 1 // LOADING
26
- | 2; // DONE
27
-
28
- type ReaderResult = string | ArrayBuffer;
29
-
30
- const EMPTY = 0;
31
- const LOADING = 1;
32
- const DONE = 2;
33
-
34
- class FileReader extends EventTarget {
35
- static EMPTY: number = EMPTY;
36
- static LOADING: number = LOADING;
37
- static DONE: number = DONE;
38
-
39
- EMPTY: number = EMPTY;
40
- LOADING: number = LOADING;
41
- DONE: number = DONE;
42
-
43
- _readyState: ReadyState;
44
- _error: ?Error;
45
- _result: ?ReaderResult;
46
- _aborted: boolean = false;
47
-
48
- constructor() {
49
- super();
50
- this._reset();
51
- }
52
-
53
- _reset(): void {
54
- this._readyState = EMPTY;
55
- this._error = null;
56
- this._result = null;
57
- }
58
-
59
- _setReadyState(newState: ReadyState) {
60
- this._readyState = newState;
61
- this.dispatchEvent(new Event('readystatechange'));
62
- if (newState === DONE) {
63
- if (this._aborted) {
64
- this.dispatchEvent(new Event('abort'));
65
- } else if (this._error) {
66
- this.dispatchEvent(new Event('error'));
67
- } else {
68
- this.dispatchEvent(new Event('load'));
69
- }
70
- this.dispatchEvent(new Event('loadend'));
71
- }
72
- }
73
-
74
- readAsArrayBuffer(blob: ?Blob): void {
75
- this._aborted = false;
76
-
77
- if (blob == null) {
78
- throw new TypeError(
79
- "Failed to execute 'readAsArrayBuffer' on 'FileReader': parameter 1 is not of type 'Blob'",
80
- );
81
- }
82
-
83
- NativeFileReaderModule.readAsDataURL(blob.data).then(
84
- (text: string) => {
85
- if (this._aborted) {
86
- return;
87
- }
88
-
89
- const base64 = text.split(',')[1];
90
- const typedArray = toByteArray(base64);
91
-
92
- this._result = typedArray.buffer;
93
- this._setReadyState(DONE);
94
- },
95
- error => {
96
- if (this._aborted) {
97
- return;
98
- }
99
- this._error = error;
100
- this._setReadyState(DONE);
101
- },
102
- );
103
- }
104
-
105
- readAsDataURL(blob: ?Blob): void {
106
- this._aborted = false;
107
-
108
- if (blob == null) {
109
- throw new TypeError(
110
- "Failed to execute 'readAsDataURL' on 'FileReader': parameter 1 is not of type 'Blob'",
111
- );
112
- }
113
-
114
- NativeFileReaderModule.readAsDataURL(blob.data).then(
115
- (text: string) => {
116
- if (this._aborted) {
117
- return;
118
- }
119
- this._result = text;
120
- this._setReadyState(DONE);
121
- },
122
- error => {
123
- if (this._aborted) {
124
- return;
125
- }
126
- this._error = error;
127
- this._setReadyState(DONE);
128
- },
129
- );
130
- }
131
-
132
- readAsText(blob: ?Blob, encoding: string = 'UTF-8'): void {
133
- this._aborted = false;
134
-
135
- if (blob == null) {
136
- throw new TypeError(
137
- "Failed to execute 'readAsText' on 'FileReader': parameter 1 is not of type 'Blob'",
138
- );
139
- }
140
-
141
- NativeFileReaderModule.readAsText(blob.data, encoding).then(
142
- (text: string) => {
143
- if (this._aborted) {
144
- return;
145
- }
146
- this._result = text;
147
- this._setReadyState(DONE);
148
- },
149
- error => {
150
- if (this._aborted) {
151
- return;
152
- }
153
- this._error = error;
154
- this._setReadyState(DONE);
155
- },
156
- );
157
- }
158
-
159
- abort() {
160
- this._aborted = true;
161
- // only call onreadystatechange if there is something to abort, as per spec
162
- if (this._readyState !== EMPTY && this._readyState !== DONE) {
163
- this._reset();
164
- this._setReadyState(DONE);
165
- }
166
- // Reset again after, in case modified in handler
167
- this._reset();
168
- }
169
-
170
- get readyState(): ReadyState {
171
- return this._readyState;
172
- }
173
-
174
- get error(): ?Error {
175
- return this._error;
176
- }
177
-
178
- get result(): ?ReaderResult {
179
- return this._result;
180
- }
181
-
182
- get onabort(): EventCallback | null {
183
- return getEventHandlerAttribute(this, 'abort');
184
- }
185
-
186
- set onabort(listener: ?EventCallback) {
187
- setEventHandlerAttribute(this, 'abort', listener);
188
- }
189
-
190
- get onerror(): EventCallback | null {
191
- return getEventHandlerAttribute(this, 'error');
192
- }
193
-
194
- set onerror(listener: ?EventCallback) {
195
- setEventHandlerAttribute(this, 'error', listener);
196
- }
197
-
198
- get onload(): EventCallback | null {
199
- return getEventHandlerAttribute(this, 'load');
200
- }
201
-
202
- set onload(listener: ?EventCallback) {
203
- setEventHandlerAttribute(this, 'load', listener);
204
- }
205
-
206
- get onloadstart(): EventCallback | null {
207
- return getEventHandlerAttribute(this, 'loadstart');
208
- }
209
-
210
- set onloadstart(listener: ?EventCallback) {
211
- setEventHandlerAttribute(this, 'loadstart', listener);
212
- }
213
-
214
- get onloadend(): EventCallback | null {
215
- return getEventHandlerAttribute(this, 'loadend');
216
- }
217
-
218
- set onloadend(listener: ?EventCallback) {
219
- setEventHandlerAttribute(this, 'loadend', listener);
220
- }
221
-
222
- get onprogress(): EventCallback | null {
223
- return getEventHandlerAttribute(this, 'progress');
224
- }
225
-
226
- set onprogress(listener: ?EventCallback) {
227
- setEventHandlerAttribute(this, 'progress', listener);
228
- }
229
- }
230
-
231
- export default FileReader;