react-native-windows 0.77.0 → 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 +25 -26
  202. package/src/private/animated/NativeAnimatedValidation.js +1 -1
  203. package/src/private/featureflags/ReactNativeFeatureFlags.js +33 -27
  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
@@ -9,6 +9,7 @@
9
9
  #include <Fabric/Composition/CompositionDynamicAutomationProvider.h>
10
10
  #include <Fabric/Composition/UiaHelpers.h>
11
11
  #include <Utils/ValueUtils.h>
12
+ #include <react/renderer/components/textinput/TextInputState.h>
12
13
  #include <tom.h>
13
14
  #include <unicode.h>
14
15
  #include <winrt/Microsoft.UI.Input.h>
@@ -18,7 +19,6 @@
18
19
  #include "../RootComponentView.h"
19
20
  #include "JSValueReader.h"
20
21
  #include "WindowsTextInputShadowNode.h"
21
- #include "WindowsTextInputState.h"
22
22
  #include "guid/msoGuid.h"
23
23
 
24
24
  #include <unicode.h>
@@ -1070,7 +1070,7 @@ void WindowsTextInputComponentView::updateState(
1070
1070
 
1071
1071
  if (m_mostRecentEventCount == m_state->getData().mostRecentEventCount) {
1072
1072
  m_comingFromState = true;
1073
- auto &fragments = m_state->getData().attributedString.getFragments();
1073
+ auto &fragments = m_state->getData().attributedStringBox.getValue().getFragments();
1074
1074
  UpdateText(fragments.size() ? fragments[0].string : "");
1075
1075
 
1076
1076
  m_comingFromState = false;
@@ -1133,7 +1133,7 @@ void WindowsTextInputComponentView::OnTextUpdated() noexcept {
1133
1133
  // auto newAttributedString = getAttributedString();
1134
1134
  // if (data.attributedString == newAttributedString)
1135
1135
  // return;
1136
- data.attributedString = getAttributedString();
1136
+ data.attributedStringBox = facebook::react::AttributedStringBox(getAttributedString());
1137
1137
  data.mostRecentEventCount = m_nativeEventCount;
1138
1138
 
1139
1139
  m_state->updateState(std::move(data));
@@ -1525,4 +1525,4 @@ void WindowsTextInputComponentView::autoCapitalizeOnUpdateProps(
1525
1525
  }
1526
1526
  }
1527
1527
 
1528
- } // namespace winrt::Microsoft::ReactNative::Composition::implementation
1528
+ } // namespace winrt::Microsoft::ReactNative::Composition::implementation
@@ -3,7 +3,7 @@
3
3
 
4
4
  #include "WindowsTextInputShadowNode.h"
5
5
 
6
- #include <react/debug/react_native_assert.h>
6
+ #include <react/featureflags/ReactNativeFeatureFlags.h>
7
7
  #include <react/renderer/attributedstring/AttributedStringBox.h>
8
8
  #include <react/renderer/attributedstring/TextAttributes.h>
9
9
  #include <react/renderer/components/text/BaseTextShadowNode.h>
@@ -12,39 +12,42 @@
12
12
  #include <react/renderer/core/conversions.h>
13
13
  #include <react/renderer/textlayoutmanager/TextLayoutContext.h>
14
14
 
