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

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 (123) hide show
  1. package/.flowconfig +8 -1
  2. package/CHANGELOG.json +58 -1
  3. package/CHANGELOG.md +22 -4
  4. package/IntegrationTests/ImageCachePolicyTest.js +1 -1
  5. package/IntegrationTests/LayoutEventsTest.js +1 -4
  6. package/Libraries/Animated/AnimatedExports.js.flow +126 -0
  7. package/Libraries/Animated/AnimatedImplementation.js +0 -121
  8. package/Libraries/Animated/animations/Animation.js +8 -4
  9. package/Libraries/Animated/nodes/AnimatedNode.js +2 -2
  10. package/Libraries/Animated/nodes/AnimatedValue.js +8 -4
  11. package/Libraries/BatchedBridge/NativeModules.js +2 -0
  12. package/Libraries/Blob/BlobManager.js +1 -0
  13. package/Libraries/Blob/URL.js +13 -1
  14. package/Libraries/Components/Pressable/Pressable.js +4 -1
  15. package/Libraries/Components/Pressable/Pressable.win32.js +4 -1
  16. package/Libraries/Components/ScrollView/ScrollView.d.ts +2 -2
  17. package/Libraries/Components/ScrollView/ScrollView.js +1 -0
  18. package/Libraries/Components/Switch/Switch.js +7 -3
  19. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +1 -0
  20. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
  21. package/Libraries/Components/TextInput/TextInput.flow.js +25 -0
  22. package/Libraries/Components/TextInput/TextInput.flow.win32.js +25 -1
  23. package/Libraries/Components/TextInput/TextInput.js +3 -0
  24. package/Libraries/Components/TextInput/TextInput.win32.js +2 -0
  25. package/Libraries/Components/View/View.js +18 -21
  26. package/Libraries/Components/View/View.win32.js +21 -24
  27. package/Libraries/Components/View/ViewAccessibility.js +16 -0
  28. package/Libraries/Core/ReactNativeVersion.js +1 -1
  29. package/Libraries/Core/setUpReactDevTools.js +5 -5
  30. package/Libraries/Image/ImageProps.js +2 -3
  31. package/Libraries/Image/ImageSource.js +3 -1
  32. package/Libraries/Image/ImageSourceUtils.js +4 -2
  33. package/Libraries/Lists/FlatList.d.ts +2 -2
  34. package/Libraries/Lists/SectionListModern.js +1 -2
  35. package/Libraries/LogBox/Data/LogBoxData.js +1 -1
  36. package/Libraries/NativeComponent/BaseViewConfig.android.js +1 -0
  37. package/Libraries/NativeComponent/BaseViewConfig.ios.js +1 -0
  38. package/Libraries/NativeModules/specs/NativeDevMenu.js +2 -2
  39. package/Libraries/ReactNative/AppContainer-dev.js +3 -2
  40. package/Libraries/ReactNative/FabricUIManager.js +10 -0
  41. package/Libraries/ReactNative/RendererImplementation.js +6 -5
  42. package/Libraries/ReactNative/getNativeComponentAttributes.js +1 -0
  43. package/Libraries/ReactNative/renderApplication.js +9 -0
  44. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js.flow +51 -0
  45. package/Libraries/Renderer/implementations/ReactFabric-dev.js +4840 -4748
  46. package/Libraries/Renderer/implementations/ReactFabric-prod.js +4947 -4829
  47. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3998 -3888
  48. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +5005 -4948
  49. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +2744 -2652
  50. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +5020 -4933
  51. package/Libraries/Settings/Settings.ios.js +1 -0
  52. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
  53. package/Libraries/StyleSheet/StyleSheetTypes.js +47 -3
  54. package/Libraries/StyleSheet/processBackgroundImage.js +670 -214
  55. package/Libraries/Text/TextNativeComponent.js +0 -4
  56. package/Libraries/Text/TextNativeComponent.win32.js +0 -4
  57. package/index.js +1 -288
  58. package/index.win32.js +3 -292
  59. package/overrides.json +14 -14
  60. package/package.json +20 -20
  61. package/src/private/{devmenu → devsupport/devmenu}/DevMenu.js +1 -1
  62. package/src/private/{inspector → devsupport/devmenu/elementinspector}/BorderBox.js +2 -2
  63. package/src/private/{inspector → devsupport/devmenu/elementinspector}/BoxInspector.js +5 -4
  64. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementBox.js +7 -5
  65. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementProperties.js +10 -9
  66. package/src/private/{inspector → devsupport/devmenu/elementinspector}/Inspector.js +13 -11
  67. package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorOverlay.js +4 -3
  68. package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorPanel.js +8 -7
  69. package/src/private/{inspector → devsupport/devmenu/elementinspector}/NetworkOverlay.js +9 -8
  70. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ReactDevToolsOverlay.js +7 -7
  71. package/src/private/{inspector → devsupport/devmenu/elementinspector}/StyleInspector.js +6 -5
  72. package/src/private/{inspector → devsupport/devmenu/elementinspector}/XHRInterceptor.js +2 -2
  73. package/src/private/{inspector → devsupport/devmenu/elementinspector}/getInspectorDataForViewAtPoint.js +2 -2
  74. package/src/private/{inspector → devsupport/devmenu/elementinspector}/resolveBoxStyle.js +1 -1
  75. package/src/private/{inspector → devsupport/devmenu/perfmonitor}/PerformanceOverlay.js +5 -4
  76. package/src/private/{specs_DEPRECATED/modules → devsupport/devmenu/specs}/NativeDevMenu.js +2 -2
  77. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.android.js +1 -1
  78. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.ios.js +1 -1
  79. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.win32.js +1 -1
  80. package/src/private/{debugging → devsupport/rndevtools}/setUpFuseboxReactDevToolsDispatcher.js +1 -1
  81. package/src/private/{fusebox → devsupport/rndevtools}/specs/NativeReactDevToolsRuntimeSettingsModule.js +2 -2
  82. package/src/private/{specs_DEPRECATED/modules → devsupport/rndevtools/specs}/NativeReactDevToolsSettingsManager.js +2 -2
  83. package/src/private/featureflags/ReactNativeFeatureFlags.js +48 -18
  84. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +11 -5
  85. package/src/private/renderer/errorhandling/ErrorHandlers.js +2 -2
  86. package/src/private/specs_DEPRECATED/modules/NativeAnimatedModule.js +1 -1
  87. package/src/private/specs_DEPRECATED/modules/NativeAnimatedTurboModule.js +1 -1
  88. package/src/private/specs_DEPRECATED/modules/NativeSampleTurboModule.js +3 -0
  89. package/src/private/types/HostInstance.js +2 -2
  90. package/src/private/webapis/performance/PerformanceEntry.js +6 -1
  91. package/src/private/webapis/performance/internals/RawPerformanceEntry.js +3 -0
  92. package/src/private/webapis/performance/specs/NativePerformance.js +10 -1
  93. package/types/index.d.ts +1 -2
  94. package/types/public/ReactNativeTypes.d.ts +2 -2
  95. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js +0 -38
  96. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +0 -22
  97. package/Libraries/Blob/__mocks__/BlobModule.js +0 -16
  98. package/Libraries/Blob/__mocks__/FileReaderModule.js +0 -20
  99. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +0 -32
  100. package/Libraries/Core/__mocks__/ErrorUtils.js +0 -33
  101. package/Libraries/Core/__mocks__/NativeExceptionsManager.js +0 -19
  102. package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +0 -49
  103. package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +0 -118
  104. package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +0 -134
  105. package/Libraries/NewAppScreen/components/Colors.js +0 -19
  106. package/Libraries/NewAppScreen/components/DebugInstructions.js +0 -39
  107. package/Libraries/NewAppScreen/components/Header.js +0 -75
  108. package/Libraries/NewAppScreen/components/HermesBadge.js +0 -51
  109. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +0 -146
  110. package/Libraries/NewAppScreen/components/ReloadInstructions.js +0 -37
  111. package/Libraries/NewAppScreen/components/logo.png +0 -0
  112. package/Libraries/NewAppScreen/index.js +0 -25
  113. package/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +0 -58
  114. package/Libraries/Utilities/__mocks__/BackHandler.js +0 -45
  115. package/Libraries/Utilities/__mocks__/GlobalPerformanceLogger.js +0 -16
  116. package/Libraries/Utilities/__mocks__/PixelRatio.js +0 -25
  117. package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +0 -30
  118. package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +0 -81
  119. package/jest/__tests__/setup-test.js +0 -18
  120. package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +0 -267
  121. package/types/modules/LaunchScreen.d.ts +0 -26
  122. /package/src/private/{devmenu → devsupport/devmenu}/DevMenu.d.ts +0 -0
  123. /package/src/private/{debugging → devsupport/rndevtools}/FuseboxSessionObserver.js +0 -0
