react-native-windows 0.81.2 → 0.81.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/Libraries/Components/Pressable/Pressable.d.ts +8 -0
  2. package/Libraries/Components/Pressable/Pressable.windows.js +21 -2
  3. package/Microsoft.ReactNative/ABIViewManager.cpp +12 -1
  4. package/Microsoft.ReactNative/CompositionSwitcher.idl +16 -9
  5. package/Microsoft.ReactNative/Fabric/ComponentView.cpp +26 -0
  6. package/Microsoft.ReactNative/Fabric/ComponentView.h +2 -0
  7. package/Microsoft.ReactNative/Fabric/Composition/ActivityIndicatorComponentView.cpp +0 -1
  8. package/Microsoft.ReactNative/Fabric/Composition/CompositionAnnotationProvider.cpp +2 -5
  9. package/Microsoft.ReactNative/Fabric/Composition/CompositionAnnotationProvider.h +1 -4
  10. package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +15 -0
  11. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +65 -32
  12. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h +9 -0
  13. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +8 -0
  14. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp +2 -1
  15. package/Microsoft.ReactNative/Fabric/Composition/CompositionTextProvider.cpp +4 -7
  16. package/Microsoft.ReactNative/Fabric/Composition/CompositionTextProvider.h +1 -5
  17. package/Microsoft.ReactNative/Fabric/Composition/CompositionTextRangeProvider.cpp +68 -53
  18. package/Microsoft.ReactNative/Fabric/Composition/CompositionTextRangeProvider.h +1 -5
  19. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +98 -15
  20. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +10 -3
  21. package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp +73 -10
  22. package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +11 -1
  23. package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp +3 -2
  24. package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp +0 -1
  25. package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +609 -4
  26. package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.h +63 -0
  27. package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.cpp +8 -0
  28. package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +3 -0
  29. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +53 -2
  30. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +8 -1
  31. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +0 -1
  32. package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +0 -1
  33. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +3 -1
  34. package/Microsoft.ReactNative/Fabric/Composition/Theme.cpp +6 -0
  35. package/Microsoft.ReactNative/Fabric/Composition/TooltipService.cpp +1 -1
  36. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +36 -14
  37. package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +0 -1
  38. package/Microsoft.ReactNative/Fabric/ReactTaggedView.h +1 -1
  39. package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/WindowsTextLayoutManager.h +2 -1
  40. package/Microsoft.ReactNative/IReactViewComponentBuilder.idl +8 -0
  41. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +1 -0
  42. package/Microsoft.ReactNative/Modules/ImageViewManagerModule.cpp +41 -15
  43. package/Microsoft.ReactNative/Utils/IcuUtils.cpp +84 -0
  44. package/Microsoft.ReactNative/Utils/IcuUtils.h +42 -0
  45. package/Microsoft.ReactNative.Cxx/StructInfo.h +8 -1
  46. package/Mso/src/dispatchQueue/queueService.cpp +3 -1
  47. package/Mso/src/dispatchQueue/uiScheduler_winrt.cpp +2 -1
  48. package/PropertySheets/Generated/PackageVersion.g.props +3 -3
  49. package/Shared/Networking/OriginPolicyHttpFilter.cpp +2 -1
  50. package/Shared/Shared.vcxitems +1 -0
  51. package/Shared/Shared.vcxitems.filters +1 -0
  52. package/codegen/react/components/rnwcore/ActivityIndicatorView.g.h +14 -0
  53. package/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h +34 -20
  54. package/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h +14 -0
  55. package/codegen/react/components/rnwcore/AndroidProgressBar.g.h +14 -0
  56. package/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h +18 -4
  57. package/codegen/react/components/rnwcore/AndroidSwitch.g.h +18 -4
  58. package/codegen/react/components/rnwcore/DebuggingOverlay.g.h +14 -0
  59. package/codegen/react/components/rnwcore/InputAccessory.g.h +14 -0
  60. package/codegen/react/components/rnwcore/ModalHostView.g.h +32 -18
  61. package/codegen/react/components/rnwcore/PullToRefreshView.g.h +18 -4
  62. package/codegen/react/components/rnwcore/SafeAreaView.g.h +14 -0
  63. package/codegen/react/components/rnwcore/Switch.g.h +18 -4
  64. package/codegen/react/components/rnwcore/UnimplementedNativeView.g.h +14 -0
  65. package/codegen/react/components/rnwcore/VirtualView.g.h +48 -6
  66. package/package.json +3 -3
