react-native-macos 0.0.0-db13109c7 → 0.0.0-db2cc6efb

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 (438) hide show
  1. package/Libraries/AddressSanitizerCrash/RCTAddressSanitizerCrash.js +2 -3
  2. package/Libraries/Alert/Alert.js +2 -2
  3. package/Libraries/Alert/RCTAlertManager.android.js +1 -1
  4. package/Libraries/Animated/AnimatedImplementation.js +53 -53
  5. package/Libraries/Animated/AnimatedMock.js +8 -8
  6. package/Libraries/Animated/NativeAnimatedHelper.js +23 -20
  7. package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
  8. package/Libraries/Animated/nodes/AnimatedNode.js +10 -9
  9. package/Libraries/Animated/nodes/AnimatedValueXY.js +1 -1
  10. package/Libraries/AppState/AppState.js +8 -7
  11. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +2 -2
  12. package/Libraries/Blob/React-RCTBlob.podspec +1 -1
  13. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +22 -20
  14. package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +1 -2
  15. package/Libraries/Components/Button.js +1 -2
  16. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +6 -7
  17. package/Libraries/Components/Keyboard/Keyboard.js +8 -7
  18. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +5 -10
  19. package/Libraries/Components/Pressable/Pressable.js +1 -2
  20. package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js +2 -1
  21. package/Libraries/Components/RefreshControl/RefreshControl.js +2 -7
  22. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +2 -3
  23. package/Libraries/Components/SafeAreaView/SafeAreaView.js +2 -2
  24. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +3 -5
  25. package/Libraries/Components/ScrollView/ScrollContentViewNativeComponent.js +3 -5
  26. package/Libraries/Components/ScrollView/ScrollView.js +34 -100
  27. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +5 -4
  28. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -2
  29. package/Libraries/Components/SegmentedControlIOS/SegmentedControlIOS.ios.js +2 -8
  30. package/Libraries/Components/Sound/SoundManager.js +1 -1
  31. package/Libraries/Components/TextInput/InputAccessoryView.js +1 -2
  32. package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +3 -5
  33. package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +3 -5
  34. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +2 -0
  35. package/Libraries/Components/TextInput/TextInput.js +137 -11
  36. package/Libraries/Components/ToastAndroid/ToastAndroid.android.js +3 -3
  37. package/Libraries/Components/ToastAndroid/ToastAndroid.ios.js +3 -3
  38. package/Libraries/Components/Touchable/BoundingDimensions.js +2 -2
  39. package/Libraries/Components/Touchable/PooledClass.js +6 -6
  40. package/Libraries/Components/Touchable/Position.js +1 -1
  41. package/Libraries/Components/Touchable/Touchable.js +26 -25
  42. package/Libraries/Components/Touchable/TouchableBounce.js +1 -2
  43. package/Libraries/Components/Touchable/TouchableHighlight.js +1 -2
  44. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +4 -11
  45. package/Libraries/Components/Touchable/TouchableOpacity.js +1 -2
  46. package/Libraries/Components/View/ReactNativeStyleAttributes.js +1 -0
  47. package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
  48. package/Libraries/Components/View/ReactNativeViewViewConfig.js +1 -0
  49. package/Libraries/Components/View/ReactNativeViewViewConfigMacOS.js +3 -3
  50. package/Libraries/Components/View/View.js +0 -7
  51. package/Libraries/Components/View/ViewNativeComponent.js +3 -4
  52. package/Libraries/Components/View/ViewPropTypes.js +10 -6
  53. package/Libraries/Core/Devtools/parseHermesStack.js +2 -1
  54. package/Libraries/Core/ExceptionsManager.js +2 -2
  55. package/Libraries/Core/NativeExceptionsManager.js +2 -3
  56. package/Libraries/Core/ReactNativeVersion.js +1 -1
  57. package/Libraries/Core/Timers/JSTimers.js +17 -13
  58. package/Libraries/Core/setUpAlert.js +1 -1
  59. package/Libraries/Core/setUpDeveloperTools.js +1 -1
  60. package/Libraries/Core/setUpPerformance.js +1 -1
  61. package/Libraries/Core/setUpRegeneratorRuntime.js +1 -1
  62. package/Libraries/Core/setUpSegmentFetcher.js +4 -4
  63. package/Libraries/EventEmitter/NativeEventEmitter.js +2 -1
  64. package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +2 -1
  65. package/Libraries/HeapCapture/HeapCapture.js +1 -1
  66. package/Libraries/Image/AssetSourceResolver.js +2 -4
  67. package/Libraries/Image/Image.android.js +4 -4
  68. package/Libraries/Image/Image.ios.js +3 -3
  69. package/Libraries/Image/ImageAnalyticsTagContext.js +2 -3
  70. package/Libraries/Image/ImageBackground.js +1 -2
  71. package/Libraries/Image/ImagePickerIOS.js +6 -6
  72. package/Libraries/Image/ImageViewNativeComponent.js +2 -4
  73. package/Libraries/Image/NativeImageLoaderAndroid.js +1 -3
  74. package/Libraries/Image/RCTImageCache.m +1 -1
  75. package/Libraries/Image/RCTImageView.mm +14 -10
  76. package/Libraries/Image/React-RCTImage.podspec +1 -1
  77. package/Libraries/Image/TextInlineImageNativeComponent.js +3 -5
  78. package/Libraries/Inspector/ElementProperties.js +2 -4
  79. package/Libraries/Inspector/InspectorOverlay.js +1 -2
  80. package/Libraries/Inspector/InspectorPanel.js +1 -2
  81. package/Libraries/Inspector/NetworkOverlay.js +5 -11
  82. package/Libraries/Interaction/BridgeSpyStallHandler.js +1 -1
  83. package/Libraries/Interaction/FrameRateLogger.js +2 -2
  84. package/Libraries/Interaction/InteractionManager.js +2 -4
  85. package/Libraries/Interaction/JSEventLoopWatchdog.js +4 -4
  86. package/Libraries/Interaction/PanResponder.js +3 -4
  87. package/Libraries/Interaction/TouchHistoryMath.js +7 -7
  88. package/Libraries/JSInspector/NetworkAgent.js +1 -6
  89. package/Libraries/LayoutAnimation/LayoutAnimation.js +3 -3
  90. package/Libraries/LinkingIOS/RCTLinkingManager.h +1 -0
  91. package/Libraries/LinkingIOS/React-RCTLinking.podspec +1 -1
  92. package/Libraries/LinkingIOS/macos/RCTLinkingManager.mm +12 -5
  93. package/Libraries/Lists/FillRateHelper.js +1 -3
  94. package/Libraries/Lists/FlatList.js +41 -5
  95. package/Libraries/Lists/ViewabilityHelper.js +4 -10
  96. package/Libraries/Lists/VirtualizeUtils.js +2 -6
  97. package/Libraries/Lists/VirtualizedList.js +154 -125
  98. package/Libraries/Lists/VirtualizedListContext.js +3 -5
  99. package/Libraries/Lists/VirtualizedSectionList.js +63 -68
  100. package/Libraries/LogBox/Data/LogBoxData.js +1 -1
  101. package/Libraries/LogBox/Data/parseLogBoxLog.js +12 -23
  102. package/Libraries/LogBox/UI/LogBoxButton.js +2 -4
  103. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +2 -4
  104. package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +1 -2
  105. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -2
  106. package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +3 -6
  107. package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +1 -2
  108. package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +2 -4
  109. package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +2 -4
  110. package/Libraries/LogBox/UI/LogBoxNotification.js +2 -4
  111. package/Libraries/Modal/Modal.js +2 -4
  112. package/{ReactCommon/react/renderer/mounting/MountingTransactionMetadata.cpp → Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.h} +6 -4
  113. package/Libraries/NativeAnimation/Nodes/RCTColorAnimatedNode.m +30 -0
  114. package/Libraries/NativeAnimation/Nodes/RCTPropsAnimatedNode.m +11 -6
  115. package/Libraries/NativeAnimation/Nodes/RCTStyleAnimatedNode.m +8 -4
  116. package/Libraries/NativeAnimation/RCTNativeAnimatedNodesManager.m +2 -0
  117. package/Libraries/NativeAnimation/React-RCTAnimation.podspec +2 -2
  118. package/Libraries/NativeComponent/NativeComponentRegistry.js +2 -4
  119. package/Libraries/Network/React-RCTNetwork.podspec +1 -1
  120. package/Libraries/Network/XHRInterceptor.js +5 -6
  121. package/Libraries/NewAppScreen/components/Header.js +2 -4
  122. package/Libraries/NewAppScreen/components/HermesBadge.js +1 -2
  123. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +2 -4
  124. package/Libraries/Performance/SamplingProfiler.js +3 -3
  125. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +4 -3
  126. package/Libraries/Pressability/Pressability.js +2 -2
  127. package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +4 -2
  128. package/Libraries/PushNotificationIOS/PushNotificationIOS.js +8 -7
  129. package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +1 -1
  130. package/Libraries/ReactNative/AppContainer.js +4 -6
  131. package/Libraries/ReactNative/AppRegistry.js +2 -3
  132. package/Libraries/ReactNative/I18nManager.js +2 -5
  133. package/Libraries/ReactNative/PaperUIManager.js +2 -3
  134. package/Libraries/ReactNative/RootTag.js +2 -3
  135. package/Libraries/ReactNative/renderApplication.js +1 -2
  136. package/Libraries/Settings/React-RCTSettings.podspec +1 -1
  137. package/Libraries/Storage/AsyncStorage.js +21 -21
  138. package/Libraries/StyleSheet/StyleSheet.js +2 -1
  139. package/Libraries/StyleSheet/StyleSheetTypes.js +26 -1
  140. package/Libraries/StyleSheet/processColor.js +2 -2
  141. package/Libraries/StyleSheet/splitLayoutProps.js +1 -3
  142. package/Libraries/Text/BaseText/RCTBaseTextViewManager.m +8 -0
  143. package/Libraries/Text/RCTTextAttributes.h +11 -3
  144. package/Libraries/Text/RCTTextAttributes.m +46 -13
  145. package/Libraries/Text/Text/RCTDynamicTypeRamp.h +40 -0
  146. package/Libraries/Text/Text/RCTDynamicTypeRamp.m +77 -0
  147. package/Libraries/Text/Text/RCTTextView.m +123 -58
  148. package/Libraries/Text/Text.js +2 -9
  149. package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.h +8 -0
  150. package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.m +66 -1
  151. package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputViewManager.m +13 -0
  152. package/Libraries/Text/TextInput/Multiline/RCTUITextView.h +2 -1
  153. package/Libraries/Text/TextInput/Multiline/RCTUITextView.m +105 -7
  154. package/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h +13 -1
  155. package/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.m +20 -3
  156. package/Libraries/Text/TextInput/RCTBackedTextInputViewProtocol.h +1 -0
  157. package/Libraries/Text/TextInput/RCTBaseTextInputShadowView.m +12 -0
  158. package/Libraries/Text/TextInput/RCTBaseTextInputView.h +9 -1
  159. package/Libraries/Text/TextInput/RCTBaseTextInputView.m +128 -4
  160. package/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m +15 -3
  161. package/Libraries/Text/TextInput/Singleline/RCTSinglelineTextInputView.m +4 -0
  162. package/Libraries/Text/TextInput/Singleline/RCTUITextField.h +2 -0
  163. package/Libraries/Text/TextInput/Singleline/RCTUITextField.m +68 -2
  164. package/Libraries/Text/TextNativeComponent.js +5 -5
  165. package/Libraries/Text/TextProps.js +29 -0
  166. package/Libraries/TypeSafety/RCTTypeSafety.podspec +1 -1
  167. package/Libraries/Types/CoreEventTypes.js +0 -1
  168. package/Libraries/Utilities/Appearance.js +8 -5
  169. package/Libraries/Utilities/BackHandler.android.js +4 -4
  170. package/Libraries/Utilities/HMRClient.js +2 -2
  171. package/Libraries/Utilities/JSDevSupportModule.js +3 -4
  172. package/Libraries/Utilities/MatrixMath.js +19 -19
  173. package/Libraries/Utilities/PerformanceLoggerContext.js +2 -3
  174. package/Libraries/Utilities/ReactNativeTestTools.js +2 -4
  175. package/Libraries/Utilities/SceneTracker.js +1 -3
  176. package/Libraries/Utilities/__mocks__/BackHandler.js +3 -3
  177. package/Libraries/Utilities/buildStyleInterpolator.js +9 -9
  178. package/Libraries/Utilities/codegenNativeComponent.js +4 -2
  179. package/Libraries/Utilities/differ/deepDiffer.js +1 -1
  180. package/Libraries/Utilities/differ/insetsDiffer.js +1 -1
  181. package/Libraries/Utilities/differ/matricesDiffer.js +1 -1
  182. package/Libraries/Utilities/differ/pointsDiffer.js +1 -1
  183. package/Libraries/Utilities/differ/sizesDiffer.js +1 -1
  184. package/Libraries/Utilities/logError.js +1 -1
  185. package/Libraries/Utilities/mergeIntoFast.js +1 -1
  186. package/Libraries/Utilities/truncate.js +1 -1
  187. package/Libraries/Vibration/React-RCTVibration.podspec +1 -1
  188. package/Libraries/Vibration/Vibration.js +2 -2
  189. package/Libraries/WebSocket/WebSocketInterceptor.js +4 -4
  190. package/Libraries/promiseRejectionTrackingOptions.js +1 -1
  191. package/Libraries/vendor/emitter/_EmitterSubscription.js +2 -1
  192. package/Libraries/vendor/emitter/_EventEmitter.js +2 -1
  193. package/Libraries/vendor/emitter/_EventSubscription.js +2 -1
  194. package/Libraries/vendor/emitter/_EventSubscriptionVendor.js +1 -1
  195. package/React/Base/RCTAssert.h +30 -15
  196. package/React/Base/RCTAssert.m +59 -19
  197. package/React/Base/RCTBridge.m +5 -3
  198. package/React/Base/RCTConstants.h +6 -0
  199. package/React/Base/RCTConstants.m +15 -0
  200. package/React/Base/RCTConvert.m +8 -4
  201. package/React/Base/RCTEventDispatcherProtocol.h +5 -0
  202. package/React/Base/RCTRootView.m +0 -51
  203. package/React/Base/RCTTouchHandler.m +15 -1
  204. package/React/Base/RCTUIKit.h +21 -13
  205. package/React/Base/RCTUtils.m +33 -3
  206. package/React/Base/RCTVersion.m +1 -1
  207. package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm +0 -1
  208. package/React/Base/macOS/RCTPlatformDisplayLink.m +3 -1
  209. package/React/Base/macOS/RCTUIKit.m +53 -0
  210. package/React/CoreModules/RCTAppearance.mm +21 -5
  211. package/React/CoreModules/RCTDevLoadingView.mm +1 -1
  212. package/React/CoreModules/RCTEventDispatcher.mm +6 -1
  213. package/React/CoreModules/RCTLogBox.h +1 -1
  214. package/React/CoreModules/RCTLogBox.mm +35 -19
  215. package/React/CoreModules/RCTLogBoxView.h +8 -5
  216. package/React/CoreModules/RCTLogBoxView.mm +64 -23
  217. package/React/CoreModules/RCTPerfMonitor.mm +1 -1
  218. package/React/CoreModules/React-CoreModules.podspec +1 -1
  219. package/React/FBReactNativeSpec/FBReactNativeSpec.podspec +1 -1
  220. package/React/Fabric/Mounting/ComponentViews/ActivityIndicator/RCTActivityIndicatorViewComponentView.h +1 -1
  221. package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.h +1 -1
  222. package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryComponentView.mm +8 -8
  223. package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.h +2 -2
  224. package/React/Fabric/Mounting/ComponentViews/InputAccessory/RCTInputAccessoryContentView.mm +3 -3
  225. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.h +2 -1
  226. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +75 -25
  227. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.h +1 -1
  228. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.mm +1 -1
  229. package/React/Fabric/Mounting/ComponentViews/Modal/RCTFabricModalHostViewController.h +1 -1
  230. package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.h +2 -0
  231. package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm +10 -5
  232. package/React/Fabric/Mounting/ComponentViews/Root/RCTRootComponentView.h +1 -1
  233. package/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.h +1 -1
  234. package/React/Fabric/Mounting/ComponentViews/SafeAreaView/RCTSafeAreaViewComponentView.mm +0 -1
  235. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.h +3 -3
  236. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm +4 -4
  237. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.h +1 -1
  238. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm +1 -1
  239. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h +4 -4
  240. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +56 -30
  241. package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.h +1 -1
  242. package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm +5 -5
  243. package/React/Fabric/Mounting/ComponentViews/Switch/RCTSwitchComponentView.h +1 -1
  244. package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.h +1 -1
  245. package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.mm +1 -1
  246. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.h +2 -2
  247. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.mm +2 -2
  248. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.h +1 -1
  249. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +3 -0
  250. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.h +1 -1
  251. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +5 -5
  252. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.h +7 -6
  253. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputUtils.mm +4 -4
  254. package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.h +2 -1
  255. package/React/Fabric/Mounting/ComponentViews/UnimplementedComponent/RCTUnimplementedNativeComponentView.mm +2 -2
  256. package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.h +1 -1
  257. package/React/Fabric/Mounting/ComponentViews/UnimplementedView/RCTUnimplementedViewComponentView.mm +2 -2
  258. package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.h +5 -5
  259. package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +31 -23
  260. package/React/Fabric/Mounting/RCTComponentViewClassDescriptor.h +1 -1
  261. package/React/Fabric/Mounting/RCTComponentViewDescriptor.h +2 -2
  262. package/React/Fabric/Mounting/RCTComponentViewFactory.h +1 -1
  263. package/React/Fabric/Mounting/RCTComponentViewFactory.mm +12 -3
  264. package/React/Fabric/Mounting/RCTComponentViewProtocol.h +4 -4
  265. package/React/Fabric/Mounting/RCTComponentViewRegistry.h +2 -2
  266. package/React/Fabric/Mounting/RCTComponentViewRegistry.mm +3 -1
  267. package/React/Fabric/Mounting/RCTMountingManager.h +4 -4
  268. package/React/Fabric/Mounting/RCTMountingManager.mm +28 -19
  269. package/React/Fabric/Mounting/RCTMountingManagerDelegate.h +1 -1
  270. package/React/Fabric/Mounting/RCTMountingTransactionObserverCoordinator.h +5 -3
  271. package/React/Fabric/Mounting/RCTMountingTransactionObserverCoordinator.mm +10 -8
  272. package/React/Fabric/Mounting/RCTMountingTransactionObserving.h +6 -4
  273. package/React/Fabric/Mounting/UIView+ComponentViewProtocol.h +6 -6
  274. package/React/Fabric/Mounting/UIView+ComponentViewProtocol.mm +6 -6
  275. package/React/Fabric/RCTConversions.h +15 -7
  276. package/React/Fabric/RCTImageResponseDelegate.h +1 -1
  277. package/React/Fabric/RCTImageResponseObserverProxy.h +1 -0
  278. package/React/Fabric/RCTLocalizationProvider.h +1 -1
  279. package/React/Fabric/RCTLocalizationProvider.mm +10 -4
  280. package/React/Fabric/RCTScheduler.h +8 -1
  281. package/React/Fabric/RCTScheduler.mm +15 -0
  282. package/React/Fabric/RCTSurfacePresenter.h +10 -2
  283. package/React/Fabric/RCTSurfacePresenter.mm +59 -27
  284. package/React/Fabric/RCTSurfacePresenterBridgeAdapter.h +1 -1
  285. package/React/Fabric/RCTSurfaceRegistry.h +1 -1
  286. package/React/Fabric/RCTSurfaceTouchHandler.h +3 -3
  287. package/React/Fabric/RCTSurfaceTouchHandler.mm +8 -9
  288. package/React/Fabric/RCTTouchableComponentViewProtocol.h +1 -1
  289. package/React/Fabric/Surface/RCTFabricSurface.mm +1 -1
  290. package/React/Fabric/Utils/RCTGenericDelegateSplitter.h +1 -1
  291. package/React/Modules/RCTSurfacePresenterStub.h +4 -0
  292. package/React/Modules/RCTUIManager.m +35 -14
  293. package/React/React-RCTFabric.podspec +2 -2
  294. package/React/Views/RCTActivityIndicatorView.m +2 -1
  295. package/React/Views/RCTCursor.h +39 -0
  296. package/React/Views/RCTCursor.m +105 -0
  297. package/React/Views/RCTMaskedView.h +1 -1
  298. package/React/Views/RCTModalHostView.h +2 -2
  299. package/React/Views/RCTModalHostViewController.h +1 -1
  300. package/React/Views/RCTModalManager.h +1 -1
  301. package/React/Views/RCTView.h +16 -0
  302. package/React/Views/RCTView.m +142 -189
  303. package/React/Views/RCTViewKeyboardEvent.h +6 -28
  304. package/React/Views/RCTViewKeyboardEvent.m +66 -61
  305. package/React/Views/RCTViewManager.m +19 -13
  306. package/React/Views/RCTWeakViewHolder.h +1 -1
  307. package/React/Views/RCTWrapperViewController.h +2 -2
  308. package/React/Views/RefreshControl/RCTRefreshControl.h +2 -2
  309. package/React/Views/RefreshControl/RCTRefreshableProtocol.h +1 -1
  310. package/React/Views/SafeAreaView/RCTSafeAreaView.h +1 -1
  311. package/React/Views/SafeAreaView/RCTSafeAreaViewLocalData.h +1 -1
  312. package/React/Views/ScrollView/RCTScrollContentView.h +4 -0
  313. package/React/Views/ScrollView/RCTScrollContentView.m +18 -0
  314. package/React/Views/ScrollView/RCTScrollContentViewManager.m +2 -0
  315. package/React/Views/ScrollView/RCTScrollView.h +2 -1
  316. package/React/Views/ScrollView/RCTScrollView.m +72 -80
  317. package/React/Views/ScrollView/RCTScrollViewManager.m +1 -1
  318. package/React/Views/ScrollView/RCTScrollableProtocol.h +1 -1
  319. package/React/Views/UIView+React.h +2 -0
  320. package/React/Views/UIView+React.m +35 -18
  321. package/ReactAndroid/gradle.properties +1 -1
  322. package/ReactAndroid/src/androidTest/js/AnimatedTransformTestModule.js +1 -2
  323. package/ReactAndroid/src/androidTest/js/Asserts.js +2 -2
  324. package/ReactAndroid/src/androidTest/js/CatalystRootViewTestModule.js +1 -1
  325. package/ReactAndroid/src/androidTest/js/JSResponderTestApp.js +1 -2
  326. package/ReactAndroid/src/androidTest/js/LayoutEventsTestApp.js +1 -2
  327. package/ReactAndroid/src/androidTest/js/MeasureLayoutTestModule.js +54 -54
  328. package/ReactAndroid/src/androidTest/js/ProgressBarTestModule.js +1 -1
  329. package/ReactAndroid/src/androidTest/js/ScrollViewTestModule.js +6 -7
  330. package/ReactAndroid/src/androidTest/js/ShareTestModule.js +1 -1
  331. package/ReactAndroid/src/androidTest/js/SubviewsClippingTestModule.js +12 -19
  332. package/ReactAndroid/src/androidTest/js/SwipeRefreshLayoutTestModule.js +2 -3
  333. package/ReactAndroid/src/androidTest/js/TestJSLocaleModule.js +2 -2
  334. package/ReactAndroid/src/androidTest/js/TestJSToJavaParametersModule.js +17 -17
  335. package/ReactAndroid/src/androidTest/js/TestJavaToJSArgumentsModule.js +10 -10
  336. package/ReactAndroid/src/androidTest/js/TestJavaToJSReturnValuesModule.js +2 -2
  337. package/ReactAndroid/src/androidTest/js/TextInputTestModule.js +2 -3
  338. package/ReactAndroid/src/androidTest/js/TouchBubblingTestAppModule.js +3 -6
  339. package/ReactAndroid/src/androidTest/js/UIManagerTestModule.js +3 -6
  340. package/ReactAndroid/src/androidTest/js/ViewRenderingTestModule.js +5 -5
  341. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/viewPropConversions.h +527 -0
  342. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  343. package/ReactAndroid/src/main/jni/Application.mk +1 -1
  344. package/ReactAndroid/src/main/jni/first-party/fb/BUCK +1 -1
  345. package/ReactAndroid/src/main/jni/react/jni/Android.mk +2 -2
  346. package/ReactCommon/React-Fabric.podspec +1 -1
  347. package/ReactCommon/React-rncore.podspec +1 -1
  348. package/ReactCommon/ReactCommon.podspec +1 -1
  349. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  350. package/ReactCommon/cxxreact/tests/BUCK +1 -1
  351. package/ReactCommon/hermes/inspector/tools/msggen/package.json +1 -1
  352. package/ReactCommon/hermes/inspector/tools/msggen/src/HeaderWriter.js +1 -1
  353. package/ReactCommon/hermes/inspector/tools/msggen/src/index.js +1 -1
  354. package/ReactCommon/hermes/inspector/tools/msggen/yarn.lock +346 -1294
  355. package/ReactCommon/microprofiler/BUCK +1 -1
  356. package/ReactCommon/react/debug/react_native_assert.h +1 -1
  357. package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp +6 -6
  358. package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.h +4 -3
  359. package/ReactCommon/react/renderer/animations/conversions.h +11 -11
  360. package/ReactCommon/react/renderer/animations/tests/LayoutAnimationTest.cpp +1 -1
  361. package/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp +16 -16
  362. package/ReactCommon/react/renderer/attributedstring/TextAttributes.h +14 -14
  363. package/ReactCommon/react/renderer/attributedstring/conversions.h +1 -1
  364. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm +5 -0
  365. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h +3 -3
  366. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm +7 -5
  367. package/ReactCommon/react/renderer/components/text/ParagraphShadowNode.h +1 -1
  368. package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h +1 -1
  369. package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.cpp +1 -1
  370. package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.h +1 -1
  371. package/ReactCommon/react/renderer/components/textinput/iostextinput/primitives.h +3 -4
  372. package/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h +6 -6
  373. package/ReactCommon/react/renderer/components/view/ViewProps.h +3 -1
  374. package/ReactCommon/react/renderer/components/view/ViewPropsInterpolation.h +3 -3
  375. package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +16 -16
  376. package/ReactCommon/react/renderer/components/view/conversions.h +5 -6
  377. package/ReactCommon/react/renderer/components/view/primitives.h +4 -3
  378. package/ReactCommon/react/renderer/components/view/propsConversions.h +2 -0
  379. package/ReactCommon/react/renderer/core/ComponentDescriptor.h +5 -5
  380. package/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h +7 -7
  381. package/ReactCommon/react/renderer/core/ConcreteShadowNode.h +2 -2
  382. package/ReactCommon/react/renderer/core/EventDispatcher.cpp +21 -0
  383. package/ReactCommon/react/renderer/core/EventDispatcher.h +15 -0
  384. package/ReactCommon/react/renderer/core/EventListener.cpp +39 -0
  385. package/ReactCommon/react/renderer/core/EventListener.h +44 -0
  386. package/ReactCommon/react/renderer/core/Props.h +0 -4
  387. package/ReactCommon/react/renderer/core/RawProps.h +1 -1
  388. package/ReactCommon/react/renderer/core/ShadowNode.cpp +2 -2
  389. package/ReactCommon/react/renderer/core/ShadowNode.h +5 -5
  390. package/ReactCommon/react/renderer/core/propsConversions.h +6 -5
  391. package/ReactCommon/react/renderer/core/tests/ComponentDescriptorTest.cpp +3 -3
  392. package/ReactCommon/react/renderer/debug/debugStringConvertibleUtils.h +3 -3
  393. package/ReactCommon/react/renderer/graphics/React-graphics.podspec +1 -1
  394. package/ReactCommon/react/renderer/graphics/platform/ios/Color.h +1 -1
  395. package/ReactCommon/react/renderer/graphics/platform/ios/RCTPlatformColorUtils.mm +9 -9
  396. package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImageManager.h +1 -1
  397. package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImagePrimitivesConversions.h +1 -1
  398. package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTSyncImageManager.h +1 -1
  399. package/ReactCommon/react/renderer/mounting/MountingCoordinator.cpp +2 -2
  400. package/ReactCommon/react/renderer/mounting/MountingCoordinator.h +3 -3
  401. package/ReactCommon/react/renderer/mounting/MountingOverrideDelegate.h +1 -1
  402. package/ReactCommon/react/renderer/mounting/ShadowTreeRevision.h +0 -2
  403. package/ReactCommon/react/renderer/mounting/StubView.h +1 -1
  404. package/ReactCommon/react/renderer/mounting/StubViewTree.cpp +1 -1
  405. package/ReactCommon/react/renderer/mounting/TelemetryController.cpp +6 -9
  406. package/ReactCommon/react/renderer/mounting/TelemetryController.h +7 -7
  407. package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +3 -2
  408. package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h +7 -1
  409. package/ReactCommon/react/renderer/runtimescheduler/Task.h +3 -2
  410. package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +19 -2
  411. package/ReactCommon/react/renderer/scheduler/Scheduler.h +10 -1
  412. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/NSTextStorage+FontScaling.h +1 -1
  413. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.h +1 -1
  414. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm +15 -15
  415. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontProperties.h +1 -1
  416. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontUtils.h +1 -1
  417. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextLayoutManager.h +1 -1
  418. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextPrimitivesConversions.h +6 -6
  419. package/ReactCommon/react/utils/ContextContainer.h +2 -2
  420. package/ReactCommon/react/utils/ManagedObjectWrapper.h +1 -1
  421. package/ReactCommon/react/utils/ManagedObjectWrapper.mm +1 -3
  422. package/ReactCommon/react/utils/SimpleThreadSafeCache.h +2 -2
  423. package/ReactCommon/yoga/Yoga.podspec +1 -1
  424. package/jest/assetFileTransformer.js +2 -2
  425. package/jest/preprocessor.js +2 -2
  426. package/jest/setup.js +3 -3
  427. package/package.json +29 -29
  428. package/scripts/generate-artifacts.js +21 -17
  429. package/scripts/react_native_pods.rb +1 -4
  430. package/template/App.js +4 -8
  431. package/template/Gemfile.lock +10 -10
  432. package/template/android/gradlew.bat +89 -89
  433. package/template/ios/HelloWorldTests/HelloWorldTests.m +1 -0
  434. package/template/package.json +1 -1
  435. package/Libraries/Types/RootTagTypes.js~merged +0 -23
  436. package/ReactCommon/butter/optional.h +0 -38
  437. package/ReactCommon/react/renderer/mounting/MountingTransactionMetadata.h +0 -32
  438. package/third-party-podspecs/boost-for-react-native.podspec +0 -20
