react-native-windows 0.74.0 → 0.74.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 (37) hide show
  1. package/Libraries/Components/Touchable/TouchableBounce.js +1 -0
  2. package/Libraries/Components/Touchable/TouchableOpacity.js +1 -0
  3. package/Libraries/Components/Touchable/TouchableOpacity.windows.js +1 -0
  4. package/Libraries/Core/ReactNativeVersion.js +2 -2
  5. package/Microsoft.ReactNative/CompositionRootView.idl +4 -2
  6. package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +6 -0
  7. package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.h +2 -0
  8. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +188 -141
  9. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +1 -1
  10. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView.cpp +41 -34
  11. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView.h +5 -1
  12. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView_emptyimpl.cpp +7 -0
  13. package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp +26 -13
  14. package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.h +3 -2
  15. package/Microsoft.ReactNative/Fabric/Composition/ImageResponseImage.h +17 -0
  16. package/Microsoft.ReactNative/Fabric/Composition/Theme.cpp +28 -10
  17. package/Microsoft.ReactNative/Fabric/Composition/Theme.h +4 -3
  18. package/Microsoft.ReactNative/Fabric/Composition/Theme_emptyimpl.cpp +2 -6
  19. package/Microsoft.ReactNative/Fabric/Composition/UriImageManager.cpp +82 -0
  20. package/Microsoft.ReactNative/Fabric/Composition/UriImageManager.h +39 -0
  21. package/Microsoft.ReactNative/Fabric/Composition/UriImageManager_emptyimpl.cpp +16 -0
  22. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +3 -0
  23. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +2 -0
  24. package/Microsoft.ReactNative/Fabric/ImageManager.cpp +3 -2
  25. package/Microsoft.ReactNative/Fabric/WindowsImageManager.cpp +102 -35
  26. package/Microsoft.ReactNative/Fabric/WindowsImageManager.h +6 -1
  27. package/Microsoft.ReactNative/Theme.idl +1 -2
  28. package/Microsoft.ReactNative/UriImageManager.idl +85 -0
  29. package/Microsoft.ReactNative.Cxx/AutoDraw.h +1 -0
  30. package/PropertySheets/Generated/PackageVersion.g.props +3 -3
  31. package/Shared/Shared.vcxitems +11 -0
  32. package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +33 -21
  33. package/codegen/rnwcoreJSI-generated.cpp +18 -6
  34. package/codegen/rnwcoreJSI.h +27 -9
  35. package/package.json +14 -14
  36. package/src/private/featureflags/NativeReactNativeFeatureFlags.js +4 -2
  37. package/src/private/featureflags/ReactNativeFeatureFlags.js +16 -6
@@ -5,7 +5,11 @@
5
5
 
6
6
  #include "WindowsImageManager.h"
7
7
 
8
+ #include <Fabric/Composition/CompositionContextHelper.h>
9
+ #include <Fabric/Composition/ImageResponseImage.h>
10
+ #include <Fabric/Composition/UriImageManager.h>
8
11
  #include <Utils/ImageUtils.h>
12
+ #include <functional/functor.h>
9
13
  #include <shcore.h>
10
14
  #include <wincodec.h>
11
15
 
