react-native-windows 0.84.0-preview.7 → 0.84.0

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 (40) hide show
  1. package/Common/unicode.cpp +36 -0
  2. package/Common/unicode.h +8 -0
  3. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +5 -0
  4. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +106 -24
  5. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +11 -0
  6. package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp +4 -0
  7. package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.h +1 -0
  8. package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +6 -4
  9. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +28 -6
  10. package/Microsoft.ReactNative/Fabric/Composition/TextDrawing.cpp +1 -1
  11. package/Microsoft.ReactNative/Fabric/Composition/TooltipService.cpp +80 -0
  12. package/Microsoft.ReactNative/Fabric/Composition/TooltipService.h +17 -0
  13. package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/WindowsTextLayoutManager.cpp +1 -1
  14. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +3 -2
  15. package/Microsoft.ReactNative/Utils/LocalBundleReader.cpp +33 -25
  16. package/Microsoft.ReactNative/Utils/LocalBundleReader.h +5 -3
  17. package/Microsoft.ReactNative/Utils/UwpScriptStore.cpp +2 -2
  18. package/Microsoft.ReactNative/Utils/UwpScriptStore.h +3 -2
  19. package/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj +3 -3
  20. package/Microsoft.ReactNative.Managed.CodeGen/Microsoft.ReactNative.Managed.CodeGen.csproj +10 -10
  21. package/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml +1 -1
  22. package/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml +1 -1
  23. package/PropertySheets/Generated/PackageVersion.g.props +2 -2
  24. package/PropertySheets/JSEngine.props +1 -1
  25. package/PropertySheets/React.Cpp.props +4 -3
  26. package/PropertySheets/WinUI.props +2 -2
  27. package/Scripts/JustMyXaml.ps1 +8 -8
  28. package/Scripts/UnitTest.ps1 +3 -1
  29. package/Scripts/rnw-dependencies.ps1 +15 -16
  30. package/Shared/DevSupportManager.cpp +55 -48
  31. package/Shared/DevSupportManager.h +0 -1
  32. package/Shared/Modules/IWebSocketModuleContentHandler.h +15 -0
  33. package/Shared/Modules/WebSocketModule.cpp +8 -3
  34. package/Shared/Networking/DefaultBlobResource.cpp +37 -0
  35. package/Shared/Networking/DefaultBlobResource.h +12 -0
  36. package/Shared/Networking/WinRTWebSocketResource.h +5 -1
  37. package/just-task.js +13 -2
  38. package/package.json +6 -6
  39. package/templates/cpp-app/windows/MyApp/MyApp.vcxproj +1 -1
  40. package/templates/cpp-lib/windows/MyLib/MyLib.vcxproj +1 -1