@@ -83,53 +83,53 @@ struct ModalHostViewProps : winrt::implements<ModalHostViewProps, winrt::Microso
83
83
  const winrt::Microsoft::ReactNative::ViewProps ViewProps;
84
84
  };
85
85
 
86
- REACT_STRUCT(ModalHostView_OnRequestClose)
87
- struct ModalHostView_OnRequestClose {
86
+ REACT_STRUCT(ModalHostViewSpec_onOrientationChange)
87
+ struct ModalHostViewSpec_onOrientationChange {
88
+ REACT_FIELD(orientation)
89
+ std::string orientation;
88
90
  };
89
91
 
90
- REACT_STRUCT(ModalHostView_OnShow)
91
- struct ModalHostView_OnShow {
92
+ REACT_STRUCT(ModalHostViewSpec_onDismiss)
93
+ struct ModalHostViewSpec_onDismiss {
92
94
  };
93
95
 
94
- REACT_STRUCT(ModalHostView_OnDismiss)
95
- struct ModalHostView_OnDismiss {
96
+ REACT_STRUCT(ModalHostViewSpec_onShow)
97
+ struct ModalHostViewSpec_onShow {
96
98
  };
97
99
 
98
- REACT_STRUCT(ModalHostView_OnOrientationChange)
99
- struct ModalHostView_OnOrientationChange {
100
- REACT_FIELD(orientation)
101
- std::string orientation;
100
+ REACT_STRUCT(ModalHostViewSpec_onRequestClose)
101
+ struct ModalHostViewSpec_onRequestClose {
102
102
  };
103
103
 
104
104
  struct ModalHostViewEventEmitter {
105
105
  ModalHostViewEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter)
106
106
  : m_eventEmitter(eventEmitter) {}
107
107
 
108
- using OnRequestClose = ModalHostView_OnRequestClose;
109
- using OnShow = ModalHostView_OnShow;
110
- using OnDismiss = ModalHostView_OnDismiss;
111
- using OnOrientationChange = ModalHostView_OnOrientationChange;
108
+ using OnRequestClose = ModalHostViewSpec_onRequestClose;
109
+ using OnShow = ModalHostViewSpec_onShow;
110
+ using OnDismiss = ModalHostViewSpec_onDismiss;
111
+ using OnOrientationChange = ModalHostViewSpec_onOrientationChange;
112
112
 
113
113
  void onRequestClose(OnRequestClose &value) const {
114
- m_eventEmitter.DispatchEvent(L"requestClose", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
114
+ m_eventEmitter.DispatchEvent(L"requestClose", [&value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
115
115
  winrt::Microsoft::ReactNative::WriteValue(writer, value);
116
116
  });
117
117
  }
118
118
 
119
119
  void onShow(OnShow &value) const {
120
- m_eventEmitter.DispatchEvent(L"show", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
120
+ m_eventEmitter.DispatchEvent(L"show", [&value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
121
121
  winrt::Microsoft::ReactNative::WriteValue(writer, value);
122
122
  });
123
123
  }
124
124
 
125
125
  void onDismiss(OnDismiss &value) const {
126
- m_eventEmitter.DispatchEvent(L"dismiss", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
126
+ m_eventEmitter.DispatchEvent(L"dismiss", [&value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
127
127
  winrt::Microsoft::ReactNative::WriteValue(writer, value);
128
128
  });
129
129
  }
130
130
 
131
131
  void onOrientationChange(OnOrientationChange &value) const {
132
- m_eventEmitter.DispatchEvent(L"orientationChange", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
132
+ m_eventEmitter.DispatchEvent(L"orientationChange", [&value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
133
133
  winrt::Microsoft::ReactNative::WriteValue(writer, value);
134
134
  });
135
135
  }
@@ -189,6 +189,12 @@ struct BaseModalHostView {
189
189
  winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept {
190
190
  }
191
191
 
192
+ // CreateAutomationPeer will only be called if this method is overridden
193
+ virtual winrt::Windows::Foundation::IInspectable CreateAutomationPeer(const winrt::Microsoft::ReactNative::ComponentView & /*view*/,
194
+ const winrt::Microsoft::ReactNative::CreateAutomationPeerArgs& /*args*/) noexcept {
195
+ return nullptr;
196
+ }
197
+
192
198
 
193
199
 
194
200
  const std::shared_ptr<ModalHostViewEventEmitter>& EventEmitter() const { return m_eventEmitter; }
@@ -264,6 +270,14 @@ void RegisterModalHostViewNativeComponent(
264
270
  });
265
271
  }
266
272
 
273
+ if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateAutomationPeer != &BaseModalHostView<TUserData>::CreateAutomationPeer) {
274
+ builder.SetCreateAutomationPeerHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
275
+ const winrt::Microsoft::ReactNative::CreateAutomationPeerArgs& args) noexcept {
276
+ auto userData = view.UserData().as<TUserData>();
277
+ return userData->CreateAutomationPeer(view, args);
278
+ });
279
+ }
280
+
267
281
  compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept {
268
282
  auto userData = winrt::make_self<TUserData>();
269
283
  if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseModalHostView<TUserData>::Initialize) {
@@ -55,18 +55,18 @@ struct PullToRefreshViewProps : winrt::implements<PullToRefreshViewProps, winrt:
55
55
  const winrt::Microsoft::ReactNative::ViewProps ViewProps;
56
56
  };
57
57
 
58
- REACT_STRUCT(PullToRefreshView_OnRefresh)
59
- struct PullToRefreshView_OnRefresh {
58
+ REACT_STRUCT(PullToRefreshViewSpec_onRefresh)
59
+ struct PullToRefreshViewSpec_onRefresh {
60
60
  };
61
61
 
62
62
  struct PullToRefreshViewEventEmitter {
63
63
  PullToRefreshViewEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter)
64
64
  : m_eventEmitter(eventEmitter) {}
65
65
 
66
- using OnRefresh = PullToRefreshView_OnRefresh;
66
+ using OnRefresh = PullToRefreshViewSpec_onRefresh;
67
67
 
68
68
  void onRefresh(OnRefresh &value) const {
69
- m_eventEmitter.DispatchEvent(L"refresh", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
69
+ m_eventEmitter.DispatchEvent(L"refresh", [&value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
70
70
  winrt::Microsoft::ReactNative::WriteValue(writer, value);
71
71
  });
72
72
  }
@@ -126,6 +126,12 @@ struct BasePullToRefreshView {
126
126
  winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept {
127
127
  }
128
128
 
129
+ // CreateAutomationPeer will only be called if this method is overridden
130
+ virtual winrt::Windows::Foundation::IInspectable CreateAutomationPeer(const winrt::Microsoft::ReactNative::ComponentView & /*view*/,
131
+ const winrt::Microsoft::ReactNative::CreateAutomationPeerArgs& /*args*/) noexcept {
132
+ return nullptr;
133
+ }
134
+
129
135
  // You must provide an implementation of this method to handle the "setNativeRefreshing" command
130
136
  virtual void HandleSetNativeRefreshingCommand(bool refreshing) noexcept = 0;
131
137
 
@@ -219,6 +225,14 @@ void RegisterPullToRefreshViewNativeComponent(
219
225
  });
220
226
  }
221
227
 
228
+ if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateAutomationPeer != &BasePullToRefreshView<TUserData>::CreateAutomationPeer) {
229
+ builder.SetCreateAutomationPeerHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
230
+ const winrt::Microsoft::ReactNative::CreateAutomationPeerArgs& args) noexcept {
231
+ auto userData = view.UserData().as<TUserData>();
232
+ return userData->CreateAutomationPeer(view, args);
233
+ });
234
+ }
235
+
222
236
  compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept {
223
237
  auto userData = winrt::make_self<TUserData>();
224
238
  if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BasePullToRefreshView<TUserData>::Initialize) {
@@ -95,6 +95,12 @@ struct BaseSafeAreaView {
95
95
  winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept {
96
96
  }
97
97
 
98
+ // CreateAutomationPeer will only be called if this method is overridden
99
+ virtual winrt::Windows::Foundation::IInspectable CreateAutomationPeer(const winrt::Microsoft::ReactNative::ComponentView & /*view*/,
100
+ const winrt::Microsoft::ReactNative::CreateAutomationPeerArgs& /*args*/) noexcept {
101
+ return nullptr;
102
+ }
103
+
98
104
 
99
105
 
100
106
  const std::shared_ptr<SafeAreaViewEventEmitter>& EventEmitter() const { return m_eventEmitter; }
@@ -170,6 +176,14 @@ void RegisterSafeAreaViewNativeComponent(
170
176
  });
171
177
  }
172
178
 
179
+ if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateAutomationPeer != &BaseSafeAreaView<TUserData>::CreateAutomationPeer) {
180
+ builder.SetCreateAutomationPeerHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
181
+ const winrt::Microsoft::ReactNative::CreateAutomationPeerArgs& args) noexcept {
182
+ auto userData = view.UserData().as<TUserData>();
183
+ return userData->CreateAutomationPeer(view, args);
184
+ });
185
+ }
186
+
173
187
  compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept {
174
188
  auto userData = winrt::make_self<TUserData>();
175
189
  if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseSafeAreaView<TUserData>::Initialize) {
@@ -67,8 +67,8 @@ struct SwitchProps : winrt::implements<SwitchProps, winrt::Microsoft::ReactNativ
67
67
  const winrt::Microsoft::ReactNative::ViewProps ViewProps;
68
68
  };