@@ -13,7 +17,11 @@ extern "C" HRESULT WINAPI WICCreateImagingFactory_Proxy(UINT SDKVersion, IWICIma
13
17
 
14
18
  namespace Microsoft::ReactNative {
15
19
 
16
- WindowsImageManager::WindowsImageManager() {}
20
+ WindowsImageManager::WindowsImageManager(winrt::Microsoft::ReactNative::ReactContext reactContext)
21
+ : m_reactContext(reactContext) {
22
+ m_uriImageManager = winrt::Microsoft::ReactNative::Composition::implementation::UriImageManager::GetOrCreate(
23
+ reactContext.Properties());
24
+ }
17
25
 
18
26
  winrt::com_ptr<IWICBitmapSource> wicBitmapSourceFromStream(
19
27
  const winrt::Windows::Storage::Streams::IRandomAccessStream &results) noexcept {
@@ -39,19 +47,12 @@ winrt::com_ptr<IWICBitmapSource> wicBitmapSourceFromStream(
39
47
  return decodedFrame;
40
48
  }
41
49
 
42
- void generateBitmap(
43
- std::weak_ptr<const facebook::react::ImageResponseObserverCoordinator> weakObserverCoordinator,
50
+ std::shared_ptr<winrt::Microsoft::ReactNative::Composition::implementation::ImageResponseImage> generateBitmap(
44
51
  const winrt::Windows::Storage::Streams::IRandomAccessStream &results) noexcept {
45
- auto observerCoordinator = weakObserverCoordinator.lock();
46
- if (!observerCoordinator) {
47
- return;
48
- }
49
-
50
52
  winrt::com_ptr<IWICBitmapSource> decodedFrame = wicBitmapSourceFromStream(results);
51
53
 
52
54
  if (!decodedFrame) {
53
- observerCoordinator->nativeImageResponseFailed();
54
- return;
55
+ return nullptr;
55
56
  }
56
57
 
57
58
  winrt::com_ptr<IWICImagingFactory> imagingFactory;
@@ -70,32 +71,18 @@ void generateBitmap(
70
71
  winrt::com_ptr<IWICBitmap> wicbmp;
71
72
  winrt::check_hresult(imagingFactory->CreateBitmapFromSource(converter.get(), WICBitmapCacheOnLoad, wicbmp.put()));
72
73
 
73
- // ImageResponse saves a shared_ptr<void> for its data, so we need to wrap the com_ptr in a shared_ptr...
74
- auto sharedwicbmp = std::make_shared<winrt::com_ptr<IWICBitmap>>(wicbmp);
75
-
76
- observerCoordinator->nativeImageResponseComplete(facebook::react::ImageResponse(sharedwicbmp, nullptr /*metadata*/));
74
+ auto image = std::make_shared<winrt::Microsoft::ReactNative::Composition::implementation::ImageResponseImage>();
75
+ image->m_wicbmp = wicbmp;
76
+ return image;
77
77
  }
78
78
 
79
- facebook::react::ImageRequest WindowsImageManager::requestImage(
80
- const facebook::react::ImageSource &imageSource,
81
- facebook::react::SurfaceId surfaceId) const {
82
- auto imageRequest = facebook::react::ImageRequest(imageSource, nullptr, {});
83
-
84
- auto weakObserverCoordinator = (std::weak_ptr<const facebook::react::ImageResponseObserverCoordinator>)
85
- imageRequest.getSharedObserverCoordinator();
86
-
87
- ReactImageSource source;
88
- source.uri = imageSource.uri;
89
- source.height = imageSource.size.height;
90
- source.width = imageSource.size.width;
91
- source.sourceType = ImageSourceType::Download;
92
-
93
- auto task = GetImageStreamAsync(source);
94
-
95
- // TODO progress? - Can we register for progress off the download task?
96
- // observerCoordinator->nativeImageResponseProgress((float)progress / (float)total);
97
-
98
- task.Completed([weakObserverCoordinator](auto asyncOp, auto status) {
79
+ template <typename T>
80
+ void ProcessImageRequestTask(
81
+ std::weak_ptr<const facebook::react::ImageResponseObserverCoordinator> &weakObserverCoordinator,
82
+ const winrt::Windows::Foundation::IAsyncOperation<T> &task,
83
+ Mso::Functor<std::shared_ptr<winrt::Microsoft::ReactNative::Composition::implementation::ImageResponseImage>(
84
+ const T &result)> &&onSuccess) {
85
+ task.Completed([weakObserverCoordinator, onSuccess = std::move(onSuccess)](auto asyncOp, auto status) {
99
86
  auto observerCoordinator = weakObserverCoordinator.lock();
100
87
  if (!observerCoordinator) {
101
88
  return;
@@ -103,7 +90,12 @@ facebook::react::ImageRequest WindowsImageManager::requestImage(
103
90
 
104
91
  switch (status) {
105
92
  case winrt::Windows::Foundation::AsyncStatus::Completed: {
106
- generateBitmap(weakObserverCoordinator, asyncOp.GetResults());
93
+ auto imageResponseImage = onSuccess(asyncOp.GetResults());
94
+ if (imageResponseImage)
95
+ observerCoordinator->nativeImageResponseComplete(
96
+ facebook::react::ImageResponse(imageResponseImage, nullptr /*metadata*/));
97
+ else
98
+ observerCoordinator->nativeImageResponseFailed();
107
99
  break;
108
100
  }
109
101
  case winrt::Windows::Foundation::AsyncStatus::Canceled: {
@@ -118,6 +110,81 @@ facebook::react::ImageRequest WindowsImageManager::requestImage(
118
110
  }
119
111
  }
120
112
  });
113
+ }
114
+
115
+ facebook::react::ImageRequest WindowsImageManager::requestImage(
116
+ const facebook::react::ImageSource &imageSource,
117
+ facebook::react::SurfaceId surfaceId) const {
118
+ auto imageRequest = facebook::react::ImageRequest(imageSource, nullptr, {});
119
+
120
+ auto weakObserverCoordinator = (std::weak_ptr<const facebook::react::ImageResponseObserverCoordinator>)
121
+ imageRequest.getSharedObserverCoordinator();
122
+
123
+ auto rnImageSource = winrt::Microsoft::ReactNative::Composition::implementation::MakeImageSource(imageSource);
124
+ auto provider = m_uriImageManager->TryGetUriImageProvider(m_reactContext.Handle(), rnImageSource);
125
+
126
+ if (auto bProvider = provider.try_as<winrt::Microsoft::ReactNative::Composition::IUriBrushProvider>()) {
127
+ ProcessImageRequestTask<winrt::Microsoft::ReactNative::Composition::UriBrushFactory>(
128
+ weakObserverCoordinator,
129
+ bProvider.GetSourceAsync(m_reactContext.Handle(), rnImageSource),
130
+ [](const winrt::Microsoft::ReactNative::Composition::UriBrushFactory &factory) noexcept {
131
+ auto image =
132
+ std::make_shared<winrt::Microsoft::ReactNative::Composition::implementation::ImageResponseImage>();
133
+
134
+ // Wrap the UriBrushFactory to provide the internal CompositionContext types
135
+ image->m_brushFactory =
136
+ [factory](
137
+ const winrt::Microsoft::ReactNative::IReactContext &context,
138
+ const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext
139
+ &compositionContext) {
140
+ auto compositor = winrt::Microsoft::ReactNative::Composition::Experimental::
141
+ MicrosoftCompositionContextHelper::InnerCompositor(compositionContext);
142
+ auto brush = factory(context, compositor);
143
+ return winrt::Microsoft::ReactNative::Composition::Experimental::implementation::
144
+ MicrosoftCompositionContextHelper::WrapBrush(brush);
145
+ };
146
+ return image;
147
+ });
148
+
149
+ return imageRequest;
150
+ }
151
+
152
+ if (auto brushProvider =
153
+ provider.try_as<winrt::Microsoft::ReactNative::Composition::Experimental::IUriBrushProvider>()) {
154
+ ProcessImageRequestTask<winrt::Microsoft::ReactNative::Composition::Experimental::UriBrushFactory>(
155
+ weakObserverCoordinator,
156
+ brushProvider.GetSourceAsync(m_reactContext.Handle(), rnImageSource),
157
+ [](const winrt::Microsoft::ReactNative::Composition::Experimental::UriBrushFactory &factory) noexcept {
158
+ auto image =
159
+ std::make_shared<winrt::Microsoft::ReactNative::Composition::implementation::ImageResponseImage>();
160
+ image->m_brushFactory = factory;
161
+ return image;
162
+ });
163
+
164
+ return imageRequest;
165
+ };
166
+
167
+ winrt::Windows::Foundation::IAsyncOperation<winrt::Windows::Storage::Streams::IRandomAccessStream> task;
168
+ if (auto imageStreamProvider =
169
+ provider.try_as<winrt::Microsoft::ReactNative::Composition::IUriImageStreamProvider>()) {
170
+ task = imageStreamProvider.GetSourceAsync(m_reactContext.Handle(), rnImageSource);
171
+ } else {
172
+ ReactImageSource source;
173
+ source.uri = imageSource.uri;
174
+ source.height = imageSource.size.height;
175
+ source.width = imageSource.size.width;
176
+ source.sourceType = ImageSourceType::Download;
177
+
178
+ task = GetImageStreamAsync(source);
179
+ }
180
+
181
+ // TODO progress? - Can we register for progress off the download task?
182
+ // observerCoordinator->nativeImageResponseProgress((float)progress / (float)total);
183
+
184
+ ProcessImageRequestTask<winrt::Windows::Storage::Streams::IRandomAccessStream>(
185
+ weakObserverCoordinator, task, [](const winrt::Windows::Storage::Streams::IRandomAccessStream &stream) {
186
+ return generateBitmap(stream);
187
+ });
121
188
 
122
189
  return imageRequest;
123
190
  }
@@ -5,16 +5,21 @@
5
5
 
6
6
  #include <react/renderer/imagemanager/ImageRequest.h>
7
7
 
8
+ #include <Fabric/Composition/UriImageManager.h>
8
9
  #include <ReactContext.h>
9
10
 
10
11
  namespace Microsoft::ReactNative {
11
12
 
12
13
  struct WindowsImageManager {
13
- WindowsImageManager();
14
+ WindowsImageManager(winrt::Microsoft::ReactNative::ReactContext reactContext);
14
15
 
15
16
  facebook::react::ImageRequest requestImage(
16
17
  const facebook::react::ImageSource &imageSource,
17
18
  facebook::react::SurfaceId surfaceId) const;
19
+
20
+ private:
21
+ winrt::Microsoft::ReactNative::ReactContext m_reactContext;
22
+ winrt::com_ptr<winrt::Microsoft::ReactNative::Composition::implementation::UriImageManager> m_uriImageManager;
18
23
  };
19
24
 
20
25
  } // namespace Microsoft::ReactNative
@@ -61,8 +61,7 @@ namespace Microsoft.ReactNative.Composition
61
61
  event Windows.Foundation.EventHandler<Object> ThemeChanged;
62
62
 
63
63
  static Theme GetDefaultTheme(Microsoft.ReactNative.IReactContext context);
64
- static void SetDefaultTheme(Microsoft.ReactNative.ReactInstanceSettings settings, Theme theme);
65
- static Microsoft.ReactNative.IReactPropertyName ThemeChangedEventName { get; };
64
+ static void SetDefaultResources(Microsoft.ReactNative.ReactInstanceSettings settings, ICustomResourceLoader theme);
66
65
  };
67
66
 
68
67
  } // namespace Microsoft.ReactNative
@@ -0,0 +1,85 @@
1
+ // Copyright (c) Microsoft Corporation.
2
+ // Licensed under the MIT License.
3
+
4
+ import "IReactContext.idl";
5
+ import "CompositionSwitcher.idl";
6
+
7
+ #include "DocString.h"
8
+
9
+ namespace Microsoft.ReactNative.Composition
10
+ {
11
+ [default_interface]
12
+ [webhosthidden]
13
+ [experimental]
14
+ DOC_STRING(
15
+ "Provides information about an image source requested by the application.")
16
+ runtimeclass ImageSource
17
+ {
18
+ Windows.Foundation.Uri Uri { get; };
19
+ Windows.Foundation.Size Size { get; };
20
+ Single Scale { get; };
21
+ };
22
+
23
+
24
+ [webhosthidden]
25
+ [experimental]
26
+ interface IUriImageProvider
27
+ {
28
+ DOC_STRING(
29
+ "This should return true if this provider will provide an image for the provided uri.")
30
+ Boolean CanLoadImageUri(Microsoft.ReactNative.IReactContext context, Windows.Foundation.Uri uri);
31
+ }
32
+
33
+ [webhosthidden]
34
+ [experimental]
35
+ DOC_STRING(
36
+ "This allows applications to provide their own image caching / storage pipelines. Or to generate images on the fly based on uri.")
37
+ interface IUriImageStreamProvider requires IUriImageProvider
38
+ {
39
+ DOC_STRING(
40
+ "Returns a stream of an image file that can be decoded by Windows Imaging Component - https://learn.microsoft.com/en-us/windows/win32/api/_wic/ ")
41
+ Windows.Foundation.IAsyncOperation<Windows.Storage.Streams.IRandomAccessStream> GetSourceAsync(Microsoft.ReactNative.IReactContext context, ImageSource imageSource);
42
+ }
43
+
44
+
45
+ [webhosthidden]
46
+ [experimental]
47
+ delegate Microsoft.UI.Composition.CompositionBrush UriBrushFactory(Microsoft.ReactNative.IReactContext reactContext, Microsoft.UI.Composition.Compositor compositor);
48
+
49
+ [webhosthidden]
50
+ [experimental]
51
+ DOC_STRING(
52
+ "This allows applications to provide their own image rendering pipeline. Or to generate graphics on the fly based on uri.")
53
+ interface IUriBrushProvider requires IUriImageProvider
54
+ {
55
+ DOC_STRING(
56
+ "This allows applications to provide their own image rendering pipeline. Or to generate graphics on the fly based on uri.")
57
+ Windows.Foundation.IAsyncOperation<UriBrushFactory> GetSourceAsync(Microsoft.ReactNative.IReactContext context, Microsoft.ReactNative.Composition.ImageSource imageSource);
58
+ }
59
+
60
+ namespace Experimental {
61
+
62
+ [webhosthidden]
63
+ [experimental]
64
+ delegate Microsoft.ReactNative.Composition.Experimental.IBrush UriBrushFactory(Microsoft.ReactNative.IReactContext reactContext, Microsoft.ReactNative.Composition.Experimental.ICompositionContext compositionContext);
65
+
66
+ [webhosthidden]
67
+ [experimental]
68
+ DOC_STRING(
69
+ "This allows applications to provide their own image rendering pipeline. Or to generate graphics on the fly based on uri.")
70
+ interface IUriBrushProvider requires Microsoft.ReactNative.Composition.IUriImageProvider
71
+ {
72
+ Windows.Foundation.IAsyncOperation<UriBrushFactory> GetSourceAsync(Microsoft.ReactNative.IReactContext context, Microsoft.ReactNative.Composition.ImageSource imageSource);
73
+ }
74
+ }
75
+
76
+ [default_interface]
77
+ [webhosthidden]
78
+ [experimental]
79
+ DOC_STRING(
80
+ "Ability to load images using custom Uri protocol handlers. The provider should implement @IUriImageStreamProvider or @Experimental.IUriBrushProvider")
81
+ runtimeclass UriImageManager
82
+ {
83
+ static void AddUriImageProvider(Microsoft.ReactNative.IReactPropertyBag properties, IUriImageProvider provider);
84
+ }
85
+ } // namespace Microsoft.ReactNative.Composition
@@ -20,6 +20,7 @@ class AutoDrawDrawingSurface {
20
20
 
21
21
  ~AutoDrawDrawingSurface() noexcept {
22
22
  if (m_d2dDeviceContext) {
23
+ m_d2dDeviceContext = nullptr;
23
24
  m_drawingSurfaceInterop->EndDraw();
24
25
  }
25
26
  }
@@ -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</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.74.2</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>74</ReactNativeWindowsMinor>
16
- <ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
16
+ <ReactNativeWindowsPatch>2</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
18
- <ReactNativeWindowsCommitId>388cdbb68bde9713f67c0e64e33ef62ea23d892f</ReactNativeWindowsCommitId>
18
+ <ReactNativeWindowsCommitId>b422f06e2b5ac1bd5fb7cffbc9f247024452120a</ReactNativeWindowsCommitId>
19
19
  </PropertyGroup>
20
20
  </Project>
@@ -84,6 +84,16 @@
84
84
  <DependentUpon>$(ReactNativeWindowsDir)Microsoft.ReactNative\CompositionUIService.idl</DependentUpon>
85
85
  <SubType>Code</SubType>
86
86
  </ClCompile>
87
+ <ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\UriImageManager.cpp">
88
+ <ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
89
+ <DependentUpon>$(ReactNativeWindowsDir)Microsoft.ReactNative\UriImageManager.idl</DependentUpon>
90
+ <SubType>Code</SubType>
91
+ </ClCompile>
92
+ <ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\UriImageManager_emptyimpl.cpp">
93
+ <ExcludedFromBuild Condition="'$(UseFabric)' == 'true' OR '$(IncludeFabricInterface)' != 'true'">true</ExcludedFromBuild>
94
+ <DependentUpon>$(ReactNativeWindowsDir)Microsoft.ReactNative\UriImageManager.idl</DependentUpon>
95
+ <SubType>Code</SubType>
96
+ </ClCompile>
87
97
  <ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\CompositionViewComponentView.cpp">
88
98
  <ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
89
99
  </ClCompile>
@@ -639,6 +649,7 @@
639
649
  <Midl Condition="'$(UseFabric)' == 'true' OR '$(IncludeFabricInterface)' == 'true'" Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IReactPackageBuilderFabric.idl" />
640
650
  <Midl Condition="'$(UseFabric)' == 'true' OR '$(IncludeFabricInterface)' == 'true'" Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\IReactViewComponentBuilder.idl" />
641
651
  <Midl Condition="'$(UseFabric)' == 'true' OR '$(IncludeFabricInterface)' == 'true'" Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\Theme.idl" />
652
+ <Midl Condition="'$(UseFabric)' == 'true' OR '$(IncludeFabricInterface)' == 'true'" Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\UriImageManager.idl" />
642
653
  <Midl Condition="'$(UseFabric)' == 'true' OR '$(IncludeFabricInterface)' == 'true'" Include="$(ReactNativeWindowsDir)Microsoft.ReactNative\ViewProps.idl" />
643
654
  </ItemGroup>
644
655
  <ItemGroup>
@@ -17,15 +17,17 @@ namespace Microsoft::ReactNativeSpecs {
17
17
  struct ReactNativeFeatureFlagsSpec : winrt::Microsoft::ReactNative::TurboModuleSpec {
18
18
  static constexpr auto methods = std::tuple{
19
19
  SyncMethod<bool() noexcept>{0, L"commonTestFlag"},
20
- SyncMethod<bool() noexcept>{1, L"enableBackgroundExecutor"},
21
- SyncMethod<bool() noexcept>{2, L"useModernRuntimeScheduler"},
22
- SyncMethod<bool() noexcept>{3, L"enableMicrotasks"},
23
- SyncMethod<bool() noexcept>{4, L"batchRenderingUpdatesInEventLoop"},
24
- SyncMethod<bool() noexcept>{5, L"enableSpannableBuildingUnification"},
25
- SyncMethod<bool() noexcept>{6, L"enableCustomDrawOrderFabric"},
26
- SyncMethod<bool() noexcept>{7, L"enableFixForClippedSubviewsCrash"},
27
- SyncMethod<bool() noexcept>{8, L"inspectorEnableCxxInspectorPackagerConnection"},
28
- SyncMethod<bool() noexcept>{9, L"inspectorEnableModernCDPRegistry"},
20
+ SyncMethod<bool() noexcept>{1, L"androidEnablePendingFabricTransactions"},
21
+ SyncMethod<bool() noexcept>{2, L"batchRenderingUpdatesInEventLoop"},
22
+ SyncMethod<bool() noexcept>{3, L"destroyFabricSurfacesInReactInstanceManager"},
23
+ SyncMethod<bool() noexcept>{4, L"enableBackgroundExecutor"},
24
+ SyncMethod<bool() noexcept>{5, L"useModernRuntimeScheduler"},
25
+ SyncMethod<bool() noexcept>{6, L"enableMicrotasks"},
26
+ SyncMethod<bool() noexcept>{7, L"enableSpannableBuildingUnification"},
27
+ SyncMethod<bool() noexcept>{8, L"enableCustomDrawOrderFabric"},
28
+ SyncMethod<bool() noexcept>{9, L"enableFixForClippedSubviewsCrash"},
29
+ SyncMethod<bool() noexcept>{10, L"inspectorEnableCxxInspectorPackagerConnection"},
30
+ SyncMethod<bool() noexcept>{11, L"inspectorEnableModernCDPRegistry"},
29
31
  };
30
32
 
31
33
  template <class TModule>
@@ -39,46 +41,56 @@ struct ReactNativeFeatureFlagsSpec : winrt::Microsoft::ReactNative::TurboModuleS
39
41
  " REACT_SYNC_METHOD(commonTestFlag) static bool commonTestFlag() noexcept { /* implementation */ }\n");
40
42
  REACT_SHOW_METHOD_SPEC_ERRORS(
41
43
  1,
44
+ "androidEnablePendingFabricTransactions",
45
+ " REACT_SYNC_METHOD(androidEnablePendingFabricTransactions) bool androidEnablePendingFabricTransactions() noexcept { /* implementation */ }\n"
46
+ " REACT_SYNC_METHOD(androidEnablePendingFabricTransactions) static bool androidEnablePendingFabricTransactions() noexcept { /* implementation */ }\n");
47
+ REACT_SHOW_METHOD_SPEC_ERRORS(
48
+ 2,
49
+ "batchRenderingUpdatesInEventLoop",
50
+ " REACT_SYNC_METHOD(batchRenderingUpdatesInEventLoop) bool batchRenderingUpdatesInEventLoop() noexcept { /* implementation */ }\n"
51
+ " REACT_SYNC_METHOD(batchRenderingUpdatesInEventLoop) static bool batchRenderingUpdatesInEventLoop() noexcept { /* implementation */ }\n");
52
+ REACT_SHOW_METHOD_SPEC_ERRORS(
53
+ 3,
54
+ "destroyFabricSurfacesInReactInstanceManager",
55
+ " REACT_SYNC_METHOD(destroyFabricSurfacesInReactInstanceManager) bool destroyFabricSurfacesInReactInstanceManager() noexcept { /* implementation */ }\n"
56
+ " REACT_SYNC_METHOD(destroyFabricSurfacesInReactInstanceManager) static bool destroyFabricSurfacesInReactInstanceManager() noexcept { /* implementation */ }\n");
57
+ REACT_SHOW_METHOD_SPEC_ERRORS(
58
+ 4,
42
59
  "enableBackgroundExecutor",
43
60
  " REACT_SYNC_METHOD(enableBackgroundExecutor) bool enableBackgroundExecutor() noexcept { /* implementation */ }\n"
44
61
  " REACT_SYNC_METHOD(enableBackgroundExecutor) static bool enableBackgroundExecutor() noexcept { /* implementation */ }\n");
45
62
  REACT_SHOW_METHOD_SPEC_ERRORS(
46
- 2,
63
+ 5,
47
64
  "useModernRuntimeScheduler",
48
65
  " REACT_SYNC_METHOD(useModernRuntimeScheduler) bool useModernRuntimeScheduler() noexcept { /* implementation */ }\n"
49
66
  " REACT_SYNC_METHOD(useModernRuntimeScheduler) static bool useModernRuntimeScheduler() noexcept { /* implementation */ }\n");
50
67
  REACT_SHOW_METHOD_SPEC_ERRORS(
51
- 3,
68
+ 6,
52
69
  "enableMicrotasks",
53
70
  " REACT_SYNC_METHOD(enableMicrotasks) bool enableMicrotasks() noexcept { /* implementation */ }\n"
54
71
  " REACT_SYNC_METHOD(enableMicrotasks) static bool enableMicrotasks() noexcept { /* implementation */ }\n");
55
72
  REACT_SHOW_METHOD_SPEC_ERRORS(
56
- 4,
57
- "batchRenderingUpdatesInEventLoop",
58
- " REACT_SYNC_METHOD(batchRenderingUpdatesInEventLoop) bool batchRenderingUpdatesInEventLoop() noexcept { /* implementation */ }\n"
59
- " REACT_SYNC_METHOD(batchRenderingUpdatesInEventLoop) static bool batchRenderingUpdatesInEventLoop() noexcept { /* implementation */ }\n");
60
- REACT_SHOW_METHOD_SPEC_ERRORS(
61
- 5,
73
+ 7,
62
74
  "enableSpannableBuildingUnification",
63
75
  " REACT_SYNC_METHOD(enableSpannableBuildingUnification) bool enableSpannableBuildingUnification() noexcept { /* implementation */ }\n"
64
76
  " REACT_SYNC_METHOD(enableSpannableBuildingUnification) static bool enableSpannableBuildingUnification() noexcept { /* implementation */ }\n");
65
77
  REACT_SHOW_METHOD_SPEC_ERRORS(
66
- 6,
78
+ 8,
67
79
  "enableCustomDrawOrderFabric",
68
80
  " REACT_SYNC_METHOD(enableCustomDrawOrderFabric) bool enableCustomDrawOrderFabric() noexcept { /* implementation */ }\n"
69
81
  " REACT_SYNC_METHOD(enableCustomDrawOrderFabric) static bool enableCustomDrawOrderFabric() noexcept { /* implementation */ }\n");
70
82
  REACT_SHOW_METHOD_SPEC_ERRORS(
71
- 7,
83
+ 9,
72
84
  "enableFixForClippedSubviewsCrash",
73
85
  " REACT_SYNC_METHOD(enableFixForClippedSubviewsCrash) bool enableFixForClippedSubviewsCrash() noexcept { /* implementation */ }\n"
74
86
  " REACT_SYNC_METHOD(enableFixForClippedSubviewsCrash) static bool enableFixForClippedSubviewsCrash() noexcept { /* implementation */ }\n");
75
87
  REACT_SHOW_METHOD_SPEC_ERRORS(
76
- 8,
88
+ 10,
77
89
  "inspectorEnableCxxInspectorPackagerConnection",
78
90
  " REACT_SYNC_METHOD(inspectorEnableCxxInspectorPackagerConnection) bool inspectorEnableCxxInspectorPackagerConnection() noexcept { /* implementation */ }\n"
79
91
  " REACT_SYNC_METHOD(inspectorEnableCxxInspectorPackagerConnection) static bool inspectorEnableCxxInspectorPackagerConnection() noexcept { /* implementation */ }\n");
80
92
  REACT_SHOW_METHOD_SPEC_ERRORS(
81
- 9,
93
+ 11,
82
94
  "inspectorEnableModernCDPRegistry",
83
95
  " REACT_SYNC_METHOD(inspectorEnableModernCDPRegistry) bool inspectorEnableModernCDPRegistry() noexcept { /* implementation */ }\n"
84
96
  " REACT_SYNC_METHOD(inspectorEnableModernCDPRegistry) static bool inspectorEnableModernCDPRegistry() noexcept { /* implementation */ }\n");
@@ -16,6 +16,21 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_commonT
16
16
  rt
17
17
  );
18
18
  }
19
+ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_androidEnablePendingFabricTransactions(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
20
+ return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->androidEnablePendingFabricTransactions(
21
+ rt
22
+ );
23
+ }
24
+ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_batchRenderingUpdatesInEventLoop(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
25
+ return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->batchRenderingUpdatesInEventLoop(
26
+ rt
27
+ );
28
+ }
29
+ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_destroyFabricSurfacesInReactInstanceManager(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
30
+ return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->destroyFabricSurfacesInReactInstanceManager(
31
+ rt
32
+ );
33
+ }
19
34
  static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableBackgroundExecutor(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
20
35
  return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->enableBackgroundExecutor(
21
36
  rt
@@ -31,11 +46,6 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableM
31
46
  rt
32
47
  );
33
48
  }
34
- static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_batchRenderingUpdatesInEventLoop(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
35
- return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->batchRenderingUpdatesInEventLoop(
36
- rt
37
- );
38
- }
39
49
  static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableSpannableBuildingUnification(jsi::Runtime &rt, TurboModule &turboModule, const jsi::Value* args, size_t count) {
40
50
  return static_cast<NativeReactNativeFeatureFlagsCxxSpecJSI *>(&turboModule)->enableSpannableBuildingUnification(
41
51
  rt
@@ -65,10 +75,12 @@ static jsi::Value __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_inspect
65
75
  NativeReactNativeFeatureFlagsCxxSpecJSI::NativeReactNativeFeatureFlagsCxxSpecJSI(std::shared_ptr<CallInvoker> jsInvoker)
66
76
  : TurboModule("NativeReactNativeFeatureFlagsCxx", jsInvoker) {
67
77
  methodMap_["commonTestFlag"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_commonTestFlag};
78
+ methodMap_["androidEnablePendingFabricTransactions"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_androidEnablePendingFabricTransactions};
79
+ methodMap_["batchRenderingUpdatesInEventLoop"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_batchRenderingUpdatesInEventLoop};
80
+ methodMap_["destroyFabricSurfacesInReactInstanceManager"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_destroyFabricSurfacesInReactInstanceManager};
68
81
  methodMap_["enableBackgroundExecutor"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableBackgroundExecutor};
69
82
  methodMap_["useModernRuntimeScheduler"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_useModernRuntimeScheduler};
70
83
  methodMap_["enableMicrotasks"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableMicrotasks};
71
- methodMap_["batchRenderingUpdatesInEventLoop"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_batchRenderingUpdatesInEventLoop};
72
84
  methodMap_["enableSpannableBuildingUnification"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableSpannableBuildingUnification};
73
85
  methodMap_["enableCustomDrawOrderFabric"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableCustomDrawOrderFabric};
74
86
  methodMap_["enableFixForClippedSubviewsCrash"] = MethodMetadata {0, __hostFunction_NativeReactNativeFeatureFlagsCxxSpecJSI_enableFixForClippedSubviewsCrash};
@@ -21,10 +21,12 @@ protected:
21
21
 
22
22
  public:
23
23
  virtual bool commonTestFlag(jsi::Runtime &rt) = 0;
24
+ virtual bool androidEnablePendingFabricTransactions(jsi::Runtime &rt) = 0;
25
+ virtual bool batchRenderingUpdatesInEventLoop(jsi::Runtime &rt) = 0;
26
+ virtual bool destroyFabricSurfacesInReactInstanceManager(jsi::Runtime &rt) = 0;
24
27
  virtual bool enableBackgroundExecutor(jsi::Runtime &rt) = 0;
25
28
  virtual bool useModernRuntimeScheduler(jsi::Runtime &rt) = 0;
26
29
  virtual bool enableMicrotasks(jsi::Runtime &rt) = 0;
27
- virtual bool batchRenderingUpdatesInEventLoop(jsi::Runtime &rt) = 0;
28
30
  virtual bool enableSpannableBuildingUnification(jsi::Runtime &rt) = 0;
29
31
  virtual bool enableCustomDrawOrderFabric(jsi::Runtime &rt) = 0;
30
32
  virtual bool enableFixForClippedSubviewsCrash(jsi::Runtime &rt) = 0;
@@ -61,6 +63,30 @@ private:
61
63
  return bridging::callFromJs<bool>(
62
64
  rt, &T::commonTestFlag, jsInvoker_, instance_);
63
65
  }
66
+ bool androidEnablePendingFabricTransactions(jsi::Runtime &rt) override {
67
+ static_assert(
68
+ bridging::getParameterCount(&T::androidEnablePendingFabricTransactions) == 1,
69
+ "Expected androidEnablePendingFabricTransactions(...) to have 1 parameters");
70
+
71
+ return bridging::callFromJs<bool>(
72
+ rt, &T::androidEnablePendingFabricTransactions, jsInvoker_, instance_);
73
+ }
74
+ bool batchRenderingUpdatesInEventLoop(jsi::Runtime &rt) override {
75
+ static_assert(
76
+ bridging::getParameterCount(&T::batchRenderingUpdatesInEventLoop) == 1,
77
+ "Expected batchRenderingUpdatesInEventLoop(...) to have 1 parameters");
78
+
79
+ return bridging::callFromJs<bool>(
80
+ rt, &T::batchRenderingUpdatesInEventLoop, jsInvoker_, instance_);
81
+ }
82
+ bool destroyFabricSurfacesInReactInstanceManager(jsi::Runtime &rt) override {
83
+ static_assert(
84
+ bridging::getParameterCount(&T::destroyFabricSurfacesInReactInstanceManager) == 1,
85
+ "Expected destroyFabricSurfacesInReactInstanceManager(...) to have 1 parameters");
86
+
87
+ return bridging::callFromJs<bool>(
88
+ rt, &T::destroyFabricSurfacesInReactInstanceManager, jsInvoker_, instance_);
89
+ }
64
90
  bool enableBackgroundExecutor(jsi::Runtime &rt) override {
65
91
  static_assert(
66
92
  bridging::getParameterCount(&T::enableBackgroundExecutor) == 1,
@@ -85,14 +111,6 @@ private:
85
111
  return bridging::callFromJs<bool>(
86
112
  rt, &T::enableMicrotasks, jsInvoker_, instance_);
87
113
  }
88
- bool batchRenderingUpdatesInEventLoop(jsi::Runtime &rt) override {
89
- static_assert(
90
- bridging::getParameterCount(&T::batchRenderingUpdatesInEventLoop) == 1,
91
- "Expected batchRenderingUpdatesInEventLoop(...) to have 1 parameters");
92
-
93
- return bridging::callFromJs<bool>(
94
- rt, &T::batchRenderingUpdatesInEventLoop, jsInvoker_, instance_);
95
- }
96
114
  bool enableSpannableBuildingUnification(jsi::Runtime &rt) override {
97
115
  static_assert(
98
116
  bridging::getParameterCount(&T::enableSpannableBuildingUnification) == 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.74.0",
3
+ "version": "0.74.2",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,18 +23,18 @@
23
23
  "dependencies": {
24
24
  "@babel/runtime": "^7.0.0",
25
25
  "@jest/create-cache-key-function": "^29.6.3",
26
- "@react-native-community/cli": "13.6.4",
27
- "@react-native-community/cli-platform-android": "13.6.4",
28
- "@react-native-community/cli-platform-ios": "13.6.4",
26
+ "@react-native-community/cli": "13.6.6",
27
+ "@react-native-community/cli-platform-android": "13.6.6",
28
+ "@react-native-community/cli-platform-ios": "13.6.6",
29
29
  "@react-native-windows/cli": "0.74.0",
30
30
  "@react-native/assets": "1.0.0",
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",
31
+ "@react-native/assets-registry": "0.74.83",
32
+ "@react-native/codegen": "0.74.83",
33
+ "@react-native/community-cli-plugin": "0.74.83",
34
+ "@react-native/gradle-plugin": "0.74.83",
35
+ "@react-native/js-polyfills": "0.74.83",
36
+ "@react-native/normalize-colors": "0.74.83",
37
+ "@react-native/virtualized-lists": "0.74.83",
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",
68
- "@react-native/metro-config": "0.74.80",
68
+ "@react-native/metro-config": "0.74.83",
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.9",
84
+ "react-native": "0.74.1",
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.9"
92
+ "react-native": "^0.74.0"
93
93
  },
94
94
  "beachball": {
95
95
  "defaultNpmTag": "latest",
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<8509d5ee87efb5aa8da7efcd2085d0a2>>
7
+ * @generated SignedSource<<8f82962343a5146622f36c2de071ff6a>>
8
8
  * @flow strict-local
9
9
  */
10
10
 
@@ -24,10 +24,12 @@ import * as TurboModuleRegistry from '../../../Libraries/TurboModule/TurboModule
24
24
 
25
25
  export interface Spec extends TurboModule {
26
26
  +commonTestFlag?: () => boolean;
27
+ +androidEnablePendingFabricTransactions?: () => boolean;
28
+ +batchRenderingUpdatesInEventLoop?: () => boolean;
29
+ +destroyFabricSurfacesInReactInstanceManager?: () => boolean;
27
30
  +enableBackgroundExecutor?: () => boolean;
28
31
  +useModernRuntimeScheduler?: () => boolean;
29
32
  +enableMicrotasks?: () => boolean;
30
- +batchRenderingUpdatesInEventLoop?: () => boolean;
31
33
  +enableSpannableBuildingUnification?: () => boolean;
32
34
  +enableCustomDrawOrderFabric?: () => boolean;
33
35
  +enableFixForClippedSubviewsCrash?: () => boolean;