react-native-macos 0.0.0-b1e6b9783 → 0.0.0-b2c5fa973

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 (449) hide show
  1. package/Libraries/AddressSanitizerCrash/RCTAddressSanitizerCrash.js +2 -3
  2. package/Libraries/Alert/Alert.js +117 -8
  3. package/Libraries/Alert/NativeAlertManager.js +1 -19
  4. package/Libraries/Alert/RCTAlertManager.android.js +1 -1
  5. package/Libraries/Animated/AnimatedImplementation.js +53 -53
  6. package/Libraries/Animated/AnimatedMock.js +8 -8
  7. package/Libraries/Animated/NativeAnimatedHelper.js +23 -20
  8. package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
  9. package/Libraries/Animated/nodes/AnimatedNode.js +10 -9
  10. package/Libraries/Animated/nodes/AnimatedValueXY.js +1 -1
  11. package/Libraries/AppState/AppState.js +8 -7
  12. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +2 -2
  13. package/Libraries/Blob/React-RCTBlob.podspec +1 -1
  14. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +22 -20
  15. package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +1 -2
  16. package/Libraries/Components/Button.js +1 -2
  17. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +6 -7
  18. package/Libraries/Components/Keyboard/Keyboard.js +8 -7
  19. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +5 -10
  20. package/Libraries/Components/Pressable/Pressable.js +1 -2
  21. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js +2 -1
  22. package/Libraries/Components/RefreshControl/RefreshControl.js +2 -7
  23. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +2 -3
  24. package/Libraries/Components/SafeAreaView/SafeAreaView.js +2 -2
  25. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +3 -5
  26. package/Libraries/Components/ScrollView/ScrollContentViewNativeComponent.js +3 -5
  27. package/Libraries/Components/ScrollView/ScrollView.js +34 -68
  28. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +5 -4
  29. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -2
  30. package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js +2 -8
  31. package/Libraries/Components/Sound/SoundManager.js +1 -1
  32. package/Libraries/Components/TextInput/InputAccessoryView.js +1 -2
  33. package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +3 -5
  34. package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +3 -5
  35. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +2 -0
  36. package/Libraries/Components/TextInput/TextInput.js +137 -11
  37. package/Libraries/Components/ToastAndroid/ToastAndroid.android.js +3 -3
  38. package/Libraries/Components/ToastAndroid/ToastAndroid.ios.js +3 -3
  39. package/Libraries/Components/Touchable/BoundingDimensions.js +2 -2
  40. package/Libraries/Components/Touchable/PooledClass.js +6 -6
  41. package/Libraries/Components/Touchable/Position.js +1 -1
  42. package/Libraries/Components/Touchable/Touchable.js +26 -25
  43. package/Libraries/Components/Touchable/TouchableBounce.js +1 -2
  44. package/Libraries/Components/Touchable/TouchableHighlight.js +1 -2
  45. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +4 -11
  46. package/Libraries/Components/Touchable/TouchableOpacity.js +1 -2
  47. package/Libraries/Components/View/ReactNativeStyleAttributes.js +1 -0
  48. package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
  49. package/Libraries/Components/View/ReactNativeViewViewConfig.js +1 -0
  50. package/Libraries/Components/View/ReactNativeViewViewConfigMacOS.js +3 -3
  51. package/Libraries/Components/View/View.js +0 -7
  52. package/Libraries/Components/View/ViewAccessibility.js +0 -5
  53. package/Libraries/Components/View/ViewNativeComponent.js +3 -4
  54. package/Libraries/Components/View/ViewPropTypes.js +101 -117
  55. package/Libraries/Core/Devtools/parseHermesStack.js +2 -1
  56. package/Libraries/Core/ExceptionsManager.js +2 -2
  57. package/Libraries/Core/NativeExceptionsManager.js +2 -3
  58. package/Libraries/Core/ReactNativeVersion.js +1 -5
  59. package/Libraries/Core/Timers/JSTimers.js +17 -13
  60. package/Libraries/Core/setUpAlert.js +1 -1
  61. package/Libraries/Core/setUpDeveloperTools.js +1 -1
  62. package/Libraries/Core/setUpPerformance.js +1 -1
  63. package/Libraries/Core/setUpRegeneratorRuntime.js +1 -1
  64. package/Libraries/Core/setUpSegmentFetcher.js +4 -4
  65. package/Libraries/EventEmitter/NativeEventEmitter.js +2 -1
  66. package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +2 -1
  67. package/Libraries/HeapCapture/HeapCapture.js +1 -1
  68. package/Libraries/Image/AssetSourceResolver.js +2 -4
  69. package/Libraries/Image/Image.android.js +4 -4
  70. package/Libraries/Image/Image.ios.js +3 -3
  71. package/Libraries/Image/ImageAnalyticsTagContext.js +2 -3
  72. package/Libraries/Image/ImageBackground.js +1 -2
  73. package/Libraries/Image/ImagePickerIOS.js +6 -6
  74. package/Libraries/Image/ImageViewNativeComponent.js +2 -4
  75. package/Libraries/Image/NativeImageLoaderAndroid.js +1 -3
  76. package/Libraries/Image/RCTImageCache.m +1 -1
  77. package/Libraries/Image/RCTImageView.mm +14 -10
  78. package/Libraries/Image/React-RCTImage.podspec +1 -1
  79. package/Libraries/Image/TextInlineImageNativeComponent.js +3 -5
  80. package/Libraries/Inspector/ElementProperties.js +2 -4
  81. package/Libraries/Inspector/InspectorOverlay.js +1 -2
  82. package/Libraries/Inspector/InspectorPanel.js +1 -2
  83. package/Libraries/Inspector/NetworkOverlay.js +5 -11
  84. package/Libraries/Interaction/BridgeSpyStallHandler.js +1 -1
  85. package/Libraries/Interaction/FrameRateLogger.js +2 -2
  86. package/Libraries/Interaction/InteractionManager.js +2 -4
  87. package/Libraries/Interaction/JSEventLoopWatchdog.js +4 -4
  88. package/Libraries/Interaction/PanResponder.js +3 -4
  89. package/Libraries/Interaction/TouchHistoryMath.js +7 -7
  90. package/Libraries/JSInspector/NetworkAgent.js +1 -6
  91. package/Libraries/LayoutAnimation/LayoutAnimation.js +3 -3
  92. package/Libraries/LinkingIOS/RCTLinkingManager.h +1 -0
  93. package/Libraries/LinkingIOS/React-RCTLinking.podspec +1 -1
  94. package/Libraries/LinkingIOS/macos/RCTLinkingManager.mm +12 -5
  95. package/Libraries/Lists/FillRateHelper.js +1 -3
  96. package/Libraries/Lists/FlatList.js +28 -5
  97. package/Libraries/Lists/ViewabilityHelper.js +4 -10
  98. package/Libraries/Lists/VirtualizeUtils.js +2 -6
  99. package/Libraries/Lists/VirtualizedList.js +136 -148
  100. package/Libraries/Lists/VirtualizedListContext.js +3 -5
  101. package/Libraries/Lists/VirtualizedSectionList.js +63 -68
  102. package/Libraries/LogBox/Data/LogBoxData.js +1 -1
  103. package/Libraries/LogBox/Data/parseLogBoxLog.js +12 -23
  104. package/Libraries/LogBox/UI/LogBoxButton.js +2 -4
  105. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +2 -4
  106. package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +1 -2
  107. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -2
  108. package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +3 -6
  109. package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +1 -2
  110. package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +2 -4
  111. package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +2 -4
  112. package/Libraries/LogBox/UI/LogBoxNotification.js +2 -4
  113. package/Libraries/Modal/Modal.js +2 -4
  114. package/{ReactCommon/react/renderer/mounting/MountingTransactionMetadata.cpp → Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.h} +6 -4
  115. package/Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.m +30 -0
  116. package/Libraries/NativeAnimation/Nodes/RCTPropsAnimatedNode.m +11 -6
  117. package/Libraries/NativeAnimation/Nodes/RCTStyleAnimatedNode.m +8 -4
  118. package/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m +2 -0
  119. package/Libraries/NativeAnimation/React-RCTAnimation.podspec +2 -2
  120. package/Libraries/NativeComponent/NativeComponentRegistry.js +2 -4
  121. package/Libraries/Network/React-RCTNetwork.podspec +1 -1
  122. package/Libraries/Network/XHRInterceptor.js +5 -6
  123. package/Libraries/NewAppScreen/components/Header.js +2 -4
  124. package/Libraries/NewAppScreen/components/HermesBadge.js +1 -2
  125. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +2 -4
  126. package/Libraries/Performance/SamplingProfiler.js +3 -3
  127. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +4 -3
  128. package/Libraries/Pressability/Pressability.js +2 -2
  129. package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +4 -2
  130. package/Libraries/PushNotificationIOS/PushNotificationIOS.js +8 -7
  131. package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +1 -1
  132. package/Libraries/ReactNative/AppContainer.js +4 -6
  133. package/Libraries/ReactNative/AppRegistry.js +2 -3
  134. package/Libraries/ReactNative/I18nManager.js +2 -5
  135. package/Libraries/ReactNative/PaperUIManager.js +2 -3
  136. package/Libraries/ReactNative/RootTag.js +2 -3
  137. package/Libraries/ReactNative/renderApplication.js +1 -2
  138. package/Libraries/Settings/React-RCTSettings.podspec +1 -1
  139. package/Libraries/Storage/AsyncStorage.js +21 -21
  140. package/Libraries/StyleSheet/StyleSheet.js +2 -1
  141. package/Libraries/StyleSheet/StyleSheetTypes.js +26 -1
  142. package/Libraries/StyleSheet/processColor.js +2 -2
  143. package/Libraries/StyleSheet/splitLayoutProps.js +1 -3
  144. package/Libraries/Text/BaseText/RCTBaseTextViewManager.m +8 -0
  145. package/Libraries/Text/RCTTextAttributes.h +11 -3
  146. package/Libraries/Text/RCTTextAttributes.m +46 -13
  147. package/Libraries/Text/Text/RCTDynamicTypeRamp.h +40 -0
  148. package/Libraries/Text/Text/RCTDynamicTypeRamp.m +77 -0
  149. package/Libraries/Text/Text/RCTTextView.m +123 -58
  150. package/Libraries/Text/Text.js +2 -15
  151. package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.h +8 -0
  152. package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m +66 -1
  153. package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputViewManager.m +13 -0
  154. package/Libraries/Text/TextInput/Multiline/RCTUITextView.h +2 -1
  155. package/Libraries/Text/TextInput/Multiline/RCTUITextView.m +89 -7
  156. package/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h +13 -1
  157. package/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.m +12 -3
  158. package/Libraries/Text/TextInput/RCTBackedTextInputViewProtocol.h +3 -2
  159. package/Libraries/Text/TextInput/RCTBaseTextInputShadowView.m +12 -0
  160. package/Libraries/Text/TextInput/RCTBaseTextInputView.h +9 -1
  161. package/Libraries/Text/TextInput/RCTBaseTextInputView.m +120 -2
  162. package/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m +15 -3
  163. package/Libraries/Text/TextInput/Singleline/RCTSinglelineTextInputView.m +4 -0
  164. package/Libraries/Text/TextInput/Singleline/RCTUITextField.h +2 -0
  165. package/Libraries/Text/TextInput/Singleline/RCTUITextField.m +64 -1
  166. package/Libraries/Text/TextNativeComponent.js +5 -5
  167. package/Libraries/Text/TextProps.js +29 -0
  168. package/Libraries/TypeSafety/RCTTypeSafety.podspec +1 -1
  169. package/Libraries/Types/CoreEventTypes.js +0 -1
  170. package/Libraries/Utilities/Appearance.js +8 -5
  171. package/Libraries/Utilities/BackHandler.android.js +4 -4
  172. package/Libraries/Utilities/HMRClient.js +2 -2
  173. package/Libraries/Utilities/JSDevSupportModule.js +3 -4
  174. package/Libraries/Utilities/MatrixMath.js +19 -19
  175. package/Libraries/Utilities/PerformanceLoggerContext.js +2 -3
  176. package/Libraries/Utilities/ReactNativeTestTools.js +2 -4
  177. package/Libraries/Utilities/SceneTracker.js +1 -3
  178. package/Libraries/Utilities/__mocks__/BackHandler.js +3 -3
  179. package/Libraries/Utilities/buildStyleInterpolator.js +9 -9
  180. package/Libraries/Utilities/codegenNativeComponent.js +4 -2
  181. package/Libraries/Utilities/differ/deepDiffer.js +1 -1
  182. package/Libraries/Utilities/differ/insetsDiffer.js +1 -1
  183. package/Libraries/Utilities/differ/matricesDiffer.js +1 -1
  184. package/Libraries/Utilities/differ/pointsDiffer.js +1 -1
  185. package/Libraries/Utilities/differ/sizesDiffer.js +1 -1
  186. package/Libraries/Utilities/logError.js +1 -1
  187. package/Libraries/Utilities/mergeIntoFast.js +1 -1
  188. package/Libraries/Utilities/truncate.js +1 -1
  189. package/Libraries/Vibration/React-RCTVibration.podspec +1 -1
  190. package/Libraries/Vibration/Vibration.js +2 -2
  191. package/Libraries/WebSocket/WebSocketInterceptor.js +4 -4
  192. package/Libraries/promiseRejectionTrackingOptions.js +1 -1
  193. package/Libraries/vendor/emitter/_EmitterSubscription.js +2 -1
  194. package/Libraries/vendor/emitter/_EventEmitter.js +2 -1
  195. package/Libraries/vendor/emitter/_EventSubscription.js +2 -1
  196. package/Libraries/vendor/emitter/_EventSubscriptionVendor.js +1 -1
  197. package/React/Base/RCTAssert.h +30 -15
  198. package/React/Base/RCTAssert.m +59 -19
  199. package/React/Base/RCTBridge.m +5 -3
  200. package/React/Base/RCTConstants.h +6 -0
  201. package/React/Base/RCTConstants.m +15 -0
  202. package/React/Base/RCTConvert.m +8 -4
  203. package/React/Base/RCTEventDispatcherProtocol.h +5 -0
  204. package/React/Base/RCTRootView.m +0 -51
  205. package/React/Base/RCTTouchHandler.m +15 -1
  206. package/React/Base/RCTUIKit.h +75 -15
  207. package/React/Base/RCTUtils.m +33 -3
  208. package/React/Base/RCTVersion.m +1 -5
  209. package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm +0 -1
  210. package/React/Base/macOS/RCTPlatformDisplayLink.m +3 -1
  211. package/React/Base/macOS/RCTUIKit.m +102 -0
  212. package/React/CoreModules/RCTAlertManager.mm +1 -1
  213. package/React/CoreModules/RCTAppearance.mm +21 -5
  214. package/React/CoreModules/RCTDevLoadingView.mm +1 -1
  215. package/React/CoreModules/RCTEventDispatcher.mm +6 -1
  216. package/React/CoreModules/RCTLogBox.h +1 -1
  217. package/React/CoreModules/RCTLogBox.mm +35 -19
  218. package/React/CoreModules/RCTLogBoxView.h +8 -5
  219. package/React/CoreModules/RCTLogBoxView.mm +64 -23
  220. package/React/CoreModules/RCTPerfMonitor.mm +1 -1
  221. package/React/CoreModules/React-CoreModules.podspec +1 -1
  222. package/React/FBReactNativeSpec/FBReactNativeSpec.podspec +1 -1
  223. package/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.h +1 -1
  224. package/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.mm +3 -2
  225. package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.h +1 -1
  226. package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm +8 -8
  227. package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.h +2 -2
  228. package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.mm +3 -3
  229. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.h +2 -1
  230. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +75 -25
  231. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.h +1 -1
  232. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.mm +1 -1
  233. package/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.h +1 -1
  234. package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.h +2 -0
  235. package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm +10 -5
  236. package/React/Fabric/Mounting/ComponentViews/Root/RCTRootComponentView.h +1 -1
  237. package/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.h +1 -1
  238. package/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.mm +10 -1
  239. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.h +5 -3
  240. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm +23 -6
  241. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.h +1 -1
  242. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm +17 -1
  243. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h +6 -4
  244. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +98 -34
  245. package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.h +1 -1
  246. package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm +19 -5
  247. package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.h +1 -1
  248. package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.mm +3 -3
  249. package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.h +5 -1
  250. package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.mm +3 -1
  251. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.h +4 -2
  252. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.mm +6 -2
  253. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.h +1 -1
  254. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +21 -0
  255. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.h +1 -1
  256. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +39 -5
  257. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.h +9 -6
  258. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm +16 -4
  259. package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.h +2 -1
  260. package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.mm +6 -4
  261. package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.h +1 -1
  262. package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.mm +14 -4
  263. package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h +5 -5
  264. package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +41 -23
  265. package/React/Fabric/Mounting/RCTComponentViewClassDescriptor.h +1 -1
  266. package/React/Fabric/Mounting/RCTComponentViewDescriptor.h +2 -2
  267. package/React/Fabric/Mounting/RCTComponentViewFactory.h +1 -1
  268. package/React/Fabric/Mounting/RCTComponentViewFactory.mm +12 -3
  269. package/React/Fabric/Mounting/RCTComponentViewProtocol.h +4 -4
  270. package/React/Fabric/Mounting/RCTComponentViewRegistry.h +2 -2
  271. package/React/Fabric/Mounting/RCTComponentViewRegistry.mm +3 -1
  272. package/React/Fabric/Mounting/RCTMountingManager.h +4 -4
  273. package/React/Fabric/Mounting/RCTMountingManager.mm +30 -19
  274. package/React/Fabric/Mounting/RCTMountingManagerDelegate.h +1 -1
  275. package/React/Fabric/Mounting/RCTMountingTransactionObserverCoordinator.h +5 -3
  276. package/React/Fabric/Mounting/RCTMountingTransactionObserverCoordinator.mm +10 -8
  277. package/React/Fabric/Mounting/RCTMountingTransactionObserving.h +6 -4
  278. package/React/Fabric/Mounting/UIView+ComponentViewProtocol.h +6 -6
  279. package/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm +6 -6
  280. package/React/Fabric/RCTConversions.h +17 -7
  281. package/React/Fabric/RCTImageResponseDelegate.h +1 -1
  282. package/React/Fabric/RCTImageResponseObserverProxy.h +1 -0
  283. package/React/Fabric/RCTLocalizationProvider.h +1 -1
  284. package/React/Fabric/RCTLocalizationProvider.mm +10 -4
  285. package/React/Fabric/RCTScheduler.h +8 -1
  286. package/React/Fabric/RCTScheduler.mm +15 -0
  287. package/React/Fabric/RCTSurfacePresenter.h +10 -2
  288. package/React/Fabric/RCTSurfacePresenter.mm +59 -27
  289. package/React/Fabric/RCTSurfacePresenterBridgeAdapter.h +1 -1
  290. package/React/Fabric/RCTSurfaceRegistry.h +1 -1
  291. package/React/Fabric/RCTSurfaceTouchHandler.h +3 -3
  292. package/React/Fabric/RCTSurfaceTouchHandler.mm +8 -9
  293. package/React/Fabric/RCTTouchableComponentViewProtocol.h +1 -1
  294. package/React/Fabric/Surface/RCTFabricSurface.mm +3 -1
  295. package/React/Fabric/Utils/RCTGenericDelegateSplitter.h +1 -1
  296. package/React/Modules/RCTSurfacePresenterStub.h +4 -0
  297. package/React/Modules/RCTUIManager.m +29 -14
  298. package/React/React-RCTFabric.podspec +2 -2
  299. package/React/Views/RCTActivityIndicatorView.m +2 -1
  300. package/React/Views/RCTCursor.h +39 -0
  301. package/React/Views/RCTCursor.m +105 -0
  302. package/React/Views/RCTMaskedView.h +1 -1
  303. package/React/Views/RCTModalHostView.h +2 -2
  304. package/React/Views/RCTModalHostViewController.h +1 -1
  305. package/React/Views/RCTModalManager.h +1 -1
  306. package/React/Views/RCTSwitch.h +1 -10
  307. package/React/Views/RCTSwitch.m +0 -20
  308. package/React/Views/RCTSwitchManager.m +0 -4
  309. package/React/Views/RCTView.h +16 -0
  310. package/React/Views/RCTView.m +142 -189
  311. package/React/Views/RCTViewKeyboardEvent.h +6 -28
  312. package/React/Views/RCTViewKeyboardEvent.m +66 -61
  313. package/React/Views/RCTViewManager.m +19 -13
  314. package/React/Views/RCTWeakViewHolder.h +1 -1
  315. package/React/Views/RCTWrapperViewController.h +2 -2
  316. package/React/Views/RefreshControl/RCTRefreshControl.h +2 -2
  317. package/React/Views/RefreshControl/RCTRefreshableProtocol.h +1 -1
  318. package/React/Views/SafeAreaView/RCTSafeAreaView.h +1 -1
  319. package/React/Views/SafeAreaView/RCTSafeAreaViewLocalData.h +1 -1
  320. package/React/Views/ScrollView/RCTScrollContentView.h +4 -0
  321. package/React/Views/ScrollView/RCTScrollContentView.m +18 -0
  322. package/React/Views/ScrollView/RCTScrollContentViewManager.m +2 -0
  323. package/React/Views/ScrollView/RCTScrollView.h +2 -1
  324. package/React/Views/ScrollView/RCTScrollView.m +66 -89
  325. package/React/Views/ScrollView/RCTScrollViewManager.m +1 -1
  326. package/React/Views/ScrollView/RCTScrollableProtocol.h +1 -1
  327. package/React/Views/UIView+React.h +2 -0
  328. package/React/Views/UIView+React.m +23 -14
  329. package/ReactAndroid/gradle.properties +1 -1
  330. package/ReactAndroid/src/androidTest/js/AnimatedTransformTestModule.js +1 -2
  331. package/ReactAndroid/src/androidTest/js/Asserts.js +2 -2
  332. package/ReactAndroid/src/androidTest/js/CatalystRootViewTestModule.js +1 -1
  333. package/ReactAndroid/src/androidTest/js/JSResponderTestApp.js +1 -2
  334. package/ReactAndroid/src/androidTest/js/LayoutEventsTestApp.js +1 -2
  335. package/ReactAndroid/src/androidTest/js/MeasureLayoutTestModule.js +54 -54
  336. package/ReactAndroid/src/androidTest/js/ProgressBarTestModule.js +1 -1
  337. package/ReactAndroid/src/androidTest/js/ScrollViewTestModule.js +6 -7
  338. package/ReactAndroid/src/androidTest/js/ShareTestModule.js +1 -1
  339. package/ReactAndroid/src/androidTest/js/SubviewsClippingTestModule.js +12 -19
  340. package/ReactAndroid/src/androidTest/js/SwipeRefreshLayoutTestModule.js +2 -3
  341. package/ReactAndroid/src/androidTest/js/TestJSLocaleModule.js +2 -2
  342. package/ReactAndroid/src/androidTest/js/TestJSToJavaParametersModule.js +17 -17
  343. package/ReactAndroid/src/androidTest/js/TestJavaToJSArgumentsModule.js +10 -10
  344. package/ReactAndroid/src/androidTest/js/TestJavaToJSReturnValuesModule.js +2 -2
  345. package/ReactAndroid/src/androidTest/js/TextInputTestModule.js +2 -3
  346. package/ReactAndroid/src/androidTest/js/TouchBubblingTestAppModule.js +3 -6
  347. package/ReactAndroid/src/androidTest/js/UIManagerTestModule.js +3 -6
  348. package/ReactAndroid/src/androidTest/js/ViewRenderingTestModule.js +5 -5
  349. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/viewPropConversions.h +527 -0
  350. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -5
  351. package/ReactAndroid/src/main/jni/Application.mk +1 -1
  352. package/ReactAndroid/src/main/jni/first-party/fb/BUCK +1 -1
  353. package/ReactAndroid/src/main/jni/react/jni/Android.mk +2 -2
  354. package/ReactCommon/React-Fabric.podspec +1 -1
  355. package/ReactCommon/React-rncore.podspec +1 -1
  356. package/ReactCommon/ReactCommon.podspec +1 -1
  357. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -5
  358. package/ReactCommon/cxxreact/tests/BUCK +1 -1
  359. package/ReactCommon/hermes/inspector/tools/msggen/src/HeaderWriter.js +1 -1
  360. package/ReactCommon/hermes/inspector/tools/msggen/src/index.js +1 -1
  361. package/ReactCommon/hermes/inspector/tools/msggen/yarn.lock +3 -3
  362. package/ReactCommon/microprofiler/BUCK +1 -1
  363. package/ReactCommon/react/debug/react_native_assert.h +1 -1
  364. package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp +6 -6
  365. package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.h +4 -3
  366. package/ReactCommon/react/renderer/animations/conversions.h +11 -11
  367. package/ReactCommon/react/renderer/animations/tests/LayoutAnimationTest.cpp +1 -1
  368. package/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp +16 -16
  369. package/ReactCommon/react/renderer/attributedstring/TextAttributes.h +14 -14
  370. package/ReactCommon/react/renderer/attributedstring/conversions.h +1 -1
  371. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm +5 -0
  372. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h +3 -3
  373. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm +7 -5
  374. package/ReactCommon/react/renderer/components/text/ParagraphShadowNode.h +1 -1
  375. package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h +1 -1
  376. package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.cpp +1 -1
  377. package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.h +1 -1
  378. package/ReactCommon/react/renderer/components/textinput/iostextinput/primitives.h +3 -4
  379. package/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h +6 -6
  380. package/ReactCommon/react/renderer/components/view/ViewProps.h +3 -1
  381. package/ReactCommon/react/renderer/components/view/ViewPropsInterpolation.h +3 -3
  382. package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +16 -16
  383. package/ReactCommon/react/renderer/components/view/conversions.h +5 -6
  384. package/ReactCommon/react/renderer/components/view/primitives.h +4 -3
  385. package/ReactCommon/react/renderer/components/view/propsConversions.h +2 -0
  386. package/ReactCommon/react/renderer/core/ComponentDescriptor.h +5 -5
  387. package/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h +7 -7
  388. package/ReactCommon/react/renderer/core/ConcreteShadowNode.h +2 -2
  389. package/ReactCommon/react/renderer/core/EventDispatcher.cpp +21 -0
  390. package/ReactCommon/react/renderer/core/EventDispatcher.h +15 -0
  391. package/ReactCommon/react/renderer/core/EventListener.cpp +39 -0
  392. package/ReactCommon/react/renderer/core/EventListener.h +44 -0
  393. package/ReactCommon/react/renderer/core/Props.h +0 -4
  394. package/ReactCommon/react/renderer/core/RawProps.h +1 -1
  395. package/ReactCommon/react/renderer/core/ShadowNode.cpp +2 -2
  396. package/ReactCommon/react/renderer/core/ShadowNode.h +5 -5
  397. package/ReactCommon/react/renderer/core/propsConversions.h +6 -5
  398. package/ReactCommon/react/renderer/core/tests/ComponentDescriptorTest.cpp +3 -3
  399. package/ReactCommon/react/renderer/debug/debugStringConvertibleUtils.h +3 -3
  400. package/ReactCommon/react/renderer/graphics/React-graphics.podspec +1 -1
  401. package/ReactCommon/react/renderer/graphics/platform/ios/Color.h +1 -1
  402. package/ReactCommon/react/renderer/graphics/platform/ios/RCTPlatformColorUtils.mm +9 -9
  403. package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImageManager.h +1 -1
  404. package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImagePrimitivesConversions.h +1 -1
  405. package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTSyncImageManager.h +1 -1
  406. package/ReactCommon/react/renderer/mounting/MountingCoordinator.cpp +2 -2
  407. package/ReactCommon/react/renderer/mounting/MountingCoordinator.h +3 -3
  408. package/ReactCommon/react/renderer/mounting/MountingOverrideDelegate.h +1 -1
  409. package/ReactCommon/react/renderer/mounting/ShadowTreeRevision.h +0 -2
  410. package/ReactCommon/react/renderer/mounting/StubView.h +1 -1
  411. package/ReactCommon/react/renderer/mounting/StubViewTree.cpp +1 -1
  412. package/ReactCommon/react/renderer/mounting/TelemetryController.cpp +6 -9
  413. package/ReactCommon/react/renderer/mounting/TelemetryController.h +7 -7
  414. package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +3 -2
  415. package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h +7 -1
  416. package/ReactCommon/react/renderer/runtimescheduler/Task.h +3 -2
  417. package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +19 -2
  418. package/ReactCommon/react/renderer/scheduler/Scheduler.h +10 -1
  419. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/NSTextStorage+FontScaling.h +1 -1
  420. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.h +1 -1
  421. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm +15 -15
  422. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontProperties.h +1 -1
  423. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontUtils.h +1 -1
  424. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextLayoutManager.h +1 -1
  425. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextLayoutManager.mm +5 -0
  426. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextPrimitivesConversions.h +6 -6
  427. package/ReactCommon/react/utils/ContextContainer.h +2 -2
  428. package/ReactCommon/react/utils/ManagedObjectWrapper.h +1 -1
  429. package/ReactCommon/react/utils/ManagedObjectWrapper.mm +1 -3
  430. package/ReactCommon/react/utils/SimpleThreadSafeCache.h +2 -2
  431. package/ReactCommon/yoga/Yoga.podspec +1 -1
  432. package/index.js +0 -11
  433. package/jest/assetFileTransformer.js +2 -2
  434. package/jest/preprocessor.js +2 -2
  435. package/jest/setup.js +3 -3
  436. package/local-cli/generator-macos/templates/macos/HelloWorld-macOS/ViewController.m +1 -1
  437. package/package.json +25 -25
  438. package/scripts/generate-artifacts.js +21 -17
  439. package/scripts/react_native_pods.rb +1 -4
  440. package/template/App.js +4 -8
  441. package/template/Gemfile.lock +8 -8
  442. package/template/android/gradlew.bat +89 -89
  443. package/template/ios/HelloWorldTests/HelloWorldTests.m +1 -0
  444. package/template/package.json +1 -1
  445. package/Libraries/Alert/AlertMacOS.js +0 -211
  446. package/Libraries/Types/RootTagTypes.js~merged +0 -23
  447. package/ReactCommon/butter/optional.h +0 -38
  448. package/ReactCommon/react/renderer/mounting/MountingTransactionMetadata.h +0 -32
  449. package/third-party-podspecs/boost-for-react-native.podspec +0 -20
