react-native-windows 0.77.0-preview.4 → 0.78.0-preview.1

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 (233) hide show
  1. package/.flowconfig +1 -1
  2. package/Chakra/ChakraTracing.cpp +1 -1
  3. package/Libraries/Animated/animations/Animation.js +22 -1
  4. package/Libraries/Animated/animations/DecayAnimation.js +1 -0
  5. package/Libraries/Animated/animations/SpringAnimation.js +1 -0
  6. package/Libraries/Animated/animations/TimingAnimation.js +1 -0
  7. package/Libraries/Animated/nodes/AnimatedAddition.js +9 -2
  8. package/Libraries/Animated/nodes/AnimatedColor.js +4 -1
  9. package/Libraries/Animated/nodes/AnimatedDiffClamp.js +10 -2
  10. package/Libraries/Animated/nodes/AnimatedDivision.js +9 -2
  11. package/Libraries/Animated/nodes/AnimatedInterpolation.js +5 -1
  12. package/Libraries/Animated/nodes/AnimatedModulo.js +5 -2
  13. package/Libraries/Animated/nodes/AnimatedMultiplication.js +9 -2
  14. package/Libraries/Animated/nodes/AnimatedNode.js +25 -46
  15. package/Libraries/Animated/nodes/AnimatedObject.js +9 -2
  16. package/Libraries/Animated/nodes/AnimatedProps.js +5 -1
  17. package/Libraries/Animated/nodes/AnimatedStyle.js +5 -1
  18. package/Libraries/Animated/nodes/AnimatedSubtraction.js +9 -2
  19. package/Libraries/Animated/nodes/AnimatedTracking.js +5 -1
  20. package/Libraries/Animated/nodes/AnimatedTransform.js +5 -1
  21. package/Libraries/Animated/nodes/AnimatedValue.js +49 -4
  22. package/Libraries/Animated/nodes/AnimatedValueXY.js +3 -1
  23. package/Libraries/Animated/useAnimatedProps.js +0 -43
  24. package/Libraries/Components/Button.windows.js +3 -0
  25. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +1 -1
  26. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +3 -1
  27. package/Libraries/Components/LayoutConformance/LayoutConformance.d.ts +21 -0
  28. package/Libraries/Components/LayoutConformance/LayoutConformance.js +59 -0
  29. package/Libraries/Components/LayoutConformance/LayoutConformanceNativeComponent.js +29 -0
  30. package/Libraries/Components/Pressable/Pressable.windows.js +3 -0
  31. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
  32. package/Libraries/Components/TextInput/TextInput.d.ts +5 -0
  33. package/Libraries/Components/TextInput/TextInput.flow.js +6 -0
  34. package/Libraries/Components/TextInput/TextInput.js +6 -0
  35. package/Libraries/Components/TextInput/TextInput.windows.js +9 -0
  36. package/Libraries/Components/Touchable/TouchableBounce.windows.js +2 -0
  37. package/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js +2 -0
  38. package/Libraries/Components/Touchable/TouchableOpacity.windows.js +2 -0
  39. package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +2 -0
  40. package/Libraries/Components/View/View.windows.js +3 -0
  41. package/Libraries/Components/View/ViewAccessibility.d.ts +7 -2
  42. package/Libraries/Components/View/ViewAccessibility.windows.js +1 -0
  43. package/Libraries/Components/View/ViewPropTypes.d.ts +0 -7
  44. package/Libraries/Components/View/ViewPropTypes.js +0 -9
  45. package/Libraries/Components/View/ViewPropTypes.windows.js +1 -9
  46. package/Libraries/Core/ReactNativeVersion.js +2 -2
  47. package/Libraries/Core/setUpBatchedBridge.js +1 -16
  48. package/Libraries/EventEmitter/RCTEventEmitter.js +2 -6
  49. package/Libraries/Image/AssetSourceResolver.js +11 -0
  50. package/Libraries/Image/AssetSourceResolver.windows.js +11 -0
  51. package/Libraries/Image/Image.windows.js +2 -0
  52. package/Libraries/Inspector/BorderBox.js +26 -14
  53. package/Libraries/Inspector/BoxInspector.js +60 -42
  54. package/Libraries/Inspector/ElementBox.js +55 -48
  55. package/Libraries/Inspector/StyleInspector.js +36 -30
  56. package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -2
  57. package/Libraries/Lists/FlatList.d.ts +1 -1
  58. package/Libraries/Modal/Modal.js +2 -0
  59. package/Libraries/Modal/Modal.windows.js +2 -0
  60. package/Libraries/NativeComponent/BaseViewConfig.android.js +0 -2
  61. package/Libraries/NativeComponent/BaseViewConfig.ios.js +0 -2
  62. package/Libraries/NativeComponent/BaseViewConfig.windows.js +0 -2
  63. package/Libraries/Network/RCTNetworking.android.js +24 -16
  64. package/Libraries/Network/RCTNetworking.ios.js +1 -46
  65. package/Libraries/Network/RCTNetworking.windows.js +1 -46
  66. package/Libraries/Network/RCTNetworkingEventDefinitions.flow.js +57 -0
  67. package/Libraries/ReactNative/UIManagerProperties.js +3 -1
  68. package/Libraries/Renderer/implementations/ReactFabric-dev.js +15828 -26461
  69. package/Libraries/Renderer/implementations/ReactFabric-prod.js +3907 -2560
  70. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +4399 -2878
  71. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +16102 -26908
  72. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +4034 -2695
  73. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +4535 -3045
  74. package/Libraries/Renderer/shims/ReactNativeTypes.js +5 -6
  75. package/Libraries/StyleSheet/processTransform.js +6 -0
  76. package/Libraries/Text/Text.d.ts +6 -1
  77. package/Libraries/Text/Text.windows.js +4 -0
  78. package/Libraries/Text/TextProps.js +2 -2
  79. package/Libraries/Text/TextProps.windows.js +3 -2
  80. package/Libraries/Utilities/BackHandler.android.js +5 -4
  81. package/Libraries/Utilities/BackHandler.ios.js +4 -5
  82. package/Libraries/Utilities/BackHandler.windows.js +5 -4
  83. package/Microsoft.ReactNative/CompositionComponentView.idl +13 -1
  84. package/Microsoft.ReactNative/Fabric/ComponentView.cpp +0 -1
  85. package/Microsoft.ReactNative/Fabric/Composition/ComponentViewRegistry.cpp +0 -5
  86. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +92 -17
  87. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h +9 -0
  88. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +13 -33
  89. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +1 -3
  90. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp +43 -5
  91. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h +2 -1
  92. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +12 -10
  93. package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp +11 -9
  94. package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +1 -1
  95. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.cpp +191 -329
  96. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentView.h +3 -61
  97. package/Microsoft.ReactNative/Fabric/Composition/PortalComponentView.cpp +66 -0
  98. package/Microsoft.ReactNative/Fabric/Composition/PortalComponentView.h +52 -0
  99. package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.cpp +21 -0
  100. package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +7 -4
  101. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +79 -19
  102. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +12 -6
  103. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +71 -17
  104. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +16 -0
  105. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h +5 -10
  106. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +4 -4
  107. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +138 -110
  108. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.h +27 -27
  109. package/Microsoft.ReactNative/Fabric/Composition/Theme.cpp +1 -1
  110. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +38 -33
  111. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +0 -2
  112. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +5 -16
  113. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +0 -3
  114. package/Microsoft.ReactNative/Fabric/ImageManager.cpp +9 -0
  115. package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.cpp +0 -2
  116. package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorUtils.cpp +1 -1
  117. package/Microsoft.ReactNative/IReactCompositionViewComponentBuilder.idl +5 -0
  118. package/Microsoft.ReactNative/IReactContext.cpp +2 -2
  119. package/Microsoft.ReactNative/IReactContext.h +1 -1
  120. package/Microsoft.ReactNative/IReactContext.idl +2 -2
  121. package/Microsoft.ReactNative/IReactPackageBuilder.idl +3 -3
  122. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +97 -87
  123. package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.cpp +4 -0
  124. package/Microsoft.ReactNative/Modules/AlertModule.cpp +9 -4
  125. package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.cpp +1 -1
  126. package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.cpp +32 -35
  127. package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.h +7 -4
  128. package/Microsoft.ReactNative/Modules/AppStateModule.cpp +1 -1
  129. package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.cpp +2 -2
  130. package/Microsoft.ReactNative/Modules/AppearanceModule.cpp +2 -2
  131. package/Microsoft.ReactNative/Modules/DeviceInfoModule.cpp +3 -3
  132. package/Microsoft.ReactNative/Modules/I18nManagerModule.cpp +1 -1
  133. package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +7 -5
  134. package/Microsoft.ReactNative/Modules/LogBoxModule.h +2 -1
  135. package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +10 -10
  136. package/Microsoft.ReactNative/Modules/PaperUIManagerModule.cpp +24 -24
  137. package/Microsoft.ReactNative/Modules/Timing.cpp +2 -2
  138. package/Microsoft.ReactNative/ReactHost/IReactInstance.h +5 -0
  139. package/Microsoft.ReactNative/ReactHost/React.h +0 -3
  140. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +39 -16
  141. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +4 -2
  142. package/Microsoft.ReactNative/ReactNativeHost.cpp +9 -4
  143. package/Microsoft.ReactNative/ReactNativeIsland.idl +5 -1
  144. package/Microsoft.ReactNative/ReactPackageBuilder.cpp +3 -3
  145. package/Microsoft.ReactNative/ReactPackageBuilder.h +4 -4
  146. package/Microsoft.ReactNative/Utils/Helpers.cpp +0 -2
  147. package/Microsoft.ReactNative/Views/DevMenu.cpp +6 -6
  148. package/Microsoft.ReactNative/Views/DevMenu.h +1 -1
  149. package/Microsoft.ReactNative/Views/ViewManagerBase.cpp +2 -2
  150. package/Microsoft.ReactNative/Views/ViewPanel.cpp +1 -1
  151. package/Microsoft.ReactNative/Views/ViewViewManager.cpp +2 -2
  152. package/Microsoft.ReactNative/XamlUIService.cpp +13 -7
  153. package/Microsoft.ReactNative/XamlUIService.h +4 -1
  154. package/Microsoft.ReactNative/XamlUIService.idl +2 -0
  155. package/Microsoft.ReactNative.Cxx/JSI/JsiAbiApi.h +6 -2
  156. package/Microsoft.ReactNative.Cxx/ReactContext.h +1 -1
  157. package/Microsoft.ReactNative.Cxx/XamlUtils.h +12 -0
  158. package/PropertySheets/Generated/PackageVersion.g.props +3 -3
  159. package/PropertySheets/React.Cpp.props +3 -0
  160. package/PropertySheets/WebView2.props +1 -1
  161. package/PropertySheets/WinUI.props +5 -4
  162. package/ReactCommon/ReactCommon.vcxproj +5 -1
  163. package/ReactCommon/ReactCommon.vcxproj.filters +1 -1
  164. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +3 -3
  165. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +3 -3
  166. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +91 -0
  167. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp +1 -12
  168. package/{Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.h → ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/textinput/TextInputState.h} +37 -35
  169. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityPrimitives.h +1 -0
  170. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/accessibilityPropsConversions.h +4 -0
  171. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/imagemanager/ImageRequestParams.h +30 -0
  172. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/runtimescheduler/SchedulerPriorityUtils.h +4 -3
  173. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/uimanager/primitives.h +179 -0
  174. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +43 -57
  175. package/Shared/HermesRuntimeHolder.cpp +2 -2
  176. package/Shared/Shared.vcxitems +8 -14
  177. package/Shared/Shared.vcxitems.filters +4 -16
  178. package/Shared/Threading/BatchingQueueThread.cpp +3 -3
  179. package/codegen/NativeCPUTimeSpec.g.h +41 -0
  180. package/codegen/NativeFantomSpec.g.h +78 -0
  181. package/codegen/NativePerformanceSpec.g.h +31 -43
  182. package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +84 -84
  183. package/codegen/react/components/rnwcore/ActivityIndicatorView.g.h +212 -0
  184. package/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h +295 -0
  185. package/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h +200 -0
  186. package/codegen/react/components/rnwcore/AndroidProgressBar.g.h +224 -0
  187. package/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h +250 -0
  188. package/codegen/react/components/rnwcore/AndroidSwitch.g.h +267 -0
  189. package/codegen/react/components/rnwcore/DebuggingOverlay.g.h +234 -0
  190. package/codegen/react/components/rnwcore/InputAccessory.g.h +200 -0
  191. package/codegen/react/components/rnwcore/ModalHostView.g.h +283 -0
  192. package/codegen/react/components/rnwcore/PullToRefreshView.g.h +246 -0
  193. package/codegen/react/components/rnwcore/SafeAreaView.g.h +197 -0
  194. package/codegen/react/components/rnwcore/Switch.g.h +263 -0
  195. package/codegen/react/components/rnwcore/UnimplementedNativeView.g.h +200 -0
  196. package/codegen/rnwcoreJSI-generated.cpp +90 -57
  197. package/codegen/rnwcoreJSI.h +241 -104
  198. package/index.js +5 -0
  199. package/index.windows.js +5 -0
  200. package/just-task.js +1 -1
  201. package/package.json +23 -24
  202. package/src/private/animated/NativeAnimatedValidation.js +1 -1
  203. package/src/private/featureflags/ReactNativeFeatureFlags.js +32 -26
  204. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +5 -5
  205. package/src/private/renderer/errorhandling/ErrorHandlers.js +12 -55
  206. package/src/private/specs/modules/{NativeJSCSamplingProfiler.js → NativeCPUTime.js} +7 -2
  207. package/src/private/specs/modules/NativeFantom.js +37 -0
  208. package/src/private/utilities/ensureInstance.js +21 -0
  209. package/src/private/webapis/dom/nodes/ReactNativeElement.js +49 -6
  210. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +17 -9
  211. package/src/private/webapis/intersectionobserver/IntersectionObserver.js +11 -11
  212. package/src/private/webapis/intersectionobserver/IntersectionObserverEntry.js +1 -1
  213. package/src/private/webapis/intersectionobserver/IntersectionObserverManager.js +1 -1
  214. package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +1 -0
  215. package/src/private/webapis/performance/Performance.js +0 -12
  216. package/src/private/webapis/performance/specs/NativePerformance.js +0 -11
  217. package/types/index.d.ts +1 -0
  218. package/Libraries/HeapCapture/HeapCapture.js +0 -29
  219. package/Libraries/HeapCapture/NativeJSCHeapCapture.js +0 -13
  220. package/Libraries/Performance/NativeJSCSamplingProfiler.js +0 -13
  221. package/Libraries/Performance/SamplingProfiler.js +0 -39
  222. package/Libraries/ReactNative/__mocks__/FabricUIManager.js +0 -334
  223. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewComponentDescriptor.h +0 -39
  224. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewShadowNode.cpp +0 -18
  225. package/Microsoft.ReactNative/Fabric/Composition/Modal/WindowsModalHostViewShadowNode.h +0 -39
  226. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputState.cpp +0 -34
  227. package/Microsoft.ReactNative/Fabric/ReactNativeConfigProperties.cpp +0 -53
  228. package/Microsoft.ReactNative/Fabric/ReactNativeConfigProperties.h +0 -26
  229. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/LayoutableShadowNode.cpp +0 -363
  230. package/codegen/NativeJSCSamplingProfilerSpec.g.h +0 -35
  231. package/src/private/webapis/dom/nodes/specs/__mocks__/NativeDOMMock.js +0 -413
  232. package/src/private/webapis/intersectionobserver/specs/__mocks__/NativeIntersectionObserver.js +0 -181
  233. package/src/private/webapis/mutationobserver/specs/__mocks__/NativeMutationObserver.js +0 -327