@@ -82,8 +82,8 @@ class AppContainer extends React.Component<Props, State> {
82
82
  !global.__RCTProfileIsProfiling &&
83
83
  !this.props.internal_excludeLogBox
84
84
  ) {
85
- const LogBoxNotificationContainer = require('../LogBox/LogBoxNotificationContainer')
86
- .default;
85
+ const LogBoxNotificationContainer =
86
+ require('../LogBox/LogBoxNotificationContainer').default;
87
87
  logBox = <LogBoxNotificationContainer />;
88
88
  }
89
89
  }
@@ -96,8 +96,7 @@ class AppContainer extends React.Component<Props, State> {
96
96
  style={styles.appContainer}
97
97
  ref={ref => {
98
98
  this._mainRef = ref;
99
- }}
100
- >
99
+ }}>
101
100
  {this.props.children}
102
101
  </View>
103
102
  );
@@ -110,8 +109,7 @@ class AppContainer extends React.Component<Props, State> {
110
109
  fabric={this.props.fabric === true}
111
110
  showArchitectureIndicator={
112
111
  this.props.showArchitectureIndicator === true
113
- }
114
- >
112
+ }>
115
113
  {innerView}
116
114
  </Wrapper>
117
115
  );
@@ -59,9 +59,8 @@ let runCount = 1;
59
59
  const sections: Runnables = {};
