react-native-windows 0.81.1 → 0.82.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 (724) hide show
  1. package/.flowconfig +11 -10
  2. package/Directory.Build.props +3 -3
  3. package/Folly/Folly.vcxproj +1 -3
  4. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +7 -3
  5. package/Libraries/Alert/RCTAlertManager.android.js +4 -2
  6. package/Libraries/Animated/Animated.d.ts +2 -0
  7. package/Libraries/Animated/AnimatedEvent.js +1 -1
  8. package/Libraries/Animated/AnimatedExports.js.flow +1 -0
  9. package/Libraries/Animated/AnimatedImplementation.js +4 -2
  10. package/Libraries/Animated/AnimatedMock.js +1 -1
  11. package/Libraries/Animated/Easing.js +2 -0
  12. package/Libraries/Animated/NativeAnimatedAllowlist.js +1 -0
  13. package/Libraries/Animated/animations/Animation.js +19 -20
  14. package/Libraries/Animated/animations/TimingAnimation.js +2 -0
  15. package/Libraries/Animated/components/AnimatedScrollView.js +3 -2
  16. package/Libraries/Animated/components/AnimatedSectionList.js +1 -1
  17. package/Libraries/Animated/nodes/AnimatedColor.js +9 -9
  18. package/Libraries/Animated/nodes/AnimatedInterpolation.js +4 -4
  19. package/Libraries/Animated/nodes/AnimatedNode.js +14 -7
  20. package/Libraries/Animated/nodes/AnimatedObject.js +7 -7
  21. package/Libraries/Animated/nodes/AnimatedProps.js +32 -32
  22. package/Libraries/Animated/nodes/AnimatedStyle.js +23 -21
  23. package/Libraries/Animated/nodes/AnimatedTransform.js +6 -6
  24. package/Libraries/Animated/nodes/AnimatedValue.js +18 -18
  25. package/Libraries/AppState/AppState.js +8 -4
  26. package/Libraries/BatchedBridge/MessageQueue.js +4 -0
  27. package/Libraries/BatchedBridge/NativeModules.js +1 -1
  28. package/Libraries/Blob/BlobManager.js +1 -1
  29. package/Libraries/Blob/URLSearchParams.js +2 -0
  30. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +2 -2
  31. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +2 -2
  32. package/Libraries/Components/Button.js +1 -1
  33. package/Libraries/Components/Button.windows.js +1 -1
  34. package/Libraries/Components/Flyout/FlyoutNativeComponent.js +2 -2
  35. package/Libraries/Components/Glyph/GlyphNativeComponent.js +1 -1
  36. package/Libraries/Components/Popup/PopupNativeComponent.js +1 -0
  37. package/Libraries/Components/Pressable/Pressable.d.ts +8 -0
  38. package/Libraries/Components/Pressable/Pressable.js +10 -1
  39. package/Libraries/Components/Pressable/Pressable.windows.js +30 -2
  40. package/Libraries/Components/Pressable/useAndroidRippleForView.js +2 -2
  41. package/Libraries/Components/ScrollView/ScrollView.js +13 -4
  42. package/Libraries/Components/ScrollView/ScrollView.windows.js +14 -5
  43. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
  44. package/Libraries/Components/StatusBar/StatusBar.js +2 -2
  45. package/Libraries/Components/Switch/Switch.js +2 -2
  46. package/Libraries/Components/Switch/Switch.windows.js +2 -2
  47. package/Libraries/Components/TextInput/TextInput.flow.js +12 -5
  48. package/Libraries/Components/TextInput/TextInput.flow.windows.js +12 -5
  49. package/Libraries/Components/TextInput/TextInput.js +14 -5
  50. package/Libraries/Components/TextInput/TextInput.windows.js +23 -11
  51. package/Libraries/Components/TextInput/TextInputState.js +1 -1
  52. package/Libraries/Components/TextInput/TextInputState.windows.js +1 -1
  53. package/Libraries/Components/Touchable/TouchableBounce.js +1 -1
  54. package/Libraries/Components/Touchable/TouchableHighlight.js +1 -1
  55. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -1
  56. package/Libraries/Components/Touchable/TouchableOpacity.js +1 -1
  57. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +3 -3
  58. package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +1 -1
  59. package/Libraries/Components/View/View.js +81 -167
  60. package/Libraries/Components/View/View.windows.js +202 -302
  61. package/Libraries/Core/Devtools/loadBundleFromServer.js +1 -1
  62. package/Libraries/Core/Devtools/loadBundleFromServer.windows.js +1 -1
  63. package/Libraries/Core/ExceptionsManager.js +4 -2
  64. package/Libraries/Core/ReactFiberErrorDialog.js +3 -3
  65. package/Libraries/Core/ReactNativeVersion.js +37 -10
  66. package/Libraries/Core/Timers/JSTimers.js +3 -1
  67. package/Libraries/Core/Timers/immediateShim.js +1 -1
  68. package/Libraries/Core/Timers/queueMicrotask.js +1 -0
  69. package/Libraries/Core/setUpPerformance.js +2 -1
  70. package/Libraries/Debugging/DebuggingOverlayRegistry.js +5 -3
  71. package/Libraries/Image/AssetSourceResolver.windows.js +2 -2
  72. package/Libraries/Image/Image.android.js +327 -111
  73. package/Libraries/Image/Image.ios.js +6 -1
  74. package/Libraries/Image/Image.windows.js +28 -61
  75. package/Libraries/Image/ImageSourceUtils.js +8 -2
  76. package/Libraries/Image/resolveAssetSource.js +1 -1
  77. package/Libraries/Image/resolveAssetSource.windows.js +1 -1
  78. package/Libraries/Interaction/InteractionManager.js +118 -167
  79. package/Libraries/Interaction/PanResponder.js +1 -1
  80. package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -0
  81. package/Libraries/Lists/FlatList.js +5 -6
  82. package/Libraries/LogBox/Data/LogBoxData.js +5 -2
  83. package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
  84. package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +1 -1
  85. package/Libraries/Modal/Modal.js +3 -3
  86. package/Libraries/Modal/Modal.windows.js +2 -2
  87. package/Libraries/NativeComponent/NativeComponentRegistry.js +1 -1
  88. package/Libraries/NativeComponent/ViewConfig.js +2 -2
  89. package/Libraries/Network/RCTNetworking.android.js +1 -1
  90. package/Libraries/Network/RCTNetworking.ios.js +1 -1
  91. package/Libraries/Network/RCTNetworking.windows.js +1 -1
  92. package/Libraries/Network/XMLHttpRequest.js +20 -5
  93. package/Libraries/Network/convertRequestBody.js +1 -1
  94. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +10 -9
  95. package/Libraries/Pressability/HoverState.js +2 -0
  96. package/Libraries/Pressability/Pressability.js +1 -1
  97. package/Libraries/Pressability/Pressability.windows.js +5 -5
  98. package/Libraries/PushNotificationIOS/PushNotificationIOS.js +2 -2
  99. package/Libraries/ReactNative/AppRegistryImpl.js +4 -2
  100. package/Libraries/ReactNative/PaperUIManager.windows.js +4 -4
  101. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +2 -0
  102. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +3 -3
  103. package/Libraries/ReactNative/RendererImplementation.js +116 -116
  104. package/Libraries/ReactNative/UIManager.js +3 -3
  105. package/Libraries/ReactNative/renderApplication.js +1 -0
  106. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +1 -1
  107. package/Libraries/Renderer/implementations/ReactFabric-dev.js +38 -35
  108. package/Libraries/Renderer/implementations/ReactFabric-prod.js +51 -22
  109. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +54 -24
  110. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +36 -33
  111. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +5 -5
  112. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +5 -5
  113. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -1
  114. package/Libraries/Share/Share.js +4 -0
  115. package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +2 -2
  116. package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +2 -2
  117. package/Libraries/StyleSheet/PlatformColorValueTypes.windows.js +2 -0
  118. package/Libraries/StyleSheet/StyleSheet.d.ts +7 -22
  119. package/Libraries/StyleSheet/StyleSheetExports.js +2 -8
  120. package/Libraries/StyleSheet/StyleSheetExports.js.flow +11 -18
  121. package/Libraries/StyleSheet/flattenStyle.js +2 -2
  122. package/Libraries/StyleSheet/processAspectRatio.js +2 -0
  123. package/Libraries/StyleSheet/processFilter.js +5 -5
  124. package/Libraries/StyleSheet/splitLayoutProps.js +2 -2
  125. package/Libraries/Text/Text.js +534 -234
  126. package/Libraries/Text/Text.windows.js +622 -265
  127. package/Libraries/Text/TextNativeComponent.js +2 -2
  128. package/Libraries/Utilities/Appearance.d.ts +3 -5
  129. package/Libraries/Utilities/Appearance.js +5 -17
  130. package/Libraries/Utilities/HMRClient.js +2 -1
  131. package/Libraries/Utilities/Platform.android.js +3 -3
  132. package/Libraries/Utilities/Platform.d.ts +1 -0
  133. package/Libraries/Utilities/Platform.ios.js +1 -1
  134. package/Libraries/Utilities/Platform.windows.js +3 -3
  135. package/Libraries/Utilities/PlatformTypes.js +1 -1
  136. package/Libraries/Utilities/ReactNativeTestTools.js +12 -0
  137. package/Libraries/Utilities/SceneTracker.js +1 -1
  138. package/Libraries/Utilities/codegenNativeCommands.js +1 -1
  139. package/Libraries/Utilities/codegenNativeComponent.js +1 -1
  140. package/Libraries/Utilities/createPerformanceLogger.js +32 -0
  141. package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +2 -0
  142. package/Libraries/Utilities/differ/pointsDiffer.js +1 -1
  143. package/Libraries/Utilities/useMergeRefs.js +1 -1
  144. package/Libraries/WebSocket/WebSocketInterceptor.js +2 -0
  145. package/Libraries/promiseRejectionTrackingOptions.js +17 -31
  146. package/Libraries/vendor/emitter/EventEmitter.js +1 -1
  147. package/Microsoft.ReactNative/App.xaml +5 -0
  148. package/Microsoft.ReactNative/Base/CxxReactIncludes.h +0 -3
  149. package/Microsoft.ReactNative/CompositionContext.idl +0 -2
  150. package/Microsoft.ReactNative/Fabric/AbiViewProps.cpp +2 -2
  151. package/Microsoft.ReactNative/Fabric/AbiViewProps.h +0 -2
  152. package/Microsoft.ReactNative/Fabric/ComponentView.cpp +26 -0
  153. package/Microsoft.ReactNative/Fabric/ComponentView.h +2 -0
  154. package/Microsoft.ReactNative/Fabric/Composition/ActivityIndicatorComponentView.cpp +0 -1
  155. package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.cpp +0 -69
  156. package/Microsoft.ReactNative/Fabric/Composition/Composition.Input.h +1 -15
  157. package/Microsoft.ReactNative/Fabric/Composition/CompositionAnnotationProvider.cpp +2 -5
  158. package/Microsoft.ReactNative/Fabric/Composition/CompositionAnnotationProvider.h +1 -4
  159. package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.cpp +0 -31
  160. package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper.h +0 -10
  161. package/Microsoft.ReactNative/Fabric/Composition/CompositionContextHelper_emptyimpl.cpp +0 -4
  162. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +65 -32
  163. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h +9 -0
  164. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.cpp +8 -6
  165. package/Microsoft.ReactNative/Fabric/Composition/CompositionEventHandler.h +0 -2
  166. package/Microsoft.ReactNative/Fabric/Composition/CompositionHelpers.h +0 -2
  167. package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +0 -9
  168. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp +2 -11
  169. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h +0 -4
  170. package/Microsoft.ReactNative/Fabric/Composition/CompositionTextProvider.cpp +4 -7
  171. package/Microsoft.ReactNative/Fabric/Composition/CompositionTextProvider.h +1 -5
  172. package/Microsoft.ReactNative/Fabric/Composition/CompositionTextRangeProvider.cpp +68 -53
  173. package/Microsoft.ReactNative/Fabric/Composition/CompositionTextRangeProvider.h +1 -5
  174. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +20 -18
  175. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.h +10 -3
  176. package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.cpp +30 -9
  177. package/Microsoft.ReactNative/Fabric/Composition/ContentIslandComponentView.h +4 -1
  178. package/Microsoft.ReactNative/Fabric/Composition/DebuggingOverlayComponentView.cpp +3 -2
  179. package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.cpp +0 -2
  180. package/Microsoft.ReactNative/Fabric/Composition/ImageComponentView.h +0 -1
  181. package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.cpp +550 -4
  182. package/Microsoft.ReactNative/Fabric/Composition/ParagraphComponentView.h +52 -0
  183. package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.cpp +16 -0
  184. package/Microsoft.ReactNative/Fabric/Composition/ReactCompositionViewComponentBuilder.h +6 -0
  185. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +0 -6
  186. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.h +0 -2
  187. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.cpp +53 -2
  188. package/Microsoft.ReactNative/Fabric/Composition/RootComponentView.h +8 -1
  189. package/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +0 -2
  190. package/Microsoft.ReactNative/Fabric/Composition/SwitchComponentView.cpp +0 -1
  191. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +5 -2
  192. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +4 -1
  193. package/Microsoft.ReactNative/Fabric/Composition/Theme.cpp +6 -30
  194. package/Microsoft.ReactNative/Fabric/Composition/Theme.h +1 -3
  195. package/Microsoft.ReactNative/Fabric/Composition/TooltipService.cpp +1 -1
  196. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +36 -14
  197. package/Microsoft.ReactNative/Fabric/Composition/UnimplementedNativeViewComponentView.cpp +0 -1
  198. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +0 -1
  199. package/Microsoft.ReactNative/Fabric/ImageManager.cpp +0 -4
  200. package/Microsoft.ReactNative/Fabric/ReactTaggedView.h +1 -1
  201. package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.cpp +8 -0
  202. package/Microsoft.ReactNative/Fabric/WindowsComponentDescriptorRegistry.h +3 -0
  203. package/Microsoft.ReactNative/Fabric/platform/react/renderer/graphics/PlatformColorUtils.cpp +0 -11
  204. package/Microsoft.ReactNative/Fabric/platform/react/renderer/textlayoutmanager/WindowsTextLayoutManager.h +2 -1
  205. package/Microsoft.ReactNative/IReactContext.cpp +2 -25
  206. package/Microsoft.ReactNative/IReactContext.h +0 -7
  207. package/Microsoft.ReactNative/IReactContext.idl +4 -29
  208. package/Microsoft.ReactNative/IReactModuleBuilder.cpp +24 -140
  209. package/Microsoft.ReactNative/IReactModuleBuilder.h +0 -11
  210. package/Microsoft.ReactNative/IReactPackageBuilder.idl +1 -16
  211. package/Microsoft.ReactNative/IReactPackageProvider.idl +0 -1
  212. package/Microsoft.ReactNative/IReactViewComponentBuilder.idl +10 -0
  213. package/Microsoft.ReactNative/JsiApi.cpp +4 -3
  214. package/Microsoft.ReactNative/JsiApi.h +2 -3
  215. package/Microsoft.ReactNative/JsiApi.idl +3 -2
  216. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +6 -214
  217. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +0 -252
  218. package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.cpp +0 -37
  219. package/Microsoft.ReactNative/Modules/AlertModule.cpp +2 -140
  220. package/Microsoft.ReactNative/Modules/AlertModule.h +0 -2
  221. package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.cpp +5 -10
  222. package/Microsoft.ReactNative/Modules/Animated/NativeAnimatedNodeManager.h +0 -1
  223. package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.cpp +1 -96
  224. package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.h +0 -14
  225. package/Microsoft.ReactNative/Modules/AppStateModule.cpp +0 -53
  226. package/Microsoft.ReactNative/Modules/AppStateModule.h +0 -5
  227. package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.cpp +5 -14
  228. package/Microsoft.ReactNative/Modules/AppThemeModuleUwp.h +0 -2
  229. package/Microsoft.ReactNative/Modules/AppearanceModule.cpp +1 -9
  230. package/Microsoft.ReactNative/Modules/DevSettingsModule.cpp +0 -4
  231. package/Microsoft.ReactNative/Modules/DevSettingsModule.h +0 -2
  232. package/Microsoft.ReactNative/Modules/DeviceInfoModule.cpp +16 -90
  233. package/Microsoft.ReactNative/Modules/I18nManagerModule.cpp +3 -8
  234. package/Microsoft.ReactNative/Modules/ImageViewManagerModule.cpp +11 -48
  235. package/Microsoft.ReactNative/Modules/LinkingManagerModule.cpp +0 -3
  236. package/Microsoft.ReactNative/Modules/LogBoxModule.cpp +30 -102
  237. package/Microsoft.ReactNative/Modules/LogBoxModule.h +0 -7
  238. package/Microsoft.ReactNative/Modules/Timing.cpp +7 -9
  239. package/Microsoft.ReactNative/Pch/pch.h +0 -28
  240. package/Microsoft.ReactNative/ReactCoreInjection.h +0 -1
  241. package/Microsoft.ReactNative/ReactHost/IReactInstance.h +0 -8
  242. package/Microsoft.ReactNative/ReactHost/MsoReactContext.cpp +0 -15
  243. package/Microsoft.ReactNative/ReactHost/MsoReactContext.h +0 -2
  244. package/Microsoft.ReactNative/ReactHost/React.h +0 -44
  245. package/Microsoft.ReactNative/ReactHost/ReactHost.cpp +10 -47
  246. package/Microsoft.ReactNative/ReactHost/ReactHost.h +1 -1
  247. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +30 -586
  248. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +2 -37
  249. package/Microsoft.ReactNative/ReactHost/ReactNativeHeaders.h +0 -13
  250. package/Microsoft.ReactNative/ReactHost/React_Win.h +0 -1
  251. package/Microsoft.ReactNative/ReactInstanceSettings.cpp +0 -8
  252. package/Microsoft.ReactNative/ReactInstanceSettings.h +0 -13
  253. package/Microsoft.ReactNative/ReactInstanceSettings.idl +7 -23
  254. package/Microsoft.ReactNative/ReactNativeHost.cpp +10 -35
  255. package/Microsoft.ReactNative/ReactNativeHost.h +0 -1
  256. package/Microsoft.ReactNative/ReactNativeIsland.idl +0 -4
  257. package/Microsoft.ReactNative/ReactPackageBuilder.cpp +9 -36
  258. package/Microsoft.ReactNative/ReactPackageBuilder.h +4 -38
  259. package/Microsoft.ReactNative/RedBox.cpp +9 -362
  260. package/Microsoft.ReactNative/Theme.idl +0 -2
  261. package/Microsoft.ReactNative/Timer.cpp +3 -2
  262. package/Microsoft.ReactNative/Utils/Helpers.cpp +0 -47
  263. package/Microsoft.ReactNative/Utils/Helpers.h +0 -5
  264. package/Microsoft.ReactNative/Utils/IcuUtils.cpp +84 -0
  265. package/Microsoft.ReactNative/Utils/IcuUtils.h +42 -0
  266. package/Microsoft.ReactNative/Utils/KeyboardUtils.cpp +0 -11
  267. package/Microsoft.ReactNative/Utils/ThemeUtils.cpp +0 -4
  268. package/Microsoft.ReactNative/Utils/ThemeUtils.h +1 -5
  269. package/Microsoft.ReactNative/Utils/UwpPreparedScriptStore.h +0 -2
  270. package/Microsoft.ReactNative/Utils/ValueUtils.cpp +0 -245
  271. package/Microsoft.ReactNative/Utils/ValueUtils.h +0 -23
  272. package/Microsoft.ReactNative/ViewProps.idl +0 -2
  273. package/Microsoft.ReactNative/Views/DevMenu.cpp +2 -278
  274. package/Microsoft.ReactNative/Views/DevMenu.h +0 -5
  275. package/Microsoft.ReactNative/XamlApplication.cpp +71 -0
  276. package/Microsoft.ReactNative/XamlApplication.h +47 -0
  277. package/Microsoft.ReactNative/XamlApplication.idl +19 -0
  278. package/Microsoft.ReactNative/XamlUIService.cpp +0 -54
  279. package/Microsoft.ReactNative/XamlUIService.h +0 -12
  280. package/Microsoft.ReactNative/XamlUIService.idl +0 -12
  281. package/Microsoft.ReactNative.Cxx/CppWinRTIncludes.h +0 -19
  282. package/Microsoft.ReactNative.Cxx/DesktopWindowBridge.h +1 -1
  283. package/Microsoft.ReactNative.Cxx/JSI/decorator.h +191 -114
  284. package/Microsoft.ReactNative.Cxx/JSI/instrumentation.h +5 -0
  285. package/Microsoft.ReactNative.Cxx/JSI/jsi-inl.h +37 -0
  286. package/Microsoft.ReactNative.Cxx/JSI/jsi.cpp +68 -0
  287. package/Microsoft.ReactNative.Cxx/JSI/jsi.h +77 -11
  288. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +2 -2
  289. package/Microsoft.ReactNative.Cxx/NamespaceRedirect.h +0 -5
  290. package/Microsoft.ReactNative.Cxx/NodeApiJsiRuntime.cpp +93 -1
  291. package/Microsoft.ReactNative.Cxx/ReactCommon/TurboModule.cpp +4 -3
  292. package/Microsoft.ReactNative.Cxx/ReactCommon/TurboModule.h +2 -2
  293. package/Microsoft.ReactNative.Cxx/ReactCommon/TurboModuleUtils.cpp +2 -55
  294. package/Microsoft.ReactNative.Cxx/ReactCommon/TurboModuleUtils.h +4 -8
  295. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Class.h +5 -0
  296. package/Microsoft.ReactNative.Cxx/ReactCommon/react/timing/primitives.h +32 -4
  297. package/Microsoft.ReactNative.Cxx/ReactContext.h +0 -13
  298. package/Microsoft.ReactNative.Cxx/StructInfo.h +8 -1
  299. package/Microsoft.ReactNative.Cxx/UI.Composition.Effects.h +0 -4
  300. package/Microsoft.ReactNative.Cxx/UI.Composition.h +0 -4
  301. package/Microsoft.ReactNative.Cxx/UI.Input.h +0 -4
  302. package/Microsoft.ReactNative.Cxx/UI.Popups.h +0 -4
  303. package/Microsoft.ReactNative.Cxx/UI.Text.h +0 -4
  304. package/Microsoft.ReactNative.Cxx/XamlUtils.h +0 -33
  305. package/Microsoft.ReactNative.Managed/JSValueReader.cs +0 -4
  306. package/Microsoft.ReactNative.Managed/Microsoft.ReactNative.Managed.csproj +0 -3
  307. package/Microsoft.ReactNative.Managed/ReactContext.cs +0 -5
  308. package/Microsoft.ReactNative.Managed/ReactContextGenerator.cs +0 -4
  309. package/Microsoft.ReactNative.Managed/ReactPackageBuilderExtensions.cs +0 -25
  310. package/Microsoft.ReactNative.Managed/ReactSettingsSnapshot.cs +0 -4
  311. package/Microsoft.ReactNative.Managed/ReflectionReactPackageProvider.cs +1 -2
  312. package/Microsoft.ReactNative.Managed.CodeGen/CodeAnalyzer.cs +0 -10
  313. package/Microsoft.ReactNative.Managed.CodeGen/CodeGenerator.ViewManager.cs +0 -36
  314. package/Microsoft.ReactNative.Managed.CodeGen/CodeGenerator.cs +0 -6
  315. package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactAssembly.cs +0 -2
  316. package/Microsoft.ReactNative.Managed.CodeGen/Model/ReactTypes.cs +0 -2
  317. package/Microsoft.ReactNative.Managed.CodeGen/ReactNativeNames.cs +0 -2
  318. package/Mso/src/dispatchQueue/queueService.cpp +3 -1
  319. package/Mso/src/dispatchQueue/uiScheduler_winrt.cpp +2 -10
  320. package/PropertySheets/Bundle.Common.targets +1 -1
  321. package/PropertySheets/Bundle.props +3 -4
  322. package/PropertySheets/External/Microsoft.ReactNative.Common.props +0 -1
  323. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CSharpApp.targets +1 -1
  324. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.targets +1 -1
  325. package/PropertySheets/Generated/PackageVersion.g.props +4 -4
  326. package/PropertySheets/JSEngine.props +1 -1
  327. package/PropertySheets/NuGet.LockFile.props +0 -8
  328. package/PropertySheets/OutputMSBuildProperties.targets +0 -1
  329. package/PropertySheets/React.Cpp.props +3 -5
  330. package/PropertySheets/WinUI.props +3 -3
  331. package/README.md +1 -5
  332. package/ReactCommon/ReactCommon.vcxproj +12 -31
  333. package/ReactCommon/ReactCommon.vcxproj.filters +0 -3
  334. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/CxxNativeModule.cpp +3 -2
  335. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/NativeToJsBridge.cpp +5 -2
  336. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/TraceSection.h +20 -4
  337. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +113 -1
  338. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/NetworkIOAgent.cpp +14 -6
  339. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/Utf8.h +1 -0
  340. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsinspector-modern/tracing/RuntimeSamplingProfileTraceEventSerializer.cpp +351 -0
  341. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +2 -2
  342. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.cpp +42 -36
  343. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/dom/NativeDOM.h +15 -3
  344. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp +1 -1
  345. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/image/conversions.h +174 -0
  346. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/text/ParagraphShadowNode.cpp +1 -0
  347. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityPrimitives.h +26 -3
  348. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/conversions.h +1 -1
  349. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/ShadowNode.cpp +1 -1
  350. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/imagemanager/primitives.h +189 -0
  351. package/ReactCommon/TEMP_UntilReactCommonUpdate/reactperflogger/reactperflogger/ReactPerfettoLogger.cpp +27 -8
  352. package/ReactCommon/cgmanifest.json +1 -1
  353. package/Scripts/Microsoft.ReactNative.nuspec +15 -33
  354. package/Scripts/NuGetRestoreForceEvaluateAllSolutions.ps1 +23 -23
  355. package/Scripts/OfficeReact.Win32.nuspec +0 -3
  356. package/Scripts/creaternwapp.cmd +1 -1
  357. package/Shared/DevServerHelper.h +17 -21
  358. package/Shared/DevSettings.h +1 -25
  359. package/Shared/DevSupportManager.cpp +0 -50
  360. package/Shared/DevSupportManager.h +0 -4
  361. package/Shared/Hermes/HermesRuntimeTargetDelegate.cpp +5 -1
  362. package/Shared/HermesRuntimeHolder.cpp +0 -31
  363. package/Shared/HermesRuntimeHolder.h +0 -14
  364. package/Shared/IDevSupportManager.h +0 -6
  365. package/Shared/InstanceManager.cpp +0 -97
  366. package/Shared/InstanceManager.h +0 -53
  367. package/Shared/JSI/ScriptStore.h +1 -1
  368. package/Shared/Logging.cpp +1 -12
  369. package/Shared/Modules/CxxModuleUtilities.cpp +0 -9
  370. package/Shared/Modules/CxxModuleUtilities.h +0 -8
  371. package/Shared/Networking/OriginPolicyHttpFilter.cpp +9 -1
  372. package/Shared/OInstance.cpp +144 -424
  373. package/Shared/OInstance.h +0 -81
  374. package/Shared/Shared.vcxitems +83 -203
  375. package/Shared/Shared.vcxitems.filters +8 -67
  376. package/Shared/Threading/MessageQueueThreadFactory.cpp +0 -6
  377. package/Shared/Threading/MessageQueueThreadFactory.h +0 -4
  378. package/Shared/TurboModuleManager.cpp +0 -4
  379. package/Shared/Utils.cpp +26 -0
  380. package/Shared/Utils.h +3 -0
  381. package/codegen/NativeDOMSpec.g.h +41 -35
  382. package/codegen/NativeIntersectionObserverSpec.g.h +9 -21
  383. package/codegen/NativePerformanceSpec.g.h +47 -35
  384. package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +177 -129
  385. package/codegen/react/components/rnwcore/ActivityIndicatorView.g.h +14 -0
  386. package/codegen/react/components/rnwcore/AndroidDrawerLayout.g.h +14 -0
  387. package/codegen/react/components/rnwcore/AndroidHorizontalScrollContentView.g.h +14 -0
  388. package/codegen/react/components/rnwcore/AndroidProgressBar.g.h +14 -0
  389. package/codegen/react/components/rnwcore/AndroidSwipeRefreshLayout.g.h +14 -0
  390. package/codegen/react/components/rnwcore/AndroidSwitch.g.h +14 -0
  391. package/codegen/react/components/rnwcore/DebuggingOverlay.g.h +14 -0
  392. package/codegen/react/components/rnwcore/EventEmitters.cpp +25 -0
  393. package/codegen/react/components/rnwcore/EventEmitters.h +25 -0
  394. package/codegen/react/components/rnwcore/InputAccessory.g.h +14 -0
  395. package/codegen/react/components/rnwcore/ModalHostView.g.h +14 -0
  396. package/codegen/react/components/rnwcore/Props.cpp +41 -2
  397. package/codegen/react/components/rnwcore/Props.h +51 -2
  398. package/codegen/react/components/rnwcore/PullToRefreshView.g.h +14 -0
  399. package/codegen/react/components/rnwcore/SafeAreaView.g.h +14 -0
  400. package/codegen/react/components/rnwcore/Switch.g.h +14 -0
  401. package/codegen/react/components/rnwcore/UnimplementedNativeView.g.h +14 -0
  402. package/codegen/react/components/rnwcore/VirtualView.g.h +18 -0
  403. package/codegen/react/components/rnwcore/VirtualViewExperimental.g.h +240 -0
  404. package/codegen/rnwcoreJSI-generated.cpp +106 -51
  405. package/codegen/rnwcoreJSI.h +148 -67
  406. package/fmt/cgmanifest.json +1 -1
  407. package/fmt/fmt.vcxproj +0 -8
  408. package/index.js +8 -2
  409. package/index.windows.js +8 -2
  410. package/jest/local-setup.js +2 -2
  411. package/jest/mock.js +1 -1
  412. package/jest/mockComponent.js +9 -9
  413. package/jest/mockNativeComponent.js +3 -2
  414. package/jest/mocks/Modal.js +1 -1
  415. package/jest/mocks/ScrollView.js +1 -1
  416. package/jest/mocks/ViewNativeComponent.js +1 -1
  417. package/jest/setup.js +23 -12
  418. package/just-task.js +14 -0
  419. package/package.json +31 -32
  420. package/src/private/animated/NativeAnimatedHelper.js +16 -5
  421. package/src/private/animated/createAnimatedPropsHook.js +11 -60
  422. package/src/private/animated/createAnimatedPropsMemoHook.js +8 -54
  423. package/src/private/components/virtualview/VirtualView.js +43 -12
  424. package/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js +93 -0
  425. package/src/private/components/virtualview/VirtualViewNativeComponent.js +6 -0
  426. package/src/private/devsupport/devmenu/elementinspector/Inspector.js +2 -2
  427. package/src/private/devsupport/devmenu/elementinspector/ReactDevToolsOverlay.js +2 -2
  428. package/src/private/featureflags/ReactNativeFeatureFlags.js +80 -52
  429. package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +23 -4
  430. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +14 -6
  431. package/src/private/renderer/errorhandling/ErrorHandlers.js +3 -3
  432. package/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js +0 -1
  433. package/src/private/types/HostInstance.js +4 -1
  434. package/src/private/webapis/dom/nodes/ReactNativeDocument.js +22 -2
  435. package/src/private/webapis/dom/nodes/ReactNativeElement.js +1 -1
  436. package/src/private/webapis/dom/nodes/ReadOnlyElement.js +5 -3
  437. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +16 -13
  438. package/src/private/webapis/dom/nodes/internals/NodeInternals.js +45 -22
  439. package/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.js +1 -1
  440. package/src/private/webapis/dom/nodes/specs/NativeDOM.js +26 -192
  441. package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +15 -12
  442. package/src/private/webapis/dom/oldstylecollections/NodeList.js +14 -11
  443. package/src/private/webapis/geometry/DOMRectList.js +2 -2
  444. package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +19 -74
  445. package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +0 -4
  446. package/src/private/webapis/mutationobserver/internals/MutationObserverManager.js +1 -1
  447. package/src/private/webapis/performance/EventTiming.js +6 -10
  448. package/src/private/webapis/performance/Performance.js +309 -164
  449. package/src/private/webapis/performance/PerformanceEntry.js +20 -16
  450. package/src/private/webapis/performance/PerformanceObserver.js +8 -29
  451. package/src/private/webapis/performance/UserTiming.js +71 -18
  452. package/src/private/webapis/performance/UserTimingExtensibility.js.flow +38 -0
  453. package/src/private/webapis/performance/internals/Utilities.js +9 -0
  454. package/src/private/webapis/performance/specs/NativePerformance.js +21 -23
  455. package/src/private/webapis/structuredClone/structuredClone.js +10 -10
  456. package/stubs/double-conversion/README.md +1 -1
  457. package/template/cpp-lib/proj/MyLib.sln +0 -5
  458. package/template/cpp-lib/src/pch.h +0 -5
  459. package/template/cs-lib/proj/MyLib.sln +0 -5
  460. package/template/metro.config.js +1 -0
  461. package/templates/cpp-app/metro.config.js +2 -1
  462. package/templates/cpp-app/windows/MyApp.sln +0 -5
  463. package/templates/cpp-lib/example/metro.config.js +3 -4
  464. package/templates/cpp-lib/windows/MyLib.sln +0 -5
  465. package/Chakra/Chakra.vcxitems +0 -32
  466. package/Chakra/Chakra.vcxitems.filters +0 -54
  467. package/Chakra/ChakraHelpers.cpp +0 -468
  468. package/Chakra/ChakraHelpers.h +0 -146
  469. package/Chakra/ChakraInstanceArgs.h +0 -52
  470. package/Chakra/ChakraPlatform.cpp +0 -42
  471. package/Chakra/ChakraPlatform.h +0 -51
  472. package/Chakra/ChakraTracing.cpp +0 -275
  473. package/Chakra/ChakraTracing.h +0 -11
  474. package/Chakra/ChakraUtils.cpp +0 -190
  475. package/Chakra/ChakraUtils.h +0 -72
  476. package/Chakra/ChakraValue.cpp +0 -257
  477. package/Chakra/ChakraValue.h +0 -308
  478. package/Chakra/Utf8DebugExtensions.cpp +0 -62
  479. package/Chakra/Utf8DebugExtensions.h +0 -29
  480. package/Libraries/Interaction/InteractionManagerStub.js +0 -184
  481. package/Libraries/Interaction/TaskQueue.js +0 -183
  482. package/Libraries/ReactNative/ReactNativeFeatureFlags.js +0 -31
  483. package/Microsoft.ReactNative/ABICxxModule.cpp +0 -51
  484. package/Microsoft.ReactNative/ABICxxModule.h +0 -38
  485. package/Microsoft.ReactNative/ABIViewManager.cpp +0 -263
  486. package/Microsoft.ReactNative/ABIViewManager.h +0 -100
  487. package/Microsoft.ReactNative/Base/CoreUIManagers.cpp +0 -55
  488. package/Microsoft.ReactNative/DevMenuControl.cpp +0 -14
  489. package/Microsoft.ReactNative/DevMenuControl.h +0 -20
  490. package/Microsoft.ReactNative/DevMenuControl.idl +0 -28
  491. package/Microsoft.ReactNative/DevMenuControl.xaml +0 -139
  492. package/Microsoft.ReactNative/GlyphViewManager.cpp +0 -167
  493. package/Microsoft.ReactNative/GlyphViewManager.h +0 -24
  494. package/Microsoft.ReactNative/INativeUIManager.h +0 -75
  495. package/Microsoft.ReactNative/IViewManager.idl +0 -120
  496. package/Microsoft.ReactNative/IViewManagerCore.idl +0 -45
  497. package/Microsoft.ReactNative/LayoutService.cpp +0 -51
  498. package/Microsoft.ReactNative/LayoutService.h +0 -32
  499. package/Microsoft.ReactNative/LayoutService.idl +0 -41
  500. package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +0 -1187
  501. package/Microsoft.ReactNative/Modules/NativeUIManager.h +0 -128
  502. package/Microsoft.ReactNative/Modules/PaperUIManagerModule.cpp +0 -891
  503. package/Microsoft.ReactNative/Modules/PaperUIManagerModule.h +0 -185
  504. package/Microsoft.ReactNative/NativeModulesProvider.cpp +0 -49
  505. package/Microsoft.ReactNative/NativeModulesProvider.h +0 -25
  506. package/Microsoft.ReactNative/ReactApplication.cpp +0 -276
  507. package/Microsoft.ReactNative/ReactApplication.h +0 -156
  508. package/Microsoft.ReactNative/ReactApplication.idl +0 -48
  509. package/Microsoft.ReactNative/ReactHost/ViewManagerProvider.h +0 -19
  510. package/Microsoft.ReactNative/ReactPointerEventArgs.cpp +0 -55
  511. package/Microsoft.ReactNative/ReactPointerEventArgs.h +0 -32
  512. package/Microsoft.ReactNative/ReactPointerEventArgs.idl +0 -79
  513. package/Microsoft.ReactNative/ReactRootView.cpp +0 -592
  514. package/Microsoft.ReactNative/ReactRootView.h +0 -127
  515. package/Microsoft.ReactNative/ReactRootView.idl +0 -40
  516. package/Microsoft.ReactNative/TestHook.cpp +0 -99
  517. package/Microsoft.ReactNative/TestHook.h +0 -15
  518. package/Microsoft.ReactNative/Utils/AccessibilityUtils.cpp +0 -36
  519. package/Microsoft.ReactNative/Utils/AccessibilityUtils.h +0 -15
  520. package/Microsoft.ReactNative/Utils/BatchingEventEmitter.cpp +0 -171
  521. package/Microsoft.ReactNative/Utils/BatchingEventEmitter.h +0 -72
  522. package/Microsoft.ReactNative/Utils/PropertyHandlerUtils.h +0 -87
  523. package/Microsoft.ReactNative/Utils/PropertyUtils.h +0 -568
  524. package/Microsoft.ReactNative/Utils/ResourceBrushUtils.cpp +0 -182
  525. package/Microsoft.ReactNative/Utils/ResourceBrushUtils.h +0 -58
  526. package/Microsoft.ReactNative/Utils/ShadowNodeTypeUtils.h +0 -26
  527. package/Microsoft.ReactNative/Utils/XamlIslandUtils.cpp +0 -93
  528. package/Microsoft.ReactNative/Utils/XamlIslandUtils.h +0 -48
  529. package/Microsoft.ReactNative/ViewManagersProvider.cpp +0 -39
  530. package/Microsoft.ReactNative/ViewManagersProvider.h +0 -27
  531. package/Microsoft.ReactNative/Views/ActivityIndicatorViewManager.cpp +0 -62
  532. package/Microsoft.ReactNative/Views/ActivityIndicatorViewManager.h +0 -29
  533. package/Microsoft.ReactNative/Views/ConfigureBundlerDlg.cpp +0 -186
  534. package/Microsoft.ReactNative/Views/ConfigureBundlerDlg.h +0 -11
  535. package/Microsoft.ReactNative/Views/ControlViewManager.cpp +0 -143
  536. package/Microsoft.ReactNative/Views/ControlViewManager.h +0 -38
  537. package/Microsoft.ReactNative/Views/DebuggingOverlayViewManager.cpp +0 -53
  538. package/Microsoft.ReactNative/Views/DebuggingOverlayViewManager.h +0 -30
  539. package/Microsoft.ReactNative/Views/DynamicAutomationPeer.cpp +0 -586
  540. package/Microsoft.ReactNative/Views/DynamicAutomationPeer.h +0 -104
  541. package/Microsoft.ReactNative/Views/DynamicAutomationProperties.cpp +0 -330
  542. package/Microsoft.ReactNative/Views/DynamicAutomationProperties.h +0 -111
  543. package/Microsoft.ReactNative/Views/DynamicValueProvider.cpp +0 -59
  544. package/Microsoft.ReactNative/Views/DynamicValueProvider.h +0 -32
  545. package/Microsoft.ReactNative/Views/ExpressionAnimationStore.cpp +0 -61
  546. package/Microsoft.ReactNative/Views/ExpressionAnimationStore.h +0 -26
  547. package/Microsoft.ReactNative/Views/FlyoutViewManager.cpp +0 -559
  548. package/Microsoft.ReactNative/Views/FlyoutViewManager.h +0 -34
  549. package/Microsoft.ReactNative/Views/FrameworkElementTransferProperties.cpp +0 -126
  550. package/Microsoft.ReactNative/Views/FrameworkElementTransferProperties.h +0 -23
  551. package/Microsoft.ReactNative/Views/FrameworkElementViewManager.cpp +0 -957
  552. package/Microsoft.ReactNative/Views/FrameworkElementViewManager.h +0 -41
  553. package/Microsoft.ReactNative/Views/IXamlRootView.h +0 -17
  554. package/Microsoft.ReactNative/Views/Image/ImageViewManager.cpp +0 -245
  555. package/Microsoft.ReactNative/Views/Image/ImageViewManager.h +0 -45
  556. package/Microsoft.ReactNative/Views/Image/ReactImage.cpp +0 -469
  557. package/Microsoft.ReactNative/Views/Image/ReactImage.h +0 -80
  558. package/Microsoft.ReactNative/Views/Image/ReactImageBrush.cpp +0 -247
  559. package/Microsoft.ReactNative/Views/Image/ReactImageBrush.h +0 -67
  560. package/Microsoft.ReactNative/Views/KeyboardEventHandler.cpp +0 -261
  561. package/Microsoft.ReactNative/Views/KeyboardEventHandler.h +0 -132
  562. package/Microsoft.ReactNative/Views/PaperShadowNode.cpp +0 -18
  563. package/Microsoft.ReactNative/Views/PaperShadowNode.h +0 -38
  564. package/Microsoft.ReactNative/Views/PopupViewManager.cpp +0 -349
  565. package/Microsoft.ReactNative/Views/PopupViewManager.h +0 -36
  566. package/Microsoft.ReactNative/Views/RawTextViewManager.cpp +0 -69
  567. package/Microsoft.ReactNative/Views/RawTextViewManager.h +0 -46
  568. package/Microsoft.ReactNative/Views/ReactViewInstance.cpp +0 -43
  569. package/Microsoft.ReactNative/Views/ReactViewInstance.h +0 -53
  570. package/Microsoft.ReactNative/Views/RefreshControlManager.cpp +0 -116
  571. package/Microsoft.ReactNative/Views/RefreshControlManager.h +0 -28
  572. package/Microsoft.ReactNative/Views/RootViewManager.cpp +0 -65
  573. package/Microsoft.ReactNative/Views/RootViewManager.h +0 -36
  574. package/Microsoft.ReactNative/Views/SIPEventHandler.cpp +0 -117
  575. package/Microsoft.ReactNative/Views/SIPEventHandler.h +0 -45
  576. package/Microsoft.ReactNative/Views/ScrollContentViewManager.cpp +0 -16
  577. package/Microsoft.ReactNative/Views/ScrollContentViewManager.h +0 -19
  578. package/Microsoft.ReactNative/Views/ScrollViewManager.cpp +0 -540
  579. package/Microsoft.ReactNative/Views/ScrollViewManager.h +0 -42
  580. package/Microsoft.ReactNative/Views/ShadowNodeBase.cpp +0 -228
  581. package/Microsoft.ReactNative/Views/ShadowNodeBase.h +0 -169
  582. package/Microsoft.ReactNative/Views/ShadowNodeRegistry.cpp +0 -68
  583. package/Microsoft.ReactNative/Views/ShadowNodeRegistry.h +0 -40
  584. package/Microsoft.ReactNative/Views/SliderViewManager.cpp +0 -97
  585. package/Microsoft.ReactNative/Views/SliderViewManager.h +0 -32
  586. package/Microsoft.ReactNative/Views/SwitchViewManager.cpp +0 -227
  587. package/Microsoft.ReactNative/Views/SwitchViewManager.h +0 -31
  588. package/Microsoft.ReactNative/Views/Text/TextHighlighterVisitor.cpp +0 -52
  589. package/Microsoft.ReactNative/Views/Text/TextHighlighterVisitor.h +0 -37
  590. package/Microsoft.ReactNative/Views/Text/TextHitTestUtils.cpp +0 -348
  591. package/Microsoft.ReactNative/Views/Text/TextHitTestUtils.h +0 -13
  592. package/Microsoft.ReactNative/Views/Text/TextHitTestVisitor.cpp +0 -76
  593. package/Microsoft.ReactNative/Views/Text/TextHitTestVisitor.h +0 -32
  594. package/Microsoft.ReactNative/Views/Text/TextParentVisitor.cpp +0 -12
  595. package/Microsoft.ReactNative/Views/Text/TextParentVisitor.h +0 -19
  596. package/Microsoft.ReactNative/Views/Text/TextPropertyChangedParentVisitor.cpp +0 -75
  597. package/Microsoft.ReactNative/Views/Text/TextPropertyChangedParentVisitor.h +0 -43
  598. package/Microsoft.ReactNative/Views/Text/TextTransformParentVisitor.cpp +0 -21
  599. package/Microsoft.ReactNative/Views/Text/TextTransformParentVisitor.h +0 -23
  600. package/Microsoft.ReactNative/Views/Text/TextTransformVisitor.cpp +0 -70
  601. package/Microsoft.ReactNative/Views/Text/TextTransformVisitor.h +0 -34
  602. package/Microsoft.ReactNative/Views/Text/TextVisitor.cpp +0 -56
  603. package/Microsoft.ReactNative/Views/Text/TextVisitor.h +0 -34
  604. package/Microsoft.ReactNative/Views/Text/TextVisitorScope.h +0 -35
  605. package/Microsoft.ReactNative/Views/Text/TextVisitors.h +0 -47
  606. package/Microsoft.ReactNative/Views/TextInputViewManager.cpp +0 -1003
  607. package/Microsoft.ReactNative/Views/TextInputViewManager.h +0 -33
  608. package/Microsoft.ReactNative/Views/TextViewManager.cpp +0 -414
  609. package/Microsoft.ReactNative/Views/TextViewManager.h +0 -47
  610. package/Microsoft.ReactNative/Views/TouchEventHandler.cpp +0 -608
  611. package/Microsoft.ReactNative/Views/TouchEventHandler.h +0 -116
  612. package/Microsoft.ReactNative/Views/UnimplementedViewManager.cpp +0 -79
  613. package/Microsoft.ReactNative/Views/UnimplementedViewManager.h +0 -27
  614. package/Microsoft.ReactNative/Views/ViewControl.cpp +0 -43
  615. package/Microsoft.ReactNative/Views/ViewControl.h +0 -32
  616. package/Microsoft.ReactNative/Views/ViewManager.h +0 -33
  617. package/Microsoft.ReactNative/Views/ViewManagerBase.cpp +0 -487
  618. package/Microsoft.ReactNative/Views/ViewManagerBase.h +0 -121
  619. package/Microsoft.ReactNative/Views/ViewPanel.cpp +0 -164
  620. package/Microsoft.ReactNative/Views/ViewPanel.h +0 -82
  621. package/Microsoft.ReactNative/Views/ViewViewManager.cpp +0 -507
  622. package/Microsoft.ReactNative/Views/ViewViewManager.h +0 -52
  623. package/Microsoft.ReactNative/Views/VirtualTextViewManager.cpp +0 -143
  624. package/Microsoft.ReactNative/Views/VirtualTextViewManager.h +0 -57
  625. package/Microsoft.ReactNative/Views/XamlFeatures.cpp +0 -11
  626. package/Microsoft.ReactNative/Views/XamlFeatures.h +0 -11
  627. package/Microsoft.ReactNative/Views/cppwinrt/AccessibilityAction.idl +0 -12
  628. package/Microsoft.ReactNative/Views/cppwinrt/DynamicAutomationPeer.idl +0 -231
  629. package/Microsoft.ReactNative/Views/cppwinrt/ViewPanel.idl +0 -48
  630. package/Microsoft.ReactNative/XamlHelper.cpp +0 -78
  631. package/Microsoft.ReactNative/XamlHelper.h +0 -54
  632. package/Microsoft.ReactNative/XamlHelper.idl +0 -30
  633. package/Microsoft.ReactNative/XamlLoadState.cpp +0 -217
  634. package/Microsoft.ReactNative/XamlLoadState.h +0 -44
  635. package/Microsoft.ReactNative/XamlView.cpp +0 -59
  636. package/Microsoft.ReactNative/XamlView.h +0 -58
  637. package/Microsoft.ReactNative/getLayoutProps.ps1 +0 -5
  638. package/Microsoft.ReactNative.Cxx/UI.Xaml.Automation.Peers.h +0 -10
  639. package/Microsoft.ReactNative.Cxx/UI.Xaml.Automation.h +0 -10
  640. package/Microsoft.ReactNative.Cxx/UI.Xaml.Controls.Primitives.h +0 -10
  641. package/Microsoft.ReactNative.Cxx/UI.Xaml.Controls.h +0 -13
  642. package/Microsoft.ReactNative.Cxx/UI.Xaml.Documents.h +0 -10
  643. package/Microsoft.ReactNative.Cxx/UI.Xaml.Hosting.DesktopWindowXamlSource.h +0 -11
  644. package/Microsoft.ReactNative.Cxx/UI.Xaml.Hosting.h +0 -10
  645. package/Microsoft.ReactNative.Cxx/UI.Xaml.Input.h +0 -10
  646. package/Microsoft.ReactNative.Cxx/UI.Xaml.Markup.h +0 -10
  647. package/Microsoft.ReactNative.Cxx/UI.Xaml.Media.Imaging.h +0 -10
  648. package/Microsoft.ReactNative.Cxx/UI.Xaml.Media.Media3D.h +0 -10
  649. package/Microsoft.ReactNative.Cxx/UI.Xaml.Media.h +0 -10
  650. package/Microsoft.ReactNative.Cxx/UI.Xaml.Navigation.h +0 -10
  651. package/Microsoft.ReactNative.Cxx/UI.Xaml.Shapes.h +0 -10
  652. package/Microsoft.ReactNative.Managed/AttributedViewManager.cs +0 -527
  653. package/Microsoft.ReactNative.Managed/ViewManagerAttributes.cs +0 -91
  654. package/Microsoft.ReactNative.Managed/ViewManagerEvent.cs +0 -13
  655. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityProps.cpp +0 -344
  656. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/core/DynamicEventPayload.cpp +0 -42
  657. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/YGEnums.h +0 -146
  658. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/algorithm/CalculateLayout.cpp +0 -2435
  659. package/ReactCommon/TEMP_UntilReactCommonUpdate/yoga/yoga/enums/ExperimentalFeature.h +0 -40
  660. package/Shared/BatchingMessageQueueThread.h +0 -20
  661. package/Shared/ChakraRuntimeHolder.cpp +0 -62
  662. package/Shared/ChakraRuntimeHolder.h +0 -46
  663. package/Shared/CreateInstance.h +0 -25
  664. package/Shared/Executors/WebSocketJSExecutor.cpp +0 -294
  665. package/Shared/Executors/WebSocketJSExecutor.h +0 -123
  666. package/Shared/Executors/WebSocketJSExecutorFactory.cpp +0 -25
  667. package/Shared/Hermes/HermesSamplingProfiler.cpp +0 -114
  668. package/Shared/Hermes/HermesSamplingProfiler.h +0 -26
  669. package/Shared/JSI/ChakraApi.cpp +0 -436
  670. package/Shared/JSI/ChakraApi.h +0 -474
  671. package/Shared/JSI/ChakraJsiRuntime_edgemode.cpp +0 -100
  672. package/Shared/JSI/ChakraRuntime.cpp +0 -1132
  673. package/Shared/JSI/ChakraRuntime.h +0 -512
  674. package/Shared/JSI/ChakraRuntimeArgs.h +0 -45
  675. package/Shared/JSI/ChakraRuntimeFactory.h +0 -15
  676. package/Shared/JSI/JSExecutorFactoryDelegate.h +0 -12
  677. package/Shared/JSI/JSExecutorFactorySettings.cpp +0 -30
  678. package/Shared/JSI/JSExecutorFactorySettings.h +0 -21
  679. package/Shared/NativeModuleProvider.h +0 -40
  680. package/Shared/SystemChakraRuntime.h +0 -38
  681. package/Shared/Threading/BatchingQueueThread.cpp +0 -128
  682. package/Shared/Threading/BatchingQueueThread.h +0 -59
  683. package/Shared/WebSocketJSExecutorFactory.h +0 -27
  684. package/fmt/TEMP_UntilFmtUpdate/core.h +0 -2925
  685. package/template/cpp-app/proj/MyApp.sln +0 -166
  686. package/template/cpp-app/proj/MyApp.vcxproj +0 -176
  687. package/template/cpp-app/proj/MyApp.vcxproj.filters +0 -62
  688. package/template/cpp-app/src/App.cpp +0 -93
  689. package/template/cpp-app/src/App.h +0 -21
  690. package/template/cpp-app/src/App.idl +0 -3
  691. package/template/cpp-app/src/AutolinkedNativeModules.g.cpp +0 -13
  692. package/template/cpp-app/src/AutolinkedNativeModules.g.h +0 -10
  693. package/template/cpp-app/src/MainPage.cpp +0 -20
  694. package/template/cpp-app/src/MainPage.h +0 -19
  695. package/template/cpp-app/src/MainPage.idl +0 -10
  696. package/template/cpp-app/src/PropertySheet.props +0 -16
  697. package/template/cpp-app/src/ReactPackageProvider.cpp +0 -15
  698. package/template/cpp-app/src/ReactPackageProvider.h +0 -13
  699. package/template/cpp-app/src/pch.cpp +0 -1
  700. package/template/cpp-app/src/pch.h +0 -24
  701. package/template/cs-app/proj/MyApp.csproj +0 -162
  702. package/template/cs-app/proj/MyApp.sln +0 -191
  703. package/template/cs-app/src/App.xaml.cs +0 -62
  704. package/template/cs-app/src/AutolinkedNativeModules.g.cs +0 -13
  705. package/template/cs-app/src/MainPage.xaml.cs +0 -34
  706. package/template/cs-app/src/Properties/AssemblyInfo.cs +0 -29
  707. package/template/cs-app/src/Properties/Default.rd.xml +0 -32
  708. package/template/cs-app/src/ReactPackageProvider.cs +0 -17
  709. package/template/shared-app/assets/LockScreenLogo.scale-200.png +0 -0
  710. package/template/shared-app/assets/SplashScreen.scale-200.png +0 -0
  711. package/template/shared-app/assets/Square150x150Logo.scale-200.png +0 -0
  712. package/template/shared-app/assets/Square44x44Logo.scale-200.png +0 -0
  713. package/template/shared-app/assets/Square44x44Logo.targetsize-24_altform-unplated.png +0 -0
  714. package/template/shared-app/assets/StoreLogo.png +0 -0
  715. package/template/shared-app/assets/Wide310x150Logo.scale-200.png +0 -0
  716. package/template/shared-app/proj/ExperimentalFeatures.props +0 -32
  717. package/template/shared-app/proj/NuGet_Config +0 -19
  718. package/template/shared-app/src/App.xaml +0 -10
  719. package/template/shared-app/src/AutolinkedNativeModules.g.props +0 -6
  720. package/template/shared-app/src/AutolinkedNativeModules.g.targets +0 -6
  721. package/template/shared-app/src/MainPage.xaml +0 -21
  722. package/template/shared-app/src/Package.appxmanifest +0 -50
  723. package/templates/old/uwp-cpp-app/template.config.js +0 -15
  724. package/templates/old/uwp-cs-app/template.config.js +0 -15
