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
@@ -0,0 +1,527 @@
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ #pragma once
9
+
10
+ #include <react/renderer/components/view/ViewProps.h>
11
+ #include <react/renderer/components/view/conversions.h>
12
+ #include <react/renderer/graphics/conversions.h>
13
+ #include <react/renderer/mapbuffer/MapBuffer.h>
14
+ #include <react/renderer/mapbuffer/MapBufferBuilder.h>
15
+
16
+ #include <optional>
17
+
18
+ namespace facebook {
19
+ namespace react {
20
+
21
+ namespace {
22
+ // ViewProps values
23
+ constexpr MapBuffer::Key VP_ACCESSIBILITY_ACTIONS = 0;
24
+ constexpr MapBuffer::Key VP_ACCESSIBILITY_HINT = 1;
25
+ constexpr MapBuffer::Key VP_ACCESSIBILITY_LABEL = 2;
26
+ constexpr MapBuffer::Key VP_ACCESSIBILITY_LABELLED_BY = 3;
27
+ constexpr MapBuffer::Key VP_ACCESSIBILITY_LIVE_REGION = 4;
28
+ constexpr MapBuffer::Key VP_ACCESSIBILITY_ROLE = 5;
29
+ constexpr MapBuffer::Key VP_ACCESSIBILITY_STATE = 6;
30
+ constexpr MapBuffer::Key VP_ACCESSIBILITY_VALUE = 7;
31
+ constexpr MapBuffer::Key VP_ACCESSIBLE = 8;
32
+ constexpr MapBuffer::Key VP_BACKFACE_VISIBILITY = 9;
33
+ constexpr MapBuffer::Key VP_BG_COLOR = 10;
34
+ constexpr MapBuffer::Key VP_BORDER_COLOR = 11;
35
+ constexpr MapBuffer::Key VP_BORDER_RADII = 12;
36
+ constexpr MapBuffer::Key VP_BORDER_STYLE = 13;
37
+ constexpr MapBuffer::Key VP_COLLAPSABLE = 14;
38
+ constexpr MapBuffer::Key VP_ELEVATION = 15;
39
+ constexpr MapBuffer::Key VP_FOCUSABLE = 16;
40
+ constexpr MapBuffer::Key VP_HAS_TV_FOCUS = 17;
41
+ constexpr MapBuffer::Key VP_HIT_SLOP = 18;
42
+ constexpr MapBuffer::Key VP_IMPORTANT_FOR_ACCESSIBILITY = 19;
43
+ constexpr MapBuffer::Key VP_NATIVE_BACKGROUND = 20;
44
+ constexpr MapBuffer::Key VP_NATIVE_FOREGROUND = 21;
45
+ constexpr MapBuffer::Key VP_NATIVE_ID = 22;
46
+ constexpr MapBuffer::Key VP_OFFSCREEN_ALPHA_COMPOSITING = 23;
47
+ constexpr MapBuffer::Key VP_OPACITY = 24;
48
+ constexpr MapBuffer::Key VP_POINTER_EVENTS = 25;
49
+ constexpr MapBuffer::Key VP_POINTER_ENTER = 26;
50
+ constexpr MapBuffer::Key VP_POINTER_LEAVE = 27;
51
+ constexpr MapBuffer::Key VP_POINTER_MOVE = 28;
52
+ constexpr MapBuffer::Key VP_REMOVE_CLIPPED_SUBVIEW = 29;
53
+ constexpr MapBuffer::Key VP_RENDER_TO_HARDWARE_TEXTURE = 30;
54
+ constexpr MapBuffer::Key VP_SHADOW_COLOR = 31;
55
+ constexpr MapBuffer::Key VP_TEST_ID = 32;
56
+ constexpr MapBuffer::Key VP_TRANSFORM = 33;
57
+ constexpr MapBuffer::Key VP_ZINDEX = 34;
58
+
59
+ // Yoga values
60
+ constexpr MapBuffer::Key YG_BORDER_WIDTH = 100;
61
+ constexpr MapBuffer::Key YG_OVERFLOW = 101;
62
+
63
+ // AccessibilityAction values
64
+ constexpr MapBuffer::Key ACCESSIBILITY_ACTION_NAME = 0;
65
+ constexpr MapBuffer::Key ACCESSIBILITY_ACTION_LABEL = 1;
66
+
67
+ static MapBuffer convertAccessibilityActions(
68
+ std::vector<AccessibilityAction> const &actions) {
69
+ MapBufferBuilder builder(actions.size());
70
+ for (auto i = 0; i < actions.size(); i++) {
71
+ auto const &action = actions[i];
72
+ MapBufferBuilder actionsBuilder(2);
73
+ actionsBuilder.putString(ACCESSIBILITY_ACTION_NAME, action.name);
74
+ if (action.label.has_value()) {
75
+ actionsBuilder.putString(
76
+ ACCESSIBILITY_ACTION_LABEL, action.label.value());
77
+ }
78
+ builder.putMapBuffer(i, actionsBuilder.build());
79
+ }
80
+ return builder.build();
81
+ }
82
+
83
+ static MapBuffer convertAccessibilityLabelledBy(
84
+ AccessibilityLabelledBy const &labelledBy) {
85
+ MapBufferBuilder builder(labelledBy.value.size());
86
+ for (auto i = 0; i < labelledBy.value.size(); i++) {
87
+ builder.putString(i, labelledBy.value[i]);
88
+ }
89
+ return builder.build();
90
+ }
91
+
92
+ // AccessibilityState values
93
+ constexpr MapBuffer::Key ACCESSIBILITY_STATE_BUSY = 0;
94
+ constexpr MapBuffer::Key ACCESSIBILITY_STATE_DISABLED = 1;
95
+ constexpr MapBuffer::Key ACCESSIBILITY_STATE_EXPANDED = 2;
96
+ constexpr MapBuffer::Key ACCESSIBILITY_STATE_SELECTED = 3;
97
+ constexpr MapBuffer::Key ACCESSIBILITY_STATE_CHECKED = 4;
98
+
99
+ MapBuffer convertAccessibilityState(AccessibilityState const &state) {
100
+ MapBufferBuilder builder(5);
101
+ builder.putBool(ACCESSIBILITY_STATE_BUSY, state.busy);
102
+ builder.putBool(ACCESSIBILITY_STATE_DISABLED, state.disabled);
103
+ builder.putBool(ACCESSIBILITY_STATE_EXPANDED, state.expanded);
104
+ builder.putBool(ACCESSIBILITY_STATE_SELECTED, state.selected);
105
+ int checked;
106
+ switch (state.checked) {
107
+ case AccessibilityState::Unchecked:
108
+ checked = 0;
109
+ break;
110
+ case AccessibilityState::Checked:
111
+ checked = 1;
112
+ break;
113
+ case AccessibilityState::Mixed:
114
+ checked = 2;
115
+ break;
116
+ case AccessibilityState::None:
117
+ checked = 3;
118
+ break;
119
+ }
120
+ builder.putInt(ACCESSIBILITY_STATE_CHECKED, checked);
121
+ return builder.build();
122
+ }
123
+
124
+ inline void putOptionalColor(
125
+ MapBufferBuilder &builder,
126
+ MapBuffer::Key key,
127
+ std::optional<SharedColor> const &color) {
128
+ builder.putInt(key, color.has_value() ? toAndroidRepr(color.value()) : -1);
129
+ }
130
+
131
+ constexpr MapBuffer::Key EDGE_TOP = 0;
132
+ constexpr MapBuffer::Key EDGE_LEFT = 1;
133
+ constexpr MapBuffer::Key EDGE_RIGHT = 2;
134
+ constexpr MapBuffer::Key EDGE_BOTTOM = 3;
135
+ constexpr MapBuffer::Key EDGE_START = 4;
136
+ constexpr MapBuffer::Key EDGE_END = 5;
137
+ constexpr MapBuffer::Key EDGE_ALL = 6;
138
+
139
+ MapBuffer convertBorderColors(CascadedBorderColors const &colors) {
140
+ MapBufferBuilder builder(7);
141
+ putOptionalColor(builder, EDGE_TOP, colors.top);
142
+ putOptionalColor(builder, EDGE_RIGHT, colors.right);
143
+ putOptionalColor(builder, EDGE_BOTTOM, colors.bottom);
144
+ putOptionalColor(builder, EDGE_LEFT, colors.left);
145
+ putOptionalColor(builder, EDGE_START, colors.start);
146
+ putOptionalColor(builder, EDGE_END, colors.end);
147
+ putOptionalColor(builder, EDGE_ALL, colors.all);
148
+ return builder.build();
149
+ }
150
+
151
+ constexpr MapBuffer::Key CORNER_TOP_LEFT = 0;
152
+ constexpr MapBuffer::Key CORNER_TOP_RIGHT = 1;
153
+ constexpr MapBuffer::Key CORNER_BOTTOM_RIGHT = 2;
154
+ constexpr MapBuffer::Key CORNER_BOTTOM_LEFT = 3;
155
+ constexpr MapBuffer::Key CORNER_TOP_START = 4;
156
+ constexpr MapBuffer::Key CORNER_TOP_END = 5;
157
+ constexpr MapBuffer::Key CORNER_BOTTOM_END = 6;
158
+ constexpr MapBuffer::Key CORNER_BOTTOM_START = 7;
159
+ constexpr MapBuffer::Key CORNER_ALL = 8;
160
+
161
+ inline void putOptionalFloat(
162
+ MapBufferBuilder &builder,
163
+ MapBuffer::Key key,
164
+ std::optional<Float> const &value) {
165
+ builder.putDouble(key, value.value_or(NAN));
166
+ }
167
+
168
+ MapBuffer convertBorderRadii(CascadedBorderRadii const &radii) {
169
+ MapBufferBuilder builder(9);
170
+ putOptionalFloat(builder, CORNER_TOP_LEFT, radii.topLeft);
171
+ putOptionalFloat(builder, CORNER_TOP_RIGHT, radii.topRight);
172
+ putOptionalFloat(builder, CORNER_BOTTOM_RIGHT, radii.bottomRight);
173
+ putOptionalFloat(builder, CORNER_BOTTOM_LEFT, radii.bottomLeft);
174
+ putOptionalFloat(builder, CORNER_TOP_START, radii.topStart);
175
+ putOptionalFloat(builder, CORNER_TOP_END, radii.topEnd);
176
+ putOptionalFloat(builder, CORNER_BOTTOM_END, radii.bottomEnd);
177
+ putOptionalFloat(builder, CORNER_BOTTOM_START, radii.bottomStart);
178
+ putOptionalFloat(builder, CORNER_ALL, radii.all);
179
+ return builder.build();
180
+ }
181
+
182
+ MapBuffer convertBorderWidths(YGStyle::Edges const &border) {
183
+ MapBufferBuilder builder(7);
184
+ putOptionalFloat(
185
+ builder, EDGE_TOP, optionalFloatFromYogaValue(border[YGEdgeTop]));
186
+ putOptionalFloat(
187
+ builder, EDGE_RIGHT, optionalFloatFromYogaValue(border[YGEdgeRight]));
188
+ putOptionalFloat(
189
+ builder, EDGE_BOTTOM, optionalFloatFromYogaValue(border[YGEdgeBottom]));
190
+ putOptionalFloat(
191
+ builder, EDGE_LEFT, optionalFloatFromYogaValue(border[YGEdgeLeft]));
192
+ putOptionalFloat(
193
+ builder, EDGE_START, optionalFloatFromYogaValue(border[YGEdgeStart]));
194
+ putOptionalFloat(
195
+ builder, EDGE_END, optionalFloatFromYogaValue(border[YGEdgeEnd]));
196
+ putOptionalFloat(
197
+ builder, EDGE_ALL, optionalFloatFromYogaValue(border[YGEdgeAll]));
198
+ return builder.build();
199
+ }
200
+
201
+ MapBuffer convertEdgeInsets(EdgeInsets const &insets) {
202
+ MapBufferBuilder builder(4);
203
+ builder.putDouble(EDGE_TOP, insets.top);
204
+ builder.putDouble(EDGE_RIGHT, insets.right);
205
+ builder.putDouble(EDGE_BOTTOM, insets.bottom);
206
+ builder.putDouble(EDGE_LEFT, insets.left);
207
+ return builder.build();
208
+ }
209
+
210
+ #ifdef ANDROID
211
+
212
+ constexpr MapBuffer::Key NATIVE_DRAWABLE_KIND = 0;
213
+ constexpr MapBuffer::Key NATIVE_DRAWABLE_ATTRIBUTE = 1;
214
+ constexpr MapBuffer::Key NATIVE_DRAWABLE_COLOR = 2;
215
+ constexpr MapBuffer::Key NATIVE_DRAWABLE_BORDERLESS = 3;
216
+ constexpr MapBuffer::Key NATIVE_DRAWABLE_RIPPLE_RADIUS = 4;
217
+
218
+ MapBuffer convertNativeBackground(std::optional<NativeDrawable> const &value) {
219
+ if (!value.has_value()) {
220
+ return MapBufferBuilder::EMPTY();
221
+ }
222
+
223
+ auto const &drawable = value.value();
224
+ MapBufferBuilder builder(4);
225
+ switch (drawable.kind) {
226
+ case NativeDrawable::Kind::ThemeAttr:
227
+ builder.putInt(NATIVE_DRAWABLE_KIND, 0);
228
+ builder.putString(NATIVE_DRAWABLE_ATTRIBUTE, drawable.themeAttr);
229
+ break;
230
+ case NativeDrawable::Kind::Ripple:
231
+ builder.putInt(NATIVE_DRAWABLE_KIND, 1);
232
+ if (drawable.ripple.color.has_value()) {
233
+ builder.putInt(NATIVE_DRAWABLE_COLOR, drawable.ripple.color.value());
234
+ }
235
+
236
+ builder.putBool(NATIVE_DRAWABLE_BORDERLESS, drawable.ripple.borderless);
237
+ if (drawable.ripple.rippleRadius.has_value()) {
238
+ builder.putDouble(
239
+ NATIVE_DRAWABLE_RIPPLE_RADIUS,
240
+ drawable.ripple.rippleRadius.value());
241
+ }
242
+ break;
243
+ }
244
+ return builder.build();
245
+ }
246
+
247
+ #endif
248
+
249
+ MapBuffer convertTransform(Transform const &transform) {
250
+ MapBufferBuilder builder(16);
251
+ for (int32_t i = 0; i < transform.matrix.size(); i++) {
252
+ builder.putDouble(i, transform.matrix[i]);
253
+ }
254
+ return builder.build();
255
+ }
256
+ } // namespace
257
+
258
+ /**
259
+ * Diffs two sets of ViewProps into MapBuffer.
260
+ * TODO: Currently unsupported: nextFocusForward/Left/Up/Right/Down
261
+ */
262
+ static inline MapBuffer viewPropsDiff(
263
+ ViewProps const &oldProps,
264
+ ViewProps const &newProps) {
265
+ MapBufferBuilder builder;
266
+ if (oldProps.accessibilityActions != newProps.accessibilityActions) {
267
+ builder.putMapBuffer(
268
+ VP_ACCESSIBILITY_ACTIONS,
269
+ convertAccessibilityActions(newProps.accessibilityActions));
270
+ }
271
+
272
+ if (oldProps.accessibilityHint != newProps.accessibilityHint) {
273
+ builder.putString(VP_ACCESSIBILITY_HINT, newProps.accessibilityHint);
274
+ }
275
+
276
+ if (oldProps.accessibilityLabel != newProps.accessibilityLabel) {
277
+ builder.putString(VP_ACCESSIBILITY_LABEL, newProps.accessibilityLabel);
278
+ }
279
+
280
+ if (oldProps.accessibilityLabelledBy != newProps.accessibilityLabelledBy) {
281
+ builder.putMapBuffer(
282
+ VP_ACCESSIBILITY_LABELLED_BY,
283
+ convertAccessibilityLabelledBy(newProps.accessibilityLabelledBy));
284
+ }
285
+
286
+ if (oldProps.accessibilityLiveRegion != newProps.accessibilityLiveRegion) {
287
+ int value;
288
+ switch (newProps.accessibilityLiveRegion) {
289
+ case AccessibilityLiveRegion::None:
290
+ value = 0;
291
+ break;
292
+ case AccessibilityLiveRegion::Polite:
293
+ value = 1;
294
+ break;
295
+ case AccessibilityLiveRegion::Assertive:
296
+ value = 2;
297
+ break;
298
+ }
299
+ builder.putInt(VP_ACCESSIBILITY_LIVE_REGION, value);
300
+ }
301
+
302
+ if (oldProps.accessibilityRole != newProps.accessibilityRole) {
303
+ builder.putString(VP_ACCESSIBILITY_ROLE, newProps.accessibilityRole);
304
+ }
305
+
306
+ if (oldProps.accessibilityState != newProps.accessibilityState) {
307
+ builder.putMapBuffer(
308
+ VP_ACCESSIBILITY_STATE,
309
+ convertAccessibilityState(newProps.accessibilityState));
310
+ }
311
+
312
+ if (oldProps.accessibilityValue != newProps.accessibilityValue) {
313
+ builder.putString(
314
+ VP_ACCESSIBILITY_VALUE, newProps.accessibilityValue.text.value_or(""));
315
+ }
316
+
317
+ if (oldProps.accessible != newProps.accessible) {
318
+ builder.putBool(VP_ACCESSIBLE, newProps.accessible);
319
+ }
320
+
321
+ if (oldProps.backfaceVisibility != newProps.backfaceVisibility) {
322
+ int value;
323
+ switch (newProps.backfaceVisibility) {
324
+ case BackfaceVisibility::Auto:
325
+ value = 0;
326
+ break;
327
+ case BackfaceVisibility::Visible:
328
+ value = 1;
329
+ break;
330
+ case BackfaceVisibility::Hidden:
331
+ value = 2;
332
+ break;
333
+ }
334
+ builder.putInt(VP_BACKFACE_VISIBILITY, value);
335
+ }
336
+
337
+ if (oldProps.backgroundColor != newProps.backgroundColor) {
338
+ builder.putInt(VP_BG_COLOR, toAndroidRepr(newProps.backgroundColor));
339
+ }
340
+
341
+ if (oldProps.borderColors != newProps.borderColors) {
342
+ builder.putMapBuffer(
343
+ VP_BORDER_COLOR, convertBorderColors(newProps.borderColors));
344
+ }
345
+
346
+ if (oldProps.borderRadii != newProps.borderRadii) {
347
+ builder.putMapBuffer(
348
+ VP_BORDER_RADII, convertBorderRadii(newProps.borderRadii));
349
+ }
350
+
351
+ if (oldProps.borderStyles != newProps.borderStyles) {
352
+ int value = -1;
353
+ if (newProps.borderStyles.all.has_value()) {
354
+ switch (newProps.borderStyles.all.value()) {
355
+ case BorderStyle::Solid:
356
+ value = 0;
357
+ break;
358
+ case BorderStyle::Dotted:
359
+ value = 1;
360
+ break;
361
+ case BorderStyle::Dashed:
362
+ value = 2;
363
+ break;
364
+ }
365
+ }
366
+ builder.putInt(VP_BORDER_STYLE, value);
367
+ }
368
+
369
+ if (oldProps.elevation != newProps.elevation) {
370
+ builder.putDouble(VP_ELEVATION, newProps.elevation);
371
+ }
372
+
373
+ #ifdef ANDROID
374
+ if (oldProps.focusable != newProps.focusable) {
375
+ builder.putBool(VP_FOCUSABLE, newProps.focusable);
376
+ }
377
+
378
+ if (oldProps.hasTVPreferredFocus != newProps.hasTVPreferredFocus) {
379
+ builder.putBool(VP_HAS_TV_FOCUS, newProps.hasTVPreferredFocus);
380
+ }
381
+ #endif
382
+
383
+ if (oldProps.hitSlop != newProps.hitSlop) {
384
+ builder.putMapBuffer(VP_HIT_SLOP, convertEdgeInsets(newProps.hitSlop));
385
+ }
386
+
387
+ if (oldProps.importantForAccessibility !=
388
+ newProps.importantForAccessibility) {
389
+ int value;
390
+ switch (newProps.importantForAccessibility) {
391
+ case ImportantForAccessibility::Auto:
392
+ value = 0;
393
+ break;
394
+ case ImportantForAccessibility::Yes:
395
+ value = 1;
396
+ break;
397
+ case ImportantForAccessibility::No:
398
+ value = 2;
399
+ break;
400
+ case ImportantForAccessibility::NoHideDescendants:
401
+ value = 3;
402
+ break;
403
+ }
404
+ builder.putInt(VP_IMPORTANT_FOR_ACCESSIBILITY, value);
405
+ }
406
+
407
+ #ifdef ANDROID
408
+ if (oldProps.nativeBackground != newProps.nativeBackground) {
409
+ builder.putMapBuffer(
410
+ VP_NATIVE_BACKGROUND,
411
+ convertNativeBackground(newProps.nativeBackground));
412
+ }
413
+
414
+ if (oldProps.nativeForeground != newProps.nativeForeground) {
415
+ builder.putMapBuffer(
416
+ VP_NATIVE_FOREGROUND,
417
+ convertNativeBackground(newProps.nativeForeground));
418
+ }
419
+ #endif
420
+
421
+ if (oldProps.nativeId != newProps.nativeId) {
422
+ builder.putString(VP_NATIVE_ID, newProps.nativeId);
423
+ }
424
+
425
+ #ifdef ANDROID
426
+ if (oldProps.needsOffscreenAlphaCompositing !=
427
+ newProps.needsOffscreenAlphaCompositing) {
428
+ builder.putBool(
429
+ VP_OFFSCREEN_ALPHA_COMPOSITING,
430
+ newProps.needsOffscreenAlphaCompositing);
431
+ }
432
+ #endif
433
+
434
+ if (oldProps.opacity != newProps.opacity) {
435
+ builder.putDouble(VP_OPACITY, newProps.opacity);
436
+ }
437
+
438
+ if (oldProps.pointerEvents != newProps.pointerEvents) {
439
+ int value;
440
+ switch (newProps.pointerEvents) {
441
+ case PointerEventsMode::Auto:
442
+ value = 0;
443
+ break;
444
+ case PointerEventsMode::None:
445
+ value = 1;
446
+ break;
447
+ case PointerEventsMode::BoxNone:
448
+ value = 2;
449
+ break;
450
+ case PointerEventsMode::BoxOnly:
451
+ value = 3;
452
+ break;
453
+ }
454
+
455
+ builder.putInt(VP_POINTER_EVENTS, value);
456
+ }
457
+
458
+ if (oldProps.events != newProps.events) {
459
+ builder.putBool(
460
+ VP_POINTER_ENTER, newProps.events[ViewEvents::Offset::PointerEnter]);
461
+ builder.putBool(
462
+ VP_POINTER_LEAVE, newProps.events[ViewEvents::Offset::PointerLeave]);
463
+ builder.putBool(
464
+ VP_POINTER_MOVE, newProps.events[ViewEvents::Offset::PointerMove]);
465
+ }
466
+
467
+ if (oldProps.removeClippedSubviews != newProps.removeClippedSubviews) {
468
+ builder.putBool(VP_REMOVE_CLIPPED_SUBVIEW, newProps.removeClippedSubviews);
469
+ }
470
+
471
+ #ifdef ANDROID
472
+ if (oldProps.renderToHardwareTextureAndroid !=
473
+ newProps.renderToHardwareTextureAndroid) {
474
+ builder.putBool(
475
+ VP_RENDER_TO_HARDWARE_TEXTURE, newProps.renderToHardwareTextureAndroid);
476
+ }
477
+ #endif
478
+
479
+ if (oldProps.shadowColor != newProps.shadowColor) {
480
+ builder.putInt(VP_SHADOW_COLOR, toAndroidRepr(newProps.shadowColor));
481
+ }
482
+
483
+ if (oldProps.testId != newProps.testId) {
484
+ builder.putString(VP_TEST_ID, newProps.testId);
485
+ }
486
+
487
+ // TODO: seems like transform covers rotation/translate/scale/skew?
488
+
489
+ if (oldProps.transform != newProps.transform) {
490
+ builder.putMapBuffer(VP_TRANSFORM, convertTransform(newProps.transform));
491
+ }
492
+
493
+ if (oldProps.zIndex != newProps.zIndex) {
494
+ builder.putInt(VP_ZINDEX, newProps.zIndex.value_or(0));
495
+ }
496
+
497
+ if (oldProps.yogaStyle != newProps.yogaStyle) {
498
+ auto const &oldStyle = oldProps.yogaStyle;
499
+ auto const &newStyle = newProps.yogaStyle;
500
+
501
+ if (!(oldStyle.border() == newStyle.border())) {
502
+ builder.putMapBuffer(
503
+ YG_BORDER_WIDTH, convertBorderWidths(newStyle.border()));
504
+ }
505
+
506
+ if (oldStyle.overflow() != newStyle.overflow()) {
507
+ int value;
508
+ switch (newStyle.overflow()) {
509
+ case YGOverflowVisible:
510
+ value = 0;
511
+ break;
512
+ case YGOverflowHidden:
513
+ value = 1;
514
+ break;
515
+ case YGOverflowScroll:
516
+ value = 2;
517
+ break;
518
+ }
519
+ builder.putInt(YG_OVERFLOW, value);
520
+ }
521
+ }
522
+
523
+ return builder.build();
524
+ }
525
+
526
+ } // namespace react
527
+ } // namespace facebook
@@ -13,14 +13,10 @@ import com.facebook.react.common.MapBuilder;
13
13
 
