react-native-windows 0.81.0-preview.6 → 0.81.0-preview.8
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/Chakra/ChakraUtils.cpp +0 -2
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +19 -0
- package/Microsoft.ReactNative/Fabric/Composition/UriImageManager.cpp +5 -3
- package/Microsoft.ReactNative/Fabric/WindowsImageManager.cpp +14 -1
- package/PropertySheets/Generated/PackageVersion.g.props +2 -2
- package/Shared/MemoryMappedBuffer.cpp +0 -2
- package/package.json +11 -11
package/Chakra/ChakraUtils.cpp
CHANGED
|
@@ -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
|
package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp
CHANGED
|
@@ -66,6 +66,12 @@ struct ModalHostView : public winrt::implements<ModalHostView, winrt::Windows::F
|
|
|
66
66
|
m_appWindow = nullptr;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
+
// Bring parent window to foreground
|
|
70
|
+
if (m_parentHwnd) {
|
|
71
|
+
SetForegroundWindow(m_parentHwnd);
|
|
72
|
+
SetFocus(m_parentHwnd);
|
|
73
|
+
}
|
|
74
|
+
|
|
69
75
|
// Close bridge
|
|
70
76
|
m_popUp.Close();
|
|
71
77
|
m_popUp = nullptr;
|
|
@@ -247,6 +253,12 @@ struct ModalHostView : public winrt::implements<ModalHostView, winrt::Windows::F
|
|
|
247
253
|
m_reactContext.Properties().Handle(), m_prevWindowID);
|
|
248
254
|
}
|
|
249
255
|
|
|
256
|
+
// Bring parent window to foreground
|
|
257
|
+
if (m_parentHwnd) {
|
|
258
|
+
SetForegroundWindow(m_parentHwnd);
|
|
259
|
+
SetFocus(m_parentHwnd);
|
|
260
|
+
}
|
|
261
|
+
|
|
250
262
|
// Dispatch onDismiss event
|
|
251
263
|
if (auto eventEmitter = EventEmitter()) {
|
|
252
264
|
::Microsoft::ReactNativeSpecs::ModalHostViewEventEmitter::OnDismiss eventArgs;
|
|
@@ -287,9 +299,16 @@ struct ModalHostView : public winrt::implements<ModalHostView, winrt::Windows::F
|
|
|
287
299
|
overlappedPresenter.IsModal(true);
|
|
288
300
|
overlappedPresenter.SetBorderAndTitleBar(true, true);
|
|
289
301
|
|
|
302
|
+
// modal should only have close button
|
|
303
|
+
overlappedPresenter.IsMinimizable(false);
|
|
304
|
+
overlappedPresenter.IsMaximizable(false);
|
|
305
|
+
|
|
290
306
|
// Apply the presenter to the window
|
|
291
307
|
m_appWindow.SetPresenter(overlappedPresenter);
|
|
292
308
|
|
|
309
|
+
// Hide the title bar icon
|
|
310
|
+
m_appWindow.TitleBar().IconShowOptions(winrt::Microsoft::UI::Windowing::IconShowOptions::HideIconAndSystemMenu);
|
|
311
|
+
|
|
293
312
|
// Set initial title using the stored local props
|
|
294
313
|
if (m_localProps && m_localProps->title.has_value()) {
|
|
295
314
|
winrt::hstring titleValue = winrt::to_hstring(m_localProps->title.value());
|
|
@@ -291,9 +291,11 @@ ImageResponseOrImageErrorInfo ImageFailedResponse::ResolveImage() {
|
|
|
291
291
|
if (imageOrError.errorInfo->error.empty()) {
|
|
292
292
|
imageOrError.errorInfo->error = "Failed to load image.";
|
|
293
293
|
}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
294
|
+
if (m_responseHeaders) {
|
|
295
|
+
for (auto &&[header, value] : m_responseHeaders) {
|
|
296
|
+
imageOrError.errorInfo->httpResponseHeaders.push_back(
|
|
297
|
+
std::make_pair<std::string, std::string>(winrt::to_string(header), winrt::to_string(value)));
|
|
298
|
+
}
|
|
297
299
|
}
|
|
298
300
|
return imageOrError;
|
|
299
301
|
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
#include <Fabric/Composition/ImageResponseImage.h>
|
|
11
11
|
#include <Fabric/Composition/UriImageManager.h>
|
|
12
12
|
#include <Networking/NetworkPropertyIds.h>
|
|
13
|
+
#include <Utils/CppWinrtLessExceptions.h>
|
|
13
14
|
#include <Utils/ImageUtils.h>
|
|
14
15
|
#include <fmt/format.h>
|
|
15
16
|
#include <functional/functor.h>
|
|
@@ -131,7 +132,19 @@ WindowsImageManager::GetImageRandomAccessStreamAsync(
|
|
|
131
132
|
request.Content(bodyContent);
|
|
132
133
|
}
|
|
133
134
|
|
|
134
|
-
|
|
135
|
+
auto asyncOp = m_httpClient.SendRequestAsync(request);
|
|
136
|
+
co_await lessthrow_await_adapter<winrt::Windows::Foundation::IAsyncOperationWithProgress<
|
|
137
|
+
winrt::Windows::Web::Http::HttpResponseMessage,
|
|
138
|
+
winrt::Windows::Web::Http::HttpProgress>>{asyncOp};
|
|
139
|
+
|
|
140
|
+
if (asyncOp.Status() == winrt::Windows::Foundation::AsyncStatus::Error ||
|
|
141
|
+
asyncOp.Status() == winrt::Windows::Foundation::AsyncStatus::Canceled) {
|
|
142
|
+
auto errorMessage = FormatHResultError(winrt::hresult_error(asyncOp.ErrorCode()));
|
|
143
|
+
co_return winrt::Microsoft::ReactNative::Composition::ImageFailedResponse(
|
|
144
|
+
winrt::to_hstring("Network request failed: " + errorMessage));
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
winrt::Windows::Web::Http::HttpResponseMessage response = asyncOp.GetResults();
|
|
135
148
|
|
|
136
149
|
if (!response.IsSuccessStatusCode()) {
|
|
137
150
|
co_return winrt::Microsoft::ReactNative::Composition::ImageFailedResponse(
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.81.0-preview.
|
|
13
|
+
<ReactNativeWindowsVersion>0.81.0-preview.8</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>81</ReactNativeWindowsMinor>
|
|
16
16
|
<ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>160ef08880f3f221982ca7840688f45126450539</ReactNativeWindowsCommitId>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
</Project>
|
|
@@ -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 {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-windows",
|
|
3
|
-
"version": "0.81.0-preview.
|
|
3
|
+
"version": "0.81.0-preview.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
"@react-native-community/cli-platform-ios": "17.0.0",
|
|
29
29
|
"@react-native-windows/cli": "0.81.0-preview.1",
|
|
30
30
|
"@react-native/assets": "1.0.0",
|
|
31
|
-
"@react-native/assets-registry": "0.81.0
|
|
32
|
-
"@react-native/codegen": "0.81.0
|
|
33
|
-
"@react-native/community-cli-plugin": "0.81.0
|
|
34
|
-
"@react-native/gradle-plugin": "0.81.0
|
|
35
|
-
"@react-native/js-polyfills": "0.81.0
|
|
36
|
-
"@react-native/normalize-colors": "0.81.0
|
|
37
|
-
"@react-native/virtualized-lists": "0.81.0
|
|
38
|
-
"@react-native/new-app-screen": "0.81.0
|
|
31
|
+
"@react-native/assets-registry": "0.81.0",
|
|
32
|
+
"@react-native/codegen": "0.81.0",
|
|
33
|
+
"@react-native/community-cli-plugin": "0.81.0",
|
|
34
|
+
"@react-native/gradle-plugin": "0.81.0",
|
|
35
|
+
"@react-native/js-polyfills": "0.81.0",
|
|
36
|
+
"@react-native/normalize-colors": "0.81.0",
|
|
37
|
+
"@react-native/virtualized-lists": "0.81.0",
|
|
38
|
+
"@react-native/new-app-screen": "0.81.0",
|
|
39
39
|
"abort-controller": "^3.0.0",
|
|
40
40
|
"anser": "^1.4.9",
|
|
41
41
|
"ansi-regex": "^5.0.0",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
71
|
"@react-native-windows/codegen": "0.81.0-preview.1",
|
|
72
|
-
"@react-native/metro-config": "0.81.0
|
|
72
|
+
"@react-native/metro-config": "0.81.0",
|
|
73
73
|
"@rnw-scripts/babel-react-native-config": "0.0.0",
|
|
74
74
|
"@rnw-scripts/eslint-config": "1.2.37",
|
|
75
75
|
"@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.41",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"peerDependencies": {
|
|
93
93
|
"@types/react": "^19.1.0",
|
|
94
94
|
"react": "^19.1.0",
|
|
95
|
-
"react-native": "0.81.0
|
|
95
|
+
"react-native": "0.81.0"
|
|
96
96
|
},
|
|
97
97
|
"beachball": {
|
|
98
98
|
"defaultNpmTag": "preview",
|