@@ -1,891 +0,0 @@
1
- // Copyright (c) Microsoft Corporation.
2
- // Licensed under the MIT License.
3
-
4
- #include "pch.h"
5
- #include <DynamicReader.h>
6
- #include <DynamicWriter.h>
7
- #include <IReactContext.h>
8
- #include <IReactRootView.h>
9
- #include <Modules/NativeUIManager.h>
10
- #include <Modules/PaperUIManagerModule.h>
11
- #include <Views/ViewManager.h>
12
- #include <XamlUtils.h>
13
- #include <cxxreact/TraceSection.h>
14
- #include <glog/logging.h>
15
- #include "ShadowNodeBase.h"
16
- #include "Unicode.h"
17
- #include "XamlUIService.h"
18
-
19
- using namespace facebook::react;
20
-
21
- namespace Microsoft::ReactNative {
22
-
23
- struct ViewAtIndex final {
24
- int64_t tag{};
25
- int64_t index{};
26
- static bool ViewAtIndexCompare(
27
- const std::shared_ptr<ViewAtIndex> &x,
28
- const std::shared_ptr<ViewAtIndex> &y) noexcept {
29
- return (x->index < y->index);
30
- }
31
- };
32
-
33
- std::vector<int64_t> PopulateIntVecFromDynamicArray(React::JSValueArray &arr) {
34
- std::vector<int64_t> vec(arr.empty() ? 0 : arr.size());
35
-
36
- if (arr.empty())
37
- return vec;
38
-
39
- auto i = 0;
40
- for (auto &val : arr) {
41
- vec[i] = val.AsInt64();
42
- ++i;
43
- }
44
- return vec;
45
- }
46
-
47
- winrt::Microsoft::ReactNative::ReactPropertyId<
48
- winrt::Microsoft::ReactNative::ReactNonAbiValue<std::unique_ptr<UIManagerSettings>>>
49
- UIManagerSettingsProperty() noexcept {
50
- static winrt::Microsoft::ReactNative::ReactPropertyId<
51
- winrt::Microsoft::ReactNative::ReactNonAbiValue<std::unique_ptr<UIManagerSettings>>>
52
- prop{L"ReactNative.UIManager", L"Settings"};
53
- return prop;
54
- }
55
-
56
- UIManagerSettings::UIManagerSettings(
57
- const std::shared_ptr<facebook::react::MessageQueueThread> batchingUIMessageQueue,
58
- const std::shared_ptr<facebook::react::MessageQueueThread> uiMessageQueue,
59
- std::vector<std::unique_ptr<IViewManager>> &&viewManagers)
60
- : batchingUIMessageQueue(std::move(batchingUIMessageQueue)),
61
- uiMessageQueue(std::move(uiMessageQueue)),
62
- viewManagers(std::move(viewManagers)) {}
63
-
64
- void UIManager::SetSettings(
65
- winrt::Microsoft::ReactNative::IReactPropertyBag const &properties,
66
- std::unique_ptr<UIManagerSettings> &&settings) noexcept {
67
- properties.Set(
68
- UIManagerSettingsProperty().Handle(),
69
- winrt::Microsoft::ReactNative::ReactNonAbiValue<std::unique_ptr<UIManagerSettings>>{
70
- std::in_place, std::move(settings)});
71
- }
72
-
73
- winrt::Microsoft::ReactNative::ReactPropertyId<
74
- winrt::Microsoft::ReactNative::ReactNonAbiValue<std::weak_ptr<NativeUIManager>>>
75
- NativeUIManagerProperty() noexcept {
76
- static winrt::Microsoft::ReactNative::ReactPropertyId<
77
- winrt::Microsoft::ReactNative::ReactNonAbiValue<std::weak_ptr<NativeUIManager>>>
78
- prop{L"ReactNative.UIManager", L"NativeUIManager"};
79
- return prop;
80
- }
81
-
82
- std::weak_ptr<NativeUIManager> GetNativeUIManager(const Mso::React::IReactContext &context) {
83
- auto v = winrt::Microsoft::ReactNative::ReactPropertyBag(context.Properties()).Get(NativeUIManagerProperty());
84
- return v ? v.Value() : std::weak_ptr<NativeUIManager>{};
85
- }
86
-
87
- std::weak_ptr<NativeUIManager> GetNativeUIManager(const winrt::Microsoft::ReactNative::ReactContext &context) {
88
- auto v = context.Properties().Get(NativeUIManagerProperty());
89
- return v ? v.Value() : std::weak_ptr<NativeUIManager>{};
90
- }
91
-
92
- class UIManagerModule : public std::enable_shared_from_this<UIManagerModule>, public INativeUIManagerHost {
93
- public:
94
- UIManagerModule() {}
95
- ~UIManagerModule() {
96
- m_nodeRegistry.removeAllRootViews([this](int64_t rootViewTag) { removeRootView(rootViewTag); });
97
- m_nodeRegistry.ForAllNodes(
98
- [this](int64_t tag, shadow_ptr const &shadowNode) noexcept { DropView(tag, false, true); });
99
- m_nativeUIManager->setHost(nullptr);
100
- }
101
-
102
- void Initialize(winrt::Microsoft::ReactNative::ReactContext const &reactContext) noexcept {
103
- m_context = reactContext;
104
-
105
- m_nativeUIManager = std::make_shared<NativeUIManager>(reactContext);
106
-
107
- m_context.Properties().Set(NativeUIManagerProperty(), std::weak_ptr<NativeUIManager>(m_nativeUIManager));
108
-
109
- auto settings = m_context.Properties().Get(UIManagerSettingsProperty());
110
- m_viewManagers = std::move((*settings)->viewManagers);
111
- m_nativeUIManager->setHost(this);
112
- }
113
-
114
- React::JSValue getConstantsForViewManager(std::string &&viewManagerName) noexcept {
115
- const IViewManager *vm = GetViewManager(viewManagerName);
116
- if (vm == nullptr) {
117
- return {};
118
- }
119
-
120
- auto writer = winrt::Microsoft::ReactNative::MakeJSValueTreeWriter();
121
- writer.WriteObjectBegin();
122
-
123
- if (vm != nullptr)
124
- vm->GetConstants(writer);
125
- writer.WriteObjectEnd();
126
-
127
- auto val = TakeJSValue(writer);
128
- return std::move(val.AsObject().Copy()); // Why do we need to copy?
129
- }
130
-
131
- void ConstantsViaConstantsProvider(winrt::Microsoft::ReactNative::ReactConstantProvider &constants) noexcept {
132
- auto writer = constants.Writer();
133
- for (auto &&vm : m_viewManagers) {
134
- writer.WritePropertyName(vm->GetName());
135
- writer.WriteObjectBegin();
136
- vm->GetConstants(writer);
137
- writer.WriteObjectEnd();
138
- }
139
- constants.Add(L"AccessibilityEventTypes", accessibilityEventTypes);
140
- }
141
-
142
- void createView(int64_t reactTag, std::string viewName, int64_t rootTag, React::JSValueObject &&props) noexcept {
143
- m_nativeUIManager->ensureInBatch();
144
- if (auto viewManager = GetViewManager(viewName)) {
145
- auto node = viewManager->createShadow();
146
- node->m_className = std::move(viewName);
147
- node->m_tag = reactTag;
148
- node->m_rootTag = rootTag;
149
- node->m_viewManager = viewManager;
150
-
151
- node->createView(props);
152
-
153
- m_nativeUIManager->CreateView(*node, props);
154
-
155
- m_nodeRegistry.addNode(shadow_ptr(node), reactTag);
156
-
157
- node->updateProperties(props);
158
- } else {
159
- assert(false);
160
- return;
161
- }
162
- }
163
-
164
- void updateView(int64_t reactTag, std::string viewName, React::JSValueObject &&props) noexcept {
165
- m_nativeUIManager->ensureInBatch();
166
- ShadowNode *pShadowNode = FindShadowNodeForTag(reactTag);
167
- // Guard against setNative calls to removed views
168
- if (pShadowNode == nullptr)
169
- return;
170
-
171
- if (!pShadowNode->m_zombie)
172
- pShadowNode->updateProperties(props);
173
-
174
- m_nativeUIManager->UpdateView(*pShadowNode, props);
175
- }
176
-
177
- void focus(int64_t reactTag) noexcept {
178
- m_nativeUIManager->focus(reactTag);
179
- }
180
-
181
- void blur(int64_t reactTag) noexcept {
182
- m_nativeUIManager->blur(reactTag);
183
- }
184
-
185
- void findSubviewIn(
186
- int64_t reactTag,
187
- React::JSValueArray &&point,
188
- std::function<void(double nativeViewTag, double left, double top, double width, double height)>
189
- &&callback) noexcept {
190
- if (auto node = m_nodeRegistry.findNode(reactTag)) {
191
- float x = static_cast<float>(point[0]);
192
- float y = static_cast<float>(point[1]);
193
- m_nativeUIManager->findSubviewIn(*node, x, y, std::move(callback));
194
- } else {
195
- callback(0, 0, 0, 0, 0);
196
- }
197
- }
198
-
199
- void dispatchViewManagerCommand(
200
- int64_t reactTag,
201
- winrt::Microsoft::ReactNative::JSValue &&commandID,
202
- React::JSValueArray &&commandArgs) noexcept {
203
- m_nativeUIManager->ensureInBatch();
204
- if (auto node = m_nodeRegistry.findNode(reactTag)) {
205
- if (!node->m_zombie)
206
- node->dispatchCommand(commandID.AsString(), std::move(commandArgs));
207
- }
208
- }
209
-
210
- void measure(
211
- int64_t reactTag,
212
- std::function<void(double left, double top, double width, double height, double pageX, double pageY)>
213
- &&callback) noexcept {
214
- if (auto node = m_nodeRegistry.findNode(reactTag)) {
215
- auto &rootNode = m_nodeRegistry.getNode(node->m_rootTag);
216
- m_nativeUIManager->measure(*node, rootNode, std::move(callback));
217
- }
218
- }
219
-
220
- void measureInWindow(
221
- int64_t reactTag,
222
- std::function<void(double x, double y, double width, double height)> &&callback) noexcept {
223
- if (auto node = m_nodeRegistry.findNode(reactTag))
224
- m_nativeUIManager->measureInWindow(*node, std::move(callback));
225
- }
226
-
227
- void viewIsDescendantOf(
228
- int64_t reactTag,
229
- int64_t ancestorReactTag,
230
- std::function<void(React::JSValue const &)> const &callback) noexcept {
231
- assert(false);
232
- // TODO
233
- }
234
-
235
- void measureLayout(
236
- int64_t reactTag,
237
- int64_t ancestorReactTag,
238
- std::function<void(React::JSValue const &)> &&errorCallback,
239
- std::function<void(double left, double top, double width, double height)> &&callback) noexcept {
240
- auto node = m_nodeRegistry.findNode(reactTag);
241
- auto ancestorNode = m_nodeRegistry.findNode(ancestorReactTag);
242
- if (node && ancestorNode) {
243
- m_nativeUIManager->measureLayout(*node, *ancestorNode, std::move(errorCallback), std::move(callback));
244
- }
245
- }
246
-
247
- void measureLayoutRelativeToParent(
248
- int64_t reactTag,
249
- std::function<void(React::JSValue const &)> &&errorCallback,
250
- std::function<void(React::JSValue const &)> &&callback) noexcept {
251
- assert(false);
252
- // TODO
253
- }
254
-
255
- void setJSResponder(int64_t reactTag, bool blockNativeResponder) noexcept {
256
- // TODO
257
- }
258
-
259
- void clearJSResponder() noexcept {
260
- // TODO
261
- }
262
-
263
- void configureNextLayoutAnimation(
264
- React::JSValueObject &&config,
265
- std::function<void()> &&callback,
266
- std::function<void(React::JSValue const &)> &&errorCallback) noexcept {
267
- m_nativeUIManager->configureNextLayoutAnimation(std::move(config), std::move(callback), std::move(errorCallback));
268
- }
269
-
270
- void removeSubviewsFromContainerWithID(int64_t containerID) noexcept {
271
- m_nativeUIManager->ensureInBatch();
272
- if (auto containerNode = m_nodeRegistry.findNode(containerID)) {
273
- std::vector<int64_t> indicesToRemove(containerNode->m_children.size());
274
- for (size_t i = 0; i < containerNode->m_children.size(); i++)
275
- indicesToRemove[static_cast<size_t>(i)] = static_cast<int64_t>(i);
276
- std::vector<int64_t> emptyVec;
277
- manageChildren(containerID, emptyVec, emptyVec, emptyVec, emptyVec, indicesToRemove);
278
- }
279
- }
280
-
281
- void replaceExistingNonRootView(int64_t reactTag, int64_t newReactTag) noexcept {
282
- m_nativeUIManager->ensureInBatch();
283
- std::vector<int64_t> indicesToRemove(1);
284
- std::vector<int64_t> indicesToAdd(1);
285
- std::vector<int64_t> tagToAdd(1);
286
- tagToAdd[0] = newReactTag;
287
-
288
- if (auto node = m_nodeRegistry.findNode(reactTag)) {
289
- CHECK(node->m_parent != -1) << "oldTag must have a parent";
290
- if (auto parent = m_nodeRegistry.findNode(node->m_parent)) {
291
- auto it = find(parent->m_children.begin(), parent->m_children.end(), reactTag);
292
- CHECK(it != parent->m_children.end());
293
- indicesToAdd[0] = indicesToRemove[0] = it - parent->m_children.begin();
294
-
295
- std::vector<int64_t> emptyVec;
296
- manageChildren(parent->m_tag, emptyVec, emptyVec, tagToAdd, indicesToAdd, indicesToRemove);
297
- }
298
- }
299
- }
300
-
301
- void removeRootView(int64_t rootViewTag) noexcept {
302
- m_nativeUIManager->ensureInBatch();
303
- if (auto node = m_nodeRegistry.findNode(rootViewTag)) {
304
- m_nativeUIManager->removeRootView(*node);
305
- DropView(rootViewTag, true);
306
- m_nodeRegistry.removeRootView(rootViewTag);
307
- m_nativeUIManager->destroyRootShadowNode(node);
308
- }
309
- }
310
-
311
- void setChildren(int64_t containerTag, React::JSValueArray &&reactTags) noexcept {
312
- m_nativeUIManager->ensureInBatch();
313
- if (auto parent = m_nodeRegistry.findNode(containerTag)) {
314
- int64_t index = 0;
315
- for (auto &&childTag : reactTags) {
316
- auto tag = childTag.AsInt64();
317
- auto childNode = m_nodeRegistry.findNode(tag);
318
- childNode->m_parent = parent->m_tag;
319
- parent->m_children.push_back(tag);
320
- if (!parent->m_zombie)
321
- parent->AddView(*childNode, index);
322
-
323
- m_nativeUIManager->AddView(*parent, *childNode, index);
324
- ++index;
325
- }
326
- }
327
- }
328
-
329
- void manageChildren(
330
- int64_t containerTag,
331
- React::JSValueArray &&moveFromIndices,
332
- React::JSValueArray &&moveToIndices,
333
- React::JSValueArray &&addChildReactTags,
334
- React::JSValueArray &&addAtIndices,
335
- React::JSValueArray &&removeAtIndices) noexcept {
336
- auto vecMoveFrom = PopulateIntVecFromDynamicArray(moveFromIndices);
337
- auto vecMoveTo = PopulateIntVecFromDynamicArray(moveToIndices);
338
- auto vecAddChildTags = PopulateIntVecFromDynamicArray(addChildReactTags);
339
- auto vecAddAtIndices = PopulateIntVecFromDynamicArray(addAtIndices);
340
- auto vecRemoveFrom = PopulateIntVecFromDynamicArray(removeAtIndices);
341
- manageChildren(containerTag, vecMoveFrom, vecMoveTo, vecAddChildTags, vecAddAtIndices, vecRemoveFrom);
342
- }
343
-
344
- void setLayoutAnimationEnabledExperimental(bool enabled) noexcept {
345
- assert(false);
346
- // TODO
347
- }
348
-
349
- void sendAccessibilityEvent(int64_t reactTag, double eventType) noexcept {
350
- auto type = int(eventType);
351
- if (type == accessibilityEventTypes["typeViewFocused"]) {
352
- focus(reactTag);
353
- } else {
354
- assert(false);
355
- }
356
- }
357
-
358
- void showPopupMenu(
359
- int64_t reactTag,
360
- React::JSValueArray &&items,
361
- std::function<void(React::JSValue const &)> const &error,
362
- std::function<void(React::JSValue const &)> const &success) noexcept {
363
- assert(false);
364
- // TODO
365
- }
366
-
367
- void dismissPopupMenu() noexcept {
368
- assert(false);
369
- // TODO
370
- }
371
-
372
- private:
373
- std::unordered_set<int64_t> &GetAllRootTags() {
374
- return m_nodeRegistry.getAllRoots();
375
- }
376
-
377
- ShadowNode *FindShadowNodeForTag(int64_t tag) {
378
- return m_nodeRegistry.findNode(tag);
379
- }
380
-
381
- ShadowNode &GetShadowNodeForTag(int64_t tag) {
382
- return m_nodeRegistry.getNode(tag);
383
- }
384
-
385
- void onBatchComplete() {
386
- m_nativeUIManager->onBatchComplete();
387
- }
388
-
389
- void manageChildren(
390
- int64_t viewTag,
391
- std::vector<int64_t> &moveFrom,
392
- std::vector<int64_t> &moveTo,
393
- std::vector<int64_t> &addChildTags,
394
- std::vector<int64_t> &addAtIndices,
395
- std::vector<int64_t> &removeFrom) {
396
- m_nativeUIManager->ensureInBatch();
397
- auto &shadowNodeToManage = m_nodeRegistry.getNode(viewTag);
398
-
399
- auto numToMove = moveFrom.size();
400
- auto numToAdd = addChildTags.size();
401
- auto numToRemove = removeFrom.size();
402
- std::vector<std::shared_ptr<ViewAtIndex>> viewsToAdd(numToMove + numToAdd);
403
- std::vector<std::shared_ptr<ViewAtIndex>> viewsToRemove(numToMove + numToRemove);
404
- std::vector<int64_t> tagsToDelete(numToRemove);
405
-
406
- if (numToMove > 0) {
407
- for (size_t i = 0; i < numToMove; ++i) {
408
- auto moveFromIndex = moveFrom[i];
409
- auto tagToMove =
410
- m_nodeRegistry
411
- .getNode(static_cast<size_t>(shadowNodeToManage.m_children[static_cast<size_t>(moveFromIndex)]))
412
- .m_tag;
413
- viewsToAdd[i] = std::make_shared<ViewAtIndex>(ViewAtIndex{tagToMove, moveTo[i]});
414
- viewsToRemove[i] = std::make_shared<ViewAtIndex>(ViewAtIndex{tagToMove, moveFromIndex});
415
- }
416
- }
417
-
418
- if (numToAdd > 0) {
419
- for (size_t i = 0; i < numToAdd; ++i) {
420
- viewsToAdd[numToMove + i] = std::make_shared<ViewAtIndex>(ViewAtIndex{addChildTags[i], addAtIndices[i]});
421
- }
422
- }
423
-
424
- if (numToRemove > 0) {
425
- for (size_t i = 0; i < numToRemove; ++i) {
426
- auto indexToRemove = removeFrom[i];
427
- auto tagToRemove =
428
- m_nodeRegistry
429
- .getNode(static_cast<size_t>(shadowNodeToManage.m_children[static_cast<size_t>(indexToRemove)]))
430
- .m_tag;
431
- viewsToRemove[i] = std::make_shared<ViewAtIndex>(ViewAtIndex{tagToRemove, indexToRemove});
432
- tagsToDelete[i] = tagToRemove;
433
- }
434
- }
435
-
436
- // NB: moveFrom and removeForm are both relative to the starting
437
- // state of the view's children.
438
- //
439
- // 1) Sort the views to add and indices to remove by index
440
- // 2) Iterate the indices being removed from high to low and remove
441
- // them. Going high to low makes sure we remove the correct
442
- // index when there are multiple to remove.
443
- // 3) Iterate the views being added by index low to high and add
444
- // them. Like the view removal, iteration direction is important
445
- // to preserve the correct index.
446
-
447
- std::sort(viewsToAdd.begin(), viewsToAdd.end(), ViewAtIndex::ViewAtIndexCompare);
448
- std::sort(viewsToRemove.begin(), viewsToRemove.end(), ViewAtIndex::ViewAtIndexCompare);
449
-
450
- // Apply changes to the ReactShadowNode hierarchy.
451
- for (auto i = static_cast<int>(viewsToRemove.size()) - 1; i >= 0; --i) {
452
- auto viewAtIndex = viewsToRemove[i];
453
- auto &shadowNodeToRemove = m_nodeRegistry.getNode(viewAtIndex->tag);
454
-
455
- shadowNodeToManage.m_children.erase(
456
- shadowNodeToManage.m_children.begin() + static_cast<size_t>(viewAtIndex->index));
457
- shadowNodeToManage.RemoveChildAt(viewAtIndex->index);
458
- }
459
-
460
- for (size_t i = 0; i < viewsToAdd.size(); ++i) {
461
- auto viewAtIndex = viewsToAdd[i];
462
- auto &shadowNodeToAdd = m_nodeRegistry.getNode(viewAtIndex->tag);
463
- shadowNodeToAdd.m_parent = shadowNodeToManage.m_tag;
464
- shadowNodeToManage.m_children.insert(
465
- shadowNodeToManage.m_children.begin() + static_cast<size_t>(viewAtIndex->index), shadowNodeToAdd.m_tag);
466
- if (!shadowNodeToManage.m_zombie)
467
- shadowNodeToManage.AddView(shadowNodeToAdd, viewAtIndex->index);
468
-
469
- m_nativeUIManager->AddView(shadowNodeToManage, shadowNodeToAdd, viewAtIndex->index);
470
- }
471
-
472
- for (auto tagToDelete : tagsToDelete)
473
- DropView(tagToDelete);
474
- }
475
-
476
- IViewManager *GetViewManager(const std::string &className) const {
477
- auto wclassName = Microsoft::Common::Unicode::Utf8ToUtf16(className);
478
- for (auto &&vm : m_viewManagers) {
479
- if (!std::wcscmp(vm->GetName(), wclassName.c_str()))
480
- return vm.get();
481
- }
482
- return nullptr;
483
- }
484
-
485
- void RegisterRootView(facebook::react::IReactRootView *rootView, int64_t rootViewTag, int64_t width, int64_t height) {
486
- static std::string rootClassName = "ROOT";
487
- auto viewManager = GetViewManager(rootClassName);
488
-
489
- auto root = m_nativeUIManager->createRootShadowNode(rootView);
490
- root->m_className = rootClassName;
491
- root->m_viewManager = viewManager;
492
- root->m_tag = rootViewTag;
493
- root->m_rootTag = rootViewTag;
494
- m_nodeRegistry.addRootView(shadow_ptr(root), rootViewTag);
495
-
496
- m_nativeUIManager->AddRootView(*root, rootView);
497
- }
498
-
499
- void zombieView(int64_t tag) {
500
- DropView(tag, false, true);
501
- }
502
-
503
- void DropView(int64_t tag, bool removeChildren = true, bool zombieView = false) {
504
- // Prevent re-entry and double deletion which can cause memory corruption
505
- if (m_nodesBeingDropped.find(tag) != m_nodesBeingDropped.end()) {
506
- return;
507
- }
508
-
509
- if (auto node = m_nodeRegistry.findNode(tag)) {
510
- // Mark this node as being dropped
511
- m_nodesBeingDropped.insert(tag);
512
-
513
- node->onDropViewInstance();
514
-
515
- m_nativeUIManager->RemoveView(*node, removeChildren);
516
-
517
- if (zombieView)
518
- node->m_zombie = true;
519
-
520
- // Make a copy of children to avoid iterator invalidation
521
- auto children = node->m_children;
522
- for (auto childTag : children) {
523
- DropView(childTag, removeChildren, zombieView);
524
- }
525
-
526
- if (removeChildren)
527
- node->removeAllChildren();
528
-
529
- if (!zombieView) {
530
- m_nodeRegistry.removeNode(tag);
531
- }
532
-
533
- // Remove from tracking set
534
- m_nodesBeingDropped.erase(tag);
535
- }
536
- }
537
-
538
- winrt::Microsoft::ReactNative::ReactContext m_context;
539
- std::vector<std::unique_ptr<IViewManager>> m_viewManagers;
540
- ShadowNodeRegistry m_nodeRegistry;
541
- std::shared_ptr<NativeUIManager> m_nativeUIManager;
542
- const React::JSValueObject accessibilityEventTypes = React::JSValueObject{{"typeViewFocused", 8}};
543
- // Track nodes being dropped to prevent double-deletion and corruption
544
- std::unordered_set<int64_t> m_nodesBeingDropped;
545
- };
546
-
547
- UIManager::UIManager() : m_module(std::make_shared<UIManagerModule>()) {}
548
-
549
- UIManager::~UIManager() {
550
- // To make sure that we destroy UI components in UI thread.
551
- if (!m_context.UIDispatcher().HasThreadAccess()) {
552
- m_context.UIDispatcher().Post([module = std::move(m_module)]() mutable { module = nullptr; });
553
- }
554
- }
555
-
556
- void UIManager::Initialize(winrt::Microsoft::ReactNative::ReactContext const &reactContext) noexcept {
557
- m_context = reactContext;
558
-
559
- auto settings = m_context.Properties().Get(UIManagerSettingsProperty());
560
- m_batchingUIMessageQueue = std::move((*settings)->batchingUIMessageQueue);
561
- m_uiMessageQueue = std::move((*settings)->uiMessageQueue);
562
-
563
- m_module->Initialize(reactContext);
564
- }
565
-
566
- React::JSValue UIManager::getConstantsForViewManager(std::string viewManagerName) noexcept {
567
- return m_module->getConstantsForViewManager(std::move(viewManagerName));
568
- }
569
-
570
- React::JSValue UIManager::getViewManagerConfig(std::string viewManagerName) noexcept {
571
- return getConstantsForViewManager(std::move(viewManagerName));
572
- }
573
-
574
- void UIManager::ConstantsViaConstantsProvider(
575
- winrt::Microsoft::ReactNative::ReactConstantProvider &constants) noexcept {
576
- m_module->ConstantsViaConstantsProvider(constants);
577
- }
578
-
579
- React::JSValueArray UIManager::getDefaultEventTypes() noexcept {
580
- assert(false);
581
- // TODO
582
- return {};
583
- }
584
-
585
- React::JSValue UIManager::lazilyLoadView(std::string name) noexcept {
586
- // TODO
587
- return {};
588
- }
589
-
590
- void UIManager::createView(
591
- double reactTag,
592
- std::string viewName,
593
- double rootTag,
594
- React::JSValueObject &&props) noexcept {
595
- m_uiMessageQueue->runOnQueue(Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module),
596
- reactTag,
597
- viewName = std::move(viewName),
598
- rootTag,
599
- props = std::move(props)]() mutable {
600
- TraceSection s("UIManager::createView");
601
- if (auto module = m.lock()) {
602
- module->createView(static_cast<int64_t>(reactTag), viewName, static_cast<int64_t>(rootTag), std::move(props));
603
- }
604
- }));
605
- }
606
-
607
- void UIManager::updateView(double reactTag, std::string viewName, React::JSValueObject &&props) noexcept {
608
- m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module),
609
- reactTag,
610
- viewName = std::move(viewName),
611
- props = std::move(props)]() mutable {
612
- TraceSection s("UIManager::updateView");
613
- if (auto module = m.lock()) {
614
- module->updateView(static_cast<int64_t>(reactTag), viewName, std::move(props));
615
- }
616
- }));
617
- }
618
-
619
- void UIManager::focus(double reactTag) noexcept {
620
- m_batchingUIMessageQueue->runOnQueue([m = std::weak_ptr<UIManagerModule>(m_module), reactTag]() {
621
- TraceSection s("UIManager::focus");
622
- if (auto module = m.lock()) {
623
- module->focus(static_cast<int64_t>(reactTag));
624
- }
625
- });
626
- }
627
-
628
- void UIManager::blur(double reactTag) noexcept {
629
- m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module), reactTag]() {
630
- TraceSection s("UIManager::blur");
631
- if (auto module = m.lock()) {
632
- module->blur(static_cast<int64_t>(reactTag));
633
- }
634
- }));
635
- }
636
-
637
- void UIManager::findSubviewIn(
638
- double reactTag,
639
- React::JSValueArray &&point,
640
- std::function<void(double nativeViewTag, double left, double top, double width, double height)> const
641
- &callback) noexcept {
642
- m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module),
643
- reactTag,
644
- point = std::move(point),
645
- callback = std::move(callback)]() mutable {
646
- TraceSection s("UIManager::findSubviewIn");
647
- if (auto module = m.lock()) {
648
- module->findSubviewIn(static_cast<int64_t>(reactTag), std::move(point), std::move(callback));
649
- }
650
- }));
651
- }
652
-
653
- void UIManager::dispatchViewManagerCommand(
654
- double reactTag,
655
- winrt::Microsoft::ReactNative::JSValue &&commandID,
656
- React::JSValueArray &&commandArgs) noexcept {
657
- m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module),
658
- reactTag,
659
- commandID = std::move(commandID),
660
- commandArgs = std::move(commandArgs)]() mutable {
661
- TraceSection s("UIManager::dispatchViewManagerCommand");
662
- if (auto module = m.lock()) {
663
- module->dispatchViewManagerCommand(static_cast<int64_t>(reactTag), std::move(commandID), std::move(commandArgs));
664
- }
665
- }));
666
- }
667
-
668
- void UIManager::measure(
669
- double reactTag,
670
- std::function<void(double left, double top, double width, double height, double pageX, double pageY)> const
671
- &callback) noexcept {
672
- m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor(
673
- [m = std::weak_ptr<UIManagerModule>(m_module), reactTag, callback = std::move(callback)]() mutable {
674
- TraceSection s("UIManager::measure");
675
- if (auto module = m.lock()) {
676
- module->measure(static_cast<int64_t>(reactTag), std::move(callback));
677
- }
678
- }));
679
- }
680
-
681
- void UIManager::measureInWindow(
682
- double reactTag,
683
- std::function<void(double x, double y, double width, double height)> const &callback) noexcept {
684
- m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor(
685
- [m = std::weak_ptr<UIManagerModule>(m_module), reactTag, callback = std::move(callback)]() mutable {
686
- TraceSection s("UIManager::measureInWindow");
687
- if (auto module = m.lock()) {
688
- module->measureInWindow(static_cast<int64_t>(reactTag), std::move(callback));
689
- }
690
- }));
691
- }
692
-
693
- void UIManager::viewIsDescendantOf(
694
- double reactTag,
695
- double ancestorReactTag,
696
- std::function<void(React::JSValue const &)> const &callback) noexcept {
697
- m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module),
698
- reactTag,
699
- ancestorReactTag,
700
- callback = std::move(callback)]() mutable {
701
- TraceSection s("UIManager::viewIsDescendantOf");
702
- if (auto module = m.lock()) {
703
- module->viewIsDescendantOf(
704
- static_cast<int64_t>(reactTag), static_cast<int64_t>(ancestorReactTag), std::move(callback));
705
- }
706
- }));
707
- }
708
-
709
- void UIManager::measureLayout(
710
- double reactTag,
711
- double ancestorReactTag,
712
- std::function<void(React::JSValue const &)> const &errorCallback,
713
- std::function<void(double left, double top, double width, double height)> const &callback) noexcept {
714
- m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module),
715
- reactTag,
716
- ancestorReactTag,
717
- errorCallback = std::move(errorCallback),
718
- callback = std::move(callback)]() mutable {
719
- TraceSection s("UIManager::measureLayout");
720
- if (auto module = m.lock()) {
721
- module->measureLayout(
722
- static_cast<int64_t>(reactTag),
723
- static_cast<int64_t>(ancestorReactTag),
724
- std::move(errorCallback),
725
- std::move(callback));
726
- }
727
- }));
728
- }
729
-
730
- void UIManager::measureLayoutRelativeToParent(
731
- double reactTag,
732
- std::function<void(React::JSValue const &)> const &errorCallback,
733
- std::function<void(React::JSValue const &)> const &callback) noexcept {
734
- m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module),
735
- reactTag,
736
- errorCallback = std::move(errorCallback),
737
- callback = std::move(callback)]() mutable {
738
- TraceSection s("UIManager::measureLayoutRelativeToParent");
739
- if (auto module = m.lock()) {
740
- module->measureLayoutRelativeToParent(
741
- static_cast<int64_t>(reactTag), std::move(errorCallback), std::move(callback));
742
- }
743
- }));
744
- }
745
-
746
- void UIManager::setJSResponder(double reactTag, bool blockNativeResponder) noexcept {
747
- m_batchingUIMessageQueue->runOnQueue(
748
- Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module), reactTag, blockNativeResponder]() mutable {
749
- TraceSection s("UIManager::setJSResponder");
750
- if (auto module = m.lock()) {
751
- module->setJSResponder(static_cast<int64_t>(reactTag), blockNativeResponder);
752
- }
753
- }));
754
- }
755
-
756
- void UIManager::clearJSResponder() noexcept {
757
- m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module)]() mutable {
758
- TraceSection s("UIManager::clearJSResponder");
759
- if (auto module = m.lock()) {
760
- module->clearJSResponder();
761
- }
762
- }));
763
- }
764
-
765
- void UIManager::configureNextLayoutAnimation(
766
- React::JSValueObject &&config,
767
- std::function<void()> const &callback,
768
- std::function<void(React::JSValue const &)> const &errorCallback) noexcept {
769
- m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module),
770
- config = std::move(config),
771
- callback = std::move(callback),
772
- errorCallback = std::move(errorCallback)]() mutable {
773
- TraceSection s("UIManager::configureNextLayoutAnimation");
774
- if (auto module = m.lock()) {
775
- module->configureNextLayoutAnimation(std::move(config), std::move(callback), std::move(errorCallback));
776
- }
777
- }));
778
- }
779
-
780
- void UIManager::removeSubviewsFromContainerWithID(double containerID) noexcept {
781
- m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module), containerID]() {
782
- TraceSection s("UIManager::removeSubviewsFromContainerWithID");
783
- if (auto module = m.lock()) {
784
- module->removeSubviewsFromContainerWithID(static_cast<int64_t>(containerID));
785
- }
786
- }));
787
- }
788
-
789
- void UIManager::replaceExistingNonRootView(double reactTag, double newReactTag) noexcept {
790
- m_batchingUIMessageQueue->runOnQueue(
791
- Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module), reactTag, newReactTag]() {
792
- TraceSection s("UIManager::replaceExistingNonRootView");
793
- if (auto module = m.lock()) {
794
- module->replaceExistingNonRootView(static_cast<int64_t>(reactTag), static_cast<int64_t>(newReactTag));
795
- }
796
- }));
797
- }
798
-
799
- void UIManager::removeRootView(double reactTag) noexcept {
800
- m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module), reactTag]() {
801
- TraceSection s("UIManager::removeRootView");
802
- if (auto module = m.lock()) {
803
- module->removeRootView(static_cast<int64_t>(reactTag));
804
- }
805
- }));
806
- }
807
-
808
- void UIManager::setChildren(double containerTag, React::JSValueArray &&reactTags) noexcept {
809
- m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor(
810
- [m = std::weak_ptr<UIManagerModule>(m_module), containerTag, reactTags = std::move(reactTags)]() mutable {
811
- TraceSection s("UIManager::setChildren");
812
- if (auto module = m.lock()) {
813
- module->setChildren(static_cast<int64_t>(containerTag), std::move(reactTags));
814
- }
815
- }));
816
- }
817
-
818
- void UIManager::manageChildren(
819
- double containerTag,
820
- React::JSValueArray &&moveFromIndices,
821
- React::JSValueArray &&moveToIndices,
822
- React::JSValueArray &&addChildReactTags,
823
- React::JSValueArray &&addAtIndices,
824
- React::JSValueArray &&removeAtIndices) noexcept {
825
- m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module),
826
- containerTag,
827
- moveFromIndices = std::move(moveFromIndices),
828
- moveToIndices = std::move(moveToIndices),
829
- addChildReactTags = std::move(addChildReactTags),
830
- addAtIndices = std::move(addAtIndices),
831
- removeAtIndices = std::move(removeAtIndices)]() mutable {
832
- TraceSection s("UIManager::manageChildren");
833
- if (auto module = m.lock()) {
834
- module->manageChildren(
835
- static_cast<int64_t>(containerTag),
836
- std::move(moveFromIndices),
837
- std::move(moveToIndices),
838
- std::move(addChildReactTags),
839
- std::move(addAtIndices),
840
- std::move(removeAtIndices));
841
- }
842
- }));
843
- }
844
-
845
- void UIManager::setLayoutAnimationEnabledExperimental(bool enabled) noexcept {
846
- m_batchingUIMessageQueue->runOnQueue(
847
- Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module), enabled]() mutable {
848
- TraceSection s("UIManager::setLayoutAnimationEnabledExperimental");
849
- if (auto module = m.lock()) {
850
- module->setLayoutAnimationEnabledExperimental(enabled);
851
- }
852
- }));
853
- }
854
-
855
- void UIManager::sendAccessibilityEvent(double reactTag, double eventType) noexcept {
856
- m_batchingUIMessageQueue->runOnQueue(
857
- Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module), reactTag, eventType]() mutable {
858
- TraceSection s("UIManager::sendAccessibilityEvent");
859
- if (auto module = m.lock()) {
860
- module->sendAccessibilityEvent(static_cast<int64_t>(reactTag), eventType);
861
- }
862
- }));
863
- }
864
-
865
- void UIManager::showPopupMenu(
866
- double reactTag,
867
- React::JSValueArray &&items,
868
- std::function<void(React::JSValue const &)> const &error,
869
- std::function<void(React::JSValue const &)> const &success) noexcept {
870
- m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module),
871
- reactTag,
872
- items = std::move(items),
873
- error = std::move(error),
874
- success = std::move(success)]() mutable {
875
- TraceSection s("UIManager::showPopupMenu");
876
- if (auto module = m.lock()) {
877
- module->showPopupMenu(static_cast<int64_t>(reactTag), std::move(items), std::move(error), std::move(success));
878
- }
879
- }));
880
- }
881
-
882
- void UIManager::dismissPopupMenu() noexcept {
883
- m_batchingUIMessageQueue->runOnQueue(Mso::VoidFunctor([m = std::weak_ptr<UIManagerModule>(m_module)]() mutable {
884
- TraceSection s("UIManager::dismissPopupMenu");
885
- if (auto module = m.lock()) {
886
- module->dismissPopupMenu();
887
- }
888
- }));
889
- }
890
-
891
- } // namespace Microsoft::ReactNative