14
14
  import java.util.Map;
15
15
 
16
- // [TODO(macOS GH#944)
17
- // Note: Be careful not to override these version numbers
18
- // when we merge upstream stable branches into main
19
- // TODO(macOS GH#944)]
20
16
  public class ReactNativeVersion {
21
17
  public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
22
18
  "major", 0,
23
19
  "minor", 0,
24
20
  "patch", 0,
25
- "prerelease", "b1e6b9783");
21
+ "prerelease", "b2c5fa973");
26
22
  }
@@ -27,7 +27,7 @@ NDK_MODULE_PATH := $(APP_MK_DIR)$(HOST_DIRSEP)$(THIRD_PARTY_NDK_DIR)$(HOST_DIRSE
27
27
  APP_STL := c++_shared
28
28
 
29
29
  APP_CFLAGS := -Wall -Werror -fexceptions -frtti -DWITH_INSPECTOR=1
30
- APP_CPPFLAGS := -std=c++1y
30
+ APP_CPPFLAGS := -std=c++17
31
31
  # Make sure every shared lib includes a .note.gnu.build-id header
32
32
  APP_LDFLAGS := -Wl,--build-id
33
33
 
@@ -19,7 +19,7 @@ oss_cxx_library(
19
19
  "-fexceptions",
20
20
  "-Wall",
21
21
  "-Werror",
22
- "-std=c++14",
22
+ "-std=c++17",
23
23
  "-DDISABLE_CPUCAP",
24
24
  "-DDISABLE_XPLAT",
25
25
  ],
@@ -22,7 +22,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)
22
22
  # ./../ == react