@@ -3,13 +3,13 @@
3
3
 
4
4
  #include "pch.h"
5
5
 
6
- #ifndef CORE_ABI
6
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
7
7
  #include <Modules/NativeUIManager.h>
8
8
  #include <Modules/PaperUIManagerModule.h>
9
+ #include <Views/ShadowNodeBase.h>
9
10
  #endif
10
11
 
11
12
  #include <Utils/Helpers.h>
12
- #include <Views/ShadowNodeBase.h>
13
13
  #include <Views/XamlFeatures.h>
14
14
  #include "NativeAnimatedNodeManager.h"
15
15
  #include "PropsAnimatedNode.h"
@@ -84,9 +84,11 @@ void PropsAnimatedNode::DisconnectFromView(int64_t viewTag) {
84
84
  }
85
85
 
86
86
  if (m_centerPointAnimation) {
87
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
87
88
  if (const auto target = GetUIElement()) {
88
89
  target.StopAnimation(m_centerPointAnimation);
89
90
  }
91
+ #endif
90
92
  m_centerPointAnimation = nullptr;
91
93
  }
92
94
  m_needsCenterPointAnimation = false;
@@ -140,6 +142,7 @@ void PropsAnimatedNode::UpdateView() {
140
142
  }
141
143
  }
142
144
 
