react-native-windows 0.74.0-preview.2 → 0.74.0-preview.4

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 (66) hide show
  1. package/Libraries/Core/ReactNativeVersion.js +1 -1
  2. package/Libraries/Image/AssetSourceResolver.windows.js +186 -0
  3. package/Libraries/Image/assetPaths.js +36 -0
  4. package/Microsoft.ReactNative/CompositionComponentView.idl +18 -3
  5. package/Microsoft.ReactNative/CompositionContext.idl +5 -5
  6. package/Microsoft.ReactNative/CompositionRootView.idl +22 -8
  7. package/Microsoft.ReactNative/CompositionSwitcher.idl +2 -2
  8. package/Microsoft.ReactNative/CompositionUIService.idl +8 -6
  9. package/Microsoft.ReactNative/Fabric/AbiViewProps.cpp +8 -1
  10. package/Microsoft.ReactNative/Fabric/AbiViewProps.h +7 -2
  11. package/Microsoft.ReactNative/Fabric/Composition/ActivityIndicatorComponentView.cpp +4 -3
  12. package/Microsoft.ReactNative/Fabric/Composition/ActivityIndicatorComponentView.h +5 -5
  13. package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.cpp +1 -1
  14. package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.h +2 -1
  15. package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +173 -152
  16. package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.h +8 -8
  17. package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper_emptyimpl.cpp +13 -13
  18. package/Microsoft.ReactNative/Fabric/Composition/CompositionHelpers.h +1 -1
  19. package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +14 -11
  20. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView.cpp +24 -11
  21. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView.h +15 -10
  22. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView_emptyimpl.cpp +15 -4
  23. package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService.cpp +20 -9
  24. package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService.h +6 -4
  25. package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService_emptyimpl.cpp +5 -2
  26. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +104 -54
  27. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +25 -19
  28. package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp +2 -2
  29. package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.h +2 -2
  30. package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp +9 -8
  31. package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.h +5 -5
  32. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +7 -5
  33. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +5 -5
  34. package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +4 -4
  35. package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.h +5 -5
  36. package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.cpp +1 -1
  37. package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +5 -2
  38. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +2 -2
  39. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +2 -2
  40. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +34 -27
  41. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +6 -6
  42. package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +9 -9
  43. package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.h +6 -6
  44. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +5 -4
  45. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +6 -6
  46. package/Microsoft.ReactNative/Fabric/Composition/Theme.cpp +13 -3
  47. package/Microsoft.ReactNative/Fabric/Composition/Theme.h +16 -8
  48. package/Microsoft.ReactNative/Fabric/Composition/Theme_emptyimpl.cpp +3 -3
  49. package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +3 -3
  50. package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.h +3 -3
  51. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +1 -1
  52. package/Microsoft.ReactNative/Fabric/IComponentViewRegistry.h +1 -1
  53. package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.cpp +2 -1
  54. package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.cpp +7 -5
  55. package/Microsoft.ReactNative/Theme.idl +12 -1
  56. package/Microsoft.ReactNative/ViewProps.idl +11 -1
  57. package/Microsoft.ReactNative/packages.lock.json +70 -42
  58. package/Microsoft.ReactNative.Cxx/AutoDraw.h +3 -3
  59. package/Microsoft.ReactNative.Cxx/{CompositionSwitcher.interop.h → CompositionSwitcher.Experimental.interop.h} +2 -2
  60. package/Microsoft.ReactNative.Cxx/DesktopWindowBridge.h +2 -0
  61. package/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj +2 -11
  62. package/PropertySheets/External/Microsoft.ReactNative.Composition.CppApp.props +1 -1
  63. package/PropertySheets/External/Microsoft.ReactNative.WindowsSdk.Default.props +5 -3
  64. package/PropertySheets/Generated/PackageVersion.g.props +2 -2
  65. package/package.json +11 -11
  66. package/templates/cpp-app/windows/MyApp/MyApp.cpp +2 -7
@@ -445,11 +445,20 @@ winrt::Windows::UI::Color Theme::PlatformColor(const std::string &platformColor)
445
445
  return {0, 0, 0, 0}; // Transparent
446
446
  }
447
447
 