23
23
  LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../..
24
24
 
25
- LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture
25
+ LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture -std=c++17
26
26
 
27
27
  LOCAL_LDLIBS += -landroid
28
28
 
@@ -79,7 +79,7 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)
79
79
  # ./../ == react
80
80
  LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/../..
81
81
 
82
- LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture
82
+ LOCAL_CFLAGS += -fexceptions -frtti -Wno-unused-lambda-capture -std=c++17
83
83
 
84
84
  LOCAL_LDLIBS += -landroid
85
85
 
@@ -29,7 +29,7 @@ Pod::Spec.new do |s|
29
29
  s.homepage = "https://reactnative.dev/"
30
30
  s.license = package["license"]
31
31
  s.author = "Facebook, Inc. and its affiliates"
32
- s.platforms = { :ios => "11.0" }
32
+ s.platforms = { :ios => "11.0", :osx => "10.15" } # TODO(macOS GH#774)
33
33
  s.source = source
34
34
  s.source_files = "dummyFile.cpp"
35
35
  s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES",
@@ -25,7 +25,7 @@ Pod::Spec.new do |s|
25
25
  s.homepage = "https://reactnative.dev/"
26
26
  s.license = package["license"]
27
27
  s.author = "Facebook, Inc. and its affiliates"
