react-native-windows 0.74.0-preview.3 → 0.74.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.
- package/Microsoft.ReactNative/CompositionComponentView.idl +18 -3
- package/Microsoft.ReactNative/CompositionContext.idl +5 -5
- package/Microsoft.ReactNative/CompositionRootView.idl +22 -8
- package/Microsoft.ReactNative/CompositionSwitcher.idl +2 -2
- package/Microsoft.ReactNative/CompositionUIService.idl +8 -6
- package/Microsoft.ReactNative/Fabric/AbiViewProps.cpp +8 -1
- package/Microsoft.ReactNative/Fabric/AbiViewProps.h +7 -2
- package/Microsoft.ReactNative/Fabric/Composition/ActivityIndicatorComponentView.cpp +4 -3
- package/Microsoft.ReactNative/Fabric/Composition/ActivityIndicatorComponentView.h +5 -5
- package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.h +2 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +181 -154
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.h +8 -8
- package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper_emptyimpl.cpp +13 -13
- package/Microsoft.ReactNative/Fabric/Composition/CompositionHelpers.h +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +14 -11
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView.cpp +36 -12
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView.h +16 -10
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView_emptyimpl.cpp +15 -4
- package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService.cpp +20 -9
- package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService.h +6 -4
- package/Microsoft.ReactNative/Fabric/Composition/CompositionUIService_emptyimpl.cpp +5 -2
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +180 -128
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +25 -19
- package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp +2 -2
- package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.h +2 -2
- package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp +16 -22
- package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.h +5 -5
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +9 -10
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +5 -5
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +6 -5
- package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.h +5 -5
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +5 -2
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +7 -3
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +2 -2
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +36 -35
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +6 -6
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +9 -9
- package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.h +6 -6
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +25 -19
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +6 -6
- package/Microsoft.ReactNative/Fabric/Composition/Theme.cpp +13 -3
- package/Microsoft.ReactNative/Fabric/Composition/Theme.h +16 -8
- package/Microsoft.ReactNative/Fabric/Composition/Theme_emptyimpl.cpp +3 -3
- package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +5 -8
- package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.h +3 -3
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +1 -1
- package/Microsoft.ReactNative/Fabric/IComponentViewRegistry.h +1 -1
- package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.cpp +2 -1
- package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.cpp +7 -5
- package/Microsoft.ReactNative/Theme.idl +12 -1
- package/Microsoft.ReactNative/Utils/KeyboardUtils.cpp +10 -2
- package/Microsoft.ReactNative/Utils/KeyboardUtils.h +4 -1
- package/Microsoft.ReactNative/ViewProps.idl +11 -1
- package/Microsoft.ReactNative/packages.lock.json +70 -42
- package/Microsoft.ReactNative.Cxx/AutoDraw.h +6 -4
- package/Microsoft.ReactNative.Cxx/{CompositionSwitcher.interop.h → CompositionSwitcher.Experimental.interop.h} +3 -3
- package/Microsoft.ReactNative.Cxx/DesktopWindowBridge.h +2 -0
- package/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj +2 -11
- package/PropertySheets/External/Microsoft.ReactNative.Composition.CppApp.props +1 -1
- package/PropertySheets/External/Microsoft.ReactNative.WindowsSdk.Default.props +5 -3
- package/PropertySheets/Generated/PackageVersion.g.props +2 -2
- package/Scripts/OfficeReact.Win32.nuspec +2 -0
- package/package.json +8 -5
- package/templates/cpp-app/windows/MyApp/MyApp.cpp +2 -7
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
namespace winrt::Microsoft::ReactNative::Composition::implementation {
|
|
15
15
|
|
|
16
16
|
UnimplementedNativeViewComponentView::UnimplementedNativeViewComponentView(
|
|
17
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
17
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
18
18
|
facebook::react::Tag tag,
|
|
19
19
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext)
|
|
20
20
|
: base_type(
|
|
@@ -30,7 +30,7 @@ UnimplementedNativeViewComponentView::UnimplementedNativeViewComponentView(
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
winrt::Microsoft::ReactNative::ComponentView UnimplementedNativeViewComponentView::Create(
|
|
33
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
33
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
34
34
|
facebook::react::Tag tag,
|
|
35
35
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext) noexcept {
|
|
36
36
|
return winrt::make<UnimplementedNativeViewComponentView>(compContext, tag, reactContext);
|
|
@@ -65,7 +65,7 @@ void UnimplementedNativeViewComponentView::updateLayoutMetrics(
|
|
|
65
65
|
|
|
66
66
|
drawingSurface.HorizontalAlignmentRatio(0.f);
|
|
67
67
|
drawingSurface.VerticalAlignmentRatio(0.f);
|
|
68
|
-
drawingSurface.Stretch(winrt::Microsoft::ReactNative::Composition::CompositionStretch::None);
|
|
68
|
+
drawingSurface.Stretch(winrt::Microsoft::ReactNative::Composition::Experimental::CompositionStretch::None);
|
|
69
69
|
m_labelVisual.Brush(drawingSurface);
|
|
70
70
|
m_labelVisual.Size(surfaceSize);
|
|
71
71
|
m_labelVisual.Offset({
|
|
@@ -76,14 +76,11 @@ void UnimplementedNativeViewComponentView::updateLayoutMetrics(
|
|
|
76
76
|
|
|
77
77
|
POINT offset;
|
|
78
78
|
{
|
|
79
|
-
::Microsoft::ReactNative::Composition::AutoDrawDrawingSurface autoDraw(
|
|
79
|
+
::Microsoft::ReactNative::Composition::AutoDrawDrawingSurface autoDraw(
|
|
80
|
+
drawingSurface, m_layoutMetrics.pointScaleFactor, &offset);
|
|
80
81
|
if (auto d2dDeviceContext = autoDraw.GetRenderTarget()) {
|
|
81
82
|
d2dDeviceContext->Clear(D2D1::ColorF(D2D1::ColorF::Red, 0.3f));
|
|
82
83
|
assert(d2dDeviceContext->GetUnitMode() == D2D1_UNIT_MODE_DIPS);
|
|
83
|
-
const auto dpi = m_layoutMetrics.pointScaleFactor * 96.0f;
|
|
84
|
-
float oldDpiX, oldDpiY;
|
|
85
|
-
d2dDeviceContext->GetDpi(&oldDpiX, &oldDpiY);
|
|
86
|
-
d2dDeviceContext->SetDpi(dpi, dpi);
|
|
87
84
|
|
|
88
85
|
float offsetX = static_cast<float>(offset.x / m_layoutMetrics.pointScaleFactor);
|
|
89
86
|
float offsetY = static_cast<float>(offset.y / m_layoutMetrics.pointScaleFactor);
|
|
@@ -17,7 +17,7 @@ namespace winrt::Microsoft::ReactNative::Composition::implementation {
|
|
|
17
17
|
struct UnimplementedNativeViewComponentView
|
|
18
18
|
: public UnimplementedNativeViewComponentViewT<UnimplementedNativeViewComponentView, ViewComponentView> {
|
|
19
19
|
[[nodiscard]] static winrt::Microsoft::ReactNative::ComponentView Create(
|
|
20
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
20
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
21
21
|
facebook::react::Tag tag,
|
|
22
22
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext) noexcept;
|
|
23
23
|
|
|
@@ -29,13 +29,13 @@ struct UnimplementedNativeViewComponentView
|
|
|
29
29
|
override;
|
|
30
30
|
|
|
31
31
|
UnimplementedNativeViewComponentView(
|
|
32
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext,
|
|
32
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext,
|
|
33
33
|
facebook::react::Tag tag,
|
|
34
34
|
winrt::Microsoft::ReactNative::ReactContext const &reactContext);
|
|
35
35
|
|
|
36
36
|
private:
|
|
37
37
|
std::shared_ptr<facebook::react::UnimplementedNativeViewProps const> m_props;
|
|
38
|
-
winrt::Microsoft::ReactNative::Composition::ISpriteVisual m_labelVisual{nullptr};
|
|
38
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ISpriteVisual m_labelVisual{nullptr};
|
|
39
39
|
};
|
|
40
40
|
|
|
41
41
|
} // namespace winrt::Microsoft::ReactNative::Composition::implementation
|
|
@@ -63,7 +63,7 @@ struct FabricUIManager final : public std::enable_shared_from_this<FabricUIManag
|
|
|
63
63
|
void didMountComponentsWithRootTag(facebook::react::SurfaceId surfaceId) noexcept;
|
|
64
64
|
|
|
65
65
|
winrt::Microsoft::ReactNative::ReactContext m_context;
|
|
66
|
-
winrt::Microsoft::ReactNative::Composition::ICompositionContext m_compContext;
|
|
66
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext m_compContext;
|
|
67
67
|
std::shared_ptr<facebook::react::Scheduler> m_scheduler;
|
|
68
68
|
std::shared_ptr<facebook::react::SurfaceManager> m_surfaceManager;
|
|
69
69
|
std::mutex m_schedulerMutex; // Protect m_scheduler
|
|
@@ -22,7 +22,7 @@ struct IComponentViewRegistry {
|
|
|
22
22
|
virtual ComponentViewDescriptor const &dequeueComponentViewWithComponentHandle(
|
|
23
23
|
facebook::react::ComponentHandle componentHandle,
|
|
24
24
|
facebook::react::Tag tag,
|
|
25
|
-
const winrt::Microsoft::ReactNative::Composition::ICompositionContext &compContext) noexcept = 0;
|
|
25
|
+
const winrt::Microsoft::ReactNative::Composition::Experimental::ICompositionContext &compContext) noexcept = 0;
|
|
26
26
|
virtual ComponentViewDescriptor const &componentViewDescriptorWithTag(facebook::react::Tag tag) const noexcept = 0;
|
|
27
27
|
virtual winrt::Microsoft::ReactNative::ComponentView findComponentViewWithTag(
|
|
28
28
|
facebook::react::Tag tag) const noexcept = 0;
|
|
@@ -46,7 +46,8 @@ comp::Compositor NativeAnimatedNodeManager::Compositor() const noexcept {
|
|
|
46
46
|
winrt::Microsoft::ReactNative::Composition::implementation::CompositionUIService::GetCompositionContext(
|
|
47
47
|
m_context.Properties().Handle());
|
|
48
48
|
if (compositionContext) {
|
|
49
|
-
return winrt::Microsoft::ReactNative::Composition::CompositionContextHelper::InnerCompositor(
|
|
49
|
+
return winrt::Microsoft::ReactNative::Composition::Experimental::CompositionContextHelper::InnerCompositor(
|
|
50
|
+
compositionContext);
|
|
50
51
|
}
|
|
51
52
|
#endif
|
|
52
53
|
#ifndef CORE_ABI
|
|
@@ -181,9 +181,11 @@ void PropsAnimatedNode::StartAnimations() {
|
|
|
181
181
|
view.m_element.RotationAxis(m_rotationAxis);
|
|
182
182
|
#ifdef USE_FABRIC
|
|
183
183
|
} else {
|
|
184
|
-
auto visual =
|
|
185
|
-
|
|
186
|
-
|
|
184
|
+
auto visual =
|
|
185
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::CompositionContextHelper::InnerVisual(
|
|
186
|
+
view.m_componentView
|
|
187
|
+
.as<winrt::Microsoft::ReactNative::Composition::implementation::ComponentView>()
|
|
188
|
+
->Visual());
|
|
187
189
|
visual.RotationAxis(m_rotationAxis);
|
|
188
190
|
#endif
|
|
189
191
|
}
|
|
@@ -395,8 +397,8 @@ void PropsAnimatedNode::StartAnimation(
|
|
|
395
397
|
} else if (view.m_componentView) {
|
|
396
398
|
auto baseComponentView =
|
|
397
399
|
view.m_componentView.as<winrt::Microsoft::ReactNative::Composition::implementation::ComponentView>();
|
|
398
|
-
auto visual =
|
|
399
|
-
|
|
400
|
+
auto visual = winrt::Microsoft::ReactNative::Composition::Experimental::CompositionContextHelper::InnerVisual(
|
|
401
|
+
baseComponentView->Visual());
|
|
400
402
|
if (visual) {
|
|
401
403
|
auto targetProp = animation.Target();
|
|
402
404
|
if (targetProp == L"Rotation") {
|
|
@@ -37,12 +37,23 @@ namespace Microsoft.ReactNative.Composition
|
|
|
37
37
|
event Windows.Foundation.EventHandler<Object> ResourcesChanged;
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
+
namespace Experimental {
|
|
41
|
+
[webhosthidden]
|
|
42
|
+
[experimental]
|
|
43
|
+
interface IInternalTheme {
|
|
44
|
+
Microsoft.ReactNative.Composition.Experimental.IBrush InternalPlatformBrush(String platformColor);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
40
48
|
[webhosthidden]
|
|
41
49
|
[experimental]
|
|
42
50
|
runtimeclass Theme {
|
|
43
51
|
Theme(Microsoft.ReactNative.IReactContext reactContext, ICustomResourceLoader resourceLoader);
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
#ifdef USE_WINUI3
|
|
54
|
+
Microsoft.UI.Composition.CompositionBrush PlatformBrush(String platformColor);
|
|
55
|
+
#endif
|
|
56
|
+
|
|
46
57
|
Boolean TryGetPlatformColor(String platformColor, out Windows.UI.Color color);
|
|
47
58
|
DOC_STRING("An empty theme is used when the final theme is not yet known. It will generally return transparent colors.")
|
|
48
59
|
Boolean IsEmpty { get; };
|
|
@@ -348,6 +348,14 @@ static const std::string GetOrUnidentified(
|
|
|
348
348
|
return "Unidentified";
|
|
349
349
|
}
|
|
350
350
|
|
|
351
|
+
const std::string GetOrUnidentifiedCode(winrt::Windows::System::VirtualKey virtualKey) {
|
|
352
|
+
return GetOrUnidentified(virtualKey, g_virtualKeyToCode);
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
const std::string GetOrUnidentifiedKey(winrt::Windows::System::VirtualKey virtualKey) {
|
|
356
|
+
return GetOrUnidentified(virtualKey, g_virtualKeyToKey);
|
|
357
|
+
}
|
|
358
|
+
|
|
351
359
|
std::string FromVirtualKey(winrt::Windows::System::VirtualKey virtualKey, bool fShift, bool fCaps) {
|
|
352
360
|
int vk = static_cast<int>(virtualKey);
|
|
353
361
|
|
|
@@ -362,7 +370,7 @@ std::string FromVirtualKey(winrt::Windows::System::VirtualKey virtualKey, bool f
|
|
|
362
370
|
return std::string{c};
|
|
363
371
|
}
|
|
364
372
|
|
|
365
|
-
return
|
|
373
|
+
return GetOrUnidentifiedKey(virtualKey);
|
|
366
374
|
}
|
|
367
375
|
|
|
368
376
|
bool IsModifiedKeyPressed(winrt::CoreWindow const &coreWindow, winrt::Windows::System::VirtualKey virtualKey) {
|
|
@@ -410,7 +418,7 @@ std::string CodeFromVirtualKey(winrt::Windows::System::VirtualKey virtualKey) {
|
|
|
410
418
|
}
|
|
411
419
|
}
|
|
412
420
|
|
|
413
|
-
return
|
|
421
|
+
return GetOrUnidentifiedCode(virtualKey);
|
|
414
422
|
}
|
|
415
423
|
|
|
416
424
|
} // namespace Microsoft::ReactNative
|
|
@@ -12,4 +12,7 @@ bool IsModifiedKeyPressed(winrt::CoreWindow const &coreWindow, winrt::Windows::S
|
|
|
12
12
|
std::string FromVirtualKey(winrt::Windows::System::VirtualKey virtualKey, bool fShift, bool fCaps);
|
|
13
13
|
std::string CodeFromVirtualKey(winrt::Windows::System::VirtualKey virtualKey);
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
const std::string GetOrUnidentifiedCode(winrt::Windows::System::VirtualKey virtualKey);
|
|
16
|
+
const std::string GetOrUnidentifiedKey(winrt::Windows::System::VirtualKey virtualKey);
|
|
17
|
+
|
|
18
|
+
} // namespace Microsoft::ReactNative
|
|
@@ -8,11 +8,21 @@ import "Theme.idl";
|
|
|
8
8
|
|
|
9
9
|
namespace Microsoft.ReactNative {
|
|
10
10
|
|
|
11
|
+
namespace Composition.Experimental {
|
|
12
|
+
[webhosthidden]
|
|
13
|
+
[experimental]
|
|
14
|
+
interface IInternalColor {
|
|
15
|
+
Microsoft.ReactNative.Composition.Experimental.IBrush AsInternalBrush(Microsoft.ReactNative.Composition.Theme theme);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
11
19
|
[webhosthidden]
|
|
12
20
|
[experimental]
|
|
13
21
|
runtimeclass Color {
|
|
14
22
|
Windows.UI.Color AsWindowsColor(Microsoft.ReactNative.Composition.Theme theme);
|
|
15
|
-
|
|
23
|
+
#ifdef USE_WINUI3
|
|
24
|
+
Microsoft.UI.Composition.CompositionBrush AsBrush(Microsoft.ReactNative.Composition.Theme theme);
|
|
25
|
+
#endif
|
|
16
26
|
|
|
17
27
|
static Color Black();
|
|
18
28
|
static Color Transparent();
|
|
@@ -24,21 +24,21 @@
|
|
|
24
24
|
"Microsoft.SourceLink.Common": "1.1.1"
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
|
-
"Microsoft.UI.Xaml": {
|
|
28
|
-
"type": "Direct",
|
|
29
|
-
"requested": "[2.8.0, )",
|
|
30
|
-
"resolved": "2.8.0",
|
|
31
|
-
"contentHash": "vxdHxTr63s5KVtNddMFpgvjBjUH50z7seq/5jLWmmSuf8poxg+sXrywkofUdE8ZstbpO9y3FL/IXXUcPYbeesA==",
|
|
32
|
-
"dependencies": {
|
|
33
|
-
"Microsoft.Web.WebView2": "1.0.1264.42"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
27
|
"Microsoft.Windows.CppWinRT": {
|
|
37
28
|
"type": "Direct",
|
|
38
29
|
"requested": "[2.0.230706.1, )",
|
|
39
30
|
"resolved": "2.0.230706.1",
|
|
40
31
|
"contentHash": "l0D7oCw/5X+xIKHqZTi62TtV+1qeSz7KVluNFdrJ9hXsst4ghvqQ/Yhura7JqRdZWBXAuDS0G0KwALptdoxweQ=="
|
|
41
32
|
},
|
|
33
|
+
"Microsoft.WindowsAppSDK": {
|
|
34
|
+
"type": "Direct",
|
|
35
|
+
"requested": "[1.5.240227000, )",
|
|
36
|
+
"resolved": "1.5.240227000",
|
|
37
|
+
"contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==",
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"Microsoft.Windows.SDK.BuildTools": "10.0.22621.756"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
42
|
"Microsoft.Build.Tasks.Git": {
|
|
43
43
|
"type": "Transitive",
|
|
44
44
|
"resolved": "1.1.1",
|
|
@@ -49,10 +49,10 @@
|
|
|
49
49
|
"resolved": "1.1.1",
|
|
50
50
|
"contentHash": "WMcGpWKrmJmzrNeuaEb23bEMnbtR/vLmvZtkAP5qWu7vQsY59GqfRJd65sFpBszbd2k/bQ8cs8eWawQKAabkVg=="
|
|
51
51
|
},
|
|
52
|
-
"Microsoft.
|
|
52
|
+
"Microsoft.Windows.SDK.BuildTools": {
|
|
53
53
|
"type": "Transitive",
|
|
54
|
-
"resolved": "
|
|
55
|
-
"contentHash": "
|
|
54
|
+
"resolved": "10.0.22621.756",
|
|
55
|
+
"contentHash": "7ZL2sFSioYm1Ry067Kw1hg0SCcW5kuVezC2SwjGbcPE61Nn+gTbH86T73G3LcEOVj0S3IZzNuE/29gZvOLS7VA=="
|
|
56
56
|
},
|
|
57
57
|
"common": {
|
|
58
58
|
"type": "Project",
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"folly": {
|
|
67
67
|
"type": "Project",
|
|
68
68
|
"dependencies": {
|
|
69
|
-
"
|
|
70
|
-
"
|
|
69
|
+
"Fmt": "[1.0.0, )",
|
|
70
|
+
"boost": "[1.76.0, )"
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
"reactcommon": {
|
|
@@ -79,52 +79,80 @@
|
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
"native,Version=v0.0/win10-arm": {
|
|
82
|
-
"Microsoft.
|
|
83
|
-
"type": "
|
|
84
|
-
"
|
|
85
|
-
"
|
|
82
|
+
"Microsoft.WindowsAppSDK": {
|
|
83
|
+
"type": "Direct",
|
|
84
|
+
"requested": "[1.5.240227000, )",
|
|
85
|
+
"resolved": "1.5.240227000",
|
|
86
|
+
"contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==",
|
|
87
|
+
"dependencies": {
|
|
88
|
+
"Microsoft.Windows.SDK.BuildTools": "10.0.22621.756"
|
|
89
|
+
}
|
|
86
90
|
}
|
|
87
91
|
},
|
|
88
92
|
"native,Version=v0.0/win10-arm-aot": {
|
|
89
|
-
"Microsoft.
|
|
90
|
-
"type": "
|
|
91
|
-
"
|
|
92
|
-
"
|
|
93
|
+
"Microsoft.WindowsAppSDK": {
|
|
94
|
+
"type": "Direct",
|
|
95
|
+
"requested": "[1.5.240227000, )",
|
|
96
|
+
"resolved": "1.5.240227000",
|
|
97
|
+
"contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==",
|
|
98
|
+
"dependencies": {
|
|
99
|
+
"Microsoft.Windows.SDK.BuildTools": "10.0.22621.756"
|
|
100
|
+
}
|
|
93
101
|
}
|
|
94
102
|
},
|
|
95
103
|
"native,Version=v0.0/win10-arm64-aot": {
|
|
96
|
-
"Microsoft.
|
|
97
|
-
"type": "
|
|
98
|
-
"
|
|
99
|
-
"
|
|
104
|
+
"Microsoft.WindowsAppSDK": {
|
|
105
|
+
"type": "Direct",
|
|
106
|
+
"requested": "[1.5.240227000, )",
|
|
107
|
+
"resolved": "1.5.240227000",
|
|
108
|
+
"contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==",
|
|
109
|
+
"dependencies": {
|
|
110
|
+
"Microsoft.Windows.SDK.BuildTools": "10.0.22621.756"
|
|
111
|
+
}
|
|
100
112
|
}
|
|
101
113
|
},
|
|
102
114
|
"native,Version=v0.0/win10-x64": {
|
|
103
|
-
"Microsoft.
|
|
104
|
-
"type": "
|
|
105
|
-
"
|
|
106
|
-
"
|
|
115
|
+
"Microsoft.WindowsAppSDK": {
|
|
116
|
+
"type": "Direct",
|
|
117
|
+
"requested": "[1.5.240227000, )",
|
|
118
|
+
"resolved": "1.5.240227000",
|
|
119
|
+
"contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==",
|
|
120
|
+
"dependencies": {
|
|
121
|
+
"Microsoft.Windows.SDK.BuildTools": "10.0.22621.756"
|
|
122
|
+
}
|
|
107
123
|
}
|
|
108
124
|
},
|
|
109
125
|
"native,Version=v0.0/win10-x64-aot": {
|
|
110
|
-
"Microsoft.
|
|
111
|
-
"type": "
|
|
112
|
-
"
|
|
113
|
-
"
|
|
126
|
+
"Microsoft.WindowsAppSDK": {
|
|
127
|
+
"type": "Direct",
|
|
128
|
+
"requested": "[1.5.240227000, )",
|
|
129
|
+
"resolved": "1.5.240227000",
|
|
130
|
+
"contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==",
|
|
131
|
+
"dependencies": {
|
|
132
|
+
"Microsoft.Windows.SDK.BuildTools": "10.0.22621.756"
|
|
133
|
+
}
|
|
114
134
|
}
|
|
115
135
|
},
|
|
116
136
|
"native,Version=v0.0/win10-x86": {
|
|
117
|
-
"Microsoft.
|
|
118
|
-
"type": "
|
|
119
|
-
"
|
|
120
|
-
"
|
|
137
|
+
"Microsoft.WindowsAppSDK": {
|
|
138
|
+
"type": "Direct",
|
|
139
|
+
"requested": "[1.5.240227000, )",
|
|
140
|
+
"resolved": "1.5.240227000",
|
|
141
|
+
"contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==",
|
|
142
|
+
"dependencies": {
|
|
143
|
+
"Microsoft.Windows.SDK.BuildTools": "10.0.22621.756"
|
|
144
|
+
}
|
|
121
145
|
}
|
|
122
146
|
},
|
|
123
147
|
"native,Version=v0.0/win10-x86-aot": {
|
|
124
|
-
"Microsoft.
|
|
125
|
-
"type": "
|
|
126
|
-
"
|
|
127
|
-
"
|
|
148
|
+
"Microsoft.WindowsAppSDK": {
|
|
149
|
+
"type": "Direct",
|
|
150
|
+
"requested": "[1.5.240227000, )",
|
|
151
|
+
"resolved": "1.5.240227000",
|
|
152
|
+
"contentHash": "6rESOsREi8534J7IDpNfFYPvxQaSleXKt4A7ZYPeQyckNMQ0o1W0jZ420bJbEMz9Cw/S/8IbpPftLLZ9w/GTCQ==",
|
|
153
|
+
"dependencies": {
|
|
154
|
+
"Microsoft.Windows.SDK.BuildTools": "10.0.22621.756"
|
|
155
|
+
}
|
|
128
156
|
}
|
|
129
157
|
}
|
|
130
158
|
}
|
|
@@ -3,17 +3,19 @@
|
|
|
3
3
|
|
|
4
4
|
#include <winrt/Microsoft.ReactNative.Composition.h>
|
|
5
5
|
|
|
6
|
-
#include <CompositionSwitcher.interop.h>
|
|
6
|
+
#include <CompositionSwitcher.Experimental.interop.h>
|
|
7
7
|
|
|
8
8
|
namespace Microsoft::ReactNative::Composition {
|
|
9
9
|
|
|
10
10
|
class AutoDrawDrawingSurface {
|
|
11
11
|
public:
|
|
12
12
|
AutoDrawDrawingSurface(
|
|
13
|
-
winrt::Microsoft::ReactNative::Composition::IDrawingSurfaceBrush &drawingSurface,
|
|
13
|
+
winrt::Microsoft::ReactNative::Composition::Experimental::IDrawingSurfaceBrush &drawingSurface,
|
|
14
|
+
float scaleFactor,
|
|
14
15
|
POINT *offset) noexcept {
|
|
15
16
|
drawingSurface.as(m_drawingSurfaceInterop);
|
|
16
|
-
|
|
17
|
+
auto dpi = scaleFactor * 96.0f;
|
|
18
|
+
m_drawingSurfaceInterop->BeginDraw(m_d2dDeviceContext.put(), dpi, dpi, offset);
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
~AutoDrawDrawingSurface() noexcept {
|
|
@@ -31,7 +33,7 @@ class AutoDrawDrawingSurface {
|
|
|
31
33
|
}
|
|
32
34
|
|
|
33
35
|
private:
|
|
34
|
-
winrt::com_ptr<ICompositionDrawingSurfaceInterop> m_drawingSurfaceInterop;
|
|
36
|
+
winrt::com_ptr<Experimental::ICompositionDrawingSurfaceInterop> m_drawingSurfaceInterop;
|
|
35
37
|
winrt::com_ptr<ID2D1DeviceContext> m_d2dDeviceContext;
|
|
36
38
|
};
|
|
37
39
|
|
|
@@ -12,10 +12,10 @@
|
|
|
12
12
|
#include <winrt/Microsoft.ReactNative.Composition.h>
|
|
13
13
|
#include <winrt/Windows.Graphics.DirectX.Direct3D11.h>
|
|
14
14
|
|
|
15
|
-
namespace Microsoft::ReactNative::Composition {
|
|
15
|
+
namespace Microsoft::ReactNative::Composition::Experimental {
|
|
16
16
|
|
|
17
17
|
struct __declspec(uuid("941FDD90-ED27-49CE-A1CD-86ECB2D4A0FA")) ICompositionDrawingSurfaceInterop : public IUnknown {
|
|
18
|
-
virtual HRESULT BeginDraw(ID2D1DeviceContext **deviceContextOut, POINT *offset) noexcept = 0;
|
|
18
|
+
virtual HRESULT BeginDraw(ID2D1DeviceContext **deviceContextOut, float xDpi, float yDpi, POINT *offset) noexcept = 0;
|
|
19
19
|
virtual HRESULT EndDraw() noexcept = 0;
|
|
20
20
|
};
|
|
21
21
|
|
|
@@ -31,4 +31,4 @@ struct __declspec(uuid("4742F122-3EE0-48AA-9EA9-44A00147B55F")) ICompositionCont
|
|
|
31
31
|
virtual void D2DFactory(ID2D1Factory1 **outD2DFactory) noexcept = 0;
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
} // namespace Microsoft::ReactNative::Composition
|
|
34
|
+
} // namespace Microsoft::ReactNative::Composition::Experimental
|
|
@@ -141,24 +141,15 @@
|
|
|
141
141
|
<Version>$(NETCoreUWPVersion)</Version>
|
|
142
142
|
</PackageReference>
|
|
143
143
|
</ItemGroup>
|
|
144
|
-
<Choose>
|
|
145
|
-
<When Condition="'$(EnableSourceLink)' == 'true'">
|
|
146
|
-
<ItemGroup>
|
|
147
|
-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
|
148
|
-
</ItemGroup>
|
|
149
|
-
</When>
|
|
150
|
-
</Choose>
|
|
151
144
|
<!--
|
|
152
145
|
Visual Studio (but not MSBuild) will ignore Conditions applied directly to
|
|
153
146
|
the PackageReference or ItemGroup containing a PackageReference. Both
|
|
154
147
|
respect <Choose> for conditional restoration.
|
|
155
148
|
-->
|
|
156
149
|
<Choose>
|
|
157
|
-
<When Condition="'$(
|
|
150
|
+
<When Condition="'$(EnableSourceLink)' == 'true'">
|
|
158
151
|
<ItemGroup>
|
|
159
|
-
<PackageReference Include="Microsoft.
|
|
160
|
-
<Version>$(WinUI3Version)</Version>
|
|
161
|
-
</PackageReference>
|
|
152
|
+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
|
|
162
153
|
</ItemGroup>
|
|
163
154
|
</When>
|
|
164
155
|
</Choose>
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\Appx.props" />
|
|
18
18
|
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\Autolink.props" />
|
|
19
19
|
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\Codegen.props" />
|
|
20
|
-
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\HybridCRT.props"
|
|
20
|
+
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\HybridCRT.props" />
|
|
21
21
|
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\NuGet.Cpp.props" />
|
|
22
22
|
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\WinUI.props" />
|
|
23
23
|
<Import Project="$(ReactNativeWindowsDir)\PropertySheets\CppAppConsumeCSharpModule.props" />
|
|
@@ -12,18 +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
|
-
|
|
16
|
-
<WindowsTargetPlatformVersion Condition="'$(UseWinUI3)'=='true' And ('$(WindowsTargetPlatformVersion)'=='' Or '$(WindowsTargetPlatformVersion)'=='10.0.0.0')">10.0.22000.0</WindowsTargetPlatformVersion>
|
|
17
15
|
<WindowsTargetPlatformVersion Condition="'$(WindowsTargetPlatformVersion)'=='' Or '$(WindowsTargetPlatformVersion)'=='10.0.0.0'">10.0.19041.0</WindowsTargetPlatformVersion>
|
|
18
16
|
<WindowsTargetPlatformMinVersion Condition="'$(WindowsTargetPlatformMinVersion)'=='' Or '$(WindowsTargetPlatformMinVersion)'=='10.0.0.0'">10.0.17763.0</WindowsTargetPlatformMinVersion>
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
<!-- WinAppSDK/Composition projects have higher version requirements. -->
|
|
19
|
+
<WindowsTargetPlatformVersion Condition="'$(UseWinUI3)'=='true' And $([MSBuild]::VersionLessThan('$(WindowsTargetPlatformVersion)', '10.0.22000.0'))">10.0.22000.0</WindowsTargetPlatformVersion>
|
|
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
24
|
<TargetPlatformVersion Condition="'$(TargetPlatformVersion)'==''">10.0.19041.0</TargetPlatformVersion>
|
|
25
25
|
<TargetPlatformMinVersion Condition="'$(TargetPlatformMinVersion)'==''">10.0.17763.0</TargetPlatformMinVersion>
|
|
26
26
|
|
|
27
|
+
<!-- WinAppSDK/Composition projects have higher version requirements. -->
|
|
28
|
+
<TargetPlatformVersion Condition="'$(UseWinUI3)'=='true' And $([MSBuild]::VersionLessThan('$(TargetPlatformVersion)', '10.0.22000.0'))">10.0.22000.0</TargetPlatformVersion>
|
|
27
29
|
<TargetPlatformMinVersion Condition="'$(UseWinUI3)'=='true' And $([MSBuild]::VersionLessThan('$(TargetPlatformMinVersion)', '10.0.17763.0'))">10.0.17763.0</TargetPlatformMinVersion>
|
|
28
30
|
</PropertyGroup>
|
|
29
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.0
|
|
13
|
+
<ReactNativeWindowsVersion>0.74.0</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>74</ReactNativeWindowsMinor>
|
|
16
16
|
<ReactNativeWindowsPatch>0</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>388cdbb68bde9713f67c0e64e33ef62ea23d892f</ReactNativeWindowsCommitId>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
</Project>
|
|
@@ -40,6 +40,7 @@
|
|
|
40
40
|
<file src="$nugetroot$\inc\runtimeexecutor\ReactCommon\RuntimeExecutor.h" target="inc\ReactCommon"/>
|
|
41
41
|
<file src="$nugetroot$\inc\cxxreact\*" target="inc\cxxreact"/>
|
|
42
42
|
<file src="$nugetroot$\inc\jsi\**\*.*" target="inc\jsi"/>
|
|
43
|
+
<file src="$nugetroot$\inc\jsinspector-modern\*" target="inc\jsinspector-modern"/>
|
|
43
44
|
<file src="$nugetroot$\inc\Yoga\*.*" target="inc\Yoga"/>
|
|
44
45
|
<file src="$nugetroot$\inc\folly\**\*.*" target="inc" />
|
|
45
46
|
<file src="$nugetroot$\inc\fmt\**\*.*" target="inc\fmt" />
|
|
@@ -62,6 +63,7 @@
|
|
|
62
63
|
<file src="$nugetroot$\inc\Shared\Networking\OriginPolicy.h" target="inc"/>
|
|
63
64
|
<file src="$nugetroot$\inc\Shared\RuntimeOptions.h" target="inc"/>
|
|
64
65
|
<file src="$nugetroot$\inc\Shared\Tracing.h" target="inc"/>
|
|
66
|
+
<file src="$nugetroot$\inc\Shared\JSI\JSExecutorFactoryDelegate.h" target="inc\JSI"/>
|
|
65
67
|
|
|
66
68
|
<!-- Test DLL -->
|
|
67
69
|
<file src="$nugetroot$\inc\Test\WebSocketServer.h" target="inc\Test" />
|
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.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@react-native-community/cli": "13.6.4",
|
|
27
27
|
"@react-native-community/cli-platform-android": "13.6.4",
|
|
28
28
|
"@react-native-community/cli-platform-ios": "13.6.4",
|
|
29
|
-
"@react-native-windows/cli": "0.74.0
|
|
29
|
+
"@react-native-windows/cli": "0.74.0",
|
|
30
30
|
"@react-native/assets": "1.0.0",
|
|
31
31
|
"@react-native/assets-registry": "0.74.80",
|
|
32
32
|
"@react-native/codegen": "0.74.80",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"yargs": "^17.6.2"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@react-native-windows/codegen": "0.74.0
|
|
67
|
+
"@react-native-windows/codegen": "0.74.0",
|
|
68
68
|
"@react-native/metro-config": "0.74.80",
|
|
69
69
|
"@rnw-scripts/babel-react-native-config": "0.0.0",
|
|
70
70
|
"@rnw-scripts/eslint-config": "1.2.9",
|
|
@@ -92,11 +92,14 @@
|
|
|
92
92
|
"react-native": "0.74.0-rc.9"
|
|
93
93
|
},
|
|
94
94
|
"beachball": {
|
|
95
|
-
"defaultNpmTag": "
|
|
95
|
+
"defaultNpmTag": "latest",
|
|
96
96
|
"disallowedChangeTypes": [
|
|
97
97
|
"major",
|
|
98
98
|
"minor",
|
|
99
|
-
"
|
|
99
|
+
"prerelease",
|
|
100
|
+
"premajor",
|
|
101
|
+
"preminor",
|
|
102
|
+
"prepatch"
|
|
100
103
|
],
|
|
101
104
|
"gitTags": true
|
|
102
105
|
},
|
|
@@ -74,11 +74,8 @@ winrt::Microsoft::ReactNative::ReactNativeHost CreateReactNativeHost(
|
|
|
74
74
|
winrt::Microsoft::ReactNative::ReactCoreInjection::SetTopLevelWindowId(
|
|
75
75
|
host.InstanceSettings().Properties(), reinterpret_cast<uint64_t>(hwnd));
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
winrt::Microsoft::ReactNative::Composition::CompositionUIService::SetCompositionContext(
|
|
80
|
-
host.InstanceSettings().Properties(),
|
|
81
|
-
winrt::Microsoft::ReactNative::Composition::MicrosoftCompositionContextHelper::CreateContext(compositor));
|
|
77
|
+
winrt::Microsoft::ReactNative::Composition::CompositionUIService::SetCompositor(
|
|
78
|
+
host.InstanceSettings(), compositor);
|
|
82
79
|
|
|
83
80
|
return host;
|
|
84
81
|
}
|
|
@@ -144,8 +141,6 @@ _Use_decl_annotations_ int CALLBACK WinMain(HINSTANCE instance, HINSTANCE, PSTR
|
|
|
144
141
|
bridge.Connect(rootView.Island());
|
|
145
142
|
bridge.ResizePolicy(winrt::Microsoft::UI::Content::ContentSizePolicy::ResizeContentToParentWindow);
|
|
146
143
|
|
|
147
|
-
auto invScale = 1.0f / scaleFactor;
|
|
148
|
-
rootView.RootVisual().Scale({invScale, invScale, invScale});
|
|
149
144
|
rootView.ScaleFactor(scaleFactor);
|
|
150
145
|
|
|
151
146
|
// Set the intialSize of the root view
|