react-native-windows 0.76.2 → 0.76.3

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 (113) hide show
  1. package/Libraries/Components/View/View.windows.js +76 -52
  2. package/Libraries/Modal/Modal.windows.js +352 -0
  3. package/Libraries/Text/Text.windows.js +1 -1
  4. package/Microsoft.ReactNative/CompositionComponentView.idl +2 -1
  5. package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp +4 -1
  6. package/Microsoft.ReactNative/Fabric/AbiViewComponentDescriptor.cpp +1 -1
  7. package/Microsoft.ReactNative/Fabric/AbiViewProps.cpp +7 -0
  8. package/Microsoft.ReactNative/Fabric/AbiViewProps.h +2 -0
  9. package/Microsoft.ReactNative/Fabric/ComponentView.cpp +45 -50
  10. package/Microsoft.ReactNative/Fabric/ComponentView.h +14 -22
  11. package/Microsoft.ReactNative/Fabric/Composition/BorderPrimitive.cpp +943 -0
  12. package/Microsoft.ReactNative/Fabric/Composition/BorderPrimitive.h +80 -0
  13. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +26 -3
  14. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +187 -6
  15. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +10 -1
  16. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp +8 -32
  17. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +336 -929
  18. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +32 -29
  19. package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp +9 -2
  20. package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +2 -1
  21. package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp +1 -1
  22. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +181 -123
  23. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +16 -8
  24. package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.cpp +99 -37
  25. package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +25 -3
  26. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +63 -2
  27. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +12 -0
  28. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +51 -3
  29. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +3 -0
  30. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +18 -8
  31. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.h +3 -0
  32. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +54 -5
  33. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.h +8 -0
  34. package/Microsoft.ReactNative/Fabric/Composition/Theme.cpp +9 -3
  35. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +11 -0
  36. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +2 -0
  37. package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +1 -1
  38. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewTraitsInitializer.h +1 -5
  39. package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +26 -0
  40. package/Microsoft.ReactNative/IReactViewComponentBuilder.idl +1 -1
  41. package/Microsoft.ReactNative/ReactNativeIsland.idl +3 -2
  42. package/Microsoft.ReactNative/ViewProps.idl +2 -0
  43. package/Microsoft.ReactNative.Cxx/ComponentView.Experimental.interop.h +14 -0
  44. package/PropertySheets/Generated/PackageVersion.g.props +3 -3
  45. package/Shared/Shared.vcxitems +3 -0
  46. package/Shared/Shared.vcxitems.filters +1 -0
  47. package/codegen/NativeAccessibilityInfoSpec.g.h +1 -0
  48. package/codegen/NativeAccessibilityManagerSpec.g.h +1 -0
  49. package/codegen/NativeActionSheetManagerSpec.g.h +1 -0
  50. package/codegen/NativeAlertManagerSpec.g.h +1 -0
  51. package/codegen/NativeAnimatedModuleSpec.g.h +1 -0
  52. package/codegen/NativeAnimatedTurboModuleSpec.g.h +1 -0
  53. package/codegen/NativeAppStateSpec.g.h +1 -0
  54. package/codegen/NativeAppThemeSpec.g.h +1 -0
  55. package/codegen/NativeAppearanceSpec.g.h +1 -0
  56. package/codegen/NativeBlobModuleSpec.g.h +1 -0
  57. package/codegen/NativeBugReportingSpec.g.h +1 -0
  58. package/codegen/NativeClipboardSpec.g.h +1 -0
  59. package/codegen/NativeDOMSpec.g.h +1 -0
  60. package/codegen/NativeDevLoadingViewSpec.g.h +1 -0
  61. package/codegen/NativeDevMenuSpec.g.h +1 -0
  62. package/codegen/NativeDevSettingsSpec.g.h +1 -0
  63. package/codegen/NativeDevToolsSettingsManagerSpec.g.h +1 -0
  64. package/codegen/NativeDeviceEventManagerSpec.g.h +1 -0
  65. package/codegen/NativeDeviceInfoSpec.g.h +1 -0
  66. package/codegen/NativeDialogManagerAndroidSpec.g.h +1 -0
  67. package/codegen/NativeDialogManagerWindowsSpec.g.h +1 -0
  68. package/codegen/NativeExceptionsManagerSpec.g.h +1 -0
  69. package/codegen/NativeFileReaderModuleSpec.g.h +1 -0
  70. package/codegen/NativeFrameRateLoggerSpec.g.h +1 -0
  71. package/codegen/NativeHeadlessJsTaskSupportSpec.g.h +1 -0
  72. package/codegen/NativeI18nManagerSpec.g.h +1 -0
  73. package/codegen/NativeIdleCallbacksSpec.g.h +1 -0
  74. package/codegen/NativeImageEditorSpec.g.h +1 -0
  75. package/codegen/NativeImageLoaderAndroidSpec.g.h +1 -0
  76. package/codegen/NativeImageLoaderIOSSpec.g.h +1 -0
  77. package/codegen/NativeImageStoreAndroidSpec.g.h +1 -0
  78. package/codegen/NativeImageStoreIOSSpec.g.h +1 -0
  79. package/codegen/NativeIntentAndroidSpec.g.h +1 -0
  80. package/codegen/NativeIntersectionObserverSpec.g.h +1 -0
  81. package/codegen/NativeJSCHeapCaptureSpec.g.h +1 -0
  82. package/codegen/NativeJSCSamplingProfilerSpec.g.h +1 -0
  83. package/codegen/NativeKeyboardObserverSpec.g.h +1 -0
  84. package/codegen/NativeLinkingManagerSpec.g.h +1 -0
  85. package/codegen/NativeLogBoxSpec.g.h +1 -0
  86. package/codegen/NativeMicrotasksSpec.g.h +1 -0
  87. package/codegen/NativeModalManagerSpec.g.h +1 -0
  88. package/codegen/NativeMutationObserverSpec.g.h +1 -0
  89. package/codegen/NativeNetworkingAndroidSpec.g.h +1 -0
  90. package/codegen/NativeNetworkingIOSSpec.g.h +1 -0
  91. package/codegen/NativePerformanceObserverSpec.g.h +1 -0
  92. package/codegen/NativePerformanceSpec.g.h +1 -0
  93. package/codegen/NativePermissionsAndroidSpec.g.h +1 -0
  94. package/codegen/NativePlatformConstantsAndroidSpec.g.h +1 -0
  95. package/codegen/NativePlatformConstantsIOSSpec.g.h +1 -0
  96. package/codegen/NativePlatformConstantsWindowsSpec.g.h +1 -0
  97. package/codegen/NativePushNotificationManagerIOSSpec.g.h +1 -0
  98. package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +1 -0
  99. package/codegen/NativeRedBoxSpec.g.h +1 -0
  100. package/codegen/NativeSampleTurboModuleSpec.g.h +1 -0
  101. package/codegen/NativeSegmentFetcherSpec.g.h +1 -0
  102. package/codegen/NativeSettingsManagerSpec.g.h +1 -0
  103. package/codegen/NativeShareModuleSpec.g.h +1 -0
  104. package/codegen/NativeSoundManagerSpec.g.h +1 -0
  105. package/codegen/NativeSourceCodeSpec.g.h +1 -0
  106. package/codegen/NativeStatusBarManagerAndroidSpec.g.h +1 -0
  107. package/codegen/NativeStatusBarManagerIOSSpec.g.h +1 -0
  108. package/codegen/NativeTimingSpec.g.h +1 -0
  109. package/codegen/NativeToastAndroidSpec.g.h +1 -0
  110. package/codegen/NativeUIManagerSpec.g.h +1 -0
  111. package/codegen/NativeVibrationSpec.g.h +1 -0
  112. package/codegen/NativeWebSocketModuleSpec.g.h +1 -0
  113. package/package.json +3 -3