15
- #include <utility>
16
-
17
15
  namespace facebook::react {
18
16
 
19
17
  extern const char WindowsTextInputComponentName[] = "WindowsTextInput";
20
18
 
21
- void WindowsTextInputShadowNode::setContextContainer(ContextContainer *contextContainer) {
19
+ void WindowsTextInputShadowNode::setTextLayoutManager(std::shared_ptr<const TextLayoutManager> textLayoutManager) {
22
20
  ensureUnsealed();
23
- m_contextContainer = contextContainer;
21
+ textLayoutManager_ = std::move(textLayoutManager);
24
22
  }
25
23
 
26
- AttributedString WindowsTextInputShadowNode::getAttributedString(const LayoutContext &layoutContext) const {
27
- // Use BaseTextShadowNode to get attributed string from children
28
-
29
- auto childTextAttributes = TextAttributes::defaultTextAttributes();
30
- childTextAttributes.fontSizeMultiplier = layoutContext.fontSizeMultiplier;
24
+ Size WindowsTextInputShadowNode::measureContent(
25
+ const LayoutContext &layoutContext,
26
+ const LayoutConstraints &layoutConstraints) const {
27
+ if (getStateData().cachedAttributedStringId != 0) {
28
+ return textLayoutManager_
29
+ ->measureCachedSpannableById(
30
+ getStateData().cachedAttributedStringId,
31
+ {}, // TODO getConcreteProps().paragraphAttributes
32
+ layoutConstraints)
33
+ .size;
34
+ }
31
35
 
32
- childTextAttributes.apply(getConcreteProps().textAttributes);
33
- // Don't propagate the background color of the TextInput onto the attributed
34
- // string. Android tries to render shadow of the background alongside the
35
- // shadow of the text which results in weird artifacts.
36
- childTextAttributes.backgroundColor = HostPlatformColor::UndefinedColor;
36
+ // Layout is called right after measure.
37
+ // Measure is marked as `const`, and `layout` is not; so State can be updated
38
+ // during layout, but not during `measure`. If State is out-of-date in layout,
39
+ // it's too late: measure will have already operated on old State. Thus, we
40
+ // use the same value here that we *will* use in layout to update the state.
41
+ AttributedString attributedString = getMostRecentAttributedString(layoutContext);
37
42
 
38
- auto attributedString = AttributedString{};
39
- auto attachments = BaseTextShadowNode::Attachments{};
40
- BaseTextShadowNode::buildAttributedString(childTextAttributes, *this, attributedString, attachments);
41
- attributedString.setBaseTextAttributes(childTextAttributes);
43
+ if (attributedString.isEmpty()) {
44
+ attributedString = getPlaceholderAttributedString(layoutContext);
45
+ }
42
46
 
43
47
  // BaseTextShadowNode only gets children. We must detect and prepend text
44
48
  // value attributes manually.
45
49
  if (!getConcreteProps().text.empty()) {
46
50
  auto textAttributes = TextAttributes::defaultTextAttributes();
47
- textAttributes.fontSizeMultiplier = layoutContext.fontSizeMultiplier;
48
51
  textAttributes.apply(getConcreteProps().textAttributes);
49
52
  auto fragment = AttributedString::Fragment{};
50
53
  fragment.string = getConcreteProps().text;
@@ -57,56 +60,40 @@ AttributedString WindowsTextInputShadowNode::getAttributedString(const LayoutCon
57
60
  attributedString.prependFragment(std::move(fragment));
58
61
  }
59
62
 
60
- return attributedString;
61
- }
62
-
63
- // For measurement purposes, we want to make sure that there's at least a
64
- // single character in the string so that the measured height is greater
65
- // than zero. Otherwise, empty TextInputs with no placeholder don't
66
- // display at all.
67
- // TODO T67606511: We will redefine the measurement of empty strings as part
68
- // of T67606511
69
- AttributedString WindowsTextInputShadowNode::getPlaceholderAttributedString(const LayoutContext &layoutContext) const {
70
- // Return placeholder text, since text and children are empty.
71
- auto textAttributedString = AttributedString{};
72
- auto fragment = AttributedString::Fragment{};
73
- fragment.string = getConcreteProps().placeholder;
74
-
75
- if (fragment.string.empty()) {
76
- fragment.string = BaseTextShadowNode::getEmptyPlaceholder();
77
- }
78
-
79
- auto textAttributes = TextAttributes::defaultTextAttributes();
80
- textAttributes.fontSizeMultiplier = layoutContext.fontSizeMultiplier;
81
- textAttributes.apply(getConcreteProps().textAttributes);
82
-
83
- // If there's no text, it's possible that this Fragment isn't actually
84
- // appended to the AttributedString (see implementation of appendFragment)
85
- fragment.textAttributes = textAttributes;
86
- fragment.parentShadowView = ShadowView(*this);
87
- textAttributedString.appendFragment(std::move(fragment));
88
-
89
- return textAttributedString;
63
+ TextLayoutContext textLayoutContext;
64
+ textLayoutContext.pointScaleFactor = layoutContext.pointScaleFactor;
65
+ return textLayoutManager_
66
+ ->measure(
67
+ AttributedStringBox{attributedString},
68
+ {}, // TODO getConcreteProps().paragraphAttributes,
69
+ textLayoutContext,
70
+ layoutConstraints)
71
+ .size;
90
72
  }
91
73
 
92
- void WindowsTextInputShadowNode::setTextLayoutManager(SharedTextLayoutManager textLayoutManager) {
93
- ensureUnsealed();
94
- m_textLayoutManager = std::move(textLayoutManager);
74
+ void WindowsTextInputShadowNode::layout(LayoutContext layoutContext) {
75
+ updateStateIfNeeded(layoutContext);
76
+ ConcreteViewShadowNode::layout(layoutContext);
95
77
  }
96
78
 
97
- AttributedString WindowsTextInputShadowNode::getMostRecentAttributedString(const LayoutContext &layoutContext) const {
98
- const auto &state = getStateData();
99
-
100
- auto reactTreeAttributedString = getAttributedString(layoutContext);
101
-
102
- // Sometimes the treeAttributedString will only differ from the state
103
- // not by inherent properties (string or prop attributes), but by the frame of
104
- // the parent which has changed Thus, we can't directly compare the entire
105
- // AttributedString
106
- bool treeAttributedStringChanged =
107
- !state.reactTreeAttributedString.compareTextAttributesWithoutFrame(reactTreeAttributedString);
108
-
109
- return (!treeAttributedStringChanged ? state.attributedString : reactTreeAttributedString);
79
+ LayoutConstraints WindowsTextInputShadowNode::getTextConstraints(const LayoutConstraints &layoutConstraints) const {
80
+ if (getConcreteProps().multiline) {
81
+ return layoutConstraints;
82
+ } else {
83
+ // A single line TextInput acts as a horizontal scroller of infinitely
84
+ // expandable text, so we want to measure the text as if it is allowed to
85
+ // infinitely expand horizontally, and later clamp to the constraints of the
86
+ // input.
87
+ return LayoutConstraints{
88
+ .minimumSize = layoutConstraints.minimumSize,
89
+ .maximumSize =
90
+ Size{
91
+ .width = std::numeric_limits<Float>::infinity(),
92
+ .height = layoutConstraints.maximumSize.height,
93
+ },
94
+ .layoutDirection = layoutConstraints.layoutDirection,
95
+ };
96
+ }
110
97
  }
111
98
 
112
99
  void WindowsTextInputShadowNode::updateStateIfNeeded(const LayoutContext &layoutContext) {
@@ -146,60 +133,101 @@ void WindowsTextInputShadowNode::updateStateIfNeeded(const LayoutContext &layout
146
133
  // current attributedString unchanged, and pass in zero for the "event count"
147
134
  // so no changes are applied There's no way to prevent a state update from
148
135
  // flowing to Java, so we just ensure it's a noop in those cases.
149
- setStateData(facebook::react::WindowsTextInputState{
150
- newEventCount,
151
- newAttributedString,
152
- reactTreeAttributedString,
153
- {},
154
- state.defaultThemePaddingStart,
155
- state.defaultThemePaddingEnd,
156
- state.defaultThemePaddingTop,
157
- state.defaultThemePaddingBottom});
136
+ setStateData(facebook::react::TextInputState{
137
+ AttributedStringBox(newAttributedString), reactTreeAttributedString, {}, newEventCount});
158
138
  }
159
139
 
160
- #pragma mark - LayoutableShadowNode
140
+ AttributedString WindowsTextInputShadowNode::getAttributedString(const LayoutContext &layoutContext) const {
141
+ // Use BaseTextShadowNode to get attributed string from children
161
142
 
162
- Size WindowsTextInputShadowNode::measureContent(
163
- const LayoutContext &layoutContext,
164
- const LayoutConstraints &layoutConstraints) const {
165
- if (getStateData().cachedAttributedStringId != 0) {
166
- return m_textLayoutManager
167
- ->measureCachedSpannableById(
168
- getStateData().cachedAttributedStringId,
169
- {}, // TODO getConcreteProps().paragraphAttributes
170
- layoutConstraints)
171
- .size;
172
- }
143
+ auto childTextAttributes = TextAttributes::defaultTextAttributes();
144
+ childTextAttributes.fontSizeMultiplier = layoutContext.fontSizeMultiplier;
173
145
 
174
- // Layout is called right after measure.
175
- // Measure is marked as `const`, and `layout` is not; so State can be updated
176
- // during layout, but not during `measure`. If State is out-of-date in layout,
177
- // it's too late: measure will have already operated on old State. Thus, we
178
- // use the same value here that we *will* use in layout to update the state.
179
- AttributedString attributedString = getMostRecentAttributedString(layoutContext);
146
+ childTextAttributes.apply(getConcreteProps().textAttributes);
147
+ // Don't propagate the background color of the TextInput onto the attributed
148
+ // string. Android tries to render shadow of the background alongside the
149
+ // shadow of the text which results in weird artifacts.
150
+ childTextAttributes.backgroundColor = HostPlatformColor::UndefinedColor;
180
151
 
181
- if (attributedString.isEmpty()) {
182
- attributedString = getPlaceholderAttributedString(layoutContext);
183
- }
152
+ auto attributedString = AttributedString{};
153
+ auto attachments = BaseTextShadowNode::Attachments{};
154
+ BaseTextShadowNode::buildAttributedString(childTextAttributes, *this, attributedString, attachments);
155
+ attributedString.setBaseTextAttributes(childTextAttributes);
184
156
 
185
- if (attributedString.isEmpty() && getStateData().mostRecentEventCount != 0) {
186
- return {0, 0};
157
+ // BaseTextShadowNode only gets children. We must detect and prepend text
158
+ // value attributes manually.
159
+ if (!getConcreteProps().text.empty()) {
160
+ auto textAttributes = TextAttributes::defaultTextAttributes();
161
+ textAttributes.fontSizeMultiplier = layoutContext.fontSizeMultiplier;
162
+ textAttributes.apply(getConcreteProps().textAttributes);
163
+ auto fragment = AttributedString::Fragment{};
164
+ fragment.string = getConcreteProps().text;
165
+ fragment.textAttributes = textAttributes;
166
+ // If the TextInput opacity is 0 < n < 1, the opacity of the TextInput and
167
+ // text value's background will stack. This is a hack/workaround to prevent
168
+ // that effect.
169
+ fragment.textAttributes.backgroundColor = clearColor();
170
+ fragment.parentShadowView = ShadowView(*this);
171
+ attributedString.prependFragment(std::move(fragment));
187
172
  }
188
173
 
189
- TextLayoutContext textLayoutContext;
190
- textLayoutContext.pointScaleFactor = layoutContext.pointScaleFactor;
191
- return m_textLayoutManager
192
- ->measure(
193
- AttributedStringBox{attributedString},
194
- {}, // TODO getConcreteProps().paragraphAttributes,
195
- textLayoutContext,
196
- layoutConstraints)
197
- .size;
174
+ return attributedString;
198
175
  }
199
176
 
200
- void WindowsTextInputShadowNode::layout(LayoutContext layoutContext) {
201
- updateStateIfNeeded(layoutContext);
202
- ConcreteViewShadowNode::layout(layoutContext);
177
+ AttributedString WindowsTextInputShadowNode::getMostRecentAttributedString(const LayoutContext &layoutContext) const {
178
+ const auto &state = getStateData();
179
+
180
+ auto reactTreeAttributedString = getAttributedString(layoutContext);
181
+
182
+ // Sometimes the treeAttributedString will only differ from the state
183
+ // not by inherent properties (string or prop attributes), but by the frame of
184
+ // the parent which has changed Thus, we can't directly compare the entire
185
+ // AttributedString
186
+ bool treeAttributedStringChanged =
187
+ !state.reactTreeAttributedString.compareTextAttributesWithoutFrame(reactTreeAttributedString);
188
+
189
+ return (!treeAttributedStringChanged ? state.attributedStringBox.getValue() : reactTreeAttributedString);
190
+ }
191
+
192
+ // For measurement purposes, we want to make sure that there's at least a
193
+ // single character in the string so that the measured height is greater
194
+ // than zero. Otherwise, empty TextInputs with no placeholder don't
195
+ // display at all.
196
+ // TODO T67606511: We will redefine the measurement of empty strings as part
197
+ // of T67606511
198
+ AttributedString WindowsTextInputShadowNode::getPlaceholderAttributedString(const LayoutContext &layoutContext) const {
199
+ // Return placeholder text, since text and children are empty.
200
+ auto textAttributedString = AttributedString{};
201
+ auto fragment = AttributedString::Fragment{};
202
+ fragment.string = getConcreteProps().placeholder;
203
+
204
+ if (fragment.string.empty()) {
205
+ fragment.string = BaseTextShadowNode::getEmptyPlaceholder();
206
+ }
207
+
208
+ auto textAttributes = TextAttributes::defaultTextAttributes();
209
+ textAttributes.fontSizeMultiplier = layoutContext.fontSizeMultiplier;
210
+ textAttributes.apply(getConcreteProps().textAttributes);
211
+
212
+ // If there's no text, it's possible that this Fragment isn't actually
213
+ // appended to the AttributedString (see implementation of appendFragment)
214
+ fragment.textAttributes = textAttributes;
215
+ fragment.parentShadowView = ShadowView(*this);
216
+ textAttributedString.appendFragment(std::move(fragment));
217
+
218
+ return textAttributedString;
219
+ // TextLayoutContext textLayoutContext;
220
+ // textLayoutContext.pointScaleFactor = layoutContext.pointScaleFactor;
221
+ // auto textSize = textLayoutManager_
222
+ // ->measure(
223
+ // AttributedStringBox{attributedString},
224
+ // getConcreteProps().paragraphAttributes,
225
+ // textLayoutContext,
226
+ // textConstraints)
227
+ // .size;
228
+ // return layoutConstraints.clamp(textSize);
203
229
  }
204
230
 
231
+ #pragma mark - LayoutableShadowNode
232
+
205
233
  } // namespace facebook::react
@@ -7,12 +7,12 @@
7
7
  #include <unordered_map>
8
8
  #include "WindowsTextInputEventEmitter.h"
9
9
  #include "WindowsTextInputProps.h"
10
- #include "WindowsTextInputState.h"
11
10
 
11
+ #include <react/renderer/attributedstring/AttributedString.h>
12
+ #include <react/renderer/components/textinput/TextInputState.h>
12
13
  #include <react/renderer/components/view/ConcreteViewShadowNode.h>
13
14
  #include <react/utils/ContextContainer.h>
14
15
 
15
- #include <react/renderer/attributedstring/AttributedString.h>
16
16
  #include <react/renderer/textlayoutmanager/TextLayoutManager.h>
17
17
 
18
18
  namespace facebook::react {
@@ -26,58 +26,58 @@ class WindowsTextInputShadowNode final : public ConcreteViewShadowNode<
26
26
  WindowsTextInputComponentName,
27
27
  WindowsTextInputProps,
28
28
  WindowsTextInputEventEmitter,
29
- WindowsTextInputState> {
29
+ TextInputState> {
30
30
  public:
31
+ using ConcreteViewShadowNode::ConcreteViewShadowNode;
32
+
31
33
  static ShadowNodeTraits BaseTraits() {
32
34
  auto traits = ConcreteViewShadowNode::BaseTraits();
33
35
  traits.set(ShadowNodeTraits::Trait::LeafYogaNode);
36
+ traits.set(ShadowNodeTraits::Trait::MeasurableYogaNode);
34
37
  traits.set(ShadowNodeTraits::Trait::BaselineYogaNode);
35
38
  return traits;
36
39
  }
37
40
 
38
- using ConcreteViewShadowNode::ConcreteViewShadowNode;
39
-
40
- void setContextContainer(ContextContainer *contextContainer);
41
-
42
- /*
43
- * Returns a `AttributedString` which represents text content of the node.
44
- */
45
- AttributedString getAttributedString(const LayoutContext &layoutContext) const;
46
- AttributedString getPlaceholderAttributedString(const LayoutContext &layoutContext) const;
47
-
48
41
  /*
49
42
  * Associates a shared TextLayoutManager with the node.
50
- * `ParagraphShadowNode` uses the manager to measure text content
51
- * and construct `ParagraphState` objects.
43
+ * `TextInputShadowNode` uses the manager to measure text content
44
+ * and construct `TextInputState` objects.
52
45
  */
53
- void setTextLayoutManager(SharedTextLayoutManager textLayoutManager);
46
+ void setTextLayoutManager(std::shared_ptr<const TextLayoutManager> textLayoutManager);
54
47
 
55
48
  #pragma mark - LayoutableShadowNode
56
-
49
+ protected:
57
50
  Size measureContent(const LayoutContext &layoutContext, const LayoutConstraints &layoutConstraints) const override;
51
+
58
52
  void layout(LayoutContext layoutContext) override;
59
53
 
60
- private:
61
- ContextContainer *m_contextContainer{};
54
+ // Float baseline(const LayoutContext& layoutContext, Size size) const override;
62
55
 
63
- /**
64
- * Get the most up-to-date attributed string for measurement and State.
56
+ std::shared_ptr<const TextLayoutManager> textLayoutManager_;
57
+
58
+ /*
59
+ * Determines the constraints to use while measure the underlying text
65
60
  */
66
- AttributedString getMostRecentAttributedString(const LayoutContext &layoutContext) const;
61
+ LayoutConstraints getTextConstraints(const LayoutConstraints &layoutConstraints) const;
67
62
 
63
+ private:
68
64
  /*
69
65
  * Creates a `State` object (with `AttributedText` and
70
66
  * `TextLayoutManager`) if needed.
71
67
  */
72
68
  void updateStateIfNeeded(const LayoutContext &layoutContext);
73
69
 
74
- SharedTextLayoutManager m_textLayoutManager;
75
-
76
70
  /*
77
- * Cached attributed string that represents the content of the subtree started
78
- * from the node.
71
+ * Returns a `AttributedString` which represents text content of the node.
79
72
  */
80
- mutable std::optional<AttributedString> m_cachedAttributedString{};
73
+ AttributedString getAttributedString(const LayoutContext &layoutContext) const;
74
+
75
+ /**
76
+ * Get the most up-to-date attributed string for measurement and State.
77
+ */
78
+ AttributedString getMostRecentAttributedString(const LayoutContext &layoutContext) const;
79
+
80
+ AttributedString getPlaceholderAttributedString(const LayoutContext &layoutContext) const;
81
81
  };
82
82
 
83
83
  } // namespace facebook::react
@@ -124,7 +124,7 @@ bool Theme::TryGetPlatformColor(const std::string &platformColor, winrt::Windows
124
124
 
125
125
  #ifndef CORE_ABI
126
126
  // If XAML is loaded, look in application resources
127
- if (xaml::TryGetCurrentApplication()) {
127
+ if (xaml::TryGetCurrentUwpXamlApplication()) {
128
128
  const auto appResources{xaml::Application::Current().Resources()};
129
129
  const auto boxedResourceName{winrt::box_value(winrt::to_hstring(platformColor))};
130
130
  if (appResources.HasKey(boxedResourceName)) {
@@ -42,44 +42,59 @@ HRESULT UiaNavigateHelper(
42
42
  }
43
43
  } break;
44
44
 
45
- case NavigateDirection_LastChild:
46
- __fallthrough;
47
-
45
+ case NavigateDirection_LastChild: {
46
+ auto children = view.Children();
47
+ if (children.Size() != 0) {
48
+ uint32_t index = children.Size() - 1;
49
+ do {
50
+ auto child = children.GetAt(index).as<winrt::Microsoft::ReactNative::implementation::ComponentView>();
51
+ if (uiaProvider = child->EnsureUiaProvider()) {
52
+ break;
53
+ }
54
+ } while (index-- != 0);
55
+ }
56
+ } break;
48
57
  case NavigateDirection_FirstChild: {
49
58
  auto children = view.Children();
50
- auto index = direction == NavigateDirection_FirstChild ? 0 : children.Size() - 1;
51
- if (!children.Size() == 0) {
52
- uiaProvider = children.GetAt(index)
53
- .as<winrt::Microsoft::ReactNative::Composition::implementation::ComponentView>()
54
- ->EnsureUiaProvider();
59
+ if (children.Size() != 0) {
60
+ uint32_t index = 0;
61
+ do {
62
+ auto child = children.GetAt(index).as<winrt::Microsoft::ReactNative::implementation::ComponentView>();
63
+ if (uiaProvider = child->EnsureUiaProvider()) {
64
+ break;
65
+ }
66
+ } while (++index != children.Size());
55
67
  }
56
68
  } break;
57
-
58
69
  case NavigateDirection_NextSibling: {
59
- auto parentCV = view.Parent().as<winrt::Microsoft::ReactNative::Composition::implementation::ComponentView>();
70
+ auto parentCV = view.Parent().as<winrt::Microsoft::ReactNative::implementation::ComponentView>();
60
71
  if (parentCV != nullptr) {
61
72
  auto children = parentCV->Children();
62
73
  auto it = std::find(children.begin(), children.end(), view);
63
- if (++it != children.end()) {
64
- uiaProvider = (*it)
65
- .as<winrt::Microsoft::ReactNative::Composition::implementation::ComponentView>()
66
- ->EnsureUiaProvider();
74
+
75
+ while (++it != children.end()) {
76
+ auto nextchild = (*it).as<winrt::Microsoft::ReactNative::implementation::ComponentView>();
77
+ if (uiaProvider = nextchild->EnsureUiaProvider()) {
78
+ break;
79
+ }
67
80
  }
68
81
  }
69
82
  } break;
70
83
 
71
84
  case NavigateDirection_PreviousSibling: {
72
- auto parentCV = view.Parent().as<winrt::Microsoft::ReactNative::Composition::implementation::ComponentView>();
85
+ auto parentCV = view.Parent().as<winrt::Microsoft::ReactNative::implementation::ComponentView>();
73
86
  if (parentCV != nullptr) {
74
87
  auto children = parentCV->Children();
75
- for (auto i = children.Size() - 1; i > 0; i--) {
76
- auto child = children.GetAt(i);
77
- if (child == view) {
78
- uiaProvider = children.GetAt(i - 1)
79
- .as<winrt::Microsoft::ReactNative::Composition::implementation::ComponentView>()
80
- ->EnsureUiaProvider();
81
- break;
82
- }
88
+ auto it = std::find(children.begin(), children.end(), view);
89
+
90
+ if (it != children.begin()) {
91
+ do {
92
+ it--;
93
+ auto prevchild = (*it).as<winrt::Microsoft::ReactNative::implementation::ComponentView>();
94
+ if (uiaProvider = prevchild->EnsureUiaProvider()) {
95
+ break;
96
+ }
97
+ } while (it != children.begin());
83
98
  }
84
99
  }
85
100
  } break;
@@ -174,16 +189,6 @@ long GetLiveSetting(const std::string &liveRegion) noexcept {
174
189
  return LiveSetting::Off;
175
190
  }
176
191
 
177
- std::string extractAccessibilityValue(const facebook::react::AccessibilityValue &value) noexcept {
178
- if (value.now.has_value()) {
179
- return std::to_string(value.now.value());
180
- } else if (value.text.has_value()) {
181
- return value.text.value();
182
- } else {
183
- return "";
184
- }
185
- }
186
-
187
192
  void DispatchAccessibilityAction(::Microsoft::ReactNative::ReactTaggedView &view, const std::string &action) noexcept {
188
193
  auto strongView = view.view();
189
194
 
@@ -32,8 +32,6 @@ void UpdateUiaProperty(
32
32
 
33
33
  long GetLiveSetting(const std::string &liveRegion) noexcept;
34
34
 
35
- std::string extractAccessibilityValue(const facebook::react::AccessibilityValue &value) noexcept;
36
-
37
35
  void DispatchAccessibilityAction(::Microsoft::ReactNative::ReactTaggedView &view, const std::string &action) noexcept;
38
36
 
39
37
  ExpandCollapseState GetExpandCollapseState(const bool &expanded) noexcept;
@@ -13,7 +13,6 @@
13
13
  #include <Fabric/Composition/ReactNativeIsland.h>
14
14
  #include <Fabric/Composition/RootComponentView.h>
15
15
  #include <Fabric/FabricUIManagerModule.h>
16
- #include <Fabric/ReactNativeConfigProperties.h>
17
16
  #include <Fabric/WindowsComponentDescriptorRegistry.h>
18
17
  #include <IReactContext.h>
19
18
  #include <IReactRootView.h>
@@ -61,9 +60,6 @@ FabricUIManager::~FabricUIManager() {
61
60
  }
62
61
 
63
62
  void FabricUIManager::installFabricUIManager() noexcept {
64
- std::shared_ptr<const facebook::react::ReactNativeConfig> config =
65
- std::make_shared<const ReactNativeConfigProperties>(m_context.Properties());
66
-
67
63
  std::lock_guard<std::mutex> schedulerLock(m_schedulerMutex);
68
64
 
69
65
  facebook::react::ContextContainer::Shared contextContainer = std::make_shared<facebook::react::ContextContainer>();
@@ -89,8 +85,6 @@ void FabricUIManager::installFabricUIManager() noexcept {
89
85
  return std::make_unique<AsynchronousEventBeat>(ownerBox, context, runtimeScheduler);
90
86
  };
91
87
 
92
- contextContainer->insert("ReactNativeConfig", config);
93
-
94
88
  toolbox.contextContainer = contextContainer;
95
89
  toolbox.componentRegistryFactory = [](facebook::react::EventDispatcher::Weak const &eventDispatcher,
96
90
  facebook::react::ContextContainer::Shared const &contextContainer)
@@ -134,7 +128,6 @@ void FabricUIManager::startSurface(
134
128
 
135
129
  auto root = rootComponentViewDescriptor.view
136
130
  .as<winrt::Microsoft::ReactNative::Composition::implementation::RootComponentView>();
137
- root->theme(winrt::get_self<winrt::Microsoft::ReactNative::Composition::implementation::Theme>(rootView.Theme()));
138
131
  root->start(rootView);
139
132
  });
140
133
 
@@ -154,15 +147,11 @@ void FabricUIManager::startSurface(
154
147
  void FabricUIManager::stopSurface(facebook::react::SurfaceId surfaceId) noexcept {
155
148
  m_surfaceManager->stopSurface(surfaceId);
156
149
  auto &rootDescriptor = m_registry.componentViewDescriptorWithTag(surfaceId);
150
+ rootDescriptor.view.as<winrt::Microsoft::ReactNative::Composition::implementation::RootComponentView>()->stop();
157
151
  m_registry.enqueueComponentViewWithComponentHandle(
158
152
  facebook::react::RootShadowNode::Handle(), surfaceId, rootDescriptor);
159
153
  }
160
154
 
161
- winrt::Microsoft::ReactNative::ReactNativeIsland FabricUIManager::GetReactNativeIsland(
162
- facebook::react::SurfaceId surfaceId) const noexcept {
163
- return m_surfaceRegistry.at(surfaceId).wkRootView.get();
164
- }
165
-
166
155
  facebook::react::Size FabricUIManager::measureSurface(
167
156
  facebook::react::SurfaceId surfaceId,
168
157
  const facebook::react::LayoutConstraints &layoutConstraints,
@@ -230,9 +219,9 @@ void FabricUIManager::RCTPerformMountInstructions(
230
219
  case facebook::react::ShadowViewMutation::Insert: {
231
220
  auto &oldChildShadowView = mutation.oldChildShadowView;
232
221
  auto &newChildShadowView = mutation.newChildShadowView;
233
- auto &parentShadowView = mutation.parentShadowView;
222
+ auto &parentTag = mutation.parentTag;
234
223
  auto &newChildViewDescriptor = m_registry.componentViewDescriptorWithTag(newChildShadowView.tag);
235
- auto parentViewDescriptor = m_registry.componentViewDescriptorWithTag(parentShadowView.tag);
224
+ auto parentViewDescriptor = m_registry.componentViewDescriptorWithTag(parentTag);
236
225
  auto newChildComponentView =
237
226
  winrt::get_self<winrt::Microsoft::ReactNative::implementation::ComponentView>(newChildViewDescriptor.view);
238
227
 
@@ -249,9 +238,9 @@ void FabricUIManager::RCTPerformMountInstructions(
249
238
 
250
239
  case facebook::react::ShadowViewMutation::Remove: {
251
240
  auto &oldChildShadowView = mutation.oldChildShadowView;
252
- auto &parentShadowView = mutation.parentShadowView;
241
+ auto &parentTag = mutation.parentTag;
253
242
  auto &oldChildViewDescriptor = m_registry.componentViewDescriptorWithTag(oldChildShadowView.tag);
254
- auto &parentViewDescriptor = m_registry.componentViewDescriptorWithTag(parentShadowView.tag);
243
+ auto &parentViewDescriptor = m_registry.componentViewDescriptorWithTag(parentTag);
255
244
  winrt::get_self<winrt::Microsoft::ReactNative::implementation::ComponentView>(parentViewDescriptor.view)
256
245
  ->UnmountChildComponentView(oldChildViewDescriptor.view, mutation.index);
257
246
  break;
@@ -49,9 +49,6 @@ struct FabricUIManager final : public std::enable_shared_from_this<FabricUIManag
49
49
 
50
50
  const IComponentViewRegistry &GetViewRegistry() const noexcept;
51
51
 
52
- winrt::Microsoft::ReactNative::ReactNativeIsland GetReactNativeIsland(
53
- facebook::react::SurfaceId surfaceId) const noexcept;
54
-
55
52
  static winrt::Microsoft::ReactNative::ReactNotificationId<facebook::react::SurfaceId> NotifyMountedId() noexcept;
56
53
 
57
54
  private: