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

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 (318) 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/KeyboardAvoidingView.js +17 -0
  33. package/Libraries/Components/Keyboard/KeyboardExt.js.map +1 -1
  34. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +1 -1
  35. package/Libraries/Components/ScrollView/ScrollView.js +131 -169
  36. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +3 -0
  37. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.windows.js +3 -0
  38. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
  39. package/Libraries/Components/StatusBar/StatusBar.js +3 -1
  40. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +10 -0
  41. package/Libraries/Components/TextInput/TextInput.d.ts +32 -2
  42. package/Libraries/Components/TextInput/TextInput.js +230 -94
  43. package/Libraries/Components/TextInput/TextInput.windows.js +230 -105
  44. package/Libraries/Components/View/ReactNativeStyleAttributes.js +23 -1
  45. package/Libraries/Components/View/ReactNativeViewAttributes.js +2 -0
  46. package/Libraries/Components/View/ReactNativeViewAttributes.windows.js +2 -0
  47. package/Libraries/Components/View/View.windows.js +32 -30
  48. package/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
  49. package/Libraries/Components/View/ViewNativeComponent.js +0 -1
  50. package/Libraries/Components/View/ViewPropTypes.js +14 -0
  51. package/Libraries/Components/View/ViewPropTypes.windows.js +14 -0
  52. package/Libraries/Core/ExceptionsManager.js +2 -0
  53. package/Libraries/Core/InitializeCore.js +3 -1
  54. package/Libraries/Core/ReactFiberErrorDialog.js +3 -0
  55. package/Libraries/Core/ReactNativeVersion.js +4 -4
  56. package/Libraries/Core/setUpDeveloperTools.js +5 -1
  57. package/Libraries/Core/setUpErrorHandling.js +7 -1
  58. package/Libraries/Core/setUpGlobals.js +1 -0
  59. package/Libraries/Core/setUpReactRefresh.js +0 -4
  60. package/Libraries/Image/AssetSourceResolver.js +28 -1
  61. package/Libraries/Image/AssetSourceResolver.windows.js +28 -1
  62. package/Libraries/Image/Image.android.js +9 -14
  63. package/Libraries/Image/Image.ios.js +11 -22
  64. package/Libraries/Image/Image.windows.js +11 -22
  65. package/Libraries/Image/ImageBackground.js +1 -8
  66. package/Libraries/Image/ImageUtils.js +9 -9
  67. package/Libraries/Image/ImageViewNativeComponent.js +1 -0
  68. package/Libraries/Inspector/Inspector.js +3 -2
  69. package/Libraries/Inspector/InspectorPanel.js +16 -10
  70. package/Libraries/Inspector/NetworkOverlay.js +1 -1
  71. package/Libraries/Interaction/TaskQueue.js +1 -0
  72. package/Libraries/Lists/FlatList.js +1 -1
  73. package/Libraries/Lists/SectionList.js +2 -2
  74. package/Libraries/Lists/SectionListModern.js +3 -3
  75. package/Libraries/LogBox/Data/LogBoxData.js +24 -3
  76. package/Libraries/LogBox/LogBoxNotificationContainer.js +3 -2
  77. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +9 -8
  78. package/Libraries/LogBox/UI/LogBoxInspectorHeader.windows.js +9 -8
  79. package/Libraries/Modal/Modal.js +0 -1
  80. package/Libraries/NativeComponent/BaseViewConfig.android.js +9 -1
  81. package/Libraries/NativeComponent/BaseViewConfig.ios.js +17 -1
  82. package/Libraries/NativeComponent/BaseViewConfig.windows.js +17 -1
  83. package/Libraries/NativeComponent/NativeComponentRegistry.js +22 -22
  84. package/Libraries/NativeComponent/StaticViewConfigValidator.js +0 -21
  85. package/Libraries/Network/XMLHttpRequest.js +4 -2
  86. package/Libraries/ReactNative/AppContainer-dev.js +1 -5
  87. package/Libraries/ReactNative/AppContainer-prod.js +1 -5
  88. package/Libraries/ReactNative/AppContainer.js +1 -2
  89. package/Libraries/ReactNative/AppRegistry.d.ts +0 -4
  90. package/Libraries/ReactNative/AppRegistry.js +1 -7
  91. package/Libraries/ReactNative/BridgelessUIManager.js +1 -0
  92. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +1 -1
  93. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +5 -5
  94. package/Libraries/ReactNative/RendererImplementation.js +26 -4
  95. package/Libraries/ReactNative/getNativeComponentAttributes.js +12 -0
  96. package/Libraries/ReactNative/renderApplication.js +1 -3
  97. package/Libraries/Renderer/shims/ReactNativeTypes.js +11 -4
  98. package/Libraries/StyleSheet/StyleSheet.js +1 -1
  99. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +152 -2
  100. package/Libraries/StyleSheet/StyleSheetTypes.js +60 -5
  101. package/Libraries/StyleSheet/processBackgroundImage.js +384 -0
  102. package/Libraries/StyleSheet/processBoxShadow.js +209 -0
  103. package/Libraries/StyleSheet/processFilter.js +231 -42
  104. package/Libraries/Text/Text.js +394 -196
  105. package/Libraries/Text/Text.windows.js +476 -300
  106. package/Libraries/Text/TextNativeComponent.js +2 -1
  107. package/Libraries/TurboModule/TurboModuleRegistry.js +13 -50
  108. package/Libraries/Types/CodegenTypes.js +3 -1
  109. package/Libraries/Utilities/Appearance.js +108 -84
  110. package/Libraries/Utilities/DevLoadingView.js +2 -4
  111. package/Libraries/Utilities/HMRClient.js +8 -6
  112. package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
  113. package/Libraries/Utilities/createPerformanceLogger.js +0 -9
  114. package/Libraries/Utilities/stringifyViewConfig.js +22 -0
  115. package/Libraries/Utilities/useColorScheme.js +3 -3
  116. package/Libraries/WebSocket/WebSocket.js +1 -1
  117. package/Libraries/promiseRejectionTrackingOptions.js +1 -1
  118. package/Libraries/vendor/emitter/EventEmitter.js +6 -5
  119. package/Microsoft.ReactNative/ComponentView.idl +11 -0
  120. package/Microsoft.ReactNative/Composition.Input.idl +1 -0
  121. package/Microsoft.ReactNative/CompositionSwitcher.idl +3 -0
  122. package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp +9 -9
  123. package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.cpp +9 -9
  124. package/Microsoft.ReactNative/Fabric/ComponentView.cpp +7 -9
  125. package/Microsoft.ReactNative/Fabric/ComponentView.h +5 -6
  126. package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.cpp +4 -0
  127. package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.h +1 -0
  128. package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +44 -13
  129. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +42 -5
  130. package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +1 -0
  131. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +81 -63
  132. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +2 -3
  133. package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp +8 -6
  134. package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.h +1 -2
  135. package/Microsoft.ReactNative/Fabric/Composition/FocusManager.cpp +20 -6
  136. package/Microsoft.ReactNative/Fabric/Composition/FocusManager.h +13 -6
  137. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +2 -3
  138. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +1 -2
  139. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +72 -54
  140. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +14 -4
  141. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +26 -8
  142. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +5 -2
  143. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +18 -7
  144. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +1 -2
  145. package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +6 -6
  146. package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.h +1 -2
  147. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +97 -140
  148. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +8 -4
  149. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +18 -11
  150. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h +5 -4
  151. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +0 -13
  152. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h +0 -3
  153. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +29 -4
  154. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +2 -0
  155. package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +1 -2
  156. package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.h +1 -2
  157. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +28 -12
  158. package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/HostPlatformColor.h +33 -0
  159. package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.cpp +26 -9
  160. package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.h +10 -4
  161. package/Microsoft.ReactNative/IReactModuleBuilder.cpp +5 -0
  162. package/Microsoft.ReactNative/IReactModuleBuilder.h +1 -0
  163. package/Microsoft.ReactNative/IReactModuleBuilder.idl +9 -0
  164. package/Microsoft.ReactNative/IReactViewComponentBuilder.idl +8 -1
  165. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +2 -0
  166. package/Microsoft.ReactNative/Modules/AlertModule.cpp +3 -1
  167. package/Microsoft.ReactNative/Modules/AppearanceModule.cpp +1 -1
  168. package/Microsoft.ReactNative/Modules/AppearanceModule.h +7 -1
  169. package/Microsoft.ReactNative/Modules/DevSettingsModule.cpp +3 -3
  170. package/Microsoft.ReactNative/Modules/DevSettingsModule.h +1 -1
  171. package/Microsoft.ReactNative/Modules/LinkingManagerModule.cpp +2 -2
  172. package/Microsoft.ReactNative/Modules/LinkingManagerModule.h +1 -1
  173. package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +9 -0
  174. package/Microsoft.ReactNative/Modules/LogBoxModule.h +2 -0
  175. package/Microsoft.ReactNative/Modules/SampleTurboModule.cpp +121 -0
  176. package/Microsoft.ReactNative/Modules/SampleTurboModule.h +90 -0
  177. package/Microsoft.ReactNative/ReactHost/MsoReactContext.cpp +0 -7
  178. package/Microsoft.ReactNative/ReactHost/MsoReactContext.h +0 -5
  179. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +5 -1
  180. package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.cpp +59 -0
  181. package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.h +23 -0
  182. package/Microsoft.ReactNative/ReactNativeAppBuilder.cpp +179 -0
  183. package/Microsoft.ReactNative/ReactNativeAppBuilder.h +35 -0
  184. package/Microsoft.ReactNative/ReactNativeAppBuilder.idl +69 -0
  185. package/Microsoft.ReactNative/ReactNativeIsland.idl +2 -0
  186. package/Microsoft.ReactNative/ReactNativeWin32App.cpp +82 -0
  187. package/Microsoft.ReactNative/ReactNativeWin32App.h +38 -0
  188. package/Microsoft.ReactNative/TurboModulesProvider.cpp +45 -0
  189. package/Microsoft.ReactNative/Views/DynamicAutomationPeer.cpp +2 -1
  190. package/Microsoft.ReactNative/Views/FlyoutViewManager.cpp +25 -16
  191. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +3 -4
  192. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +3 -0
  193. package/Microsoft.ReactNative.Cxx/ModuleRegistration.cpp +2 -2
  194. package/Microsoft.ReactNative.Cxx/ModuleRegistration.h +62 -4
  195. package/Microsoft.ReactNative.Cxx/NativeModules.h +131 -14
  196. package/Microsoft.ReactNative.Managed.CodeGen/ReactNativeNames.cs +10 -2
  197. package/PropertySheets/Autolink.props +1 -1
  198. package/PropertySheets/Bundle.props +1 -1
  199. package/PropertySheets/Codegen.props +1 -1
  200. package/PropertySheets/Generated/PackageVersion.g.props +4 -4
  201. package/PropertySheets/NuGet.LockFile.props +18 -0
  202. package/README.md +29 -29
  203. package/ReactCommon/ReactCommon.vcxproj +5 -1
  204. package/ReactCommon/ReactCommon.vcxproj.filters +11 -2
  205. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +2 -7
  206. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +441 -0
  207. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.h +266 -0
  208. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/Utf8.h +56 -0
  209. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Base.h +3 -1
  210. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Bridging.h +2 -2
  211. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/CallbackWrapper.h +1 -1
  212. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Convert.h +172 -0
  213. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/EventEmitter.h +4 -5
  214. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/Function.h +2 -2
  215. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +1 -1
  216. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModuleUtils.h +3 -2
  217. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/scrollview/ScrollViewProps.cpp +9 -0
  218. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/LayoutableShadowNode.cpp +363 -0
  219. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/JSRuntimeFactory.h +22 -2
  220. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +118 -51
  221. package/Scripts/NuGetRestoreForceEvaluateAllSolutions.ps1 +8 -1
  222. package/Scripts/Tfs/Layout-MSRN-Headers.ps1 +2 -2
  223. package/Shared/Modules/WebSocketModule.cpp +1 -2
  224. package/Shared/Networking/WinRTWebSocketResource.cpp +4 -1
  225. package/Shared/Shared.vcxitems +38 -2
  226. package/Shared/Shared.vcxitems.filters +6 -1
  227. package/Shared/TurboModuleManager.cpp +0 -3
  228. package/codegen/NativeLinkingManagerSpec.g.h +3 -3
  229. package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +198 -54
  230. package/codegen/NativeSampleTurboModuleSpec.g.h +35 -0
  231. package/codegen/rnwcoreJSI-generated.cpp +245 -101
  232. package/codegen/rnwcoreJSI.h +847 -548
  233. package/index.js +3 -1
  234. package/index.windows.js +3 -1
  235. package/jest/mockComponent.js +4 -1
  236. package/jest/mockModal.js +1 -3
  237. package/jest/mockScrollView.js +1 -1
  238. package/jest/renderer.js +2 -2
  239. package/jest/setup.js +16 -13
  240. package/package.json +34 -30
  241. package/src/private/animated/NativeAnimatedHelper.js +438 -0
  242. package/src/private/animated/NativeAnimatedValidation.js +64 -0
  243. package/src/private/components/HScrollViewNativeComponents.js +56 -0
  244. package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +29 -0
  245. package/src/private/components/VScrollViewNativeComponents.js +48 -0
  246. package/src/private/components/useSyncOnScroll.js +48 -0
  247. package/src/private/featureflags/ReactNativeFeatureFlags.js +166 -16
  248. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +29 -5
  249. package/src/private/fusebox/FuseboxSessionObserver.js +42 -0
  250. package/{Libraries/Core → src/private/renderer/errorhandling}/ErrorHandlers.js +14 -4
  251. package/src/private/setup/setUpDOM.js +28 -0
  252. package/src/private/setup/setUpIntersectionObserver.js +27 -0
  253. package/src/private/setup/setUpMutationObserver.js +26 -0
  254. package/src/private/setup/setUpPerformanceObserver.js +64 -0
  255. package/src/private/specs/modules/NativeAppearance.js +3 -3
  256. package/src/private/specs/modules/NativeLinkingManager.js +1 -1
  257. package/src/private/specs/modules/NativePlatformConstantsWindows.js +7 -0
  258. package/src/private/specs/modules/NativeSampleTurboModule.js +14 -1
  259. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +6 -4
  260. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserver.js +5 -3
  261. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverEntry.js +3 -3
  262. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverManager.js +14 -17
  263. package/src/private/{specs/modules → webapis/intersectionobserver/specs}/NativeIntersectionObserver.js +2 -2
  264. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver/specs}/__mocks__/NativeIntersectionObserver.js +4 -4
  265. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserver.js +5 -3
  266. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserverManager.js +24 -15
  267. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationRecord.js +4 -6
  268. package/src/private/{specs/modules → webapis/mutationobserver/specs}/NativeMutationObserver.js +2 -2
  269. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver/specs}/__mocks__/NativeMutationObserver.js +5 -5
  270. package/src/private/webapis/performance/{EventCounts.js → EventTiming.js} +65 -3
  271. package/src/private/webapis/performance/LongTasks.js +39 -0
  272. package/src/private/webapis/performance/Performance.js +22 -9
  273. package/src/private/webapis/performance/PerformanceEntry.js +36 -18
  274. package/src/private/webapis/performance/PerformanceObserver.js +29 -43
  275. package/src/private/webapis/performance/RawPerformanceEntry.js +24 -1
  276. package/src/private/webapis/performance/UserTiming.js +17 -12
  277. package/src/private/webapis/performance/specs/NativePerformanceObserver.js +1 -1
  278. package/template/cpp-app/src/AutolinkedNativeModules.g.cpp +1 -1
  279. package/template/cpp-app/src/AutolinkedNativeModules.g.h +1 -1
  280. package/template/cs-app/src/AutolinkedNativeModules.g.cs +1 -1
  281. package/template/index.windows.bundle +1 -1
  282. package/template/metro.config.js +2 -2
  283. package/template/shared-app/src/AutolinkedNativeModules.g.props +1 -1
  284. package/template/shared-app/src/AutolinkedNativeModules.g.targets +1 -1
  285. package/templates/cpp-app/metro.config.js +2 -2
  286. package/templates/cpp-app/template.config.js +5 -5
  287. package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.cpp +1 -1
  288. package/templates/cpp-app/windows/MyApp/AutolinkedNativeModules.g.h +1 -1
  289. package/templates/cpp-app/windows/MyApp/MyApp.cpp +2 -0
  290. package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +1 -1
  291. package/templates/cpp-lib/example/metro.config.js +2 -2
  292. package/templates/cpp-lib/template.config.js +3 -3
  293. package/templates/cpp-lib/windows/MyLib/MyLib.h +3 -3
  294. package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +1 -1
  295. package/types/experimental.d.ts +12 -98
  296. package/Common/packages.lock.json +0 -26
  297. package/Folly/packages.lock.json +0 -23
  298. package/Libraries/Animated/NativeAnimatedHelper.js +0 -615
  299. package/Libraries/Core/setUpIntersectionObserver.js +0 -16
  300. package/Libraries/Core/setUpMutationObserver.js +0 -16
  301. package/Libraries/Core/setUpPerformanceObserver.js +0 -18
  302. package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +0 -13
  303. package/Libraries/MutationObserver/NativeMutationObserver.js +0 -13
  304. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +0 -135
  305. package/Microsoft.ReactNative/packages.lock.json +0 -132
  306. package/Microsoft.ReactNative.Managed/packages.lock.json +0 -373
  307. package/Microsoft.ReactNative.Managed.CodeGen/packages.lock.json +0 -3197
  308. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/algorithm/CalculateLayout.cpp +0 -2396
  309. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/config/Config.cpp +0 -136
  310. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/config/Config.h +0 -92
  311. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.cpp +0 -48
  312. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/LayoutResults.h +0 -122
  313. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/node/Node.cpp +0 -388
  314. package/ReactCommon/packages.lock.json +0 -30
  315. package/fmt/packages.lock.json +0 -13
  316. package/src/private/core/setUpDOM.js +0 -18
  317. package/src/private/webapis/performance/PerformanceEventTiming.js +0 -55
  318. /package/src/private/{core → styles}/composeStyles.js +0 -0
