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
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
#include <react/renderer/components/view/ViewProps.h>
|
|
12
12
|
#include <react/renderer/core/LayoutMetrics.h>
|
|
13
13
|
|
|
14
|
+
#include <ComponentView.Experimental.interop.h>
|
|
15
|
+
#include <Fabric/Composition/ReactCompositionViewComponentBuilder.h>
|
|
14
16
|
#include <Fabric/Composition/Theme.h>
|
|
15
17
|
#include <uiautomationcore.h>
|
|
16
18
|
#include <winrt/Microsoft.ReactNative.Composition.Input.h>
|
|
@@ -37,11 +39,11 @@ struct BringIntoViewOptions {
|
|
|
37
39
|
bool AnimationDesired{false};
|
|
38
40
|
// NaN will bring the element fully into view aligned to the nearest edge of the viewport
|
|
39
41
|
float HorizontalAlignmentRatio{std::numeric_limits<float>::quiet_NaN()};
|
|
40
|
-
float HorizontalOffset{
|
|
42
|
+
float HorizontalOffset{20};
|
|
41
43
|
std::optional<facebook::react::Rect> TargetRect;
|
|
42
44
|
// NaN will bring the element fully into view aligned to the nearest edge of the viewport
|
|
43
45
|
float VerticalAlignmentRatio{std::numeric_limits<float>::quiet_NaN()};
|
|
44
|
-
float VerticalOffset{
|
|
46
|
+
float VerticalOffset{20};
|
|
45
47
|
};
|
|
46
48
|
|
|
47
49
|
struct LayoutMetricsChangedArgs : public LayoutMetricsChangedArgsT<LayoutMetricsChangedArgs> {
|
|
@@ -77,8 +79,12 @@ struct UnmountChildComponentViewArgs : public UnmountChildComponentViewArgsT<Unm
|
|
|
77
79
|
uint32_t m_index;
|
|
78
80
|
};
|
|
79
81
|
|
|
80
|
-
struct ComponentView
|
|
81
|
-
|
|
82
|
+
struct ComponentView
|
|
83
|
+
: public ComponentViewT<ComponentView, ::Microsoft::ReactNative::Composition::Experimental::IComponentViewInterop> {
|
|
84
|
+
ComponentView(
|
|
85
|
+
facebook::react::Tag tag,
|
|
86
|
+
winrt::Microsoft::ReactNative::ReactContext const &reactContext,
|
|
87
|
+
winrt::Microsoft::ReactNative::Composition::ReactCompositionViewComponentBuilder *builder);
|
|
82
88
|
|
|
83
89
|
virtual std::vector<facebook::react::ComponentDescriptorProvider> supplementalComponentDescriptorProviders() noexcept;
|
|
84
90
|
virtual void updateProps(
|
|
@@ -105,14 +111,16 @@ struct ComponentView : public ComponentViewT<ComponentView> {
|
|
|
105
111
|
// returns true if the fn ever returned true
|
|
106
112
|
bool runOnChildren(bool forward, Mso::Functor<bool(ComponentView &)> &fn) noexcept;
|
|
107
113
|
virtual RECT getClientRect() const noexcept;
|
|
114
|
+
winrt::Windows::Foundation::Point ScreenToLocal(winrt::Windows::Foundation::Point pt) noexcept;
|
|
115
|
+
winrt::Windows::Foundation::Point LocalToScreen(winrt::Windows::Foundation::Point pt) noexcept;
|
|
108
116
|
// The offset from this elements parent to its children (accounts for things like scroll position)
|
|
109
117
|
virtual facebook::react::Point getClientOffset() const noexcept;
|
|
110
118
|
virtual void onLosingFocus(const winrt::Microsoft::ReactNative::LosingFocusEventArgs &args) noexcept;
|
|
111
119
|
virtual void onGettingFocus(const winrt::Microsoft::ReactNative::GettingFocusEventArgs &args) noexcept;
|
|
112
120
|
virtual void onLostFocus(const winrt::Microsoft::ReactNative::Composition::Input::RoutedEventArgs &args) noexcept;
|
|
113
121
|
virtual void onGotFocus(const winrt::Microsoft::ReactNative::Composition::Input::RoutedEventArgs &args) noexcept;
|
|
114
|
-
void MarkAsCustomComponent() noexcept;
|
|
115
122
|
virtual void onMounted() noexcept;
|
|
123
|
+
bool isMounted() noexcept;
|
|
116
124
|
virtual void onUnmounted() noexcept;
|
|
117
125
|
void onDestroying() noexcept;
|
|
118
126
|
|
|
@@ -218,14 +226,6 @@ struct ComponentView : public ComponentViewT<ComponentView> {
|
|
|
218
226
|
void UserData(const winrt::IInspectable &userData) noexcept;
|
|
219
227
|
winrt::IInspectable UserData() const noexcept;
|
|
220
228
|
|
|
221
|
-
void CustomCommandHandler(const HandleCommandDelegate &handler) noexcept;
|
|
222
|
-
void UpdatePropsHandler(const UpdatePropsDelegate &handler) noexcept;
|
|
223
|
-
void UpdateStateHandler(const UpdateStateDelegate &handler) noexcept;
|
|
224
|
-
void UpdateEventEmitterHandler(const UpdateEventEmitterDelegate &handler) noexcept;
|
|
225
|
-
void MountChildComponentViewHandler(const MountChildComponentViewDelegate &handler) noexcept;
|
|
226
|
-
void UnmountChildComponentViewHandler(const UnmountChildComponentViewDelegate &handler) noexcept;
|
|
227
|
-
void FinalizeUpdateHandler(const UpdateFinalizerDelegate &handler) noexcept;
|
|
228
|
-
|
|
229
229
|
virtual void MountChildComponentView(
|
|
230
230
|
const winrt::Microsoft::ReactNative::ComponentView &childComponentView,
|
|
231
231
|
uint32_t index) noexcept;
|
|
@@ -253,7 +253,7 @@ struct ComponentView : public ComponentViewT<ComponentView> {
|
|
|
253
253
|
const winrt::Microsoft::ReactNative::Composition::Input::CharacterReceivedRoutedEventArgs &args) noexcept;
|
|
254
254
|
|
|
255
255
|
protected:
|
|
256
|
-
|
|
256
|
+
winrt::com_ptr<winrt::Microsoft::ReactNative::Composition::ReactCompositionViewComponentBuilder> m_builder;
|
|
257
257
|
bool m_mounted : 1 {false};
|
|
258
258
|
const facebook::react::Tag m_tag;
|
|
259
259
|
winrt::IInspectable m_userData;
|
|
@@ -265,14 +265,6 @@ struct ComponentView : public ComponentViewT<ComponentView> {
|
|
|
265
265
|
winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::ReactNative::ComponentView> m_children{
|
|
266
266
|
winrt::single_threaded_vector<winrt::Microsoft::ReactNative::ComponentView>()};
|
|
267
267
|
|
|
268
|
-
UpdatePropsDelegate m_updatePropsDelegate{nullptr};
|
|
269
|
-
UpdateStateDelegate m_updateStateDelegate{nullptr};
|
|
270
|
-
HandleCommandDelegate m_customCommandHandler{nullptr};
|
|
271
|
-
UpdateFinalizerDelegate m_finalizeUpdateHandler{nullptr};
|
|
272
|
-
MountChildComponentViewDelegate m_mountChildComponentViewHandler{nullptr};
|
|
273
|
-
UnmountChildComponentViewDelegate m_unmountChildComponentViewHandler{nullptr};
|
|
274
|
-
UpdateEventEmitterDelegate m_updateEventEmitterHandler{nullptr};
|
|
275
|
-
|
|
276
268
|
winrt::event<
|
|
277
269
|
winrt::Windows::Foundation::EventHandler<winrt::Microsoft::ReactNative::Composition::Input::KeyRoutedEventArgs>>
|
|
278
270
|
m_keyDownEvent;
|