@@ -83,6 +83,7 @@ shared_ptr<IWebSocketResource> WebSocketTurboModule::CreateResource(int64_t id,
83
83
  if (auto prop = propBag.Get(BlobModuleContentHandlerPropertyId()))
84
84
  contentHandler = prop.Value().lock();
85
85
 
86
+ bool handled = false;
86
87
  if (contentHandler) {
87
88
  if (isBinary) {
88
89
  auto buffer = CryptographicBuffer::DecodeFromBase64String(winrt::to_hstring(message));
@@ -90,11 +91,15 @@ shared_ptr<IWebSocketResource> WebSocketTurboModule::CreateResource(int64_t id,
90
91
  CryptographicBuffer::CopyToByteArray(buffer, arr);
91
92
  auto data = vector<uint8_t>(arr.begin(), arr.end());
92
93
 
93
- contentHandler->ProcessMessage(std::move(data), args);
94
+ handled = contentHandler->TryProcessMessage(id, std::move(data), args);
94
95
  } else {
95
- contentHandler->ProcessMessage(string{message}, args);
96
+ handled = contentHandler->TryProcessMessage(id, string{message}, args);
96
97
  }
97
- } else {
98
+ }
99
+ // When the content handler processes the message, it takes ownership of the
100
+ // payload and populates args itself (e.g. as a blob reference), so we only
101
+ // fall back to setting args["data"] when no handler claimed the message.
102
+ if (!handled) {
98
103
  args["data"] = message;
99
104
  }
100
105
 
@@ -221,6 +221,11 @@ BlobWebSocketModuleContentHandler::BlobWebSocketModuleContentHandler(shared_ptr<
221
221
 
222
222
  #pragma region IWebSocketModuleContentHandler
223
223
 
224
+ bool BlobWebSocketModuleContentHandler::CanHandleSocket(int64_t socketId) noexcept /*override*/ {
225
+ scoped_lock lock{m_mutex};
226
+ return m_socketIds.find(socketId) != m_socketIds.end();
227
+ }
228
+
224
229
  void BlobWebSocketModuleContentHandler::ProcessMessage(
225
230
  string &&message,
226
231
  msrn::JSValueObject &params) noexcept /*override*/
@@ -241,6 +246,38 @@ void BlobWebSocketModuleContentHandler::ProcessMessage(
241
246
  params[blobKeys.Type] = blobKeys.Blob;
242
247
  }
243
248
 
249
+ bool BlobWebSocketModuleContentHandler::TryProcessMessage(
250
+ int64_t socketId,
251
+ string &&message,
252
+ msrn::JSValueObject &params) noexcept /*override*/
253
+ {
254
+ scoped_lock lock{m_mutex};
255
+ if (m_socketIds.find(socketId) == m_socketIds.end())
256
+ return false;
257
+
258
+ params[blobKeys.Data] = std::move(message);
259
+ return true;
260
+ }
261
+
262
+ bool BlobWebSocketModuleContentHandler::TryProcessMessage(
263
+ int64_t socketId,
264
+ vector<uint8_t> &&message,
265
+ msrn::JSValueObject &params) noexcept /*override*/
266
+ {
267
+ scoped_lock lock{m_mutex};
268
+ if (m_socketIds.find(socketId) == m_socketIds.end())
269
+ return false;
270
+
271
+ auto blob = msrn::JSValueObject{
272
+ {blobKeys.Offset, 0},
273
+ {blobKeys.Size, message.size()},
274
+ {blobKeys.BlobId, m_blobPersistor->StoreMessage(std::move(message))}};
275
+
276
+ params[blobKeys.Data] = std::move(blob);
277
+ params[blobKeys.Type] = blobKeys.Blob;
278
+ return true;
279
+ }
280
+
244
281
  #pragma endregion IWebSocketModuleContentHandler
245
282
 
246
283
  void BlobWebSocketModuleContentHandler::Register(int64_t socketID) noexcept {
@@ -51,11 +51,23 @@ class BlobWebSocketModuleContentHandler final : public IWebSocketModuleContentHa
51
51
 
52
52
  #pragma region IWebSocketModuleContentHandler
53
53
 
54
+ bool CanHandleSocket(int64_t socketId) noexcept override;
55
+
54
56
  void ProcessMessage(std::string &&message, winrt::Microsoft::ReactNative::JSValueObject &params) noexcept override;
55
57
 
56
58
  void ProcessMessage(std::vector<uint8_t> &&message, winrt::Microsoft::ReactNative::JSValueObject &params) noexcept
57
59
  override;
58
60
 
61
+ bool TryProcessMessage(
62
+ int64_t socketId,
63
+ std::string &&message,
64
+ winrt::Microsoft::ReactNative::JSValueObject &params) noexcept override;
65
+
66
+ bool TryProcessMessage(
67
+ int64_t socketId,
68
+ std::vector<uint8_t> &&message,
69
+ winrt::Microsoft::ReactNative::JSValueObject &params) noexcept override;
70
+
59
71
  #pragma endregion IWebSocketModuleContentHandler
60
72
 
61
73
  void Register(int64_t socketID) noexcept;
@@ -27,8 +27,12 @@ class WinRTWebSocketResource2 : public IWebSocketResource,
27
27
  void operator=(const TaskSequencer &) = delete;
28
28
 
29
29
  private:
30
+ // `experimental` is deprecated starting Visual Studio 2026
31
+ #if _MSC_VER >= 1951
32
+ using CoroHandle = std::coroutine_handle<>;
33
+ #else
30
34
  using CoroHandle = std::experimental::coroutine_handle<>;
31
-
35
+ #endif
32
36
  struct Suspender {
33
37
  CoroHandle m_handle;
34
38
 
package/just-task.js CHANGED
@@ -25,6 +25,7 @@ const fs = require('fs');
25
25
  const {
26
26
  registerNuGetRestoreTask,
27
27
  } = require('@rnw-scripts/just-task/nuget-restore-task');
28
+ const {findPowerShell} = require('@react-native-windows/find-dotnet-tools');
28
29
 
29
30
  option('production');
30
31
  option('clean');
@@ -46,9 +47,9 @@ function codegen(test) {
46
47
 
47
48
  function layoutMSRNCxx() {
48
49
  if (require('os').platform() === 'win32') {
49
- const powershell = `${process.env.SystemRoot}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
50
+ const powershell = findPowerShell();
50
51
  execSync(
51
- `${powershell} -NoProfile .\\Scripts\\Tfs\\Layout-MSRN-Headers.ps1 -GenerateLocalCxx`,
52
+ `"${powershell}" -NoProfile .\\Scripts\\Tfs\\Layout-MSRN-Headers.ps1 -GenerateLocalCxx`,
52
53
  {
53
54
  env: process.env,
54
55
  },
@@ -84,12 +85,22 @@ registerNuGetRestoreTask({
84
85
  scriptArguments: ['-SkipLockDeletion'],
85
86
  });
86
87
 
88
+ function installDotnetToolsTask() {
89
+ execSync(
90
+ `dotnet tool restore --tool-manifest ${path.resolve(__dirname, 'dotnet-tools.json')}`,
91
+ {env: process.env},
92
+ );
93
+ }
94
+
95
+ task('installDotnetTools', installDotnetToolsTask);
96
+
87
97
  task(
88
98
  'build',
89
99
  series(
90
100
  condition('clean', () => argv().clean),
91
101
  'copyRNLibraries',
92
102
  'copyReadmeAndLicenseFromRoot',
103
+ condition('installDotnetTools', () => !process.env.TF_BUILD),
93
104
  'layoutMSRNCxx',
94
105
  'compileTsPlatformOverrides',
95
106
  'restoreNuGetPackages',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.84.0-preview.7",
3
+ "version": "0.84.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,7 +26,7 @@
26
26
  "@react-native-community/cli": "20.0.0",
27
27
  "@react-native-community/cli-platform-android": "20.0.0",
28
28
  "@react-native-community/cli-platform-ios": "20.0.0",
29
- "@react-native-windows/cli": "0.84.0-preview.3",
29
+ "@react-native-windows/cli": "0.84.0",
30
30
  "@react-native/assets": "1.0.0",
31
31
  "@react-native/assets-registry": "0.84.1",
32
32
  "@react-native/codegen": "0.84.1",
@@ -70,7 +70,7 @@
70
70
  "yargs": "^17.6.2"
71
71
  },
72
72
  "devDependencies": {
73
- "@react-native-windows/codegen": "0.84.0-preview.2",
73
+ "@react-native-windows/codegen": "0.84.0",
74
74
  "@react-native/metro-config": "0.84.1",
75
75
  "@rnw-scripts/babel-react-native-config": "0.0.0",
76
76
  "@rnw-scripts/eslint-config": "1.2.38",
@@ -87,7 +87,7 @@
87
87
  "prettier": "^3.6.2",
88
88
  "react": "19.2.3",
89
89
  "react-native": "0.84.1",
90
- "react-native-platform-override": "0.84.0-preview.1",
90
+ "react-native-platform-override": "0.84.0",
91
91
  "react-refresh": "^0.14.0",
92
92
  "typescript": "5.0.4"
93
93
  },
@@ -97,11 +97,11 @@
97
97
  "react-native": "0.84.1"
98
98
  },
99
99
  "beachball": {
100
- "defaultNpmTag": "preview",
100
+ "defaultNpmTag": "latest",
101
101
  "disallowedChangeTypes": [
102
102
  "major",
103
103
  "minor",
104
- "patch",
104
+ "prerelease",
105
105
  "premajor",
106
106
  "preminor",
107
107
  "prepatch"
@@ -50,7 +50,7 @@
50
50
  <PropertyGroup Label="Configuration">
51
51
  <ConfigurationType>Application</ConfigurationType>
52
52
  <CharacterSet>Unicode</CharacterSet>
53
- <PlatformToolset>v143</PlatformToolset>
53
+ <PlatformToolset>v145</PlatformToolset>
54
54
  </PropertyGroup>
55
55
  <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
56
56
  <UseDebugLibraries>true</UseDebugLibraries>
@@ -49,7 +49,7 @@
49
49
  <PropertyGroup Label="Configuration">
50
50
  <ConfigurationType>DynamicLibrary</ConfigurationType>
51
51
  <CharacterSet>Unicode</CharacterSet>
52
- <PlatformToolset>v143</PlatformToolset>
52
+ <PlatformToolset>v145</PlatformToolset>
53
53
  <GenerateManifest>false</GenerateManifest>
54
54
  </PropertyGroup>
55
55
  <PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">