448
- winrt::Microsoft::ReactNative::Composition::IBrush Theme::PlatformBrush(winrt::hstring platformColor) noexcept {
448
+ winrt::Microsoft::ReactNative::Composition::Experimental::IBrush Theme::InternalPlatformBrush(
449
+ winrt::hstring platformColor) noexcept {
449
450
  return PlatformBrush(winrt::to_string(platformColor));
450
451
  }
451
452
 
452
- winrt::Microsoft::ReactNative::Composition::IBrush Theme::PlatformBrush(const std::string &platformColor) noexcept {
453
+ #ifdef USE_WINUI3
454
+ winrt::Microsoft::UI::Composition::CompositionBrush Theme::PlatformBrush(winrt::hstring platformColor) noexcept {
455
+ return winrt::Microsoft::ReactNative::Composition::Experimental::MicrosoftCompositionContextHelper::InnerBrush(
456
+ PlatformBrush(winrt::to_string(platformColor)));
457
+ }
458
+ #endif
459
+
460
+ winrt::Microsoft::ReactNative::Composition::Experimental::IBrush Theme::PlatformBrush(
461
+ const std::string &platformColor) noexcept {
453
462
  if (m_emptyTheme)
454
463
  return nullptr;
455
464
 
@@ -465,7 +474,8 @@ winrt::Microsoft::ReactNative::Composition::IBrush Theme::PlatformBrush(const st
465
474
  return nullptr;
466
475
  }
467
476
 
468
- winrt::Microsoft::ReactNative::Composition::IBrush Theme::Brush(const facebook::react::Color &color) noexcept {
477
+ winrt::Microsoft::ReactNative::Composition::Experimental::IBrush Theme::Brush(
478
+ const facebook::react::Color &color) noexcept {
469
479
  if (m_emptyTheme)
470
480
  return nullptr;
471
481
 
@@ -7,18 +7,21 @@
7
7
  #include "Composition.Theme.g.h"
8
8
  #include <Microsoft.ReactNative.Cxx/ReactContext.h>
9
9
  #include <react/renderer/graphics/Color.h>
10
+ #include <winrt/Microsoft.ReactNative.Composition.Experimental.h>
10
11
  #include <winrt/Microsoft.ReactNative.Composition.h>
11
12
  #include <winrt/Windows.UI.ViewManagement.h>
12
13
 
13
14
  namespace winrt::Microsoft::ReactNative::Composition::implementation {
14
15
 
15
- struct Theme : ThemeT<Theme> {
16
+ struct Theme : ThemeT<Theme, Experimental::IInternalTheme> {
16
17
  Theme(
17
18
  const winrt::Microsoft::ReactNative::ReactContext &reactContext,
18
19
  const winrt::Microsoft::ReactNative::Composition::ICustomResourceLoader &customResourceLoader) noexcept;
19
20
 
20
- // Public APIs
21
- winrt::Microsoft::ReactNative::Composition::IBrush PlatformBrush(winrt::hstring platformColor) noexcept;
21
+ // Public APIs
22
+ #ifdef USE_WINUI3
23
+ winrt::Microsoft::UI::Composition::CompositionBrush PlatformBrush(winrt::hstring platformColor) noexcept;
24
+ #endif
22
25
  bool TryGetPlatformColor(winrt::hstring platformColor, winrt::Windows::UI::Color &color) noexcept;
23
26
  bool IsEmpty() const noexcept;
24
27
 
@@ -29,9 +32,13 @@ struct Theme : ThemeT<Theme> {
29
32
  // Internal APIs
30
33
  Theme() noexcept;
31
34
 
35
+ winrt::Microsoft::ReactNative::Composition::Experimental::IBrush InternalPlatformBrush(
36
+ winrt::hstring platformColor) noexcept;
37
+
32
38
  winrt::Windows::UI::Color PlatformColor(const std::string &platformColor) noexcept;
33
- winrt::Microsoft::ReactNative::Composition::IBrush PlatformBrush(const std::string &platformColor) noexcept;
34
- winrt::Microsoft::ReactNative::Composition::IBrush Brush(const facebook::react::Color &color) noexcept;
39
+ winrt::Microsoft::ReactNative::Composition::Experimental::IBrush PlatformBrush(
40
+ const std::string &platformColor) noexcept;
41
+ winrt::Microsoft::ReactNative::Composition::Experimental::IBrush Brush(const facebook::react::Color &color) noexcept;
35
42
  winrt::Windows::UI::Color Color(const facebook::react::Color &color) noexcept;
36
43
 
37
44
  D2D1::ColorF D2DColor(const facebook::react::Color &color) noexcept;
@@ -59,9 +66,10 @@ struct Theme : ThemeT<Theme> {
59
66
  std::unordered_map<std::string, std::pair<bool, winrt::Windows::UI::Color>> m_colorCache;
60
67
  winrt::Windows::UI::ViewManagement::UISettings m_uisettings;
61
68
  winrt::Windows::UI::ViewManagement::UISettings::ColorValuesChanged_revoker m_colorValuesChangedRevoker;
62
- std::unordered_map<std::string, winrt::Microsoft::ReactNative::Composition::IBrush> m_platformColorBrushCache;
63
- std::unordered_map<DWORD, winrt::Microsoft::ReactNative::Composition::IBrush> m_colorBrushCache;
64
- winrt::Microsoft::ReactNative::Composition::ICompositionContext m_compositionContext;
69
+ std::unordered_map<std::string, winrt::Microsoft::ReactNative::Composition::Experimental::IBrush>
70
+ m_platformColorBrushCache;
71
+ std::unordered_map<DWORD, winrt::Microsoft::ReactNative::Composition::Experimental::IBrush> m_colorBrushCache;
72
+ winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext m_compositionContext;
65
73
  winrt::Microsoft::ReactNative::Composition::ICustomResourceLoader m_customResourceLoader;
66
74
  winrt::Microsoft::ReactNative::Composition::ICustomResourceLoader::ResourcesChanged_revoker m_resourceChangedRevoker;
67
75
  };
@@ -35,15 +35,15 @@ winrt::Windows::UI::Color Theme::PlatformColor(const std::string &) noexcept {
35
35
  return {};
36
36
  }
37
37
 
38
- winrt::Microsoft::ReactNative::Composition::IBrush Theme::PlatformBrush(winrt::hstring) noexcept {
38
+ winrt::Microsoft::UI::Composition::CompositionBrush Theme::PlatformBrush(winrt::hstring) noexcept {
39
39
  return nullptr;
40
40
  }
41
41
 
42
- winrt::Microsoft::ReactNative::Composition::IBrush Theme::PlatformBrush(const std::string &) noexcept {
42
+ winrt::Microsoft::ReactNative::Composition::Experimental::IBrush Theme::PlatformBrush(const std::string &) noexcept {
43
43
  return nullptr;
44
44
  }
45
45
 
46
- winrt::Microsoft::ReactNative::Composition::IBrush Theme::Brush(const facebook::react::Color &) noexcept {
46
+ winrt::Microsoft::ReactNative::Composition::Experimental::IBrush Theme::Brush(const facebook::react::Color &) noexcept {
47
47
  return nullptr;
48
48
  }
49
49
 
@@ -14,7 +14,7 @@
14
14
  namespace winrt::Microsoft::ReactNative::Composition::implementation {
15
15
 
16
16
  UnimplementedNativeViewComponentView::UnimplementedNativeViewComponentView(
17
- const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
17
+ const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
18
18
  facebook::react::Tag tag,
19
19
  winrt::Microsoft::ReactNative::ReactContext const &reactContext)
20
20
  : base_type(
@@ -30,7 +30,7 @@ UnimplementedNativeViewComponentView::UnimplementedNativeViewComponentView(
30
30
  }
31
31
 
32
32
  winrt::Microsoft::ReactNative::ComponentView UnimplementedNativeViewComponentView::Create(
33
- const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
33
+ const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
34
34
  facebook::react::Tag tag,
35
35
  winrt::Microsoft::ReactNative::ReactContext const &reactContext) noexcept {
36
36
  return winrt::make<UnimplementedNativeViewComponentView>(compContext, tag, reactContext);
@@ -65,7 +65,7 @@ void UnimplementedNativeViewComponentView::updateLayoutMetrics(
65
65
 
66
66
  drawingSurface.HorizontalAlignmentRatio(0.f);
67
67
  drawingSurface.VerticalAlignmentRatio(0.f);
68
- drawingSurface.Stretch(winrt::Microsoft::ReactNative::Composition::CompositionStretch::None);
68
+ drawingSurface.Stretch(winrt::Microsoft::ReactNative::Composition::Experimental::CompositionStretch::None);
69
69
  m_labelVisual.Brush(drawingSurface);
70
70
  m_labelVisual.Size(surfaceSize);
71
71
  m_labelVisual.Offset({
@@ -17,7 +17,7 @@ namespace winrt::Microsoft::ReactNative::Composition::implementation {
17
17
  struct UnimplementedNativeViewComponentView
18
18
  : public UnimplementedNativeViewComponentViewT<UnimplementedNativeViewComponentView, ViewComponentView> {
19
19
  [[nodiscard]] static winrt::Microsoft::ReactNative::ComponentView Create(
20
- const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
20
+ const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
21
21
  facebook::react::Tag tag,
22
22
  winrt::Microsoft::ReactNative::ReactContext const &reactContext) noexcept;
23
23
 
@@ -29,13 +29,13 @@ struct UnimplementedNativeViewComponentView
29
29
  override;
30
30
 
31
31
  UnimplementedNativeViewComponentView(
32
- const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
32
+ const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
33
33
  facebook::react::Tag tag,
34
34
  winrt::Microsoft::ReactNative::ReactContext const &reactContext);
35
35
 
36
36
  private:
37
37
  std::shared_ptr<facebook::react::UnimplementedNativeViewProps const> m_props;
38
- winrt::Microsoft::ReactNative::Composition::ISpriteVisual m_labelVisual{nullptr};
38
+ winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual m_labelVisual{nullptr};
39
39
  };
40
40
 
41
41
  } // namespace winrt::Microsoft::ReactNative::Composition::implementation
@@ -63,7 +63,7 @@ struct FabricUIManager final : public std::enable_shared_from_this<FabricUIManag
63
63
  void didMountComponentsWithRootTag(facebook::react::SurfaceId surfaceId) noexcept;
64
64
 
65
65
  winrt::Microsoft::ReactNative::ReactContext m_context;
66
- winrt::Microsoft::ReactNative::Composition::ICompositionContext m_compContext;
66
+ winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext m_compContext;
67
67
  std::shared_ptr<facebook::react::Scheduler> m_scheduler;
68
68
  std::shared_ptr<facebook::react::SurfaceManager> m_surfaceManager;
69
69
  std::mutex m_schedulerMutex; // Protect m_scheduler
@@ -22,7 +22,7 @@ struct IComponentViewRegistry {
22
22
  virtual ComponentViewDescriptor const &dequeueComponentViewWithComponentHandle(
23
23
  facebook::react::ComponentHandle componentHandle,
24
24
  facebook::react::Tag tag,
25
- const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext) noexcept = 0;
25
+ const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext) noexcept = 0;
26
26
  virtual ComponentViewDescriptor const &componentViewDescriptorWithTag(facebook::react::Tag tag) const noexcept = 0;
27
27
  virtual winrt::Microsoft::ReactNative::ComponentView findComponentViewWithTag(
28
28
  facebook::react::Tag tag) const noexcept = 0;
@@ -46,7 +46,8 @@ comp::Compositor NativeAnimatedNodeManager::Compositor() const noexcept {
46
46
  winrt::Microsoft::ReactNative::Composition::implementation::CompositionUIService::GetCompositionContext(
47
47
  m_context.Properties().Handle());
48
48
  if (compositionContext) {
49
- return winrt::Microsoft::ReactNative::Composition::CompositionContextHelper::InnerCompositor(compositionContext);
49
+ return winrt::Microsoft::ReactNative::Composition::Experimental::CompositionContextHelper::InnerCompositor(
50
+ compositionContext);
50
51
  }
51
52
  #endif
52
53
  #ifndef CORE_ABI
@@ -181,9 +181,11 @@ void PropsAnimatedNode::StartAnimations() {
181
181
  view.m_element.RotationAxis(m_rotationAxis);
182
182
  #ifdef USE_FABRIC
183
183
  } else {
184
- auto visual = winrt::Microsoft::ReactNative::Composition::CompositionContextHelper::InnerVisual(
185
- view.m_componentView.as<winrt::Microsoft::ReactNative::Composition::implementation::ComponentView>()
186
- ->Visual());
184
+ auto visual =
185
+ winrt::Microsoft::ReactNative::Composition::Experimental::CompositionContextHelper::InnerVisual(
186
+ view.m_componentView
187
+ .as<winrt::Microsoft::ReactNative::Composition::implementation::ComponentView>()
188
+ ->Visual());
187
189
  visual.RotationAxis(m_rotationAxis);
188
190
  #endif
189
191
  }
@@ -395,8 +397,8 @@ void PropsAnimatedNode::StartAnimation(
395
397
  } else if (view.m_componentView) {
396
398
  auto baseComponentView =
397
399
  view.m_componentView.as<winrt::Microsoft::ReactNative::Composition::implementation::ComponentView>();
398
- auto visual =
399
- winrt::Microsoft::ReactNative::Composition::CompositionContextHelper::InnerVisual(baseComponentView->Visual());
400
+ auto visual = winrt::Microsoft::ReactNative::Composition::Experimental::CompositionContextHelper::InnerVisual(
401
+ baseComponentView->Visual());
400
402
  if (visual) {
401
403
  auto targetProp = animation.Target();
402
404
  if (targetProp == L"Rotation") {
@@ -37,12 +37,23 @@ namespace Microsoft.ReactNative.Composition
37
37
  event Windows.Foundation.EventHandler<Object> ResourcesChanged;
38
38
  };
39
39
 
40
+ namespace Experimental {
41
+ [webhosthidden]
42
+ [experimental]
43
+ interface IInternalTheme {
44
+ Microsoft.ReactNative.Composition.Experimental.IBrush InternalPlatformBrush(String platformColor);
45
+ }
46
+ }
47
+
40
48
  [webhosthidden]
41
49
  [experimental]
42
50
  runtimeclass Theme {
43
51
  Theme(Microsoft.ReactNative.IReactContext reactContext, ICustomResourceLoader resourceLoader);
44
52
 
45
- Microsoft.ReactNative.Composition.IBrush PlatformBrush(String platformColor);
53
+ #ifdef USE_WINUI3
54
+ Microsoft.UI.Composition.CompositionBrush PlatformBrush(String platformColor);
55
+ #endif
56
+
46
57
  Boolean TryGetPlatformColor(String platformColor, out Windows.UI.Color color);
47
58
  DOC_STRING("An empty theme is used when the final theme is not yet known. It will generally return transparent colors.")
48
59
  Boolean IsEmpty { get; };
@@ -8,11 +8,21 @@ import "Theme.idl";
8
8
 
9
9
  namespace Microsoft.ReactNative {
10
10
 
11
+ namespace Composition.Experimental {
12
+ [webhosthidden]
13
+ [experimental]
14
+ interface IInternalColor {
15
+ Microsoft.ReactNative.Composition.Experimental.IBrush AsInternalBrush(Microsoft.ReactNative.Composition.Theme theme);
16
+ }
17
+ }
18
+
11
19
  [webhosthidden]
12
20
  [experimental]
13
21
  runtimeclass Color {
14
22
  Windows.UI.Color AsWindowsColor(Microsoft.ReactNative.Composition.Theme theme);
15
- Microsoft.ReactNative.Composition.IBrush AsBrush(Microsoft.ReactNative.Composition.Theme theme);
23
+ #ifdef USE_WINUI3
24
+ Microsoft.UI.Composition.CompositionBrush AsBrush(Microsoft.ReactNative.Composition.Theme theme);
25
+ #endif
16
26
 
17
27
  static Color Black();
18
28
  static Color Transparent();
@@ -24,21 +24,21 @@
24
24
  "Microsoft.SourceLink.Common": "1.1.1"
25
25
  }
26
26
  },
27
- "Microsoft.UI.Xaml": {
28
- "type": "Direct",
29
- "requested": "[2.8.0, )",
30
- "resolved": "2.8.0",
31
- "contentHash": "vxdHxTr63s5KVtNddMFpgvjBjUH50z7seq/5jLWmmSuf8poxg+sXrywkofUdE8ZstbpO9y3FL/IXXUcPYbeesA==",
32
- "dependencies": {
33
- "Microsoft.Web.WebView2": "1.0.1264.42"
34
- }
35
- },
36
27
  "Microsoft.Windows.CppWinRT": {
37
28
  "type": "Direct",
38
29
  "requested": "[2.0.230706.1, )",
39
30
  "resolved": "2.0.230706.1",
40
31
  "contentHash": "l0D7oCw/5X+xIKHqZTi62TtV+1qeSz7KVluNFdrJ9hXsst4ghvqQ/Yhura7JqRdZWBXAuDS0G0KwALptdoxweQ=="
41
32
  },
33
+ "Microsoft.WindowsAppSDK": {
34
+ "type": "Direct",
35
+ "requested": "[1.5.240227000, )",
36
+ "resolved": "1.5.240227000",
37
+ "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==",
38
+ "dependencies": {
39
+ "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756"
40
+ }
41
+ },
42
42
  "Microsoft.Build.Tasks.Git": {
43
43
  "type": "Transitive",
44
44
  "resolved": "1.1.1",
@@ -49,10 +49,10 @@
49
49
  "resolved": "1.1.1",
50
50
  "contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg=="
51
51
  },
52
- "Microsoft.Web.WebView2": {
52
+ "Microsoft.Windows.SDK.BuildTools": {
53
53
  "type": "Transitive",
54
- "resolved": "1.0.1264.42",
55
- "contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
54
+ "resolved": "10.0.22621.756",
55
+ "contentHash": "7ZL2sFSioYm1Ry067Kw1hg0SCcW5kuVezC2SwjGbcPE61Nn+gTbH86T73G3LcEOVj0S3IZzNuE/29gZvOLS7VA=="
56
56
  },
57
57
  "common": {
58
58
  "type": "Project",
@@ -66,8 +66,8 @@
66
66
  "folly": {
67
67
  "type": "Project",
68
68
  "dependencies": {
69
- "boost": "[1.76.0, )",
70
- "fmt": "[1.0.0, )"
69
+ "Fmt": "[1.0.0, )",
70
+ "boost": "[1.76.0, )"
71
71
  }
72
72
  },
73
73
  "reactcommon": {
@@ -79,52 +79,80 @@
79
79
  }
80
80
  },
81
81
  "native,Version=v0.0/win10-arm": {
82
- "Microsoft.Web.WebView2": {
83
- "type": "Transitive",
84
- "resolved": "1.0.1264.42",
85
- "contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
82
+ "Microsoft.WindowsAppSDK": {
83
+ "type": "Direct",
84
+ "requested": "[1.5.240227000, )",
85
+ "resolved": "1.5.240227000",
86
+ "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==",
87
+ "dependencies": {
88
+ "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756"
89
+ }
86
90
  }
87
91
  },
88
92
  "native,Version=v0.0/win10-arm-aot": {
89
- "Microsoft.Web.WebView2": {
90
- "type": "Transitive",
91
- "resolved": "1.0.1264.42",
92
- "contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
93
+ "Microsoft.WindowsAppSDK": {
94
+ "type": "Direct",
95
+ "requested": "[1.5.240227000, )",
96
+ "resolved": "1.5.240227000",
97
+ "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==",
98
+ "dependencies": {
99
+ "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756"
100
+ }
93
101
  }
94
102
  },
95
103
  "native,Version=v0.0/win10-arm64-aot": {
96
- "Microsoft.Web.WebView2": {
97
- "type": "Transitive",
98
- "resolved": "1.0.1264.42",
99
- "contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
104
+ "Microsoft.WindowsAppSDK": {
105
+ "type": "Direct",
106
+ "requested": "[1.5.240227000, )",
107
+ "resolved": "1.5.240227000",
108
+ "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==",
109
+ "dependencies": {
110
+ "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756"
111
+ }
100
112
  }
101
113
  },
102
114
  "native,Version=v0.0/win10-x64": {
103
- "Microsoft.Web.WebView2": {
104
- "type": "Transitive",
105
- "resolved": "1.0.1264.42",
106
- "contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
115
+ "Microsoft.WindowsAppSDK": {
116
+ "type": "Direct",
117
+ "requested": "[1.5.240227000, )",
118
+ "resolved": "1.5.240227000",
119
+ "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==",
120
+ "dependencies": {
121
+ "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756"
122
+ }
107
123
  }
108
124
  },
109
125
  "native,Version=v0.0/win10-x64-aot": {
110
- "Microsoft.Web.WebView2": {
111
- "type": "Transitive",
112
- "resolved": "1.0.1264.42",
113
- "contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
126
+ "Microsoft.WindowsAppSDK": {
127
+ "type": "Direct",
128
+ "requested": "[1.5.240227000, )",
129
+ "resolved": "1.5.240227000",
130
+ "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==",
131
+ "dependencies": {
132
+ "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756"
133
+ }
114
134
  }
115
135
  },
116
136
  "native,Version=v0.0/win10-x86": {
117
- "Microsoft.Web.WebView2": {
118
- "type": "Transitive",
119
- "resolved": "1.0.1264.42",
120
- "contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
137
+ "Microsoft.WindowsAppSDK": {
138
+ "type": "Direct",
139
+ "requested": "[1.5.240227000, )",
140
+ "resolved": "1.5.240227000",
141
+ "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==",
142
+ "dependencies": {
143
+ "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756"
144
+ }
121
145
  }
122
146
  },
123
147
  "native,Version=v0.0/win10-x86-aot": {
124
- "Microsoft.Web.WebView2": {
125
- "type": "Transitive",
126
- "resolved": "1.0.1264.42",
127
- "contentHash": "7OBUTkzQ5VI/3gb0ufi5U4zjuCowAJwQg2li0zXXzqkM+S1kmOlivTy1R4jAW+gY5Vyg510M+qMAESCQUjrfgA=="
148
+ "Microsoft.WindowsAppSDK": {
149
+ "type": "Direct",
150
+ "requested": "[1.5.240227000, )",
151
+ "resolved": "1.5.240227000",
152
+ "contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==",
153
+ "dependencies": {
154
+ "Microsoft.Windows.SDK.BuildTools": "10.0.22621.756"
155
+ }
128
156
  }
129
157
  }
130
158
  }
@@ -3,14 +3,14 @@
3
3
 
4
4
  #include <winrt/Microsoft.ReactNative.Composition.h>
5
5
 
6
- #include <CompositionSwitcher.interop.h>
6
+ #include <CompositionSwitcher.Experimental.interop.h>
7
7
 
8
8
  namespace Microsoft::ReactNative::Composition {
9
9
 
10
10
  class AutoDrawDrawingSurface {
11
11
  public:
12
12
  AutoDrawDrawingSurface(
13
- winrt::Microsoft::ReactNative::Composition::IDrawingSurfaceBrush &drawingSurface,
13
+ winrt::Microsoft::ReactNative::Composition::Experimental::IDrawingSurfaceBrush &drawingSurface,
14
14
  POINT *offset) noexcept {
15
15
  drawingSurface.as(m_drawingSurfaceInterop);
16
16
  m_drawingSurfaceInterop->BeginDraw(m_d2dDeviceContext.put(), offset);
@@ -31,7 +31,7 @@ class AutoDrawDrawingSurface {
31
31
  }
32
32
 
33
33
  private:
34
- winrt::com_ptr<ICompositionDrawingSurfaceInterop> m_drawingSurfaceInterop;
34
+ winrt::com_ptr<Experimental::ICompositionDrawingSurfaceInterop> m_drawingSurfaceInterop;
35
35
  winrt::com_ptr<ID2D1DeviceContext> m_d2dDeviceContext;
36
36
  };
37
37
 
@@ -12,7 +12,7 @@
12
12
  #include <winrt/Microsoft.ReactNative.Composition.h>
13
13
  #include <winrt/Windows.Graphics.DirectX.Direct3D11.h>
14
14
 
15
- namespace Microsoft::ReactNative::Composition {
15
+ namespace Microsoft::ReactNative::Composition::Experimental {
16
16
 
17
17
  struct __declspec(uuid("941FDD90-ED27-49CE-A1CD-86ECB2D4A0FA")) ICompositionDrawingSurfaceInterop : public IUnknown {
18
18
  virtual HRESULT BeginDraw(ID2D1DeviceContext **deviceContextOut, POINT *offset) noexcept = 0;
@@ -31,4 +31,4 @@ struct __declspec(uuid("4742F122-3EE0-48AA-9EA9-44A00147B55F")) ICompositionCont
31
31
  virtual void D2DFactory(ID2D1Factory1 **outD2DFactory) noexcept = 0;
32
32
  };
33
33
 
34
- } // namespace Microsoft::ReactNative::Composition
34
+ } // namespace Microsoft::ReactNative::Composition::Experimental
@@ -13,6 +13,8 @@
13
13
 
14
14
  #include <winrt/Microsoft.ReactNative.h>
15
15
 
16
+ #include "CppWinRTIncludes.h"
17
+
16
18
  namespace winrt::Microsoft::ReactNative {
17
19
 
18
20
  namespace details {
@@ -141,24 +141,15 @@
141
141
  <Version>$(NETCoreUWPVersion)</Version>
142
142
  </PackageReference>
143
143
  </ItemGroup>
144
- <Choose>
145
- <When Condition="'$(EnableSourceLink)' == 'true'">
146
- <ItemGroup>
147
- <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
148
- </ItemGroup>
149
- </When>
150
- </Choose>
151
144
  <!--
152
145
  Visual Studio (but not MSBuild) will ignore Conditions applied directly to
153
146
  the PackageReference or ItemGroup containing a PackageReference. Both
154
147
  respect <Choose> for conditional restoration.
155
148
  -->
156
149
  <Choose>
157
- <When Condition="'$(UseWinUI3)'=='true'">
150
+ <When Condition="'$(EnableSourceLink)' == 'true'">
158
151
  <ItemGroup>
159
- <PackageReference Include="Microsoft.WinUI">
160
- <Version>$(WinUI3Version)</Version>
161
- </PackageReference>
152
+ <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
162
153
  </ItemGroup>
163
154
  </When>
164
155
  </Choose>
@@ -17,7 +17,7 @@
17
17
  <Import Project="$(ReactNativeWindowsDir)\PropertySheets\Appx.props" />
18
18
  <Import Project="$(ReactNativeWindowsDir)\PropertySheets\Autolink.props" />
19
19
  <Import Project="$(ReactNativeWindowsDir)\PropertySheets\Codegen.props" />
20
- <Import Project="$(ReactNativeWindowsDir)\PropertySheets\HybridCRT.props" Condition="'$(UseWinUI3)'=='true'"/>
20
+ <Import Project="$(ReactNativeWindowsDir)\PropertySheets\HybridCRT.props" />
21
21
  <Import Project="$(ReactNativeWindowsDir)\PropertySheets\NuGet.Cpp.props" />
22
22
  <Import Project="$(ReactNativeWindowsDir)\PropertySheets\WinUI.props" />
23
23
  <Import Project="$(ReactNativeWindowsDir)\PropertySheets\CppAppConsumeCSharpModule.props" />
@@ -12,18 +12,20 @@
12
12
  See https://microsoft.github.io/react-native-windows/docs/win10-compat
13
13
  -->
14
14
  <PropertyGroup Label="Globals" Condition="'$(MSBuildProjectExtension)' == '.vcxproj'">
15
-
16
- <WindowsTargetPlatformVersion Condition="'$(UseWinUI3)'=='true' And ('$(WindowsTargetPlatformVersion)'=='' Or '$(WindowsTargetPlatformVersion)'=='10.0.0.0')">10.0.22000.0</WindowsTargetPlatformVersion>
17
15
  <WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)'=='' Or '$(WindowsTargetPlatformVersion)'=='10.0.0.0'">10.0.19041.0</WindowsTargetPlatformVersion>
18
16
  <WindowsTargetPlatformMinVersion Condition="'$(WindowsTargetPlatformMinVersion)'=='' Or '$(WindowsTargetPlatformMinVersion)'=='10.0.0.0'">10.0.17763.0</WindowsTargetPlatformMinVersion>
19
17
 
20
- <WindowsTargetPlatformMinVersion Condition="'$(UseWinUI3)'=='true' And $([MSBuild]::VersionLessThan('$(WindowsTargetPlatformMinVersion)', '10.0.17763.0'))">10.0.17763.0</WindowsTargetPlatformMinVersion>
18
+ <!-- WinAppSDK/Composition projects have higher version requirements. -->
19
+ <WindowsTargetPlatformVersion Condition="'$(UseWinUI3)'=='true' And $([MSBuild]::VersionLessThan('$(WindowsTargetPlatformVersion)', '10.0.22000.0'))">10.0.22000.0</WindowsTargetPlatformVersion>
20
+ <WindowsTargetPlatformMinVersion Condition="'$(UseWinUI3)'=='true' And $([MSBuild]::VersionLessThan('$(WindowsTargetPlatformMinVersion)', '10.0.18362.0'))">10.0.18362.0</WindowsTargetPlatformMinVersion>
21
21
  </PropertyGroup>
22
22
 
23
23
  <PropertyGroup Label="Globals" Condition="'$(MSBuildProjectExtension)' == '.csproj' Or '$(MSBuildProjectExtension)' == '.wapproj'">
24
24
  <TargetPlatformVersion Condition="'$(TargetPlatformVersion)'==''">10.0.19041.0</TargetPlatformVersion>
25
25
  <TargetPlatformMinVersion Condition="'$(TargetPlatformMinVersion)'==''">10.0.17763.0</TargetPlatformMinVersion>
26
26
 
27
+ <!-- WinAppSDK/Composition projects have higher version requirements. -->
28
+ <TargetPlatformVersion Condition="'$(UseWinUI3)'=='true' And $([MSBuild]::VersionLessThan('$(TargetPlatformVersion)', '10.0.22000.0'))">10.0.22000.0</TargetPlatformVersion>
27
29
  <TargetPlatformMinVersion Condition="'$(UseWinUI3)'=='true' And $([MSBuild]::VersionLessThan('$(TargetPlatformMinVersion)', '10.0.17763.0'))">10.0.17763.0</TargetPlatformMinVersion>
28
30
  </PropertyGroup>
29
31
 
@@ -10,11 +10,11 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.74.0-preview.2</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.74.0-preview.4</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>74</ReactNativeWindowsMinor>
16
16
  <ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
18
- <ReactNativeWindowsCommitId>5f10e604924b47b0baa64825d8770be4e3a074b1</ReactNativeWindowsCommitId>
18
+ <ReactNativeWindowsCommitId>377d16da702ed9ba7e7e66cc3483fffe72d56d9e</ReactNativeWindowsCommitId>
19
19
  </PropertyGroup>
20
20
  </Project>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.74.0-preview.2",
3
+ "version": "0.74.0-preview.4",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,13 +28,13 @@
28
28
  "@react-native-community/cli-platform-ios": "13.6.4",
29
29
  "@react-native-windows/cli": "0.74.0-preview.2",
30
30
  "@react-native/assets": "1.0.0",
31
- "@react-native/assets-registry": "0.74.77",
32
- "@react-native/codegen": "0.74.77",
33
- "@react-native/community-cli-plugin": "0.74.77",
34
- "@react-native/gradle-plugin": "0.74.77",
35
- "@react-native/js-polyfills": "0.74.77",
36
- "@react-native/normalize-colors": "0.74.77",
37
- "@react-native/virtualized-lists": "0.74.77",
31
+ "@react-native/assets-registry": "0.74.80",
32
+ "@react-native/codegen": "0.74.80",
33
+ "@react-native/community-cli-plugin": "0.74.80",
34
+ "@react-native/gradle-plugin": "0.74.80",
35
+ "@react-native/js-polyfills": "0.74.80",
36
+ "@react-native/normalize-colors": "0.74.80",
37
+ "@react-native/virtualized-lists": "0.74.80",
38
38
  "abort-controller": "^3.0.0",
39
39
  "anser": "^1.4.9",
40
40
  "ansi-regex": "^5.0.0",
@@ -65,7 +65,7 @@
65
65
  },
66
66
  "devDependencies": {
67
67
  "@react-native-windows/codegen": "0.74.0-preview.1",
68
- "@react-native/metro-config": "0.74.77",
68
+ "@react-native/metro-config": "0.74.80",
69
69
  "@rnw-scripts/babel-react-native-config": "0.0.0",
70
70
  "@rnw-scripts/eslint-config": "1.2.9",
71
71
  "@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.13",
@@ -81,7 +81,7 @@
81
81
  "just-scripts": "^1.3.3",
82
82
  "prettier": "2.8.8",
83
83
  "react": "18.2.0",
84
- "react-native": "0.74.0-rc.6",
84
+ "react-native": "0.74.0-rc.9",
85
85
  "react-native-platform-override": "^1.9.25",
86
86
  "react-refresh": "^0.14.0",
87
87
  "typescript": "5.0.4"
@@ -89,7 +89,7 @@
89
89
  "peerDependencies": {
90
90
  "@types/react": "^18.2.6",
91
91
  "react": "18.2.0",
92
- "react-native": "0.74.0-rc.6"
92
+ "react-native": "0.74.0-rc.9"
93
93
  },
94
94
  "beachball": {
95
95
  "defaultNpmTag": "preview",