@@ -8,6 +8,7 @@
8
8
  #import "RCTViewComponentView.h"
9
9
 
10
10
  #import <CoreGraphics/CoreGraphics.h>
11
+ #import <QuartzCore/QuartzCore.h>
11
12
  #import <objc/runtime.h>
12
13
 
13
14
  #import <React/RCTAssert.h>
@@ -20,12 +21,12 @@
20
21
  using namespace facebook::react;
21
22
 
22
23
  @implementation RCTViewComponentView {
23
- UIColor *_backgroundColor;
24
+ RCTUIColor *_backgroundColor; // TODO(macOS GH#774)
24
25
  CALayer *_borderLayer;
25
26
  BOOL _needsInvalidateLayer;
26
27
  BOOL _isJSResponder;
27
28
  BOOL _removeClippedSubviews;
28
- NSMutableArray<UIView *> *_reactSubviews;
29
+ NSMutableArray<RCTUIView *> *_reactSubviews; // TODO(macOS GH#774)
29
30
  NSSet<NSString *> *_Nullable _propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN;
30
31
  }
31
32
 
@@ -37,17 +38,19 @@ using namespace facebook::react;
37
38
  static auto const defaultProps = std::make_shared<ViewProps const>();
38
39
  _props = defaultProps;
39
40
  _reactSubviews = [NSMutableArray new];
