react-native-windows 0.76.8 → 0.76.9

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 (128) hide show
  1. package/Libraries/Components/Button.windows.js +9 -0
  2. package/Libraries/Components/Pressable/Pressable.windows.js +9 -0
  3. package/Libraries/Components/TextInput/TextInput.windows.js +11 -1
  4. package/Libraries/Components/Touchable/TouchableBounce.windows.js +229 -0
  5. package/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js +373 -0
  6. package/Libraries/Components/Touchable/TouchableOpacity.windows.js +7 -0
  7. package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +8 -0
  8. package/Libraries/Components/View/View.windows.js +11 -1
  9. package/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
  10. package/Libraries/Components/View/ViewAccessibility.windows.js +3 -0
  11. package/Libraries/Components/View/ViewPropTypes.windows.js +3 -0
  12. package/Libraries/Image/Image.windows.js +7 -0
  13. package/Libraries/Modal/Modal.windows.js +4 -1
  14. package/Libraries/Text/Text.windows.js +14 -1
  15. package/Libraries/Text/TextProps.windows.js +3 -0
  16. package/Microsoft.ReactNative/CompositionComponentView.idl +13 -1
  17. package/Microsoft.ReactNative/Fabric/AbiPortalShadowNode.cpp +97 -0
  18. package/Microsoft.ReactNative/Fabric/AbiPortalShadowNode.h +53 -0
  19. package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.h +160 -17
  20. package/Microsoft.ReactNative/Fabric/AbiViewProps.cpp +8 -10
  21. package/Microsoft.ReactNative/Fabric/ComponentView.cpp +4 -2
  22. package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.cpp +0 -5
  23. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +428 -39
  24. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h +39 -1
  25. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +55 -33
  26. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +5 -3
  27. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp +43 -5
  28. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h +2 -1
  29. package/Microsoft.ReactNative/Fabric/Composition/CompositionTextProvider.cpp +115 -0
  30. package/Microsoft.ReactNative/Fabric/Composition/CompositionTextProvider.h +41 -0
  31. package/Microsoft.ReactNative/Fabric/Composition/CompositionTextRangeProvider.cpp +298 -0
  32. package/Microsoft.ReactNative/Fabric/Composition/CompositionTextRangeProvider.h +59 -0
  33. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +106 -56
  34. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +2 -0
  35. package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp +163 -10
  36. package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +17 -1
  37. package/Microsoft.ReactNative/Fabric/Composition/FocusManager.cpp +4 -2
  38. package/Microsoft.ReactNative/Fabric/Composition/FocusManager.h +9 -1
  39. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +348 -316
  40. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +3 -61
  41. package/Microsoft.ReactNative/Fabric/Composition/PortalComponentView.cpp +78 -0
  42. package/Microsoft.ReactNative/Fabric/Composition/PortalComponentView.h +52 -0
  43. package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.cpp +22 -0
  44. package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +7 -5
  45. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +99 -37
  46. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +12 -6
  47. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +81 -22
  48. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +21 -2
  49. package/Microsoft.ReactNative/Fabric/Composition/Theme.cpp +6 -1
  50. package/Microsoft.ReactNative/Fabric/Composition/TooltipService.cpp +41 -37
  51. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +76 -33
  52. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +8 -2
  53. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +1 -6
  54. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +0 -3
  55. package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.cpp +0 -2
  56. package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/HostPlatformColor.h +5 -8
  57. package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorParser.h +1 -2
  58. package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorUtils.cpp +1 -1
  59. package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +15 -1
  60. package/Microsoft.ReactNative/IReactContext.cpp +2 -2
  61. package/Microsoft.ReactNative/IReactContext.h +1 -1
  62. package/Microsoft.ReactNative/IReactContext.idl +2 -2
  63. package/Microsoft.ReactNative/IReactPackageBuilder.idl +3 -3
  64. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +97 -87
  65. package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.cpp +4 -0
  66. package/Microsoft.ReactNative/Modules/AlertModule.cpp +9 -4
  67. package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.cpp +1 -1
  68. package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.cpp +32 -35
  69. package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.h +7 -4
  70. package/Microsoft.ReactNative/Modules/AppStateModule.cpp +1 -1
  71. package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.cpp +2 -2
  72. package/Microsoft.ReactNative/Modules/AppearanceModule.cpp +2 -2
  73. package/Microsoft.ReactNative/Modules/ClipboardModule.cpp +1 -1
  74. package/Microsoft.ReactNative/Modules/ClipboardModule.h +1 -1
  75. package/Microsoft.ReactNative/Modules/DeviceInfoModule.cpp +3 -3
  76. package/Microsoft.ReactNative/Modules/I18nManagerModule.cpp +1 -1
  77. package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +7 -5
  78. package/Microsoft.ReactNative/Modules/LogBoxModule.h +2 -1
  79. package/Microsoft.ReactNative/Modules/Timing.cpp +2 -2
  80. package/Microsoft.ReactNative/ReactHost/IReactInstance.h +5 -0
  81. package/Microsoft.ReactNative/ReactHost/React.h +0 -3
  82. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +36 -12
  83. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +1 -1
  84. package/Microsoft.ReactNative/ReactNativeHost.cpp +9 -4
  85. package/Microsoft.ReactNative/ReactNativeIsland.idl +5 -1
  86. package/Microsoft.ReactNative/ReactPackageBuilder.cpp +3 -3
  87. package/Microsoft.ReactNative/ReactPackageBuilder.h +4 -4
  88. package/Microsoft.ReactNative/Utils/Helpers.cpp +0 -2
  89. package/Microsoft.ReactNative/Views/DevMenu.cpp +6 -6
  90. package/Microsoft.ReactNative/Views/DevMenu.h +1 -1
  91. package/Microsoft.ReactNative/XamlUIService.cpp +13 -7
  92. package/Microsoft.ReactNative/XamlUIService.h +4 -1
  93. package/Microsoft.ReactNative/XamlUIService.idl +2 -0
  94. package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.h +6 -2
  95. package/Microsoft.ReactNative.Cxx/NativeModules.h +29 -0
  96. package/Microsoft.ReactNative.Cxx/ReactContext.h +1 -1
  97. package/Microsoft.ReactNative.Cxx/XamlUtils.h +12 -0
  98. package/PropertySheets/Generated/PackageVersion.g.props +3 -3
  99. package/PropertySheets/React.Cpp.props +3 -0
  100. package/PropertySheets/WebView2.props +1 -1
  101. package/PropertySheets/WinUI.props +5 -4
  102. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityPrimitives.h +253 -0
  103. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/accessibilityPropsConversions.h +799 -0
  104. package/Shared/InspectorPackagerConnection.cpp +2 -5
  105. package/Shared/InspectorPackagerConnection.h +2 -2
  106. package/Shared/Networking/WinRTWebSocketResource.cpp +369 -7
  107. package/Shared/Networking/WinRTWebSocketResource.h +118 -0
  108. package/Shared/Shared.vcxitems +12 -5
  109. package/Shared/Shared.vcxitems.filters +11 -4
  110. package/codegen/react/components/rnwcore/ActivityIndicatorView.g.h +212 -0
  111. package/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h +295 -0
  112. package/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h +200 -0
  113. package/codegen/react/components/rnwcore/AndroidProgressBar.g.h +224 -0
  114. package/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h +250 -0
  115. package/codegen/react/components/rnwcore/AndroidSwitch.g.h +267 -0
  116. package/codegen/react/components/rnwcore/DebuggingOverlay.g.h +234 -0
  117. package/codegen/react/components/rnwcore/InputAccessory.g.h +200 -0
  118. package/codegen/react/components/rnwcore/ModalHostView.g.h +279 -0
  119. package/codegen/react/components/rnwcore/PullToRefreshView.g.h +246 -0
  120. package/codegen/react/components/rnwcore/SafeAreaView.g.h +197 -0
  121. package/codegen/react/components/rnwcore/Switch.g.h +263 -0
  122. package/codegen/react/components/rnwcore/UnimplementedNativeView.g.h +200 -0
  123. package/just-task.js +1 -1
  124. package/package.json +3 -3
  125. package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.cpp +0 -191
  126. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentDescriptor.h +0 -39
  127. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewShadowNode.cpp +0 -18
  128. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewShadowNode.h +0 -39