69
69
 
70
- REACT_STRUCT(Switch_OnChange)
71
- struct Switch_OnChange {
70
+ REACT_STRUCT(SwitchSpec_onChange)
71
+ struct SwitchSpec_onChange {
72
72
  REACT_FIELD(value)
73
73
  bool value{};
74
74
 
@@ -80,10 +80,10 @@ struct SwitchEventEmitter {
80
80
  SwitchEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter)
81
81
  : m_eventEmitter(eventEmitter) {}
82
82
 
83
- using OnChange = Switch_OnChange;
83
+ using OnChange = SwitchSpec_onChange;
84
84
 
85
85
  void onChange(OnChange &value) const {
86
- m_eventEmitter.DispatchEvent(L"change", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
86
+ m_eventEmitter.DispatchEvent(L"change", [&value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
87
87
  winrt::Microsoft::ReactNative::WriteValue(writer, value);
88
88
  });
89
89
  }
@@ -143,6 +143,12 @@ struct BaseSwitch {
143
143
  winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept {
144
144
  }
145
145
 
146
+ // CreateAutomationPeer will only be called if this method is overridden
147
+ virtual winrt::Windows::Foundation::IInspectable CreateAutomationPeer(const winrt::Microsoft::ReactNative::ComponentView & /*view*/,
148
+ const winrt::Microsoft::ReactNative::CreateAutomationPeerArgs& /*args*/) noexcept {
149
+ return nullptr;
150
+ }
151
+
146
152
  // You must provide an implementation of this method to handle the "setValue" command
147
153
  virtual void HandleSetValueCommand(bool value) noexcept = 0;
148
154
 
@@ -236,6 +242,14 @@ void RegisterSwitchNativeComponent(
236
242
  });
237
243
  }
238
244
 
245
+ if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateAutomationPeer != &BaseSwitch<TUserData>::CreateAutomationPeer) {
246
+ builder.SetCreateAutomationPeerHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
247
+ const winrt::Microsoft::ReactNative::CreateAutomationPeerArgs& args) noexcept {
248
+ auto userData = view.UserData().as<TUserData>();
249
+ return userData->CreateAutomationPeer(view, args);
250
+ });
251
+ }
252
+
239
253
  compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept {
240
254
  auto userData = winrt::make_self<TUserData>();
241
255
  if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseSwitch<TUserData>::Initialize) {
@@ -98,6 +98,12 @@ struct BaseUnimplementedNativeView {
98
98
  winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept {
99
99
  }
100
100
 
101
+ // CreateAutomationPeer will only be called if this method is overridden
102
+ virtual winrt::Windows::Foundation::IInspectable CreateAutomationPeer(const winrt::Microsoft::ReactNative::ComponentView & /*view*/,
103
+ const winrt::Microsoft::ReactNative::CreateAutomationPeerArgs& /*args*/) noexcept {
104
+ return nullptr;
105
+ }
106
+
101
107
 
102
108
 
103
109
  const std::shared_ptr<UnimplementedNativeViewEventEmitter>& EventEmitter() const { return m_eventEmitter; }
@@ -173,6 +179,14 @@ void RegisterUnimplementedNativeViewNativeComponent(
173
179
  });
174
180
  }