41
+ #if !TARGET_OS_OSX // TODO(macOS GH#774)
40
42
  self.multipleTouchEnabled = YES;
43
+ #endif // TODO(macOS GH#774)
41
44
  }
42
45
  return self;
43
46
  }
44
47
 
45
- - (facebook::react::SharedProps)props
48
+ - (facebook::react::Props::Shared)props
46
49
  {
47
50
  return _props;
48
51
  }
49
52
 
50
- - (void)setContentView:(UIView *)contentView
53
+ - (void)setContentView:(RCTUIView *)contentView // TODO(macOS GH#774)
51
54
  {
52
55
  if (_contentView) {
53
56
  [_contentView removeFromSuperview];
@@ -70,12 +73,12 @@ using namespace facebook::react;
70
73
  return CGRectContainsPoint(hitFrame, point);
71
74
  }
72
75
 
73
- - (UIColor *)backgroundColor
76
+ - (RCTUIColor *)backgroundColor // TODO(macOS GH#774)
74
77
  {
75
78
  return _backgroundColor;
76
79
  }
77
80
 
78
- - (void)setBackgroundColor:(UIColor *)backgroundColor
81
+ - (void)setBackgroundColor:(RCTUIColor *)backgroundColor // TODO(macOS GH#774)
79
82
  {
80
83
  _backgroundColor = backgroundColor;
81
84
  }
@@ -91,7 +94,7 @@ using namespace facebook::react;
91
94
  return concreteComponentDescriptorProvider<ViewComponentDescriptor>();
92
95
  }
