react-native-windows 0.75.4 → 0.76.0-preview.1

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 (310) hide show
  1. package/.flowconfig +6 -4
  2. package/Directory.Build.props +4 -0
  3. package/Directory.Build.targets +5 -0
  4. package/Libraries/Alert/Alert.js +3 -0
  5. package/Libraries/Alert/Alert.windows.js +3 -0
  6. package/Libraries/Animated/AnimatedEvent.js +1 -1
  7. package/Libraries/Animated/AnimatedImplementation.js +7 -7
  8. package/Libraries/Animated/NativeAnimatedAllowlist.js +111 -0
  9. package/Libraries/Animated/animations/Animation.js +11 -1
  10. package/Libraries/Animated/animations/DecayAnimation.js +1 -1
  11. package/Libraries/Animated/animations/SpringAnimation.js +1 -1
  12. package/Libraries/Animated/animations/TimingAnimation.js +2 -1
  13. package/Libraries/Animated/components/AnimatedScrollView.js +3 -2
  14. package/Libraries/Animated/createAnimatedComponent.js +10 -9
  15. package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
  16. package/Libraries/Animated/nodes/AnimatedInterpolation.js +3 -2
  17. package/Libraries/Animated/nodes/AnimatedNode.js +42 -33
  18. package/Libraries/Animated/nodes/AnimatedObject.js +56 -50
  19. package/Libraries/Animated/nodes/AnimatedProps.js +77 -40
  20. package/Libraries/Animated/nodes/AnimatedStyle.js +103 -59
  21. package/Libraries/Animated/nodes/AnimatedTracking.js +1 -1
  22. package/Libraries/Animated/nodes/AnimatedTransform.js +102 -67
  23. package/Libraries/Animated/nodes/AnimatedValue.js +2 -1
  24. package/Libraries/Animated/nodes/AnimatedWithChildren.js +21 -22
  25. package/Libraries/Animated/useAnimatedProps.js +142 -7
  26. package/Libraries/BatchedBridge/NativeModules.js +2 -0
  27. package/Libraries/Blob/FileReader.js +1 -1
  28. package/Libraries/Blob/URL.js +2 -62
  29. package/Libraries/Blob/URLSearchParams.js +71 -0
  30. package/Libraries/Components/Button.windows.js +0 -1
  31. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -1
  32. package/Libraries/Components/Keyboard/KeyboardExt.js.map +1 -1
  33. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +1 -1
  34. package/Libraries/Components/ScrollView/ScrollView.js +131 -169
  35. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
  36. package/Libraries/Components/StatusBar/StatusBar.js +3 -1
  37. package/Libraries/Components/TextInput/TextInput.d.ts +32 -2
  38. package/Libraries/Components/TextInput/TextInput.js +230 -94
  39. package/Libraries/Components/TextInput/TextInput.windows.js +230 -105
  40. package/Libraries/Components/View/ReactNativeStyleAttributes.js +22 -0
  41. package/Libraries/Components/View/ReactNativeViewAttributes.js +2 -0
  42. package/Libraries/Components/View/ReactNativeViewAttributes.windows.js +2 -0
  43. package/Libraries/Components/View/View.windows.js +32 -30
  44. package/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
  45. package/Libraries/Components/View/ViewNativeComponent.js +0 -1
  46. package/Libraries/Components/View/ViewPropTypes.js +14 -0
  47. package/Libraries/Components/View/ViewPropTypes.windows.js +14 -0
  48. package/Libraries/Core/ExceptionsManager.js +2 -0
  49. package/Libraries/Core/InitializeCore.js +3 -1
  50. package/Libraries/Core/ReactFiberErrorDialog.js +3 -0
  51. package/Libraries/Core/ReactNativeVersion.js +4 -4
  52. package/Libraries/Core/setUpErrorHandling.js +7 -1
  53. package/Libraries/Core/setUpGlobals.js +1 -0
  54. package/Libraries/Core/setUpReactRefresh.js +0 -4
  55. package/Libraries/Image/AssetSourceResolver.js +28 -1
  56. package/Libraries/Image/AssetSourceResolver.windows.js +28 -1
  57. package/Libraries/Image/Image.android.js +9 -14
  58. package/Libraries/Image/Image.ios.js +11 -22
  59. package/Libraries/Image/Image.windows.js +11 -22
  60. package/Libraries/Image/ImageBackground.js +1 -8
  61. package/Libraries/Image/ImageUtils.js +9 -9
  62. package/Libraries/Image/ImageViewNativeComponent.js +1 -0
  63. package/Libraries/Inspector/Inspector.js +3 -2
  64. package/Libraries/Inspector/InspectorPanel.js +16 -10
  65. package/Libraries/Inspector/NetworkOverlay.js +1 -1
  66. package/Libraries/Interaction/TaskQueue.js +1 -0
  67. package/Libraries/Lists/FlatList.js +1 -1
  68. package/Libraries/Lists/SectionList.js +2 -2
  69. package/Libraries/Lists/SectionListModern.js +3 -3
  70. package/Libraries/LogBox/Data/LogBoxData.js +24 -3
  71. package/Libraries/LogBox/LogBoxNotificationContainer.js +3 -2
  72. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +9 -8
  73. package/Libraries/LogBox/UI/LogBoxInspectorHeader.windows.js +9 -8
  74. package/Libraries/Modal/Modal.js +0 -1
  75. package/Libraries/NativeComponent/BaseViewConfig.android.js +8 -0
  76. package/Libraries/NativeComponent/BaseViewConfig.ios.js +7 -0
  77. package/Libraries/NativeComponent/BaseViewConfig.windows.js +7 -0
  78. package/Libraries/NativeComponent/NativeComponentRegistry.js +22 -22
  79. package/Libraries/NativeComponent/StaticViewConfigValidator.js +0 -21
  80. package/Libraries/Network/XMLHttpRequest.js +4 -2
  81. package/Libraries/ReactNative/AppContainer-dev.js +1 -5
  82. package/Libraries/ReactNative/AppContainer-prod.js +1 -5
  83. package/Libraries/ReactNative/AppContainer.js +1 -2
  84. package/Libraries/ReactNative/AppRegistry.d.ts +0 -4
  85. package/Libraries/ReactNative/AppRegistry.js +1 -7
  86. package/Libraries/ReactNative/BridgelessUIManager.js +1 -0
  87. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +1 -1
  88. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +5 -5
  89. package/Libraries/ReactNative/RendererImplementation.js +26 -4
  90. package/Libraries/ReactNative/getNativeComponentAttributes.js +8 -0
  91. package/Libraries/ReactNative/renderApplication.js +1 -3
  92. package/Libraries/Renderer/shims/ReactNativeTypes.js +11 -4
  93. package/Libraries/StyleSheet/StyleSheet.js +1 -1
  94. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +57 -0
  95. package/Libraries/StyleSheet/StyleSheetTypes.js +60 -5
  96. package/Libraries/StyleSheet/processBackgroundImage.js +384 -0
  97. package/Libraries/StyleSheet/processBoxShadow.js +211 -0
  98. package/Libraries/StyleSheet/processFilter.js +231 -42
  99. package/Libraries/Text/Text.js +394 -196
  100. package/Libraries/Text/Text.windows.js +476 -300
  101. package/Libraries/Text/TextNativeComponent.js +2 -1
  102. package/Libraries/TurboModule/TurboModuleRegistry.js +13 -50
  103. package/Libraries/Types/CodegenTypes.js +3 -1
  104. package/Libraries/Utilities/Appearance.js +108 -84
  105. package/Libraries/Utilities/DevLoadingView.js +2 -4
  106. package/Libraries/Utilities/HMRClient.js +2 -1
  107. package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
  108. package/Libraries/Utilities/createPerformanceLogger.js +0 -9
  109. package/Libraries/Utilities/stringifyViewConfig.js +22 -0
  110. package/Libraries/Utilities/useColorScheme.js +3 -3
  111. package/Libraries/WebSocket/WebSocket.js +1 -1
  112. package/Libraries/promiseRejectionTrackingOptions.js +1 -1
  113. package/Libraries/vendor/emitter/EventEmitter.js +6 -5
  114. package/Microsoft.ReactNative/ComponentView.idl +11 -0
  115. package/Microsoft.ReactNative/Composition.Input.idl +1 -0
  116. package/Microsoft.ReactNative/CompositionSwitcher.idl +3 -0
  117. package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp +9 -9
  118. package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.cpp +9 -9
  119. package/Microsoft.ReactNative/Fabric/ComponentView.cpp +7 -9
  120. package/Microsoft.ReactNative/Fabric/ComponentView.h +5 -6
  121. package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.cpp +4 -0
  122. package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.h +1 -0
  123. package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +44 -13
  124. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +42 -5
  125. package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +1 -0
  126. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +81 -63
  127. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +2 -3
  128. package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp +8 -6
  129. package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.h +1 -2
  130. package/Microsoft.ReactNative/Fabric/Composition/FocusManager.cpp +20 -6
  131. package/Microsoft.ReactNative/Fabric/Composition/FocusManager.h +13 -6
  132. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +2 -3
  133. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +1 -2
  134. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +72 -54
  135. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +14 -4
  136. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +26 -8
  137. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +5 -2
  138. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +18 -7
  139. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +1 -2
  140. package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +6 -6
  141. package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.h +1 -2
  142. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +97 -140
  143. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +8 -4
  144. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +18 -11
  145. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h +5 -4
  146. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +0 -13
  147. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h +0 -3
  148. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +29 -4
  149. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +2 -0
  150. package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +1 -2
  151. package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.h +1 -2
  152. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +28 -12
  153. package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/HostPlatformColor.h +33 -0
  154. package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.cpp +26 -9
  155. package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.h +10 -4
  156. package/Microsoft.ReactNative/IReactModuleBuilder.cpp +5 -0
  157. package/Microsoft.ReactNative/IReactModuleBuilder.h +1 -0
  158. package/Microsoft.ReactNative/IReactModuleBuilder.idl +9 -0
  159. package/Microsoft.ReactNative/IReactViewComponentBuilder.idl +8 -1
  160. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +2 -0
  161. package/Microsoft.ReactNative/Modules/AlertModule.cpp +3 -1
  162. package/Microsoft.ReactNative/Modules/AppearanceModule.cpp +1 -1
  163. package/Microsoft.ReactNative/Modules/AppearanceModule.h +7 -1
  164. package/Microsoft.ReactNative/Modules/DevSettingsModule.cpp +3 -3
  165. package/Microsoft.ReactNative/Modules/DevSettingsModule.h +1 -1
  166. package/Microsoft.ReactNative/Modules/LinkingManagerModule.cpp +2 -2
  167. package/Microsoft.ReactNative/Modules/LinkingManagerModule.h +1 -1
  168. package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +9 -0
  169. package/Microsoft.ReactNative/Modules/LogBoxModule.h +2 -0
  170. package/Microsoft.ReactNative/Modules/SampleTurboModule.cpp +121 -0
  171. package/Microsoft.ReactNative/Modules/SampleTurboModule.h +90 -0
  172. package/Microsoft.ReactNative/ReactHost/MsoReactContext.cpp +0 -7
  173. package/Microsoft.ReactNative/ReactHost/MsoReactContext.h +0 -5
  174. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +5 -1
  175. package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.cpp +59 -0
  176. package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.h +23 -0
  177. package/Microsoft.ReactNative/ReactNativeAppBuilder.cpp +179 -0
  178. package/Microsoft.ReactNative/ReactNativeAppBuilder.h +35 -0
  179. package/Microsoft.ReactNative/ReactNativeAppBuilder.idl +69 -0
  180. package/Microsoft.ReactNative/ReactNativeIsland.idl +2 -0
  181. package/Microsoft.ReactNative/ReactNativeWin32App.cpp +82 -0
  182. package/Microsoft.ReactNative/ReactNativeWin32App.h +38 -0
  183. package/Microsoft.ReactNative/TurboModulesProvider.cpp +45 -0
  184. package/Microsoft.ReactNative/Views/DynamicAutomationPeer.cpp +2 -1
  185. package/Microsoft.ReactNative/Views/FlyoutViewManager.cpp +25 -16
  186. package/Microsoft.ReactNative/packages.fabric.lock.json +159 -0
  187. package/Microsoft.ReactNative/packages.lock.json +11 -12
  188. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +3 -4
  189. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +3 -0
  190. package/Microsoft.ReactNative.Cxx/ModuleRegistration.cpp +2 -2
  191. package/Microsoft.ReactNative.Cxx/ModuleRegistration.h +62 -4
  192. package/Microsoft.ReactNative.Cxx/NativeModules.h +131 -14
  193. package/Microsoft.ReactNative.Managed/packages.lock.json +9 -9
  194. package/Microsoft.ReactNative.Managed.CodeGen/ReactNativeNames.cs +10 -2
  195. package/PropertySheets/Autolink.props +1 -1
  196. package/PropertySheets/Bundle.props +1 -1
  197. package/PropertySheets/Codegen.props +1 -1
  198. package/PropertySheets/Generated/PackageVersion.g.props +4 -4
  199. package/PropertySheets/NuGet.LockFile.props +18 -0
  200. package/README.md +29 -29
  201. package/ReactCommon/ReactCommon.vcxproj +5 -1
  202. package/ReactCommon/ReactCommon.vcxproj.filters +11 -2
  203. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +2 -7
  204. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +441 -0
  205. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h +266 -0
  206. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/Utf8.h +56 -0
  207. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Base.h +3 -1
  208. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Bridging.h +2 -2
  209. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/CallbackWrapper.h +1 -1
  210. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Convert.h +172 -0
  211. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/EventEmitter.h +4 -5
  212. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Function.h +2 -2
  213. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +1 -1
  214. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModuleUtils.h +3 -2
  215. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/scrollview/ScrollViewProps.cpp +9 -0
  216. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/LayoutableShadowNode.cpp +363 -0
  217. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/JSRuntimeFactory.h +22 -2
  218. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +118 -51
  219. package/ReactCommon/packages.lock.json +2 -2
  220. package/Scripts/NuGetRestoreForceEvaluateAllSolutions.ps1 +8 -1
  221. package/Scripts/Tfs/Layout-MSRN-Headers.ps1 +2 -2
  222. package/Shared/Modules/WebSocketModule.cpp +1 -2
  223. package/Shared/Networking/WinRTWebSocketResource.cpp +4 -1
  224. package/Shared/Shared.vcxitems +38 -2
  225. package/Shared/Shared.vcxitems.filters +6 -1
  226. package/Shared/TurboModuleManager.cpp +0 -3
  227. package/codegen/NativeLinkingManagerSpec.g.h +3 -3
  228. package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +198 -54
  229. package/codegen/NativeSampleTurboModuleSpec.g.h +35 -0
  230. package/codegen/rnwcoreJSI-generated.cpp +245 -101
  231. package/codegen/rnwcoreJSI.h +847 -548
  232. package/index.js +3 -1
  233. package/index.windows.js +3 -1
  234. package/jest/mockComponent.js +4 -1
  235. package/jest/mockModal.js +1 -3
  236. package/jest/mockScrollView.js +1 -1
  237. package/jest/renderer.js +2 -2
  238. package/jest/setup.js +16 -13
  239. package/package.json +29 -29
  240. package/src/private/animated/NativeAnimatedHelper.js +438 -0
  241. package/src/private/animated/NativeAnimatedValidation.js +64 -0
  242. package/src/private/components/HScrollViewNativeComponents.js +56 -0
  243. package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +27 -0
  244. package/src/private/components/VScrollViewNativeComponents.js +48 -0
  245. package/src/private/components/useSyncOnScroll.js +48 -0
  246. package/src/private/featureflags/ReactNativeFeatureFlags.js +166 -16
  247. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +29 -5
  248. package/src/private/fusebox/FuseboxSessionObserver.js +42 -0
  249. package/{Libraries/Core → src/private/renderer/errorhandling}/ErrorHandlers.js +14 -4
  250. package/src/private/setup/setUpDOM.js +28 -0
  251. package/src/private/setup/setUpIntersectionObserver.js +27 -0
  252. package/src/private/setup/setUpMutationObserver.js +26 -0
  253. package/src/private/setup/setUpPerformanceObserver.js +64 -0
  254. package/src/private/specs/modules/NativeAppearance.js +3 -3
  255. package/src/private/specs/modules/NativeLinkingManager.js +1 -1
  256. package/src/private/specs/modules/NativePlatformConstantsWindows.js +7 -0
  257. package/src/private/specs/modules/NativeSampleTurboModule.js +14 -1
  258. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +6 -4
  259. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserver.js +5 -3
  260. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverEntry.js +3 -3
  261. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverManager.js +14 -17
  262. package/src/private/{specs/modules → webapis/intersectionobserver/specs}/NativeIntersectionObserver.js +2 -2
  263. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver/specs}/__mocks__/NativeIntersectionObserver.js +4 -4
  264. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserver.js +5 -3
  265. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserverManager.js +24 -15
  266. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationRecord.js +4 -6
  267. package/src/private/{specs/modules → webapis/mutationobserver/specs}/NativeMutationObserver.js +2 -2
  268. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver/specs}/__mocks__/NativeMutationObserver.js +5 -5
  269. package/src/private/webapis/performance/{EventCounts.js → EventTiming.js} +65 -3
  270. package/src/private/webapis/performance/LongTasks.js +39 -0
  271. package/src/private/webapis/performance/Performance.js +22 -9
  272. package/src/private/webapis/performance/PerformanceEntry.js +36 -18
  273. package/src/private/webapis/performance/PerformanceObserver.js +29 -43
  274. package/src/private/webapis/performance/RawPerformanceEntry.js +24 -1
  275. package/src/private/webapis/performance/UserTiming.js +17 -12
  276. package/src/private/webapis/performance/specs/NativePerformanceObserver.js +1 -1
  277. package/template/cpp-app/src/AutolinkedNativeModules.g.cpp +1 -1
  278. package/template/cpp-app/src/AutolinkedNativeModules.g.h +1 -1
  279. package/template/cs-app/src/AutolinkedNativeModules.g.cs +1 -1
  280. package/template/index.windows.bundle +1 -1
  281. package/template/metro.config.js +2 -2
  282. package/template/shared-app/src/AutolinkedNativeModules.g.props +1 -1
  283. package/template/shared-app/src/AutolinkedNativeModules.g.targets +1 -1
  284. package/templates/cpp-app/metro.config.js +2 -2
  285. package/templates/cpp-app/template.config.js +5 -5
  286. package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.cpp +1 -1
  287. package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.h +1 -1
  288. package/templates/cpp-app/windows/MyApp/MyApp.cpp +2 -0
  289. package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +1 -1
  290. package/templates/cpp-lib/example/metro.config.js +2 -2
  291. package/templates/cpp-lib/template.config.js +3 -3
  292. package/templates/cpp-lib/windows/MyLib/MyLib.h +3 -3
  293. package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +1 -1
  294. package/types/experimental.d.ts +20 -1
  295. package/Libraries/Animated/NativeAnimatedHelper.js +0 -615
  296. package/Libraries/Core/setUpIntersectionObserver.js +0 -16
  297. package/Libraries/Core/setUpMutationObserver.js +0 -16
  298. package/Libraries/Core/setUpPerformanceObserver.js +0 -18
  299. package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +0 -13
  300. package/Libraries/MutationObserver/NativeMutationObserver.js +0 -13
  301. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +0 -135
  302. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/algorithm/CalculateLayout.cpp +0 -2396
  303. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/config/Config.cpp +0 -136
  304. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/config/Config.h +0 -92
  305. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.cpp +0 -48
  306. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.h +0 -122
  307. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/Node.cpp +0 -388
  308. package/src/private/core/setUpDOM.js +0 -18
  309. package/src/private/webapis/performance/PerformanceEventTiming.js +0 -55
  310. /package/src/private/{core → styles}/composeStyles.js +0 -0
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
7
  * @flow strict