@@ -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<<c017072b56932e3a721a3151b725761a>>
7
+ * @generated SignedSource<<6667fc8e4fdd2db0b54c908155b110cf>>
8
8
  * @flow strict
9
9
  */
10
10
 
@@ -51,14 +51,17 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
51
51
  cxxNativeAnimatedEnabled: Getter<boolean>,
52
52
  disableMainQueueSyncDispatchIOS: Getter<boolean>,
53
53
  disableMountItemReorderingAndroid: Getter<boolean>,
54
- disableShadowNodeOnNewArchitectureAndroid: Getter<boolean>,
55
54
  enableAccessibilityOrder: Getter<boolean>,
56
55
  enableAccumulatedUpdatesInRawPropsAndroid: Getter<boolean>,
57
56
  enableBridgelessArchitecture: Getter<boolean>,
58
57
  enableCppPropsIteratorSetter: Getter<boolean>,
58
+ enableCustomFocusSearchOnClippedElementsAndroid: Getter<boolean>,
59
+ enableDestroyShadowTreeRevisionAsync: Getter<boolean>,
60
+ enableDoubleMeasurementFixAndroid: Getter<boolean>,
59
61
  enableEagerRootViewAttachment: Getter<boolean>,
60
62
  enableFabricLogs: Getter<boolean>,