@@ -16,7 +16,7 @@ namespace winrt::Microsoft::ReactNative {
16
16
 
17
17
  ReactPackageBuilder::ReactPackageBuilder(
18
18
  std::shared_ptr<NativeModulesProvider> const &modulesProvider,
19
- #ifndef CORE_ABI
19
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
20
20
  std::shared_ptr<ViewManagersProvider> const &viewManagersProvider,
21
21
  #endif
22
22
  std::shared_ptr<TurboModulesProvider> const &turboModulesProvider,
@@ -26,7 +26,7 @@ ReactPackageBuilder::ReactPackageBuilder(
26
26
  #endif
27
27
  bool isWebDebugging) noexcept
28
28
  : m_modulesProvider{modulesProvider},
29
- #ifndef CORE_ABI
29
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
30
30
  m_viewManagersProvider{viewManagersProvider},
31
31
  #endif
32
32
  m_turboModulesProvider{turboModulesProvider},
@@ -42,7 +42,7 @@ void ReactPackageBuilder::AddModule(hstring const &moduleName, ReactModuleProvid
42
42
  m_modulesProvider->AddModuleProvider(moduleName, moduleProvider);
43
43
  }
44
44
 
45
- #ifndef CORE_ABI
45
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
46
46
  void ReactPackageBuilder::AddViewManager(
47
47
  hstring const &viewManagerName,
48
48
  ReactViewManagerProvider const &viewManagerProvider) noexcept {
@@ -4,7 +4,7 @@
4
4
 
5
5
  #include "NativeModulesProvider.h"
6
6
  #include "TurboModulesProvider.h"
7
- #ifndef CORE_ABI
7
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
8
8
  #include "ViewManagersProvider.h"
9
9
  #endif
10
10
  #include "winrt/Microsoft.ReactNative.h"
@@ -26,7 +26,7 @@ struct ReactPackageBuilder : winrt::implements<
26
26
  > {
27
27
  ReactPackageBuilder(
28
28
  std::shared_ptr<NativeModulesProvider> const &modulesProvider,
29
- #ifndef CORE_ABI
29
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
30
30
  std::shared_ptr<ViewManagersProvider> const &viewManagersProvider,
31
31
  #endif
32
32
  std::shared_ptr<TurboModulesProvider> const &turboModulesProvider,
@@ -39,7 +39,7 @@ struct ReactPackageBuilder : winrt::implements<
39
39
 
40
40
  public: // IReactPackageBuilder
41
41
  void AddModule(hstring const &moduleName, ReactModuleProvider const &moduleProvider) noexcept;
42
- #ifndef CORE_ABI
42
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
43
43
  void AddViewManager(hstring const &viewManagerName, ReactViewManagerProvider const &viewManagerProvider) noexcept;
44
44
  #endif
45
45
  void AddTurboModule(hstring const &moduleName, ReactModuleProvider const &moduleProvider) noexcept;
@@ -52,7 +52,7 @@ struct ReactPackageBuilder : winrt::implements<
52
52
 
53
53
  private:
54
54
  std::shared_ptr<NativeModulesProvider> m_modulesProvider;
55
- #ifndef CORE_ABI
55
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
56
56
  std::shared_ptr<ViewManagersProvider> m_viewManagersProvider;
57
57
  #endif
58
58
  std::shared_ptr<TurboModulesProvider> m_turboModulesProvider;
@@ -14,8 +14,6 @@
14
14
  #endif // USE_FABRIC
15
15
 
16
16
  namespace winrt {
17
- using namespace xaml::Controls::Primitives;
18
- using namespace xaml::Media;
19
17
  using namespace Windows::Foundation::Metadata;
20
18
  } // namespace winrt
21
19
 
@@ -10,7 +10,7 @@
10
10
  #include "IReactDispatcher.h"
11
11
  #include "Modules/DevSettingsModule.h"
12
12
 
13
- #ifndef CORE_ABI
13
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
14
14
  #include <XamlUtils.h>
15
15
  #include "DevMenuControl.h"
16
16
  #include "UI.Xaml.Controls.Primitives.h"
@@ -37,7 +37,7 @@ struct IDevMenu {
37
37
  virtual void Show() noexcept = 0;
38
38
  };
39
39
 
40
- #ifndef CORE_ABI
40
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
41
41
  bool IsCtrlShiftD(winrt::Windows::System::VirtualKey key) noexcept {
42
42
  return (
43
43
  key == winrt::Windows::System::VirtualKey::D &&
@@ -116,7 +116,7 @@ const wchar_t *HermesProfilerLabel(Mso::CntPtr<Mso::React::IReactContext> const
116
116
  : L"Stop and copy trace path to clipboard";
117
117
  }
118
118
 
119
- #ifndef CORE_ABI
119
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
120
120
  struct InAppXamlDevMenu : public IDevMenu, public std::enable_shared_from_this<InAppXamlDevMenu> {
121
121
  InAppXamlDevMenu(Mso::CntPtr<Mso::React::IReactContext> const &reactContext) : m_context(reactContext) {}
122
122
 
@@ -348,7 +348,7 @@ struct WindowsPopupMenuDevMenu : public IDevMenu, public std::enable_shared_from
348
348
  DevMenuManager::DevMenuManager(Mso::CntPtr<Mso::React::IReactContext> const &reactContext) : m_context(reactContext) {}
349
349
 
350
350
  void DevMenuManager::Init() noexcept {
351
- #ifndef CORE_ABI
351
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
352
352
  auto uiDispatcher = React::implementation::ReactDispatcher::GetUIDispatcher(m_context->Properties());
353
353
  uiDispatcher.Post([weakThis = weak_from_this()]() {
354
354
  if (auto strongThis = weakThis.lock()) {
@@ -396,8 +396,8 @@ std::shared_ptr<IDevMenu> GetOrCreateDevMenu(Mso::CntPtr<Mso::React::IReactConte
396
396
  .GetOrCreate(
397
397
  DevMenuImplProperty(),
398
398
  [reactContext]() -> std::shared_ptr<IDevMenu> {
399
- #ifndef CORE_ABI
400
- if (xaml::TryGetCurrentApplication()) {
399
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
400
+ if (xaml::TryGetCurrentUwpXamlApplication()) {
401
401
  auto devMenu = std::make_shared<InAppXamlDevMenu>(reactContext);
402
402
  return devMenu;
403
403
  } else
@@ -21,7 +21,7 @@ struct DevMenuManager : public std::enable_shared_from_this<DevMenuManager> {
21
21
  private:
22
22
  void Init() noexcept;
23
23
  const Mso::CntPtr<Mso::React::IReactContext> m_context;
24
- #ifndef CORE_ABI
24
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
25
25
  winrt::CoreDispatcher::AcceleratorKeyActivated_revoker m_coreDispatcherAKARevoker{};
26
26
  xaml::UIElement::KeyDown_revoker m_keyDownRevoker;
27
27
  #endif
@@ -4,17 +4,28 @@
4
4
  #include "pch.h"
5
5
  #include "XamlUIService.h"
6
6
  #include "XamlUIService.g.cpp"
7
+
8
+ #ifndef USE_FABRIC
7
9
  #include <Modules/NativeUIManager.h>
8
10
  #include <Modules/PaperUIManagerModule.h>
9
- #include "DynamicWriter.h"
10
11
  #include "ShadowNodeBase.h"
11
12
  #include "Views/ShadowNodeBase.h"
13
+ #endif
14
+
15
+ #include "DynamicWriter.h"
12
16
  #include "XamlView.h"
13
17
 
14
18
  namespace winrt::Microsoft::ReactNative::implementation {
15
19
 
16
20
  XamlUIService::XamlUIService(Mso::CntPtr<Mso::React::IReactContext> &&context) noexcept : m_context(context) {}
17
21
 
22
+ /*static*/ winrt::Microsoft::ReactNative::XamlUIService XamlUIService::FromContext(IReactContext context) {
23
+ return context.Properties()
24
+ .Get(XamlUIService::XamlUIServiceProperty().Handle())
25
+ .try_as<winrt::Microsoft::ReactNative::XamlUIService>();
26
+ }
27
+
28
+ #ifndef USE_FABRIC
18
29
  xaml::DependencyObject XamlUIService::ElementFromReactTag(int64_t reactTag) noexcept {
19
30
  if (auto uiManager = ::Microsoft::ReactNative::GetNativeUIManager(*m_context).lock()) {
20
31
  auto shadowNode = uiManager->getHost()->FindShadowNodeForTag(reactTag);
@@ -26,12 +37,6 @@ xaml::DependencyObject XamlUIService::ElementFromReactTag(int64_t reactTag) noex
26
37
  return nullptr;
27
38
  }
28
39
 
29
- /*static*/ winrt::Microsoft::ReactNative::XamlUIService XamlUIService::FromContext(IReactContext context) {
30
- return context.Properties()
31
- .Get(XamlUIService::XamlUIServiceProperty().Handle())
32
- .try_as<winrt::Microsoft::ReactNative::XamlUIService>();
33
- }
34
-
35
40
  void XamlUIService::DispatchEvent(
36
41
  xaml::FrameworkElement const &view,
37
42
  hstring const &eventName,
@@ -64,6 +69,7 @@ winrt::Microsoft::ReactNative::ReactRootView XamlUIService::GetReactRootView(
64
69
  }
65
70
  return nullptr;
66
71
  }
72
+ #endif
67
73
 
68
74
  /*static*/ ReactPropertyId<XamlUIService> XamlUIService::XamlUIServiceProperty() noexcept {
69
75
  static ReactPropertyId<XamlUIService> uiManagerProperty{L"ReactNative.UIManager", L"XamlUIManager"};
@@ -15,14 +15,17 @@ struct XamlUIService : XamlUIServiceT<XamlUIService> {
15
15
  XamlUIService(Mso::CntPtr<Mso::React::IReactContext> &&context) noexcept;
16
16
  static ReactPropertyId<XamlUIService> XamlUIServiceProperty() noexcept;
17
17
 
18
- xaml::DependencyObject ElementFromReactTag(int64_t reactTag) noexcept;
19
18
  static winrt::Microsoft::ReactNative::XamlUIService FromContext(IReactContext context);
19
+
20
+ #ifndef USE_FABRIC
21
+ xaml::DependencyObject ElementFromReactTag(int64_t reactTag) noexcept;
20
22
  void DispatchEvent(
21
23
  xaml::FrameworkElement const &view,
22
24
  hstring const &eventName,
23
25
  JSValueArgWriter const &eventDataArgWriter) noexcept;
24
26
 
25
27
  winrt::Microsoft::ReactNative::ReactRootView GetReactRootView(xaml::FrameworkElement const &view) noexcept;
28
+ #endif
26
29
 
27
30
  static void SetXamlRoot(IReactPropertyBag const &properties, xaml::XamlRoot const &xamlRoot) noexcept;
28
31
  static void SetAccessibleRoot(
@@ -19,6 +19,7 @@ namespace Microsoft.ReactNative
19
19
  DOC_STRING("Use this method to get access to the @XamlUIService associated with the @IReactContext.")
20
20
  static XamlUIService FromContext(IReactContext context);
21
21
 
22
+ #ifndef USE_FABRIC
22
23
  DOC_STRING("Gets the backing XAML element from a react tag.")
23
24
  XAML_NAMESPACE.DependencyObject ElementFromReactTag(Int64 reactTag);
24
25
 
@@ -27,6 +28,7 @@ namespace Microsoft.ReactNative
27
28
 
28
29
  DOC_STRING("Gets the @ReactRootView view for a given element.")
29
30
  ReactRootView GetReactRootView(XAML_NAMESPACE.FrameworkElement view);
31
+ #endif
30
32
 
31
33
  DOC_STRING(
32
34
  "Sets the @Windows.UI.Xaml.XamlRoot element for the app. "
@@ -283,7 +283,9 @@ struct JsiAbiRuntime : facebook::jsi::Runtime {
283
283
  ~ValueRef() noexcept;
284
284
  operator facebook::jsi::Value const &() const noexcept;
285
285
 
286
- using StoreType = std::aligned_storage_t<sizeof(DataPointerValue)>;
286
+ struct alignas(std::max_align_t) StoreType {
287
+ std::byte buffer[sizeof(DataPointerValue)];
288
+ };
287
289
  static void InitValueRef(JsiValueRef const &data, facebook::jsi::Value *value, StoreType *store) noexcept;
288
290
 
289
291
  private:
@@ -307,7 +309,9 @@ struct JsiAbiRuntime : facebook::jsi::Runtime {
307
309
  ~PropNameIDRef() noexcept;
308
310
  operator facebook::jsi::PropNameID const &() const noexcept;
309
311
 
310
- using StoreType = std::aligned_storage_t<sizeof(DataPointerValue)>;
312
+ struct alignas(std::max_align_t) StoreType {
313
+ std::byte buffer[sizeof(DataPointerValue)];
314
+ };
311
315
 
312
316
  private:
313
317
  StoreType m_pointerStore{};
@@ -411,6 +411,26 @@ constexpr bool MatchInputArg<std::string, std::wstring>() noexcept {
411
411
  return true;
412
412
  }
413
413
 
414
+ template <>
415
+ constexpr bool MatchInputArg<std::string, winrt::hstring>() noexcept {
416
+ return true;
417
+ }
418
+
419
+ template <>
420
+ constexpr bool MatchInputArg<winrt::hstring, std::string>() noexcept {
421
+ return true;
422
+ }
423
+
424
+ template <>
425
+ constexpr bool MatchInputArg<std::wstring, winrt::hstring>() noexcept {
426
+ return true;
427
+ }
428
+
429
+ template <>
430
+ constexpr bool MatchInputArg<winrt::hstring, std::wstring>() noexcept {
431
+ return true;
432
+ }
433
+
414
434
  template <class TResult, class TInputArgs, class TOutputCallbacks, class TOutputPromises>
415
435
  struct MethodSignature {
416
436
  using Result = TResult;
@@ -1457,6 +1477,15 @@ inline ReactModuleProvider MakeTurboModuleProvider() noexcept {
1457
1477
  return MakeModuleProvider<TModule>();
1458
1478
  }
1459
1479
 
1480
+ // Clang does not allow a virtual function address to be a constexpr statement
1481
+ #if !defined(CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS)
1482
+ #if defined(__clang__)
1483
+ #define CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS
1484
+ #else
1485
+ #define CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS constexpr
1486
+ #endif
1487
+ #endif
1488
+
1460
1489
  } // namespace winrt::Microsoft::ReactNative
1461
1490
 
1462
1491
  namespace React {
@@ -65,7 +65,7 @@ struct ReactContext {
65
65
  m_handle.EmitJSEvent(eventEmitterName, eventName, MakeJSValueWriter(std::forward<TArgs>(args)...));
66
66
  }
67
67
 
68
- #if !defined(CORE_ABI) && !defined(__APPLE__) && !defined(CXXUNITTESTS)
68
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC) && !defined(__APPLE__) && !defined(CXXUNITTESTS)
69
69
  // Dispatch eventName event to the view.
70
70
  // args are either function arguments or a single lambda with 'IJSValueWriter const&' argument.
71
71
  template <class... TArgs>
@@ -54,6 +54,18 @@ inline Application TryGetCurrentApplication() noexcept {
54
54
  }
55
55
  }
56
56
 
57
+ // In the legacy architecture, RNW uses a Uwp Xaml app as the groundwork for the UI.
58
+ // In the new architecture, WinUI3 Xaml may be involved, but only as XamlIslands -- leaf nodes in the RNW content.
59
+ // This function returns the Uwp/System Xaml Application if we're running in the legacy architecture and Xaml is
60
+ // running, and null if otherwise.
61
+ inline Application TryGetCurrentUwpXamlApplication() noexcept {
62
+ #ifdef USE_WINUI3
63
+ return nullptr;
64
+ #else
65
+ return TryGetCurrentApplication();
66
+ #endif
67
+ }
68
+
57
69
  // Using Windows::UI::ColorHelper causes the process to load Windows.UI.Xaml.dll which is not needed just to fill a
58
70
  // Color struct
59
71
  inline winrt::Windows::UI::Color FromArgb(uint8_t a, uint8_t r, uint8_t g, uint8_t b) {
@@ -10,11 +10,11 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.76.8</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.76.9</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>76</ReactNativeWindowsMinor>
16
- <ReactNativeWindowsPatch>8</ReactNativeWindowsPatch>
16
+ <ReactNativeWindowsPatch>9</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
18
- <ReactNativeWindowsCommitId>4c239177bec99b6d108edf7c1a7d40ca5948cc2d</ReactNativeWindowsCommitId>
18
+ <ReactNativeWindowsCommitId>146231794bfd4cd32715b5845e1ac58c4c546d13</ReactNativeWindowsCommitId>
19
19
  </PropertyGroup>
20
20
  </Project>
@@ -73,6 +73,9 @@
73
73
  -->
74
74
  <PreprocessorDefinitions>_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR;%(PreprocessorDefinitions)</PreprocessorDefinitions>
75
75
  </ClCompile>
76
+ <Midl>
77
+ <PreprocessorDefinitions Condition="'$(UseFabric)' == 'true'">USE_FABRIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
78
+ </Midl>
76
79
  </ItemDefinitionGroup>
77
80
 
78
81
  <PropertyGroup>
@@ -2,6 +2,6 @@
2
2
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
3
  <PropertyGroup Label="WebView2 versioning">
4
4
  <!-- WinAppSDK 1.6+ has a dependency on Microsoft.Web.WebView2, there are a few places we need to pull in this package explicitly. -->
5
- <WebView2PackageVersion>1.0.2651.64</WebView2PackageVersion>
5
+ <WebView2PackageVersion>1.0.2792.45</WebView2PackageVersion>
6
6
  </PropertyGroup>
7
7
  </Project>
@@ -4,15 +4,16 @@
4
4
 
5
5
  <!--
6
6
  Internal versions are located at: https://microsoft.visualstudio.com/DefaultCollection/ProjectReunion/_artifacts/feed/Project.Reunion.nuget.internal/NuGet/Microsoft.WindowsAppSDK/versions
7
- For local testing of internal versions, modify the WinUI3Version, and comment out the addition nuget source in NuGet.Config
7
+ For local testing of internal versions, modify WinUI3ExperimentalVersion, and comment out the addition nuget source in NuGet.Config
8
8
  -->
9
- <!-- This value is also used by the CLI, see /packages/@react-native-windows/generate-windows -->
10
- <WinUI3Version Condition="'$(WinUI3Version)'=='' AND '$(UseExperimentalWinUI3)'=='true'">1.6.240701003-experimental2</WinUI3Version>
9
+ <WinUI3ExperimentalVersion Condition="'$(WinUI3ExperimentalVersion)'==''">1.7.250109001-experimental2</WinUI3ExperimentalVersion>
10
+ <!-- This value is also used by the CLI, see /packages/@react-native-windows/cli/.../autolinkWindows.ts -->
11
+ <WinUI3Version Condition="'$(WinUI3Version)'=='' AND '$(UseExperimentalWinUI3)'=='true'">$(WinUI3ExperimentalVersion)</WinUI3Version>
11
12
  <WinUI3Version Condition="'$(WinUI3Version)'==''">1.6.240923002</WinUI3Version>
12
13
  </PropertyGroup>
13
14
 
14
15
  <PropertyGroup Label="WinUI2x versioning">
15
- <!--This value is also used by the CLI, see /packages/@react-native-windows/generate-windows -->
16
+ <!--This value is also used by the CLI, see /packages/@react-native-windows/cli/.../autolinkWindows.ts -->
16
17
  <WinUI2xVersion Condition="'$(WinUI2xVersion)'==''">2.8.0</WinUI2xVersion>
17
18
  </PropertyGroup>
18
19
 
@@ -0,0 +1,253 @@
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
+
8
+ #pragma once
9
+
10
+ #include <cinttypes>
11
+ #include <optional>
12
+ #include <string>
13
+ #include <vector>
14
+
15
+ namespace facebook::react {
16
+
17
+ enum class AccessibilityTraits : uint32_t {
18
+ None = 0,
19
+ Button = (1 << 0),
20
+ Link = (1 << 1),
21
+ Image = (1 << 2),
22
+ Selected = (1 << 3),
23
+ PlaysSound = (1 << 4),
24
+ KeyboardKey = (1 << 5),
25
+ StaticText = (1 << 6),
26
+ SummaryElement = (1 << 7),
27
+ NotEnabled = (1 << 8),
28
+ UpdatesFrequently = (1 << 9),
29
+ SearchField = (1 << 10),
30
+ StartsMediaSession = (1 << 11),
31
+ Adjustable = (1 << 12),
32
+ AllowsDirectInteraction = (1 << 13),
33
+ CausesPageTurn = (1 << 14),
34
+ Header = (1 << 15),
35
+ Switch = (1 << 16),
36
+ TabBar = (1 << 17),
37
+ };
38
+
39
+ constexpr enum AccessibilityTraits operator|(
40
+ const enum AccessibilityTraits lhs,
41
+ const enum AccessibilityTraits rhs) {
42
+ return (enum AccessibilityTraits)((uint32_t)lhs | (uint32_t)rhs);
43
+ }
44
+
45
+ constexpr enum AccessibilityTraits operator&(
46
+ const enum AccessibilityTraits lhs,
47
+ const enum AccessibilityTraits rhs) {
48
+ return (enum AccessibilityTraits)((uint32_t)lhs & (uint32_t)rhs);
49
+ }
50
+
51
+ struct AccessibilityAction {
52
+ std::string name{""};
53
+ std::optional<std::string> label{};
54
+ };
55
+
56
+ inline static bool operator==(
57
+ const AccessibilityAction& lhs,
58
+ const AccessibilityAction& rhs) {
59
+ return lhs.name == rhs.name && lhs.label == rhs.label;
60
+ }
61
+
62
+ inline static bool operator!=(
63
+ const AccessibilityAction& lhs,
64
+ const AccessibilityAction& rhs) {
65
+ return !(rhs == lhs);
66
+ }
67
+
68
+ struct AccessibilityState {
69
+ bool disabled{false};
70
+ std::optional<bool> selected{std::nullopt}; // [Windows] - Do not remove; required for Windows ISelectionItemProvider Implementation
71
+ bool busy{false};
72
+ std::optional<bool> expanded{std::nullopt};
73
+ std::optional<bool> readOnly{std::nullopt}; // [Windows] - Do not remove; required for Windows IRangeValueProvider and IValueProvider Implementation
74
+ std::optional<bool> multiselectable{std::nullopt}; // [Windows] - Do not remove; required for Windows ISelectionProvider Implementation
75
+ std::optional<bool> required{std::nullopt}; // [Windows] - Do not remove; required for Windows ISelectionProvider Implementation
76
+ enum { Unchecked, Checked, Mixed, None } checked{None};
77
+ };
78
+
79
+ constexpr bool operator==(
80
+ const AccessibilityState& lhs,
81
+ const AccessibilityState& rhs) {
82
+ return lhs.disabled == rhs.disabled && lhs.selected == rhs.selected &&
83
+ lhs.checked == rhs.checked && lhs.busy == rhs.busy &&
84
+ lhs.expanded == rhs.expanded;
85
+ }
86
+
87
+ constexpr bool operator!=(
88
+ const AccessibilityState& lhs,
89
+ const AccessibilityState& rhs) {
90
+ return !(rhs == lhs);
91
+ }
92
+
93
+ struct AccessibilityLabelledBy {
94
+ std::vector<std::string> value{};
95
+ };
96
+
97
+ inline static bool operator==(
98
+ const AccessibilityLabelledBy& lhs,
99
+ const AccessibilityLabelledBy& rhs) {
100
+ return lhs.value == rhs.value;
101
+ }
102
+
103
+ inline static bool operator!=(
104
+ const AccessibilityLabelledBy& lhs,
105
+ const AccessibilityLabelledBy& rhs) {
106
+ return !(lhs == rhs);
107
+ }
108
+
109
+ struct AccessibilityValue {
110
+ std::optional<int> min;
111
+ std::optional<int> max;
112
+ std::optional<int> now;
113
+ std::optional<std::string> text{};
114
+ };
115
+
116
+ constexpr bool operator==(
117
+ const AccessibilityValue& lhs,
118
+ const AccessibilityValue& rhs) {
119
+ return lhs.min == rhs.min && lhs.max == rhs.max && lhs.now == rhs.now &&
120
+ lhs.text == rhs.text;
121
+ }
122
+
123
+ constexpr bool operator!=(
124
+ const AccessibilityValue& lhs,
125
+ const AccessibilityValue& rhs) {
126
+ return !(rhs == lhs);
127
+ }
128
+
129
+ enum class ImportantForAccessibility : uint8_t {
130
+ Auto,
131
+ Yes,
132
+ No,
133
+ NoHideDescendants,
134
+ };
135
+
136
+ enum class AccessibilityLiveRegion : uint8_t {
137
+ None,
138
+ Polite,
139
+ Assertive,
140
+ };
141
+
142
+ enum class AccessibilityRole {
143
+ None,
144
+ Button,
145
+ Dropdownlist,
146
+ Togglebutton,
147
+ Link,
148
+ Search,
149
+ Image,
150
+ Keyboardkey,
151
+ Text,
152
+ Adjustable,
153
+ Imagebutton,
154
+ Header,
155
+ Summary,
156
+ Alert,
157
+ Checkbox,
158
+ Combobox,
159
+ Menu,
160
+ Menubar,
161
+ Menuitem,
162
+ Progressbar,
163
+ Radio,
164
+ Radiogroup,
165
+ Scrollbar,
166
+ Spinbutton,
167
+ Switch,
168
+ Tab,
169
+ Tabbar,
170
+ Tablist,
171
+ Timer,
172
+ List,
173
+ Toolbar,
174
+ Grid,
175
+ Pager,
176
+ Scrollview,
177
+ Horizontalscrollview,
178
+ Viewgroup,
179
+ Webview,
180
+ Drawerlayout,
181
+ Slidingdrawer,
182
+ Iconmenu,
183
+ };
184
+
185
+ enum class Role {
186
+ Alert,
187
+ Alertdialog,
188
+ Application,
189
+ Article,
190
+ Banner,
191
+ Button,
192
+ Cell,
193
+ Checkbox,
194
+ Columnheader,
195
+ Combobox,
196
+ Complementary,
197
+ Contentinfo,
198
+ Definition,
199
+ Dialog,
200
+ Directory,
201
+ Document,
202
+ Feed,
203
+ Figure,
204
+ Form,
205
+ Grid,
206
+ Group,
207
+ Heading,
208
+ Img,
209
+ Link,
210
+ List,
211
+ Listitem,
212
+ Log,
213
+ Main,
214
+ Marquee,
215
+ Math,
216
+ Menu,
217
+ Menubar,
218
+ Menuitem,
219
+ Meter,
220
+ Navigation,
221
+ None,
222
+ Note,
223
+ Option,
224
+ Presentation,
225
+ Progressbar,
226
+ Radio,
227
+ Radiogroup,
228
+ Region,
229
+ Row,
230
+ Rowgroup,
231
+ Rowheader,
232
+ Scrollbar,
233
+ Searchbox,
234
+ Separator,
235
+ Slider,
236
+ Spinbutton,
237
+ Status,
238
+ Summary,
239
+ Switch,
240
+ Tab,
241
+ Table,
242
+ Tablist,
243
+ Tabpanel,
244
+ Term,
245
+ Timer,
246
+ Toolbar,
247
+ Tooltip,
248
+ Tree,
249
+ Treegrid,
250
+ Treeitem,
251
+ };
252
+
253
+ } // namespace facebook::react