28
- s.platforms = { :ios => "11.0" }
28
+ s.platforms = { :ios => "11.0", :osx => "10.15" } # TODO(macOS GH#774)
29
29
  s.source = source
30
30
  s.source_files = "dummyFile.cpp"
31
31
  s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES",
@@ -34,7 +34,7 @@ Pod::Spec.new do |s|
34
34
  s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
35
35
  s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\"",
36
36
  "USE_HEADERMAP" => "YES",
37
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++14" }
37
+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++17" }
38
38
 
39
39
  # TODO (T48588859): Restructure this target to align with dir structure: "react/nativemodule/..."
40
40
  # Note: Update this only when ready to minimize breaking changes.
@@ -14,15 +14,11 @@
14
14
 
15
15
  namespace facebook::react {
16
16
 
17
- // [TODO(macOS GH#944)
18
- // Note: Be careful not to override these version numbers
19
- // when we merge upstream stable branches into main
20
- // TODO(macOS GH#944)]
21
17
  constexpr struct {
22
18
  int32_t Major = 0;
23
19
  int32_t Minor = 0;
24
20
  int32_t Patch = 0;
25
- std::string_view Prerelease = "b1e6b9783";
21
+ std::string_view Prerelease = "b2c5fa973";
26
22
  } ReactNativeVersion;
27
23
 
28
24
  } // namespace facebook::react