61
63
  enableFabricRenderer: Getter<boolean>,
64
+ enableFixForParentTagDuringReparenting: Getter<boolean>,
62
65
  enableFontScaleChangesUpdatingLayout: Getter<boolean>,
63
66
  enableIOSViewClipToPaddingBox: Getter<boolean>,
64
67
  enableJSRuntimeGCOnMemoryPressureOnIOS: Getter<boolean>,
@@ -66,9 +69,11 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
66
69
  enableLayoutAnimationsOnIOS: Getter<boolean>,
67
70
  enableMainQueueModulesOnIOS: Getter<boolean>,
68
71
  enableNativeCSSParsing: Getter<boolean>,
72
+ enableNetworkEventReporting: Getter<boolean>,
69
73
  enableNewBackgroundAndBorderDrawables: Getter<boolean>,
74
+ enablePreparedTextLayout: Getter<boolean>,
70
75
  enablePropsUpdateReconciliationAndroid: Getter<boolean>,
71
- enableReportEventPaintTime: Getter<boolean>,
76
+ enableResourceTimingAPI: Getter<boolean>,
72
77
  enableSynchronousStateUpdates: Getter<boolean>,
73
78
  enableViewCulling: Getter<boolean>,
74
79
  enableViewRecycling: Getter<boolean>,
@@ -77,14 +82,15 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
77
82
  fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean>,
78
83
  fuseboxEnabledRelease: Getter<boolean>,
79
84
  fuseboxNetworkInspectionEnabled: Getter<boolean>,
80
- removeTurboModuleManagerDelegateMutex: Getter<boolean>,
85
+ incorporateMaxLinesDuringAndroidLayout: Getter<boolean>,
81
86
  traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean>,
87
+ updateRuntimeShadowNodeReferencesOnCommit: Getter<boolean>,
82
88
  useAlwaysAvailableJSErrorHandling: Getter<boolean>,
83
- useEditTextStockAndroidFocusBehavior: Getter<boolean>,
84
89
  useFabricInterop: Getter<boolean>,
85
90
  useNativeViewConfigsInBridgelessMode: Getter<boolean>,
86
91
  useOptimizedEventBatchingOnAndroid: Getter<boolean>,
87
92
  useRawPropsJsiValue: Getter<boolean>,
93
+ useShadowNodeStateOnClone: Getter<boolean>,
88
94
  useTurboModuleInterop: Getter<boolean>,
89
95
  useTurboModules: Getter<boolean>,
90
96
  }>;
@@ -173,10 +179,6 @@ export const disableMainQueueSyncDispatchIOS: Getter<boolean> = createNativeFlag
173
179
  * Prevent FabricMountingManager from reordering mountItems, which may lead to invalid state on the UI thread
174
180
  */
175
181
  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
182
  /**
181
183
  * When enabled, the accessibilityOrder prop will propagate to native platforms and define the accessibility order.
182
184
  */
@@ -193,6 +195,18 @@ export const enableBridgelessArchitecture: Getter<boolean> = createNativeFlagGet
193
195
  * Enable prop iterator setter-style construction of Props in C++ (this flag is not used in Java).
194
196
  */
195
197
  export const enableCppPropsIteratorSetter: Getter<boolean> = createNativeFlagGetter('enableCppPropsIteratorSetter', false);
198
+ /**
199
+ * This enables the fabric implementation of focus search so that we can focus clipped elements
200
+ */
201
+ export const enableCustomFocusSearchOnClippedElementsAndroid: Getter<boolean> = createNativeFlagGetter('enableCustomFocusSearchOnClippedElementsAndroid', true);
202
+ /**
203
+ * Enables destructor calls for ShadowTreeRevision in the background to reduce UI thread work.
204
+ */
205
+ export const enableDestroyShadowTreeRevisionAsync: Getter<boolean> = createNativeFlagGetter('enableDestroyShadowTreeRevisionAsync', false);
206
+ /**
207
+ * When enabled a subset of components will avoid double measurement on Android.
208
+ */
209
+ export const enableDoubleMeasurementFixAndroid: Getter<boolean> = createNativeFlagGetter('enableDoubleMeasurementFixAndroid', false);
196
210
  /**
197
211
  * Feature flag to configure eager attachment of the root view/initialisation of the JS code.
198
212
  */
