react-native-windows 0.77.6 → 0.77.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Directory.Build.props +2 -2
- package/Folly/TEMP_UntilFollyUpdate/json.cpp +4 -0
- package/Folly/TEMP_UntilFollyUpdate/lang/ToAscii.cpp +23 -15
- package/Folly/TEMP_UntilFollyUpdate/lang/ToAscii.h +5 -5
- package/Folly/cgmanifest.json +1 -1
- package/Libraries/Modal/Modal.windows.js +4 -1
- package/Microsoft.ReactNative/CompositionComponentView.idl +13 -1
- package/Microsoft.ReactNative/Fabric/AbiPortalShadowNode.cpp +97 -0
- package/Microsoft.ReactNative/Fabric/AbiPortalShadowNode.h +53 -0
- package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.h +160 -17
- package/Microsoft.ReactNative/Fabric/ComponentView.cpp +0 -1
- package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.cpp +0 -5
- package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +0 -2
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +13 -32
- package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +1 -3
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp +1 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h +2 -1
- package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +25 -20
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +313 -319
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +3 -61
- package/Microsoft.ReactNative/Fabric/Composition/PortalComponentView.cpp +78 -0
- package/Microsoft.ReactNative/Fabric/Composition/PortalComponentView.h +52 -0
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.cpp +22 -0
- package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +7 -5
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +79 -19
- package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +12 -6
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +73 -19
- package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +16 -0
- package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +2 -2
- package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +38 -23
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +1 -6
- package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +0 -3
- package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.cpp +0 -2
- package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +15 -1
- package/Microsoft.ReactNative/ReactNativeHost.cpp +5 -0
- package/Microsoft.ReactNative/ReactNativeIsland.idl +5 -1
- package/PropertySheets/Generated/PackageVersion.g.props +3 -3
- package/Shared/Networking/WinRTWebSocketResource.cpp +5 -0
- package/Shared/Shared.vcxitems +6 -5
- package/Shared/Shared.vcxitems.filters +3 -4
- package/codegen/react/components/rnwcore/ActivityIndicatorView.g.h +212 -0
- package/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h +295 -0
- package/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h +200 -0
- package/codegen/react/components/rnwcore/AndroidProgressBar.g.h +224 -0
- package/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h +250 -0
- package/codegen/react/components/rnwcore/AndroidSwitch.g.h +267 -0
- package/codegen/react/components/rnwcore/DebuggingOverlay.g.h +234 -0
- package/codegen/react/components/rnwcore/InputAccessory.g.h +200 -0
- package/codegen/react/components/rnwcore/ModalHostView.g.h +283 -0
- package/codegen/react/components/rnwcore/PullToRefreshView.g.h +246 -0
- package/codegen/react/components/rnwcore/SafeAreaView.g.h +197 -0
- package/codegen/react/components/rnwcore/Switch.g.h +263 -0
- package/codegen/react/components/rnwcore/UnimplementedNativeView.g.h +200 -0
- package/just-task.js +1 -1
- package/package.json +6 -6
- package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.cpp +0 -191
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentDescriptor.h +0 -39
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewShadowNode.cpp +0 -18
- package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewShadowNode.h +0 -39
|
@@ -142,9 +142,8 @@ struct CompositionInputKeyboardSource : winrt::implements<
|
|
|
142
142
|
|
|
143
143
|
CompositionEventHandler::CompositionEventHandler(
|
|
144
144
|
const winrt::Microsoft::ReactNative::ReactContext &context,
|
|
145
|
-
const winrt::Microsoft::ReactNative::ReactNativeIsland &reactNativeIsland
|
|
146
|
-
|
|
147
|
-
: m_fragmentTag(fragmentTag), m_context(context), m_wkRootView(reactNativeIsland) {}
|
|
145
|
+
const winrt::Microsoft::ReactNative::ReactNativeIsland &reactNativeIsland)
|
|
146
|
+
: m_context(context), m_wkRootView(reactNativeIsland) {}
|
|
148
147
|
|
|
149
148
|
void CompositionEventHandler::Initialize() noexcept {
|
|
150
149
|
#ifdef USE_WINUI3
|
|
@@ -348,11 +347,8 @@ facebook::react::SurfaceId CompositionEventHandler::SurfaceId() const noexcept {
|
|
|
348
347
|
|
|
349
348
|
winrt::Microsoft::ReactNative::Composition::implementation::RootComponentView &
|
|
350
349
|
CompositionEventHandler::RootComponentView() const noexcept {
|
|
351
|
-
auto
|
|
352
|
-
|
|
353
|
-
.componentViewDescriptorWithTag(SurfaceId());
|
|
354
|
-
return *rootComponentViewDescriptor.view
|
|
355
|
-
.as<winrt::Microsoft::ReactNative::Composition::implementation::RootComponentView>();
|
|
350
|
+
auto island = m_wkRootView.get();
|
|
351
|
+
return *winrt::get_self<winrt::Microsoft::ReactNative::implementation::ReactNativeIsland>(island)->GetComponentView();
|
|
356
352
|
}
|
|
357
353
|
|
|
358
354
|
void CompositionEventHandler::onPointerWheelChanged(
|
|
@@ -365,6 +361,9 @@ void CompositionEventHandler::onPointerWheelChanged(
|
|
|
365
361
|
facebook::react::Point ptLocal;
|
|
366
362
|
facebook::react::Point ptScaled = {static_cast<float>(position.X), static_cast<float>(position.Y)};
|
|
367
363
|
|
|
364
|
+
// In the case of a sub rootview, we may have a non-zero origin. hitTest takes a pt in the parent coords, so we
|
|
365
|
+
// need to apply the current origin
|
|
366
|
+
ptScaled += RootComponentView().layoutMetrics().frame.origin;
|
|
368
367
|
auto tag = RootComponentView().hitTest(ptScaled, ptLocal);
|
|
369
368
|
|
|
370
369
|
if (tag == -1)
|
|
@@ -977,6 +976,11 @@ void CompositionEventHandler::getTargetPointerArgs(
|
|
|
977
976
|
tag = -1;
|
|
978
977
|
|
|
979
978
|
ptScaled = {position.X, position.Y};
|
|
979
|
+
|
|
980
|
+
// In the case of a sub rootview, we may have a non-zero origin. hitTest takes a pt in the parent coords, so we need
|
|
981
|
+
// to apply the current origin
|
|
982
|
+
ptScaled += RootComponentView().layoutMetrics().frame.origin;
|
|
983
|
+
|
|
980
984
|
if (std::find(m_capturedPointers.begin(), m_capturedPointers.end(), pointerId) != m_capturedPointers.end()) {
|
|
981
985
|
assert(m_pointerCapturingComponentTag != -1);
|
|
982
986
|
tag = m_pointerCapturingComponentTag;
|
|
@@ -989,30 +993,7 @@ void CompositionEventHandler::getTargetPointerArgs(
|
|
|
989
993
|
ptLocal.y = ptScaled.y - (clientRect.top / strongRootView.ScaleFactor());
|
|
990
994
|
}
|
|
991
995
|
} else {
|
|
992
|
-
|
|
993
|
-
tag = RootComponentView().hitTest(ptScaled, ptLocal);
|
|
994
|
-
return;
|
|
995
|
-
}
|
|
996
|
-
|
|
997
|
-
// check if the fragment tag exists
|
|
998
|
-
if (!fabricuiManager->GetViewRegistry().findComponentViewWithTag(m_fragmentTag)) {
|
|
999
|
-
return;
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
|
-
auto fagmentView = fabricuiManager->GetViewRegistry().componentViewDescriptorWithTag(m_fragmentTag).view;
|
|
1003
|
-
auto fagmentchildren = fagmentView.Children();
|
|
1004
|
-
|
|
1005
|
-
// call the hitTest with the fargment as the RootComponent
|
|
1006
|
-
for (auto index = fagmentchildren.Size(); index > 0; index--) {
|
|
1007
|
-
auto childView = fagmentchildren.GetAt(index - 1);
|
|
1008
|
-
auto targetTag =
|
|
1009
|
-
winrt::get_self<winrt::Microsoft::ReactNative::implementation::ComponentView>(childView)->hitTest(
|
|
1010
|
-
ptScaled, ptLocal);
|
|
1011
|
-
if (targetTag != -1) {
|
|
1012
|
-
tag = targetTag;
|
|
1013
|
-
break;
|
|
1014
|
-
}
|
|
1015
|
-
}
|
|
996
|
+
tag = RootComponentView().hitTest(ptScaled, ptLocal);
|
|
1016
997
|
}
|
|
1017
998
|
}
|
|
1018
999
|
|
|
@@ -31,8 +31,7 @@ class CompositionEventHandler : public std::enable_shared_from_this<CompositionE
|
|
|
31
31
|
public:
|
|
32
32
|
CompositionEventHandler(
|
|
33
33
|
const winrt::Microsoft::ReactNative::ReactContext &context,
|
|
34
|
-
const winrt::Microsoft::ReactNative::ReactNativeIsland &ReactNativeIsland
|
|
35
|
-
const int fragmentTag);
|
|
34
|
+
const winrt::Microsoft::ReactNative::ReactNativeIsland &ReactNativeIsland);
|
|
36
35
|
virtual ~CompositionEventHandler();
|
|
37
36
|
|
|
38
37
|
void Initialize() noexcept;
|
|
@@ -152,7 +151,6 @@ class CompositionEventHandler : public std::enable_shared_from_this<CompositionE
|
|
|
152
151
|
|
|
153
152
|
std::map<PointerId, ActiveTouch> m_activeTouches; // iOS is map of touch event args to ActiveTouch..?
|
|
154
153
|
PointerId m_touchId = 0;
|
|
155
|
-
int m_fragmentTag = -1;
|
|
156
154
|
|
|
157
155
|
std::map<PointerId, std::vector<ReactTaggedView>> m_currentlyHoveredViewsPerPointer;
|
|
158
156
|
winrt::weak_ref<winrt::Microsoft::ReactNative::ReactNativeIsland> m_wkRootView;
|
|
@@ -167,7 +167,7 @@ HRESULT __stdcall CompositionRootAutomationProvider::get_ProviderOptions(Provide
|
|
|
167
167
|
return S_OK;
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
winrt::Microsoft::ReactNative::Composition::implementation::RootComponentView
|
|
170
|
+
winrt::com_ptr<winrt::Microsoft::ReactNative::Composition::implementation::RootComponentView>
|
|
171
171
|
CompositionRootAutomationProvider::rootComponentView() noexcept {
|
|
172
172
|
if (auto rootView = m_wkRootView.get()) {
|
|
173
173
|
auto innerRootView = winrt::get_self<winrt::Microsoft::ReactNative::implementation::ReactNativeIsland>(rootView);
|
|
@@ -63,7 +63,8 @@ class CompositionRootAutomationProvider : public winrt::implements<
|
|
|
63
63
|
};
|
|
64
64
|
|
|
65
65
|
private:
|
|
66
|
-
winrt::Microsoft::ReactNative::Composition::implementation::RootComponentView
|
|
66
|
+
winrt::com_ptr<winrt::Microsoft::ReactNative::Composition::implementation::RootComponentView>
|
|
67
|
+
rootComponentView() noexcept;
|
|
67
68
|
|
|
68
69
|
HRESULT AdvisePropertiesAdded(SAFEARRAY *psaProperties) noexcept;
|
|
69
70
|
HRESULT AdvisePropertiesRemoved(SAFEARRAY *psaProperties) noexcept;
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
#include <Utils/KeyboardUtils.h>
|
|
16
16
|
#include <Utils/ValueUtils.h>
|
|
17
17
|
#include <Views/FrameworkElementTransferProperties.h>
|
|
18
|
+
#include <atlcomcli.h>
|
|
18
19
|
#include <winrt/Microsoft.ReactNative.Composition.Experimental.h>
|
|
19
20
|
#include <winrt/Microsoft.UI.Input.h>
|
|
20
21
|
#include <winrt/Windows.UI.Composition.h>
|
|
@@ -350,9 +351,9 @@ void ComponentView::onLostFocus(
|
|
|
350
351
|
|
|
351
352
|
m_componentHostingFocusVisual->hostFocusVisual(false, get_strong());
|
|
352
353
|
}
|
|
353
|
-
if (
|
|
354
|
+
if (UiaClientsAreListening()) {
|
|
354
355
|
winrt::Microsoft::ReactNative::implementation::UpdateUiaProperty(
|
|
355
|
-
|
|
356
|
+
EnsureUiaProvider(), UIA_HasKeyboardFocusPropertyId, true, false);
|
|
356
357
|
}
|
|
357
358
|
}
|
|
358
359
|
base_type::onLostFocus(args);
|
|
@@ -400,8 +401,8 @@ void ComponentView::onGotFocus(
|
|
|
400
401
|
focusRect.size.height += (FOCUS_VISUAL_WIDTH * 2);
|
|
401
402
|
focusVisualRoot(focusRect)->hostFocusVisual(true, get_strong());
|
|
402
403
|
}
|
|
403
|
-
if (
|
|
404
|
-
auto spProviderSimple =
|
|
404
|
+
if (UiaClientsAreListening()) {
|
|
405
|
+
auto spProviderSimple = EnsureUiaProvider().try_as<IRawElementProviderSimple>();
|
|
405
406
|
if (spProviderSimple != nullptr) {
|
|
406
407
|
winrt::Microsoft::ReactNative::implementation::UpdateUiaProperty(
|
|
407
408
|
m_uiaProvider, UIA_HasKeyboardFocusPropertyId, false, true);
|
|
@@ -468,7 +469,7 @@ bool ComponentView::CapturePointer(const winrt::Microsoft::ReactNative::Composit
|
|
|
468
469
|
if (!root)
|
|
469
470
|
return false;
|
|
470
471
|
|
|
471
|
-
auto rootView{
|
|
472
|
+
auto rootView{root->ReactNativeIsland()};
|
|
472
473
|
if (!rootView) {
|
|
473
474
|
return false;
|
|
474
475
|
}
|
|
@@ -487,7 +488,7 @@ void ComponentView::ReleasePointerCapture(
|
|
|
487
488
|
if (!root)
|
|
488
489
|
return;
|
|
489
490
|
|
|
490
|
-
auto rootView{
|
|
491
|
+
auto rootView{root->ReactNativeIsland()};
|
|
491
492
|
if (!rootView) {
|
|
492
493
|
return;
|
|
493
494
|
}
|
|
@@ -705,59 +706,62 @@ void ComponentView::updateTransformProps(
|
|
|
705
706
|
void ComponentView::updateAccessibilityProps(
|
|
706
707
|
const facebook::react::ViewProps &oldViewProps,
|
|
707
708
|
const facebook::react::ViewProps &newViewProps) noexcept {
|
|
708
|
-
if (!
|
|
709
|
+
if (!UiaClientsAreListening())
|
|
709
710
|
return;
|
|
710
711
|
|
|
711
712
|
winrt::Microsoft::ReactNative::implementation::UpdateUiaProperty(
|
|
712
|
-
|
|
713
|
+
EnsureUiaProvider(), UIA_IsKeyboardFocusablePropertyId, oldViewProps.focusable, newViewProps.focusable);
|
|
713
714
|
|
|
714
715
|
winrt::Microsoft::ReactNative::implementation::UpdateUiaProperty(
|
|
715
|
-
|
|
716
|
+
EnsureUiaProvider(),
|
|
716
717
|
UIA_NamePropertyId,
|
|
717
718
|
oldViewProps.accessibilityLabel,
|
|
718
719
|
newViewProps.accessibilityLabel.empty() ? DefaultAccessibleName() : newViewProps.accessibilityLabel);
|
|
719
720
|
|
|
720
721
|
winrt::Microsoft::ReactNative::implementation::UpdateUiaProperty(
|
|
721
|
-
|
|
722
|
+
EnsureUiaProvider(),
|
|
722
723
|
UIA_IsContentElementPropertyId,
|
|
723
724
|
(oldViewProps.accessible && oldViewProps.accessibilityRole != "none"),
|
|
724
725
|
(newViewProps.accessible && newViewProps.accessibilityRole != "none"));
|
|
725
726
|
|
|
726
727
|
winrt::Microsoft::ReactNative::implementation::UpdateUiaProperty(
|
|
727
|
-
|
|
728
|
+
EnsureUiaProvider(),
|
|
728
729
|
UIA_IsControlElementPropertyId,
|
|
729
730
|
(oldViewProps.accessible && oldViewProps.accessibilityRole != "none"),
|
|
730
731
|
(newViewProps.accessible && newViewProps.accessibilityRole != "none"));
|
|
731
732
|
|
|
732
733
|
winrt::Microsoft::ReactNative::implementation::UpdateUiaProperty(
|
|
733
|
-
|
|
734
|
+
EnsureUiaProvider(),
|
|
734
735
|
UIA_IsEnabledPropertyId,
|
|
735
736
|
!(oldViewProps.accessibilityState && oldViewProps.accessibilityState->disabled),
|
|
736
737
|
!(newViewProps.accessibilityState && newViewProps.accessibilityState->disabled));
|
|
737
738
|
|
|
738
739
|
winrt::Microsoft::ReactNative::implementation::UpdateUiaProperty(
|
|
739
|
-
|
|
740
|
+
EnsureUiaProvider(),
|
|
740
741
|
UIA_IsEnabledPropertyId,
|
|
741
742
|
!(oldViewProps.accessibilityState && oldViewProps.accessibilityState->busy),
|
|
742
743
|
!(newViewProps.accessibilityState && newViewProps.accessibilityState->busy));
|
|
743
744
|
|
|
744
745
|
winrt::Microsoft::ReactNative::implementation::UpdateUiaProperty(
|
|
745
|
-
|
|
746
|
+
EnsureUiaProvider(), UIA_ControlTypePropertyId, oldViewProps.accessibilityRole, newViewProps.accessibilityRole);
|
|
746
747
|
|
|
747
748
|
winrt::Microsoft::ReactNative::implementation::UpdateUiaProperty(
|
|
748
|
-
|
|
749
|
+
EnsureUiaProvider(), UIA_HelpTextPropertyId, oldViewProps.accessibilityHint, newViewProps.accessibilityHint);
|
|
749
750
|
|
|
750
751
|
winrt::Microsoft::ReactNative::implementation::UpdateUiaProperty(
|
|
751
|
-
|
|
752
|
+
EnsureUiaProvider(),
|
|
752
753
|
UIA_PositionInSetPropertyId,
|
|
753
754
|
oldViewProps.accessibilityPosInSet,
|
|
754
755
|
newViewProps.accessibilityPosInSet);
|
|
755
756
|
|
|
756
757
|
winrt::Microsoft::ReactNative::implementation::UpdateUiaProperty(
|
|
757
|
-
|
|
758
|
+
EnsureUiaProvider(),
|
|
759
|
+
UIA_SizeOfSetPropertyId,
|
|
760
|
+
oldViewProps.accessibilitySetSize,
|
|
761
|
+
newViewProps.accessibilitySetSize);
|
|
758
762
|
|
|
759
763
|
winrt::Microsoft::ReactNative::implementation::UpdateUiaProperty(
|
|
760
|
-
|
|
764
|
+
EnsureUiaProvider(),
|
|
761
765
|
UIA_LiveSettingPropertyId,
|
|
762
766
|
oldViewProps.accessibilityLiveRegion,
|
|
763
767
|
newViewProps.accessibilityLiveRegion);
|
|
@@ -765,7 +769,8 @@ void ComponentView::updateAccessibilityProps(
|
|
|
765
769
|
if ((oldViewProps.accessibilityState.has_value() && oldViewProps.accessibilityState->selected.has_value()) !=
|
|
766
770
|
((newViewProps.accessibilityState.has_value() && newViewProps.accessibilityState->selected.has_value()))) {
|
|
767
771
|
auto compProvider =
|
|
768
|
-
|
|
772
|
+
EnsureUiaProvider()
|
|
773
|
+
.try_as<winrt::Microsoft::ReactNative::implementation::CompositionDynamicAutomationProvider>();
|
|
769
774
|
if (compProvider) {
|
|
770
775
|
if ((newViewProps.accessibilityState.has_value() && newViewProps.accessibilityState->selected.has_value())) {
|
|
771
776
|
winrt::Microsoft::ReactNative::implementation::AddSelectionItemsToContainer(compProvider.get());
|
|
@@ -1330,7 +1335,7 @@ winrt::Microsoft::ReactNative::ComponentView lastDeepChild(
|
|
|
1330
1335
|
}
|
|
1331
1336
|
|
|
1332
1337
|
// Walks the tree calling the function fn on each node.
|
|
1333
|
-
// If fn returns true, then walkTree stops
|
|
1338
|
+
// If fn returns true, then walkTree stops iterating over the tree, and returns true.
|
|
1334
1339
|
// If the tree walk completes without fn returning true, then walkTree returns false.
|
|
1335
1340
|
bool walkTree(
|
|
1336
1341
|
const winrt::Microsoft::ReactNative::ComponentView &view,
|