@@ -20,7 +20,7 @@ jni_instrumentation_test_lib(
20
20
  compiler_flags = [
21
21
  "-fexceptions",
22
22
  "-frtti",
23
- "-std=c++14",
23
+ "-std=c++17",
24
24
  ],
25
25
  soname = "libxplat-bridge.so",
26
26
  visibility = [
@@ -70,7 +70,7 @@ export class HeaderWriter {
70
70
  this.stream.write('struct UnknownRequest;\n\n');
71
71
 
72
72
  const namespaceMap: Map<string, Array<Type | Command | Event>> = new Map();
73
- const addToMap = function(type) {
73
+ const addToMap = function (type) {
74
74
  const domain = type.domain;
75
75
  let types = namespaceMap.get(domain);
76
76
  if (!types) {
@@ -83,7 +83,7 @@ function buildGraph(desc: Descriptor): Graph {
83
83
  const commands = desc.commands;
84
84
  const events = desc.events;
85
85
 
86
- const maybeAddPropEdges = function(nodeId: string, props: ?Array<Property>) {
86
+ const maybeAddPropEdges = function (nodeId: string, props: ?Array<Property>) {
87
87
  if (props) {
88
88
  for (const prop of props) {
89
89
  const refId = prop.getRefDebuggerName();
@@ -2107,9 +2107,9 @@ decimal.js@^10.2.1:
2107
2107
  integrity sha512-V0pfhfr8suzyPGOx3nmq4aHqabehUZn6Ch9kyFpV79TGDTWFmHqUqXdabR7QHqxzrYolF4+tVmJhUG4OURg5dQ==
2108
2108
 
2109
2109
  decode-uri-component@^0.2.0:
2110
- version "0.2.0"
2111
- resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
2112
- integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=
2110
+ version "0.2.2"
2111
+ resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9"
2112
+ integrity sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==
2113
2113
 
2114
2114
  deep-is@~0.1.3:
2115
2115
  version "0.1.4"
@@ -12,7 +12,7 @@ cxx_library(
12
12
  compiler_flags = [
13
13
  "-Wall",
14
14
  "-Werror",
15
- "-std=c++14",
15
+ "-std=c++17",
16
16
  "-fexceptions",
17
17
  "-fno-data-sections",
18
18
  ],
@@ -55,7 +55,7 @@ void react_native_assert_fail(
55
55
  #define react_native_assert(cond) \
56
56
  if (!(cond)) { \
57
57
  LOG(ERROR) << "react_native_assert failure: " << #cond; \
58
- google::FlushLogFiles(google::INFO); \
58
+ google::FlushLogFiles(google::GLOG_INFO); \
59
59
  assert(cond); \
60
60
  }
61
61