react-native-windows 0.74.46 → 0.74.47
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/Libraries/Components/View/View.windows.js +13 -5
- package/Libraries/Components/View/ViewAccessibility.d.ts +67 -0
- package/Libraries/Components/View/ViewPropTypes.windows.js +2 -0
- package/Libraries/NativeComponent/BaseViewConfig.windows.js +4 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +47 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h +1 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +81 -94
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionTextProvider.cpp +115 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionTextProvider.h +41 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionTextRangeProvider.cpp +319 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionTextRangeProvider.h +59 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +47 -0
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +43 -34
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +11 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +149 -17
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +5 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputProps.cpp +2 -1
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputProps.h +2 -1
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +43 -1
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +27 -2
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewEventEmitter.cpp +22 -4
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewEventEmitter.h +16 -3
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.cpp +24 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.h +4 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/MouseEvent.h +20 -0
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.cpp +133 -32
- package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.h +12 -0
- package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +1 -3
- package/Microsoft.ReactNative.Managed.CodeGen/Microsoft.ReactNative.Managed.CodeGen.csproj +1 -1
- package/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml +1 -1
- package/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml +1 -1
- package/Microsoft.ReactNative.Managed.CodeGen/packages.lock.json +3 -3
- package/PropertySheets/External/Microsoft.ReactNative.WindowsSdk.Default.props +4 -4
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/Scripts/Tfs/Start-TestServers.ps1 +2 -1
- package/Scripts/rnw-dependencies.ps1 +38 -25
- package/Shared/Shared.vcxitems +6 -0
- package/Shared/Shared.vcxitems.filters +8 -0
- package/package.json +3 -3
|
@@ -39,6 +39,26 @@ HostPlatformViewProps::HostPlatformViewProps(
|
|
|
39
39
|
CoreFeatures::enablePropIteratorSetter
|
|
40
40
|
? sourceProps.accessibilitySetSize
|
|
41
41
|
: convertRawProp(context, rawProps, "accessibilitySetSize", sourceProps.accessibilitySetSize, 0)),
|
|
42
|
+
accessibilityLevel(
|
|
43
|
+
CoreFeatures::enablePropIteratorSetter
|
|
44
|
+
? sourceProps.accessibilityLevel
|
|
45
|
+
: convertRawProp(context, rawProps, "accessibilityLevel", sourceProps.accessibilityLevel, 0)),
|
|
46
|
+
accessibilityItemType(
|
|
47
|
+
CoreFeatures::enablePropIteratorSetter
|
|
48
|
+
? sourceProps.accessibilityItemType
|
|
49
|
+
: convertRawProp(context, rawProps, "accessibilityItemType", sourceProps.accessibilityItemType, {})),
|
|
50
|
+
accessibilityAccessKey(
|
|
51
|
+
CoreFeatures::enablePropIteratorSetter
|
|
52
|
+
? sourceProps.accessibilityAccessKey
|
|
53
|
+
: convertRawProp(context, rawProps, "accessibilityAccessKey", sourceProps.accessibilityAccessKey, {})),
|
|
54
|
+
accessibilityDescription(
|
|
55
|
+
CoreFeatures::enablePropIteratorSetter ? sourceProps.accessibilityDescription
|
|
56
|
+
: convertRawProp(
|
|
57
|
+
context,
|
|
58
|
+
rawProps,
|
|
59
|
+
"accessibilityDescription",
|
|
60
|
+
sourceProps.accessibilityDescription,
|
|
61
|
+
{})),
|
|
42
62
|
accessibilityLiveRegion(
|
|
43
63
|
CoreFeatures::enablePropIteratorSetter ? sourceProps.accessibilityLiveRegion
|
|
44
64
|
: convertRawProp(
|
|
@@ -83,6 +103,10 @@ void HostPlatformViewProps::setProp(
|
|
|
83
103
|
RAW_SET_PROP_SWITCH_CASE_BASIC(focusable);
|
|
84
104
|
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityPosInSet);
|
|
85
105
|
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilitySetSize);
|
|
106
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLevel);
|
|
107
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityItemType);
|
|
108
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityAccessKey);
|
|
109
|
+
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityDescription);
|
|
86
110
|
RAW_SET_PROP_SWITCH_CASE_BASIC(accessibilityLiveRegion);
|
|
87
111
|
RAW_SET_PROP_SWITCH_CASE_BASIC(keyDownEvents);
|
|
88
112
|
RAW_SET_PROP_SWITCH_CASE_BASIC(keyUpEvents);
|
package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.h
CHANGED
|
@@ -27,6 +27,10 @@ class HostPlatformViewProps : public BaseViewProps {
|
|
|
27
27
|
int accessibilityPosInSet{0};
|
|
28
28
|
int accessibilitySetSize{0};
|
|
29
29
|
std::string accessibilityLiveRegion{"none"};
|
|
30
|
+
int accessibilityLevel{0};
|
|
31
|
+
std::optional<std::string> accessibilityItemType{};
|
|
32
|
+
std::optional<std::string> accessibilityAccessKey{};
|
|
33
|
+
std::optional<std::string> accessibilityDescription{};
|
|
30
34
|
|
|
31
35
|
// std::optional<std::string> overflowAnchor{};
|
|
32
36
|
std::optional<std::string> tooltip{};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
#pragma once
|
|
5
|
+
|
|
6
|
+
#include <react/renderer/components/view/PointerEvent.h>
|
|
7
|
+
|
|
8
|
+
namespace facebook::react {
|
|
9
|
+
|
|
10
|
+
struct MouseEvent : public PointerEvent {
|
|
11
|
+
MouseEvent(PointerEvent &event) : PointerEvent(event){};
|
|
12
|
+
|
|
13
|
+
// We override the type so that it is not recorded as a PointerType,
|
|
14
|
+
// otherwise PointerEventsProcessor gets confused by the Windows specific MouseEvents
|
|
15
|
+
EventPayloadType getType() const override {
|
|
16
|
+
return static_cast<EventPayloadType>(-1);
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
} // namespace facebook::react
|
package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.cpp
CHANGED
|
@@ -19,7 +19,7 @@ namespace facebook::react {
|
|
|
19
19
|
void TextLayoutManager::GetTextLayout(
|
|
20
20
|
AttributedStringBox attributedStringBox,
|
|
21
21
|
ParagraphAttributes paragraphAttributes,
|
|
22
|
-
|
|
22
|
+
Size size,
|
|
23
23
|
winrt::com_ptr<IDWriteTextLayout> &spTextLayout) noexcept {
|
|
24
24
|
if (attributedStringBox.getValue().isEmpty())
|
|
25
25
|
return;
|
|
@@ -43,10 +43,7 @@ void TextLayoutManager::GetTextLayout(
|
|
|
43
43
|
static_cast<facebook::react::FontWeight>(DWRITE_FONT_WEIGHT_REGULAR))),
|
|
44
44
|
style,
|
|
45
45
|
DWRITE_FONT_STRETCH_NORMAL,
|
|
46
|
-
|
|
47
|
-
!std::isnan(outerFragment.textAttributes.fontSizeMultiplier))
|
|
48
|
-
? (outerFragment.textAttributes.fontSizeMultiplier * outerFragment.textAttributes.fontSize)
|
|
49
|
-
: outerFragment.textAttributes.fontSize,
|
|
46
|
+
outerFragment.textAttributes.fontSize,
|
|
50
47
|
L"",
|
|
51
48
|
spTextFormat.put()));
|
|
52
49
|
|
|
@@ -95,11 +92,44 @@ void TextLayoutManager::GetTextLayout(
|
|
|
95
92
|
str.c_str(), // The string to be laid out and formatted.
|
|
96
93
|
static_cast<UINT32>(str.size()), // The length of the string.
|
|
97
94
|
spTextFormat.get(), // The text format to apply to the string (contains font information, etc).
|
|
98
|
-
|
|
99
|
-
|
|
95
|
+
size.width, // The width of the layout box.
|
|
96
|
+
size.height, // The height of the layout box.
|
|
100
97
|
spTextLayout.put() // The IDWriteTextLayout interface pointer.
|
|
101
98
|
));
|
|
102
99
|
|
|
100
|
+
// Apply max width constraint and ellipsis trimming to ensure consistency with rendering
|
|
101
|
+
DWRITE_TEXT_METRICS metrics;
|
|
102
|
+
winrt::check_hresult(spTextLayout->GetMetrics(&metrics));
|
|
103
|
+
|
|
104
|
+
if (metrics.width > size.width) {
|
|
105
|
+
spTextLayout->SetMaxWidth(size.width);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// Apply DWRITE_TRIMMING for ellipsizeMode
|
|
109
|
+
DWRITE_TRIMMING trimming = {};
|
|
110
|
+
winrt::com_ptr<IDWriteInlineObject> ellipsisSign;
|
|
111
|
+
|
|
112
|
+
switch (paragraphAttributes.ellipsizeMode) {
|
|
113
|
+
case facebook::react::EllipsizeMode::Tail:
|
|
114
|
+
trimming.granularity = DWRITE_TRIMMING_GRANULARITY_CHARACTER;
|
|
115
|
+
break;
|
|
116
|
+
case facebook::react::EllipsizeMode::Clip:
|
|
117
|
+
trimming.granularity = DWRITE_TRIMMING_GRANULARITY_NONE;
|
|
118
|
+
break;
|
|
119
|
+
default:
|
|
120
|
+
trimming.granularity = DWRITE_TRIMMING_GRANULARITY_CHARACTER; // Default to tail behavior
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// Use DWriteFactory to create the ellipsis trimming sign
|
|
125
|
+
if (trimming.granularity != DWRITE_TRIMMING_GRANULARITY_NONE) {
|
|
126
|
+
auto dwriteFactory = Microsoft::ReactNative::DWriteFactory();
|
|
127
|
+
HRESULT hr = dwriteFactory->CreateEllipsisTrimmingSign(spTextLayout.get(), ellipsisSign.put());
|
|
128
|
+
if (SUCCEEDED(hr)) {
|
|
129
|
+
spTextLayout->SetTrimming(&trimming, ellipsisSign.get());
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
103
133
|
unsigned int position = 0;
|
|
104
134
|
unsigned int length = 0;
|
|
105
135
|
for (const auto &fragment : fragments) {
|
|
@@ -121,11 +151,7 @@ void TextLayoutManager::GetTextLayout(
|
|
|
121
151
|
attributes.fontWeight.value_or(static_cast<facebook::react::FontWeight>(DWRITE_FONT_WEIGHT_REGULAR))),
|
|
122
152
|
range));
|
|
123
153
|
winrt::check_hresult(spTextLayout->SetFontStyle(fragmentStyle, range));
|
|
124
|
-
winrt::check_hresult(spTextLayout->SetFontSize(
|
|
125
|
-
(attributes.allowFontScaling.value_or(true) && !std::isnan(attributes.fontSizeMultiplier))
|
|
126
|
-
? (attributes.fontSizeMultiplier * attributes.fontSize)
|
|
127
|
-
: attributes.fontSize,
|
|
128
|
-
range));
|
|
154
|
+
winrt::check_hresult(spTextLayout->SetFontSize(attributes.fontSize, range));
|
|
129
155
|
|
|
130
156
|
if (!isnan(attributes.letterSpacing)) {
|
|
131
157
|
winrt::check_hresult(
|
|
@@ -136,6 +162,18 @@ void TextLayoutManager::GetTextLayout(
|
|
|
136
162
|
}
|
|
137
163
|
}
|
|
138
164
|
|
|
165
|
+
void TextLayoutManager::GetTextLayout(
|
|
166
|
+
AttributedStringBox attributedStringBox,
|
|
167
|
+
ParagraphAttributes paragraphAttributes,
|
|
168
|
+
LayoutConstraints layoutConstraints,
|
|
169
|
+
winrt::com_ptr<IDWriteTextLayout> &spTextLayout) noexcept {
|
|
170
|
+
if (attributedStringBox.getValue().isEmpty())
|
|
171
|
+
return;
|
|
172
|
+
|
|
173
|
+
GetTextLayout(attributedStringBox, paragraphAttributes, layoutConstraints.maximumSize, spTextLayout);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
// measure entire text (inluding attachments)
|
|
139
177
|
TextMeasurement TextLayoutManager::measure(
|
|
140
178
|
AttributedStringBox attributedStringBox,
|
|
141
179
|
ParagraphAttributes paragraphAttributes,
|
|
@@ -198,25 +236,6 @@ TextMeasurement TextLayoutManager::measureCachedSpannableById(
|
|
|
198
236
|
return {};
|
|
199
237
|
}
|
|
200
238
|
|
|
201
|
-
LinesMeasurements TextLayoutManager::measureLines(
|
|
202
|
-
AttributedString attributedString,
|
|
203
|
-
ParagraphAttributes paragraphAttributes,
|
|
204
|
-
Size size) const {
|
|
205
|
-
assert(false);
|
|
206
|
-
return {};
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
std::shared_ptr<void> TextLayoutManager::getHostTextStorage(
|
|
210
|
-
AttributedString attributedString,
|
|
211
|
-
ParagraphAttributes paragraphAttributes,
|
|
212
|
-
LayoutConstraints layoutConstraints) const {
|
|
213
|
-
return nullptr;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
void *TextLayoutManager::getNativeTextLayoutManager() const {
|
|
217
|
-
return (void *)this;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
239
|
Microsoft::ReactNative::TextTransform ConvertTextTransform(std::optional<TextTransform> const &transform) {
|
|
221
240
|
if (transform) {
|
|
222
241
|
switch (transform.value()) {
|
|
@@ -232,10 +251,92 @@ Microsoft::ReactNative::TextTransform ConvertTextTransform(std::optional<TextTra
|
|
|
232
251
|
break;
|
|
233
252
|
}
|
|
234
253
|
}
|
|
235
|
-
|
|
236
254
|
return Microsoft::ReactNative::TextTransform::Undefined;
|
|
237
255
|
}
|
|
238
256
|
|
|
257
|
+
LinesMeasurements TextLayoutManager::measureLines(
|
|
258
|
+
AttributedString attributedString,
|
|
259
|
+
ParagraphAttributes paragraphAttributes,
|
|
260
|
+
Size size) const {
|
|
261
|
+
LinesMeasurements lineMeasurements{};
|
|
262
|
+
|
|
263
|
+
winrt::com_ptr<IDWriteTextLayout> spTextLayout;
|
|
264
|
+
|
|
265
|
+
GetTextLayout(AttributedStringBox(attributedString), paragraphAttributes, size, spTextLayout);
|
|
266
|
+
|
|
267
|
+
if (spTextLayout) {
|
|
268
|
+
std::vector<DWRITE_LINE_METRICS> lineMetrics;
|
|
269
|
+
uint32_t actualLineCount;
|
|
270
|
+
spTextLayout->GetLineMetrics(nullptr, 0, &actualLineCount);
|
|
271
|
+
lineMetrics.resize(static_cast<size_t>(actualLineCount));
|
|
272
|
+
winrt::check_hresult(spTextLayout->GetLineMetrics(lineMetrics.data(), actualLineCount, &actualLineCount));
|
|
273
|
+
uint32_t startRange = 0;
|
|
274
|
+
const auto count = (paragraphAttributes.maximumNumberOfLines > 0)
|
|
275
|
+
? std::min(static_cast<uint32_t>(paragraphAttributes.maximumNumberOfLines), actualLineCount)
|
|
276
|
+
: actualLineCount;
|
|
277
|
+
for (uint32_t i = 0; i < count; ++i) {
|
|
278
|
+
UINT32 actualHitTestCount = 0;
|
|
279
|
+
spTextLayout->HitTestTextRange(
|
|
280
|
+
startRange,
|
|
281
|
+
lineMetrics[i].length,
|
|
282
|
+
0, // x
|
|
283
|
+
0, // y
|
|
284
|
+
NULL,
|
|
285
|
+
0, // metrics count
|
|
286
|
+
&actualHitTestCount);
|
|
287
|
+
|
|
288
|
+
// Allocate enough room to return all hit-test metrics.
|
|
289
|
+
std::vector<DWRITE_HIT_TEST_METRICS> hitTestMetrics(actualHitTestCount);
|
|
290
|
+
spTextLayout->HitTestTextRange(
|
|
291
|
+
startRange,
|
|
292
|
+
lineMetrics[i].length,
|
|
293
|
+
0, // x
|
|
294
|
+
0, // y
|
|
295
|
+
&hitTestMetrics[0],
|
|
296
|
+
static_cast<UINT32>(hitTestMetrics.size()),
|
|
297
|
+
&actualHitTestCount);
|
|
298
|
+
|
|
299
|
+
float width = 0;
|
|
300
|
+
for (auto tm : hitTestMetrics) {
|
|
301
|
+
width += tm.width;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
std::string str;
|
|
305
|
+
for (const auto &fragment : attributedString.getFragments()) {
|
|
306
|
+
str = str +
|
|
307
|
+
winrt::to_string(Microsoft::ReactNative::TransformableText::TransformText(
|
|
308
|
+
winrt::hstring{Microsoft::Common::Unicode::Utf8ToUtf16(fragment.string)},
|
|
309
|
+
ConvertTextTransform(fragment.textAttributes.textTransform)));
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
lineMeasurements.emplace_back(LineMeasurement(
|
|
313
|
+
str.substr(startRange, lineMetrics[i].length),
|
|
314
|
+
{{hitTestMetrics[0].left, hitTestMetrics[0].top}, // origin
|
|
315
|
+
{width, lineMetrics[i].height}},
|
|
316
|
+
0.0f, // TODO descender
|
|
317
|
+
0.0f, // TODO: capHeight
|
|
318
|
+
0.0f, // TODO ascender
|
|
319
|
+
0.0f // TODO: xHeight
|
|
320
|
+
));
|
|
321
|
+
|
|
322
|
+
startRange += lineMetrics[i].length;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
return lineMeasurements;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
std::shared_ptr<void> TextLayoutManager::getHostTextStorage(
|
|
330
|
+
AttributedString attributedString,
|
|
331
|
+
ParagraphAttributes paragraphAttributes,
|
|
332
|
+
LayoutConstraints layoutConstraints) const {
|
|
333
|
+
return nullptr;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
void *TextLayoutManager::getNativeTextLayoutManager() const {
|
|
337
|
+
return (void *)this;
|
|
338
|
+
}
|
|
339
|
+
|
|
239
340
|
winrt::hstring TextLayoutManager::GetTransformedText(AttributedStringBox const &attributedStringBox) {
|
|
240
341
|
winrt::hstring result{};
|
|
241
342
|
for (const auto &fragment : attributedStringBox.getValue().getFragments()) {
|
package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/TextLayoutManager.h
CHANGED
|
@@ -74,10 +74,22 @@ class TextLayoutManager {
|
|
|
74
74
|
LayoutConstraints layoutConstraints,
|
|
75
75
|
winrt::com_ptr<IDWriteTextLayout> &spTextLayout) noexcept;
|
|
76
76
|
|
|
77
|
+
static void GetTextLayoutByAdjustingFontSizeToFit(
|
|
78
|
+
AttributedStringBox attributedStringBox,
|
|
79
|
+
const ParagraphAttributes ¶graphAttributes,
|
|
80
|
+
LayoutConstraints layoutConstraints,
|
|
81
|
+
winrt::com_ptr<IDWriteTextLayout> &spTextLayout,
|
|
82
|
+
TextMeasurement::Attachments &attachments) noexcept;
|
|
83
|
+
|
|
77
84
|
#pragma endregion
|
|
78
85
|
|
|
79
86
|
private:
|
|
80
87
|
static winrt::hstring GetTransformedText(AttributedStringBox const &attributedStringBox);
|
|
88
|
+
static void GetTextLayout(
|
|
89
|
+
AttributedStringBox attributedString,
|
|
90
|
+
ParagraphAttributes paragraphAttributes,
|
|
91
|
+
Size size,
|
|
92
|
+
winrt::com_ptr<IDWriteTextLayout> &spTextLayout) noexcept;
|
|
81
93
|
|
|
82
94
|
ContextContainer::Shared m_contextContainer;
|
|
83
95
|
#pragma warning(push)
|
|
@@ -123,9 +123,6 @@
|
|
|
123
123
|
<ClCompile Include="Modules\NativeUIManager.cpp">
|
|
124
124
|
<Filter>Modules</Filter>
|
|
125
125
|
</ClCompile>
|
|
126
|
-
<ClCompile Include="Modules\TimingModule.cpp">
|
|
127
|
-
<Filter>Modules</Filter>
|
|
128
|
-
</ClCompile>
|
|
129
126
|
<ClCompile Include="Views\Image\ImageViewManager.cpp">
|
|
130
127
|
<Filter>Views\Image</Filter>
|
|
131
128
|
</ClCompile>
|
|
@@ -292,6 +289,7 @@
|
|
|
292
289
|
<ClCompile Include="Views\FrameworkElementTransferProperties.cpp" />
|
|
293
290
|
<ClCompile Include="Views\ReactViewInstance.cpp" />
|
|
294
291
|
<ClCompile Include="Utils\KeyboardUtils.cpp" />
|
|
292
|
+
<ClCompile Include="Views\DebuggingOverlayViewManager.cpp" />
|
|
295
293
|
</ItemGroup>
|
|
296
294
|
<ItemGroup>
|
|
297
295
|
<ClInclude Include="ABICxxModule.h" />
|
package/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Debug.pubxml
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<PublishProtocol>FileSystem</PublishProtocol>
|
|
7
7
|
<Configuration>Debug</Configuration>
|
|
8
8
|
<Platform>x64</Platform>
|
|
9
|
-
<TargetFramework>
|
|
9
|
+
<TargetFramework>net8.0</TargetFramework>
|
|
10
10
|
<PublishDir>$(OutDir)publish</PublishDir>
|
|
11
11
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
|
12
12
|
<SelfContained>true</SelfContained>
|
package/Microsoft.ReactNative.Managed.CodeGen/Properties/PublishProfiles/DeployAsTool-Release.pubxml
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<PublishProtocol>FileSystem</PublishProtocol>
|
|
7
7
|
<Configuration>Release</Configuration>
|
|
8
8
|
<Platform>x64</Platform>
|
|
9
|
-
<TargetFramework>
|
|
9
|
+
<TargetFramework>net8.0</TargetFramework>
|
|
10
10
|
<PublishDir>$(OutDir)publish</PublishDir>
|
|
11
11
|
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
|
12
12
|
<SelfContained>true</SelfContained>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
3
|
"dependencies": {
|
|
4
|
-
"
|
|
4
|
+
"net8.0": {
|
|
5
5
|
"Humanizer": {
|
|
6
6
|
"type": "Direct",
|
|
7
7
|
"requested": "[2.14.1, )",
|
|
@@ -1507,7 +1507,7 @@
|
|
|
1507
1507
|
}
|
|
1508
1508
|
}
|
|
1509
1509
|
},
|
|
1510
|
-
"
|
|
1510
|
+
"net8.0/win-x64": {
|
|
1511
1511
|
"Microsoft.Win32.Primitives": {
|
|
1512
1512
|
"type": "Transitive",
|
|
1513
1513
|
"resolved": "4.3.0",
|
|
@@ -2350,7 +2350,7 @@
|
|
|
2350
2350
|
}
|
|
2351
2351
|
}
|
|
2352
2352
|
},
|
|
2353
|
-
"
|
|
2353
|
+
"net8.0/win-x86": {
|
|
2354
2354
|
"Microsoft.Win32.Primitives": {
|
|
2355
2355
|
"type": "Transitive",
|
|
2356
2356
|
"resolved": "4.3.0",
|
|
@@ -12,20 +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
|
-
<WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)'=='' Or '$(WindowsTargetPlatformVersion)'=='10.0.0.0'">10.0.
|
|
15
|
+
<WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)'=='' Or '$(WindowsTargetPlatformVersion)'=='10.0.0.0'">10.0.22621.0</WindowsTargetPlatformVersion>
|
|
16
16
|
<WindowsTargetPlatformMinVersion Condition="'$(WindowsTargetPlatformMinVersion)'=='' Or '$(WindowsTargetPlatformMinVersion)'=='10.0.0.0'">10.0.17763.0</WindowsTargetPlatformMinVersion>
|
|
17
17
|
|
|
18
18
|
<!-- WinAppSDK/Composition projects have higher version requirements. -->
|
|
19
|
-
<WindowsTargetPlatformVersion Condition="'$(UseWinUI3)'=='true' And $([MSBuild]::VersionLessThan('$(WindowsTargetPlatformVersion)', '10.0.
|
|
19
|
+
<WindowsTargetPlatformVersion Condition="'$(UseWinUI3)'=='true' And $([MSBuild]::VersionLessThan('$(WindowsTargetPlatformVersion)', '10.0.22621.0'))">10.0.22621.0</WindowsTargetPlatformVersion>
|
|
20
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
|
-
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)'==''">10.0.
|
|
24
|
+
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)'==''">10.0.22621.0</TargetPlatformVersion>
|
|
25
25
|
<TargetPlatformMinVersion Condition="'$(TargetPlatformMinVersion)'==''">10.0.17763.0</TargetPlatformMinVersion>
|
|
26
26
|
|
|
27
27
|
<!-- WinAppSDK/Composition projects have higher version requirements. -->
|
|
28
|
-
<TargetPlatformVersion Condition="'$(UseWinUI3)'=='true' And $([MSBuild]::VersionLessThan('$(TargetPlatformVersion)', '
|
|
28
|
+
<TargetPlatformVersion Condition="'$(UseWinUI3)'=='true' And $([MSBuild]::VersionLessThan('$(TargetPlatformVersion)', '110.0.22621.0'))">10.0.22621.0</TargetPlatformVersion>
|
|
29
29
|
<TargetPlatformMinVersion Condition="'$(UseWinUI3)'=='true' And $([MSBuild]::VersionLessThan('$(TargetPlatformMinVersion)', '10.0.17763.0'))">10.0.17763.0</TargetPlatformMinVersion>
|
|
30
30
|
</PropertyGroup>
|
|
31
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.
|
|
13
|
+
<ReactNativeWindowsVersion>0.74.47</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>74</ReactNativeWindowsMinor>
|
|
16
|
-
<ReactNativeWindowsPatch>
|
|
16
|
+
<ReactNativeWindowsPatch>47</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>919860a4f95c8a8b29bfa079475e5c76208c011d</ReactNativeWindowsCommitId>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
</Project>
|
|
@@ -16,7 +16,8 @@ Write-Host "Starting packager"
|
|
|
16
16
|
|
|
17
17
|
Set-Location -Path "$PSScriptRoot\..\.."
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
$npmCmd = (Get-Command npm.cmd -ErrorAction Stop).Source
|
|
20
|
+
Start-Process $npmCmd -PassThru `
|
|
20
21
|
-NoNewWindow `
|
|
21
22
|
-WorkingDirectory "$PSScriptRoot\..\.." `
|
|
22
23
|
-ArgumentList "run start" `
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
|
|
1
2
|
# Troubleshoot RNW dependencies
|
|
2
3
|
param(
|
|
3
4
|
[switch]$Install = $false,
|
|
@@ -65,32 +66,31 @@ $vsComponents = @('Microsoft.Component.MSBuild',
|
|
|
65
66
|
'Microsoft.VisualStudio.Component.VC.Tools.x86.x64',
|
|
66
67
|
'Microsoft.VisualStudio.ComponentGroup.UWP.Support',
|
|
67
68
|
'Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core',
|
|
68
|
-
'Microsoft.VisualStudio.Component.Windows10SDK.19041'
|
|
69
|
+
'Microsoft.VisualStudio.Component.Windows10SDK.19041',
|
|
70
|
+
'Microsoft.VisualStudio.Component.Windows11SDK.22621');
|
|
69
71
|
|
|
70
72
|
# UWP.VC is not needed to build the projects with msbuild, but the VS IDE requires it.
|
|
71
73
|
if (!($tagsToInclude.Contains('buildLab'))) {
|
|
72
74
|
$vsComponents += 'Microsoft.VisualStudio.ComponentGroup.UWP.VC';
|
|
73
75
|
}
|
|
74
76
|
|
|
75
|
-
# Windows11SDK is only needed for the more experimental composition projects using newer WinAppSDK versions
|
|
76
|
-
if ($tagsToInclude.Contains('rnwDev')) {
|
|
77
|
-
$vsComponents += 'Microsoft.VisualStudio.Component.Windows11SDK.22000';
|
|
78
|
-
}
|
|
79
|
-
|
|
80
77
|
$vsWorkloads = @('Microsoft.VisualStudio.Workload.ManagedDesktop',
|
|
81
78
|
'Microsoft.VisualStudio.Workload.NativeDesktop',
|
|
82
79
|
'Microsoft.VisualStudio.Workload.Universal');
|
|
83
80
|
|
|
84
81
|
$vsAll = ($vsComponents + $vsWorkloads);
|
|
85
82
|
|
|
83
|
+
# The minimum winget version to check for
|
|
84
|
+
$wingetver = "1.7.11261";
|
|
85
|
+
|
|
86
86
|
# The minimum VS version to check for
|
|
87
87
|
# Note: For install to work, whatever min version you specify here must be met by the current package available on winget.
|
|
88
88
|
$vsver = "17.11.0";
|
|
89
89
|
|
|
90
90
|
# The exact .NET SDK version to check for
|
|
91
|
-
$dotnetver = "
|
|
91
|
+
$dotnetver = "8.0";
|
|
92
92
|
# Version name of the winget package
|
|
93
|
-
$wingetDotNetVer = "
|
|
93
|
+
$wingetDotNetVer = "8";
|
|
94
94
|
|
|
95
95
|
$v = [System.Environment]::OSVersion.Version;
|
|
96
96
|
if ($env:Agent_BuildDirectory) {
|
|
@@ -127,7 +127,7 @@ function Get-VSPathPropertyForEachInstall {
|
|
|
127
127
|
[String[]]$paths = ($output | Where-Object { (Test-Path $_) });
|
|
128
128
|
return $paths;
|
|
129
129
|
}
|
|
130
|
-
|
|
130
|
+
|
|
131
131
|
return $null;
|
|
132
132
|
}
|
|
133
133
|
|
|
@@ -187,26 +187,26 @@ function GetVSChannelAndProduct {
|
|
|
187
187
|
param(
|
|
188
188
|
[string]$VsWhere
|
|
189
189
|
)
|
|
190
|
-
|
|
190
|
+
|
|
191
191
|
if ($VsWhere) {
|
|
192
192
|
$channelId = & $VsWhere -version $vsver -property channelId;
|
|
193
193
|
$productId = & $VsWhere -version $vsver -property productId;
|
|
194
|
-
|
|
194
|
+
|
|
195
195
|
# Channel/product not found, check one more time for pre-release
|
|
196
196
|
if (($channelId -eq $null) -or ($productId -eq $null)) {
|
|
197
197
|
$channelId = & $VsWhere -version $vsver -property channelId -prerelease;
|
|
198
198
|
$productId = & $VsWhere -version $vsver -property productId -prerelease;
|
|
199
199
|
}
|
|
200
|
-
|
|
200
|
+
|
|
201
201
|
return $channelId, $productId;
|
|
202
202
|
}
|
|
203
|
-
|
|
203
|
+
|
|
204
204
|
return $null, $null;
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
function InstallVS {
|
|
208
208
|
$vsWhere = Get-VSWhere;
|
|
209
|
-
|
|
209
|
+
|
|
210
210
|
$channelId, $productId = GetVSChannelAndProduct -VsWhere $vsWhere
|
|
211
211
|
|
|
212
212
|
if (($vsWhere -eq $null) -or ($channelId -eq $null) -or ($productId -eq $null)) {
|
|
@@ -223,7 +223,7 @@ function InstallVS {
|
|
|
223
223
|
|
|
224
224
|
$channelId, $productId = GetVSChannelAndProduct -VsWhere $vsWhere
|
|
225
225
|
}
|
|
226
|
-
|
|
226
|
+
|
|
227
227
|
# Final check before attempting install
|
|
228
228
|
if (($vsWhere -eq $null) -or ($channelId -eq $null) -or ($productId -eq $null)) {
|
|
229
229
|
throw "Unable to find or install a compatible version of Visual Studio >= ($vsver).";
|
|
@@ -240,8 +240,9 @@ function CheckNode {
|
|
|
240
240
|
try {
|
|
241
241
|
$nodeVersion = (Get-Command node -ErrorAction Stop).Version;
|
|
242
242
|
Write-Verbose "Node version found: $nodeVersion";
|
|
243
|
-
$
|
|
244
|
-
|
|
243
|
+
$major = $nodeVersion.Major;
|
|
244
|
+
$minor = $nodeVersion.Minor;
|
|
245
|
+
return ($major -gt 22) -or (($major -eq 22) -and ($minor -ge 14));
|
|
245
246
|
} catch { Write-Debug $_ }
|
|
246
247
|
|
|
247
248
|
Write-Verbose "Node not found.";
|
|
@@ -331,7 +332,7 @@ function InstallCppWinRT_VSIX {
|
|
|
331
332
|
$url = "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/CppWinRTTeam/vsextensions/cppwinrt101804264/2.0.210304.5/vspackage";
|
|
332
333
|
Write-Verbose "Downloading CppWinRT VSIX from $url";
|
|
333
334
|
Invoke-WebRequest -UseBasicParsing $url -OutFile $env:TEMP\Microsoft.Windows.CppWinRT.vsix;
|
|
334
|
-
|
|
335
|
+
|
|
335
336
|
$vsWhere = Get-VSWhere;
|
|
336
337
|
if ($vsWhere -eq $null) {
|
|
337
338
|
return;
|
|
@@ -437,10 +438,10 @@ $requirements = @(
|
|
|
437
438
|
},
|
|
438
439
|
@{
|
|
439
440
|
Id=[CheckId]::Node;
|
|
440
|
-
Name = 'Node.js (LTS, >=
|
|
441
|
+
Name = 'Node.js (LTS, >= 22.0)';
|
|
441
442
|
Tags = @('appDev');
|
|
442
443
|
Valid = { CheckNode; }
|
|
443
|
-
Install = { WinGetInstall OpenJS.NodeJS.LTS "
|
|
444
|
+
Install = { WinGetInstall OpenJS.NodeJS.LTS "22.14.0" };
|
|
444
445
|
HasVerboseOutput = $true;
|
|
445
446
|
},
|
|
446
447
|
@{
|
|
@@ -517,18 +518,30 @@ $requirements = @(
|
|
|
517
518
|
}
|
|
518
519
|
);
|
|
519
520
|
|
|
521
|
+
function InstallWinGet {
|
|
522
|
+
Write-Verbose "Updating WinGet version...";
|
|
523
|
+
Invoke-WebRequest -Uri https://aka.ms/getwinget -OutFile "$env:TEMP\winget.msixbundle";
|
|
524
|
+
Add-AppPackage -ForceApplicationShutdown $env:TEMP\winget.msixbundle;
|
|
525
|
+
Remove-Item $env:TEMP\winget.msixbundle;
|
|
526
|
+
}
|
|
527
|
+
|
|
520
528
|
function EnsureWinGetForInstall {
|
|
521
529
|
Write-Verbose "Checking for WinGet...";
|
|
522
530
|
try {
|
|
523
531
|
# Check if winget.exe is in PATH
|
|
524
532
|
if (Get-Command "winget.exe" -CommandType Application -ErrorAction Ignore) {
|
|
525
533
|
Write-Verbose "WinGet found in PATH.";
|
|
526
|
-
|
|
534
|
+
Write-Verbose "Validating WinGet version...";
|
|
535
|
+
$wingetverfound = & winget -v;
|
|
536
|
+
if ([System.Version]$wingetverfound.Substring(1) -ge [System.Version]$wingetver ){
|
|
537
|
+
Write-Verbose "WinGet version found: $wingetverfound";
|
|
538
|
+
return;
|
|
539
|
+
}
|
|
527
540
|
}
|
|
541
|
+
InstallWinGet;
|
|
542
|
+
$installedwingetver = & winget -v;
|
|
543
|
+
Write-Verbose "WinGet version installed: $installedwingetver";
|
|
528
544
|
} catch { Write-Debug $_ }
|
|
529
|
-
|
|
530
|
-
Write-Host "WinGet is required to install dependencies. See https://learn.microsoft.com/en-us/windows/package-manager/winget/ for more information.";
|
|
531
|
-
throw "WinGet needed to install.";
|
|
532
545
|
}
|
|
533
546
|
|
|
534
547
|
function WinGetInstall {
|
|
@@ -546,7 +559,7 @@ function WinGetInstall {
|
|
|
546
559
|
& winget install "$wingetPackage" --accept-source-agreements --accept-package-agreements
|
|
547
560
|
}
|
|
548
561
|
}
|
|
549
|
-
|
|
562
|
+
|
|
550
563
|
function IsElevated {
|
|
551
564
|
return [bool](([System.Security.Principal.WindowsIdentity]::GetCurrent()).groups -match "S-1-5-32-544");
|
|
552
565
|
}
|
package/Shared/Shared.vcxitems
CHANGED
|
@@ -64,6 +64,12 @@
|
|
|
64
64
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\CompositionDynamicAutomationProvider.cpp">
|
|
65
65
|
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
66
66
|
</ClCompile>
|
|
67
|
+
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\CompositionTextProvider.cpp">
|
|
68
|
+
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
69
|
+
</ClCompile>
|
|
70
|
+
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\CompositionTextRangeProvider.cpp">
|
|
71
|
+
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
72
|
+
</ClCompile>
|
|
67
73
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\ReactNativeIsland.cpp">
|
|
68
74
|
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
69
75
|
<DependentUpon>$(ReactNativeWindowsDir)Microsoft.ReactNative\ReactNativeIsland.idl</DependentUpon>
|
|
@@ -215,6 +215,12 @@
|
|
|
215
215
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\CompositionDynamicAutomationProvider.cpp">
|
|
216
216
|
<Filter>Source Files\Fabric\Composition</Filter>
|
|
217
217
|
</ClCompile>
|
|
218
|
+
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\CompositionTextProvider.cpp">
|
|
219
|
+
<Filter>Source Files\Fabric\Composition</Filter>
|
|
220
|
+
</ClCompile>
|
|
221
|
+
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\CompositionTextRangeProvider.cpp">
|
|
222
|
+
<Filter>Source Files\Fabric\Composition</Filter>
|
|
223
|
+
</ClCompile>
|
|
218
224
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\ReactNativeIsland.cpp">
|
|
219
225
|
<Filter>Source Files\Fabric\Composition</Filter>
|
|
220
226
|
</ClCompile>
|
|
@@ -325,6 +331,8 @@
|
|
|
325
331
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\AbiEventEmitter.cpp" />
|
|
326
332
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\TooltipService.cpp" />
|
|
327
333
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\BorderPrimitive.cpp" />
|
|
334
|
+
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\CompositionTextProvider.cpp" />
|
|
335
|
+
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\CompositionTextRangeProvider.cpp" />
|
|
328
336
|
</ItemGroup>
|
|
329
337
|
<ItemGroup>
|
|
330
338
|
<Filter Include="Source Files">
|