From 2f77b71b52ed23f30311f12a0fd544da48952e6a Mon Sep 17 00:00:00 2001 From: Chiara Mooney <34109996+chiaramooney@users.noreply.github.com> Date: Thu, 6 Jul 2023 10:47:29 -0700 Subject: [PATCH 01/20] Implement Invoke --- .../CompositionDynamicAutomationProvider.cpp | 30 +++++++++++++++++++ .../CompositionDynamicAutomationProvider.h | 7 ++++- .../CompositionRootAutomationProvider.cpp | 4 +++ .../CompositionRootAutomationProvider.h | 5 ++++ .../components/view/ViewEventEmitter.cpp | 5 ++++ .../components/view/ViewEventEmitter.h | 2 ++ 6 files changed, 52 insertions(+), 1 deletion(-) diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp index 4975fcfc64f..e7e42f1a577 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp @@ -272,4 +272,34 @@ HRESULT __stdcall CompositionDynamicAutomationProvider::get_HostRawElementProvid return S_OK; } +HRESULT CompositionDynamicAutomationProvider::Invoke() { + auto strongView = m_view.view(); + + if (!strongView) + return UIA_E_ELEMENTNOTAVAILABLE; + + auto baseView = std::static_pointer_cast<::Microsoft::ReactNative::CompositionBaseComponentView>(strongView); + if (baseView == nullptr) + return UIA_E_ELEMENTNOTAVAILABLE; + + // Currently calls both onAccessibilityTap and onClick. + // To match Paper behavior, onAccessibilityTap only called if onClick is not defined. + // Events dispatched for any control. + // To match Paper, Event should only dispatch for pressable controls without state. + baseView.get()->GetEventEmitter().get()->onAccessibilityTap(); + baseView.get()->GetEventEmitter().get()->onClick(); + + auto rootCV = strongView->rootComponentView(); + if (rootCV == nullptr) + return UIA_E_ELEMENTNOTAVAILABLE; + + auto uiaProvider = rootCV->EnsureUiaProvider(); + auto spProviderSimple = uiaProvider.try_as(); + if (spProviderSimple != nullptr) { + UiaRaiseAutomationEvent(spProviderSimple.get(), UIA_Invoke_InvokedEventId); + } + + return S_OK; +} + } // namespace winrt::Microsoft::ReactNative::implementation diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h index 15de37d0351..d2df813fa26 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h @@ -4,6 +4,7 @@ #include #include #include +#include namespace winrt::Microsoft::ReactNative::implementation { @@ -11,7 +12,8 @@ class CompositionDynamicAutomationProvider : public winrt::implements< CompositionDynamicAutomationProvider, IInspectable, IRawElementProviderFragment, - IRawElementProviderSimple> { + IRawElementProviderSimple, + IInvokeProvider> { public: CompositionDynamicAutomationProvider( const std::shared_ptr<::Microsoft::ReactNative::CompositionBaseComponentView> &componentView) noexcept; @@ -31,6 +33,9 @@ class CompositionDynamicAutomationProvider : public winrt::implements< virtual HRESULT __stdcall get_HostRawElementProvider(IRawElementProviderSimple **pRetVal) override; // virtual HRESULT __stdcall ShowContextMenu() noexcept override; + // inherited via IInvokeProvider + virtual HRESULT Invoke() override; + private: ::Microsoft::ReactNative::ReactTaggedView m_view; }; diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp index f0dd6e35880..4f3026c0651 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp @@ -65,6 +65,10 @@ HRESULT __stdcall CompositionRootAutomationProvider::get_HostRawElementProvider( return S_OK; } +HRESULT CompositionRootAutomationProvider::Invoke() { + return S_OK; +} + HRESULT __stdcall CompositionRootAutomationProvider::get_BoundingRectangle(UiaRect *pRetVal) { if (pRetVal == nullptr) return E_POINTER; diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h index 8ba2f23a4e4..cea671d65d4 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h @@ -4,6 +4,7 @@ #include #include #include +#include namespace winrt::Microsoft::ReactNative::implementation { struct CompositionRootView; @@ -14,6 +15,7 @@ class CompositionRootAutomationProvider : public winrt::implements< IRawElementProviderFragmentRoot, IRawElementProviderFragment, IRawElementProviderSimple, + IInvokeProvider, IRawElementProviderAdviseEvents> { public: // inherited via IRawElementProviderFragmentRoot @@ -35,6 +37,9 @@ class CompositionRootAutomationProvider : public winrt::implements< virtual HRESULT __stdcall GetPropertyValue(PROPERTYID propertyId, VARIANT *pRetVal) override; virtual HRESULT __stdcall get_HostRawElementProvider(IRawElementProviderSimple **pRetVal) override; + // inherited via IInvokeProvider + virtual HRESULT Invoke() override; + // IRawElementProviderAdviseEvents virtual HRESULT __stdcall AdviseEventAdded(EVENTID idEvent, SAFEARRAY *psaProperties) override; virtual HRESULT __stdcall AdviseEventRemoved(EVENTID idEvent, SAFEARRAY *psaProperties) override; diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/ViewEventEmitter.cpp b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/ViewEventEmitter.cpp index 9a845469a73..8810de247e1 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/ViewEventEmitter.cpp +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/ViewEventEmitter.cpp @@ -156,4 +156,9 @@ void ViewEventEmitter::onKeyDown(KeyboardEvent const &event) const { }); } +// [Windows] +void ViewEventEmitter::onClick() const { + dispatchEvent("topClick"); +} + } // namespace facebook::react diff --git a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/ViewEventEmitter.h b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/ViewEventEmitter.h index 59b7a74925f..04c0600c37d 100644 --- a/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/ViewEventEmitter.h +++ b/vnext/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/ViewEventEmitter.h @@ -57,6 +57,8 @@ class ViewEventEmitter : public TouchEventEmitter { void onKeyUp(KeyboardEvent const &event) const; // [Windows] void onKeyDown(KeyboardEvent const &event) const; // [Windows] + void onClick() const; // [Windows] + private: /* * Contains the most recent `frame` and a `mutex` protecting access to it. From e0779e498e5432f76e5348a2ff2e84c274e81499 Mon Sep 17 00:00:00 2001 From: Chiara Mooney <34109996+chiaramooney@users.noreply.github.com> Date: Tue, 11 Jul 2023 11:33:27 -0700 Subject: [PATCH 02/20] Change files --- ...ative-windows-8ece1df1-5ba8-4b14-8258-bdb6ccc9948b.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/react-native-windows-8ece1df1-5ba8-4b14-8258-bdb6ccc9948b.json diff --git a/change/react-native-windows-8ece1df1-5ba8-4b14-8258-bdb6ccc9948b.json b/change/react-native-windows-8ece1df1-5ba8-4b14-8258-bdb6ccc9948b.json new file mode 100644 index 00000000000..4b0815d71c7 --- /dev/null +++ b/change/react-native-windows-8ece1df1-5ba8-4b14-8258-bdb6ccc9948b.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Implement Invoke", + "packageName": "react-native-windows", + "email": "34109996+chiaramooney@users.noreply.github.com", + "dependentChangeType": "patch" +} From ddad53f3cb3fe9d4d40a01403ccdde09ef2aafb0 Mon Sep 17 00:00:00 2001 From: Chiara Mooney <34109996+chiaramooney@users.noreply.github.com> Date: Tue, 11 Jul 2023 12:01:33 -0700 Subject: [PATCH 03/20] Format --- .../Composition/CompositionDynamicAutomationProvider.cpp | 4 ++-- .../Fabric/Composition/CompositionDynamicAutomationProvider.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp index e7e42f1a577..9701780737c 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp @@ -284,7 +284,7 @@ HRESULT CompositionDynamicAutomationProvider::Invoke() { // Currently calls both onAccessibilityTap and onClick. // To match Paper behavior, onAccessibilityTap only called if onClick is not defined. - // Events dispatched for any control. + // Events dispatched for any control. // To match Paper, Event should only dispatch for pressable controls without state. baseView.get()->GetEventEmitter().get()->onAccessibilityTap(); baseView.get()->GetEventEmitter().get()->onClick(); @@ -298,7 +298,7 @@ HRESULT CompositionDynamicAutomationProvider::Invoke() { if (spProviderSimple != nullptr) { UiaRaiseAutomationEvent(spProviderSimple.get(), UIA_Invoke_InvokedEventId); } - + return S_OK; } diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h index d2df813fa26..a38ec703f01 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h @@ -35,7 +35,7 @@ class CompositionDynamicAutomationProvider : public winrt::implements< // inherited via IInvokeProvider virtual HRESULT Invoke() override; - + private: ::Microsoft::ReactNative::ReactTaggedView m_view; }; From da2dbbdb62c14d32fdbfe3dbe7ff9f9cd09c2cfd Mon Sep 17 00:00:00 2001 From: Chiara Mooney <34109996+chiaramooney@users.noreply.github.com> Date: Tue, 11 Jul 2023 13:58:52 -0700 Subject: [PATCH 04/20] Adjust Call --- .../Fabric/Composition/CompositionDynamicAutomationProvider.cpp | 2 +- .../Fabric/Composition/CompositionDynamicAutomationProvider.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp index 9701780737c..89596c8d93d 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp @@ -272,7 +272,7 @@ HRESULT __stdcall CompositionDynamicAutomationProvider::get_HostRawElementProvid return S_OK; } -HRESULT CompositionDynamicAutomationProvider::Invoke() { +HRESULT __stdcall CompositionDynamicAutomationProvider::Invoke() { auto strongView = m_view.view(); if (!strongView) diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h index a38ec703f01..6e800104c3e 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h @@ -34,7 +34,7 @@ class CompositionDynamicAutomationProvider : public winrt::implements< // virtual HRESULT __stdcall ShowContextMenu() noexcept override; // inherited via IInvokeProvider - virtual HRESULT Invoke() override; + virtual HRESULT __stdcall Invoke() override; private: ::Microsoft::ReactNative::ReactTaggedView m_view; From 50a5e900ec431c488b57c2bd9afbc416a0e3c3dd Mon Sep 17 00:00:00 2001 From: Chiara Mooney <34109996+chiaramooney@users.noreply.github.com> Date: Tue, 11 Jul 2023 14:21:49 -0700 Subject: [PATCH 05/20] Adjust Call --- .../Fabric/Composition/CompositionRootAutomationProvider.cpp | 2 +- .../Fabric/Composition/CompositionRootAutomationProvider.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp index 4f3026c0651..aeec603519c 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp @@ -65,7 +65,7 @@ HRESULT __stdcall CompositionRootAutomationProvider::get_HostRawElementProvider( return S_OK; } -HRESULT CompositionRootAutomationProvider::Invoke() { +HRESULT __stdcall CompositionRootAutomationProvider::Invoke() { return S_OK; } diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h index cea671d65d4..5134f71cb33 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h @@ -38,7 +38,7 @@ class CompositionRootAutomationProvider : public winrt::implements< virtual HRESULT __stdcall get_HostRawElementProvider(IRawElementProviderSimple **pRetVal) override; // inherited via IInvokeProvider - virtual HRESULT Invoke() override; + virtual HRESULT __stdcall Invoke() override; // IRawElementProviderAdviseEvents virtual HRESULT __stdcall AdviseEventAdded(EVENTID idEvent, SAFEARRAY *psaProperties) override; From e39a92d337d461e75566a2ba3c84eb0fa2b8dd31 Mon Sep 17 00:00:00 2001 From: Chiara Mooney <34109996+chiaramooney@users.noreply.github.com> Date: Thu, 13 Jul 2023 16:49:33 -0700 Subject: [PATCH 06/20] Address Feedback --- .../CompositionDynamicAutomationProvider.cpp | 27 +++++++++++++------ .../CompositionRootAutomationProvider.cpp | 4 --- .../CompositionRootAutomationProvider.h | 4 --- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp index 89596c8d93d..4f27bdb9d88 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp @@ -127,6 +127,23 @@ HRESULT __stdcall CompositionDynamicAutomationProvider::GetPatternProvider(PATTE if (pRetVal == nullptr) return E_POINTER; + auto strongView = m_view.view(); + if (strongView == nullptr) + return UIA_E_ELEMENTNOTAVAILABLE; + + auto props = std::static_pointer_cast(strongView->props()); + if (props == nullptr) + return UIA_E_ELEMENTNOTAVAILABLE; + auto accessibilityRole = props->accessibilityRole; + + // Invoke control pattern is used to support controls that do not maintain state + // when activated but rather initiate or perform a single, unambiguous action. + if (patternId == UIA_InvokePatternId && + accessibilityRole == "button" || + accessibilityRole == "imagebutton") { + return pRetVal = this; + } + *pRetVal = nullptr; return S_OK; @@ -284,16 +301,10 @@ HRESULT __stdcall CompositionDynamicAutomationProvider::Invoke() { // Currently calls both onAccessibilityTap and onClick. // To match Paper behavior, onAccessibilityTap only called if onClick is not defined. - // Events dispatched for any control. - // To match Paper, Event should only dispatch for pressable controls without state. baseView.get()->GetEventEmitter().get()->onAccessibilityTap(); baseView.get()->GetEventEmitter().get()->onClick(); - - auto rootCV = strongView->rootComponentView(); - if (rootCV == nullptr) - return UIA_E_ELEMENTNOTAVAILABLE; - - auto uiaProvider = rootCV->EnsureUiaProvider(); + + auto uiaProvider = baseView->EnsureUiaProvider(); auto spProviderSimple = uiaProvider.try_as(); if (spProviderSimple != nullptr) { UiaRaiseAutomationEvent(spProviderSimple.get(), UIA_Invoke_InvokedEventId); diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp index aeec603519c..f0dd6e35880 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp @@ -65,10 +65,6 @@ HRESULT __stdcall CompositionRootAutomationProvider::get_HostRawElementProvider( return S_OK; } -HRESULT __stdcall CompositionRootAutomationProvider::Invoke() { - return S_OK; -} - HRESULT __stdcall CompositionRootAutomationProvider::get_BoundingRectangle(UiaRect *pRetVal) { if (pRetVal == nullptr) return E_POINTER; diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h index 5134f71cb33..48474d1e772 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h @@ -15,7 +15,6 @@ class CompositionRootAutomationProvider : public winrt::implements< IRawElementProviderFragmentRoot, IRawElementProviderFragment, IRawElementProviderSimple, - IInvokeProvider, IRawElementProviderAdviseEvents> { public: // inherited via IRawElementProviderFragmentRoot @@ -37,9 +36,6 @@ class CompositionRootAutomationProvider : public winrt::implements< virtual HRESULT __stdcall GetPropertyValue(PROPERTYID propertyId, VARIANT *pRetVal) override; virtual HRESULT __stdcall get_HostRawElementProvider(IRawElementProviderSimple **pRetVal) override; - // inherited via IInvokeProvider - virtual HRESULT __stdcall Invoke() override; - // IRawElementProviderAdviseEvents virtual HRESULT __stdcall AdviseEventAdded(EVENTID idEvent, SAFEARRAY *psaProperties) override; virtual HRESULT __stdcall AdviseEventRemoved(EVENTID idEvent, SAFEARRAY *psaProperties) override; From 352b505c53af1066836849b33baca9e8a24e4c2a Mon Sep 17 00:00:00 2001 From: Chiara Mooney <34109996+chiaramooney@users.noreply.github.com> Date: Thu, 13 Jul 2023 16:59:31 -0700 Subject: [PATCH 07/20] Format --- .../CompositionDynamicAutomationProvider.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp index 4f27bdb9d88..541047e0a31 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp @@ -135,12 +135,10 @@ HRESULT __stdcall CompositionDynamicAutomationProvider::GetPatternProvider(PATTE if (props == nullptr) return UIA_E_ELEMENTNOTAVAILABLE; auto accessibilityRole = props->accessibilityRole; - - // Invoke control pattern is used to support controls that do not maintain state + + // Invoke control pattern is used to support controls that do not maintain state // when activated but rather initiate or perform a single, unambiguous action. - if (patternId == UIA_InvokePatternId && - accessibilityRole == "button" || - accessibilityRole == "imagebutton") { + if (patternId == UIA_InvokePatternId && accessibilityRole == "button" || accessibilityRole == "imagebutton") { return pRetVal = this; } @@ -303,7 +301,7 @@ HRESULT __stdcall CompositionDynamicAutomationProvider::Invoke() { // To match Paper behavior, onAccessibilityTap only called if onClick is not defined. baseView.get()->GetEventEmitter().get()->onAccessibilityTap(); baseView.get()->GetEventEmitter().get()->onClick(); - + auto uiaProvider = baseView->EnsureUiaProvider(); auto spProviderSimple = uiaProvider.try_as(); if (spProviderSimple != nullptr) { From 2c1bcc9772ef9a875419198b3bbde0b678f1ee9a Mon Sep 17 00:00:00 2001 From: Chiara Mooney <34109996+chiaramooney@users.noreply.github.com> Date: Fri, 14 Jul 2023 14:31:18 -0700 Subject: [PATCH 08/20] Fix --- .../Fabric/Composition/CompositionDynamicAutomationProvider.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp index 541047e0a31..4715b7f1ebd 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp @@ -139,7 +139,7 @@ HRESULT __stdcall CompositionDynamicAutomationProvider::GetPatternProvider(PATTE // Invoke control pattern is used to support controls that do not maintain state // when activated but rather initiate or perform a single, unambiguous action. if (patternId == UIA_InvokePatternId && accessibilityRole == "button" || accessibilityRole == "imagebutton") { - return pRetVal = this; + *pRetVal = reinterpret_cast<::IUnknown *>(this); } *pRetVal = nullptr; From 10b6a31917ce5ff293b262a90c065c63a6385b31 Mon Sep 17 00:00:00 2001 From: Chiara Mooney <34109996+chiaramooney@users.noreply.github.com> Date: Thu, 20 Jul 2023 10:54:09 -0700 Subject: [PATCH 09/20] Merge --- .ado/compliance.yml | 4 +- .ado/continuous.yml | 6 +- .ado/image/rnw-img-vs2022-node18.json | 66 ++ .ado/jobs/cli-init.yml | 6 + .ado/jobs/node-tests.yml | 2 +- .ado/publish.yml | 4 +- .ado/templates/prepare-js-env.yml | 2 +- .ado/windows-vs-pr.yml | 6 +- .cspell.json | 1 + .spelling | 114 +-- ...-9a018e15-0273-415e-959f-3e4be94e544c.json | 7 + ...-6ad43580-2e16-403a-b4f2-1238f29863b5.json | 7 + package.json | 1 + .../react-native-win32-tester/overrides.json | 4 +- .../react-native-win32-tester/package.json | 20 +- .../src/js/utils/RNTesterList.win32.js | 12 +- .../react-native-win32/.flowconfig | 5 +- .../react-native-win32/CHANGELOG.json | 54 ++ .../react-native-win32/CHANGELOG.md | 22 +- .../flow-typed/npm/ansi-regex_v5.x.x.js | 14 + .../react-native-win32/overrides.json | 20 +- .../react-native-win32/package.json | 31 +- .../Libraries/Components/View/View.win32.js | 6 - .../Components/View/ViewPropTypes.win32.js | 4 + .../NativeComponent/BaseViewConfig.win32.js | 14 + .../Pressability/Pressability.win32.js | 34 +- .../src/Libraries/Text/Text.win32.js | 9 - .../Utilities/AcessibilityMapping.win32.js | 156 ---- .../automation-channel/CHANGELOG.json | 99 +++ .../automation-channel/CHANGELOG.md | 46 +- .../automation-channel/package.json | 16 +- .../automation-commands/CHANGELOG.json | 99 +++ .../automation-commands/CHANGELOG.md | 46 +- .../automation-commands/package.json | 14 +- .../automation/CHANGELOG.json | 105 +++ .../automation/CHANGELOG.md | 47 +- .../automation/package.json | 16 +- .../automation/src/AutomationEnvironment.ts | 1 + .../@react-native-windows/cli/CHANGELOG.json | 78 ++ .../@react-native-windows/cli/CHANGELOG.md | 26 +- .../@react-native-windows/cli/package.json | 22 +- .../@react-native-windows/cli/src/codegen.ts | 4 +- .../cli/src/e2etest/healthChecks.test.ts | 4 +- .../cli/src/healthCheckList.ts | 2 +- .../codegen/CHANGELOG.json | 45 ++ .../codegen/CHANGELOG.md | 15 +- .../codegen/package.json | 16 +- .../codegen/src/generators/ObjectTypes.ts | 2 + .../codegen/src/generators/ParamTypes.ts | 2 + .../find-repo-root/CHANGELOG.json | 39 + .../find-repo-root/CHANGELOG.md | 14 +- .../find-repo-root/package.json | 14 +- .../@react-native-windows/fs/CHANGELOG.json | 33 + .../@react-native-windows/fs/CHANGELOG.md | 13 +- .../@react-native-windows/fs/package.json | 12 +- .../package-utils/CHANGELOG.json | 45 ++ .../package-utils/CHANGELOG.md | 15 +- .../package-utils/package.json | 16 +- .../telemetry/CHANGELOG.json | 45 ++ .../telemetry/CHANGELOG.md | 15 +- .../telemetry/package.json | 16 +- .../tester/overrides.json | 4 +- .../@react-native-windows/tester/package.json | 20 +- .../src/js/utils/RNTesterList.windows.js | 12 +- .../@react-native/monorepo/overrides.json | 4 +- packages/@react-native/monorepo/package.json | 6 +- .../tester/js/RNTesterAppShared.js | 9 + .../tester/js/components/RNTTestDetails.js | 9 +- .../PointerEventCaptureMouse.js | 44 +- .../IntersectionObserverBenchmark.js | 127 ++++ .../IntersectionObserverIndex.js | 25 + .../IntersectionObserverMDNExample.js | 149 ++++ .../PlatformColor/PlatformColorExample.js | 5 +- .../examples/ScrollView/ScrollViewExample.js | 3 + .../TurboModule/LegacyModuleExample.js | 29 + .../TurboModule/SampleLegacyModuleExample.js | 188 +++++ .../tester/js/utils/RNTesterList.android.js | 12 +- .../tester/js/utils/RNTesterList.ios.js | 16 +- packages/@react-native/tester/overrides.json | 25 +- packages/@react-native/tester/package.json | 2 +- .../babel-node-config/CHANGELOG.json | 15 + .../babel-node-config/CHANGELOG.md | 10 +- .../babel-node-config/babel.config.js | 2 +- .../babel-node-config/package.json | 6 +- .../babel-react-native-config/package.json | 2 +- .../beachball-config/package.json | 10 +- .../create-github-releases/CHANGELOG.json | 45 ++ .../create-github-releases/CHANGELOG.md | 15 +- .../create-github-releases/package.json | 16 +- .../@rnw-scripts/doxysaurus/CHANGELOG.json | 45 ++ packages/@rnw-scripts/doxysaurus/CHANGELOG.md | 15 +- packages/@rnw-scripts/doxysaurus/package.json | 16 +- .../@rnw-scripts/eslint-config/CHANGELOG.json | 15 + .../@rnw-scripts/eslint-config/CHANGELOG.md | 10 +- .../@rnw-scripts/eslint-config/package.json | 4 +- .../@rnw-scripts/format-files/CHANGELOG.json | 33 + .../@rnw-scripts/format-files/CHANGELOG.md | 13 +- .../@rnw-scripts/format-files/package.json | 12 +- .../@rnw-scripts/integrate-rn/CHANGELOG.json | 63 ++ .../@rnw-scripts/integrate-rn/CHANGELOG.md | 18 +- .../@rnw-scripts/integrate-rn/package.json | 22 +- .../jest-debug-config/CHANGELOG.json | 21 + .../jest-debug-config/CHANGELOG.md | 11 +- .../jest-debug-config/package.json | 6 +- .../jest-e2e-config/CHANGELOG.json | 21 + .../@rnw-scripts/jest-e2e-config/CHANGELOG.md | 11 +- .../@rnw-scripts/jest-e2e-config/package.json | 6 +- .../CHANGELOG.json | 21 + .../CHANGELOG.md | 11 +- .../package.json | 6 +- .../jest-out-of-tree-resolver/CHANGELOG.json | 21 + .../jest-out-of-tree-resolver/CHANGELOG.md | 11 +- .../jest-out-of-tree-resolver/package.json | 6 +- .../jest-unittest-config/CHANGELOG.json | 21 + .../jest-unittest-config/CHANGELOG.md | 11 +- .../jest-unittest-config/package.json | 6 +- .../@rnw-scripts/just-task/CHANGELOG.json | 27 + packages/@rnw-scripts/just-task/CHANGELOG.md | 12 +- packages/@rnw-scripts/just-task/package.json | 10 +- .../metro-dev-config/package.json | 4 +- .../promote-release/CHANGELOG.json | 51 ++ .../@rnw-scripts/promote-release/CHANGELOG.md | 16 +- .../@rnw-scripts/promote-release/package.json | 18 +- .../@rnw-scripts/stamp-version/package.json | 14 +- .../take-screenshot/CHANGELOG.json | 39 + .../@rnw-scripts/take-screenshot/CHANGELOG.md | 14 +- .../@rnw-scripts/take-screenshot/package.json | 14 +- .../@rnw-scripts/ts-config/CHANGELOG.json | 15 + packages/@rnw-scripts/ts-config/CHANGELOG.md | 10 +- packages/@rnw-scripts/ts-config/package.json | 4 +- packages/debug-test/package.json | 6 +- packages/e2e-test-app-fabric/package.json | 22 +- packages/e2e-test-app/package.json | 22 +- .../windows/RNTesterApp/packages.lock.json | 6 +- packages/integration-test-app/package.json | 20 +- packages/playground/package.json | 14 +- .../CHANGELOG.json | 51 ++ .../CHANGELOG.md | 16 +- .../package.json | 18 +- .../react-native-windows-init/CHANGELOG.json | 72 ++ .../react-native-windows-init/CHANGELOG.md | 25 +- .../react-native-windows-init/package.json | 20 +- packages/sample-apps/package.json | 14 +- .../windows/SampleAppCS/packages.lock.json | 34 +- .../SampleLibraryCS/packages.lock.json | 10 +- vnext/.flowconfig | 5 +- vnext/CHANGELOG.json | 111 +++ vnext/CHANGELOG.md | 48 +- .../packages.lock.json | 17 +- .../Base/CoreNativeModules.cpp | 44 -- .../Base/CoreNativeModules.h | 30 - .../ActivityIndicatorComponentView.cpp | 4 + .../ActivityIndicatorComponentView.h | 1 + .../CompositionViewComponentView.h | 3 + .../Fabric/Composition/ImageComponentView.cpp | 4 + .../Fabric/Composition/ImageComponentView.h | 1 + .../Composition/ParagraphComponentView.cpp | 4 + .../Composition/ParagraphComponentView.h | 1 + .../Composition/ScrollViewComponentView.cpp | 4 + .../Composition/ScrollViewComponentView.h | 1 + .../Composition/SwitchComponentView.cpp | 4 + .../Fabric/Composition/SwitchComponentView.h | 1 + .../WindowsTextInputComponentView.cpp | 4 + .../TextInput/WindowsTextInputComponentView.h | 1 + .../Fabric/FabricUIManagerModule.cpp | 2 +- .../Fabric/ImageRequest.cpp | 18 +- .../Fabric/WindowsImageManager.cpp | 2 +- .../view/windows/WindowsViewProps.cpp | 2 +- .../Microsoft.ReactNative.vcxproj | 4 +- .../Microsoft.ReactNative.vcxproj.filters | 7 - .../ReactHost/ReactInstanceWin.cpp | 21 +- .../Generated/PackageVersion.g.props | 4 +- .../components/view/TouchEventEmitter.cpp | 16 + .../components/view/TouchEventEmitter.h | 2 + .../renderer/components/view/ViewProps.cpp | 2 +- .../components/view/ViewShadowNode.cpp | 2 +- .../components/view/YogaStylableProps.cpp | 2 +- .../renderer/components/view/primitives.h | 6 +- vnext/Scripts/rnw-dependencies.ps1 | 4 +- vnext/Shared/CreateModules.h | 32 +- vnext/Shared/HermesRuntimeHolder.cpp | 10 +- vnext/Shared/Modules/BlobModule.cpp | 13 + vnext/Shared/Modules/FileReaderModule.cpp | 53 +- vnext/Shared/Modules/HttpModule.cpp | 12 + vnext/Shared/Modules/WebSocketModule.cpp | 12 + .../Shared/Networking/DefaultBlobResource.cpp | 4 +- vnext/Shared/Shared.vcxitems | 2 +- .../NativeIntersectionObserverSpec.g.h | 85 +++ vnext/codegen/rnwcoreJSI-generated.cpp | 42 ++ vnext/codegen/rnwcoreJSI.h | 203 ++++++ vnext/flow-typed/npm/ansi-regex_v5.x.x.js | 14 + vnext/overrides.json | 32 +- vnext/package.json | 35 +- .../Components/TextInput/TextInput.windows.js | 2 +- .../Libraries/Components/View/View.windows.js | 8 +- .../Components/View/ViewPropTypes.windows.js | 4 + .../NativeComponent/BaseViewConfig.windows.js | 14 + vnext/src/Libraries/Text/Text.windows.js | 12 - .../Utilities/AcessibilityMapping.windows.js | 154 ---- yarn.lock | 673 +++++++++--------- 200 files changed, 3937 insertions(+), 1338 deletions(-) create mode 100644 .ado/image/rnw-img-vs2022-node18.json create mode 100644 change/@react-native-windows-cli-9a018e15-0273-415e-959f-3e4be94e544c.json create mode 100644 change/react-native-windows-6ad43580-2e16-403a-b4f2-1238f29863b5.json create mode 100644 packages/@office-iss/react-native-win32/flow-typed/npm/ansi-regex_v5.x.x.js delete mode 100644 packages/@office-iss/react-native-win32/src/Libraries/Utilities/AcessibilityMapping.win32.js create mode 100644 packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverBenchmark.js create mode 100644 packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverIndex.js create mode 100644 packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverMDNExample.js create mode 100644 packages/@react-native/tester/js/examples/TurboModule/LegacyModuleExample.js create mode 100644 packages/@react-native/tester/js/examples/TurboModule/SampleLegacyModuleExample.js delete mode 100644 vnext/Microsoft.ReactNative/Base/CoreNativeModules.cpp delete mode 100644 vnext/Microsoft.ReactNative/Base/CoreNativeModules.h create mode 100644 vnext/codegen/NativeIntersectionObserverSpec.g.h create mode 100644 vnext/flow-typed/npm/ansi-regex_v5.x.x.js delete mode 100644 vnext/src/Libraries/Utilities/AcessibilityMapping.windows.js diff --git a/.ado/compliance.yml b/.ado/compliance.yml index f6f80e27130..3831667368b 100644 --- a/.ado/compliance.yml +++ b/.ado/compliance.yml @@ -6,10 +6,10 @@ parameters: default: Medium: name: rnw-pool-4-microsoft - demands: ImageOverride -equals rnw-img-vs2022 + demands: ImageOverride -equals rnw-img-vs2022-node18 Large: name: rnw-pool-8-microsoft - demands: ImageOverride -equals rnw-img-vs2022 + demands: ImageOverride -equals rnw-img-vs2022-node18 - name: forceCodeQL displayName: Force CodeQL to rebuild databases type: boolean diff --git a/.ado/continuous.yml b/.ado/continuous.yml index c5b97e77de9..9d916c4ddf9 100644 --- a/.ado/continuous.yml +++ b/.ado/continuous.yml @@ -13,13 +13,13 @@ parameters: default: Small: name: rnw-pool-2 - demands: ImageOverride -equals rnw-img-vs2022 + demands: ImageOverride -equals rnw-img-vs2022-node18 Medium: name: rnw-pool-4 - demands: ImageOverride -equals rnw-img-vs2022 + demands: ImageOverride -equals rnw-img-vs2022-node18 Large: name: rnw-pool-8 - demands: ImageOverride -equals rnw-img-vs2022 + demands: ImageOverride -equals rnw-img-vs2022-node18 stages: - template: stages.yml diff --git a/.ado/image/rnw-img-vs2022-node18.json b/.ado/image/rnw-img-vs2022-node18.json new file mode 100644 index 00000000000..8901268d8f0 --- /dev/null +++ b/.ado/image/rnw-img-vs2022-node18.json @@ -0,0 +1,66 @@ +{ + "imageType": "Managed", + "baseImage": "/MicrosoftWindowsServer/WindowsServer/2022-datacenter/latest", + "artifacts": [ + { + "name": "windows-EnableDeveloperMode" + }, + { + "name": "windows-enable-long-paths" + }, + { + "name": "windows-gitinstall" + }, + { + "name": "windows-AzPipeline-ImageHelpers" + }, + { + "name": "windows-AzPipeline-InitializeVM" + }, + { + "name": "windows-AzPipeline-powershellCore" + }, + { + "name": "windows-AzPipeline-7zip" + }, + { + "name": "windows-visualstudio-bootstrapper", + "parameters": { + "Workloads": "--add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.Universal --add Microsoft.Component.MSBuild --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.ComponentGroup.UWP.Support --add Microsoft.VisualStudio.ComponentGroup.NativeDesktop.Core --add Microsoft.VisualStudio.Component.Windows10SDK.19041 --add Microsoft.VisualStudio.ComponentGroup.UWP.VC --includeRecommended --includeOptional", + "SKU": "Enterprise", + "VSBootstrapperURL": "https://aka.ms/vs/17/release/vs_Enterprise.exe" + } + }, + { + "name": "Windows-NodeJS", + "parameters": { + "Version": "18.16.1" + } + }, + { + "name": "windows-npm-global", + "parameters": { + "packages": "yarn@1.22.19, midgard-yarn@1.23.34, verdaccio@5.2.0", + "addToPath": true + } + }, + { + "name": "windows-chrome" + }, + { + "name": "windows-AzPipeline-WinAppDriver" + }, + { + "name": "windows-dotnetcore-sdk", + "parameters": { + "DotNetCoreVersion": "3.1.425" + } + }, + { + "name": "windows-dotnetcore-sdk", + "parameters": { + "DotNetCoreVersion": "6.0.403" + } + } + ] +} \ No newline at end of file diff --git a/.ado/jobs/cli-init.yml b/.ado/jobs/cli-init.yml index 18059042883..9b62fccc2ba 100644 --- a/.ado/jobs/cli-init.yml +++ b/.ado/jobs/cli-init.yml @@ -344,6 +344,12 @@ jobs: configuration: ${{ parameters.configuration }} buildEnvironment: ${{ parameters.buildEnvironment }} + - task: CmdLine@2 + displayName: Create npm directory + name: createNpmDirectory + inputs: + script: mkdir %APPDATA%\npm + - template: ../templates/react-native-init.yml parameters: language: ${{ matrix.language }} diff --git a/.ado/jobs/node-tests.yml b/.ado/jobs/node-tests.yml index 7a9f0878c6f..38fc59b9e83 100644 --- a/.ado/jobs/node-tests.yml +++ b/.ado/jobs/node-tests.yml @@ -11,7 +11,7 @@ parameters: - name: versions type: object - default: [16] + default: [18] jobs: - ${{ each nodeVersion in parameters.versions }}: diff --git a/.ado/publish.yml b/.ado/publish.yml index 6995a33fd19..ce3b07e2156 100644 --- a/.ado/publish.yml +++ b/.ado/publish.yml @@ -18,10 +18,10 @@ parameters: default: Medium: name: rnw-pool-4-microsoft - demands: ImageOverride -equals rnw-img-vs2022 + demands: ImageOverride -equals rnw-img-vs2022-node18 Large: name: rnw-pool-8-microsoft - demands: ImageOverride -equals rnw-img-vs2022 + demands: ImageOverride -equals rnw-img-vs2022-node18 - name: desktopBuildMatrix type: object diff --git a/.ado/templates/prepare-js-env.yml b/.ado/templates/prepare-js-env.yml index 8c8a706926d..46dd12a4cf4 100644 --- a/.ado/templates/prepare-js-env.yml +++ b/.ado/templates/prepare-js-env.yml @@ -11,7 +11,7 @@ steps: - task: NodeTool@0 displayName: Set Node Version inputs: - versionSpec: '16.x' + versionSpec: '18.x' - template: yarn-install.yml parameters: diff --git a/.ado/windows-vs-pr.yml b/.ado/windows-vs-pr.yml index faf6c2e09ed..d4ba949f7a7 100644 --- a/.ado/windows-vs-pr.yml +++ b/.ado/windows-vs-pr.yml @@ -16,13 +16,13 @@ parameters: default: Small: name: rnw-pool-2 - demands: ImageOverride -equals rnw-img-vs2022 + demands: ImageOverride -equals rnw-img-vs2022-node18 Medium: name: rnw-pool-4 - demands: ImageOverride -equals rnw-img-vs2022 + demands: ImageOverride -equals rnw-img-vs2022-node18 Large: name: rnw-pool-8 - demands: ImageOverride -equals rnw-img-vs2022 + demands: ImageOverride -equals rnw-img-vs2022-node18 stages: - template: stages.yml diff --git a/.cspell.json b/.cspell.json index 47e77ef511b..93329a1e3f5 100644 --- a/.cspell.json +++ b/.cspell.json @@ -12,6 +12,7 @@ "dictionaries": ["project-words"], "files": ["**/*.{cpp,h,idl,cs,js,jsx,ts,tsx}"], "ignorePaths": [ + "**/flow-typed/npm", "node_modules", "packages/@office-iss/react-native-win32-tester", "packages/@react-native/tester", diff --git a/.spelling b/.spelling index 145afe57e82..fe94c2e6c75 100644 --- a/.spelling +++ b/.spelling @@ -20,7 +20,6 @@ APPMODEL appxrecipe APSTUDIO argsstring -arraybuffer ARRAYISLOCKED ARRAYSIZE ARRAYVIEW @@ -39,7 +38,7 @@ AUTORESTORE autoscroll autotoc backcompat -backface +Backface backswipe BADIMAGE BADINDEX @@ -55,8 +54,7 @@ binlog birthdate bitflags BITMAPSOURCE -blackbox -Borderless +borderless BREAKONNEXTLINE Bridgeless briefdescription @@ -64,14 +62,15 @@ Bstr BSTR's callbackstate callsites -Callstack +callstack cameraroll +cancelation CANCELLATIONERRORPROVIDER CANCELLATIONEXCEPTION CANCELLATIONTOKEN -Canthrow +canthrow cdebug -Chakra +chakra CHAKRACORE chakrart CHARFORMAT @@ -87,7 +86,7 @@ CLASSNOTAVAILABLE CLASSSTRING CLRCALL CLSCTX -CLSID +clsid cmdline CNTPTR Cntr @@ -121,7 +120,7 @@ cplus CPPEXTENSIONS CPPMACROS CPPMACROSDEBUG -cppwinrt +CPPWINRT CPPWINRTLESSEXCEPTIONS cpuprofile CREATESTRUCT @@ -144,13 +143,14 @@ DEBUGGERPORTLABEL DEBUGTEST declname DECLSPECDEFINITIONS -DECLSPECS +declspecs deduped defval denodeify +describedby detaileddescription devmenu -devserver +DEVSERVER devsettings DFACE dialogbox @@ -168,7 +168,7 @@ DQTYPE drawerlayout DSIMPLETYPOGRAPHY dvalue -DWRITE +dwrite dwxs dxgi dynamiclibrary @@ -182,6 +182,7 @@ emsp ENDCOMPOSITION Endish endregion +ENOWORKSPACES ensp envinfo ERRORCODE @@ -206,7 +207,7 @@ FASTREFRESH fauxbutton fbjs FBJSCEXTENSIONS -fbsystrace +FBSYSTRACE FILELINE FILELINECORE FILELINEPARAMS @@ -227,7 +228,6 @@ flowconfig flowlint flyoutbase flyouts -Focusability FOLDERID foos fpermissive @@ -247,20 +247,20 @@ FUTUREWEAKPTRINL FUTUREWINRT Gamepad GAUSSIANBLUR -Genericfunctype +genericfunctype geosample GETCURSEL getnpm GETOBJECT Glog -GTEST +gtest GTESTADAPTER guiddef -guids +Guids HACCEL Hanja hannesr -Hasher +hasher HBCB HBCBUNDLES HBITMAP @@ -271,7 +271,7 @@ HCURSOR healthcheck healthchecks hglobal -himc +HIMC HIMETRIC HINSTANCE hittesting @@ -288,8 +288,8 @@ hrgn HRSRC hruler hstr -HSTRING -Hwnd +Hstring +hwnd HWNDs ICONERROR iconmenu @@ -306,16 +306,16 @@ ILLUSTATION imagebutton imws INITDIALOG -inited +Inited INITFIRST -INITFN initialhost innerstroke inputmode -inspectable +Inspectable integrationtest inttests INVALIDARG +INVALIDOPERATION invalidpackage istarts itemizedlist @@ -346,7 +346,6 @@ JSIAPI JSIVALUE JSIVALUECONVERSION JSIVALUEHELPERS -jsproperty JSRT JSVALUE JSVALUEREADER @@ -355,7 +354,6 @@ JSVALUETREEWRITER JSVALUEWRITER JSVALUEXAML Junja -Keyboardable keyboardkey keypressed KILLFOCUS @@ -370,7 +368,7 @@ LBUTTONUP LCMAP LCONTROL lessthrow -Liblet +LIBLET LIBLETAWAREMEMLEAKDETECTION Liblets linebreak @@ -390,7 +388,7 @@ logmarker LONGLIVEDJSIVALUE longpress LOWORD -LPARAM +lparam LPCOLESTR LPCREATESTRUCT LPCRECT @@ -418,7 +416,7 @@ maybenull mayterminate maythrow memberdef -Memberinitializer +memberinitializer MEMBERNOTFOUND MEMORYAPI MEMORYLEAKSCOPE @@ -461,11 +459,11 @@ myarn MYMODULE myscheme Nametable -Napi +NAPI nativeid NCCREATE ndash -needsreview +Needsreview nesw netcore netinfo @@ -473,13 +471,12 @@ newtarget Newtonsoft newwer NEWWINDOW -NODEAPIJSIRUNTIME nodecl nodoc noexcept NOGDI -NOHEAP -Noinference +Noheap +noinference NOINTERFACE nologo NOMINMAX @@ -488,9 +485,10 @@ nonexcept nonswappable Norefcapture NOREFCOUNT +NOREG nostack -nothrowfunctype -Notrunccast +Nothrowfunctype +notrunccast nowarn NTAPI ntdll @@ -501,10 +499,10 @@ nullchar nullchars nullptrs NULLT -NULLTERMINATED +Nullterminated nullthrows Numpad -oacr +OACR OBJECTREFCOUNT Objectthese OBJECTWITHWEAKREF @@ -514,7 +512,6 @@ Onstart OPENJSBUNDLEBOX OPENJSFILE orderedlist -outerborder's Outputdir overconsumption OVERLAPPEDWINDOW @@ -532,11 +529,11 @@ paramref pathgeo PATTERNID PBGRA +PBYTE PCLDR PCUNICODE PCWSTR -Perfing -permessage +perfing persistor PFNREGISTER phonesdk @@ -556,12 +553,13 @@ POINTERUP politefocus polyfils popd +posinset postbump predeclared prefast Pressability Pressable -Pressables +pressables pressevent PROCESSENTRY PROGRAMFILES @@ -638,7 +636,7 @@ RMENU rncli rncodegen rnhost -RNTESTER +rntester rntypes RNWCLI rnwcore @@ -659,7 +657,7 @@ RWIN SAFEADD SAFEARRAY safelist -safelisted +Safelisted scaledviewport scandir scheduletime @@ -681,6 +679,7 @@ SETEVENTMASK SETFOCUS SETLIMITTEXT SETSEL +setsize SETTEXTEX SETTINGSBOX sharedfolder @@ -713,7 +712,7 @@ sslv staticlibrary staticness staticsig -statsbeat +Statsbeat STATSTG STDAPI STDMETHOD @@ -729,15 +728,16 @@ STRUCTINFO subchannel subchannels subfiles +subheadline sublocality Subview -subviews +Subviews superview superviews svgz swipeable SYMED -Synclambda +synclambda SYSCHAR SYSKEYDOWN SYSKEYUP @@ -756,7 +756,7 @@ testfolder TESTINFO TESTMETHOD TESTWINRT -textbox +Textbox textelement textinput THEMECHANGED @@ -772,13 +772,13 @@ togglebutton toggleswitches Toolhelp touchableopacity -touchables +Touchables touchablewithoutfeedback -TOUCHPAD +Touchpad TRACELOGGING treegrid treeitem -turbomodule +TURBOMODULE turbomodules twips TXTBACK @@ -794,6 +794,7 @@ uielement uimanager ULARGE ulink +unaccess underlaying Unfocuses ungenerated @@ -801,13 +802,14 @@ unhighlight unhighlighting Uninit uninited -uninitialize +Uninitialize unitest universalwindowsplatform UNKNOWNNAME UNKNOWNOBJECT unmangled unmocked +unobserve unpackaged unparented Unstored @@ -834,6 +836,7 @@ vscprintf vstest vstools VSTS +VSUWP vswhere waitfor wakey @@ -848,7 +851,7 @@ WDIO WEAKPTR WEAKREFCOUNT weakthis -WEBDEBUGGER +webdebugger webdriverio webhosthidden Wexceptions @@ -876,10 +879,10 @@ WININET winmd Winmdexp winmdobj -WINRT +winrt winrtcpp wintest -WINUI +winui WINUSERAPI wkthis wname @@ -891,6 +894,7 @@ writeargs WRITEFAULT Wshorten wsje +wstring wtoi Wunused xapp diff --git a/change/@react-native-windows-cli-9a018e15-0273-415e-959f-3e4be94e544c.json b/change/@react-native-windows-cli-9a018e15-0273-415e-959f-3e4be94e544c.json new file mode 100644 index 00000000000..3cc08ed4ae1 --- /dev/null +++ b/change/@react-native-windows-cli-9a018e15-0273-415e-959f-3e4be94e544c.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Spellcheck update 7/11/2023", + "packageName": "@react-native-windows/cli", + "email": "jthysell@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/react-native-windows-6ad43580-2e16-403a-b4f2-1238f29863b5.json b/change/react-native-windows-6ad43580-2e16-403a-b4f2-1238f29863b5.json new file mode 100644 index 00000000000..e7dd1dcdda3 --- /dev/null +++ b/change/react-native-windows-6ad43580-2e16-403a-b4f2-1238f29863b5.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Spellcheck update 7/11/2023", + "packageName": "react-native-windows", + "email": "jthysell@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/package.json b/package.json index 80482e5b9b5..8db772a1dda 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "format": "format-files -i -style=file -assume-filename=../.clang-format", "format:verify": "format-files -i -style=file -verify", "postinstall": "yarn build", + "spellcheck": "npx cspell", "test": "lage test --verbose", "validate-overrides": "react-native-platform-override validate" }, diff --git a/packages/@office-iss/react-native-win32-tester/overrides.json b/packages/@office-iss/react-native-win32-tester/overrides.json index e0184c1e0bf..bdf6e5a4bd6 100644 --- a/packages/@office-iss/react-native-win32-tester/overrides.json +++ b/packages/@office-iss/react-native-win32-tester/overrides.json @@ -5,7 +5,7 @@ "excludePatterns": [ "src/js/examples-win32/**" ], - "baseVersion": "0.73.0-nightly-20230616-5f8bbf2bd", + "baseVersion": "0.73.0-nightly-20230628-15d735b35", "overrides": [ { "type": "patch", @@ -49,7 +49,7 @@ "type": "derived", "file": "src/js/utils/RNTesterList.win32.js", "baseFile": "packages/rn-tester/js/utils/RNTesterList.android.js", - "baseHash": "8954573b49f8321edea6bd2bdddf814ba2a7226c" + "baseHash": "2d587ef1fb464f6655d7c1c6a2ca235db5aa9288" } ] } \ No newline at end of file diff --git a/packages/@office-iss/react-native-win32-tester/package.json b/packages/@office-iss/react-native-win32-tester/package.json index 0d5fce0beea..44731d9c069 100644 --- a/packages/@office-iss/react-native-win32-tester/package.json +++ b/packages/@office-iss/react-native-win32-tester/package.json @@ -17,24 +17,24 @@ "flow-enums-runtime": "^0.0.5" }, "peerDependencies": { - "@office-iss/react-native-win32": "^0.0.0-canary.204", + "@office-iss/react-native-win32": "^0.0.0-canary.206", "react": "18.0.0", - "react-native": "0.73.0-nightly-20230616-5f8bbf2bd" + "react-native": "0.73.0-nightly-20230628-15d735b35" }, "devDependencies": { - "@office-iss/react-native-win32": "^0.0.0-canary.204", + "@office-iss/react-native-win32": "^0.0.0-canary.206", "@rnw-scripts/babel-react-native-config": "0.0.0", - "@rnw-scripts/eslint-config": "1.2.1", - "@rnw-scripts/just-task": "2.3.12", - "@rnw-scripts/ts-config": "2.0.4", - "@types/node": "^16.0.0", + "@rnw-scripts/eslint-config": "1.2.2", + "@rnw-scripts/just-task": "2.3.13", + "@rnw-scripts/ts-config": "2.0.5", + "@types/node": "^18.0.0", "eslint": "^8.19.0", "just-scripts": "^1.3.3", - "react-native": "0.73.0-nightly-20230616-5f8bbf2bd", - "react-native-platform-override": "^1.9.11", + "react-native": "0.73.0-nightly-20230628-15d735b35", + "react-native-platform-override": "^1.9.12", "typescript": "^4.9.5" }, "engines": { - "node": ">= 16" + "node": ">= 18" } } diff --git a/packages/@office-iss/react-native-win32-tester/src/js/utils/RNTesterList.win32.js b/packages/@office-iss/react-native-win32-tester/src/js/utils/RNTesterList.win32.js index 6371c414608..e26195607c8 100644 --- a/packages/@office-iss/react-native-win32-tester/src/js/utils/RNTesterList.win32.js +++ b/packages/@office-iss/react-native-win32-tester/src/js/utils/RNTesterList.win32.js @@ -143,7 +143,7 @@ const Components: Array = [ }, ]; -const APIs: Array = [ +const APIs: Array = ([ { key: 'AccessibilityExample', category: 'Basic', @@ -198,6 +198,14 @@ const APIs: Array = [ category: 'UI', module: require('../examples/Dimensions/DimensionsExample'), }, + // Only show the link for the example if the API is available. + typeof IntersectionObserver === 'function' + ? { + key: 'IntersectionObserver', + category: 'UI', + module: require('../examples/IntersectionObserver/IntersectionObserverIndex'), + } + : null, { key: 'InvalidPropsExample', module: require('../examples/InvalidProps/InvalidPropsExample'), @@ -294,7 +302,7 @@ const APIs: Array = [ category: 'Basic', module: require('../examples/Performance/PerformanceApiExample'), }, -]; +]: Array).filter(Boolean); if (ReactNativeFeatureFlags.shouldEmitW3CPointerEvents()) { APIs.push({ diff --git a/packages/@office-iss/react-native-win32/.flowconfig b/packages/@office-iss/react-native-win32/.flowconfig index b66e272a7a0..fab09aa758b 100644 --- a/packages/@office-iss/react-native-win32/.flowconfig +++ b/packages/@office-iss/react-native-win32/.flowconfig @@ -88,6 +88,9 @@ flow-typed/ [options] enums=true +conditional_type=true +mapped_type=true +type_guards=true emoji=true @@ -137,4 +140,4 @@ untyped-import untyped-type-import [version] -^0.209.0 +^0.210.1 diff --git a/packages/@office-iss/react-native-win32/CHANGELOG.json b/packages/@office-iss/react-native-win32/CHANGELOG.json index eb2ca9224ea..9627078d71e 100644 --- a/packages/@office-iss/react-native-win32/CHANGELOG.json +++ b/packages/@office-iss/react-native-win32/CHANGELOG.json @@ -1,6 +1,60 @@ { "name": "@office-iss/react-native-win32", "entries": [ + { + "date": "Tue, 18 Jul 2023 05:13:38 GMT", + "tag": "@office-iss/react-native-win32_v0.0.0-canary.206", + "version": "0.0.0-canary.206", + "comments": { + "prerelease": [ + { + "author": "email not defined", + "package": "@office-iss/react-native-win32", + "commit": "00d22425fbb6096003fd68550b821be712baac4d", + "comment": "add isDefaultButton check to win32" + } + ] + } + }, + { + "date": "Fri, 14 Jul 2023 05:17:04 GMT", + "tag": "@office-iss/react-native-win32_v0.0.0-canary.205", + "version": "0.0.0-canary.205", + "comments": { + "prerelease": [ + { + "author": "tatianakapos@microsoft.com", + "package": "@office-iss/react-native-win32", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844", + "comment": "integration 6/28" + }, + { + "author": "beachball", + "package": "@office-iss/react-native-win32", + "comment": "Bump @rnw-scripts/eslint-config to v1.2.2", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@office-iss/react-native-win32", + "comment": "Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.5", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@office-iss/react-native-win32", + "comment": "Bump @rnw-scripts/just-task to v2.3.13", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@office-iss/react-native-win32", + "comment": "Bump react-native-platform-override to v1.9.12", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + } + ] + } + }, { "date": "Sat, 01 Jul 2023 05:14:41 GMT", "tag": "@office-iss/react-native-win32_v0.0.0-canary.204", diff --git a/packages/@office-iss/react-native-win32/CHANGELOG.md b/packages/@office-iss/react-native-win32/CHANGELOG.md index 08fa0d93ba4..42c4b2cf878 100644 --- a/packages/@office-iss/react-native-win32/CHANGELOG.md +++ b/packages/@office-iss/react-native-win32/CHANGELOG.md @@ -1,9 +1,29 @@ # Change Log - @office-iss/react-native-win32 -This log was last generated on Sat, 01 Jul 2023 05:14:41 GMT and should not be manually modified. +This log was last generated on Tue, 18 Jul 2023 05:13:38 GMT and should not be manually modified. +## 0.0.0-canary.206 + +Tue, 18 Jul 2023 05:13:38 GMT + +### Changes + +- add isDefaultButton check to win32 (email not defined) + +## 0.0.0-canary.205 + +Fri, 14 Jul 2023 05:17:04 GMT + +### Changes + +- integration 6/28 (tatianakapos@microsoft.com) +- Bump @rnw-scripts/eslint-config to v1.2.2 +- Bump @rnw-scripts/jest-out-of-tree-snapshot-resolver to v1.1.5 +- Bump @rnw-scripts/just-task to v2.3.13 +- Bump react-native-platform-override to v1.9.12 + ## 0.0.0-canary.204 Sat, 01 Jul 2023 05:14:41 GMT diff --git a/packages/@office-iss/react-native-win32/flow-typed/npm/ansi-regex_v5.x.x.js b/packages/@office-iss/react-native-win32/flow-typed/npm/ansi-regex_v5.x.x.js new file mode 100644 index 00000000000..150902f4a12 --- /dev/null +++ b/packages/@office-iss/react-native-win32/flow-typed/npm/ansi-regex_v5.x.x.js @@ -0,0 +1,14 @@ +/** + * @flow strict + * @format + */ + +declare module 'ansi-regex' { + declare export type Options = { + /** + * Match only the first ANSI escape. + */ + +onlyFirst?: boolean, + }; + declare export default function ansiRegex(options?: Options): RegExp; +} diff --git a/packages/@office-iss/react-native-win32/overrides.json b/packages/@office-iss/react-native-win32/overrides.json index d475c4d9a3f..6733f0584b7 100644 --- a/packages/@office-iss/react-native-win32/overrides.json +++ b/packages/@office-iss/react-native-win32/overrides.json @@ -7,19 +7,19 @@ "**/__snapshots__/**", "src/rntypes/**" ], - "baseVersion": "0.73.0-nightly-20230616-5f8bbf2bd", + "baseVersion": "0.73.0-nightly-20230628-15d735b35", "overrides": [ { "type": "derived", "file": ".flowconfig", "baseFile": ".flowconfig", - "baseHash": "8001e96c33f9678b48367e1c63939558ce4520b6" + "baseHash": "c7a5a5089f3ad1380a829c54a990678ec648aabf" }, { "type": "copy", "directory": "flow-typed/npm", "baseDirectory": "flow-typed/npm", - "baseHash": "f25f5ecc4f5943b531295f4b5b8512b575ae6eb6" + "baseHash": "6a1a9c8b3e66d76ad6090885e488b4eed3d9ce14" }, { "type": "derived", @@ -189,7 +189,7 @@ "type": "patch", "file": "src/Libraries/Components/View/View.win32.js", "baseFile": "packages/react-native/Libraries/Components/View/View.js", - "baseHash": "a5ff7c1a8aeb920613c2e39aa00278af7902cfed" + "baseHash": "e5f834b15f3c739957547f627f50d14b607c3c5e" }, { "type": "derived", @@ -213,7 +213,7 @@ "type": "patch", "file": "src/Libraries/Components/View/ViewPropTypes.win32.js", "baseFile": "packages/react-native/Libraries/Components/View/ViewPropTypes.js", - "baseHash": "f876c5954f1ab6471fec28f146f4aff61442dd15", + "baseHash": "5e50a36c5237626489342999f3b08b0c124a4580", "issue": 6240 }, { @@ -342,7 +342,7 @@ "type": "derived", "file": "src/Libraries/NativeComponent/BaseViewConfig.win32.js", "baseFile": "packages/react-native/Libraries/NativeComponent/BaseViewConfig.ios.js", - "baseHash": "543595671ac827300ab6c501a43a2e9b7d870faa" + "baseHash": "28b8ac1c3e3ee9fc79772baf8503644988e12645" }, { "type": "derived", @@ -431,7 +431,7 @@ "type": "derived", "file": "src/Libraries/Text/Text.win32.js", "baseFile": "packages/react-native/Libraries/Text/Text.js", - "baseHash": "6aa0c6611ba260bf235610429481a638e61e5279" + "baseHash": "dfec8a4812c7bb0ab749500d341d66d502c11e37" }, { "type": "derived", @@ -453,12 +453,6 @@ "baseHash": "7fe2b87cf49f4674d731d07f0883bab2f5cfc356", "issue": 6240 }, - { - "type": "derived", - "file": "src/Libraries/Utilities/AcessibilityMapping.win32.js", - "baseFile": "packages/react-native/Libraries/Utilities/AcessibilityMapping.js", - "baseHash": "7a662ddd93c6cd0a7193e3002120aeb196991340" - }, { "type": "copy", "file": "src/Libraries/Utilities/BackHandler.win32.js", diff --git a/packages/@office-iss/react-native-win32/package.json b/packages/@office-iss/react-native-win32/package.json index 42f951ab608..96290f65548 100644 --- a/packages/@office-iss/react-native-win32/package.json +++ b/packages/@office-iss/react-native-win32/package.json @@ -1,6 +1,6 @@ { "name": "@office-iss/react-native-win32", - "version": "0.0.0-canary.204", + "version": "0.0.0-canary.206", "description": "Implementation of react native on top of Office's Win32 platform.", "repository": { "type": "git", @@ -30,14 +30,15 @@ "@react-native-community/cli-platform-android": "12.0.0-alpha.3", "@react-native-community/cli-platform-ios": "12.0.0-alpha.3", "@react-native/assets": "1.0.0", - "@react-native/assets-registry": "0.73.0-nightly-20230606-396cdac62", - "@react-native/codegen": "0.73.0-nightly-20230615-2ae163a7e", - "@react-native/gradle-plugin": "0.73.0-nightly-20230616-5f8bbf2bd", - "@react-native/js-polyfills": "0.73.0-nightly-20230606-396cdac62", - "@react-native/normalize-colors": "0.73.0-nightly-20230606-396cdac62", - "@react-native/virtualized-lists": "0.73.0-nightly-20230616-5f8bbf2bd", + "@react-native/assets-registry": "0.73.0-nightly-20230622-0201e51bb", + "@react-native/codegen": "0.73.0-nightly-20230622-0201e51bb", + "@react-native/gradle-plugin": "0.73.0-nightly-20230622-0201e51bb", + "@react-native/js-polyfills": "0.73.0-nightly-20230622-0201e51bb", + "@react-native/normalize-colors": "0.73.0-nightly-20230622-0201e51bb", + "@react-native/virtualized-lists": "0.73.0-nightly-20230622-0201e51bb", "abort-controller": "^3.0.0", "anser": "^1.4.9", + "ansi-regex": "^5.0.0", "art": "^0.10.0", "base64-js": "^1.5.1", "deprecated-react-native-prop-types": "4.1.0", @@ -68,12 +69,12 @@ "@babel/core": "^7.20.0", "@babel/eslint-parser": "^7.20.0", "@rnw-scripts/babel-react-native-config": "0.0.0", - "@rnw-scripts/eslint-config": "1.2.1", - "@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.4", - "@rnw-scripts/just-task": "2.3.12", + "@rnw-scripts/eslint-config": "1.2.2", + "@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.5", + "@rnw-scripts/just-task": "2.3.13", "@rnw-scripts/metro-dev-config": "0.0.0", "@rnx-kit/jest-preset": "^0.1.0", - "@types/node": "^16.0.0", + "@types/node": "^18.0.0", "@types/prop-types": "15.7.1", "@types/react": "^18.0.18", "eslint": "^8.19.0", @@ -82,13 +83,13 @@ "just-scripts": "^1.3.3", "prettier": "^2.4.1", "react": "18.2.0", - "react-native": "0.73.0-nightly-20230616-5f8bbf2bd", - "react-native-platform-override": "^1.9.11", + "react-native": "0.73.0-nightly-20230628-15d735b35", + "react-native-platform-override": "^1.9.12", "typescript": "^4.9.5" }, "peerDependencies": { "react": "18.2.0", - "react-native": "0.73.0-nightly-20230616-5f8bbf2bd" + "react-native": "0.73.0-nightly-20230628-15d735b35" }, "beachball": { "defaultNpmTag": "canary", @@ -100,6 +101,6 @@ }, "promoteRelease": true, "engines": { - "node": ">= 16" + "node": ">= 18" } } diff --git a/packages/@office-iss/react-native-win32/src/Libraries/Components/View/View.win32.js b/packages/@office-iss/react-native-win32/src/Libraries/Components/View/View.win32.js index ebb0a2b65d7..ec4f0dec335 100644 --- a/packages/@office-iss/react-native-win32/src/Libraries/Components/View/View.win32.js +++ b/packages/@office-iss/react-native-win32/src/Libraries/Components/View/View.win32.js @@ -12,7 +12,6 @@ import type {ViewProps} from './ViewPropTypes'; import flattenStyle from '../../StyleSheet/flattenStyle'; import TextAncestor from '../../Text/TextAncestor'; -import {getAccessibilityRoleFromRole} from '../../Utilities/AcessibilityMapping'; import ViewNativeComponent from './ViewNativeComponent'; import * as React from 'react'; import invariant from 'invariant'; // [Windows] @@ -44,7 +43,6 @@ const View: React.AbstractComponent< accessibilityLevel, // Win32 accessibilityLiveRegion, accessibilityPositionInSet, // Win32 - accessibilityRole, accessibilitySetSize, // Win32 accessibilityState, accessibilityValue, @@ -72,7 +70,6 @@ const View: React.AbstractComponent< importantForAccessibility, nativeID, pointerEvents, - role, tabIndex, ...otherProps }: ViewProps, @@ -225,9 +222,6 @@ const View: React.AbstractComponent< } // Win32 accessibilitySetSize={ariaSetsize ?? accessibilitySetSize} // Win32 accessibilityState={_accessibilityState} - accessibilityRole={ - role ? getAccessibilityRoleFromRole(role) : accessibilityRole - } accessibilityElementsHidden={ ariaHidden ?? accessibilityElementsHidden } diff --git a/packages/@office-iss/react-native-win32/src/Libraries/Components/View/ViewPropTypes.win32.js b/packages/@office-iss/react-native-win32/src/Libraries/Components/View/ViewPropTypes.win32.js index b7355af42ae..ed456d764ba 100644 --- a/packages/@office-iss/react-native-win32/src/Libraries/Components/View/ViewPropTypes.win32.js +++ b/packages/@office-iss/react-native-win32/src/Libraries/Components/View/ViewPropTypes.win32.js @@ -106,6 +106,10 @@ type PointerEventProps = $ReadOnly<{| onPointerOverCapture?: ?(e: PointerEvent) => void, onPointerOut?: ?(e: PointerEvent) => void, onPointerOutCapture?: ?(e: PointerEvent) => void, + onGotPointerCapture?: ?(e: PointerEvent) => void, + onGotPointerCaptureCapture?: ?(e: PointerEvent) => void, + onLostPointerCapture?: ?(e: PointerEvent) => void, + onLostPointerCaptureCapture?: ?(e: PointerEvent) => void, |}>; type FocusEventProps = $ReadOnly<{| diff --git a/packages/@office-iss/react-native-win32/src/Libraries/NativeComponent/BaseViewConfig.win32.js b/packages/@office-iss/react-native-win32/src/Libraries/NativeComponent/BaseViewConfig.win32.js index 6ae32219b7b..2b56fada2dc 100644 --- a/packages/@office-iss/react-native-win32/src/Libraries/NativeComponent/BaseViewConfig.win32.js +++ b/packages/@office-iss/react-native-win32/src/Libraries/NativeComponent/BaseViewConfig.win32.js @@ -144,6 +144,18 @@ const bubblingEventTypes = { bubbled: 'onPointerOut', }, }, + topGotPointerCapture: { + phasedRegistrationNames: { + captured: 'onGotPointerCaptureCapture', + bubbled: 'onGotPointerCapture', + }, + }, + topLostPointerCapture: { + phasedRegistrationNames: { + captured: 'onLostPointerCaptureCapture', + bubbled: 'onLostPointerCapture', + }, + }, }; const directEventTypes = { @@ -366,6 +378,8 @@ const validAttributesForEventProps = ConditionallyIgnoredEventHandlers({ onPointerLeave: true, onPointerOver: true, onPointerOut: true, + onGotPointerCapture: true, + onLostPointerCapture: true, }); /** diff --git a/packages/@office-iss/react-native-win32/src/Libraries/Pressability/Pressability.win32.js b/packages/@office-iss/react-native-win32/src/Libraries/Pressability/Pressability.win32.js index 21a7296dc45..153243dad39 100644 --- a/packages/@office-iss/react-native-win32/src/Libraries/Pressability/Pressability.win32.js +++ b/packages/@office-iss/react-native-win32/src/Libraries/Pressability/Pressability.win32.js @@ -429,6 +429,7 @@ export default class Pressability { |}>; _touchActivateTime: ?number; _touchState: TouchState = 'NOT_RESPONDER'; + _isKeyDown: boolean = false; constructor(config: PressabilityConfig) { this.configure(config); @@ -474,6 +475,7 @@ export default class Pressability { if (onBlur != null) { onBlur(event); } + this._isKeyDown = false; }, onFocus: (event: FocusEvent): void => { const {onFocus} = this._config; @@ -615,7 +617,8 @@ export default class Pressability { (event.nativeEvent.code === 'Space' || event.nativeEvent.code === 'Enter' || event.nativeEvent.code === 'GamepadA') && - event.defaultPrevented !== true + event.defaultPrevented !== true && + this._isKeyDown ) { const {onPressOut, onPress} = this._config; // $FlowFixMe: PressEvents don't mesh with keyboarding APIs. Keep legacy behavior of passing KeyEvents instead @@ -623,6 +626,8 @@ export default class Pressability { // $FlowFixMe: PressEvents don't mesh with keyboarding APIs. Keep legacy behavior of passing KeyEvents instead onPress && onPress(event); } + // Native windows app clears the key pressed state when another key press interrupts the current + this._isKeyDown = false; }, onKeyDown: (event: KeyEvent): void => { const {onKeyDown} = this._config; @@ -635,6 +640,7 @@ export default class Pressability { event.defaultPrevented !== true ) { const {onPressIn} = this._config; + this._isKeyDown = true; // $FlowFixMe: PressEvents don't mesh with keyboarding APIs. Keep legacy behavior of passing KeyEvents instead onPressIn && onPressIn(event); } @@ -799,6 +805,12 @@ export default class Pressability { } } + // [Win32] + // $FlowFixMe - button typing + _isDefaultPressButton(button): boolean { + return !button; // Treat 0 or undefined as default press + } + /** * Performs a transition between touchable states and identify any activations * or deactivations (and callback invocations). @@ -827,7 +839,10 @@ export default class Pressability { if (isPressInSignal(prevState) && signal === 'LONG_PRESS_DETECTED') { const {onLongPress} = this._config; - if (onLongPress != null) { + if ( + onLongPress != null && + this._isDefaultPressButton(getTouchFromPressEvent(event).button) + ) { onLongPress(event); } } @@ -848,7 +863,11 @@ export default class Pressability { this._deactivate(event); } const {onLongPress, onPress, android_disableSound} = this._config; - if (onPress != null) { + + if ( + onPress != null && + this._isDefaultPressButton(getTouchFromPressEvent(event).button) + ) { const isPressCanceledByLongPress = onLongPress != null && prevState === 'RESPONDER_ACTIVE_LONG_PRESS_IN' && @@ -867,17 +886,20 @@ export default class Pressability { _activate(event: PressEvent): void { const {onPressIn} = this._config; - const {pageX, pageY} = getTouchFromPressEvent(event); + const {pageX, pageY, button} = getTouchFromPressEvent(event); this._touchActivatePosition = {pageX, pageY}; this._touchActivateTime = Date.now(); - if (onPressIn != null) { + if (onPressIn != null && this._isDefaultPressButton(button)) { onPressIn(event); } } _deactivate(event: PressEvent): void { const {onPressOut} = this._config; - if (onPressOut != null) { + if ( + onPressOut != null && + this._isDefaultPressButton(getTouchFromPressEvent(event).button) + ) { const minPressDuration = normalizeDelay( this._config.minPressDuration, 0, diff --git a/packages/@office-iss/react-native-win32/src/Libraries/Text/Text.win32.js b/packages/@office-iss/react-native-win32/src/Libraries/Text/Text.win32.js index ce1c711d75f..355ad43e477 100644 --- a/packages/@office-iss/react-native-win32/src/Libraries/Text/Text.win32.js +++ b/packages/@office-iss/react-native-win32/src/Libraries/Text/Text.win32.js @@ -15,7 +15,6 @@ import * as PressabilityDebug from '../Pressability/PressabilityDebug'; import usePressability from '../Pressability/usePressability'; import flattenStyle from '../StyleSheet/flattenStyle'; import processColor from '../StyleSheet/processColor'; -import {getAccessibilityRoleFromRole} from '../Utilities/AcessibilityMapping'; import Platform from '../Utilities/Platform'; import TextAncestor from './TextAncestor'; import {NativeText, NativeVirtualText} from './TextNativeComponent'; @@ -39,7 +38,6 @@ const Text: React.AbstractComponent< accessibilityLabel, accessibilityLevel, // Win32 accessibilityPositionInSet, // Win32 - accessibilityRole, accessibilitySetSize, // Win32 accessibilityState, allowFontScaling, @@ -69,7 +67,6 @@ const Text: React.AbstractComponent< onResponderTerminationRequest, onStartShouldSetResponder, pressRetentionOffset, - role, suppressHighlighting, ...restProps } = props; @@ -251,9 +248,6 @@ const Text: React.AbstractComponent< accessibilityLabel={ariaLabel ?? accessibilityLabel} accessibilityLevel={ariaLevel ?? accessibilityLevel} // Win32 accessibilityPositionInSet={ariaPosinset ?? accessibilityPositionInSet} // Win32 - accessibilityRole={ - role ? getAccessibilityRoleFromRole(role) : accessibilityRole - } accessibilitySetSize={ariaSetsize ?? accessibilitySetSize} // Win32 accessibilityState={_accessibilityState} isHighlighted={isHighlighted} @@ -276,9 +270,6 @@ const Text: React.AbstractComponent< accessibilityLabel={ariaLabel ?? accessibilityLabel} accessibilityLevel={ariaLevel ?? accessibilityLevel} // Win32 accessibilityPositionInSet={ariaPosinset ?? accessibilityPositionInSet} // Win32 - accessibilityRole={ - role ? getAccessibilityRoleFromRole(role) : accessibilityRole - } accessibilitySetSize={ariaSetsize ?? accessibilitySetSize} // Win32 accessibilityState={nativeTextAccessibilityState} accessible={ diff --git a/packages/@office-iss/react-native-win32/src/Libraries/Utilities/AcessibilityMapping.win32.js b/packages/@office-iss/react-native-win32/src/Libraries/Utilities/AcessibilityMapping.win32.js deleted file mode 100644 index 6b3e3c891ed..00000000000 --- a/packages/@office-iss/react-native-win32/src/Libraries/Utilities/AcessibilityMapping.win32.js +++ /dev/null @@ -1,156 +0,0 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - * - * @flow strict-local - * @format - */ - -'use strict'; - -import type { - AccessibilityRole, - Role, -} from '../Components/View/ViewAccessibility'; - -// Map role values to AccessibilityRole values -export function getAccessibilityRoleFromRole(role: Role): ?AccessibilityRole { - switch (role) { - case 'alert': - return 'alert'; - case 'alertdialog': - return 'alertdialog'; // Win32 - case 'application': - return 'application'; // Win32 - case 'article': - return undefined; - case 'banner': - return undefined; - case 'button': - return 'button'; - case 'cell': - return undefined; - case 'checkbox': - return 'checkbox'; - case 'columnheader': - return undefined; - case 'combobox': - return 'combobox'; - case 'complementary': - return undefined; - case 'contentinfo': - return undefined; - case 'definition': - return undefined; - case 'dialog': - return 'dialog'; // Win32 - case 'directory': - return undefined; - case 'document': - return undefined; - case 'feed': - return undefined; - case 'figure': - return undefined; - case 'form': - return undefined; - case 'grid': - return 'grid'; - case 'group': - return 'group'; // Win32 - case 'heading': - return 'header'; - case 'img': - return 'image'; - case 'link': - return 'link'; - case 'list': - return 'list'; - case 'listitem': - return 'listitem'; // Win32 - case 'log': - return undefined; - case 'main': - return undefined; - case 'marquee': - return undefined; - case 'math': - return undefined; - case 'menu': - return 'menu'; - case 'menubar': - return 'menubar'; - case 'menuitem': - return 'menuitem'; - case 'meter': - return undefined; - case 'navigation': - return undefined; - case 'none': - return 'none'; - case 'note': - return undefined; - case 'option': - return undefined; - case 'presentation': - return 'presentation'; // Win32 - case 'progressbar': - return 'progressbar'; - case 'radio': - return 'radio'; - case 'radiogroup': - return 'radiogroup'; - case 'region': - return undefined; - case 'row': - return undefined; - case 'rowgroup': - return undefined; - case 'rowheader': - return undefined; - case 'scrollbar': - return 'scrollbar'; - case 'searchbox': - return 'search'; - case 'separator': - return undefined; - case 'slider': - return 'adjustable'; - case 'spinbutton': - return 'spinbutton'; - case 'status': - return undefined; - case 'summary': - return 'summary'; - case 'switch': - return 'switch'; - case 'tab': - return 'tab'; - case 'table': - return undefined; - case 'tablist': - return 'tablist'; - case 'tabpanel': - return 'tabpanel'; // Win32 - case 'term': - return undefined; - case 'textbox': // Win32 - return 'textbox'; // Win32 - case 'timer': - return 'timer'; - case 'toolbar': - return 'toolbar'; - case 'tooltip': - return undefined; - case 'tree': - return 'tree'; // Win32 - case 'treegrid': - return undefined; - case 'treeitem': - return 'treeitem'; // Win32 - } - - return undefined; -} diff --git a/packages/@react-native-windows/automation-channel/CHANGELOG.json b/packages/@react-native-windows/automation-channel/CHANGELOG.json index 722dbcce635..0e812f633cd 100644 --- a/packages/@react-native-windows/automation-channel/CHANGELOG.json +++ b/packages/@react-native-windows/automation-channel/CHANGELOG.json @@ -1,6 +1,105 @@ { "name": "@react-native-windows/automation-channel", "entries": [ + { + "date": "Wed, 19 Jul 2023 05:14:28 GMT", + "tag": "@react-native-windows/automation-channel_v0.12.19", + "version": "0.12.19", + "comments": { + "patch": [ + { + "author": "beachball", + "package": "@react-native-windows/automation-channel", + "comment": "Bump react-native-windows to v0.0.0-canary.680", + "commit": "e5ff3faef609f787707035f282c7390e44ea0192" + } + ] + } + }, + { + "date": "Tue, 18 Jul 2023 05:13:38 GMT", + "tag": "@react-native-windows/automation-channel_v0.12.18", + "version": "0.12.18", + "comments": { + "patch": [ + { + "author": "beachball", + "package": "@react-native-windows/automation-channel", + "comment": "Bump react-native-windows to v0.0.0-canary.679", + "commit": "df09b6528aed4a1fad61742de6e47ff01c8b6067" + } + ] + } + }, + { + "date": "Sat, 15 Jul 2023 05:15:31 GMT", + "tag": "@react-native-windows/automation-channel_v0.12.17", + "version": "0.12.17", + "comments": { + "patch": [ + { + "author": "beachball", + "package": "@react-native-windows/automation-channel", + "comment": "Bump react-native-windows to v0.0.0-canary.678", + "commit": "beac68545a16cf391f08bcbfb514b00428a31823" + } + ] + } + }, + { + "date": "Fri, 14 Jul 2023 05:17:04 GMT", + "tag": "@react-native-windows/automation-channel_v0.12.16", + "version": "0.12.16", + "comments": { + "patch": [ + { + "author": "tatianakapos@microsoft.com", + "package": "@react-native-windows/automation-channel", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844", + "comment": "integration 6/28" + }, + { + "author": "beachball", + "package": "@react-native-windows/automation-channel", + "comment": "Bump @rnw-scripts/eslint-config to v1.2.2", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/automation-channel", + "comment": "Bump @rnw-scripts/just-task to v2.3.13", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/automation-channel", + "comment": "Bump @rnw-scripts/ts-config to v2.0.5", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/automation-channel", + "comment": "Bump react-native-windows to v0.0.0-canary.677", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + } + ] + } + }, + { + "date": "Wed, 12 Jul 2023 05:14:36 GMT", + "tag": "@react-native-windows/automation-channel_v0.12.15", + "version": "0.12.15", + "comments": { + "patch": [ + { + "author": "beachball", + "package": "@react-native-windows/automation-channel", + "comment": "Bump react-native-windows to v0.0.0-canary.676", + "commit": "41e884ad162ae898f3dff91bf6662b4b2685a32b" + } + ] + } + }, { "date": "Tue, 11 Jul 2023 05:14:43 GMT", "tag": "@react-native-windows/automation-channel_v0.12.14", diff --git a/packages/@react-native-windows/automation-channel/CHANGELOG.md b/packages/@react-native-windows/automation-channel/CHANGELOG.md index 6a206a10230..2ee2d479f03 100644 --- a/packages/@react-native-windows/automation-channel/CHANGELOG.md +++ b/packages/@react-native-windows/automation-channel/CHANGELOG.md @@ -1,9 +1,53 @@ # Change Log - @react-native-windows/automation-channel -This log was last generated on Tue, 11 Jul 2023 05:14:43 GMT and should not be manually modified. +This log was last generated on Wed, 19 Jul 2023 05:14:28 GMT and should not be manually modified. +## 0.12.19 + +Wed, 19 Jul 2023 05:14:28 GMT + +### Patches + +- Bump react-native-windows to v0.0.0-canary.680 + +## 0.12.18 + +Tue, 18 Jul 2023 05:13:38 GMT + +### Patches + +- Bump react-native-windows to v0.0.0-canary.679 + +## 0.12.17 + +Sat, 15 Jul 2023 05:15:31 GMT + +### Patches + +- Bump react-native-windows to v0.0.0-canary.678 + +## 0.12.16 + +Fri, 14 Jul 2023 05:17:04 GMT + +### Patches + +- integration 6/28 (tatianakapos@microsoft.com) +- Bump @rnw-scripts/eslint-config to v1.2.2 +- Bump @rnw-scripts/just-task to v2.3.13 +- Bump @rnw-scripts/ts-config to v2.0.5 +- Bump react-native-windows to v0.0.0-canary.677 + +## 0.12.15 + +Wed, 12 Jul 2023 05:14:36 GMT + +### Patches + +- Bump react-native-windows to v0.0.0-canary.676 + ## 0.12.14 Tue, 11 Jul 2023 05:14:43 GMT diff --git a/packages/@react-native-windows/automation-channel/package.json b/packages/@react-native-windows/automation-channel/package.json index 94526061917..f09f927040b 100644 --- a/packages/@react-native-windows/automation-channel/package.json +++ b/packages/@react-native-windows/automation-channel/package.json @@ -1,6 +1,6 @@ { "name": "@react-native-windows/automation-channel", - "version": "0.12.14", + "version": "0.12.19", "license": "MIT", "repository": { "type": "git", @@ -22,17 +22,17 @@ "jsonrpc-lite": "^2.2.0" }, "devDependencies": { - "@rnw-scripts/eslint-config": "1.2.1", - "@rnw-scripts/just-task": "2.3.12", - "@rnw-scripts/ts-config": "2.0.4", + "@rnw-scripts/eslint-config": "1.2.2", + "@rnw-scripts/just-task": "2.3.13", + "@rnw-scripts/ts-config": "2.0.5", "@types/find-up": "^4.0.0", - "@types/node": "^16.0.0", + "@types/node": "^18.0.0", "eslint": "^8.19.0", "just-scripts": "^1.3.2", "prettier": "^2.4.1", "react": "18.2.0", - "react-native": "0.73.0-nightly-20230616-5f8bbf2bd", - "react-native-windows": "^0.0.0-canary.675", + "react-native": "0.73.0-nightly-20230628-15d735b35", + "react-native-windows": "^0.0.0-canary.680", "typescript": "^4.9.5" }, "files": [ @@ -40,6 +40,6 @@ "windows" ], "engines": { - "node": ">= 16" + "node": ">= 18" } } diff --git a/packages/@react-native-windows/automation-commands/CHANGELOG.json b/packages/@react-native-windows/automation-commands/CHANGELOG.json index 7d3563f701d..ac7a9f7611c 100644 --- a/packages/@react-native-windows/automation-commands/CHANGELOG.json +++ b/packages/@react-native-windows/automation-commands/CHANGELOG.json @@ -1,6 +1,105 @@ { "name": "@react-native-windows/automation-commands", "entries": [ + { + "date": "Wed, 19 Jul 2023 05:14:28 GMT", + "tag": "@react-native-windows/automation-commands_v0.1.121", + "version": "0.1.121", + "comments": { + "patch": [ + { + "author": "beachball", + "package": "@react-native-windows/automation-commands", + "comment": "Bump @react-native-windows/automation-channel to v0.12.19", + "commit": "e5ff3faef609f787707035f282c7390e44ea0192" + } + ] + } + }, + { + "date": "Tue, 18 Jul 2023 05:13:38 GMT", + "tag": "@react-native-windows/automation-commands_v0.1.120", + "version": "0.1.120", + "comments": { + "patch": [ + { + "author": "beachball", + "package": "@react-native-windows/automation-commands", + "comment": "Bump @react-native-windows/automation-channel to v0.12.18", + "commit": "df09b6528aed4a1fad61742de6e47ff01c8b6067" + } + ] + } + }, + { + "date": "Sat, 15 Jul 2023 05:15:31 GMT", + "tag": "@react-native-windows/automation-commands_v0.1.119", + "version": "0.1.119", + "comments": { + "patch": [ + { + "author": "beachball", + "package": "@react-native-windows/automation-commands", + "comment": "Bump @react-native-windows/automation-channel to v0.12.17", + "commit": "beac68545a16cf391f08bcbfb514b00428a31823" + } + ] + } + }, + { + "date": "Fri, 14 Jul 2023 05:17:05 GMT", + "tag": "@react-native-windows/automation-commands_v0.1.118", + "version": "0.1.118", + "comments": { + "patch": [ + { + "author": "tatianakapos@microsoft.com", + "package": "@react-native-windows/automation-commands", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844", + "comment": "integration 6/28" + }, + { + "author": "beachball", + "package": "@react-native-windows/automation-commands", + "comment": "Bump @react-native-windows/automation-channel to v0.12.16", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/automation-commands", + "comment": "Bump @rnw-scripts/eslint-config to v1.2.2", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/automation-commands", + "comment": "Bump @rnw-scripts/just-task to v2.3.13", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/automation-commands", + "comment": "Bump @rnw-scripts/ts-config to v2.0.5", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + } + ] + } + }, + { + "date": "Wed, 12 Jul 2023 05:14:36 GMT", + "tag": "@react-native-windows/automation-commands_v0.1.117", + "version": "0.1.117", + "comments": { + "patch": [ + { + "author": "beachball", + "package": "@react-native-windows/automation-commands", + "comment": "Bump @react-native-windows/automation-channel to v0.12.15", + "commit": "41e884ad162ae898f3dff91bf6662b4b2685a32b" + } + ] + } + }, { "date": "Tue, 11 Jul 2023 05:14:43 GMT", "tag": "@react-native-windows/automation-commands_v0.1.116", diff --git a/packages/@react-native-windows/automation-commands/CHANGELOG.md b/packages/@react-native-windows/automation-commands/CHANGELOG.md index 11ef7f08c56..8474026f88d 100644 --- a/packages/@react-native-windows/automation-commands/CHANGELOG.md +++ b/packages/@react-native-windows/automation-commands/CHANGELOG.md @@ -1,9 +1,53 @@ # Change Log - @react-native-windows/automation-commands -This log was last generated on Tue, 11 Jul 2023 05:14:43 GMT and should not be manually modified. +This log was last generated on Wed, 19 Jul 2023 05:14:28 GMT and should not be manually modified. +## 0.1.121 + +Wed, 19 Jul 2023 05:14:28 GMT + +### Patches + +- Bump @react-native-windows/automation-channel to v0.12.19 + +## 0.1.120 + +Tue, 18 Jul 2023 05:13:38 GMT + +### Patches + +- Bump @react-native-windows/automation-channel to v0.12.18 + +## 0.1.119 + +Sat, 15 Jul 2023 05:15:31 GMT + +### Patches + +- Bump @react-native-windows/automation-channel to v0.12.17 + +## 0.1.118 + +Fri, 14 Jul 2023 05:17:05 GMT + +### Patches + +- integration 6/28 (tatianakapos@microsoft.com) +- Bump @react-native-windows/automation-channel to v0.12.16 +- Bump @rnw-scripts/eslint-config to v1.2.2 +- Bump @rnw-scripts/just-task to v2.3.13 +- Bump @rnw-scripts/ts-config to v2.0.5 + +## 0.1.117 + +Wed, 12 Jul 2023 05:14:36 GMT + +### Patches + +- Bump @react-native-windows/automation-channel to v0.12.15 + ## 0.1.116 Tue, 11 Jul 2023 05:14:43 GMT diff --git a/packages/@react-native-windows/automation-commands/package.json b/packages/@react-native-windows/automation-commands/package.json index c28a367babd..fb6d32515cc 100644 --- a/packages/@react-native-windows/automation-commands/package.json +++ b/packages/@react-native-windows/automation-commands/package.json @@ -1,6 +1,6 @@ { "name": "@react-native-windows/automation-commands", - "version": "0.1.116", + "version": "0.1.121", "description": "Allows controlling your react-native-windows application", "main": "lib-commonjs/index.js", "license": "MIT", @@ -18,17 +18,17 @@ "watch": "rnw-scripts watch" }, "dependencies": { - "@react-native-windows/automation-channel": "^0.12.14", + "@react-native-windows/automation-channel": "^0.12.19", "@typescript-eslint/eslint-plugin": "^5.30.5", "@typescript-eslint/parser": "^5.57.1" }, "devDependencies": { "@jest/types": "^29.2.1", - "@rnw-scripts/eslint-config": "1.2.1", - "@rnw-scripts/just-task": "2.3.12", - "@rnw-scripts/ts-config": "2.0.4", + "@rnw-scripts/eslint-config": "1.2.2", + "@rnw-scripts/just-task": "2.3.13", + "@rnw-scripts/ts-config": "2.0.5", "@types/jest": "^29.2.2", - "@types/node": "^16.0.0", + "@types/node": "^18.0.0", "eslint": "^8.19.0", "prettier": "^2.4.1", "typescript": "^4.9.5" @@ -38,6 +38,6 @@ "README.md" ], "engines": { - "node": ">= 16" + "node": ">= 18" } } diff --git a/packages/@react-native-windows/automation/CHANGELOG.json b/packages/@react-native-windows/automation/CHANGELOG.json index fd7f0bbf37b..5d656536280 100644 --- a/packages/@react-native-windows/automation/CHANGELOG.json +++ b/packages/@react-native-windows/automation/CHANGELOG.json @@ -1,6 +1,111 @@ { "name": "@react-native-windows/automation", "entries": [ + { + "date": "Wed, 19 Jul 2023 05:14:28 GMT", + "tag": "@react-native-windows/automation_v0.3.101", + "version": "0.3.101", + "comments": { + "patch": [ + { + "author": "beachball", + "package": "@react-native-windows/automation", + "comment": "Bump @react-native-windows/automation-channel to v0.12.19", + "commit": "e5ff3faef609f787707035f282c7390e44ea0192" + } + ] + } + }, + { + "date": "Tue, 18 Jul 2023 05:13:38 GMT", + "tag": "@react-native-windows/automation_v0.3.100", + "version": "0.3.100", + "comments": { + "patch": [ + { + "author": "beachball", + "package": "@react-native-windows/automation", + "comment": "Bump @react-native-windows/automation-channel to v0.12.18", + "commit": "df09b6528aed4a1fad61742de6e47ff01c8b6067" + } + ] + } + }, + { + "date": "Sat, 15 Jul 2023 05:15:31 GMT", + "tag": "@react-native-windows/automation_v0.3.99", + "version": "0.3.99", + "comments": { + "patch": [ + { + "author": "beachball", + "package": "@react-native-windows/automation", + "comment": "Bump @react-native-windows/automation-channel to v0.12.17", + "commit": "beac68545a16cf391f08bcbfb514b00428a31823" + } + ] + } + }, + { + "date": "Fri, 14 Jul 2023 05:17:04 GMT", + "tag": "@react-native-windows/automation_v0.3.98", + "version": "0.3.98", + "comments": { + "patch": [ + { + "author": "tatianakapos@microsoft.com", + "package": "@react-native-windows/automation", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844", + "comment": "integration 6/28" + }, + { + "author": "beachball", + "package": "@react-native-windows/automation", + "comment": "Bump @react-native-windows/automation-channel to v0.12.16", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/automation", + "comment": "Bump @react-native-windows/fs to v0.0.0-canary.25", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/automation", + "comment": "Bump @rnw-scripts/eslint-config to v1.2.2", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/automation", + "comment": "Bump @rnw-scripts/just-task to v2.3.13", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/automation", + "comment": "Bump @rnw-scripts/ts-config to v2.0.5", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + } + ] + } + }, + { + "date": "Wed, 12 Jul 2023 05:14:36 GMT", + "tag": "@react-native-windows/automation_v0.3.97", + "version": "0.3.97", + "comments": { + "patch": [ + { + "author": "beachball", + "package": "@react-native-windows/automation", + "comment": "Bump @react-native-windows/automation-channel to v0.12.15", + "commit": "41e884ad162ae898f3dff91bf6662b4b2685a32b" + } + ] + } + }, { "date": "Tue, 11 Jul 2023 05:14:43 GMT", "tag": "@react-native-windows/automation_v0.3.96", diff --git a/packages/@react-native-windows/automation/CHANGELOG.md b/packages/@react-native-windows/automation/CHANGELOG.md index 8debb263cb8..073154ee3cd 100644 --- a/packages/@react-native-windows/automation/CHANGELOG.md +++ b/packages/@react-native-windows/automation/CHANGELOG.md @@ -1,9 +1,54 @@ # Change Log - @react-native-windows/automation -This log was last generated on Tue, 11 Jul 2023 05:14:43 GMT and should not be manually modified. +This log was last generated on Wed, 19 Jul 2023 05:14:28 GMT and should not be manually modified. +## 0.3.101 + +Wed, 19 Jul 2023 05:14:28 GMT + +### Patches + +- Bump @react-native-windows/automation-channel to v0.12.19 + +## 0.3.100 + +Tue, 18 Jul 2023 05:13:38 GMT + +### Patches + +- Bump @react-native-windows/automation-channel to v0.12.18 + +## 0.3.99 + +Sat, 15 Jul 2023 05:15:31 GMT + +### Patches + +- Bump @react-native-windows/automation-channel to v0.12.17 + +## 0.3.98 + +Fri, 14 Jul 2023 05:17:04 GMT + +### Patches + +- integration 6/28 (tatianakapos@microsoft.com) +- Bump @react-native-windows/automation-channel to v0.12.16 +- Bump @react-native-windows/fs to v0.0.0-canary.25 +- Bump @rnw-scripts/eslint-config to v1.2.2 +- Bump @rnw-scripts/just-task to v2.3.13 +- Bump @rnw-scripts/ts-config to v2.0.5 + +## 0.3.97 + +Wed, 12 Jul 2023 05:14:36 GMT + +### Patches + +- Bump @react-native-windows/automation-channel to v0.12.15 + ## 0.3.96 Tue, 11 Jul 2023 05:14:43 GMT diff --git a/packages/@react-native-windows/automation/package.json b/packages/@react-native-windows/automation/package.json index 056f6854deb..4beb2b16ead 100644 --- a/packages/@react-native-windows/automation/package.json +++ b/packages/@react-native-windows/automation/package.json @@ -1,6 +1,6 @@ { "name": "@react-native-windows/automation", - "version": "0.3.96", + "version": "0.3.101", "description": "UI Automation Suite for React Native Windows Applications", "main": "lib-commonjs/index.js", "repository": { @@ -18,8 +18,8 @@ "watch": "rnw-scripts watch" }, "dependencies": { - "@react-native-windows/automation-channel": "^0.12.14", - "@react-native-windows/fs": "^0.0.0-canary.24", + "@react-native-windows/automation-channel": "^0.12.19", + "@react-native-windows/fs": "^0.0.0-canary.25", "@typescript-eslint/eslint-plugin": "^5.30.5", "@typescript-eslint/parser": "^5.57.1", "chalk": "^4.1.2", @@ -30,11 +30,11 @@ "@jest/create-cache-key-function": "^29.2.1", "@jest/environment": "^29.3.0", "@jest/types": "^29.2.1", - "@rnw-scripts/eslint-config": "1.2.1", - "@rnw-scripts/just-task": "2.3.12", - "@rnw-scripts/ts-config": "2.0.4", + "@rnw-scripts/eslint-config": "1.2.2", + "@rnw-scripts/just-task": "2.3.13", + "@rnw-scripts/ts-config": "2.0.5", "@types/jest": "^29.2.2", - "@types/node": "^16.0.0", + "@types/node": "^18.0.0", "@types/readline-sync": "^1.4.4", "eslint": "^8.19.0", "prettier": "^2.4.1", @@ -49,6 +49,6 @@ "README.md" ], "engines": { - "node": ">= 16" + "node": ">= 18" } } diff --git a/packages/@react-native-windows/automation/src/AutomationEnvironment.ts b/packages/@react-native-windows/automation/src/AutomationEnvironment.ts index de9ba7c2742..bc00f0e1346 100644 --- a/packages/@react-native-windows/automation/src/AutomationEnvironment.ts +++ b/packages/@react-native-windows/automation/src/AutomationEnvironment.ts @@ -77,6 +77,7 @@ export default class AutomationEnvironment extends NodeEnvironment { } const baseOptions: RemoteOptions = { + hostname: '127.0.0.1', port: 4723, capabilities: { app: resolveAppName(passedOptions.app), diff --git a/packages/@react-native-windows/cli/CHANGELOG.json b/packages/@react-native-windows/cli/CHANGELOG.json index 3ca47ed9706..7460120f332 100644 --- a/packages/@react-native-windows/cli/CHANGELOG.json +++ b/packages/@react-native-windows/cli/CHANGELOG.json @@ -1,6 +1,84 @@ { "name": "@react-native-windows/cli", "entries": [ + { + "date": "Sat, 15 Jul 2023 05:15:31 GMT", + "tag": "@react-native-windows/cli_v0.0.0-canary.178", + "version": "0.0.0-canary.178", + "comments": { + "prerelease": [ + { + "author": "53799235+ZihanChen-MSFT@users.noreply.github.com", + "package": "@react-native-windows/cli", + "commit": "beac68545a16cf391f08bcbfb514b00428a31823", + "comment": "Add package.json:codegenConfig.windows.outputDirectory" + } + ] + } + }, + { + "date": "Fri, 14 Jul 2023 05:17:05 GMT", + "tag": "@react-native-windows/cli_v0.0.0-canary.177", + "version": "0.0.0-canary.177", + "comments": { + "prerelease": [ + { + "author": "tatianakapos@microsoft.com", + "package": "@react-native-windows/cli", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844", + "comment": "integration 6/28" + }, + { + "author": "beachball", + "package": "@react-native-windows/cli", + "comment": "Bump @react-native-windows/codegen to v0.0.0-canary.64", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/cli", + "comment": "Bump @react-native-windows/fs to v0.0.0-canary.25", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/cli", + "comment": "Bump @react-native-windows/package-utils to v0.0.0-canary.51", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/cli", + "comment": "Bump @react-native-windows/telemetry to v0.0.0-canary.73", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/cli", + "comment": "Bump @rnw-scripts/eslint-config to v1.2.2", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/cli", + "comment": "Bump @rnw-scripts/jest-unittest-config to v1.5.6", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/cli", + "comment": "Bump @rnw-scripts/just-task to v2.3.13", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/cli", + "comment": "Bump @rnw-scripts/ts-config to v2.0.5", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + } + ] + } + }, { "date": "Sat, 08 Jul 2023 05:13:21 GMT", "tag": "@react-native-windows/cli_v0.0.0-canary.176", diff --git a/packages/@react-native-windows/cli/CHANGELOG.md b/packages/@react-native-windows/cli/CHANGELOG.md index 11e5086acd4..1436a6128c0 100644 --- a/packages/@react-native-windows/cli/CHANGELOG.md +++ b/packages/@react-native-windows/cli/CHANGELOG.md @@ -1,9 +1,33 @@ # Change Log - @react-native-windows/cli -This log was last generated on Sat, 08 Jul 2023 05:13:21 GMT and should not be manually modified. +This log was last generated on Sat, 15 Jul 2023 05:15:31 GMT and should not be manually modified. +## 0.0.0-canary.178 + +Sat, 15 Jul 2023 05:15:31 GMT + +### Changes + +- Add package.json:codegenConfig.windows.outputDirectory (53799235+ZihanChen-MSFT@users.noreply.github.com) + +## 0.0.0-canary.177 + +Fri, 14 Jul 2023 05:17:05 GMT + +### Changes + +- integration 6/28 (tatianakapos@microsoft.com) +- Bump @react-native-windows/codegen to v0.0.0-canary.64 +- Bump @react-native-windows/fs to v0.0.0-canary.25 +- Bump @react-native-windows/package-utils to v0.0.0-canary.51 +- Bump @react-native-windows/telemetry to v0.0.0-canary.73 +- Bump @rnw-scripts/eslint-config to v1.2.2 +- Bump @rnw-scripts/jest-unittest-config to v1.5.6 +- Bump @rnw-scripts/just-task to v2.3.13 +- Bump @rnw-scripts/ts-config to v2.0.5 + ## 0.0.0-canary.176 Sat, 08 Jul 2023 05:13:21 GMT diff --git a/packages/@react-native-windows/cli/package.json b/packages/@react-native-windows/cli/package.json index f8a169da85c..be36a2401bd 100644 --- a/packages/@react-native-windows/cli/package.json +++ b/packages/@react-native-windows/cli/package.json @@ -1,6 +1,6 @@ { "name": "@react-native-windows/cli", - "version": "0.0.0-canary.176", + "version": "0.0.0-canary.178", "license": "MIT", "main": "lib-commonjs/index.js", "repository": { @@ -17,10 +17,10 @@ "watch": "rnw-scripts watch" }, "dependencies": { - "@react-native-windows/codegen": "0.0.0-canary.63", - "@react-native-windows/fs": "^0.0.0-canary.24", - "@react-native-windows/package-utils": "^0.0.0-canary.50", - "@react-native-windows/telemetry": "^0.0.0-canary.72", + "@react-native-windows/codegen": "0.0.0-canary.64", + "@react-native-windows/fs": "^0.0.0-canary.25", + "@react-native-windows/package-utils": "^0.0.0-canary.51", + "@react-native-windows/telemetry": "^0.0.0-canary.73", "@xmldom/xmldom": "^0.7.7", "chalk": "^4.1.0", "cli-spinners": "^2.2.0", @@ -42,15 +42,15 @@ "devDependencies": { "@react-native-community/cli-doctor": "^12.0.0-alpha.3", "@react-native-community/cli-types": "^12.0.0-alpha.3", - "@rnw-scripts/eslint-config": "1.2.1", - "@rnw-scripts/jest-unittest-config": "1.5.5", - "@rnw-scripts/just-task": "2.3.12", - "@rnw-scripts/ts-config": "2.0.4", + "@rnw-scripts/eslint-config": "1.2.2", + "@rnw-scripts/jest-unittest-config": "1.5.6", + "@rnw-scripts/just-task": "2.3.13", + "@rnw-scripts/ts-config": "2.0.5", "@types/chalk": "^2.2.0", "@types/jest": "^29.2.2", "@types/lodash": "^4.14.168", "@types/mustache": "^4.1.1", - "@types/node": "^16.0.0", + "@types/node": "^18.0.0", "@types/ora": "^3.2.0", "@types/prompts": "2.0.10", "@types/semver": "^7.3.3", @@ -84,6 +84,6 @@ "promoteRelease": true, "windowsOnly": true, "engines": { - "node": ">= 16" + "node": ">= 18" } } diff --git a/packages/@react-native-windows/cli/src/codegen.ts b/packages/@react-native-windows/cli/src/codegen.ts index 711eeb6faff..98477c41d6b 100644 --- a/packages/@react-native-windows/cli/src/codegen.ts +++ b/packages/@react-native-windows/cli/src/codegen.ts @@ -123,6 +123,8 @@ export class CodeGenWindows { const jsRootDir = pkgJson.codegenConfig.jsSrcsDir ? path.join(this.root, pkgJson.codegenConfig.jsSrcsDir) : this.root; + const codegenOutputDir = + pkgJson.codegenConfig.windows.outputDirectory ?? 'codegen'; const generators = pkgJson.codegenConfig.windows.generators ?? [ 'modulesWindows', @@ -143,7 +145,7 @@ export class CodeGenWindows { generators.indexOf('modulesTypeScriptTypes') !== -1, modulesWindows: generators.indexOf('modulesWindows') !== -1, namespace: projectNamespace, - outputDirectory: path.join(this.root, 'codegen'), + outputDirectory: path.join(this.root, codegenOutputDir), test: !!this.options.check, }; diff --git a/packages/@react-native-windows/cli/src/e2etest/healthChecks.test.ts b/packages/@react-native-windows/cli/src/e2etest/healthChecks.test.ts index dd1245babef..b37bb3e2ab3 100644 --- a/packages/@react-native-windows/cli/src/e2etest/healthChecks.test.ts +++ b/packages/@react-native-windows/cli/src/e2etest/healthChecks.test.ts @@ -24,7 +24,7 @@ test('Verify list of health checks aligns with rnw-dependencies', async () => { {stdio: 'pipe'}, ); const deps = rnwDeps.toString().trim().split('\n'); - const rnwHelathChecks = deps.map(dep => { + const rnwHealthChecks = deps.map(dep => { const match = /([^:]+): ([^:]+): (.*)/.exec(dep); if (!match) { throw new Error(`Unexpected output from ${rnwDepScriptPath}`); @@ -33,5 +33,5 @@ test('Verify list of health checks aligns with rnw-dependencies', async () => { return [optional.trim() === 'Required', id, name]; }); - expect(HealthCheckList).toEqual(rnwHelathChecks); + expect(HealthCheckList).toEqual(rnwHealthChecks); }); diff --git a/packages/@react-native-windows/cli/src/healthCheckList.ts b/packages/@react-native-windows/cli/src/healthCheckList.ts index bf96c3747b6..a6310759a84 100644 --- a/packages/@react-native-windows/cli/src/healthCheckList.ts +++ b/packages/@react-native-windows/cli/src/healthCheckList.ts @@ -6,7 +6,7 @@ export const HealthCheckList = [ [true, "DeveloperMode", "Developer mode is on"], [true, "LongPath", "Long path support is enabled"], [true, "VSUWP", "Visual Studio 2022 (>= 17.3) & req. components"], - [true, "Node", "Node.js (LTS, >= 16.0)"], + [true, "Node", "Node.js (LTS, >= 18.0)"], [true, "Yarn", "Yarn"], [true, "DotNetCore", ".NET SDK (LTS, = 6.0)"] ] diff --git a/packages/@react-native-windows/codegen/CHANGELOG.json b/packages/@react-native-windows/codegen/CHANGELOG.json index 835539b1217..a7ca5432b88 100644 --- a/packages/@react-native-windows/codegen/CHANGELOG.json +++ b/packages/@react-native-windows/codegen/CHANGELOG.json @@ -1,6 +1,51 @@ { "name": "@react-native-windows/codegen", "entries": [ + { + "date": "Fri, 14 Jul 2023 05:17:05 GMT", + "tag": "@react-native-windows/codegen_v0.0.0-canary.64", + "version": "0.0.0-canary.64", + "comments": { + "prerelease": [ + { + "author": "tatianakapos@microsoft.com", + "package": "@react-native-windows/codegen", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844", + "comment": "integration 6/28" + }, + { + "author": "beachball", + "package": "@react-native-windows/codegen", + "comment": "Bump @react-native-windows/fs to v0.0.0-canary.25", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/codegen", + "comment": "Bump @rnw-scripts/eslint-config to v1.2.2", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/codegen", + "comment": "Bump @rnw-scripts/jest-unittest-config to v1.5.6", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/codegen", + "comment": "Bump @rnw-scripts/just-task to v2.3.13", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/codegen", + "comment": "Bump @rnw-scripts/ts-config to v2.0.5", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + } + ] + } + }, { "date": "Sat, 08 Jul 2023 05:13:21 GMT", "tag": "@react-native-windows/codegen_v0.0.0-canary.63", diff --git a/packages/@react-native-windows/codegen/CHANGELOG.md b/packages/@react-native-windows/codegen/CHANGELOG.md index db810c0efd4..3925c8608c1 100644 --- a/packages/@react-native-windows/codegen/CHANGELOG.md +++ b/packages/@react-native-windows/codegen/CHANGELOG.md @@ -1,9 +1,22 @@ # Change Log - @react-native-windows/codegen -This log was last generated on Sat, 08 Jul 2023 05:13:21 GMT and should not be manually modified. +This log was last generated on Fri, 14 Jul 2023 05:17:05 GMT and should not be manually modified. +## 0.0.0-canary.64 + +Fri, 14 Jul 2023 05:17:05 GMT + +### Changes + +- integration 6/28 (tatianakapos@microsoft.com) +- Bump @react-native-windows/fs to v0.0.0-canary.25 +- Bump @rnw-scripts/eslint-config to v1.2.2 +- Bump @rnw-scripts/jest-unittest-config to v1.5.6 +- Bump @rnw-scripts/just-task to v2.3.13 +- Bump @rnw-scripts/ts-config to v2.0.5 + ## 0.0.0-canary.63 Sat, 08 Jul 2023 05:13:21 GMT diff --git a/packages/@react-native-windows/codegen/package.json b/packages/@react-native-windows/codegen/package.json index f92c66b342e..1ab783a8100 100644 --- a/packages/@react-native-windows/codegen/package.json +++ b/packages/@react-native-windows/codegen/package.json @@ -1,6 +1,6 @@ { "name": "@react-native-windows/codegen", - "version": "0.0.0-canary.63", + "version": "0.0.0-canary.64", "description": "Generators for react-native-codegen targeting react-native-windows", "main": "lib-commonjs/index.js", "repository": { @@ -22,7 +22,7 @@ "react-native-windows-codegen": "./bin.js" }, "dependencies": { - "@react-native-windows/fs": "^0.0.0-canary.24", + "@react-native-windows/fs": "^0.0.0-canary.25", "chalk": "^4.1.0", "globby": "^11.0.4", "mustache": "^4.0.1", @@ -30,13 +30,13 @@ "yargs": "^16.2.0" }, "devDependencies": { - "@rnw-scripts/eslint-config": "1.2.1", - "@rnw-scripts/jest-unittest-config": "1.5.5", - "@rnw-scripts/just-task": "2.3.12", - "@rnw-scripts/ts-config": "2.0.4", + "@rnw-scripts/eslint-config": "1.2.2", + "@rnw-scripts/jest-unittest-config": "1.5.6", + "@rnw-scripts/just-task": "2.3.13", + "@rnw-scripts/ts-config": "2.0.5", "@types/chalk": "^2.2.0", "@types/jest": "^29.2.2", - "@types/node": "^16.0.0", + "@types/node": "^18.0.0", "@types/yargs": "16.0.0", "@typescript-eslint/eslint-plugin": "^5.30.5", "@typescript-eslint/parser": "^5.57.1", @@ -66,6 +66,6 @@ }, "promoteRelease": true, "engines": { - "node": ">= 16" + "node": ">= 18" } } diff --git a/packages/@react-native-windows/codegen/src/generators/ObjectTypes.ts b/packages/@react-native-windows/codegen/src/generators/ObjectTypes.ts index 4f82d05e094..4388a603d5a 100644 --- a/packages/@react-native-windows/codegen/src/generators/ObjectTypes.ts +++ b/packages/@react-native-windows/codegen/src/generators/ObjectTypes.ts @@ -104,6 +104,8 @@ export function translateFieldOrReturnType( callerName, options, )}>`; + case 'MixedTypeAnnotation': + return ''; case 'EnumDeclaration': case 'UnionTypeAnnotation': return translateUnionReturnType(type, options); diff --git a/packages/@react-native-windows/codegen/src/generators/ParamTypes.ts b/packages/@react-native-windows/codegen/src/generators/ParamTypes.ts index 1311e1949c1..91b4a295824 100644 --- a/packages/@react-native-windows/codegen/src/generators/ParamTypes.ts +++ b/packages/@react-native-windows/codegen/src/generators/ParamTypes.ts @@ -183,6 +183,8 @@ function translateParam( } case 'TypeAliasTypeAnnotation': return decorateType(getAliasCppName(param.name), target); + case 'MixedTypeAnnotation': + return ''; case 'EnumDeclaration': case 'UnionTypeAnnotation': return translateUnionReturnType(param, target, options); diff --git a/packages/@react-native-windows/find-repo-root/CHANGELOG.json b/packages/@react-native-windows/find-repo-root/CHANGELOG.json index 22ca18041ad..e45823a8fb6 100644 --- a/packages/@react-native-windows/find-repo-root/CHANGELOG.json +++ b/packages/@react-native-windows/find-repo-root/CHANGELOG.json @@ -1,6 +1,45 @@ { "name": "@react-native-windows/find-repo-root", "entries": [ + { + "date": "Fri, 14 Jul 2023 05:17:05 GMT", + "tag": "@react-native-windows/find-repo-root_v0.0.0-canary.54", + "version": "0.0.0-canary.54", + "comments": { + "prerelease": [ + { + "author": "tatianakapos@microsoft.com", + "package": "@react-native-windows/find-repo-root", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844", + "comment": "integration 6/28" + }, + { + "author": "beachball", + "package": "@react-native-windows/find-repo-root", + "comment": "Bump @react-native-windows/fs to v0.0.0-canary.25", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/find-repo-root", + "comment": "Bump @rnw-scripts/eslint-config to v1.2.2", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/find-repo-root", + "comment": "Bump @rnw-scripts/just-task to v2.3.13", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/find-repo-root", + "comment": "Bump @rnw-scripts/ts-config to v2.0.5", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + } + ] + } + }, { "date": "Sat, 01 Jul 2023 05:14:42 GMT", "tag": "@react-native-windows/find-repo-root_v0.0.0-canary.53", diff --git a/packages/@react-native-windows/find-repo-root/CHANGELOG.md b/packages/@react-native-windows/find-repo-root/CHANGELOG.md index 778e61e254a..1d2ed6a3cd6 100644 --- a/packages/@react-native-windows/find-repo-root/CHANGELOG.md +++ b/packages/@react-native-windows/find-repo-root/CHANGELOG.md @@ -1,9 +1,21 @@ # Change Log - @react-native-windows/find-repo-root -This log was last generated on Sat, 01 Jul 2023 05:14:42 GMT and should not be manually modified. +This log was last generated on Fri, 14 Jul 2023 05:17:05 GMT and should not be manually modified. +## 0.0.0-canary.54 + +Fri, 14 Jul 2023 05:17:05 GMT + +### Changes + +- integration 6/28 (tatianakapos@microsoft.com) +- Bump @react-native-windows/fs to v0.0.0-canary.25 +- Bump @rnw-scripts/eslint-config to v1.2.2 +- Bump @rnw-scripts/just-task to v2.3.13 +- Bump @rnw-scripts/ts-config to v2.0.5 + ## 0.0.0-canary.53 Sat, 01 Jul 2023 05:14:42 GMT diff --git a/packages/@react-native-windows/find-repo-root/package.json b/packages/@react-native-windows/find-repo-root/package.json index aad35865c60..8c723474cb7 100644 --- a/packages/@react-native-windows/find-repo-root/package.json +++ b/packages/@react-native-windows/find-repo-root/package.json @@ -1,6 +1,6 @@ { "name": "@react-native-windows/find-repo-root", - "version": "0.0.0-canary.53", + "version": "0.0.0-canary.54", "license": "MIT", "scripts": { "build": "rnw-scripts build", @@ -16,15 +16,15 @@ "directory": "packages/@react-native-windows/find-repo-root" }, "dependencies": { - "@react-native-windows/fs": "^0.0.0-canary.24", + "@react-native-windows/fs": "^0.0.0-canary.25", "find-up": "^4.1.0" }, "devDependencies": { - "@rnw-scripts/eslint-config": "1.2.1", - "@rnw-scripts/just-task": "2.3.12", - "@rnw-scripts/ts-config": "2.0.4", + "@rnw-scripts/eslint-config": "1.2.2", + "@rnw-scripts/just-task": "2.3.13", + "@rnw-scripts/ts-config": "2.0.5", "@types/find-up": "^4.0.0", - "@types/node": "^16.0.0", + "@types/node": "^18.0.0", "@typescript-eslint/eslint-plugin": "^5.30.5", "@typescript-eslint/parser": "^5.57.1", "eslint": "^8.19.0", @@ -44,6 +44,6 @@ "lib-commonjs" ], "engines": { - "node": ">= 16" + "node": ">= 18" } } diff --git a/packages/@react-native-windows/fs/CHANGELOG.json b/packages/@react-native-windows/fs/CHANGELOG.json index a069986cec9..b9d58394f6a 100644 --- a/packages/@react-native-windows/fs/CHANGELOG.json +++ b/packages/@react-native-windows/fs/CHANGELOG.json @@ -1,6 +1,39 @@ { "name": "@react-native-windows/fs", "entries": [ + { + "date": "Fri, 14 Jul 2023 05:17:05 GMT", + "tag": "@react-native-windows/fs_v0.0.0-canary.25", + "version": "0.0.0-canary.25", + "comments": { + "prerelease": [ + { + "author": "tatianakapos@microsoft.com", + "package": "@react-native-windows/fs", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844", + "comment": "integration 6/28" + }, + { + "author": "beachball", + "package": "@react-native-windows/fs", + "comment": "Bump @rnw-scripts/eslint-config to v1.2.2", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/fs", + "comment": "Bump @rnw-scripts/just-task to v2.3.13", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/fs", + "comment": "Bump @rnw-scripts/ts-config to v2.0.5", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + } + ] + } + }, { "date": "Sat, 01 Jul 2023 05:14:42 GMT", "tag": "@react-native-windows/fs_v0.0.0-canary.24", diff --git a/packages/@react-native-windows/fs/CHANGELOG.md b/packages/@react-native-windows/fs/CHANGELOG.md index bc12344b6bb..3b00b351c52 100644 --- a/packages/@react-native-windows/fs/CHANGELOG.md +++ b/packages/@react-native-windows/fs/CHANGELOG.md @@ -1,9 +1,20 @@ # Change Log - @react-native-windows/fs -This log was last generated on Sat, 01 Jul 2023 05:14:42 GMT and should not be manually modified. +This log was last generated on Fri, 14 Jul 2023 05:17:05 GMT and should not be manually modified. +## 0.0.0-canary.25 + +Fri, 14 Jul 2023 05:17:05 GMT + +### Changes + +- integration 6/28 (tatianakapos@microsoft.com) +- Bump @rnw-scripts/eslint-config to v1.2.2 +- Bump @rnw-scripts/just-task to v2.3.13 +- Bump @rnw-scripts/ts-config to v2.0.5 + ## 0.0.0-canary.24 Sat, 01 Jul 2023 05:14:42 GMT diff --git a/packages/@react-native-windows/fs/package.json b/packages/@react-native-windows/fs/package.json index d72d945d904..4dbfbe0cc57 100644 --- a/packages/@react-native-windows/fs/package.json +++ b/packages/@react-native-windows/fs/package.json @@ -1,7 +1,7 @@ { "name": "@react-native-windows/fs", "description": "A minimal-dependency drop-in replacement to `fs` with changes for resiliency, promises, and convenience.", - "version": "0.0.0-canary.24", + "version": "0.0.0-canary.25", "license": "MIT", "scripts": { "build": "rnw-scripts build", @@ -20,11 +20,11 @@ "graceful-fs": "^4.2.8" }, "devDependencies": { - "@rnw-scripts/eslint-config": "1.2.1", - "@rnw-scripts/just-task": "2.3.12", - "@rnw-scripts/ts-config": "2.0.4", + "@rnw-scripts/eslint-config": "1.2.2", + "@rnw-scripts/just-task": "2.3.13", + "@rnw-scripts/ts-config": "2.0.5", "@types/graceful-fs": "^4.1.5", - "@types/node": "^16.0.0", + "@types/node": "^18.0.0", "@typescript-eslint/eslint-plugin": "^5.30.5", "@typescript-eslint/parser": "^5.57.1", "eslint": "^8.19.0", @@ -45,6 +45,6 @@ }, "promoteRelease": true, "engines": { - "node": ">= 16" + "node": ">= 18" } } diff --git a/packages/@react-native-windows/package-utils/CHANGELOG.json b/packages/@react-native-windows/package-utils/CHANGELOG.json index fc80df35a18..337d0339ca4 100644 --- a/packages/@react-native-windows/package-utils/CHANGELOG.json +++ b/packages/@react-native-windows/package-utils/CHANGELOG.json @@ -1,6 +1,51 @@ { "name": "@react-native-windows/package-utils", "entries": [ + { + "date": "Fri, 14 Jul 2023 05:17:05 GMT", + "tag": "@react-native-windows/package-utils_v0.0.0-canary.51", + "version": "0.0.0-canary.51", + "comments": { + "prerelease": [ + { + "author": "tatianakapos@microsoft.com", + "package": "@react-native-windows/package-utils", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844", + "comment": "integration 6/28" + }, + { + "author": "beachball", + "package": "@react-native-windows/package-utils", + "comment": "Bump @react-native-windows/find-repo-root to v0.0.0-canary.54", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/package-utils", + "comment": "Bump @react-native-windows/fs to v0.0.0-canary.25", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/package-utils", + "comment": "Bump @rnw-scripts/eslint-config to v1.2.2", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/package-utils", + "comment": "Bump @rnw-scripts/just-task to v2.3.13", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/package-utils", + "comment": "Bump @rnw-scripts/ts-config to v2.0.5", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + } + ] + } + }, { "date": "Sat, 01 Jul 2023 05:14:42 GMT", "tag": "@react-native-windows/package-utils_v0.0.0-canary.50", diff --git a/packages/@react-native-windows/package-utils/CHANGELOG.md b/packages/@react-native-windows/package-utils/CHANGELOG.md index 07b5977d253..3a24bfe60f7 100644 --- a/packages/@react-native-windows/package-utils/CHANGELOG.md +++ b/packages/@react-native-windows/package-utils/CHANGELOG.md @@ -1,9 +1,22 @@ # Change Log - @react-native-windows/package-utils -This log was last generated on Sat, 01 Jul 2023 05:14:42 GMT and should not be manually modified. +This log was last generated on Fri, 14 Jul 2023 05:17:05 GMT and should not be manually modified. +## 0.0.0-canary.51 + +Fri, 14 Jul 2023 05:17:05 GMT + +### Changes + +- integration 6/28 (tatianakapos@microsoft.com) +- Bump @react-native-windows/find-repo-root to v0.0.0-canary.54 +- Bump @react-native-windows/fs to v0.0.0-canary.25 +- Bump @rnw-scripts/eslint-config to v1.2.2 +- Bump @rnw-scripts/just-task to v2.3.13 +- Bump @rnw-scripts/ts-config to v2.0.5 + ## 0.0.0-canary.50 Sat, 01 Jul 2023 05:14:42 GMT diff --git a/packages/@react-native-windows/package-utils/package.json b/packages/@react-native-windows/package-utils/package.json index 997599d6adc..b0fe0d3fd21 100644 --- a/packages/@react-native-windows/package-utils/package.json +++ b/packages/@react-native-windows/package-utils/package.json @@ -1,6 +1,6 @@ { "name": "@react-native-windows/package-utils", - "version": "0.0.0-canary.50", + "version": "0.0.0-canary.51", "license": "MIT", "scripts": { "build": "rnw-scripts build", @@ -16,17 +16,17 @@ "directory": "packages/@react-native-windows/package-utils" }, "dependencies": { - "@react-native-windows/find-repo-root": "^0.0.0-canary.53", - "@react-native-windows/fs": "^0.0.0-canary.24", + "@react-native-windows/find-repo-root": "^0.0.0-canary.54", + "@react-native-windows/fs": "^0.0.0-canary.25", "get-monorepo-packages": "^1.2.0", "lodash": "^4.17.15" }, "devDependencies": { - "@rnw-scripts/eslint-config": "1.2.1", - "@rnw-scripts/just-task": "2.3.12", - "@rnw-scripts/ts-config": "2.0.4", + "@rnw-scripts/eslint-config": "1.2.2", + "@rnw-scripts/just-task": "2.3.13", + "@rnw-scripts/ts-config": "2.0.5", "@types/lodash": "^4.14.168", - "@types/node": "^16.0.0", + "@types/node": "^18.0.0", "@typescript-eslint/eslint-plugin": "^5.30.5", "@typescript-eslint/parser": "^5.57.1", "eslint": "^8.19.0", @@ -46,6 +46,6 @@ "lib-commonjs" ], "engines": { - "node": ">= 16" + "node": ">= 18" } } diff --git a/packages/@react-native-windows/telemetry/CHANGELOG.json b/packages/@react-native-windows/telemetry/CHANGELOG.json index 1f0fbc494f7..f798c8544c7 100644 --- a/packages/@react-native-windows/telemetry/CHANGELOG.json +++ b/packages/@react-native-windows/telemetry/CHANGELOG.json @@ -1,6 +1,51 @@ { "name": "@react-native-windows/telemetry", "entries": [ + { + "date": "Fri, 14 Jul 2023 05:17:06 GMT", + "tag": "@react-native-windows/telemetry_v0.0.0-canary.73", + "version": "0.0.0-canary.73", + "comments": { + "prerelease": [ + { + "author": "tatianakapos@microsoft.com", + "package": "@react-native-windows/telemetry", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844", + "comment": "integration 6/28" + }, + { + "author": "beachball", + "package": "@react-native-windows/telemetry", + "comment": "Bump @react-native-windows/fs to v0.0.0-canary.25", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/telemetry", + "comment": "Bump @rnw-scripts/eslint-config to v1.2.2", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/telemetry", + "comment": "Bump @rnw-scripts/jest-unittest-config to v1.5.6", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/telemetry", + "comment": "Bump @rnw-scripts/just-task to v2.3.13", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + }, + { + "author": "beachball", + "package": "@react-native-windows/telemetry", + "comment": "Bump @rnw-scripts/ts-config to v2.0.5", + "commit": "4dae24722d1ea6c9c77e4ade1068aa626f4d2844" + } + ] + } + }, { "date": "Sat, 01 Jul 2023 05:14:42 GMT", "tag": "@react-native-windows/telemetry_v0.0.0-canary.72", diff --git a/packages/@react-native-windows/telemetry/CHANGELOG.md b/packages/@react-native-windows/telemetry/CHANGELOG.md index 500f5e9cd56..38f743255b0 100644 --- a/packages/@react-native-windows/telemetry/CHANGELOG.md +++ b/packages/@react-native-windows/telemetry/CHANGELOG.md @@ -1,9 +1,22 @@ # Change Log - @react-native-windows/telemetry -This log was last generated on Sat, 01 Jul 2023 05:14:42 GMT and should not be manually modified. +This log was last generated on Fri, 14 Jul 2023 05:17:06 GMT and should not be manually modified. +## 0.0.0-canary.73 + +Fri, 14 Jul 2023 05:17:06 GMT + +### Changes + +- integration 6/28 (tatianakapos@microsoft.com) +- Bump @react-native-windows/fs to v0.0.0-canary.25 +- Bump @rnw-scripts/eslint-config to v1.2.2 +- Bump @rnw-scripts/jest-unittest-config to v1.5.6 +- Bump @rnw-scripts/just-task to v2.3.13 +- Bump @rnw-scripts/ts-config to v2.0.5 + ## 0.0.0-canary.72 Sat, 01 Jul 2023 05:14:42 GMT diff --git a/packages/@react-native-windows/telemetry/package.json b/packages/@react-native-windows/telemetry/package.json index 749cb692361..5101c25c214 100644 --- a/packages/@react-native-windows/telemetry/package.json +++ b/packages/@react-native-windows/telemetry/package.json @@ -1,6 +1,6 @@ { "name": "@react-native-windows/telemetry", - "version": "0.0.0-canary.72", + "version": "0.0.0-canary.73", "license": "MIT", "main": "lib-commonjs/index.js", "typings": "lib-commonjs/index.d.ts", @@ -18,7 +18,7 @@ "watch": "rnw-scripts watch" }, "dependencies": { - "@react-native-windows/fs": "^0.0.0-canary.24", + "@react-native-windows/fs": "^0.0.0-canary.25", "@xmldom/xmldom": "^0.7.7", "applicationinsights": "^2.3.1", "ci-info": "^3.2.0", @@ -28,13 +28,13 @@ "xpath": "^0.0.27" }, "devDependencies": { - "@rnw-scripts/eslint-config": "1.2.1", - "@rnw-scripts/jest-unittest-config": "1.5.5", - "@rnw-scripts/just-task": "2.3.12", - "@rnw-scripts/ts-config": "2.0.4", + "@rnw-scripts/eslint-config": "1.2.2", + "@rnw-scripts/jest-unittest-config": "1.5.6", + "@rnw-scripts/just-task": "2.3.13", + "@rnw-scripts/ts-config": "2.0.5", "@types/envinfo": "^7.8.1", "@types/jest": "^29.2.2", - "@types/node": "^16.0.0", + "@types/node": "^18.0.0", "@types/semver": "^7.3.3", "@typescript-eslint/eslint-plugin": "^5.30.5", "@typescript-eslint/parser": "^5.57.1", @@ -60,6 +60,6 @@ "promoteRelease": true, "windowsOnly": true, "engines": { - "node": ">= 16" + "node": ">= 18" } } diff --git a/packages/@react-native-windows/tester/overrides.json b/packages/@react-native-windows/tester/overrides.json index 2da1510b748..aa6846fe023 100644 --- a/packages/@react-native-windows/tester/overrides.json +++ b/packages/@react-native-windows/tester/overrides.json @@ -5,7 +5,7 @@ "excludePatterns": [ "src/js/examples-win/**" ], - "baseVersion": "0.73.0-nightly-20230616-5f8bbf2bd", + "baseVersion": "0.73.0-nightly-20230628-15d735b35", "overrides": [ { "type": "patch", @@ -65,7 +65,7 @@ "type": "derived", "file": "src/js/utils/RNTesterList.windows.js", "baseFile": "packages/rn-tester/js/utils/RNTesterList.android.js", - "baseHash": "8954573b49f8321edea6bd2bdddf814ba2a7226c" + "baseHash": "2d587ef1fb464f6655d7c1c6a2ca235db5aa9288" } ] } \ No newline at end of file diff --git a/packages/@react-native-windows/tester/package.json b/packages/@react-native-windows/tester/package.json index e3c655fa206..f3f4c1b7fbd 100644 --- a/packages/@react-native-windows/tester/package.json +++ b/packages/@react-native-windows/tester/package.json @@ -18,25 +18,25 @@ "peerDependencies": { "@react-native-picker/picker": "2.4.10", "react": "18.0.0", - "react-native": "0.73.0-nightly-20230616-5f8bbf2bd", - "react-native-windows": "^0.0.0-canary.675", + "react-native": "0.73.0-nightly-20230628-15d735b35", + "react-native-windows": "^0.0.0-canary.680", "react-native-xaml": "^0.0.50" }, "devDependencies": { "@react-native/tester": "0.0.1", "@rnw-scripts/babel-react-native-config": "0.0.0", - "@rnw-scripts/eslint-config": "1.2.1", - "@rnw-scripts/just-task": "2.3.12", - "@rnw-scripts/ts-config": "2.0.4", - "@types/node": "^16.0.0", + "@rnw-scripts/eslint-config": "1.2.2", + "@rnw-scripts/just-task": "2.3.13", + "@rnw-scripts/ts-config": "2.0.5", + "@types/node": "^18.0.0", "eslint": "^8.19.0", "just-scripts": "^1.3.3", - "react-native": "0.73.0-nightly-20230616-5f8bbf2bd", - "react-native-platform-override": "^1.9.11", - "react-native-windows": "^0.0.0-canary.675", + "react-native": "0.73.0-nightly-20230628-15d735b35", + "react-native-platform-override": "^1.9.12", + "react-native-windows": "^0.0.0-canary.680", "typescript": "^4.9.5" }, "engines": { - "node": ">= 16" + "node": ">= 18" } } diff --git a/packages/@react-native-windows/tester/src/js/utils/RNTesterList.windows.js b/packages/@react-native-windows/tester/src/js/utils/RNTesterList.windows.js index ac58d48a2a2..fb51dae7914 100644 --- a/packages/@react-native-windows/tester/src/js/utils/RNTesterList.windows.js +++ b/packages/@react-native-windows/tester/src/js/utils/RNTesterList.windows.js @@ -186,7 +186,7 @@ const Components: Array = [ }, ]; -const APIs: Array = [ +const APIs: Array = ([ { key: 'KeyboardFocusExample', category: 'Basic', @@ -252,6 +252,14 @@ const APIs: Array = [ category: 'UI', module: require('../examples/Dimensions/DimensionsExample'), }, + // Only show the link for the example if the API is available. + typeof IntersectionObserver === 'function' + ? { + key: 'IntersectionObserver', + category: 'UI', + module: require('../examples/IntersectionObserver/IntersectionObserverIndex'), + } + : null, { key: 'InvalidPropsExample', module: require('../examples/InvalidProps/InvalidPropsExample'), @@ -366,7 +374,7 @@ const APIs: Array = [ category: 'Basic', module: require('../examples/Performance/PerformanceApiExample'), }, -]; +]: Array).filter(Boolean); if (ReactNativeFeatureFlags.shouldEmitW3CPointerEvents()) { APIs.push({ diff --git a/packages/@react-native/monorepo/overrides.json b/packages/@react-native/monorepo/overrides.json index 5770f3658a8..912138bc794 100644 --- a/packages/@react-native/monorepo/overrides.json +++ b/packages/@react-native/monorepo/overrides.json @@ -1,11 +1,11 @@ { - "baseVersion": "0.73.0-nightly-20230616-5f8bbf2bd", + "baseVersion": "0.73.0-nightly-20230628-15d735b35", "overrides": [ { "type": "patch", "file": "package.json", "baseFile": "package.json", - "baseHash": "cd06b443b63fd90dd852c2637505481994c86db4" + "baseHash": "944dd5b1488bf919e1431f47d115ae43661da064" } ] } \ No newline at end of file diff --git a/packages/@react-native/monorepo/package.json b/packages/@react-native/monorepo/package.json index ec49f31ce65..97b5c855903 100644 --- a/packages/@react-native/monorepo/package.json +++ b/packages/@react-native/monorepo/package.json @@ -25,7 +25,7 @@ "prettier": "prettier --write \"./**/*.{js,md,yml,ts,tsx}\"", "format-check": "prettier --list-different \"./**/*.{js,md,yml,ts,tsx}\"", "update-lock": "npx yarn-deduplicate", - "docker-setup-android": "docker pull reactnativecommunity/react-native-android:8.0", + "docker-setup-android": "docker pull reactnativecommunity/react-native-android:9.0", "docker-build-android": "docker build -t reactnativeci/android -f .circleci/Dockerfiles/Dockerfile.android .", "test-android-run-instrumentation": "docker run --cap-add=SYS_ADMIN -it reactnativeci/android bash .circleci/Dockerfiles/scripts/run-android-docker-instrumentation-tests.sh", "test-android-run-unit": "docker run --cap-add=SYS_ADMIN -it reactnativeci/android bash .circleci/Dockerfiles/scripts/run-android-docker-unit-tests.sh", @@ -77,8 +77,8 @@ "eslint-plugin-react-native": "^4.0.0", "eslint-plugin-redundant-undefined": "^0.4.0", "eslint-plugin-relay": "^1.8.3", - "flow-bin": "^0.209.0", - "hermes-eslint": "0.12.0", + "flow-bin": "^0.210.1", + "hermes-eslint": "0.13.0", "inquirer": "^7.1.0", "jest": "^29.2.1", "jest-junit": "^10.0.0", diff --git a/packages/@react-native/tester/js/RNTesterAppShared.js b/packages/@react-native/tester/js/RNTesterAppShared.js index 3cd8e9d9afa..0949aafca08 100644 --- a/packages/@react-native/tester/js/RNTesterAppShared.js +++ b/packages/@react-native/tester/js/RNTesterAppShared.js @@ -29,6 +29,15 @@ import {BackHandler, StyleSheet, View, useColorScheme} from 'react-native'; // RNTester App currently uses in memory storage for storing navigation state +if (global.RN$Bridgeless) { + require('react-native/Libraries/NativeComponent/NativeComponentRegistry').setRuntimeConfigProvider( + name => { + // In bridgeless mode, never load native ViewConfig. + return {native: false, strict: false, verify: false}; + }, + ); +} + const RNTesterApp = (): React.Node => { const [state, dispatch] = React.useReducer( RNTesterNavigationReducer, diff --git a/packages/@react-native/tester/js/components/RNTTestDetails.js b/packages/@react-native/tester/js/components/RNTTestDetails.js index 1a64dca9ef4..2bc82dedbb5 100644 --- a/packages/@react-native/tester/js/components/RNTTestDetails.js +++ b/packages/@react-native/tester/js/components/RNTTestDetails.js @@ -29,8 +29,12 @@ function RNTTestDetails({ <> {description == null ? null : ( - Description - {description} + + Description + + + {description} + )} {expect == null ? null : ( @@ -78,7 +82,6 @@ const styles = StyleSheet.create({ }, heading: { fontSize: 16, - color: 'grey', fontWeight: '500', }, paragraph: { diff --git a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventCaptureMouse.js b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventCaptureMouse.js index 7ce1b6bf894..680cbb259e8 100644 --- a/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventCaptureMouse.js +++ b/packages/@react-native/tester/js/examples/Experimental/W3CPointerEventPlatformTests/PointerEventCaptureMouse.js @@ -32,12 +32,12 @@ function PointerEventCaptureMouseTestCase( const pointermoveNoCaptureGot1Ref = useRef(false); const ownEventForTheCapturedTargetGotRef = useRef(false); - // const testGotPointerCapture = harness.useAsyncTest( - // 'gotpointercapture event received"', - // ); - // const testLostPointerCapture = harness.useAsyncTest( - // 'lostpointercapture event received"', - // ); + const testGotPointerCapture = harness.useAsyncTest( + 'gotpointercapture event received"', + ); + const testLostPointerCapture = harness.useAsyncTest( + 'lostpointercapture event received"', + ); const handleCaptureButtonDown = useCallback((evt: PointerEvent) => { const target0 = target0Ref.current; @@ -50,20 +50,20 @@ function PointerEventCaptureMouseTestCase( } }, []); - // const handleTarget0GotPointerCapture = useCallback( - // (evt: PointerEvent) => { - // testGotPointerCapture.done(); - // }, - // [testGotPointerCapture], - // ); - - // const handleTarget0LostPointerCapture = useCallback( - // (evt: PointerEvent) => { - // testLostPointerCapture.done(); - // isPointerCaptureRef.current = false; - // }, - // [testLostPointerCapture], - // ); + const handleTarget0GotPointerCapture = useCallback( + (evt: PointerEvent) => { + testGotPointerCapture.done(); + }, + [testGotPointerCapture], + ); + + const handleTarget0LostPointerCapture = useCallback( + (evt: PointerEvent) => { + testLostPointerCapture.done(); + isPointerCaptureRef.current = false; + }, + [testLostPointerCapture], + ); const testPointerMove0 = harness.useAsyncTest( 'pointerover event for black rectangle received', @@ -150,8 +150,8 @@ function PointerEventCaptureMouseTestCase( diff --git a/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverBenchmark.js b/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverBenchmark.js new file mode 100644 index 00000000000..7932f6dc2ff --- /dev/null +++ b/packages/@react-native/tester/js/examples/IntersectionObserver/IntersectionObserverBenchmark.js @@ -0,0 +1,127 @@ +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * @format + * @flow strict-local + */ + +import {RNTesterThemeContext} from '../../components/RNTesterTheme'; + +import * as React from 'react'; +import { + useLayoutEffect, + useState, + useRef, + type ElementRef, + useContext, +} from 'react'; +import {Button, ScrollView, StyleSheet, Text, View} from 'react-native'; + +export const name = 'IntersectionObserver Benchmark'; +export const title = name; +export const description = + 'Example of using IntersectionObserver to observe a large amount of UI elements'; + +export function render(): React.Node { + return ; +} + +const ROWS = 100; +const COLUMNS = 5; + +function IntersectionObserverBenchark(): React.Node { + const [isObserving, setObserving] = useState(false); + + return ( + <> + +