react-native-windows 0.74.48 → 0.74.53

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.
package/.flowconfig CHANGED
@@ -53,6 +53,10 @@
53
53
  .*/node_modules/sample-apps/.*
54
54
  .*/node_modules/playground/.*
55
55
 
56
+ ; Ignore prepare-release's own node_modules (hermes-estree .flow files use unsupported syntax)
57
+ .*/node_modules/@rnw-scripts/prepare-release/node_modules/.*
58
+ .*/packages/@rnw-scripts/prepare-release/node_modules/.*
59
+
56
60
  ; Ignore templates for 'react-native init'
57
61
  <PROJECT_ROOT>/packages/react-native/template/.*
58
62
 
@@ -166,8 +166,6 @@ FileMappingBigString::FileMappingBigString(const std::wstring &filename, uint32_
166
166
  return;
167
167
  }
168
168
 
169
- WerRegisterMemoryBlock(m_fileData.get(), m_fileSize);
170
-
171
169
  static const uint32_t s_pageSize = getPageSize();
172
170
  if (m_fileSize % s_pageSize != 0) {
173
171
  // Data are owned by m_fileData, deleter is no-op
@@ -966,12 +966,17 @@ void CompositionEventHandler::getTargetPointerArgs(
966
966
  assert(m_pointerCapturingComponentTag != -1);
967
967
  tag = m_pointerCapturingComponentTag;
968
968
 
969
- auto targetComponentView = fabricuiManager->GetViewRegistry().componentViewDescriptorWithTag(tag).view;
970
- auto clientRect = winrt::get_self<winrt::Microsoft::ReactNative::implementation::ComponentView>(targetComponentView)
971
- ->getClientRect();
972
- if (auto strongRootView = m_wkRootView.get()) {
973
- ptLocal.x = ptScaled.x - (clientRect.left / strongRootView.ScaleFactor());
974
- ptLocal.y = ptScaled.y - (clientRect.top / strongRootView.ScaleFactor());
969
+ auto targetComponentView = fabricuiManager->GetViewRegistry().findComponentViewWithTag(tag);
970
+ if (targetComponentView) {
971
+ auto clientRect =
972
+ winrt::get_self<winrt::Microsoft::ReactNative::implementation::ComponentView>(targetComponentView)
973
+ ->getClientRect();
974
+ if (auto strongRootView = m_wkRootView.get()) {
975
+ ptLocal.x = ptScaled.x - (clientRect.left / strongRootView.ScaleFactor());
976
+ ptLocal.y = ptScaled.y - (clientRect.top / strongRootView.ScaleFactor());
977
+ }
978
+ } else {
979
+ tag = -1;
975
980
  }
976
981
  } else {
977
982
  tag = RootComponentView().hitTest(ptScaled, ptLocal);
@@ -374,13 +374,12 @@ winrt::IInspectable ReactNativeIsland::GetUiaProvider() noexcept {
374
374
  if (m_uiaProvider == nullptr) {
375
375
  m_uiaProvider =
376
376
  winrt::make<winrt::Microsoft::ReactNative::implementation::CompositionRootAutomationProvider>(*this);
377
- if (m_hwnd && !m_island) {
378
- auto pRootProvider =
379
- static_cast<winrt::Microsoft::ReactNative::implementation::CompositionRootAutomationProvider *>(
380
- m_uiaProvider.as<IRawElementProviderSimple>().get());
381
- if (pRootProvider != nullptr) {
382
- pRootProvider->SetHwnd(m_hwnd);
383
- }
377
+ auto pRootProvider =
378
+ static_cast<winrt::Microsoft::ReactNative::implementation::CompositionRootAutomationProvider *>(
379
+ m_uiaProvider.as<IRawElementProviderSimple>().get());
380
+ if (pRootProvider != nullptr) {
381
+ pRootProvider->SetIsland(m_island);
382
+ pRootProvider->SetHwnd(m_hwnd);
384
383
  }
385
384
  }
386
385
  return m_uiaProvider;
@@ -868,9 +867,6 @@ winrt::Microsoft::UI::Content::ContentIsland ReactNativeIsland::Island() {
868
867
  auto pRootProvider =
869
868
  static_cast<winrt::Microsoft::ReactNative::implementation::CompositionRootAutomationProvider *>(
870
869
  provider.as<IRawElementProviderSimple>().get());
871
- if (pRootProvider != nullptr) {
872
- pRootProvider->SetIsland(pThis->m_island);
873
- }
874
870
  args.AutomationProvider(std::move(provider));
875
871
  args.Handled(true);
876
872
  }
@@ -631,6 +631,19 @@ WPARAM PointerRoutedEventArgsToMouseWParam(
631
631
  return wParam;
632
632
  }
633
633
 
634
+ bool WindowsTextInputComponentView::IsDoubleClick() {
635
+ using namespace std::chrono;
636
+
637
+ auto now = steady_clock::now();
638
+ auto duration = duration_cast<milliseconds>(now - m_lastClickTime).count();
639
+
640
+ const int DOUBLE_CLICK_TIME_MS = ::GetDoubleClickTime();
641
+
642
+ m_lastClickTime = now;
643
+
644
+ return (duration < DOUBLE_CLICK_TIME_MS);
645
+ }
646
+
634
647
  void WindowsTextInputComponentView::OnPointerPressed(
635
648
  const winrt::Microsoft::ReactNative::Composition::Input::PointerRoutedEventArgs &args) noexcept {
636
649
  UINT msg = 0;
@@ -647,7 +660,11 @@ void WindowsTextInputComponentView::OnPointerPressed(
647
660
  if (pp.PointerDeviceType() == winrt::Microsoft::ReactNative::Composition::Input::PointerDeviceType::Mouse) {
648
661
  switch (pp.Properties().PointerUpdateKind()) {
649
662
  case winrt::Microsoft::ReactNative::Composition::Input::PointerUpdateKind::LeftButtonPressed:
650
- msg = WM_LBUTTONDOWN;
663
+ if (IsDoubleClick()) {
664
+ msg = WM_LBUTTONDBLCLK;
665
+ } else {
666
+ msg = WM_LBUTTONDOWN;
667
+ }
651
668
  break;
652
669
  case winrt::Microsoft::ReactNative::Composition::Input::PointerUpdateKind::MiddleButtonPressed:
653
670
  msg = WM_MBUTTONDOWN;
@@ -70,6 +70,7 @@ struct WindowsTextInputComponentView
70
70
  std::optional<std::string> getAccessiblityValue() noexcept override;
71
71
  void setAcccessiblityValue(std::string &&value) noexcept override;
72
72
  bool getAcccessiblityIsReadOnly() noexcept override;
73
+ bool IsDoubleClick();
73
74
 
74
75
  WindowsTextInputComponentView(
75
76
  const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
@@ -141,6 +142,7 @@ struct WindowsTextInputComponentView
141
142
  DWORD m_propBitsMask{0};
142
143
  DWORD m_propBits{0};
143
144
  HCURSOR m_hcursor{nullptr};
145
+ std::chrono::steady_clock::time_point m_lastClickTime{};
144
146
  std::vector<facebook::react::CompWindowsTextInputSubmitKeyEventsStruct> m_submitKeyEvents;
145
147
  };
146
148
 
@@ -266,7 +266,7 @@ void TooltipTracker::ShowTooltip(const winrt::Microsoft::ReactNative::ComponentV
266
266
  static_cast<int>((tm.width + tooltipHorizontalPadding + tooltipHorizontalPadding) * scaleFactor);
267
267
  tooltipData->height = static_cast<int>((tm.height + tooltipTopPadding + tooltipBottomPadding) * scaleFactor);
268
268
 
269
- POINT pt = {static_cast<LONG>(m_pos.X), static_cast<LONG>(m_pos.Y)};
269
+ POINT pt = {static_cast<LONG>(m_pos.X * scaleFactor), static_cast<LONG>(m_pos.Y * scaleFactor)};
270
270
  ClientToScreen(parentHwnd, &pt);
271
271
 
272
272
  RegisterTooltipWndClass();
@@ -0,0 +1,29 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
+ <!--
4
+ CI-specific C++ build optimizations for the publish pipeline.
5
+
6
+ This file is injected via /p:ForceImportAfterCppTargets in .ado/publish.yml.
7
+ It overrides defaults that are tuned for developer workflows (incremental builds,
8
+ file tracking) with settings that are better for CI clean builds.
9
+
10
+ 1. Multi-threaded compilation: Use CL.exe internal /MP parallelism instead of
11
+ MSBuild's MultiToolTask (which spawns one CL.exe+Tracker.exe per source file).
12
+ /MP lets CL.exe compile all files in one process with shared PCH state.
13
+
14
+ 2. Disable file tracking: CI always does clean builds, so incremental build
15
+ tracking (MinimalRebuild, TrackFileAccess) is pure overhead.
16
+ -->
17
+ <PropertyGroup>
18
+ <MultiProcCL>false</MultiProcCL>
19
+ <MinimalRebuildFromTracking>false</MinimalRebuildFromTracking>
20
+ <TrackFileAccess>false</TrackFileAccess>
21
+ </PropertyGroup>
22
+ <ItemDefinitionGroup>
23
+ <ClCompile>
24
+ <MultiProcessorCompilation>false</MultiProcessorCompilation>
25
+ <MinimalRebuild>false</MinimalRebuild>
26
+ <AdditionalOptions>%(AdditionalOptions) /MP</AdditionalOptions>
27
+ </ClCompile>
28
+ </ItemDefinitionGroup>
29
+ </Project>
@@ -10,11 +10,11 @@
10
10
  -->
11
11
  <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
12
12
  <PropertyGroup>
13
- <ReactNativeWindowsVersion>0.74.48</ReactNativeWindowsVersion>
13
+ <ReactNativeWindowsVersion>0.74.53</ReactNativeWindowsVersion>
14
14
  <ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
15
15
  <ReactNativeWindowsMinor>74</ReactNativeWindowsMinor>
16
- <ReactNativeWindowsPatch>48</ReactNativeWindowsPatch>
16
+ <ReactNativeWindowsPatch>53</ReactNativeWindowsPatch>
17
17
  <ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
18
- <ReactNativeWindowsCommitId>ddef61e5c9244a04e1c34529f89bde30491ec53f</ReactNativeWindowsCommitId>
18
+ <ReactNativeWindowsCommitId>afc0419a12f33c6c13baca56d7685b97f177af6d</ReactNativeWindowsCommitId>
19
19
  </PropertyGroup>
20
20
  </Project>
@@ -45,6 +45,14 @@ Copy-Item -Force -Recurse -Path $ReactWindowsRoot\Microsoft.ReactNative.Cxx -Des
45
45
  # Copy native module spec files
46
46
  Copy-Item -Force -Recurse -Path $ReactWindowsRoot\codegen -Destination $TargetRoot\inc
47
47
 
48
+ # Overwrite ReactCommon\jsi\jsi files. It must be called before the ReactCommon overrides
49
+ Copy-Item -Force -Path $NodeApiJsiRoot\jsi\jsi\decorator.h -Destination $ReactNativeRoot\ReactCommon\jsi\jsi\
50
+ Copy-Item -Force -Path $NodeApiJsiRoot\jsi\jsi\instrumentation.h -Destination $ReactNativeRoot\ReactCommon\jsi\jsi\
51
+ Copy-Item -Force -Path $NodeApiJsiRoot\jsi\jsi\jsi.cpp -Destination $ReactNativeRoot\ReactCommon\jsi\jsi\
52
+ Copy-Item -Force -Path $NodeApiJsiRoot\jsi\jsi\jsi.h -Destination $ReactNativeRoot\ReactCommon\jsi\jsi\
53
+ Copy-Item -Force -Path $NodeApiJsiRoot\jsi\jsi\jsi-inl.h -Destination $ReactNativeRoot\ReactCommon\jsi\jsi\
54
+ Copy-Item -Force -Path $NodeApiJsiRoot\jsi\jsi\threadsafe.h -Destination $ReactNativeRoot\ReactCommon\jsi\jsi\
55
+
48
56
  # Overwrite temporary ReactCommon files (since this script can runs on a different machine than where ReactCommon was built)
49
57
  Copy-Item -Force -Recurse -Path $ReactCommonOverrideRoot\* -Destination $ReactNativeRoot\ReactCommon\
50
58
 
@@ -61,6 +69,8 @@ New-Item $TargetRoot\Microsoft.ReactNative.Cxx\node-api -ItemType Directory -For
61
69
  Copy-Item -Force -Path $NodeApiJsiRoot\node-api\js_native_api.h -Destination $TargetRoot\Microsoft.ReactNative.Cxx\node-api\
62
70
  Copy-Item -Force -Path $NodeApiJsiRoot\node-api\js_native_api_types.h -Destination $TargetRoot\Microsoft.ReactNative.Cxx\node-api\
63
71
  Copy-Item -Force -Path $NodeApiJsiRoot\node-api\js_runtime_api.h -Destination $TargetRoot\Microsoft.ReactNative.Cxx\node-api\
72
+ Copy-Item -Force -Path $NodeApiJsiRoot\node-api\node_api.h -Destination $TargetRoot\Microsoft.ReactNative.Cxx\node-api\
73
+ Copy-Item -Force -Path $NodeApiJsiRoot\node-api\node_api_types.h -Destination $TargetRoot\Microsoft.ReactNative.Cxx\node-api\
64
74
 
65
75
  # Microsoft.ReactNative.CXX project Node-API JSI files
66
76
  New-Item $TargetRoot\Microsoft.ReactNative.Cxx\ApiLoaders -ItemType Directory -Force
@@ -77,8 +77,6 @@ MemoryMappedBuffer::MemoryMappedBuffer(const wchar_t *const filename, uint32_t o
77
77
  throw facebook::jsi::JSINativeException(
78
78
  "MapViewOfFile/MapViewOfFileFromApp failed with last error " + std::to_string(GetLastError()));
79
79
  }
80
-
81
- WerRegisterMemoryBlock(m_fileData.get(), m_fileSize);
82
80
  }
83
81
 
84
82
  size_t MemoryMappedBuffer::size() const {
@@ -227,11 +227,12 @@ fire_and_forget WinRTWebSocketResource2::PerformConnect(Uri &&uri) noexcept {
227
227
  [self = self->shared_from_this(), coUri = std::move(movedUri)]() -> IAsyncAction {
228
228
  auto coSelf = self->shared_from_this();
229
229
 
230
- auto async = coSelf->m_socket.ConnectAsync(coUri);
231
- co_await lessthrow_await_adapter<IAsyncAction>{async};
232
-
233
- auto result = async.ErrorCode();
234
230
  try {
231
+ // `ConnectAsync` MAY throw synchronously (e.g. WININET_E_INVALID_CA)
232
+ auto async = coSelf->m_socket.ConnectAsync(coUri);
233
+ co_await lessthrow_await_adapter<IAsyncAction>{async};
234
+
235
+ auto result = async.ErrorCode();
235
236
  if (result >= 0) { // Non-failing HRESULT
236
237
  coSelf->m_readyState = ReadyState::Open;
237
238
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.74.48",
3
+ "version": "0.74.53",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",