@@ -205,6 +219,10 @@ export const enableFabricLogs: Getter<boolean> = createNativeFlagGetter('enableF
205
219
  * Enables the use of the Fabric renderer in the whole app.
206
220
  */
207
221
  export const enableFabricRenderer: Getter<boolean> = createNativeFlagGetter('enableFabricRenderer', false);
222
+ /**
223
+ * This feature flag enables a fix for reparenting fix in differentiator
224
+ */
225
+ export const enableFixForParentTagDuringReparenting: Getter<boolean> = createNativeFlagGetter('enableFixForParentTagDuringReparenting', false);
208
226
  /**
209
227
  * Enables font scale changes updating layout for measurable nodes.
210
228
  */
@@ -233,18 +251,26 @@ export const enableMainQueueModulesOnIOS: Getter<boolean> = createNativeFlagGett
233
251
  * Parse CSS strings using the Fabric CSS parser instead of ViewConfig processing
234
252
  */
235
253
  export const enableNativeCSSParsing: Getter<boolean> = createNativeFlagGetter('enableNativeCSSParsing', false);
254
+ /**
255
+ * Enable network event reporting hooks in each native platform through `NetworkReporter`. This flag should be combined with `enableResourceTimingAPI` and `fuseboxNetworkInspectionEnabled` to enable end-to-end reporting behaviour via the Web Performance API and CDP debugging respectively.
256
+ */
257
+ export const enableNetworkEventReporting: Getter<boolean> = createNativeFlagGetter('enableNetworkEventReporting', false);
236
258
  /**
237
259
  * Use BackgroundDrawable and BorderDrawable instead of CSSBackgroundDrawable
238
260
  */
239
- export const enableNewBackgroundAndBorderDrawables: Getter<boolean> = createNativeFlagGetter('enableNewBackgroundAndBorderDrawables', false);
261
+ export const enableNewBackgroundAndBorderDrawables: Getter<boolean> = createNativeFlagGetter('enableNewBackgroundAndBorderDrawables', true);
262
+ /**
263
+ * Enables caching text layout artifacts for later reuse
264
+ */
265
+ export const enablePreparedTextLayout: Getter<boolean> = createNativeFlagGetter('enablePreparedTextLayout', false);
240
266
  /**
241
267
  * When enabled, Android will receive prop updates based on the differences between the last rendered shadow node and the last committed shadow node.
242
268
  */
243
269
  export const enablePropsUpdateReconciliationAndroid: Getter<boolean> = createNativeFlagGetter('enablePropsUpdateReconciliationAndroid', false);
244
270
  /**
245
- * Report paint time inside the Event Timing API implementation (PerformanceObserver).
271
+ * Enables the reporting of network resource timings through `PerformanceObserver`.
246
272
  */
247
- export const enableReportEventPaintTime: Getter<boolean> = createNativeFlagGetter('enableReportEventPaintTime', false);
273
+ export const enableResourceTimingAPI: Getter<boolean> = createNativeFlagGetter('enableResourceTimingAPI', false);
248
274
  /**
249
275
  * Dispatches state updates synchronously in Fabric (e.g.: updates the scroll position in the shadow tree synchronously from the main thread).
250
276
  */
@@ -278,21 +304,21 @@ export const fuseboxEnabledRelease: Getter<boolean> = createNativeFlagGetter('fu
278
304
  */
279
305
  export const fuseboxNetworkInspectionEnabled: Getter<boolean> = createNativeFlagGetter('fuseboxNetworkInspectionEnabled', false);
280
306
  /**
281
- * When enabled, mutex _turboModuleManagerDelegateMutex in RCTTurboModuleManager will not be used
307
+ * Set maxLines and ellipsization during Android layout creation
282
308
  */
283
- export const removeTurboModuleManagerDelegateMutex: Getter<boolean> = createNativeFlagGetter('removeTurboModuleManagerDelegateMutex', false);
309
+ export const incorporateMaxLinesDuringAndroidLayout: Getter<boolean> = createNativeFlagGetter('incorporateMaxLinesDuringAndroidLayout', true);
284
310
  /**
285
311
  * Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
286
312
  */
287
313
  export const traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean> = createNativeFlagGetter('traceTurboModulePromiseRejectionsOnAndroid', false);
288
314
  /**
289
- * In Bridgeless mode, use the always available javascript error reporting pipeline.
315
+ * When enabled, runtime shadow node references will be updated during the commit. This allows running RSNRU from any thread without corrupting the renderer state.
290
316
  */
291
- export const useAlwaysAvailableJSErrorHandling: Getter<boolean> = createNativeFlagGetter('useAlwaysAvailableJSErrorHandling', false);
317
+ export const updateRuntimeShadowNodeReferencesOnCommit: Getter<boolean> = createNativeFlagGetter('updateRuntimeShadowNodeReferencesOnCommit', false);
292
318
  /**
293
- * If true, focusing in ReactEditText will mainly use stock Android requestFocus() behavior. If false it will use legacy custom focus behavior.
319
+ * In Bridgeless mode, use the always available javascript error reporting pipeline.
294
320
  */
295
- export const useEditTextStockAndroidFocusBehavior: Getter<boolean> = createNativeFlagGetter('useEditTextStockAndroidFocusBehavior', true);
321
+ export const useAlwaysAvailableJSErrorHandling: Getter<boolean> = createNativeFlagGetter('useAlwaysAvailableJSErrorHandling', false);
296
322
  /**
297
323
  * Should this application enable the Fabric Interop Layer for Android? If yes, the application will behave so that it can accept non-Fabric components and render them on Fabric. This toggle is controlling extra logic such as custom event dispatching that are needed for the Fabric Interop Layer to work correctly.
298
324
  */
@@ -309,6 +335,10 @@ export const useOptimizedEventBatchingOnAndroid: Getter<boolean> = createNativeF
309
335
  * Instead of using folly::dynamic as internal representation in RawProps and RawValue, use jsi::Value
310
336
  */
311
337
  export const useRawPropsJsiValue: Getter<boolean> = createNativeFlagGetter('useRawPropsJsiValue', false);
338
+ /**
339
+ * Use the state stored on the source shadow node when cloning it instead of reading in the most recent state on the shadow node family.
340
+ */
341
+ export const useShadowNodeStateOnClone: Getter<boolean> = createNativeFlagGetter('useShadowNodeStateOnClone', false);
312
342
  /**
313
343
  * In Bridgeless mode, should legacy NativeModules use the TurboModule system?
314
344
  */
@@ -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<<ae87b24892dd7d9ec92847647be25bab>>
7
+ * @generated SignedSource<<4bf477efaec82ad8e9e4b1bc17705fd2>>
8
8
  * @flow strict
9
9
  */
10
10
 
@@ -29,14 +29,17 @@ export interface Spec extends TurboModule {
29
29
  +cxxNativeAnimatedEnabled?: () => boolean;
30
30
  +disableMainQueueSyncDispatchIOS?: () => boolean;
31
31
  +disableMountItemReorderingAndroid?: () => boolean;
32
- +disableShadowNodeOnNewArchitectureAndroid?: () => boolean;
33
32
  +enableAccessibilityOrder?: () => boolean;
34
33
  +enableAccumulatedUpdatesInRawPropsAndroid?: () => boolean;
35
34
  +enableBridgelessArchitecture?: () => boolean;
36
35
  +enableCppPropsIteratorSetter?: () => boolean;
36
+ +enableCustomFocusSearchOnClippedElementsAndroid?: () => boolean;
37
+ +enableDestroyShadowTreeRevisionAsync?: () => boolean;
38
+ +enableDoubleMeasurementFixAndroid?: () => boolean;
37
39
  +enableEagerRootViewAttachment?: () => boolean;
38
40
  +enableFabricLogs?: () => boolean;
39
41
  +enableFabricRenderer?: () => boolean;
42
+ +enableFixForParentTagDuringReparenting?: () => boolean;
40
43
  +enableFontScaleChangesUpdatingLayout?: () => boolean;
41
44
  +enableIOSViewClipToPaddingBox?: () => boolean;
42
45
  +enableJSRuntimeGCOnMemoryPressureOnIOS?: () => boolean;
@@ -44,9 +47,11 @@ export interface Spec extends TurboModule {
44
47
  +enableLayoutAnimationsOnIOS?: () => boolean;
45
48
  +enableMainQueueModulesOnIOS?: () => boolean;
46
49
  +enableNativeCSSParsing?: () => boolean;
50
+ +enableNetworkEventReporting?: () => boolean;
47
51
  +enableNewBackgroundAndBorderDrawables?: () => boolean;
52
+ +enablePreparedTextLayout?: () => boolean;
48
53
  +enablePropsUpdateReconciliationAndroid?: () => boolean;
49
- +enableReportEventPaintTime?: () => boolean;
54
+ +enableResourceTimingAPI?: () => boolean;
50
55
  +enableSynchronousStateUpdates?: () => boolean;
51
56
  +enableViewCulling?: () => boolean;
52
57
  +enableViewRecycling?: () => boolean;
@@ -55,14 +60,15 @@ export interface Spec extends TurboModule {
55
60
  +fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean;
56
61
  +fuseboxEnabledRelease?: () => boolean;
57
62
  +fuseboxNetworkInspectionEnabled?: () => boolean;
58
- +removeTurboModuleManagerDelegateMutex?: () => boolean;
63
+ +incorporateMaxLinesDuringAndroidLayout?: () => boolean;
59
64
  +traceTurboModulePromiseRejectionsOnAndroid?: () => boolean;
65
+ +updateRuntimeShadowNodeReferencesOnCommit?: () => boolean;
60
66
  +useAlwaysAvailableJSErrorHandling?: () => boolean;
61
- +useEditTextStockAndroidFocusBehavior?: () => boolean;
62
67
  +useFabricInterop?: () => boolean;
63
68
  +useNativeViewConfigsInBridgelessMode?: () => boolean;
64
69
  +useOptimizedEventBatchingOnAndroid?: () => boolean;
65
70
  +useRawPropsJsiValue?: () => boolean;
71
+ +useShadowNodeStateOnClone?: () => boolean;
66
72
  +useTurboModuleInterop?: () => boolean;
67
73
  +useTurboModules?: () => boolean;
68
74
  }
@@ -9,16 +9,16 @@
9
9
  */
10
10
 
11
11
  import type {ExtendedError} from '../../../../Libraries/Core/ExtendedError';
12
- import type {Component as ReactComponent} from 'react';
13
12
 
14
13
  import ExceptionsManager, {
15
14
  SyntheticError,
16
15
  } from '../../../../Libraries/Core/ExceptionsManager';
16
+ import * as React from 'react';
17
17
 
18
18
  type ErrorInfo = {
19
19
  +componentStack?: ?string,
20
20
  // $FlowFixMe[unclear-type] unknown props and state.
21
- +errorBoundary?: ?ReactComponent<any, any>,
21
+ +errorBoundary?: ?React.Component<any, any>,
22
22
  };
23
23
 
24
24
  function getExtendedError(
@@ -13,7 +13,7 @@ import type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';
13
13
  import shouldUseTurboAnimatedModule from '../../../../Libraries/Animated/shouldUseTurboAnimatedModule';
14
14
  import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';
15
15
 
16
- type EndResult = {finished: boolean, value?: number, ...};
16
+ type EndResult = {finished: boolean, value?: number, offset?: number, ...};
17
17
  type EndCallback = (result: EndResult) => void;
18
18
  type SaveValueCallback = (value: number) => void;
19
19
 
@@ -13,7 +13,7 @@ import type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';
13
13
  import shouldUseTurboAnimatedModule from '../../../../Libraries/Animated/shouldUseTurboAnimatedModule';
14
14
  import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';
15
15
 
16
- type EndResult = {finished: boolean, value?: number, ...};
16
+ type EndResult = {finished: boolean, value?: number, offset?: number, ...};
17
17
  type EndCallback = (result: EndResult) => void;
18
18
  type SaveValueCallback = (value: number) => void;
19
19
 
@@ -59,6 +59,9 @@ export interface Spec extends TurboModule {
59
59
  +voidFuncAssert?: () => void;
60
60
  +getObjectAssert?: (arg: Object) => Object;
61
61
  +promiseAssert?: () => Promise<void>;
62
+
63
+ // Android-only
64
+ +getImageUrl?: () => Promise<string | null>;
62
65
  }
63
66
 
64
67
  export default (TurboModuleRegistry.getEnforcing<Spec>(
@@ -38,7 +38,7 @@ export type MeasureLayoutOnSuccessCallback = (
38
38
  * The methods described here are available on most of the default components provided by React Native.
39
39
  * Note, however, that they are not available on composite components that aren't directly backed by a
40
40
  * native view. This will generally include most components that you define in your own app.
41
- * For more information, see [Direct Manipulation](https://reactnative.dev/docs/direct-manipulation).
41
+ * For more information, see [Direct Manipulation](https://reactnative.dev/docs/the-new-architecture/direct-manipulation-new-architecture).
42
42
  * @see https://github.com/facebook/react-native/blob/master/Libraries/Renderer/shims/ReactNativeTypes.js#L87
43
43
  */
44
44
  export interface LegacyHostInstanceMethods {
@@ -100,7 +100,7 @@ export interface LegacyHostInstanceMethods {
100
100
  * This function sends props straight to native. They will not participate in
101
101
  * future diff process - this means that if you do not include them in the
102
102
  * next render, they will remain active (see [Direct
103
- * Manipulation](https://reactnative.dev/docs/direct-manipulation)).
103
+ * Manipulation](https://reactnative.dev/docs/the-new-architecture/direct-manipulation-new-architecture)).
104
104
  */
105
105
  setNativeProps(nativeProps: {...}): void;
106
106
  }
@@ -11,7 +11,12 @@
11
11
  // flowlint unsafe-getters-setters:off
12
12
 
13
13
  export type DOMHighResTimeStamp = number;
14
- export type PerformanceEntryType = 'mark' | 'measure' | 'event' | 'longtask';
14
+ export type PerformanceEntryType =
15
+ | 'mark'
16
+ | 'measure'
17
+ | 'event'
18
+ | 'longtask'
19
+ | 'resource';
15
20
 
16
21
  export type PerformanceEntryJSON = {
17
22
  name: string,
@@ -24,6 +24,7 @@ export const RawPerformanceEntryTypeValues = {
24
24
  MEASURE: 2,
25
25
  EVENT: 3,
26
26
  LONGTASK: 4,
27
+ RESOURCE: 5,
27
28
  };
28
29
 
29
30
  export function rawToPerformanceEntry(
@@ -95,6 +96,8 @@ export function performanceEntryTypeToRaw(
95
96
  return RawPerformanceEntryTypeValues.EVENT;
96
97
  case 'longtask':
97
98
  return RawPerformanceEntryTypeValues.LONGTASK;
99
+ case 'resource':
100
+ return RawPerformanceEntryTypeValues.RESOURCE;
98
101
  default:
99
102
  // Verify exhaustive check with Flow
100
103
  (type: empty);
@@ -24,10 +24,19 @@ export type RawPerformanceEntry = {
24
24
  startTime: number,
25
25
  duration: number,
26
26
 
27
- // For "event" entries only:
27
+ // For PerformanceEventTiming only
28
28
  processingStart?: number,
29
29
  processingEnd?: number,
30
30
  interactionId?: number,
31
+
32
+ // For PerformanceResourceTiming only
33
+ fetchStart?: number,
34
+ requestStart?: number,
35
+ connectStart?: number,
36
+ connectEnd?: number,
37
+ responseStart?: number,
38
+ responseEnd?: number,
39
+ responseStatus?: number,
31
40
  };
32
41
 
33
42
  export type OpaqueNativeObserverHandle = mixed;
package/types/index.d.ts CHANGED
@@ -69,7 +69,6 @@
69
69
  /// <reference path="modules/Codegen.d.ts" />
70
70
  /// <reference path="modules/Devtools.d.ts" />
71
71
  /// <reference types="../src/types/globals.d.ts" />
72
- /// <reference path="modules/LaunchScreen.d.ts" />
73
72
 
74
73
  export * from '../Libraries/ActionSheetIOS/ActionSheetIOS';
75
74
  export * from '../Libraries/Alert/Alert';
@@ -143,7 +142,7 @@ export * as CodegenTypes from '../Libraries/Types/CodegenTypesNamespace';
143
142
  export * from '../Libraries/Types/CoreEventTypes';
144
143
  export * from '../Libraries/Utilities/Appearance';
145
144
  export * from '../Libraries/Utilities/BackHandler';
146
- export * from '../src/private/devmenu/DevMenu';
145
+ export * from '../src/private/devsupport/devmenu/DevMenu';
147
146
  export * from '../Libraries/Utilities/DevSettings';
148
147
  export * from '../Libraries/Utilities/Dimensions';
149
148
  export * from '../Libraries/Utilities/PixelRatio';
@@ -39,7 +39,7 @@ export type MeasureLayoutOnSuccessCallback = (
39
39
  * The methods described here are available on most of the default components provided by React Native.
40
40
  * Note, however, that they are not available on composite components that aren't directly backed by a
41
41
  * native view. This will generally include most components that you define in your own app.
42
- * For more information, see [Direct Manipulation](https://reactnative.dev/docs/direct-manipulation).
42
+ * For more information, see [Direct Manipulation](https://reactnative.dev/docs/the-new-architecture/direct-manipulation-new-architecture).
43
43
  * @see https://github.com/facebook/react-native/blob/master/Libraries/Renderer/shims/ReactNativeTypes.js#L87
44
44
  */
45
45
  export interface NativeMethods {
@@ -95,7 +95,7 @@ export interface NativeMethods {
95
95
  * This function sends props straight to native. They will not participate in
96
96
  * future diff process - this means that if you do not include them in the
97
97
  * next render, they will remain active (see [Direct
98
- * Manipulation](https://reactnative.dev/docs/direct-manipulation)).
98
+ * Manipulation](https://reactnative.dev/docs/the-new-architecture/direct-manipulation-new-architecture)).
99
99
  */
100
100
  setNativeProps(nativeProps: object): void;
101
101
 
@@ -1,38 +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 strict-local
8
- * @format
9
- */
10
-
11
- // These don't actually exist anywhere in the code.
12
-
13
- 'use strict';
14
-
15
- import type {ModuleConfig} from '../NativeModules';
16
-
17
- const remoteModulesConfig: $ReadOnlyArray<ModuleConfig> = [
18
- [
19
- 'RemoteModule1',
20
- null,
21
- ['remoteMethod', 'promiseMethod', 'promiseReturningMethod', 'syncMethod'],
22
- [2 /* promiseReturningMethod */],
23
- [3 /* syncMethod */],
24
- ],
25
- [
26
- 'RemoteModule2',
27
- null,
28
- ['remoteMethod', 'promiseMethod', 'promiseReturningMethod', 'syncMethod'],
29
- [2 /* promiseReturningMethod */],
30
- [3 /* syncMethod */],
31
- ],
32
- ];
33
-
34
- const MessageQueueTestConfig = {
35
- remoteModuleConfig: remoteModulesConfig,
36
- };
37
-
38
- module.exports = MessageQueueTestConfig;
@@ -1,22 +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
- * @format
8
- */
9
-
10
- 'use strict';
11
-
12
- /**
13
- * Dummy module that only exists for the sake of proving that the message queue
14
- * correctly dispatches to commonJS modules. The `testHook` is overridden by test
15
- * cases.
16
- */
17
- const MessageQueueTestModule = {
18
- testHook1: function () {},
19
- testHook2: function () {},
20
- };
21
-
22
- module.exports = MessageQueueTestModule;
@@ -1,16 +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 strict
8
- * @format
9
- */
10
-
11
- const BlobModule = {
12
- createFromParts() {},
13
- release() {},
14
- };
15
-
16
- module.exports = BlobModule;
@@ -1,20 +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 strict
8
- * @format
9
- */
10
-
11
- const FileReaderModule = {
12
- async readAsText(): Promise<string> {
13
- return '';
14
- },
15
- async readAsDataURL(): Promise<string> {
16
- return 'data:text/plain;base64,NDI=';
17
- },
18
- };
19
-
20
- module.exports = FileReaderModule;
@@ -1,32 +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
- * @format
8
- * @flow strict-local
9
- */
10
-
11
- 'use strict';
12
-
13
- import type {HostComponent} from '../../../../src/private/types/HostComponent';
14
-
15
- import requireNativeComponent from '../../../ReactNative/requireNativeComponent';
16
- import * as React from 'react';
17
-
18
- const RCTRefreshControl: HostComponent<{}> = requireNativeComponent<{}>(
19
- 'RCTRefreshControl',
20
- );
21
-
22
- class RefreshControlMock extends React.Component<{...}> {
23
- static latestRef: ?RefreshControlMock;
24
- componentDidMount() {
25
- RefreshControlMock.latestRef = this;
26
- }
27
- render(): React.MixedElement {
28
- return <RCTRefreshControl />;
29
- }
30
- }
31
-
32
- module.exports = RefreshControlMock;
@@ -1,33 +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
- * @format
8
- */
9
-
10
- // This mock only provides short-circuited methods of applyWithGuard and guard.
11
- // A lot of modules rely on these two functions. This mock relieves their tests
12
- // from depending on the real ErrorUtils module. If you need real error handling
13
- // don't use this mock.
14
- 'use strict';
15
-
16
- function execute(fun, context, args) {
17
- return fun.apply(context, args);
18
- }
19
-
20
- function reportError(error) {
21
- throw error;
22
- }
23
-
24
- const ErrorUtils = {
25
- apply: jest.fn(execute),
26
- applyWithGuard: jest.fn(execute),
27
- guard: jest.fn(callback => callback),
28
- inGuard: jest.fn().mockReturnValue(true),
29
- reportError: jest.fn(reportError),
30
- setGlobalHandler: jest.fn(),
31
- };
32
-
33
- module.exports = ErrorUtils;
@@ -1,19 +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 strict
8
- * @format
9
- * @oncall react_native
10
- */
11
-
12
- import typeof NativeExceptionsManager from '../NativeExceptionsManager';
13
-
14
- export default ({
15
- reportFatalException: jest.fn(),
16
- reportSoftException: jest.fn(),
17
- dismissRedbox: jest.fn(),
18
- reportException: jest.fn(),
19
- }: NativeExceptionsManager);
@@ -1,49 +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
- * @format
8
- * @flow strict-local
9
- */
10
-
11
- import type {
12
- EventSubscription,
13
- IEventEmitter,
14
- } from '../../vendor/emitter/EventEmitter';
15
-
16
- import RCTDeviceEventEmitter from '../RCTDeviceEventEmitter';
17
-
18
- /**
19
- * Mock `NativeEventEmitter` to ignore Native Modules.
20
- */
21
- export default class NativeEventEmitter<
22
- TEventToArgsMap: $ReadOnly<Record<string, $ReadOnlyArray<mixed>>>,
23
- > implements IEventEmitter<TEventToArgsMap>
24
- {
25
- addListener<TEvent: $Keys<TEventToArgsMap>>(
26
- eventType: TEvent,
27
- listener: (...args: TEventToArgsMap[TEvent]) => mixed,
28
- context?: mixed,
29
- ): EventSubscription {
30
- return RCTDeviceEventEmitter.addListener(eventType, listener, context);
31
- }
32
-
33
- emit<TEvent: $Keys<TEventToArgsMap>>(
34
- eventType: TEvent,
35
- ...args: TEventToArgsMap[TEvent]
36
- ): void {
37
- RCTDeviceEventEmitter.emit(eventType, ...args);
38
- }
39
-
40
- removeAllListeners<TEvent: $Keys<TEventToArgsMap>>(
41
- eventType?: ?TEvent,
42
- ): void {
43
- RCTDeviceEventEmitter.removeAllListeners(eventType);
44
- }
45
-
46
- listenerCount<TEvent: $Keys<TEventToArgsMap>>(eventType: TEvent): number {
47
- return RCTDeviceEventEmitter.listenerCount(eventType);
48
- }
49
- }