145
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
143
146
  static void EnsureUIElementDirtyForRender(xaml::UIElement uiElement) {
144
147
  auto compositeMode = uiElement.CompositeMode();
145
148
  switch (compositeMode) {
@@ -153,16 +156,19 @@ static void EnsureUIElementDirtyForRender(xaml::UIElement uiElement) {
153
156
  }
154
157
  uiElement.CompositeMode(compositeMode);
155
158
  }
159
+ #endif
156
160
 
157
161
  void PropsAnimatedNode::StartAnimations() {
158
162
  assert(m_useComposition);
159
163
  if (m_expressionAnimations.size()) {
160
164
  AnimationView view = GetAnimationView();
161
165
  if (view) {
166
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
162
167
  // Work around for https://github.com/microsoft/microsoft-ui-xaml/issues/2511
163
168
  if (view.m_element) {
164
169
  EnsureUIElementDirtyForRender(view.m_element);
165
170
  }
171
+ #endif
166
172
  for (const auto &anim : m_expressionAnimations) {
167
173
  if (anim.second.Target() == L"Translation.X") {
168
174
  m_subchannelPropertySet.StartAnimation(L"TranslationX", anim.second);
@@ -177,18 +183,20 @@ void PropsAnimatedNode::StartAnimations() {
177
183
  m_subchannelPropertySet.StartAnimation(L"ScaleY", anim.second);
178
184
  StartAnimation(view, m_scaleCombined);
179
185
  } else if (anim.second.Target() == L"Rotation") {
186
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
180
187
  if (view.m_element) {
181
188
  view.m_element.RotationAxis(m_rotationAxis);
182
- #ifdef USE_FABRIC
183
- } else {
189
+ }
190
+ #else
191
+ if (view.m_componentView) {
184
192
  auto visual =
185
193
  winrt::Microsoft::ReactNative::Composition::Experimental::CompositionContextHelper::InnerVisual(
186
194
  view.m_componentView
187
195
  .as<winrt::Microsoft::ReactNative::Composition::implementation::ComponentView>()
188
196
  ->Visual());
189
197
  visual.RotationAxis(m_rotationAxis);
190
- #endif
191
198
  }
199
+ #endif
192
200
  StartAnimation(view, anim.second);
193
201
  } else {
194
202
  StartAnimation(view, anim.second);
@@ -322,20 +330,18 @@ void PropsAnimatedNode::MakeAnimation(int64_t valueNodeTag, FacadeType facadeTyp
322
330
  }
323
331
  }
324
332
 
333
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
325
334
  Microsoft::ReactNative::ShadowNodeBase *PropsAnimatedNode::GetShadowNodeBase() {
326
- #ifndef CORE_ABI
327
335
  if (const auto uiManager = Microsoft::ReactNative::GetNativeUIManager(m_context).lock()) {
328
336
  if (const auto nativeUIManagerHost = uiManager->getHost()) {
329
337
  return static_cast<Microsoft::ReactNative::ShadowNodeBase *>(
330
338
  nativeUIManagerHost->FindShadowNodeForTag(m_connectedViewTag));
331
339
  }
332
340
  }
333
- #endif
334
341
  return nullptr;
335
342
  }
336
343
 
337
344
  xaml::UIElement PropsAnimatedNode::GetUIElement() {
338
- #ifndef CORE_ABI
339
345
  if (IsRS5OrHigher()) {
340
346
  if (const auto shadowNodeBase = GetShadowNodeBase()) {
341
347
  if (const auto shadowNodeView = shadowNodeBase->GetView()) {
@@ -343,12 +349,12 @@ xaml::UIElement PropsAnimatedNode::GetUIElement() {
343
349
  }
344
350
  }
345
351
  }
346
- #endif
347
352
  return nullptr;
348
353
  }
354
+ #endif
349
355
 
350
356
  void PropsAnimatedNode::CommitProps() {
351
- #ifndef CORE_ABI
357
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
352
358
  if (const auto node = GetShadowNodeBase()) {
353
359
  if (!node->m_zombie) {
354
360
  node->updateProperties(m_props);
@@ -358,43 +364,35 @@ void PropsAnimatedNode::CommitProps() {
358
364
  }
359
365
 
360
366
  PropsAnimatedNode::AnimationView PropsAnimatedNode::GetAnimationView() {
361
- #ifdef USE_FABRIC
362
- if (auto fabricuiManager = FabricUIManager::FromProperties(m_context.Properties())) {
363
- auto componentView = fabricuiManager->GetViewRegistry().findComponentViewWithTag(
364
- static_cast<facebook::react::Tag>(m_connectedViewTag));
365
- if (componentView) {
366
- return {nullptr, componentView};
367
- }
368
- }
369
- #endif // USE_FABRIC
370
- #ifndef CORE_ABI
367
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
371
368
  if (IsRS5OrHigher()) {
372
369
  if (const auto shadowNodeBase = GetShadowNodeBase()) {
373
370
  if (const auto shadowNodeView = shadowNodeBase->GetView()) {
374
- #ifdef USE_FABRIC
375
- return {shadowNodeView.as<xaml::UIElement>(), nullptr};
376
- #else
377
371
  return {shadowNodeView.as<xaml::UIElement>()};
378
- #endif
379
372
  }
380
373
  }
381
374
  }
382
- #endif // CORE_ABI
383
-
384
- #ifdef USE_FABRIC
385
- return {nullptr, nullptr};
386
375
  #else
387
- return {nullptr};
376
+ if (auto fabricuiManager = FabricUIManager::FromProperties(m_context.Properties())) {
377
+ auto componentView = fabricuiManager->GetViewRegistry().findComponentViewWithTag(
378
+ static_cast<facebook::react::Tag>(m_connectedViewTag));
379
+ if (componentView) {
380
+ return {componentView};
381
+ }
382
+ }
388
383
  #endif
384
+ return {nullptr};
389
385
  }
390
386
 
391
387
  void PropsAnimatedNode::StartAnimation(
392
388
  const AnimationView &view,
393
389
  const comp::CompositionAnimation &animation) noexcept {
390
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
394
391
  if (view.m_element) {
395
392
  view.m_element.StartAnimation(animation);
396
- #ifdef USE_FABRIC
397
- } else if (view.m_componentView) {
393
+ }
394
+ #else
395
+ if (view.m_componentView) {
398
396
  auto baseComponentView =
399
397
  view.m_componentView.as<winrt::Microsoft::ReactNative::Composition::implementation::ComponentView>();
400
398
  auto visual = winrt::Microsoft::ReactNative::Composition::Experimental::CompositionContextHelper::InnerVisual(
@@ -414,17 +412,16 @@ void PropsAnimatedNode::StartAnimation(
414
412
  }
415
413
  visual.StartAnimation(targetProp, animation);
416
414
  }
417
- #endif
418
415
  }
416
+ #endif
419
417
  }
420
418
 
421
419
  comp::CompositionPropertySet PropsAnimatedNode::EnsureCenterPointPropertySet(const AnimationView &view) noexcept {
422
- #ifndef CORE_ABI
420
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
423
421
  if (view.m_element) {
424
422
  return GetShadowNodeBase()->EnsureTransformPS();
425
423
  }
426
- #endif
427
- #ifdef USE_FABRIC
424
+ #else
428
425
  if (view.m_componentView) {
429
426
  return view.m_componentView.as<winrt::Microsoft::ReactNative::Composition::implementation::ComponentView>()
430
427
  ->EnsureCenterPointPropertySet();
@@ -36,23 +36,26 @@ class PropsAnimatedNode final : public AnimatedNode {
36
36
 
37
37
  private:
38
38
  struct AnimationView {
39
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
39
40
  xaml::UIElement m_element;
40
- #ifdef USE_FABRIC
41
+ #else
41
42
  winrt::Microsoft::ReactNative::ComponentView m_componentView;
42
43
  #endif
43
44
  operator bool() const noexcept {
44
- #ifdef USE_FABRIC
45
- return m_element || m_componentView;
46
- #else
45
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
47
46
  return m_element != nullptr;
47
+ #else
48
+ return m_componentView != nullptr;
48
49
  #endif
49
50
  }
50
51
  };
51
52
 
52
53
  void CommitProps();
53
54
  void MakeAnimation(int64_t valueNodeTag, FacadeType facadeType);
55
+ #if !defined(CORE_ABI) && !defined(USE_FABRIC)
54
56
  Microsoft::ReactNative::ShadowNodeBase *GetShadowNodeBase();
55
57
  xaml::UIElement GetUIElement();
58
+ #endif
56
59
  AnimationView GetAnimationView();
57
60
  void StartAnimation(const AnimationView &view, const comp::CompositionAnimation &animation) noexcept;
58
61
  comp::CompositionPropertySet EnsureCenterPointPropertySet(const AnimationView &view) noexcept;
@@ -21,7 +21,7 @@ void AppState::Initialize(winrt::Microsoft::ReactNative::ReactContext const &rea
21
21
  // We need to register for notifications from the XAML thread.
22
22
  if (auto dispatcher = reactContext.UIDispatcher()) {
23
23
  dispatcher.Post([this]() {
24
- auto currentApp = xaml::TryGetCurrentApplication();
24
+ auto currentApp = xaml::TryGetCurrentUwpXamlApplication();
25
25
 
26
26
  if (!IsWinUI3Island() && currentApp != nullptr) {
27
27
  #ifndef USE_WINUI3
@@ -44,7 +44,7 @@ static const React::ReactPropertyId<React::ReactNonAbiValue<std::shared_ptr<AppT
44
44
  AppThemeHolder::AppThemeHolder(const Mso::React::IReactContext &context) : m_context(&context) {
45
45
  NotifyHighContrastChanged();
46
46
 
47
- if (auto currentApp = xaml::TryGetCurrentApplication()) {
47
+ if (auto currentApp = xaml::TryGetCurrentUwpXamlApplication()) {
48
48
  if (IsWinUI3Island()) {
49
49
  m_wmSubscription = SubscribeToWindowMessage(
50
50
  ReactNotificationService(m_context->Notifications()), WM_THEMECHANGED, [this](const auto &, const auto &) {
@@ -77,7 +77,7 @@ void AppThemeHolder::SetCallback(
77
77
 
78
78
  void AppThemeHolder::NotifyHighContrastChanged() noexcept {
79
79
  m_appThemeData.isHighContrast =
80
- xaml::TryGetCurrentApplication() ? m_accessibilitySettings.HighContrast() : IsInHighContrastWin32();
80
+ xaml::TryGetCurrentUwpXamlApplication() ? m_accessibilitySettings.HighContrast() : IsInHighContrastWin32();
81
81
  m_appThemeData.highContrastColors.ButtonFaceColor =
82
82
  FormatRGB(m_uiSettings.UIElementColor(winrt::UIElementType::ButtonFace));
83
83
  m_appThemeData.highContrastColors.ButtonTextColor =
@@ -50,7 +50,7 @@ ApplicationTheme CurrentThemeFromUISettings(const winrt::Windows::UI::ViewManage
50
50
 
51
51
  ApplicationTheme Appearance::GetCurrentTheme() noexcept {
52
52
  assert(m_context.UIDispatcher().HasThreadAccess()); // xaml::Application is only accessible on the UI thread
53
- if (auto currentApp = xaml::TryGetCurrentApplication()) {
53
+ if (auto currentApp = xaml::TryGetCurrentUwpXamlApplication()) {
54
54
  return currentApp.RequestedTheme();
55
55
  }
56
56
 
@@ -74,7 +74,7 @@ void Appearance::RequeryTheme() noexcept {
74
74
 
75
75
  void Appearance::InitOnUIThread(const Mso::React::IReactContext &context) noexcept {
76
76
  xaml::ApplicationTheme theme = ApplicationTheme::Light;
77
- if (auto currentApp = xaml::TryGetCurrentApplication()) {
77
+ if (auto currentApp = xaml::TryGetCurrentUwpXamlApplication()) {
78
78
  theme = currentApp.RequestedTheme();
79
79
  } else {
80
80
  theme = CurrentThemeFromUISettings(winrt::Windows::UI::ViewManagement::UISettings());
@@ -36,7 +36,7 @@ DeviceInfoHolder::DeviceInfoHolder(const Mso::React::IReactContext &context) : m
36
36
  }
37
37
 
38
38
  void DeviceInfoHolder::InitDeviceInfoHolder(const Mso::React::IReactContext &context) noexcept {
39
- if (xaml::TryGetCurrentApplication() || IsFabricEnabled(context.Properties())) {
39
+ if (xaml::TryGetCurrentUwpXamlApplication() || IsFabricEnabled(context.Properties())) {
40
40
  auto deviceInfoHolder = std::make_shared<DeviceInfoHolder>(context);
41
41
 
42
42
  deviceInfoHolder->updateDeviceInfo();
@@ -51,7 +51,7 @@ void DeviceInfoHolder::InitDeviceInfoHolder(const Mso::React::IReactContext &con
51
51
  }
52
52
  #endif
53
53
 
54
- if (xaml::TryGetCurrentApplication()) {
54
+ if (xaml::TryGetCurrentUwpXamlApplication()) {
55
55
  if (auto window = xaml::Window::Current()) {
56
56
  auto const &coreWindow = window.CoreWindow();
57
57
 
@@ -157,7 +157,7 @@ void DeviceInfoHolder::SetCallback(
157
157
  }
158
158
 
159
159
  void DeviceInfoHolder::updateDeviceInfo() noexcept {
160
- if (xaml::TryGetCurrentApplication() && xaml::Window::Current()) {
160
+ if (xaml::TryGetCurrentUwpXamlApplication() && xaml::Window::Current()) {
161
161
  auto const window = xaml::Window::Current().CoreWindow();
162
162
 
163
163
  m_windowWidth = window.Bounds().Width;
@@ -28,7 +28,7 @@ static const React::ReactPropertyId<bool> &ForceRTLPropertyId() noexcept {
28
28
  }
29
29
 
30
30
  void I18nManager::InitI18nInfo(const winrt::Microsoft::ReactNative::ReactPropertyBag &propertyBag) noexcept {
31
- if (xaml::TryGetCurrentApplication() && !IsXamlIsland()) {
31
+ if (xaml::TryGetCurrentUwpXamlApplication() && !IsXamlIsland()) {
32
32
  // TODO: Figure out packaged win32 app story for WinUI 3
33
33
  auto layoutDirection = winrt::Windows::ApplicationModel::Resources::Core::ResourceContext()
34
34
  .GetForCurrentView()
@@ -8,14 +8,15 @@
8
8
  #include "ReactHost/ReactInstanceWin.h"
9
9
  #include "ReactNativeHost.h"
10
10
  #include "Utils/Helpers.h"
11
- #include "XamlUtils.h"
12
11
 
13
12
  #ifdef USE_FABRIC
14
13
  #include <Fabric/Composition/CompositionContextHelper.h>
15
14
  #include <Fabric/Composition/CompositionUIService.h>
16
15
  #include <winrt/Windows.UI.Composition.h>
17
- #endif
16
+ #else
18
17
  #include <UI.Xaml.Controls.Primitives.h>
18
+ #include "XamlUtils.h"
19
+ #endif
19
20
 
20
21
  namespace Microsoft::ReactNative {
21
22
 
@@ -121,7 +122,7 @@ void LogBox::ShowOnUIThread() noexcept {
121
122
  auto host = React::implementation::ReactNativeHost::GetReactNativeHost(m_context.Properties());
122
123
  if (!host)
123
124
  return;
124
-
125
+ #ifndef USE_FABRIC
125
126
  if (!IsFabricEnabled(m_context.Properties().Handle())) {
126
127
  m_logBoxContent = React::ReactRootView();
127
128
  m_logBoxContent.ComponentName(L"LogBox");
@@ -170,7 +171,7 @@ void LogBox::ShowOnUIThread() noexcept {
170
171
  m_popup.Child(m_logBoxContent);
171
172
  m_popup.IsOpen(true);
172
173
  }
173
- #ifdef USE_FABRIC
174
+ #else
174
175
  else {
175
176
  RegisterWndClass();
176
177
 
@@ -212,7 +213,7 @@ void LogBox::HideOnUIThread() noexcept {
212
213
  if (m_hwnd) {
213
214
  ::ShowWindow(m_hwnd, SW_HIDE);
214
215
  }
215
- #endif // USE_FABRIC
216
+ #else // USE_FABRIC
216
217
  if (m_popup) {
217
218
  m_popup.Closed(m_tokenClosed);
218
219
  m_sizeChangedRevoker.revoke();
@@ -220,6 +221,7 @@ void LogBox::HideOnUIThread() noexcept {
220
221
  m_popup = nullptr;
221
222
  m_logBoxContent = nullptr;
222
223
  }
224
+ #endif // USE_FABRIC
223
225
  }
224
226
 
225
227
  void LogBox::Initialize(React::ReactContext const &reactContext) noexcept {
@@ -32,9 +32,10 @@ struct LogBox : public std::enable_shared_from_this<LogBox> {
32
32
  winrt::Microsoft::ReactNative::ReactContext m_context;
33
33
  #ifdef USE_FABRIC
34
34
  HWND m_hwnd{nullptr};
35
- #endif // USE_FABRIC
35
+ #else
36
36
  xaml::Controls::Primitives::Popup m_popup{nullptr};
37
37
  winrt::Microsoft::ReactNative::ReactRootView m_logBoxContent{nullptr};
38
+ #endif // USE_FABRIC
38
39
  xaml::FrameworkElement::SizeChanged_revoker m_sizeChangedRevoker;
39
40
  winrt::event_token m_tokenClosed;
40
41
  };
@@ -8,7 +8,7 @@
8
8
  #include <UI.Xaml.Input.h>
9
9
  #include <UI.Xaml.Media.h>
10
10
  #include <Views/ShadowNodeBase.h>
11
- #include <cxxreact/SystraceSection.h>
11
+ #include <cxxreact/TraceSection.h>
12
12
  #include "Modules/I18nManagerModule.h"
13
13
  #include "NativeUIManager.h"
14
14
 
@@ -215,7 +215,7 @@ int64_t NativeUIManager::AddMeasuredRootView(facebook::react::IReactRootView *ro
215
215
  }
216
216
 
217
217
  void NativeUIManager::AddRootView(ShadowNode &shadowNode, facebook::react::IReactRootView *pReactRootView) {
218
- SystraceSection s("NativeUIManager::AddRootView");
218
+ TraceSection s("NativeUIManager::AddRootView");
219
219
  auto xamlRootView = static_cast<IXamlRootView *>(pReactRootView);
220
220
  XamlView view = xamlRootView->GetXamlView();
221
221
  const auto rootTag = shadowNode.m_tag;
@@ -243,14 +243,14 @@ void NativeUIManager::AddRootView(ShadowNode &shadowNode, facebook::react::IReac
243
243
  }
244
244
 
245
245
  void NativeUIManager::removeRootView(Microsoft::ReactNative::ShadowNode &shadow) {
246
- SystraceSection s("NativeUIManager::removeRootView");
246
+ TraceSection s("NativeUIManager::removeRootView");
247
247
  m_tagsToXamlReactControl.erase(shadow.m_tag);
248
248
  m_sizeChangedMap.erase(shadow.m_tag);
249
249
  RemoveView(shadow, true);
250
250
  }
251
251
 
252
252
  void NativeUIManager::onBatchComplete() {
253
- SystraceSection s("NativeUIManager::onBatchComplete");
253
+ TraceSection s("NativeUIManager::onBatchComplete");
254
254
  if (m_inBatch) {
255
255
  DoLayout();
256
256
  m_inBatch = false;
@@ -783,7 +783,7 @@ static void StyleYogaNode(
783
783
  }
784
784
 
785
785
  void NativeUIManager::CreateView(ShadowNode &shadowNode, React::JSValueObject &props) {
786
- SystraceSection s("NativeUIManager::CreateView");
786
+ TraceSection s("NativeUIManager::CreateView");
787
787
  ShadowNodeBase &node = static_cast<ShadowNodeBase &>(shadowNode);
788
788
  auto *pViewManager = node.GetViewManager();
789
789
 
@@ -874,7 +874,7 @@ void NativeUIManager::ReplaceView(ShadowNode &shadowNode) {
874
874
  }
875
875
 
876
876
  void NativeUIManager::UpdateView(ShadowNode &shadowNode, winrt::Microsoft::ReactNative::JSValueObject &props) {
877
- SystraceSection s("NativeUIManager::UpdateView");
877
+ TraceSection s("NativeUIManager::UpdateView");
878
878
  ShadowNodeBase &node = static_cast<ShadowNodeBase &>(shadowNode);
879
879
  auto *pViewManager = node.GetViewManager();
880
880
 
@@ -885,10 +885,10 @@ void NativeUIManager::UpdateView(ShadowNode &shadowNode, winrt::Microsoft::React
885
885
  }
886
886
 
887
887
  void NativeUIManager::DoLayout() {
888
- SystraceSection s("NativeUIManager::DoLayout");
888
+ TraceSection s("NativeUIManager::DoLayout");
889
889
 
890
890
  {
891
- SystraceSection s("NativeUIManager::DoLayout::UpdateLayout");
891
+ TraceSection s("NativeUIManager::DoLayout::UpdateLayout");
892
892
  // Process vector of RN controls needing extra layout here.
893
893
  const auto extraLayoutNodes = m_extraLayoutNodes;
894
894
  for (const int64_t tag : extraLayoutNodes) {
@@ -914,7 +914,7 @@ void NativeUIManager::DoLayout() {
914
914
 
915
915
  void NativeUIManager::ApplyLayout(int64_t tag, float width, float height) {
916
916
  if (YGNodeRef rootNode = GetYogaNode(tag)) {
917
- SystraceSection s("NativeUIManager::DoLayout::YGNodeCalculateLayout");
917
+ TraceSection s("NativeUIManager::DoLayout::YGNodeCalculateLayout");
918
918
  // We must always run layout in LTR mode, which might seem unintuitive.
919
919
  // We will flip the root of the tree into RTL by forcing the root XAML node's FlowDirection to RightToLeft
920
920
  // which will inherit down the XAML tree, allowing all native controls to pick it up.
@@ -925,7 +925,7 @@ void NativeUIManager::ApplyLayout(int64_t tag, float width, float height) {
925
925
  }
926
926
 
927
927
  {
928
- SystraceSection s("NativeUIManager::DoLayout::SetLayoutProps");
928
+ TraceSection s("NativeUIManager::DoLayout::SetLayoutProps");
929
929
  SetLayoutPropsRecursive(tag);
930
930
  }
931
931
  }
@@ -10,7 +10,7 @@
10
10
  #include <Modules/PaperUIManagerModule.h>
11
11
  #include <Views/ViewManager.h>
12
12
  #include <XamlUtils.h>
13
- #include <cxxreact/SystraceSection.h>
13
+ #include <cxxreact/TraceSection.h>
14
14
  #include <glog/logging.h>
15
15
  #include "ShadowNodeBase.h"
16
16
  #include "Unicode.h"
@@ -580,7 +580,7 @@ void UIManager::createView(
580
580
  viewName = std::move(viewName),
581
581
  rootTag,
582
582
  props = std::move(props)]() mutable {
583
- SystraceSection s("UIManager::createView");
583
+ TraceSection s("UIManager::createView");
584
584
  if (auto module = m.lock()) {
585
585
  module->createView(static_cast<int64_t>(reactTag), viewName, static_cast<int64_t>(rootTag), std::move(props));
586
586
  }
@@ -592,7 +592,7 @@ void UIManager::updateView(double reactTag, std::string viewName, React::JSValue
592
592
  reactTag,
593
593
  viewName = std::move(viewName),
594
594
  props = std::move(props)]() mutable {
595
- SystraceSection s("UIManager::updateView");
595
+ TraceSection s("UIManager::updateView");
596
596
  if (auto module = m.lock()) {
597
597
  module->updateView(static_cast<int64_t>(reactTag), viewName, std::move(props));
598
598
  }
@@ -601,7 +601,7 @@ void UIManager::updateView(double reactTag, std::string viewName, React::JSValue
601
601
 
602
602
  void UIManager::focus(double reactTag) noexcept {
603
603
  m_batchingUIMessageQueue->runOnQueue([m = std::weak_ptr<UIManagerModule>(m_module), reactTag]() {
604
- SystraceSection s("UIManager::focus");
604
+ TraceSection s("UIManager::focus");
605
605
  if (auto module = m.lock()) {
606
606
  module->focus(static_cast<int64_t>(reactTag));
607
607
  }
@@ -610,7 +610,7 @@ void UIManager::focus(double reactTag) noexcept {
610
610
 
611
611
  void UIManager::blur(double reactTag) noexcept {
612
612
  m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module), reactTag]() {
613
- SystraceSection s("UIManager::blur");
613
+ TraceSection s("UIManager::blur");
614
614
  if (auto module = m.lock()) {
615
615
  module->blur(static_cast<int64_t>(reactTag));
616
616
  }
@@ -626,7 +626,7 @@ void UIManager::findSubviewIn(
626
626
  reactTag,
627
627
  point = std::move(point),
628
628
  callback = std::move(callback)]() mutable {
629
- SystraceSection s("UIManager::findSubviewIn");
629
+ TraceSection s("UIManager::findSubviewIn");
630
630
  if (auto module = m.lock()) {
631
631
  module->findSubviewIn(static_cast<int64_t>(reactTag), std::move(point), std::move(callback));
632
632
  }
@@ -641,7 +641,7 @@ void UIManager::dispatchViewManagerCommand(
641
641
  reactTag,
642
642
  commandID = std::move(commandID),
643
643
  commandArgs = std::move(commandArgs)]() mutable {
644
- SystraceSection s("UIManager::dispatchViewManagerCommand");
644
+ TraceSection s("UIManager::dispatchViewManagerCommand");
645
645
  if (auto module = m.lock()) {
646
646
  module->dispatchViewManagerCommand(static_cast<int64_t>(reactTag), std::move(commandID), std::move(commandArgs));
647
647
  }
@@ -654,7 +654,7 @@ void UIManager::measure(
654
654
  &callback) noexcept {
655
655
  m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor(
656
656
  [m = std::weak_ptr<UIManagerModule>(m_module), reactTag, callback = std::move(callback)]() mutable {
657
- SystraceSection s("UIManager::measure");
657
+ TraceSection s("UIManager::measure");
658
658
  if (auto module = m.lock()) {
659
659
  module->measure(static_cast<int64_t>(reactTag), std::move(callback));
660
660
  }
@@ -666,7 +666,7 @@ void UIManager::measureInWindow(
666
666
  std::function<void(double x, double y, double width, double height)> const &callback) noexcept {
667
667
  m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor(
668
668
  [m = std::weak_ptr<UIManagerModule>(m_module), reactTag, callback = std::move(callback)]() mutable {
669
- SystraceSection s("UIManager::measureInWindow");
669
+ TraceSection s("UIManager::measureInWindow");
670
670
  if (auto module = m.lock()) {
671
671
  module->measureInWindow(static_cast<int64_t>(reactTag), std::move(callback));
672
672
  }
@@ -681,7 +681,7 @@ void UIManager::viewIsDescendantOf(
681
681
  reactTag,
682
682
  ancestorReactTag,
683
683
  callback = std::move(callback)]() mutable {
684
- SystraceSection s("UIManager::viewIsDescendantOf");
684
+ TraceSection s("UIManager::viewIsDescendantOf");
685
685
  if (auto module = m.lock()) {
686
686
  module->viewIsDescendantOf(
687
687
  static_cast<int64_t>(reactTag), static_cast<int64_t>(ancestorReactTag), std::move(callback));
@@ -699,7 +699,7 @@ void UIManager::measureLayout(
699
699
  ancestorReactTag,
700
700
  errorCallback = std::move(errorCallback),
701
701
  callback = std::move(callback)]() mutable {
702
- SystraceSection s("UIManager::measureLayout");
702
+ TraceSection s("UIManager::measureLayout");
703
703
  if (auto module = m.lock()) {
704
704
  module->measureLayout(
705
705
  static_cast<int64_t>(reactTag),
@@ -718,7 +718,7 @@ void UIManager::measureLayoutRelativeToParent(
718
718
  reactTag,
719
719
  errorCallback = std::move(errorCallback),
720
720
  callback = std::move(callback)]() mutable {
721
- SystraceSection s("UIManager::measureLayoutRelativeToParent");
721
+ TraceSection s("UIManager::measureLayoutRelativeToParent");
722
722
  if (auto module = m.lock()) {
723
723
  module->measureLayoutRelativeToParent(
724
724
  static_cast<int64_t>(reactTag), std::move(errorCallback), std::move(callback));
@@ -729,7 +729,7 @@ void UIManager::measureLayoutRelativeToParent(
729
729
  void UIManager::setJSResponder(double reactTag, bool blockNativeResponder) noexcept {
730
730
  m_batchingUIMessageQueue->runOnQueue(
731
731
  Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module), reactTag, blockNativeResponder]() mutable {
732
- SystraceSection s("UIManager::setJSResponder");
732
+ TraceSection s("UIManager::setJSResponder");
733
733
  if (auto module = m.lock()) {
734
734
  module->setJSResponder(static_cast<int64_t>(reactTag), blockNativeResponder);
735
735
  }
@@ -738,7 +738,7 @@ void UIManager::setJSResponder(double reactTag, bool blockNativeResponder) noexc
738
738
 
739
739
  void UIManager::clearJSResponder() noexcept {
740
740
  m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module)]() mutable {
741
- SystraceSection s("UIManager::clearJSResponder");
741
+ TraceSection s("UIManager::clearJSResponder");
742
742
  if (auto module = m.lock()) {
743
743
  module->clearJSResponder();
744
744
  }
@@ -753,7 +753,7 @@ void UIManager::configureNextLayoutAnimation(
753
753
  config = std::move(config),
754
754
  callback = std::move(callback),
755
755
  errorCallback = std::move(errorCallback)]() mutable {
756
- SystraceSection s("UIManager::configureNextLayoutAnimation");
756
+ TraceSection s("UIManager::configureNextLayoutAnimation");
757
757
  if (auto module = m.lock()) {
758
758
  module->configureNextLayoutAnimation(std::move(config), std::move(callback), std::move(errorCallback));
759
759
  }
@@ -762,7 +762,7 @@ void UIManager::configureNextLayoutAnimation(
762
762
 
763
763
  void UIManager::removeSubviewsFromContainerWithID(double containerID) noexcept {
764
764
  m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module), containerID]() {
765
- SystraceSection s("UIManager::removeSubviewsFromContainerWithID");
765
+ TraceSection s("UIManager::removeSubviewsFromContainerWithID");
766
766
  if (auto module = m.lock()) {
767
767
  module->removeSubviewsFromContainerWithID(static_cast<int64_t>(containerID));
768
768
  }
@@ -772,7 +772,7 @@ void UIManager::removeSubviewsFromContainerWithID(double containerID) noexcept {
772
772
  void UIManager::replaceExistingNonRootView(double reactTag, double newReactTag) noexcept {
773
773
  m_batchingUIMessageQueue->runOnQueue(
774
774
  Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module), reactTag, newReactTag]() {
775
- SystraceSection s("UIManager::replaceExistingNonRootView");
775
+ TraceSection s("UIManager::replaceExistingNonRootView");
776
776
  if (auto module = m.lock()) {
777
777
  module->replaceExistingNonRootView(static_cast<int64_t>(reactTag), static_cast<int64_t>(newReactTag));
778
778
  }
@@ -781,7 +781,7 @@ void UIManager::replaceExistingNonRootView(double reactTag, double newReactTag)
781
781
 
782
782
  void UIManager::removeRootView(double reactTag) noexcept {
783
783
  m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module), reactTag]() {
784
- SystraceSection s("UIManager::removeRootView");
784
+ TraceSection s("UIManager::removeRootView");
785
785
  if (auto module = m.lock()) {
786
786
  module->removeRootView(static_cast<int64_t>(reactTag));
787
787
  }
@@ -791,7 +791,7 @@ void UIManager::removeRootView(double reactTag) noexcept {
791
791
  void UIManager::setChildren(double containerTag, React::JSValueArray &&reactTags) noexcept {
792
792
  m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor(
793
793
  [m = std::weak_ptr<UIManagerModule>(m_module), containerTag, reactTags = std::move(reactTags)]() mutable {
794
- SystraceSection s("UIManager::setChildren");
794
+ TraceSection s("UIManager::setChildren");
795
795
  if (auto module = m.lock()) {
796
796
  module->setChildren(static_cast<int64_t>(containerTag), std::move(reactTags));
797
797
  }
@@ -812,7 +812,7 @@ void UIManager::manageChildren(
812
812
  addChildReactTags = std::move(addChildReactTags),
813
813
  addAtIndices = std::move(addAtIndices),
814
814
  removeAtIndices = std::move(removeAtIndices)]() mutable {
815
- SystraceSection s("UIManager::manageChildren");
815
+ TraceSection s("UIManager::manageChildren");
816
816
  if (auto module = m.lock()) {
817
817
  module->manageChildren(
818
818
  static_cast<int64_t>(containerTag),
@@ -828,7 +828,7 @@ void UIManager::manageChildren(
828
828
  void UIManager::setLayoutAnimationEnabledExperimental(bool enabled) noexcept {
829
829
  m_batchingUIMessageQueue->runOnQueue(
830
830
  Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module), enabled]() mutable {
831
- SystraceSection s("UIManager::setLayoutAnimationEnabledExperimental");
831
+ TraceSection s("UIManager::setLayoutAnimationEnabledExperimental");
832
832
  if (auto module = m.lock()) {
833
833
  module->setLayoutAnimationEnabledExperimental(enabled);
834
834
  }
@@ -838,7 +838,7 @@ void UIManager::setLayoutAnimationEnabledExperimental(bool enabled) noexcept {
838
838
  void UIManager::sendAccessibilityEvent(double reactTag, double eventType) noexcept {
839
839
  m_batchingUIMessageQueue->runOnQueue(
840
840
  Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module), reactTag, eventType]() mutable {
841
- SystraceSection s("UIManager::sendAccessibilityEvent");
841
+ TraceSection s("UIManager::sendAccessibilityEvent");
842
842
  if (auto module = m.lock()) {
843
843
  module->sendAccessibilityEvent(static_cast<int64_t>(reactTag), eventType);
844
844
  }
@@ -855,7 +855,7 @@ void UIManager::showPopupMenu(
855
855
  items = std::move(items),
856
856
  error = std::move(error),
857
857
  success = std::move(success)]() mutable {
858
- SystraceSection s("UIManager::showPopupMenu");
858
+ TraceSection s("UIManager::showPopupMenu");
859
859
  if (auto module = m.lock()) {
860
860
  module->showPopupMenu(static_cast<int64_t>(reactTag), std::move(items), std::move(error), std::move(success));
861
861
  }
@@ -864,7 +864,7 @@ void UIManager::showPopupMenu(
864
864
 
865
865
  void UIManager::dismissPopupMenu() noexcept {
866
866
  m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module)]() mutable {
867
- SystraceSection s("UIManager::dismissPopupMenu");
867
+ TraceSection s("UIManager::dismissPopupMenu");
868
868
  if (auto module = m.lock()) {
869
869
  module->dismissPopupMenu();
870
870
  }