react-native-windows 0.75.9 → 0.75.11
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/Modal/Modal.windows.js +352 -0
- package/Microsoft.ReactNative/CompositionComponentView.idl +2 -1
- package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp +4 -1
- package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/AbiViewProps.cpp +7 -0
- package/Microsoft.ReactNative/Fabric/AbiViewProps.h +2 -0
- package/Microsoft.ReactNative/Fabric/ComponentView.cpp +45 -50
- package/Microsoft.ReactNative/Fabric/ComponentView.h +14 -22
- package/Microsoft.ReactNative/Fabric/Composition/BorderPrimitive.cpp +931 -0
- package/Microsoft.ReactNative/Fabric/Composition/BorderPrimitive.h +80 -0
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +31 -13
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +187 -6
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +10 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp +8 -32
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +316 -911
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +32 -29
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp +9 -2
- package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +2 -1
- package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +181 -123
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +16 -8
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.cpp +99 -37
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +25 -3
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +63 -2
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +12 -0
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +51 -3
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +3 -0
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +18 -8
- package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +3 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +54 -5
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +8 -0
- package/Microsoft.ReactNative/Fabric/Composition/Theme.cpp +9 -3
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +11 -0
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +2 -0
- package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +1 -1
- package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +26 -0
- package/Microsoft.ReactNative/IReactViewComponentBuilder.idl +1 -1
- package/Microsoft.ReactNative/ReactNativeAppBuilder.cpp +25 -129
- package/Microsoft.ReactNative/ReactNativeAppBuilder.h +5 -13
- package/Microsoft.ReactNative/ReactNativeAppBuilder.idl +13 -34
- package/Microsoft.ReactNative/ReactNativeIsland.idl +3 -2
- package/Microsoft.ReactNative/ReactNativeWin32App.cpp +129 -18
- package/Microsoft.ReactNative/ReactNativeWin32App.h +14 -5
- package/Microsoft.ReactNative/ViewProps.idl +2 -0
- package/Microsoft.ReactNative.Cxx/ComponentView.Experimental.interop.h +14 -0
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/Shared/Shared.vcxitems +3 -10
- package/Shared/Shared.vcxitems.filters +1 -0
- package/codegen/NativeAccessibilityInfoSpec.g.h +1 -0
- package/codegen/NativeAccessibilityManagerSpec.g.h +1 -0
- package/codegen/NativeActionSheetManagerSpec.g.h +1 -0
- package/codegen/NativeAlertManagerSpec.g.h +1 -0
- package/codegen/NativeAnimatedModuleSpec.g.h +1 -0
- package/codegen/NativeAnimatedTurboModuleSpec.g.h +1 -0
- package/codegen/NativeAppStateSpec.g.h +1 -0
- package/codegen/NativeAppThemeSpec.g.h +1 -0
- package/codegen/NativeAppearanceSpec.g.h +1 -0
- package/codegen/NativeBlobModuleSpec.g.h +1 -0
- package/codegen/NativeBugReportingSpec.g.h +1 -0
- package/codegen/NativeClipboardSpec.g.h +1 -0
- package/codegen/NativeDOMSpec.g.h +1 -0
- package/codegen/NativeDevLoadingViewSpec.g.h +1 -0
- package/codegen/NativeDevMenuSpec.g.h +1 -0
- package/codegen/NativeDevSettingsSpec.g.h +1 -0
- package/codegen/NativeDevToolsSettingsManagerSpec.g.h +1 -0
- package/codegen/NativeDeviceEventManagerSpec.g.h +1 -0
- package/codegen/NativeDeviceInfoSpec.g.h +1 -0
- package/codegen/NativeDialogManagerAndroidSpec.g.h +1 -0
- package/codegen/NativeDialogManagerWindowsSpec.g.h +1 -0
- package/codegen/NativeExceptionsManagerSpec.g.h +1 -0
- package/codegen/NativeFileReaderModuleSpec.g.h +1 -0
- package/codegen/NativeFrameRateLoggerSpec.g.h +1 -0
- package/codegen/NativeHeadlessJsTaskSupportSpec.g.h +1 -0
- package/codegen/NativeI18nManagerSpec.g.h +1 -0
- package/codegen/NativeIdleCallbacksSpec.g.h +1 -0
- package/codegen/NativeImageEditorSpec.g.h +1 -0
- package/codegen/NativeImageLoaderAndroidSpec.g.h +1 -0
- package/codegen/NativeImageLoaderIOSSpec.g.h +1 -0
- package/codegen/NativeImageStoreAndroidSpec.g.h +1 -0
- package/codegen/NativeImageStoreIOSSpec.g.h +1 -0
- package/codegen/NativeIntentAndroidSpec.g.h +1 -0
- package/codegen/NativeIntersectionObserverSpec.g.h +1 -0
- package/codegen/NativeJSCHeapCaptureSpec.g.h +1 -0
- package/codegen/NativeJSCSamplingProfilerSpec.g.h +1 -0
- package/codegen/NativeKeyboardObserverSpec.g.h +1 -0
- package/codegen/NativeLinkingManagerSpec.g.h +1 -0
- package/codegen/NativeLogBoxSpec.g.h +1 -0
- package/codegen/NativeMicrotasksSpec.g.h +1 -0
- package/codegen/NativeModalManagerSpec.g.h +1 -0
- package/codegen/NativeMutationObserverSpec.g.h +1 -0
- package/codegen/NativeNetworkingAndroidSpec.g.h +1 -0
- package/codegen/NativeNetworkingIOSSpec.g.h +1 -0
- package/codegen/NativePerformanceObserverSpec.g.h +1 -0
- package/codegen/NativePerformanceSpec.g.h +1 -0
- package/codegen/NativePermissionsAndroidSpec.g.h +1 -0
- package/codegen/NativePlatformConstantsAndroidSpec.g.h +1 -0
- package/codegen/NativePlatformConstantsIOSSpec.g.h +1 -0
- package/codegen/NativePlatformConstantsWindowsSpec.g.h +1 -0
- package/codegen/NativePushNotificationManagerIOSSpec.g.h +1 -0
- package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +1 -0
- package/codegen/NativeRedBoxSpec.g.h +1 -0
- package/codegen/NativeSampleTurboModuleSpec.g.h +1 -0
- package/codegen/NativeSegmentFetcherSpec.g.h +1 -0
- package/codegen/NativeSettingsManagerSpec.g.h +1 -0
- package/codegen/NativeShareModuleSpec.g.h +1 -0
- package/codegen/NativeSoundManagerSpec.g.h +1 -0
- package/codegen/NativeSourceCodeSpec.g.h +1 -0
- package/codegen/NativeStatusBarManagerAndroidSpec.g.h +1 -0
- package/codegen/NativeStatusBarManagerIOSSpec.g.h +1 -0
- package/codegen/NativeTimingSpec.g.h +1 -0
- package/codegen/NativeToastAndroidSpec.g.h +1 -0
- package/codegen/NativeUIManagerSpec.g.h +1 -0
- package/codegen/NativeVibrationSpec.g.h +1 -0
- package/codegen/NativeWebSocketModuleSpec.g.h +1 -0
- package/package.json +3 -3
- package/templates/cpp-app/windows/MyApp/MyApp.cpp +46 -130
- package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.cpp +0 -59
- package/Microsoft.ReactNative/ReactInstanceSettingsBuilder.h +0 -23
|
@@ -1,12 +1,42 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
1
4
|
#include "pch.h"
|
|
2
5
|
#include "ReactNativeWin32App.h"
|
|
3
6
|
#include "ReactNativeWin32App.g.cpp"
|
|
7
|
+
|
|
8
|
+
#include "IReactDispatcher.h"
|
|
9
|
+
#include "ReactCoreInjection.h"
|
|
4
10
|
#include "ReactNativeHost.h"
|
|
11
|
+
|
|
5
12
|
#include "winrt/Microsoft.UI.Composition.h"
|
|
6
13
|
#include "winrt/Microsoft.UI.Content.h"
|
|
14
|
+
#include "winrt/Microsoft.UI.Dispatching.h"
|
|
7
15
|
#include "winrt/Microsoft.UI.Interop.h"
|
|
8
16
|
#include "winrt/Microsoft.UI.Windowing.h"
|
|
9
17
|
|
|
18
|
+
// Scaling factor for the window's content based on the DPI of the display where the window is located.
|
|
19
|
+
float ScaleFactor(HWND hwnd) noexcept {
|
|
20
|
+
return GetDpiForWindow(hwnd) / static_cast<float>(USER_DEFAULT_SCREEN_DPI);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
void UpdateRootViewSizeToAppWindow(
|
|
24
|
+
winrt::Microsoft::ReactNative::ReactNativeIsland const &rootView,
|
|
25
|
+
winrt::Microsoft::UI::Windowing::AppWindow const &window) {
|
|
26
|
+
auto hwnd = winrt::Microsoft::UI::GetWindowFromWindowId(window.Id());
|
|
27
|
+
auto scaleFactor = ScaleFactor(hwnd);
|
|
28
|
+
winrt::Windows::Foundation::Size size{
|
|
29
|
+
window.ClientSize().Width / scaleFactor, window.ClientSize().Height / scaleFactor};
|
|
30
|
+
// Do not relayout when minimized
|
|
31
|
+
if (window.Presenter().as<winrt::Microsoft::UI::Windowing::OverlappedPresenter>().State() !=
|
|
32
|
+
winrt::Microsoft::UI::Windowing::OverlappedPresenterState::Minimized) {
|
|
33
|
+
winrt::Microsoft::ReactNative::LayoutConstraints constraints;
|
|
34
|
+
constraints.LayoutDirection = winrt::Microsoft::ReactNative::LayoutDirection::Undefined;
|
|
35
|
+
constraints.MaximumSize = constraints.MinimumSize = size;
|
|
36
|
+
rootView.Arrange(constraints, {0, 0});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
10
40
|
namespace winrt::Microsoft::ReactNative::implementation {
|
|
11
41
|
ReactNativeWin32App::ReactNativeWin32App() {}
|
|
12
42
|
|
|
@@ -14,41 +44,44 @@ ReactNativeWin32App::~ReactNativeWin32App() {
|
|
|
14
44
|
m_desktopChildSiteBridge = nullptr;
|
|
15
45
|
|
|
16
46
|
// Destroy all Composition objects
|
|
17
|
-
m_compositor
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
void ReactNativeWin32App::AppWindow(winrt::Microsoft::UI::Windowing::AppWindow const &appWindow) {
|
|
22
|
-
m_appWindow = appWindow;
|
|
47
|
+
if (m_compositor != nullptr) {
|
|
48
|
+
m_compositor.Close();
|
|
49
|
+
m_compositor = nullptr;
|
|
50
|
+
}
|
|
23
51
|
}
|
|
24
52
|
|
|
25
53
|
winrt::Microsoft::UI::Windowing::AppWindow ReactNativeWin32App::AppWindow() {
|
|
26
54
|
return m_appWindow;
|
|
27
55
|
}
|
|
28
56
|
|
|
29
|
-
void ReactNativeWin32App::
|
|
30
|
-
|
|
57
|
+
void ReactNativeWin32App::AppWindow(winrt::Microsoft::UI::Windowing::AppWindow const &appWindow) {
|
|
58
|
+
m_appWindow = appWindow;
|
|
31
59
|
}
|
|
32
60
|
|
|
33
61
|
winrt::Microsoft::UI::Composition::Compositor ReactNativeWin32App::Compositor() {
|
|
34
62
|
return m_compositor;
|
|
35
63
|
}
|
|
36
64
|
|
|
37
|
-
winrt::Microsoft::
|
|
38
|
-
|
|
65
|
+
void ReactNativeWin32App::Compositor(winrt::Microsoft::UI::Composition::Compositor const &compositor) {
|
|
66
|
+
m_compositor = compositor;
|
|
39
67
|
}
|
|
40
68
|
|
|
41
|
-
void ReactNativeWin32App::
|
|
42
|
-
|
|
69
|
+
void ReactNativeWin32App::DesktopChildSiteBridge(
|
|
70
|
+
winrt::Microsoft::UI::Content::DesktopChildSiteBridge const &desktopChildSiteBridge) {
|
|
71
|
+
m_desktopChildSiteBridge = desktopChildSiteBridge;
|
|
43
72
|
}
|
|
44
73
|
|
|
45
74
|
winrt::Microsoft::UI::Content::DesktopChildSiteBridge ReactNativeWin32App::DesktopChildSiteBridge() {
|
|
46
75
|
return m_desktopChildSiteBridge;
|
|
47
76
|
}
|
|
48
77
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
78
|
+
winrt::Microsoft::UI::Dispatching::DispatcherQueueController ReactNativeWin32App::DispatcherQueueController() {
|
|
79
|
+
return m_dispatcherQueueController;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
void ReactNativeWin32App::DispatcherQueueController(
|
|
83
|
+
winrt::Microsoft::UI::Dispatching::DispatcherQueueController const &dispatcherQueueController) {
|
|
84
|
+
m_dispatcherQueueController = dispatcherQueueController;
|
|
52
85
|
}
|
|
53
86
|
|
|
54
87
|
winrt::Microsoft::ReactNative::ReactNativeHost ReactNativeWin32App::ReactNativeHost() {
|
|
@@ -62,12 +95,90 @@ void ReactNativeWin32App::ReactNativeHost(winrt::Microsoft::ReactNative::ReactNa
|
|
|
62
95
|
m_host = host;
|
|
63
96
|
}
|
|
64
97
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
98
|
+
winrt::Microsoft::ReactNative::ReactNativeIsland ReactNativeWin32App::ReactNativeIsland() {
|
|
99
|
+
return m_reactNativeIsland;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
void ReactNativeWin32App::ReactNativeIsland(winrt::Microsoft::ReactNative::ReactNativeIsland const &reactNativeIsland) {
|
|
103
|
+
m_reactNativeIsland = reactNativeIsland;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
winrt::Microsoft::ReactNative::ReactViewOptions ReactNativeWin32App::ReactViewOptions() {
|
|
107
|
+
if (m_reactViewOptions == nullptr) {
|
|
108
|
+
m_reactViewOptions = winrt::make<winrt::Microsoft::ReactNative::implementation::ReactViewOptions>();
|
|
109
|
+
}
|
|
110
|
+
return m_reactViewOptions;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
void ReactNativeWin32App::ReactViewOptions(winrt::Microsoft::ReactNative::ReactViewOptions const &viewOptions) {
|
|
114
|
+
m_reactViewOptions = viewOptions;
|
|
68
115
|
}
|
|
69
116
|
|
|
70
117
|
void ReactNativeWin32App::Start() {
|
|
118
|
+
// Show the hosting AppWindow
|
|
119
|
+
m_appWindow.Show();
|
|
120
|
+
|
|
121
|
+
// Currently set the property to use current thread dispatcher as a default UI dispatcher.
|
|
122
|
+
// TODO: Use the correct dispatcher from a developer-provided DispatcherQueueController
|
|
123
|
+
ReactNativeHost().InstanceSettings().Properties().Set(
|
|
124
|
+
ReactDispatcherHelper::UIDispatcherProperty(), ReactDispatcherHelper::UIThreadDispatcher());
|
|
125
|
+
|
|
126
|
+
auto hwnd{winrt::Microsoft::UI::GetWindowFromWindowId(m_appWindow.Id())};
|
|
127
|
+
|
|
128
|
+
winrt::Microsoft::ReactNative::ReactCoreInjection::SetTopLevelWindowId(
|
|
129
|
+
ReactNativeHost().InstanceSettings().Properties(), reinterpret_cast<uint64_t>(hwnd));
|
|
130
|
+
|
|
131
|
+
winrt::Microsoft::ReactNative::Composition::CompositionUIService::SetCompositor(
|
|
132
|
+
ReactNativeHost().InstanceSettings(), m_compositor);
|
|
133
|
+
|
|
134
|
+
// Start the react-native instance, which will create a JavaScript runtime and load the applications bundle.
|
|
135
|
+
ReactNativeHost().ReloadInstance();
|
|
136
|
+
|
|
137
|
+
// Create a RootView which will present a react-native component
|
|
138
|
+
if (m_reactNativeIsland == nullptr) {
|
|
139
|
+
m_reactNativeIsland = winrt::Microsoft::ReactNative::ReactNativeIsland(m_compositor);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
m_reactNativeIsland.ReactViewHost(
|
|
143
|
+
winrt::Microsoft::ReactNative::ReactCoreInjection::MakeViewHost(ReactNativeHost(), ReactViewOptions()));
|
|
144
|
+
|
|
145
|
+
// Update the size of the RootView when the AppWindow changes size
|
|
146
|
+
m_appWindow.Changed([wkRootView = winrt::make_weak(m_reactNativeIsland)](
|
|
147
|
+
winrt::Microsoft::UI::Windowing::AppWindow const &window,
|
|
148
|
+
winrt::Microsoft::UI::Windowing::AppWindowChangedEventArgs const &args) {
|
|
149
|
+
if (args.DidSizeChange() || args.DidVisibilityChange()) {
|
|
150
|
+
if (auto rootView = wkRootView.get()) {
|
|
151
|
+
UpdateRootViewSizeToAppWindow(rootView, window);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
|
|
156
|
+
// Quit application when main window is closed
|
|
157
|
+
m_appWindow.Destroying([this](
|
|
158
|
+
winrt::Microsoft::UI::Windowing::AppWindow const &window,
|
|
159
|
+
winrt::Windows::Foundation::IInspectable const & /*args*/) {
|
|
160
|
+
// Before we shutdown the application - unload the ReactNativeHost to give the javascript a chance to save any
|
|
161
|
+
// state
|
|
162
|
+
auto async = ReactNativeHost().UnloadInstance();
|
|
163
|
+
async.Completed([this](auto asyncInfo, winrt::Windows::Foundation::AsyncStatus asyncStatus) {
|
|
164
|
+
assert(asyncStatus == winrt::Windows::Foundation::AsyncStatus::Completed);
|
|
165
|
+
ReactNativeHost().InstanceSettings().UIDispatcher().Post([]() { PostQuitMessage(0); });
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
// DesktopChildSiteBridge create a ContentSite that can host the RootView ContentIsland
|
|
170
|
+
m_desktopChildSiteBridge =
|
|
171
|
+
winrt::Microsoft::UI::Content::DesktopChildSiteBridge::Create(m_compositor, m_appWindow.Id());
|
|
172
|
+
|
|
173
|
+
m_desktopChildSiteBridge.Connect(m_reactNativeIsland.Island());
|
|
174
|
+
|
|
175
|
+
m_desktopChildSiteBridge.ResizePolicy(winrt::Microsoft::UI::Content::ContentSizePolicy::ResizeContentToParentWindow);
|
|
176
|
+
|
|
177
|
+
auto scaleFactor = ScaleFactor(hwnd);
|
|
178
|
+
m_reactNativeIsland.ScaleFactor(scaleFactor);
|
|
179
|
+
|
|
180
|
+
UpdateRootViewSizeToAppWindow(m_reactNativeIsland, m_appWindow);
|
|
181
|
+
|
|
71
182
|
m_desktopChildSiteBridge.Show();
|
|
72
183
|
|
|
73
184
|
// Run the main application event loop
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
1
3
|
#pragma once
|
|
4
|
+
|
|
2
5
|
#include "ReactNativeWin32App.g.h"
|
|
6
|
+
|
|
3
7
|
#include "winrt/Microsoft.UI.Dispatching.h"
|
|
4
8
|
|
|
5
9
|
namespace winrt::Microsoft::ReactNative::implementation {
|
|
@@ -13,26 +17,31 @@ struct ReactNativeWin32App : ReactNativeWin32AppT<ReactNativeWin32App> {
|
|
|
13
17
|
winrt::Microsoft::UI::Composition::Compositor Compositor();
|
|
14
18
|
void Compositor(winrt::Microsoft::UI::Composition::Compositor const &compositor);
|
|
15
19
|
|
|
16
|
-
winrt::Microsoft::ReactNative::ReactNativeIsland ReactNativeIsland();
|
|
17
|
-
void ReactNativeIsland(winrt::Microsoft::ReactNative::ReactNativeIsland const &reactNativeIsland);
|
|
18
|
-
|
|
19
20
|
winrt::Microsoft::UI::Content::DesktopChildSiteBridge DesktopChildSiteBridge();
|
|
20
21
|
void DesktopChildSiteBridge(winrt::Microsoft::UI::Content::DesktopChildSiteBridge const &desktopChildSiteBridge);
|
|
21
22
|
|
|
22
|
-
|
|
23
|
+
winrt::Microsoft::UI::Dispatching::DispatcherQueueController DispatcherQueueController();
|
|
24
|
+
void DispatcherQueueController(
|
|
23
25
|
winrt::Microsoft::UI::Dispatching::DispatcherQueueController const &dispatcherQueueController);
|
|
24
26
|
|
|
25
27
|
winrt::Microsoft::ReactNative::ReactNativeHost ReactNativeHost();
|
|
26
28
|
void ReactNativeHost(winrt::Microsoft::ReactNative::ReactNativeHost const &host);
|
|
27
29
|
|
|
30
|
+
winrt::Microsoft::ReactNative::ReactNativeIsland ReactNativeIsland();
|
|
31
|
+
void ReactNativeIsland(winrt::Microsoft::ReactNative::ReactNativeIsland const &reactNativeIsland);
|
|
32
|
+
|
|
33
|
+
winrt::Microsoft::ReactNative::ReactViewOptions ReactViewOptions();
|
|
34
|
+
void ReactViewOptions(winrt::Microsoft::ReactNative::ReactViewOptions const &reactViewOptions);
|
|
35
|
+
|
|
28
36
|
void Start();
|
|
29
37
|
|
|
30
38
|
private:
|
|
31
39
|
winrt::Microsoft::UI::Windowing::AppWindow m_appWindow{nullptr};
|
|
32
40
|
winrt::Microsoft::UI::Composition::Compositor m_compositor{nullptr};
|
|
41
|
+
winrt::Microsoft::UI::Content::DesktopChildSiteBridge m_desktopChildSiteBridge{nullptr};
|
|
33
42
|
winrt::Microsoft::UI::Dispatching::DispatcherQueueController m_dispatcherQueueController{nullptr};
|
|
34
43
|
winrt::Microsoft::ReactNative::ReactNativeHost m_host{nullptr};
|
|
35
44
|
winrt::Microsoft::ReactNative::ReactNativeIsland m_reactNativeIsland{nullptr};
|
|
36
|
-
winrt::Microsoft::
|
|
45
|
+
winrt::Microsoft::ReactNative::ReactViewOptions m_reactViewOptions{nullptr};
|
|
37
46
|
};
|
|
38
47
|
} // namespace winrt::Microsoft::ReactNative::implementation
|
|
@@ -24,6 +24,8 @@ namespace Microsoft.ReactNative {
|
|
|
24
24
|
Microsoft.UI.Composition.CompositionBrush AsBrush(Microsoft.ReactNative.Composition.Theme theme);
|
|
25
25
|
#endif
|
|
26
26
|
|
|
27
|
+
Boolean Equals(Color color);
|
|
28
|
+
|
|
27
29
|
static Color Black();
|
|
28
30
|
static Color Transparent();
|
|
29
31
|
static Color ReadValue(IJSValueReader reader);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright (c) Microsoft Corporation.
|
|
2
|
+
// Licensed under the MIT License.
|
|
3
|
+
|
|
4
|
+
#pragma once
|
|
5
|
+
|
|
6
|
+
namespace Microsoft::ReactNative::Composition::Experimental {
|
|
7
|
+
|
|
8
|
+
// This interface will be removed once we complete internal transitions to ContentIsland, and new APIs for hosting
|
|
9
|
+
// popups/new windows from a ContentIsland
|
|
10
|
+
struct __declspec(uuid("2A60D68A-57B8-43CA-B1BA-2FAF0FCB344B")) IComponentViewInterop : IUnknown {
|
|
11
|
+
virtual HWND GetHwndForParenting() noexcept = 0;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
} // namespace Microsoft::ReactNative::Composition::Experimental
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
-->
|
|
11
11
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
12
12
|
<PropertyGroup>
|
|
13
|
-
<ReactNativeWindowsVersion>0.75.
|
|
13
|
+
<ReactNativeWindowsVersion>0.75.11</ReactNativeWindowsVersion>
|
|
14
14
|
<ReactNativeWindowsMajor>0</ReactNativeWindowsMajor>
|
|
15
15
|
<ReactNativeWindowsMinor>75</ReactNativeWindowsMinor>
|
|
16
|
-
<ReactNativeWindowsPatch>
|
|
16
|
+
<ReactNativeWindowsPatch>11</ReactNativeWindowsPatch>
|
|
17
17
|
<ReactNativeWindowsCanary>false</ReactNativeWindowsCanary>
|
|
18
|
-
<ReactNativeWindowsCommitId>
|
|
18
|
+
<ReactNativeWindowsCommitId>7f93b5eda92397d91427e5a64f764846692edfa6</ReactNativeWindowsCommitId>
|
|
19
19
|
</PropertyGroup>
|
|
20
20
|
</Project>
|
package/Shared/Shared.vcxitems
CHANGED
|
@@ -89,6 +89,9 @@
|
|
|
89
89
|
<DependentUpon>$(ReactNativeWindowsDir)Microsoft.ReactNative\UriImageManager.idl</DependentUpon>
|
|
90
90
|
<SubType>Code</SubType>
|
|
91
91
|
</ClCompile>
|
|
92
|
+
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\BorderPrimitive.cpp">
|
|
93
|
+
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
94
|
+
</ClCompile>
|
|
92
95
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\ContentIslandComponentView.cpp">
|
|
93
96
|
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
94
97
|
<DependentUpon>$(ReactNativeWindowsDir)Microsoft.ReactNative\CompositionComponentView.idl</DependentUpon>
|
|
@@ -232,11 +235,6 @@
|
|
|
232
235
|
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
233
236
|
<DependentUpon>$(ReactNativeWindowsDir)Microsoft.ReactNative\ReactNativeAppBuilder.idl</DependentUpon>
|
|
234
237
|
<SubType>Code</SubType>
|
|
235
|
-
</ClCompile>
|
|
236
|
-
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\ReactInstanceSettingsBuilder.cpp">
|
|
237
|
-
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
238
|
-
<DependentUpon>$(ReactNativeWindowsDir)Microsoft.ReactNative\ReactNativeAppBuilder.idl</DependentUpon>
|
|
239
|
-
<SubType>Code</SubType>
|
|
240
238
|
</ClCompile>
|
|
241
239
|
<ClCompile Include="$(MSBuildThisFileDirectory)BaseFileReaderResource.cpp" />
|
|
242
240
|
<ClCompile Include="$(MSBuildThisFileDirectory)BaseScriptStoreImpl.cpp" />
|
|
@@ -349,11 +347,6 @@
|
|
|
349
347
|
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
350
348
|
<DependentUpon>$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\ReactNativeAppBuilder.idl</DependentUpon>
|
|
351
349
|
<SubType>Code</SubType>
|
|
352
|
-
</ClInclude>
|
|
353
|
-
<ClInclude Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\ReactInstanceSettingsBuilder.h">
|
|
354
|
-
<ExcludedFromBuild Condition="'$(UseFabric)' != 'true'">true</ExcludedFromBuild>
|
|
355
|
-
<DependentUpon>$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\ReactNativeAppBuilder.idl</DependentUpon>
|
|
356
|
-
<SubType>Code</SubType>
|
|
357
350
|
</ClInclude>
|
|
358
351
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\DynamicReader.cpp">
|
|
359
352
|
<DependentUpon>$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\IJSValueReader.idl</DependentUpon>
|
|
@@ -331,6 +331,7 @@
|
|
|
331
331
|
<ClCompile Include="$(MSBuildThisFileDirectory)Networking\NetworkPropertyIds.cpp" />
|
|
332
332
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\AbiEventEmitter.cpp" />
|
|
333
333
|
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\TooltipService.cpp" />
|
|
334
|
+
<ClCompile Include="$(MSBuildThisFileDirectory)..\Microsoft.ReactNative\Fabric\Composition\BorderPrimitive.cpp" />
|
|
334
335
|
</ItemGroup>
|
|
335
336
|
<ItemGroup>
|
|
336
337
|
<Filter Include="Source Files">
|