@@ -9,6 +9,7 @@
9
9
  */
10
10
 
11
11
  import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
12
+ import type {____TextStyle_Internal as TextStyleInternal} from '../../StyleSheet/StyleSheetTypes';
12
13
  import type {
13
14
  KeyEvent, // Windows
14
15
  MouseEvent, // Windows
@@ -19,6 +20,7 @@ import type {
19
20
  import type {HandledKeyboardEvent, ViewProps} from '../View/ViewPropTypes';
20
21
  import type {TextInputType} from './TextInput.flow';
21
22
 
23
+ import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';
22
24
  import usePressability from '../../Pressability/usePressability';
23
25
  import flattenStyle from '../../StyleSheet/flattenStyle';
24
26
  import StyleSheet, {
@@ -1034,8 +1036,188 @@ export type Props = $ReadOnly<{|
1034
1036
  value?: ?Stringish,
1035
1037
  |}>;
1036
1038
 
1039
+ type ViewCommands = $NonMaybeType<
1040
+ | typeof AndroidTextInputCommands
1041
+ | typeof RCTMultilineTextInputNativeCommands
1042
+ | typeof RCTSinglelineTextInputNativeCommands,
1043
+ >;
1044
+
1045
+ type LastNativeSelection = {|
1046
+ selection: Selection,
1047
+ mostRecentEventCount: number,
1048
+ |};
1049
+
1037
1050
  const emptyFunctionThatReturnsTrue = () => true;
1038
1051
 
1052
+ /**
1053
+ * This hook handles the synchronization between the state of the text input
1054
+ * in native and in JavaScript. This is necessary due to the asynchronous nature
1055
+ * of text input events.
1056
+ */
1057
+ function useTextInputStateSynchronization_STATE({
1058
+ props,
1059
+ mostRecentEventCount,
1060
+ selection,
1061
+ inputRef,
1062
+ text,
1063
+ viewCommands,
1064
+ }: {
1065
+ props: Props,
1066
+ mostRecentEventCount: number,
1067
+ selection: ?Selection,
1068
+ inputRef: React.RefObject<null | React.ElementRef<HostComponent<mixed>>>,
1069
+ text: string,
1070
+ viewCommands: ViewCommands,
1071
+ }): {
1072
+ setLastNativeText: string => void,
1073
+ setLastNativeSelection: LastNativeSelection => void,
1074
+ } {
1075
+ const [lastNativeText, setLastNativeText] = useState<?Stringish>(props.value);
1076
+ const [lastNativeSelectionState, setLastNativeSelection] =
1077
+ useState<LastNativeSelection>({
1078
+ selection: {start: -1, end: -1},
1079
+ mostRecentEventCount: mostRecentEventCount,
1080
+ });
1081
+
1082
+ const lastNativeSelection = lastNativeSelectionState.selection;
1083
+
1084
+ // This is necessary in case native updates the text and JS decides
1085
+ // that the update should be ignored and we should stick with the value
1086
+ // that we have in JS.
1087
+ useLayoutEffect(() => {
1088
+ const nativeUpdate: {text?: string, selection?: Selection} = {};
1089
+
1090
+ if (lastNativeText !== props.value && typeof props.value === 'string') {
1091
+ nativeUpdate.text = props.value;
1092
+ setLastNativeText(props.value);
1093
+ }
1094
+
1095
+ if (
1096
+ selection &&
1097
+ lastNativeSelection &&
1098
+ (lastNativeSelection.start !== selection.start ||
1099
+ lastNativeSelection.end !== selection.end)
1100
+ ) {
1101
+ nativeUpdate.selection = selection;
1102
+ setLastNativeSelection({selection, mostRecentEventCount});
1103
+ }
1104
+
1105
+ if (Object.keys(nativeUpdate).length === 0) {
1106
+ return;
1107
+ }
1108
+
1109
+ if (inputRef.current != null) {
1110
+ viewCommands.setTextAndSelection(
1111
+ inputRef.current,
1112
+ mostRecentEventCount,
1113
+ text,
1114
+ selection?.start ?? -1,
1115
+ selection?.end ?? -1,
1116
+ );
1117
+ }
1118
+ }, [
1119
+ mostRecentEventCount,
1120
+ inputRef,
1121
+ props.value,
1122
+ props.defaultValue,
1123
+ lastNativeText,
1124
+ selection,
1125
+ lastNativeSelection,
1126
+ text,
1127
+ viewCommands,
1128
+ ]);
1129
+
1130
+ return {setLastNativeText, setLastNativeSelection};
1131
+ }
1132
+
1133
+ /**
1134
+ * This hook handles the synchronization between the state of the text input
1135
+ * in native and in JavaScript. This is necessary due to the asynchronous nature
1136
+ * of text input events.
1137
+ */
1138
+ function useTextInputStateSynchronization_REFS({
1139
+ props,
1140
+ mostRecentEventCount,
1141
+ selection,
1142
+ inputRef,
1143
+ text,
1144
+ viewCommands,
1145
+ }: {
1146
+ props: Props,
1147
+ mostRecentEventCount: number,
1148
+ selection: ?Selection,
1149
+ inputRef: React.RefObject<null | React.ElementRef<HostComponent<mixed>>>,
1150
+ text: string,
1151
+ viewCommands: ViewCommands,
1152
+ }): {
1153
+ setLastNativeText: string => void,
1154
+ setLastNativeSelection: LastNativeSelection => void,
1155
+ } {
1156
+ const lastNativeTextRef = useRef<?Stringish>(props.value);
1157
+ const lastNativeSelectionRef = useRef<LastNativeSelection>({
1158
+ selection: {start: -1, end: -1},
1159
+ mostRecentEventCount: mostRecentEventCount,
1160
+ });
1161
+
1162
+ // This is necessary in case native updates the text and JS decides
1163
+ // that the update should be ignored and we should stick with the value
1164
+ // that we have in JS.
1165
+ useLayoutEffect(() => {
1166
+ const nativeUpdate: {text?: string, selection?: Selection} = {};
1167
+
1168
+ const lastNativeSelection = lastNativeSelectionRef.current.selection;
1169
+
1170
+ if (
1171
+ lastNativeTextRef.current !== props.value &&
1172
+ typeof props.value === 'string'
1173
+ ) {
1174
+ nativeUpdate.text = props.value;
1175
+ lastNativeTextRef.current = props.value;
1176
+ }
1177
+
1178
+ if (
1179
+ selection &&
1180
+ lastNativeSelection &&
1181
+ (lastNativeSelection.start !== selection.start ||
1182
+ lastNativeSelection.end !== selection.end)
1183
+ ) {
1184
+ nativeUpdate.selection = selection;
1185
+ lastNativeSelectionRef.current = {selection, mostRecentEventCount};
1186
+ }
1187
+
1188
+ if (Object.keys(nativeUpdate).length === 0) {
1189
+ return;
1190
+ }
1191
+
1192
+ if (inputRef.current != null) {
1193
+ viewCommands.setTextAndSelection(
1194
+ inputRef.current,
1195
+ mostRecentEventCount,
1196
+ text,
1197
+ selection?.start ?? -1,
1198
+ selection?.end ?? -1,
1199
+ );
1200
+ }
1201
+ }, [
1202
+ mostRecentEventCount,
1203
+ inputRef,
1204
+ props.value,
1205
+ props.defaultValue,
1206
+ selection,
1207
+ text,
1208
+ viewCommands,
1209
+ ]);
1210
+
1211
+ return {
1212
+ setLastNativeText: lastNativeText => {
1213
+ lastNativeTextRef.current = lastNativeText;
1214
+ },
1215
+ setLastNativeSelection: lastNativeSelection => {
1216
+ lastNativeSelectionRef.current = lastNativeSelection;
1217
+ },
1218
+ };
1219
+ }
1220
+
1039
1221
  /**
1040
1222
  * A foundational component for inputting text into the app via a
1041
1223
  * keyboard. Props provide configurability for several features, such as
@@ -1166,7 +1348,6 @@ function InternalTextInput(props: Props): React.Node {
1166
1348
 
1167
1349
  const inputRef = useRef<null | React.ElementRef<HostComponent<mixed>>>(null);
1168
1350
 
1169
- // eslint-disable-next-line react-hooks/exhaustive-deps
1170
1351
  const selection: ?Selection =
1171
1352
  propsSelection == null
1172
1353
  ? null
@@ -1175,34 +1356,6 @@ function InternalTextInput(props: Props): React.Node {
1175
1356
  end: propsSelection.end ?? propsSelection.start,
1176
1357
  };
1177
1358
 
1178
- const [mostRecentEventCount, setMostRecentEventCount] = useState<number>(0);
1179
- const [lastNativeText, setLastNativeText] = useState<?Stringish>(props.value);
1180
- const [lastNativeSelectionState, setLastNativeSelection] = useState<{|
1181
- selection: Selection,
1182
- mostRecentEventCount: number,
1183
- |}>({
1184
- selection: {start: -1, end: -1},
1185
- mostRecentEventCount: mostRecentEventCount,
1186
- });
1187
-
1188
- const lastNativeSelection = lastNativeSelectionState.selection;
1189
-
1190
- let viewCommands;
1191
- if (AndroidTextInputCommands) {
1192
- viewCommands = AndroidTextInputCommands;
1193
- }
1194
- // [Windows
1195
- else if (WindowsTextInputCommands) {
1196
- viewCommands = WindowsTextInputCommands;
1197
- }
1198
- // Windows]
1199
- else {
1200
- viewCommands =
1201
- props.multiline === true
1202
- ? RCTMultilineTextInputNativeCommands
1203
- : RCTSinglelineTextInputNativeCommands;
1204
- }
1205
-
1206
1359
  const text =
1207
1360
  typeof props.value === 'string'
1208
1361
  ? props.value
@@ -1210,51 +1363,27 @@ function InternalTextInput(props: Props): React.Node {
1210
1363
  ? props.defaultValue
1211
1364
  : '';
1212
1365
 
1213
- // This is necessary in case native updates the text and JS decides
1214
- // that the update should be ignored and we should stick with the value
1215
- // that we have in JS.
1216
- useLayoutEffect(() => {
1217
- const nativeUpdate: {text?: string, selection?: Selection} = {};
1218
-
1219
- if (lastNativeText !== props.value && typeof props.value === 'string') {
1220
- nativeUpdate.text = props.value;
1221
- setLastNativeText(props.value);
1222
- }
1223
-
1224
- if (
1225
- selection &&
1226
- lastNativeSelection &&
1227
- (lastNativeSelection.start !== selection.start ||
1228
- lastNativeSelection.end !== selection.end)
1229
- ) {
1230
- nativeUpdate.selection = selection;
1231
- setLastNativeSelection({selection, mostRecentEventCount});
1232
- }
1366
+ const viewCommands =
1367
+ WindowsTextInputCommands || AndroidTextInputCommands || // [Windows]
1368
+ (props.multiline === true
1369
+ ? RCTMultilineTextInputNativeCommands
1370
+ : RCTSinglelineTextInputNativeCommands);
1233
1371
 
1234
- if (Object.keys(nativeUpdate).length === 0) {
1235
- return;
1236
- }
1237
-
1238
- if (inputRef.current != null) {
1239
- viewCommands.setTextAndSelection(
1240
- inputRef.current,
1241
- mostRecentEventCount,
1242
- text,
1243
- selection?.start ?? -1,
1244
- selection?.end ?? -1,
1245
- );
1246
- }
1247
- }, [
1248
- mostRecentEventCount,
1249
- inputRef,
1250
- props.value,
1251
- props.defaultValue,
1252
- lastNativeText,
1253
- selection,
1254
- lastNativeSelection,
1255
- text,
1256
- viewCommands,
1257
- ]);
1372
+ const [mostRecentEventCount, setMostRecentEventCount] = useState<number>(0);
1373
+ const useTextInputStateSynchronization =
1374
+ ReactNativeFeatureFlags.useRefsForTextInputState()
1375
+ ? useTextInputStateSynchronization_REFS
1376
+ : useTextInputStateSynchronization_STATE;
1377
+ const {setLastNativeText, setLastNativeSelection} =
1378
+ useTextInputStateSynchronization({
1379
+ props,
1380
+ inputRef,
1381
+ mostRecentEventCount,
1382
+ selection,
1383
+ text,
1384
+ // $FlowFixMe[incompatible-call]
1385
+ viewCommands,
1386
+ });
1258
1387
 
1259
1388
  useLayoutEffect(() => {
1260
1389
  const inputRefValue = inputRef.current;
@@ -1270,7 +1399,7 @@ function InternalTextInput(props: Props): React.Node {
1270
1399
  }
1271
1400
  };
1272
1401
  }
1273
- }, [inputRef]);
1402
+ }, []);
1274
1403
 
1275
1404
  const setLocalRef = useCallback(
1276
1405
  (instance: TextInputInstance | null) => {
@@ -1541,18 +1670,29 @@ function InternalTextInput(props: Props): React.Node {
1541
1670
  };
1542
1671
  }
1543
1672
 
1544
- if (focusable && !accessible) {
1545
- console.warn(
1546
- 'All focusable views should report proper accessibility information. TextInputs marked as focusable should always be accessible.',
1547
- );
1548
- }
1673
+ // Keep the original (potentially nested) style when possible, as React can diff these more efficiently
1674
+ let _style = props.style;
1675
+ const flattenedStyle = flattenStyle<TextStyleProp>(props.style);
1676
+ if (flattenedStyle != null) {
1677
+ let overrides: ?{...TextStyleInternal} = null;
1678
+ if (typeof flattenedStyle?.fontWeight === 'number') {
1679
+ overrides = overrides || ({}: {...TextStyleInternal});
1680
+ overrides.fontWeight =
1681
+ // $FlowFixMe[incompatible-cast]
1682
+ (flattenedStyle.fontWeight.toString(): TextStyleInternal['fontWeight']);
1683
+ }
1549
1684
 
1550
- const style = flattenStyle<TextStyleProp>(props.style);
1685
+ if (flattenedStyle.verticalAlign != null) {
1686
+ overrides = overrides || ({}: {...TextStyleInternal});
1687
+ overrides.textAlignVertical =
1688
+ verticalAlignToTextAlignVerticalMap[flattenedStyle.verticalAlign];
1689
+ overrides.verticalAlign = undefined;
1690
+ }
1551
1691
 
1552
- if (typeof style?.fontWeight === 'number') {
1553
- // $FlowFixMe[prop-missing]
1554
- // $FlowFixMe[cannot-write]
1555
- style.fontWeight = style?.fontWeight.toString();
1692
+ if (overrides != null) {
1693
+ // $FlowFixMe[incompatible-type]
1694
+ _style = [_style, overrides];
1695
+ }
1556
1696
  }
1557
1697
 
1558
1698
  if (Platform.OS === 'ios') {
@@ -1563,10 +1703,10 @@ function InternalTextInput(props: Props): React.Node {
1563
1703
 
1564
1704
  const useMultilineDefaultStyle =
1565
1705
  props.multiline === true &&
1566
- (style == null ||
1567
- (style.padding == null &&
1568
- style.paddingVertical == null &&
1569
- style.paddingTop == null));
1706
+ (flattenedStyle == null ||
1707
+ (flattenedStyle.padding == null &&
1708
+ flattenedStyle.paddingVertical == null &&
1709
+ flattenedStyle.paddingTop == null));
1570
1710
 
1571
1711
  textInput = (
1572
1712
  <RCTTextInputView
@@ -1594,7 +1734,7 @@ function InternalTextInput(props: Props): React.Node {
1594
1734
  selectionColor={selectionColor}
1595
1735
  style={StyleSheet.compose(
1596
1736
  useMultilineDefaultStyle ? styles.multilineDefault : null,
1597
- style,
1737
+ _style,
1598
1738
  )}
1599
1739
  text={text}
1600
1740
  />
@@ -1662,7 +1802,7 @@ function InternalTextInput(props: Props): React.Node {
1662
1802
  onScroll={_onScroll}
1663
1803
  onSelectionChange={_onSelectionChange}
1664
1804
  placeholder={placeholder}
1665
- style={style}
1805
+ style={_style}
1666
1806
  text={text}
1667
1807
  textBreakStrategy={props.textBreakStrategy}
1668
1808
  />
@@ -1832,20 +1972,6 @@ const ExportedForwardRef: React.AbstractComponent<
1832
1972
  },
1833
1973
  forwardedRef: ReactRefSetter<TextInputInstance>,
1834
1974
  ) {
1835
- // $FlowFixMe[underconstrained-implicit-instantiation]
1836
- let style = flattenStyle(restProps.style);
1837
-
1838
- if (style?.verticalAlign != null) {
1839
- // $FlowFixMe[prop-missing]
1840
- // $FlowFixMe[cannot-write]
1841
- style.textAlignVertical =
1842
- // $FlowFixMe[invalid-computed-prop]
1843
- verticalAlignToTextAlignVerticalMap[style.verticalAlign];
1844
- // $FlowFixMe[prop-missing]
1845
- // $FlowFixMe[cannot-write]
1846
- delete style.verticalAlign;
1847
- }
1848
-
1849
1975
  return (
1850
1976
  <InternalTextInput
1851
1977
  allowFontScaling={allowFontScaling}
@@ -1881,7 +2007,6 @@ const ExportedForwardRef: React.AbstractComponent<
1881
2007
  }
1882
2008
  {...restProps}
1883
2009
  forwardedRef={forwardedRef}
1884
- style={style}
1885
2010
  />
1886
2011
  );
1887
2012
  });
@@ -11,6 +11,8 @@
11
11
  import type {AnyAttributeType} from '../../Renderer/shims/ReactNativeTypes';
12
12
 
13
13
  import processAspectRatio from '../../StyleSheet/processAspectRatio';
14
+ import processBackgroundImage from '../../StyleSheet/processBackgroundImage';
15
+ import processBoxShadow from '../../StyleSheet/processBoxShadow';
14
16
  import processColor from '../../StyleSheet/processColor';
15
17
  import processFilter from '../../StyleSheet/processFilter';
16
18
  import processFontVariant from '../../StyleSheet/processFontVariant';
@@ -118,7 +120,27 @@ const ReactNativeStyleAttributes: {[string]: AnyAttributeType, ...} = {
118
120
  /**
119
121
  * Filter
120
122
  */
121
- experimental_filter: {process: processFilter},
123
+ filter: {process: processFilter},
124
+
125
+ /**
126
+ * MixBlendMode
127
+ */
128
+ experimental_mixBlendMode: true,
129
+
130
+ /**
131
+ * Isolation
132
+ */
133
+ isolation: true,
134
+
135
+ /*
136
+ * BoxShadow
137
+ */
138
+ boxShadow: {process: processBoxShadow},
139
+
140
+ /**
141
+ * Linear Gradient
142
+ */
143
+ experimental_backgroundImage: {process: processBackgroundImage},
122
144
 
123
145
  /**
124
146
  * View
@@ -22,6 +22,8 @@ const UIView = {
22
22
  accessibilityValue: true,
23
23
  accessibilityHint: true,
24
24
  accessibilityLanguage: true,
25
+ accessibilityShowsLargeContentViewer: true,
26
+ accessibilityLargeContentTitle: true,
25
27
  importantForAccessibility: true,
26
28
  nativeID: true,
27
29
  testID: true,
@@ -22,6 +22,8 @@ const UIView = {
22
22
  accessibilityValue: true,
23
23
  accessibilityHint: true,
24
24
  accessibilityLanguage: true,
25
+ accessibilityShowsLargeContentViewer: true,
26
+ accessibilityLargeContentTitle: true,
25
27
  importantForAccessibility: true,
26
28
  nativeID: true,
27
29
  testID: true,
@@ -20,6 +20,38 @@ import type {KeyEvent} from '../../Types/CoreEventTypes';
20
20
 
21
21
  export type Props = ViewProps;
22
22
 
23
+ // [Windows
24
+ // $FlowFixMe - children typing
25
+ const childrenWithImportantForAccessibility = children => {
26
+ if (children == null) {
27
+ return children;
28
+ }
29
+ const updatedChildren = React.Children.map(children, child => {
30
+ if (React.isValidElement(child)) {
31
+ // $FlowFixMe[incompatible-use]
32
+ if (child.props.children) {
33
+ // $FlowFixMe[incompatible-call]
34
+ return React.cloneElement(child, {
35
+ accessible: false,
36
+ children: childrenWithImportantForAccessibility(
37
+ child.props.children,
38
+ ),
39
+ });
40
+ } else {
41
+ // $FlowFixMe[incompatible-call]
42
+ return React.cloneElement(child, {accessible: false});
43
+ }
44
+ }
45
+ return child;
46
+ });
47
+ if (updatedChildren.length === 1) {
48
+ return updatedChildren[0];
49
+ } else {
50
+ return updatedChildren;
51
+ }
52
+ };
53
+ // Windows]
54
+
23
55
  /**
24
56
  * The most fundamental component for building a UI, View is a container that
25
57
  * supports layout with flexbox, style, some touch handling, and accessibility
@@ -165,36 +197,6 @@ const View: React.AbstractComponent<
165
197
  };
166
198
 
167
199
  // [Windows
168
- // $FlowFixMe - children typing
169
- const childrenWithImportantForAccessibility = children => {
170
- if (children == null) {
171
- return children;
172
- }
173
- const updatedChildren = React.Children.map(children, child => {
174
- if (React.isValidElement(child)) {
175
- // $FlowFixMe[incompatible-use]
176
- if (child.props.children) {
177
- // $FlowFixMe[incompatible-call]
178
- return React.cloneElement(child, {
179
- accessible: false,
180
- children: childrenWithImportantForAccessibility(
181
- child.props.children,
182
- ),
183
- });
184
- } else {
185
- // $FlowFixMe[incompatible-call]
186
- return React.cloneElement(child, {accessible: false});
187
- }
188
- }
189
- return child;
190
- });
191
- if (updatedChildren.length === 1) {
192
- return updatedChildren[0];
193
- } else {
194
- return updatedChildren;
195
- }
196
- };
197
-
198
200
  const _focusable = tabIndex !== undefined ? !tabIndex : focusable;
199
201
  const _accessible =
200
202
  importantForAccessibility === 'no-hide-descendants'
@@ -345,6 +345,21 @@ export interface AccessibilityPropsIOS {
345
345
  * @platform ios
346
346
  */
347
347
  accessibilityLanguage?: string | undefined;
348
+
349
+ /**
350
+ * A Boolean value that indicates whether or not to show the item in the large content viewer.
351
+ * Available on iOS 13.0+
352
+ * https://reactnative.dev/docs/accessibility#accessibilityshowslargecontentviewer
353
+ * @platform ios
354
+ */
355
+ accessibilityShowsLargeContentViewer?: boolean | undefined;
356
+
357
+ /**
358
+ * When `accessibilityShowsLargeContentViewer` is set, this string will be used as title for the large content viewer.
359
+ * https://reactnative.dev/docs/accessibility#accessibilitylargecontenttitle
360
+ * @platform ios
361
+ */
362
+ accessibilityLargeContentTitle?: string | undefined;
348
363
  }
349
364
 
350
365
  export type Role =
@@ -94,7 +94,6 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig =
94
94
  borderBlockStartColor: {
95
95
  process: require('../../StyleSheet/processColor').default,
96
96
  },
97
-
98
97
  focusable: true,
99
98
  overflow: true,
100
99
  backfaceVisibility: true,
@@ -415,6 +415,20 @@ type IOSViewProps = $ReadOnly<{|
415
415
  */
416
416
  accessibilityViewIsModal?: ?boolean,
417
417
 
418
+ /**
419
+ * @platform ios
420
+ *
421
+ * See https://reactnative.dev/docs/view#accessibilityshowslargecontentviewer
422
+ */
423
+ accessibilityShowsLargeContentViewer?: ?boolean,
424
+
425
+ /**
426
+ * @platform ios
427
+ *
428
+ * See https://reactnative.dev/docs/view#accessibilitylargecontenttitle
429
+ */
430
+ accessibilityLargeContentTitle?: ?string,
431
+
418
432
  /**
419
433
  * The aria-modal attribute indicates content contained within a modal with aria-modal="true"
420
434
  * should be accessible to the user.
@@ -416,6 +416,20 @@ type IOSViewProps = $ReadOnly<{|
416
416
  */
417
417
  accessibilityViewIsModal?: ?boolean,
418
418
 
419
+ /**
420
+ * @platform ios
421
+ *
422
+ * See https://reactnative.dev/docs/view#accessibilityshowslargecontentviewer
423
+ */
424
+ accessibilityShowsLargeContentViewer?: ?boolean,
425
+
426
+ /**
427
+ * @platform ios
428
+ *
429
+ * See https://reactnative.dev/docs/view#accessibilitylargecontenttitle
430
+ */
431
+ accessibilityLargeContentTitle?: ?string,
432
+
419
433
  /**
420
434
  * The aria-modal attribute indicates content contained within a modal with aria-modal="true"
421
435
  * should be accessible to the user.
@@ -154,6 +154,7 @@ function handleException(e: mixed, isFatal: boolean) {
154
154
  inExceptionHandler = true;
155
155
  /* $FlowFixMe[class-object-subtyping] added when improving typing for this
156
156
  * parameters */
157
+ // $FlowFixMe[incompatible-call]
157
158
  reportException(error, isFatal, /*reportToConsole*/ true);
158
159
  } finally {
159
160
  inExceptionHandler = false;
@@ -225,6 +226,7 @@ function reactConsoleErrorHandler(...args) {
225
226
  reportException(
226
227
  /* $FlowFixMe[class-object-subtyping] added when improving typing for this
227
228
  * parameters */
229
+ // $FlowFixMe[incompatible-call]
228
230
  error,
229
231
  false, // isFatal
230
232
  false, // reportToConsole
@@ -8,6 +8,8 @@
8
8
  * @flow strict-local
9
9
  */
10
10
 
11
+ 'use client';
12
+
11
13
  /**
12
14
  * Sets up global variables typical in most JavaScript environments.
13
15
  *
@@ -27,7 +29,7 @@
27
29
  const start = Date.now();
28
30
 
29
31
  require('./setUpGlobals');
30
- require('../../src/private/core/setUpDOM');
32
+ require('../../src/private/setup/setUpDOM').default();
31
33
  require('./setUpPerformance');
32
34
  require('./setUpErrorHandling');
33
35
  require('./polyfillPromise');
@@ -32,14 +32,17 @@ const ReactFiberErrorDialog = {
32
32
  if (errorValue instanceof Error) {
33
33
  /* $FlowFixMe[class-object-subtyping] added when improving typing for
34
34
  * this parameters */
35
+ // $FlowFixMe[incompatible-cast]
35
36
  error = (errorValue: ExtendedError);
36
37
  } else if (typeof errorValue === 'string') {
37
38
  /* $FlowFixMe[class-object-subtyping] added when improving typing for
38
39
  * this parameters */
40
+ // $FlowFixMe[incompatible-cast]
39
41
  error = (new SyntheticError(errorValue): ExtendedError);
40
42
  } else {
41
43
  /* $FlowFixMe[class-object-subtyping] added when improving typing for
42
44
  * this parameters */
45
+ // $FlowFixMe[incompatible-cast]
43
46
  error = (new SyntheticError('Unspecified error'): ExtendedError);
44
47
  }
45
48
  try {