60
60
  const taskProviders: Map<string, TaskProvider> = new Map();
61
61
  const taskCancelProviders: Map<string, TaskCancelProvider> = new Map();
62
- let componentProviderInstrumentationHook: ComponentProviderInstrumentationHook = (
63
- component: ComponentProvider,
64
- ) => component();
62
+ let componentProviderInstrumentationHook: ComponentProviderInstrumentationHook =
63
+ (component: ComponentProvider) => component();
65
64
 
66
65
  let wrapperComponentProvider: ?WrapperComponentProvider;
67
66
  let showArchitectureIndicator = false;
@@ -18,11 +18,8 @@ const i18nConstants: {|
18
18
 
19
19
  function getI18nManagerConstants() {
20
20
  if (NativeI18nManager) {
21
- const {
22
- isRTL,
23
- doLeftAndRightSwapInRTL,
24
- localeIdentifier,
25
- } = NativeI18nManager.getConstants();
21
+ const {isRTL, doLeftAndRightSwapInRTL, localeIdentifier} =
22
+ NativeI18nManager.getConstants();
26
23
  return {isRTL, doLeftAndRightSwapInRTL, localeIdentifier};
27
24
  }
28
25
 
@@ -38,9 +38,8 @@ function getViewManagerConfig(viewManagerName: string): any {
38
38
  NativeUIManager.getConstantsForViewManager
39
39
  ) {
40
40
  try {
41
- viewManagerConfigs[
42
- viewManagerName
43
- ] = NativeUIManager.getConstantsForViewManager(viewManagerName);
41
+ viewManagerConfigs[viewManagerName] =
42
+ NativeUIManager.getConstantsForViewManager(viewManagerName);
44
43
  } catch (e) {
45
44
  console.error(
46
45
  "NativeUIManager.getConstantsForViewManager('" +
@@ -13,9 +13,8 @@ import * as React from 'react';
13
13
  // TODO: Make this into an opaque type.
14
14
  export opaque type RootTag = number;
15
15
 
16
- export const RootTagContext: React$Context<RootTag> = React.createContext<RootTag>(
17
- 0,
18
- );
16
+ export const RootTagContext: React$Context<RootTag> =
17
+ React.createContext<RootTag>(0);
19
18
 
20
19
  if (__DEV__) {
21
20
  RootTagContext.displayName = 'RootTagContext';
@@ -46,8 +46,7 @@ function renderApplication<Props: Object>(
46
46
  showArchitectureIndicator={showArchitectureIndicator}
47
47
  WrapperComponent={WrapperComponent}
48
48
  initialProps={initialProps ?? Object.freeze({})}
49
- internal_excludeLogBox={isLogBox}
50
- >
49
+ internal_excludeLogBox={isLogBox}>
51
50
  <RootComponent {...initialProps} rootTag={rootTag} />
52
51
  </AppContainer>
53
52
  </PerformanceLoggerContext.Provider>
@@ -35,7 +35,7 @@ Pod::Spec.new do |s|
35
35
  s.header_dir = "RCTSettings"
36
36
  s.pod_target_xcconfig = {
37
37
  "USE_HEADERMAP" => "YES",
38
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
38
+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
39
39
  "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\""
40
40
  }
41
41
 
@@ -47,13 +47,13 @@ const AsyncStorage = {
47
47
  *
48
48
  * See https://reactnative.dev/docs/asyncstorage#getitem
49
49
  */
50
- getItem: function(
50
+ getItem: function (
51
51
  key: string,
52
52
  callback?: ?(error: ?Error, result: ?string) => void,
53
53
  ): Promise<?string> {
54
54
  invariant(RCTAsyncStorage, 'RCTAsyncStorage not available');
55
55
  return new Promise((resolve, reject) => {
56
- RCTAsyncStorage.multiGet([key], function(errors, result) {
56
+ RCTAsyncStorage.multiGet([key], function (errors, result) {
57
57
  // Unpack result to get value from [[key,value]]
58
58
  const value = result && result[0] && result[0][1] ? result[0][1] : null;
59
59
  const errs = convertErrors(errors);
@@ -72,14 +72,14 @@ const AsyncStorage = {
72
72
  *
73
73
  * See https://reactnative.dev/docs/asyncstorage#setitem
74
74
  */
75
- setItem: function(
75
+ setItem: function (
76
76
  key: string,
77
77
  value: string,
78
78
  callback?: ?(error: ?Error) => void,
79
79
  ): Promise<void> {
80
80
  invariant(RCTAsyncStorage, 'RCTAsyncStorage not available');
81
81
  return new Promise((resolve, reject) => {
82
- RCTAsyncStorage.multiSet([[key, value]], function(errors) {
82
+ RCTAsyncStorage.multiSet([[key, value]], function (errors) {
83
83
  const errs = convertErrors(errors);
84
84
  callback && callback(errs && errs[0]);
85
85
  if (errs) {
@@ -96,13 +96,13 @@ const AsyncStorage = {
96
96
  *
97
97
  * See https://reactnative.dev/docs/asyncstorage#removeitem
98
98
  */
99
- removeItem: function(
99
+ removeItem: function (
100
100
  key: string,
101
101
  callback?: ?(error: ?Error) => void,
102
102
  ): Promise<void> {
103
103
  invariant(RCTAsyncStorage, 'RCTAsyncStorage not available');
104
104
  return new Promise((resolve, reject) => {
105
- RCTAsyncStorage.multiRemove([key], function(errors) {
105
+ RCTAsyncStorage.multiRemove([key], function (errors) {
106
106
  const errs = convertErrors(errors);
107
107
  callback && callback(errs && errs[0]);
108
108
  if (errs) {
@@ -122,14 +122,14 @@ const AsyncStorage = {
122
122
  *
123
123
  * See https://reactnative.dev/docs/asyncstorage#mergeitem
124
124
  */
125
- mergeItem: function(
125
+ mergeItem: function (
126
126
  key: string,
127
127
  value: string,
128
128
  callback?: ?(error: ?Error) => void,
129
129
  ): Promise<void> {
130
130
  invariant(RCTAsyncStorage, 'RCTAsyncStorage not available');
131
131
  return new Promise((resolve, reject) => {
132
- RCTAsyncStorage.multiMerge([[key, value]], function(errors) {
132
+ RCTAsyncStorage.multiMerge([[key, value]], function (errors) {
133
133
  const errs = convertErrors(errors);
134
134
  callback && callback(errs && errs[0]);
135
135
  if (errs) {
@@ -148,10 +148,10 @@ const AsyncStorage = {
148
148
  *
149
149
  * See https://reactnative.dev/docs/asyncstorage#clear
150
150
  */
151
- clear: function(callback?: ?(error: ?Error) => void): Promise<void> {
151
+ clear: function (callback?: ?(error: ?Error) => void): Promise<void> {
152
152
  invariant(RCTAsyncStorage, 'RCTAsyncStorage not available');
153
153
  return new Promise((resolve, reject) => {
154
- RCTAsyncStorage.clear(function(error) {
154
+ RCTAsyncStorage.clear(function (error) {
155
155
  callback && callback(convertError(error));
156
156
  if (error && convertError(error)) {
157
157
  reject(convertError(error));
@@ -167,12 +167,12 @@ const AsyncStorage = {
167
167
  *
168
168
  * See https://reactnative.dev/docs/asyncstorage#getallkeys
169
169
  */
170
- getAllKeys: function(
170
+ getAllKeys: function (
171
171
  callback?: ?(error: ?Error, keys: ?Array<string>) => void,
172
172
  ): Promise<?Array<string>> {
173
173
  invariant(RCTAsyncStorage, 'RCTAsyncStorage not available');
174
174
  return new Promise((resolve, reject) => {
175
- RCTAsyncStorage.getAllKeys(function(error, keys) {
175
+ RCTAsyncStorage.getAllKeys(function (error, keys) {
176
176
  callback && callback(convertError(error), keys);
177
177
  if (error) {
178
178
  reject(convertError(error));
@@ -198,7 +198,7 @@ const AsyncStorage = {
198
198
  *
199
199
  * See https://reactnative.dev/docs/asyncstorage#flushgetrequests
200
200
  * */
201
- flushGetRequests: function(): void {
201
+ flushGetRequests: function (): void {
202
202
  const getRequests = this._getRequests;
203
203
  const getKeys = this._getKeys;
204
204
 
@@ -206,7 +206,7 @@ const AsyncStorage = {
206
206
  this._getKeys = [];
207
207
 
208
208
  invariant(RCTAsyncStorage, 'RCTAsyncStorage not available');
209
- RCTAsyncStorage.multiGet(getKeys, function(errors, result) {
209
+ RCTAsyncStorage.multiGet(getKeys, function (errors, result) {
210
210
  // Even though the runtime complexity of this is theoretically worse vs if we used a map,
211
211
  // it's much, much faster in practice for the data sets we deal with (we avoid
212
212
  // allocating result pair arrays). This was heavily benchmarked.
@@ -237,7 +237,7 @@ const AsyncStorage = {
237
237
  *
238
238
  * See https://reactnative.dev/docs/asyncstorage#multiget
239
239
  */
240
- multiGet: function(
240
+ multiGet: function (
241
241
  keys: Array<string>,
242
242
  callback?: ?(errors: ?Array<Error>, result: ?Array<Array<string>>) => void,
243
243
  ): Promise<?Array<Array<string>>> {
@@ -272,13 +272,13 @@ const AsyncStorage = {
272
272
  *
273
273
  * See https://reactnative.dev/docs/asyncstorage#multiset
274
274
  */
275
- multiSet: function(
275
+ multiSet: function (
276
276
  keyValuePairs: Array<Array<string>>,
277
277
  callback?: ?(errors: ?Array<Error>) => void,
278
278
  ): Promise<void> {
279
279
  invariant(RCTAsyncStorage, 'RCTAsyncStorage not available');
280
280
  return new Promise((resolve, reject) => {
281
- RCTAsyncStorage.multiSet(keyValuePairs, function(errors) {
281
+ RCTAsyncStorage.multiSet(keyValuePairs, function (errors) {
282
282
  const error = convertErrors(errors);
283
283
  callback && callback(error);
284
284
  if (error) {
@@ -295,13 +295,13 @@ const AsyncStorage = {
295
295
  *
296
296
  * See https://reactnative.dev/docs/asyncstorage#multiremove
297
297
  */
298
- multiRemove: function(
298
+ multiRemove: function (
299
299
  keys: Array<string>,
300
300
  callback?: ?(errors: ?Array<Error>) => void,
301
301
  ): Promise<void> {
302
302
  invariant(RCTAsyncStorage, 'RCTAsyncStorage not available');
303
303
  return new Promise((resolve, reject) => {
304
- RCTAsyncStorage.multiRemove(keys, function(errors) {
304
+ RCTAsyncStorage.multiRemove(keys, function (errors) {
305
305
  const error = convertErrors(errors);
306
306
  callback && callback(error);
307
307
  if (error) {
@@ -321,13 +321,13 @@ const AsyncStorage = {
321
321
  *
322
322
  * See https://reactnative.dev/docs/asyncstorage#multimerge
323
323
  */
324
- multiMerge: function(
324
+ multiMerge: function (
325
325
  keyValuePairs: Array<Array<string>>,
326
326
  callback?: ?(errors: ?Array<Error>) => void,
327
327
  ): Promise<void> {
328
328
  invariant(RCTAsyncStorage, 'RCTAsyncStorage not available');
329
329
  return new Promise((resolve, reject) => {
330
- RCTAsyncStorage.multiMerge(keyValuePairs, function(errors) {
330
+ RCTAsyncStorage.multiMerge(keyValuePairs, function (errors) {
331
331
  const error = convertErrors(errors);
332
332
  callback && callback(error);
333
333
  if (error) {
@@ -74,7 +74,8 @@ export type ImageStyleProp = ____ImageStyleProp_Internal;
74
74
  * through to an underlying component. Using this is almost always a mistake
75
75
  * and using one of the other more restrictive types is likely the right choice.
76
76
  */
77
- export type DangerouslyImpreciseStyleProp = ____DangerouslyImpreciseStyleProp_Internal;
77
+ export type DangerouslyImpreciseStyleProp =
78
+ ____DangerouslyImpreciseStyleProp_Internal;
78
79
 
79
80
  /**
80
81
  * Utility type for getting the values for specific style keys.
@@ -16,6 +16,29 @@ import type {NativeColorValue} from './PlatformColorValueTypes';
16
16
 
17
17
  export type ____ColorValue_Internal = null | string | NativeColorValue;
18
18
 
19
+ export type CursorValue = ?(
20
+ | 'alias'
21
+ | 'auto'
22
+ | 'col-resize'
23
+ | 'context-menu'
24
+ | 'copy'
25
+ | 'crosshair'
26
+ | 'default'
27
+ | 'disappearing-item'
28
+ | 'e-resize'
29
+ | 'grab'
30
+ | 'grabbing'
31
+ | 'n-resize'
32
+ | 'no-drop'
33
+ | 'not-allowed'
34
+ | 'pointer'
35
+ | 'row-resize'
36
+ | 's-resize'
37
+ | 'text'
38
+ | 'vertical-text'
39
+ | 'w-resize'
40
+ );
41
+
19
42
  export type ColorArrayValue = null | $ReadOnlyArray<____ColorValue_Internal>;
20
43
  export type PointValue = {|
21
44
  x: number,
@@ -584,6 +607,7 @@ export type ____ViewStyle_Internal = $ReadOnly<{|
584
607
  borderTopWidth?: number | AnimatedNode,
585
608
  opacity?: number | AnimatedNode,
586
609
  elevation?: number,
610
+ cursor?: CursorValue,
587
611
  |}>;
588
612
 
589
613
  export type ____FontWeight_Internal =
@@ -638,6 +662,7 @@ export type ____TextStyle_Internal = $ReadOnly<{|
638
662
  textDecorationColor?: ____ColorValue_Internal,
639
663
  textTransform?: 'none' | 'capitalize' | 'uppercase' | 'lowercase',
640
664
  writingDirection?: 'auto' | 'ltr' | 'rtl',
665
+ cursor?: CursorValue,
641
666
  |}>;
642
667
 
643
668
  export type ____ImageStyle_Internal = $ReadOnly<{|
@@ -678,7 +703,7 @@ export type ____ImageStyleProp_Internal = GenericStyleProp<
678
703
 
679
704
  export type ____Styles_Internal = {
680
705
  +[key: string]: $Shape<____DangerouslyImpreciseStyle_Internal>,
681
- ...,
706
+ ...
682
707
  };
683
708
 
684
709
  export type ____FlattenStyleProp_Internal<+TStyleProp> = $Call<
@@ -31,8 +31,8 @@ function processColor(color?: ?(number | ColorValue)): ?ProcessedColorValue {
31
31
  }
32
32
 
33
33
  if (typeof normalizedColor === 'object') {
34
- const processColorObject = require('./PlatformColorValueTypes')
35
- .processColorObject;
34
+ const processColorObject =
35
+ require('./PlatformColorValueTypes').processColorObject;
36
36
 
37
37
  const processedColorObj = processColorObject(normalizedColor);
38
38
 
@@ -10,9 +10,7 @@
10
10
 
11
11
  import type {____ViewStyle_Internal} from './StyleSheetTypes';
12
12
 
13
- export default function splitLayoutProps(
14
- props: ?____ViewStyle_Internal,
15
- ): {
13
+ export default function splitLayoutProps(props: ?____ViewStyle_Internal): {
16
14
  outer: ?____ViewStyle_Internal,
17
15
  inner: ?____ViewStyle_Internal,
18
16
  } {
@@ -6,6 +6,9 @@
6
6
  */
7
7
 
8
8
  #import <React/RCTBaseTextViewManager.h>
9
+ #if TARGET_OS_OSX // [TODO(macOS GH#774)
10
+ #import <React/RCTCursor.h>
11
+ #endif // ]TODO(macOS GH#774)
9
12
 
10
13
  @implementation RCTBaseTextViewManager
11
14
 
@@ -36,6 +39,7 @@ RCT_REMAP_SHADOW_PROPERTY(fontWeight, textAttributes.fontWeight, NSString)
36
39
  RCT_REMAP_SHADOW_PROPERTY(fontStyle, textAttributes.fontStyle, NSString)
37
40
  RCT_REMAP_SHADOW_PROPERTY(fontVariant, textAttributes.fontVariant, NSArray)
38
41
  RCT_REMAP_SHADOW_PROPERTY(allowFontScaling, textAttributes.allowFontScaling, BOOL)
42
+ RCT_REMAP_SHADOW_PROPERTY(dynamicTypeRamp, textAttributes.dynamicTypeRamp, RCTDynamicTypeRamp) // TODO(macOS GH#774)
39
43
  RCT_REMAP_SHADOW_PROPERTY(maxFontSizeMultiplier, textAttributes.maxFontSizeMultiplier, CGFloat)
40
44
  RCT_REMAP_SHADOW_PROPERTY(letterSpacing, textAttributes.letterSpacing, CGFloat)
41
45
  RCT_REMAP_SHADOW_PROPERTY(apple_fontSmoothing, textAttributes.fontSmoothing, RCTFontSmoothing) // TODO(OSS Candidate ISS#2710739)
@@ -55,4 +59,8 @@ RCT_REMAP_SHADOW_PROPERTY(textShadowColor, textAttributes.textShadowColor, UICol
55
59
  RCT_REMAP_SHADOW_PROPERTY(isHighlighted, textAttributes.isHighlighted, BOOL)
56
60
  RCT_REMAP_SHADOW_PROPERTY(textTransform, textAttributes.textTransform, RCTTextTransform)
57
61
 
62
+ #if TARGET_OS_OSX // [TODO(macOS GH#774)
63
+ RCT_REMAP_SHADOW_PROPERTY(cursor, textAttributes.cursor, RCTCursor)
64
+ #endif // ]TODO(macOS GH#774)
65
+
58
66
  @end
@@ -6,12 +6,15 @@
6
6
  */
7
7
 
8
8
  #import <React/RCTUIKit.h> // TODO(macOS GH#774)
9
-
10
9
  #import <React/RCTTextDecorationLineType.h>
11
- #import <React/RCTFontSmoothing.h> // TODO(OSS Candidate ISS#2710739)
12
-
10
+ #import <React/RCTDynamicTypeRamp.h> // TODO(macOS GH#774)
11
+ #import <React/RCTFontSmoothing.h> // TODO(macOS GH#774)
13
12
  #import "RCTTextTransform.h"
14
13
 
14
+ #if TARGET_OS_OSX // [TODO(macOS GH#774)
15
+ #import <React/RCTCursor.h>
16
+ #endif // ]TODO(macOS GH#774)
17
+
15
18
  NS_ASSUME_NONNULL_BEGIN
16
19
 
17
20
  extern NSString *const RCTTextAttributesIsHighlightedAttributeName;
@@ -38,6 +41,7 @@ extern NSString *const RCTTextAttributesTagAttributeName;
38
41
  @property (nonatomic, copy, nullable) NSString *fontStyle;
39
42
  @property (nonatomic, copy, nullable) NSArray<NSString *> *fontVariant;
40
43
  @property (nonatomic, assign) BOOL allowFontScaling;
44
+ @property (nonatomic, assign) RCTDynamicTypeRamp dynamicTypeRamp; // TODO(macOS GH#774)
41
45
  @property (nonatomic, assign) CGFloat letterSpacing;
42
46
  @property (nonatomic, assign) RCTFontSmoothing fontSmoothing; // TODO(OSS Candidate ISS#2710739)
43
47
  @property (class, nonatomic, assign) RCTFontSmoothing fontSmoothingDefault; // TODO(OSS Candidate ISS#2710739)
@@ -59,6 +63,10 @@ extern NSString *const RCTTextAttributesTagAttributeName;
59
63
  @property (nonatomic, assign) UIUserInterfaceLayoutDirection layoutDirection;
60
64
  @property (nonatomic, assign) RCTTextTransform textTransform;
61
65
 
66
+ #if TARGET_OS_OSX // [TODO(macOS GH#774)
67
+ @property (nonatomic, assign) RCTCursor cursor;
68
+ #endif // ]TODO(macOS GH#774)
69
+
62
70
  #pragma mark - Inheritance
63
71
 
64
72
  - (void)applyTextAttributes:(RCTTextAttributes *)textAttributes;
@@ -11,12 +11,27 @@
11
11
  #import <React/RCTFont.h>
12
12
  #import <React/RCTLog.h>
13
13
 
14
+ #if TARGET_OS_OSX // [TODO(macOS GH#774)
15
+ #import <React/RCTCursor.h>
16
+ #endif // ]TODO(macOS GH#774)
17
+
14
18
  NSString *const RCTTextAttributesIsHighlightedAttributeName = @"RCTTextAttributesIsHighlightedAttributeName";
15
19
  NSString *const RCTTextAttributesFontSmoothingAttributeName = @"RCTTextAttributesFontSmoothingAttributeName"; // TODO(OSS Candidate ISS#2710739)
16
20
  NSString *const RCTTextAttributesTagAttributeName = @"RCTTextAttributesTagAttributeName";
17
21
 
18
22
  @implementation RCTTextAttributes
19
23
 
24
+ // [TODO(macOS GH#774)
25
+ + (RCTUIColor *)defaultForegroundColor
26
+ {
27
+ if (@available(iOS 13.0, *)) {
28
+ return [RCTUIColor labelColor];
29
+ } else {
30
+ return [RCTUIColor blackColor];
31
+ }
32
+ }
33
+ // ]TODO(macOS GH#774)
34
+
20
35
  - (instancetype)init
21
36
  {
22
37
  if (self = [super init]) {
@@ -31,13 +46,12 @@ NSString *const RCTTextAttributesTagAttributeName = @"RCTTextAttributesTagAttrib
31
46
  _textShadowRadius = NAN;
32
47
  _opacity = NAN;
33
48
  _textTransform = RCTTextTransformUndefined;
34
- // [TODO(OSS Candidate ISS#2710739)
35
- if (@available(iOS 13.0, *)) {
36
- _foregroundColor = [RCTUIColor labelColor];
37
- } else {
38
- _foregroundColor = [RCTUIColor blackColor];
39
- }
40
- // ]TODO(OSS Candidate ISS#2710739)
49
+ // [TODO(macOS GH#774)
50
+ _foregroundColor = [RCTTextAttributes defaultForegroundColor];
51
+ // ]TODO(macOS GH#774)
52
+ #if TARGET_OS_OSX // [TODO(macOS GH#774)
53
+ _cursor = RCTCursorAuto;
54
+ #endif // ]TODO(macOS GH#774)
41
55
  }
42
56
 
43
57
  return self;
@@ -50,7 +64,7 @@ NSString *const RCTTextAttributesTagAttributeName = @"RCTTextAttributesTagAttrib
50
64
  // We will address this in the future.
51
65
 
52
66
  // Color
53
- _foregroundColor = textAttributes->_foregroundColor ?: _foregroundColor;
67
+ _foregroundColor = textAttributes->_foregroundColor == [RCTTextAttributes defaultForegroundColor] ? _foregroundColor : textAttributes->_foregroundColor;
54
68
  _backgroundColor = textAttributes->_backgroundColor ?: _backgroundColor;
55
69
  _opacity = !isnan(textAttributes->_opacity) ? (isnan(_opacity) ? 1.0 : _opacity) * textAttributes->_opacity : _opacity;
56
70
 
@@ -63,6 +77,7 @@ NSString *const RCTTextAttributesTagAttributeName = @"RCTTextAttributesTagAttrib
63
77
  _fontStyle = textAttributes->_fontStyle ?: _fontStyle;
64
78
  _fontVariant = textAttributes->_fontVariant ?: _fontVariant;
65
79
  _allowFontScaling = textAttributes->_allowFontScaling || _allowFontScaling; // *
80
+ _dynamicTypeRamp = textAttributes->_dynamicTypeRamp != RCTDynamicTypeRampUndefined ? textAttributes->_dynamicTypeRamp : _dynamicTypeRamp; // TODO(macOS GH#774)
66
81
  _letterSpacing = !isnan(textAttributes->_letterSpacing) ? textAttributes->_letterSpacing : _letterSpacing;
67
82
  _fontSmoothing = textAttributes->_fontSmoothing != RCTFontSmoothingAuto ? textAttributes->_fontSmoothing : _fontSmoothing; // TODO(OSS Candidate ISS#2710739)
68
83
 
@@ -86,6 +101,10 @@ NSString *const RCTTextAttributesTagAttributeName = @"RCTTextAttributesTagAttrib
86
101
  _tag = textAttributes->_tag ?: _tag;
87
102
  _layoutDirection = textAttributes->_layoutDirection != UIUserInterfaceLayoutDirectionLeftToRight ? textAttributes->_layoutDirection : _layoutDirection;
88
103
  _textTransform = textAttributes->_textTransform != RCTTextTransformUndefined ? textAttributes->_textTransform : _textTransform;
104
+
105
+ #if TARGET_OS_OSX // [TODO(macOS GH#774)
106
+ _cursor = textAttributes->_cursor != RCTCursorAuto ? textAttributes->_cursor : _cursor;
107
+ #endif // ]TODO(macOS GH#774)
89
108
  }
90
109
 
91
110
  - (NSParagraphStyle *)effectiveParagraphStyle
@@ -102,27 +121,27 @@ NSString *const RCTTextAttributesTagAttributeName = @"RCTTextAttributesTagAttrib
102
121
  alignment = NSTextAlignmentRight;
103
122
  }
104
123
  }
105
-
124
+
106
125
  paragraphStyle.alignment = alignment;
107
126
  isParagraphStyleUsed = YES;
108
127
  }
109
-
128
+
110
129
  if (_baseWritingDirection != NSWritingDirectionNatural) {
111
130
  paragraphStyle.baseWritingDirection = _baseWritingDirection;
112
131
  isParagraphStyleUsed = YES;
113
132
  }
114
-
133
+
115
134
  if (!isnan(_lineHeight)) {
116
135
  CGFloat lineHeight = _lineHeight * self.effectiveFontSizeMultiplier;
117
136
  paragraphStyle.minimumLineHeight = lineHeight;
118
137
  paragraphStyle.maximumLineHeight = lineHeight;
119
138
  isParagraphStyleUsed = YES;
120
139
  }
121
-
140
+
122
141
  if (isParagraphStyleUsed) {
123
142
  return [paragraphStyle copy];
124
143
  }
125
-
144
+
126
145
  return nil;
127
146
  }
128
147
 
@@ -202,6 +221,12 @@ NSString *const RCTTextAttributesTagAttributeName = @"RCTTextAttributesTagAttrib
202
221
  attributes[RCTTextAttributesTagAttributeName] = _tag;
203
222
  }
204
223
 
224
+ #if TARGET_OS_OSX // [TODO(macOS GH#774)
225
+ if (_cursor != RCTCursorAuto) {
226
+ attributes[NSCursorAttributeName] = [RCTConvert NSCursor:_cursor];
227
+ }
228
+ #endif // ]TODO(macOS GH#774)
229
+
205
230
  return [attributes copy];
206
231
  }
207
232
 
@@ -223,6 +248,13 @@ NSString *const RCTTextAttributesTagAttributeName = @"RCTTextAttributesTagAttrib
223
248
 
224
249
  if (fontScalingEnabled) {
225
250
  CGFloat fontSizeMultiplier = !isnan(_fontSizeMultiplier) ? _fontSizeMultiplier : 1.0;
251
+ #if !TARGET_OS_OSX // [TODO(macOS GH#774)
252
+ if (_dynamicTypeRamp != RCTDynamicTypeRampUndefined) {
253
+ UIFontMetrics *fontMetrics = RCTUIFontMetricsForDynamicTypeRamp(_dynamicTypeRamp);
254
+ CGFloat baseSize = RCTBaseSizeForDynamicTypeRamp(_dynamicTypeRamp);
255
+ fontSizeMultiplier = [fontMetrics scaledValueForValue:baseSize] / baseSize;
256
+ }
257
+ #endif // ]TODO(macOS GH#774)
226
258
  CGFloat maxFontSizeMultiplier = !isnan(_maxFontSizeMultiplier) ? _maxFontSizeMultiplier : 0.0;
227
259
  return maxFontSizeMultiplier >= 1.0 ? fminf(maxFontSizeMultiplier, fontSizeMultiplier) : fontSizeMultiplier;
228
260
  } else {
@@ -321,6 +353,7 @@ static NSString *capitalizeText(NSString *text)
321
353
  RCTTextAttributesCompareObjects(_fontStyle) &&
322
354
  RCTTextAttributesCompareObjects(_fontVariant) &&
323
355
  RCTTextAttributesCompareOthers(_allowFontScaling) &&
356
+ RCTTextAttributesCompareOthers(_dynamicTypeRamp) && // TODO(macOS GH#774)
324
357
  RCTTextAttributesCompareFloats(_letterSpacing) &&
325
358
  RCTTextAttributesCompareOthers(_fontSmoothing) && // TODO(OSS Candidate ISS#2710739)
326
359
  // Paragraph Styles
@@ -0,0 +1,40 @@
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
+ // TODO(macOS GH#774)
9
+
10
+ #import <Foundation/Foundation.h>
11
+
12
+ #import <React/RCTConvert.h>
13
+
14
+ typedef NS_ENUM(NSInteger, RCTDynamicTypeRamp) {
15
+ RCTDynamicTypeRampUndefined,
16
+ RCTDynamicTypeRampCaption2,
17
+ RCTDynamicTypeRampCaption1,
18
+ RCTDynamicTypeRampFootnote,
19
+ RCTDynamicTypeRampSubheadline,
20
+ RCTDynamicTypeRampCallout,
21
+ RCTDynamicTypeRampBody,
22
+ RCTDynamicTypeRampHeadline,
23
+ RCTDynamicTypeRampTitle3,
24
+ RCTDynamicTypeRampTitle2,
25
+ RCTDynamicTypeRampTitle1,
26
+ RCTDynamicTypeRampLargeTitle
27
+ };
28
+
29
+ @interface RCTConvert (DynamicTypeRamp)
30
+
31
+ + (RCTDynamicTypeRamp)RCTDynamicTypeRamp:(nullable id)json;
32
+
33
+ @end
34
+
35
+ #if !TARGET_OS_OSX // [TODO(macOS GH#774)
36
+ /// Generates a `UIFontMetrics` instance representing a particular Dynamic Type ramp.
37
+ UIFontMetrics * _Nonnull RCTUIFontMetricsForDynamicTypeRamp(RCTDynamicTypeRamp dynamicTypeRamp);
38
+ /// The "reference" size for a particular font scale ramp, equal to a text element's size under default text size settings.
39
+ CGFloat RCTBaseSizeForDynamicTypeRamp(RCTDynamicTypeRamp dynamicTypeRamp);
40
+ #endif // ]TODO(macOS GH#774)