8
- * @generated by scripts/releases/set-rn-version.js
8
+ * @generated by scripts/releases/set-version.js
9
9
  */
10
10
 
11
11
  const version: $ReadOnly<{
@@ -15,9 +15,9 @@ const version: $ReadOnly<{
15
15
  prerelease: string | null,
16
16
  }> = {
17
17
  major: 0,
18
- minor: 75,
19
- patch: 3,
20
- prerelease: null,
18
+ minor: 76,
19
+ patch: 0,
20
+ prerelease: 'rc.0',
21
21
  };
22
22
 
23
23
  module.exports = {version};
@@ -21,7 +21,13 @@ ExceptionsManager.installConsoleErrorReporter();
21
21
  if (!global.__fbDisableExceptionsManager) {
22
22
  const handleError = (e: mixed, isFatal: boolean) => {
23
23
  try {
24
- ExceptionsManager.handleException(e, isFatal);
24
+ // TODO(T196834299): We should really use a c++ turbomodule for this
25
+ if (
26
+ !global.RN$handleException ||
27
+ !global.RN$handleException(e, isFatal)
28
+ ) {
29
+ ExceptionsManager.handleException(e, isFatal);
30
+ }
25
31
  } catch (ee) {
26
32
  console.log('Failed to print error: ', ee.message);
27
33
  throw e;
@@ -8,6 +8,7 @@
8
8
  * @format
9
9
  */
10
10
 
11
+ 'use client';
11
12
  'use strict';
12
13
 
13
14
  /**
@@ -36,10 +36,6 @@ if (__DEV__) {
36
36
  register: ReactRefreshRuntime.register,
37
37
 
38
38
  performReactRefresh() {
39
- if (ReactRefreshRuntime.hasUnrecoverableErrors()) {
40
- DevSettings.reload('Fast Refresh - Unrecoverable');
41
- return;
42
- }
43
39
  ReactRefreshRuntime.performReactRefresh();
44
40
  DevSettings.onFastRefresh();
45
41
  },
@@ -18,7 +18,10 @@ export type ResolvedAssetSource = {|
18
18
  +scale: number,
19
19
  |};
20
20
 
21
- import type {PackagerAsset} from '@react-native/assets-registry/registry';
21
+ import type {
22
+ AssetDestPathResolver,
23
+ PackagerAsset,
24
+ } from '@react-native/assets-registry/registry';
22
25
 
23
26
  const PixelRatio = require('../Utilities/PixelRatio').default;
24
27
  const Platform = require('../Utilities/Platform');
@@ -76,6 +79,10 @@ class AssetSourceResolver {
76
79
  return this.assetServerURL();
77
80
  }
78
81
 
82
+ if (this.asset.resolver != null) {
83
+ return this.getAssetUsingResolver(this.asset.resolver);
84
+ }
85
+
79
86
  if (Platform.OS === 'android') {
80
87
  return this.isLoadedFromFileSystem()
81
88
  ? this.drawableFolderInBundle()
@@ -85,6 +92,26 @@ class AssetSourceResolver {
85
92
  }
86
93
  }
87
94
 
95
+ getAssetUsingResolver(resolver: AssetDestPathResolver): ResolvedAssetSource {
96
+ switch (resolver) {
97
+ case 'android':
98
+ return this.isLoadedFromFileSystem()
99
+ ? this.drawableFolderInBundle()
100
+ : this.resourceIdentifierWithoutScale();
101
+ case 'generic':
102
+ return this.scaledAssetURLNearBundle();
103
+ default:
104
+ throw new Error(
105
+ "Don't know how to get asset via provided resolver: " +
106
+ resolver +
107
+ '\nAsset: ' +
108
+ JSON.stringify(this.asset, null, '\t') +
109
+ '\nPossible resolvers are:' +
110
+ JSON.stringify(['android', 'generic'], null, '\t'),
111
+ );
112
+ }
113
+ }
114
+
88
115
  /**
89
116
  * Returns an absolute URL which can be used to fetch the asset
90
117
  * from the devserver
@@ -18,7 +18,10 @@ export type ResolvedAssetSource = {|
18
18
  +scale: number,
19
19
  |};
20
20
 
21
- import type {PackagerAsset} from '@react-native/assets-registry/registry';
21
+ import type {
22
+ AssetDestPathResolver,
23
+ PackagerAsset,
24
+ } from '@react-native/assets-registry/registry';
22
25
 
23
26
  const PixelRatio = require('../Utilities/PixelRatio').default;
24
27
  const Platform = require('../Utilities/Platform');
@@ -98,6 +101,10 @@ class AssetSourceResolver {
98
101
  return this.assetServerURL();
99
102
  }
100
103
 
104
+ if (this.asset.resolver != null) {
105
+ return this.getAssetUsingResolver(this.asset.resolver);
106
+ }
107
+
101
108
  if (Platform.OS === 'android') {
102
109
  return this.isLoadedFromFileSystem()
103
110
  ? this.drawableFolderInBundle()
@@ -107,6 +114,26 @@ class AssetSourceResolver {
107
114
  }
108
115
  }
109
116
 
117
+ getAssetUsingResolver(resolver: AssetDestPathResolver): ResolvedAssetSource {
118
+ switch (resolver) {
119
+ case 'android':
120
+ return this.isLoadedFromFileSystem()
121
+ ? this.drawableFolderInBundle()
122
+ : this.resourceIdentifierWithoutScale();
123
+ case 'generic':
124
+ return this.scaledAssetURLNearBundle();
125
+ default:
126
+ throw new Error(
127
+ "Don't know how to get asset via provided resolver: " +
128
+ resolver +
129
+ '\nAsset: ' +
130
+ JSON.stringify(this.asset, null, '\t') +
131
+ '\nPossible resolvers are:' +
132
+ JSON.stringify(['android', 'generic'], null, '\t'),
133
+ );
134
+ }
135
+ }
136
+
110
137
  /**
111
138
  * Returns an absolute URL which can be used to fetch the asset
112
139
  * from the devserver
@@ -150,24 +150,20 @@ let BaseImage: AbstractImageAndroid = React.forwardRef(
150
150
  );
151
151
  }
152
152
 
153
- let style;
153
+ let style: ImageStyleProp;
154
154
  let sources;
155
155
  if (Array.isArray(source)) {
156
- style = flattenStyle<ImageStyleProp>([styles.base, props.style]);
156
+ style = [styles.base, props.style];
157
157
  sources = source;
158
158
  } else {
159
159
  const {uri} = source;
160
- const width = source.width ?? props.width;
161
- const height = source.height ?? props.height;
162
- style = flattenStyle<ImageStyleProp>([
163
- {width, height},
164
- styles.base,
165
- props.style,
166
- ]);
167
- sources = [source];
168
160
  if (uri === '') {
169
161
  console.warn('source.uri should not be an empty string');
170
162
  }
163
+ const width = source.width ?? props.width;
164
+ const height = source.height ?? props.height;
165
+ style = [{width, height}, styles.base, props.style];
166
+ sources = [source];
171
167
  }
172
168
 
173
169
  const {height, width, ...restProps} = props;
@@ -203,11 +199,10 @@ let BaseImage: AbstractImageAndroid = React.forwardRef(
203
199
  },
204
200
  };
205
201
 
206
- const objectFit = style?.objectFit
207
- ? convertObjectFitToResizeMode(style.objectFit)
208
- : null;
202
+ const flattenedStyle = flattenStyle<ImageStyleProp>(style);
203
+ const objectFit = convertObjectFitToResizeMode(flattenedStyle?.objectFit);
209
204
  const resizeMode =
210
- objectFit || props.resizeMode || style?.resizeMode || 'cover';
205
+ objectFit || props.resizeMode || flattenedStyle?.resizeMode || 'cover';
211
206
 
212
207
  const actualRef = useWrapRefWithImageAttachedCallbacks(forwardedRef);
213
208
 
@@ -8,7 +8,7 @@
8
8
  * @format
9
9
  */
10
10
 
11
- import type {ImageStyle, ImageStyleProp} from '../StyleSheet/StyleSheet';
11
+ import type {ImageStyleProp} from '../StyleSheet/StyleSheet';
12
12
  import type {RootTag} from '../Types/RootTagTypes';
13
13
  import type {AbstractImageIOS, ImageIOS} from './ImageTypes.flow';
14
14
  import type {ImageSize} from './NativeImageLoaderAndroid';
@@ -112,38 +112,27 @@ let BaseImage: AbstractImageIOS = React.forwardRef((props, forwardedRef) => {
112
112
  height: undefined,
113
113
  };
114
114
 
115
+ let style: ImageStyleProp;
115
116
  let sources;
116
- let style: ImageStyle;
117
-
118
117
  if (Array.isArray(source)) {
119
- style =
120
- flattenStyle<ImageStyleProp>([styles.base, props.style]) ||
121
- ({}: ImageStyle);
118
+ style = [styles.base, props.style];
122
119
  sources = source;
123
120
  } else {
124
121
  const {uri} = source;
125
- const width = source.width ?? props.width;
126
- const height = source.height ?? props.height;
127
- style =
128
- flattenStyle<ImageStyleProp>([
129
- {width, height},
130
- styles.base,
131
- props.style,
132
- ]) || ({}: ImageStyle);
133
- sources = [source];
134
-
135
122
  if (uri === '') {
136
123
  console.warn('source.uri should not be an empty string');
137
124
  }
125
+ const width = source.width ?? props.width;
126
+ const height = source.height ?? props.height;
127
+ style = [{width, height}, styles.base, props.style];
128
+ sources = [source];
138
129
  }
139
130
 
140
- const objectFit =
141
- style.objectFit != null
142
- ? convertObjectFitToResizeMode(style.objectFit)
143
- : null;
131
+ const flattenedStyle = flattenStyle<ImageStyleProp>(style);
132
+ const objectFit = convertObjectFitToResizeMode(flattenedStyle?.objectFit);
144
133
  const resizeMode =
145
- objectFit || props.resizeMode || style.resizeMode || 'cover';
146
- const tintColor = props.tintColor ?? style.tintColor;
134
+ objectFit || props.resizeMode || flattenedStyle?.resizeMode || 'cover';
135
+ const tintColor = props.tintColor ?? flattenedStyle?.tintColor;
147
136
 
148
137
  if (props.children != null) {
149
138
  throw new Error(
@@ -8,7 +8,7 @@
8
8
  * @format
9
9
  */
10
10
 
11
- import type {ImageStyle, ImageStyleProp} from '../StyleSheet/StyleSheet';
11
+ import type {ImageStyleProp} from '../StyleSheet/StyleSheet';
12
12
  import type {RootTag} from '../Types/RootTagTypes';
13
13
  import type {AbstractImageIOS, ImageIOS} from './ImageTypes.flow';
14
14
  import type {ImageSize} from './NativeImageLoaderAndroid';
@@ -114,38 +114,27 @@ let BaseImage: AbstractImageIOS = React.forwardRef((props, forwardedRef) => {
114
114
  height: undefined,
115
115
  };
116
116
 
117
+ let style: ImageStyleProp;
117
118
  let sources;
118
- let style: ImageStyle;
119
-
120
119
  if (Array.isArray(source)) {
121
- style =
122
- flattenStyle<ImageStyleProp>([styles.base, props.style]) ||
123
- ({}: ImageStyle);
120
+ style = [styles.base, props.style];
124
121
  sources = source;
125
122
  } else {
126
123
  const {uri} = source;
127
- const width = source.width ?? props.width;
128
- const height = source.height ?? props.height;
129
- style =
130
- flattenStyle<ImageStyleProp>([
131
- {width, height},
132
- styles.base,
133
- props.style,
134
- ]) || ({}: ImageStyle);
135
- sources = [source];
136
-
137
124
  if (uri === '') {
138
125
  console.warn('source.uri should not be an empty string');
139
126
  }
127
+ const width = source.width ?? props.width;
128
+ const height = source.height ?? props.height;
129
+ style = [{width, height}, styles.base, props.style];
130
+ sources = [source];
140
131
  }
141
132
 
142
- const objectFit =
143
- style.objectFit != null
144
- ? convertObjectFitToResizeMode(style.objectFit)
145
- : null;
133
+ const flattenedStyle = flattenStyle<ImageStyleProp>(style);
134
+ const objectFit = convertObjectFitToResizeMode(flattenedStyle?.objectFit);
146
135
  const resizeMode =
147
- objectFit || props.resizeMode || style.resizeMode || 'cover';
148
- const tintColor = props.tintColor ?? style.tintColor;
136
+ objectFit || props.resizeMode || flattenedStyle?.resizeMode || 'cover';
137
+ const tintColor = props.tintColor ?? flattenedStyle?.tintColor;
149
138
 
150
139
  if (props.children != null) {
151
140
  throw new Error(
@@ -55,14 +55,7 @@ class ImageBackground extends React.Component<ImageBackgroundProps> {
55
55
 
56
56
  _viewRef: ?React.ElementRef<typeof View> = null;
57
57
 
58
- _captureRef = (
59
- ref: null | React$ElementRef<
60
- React$AbstractComponent<
61
- ViewProps,
62
- React.ElementRef<HostComponent<ViewProps>>,
63
- >,
64
- >,
65
- ) => {
58
+ _captureRef = (ref: null | React.ElementRef<HostComponent<ViewProps>>) => {
66
59
  this._viewRef = ref;
67
60
  };
68
61
 
@@ -10,13 +10,13 @@
10
10
 
11
11
  type ResizeMode = 'cover' | 'contain' | 'stretch' | 'repeat' | 'center';
12
12
 
13
- export function convertObjectFitToResizeMode(objectFit: string): ResizeMode {
14
- const objectFitMap = {
15
- contain: 'contain',
16
- cover: 'cover',
17
- fill: 'stretch',
18
- 'scale-down': 'contain',
19
- };
20
- // $FlowFixMe[invalid-computed-prop]
21
- return objectFitMap[objectFit];
13
+ const objectFitMap: {[string]: ResizeMode} = {
14
+ contain: 'contain',
15
+ cover: 'cover',
16
+ fill: 'stretch',
17
+ 'scale-down': 'contain',
18
+ };
19
+
20
+ export function convertObjectFitToResizeMode(objectFit: ?string): ?ResizeMode {
21
+ return objectFit != null ? objectFitMap[objectFit] : undefined;
22
22
  }
@@ -50,6 +50,7 @@ interface NativeCommands {
50
50
  +setIsVisible_EXPERIMENTAL: (
51
51
  viewRef: ElementRef<HostComponent<mixed>>,
52
52
  isVisible: boolean,
53
+ time: number,
53
54
  ) => void;
54
55
  }
55
56
 
@@ -17,6 +17,7 @@ import type {
17
17
  } from '../Renderer/shims/ReactNativeTypes';
18
18
  import type {ViewStyleProp} from '../StyleSheet/StyleSheet';
19
19
  import type {ReactDevToolsAgent} from '../Types/ReactDevToolsTypes';
20
+ import SafeAreaView from '../../src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE';
20
21
 
21
22
  const View = require('../Components/View/View');
22
23
  const PressabilityDebug = require('../Pressability/PressabilityDebug');
@@ -164,7 +165,7 @@ function Inspector({
164
165
  />
165
166
  )}
166
167
 
167
- <View style={[styles.panelContainer, panelContainerStyle]}>
168
+ <SafeAreaView style={[styles.panelContainer, panelContainerStyle]}>
168
169
  <InspectorPanel
169
170
  devtoolsIsOpen={!!reactDevToolsAgent}
170
171
  inspecting={selectedTab === 'elements-inspector'}
@@ -180,7 +181,7 @@ function Inspector({
180
181
  networking={selectedTab === 'network-profiling'}
181
182
  setNetworking={setNetworking}
182
183
  />
183
- </View>
184
+ </SafeAreaView>
184
185
  </View>
185
186
  );
186
187
  }
@@ -80,16 +80,22 @@ class InspectorPanel extends React.Component<Props> {
80
80
  pressed={this.props.inspecting}
81
81
  onClick={this.props.setInspecting}
82
82
  />
83
- <InspectorPanelButton
84
- title={'Perf'}
85
- pressed={this.props.perfing}
86
- onClick={this.props.setPerfing}
87
- />
88
- <InspectorPanelButton
89
- title={'Network'}
90
- pressed={this.props.networking}
91
- onClick={this.props.setNetworking}
92
- />
83
+ {global.RN$Bridgeless === true ? null : (
84
+ // These Inspector Panel sub-features are removed under the New Arch.
85
+ // See https://github.com/react-native-community/discussions-and-proposals/pull/777
86
+ <>
87
+ <InspectorPanelButton
88
+ title={'Perf'}
89
+ pressed={this.props.perfing}
90
+ onClick={this.props.setPerfing}
91
+ />
92
+ <InspectorPanelButton
93
+ title={'Network'}
94
+ pressed={this.props.networking}
95
+ onClick={this.props.setNetworking}
96
+ />
97
+ </>
98
+ )}
93
99
  <InspectorPanelButton
94
100
  title={'Touchables'}
95
101
  pressed={this.props.touchTargeting}
@@ -335,7 +335,7 @@ class NetworkOverlay extends React.Component<Props, State> {
335
335
  _renderItem = ({
336
336
  item,
337
337
  index,
338
- }: RenderItemProps<NetworkRequestInfo>): React.Element<any> => {
338
+ }: RenderItemProps<NetworkRequestInfo>): React.MixedElement => {
339
339
  const tableRowViewStyle = [
340
340
  styles.tableRow,
341
341
  index % 2 === 1 ? styles.tableRowOdd : styles.tableRowEven,
@@ -116,6 +116,7 @@ class TaskQueue {
116
116
  }
117
117
  } catch (e) {
118
118
  e.message =
119
+ // $FlowFixMe[incompatible-type]
119
120
  'TaskQueue: Error with task ' + (task.name || '') + ': ' + e.message;
120
121
  throw e;
121
122
  }
@@ -617,7 +617,7 @@ class FlatList<ItemT> extends React.PureComponent<Props<ItemT>, void> {
617
617
  }
618
618
 
619
619
  _renderer = (
620
- ListItemComponent: ?(React.ComponentType<any> | React.Element<any>),
620
+ ListItemComponent: ?(React.ComponentType<any> | React.MixedElement),
621
621
  renderItem: ?RenderItemType<ItemT>,
622
622
  columnWrapperStyle: ?ViewStyleProp,
623
623
  numColumns: ?number,
@@ -33,7 +33,7 @@ type RequiredProps<SectionT: SectionBase<any>> = {|
33
33
  *
34
34
  * sections: $ReadOnlyArray<{
35
35
  * data: $ReadOnlyArray<SectionItem>,
36
- * renderItem?: ({item: SectionItem, ...}) => ?React.Element<*>,
36
+ * renderItem?: ({item: SectionItem, ...}) => ?React.MixedElement,
37
37
  * ItemSeparatorComponent?: ?ReactClass<{highlighted: boolean, ...}>,
38
38
  * }>
39
39
  */
@@ -55,7 +55,7 @@ type OptionalProps<SectionT: SectionBase<any>> = {|
55
55
  ...
56
56
  },
57
57
  ...
58
- }) => null | React.Element<any>,
58
+ }) => null | React.Node,
59
59
  /**
60
60
  * A marker property for telling the list to re-render (since it implements `PureComponent`). If
61
61
  * any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the
@@ -16,7 +16,7 @@ import type {
16
16
  SectionBase as _SectionBase,
17
17
  VirtualizedSectionListProps,
18
18
  } from '@react-native/virtualized-lists';
19
- import type {AbstractComponent, Element, ElementRef} from 'react';
19
+ import type {AbstractComponent, ElementRef} from 'react';
20
20
 
21
21
  import Platform from '../Utilities/Platform';
22
22
  import {VirtualizedSectionList} from '@react-native/virtualized-lists';
@@ -34,7 +34,7 @@ type RequiredProps<SectionT: SectionBase<any>> = {|
34
34
  *
35
35
  * sections: $ReadOnlyArray<{
36
36
  * data: $ReadOnlyArray<SectionItem>,
37
- * renderItem?: ({item: SectionItem, ...}) => ?React.Element<*>,
37
+ * renderItem?: ({item: SectionItem, ...}) => ?React.MixedElement,
38
38
  * ItemSeparatorComponent?: ?ReactClass<{highlighted: boolean, ...}>,
39
39
  * }>
40
40
  */
@@ -56,7 +56,7 @@ type OptionalProps<SectionT: SectionBase<any>> = {|
56
56
  ...
57
57
  },
58
58
  ...
59
- }) => null | Element<any>,
59
+ }) => null | React.MixedElement,
60
60
  /**
61
61
  * A marker property for telling the list to re-render (since it implements `PureComponent`). If
62
62
  * any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the
@@ -18,6 +18,7 @@ import type {
18
18
  Message,
19
19
  } from './parseLogBoxLog';
20
20
 
21
+ import DebuggerSessionObserver from '../../../src/private/fusebox/FuseboxSessionObserver';
21
22
  import parseErrorStack from '../../Core/Devtools/parseErrorStack';
22
23
  import NativeDevSettings from '../../NativeModules/specs/NativeDevSettings';
23
24
  import NativeLogBox from '../../NativeModules/specs/NativeLogBox';
@@ -75,6 +76,7 @@ let updateTimeout: $FlowFixMe | null = null;
75
76
  let _isDisabled = false;
76
77
  let _selectedIndex = -1;
77
78
  let hasShownFuseboxWarningsMigrationMessage = false;
79
+ let hostTargetSessionObserverSubscription = null;
78
80
 
79
81
  let warningFilter: WarningFilter = function (format) {
80
82
  return {
@@ -196,11 +198,30 @@ function appendNewLog(newLog: LogBoxLog) {
196
198
  }
197
199
 
198
200
  export function addLog(log: LogData): void {
201
+ if (hostTargetSessionObserverSubscription == null) {
202
+ hostTargetSessionObserverSubscription = DebuggerSessionObserver.subscribe(
203
+ hasActiveSession => {
204
+ if (hasActiveSession) {
205
+ clearWarnings();
206
+ } else {
207
+ // Reset the flag so that we can show the message again if new warning was emitted
208
+ hasShownFuseboxWarningsMigrationMessage = false;
209
+ }
210
+ },
211
+ );
212
+ }
213
+
214
+ // If Host has Fusebox support
199
215
  if (log.level === 'warn' && global.__FUSEBOX_HAS_FULL_CONSOLE_SUPPORT__) {
200
- // Under Fusebox, don't report warnings to LogBox.
201
- showFuseboxWarningsMigrationMessageOnce();
216
+ // And there is no active debugging session
217
+ if (!DebuggerSessionObserver.hasActiveSession()) {
218
+ showFuseboxWarningsMigrationMessageOnce();
219
+ }
220
+
221
+ // Don't show LogBox warnings when Host has active debugging session
202
222
  return;
203
223
  }
224
+
204
225
  const errorForStackTrace = new Error();
205
226
 
206
227
  // Parsing logs are expensive so we schedule this
@@ -419,6 +440,7 @@ export function withSubscription(
419
440
  componentDidCatch(err: Error, errorInfo: {componentStack: string, ...}) {
420
441
  /* $FlowFixMe[class-object-subtyping] added when improving typing for
421
442
  * this parameters */
443
+ // $FlowFixMe[incompatible-call]
422
444
  reportLogBoxError(err, errorInfo.componentStack);
423
445
  }
424
446
 
@@ -483,7 +505,6 @@ function showFuseboxWarningsMigrationMessageOnce() {
483
505
  if (NativeDevSettings.openDebugger) {
484
506
  NativeDevSettings.openDebugger();
485
507
  }
486
- clearWarnings();
487
508
  },
488
509
  }),
489
510
  );
@@ -14,6 +14,7 @@ import * as LogBoxData from './Data/LogBoxData';
14
14
  import LogBoxLog from './Data/LogBoxLog';
15
15
  import LogBoxLogNotification from './UI/LogBoxNotification';
16
16
  import * as React from 'react';
17
+ import SafeAreaView from '../../src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE';
17
18
 
18
19
  type Props = $ReadOnly<{|
19
20
  logs: $ReadOnlyArray<LogBoxLog>,
@@ -58,7 +59,7 @@ export function _LogBoxNotificationContainer(props: Props): React.Node {
58
59
  log => log.level === 'error' || log.level === 'fatal',
59
60
  );
60
61
  return (
61
- <View style={styles.list}>
62
+ <SafeAreaView style={styles.list}>
62
63
  {warnings.length > 0 && (
63
64
  <View style={styles.toast}>
64
65
  <LogBoxLogNotification
@@ -81,7 +82,7 @@ export function _LogBoxNotificationContainer(props: Props): React.Node {
81
82
  />
82
83
  </View>
83
84
  )}
84
- </View>
85
+ </SafeAreaView>
85
86
  );
86
87
  }
87
88
 
@@ -8,9 +8,10 @@
8
8
  * @format
9
9
  */
10
10
 
11
+ import type {ViewProps} from '../../Components/View/ViewPropTypes';
11
12
  import type {LogLevel} from '../Data/LogBoxLog';
12
13
 
13
- import StatusBar from '../../Components/StatusBar/StatusBar';
14
+ import SafeAreaView from '../../Components/SafeAreaView/SafeAreaView';
14
15
  import View from '../../Components/View/View';
15
16
  import StyleSheet from '../../StyleSheet/StyleSheet';
16
17
  import Text from '../../Text/Text';
@@ -26,16 +27,19 @@ type Props = $ReadOnly<{
26
27
  level: LogLevel,
27
28
  }>;
28
29
 
30
+ const LogBoxInspectorHeaderSafeArea: React.AbstractComponent<ViewProps> =
31
+ Platform.OS === 'android' ? View : SafeAreaView;
32
+
29
33
  export default function LogBoxInspectorHeader(props: Props): React.Node {
30
34
  if (props.level === 'syntax') {
31
35
  return (
32
- <View style={[styles.safeArea, styles[props.level]]}>
36
+ <LogBoxInspectorHeaderSafeArea style={styles[props.level]}>
33
37
  <View style={styles.header}>
34
38
  <View style={styles.title}>
35
39
  <Text style={styles.titleText}>Failed to compile</Text>
36
40
  </View>
37
41
  </View>
38
- </View>
42
+ </LogBoxInspectorHeaderSafeArea>
39
43
  );
40
44
  }
41
45
 
@@ -47,7 +51,7 @@ export default function LogBoxInspectorHeader(props: Props): React.Node {
47
51
  const titleText = `Log ${props.selectedIndex + 1} of ${props.total}`;
48
52
 
49
53
  return (
50
- <View style={[styles.safeArea, styles[props.level]]}>
54
+ <LogBoxInspectorHeaderSafeArea style={styles[props.level]}>
51
55
  <View style={styles.header}>
52
56
  <LogBoxInspectorHeaderButton
53
57
  disabled={props.total <= 1}
@@ -65,7 +69,7 @@ export default function LogBoxInspectorHeader(props: Props): React.Node {
65
69
  onPress={() => props.onSelectIndex(nextIndex)}
66
70
  />
67
71
  </View>
68
- </View>
72
+ </LogBoxInspectorHeaderSafeArea>
69
73
  );
70
74
  }
71
75
 
@@ -101,7 +105,4 @@ const styles = StyleSheet.create({
101
105
  includeFontPadding: false,
102
106
  lineHeight: 20,
103
107
  },
104
- safeArea: {
105
- paddingTop: Platform.OS === 'android' ? StatusBar.currentHeight : 40,
106
- },
107
108
  });