175
181
 
182
+ if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateAutomationPeer != &BaseUnimplementedNativeView<TUserData>::CreateAutomationPeer) {
183
+ builder.SetCreateAutomationPeerHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
184
+ const winrt::Microsoft::ReactNative::CreateAutomationPeerArgs& args) noexcept {
185
+ auto userData = view.UserData().as<TUserData>();
186
+ return userData->CreateAutomationPeer(view, args);
187
+ });
188
+ }
189
+
176
190
  compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept {
177
191
  auto userData = winrt::make_self<TUserData>();
178
192
  if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseUnimplementedNativeView<TUserData>::Initialize) {
@@ -43,8 +43,38 @@ struct VirtualViewProps : winrt::implements<VirtualViewProps, winrt::Microsoft::
43
43
  const winrt::Microsoft::ReactNative::ViewProps ViewProps;
44
44
  };
45
45
 
46
- REACT_STRUCT(VirtualView_OnModeChange)
47
- struct VirtualView_OnModeChange {
46
+ REACT_STRUCT(VirtualViewSpec_onModeChange3)
47
+ struct VirtualViewSpec_onModeChange3 {
48
+ REACT_FIELD(x)
49
+ double x{};
50
+
51
+ REACT_FIELD(y)
52
+ double y{};
53
+
54
+ REACT_FIELD(width)
55
+ double width{};
56
+
57
+ REACT_FIELD(height)
58
+ double height{};
59
+ };
60
+
61
+ REACT_STRUCT(VirtualViewSpec_onModeChange2)
62
+ struct VirtualViewSpec_onModeChange2 {
63
+ REACT_FIELD(x)
64
+ double x{};
65
+
66
+ REACT_FIELD(y)
67
+ double y{};
68
+
69
+ REACT_FIELD(width)
70
+ double width{};
71
+
72
+ REACT_FIELD(height)
73
+ double height{};
74
+ };
75
+
76
+ REACT_STRUCT(VirtualViewSpec_onModeChange)
77
+ struct VirtualViewSpec_onModeChange {
48
78
  REACT_FIELD(mode)
49
79
  int32_t mode{};
50
80
 
@@ -59,12 +89,10 @@ struct VirtualViewEventEmitter {
59
89
  VirtualViewEventEmitter(const winrt::Microsoft::ReactNative::EventEmitter &eventEmitter)
60
90
  : m_eventEmitter(eventEmitter) {}
61
91
 
62
- using OnModeChange = VirtualView_OnModeChange;
63
- using OnModeChange2 = VirtualView_OnModeChange2;
64
- using OnModeChange3 = VirtualView_OnModeChange3;
92
+ using OnModeChange = VirtualViewSpec_onModeChange;
65
93
 
66
94
  void onModeChange(OnModeChange &value) const {
67
- m_eventEmitter.DispatchEvent(L"modeChange", [value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
95
+ m_eventEmitter.DispatchEvent(L"modeChange", [&value](const winrt::Microsoft::ReactNative::IJSValueWriter writer) {
68
96
  winrt::Microsoft::ReactNative::WriteValue(writer, value);
69
97
  });
70
98
  }
@@ -124,6 +152,12 @@ struct BaseVirtualView {
124
152
  winrt::Microsoft::ReactNative::ComponentViewUpdateMask /*mask*/) noexcept {
125
153
  }
126
154
 
155
+ // CreateAutomationPeer will only be called if this method is overridden
156
+ virtual winrt::Windows::Foundation::IInspectable CreateAutomationPeer(const winrt::Microsoft::ReactNative::ComponentView & /*view*/,
157
+ const winrt::Microsoft::ReactNative::CreateAutomationPeerArgs& /*args*/) noexcept {
158
+ return nullptr;
159
+ }
160
+
127
161
 
128
162
 
129
163
  const std::shared_ptr<VirtualViewEventEmitter>& EventEmitter() const { return m_eventEmitter; }
@@ -199,6 +233,14 @@ void RegisterVirtualViewNativeComponent(
199
233
  });
200
234
  }
201
235
 
236
+ if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::CreateAutomationPeer != &BaseVirtualView<TUserData>::CreateAutomationPeer) {
237
+ builder.SetCreateAutomationPeerHandler([](const winrt::Microsoft::ReactNative::ComponentView &view,
238
+ const winrt::Microsoft::ReactNative::CreateAutomationPeerArgs& args) noexcept {
239
+ auto userData = view.UserData().as<TUserData>();
240
+ return userData->CreateAutomationPeer(view, args);
241
+ });
242
+ }
243
+
202
244
  compBuilder.SetViewComponentViewInitializer([](const winrt::Microsoft::ReactNative::ComponentView &view) noexcept {
203
245
  auto userData = winrt::make_self<TUserData>();
204
246
  if CONSTEXPR_SUPPORTED_ON_VIRTUAL_FN_ADDRESS (&TUserData::Initialize != &BaseVirtualView<TUserData>::Initialize) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-windows",
3
- "version": "0.81.2",
3
+ "version": "0.81.4",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,7 +26,7 @@
26
26
  "@react-native-community/cli": "17.0.0",
27
27
  "@react-native-community/cli-platform-android": "17.0.0",
28
28
  "@react-native-community/cli-platform-ios": "17.0.0",
29
- "@react-native-windows/cli": "0.81.0",
29
+ "@react-native-windows/cli": "0.81.2",
30
30
  "@react-native/assets": "1.0.0",
31
31
  "@react-native/assets-registry": "0.81.5",
32
32
  "@react-native/codegen": "0.81.5",
@@ -68,7 +68,7 @@
68
68
  "yargs": "^17.6.2"
69
69
  },
70
70
  "devDependencies": {
71
- "@react-native-windows/codegen": "0.81.0",
71
+ "@react-native-windows/codegen": "0.81.2",
72
72
  "@react-native/metro-config": "0.81.5",
73
73
  "@rnw-scripts/babel-react-native-config": "0.0.0",
74
74
  "@rnw-scripts/eslint-config": "1.2.37",