@@ -22,11 +22,12 @@ struct RootComponentView;
22
22
 
23
23
  namespace winrt::Microsoft::ReactNative::implementation {
24
24
 
25
- ComponentView::ComponentView(facebook::react::Tag tag, winrt::Microsoft::ReactNative::ReactContext const &reactContext)
26
- : m_tag(tag), m_reactContext(reactContext) {}
27
-
28
- void ComponentView::MarkAsCustomComponent() noexcept {
29
- m_customComponent = true;
25
+ ComponentView::ComponentView(
26
+ facebook::react::Tag tag,
27
+ winrt::Microsoft::ReactNative::ReactContext const &reactContext,
28
+ winrt::Microsoft::ReactNative::Composition::ReactCompositionViewComponentBuilder *builder)
29
+ : m_tag(tag), m_reactContext(reactContext) {
30
+ m_builder.copy_from(builder);
30
31
  }
31
32
 
32
33
  std::vector<facebook::react::ComponentDescriptorProvider>
@@ -52,18 +53,15 @@ void ComponentView::MountChildComponentView(
52
53
  uint32_t index) noexcept {
53
54
  m_children.InsertAt(index, childComponentView);
54
55
  winrt::get_self<winrt::Microsoft::ReactNative::implementation::ComponentView>(childComponentView)->parent(*this);
55
- if (m_mountChildComponentViewHandler) {
56
- m_mountChildComponentViewHandler(*this, winrt::make<MountChildComponentViewArgs>(childComponentView, index));
56
+ if (m_builder && m_builder->MountChildComponentViewHandler()) {
57
+ m_builder->MountChildComponentViewHandler()(
58
+ *this, winrt::make<MountChildComponentViewArgs>(childComponentView, index));
57
59
  }
58
60
  if (m_mounted) {
59
61
  winrt::get_self<winrt::Microsoft::ReactNative::implementation::ComponentView>(childComponentView)->onMounted();
60
62
  }
61
63
  }
62
64
 
63
- void ComponentView::MountChildComponentViewHandler(const MountChildComponentViewDelegate &handler) noexcept {
64
- m_mountChildComponentViewHandler = handler;
65
- }
66
-
67
65
  void ComponentView::onMounted() noexcept {
68
66
  assert(!m_mounted);
69
67
  m_mounted = true;
@@ -73,6 +71,10 @@ void ComponentView::onMounted() noexcept {
73
71
  m_mountedEvent(*this, *this);
74
72
  }
75
73
 
74
+ bool ComponentView::isMounted() noexcept {
75
+ return m_mounted;
76
+ }
77
+
76
78
  winrt::event_token ComponentView::Mounted(
77
79
  winrt::Windows::Foundation::EventHandler<winrt::Microsoft::ReactNative::ComponentView> const &handler) noexcept {
78
80
  return m_mountedEvent.add(handler);
@@ -85,16 +87,14 @@ void ComponentView::Mounted(winrt::event_token const &token) noexcept {
85
87
  void ComponentView::UnmountChildComponentView(
86
88
  const winrt::Microsoft::ReactNative::ComponentView &childComponentView,
87
89
  uint32_t index) noexcept {
88
- if (m_mountChildComponentViewHandler) {
89
- m_mountChildComponentViewHandler(*this, winrt::make<MountChildComponentViewArgs>(childComponentView, index));
90
+ if (m_builder && m_builder->UnmountChildComponentViewHandler()) {
91
+ m_builder->UnmountChildComponentViewHandler()(
92
+ *this, winrt::make<UnmountChildComponentViewArgs>(childComponentView, index));
90
93
  }
91
94
  m_children.RemoveAt(index);
92
95
  winrt::get_self<winrt::Microsoft::ReactNative::implementation::ComponentView>(childComponentView)->parent(nullptr);
93
96
  winrt::get_self<winrt::Microsoft::ReactNative::implementation::ComponentView>(childComponentView)->onUnmounted();
94
97
  }
95
- void ComponentView::UnmountChildComponentViewHandler(const UnmountChildComponentViewDelegate &handler) noexcept {
96
- m_unmountChildComponentViewHandler = handler;
97
- }
98
98
 
99
99
  void ComponentView::onUnmounted() noexcept {
100
100
  if (!m_mounted)
@@ -144,15 +144,11 @@ uint32_t UnmountChildComponentViewArgs::Index() const noexcept {
144
144
  void ComponentView::updateProps(
145
145
  facebook::react::Props::Shared const &props,
146
146
  facebook::react::Props::Shared const &oldProps) noexcept {
147
- if (m_updatePropsDelegate) {
148
- m_updatePropsDelegate(*this, userProps(props), oldProps ? userProps(oldProps) : nullptr);
147
+ if (m_builder && m_builder->UpdatePropsHandler()) {
148
+ m_builder->UpdatePropsHandler()(*this, userProps(props), oldProps ? userProps(oldProps) : nullptr);
149
149
  }
150
150
  }
151
151
 
152
- void ComponentView::UpdatePropsHandler(const UpdatePropsDelegate &handler) noexcept {
153
- m_updatePropsDelegate = handler;
154
- }
155
-
156
152
  const winrt::Microsoft::ReactNative::IComponentProps ComponentView::userProps(
157
153
  facebook::react::Props::Shared const &props) noexcept {
158
154
  const auto &abiProps =
@@ -161,28 +157,20 @@ const winrt::Microsoft::ReactNative::IComponentProps ComponentView::userProps(
161
157
  }
162
158
 
163
159
  void ComponentView::updateEventEmitter(facebook::react::EventEmitter::Shared const &eventEmitter) noexcept {
164
- if (m_updateEventEmitterHandler) {
165
- m_updateEventEmitterHandler(*this, winrt::make<EventEmitter>(eventEmitter));
160
+ if (m_builder && m_builder->UpdateEventEmitterHandler()) {
161
+ m_builder->UpdateEventEmitterHandler()(*this, winrt::make<EventEmitter>(eventEmitter));
166
162
  }
167
163
  }
168
164
 
169
- void ComponentView::UpdateEventEmitterHandler(const UpdateEventEmitterDelegate &handler) noexcept {
170
- m_updateEventEmitterHandler = handler;
171
- }
172
-
173
165
  void ComponentView::updateState(
174
166
  facebook::react::State::Shared const &state,
175
167
  facebook::react::State::Shared const &oldState) noexcept {
176
168
  // Avoid new-ing up a new AbiComponentState on every state change if we are not a custom component
177
- if (m_updateStateDelegate) {
178
- m_updateStateDelegate(*this, winrt::make<::Microsoft::ReactNative::AbiComponentState>(state));
169
+ if (m_builder && m_builder->UpdateStateHandler()) {
170
+ m_builder->UpdateStateHandler()(*this, winrt::make<::Microsoft::ReactNative::AbiComponentState>(state));
179
171
  }
180
172
  }
181
173
 
182
- void ComponentView::UpdateStateHandler(const UpdateStateDelegate &handler) noexcept {
183
- m_updateStateDelegate = handler;
184
- }
185
-
186
174
  LayoutMetricsChangedArgs::LayoutMetricsChangedArgs(
187
175
  const winrt::Microsoft::ReactNative::LayoutMetrics &newLayoutMetrics,
188
176
  const winrt::Microsoft::ReactNative::LayoutMetrics &oldLayoutMetrics)
@@ -212,6 +200,10 @@ void ComponentView::updateLayoutMetrics(
212
200
  layoutMetrics.frame.size.height},
213
201
  layoutMetrics.pointScaleFactor};
214
202
 
203
+ if (m_builder && m_builder->UpdateLayoutMetricsHandler()) {
204
+ m_builder->UpdateLayoutMetricsHandler()(*this, newMetrics, oldMetrics);
205
+ }
206
+
215
207
  m_layoutMetrics = layoutMetrics;
216
208
 
217
209
  m_layoutMetricsChangedEvent(*this, winrt::make<LayoutMetricsChangedArgs>(newMetrics, oldMetrics));
@@ -236,13 +228,9 @@ void ComponentView::LayoutMetricsChanged(winrt::event_token const &token) noexce
236
228
  m_layoutMetricsChangedEvent.remove(token);
237
229
  }
238
230
 
239
- void ComponentView::FinalizeUpdateHandler(const UpdateFinalizerDelegate &handler) noexcept {
240
- m_finalizeUpdateHandler = handler;
241
- }
242
-
243
231
  void ComponentView::FinalizeUpdates(winrt::Microsoft::ReactNative::ComponentViewUpdateMask updateMask) noexcept {
244
- if (m_finalizeUpdateHandler) {
245
- m_finalizeUpdateHandler(*this, updateMask);
232
+ if (m_builder && m_builder->FinalizeUpdateHandler()) {
233
+ m_builder->FinalizeUpdateHandler()(*this, updateMask);
246
234
  }
247
235
  }
248
236
 
@@ -253,13 +241,9 @@ facebook::react::Props::Shared ComponentView::props() noexcept {
253
241
  return {};
254
242
  }
255
243
 
256
- void ComponentView::CustomCommandHandler(const HandleCommandDelegate &handler) noexcept {
257
- m_customCommandHandler = handler;
258
- }
259
-
260
244
  void ComponentView::HandleCommand(const winrt::Microsoft::ReactNative::HandleCommandArgs &args) noexcept {
261
- if (m_customCommandHandler) {
262
- m_customCommandHandler(*this, args);
245
+ if (m_builder && m_builder->CustomCommandHandler()) {
246
+ m_builder->CustomCommandHandler()(*this, args);
263
247
  }
264
248
  }
265
249
 
@@ -342,10 +326,13 @@ bool ComponentView::runOnChildren(
342
326
  return true;
343
327
  }
344
328
  } else {
345
- // TODO is this conversion from rend correct?
346
- for (auto it = m_children.end(); it != m_children.begin(); --it) {
347
- if (fn(*winrt::get_self<winrt::Microsoft::ReactNative::implementation::ComponentView>(*it)))
348
- return true;
329
+ if (m_children.Size()) {
330
+ auto it = m_children.end();
331
+ do {
332
+ it--;
333
+ if (fn(*winrt::get_self<winrt::Microsoft::ReactNative::implementation::ComponentView>(*it)))
334
+ return true;
335
+ } while (it != m_children.begin());
349
336
  }
350
337
  }
351
338
  return false;
@@ -356,6 +343,14 @@ RECT ComponentView::getClientRect() const noexcept {
356
343
  return {};
357
344
  }
358
345
 
346
+ winrt::Windows::Foundation::Point ComponentView::ScreenToLocal(winrt::Windows::Foundation::Point pt) noexcept {
347
+ return rootComponentView()->ConvertScreenToLocal(pt);
348
+ }
349
+
350
+ winrt::Windows::Foundation::Point ComponentView::LocalToScreen(winrt::Windows::Foundation::Point pt) noexcept {
351
+ return rootComponentView()->ConvertLocalToScreen(pt);
352
+ }
353
+
359
354
  // The offset from this elements parent to its children (accounts for things like scroll position)
360
355
  facebook::react::Point ComponentView::getClientOffset() const noexcept {
361
356
  assert(false);
@@ -11,6 +11,8 @@
11
11
  #include <react/renderer/components/view/ViewProps.h>
12
12
  #include <react/renderer/core/LayoutMetrics.h>
13
13
 
14
+ #include <ComponentView.Experimental.interop.h>
15
+ #include <Fabric/Composition/ReactCompositionViewComponentBuilder.h>
14
16
  #include <Fabric/Composition/Theme.h>
15
17
  #include <uiautomationcore.h>
16
18
  #include <winrt/Microsoft.ReactNative.Composition.Input.h>
@@ -37,11 +39,11 @@ struct BringIntoViewOptions {
37
39
  bool AnimationDesired{false};
38
40
  // NaN will bring the element fully into view aligned to the nearest edge of the viewport
39
41
  float HorizontalAlignmentRatio{std::numeric_limits<float>::quiet_NaN()};
40
- float HorizontalOffset{0};
42
+ float HorizontalOffset{20};
41
43
  std::optional<facebook::react::Rect> TargetRect;
42
44
  // NaN will bring the element fully into view aligned to the nearest edge of the viewport
43
45
  float VerticalAlignmentRatio{std::numeric_limits<float>::quiet_NaN()};
44
- float VerticalOffset{0};
46
+ float VerticalOffset{20};
45
47
  };
46
48
 
47
49
  struct LayoutMetricsChangedArgs : public LayoutMetricsChangedArgsT<LayoutMetricsChangedArgs> {
@@ -77,8 +79,12 @@ struct UnmountChildComponentViewArgs : public UnmountChildComponentViewArgsT<Unm
77
79
  uint32_t m_index;
78
80
  };
79
81
 
80
- struct ComponentView : public ComponentViewT<ComponentView> {
81
- ComponentView(facebook::react::Tag tag, winrt::Microsoft::ReactNative::ReactContext const &reactContext);
82
+ struct ComponentView
83
+ : public ComponentViewT<ComponentView, ::Microsoft::ReactNative::Composition::Experimental::IComponentViewInterop> {
84
+ ComponentView(
85
+ facebook::react::Tag tag,
86
+ winrt::Microsoft::ReactNative::ReactContext const &reactContext,
87
+ winrt::Microsoft::ReactNative::Composition::ReactCompositionViewComponentBuilder *builder);
82
88
 
83
89
  virtual std::vector<facebook::react::ComponentDescriptorProvider> supplementalComponentDescriptorProviders() noexcept;
84
90
  virtual void updateProps(
@@ -105,14 +111,16 @@ struct ComponentView : public ComponentViewT<ComponentView> {
105
111
  // returns true if the fn ever returned true
106
112
  bool runOnChildren(bool forward, Mso::Functor<bool(ComponentView &)> &fn) noexcept;
107
113
  virtual RECT getClientRect() const noexcept;
114
+ winrt::Windows::Foundation::Point ScreenToLocal(winrt::Windows::Foundation::Point pt) noexcept;
115
+ winrt::Windows::Foundation::Point LocalToScreen(winrt::Windows::Foundation::Point pt) noexcept;
108
116
  // The offset from this elements parent to its children (accounts for things like scroll position)
109
117
  virtual facebook::react::Point getClientOffset() const noexcept;
110
118
  virtual void onLosingFocus(const winrt::Microsoft::ReactNative::LosingFocusEventArgs &args) noexcept;
111
119
  virtual void onGettingFocus(const winrt::Microsoft::ReactNative::GettingFocusEventArgs &args) noexcept;
112
120
  virtual void onLostFocus(const winrt::Microsoft::ReactNative::Composition::Input::RoutedEventArgs &args) noexcept;
113
121
  virtual void onGotFocus(const winrt::Microsoft::ReactNative::Composition::Input::RoutedEventArgs &args) noexcept;
114
- void MarkAsCustomComponent() noexcept;
115
122
  virtual void onMounted() noexcept;
123
+ bool isMounted() noexcept;
116
124
  virtual void onUnmounted() noexcept;
117
125
  void onDestroying() noexcept;
118
126
 
@@ -218,14 +226,6 @@ struct ComponentView : public ComponentViewT<ComponentView> {
218
226
  void UserData(const winrt::IInspectable &userData) noexcept;
219
227
  winrt::IInspectable UserData() const noexcept;
220
228
 
221
- void CustomCommandHandler(const HandleCommandDelegate &handler) noexcept;
222
- void UpdatePropsHandler(const UpdatePropsDelegate &handler) noexcept;
223
- void UpdateStateHandler(const UpdateStateDelegate &handler) noexcept;
224
- void UpdateEventEmitterHandler(const UpdateEventEmitterDelegate &handler) noexcept;
225
- void MountChildComponentViewHandler(const MountChildComponentViewDelegate &handler) noexcept;
226
- void UnmountChildComponentViewHandler(const UnmountChildComponentViewDelegate &handler) noexcept;
227
- void FinalizeUpdateHandler(const UpdateFinalizerDelegate &handler) noexcept;
228
-
229
229
  virtual void MountChildComponentView(
230
230
  const winrt::Microsoft::ReactNative::ComponentView &childComponentView,
231
231
  uint32_t index) noexcept;
@@ -253,7 +253,7 @@ struct ComponentView : public ComponentViewT<ComponentView> {
253
253
  const winrt::Microsoft::ReactNative::Composition::Input::CharacterReceivedRoutedEventArgs &args) noexcept;
254
254
 
255
255
  protected:
256
- bool m_customComponent : 1 {false}; // Is a user custom component, and so needs to call external override functions
256
+ winrt::com_ptr<winrt::Microsoft::ReactNative::Composition::ReactCompositionViewComponentBuilder> m_builder;
257
257
  bool m_mounted : 1 {false};
258
258
  const facebook::react::Tag m_tag;
259
259
  winrt::IInspectable m_userData;
@@ -265,14 +265,6 @@ struct ComponentView : public ComponentViewT<ComponentView> {
265
265
  winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::ReactNative::ComponentView> m_children{
266
266
  winrt::single_threaded_vector<winrt::Microsoft::ReactNative::ComponentView>()};
267
267
 
268
- UpdatePropsDelegate m_updatePropsDelegate{nullptr};
269
- UpdateStateDelegate m_updateStateDelegate{nullptr};
270
- HandleCommandDelegate m_customCommandHandler{nullptr};
271
- UpdateFinalizerDelegate m_finalizeUpdateHandler{nullptr};
272
- MountChildComponentViewDelegate m_mountChildComponentViewHandler{nullptr};
273
- UnmountChildComponentViewDelegate m_unmountChildComponentViewHandler{nullptr};
274
- UpdateEventEmitterDelegate m_updateEventEmitterHandler{nullptr};
275
-
276
268
  winrt::event<
277
269
  winrt::Windows::Foundation::EventHandler<winrt::Microsoft::ReactNative::Composition::Input::KeyRoutedEventArgs>>
278
270
  m_keyDownEvent;