93
96
 
94
- - (void)mountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
97
+ - (void)mountChildComponentView:(RCTUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index // TODO(macOS GH#774)
95
98
  {
96
99
  RCTAssert(
97
100
  childComponentView.superview == nil,
@@ -108,7 +111,7 @@ using namespace facebook::react;
108
111
  }
109
112
  }
110
113
 
111
- - (void)unmountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
114
+ - (void)unmountChildComponentView:(RCTUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index // TODO(macOS GH#774)
112
115
  {
113
116
  if (_removeClippedSubviews) {
114
117
  [_reactSubviews removeObjectAtIndex:index];
@@ -132,7 +135,7 @@ using namespace facebook::react;
132
135
  [childComponentView removeFromSuperview];
133
136
  }
134
137
 
135
- - (void)updateClippedSubviewsWithClipRect:(CGRect)clipRect relativeToView:(UIView *)clipView
138
+ - (void)updateClippedSubviewsWithClipRect:(CGRect)clipRect relativeToView:(RCTUIView *)clipView // TODO(macOS GH#774)
136
139
  {
137
140
  if (!_removeClippedSubviews) {
138
141
  // Use default behavior if unmounting is disabled
@@ -153,7 +156,7 @@ using namespace facebook::react;
153
156
  clipRect = [clipView convertRect:clipRect toView:self];
154
157
 
155
158
  // Mount / unmount views
156
- for (UIView *view in _reactSubviews) {
159
+ for (RCTUIView *view in _reactSubviews) { // TODO(macOS GH#774)
157
160
  if (CGRectIntersectsRect(clipRect, view.frame)) {
158
161
  // View is at least partially visible, so remount it if unmounted
159
162
  [self addSubview:view];
@@ -202,13 +205,13 @@ using namespace facebook::react;
202
205
 
203
206
  // `backgroundColor`
204
207
  if (oldViewProps.backgroundColor != newViewProps.backgroundColor) {
205
- self.backgroundColor = RCTUIColorFromSharedColor(newViewProps.backgroundColor);
208
+ self.backgroundColor = RCTUIColorFromSharedColor(newViewProps.backgroundColor); // TODO(macOS GH#774)
206
209
  needsInvalidateLayer = YES;
207
210
  }
208
211
 
209
212
  // `foregroundColor`
210
213
  if (oldViewProps.foregroundColor != newViewProps.foregroundColor) {
211
- self.foregroundColor = RCTUIColorFromSharedColor(newViewProps.foregroundColor);
214
+ self.foregroundColor = RCTUIColorFromSharedColor(newViewProps.foregroundColor); // TODO(macOS GH#774)
212
215
  }
213
216
 
214
217
  // `shadowColor`
@@ -245,7 +248,11 @@ using namespace facebook::react;
245
248
  // `shouldRasterize`
246
249
  if (oldViewProps.shouldRasterize != newViewProps.shouldRasterize) {
247
250
  self.layer.shouldRasterize = newViewProps.shouldRasterize;
251
+ #if !TARGET_OS_OSX // TODO(macOS GH#774)
248
252
  self.layer.rasterizationScale = newViewProps.shouldRasterize ? [UIScreen mainScreen].scale : 1.0;
253
+ #else // [TODO(macOS GH#774)
254
+ self.layer.rasterizationScale = 1.0;
255
+ #endif // ]TODO(macOS GH#774)
249
256
  }
250
257
 
251
258
  // `pointerEvents`
@@ -286,6 +293,7 @@ using namespace facebook::react;
286
293
  self.nativeId = RCTNSStringFromStringNilIfEmpty(newViewProps.nativeId);
287
294
  }
288
295
 
296
+ #if !TARGET_OS_OSX // TODO(macOS GH#774)
289
297
  // `accessible`
290
298
  if (oldViewProps.accessible != newViewProps.accessible) {
291
299
  self.accessibilityElement.isAccessibilityElement = newViewProps.accessible;
@@ -335,12 +343,12 @@ using namespace facebook::react;
335
343
 
336
344
  // `accessibilityValue`
337
345
  if (oldViewProps.accessibilityValue != newViewProps.accessibilityValue) {
338
- if (newViewProps.accessibilityValue.text.hasValue()) {
346
+ if (newViewProps.accessibilityValue.text.has_value()) {
339
347
  self.accessibilityElement.accessibilityValue =
340
348
  RCTNSStringFromStringNilIfEmpty(newViewProps.accessibilityValue.text.value());
341
349
  } else if (
342
- newViewProps.accessibilityValue.now.hasValue() && newViewProps.accessibilityValue.min.hasValue() &&
343
- newViewProps.accessibilityValue.max.hasValue()) {
350
+ newViewProps.accessibilityValue.now.has_value() && newViewProps.accessibilityValue.min.has_value() &&
351
+ newViewProps.accessibilityValue.max.has_value()) {
344
352
  CGFloat val = (CGFloat)(newViewProps.accessibilityValue.now.value()) /
345
353
  (newViewProps.accessibilityValue.max.value() - newViewProps.accessibilityValue.min.value());
346
354
  self.accessibilityElement.accessibilityValue =
@@ -350,6 +358,7 @@ using namespace facebook::react;
350
358
  self.accessibilityElement.accessibilityValue = nil;
351
359
  }
352
360
  }
361
+ #endif // TODO(macOS GH#774)
353
362
 
354
363
  // `testId`
355
364
  if (oldViewProps.testId != newViewProps.testId) {
@@ -437,7 +446,7 @@ using namespace facebook::react;
437
446
  return _propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN;
438
447
  }
439
448
 
440
- - (UIView *)betterHitTest:(CGPoint)point withEvent:(UIEvent *)event
449
+ - (RCTUIView *)betterHitTest:(CGPoint)point withEvent:(UIEvent *)event // TODO(macOS GH#774)
441
450
  {
442
451
  // This is a classic textbook implementation of `hitTest:` with a couple of improvements:
443
452
  // * It does not stop algorithm if some touch is outside the view
@@ -459,8 +468,8 @@ using namespace facebook::react;
459
468
  return nil;
460
469
  }
461
470
 
462
- for (UIView *subview in [self.subviews reverseObjectEnumerator]) {
463
- UIView *hitView = [subview hitTest:[subview convertPoint:point fromView:self] withEvent:event];
471
+ for (RCTUIView *subview in [self.subviews reverseObjectEnumerator]) { // TODO(macOS GH#774)
472
+ RCTUIView *hitView = [subview hitTest:[subview convertPoint:point fromView:self] withEvent:event]; // TODO(macOS GH#774)
464
473
  if (hitView) {
465
474
  return hitView;
466
475
  }
@@ -469,7 +478,7 @@ using namespace facebook::react;
469
478
  return isPointInside ? self : nil;
470
479
  }
471
480
 
472
- - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event
481
+ - (RCTUIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event // TODO(macOS GH#774)
473
482
  {
474
483
  switch (_props->pointerEvents) {
475
484
  case PointerEventsMode::Auto:
@@ -479,7 +488,7 @@ using namespace facebook::react;
479
488
  case PointerEventsMode::BoxOnly:
480
489
  return [self pointInside:point withEvent:event] ? self : nil;
481
490
  case PointerEventsMode::BoxNone:
482
- UIView *view = [self betterHitTest:point withEvent:event];
491
+ RCTUIView *view = [self betterHitTest:point withEvent:event]; // TODO(macOS GH#774)
483
492
  return view != self ? view : nil;
484
493
  }
485
494
  }
@@ -591,6 +600,12 @@ static RCTBorderStyle RCTBorderStyleFromBorderStyle(BorderStyle borderStyle)
591
600
 
592
601
  RCTBorderColors borderColors = RCTCreateRCTBorderColorsFromBorderColors(borderMetrics.borderColors);
593
602
 
603
+ #if TARGET_OS_OSX // [TODO(macOS GH#774)
604
+ CGFloat scaleFactor = self.window.backingScaleFactor;
605
+ #else
606
+ // On iOS setting the scaleFactor to 0.0 will default to the device's native scale factor.
607
+ CGFloat scaleFactor = 0.0;
608
+ #endif // ]TODO(macOS GH#774)
594
609
  UIImage *image = RCTGetBorderImage(
595
610
  RCTBorderStyleFromBorderStyle(borderMetrics.borderStyles.left),
596
611
  layer.bounds.size,
@@ -598,7 +613,8 @@ static RCTBorderStyle RCTBorderStyleFromBorderStyle(BorderStyle borderStyle)
598
613
  RCTUIEdgeInsetsFromEdgeInsets(borderMetrics.borderWidths),
599
614
  borderColors,
600
615
  _backgroundColor.CGColor,
601
- self.clipsToBounds);
616
+ self.clipsToBounds,
617
+ scaleFactor); // TODO(macOS GH#774)
602
618
 
603
619
  RCTReleaseRCTBorderColors(borderColors);
604
620
 
@@ -654,10 +670,10 @@ static RCTBorderStyle RCTBorderStyleFromBorderStyle(BorderStyle borderStyle)
654
670
  return self;
655
671
  }
656
672
 
657
- static NSString *RCTRecursiveAccessibilityLabel(UIView *view)
673
+ static NSString *RCTRecursiveAccessibilityLabel(RCTUIView *view) // TODO(macOS GH#774)
658
674
  {
659
675
  NSMutableString *result = [NSMutableString stringWithString:@""];
660
- for (UIView *subview in view.subviews) {
676
+ for (RCTUIView *subview in view.subviews) { // TODO(macOS GH#774)
661
677
  NSString *label = subview.accessibilityLabel;
662
678
  if (!label) {
663
679
  label = RCTRecursiveAccessibilityLabel(subview);
@@ -687,6 +703,7 @@ static NSString *RCTRecursiveAccessibilityLabel(UIView *view)
687
703
  auto const &props = *std::static_pointer_cast<ViewProps const>(_props);
688
704
 
689
705
  // Handle Switch.
706
+ #if !TARGET_OS_OSX // TODO(macOS GH#774)
690
707
  if ((self.accessibilityTraits & AccessibilityTraitSwitch) == AccessibilityTraitSwitch) {
691
708
  if (props.accessibilityState.checked == AccessibilityState::Checked) {
692
709
  return @"1";
@@ -694,6 +711,7 @@ static NSString *RCTRecursiveAccessibilityLabel(UIView *view)
694
711
  return @"0";
695
712
  }
696
713
  }
714
+ #endif // TODO(macOS GH#774)
697
715
 
698
716
  // Handle states which haven't already been handled.
699
717
  if (props.accessibilityState.checked == AccessibilityState::Checked) {
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTComponentViewProtocol.h>
11
11
 
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTComponentViewProtocol.h>
11
11
 
@@ -21,7 +21,7 @@ class RCTComponentViewDescriptor final {
21
21
  /*
22
22
  * Associated (and owned) native view instance.
23
23
  */
24
- __strong UIView<RCTComponentViewProtocol> *view = nil;
24
+ __strong RCTUIView<RCTComponentViewProtocol> *view = nil; // TODO(macOS GH#774)
25
25
 
26
26
  /*
27
27
  * Indicates a requirement to call on the view methods from
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTComponentViewDescriptor.h>
11
11
  #import <React/RCTComponentViewProtocol.h>
@@ -95,9 +95,9 @@ static Class<RCTComponentViewProtocol> RCTComponentViewClassWithName(const char
95
95
  {
96
96
  .viewClass = viewClass,
97
97
  .observesMountingTransactionWillMount =
98
- (bool)class_respondsToSelector(viewClass, @selector(mountingTransactionWillMountWithMetadata:)),
98
+ (bool)class_respondsToSelector(viewClass, @selector(mountingTransactionWillMount:withSurfaceTelemetry:)),
99
99
  .observesMountingTransactionDidMount =
100
- (bool)class_respondsToSelector(viewClass, @selector(mountingTransactionDidMountWithMetadata:)),
100
+ (bool)class_respondsToSelector(viewClass, @selector(mountingTransactionDidMount:withSurfaceTelemetry:)),
101
101
  };
102
102
  #pragma clang diagnostic pop
103
103
  }
@@ -117,7 +117,16 @@ static Class<RCTComponentViewProtocol> RCTComponentViewClassWithName(const char
117
117
  }
118
118
 
119
119
  // Fallback 2: Try to use Paper Interop.
120
- if ([RCTLegacyViewManagerInteropComponentView isSupported:RCTNSStringFromString(name)]) {
120
+ NSString *componentNameString = RCTNSStringFromString(name);
121
+ if ([RCTLegacyViewManagerInteropComponentView isSupported:componentNameString]) {
122
+ RCTLogNewArchitectureValidation(
123
+ RCTNotAllowedInBridgeless,
124
+ self,
125
+ [NSString
126
+ stringWithFormat:
127
+ @"Legacy ViewManagers should be migrated to Fabric ComponentViews in the new architecture to reduce risk. Component using interop layer: %@",
128
+ componentNameString]);
129
+
121
130
  auto flavor = std::make_shared<std::string const>(name);
122
131
  auto componentName = ComponentName{flavor->c_str()};
123
132
  auto componentHandle = reinterpret_cast<ComponentHandle>(componentName);
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <react/renderer/componentregistry/ComponentDescriptorProvider.h>
11
11
  #import <react/renderer/core/EventEmitter.h>
@@ -54,14 +54,14 @@ typedef NS_OPTIONS(NSInteger, RNComponentViewUpdateMask) {
54
54
  * component view.
55
55
  * Receiver must add `childComponentView` as a subview.
56
56
  */
57
- - (void)mountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index;
57
+ - (void)mountChildComponentView:(RCTUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index; // TODO(macOS GH#774)
58
58
 
59
59
  /*
60
60
  * Called for unmounting (detaching) a child component view from `self`
61
61
  * component view.
62
62
  * Receiver must remove `childComponentView` as a subview.
63
63
  */
64
- - (void)unmountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index;
64
+ - (void)unmountChildComponentView:(RCTUIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index; // TODO(macOS GH#774)
65
65
 
66
66
  /*
67
67
  * Called for updating component's props.
@@ -114,7 +114,7 @@ typedef NS_OPTIONS(NSInteger, RNComponentViewUpdateMask) {
114
114
  /*
115
115
  * Read the last props used to update the view.
116
116
  */
117
- - (facebook::react::SharedProps)props;
117
+ - (facebook::react::Props::Shared)props;
118
118
 
119
119
  - (BOOL)isJSResponder;
120
120
  - (void)setIsJSResponder:(BOOL)isJSResponder;
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTComponentViewDescriptor.h>
11
11
  #import <React/RCTComponentViewFactory.h>
@@ -48,7 +48,7 @@ NS_ASSUME_NONNULL_BEGIN
48
48
  * Finds a native component view by given `tag`.
49
49
  * Returns `nil` if there is no registered component with the `tag`.
50
50
  */
51
- - (nullable UIView<RCTComponentViewProtocol> *)findComponentViewWithTag:(facebook::react::Tag)tag;
51
+ - (nullable RCTUIView<RCTComponentViewProtocol> *)findComponentViewWithTag:(facebook::react::Tag)tag; // TODO(macOS GH#774)
52
52
 
53
53
  /**
54
54
  * Creates a component view with a given type and puts it to the recycle pool.
@@ -31,10 +31,12 @@ const NSInteger RCTComponentViewRegistryRecyclePoolMaxSize = 1024;
31
31
  if (self = [super init]) {
32
32
  _componentViewFactory = [RCTComponentViewFactory currentComponentViewFactory];
33
33
 
34
+ #if !TARGET_OS_OSX // [TODO(macOS GH#774)
34
35
  [[NSNotificationCenter defaultCenter] addObserver:self
35
36
  selector:@selector(handleApplicationDidReceiveMemoryWarningNotification)
36
37
  name:UIApplicationDidReceiveMemoryWarningNotification
37
38
  object:nil];
39
+ #endif // ]TODO(macOS GH#774)
38
40
 
39
41
  dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
40
42
  // Calling this a bit later, when the main thread is probably idle while JavaScript thread is busy.
@@ -116,7 +118,7 @@ const NSInteger RCTComponentViewRegistryRecyclePoolMaxSize = 1024;
116
118
  return iterator->second;
117
119
  }
118
120
 
119
- - (nullable UIView<RCTComponentViewProtocol> *)findComponentViewWithTag:(Tag)tag
121
+ - (nullable RCTUIView<RCTComponentViewProtocol> *)findComponentViewWithTag:(Tag)tag // TODO(macOS GH#774)
120
122
  {
121
123
  RCTAssertMainQueue();
122
124
  auto iterator = _registry.find(tag);
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTMountingManagerDelegate.h>
11
11
  #import <React/RCTPrimitives.h>
@@ -36,12 +36,12 @@ NS_ASSUME_NONNULL_BEGIN
36
36
  * influence the intrinsic size of the view and cannot be measured using UIView/UIKit layout API.
37
37
  * Must be called on the main thead.
38
38
  */
39
- - (void)attachSurfaceToView:(UIView *)view surfaceId:(facebook::react::SurfaceId)surfaceId;
39
+ - (void)attachSurfaceToView:(RCTUIView *)view surfaceId:(facebook::react::SurfaceId)surfaceId; // TODO(macOS GH#774)
40
40
 
41
41
  /**
42
42
  * Stops designating the view as a rendering viewport of a React Native surface.
43
43
  */
44
- - (void)detachSurfaceFromView:(UIView *)view surfaceId:(facebook::react::SurfaceId)surfaceId;
44
+ - (void)detachSurfaceFromView:(RCTUIView *)view surfaceId:(facebook::react::SurfaceId)surfaceId; // TODO(macOS GH#774)
45
45
 
46
46
  /**
47
47
  * Schedule a mounting transaction to be performed on the main thread.
@@ -63,7 +63,7 @@ NS_ASSUME_NONNULL_BEGIN
63
63
 
64
64
  - (void)setIsJSResponder:(BOOL)isJSResponder
65
65
  blockNativeResponder:(BOOL)blockNativeResponder
66
- forShadowView:(facebook::react::ShadowView)shadowView;
66
+ forShadowView:(facebook::react::ShadowView const &)shadowView;
67
67
 
68
68
  - (void)synchronouslyUpdateViewOnUIThread:(ReactTag)reactTag
69
69
  changedProps:(NSDictionary *)props
@@ -7,6 +7,7 @@
7
7
 
8
8
  #import "RCTMountingManager.h"
9
9
 
10
+ #import <QuartzCore/QuartzCore.h>
10
11
  #import <butter/map.h>
11
12
 
12
13
  #import <React/RCTAssert.h>
@@ -14,6 +15,7 @@
14
15
  #import <React/RCTFollyConvert.h>
15
16
  #import <React/RCTLog.h>
16
17
  #import <React/RCTUtils.h>
18
+ #import <react/config/ReactNativeConfig.h>
17
19
  #import <react/renderer/components/root/RootShadowNode.h>
18
20
  #import <react/renderer/core/LayoutableShadowNode.h>
19
21
  #import <react/renderer/core/RawProps.h>
@@ -27,7 +29,7 @@
27
29
 
28
30
  using namespace facebook::react;
29
31
 
30
- static SurfaceId RCTSurfaceIdForView(UIView *view)
32
+ static SurfaceId RCTSurfaceIdForView(RCTUIView *view) // TODO(macOS GH#774)
31
33
  {
32
34
  do {
33
35
  if (RCTIsReactRootView(@(view.tag))) {
@@ -79,7 +81,7 @@ static void RCTPerformMountInstructions(
79
81
  auto &newChildViewDescriptor = [registry componentViewDescriptorWithTag:newChildShadowView.tag];
80
82
  auto &parentViewDescriptor = [registry componentViewDescriptorWithTag:parentShadowView.tag];
81
83
 
82
- UIView<RCTComponentViewProtocol> *newChildComponentView = newChildViewDescriptor.view;
84
+ RCTUIView<RCTComponentViewProtocol> *newChildComponentView = newChildViewDescriptor.view; // TODO(macOS GH#774)
83
85
 
84
86
  RCTAssert(newChildShadowView.props, @"`newChildShadowView.props` must not be null.");
85
87
 
@@ -107,7 +109,7 @@ static void RCTPerformMountInstructions(
107
109
  auto &oldChildShadowView = mutation.oldChildShadowView;
108
110
  auto &newChildShadowView = mutation.newChildShadowView;
109
111
  auto &newChildViewDescriptor = [registry componentViewDescriptorWithTag:newChildShadowView.tag];
110
- UIView<RCTComponentViewProtocol> *newChildComponentView = newChildViewDescriptor.view;
112
+ RCTUIView<RCTComponentViewProtocol> *newChildComponentView = newChildViewDescriptor.view; // TODO(macOS GH#774)
111
113
 
112
114
  auto mask = RNComponentViewUpdateMask{};
113
115
 
@@ -166,7 +168,7 @@ static void RCTPerformMountInstructions(
166
168
  _contextContainer = contextContainer;
167
169
  }
168
170
 
169
- - (void)attachSurfaceToView:(UIView *)view surfaceId:(SurfaceId)surfaceId
171
+ - (void)attachSurfaceToView:(RCTUIView *)view surfaceId:(SurfaceId)surfaceId // TODO(macOS GH#774)
170
172
  {
171
173
  RCTAssertMainQueue();
172
174
 
@@ -177,7 +179,7 @@ static void RCTPerformMountInstructions(
177
179
  [view addSubview:rootViewDescriptor.view];
178
180
  }
179
181
 
180
- - (void)detachSurfaceFromView:(UIView *)view surfaceId:(SurfaceId)surfaceId
182
+ - (void)detachSurfaceFromView:(RCTUIView *)view surfaceId:(SurfaceId)surfaceId // TODO(macOS GH#774)
181
183
  {
182
184
  RCTAssertMainQueue();
183
185
  RCTComponentViewDescriptor rootViewDescriptor = [_componentViewRegistry componentViewDescriptorWithTag:surfaceId];
@@ -265,26 +267,28 @@ static void RCTPerformMountInstructions(
265
267
  auto surfaceId = mountingCoordinator->getSurfaceId();
266
268
 
267
269
  mountingCoordinator->getTelemetryController().pullTransaction(
268
- [&](MountingTransactionMetadata metadata) {
270
+ [&](MountingTransaction const &transaction, SurfaceTelemetry const &surfaceTelemetry) {
269
271
  [self.delegate mountingManager:self willMountComponentsWithRootTag:surfaceId];
270
- _observerCoordinator.notifyObserversMountingTransactionWillMount(metadata);
272
+ _observerCoordinator.notifyObserversMountingTransactionWillMount(transaction, surfaceTelemetry);
271
273
  },
272
- [&](ShadowViewMutationList const &mutations) {
273
- RCTPerformMountInstructions(mutations, _componentViewRegistry, _observerCoordinator, surfaceId);
274
+ [&](MountingTransaction const &transaction, SurfaceTelemetry const &surfaceTelemetry) {
275
+ RCTPerformMountInstructions(
276
+ transaction.getMutations(), _componentViewRegistry, _observerCoordinator, surfaceId);
274
277
  },
275
- [&](MountingTransactionMetadata metadata) {
276
- _observerCoordinator.notifyObserversMountingTransactionDidMount(metadata);
278
+ [&](MountingTransaction const &transaction, SurfaceTelemetry const &surfaceTelemetry) {
279
+ _observerCoordinator.notifyObserversMountingTransactionDidMount(transaction, surfaceTelemetry);
277
280
  [self.delegate mountingManager:self didMountComponentsWithRootTag:surfaceId];
278
281
  });
279
282
  }
280
283
 
281
284
  - (void)setIsJSResponder:(BOOL)isJSResponder
282
285
  blockNativeResponder:(BOOL)blockNativeResponder
283
- forShadowView:(facebook::react::ShadowView)shadowView
286
+ forShadowView:(facebook::react::ShadowView const &)shadowView
284
287
  {
288
+ ReactTag reactTag = shadowView.tag;
285
289
  RCTExecuteOnMainQueue(^{
286
- UIView<RCTComponentViewProtocol> *componentView =
287
- [self->_componentViewRegistry findComponentViewWithTag:shadowView.tag];
290
+ RCTUIView<RCTComponentViewProtocol> *componentView =
291
+ [self->_componentViewRegistry findComponentViewWithTag:reactTag]; // TODO(macOS GH#774)
288
292
  [componentView setIsJSResponder:isJSResponder];
289
293
  });
290
294
  }
@@ -294,10 +298,10 @@ static void RCTPerformMountInstructions(
294
298
  componentDescriptor:(const ComponentDescriptor &)componentDescriptor
295
299
  {
296
300
  RCTAssertMainQueue();
297
- UIView<RCTComponentViewProtocol> *componentView = [_componentViewRegistry findComponentViewWithTag:reactTag];
301
+ RCTUIView<RCTComponentViewProtocol> *componentView = [_componentViewRegistry findComponentViewWithTag:reactTag]; // TODO(macOS GH#774)
298
302
  SurfaceId surfaceId = RCTSurfaceIdForView(componentView);
299
- SharedProps oldProps = [componentView props];
300
- SharedProps newProps = componentDescriptor.cloneProps(
303
+ Props::Shared oldProps = [componentView props];
304
+ Props::Shared newProps = componentDescriptor.cloneProps(
301
305
  PropsParserContext{surfaceId, *_contextContainer.get()}, oldProps, RawProps(convertIdToFollyDynamic(props)));
302
306
 
303
307
  NSSet<NSString *> *propKeys = componentView.propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN ?: [NSSet new];
@@ -316,6 +320,11 @@ static void RCTPerformMountInstructions(
316
320
  if (props[@"opacity"] && componentView.layer.opacity != (float)newViewProps.opacity) {
317
321
  componentView.layer.opacity = newViewProps.opacity;
318
322
  }
323
+
324
+ auto reactNativeConfig = _contextContainer->at<std::shared_ptr<ReactNativeConfig const>>("ReactNativeConfig");
325
+ if (reactNativeConfig && reactNativeConfig->getBool("react_fabric:finalize_updates_on_synchronous_update_view_ios")) {
326
+ [componentView finalizeUpdates:RNComponentViewUpdateMaskProps];
327
+ }
319
328
  }
320
329
 
321
330
  - (void)synchronouslyDispatchCommandOnUIThread:(ReactTag)reactTag
@@ -323,15 +332,17 @@ static void RCTPerformMountInstructions(
323
332
  args:(NSArray *)args
324
333
  {
325
334
  RCTAssertMainQueue();
326
- UIView<RCTComponentViewProtocol> *componentView = [_componentViewRegistry findComponentViewWithTag:reactTag];
335
+ RCTUIView<RCTComponentViewProtocol> *componentView = [_componentViewRegistry findComponentViewWithTag:reactTag]; // TODO(macOS GH#774)
327
336
  [componentView handleCommand:commandName args:args];
328
337
  }
329
338
 
330
339
  - (void)synchronouslyDispatchAccessbilityEventOnUIThread:(ReactTag)reactTag eventType:(NSString *)eventType
331
340
  {
332
341
  if ([@"focus" isEqualToString:eventType]) {
333
- UIView<RCTComponentViewProtocol> *componentView = [_componentViewRegistry findComponentViewWithTag:reactTag];
342
+ RCTUIView<RCTComponentViewProtocol> *componentView = [_componentViewRegistry findComponentViewWithTag:reactTag]; // TODO(macOS GH#774)
343
+ #if !TARGET_OS_OSX // TODO(macOS GH#774)
334
344
  UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, componentView);
345
+ #endif // TODO(macOS GH#774)
335
346
  }
336
347
  }
337
348
 
@@ -5,7 +5,7 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #import <UIKit/UIKit.h>
8
+ #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
9
 
10
10
  #import <React/RCTPrimitives.h>
11
11
 
@@ -11,7 +11,7 @@
11
11
  #import <butter/map.h>
12
12
  #import <butter/set.h>
13
13
 
14
- #import <react/renderer/mounting/MountingTransactionMetadata.h>
14
+ #include <react/renderer/mounting/MountingTransaction.h>
15
15
 
16
16
  class RCTMountingTransactionObserverCoordinator final {
17
17
  public:
@@ -31,9 +31,11 @@ class RCTMountingTransactionObserverCoordinator final {
31
31
  * To be called from `RCTMountingManager`.
32
32
  */
33
33
  void notifyObserversMountingTransactionWillMount(
34
- facebook::react::MountingTransactionMetadata const &metadata) const;
34
+ facebook::react::MountingTransaction const &transaction,
35
+ facebook::react::SurfaceTelemetry const &surfaceTelemetry) const;
35
36
  void notifyObserversMountingTransactionDidMount(
36
- facebook::react::MountingTransactionMetadata const &metadata) const;
37
+ facebook::react::MountingTransaction const &transaction,
38
+ facebook::react::SurfaceTelemetry const &surfaceTelemetry) const;
37
39
 
38
40
  private:
39
41
  facebook::butter::map<
@@ -40,9 +40,10 @@ void RCTMountingTransactionObserverCoordinator::unregisterViewComponentDescripto
40
40
  }
41
41
 
42
42
  void RCTMountingTransactionObserverCoordinator::notifyObserversMountingTransactionWillMount(
43
- MountingTransactionMetadata const &metadata) const
43
+ MountingTransaction const &transaction,
44
+ SurfaceTelemetry const &surfaceTelemetry) const
44
45
  {
45
- auto surfaceId = metadata.surfaceId;
46
+ auto surfaceId = transaction.getSurfaceId();
46
47
  auto surfaceRegistryIterator = registry_.find(surfaceId);
47
48
  if (surfaceRegistryIterator == registry_.end()) {
48
49
  return;
@@ -50,16 +51,17 @@ void RCTMountingTransactionObserverCoordinator::notifyObserversMountingTransacti
50
51
  auto &surfaceRegistry = surfaceRegistryIterator->second;
51
52
  for (auto const &componentViewDescriptor : surfaceRegistry) {
52
53
  if (componentViewDescriptor.observesMountingTransactionWillMount) {
53
- [(id<RCTMountingTransactionObserving>)componentViewDescriptor.view
54
- mountingTransactionWillMountWithMetadata:metadata];
54
+ [(id<RCTMountingTransactionObserving>)componentViewDescriptor.view mountingTransactionWillMount:transaction
55
+ withSurfaceTelemetry:surfaceTelemetry];
55
56
  }
56
57
  }
57
58
  }
58
59
 
59
60
  void RCTMountingTransactionObserverCoordinator::notifyObserversMountingTransactionDidMount(
60
- MountingTransactionMetadata const &metadata) const
61
+ MountingTransaction const &transaction,
62
+ SurfaceTelemetry const &surfaceTelemetry) const
61
63
  {
62
- auto surfaceId = metadata.surfaceId;
64
+ auto surfaceId = transaction.getSurfaceId();
63
65
  auto surfaceRegistryIterator = registry_.find(surfaceId);
64
66
  if (surfaceRegistryIterator == registry_.end()) {
65
67
  return;
@@ -67,8 +69,8 @@ void RCTMountingTransactionObserverCoordinator::notifyObserversMountingTransacti
67
69
  auto &surfaceRegistry = surfaceRegistryIterator->second;
68
70
  for (auto const &componentViewDescriptor : surfaceRegistry) {
69
71
  if (componentViewDescriptor.observesMountingTransactionDidMount) {
70
- [(id<RCTMountingTransactionObserving>)componentViewDescriptor.view
71
- mountingTransactionDidMountWithMetadata:metadata];
72
+ [(id<RCTMountingTransactionObserving>)componentViewDescriptor.view mountingTransactionDidMount:transaction
73
+ withSurfaceTelemetry:surfaceTelemetry];
72
74
  }
73
75
  }
74
76
  }