react-native-macos 0.0.0-84c08634e → 0.0.0-85c94d35d

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 (445) 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 +10 -33
  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 -1
  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 +41 -5
  97. package/Libraries/Lists/ViewabilityHelper.js +4 -10
  98. package/Libraries/Lists/VirtualizeUtils.js +2 -6
  99. package/Libraries/Lists/VirtualizedList.js +140 -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 +105 -7
  156. package/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h +13 -1
  157. package/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.m +20 -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 +128 -4
  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 +68 -2
  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 +59 -13
  207. package/React/Base/RCTUtils.m +33 -3
  208. package/React/Base/RCTVersion.m +1 -1
  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 +72 -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 +0 -1
  239. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.h +3 -3
  240. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm +4 -4
  241. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.h +1 -1
  242. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTPullToRefreshViewComponentView.mm +1 -1
  243. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h +4 -4
  244. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +56 -30
  245. package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.h +1 -1
  246. package/React/Fabric/Mounting/ComponentViews/Slider/RCTSliderComponentView.mm +5 -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 +1 -1
  250. package/React/Fabric/Mounting/ComponentViews/Text/RCTAccessibilityElement.mm +1 -1
  251. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.h +2 -2
  252. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentAccessibilityProvider.mm +2 -2
  253. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.h +1 -1
  254. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +3 -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 +31 -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 +28 -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 +15 -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 +1 -1
  295. package/React/Fabric/Utils/RCTGenericDelegateSplitter.h +1 -1
  296. package/React/Modules/RCTSurfacePresenterStub.h +4 -0
  297. package/React/Modules/RCTUIManager.m +35 -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/RCTView.h +16 -0
  307. package/React/Views/RCTView.m +142 -189
  308. package/React/Views/RCTViewKeyboardEvent.h +6 -28
  309. package/React/Views/RCTViewKeyboardEvent.m +66 -61
  310. package/React/Views/RCTViewManager.m +19 -13
  311. package/React/Views/RCTWeakViewHolder.h +1 -1
  312. package/React/Views/RCTWrapperViewController.h +2 -2
  313. package/React/Views/RefreshControl/RCTRefreshControl.h +2 -2
  314. package/React/Views/RefreshControl/RCTRefreshableProtocol.h +1 -1
  315. package/React/Views/SafeAreaView/RCTSafeAreaView.h +1 -1
  316. package/React/Views/SafeAreaView/RCTSafeAreaViewLocalData.h +1 -1
  317. package/React/Views/ScrollView/RCTScrollContentView.h +4 -0
  318. package/React/Views/ScrollView/RCTScrollContentView.m +18 -0
  319. package/React/Views/ScrollView/RCTScrollContentViewManager.m +2 -0
  320. package/React/Views/ScrollView/RCTScrollView.h +2 -1
  321. package/React/Views/ScrollView/RCTScrollView.m +66 -89
  322. package/React/Views/ScrollView/RCTScrollViewManager.m +1 -1
  323. package/React/Views/ScrollView/RCTScrollableProtocol.h +1 -1
  324. package/React/Views/UIView+React.h +2 -0
  325. package/React/Views/UIView+React.m +23 -14
  326. package/ReactAndroid/gradle.properties +1 -1
  327. package/ReactAndroid/src/androidTest/js/AnimatedTransformTestModule.js +1 -2
  328. package/ReactAndroid/src/androidTest/js/Asserts.js +2 -2
  329. package/ReactAndroid/src/androidTest/js/CatalystRootViewTestModule.js +1 -1
  330. package/ReactAndroid/src/androidTest/js/JSResponderTestApp.js +1 -2
  331. package/ReactAndroid/src/androidTest/js/LayoutEventsTestApp.js +1 -2
  332. package/ReactAndroid/src/androidTest/js/MeasureLayoutTestModule.js +54 -54
  333. package/ReactAndroid/src/androidTest/js/ProgressBarTestModule.js +1 -1
  334. package/ReactAndroid/src/androidTest/js/ScrollViewTestModule.js +6 -7
  335. package/ReactAndroid/src/androidTest/js/ShareTestModule.js +1 -1
  336. package/ReactAndroid/src/androidTest/js/SubviewsClippingTestModule.js +12 -19
  337. package/ReactAndroid/src/androidTest/js/SwipeRefreshLayoutTestModule.js +2 -3
  338. package/ReactAndroid/src/androidTest/js/TestJSLocaleModule.js +2 -2
  339. package/ReactAndroid/src/androidTest/js/TestJSToJavaParametersModule.js +17 -17
  340. package/ReactAndroid/src/androidTest/js/TestJavaToJSArgumentsModule.js +10 -10
  341. package/ReactAndroid/src/androidTest/js/TestJavaToJSReturnValuesModule.js +2 -2
  342. package/ReactAndroid/src/androidTest/js/TextInputTestModule.js +2 -3
  343. package/ReactAndroid/src/androidTest/js/TouchBubblingTestAppModule.js +3 -6
  344. package/ReactAndroid/src/androidTest/js/UIManagerTestModule.js +3 -6
  345. package/ReactAndroid/src/androidTest/js/ViewRenderingTestModule.js +5 -5
  346. package/ReactAndroid/src/main/java/com/facebook/react/fabric/jni/viewPropConversions.h +527 -0
  347. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  348. package/ReactAndroid/src/main/jni/Application.mk +1 -1
  349. package/ReactAndroid/src/main/jni/first-party/fb/BUCK +1 -1
  350. package/ReactAndroid/src/main/jni/react/jni/Android.mk +2 -2
  351. package/ReactCommon/React-Fabric.podspec +1 -1
  352. package/ReactCommon/React-rncore.podspec +1 -1
  353. package/ReactCommon/ReactCommon.podspec +1 -1
  354. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  355. package/ReactCommon/cxxreact/tests/BUCK +1 -1
  356. package/ReactCommon/hermes/inspector/tools/msggen/src/HeaderWriter.js +1 -1
  357. package/ReactCommon/hermes/inspector/tools/msggen/src/index.js +1 -1
  358. package/ReactCommon/hermes/inspector/tools/msggen/yarn.lock +3 -3
  359. package/ReactCommon/microprofiler/BUCK +1 -1
  360. package/ReactCommon/react/debug/react_native_assert.h +1 -1
  361. package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.cpp +6 -6
  362. package/ReactCommon/react/renderer/animations/LayoutAnimationKeyFrameManager.h +4 -3
  363. package/ReactCommon/react/renderer/animations/conversions.h +11 -11
  364. package/ReactCommon/react/renderer/animations/tests/LayoutAnimationTest.cpp +1 -1
  365. package/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp +16 -16
  366. package/ReactCommon/react/renderer/attributedstring/TextAttributes.h +14 -14
  367. package/ReactCommon/react/renderer/attributedstring/conversions.h +1 -1
  368. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm +5 -0
  369. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h +3 -3
  370. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm +7 -5
  371. package/ReactCommon/react/renderer/components/text/ParagraphShadowNode.h +1 -1
  372. package/ReactCommon/react/renderer/components/textinput/androidtextinput/react/renderer/components/androidtextinput/AndroidTextInputShadowNode.h +1 -1
  373. package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.cpp +1 -1
  374. package/ReactCommon/react/renderer/components/textinput/iostextinput/TextInputProps.h +1 -1
  375. package/ReactCommon/react/renderer/components/textinput/iostextinput/primitives.h +3 -4
  376. package/ReactCommon/react/renderer/components/view/AccessibilityPrimitives.h +6 -6
  377. package/ReactCommon/react/renderer/components/view/ViewProps.h +3 -1
  378. package/ReactCommon/react/renderer/components/view/ViewPropsInterpolation.h +3 -3
  379. package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +16 -16
  380. package/ReactCommon/react/renderer/components/view/conversions.h +5 -6
  381. package/ReactCommon/react/renderer/components/view/primitives.h +4 -3
  382. package/ReactCommon/react/renderer/components/view/propsConversions.h +2 -0
  383. package/ReactCommon/react/renderer/core/ComponentDescriptor.h +5 -5
  384. package/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h +7 -7
  385. package/ReactCommon/react/renderer/core/ConcreteShadowNode.h +2 -2
  386. package/ReactCommon/react/renderer/core/EventDispatcher.cpp +21 -0
  387. package/ReactCommon/react/renderer/core/EventDispatcher.h +15 -0
  388. package/ReactCommon/react/renderer/core/EventListener.cpp +39 -0
  389. package/ReactCommon/react/renderer/core/EventListener.h +44 -0
  390. package/ReactCommon/react/renderer/core/Props.h +0 -4
  391. package/ReactCommon/react/renderer/core/RawProps.h +1 -1
  392. package/ReactCommon/react/renderer/core/ShadowNode.cpp +2 -2
  393. package/ReactCommon/react/renderer/core/ShadowNode.h +5 -5
  394. package/ReactCommon/react/renderer/core/propsConversions.h +6 -5
  395. package/ReactCommon/react/renderer/core/tests/ComponentDescriptorTest.cpp +3 -3
  396. package/ReactCommon/react/renderer/debug/debugStringConvertibleUtils.h +3 -3
  397. package/ReactCommon/react/renderer/graphics/React-graphics.podspec +1 -1
  398. package/ReactCommon/react/renderer/graphics/platform/ios/Color.h +1 -1
  399. package/ReactCommon/react/renderer/graphics/platform/ios/RCTPlatformColorUtils.mm +9 -9
  400. package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImageManager.h +1 -1
  401. package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTImagePrimitivesConversions.h +1 -1
  402. package/ReactCommon/react/renderer/imagemanager/platform/ios/RCTSyncImageManager.h +1 -1
  403. package/ReactCommon/react/renderer/mounting/MountingCoordinator.cpp +2 -2
  404. package/ReactCommon/react/renderer/mounting/MountingCoordinator.h +3 -3
  405. package/ReactCommon/react/renderer/mounting/MountingOverrideDelegate.h +1 -1
  406. package/ReactCommon/react/renderer/mounting/ShadowTreeRevision.h +0 -2
  407. package/ReactCommon/react/renderer/mounting/StubView.h +1 -1
  408. package/ReactCommon/react/renderer/mounting/StubViewTree.cpp +1 -1
  409. package/ReactCommon/react/renderer/mounting/TelemetryController.cpp +6 -9
  410. package/ReactCommon/react/renderer/mounting/TelemetryController.h +7 -7
  411. package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +3 -2
  412. package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h +7 -1
  413. package/ReactCommon/react/renderer/runtimescheduler/Task.h +3 -2
  414. package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +19 -2
  415. package/ReactCommon/react/renderer/scheduler/Scheduler.h +10 -1
  416. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/NSTextStorage+FontScaling.h +1 -1
  417. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.h +1 -1
  418. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm +15 -15
  419. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontProperties.h +1 -1
  420. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTFontUtils.h +1 -1
  421. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextLayoutManager.h +1 -1
  422. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTTextPrimitivesConversions.h +6 -6
  423. package/ReactCommon/react/utils/ContextContainer.h +2 -2
  424. package/ReactCommon/react/utils/ManagedObjectWrapper.h +1 -1
  425. package/ReactCommon/react/utils/ManagedObjectWrapper.mm +1 -3
  426. package/ReactCommon/react/utils/SimpleThreadSafeCache.h +2 -2
  427. package/ReactCommon/yoga/Yoga.podspec +1 -1
  428. package/index.js +0 -11
  429. package/jest/assetFileTransformer.js +2 -2
  430. package/jest/preprocessor.js +2 -2
  431. package/jest/setup.js +3 -3
  432. package/local-cli/generator-macos/templates/macos/HelloWorld-macOS/ViewController.m +1 -1
  433. package/package.json +25 -25
  434. package/scripts/generate-artifacts.js +21 -17
  435. package/scripts/react_native_pods.rb +1 -4
  436. package/template/App.js +4 -8
  437. package/template/Gemfile.lock +8 -8
  438. package/template/android/gradlew.bat +89 -89
  439. package/template/ios/HelloWorldTests/HelloWorldTests.m +1 -0
  440. package/template/package.json +1 -1
  441. package/Libraries/Alert/AlertMacOS.js +0 -211
  442. package/Libraries/Types/RootTagTypes.js~merged +0 -23
  443. package/ReactCommon/butter/optional.h +0 -38
  444. package/ReactCommon/react/renderer/mounting/MountingTransactionMetadata.h +0 -32
  445. package/third-party-podspecs/boost-for-react-native.podspec +0 -20
@@ -12,7 +12,7 @@ const Platform = require('../Utilities/Platform'); // TODO(macOS GH#774)
12
12
  import invariant from 'invariant';
13
13
  import type {ViewToken} from './ViewabilityHelper';
14
14
  import type {SelectedRowIndexPathType} from './VirtualizedList'; // TODO(macOS GH#774)
15
- import type {ScrollEvent} from '../Types/CoreEventTypes'; // TODO(macOS GH#774)
15
+ import type {KeyEvent} from '../Types/CoreEventTypes'; // TODO(macOS GH#774)
16
16
  import {keyExtractor as defaultKeyExtractor} from './VirtualizeUtils';
17
17
  import {View, VirtualizedList} from 'react-native';
18
18
  import * as React from 'react';
@@ -311,8 +311,12 @@ class VirtualizedSectionList<
311
311
  }
312
312
  };
313
313
 
314
- _handleKeyDown = (e: ScrollEvent) => {
314
+ _handleKeyDown = (e: KeyEvent) => {
315
315
  if (Platform.OS === 'macos') {
316
+ if (e.defaultPrevented) {
317
+ return;
318
+ }
319
+
316
320
  const event = e.nativeEvent;
317
321
  const key = event.key;
318
322
  let prevIndexPath = this.state.selectedRowIndexPath;
@@ -320,7 +324,7 @@ class VirtualizedSectionList<
320
324
  const sectionIndex = this.state.selectedRowIndexPath.sectionIndex;
321
325
  const rowIndex = this.state.selectedRowIndexPath.rowIndex;
322
326
 
323
- if (key === 'DOWN_ARROW') {
327
+ if (key === 'ArrowDown') {
324
328
  nextIndexPath = this._selectRowBelowIndexPath(prevIndexPath);
325
329
  this._ensureItemAtIndexPathIsVisible(nextIndexPath);
326
330
 
@@ -332,7 +336,7 @@ class VirtualizedSectionList<
332
336
  item: item,
333
337
  });
334
338
  }
335
- } else if (key === 'UP_ARROW') {
339
+ } else if (key === 'ArrowUp') {
336
340
  nextIndexPath = this._selectRowAboveIndexPath(prevIndexPath);
337
341
  this._ensureItemAtIndexPathIsVisible(nextIndexPath);
338
342
 
@@ -344,7 +348,7 @@ class VirtualizedSectionList<
344
348
  item: item,
345
349
  });
346
350
  }
347
- } else if (key === 'ENTER') {
351
+ } else if (key === 'Enter') {
348
352
  if (this.props.onSelectionEntered) {
349
353
  const item = this.props.sections[sectionIndex].data[rowIndex];
350
354
  this.props.onSelectionEntered(item);
@@ -386,9 +390,7 @@ class VirtualizedSectionList<
386
390
  return (info && info.key) || String(index);
387
391
  };
388
392
 
389
- _subExtractor(
390
- index: number,
391
- ): ?{
393
+ _subExtractor(index: number): ?{
392
394
  section: SectionT,
393
395
  // Key of the section or combined key for section + item
394
396
  key: string,
@@ -503,64 +505,59 @@ class VirtualizedSectionList<
503
505
  };
504
506
  // ]TODO(macOS GH#774)
505
507
 
506
- _renderItem = (listItemCount: number) => ({
507
- item,
508
- index,
509
- }: {
510
- item: Item,
511
- index: number,
512
- ...
513
- }) => {
514
- const info = this._subExtractor(index);
515
- if (!info) {
516
- return null;
517
- }
518
- const infoIndex = info.index;
519
- if (infoIndex == null) {
520
- const {section} = info;
521
- if (info.header === true) {
522
- const {renderSectionHeader} = this.props;
523
- return renderSectionHeader ? renderSectionHeader({section}) : null;
508
+ _renderItem =
509
+ (listItemCount: number) =>
510
+ ({item, index}: {item: Item, index: number, ...}) => {
511
+ const info = this._subExtractor(index);
512
+ if (!info) {
513
+ return null;
514
+ }
515
+ const infoIndex = info.index;
516
+ if (infoIndex == null) {
517
+ const {section} = info;
518
+ if (info.header === true) {
519
+ const {renderSectionHeader} = this.props;
520
+ return renderSectionHeader ? renderSectionHeader({section}) : null;
521
+ } else {
522
+ const {renderSectionFooter} = this.props;
523
+ return renderSectionFooter ? renderSectionFooter({section}) : null;
524
+ }
524
525
  } else {
525
- const {renderSectionFooter} = this.props;
526
- return renderSectionFooter ? renderSectionFooter({section}) : null;
526
+ const renderItem = info.section.renderItem || this.props.renderItem;
527
+ const SeparatorComponent = this._getSeparatorComponent(
528
+ index,
529
+ info,
530
+ listItemCount,
531
+ );
532
+ invariant(renderItem, 'no renderItem!');
533
+ return (
534
+ <ItemWithSeparator
535
+ SeparatorComponent={SeparatorComponent}
536
+ LeadingSeparatorComponent={
537
+ infoIndex === 0 ? this.props.SectionSeparatorComponent : undefined
538
+ }
539
+ cellKey={info.key}
540
+ index={infoIndex}
541
+ isSelected={this._isItemSelected(item)} // TODO(macOS GH#774)
542
+ item={item}
543
+ leadingItem={info.leadingItem}
544
+ leadingSection={info.leadingSection}
545
+ prevCellKey={(this._subExtractor(index - 1) || {}).key}
546
+ // Callback to provide updateHighlight for this item
547
+ setSelfHighlightCallback={this._setUpdateHighlightFor}
548
+ setSelfUpdatePropsCallback={this._setUpdatePropsFor}
549
+ // Provide child ability to set highlight/updateProps for previous item using prevCellKey
550
+ updateHighlightFor={this._updateHighlightFor}
551
+ updatePropsFor={this._updatePropsFor}
552
+ renderItem={renderItem}
553
+ section={info.section}
554
+ trailingItem={info.trailingItem}
555
+ trailingSection={info.trailingSection}
556
+ inverted={!!this.props.inverted}
557
+ />
558
+ );
527
559
  }
528
- } else {
529
- const renderItem = info.section.renderItem || this.props.renderItem;
530
- const SeparatorComponent = this._getSeparatorComponent(
531
- index,
532
- info,
533
- listItemCount,
534
- );
535
- invariant(renderItem, 'no renderItem!');
536
- return (
537
- <ItemWithSeparator
538
- SeparatorComponent={SeparatorComponent}
539
- LeadingSeparatorComponent={
540
- infoIndex === 0 ? this.props.SectionSeparatorComponent : undefined
541
- }
542
- cellKey={info.key}
543
- index={infoIndex}
544
- isSelected={this._isItemSelected(item)} // TODO(macOS GH#774)
545
- item={item}
546
- leadingItem={info.leadingItem}
547
- leadingSection={info.leadingSection}
548
- prevCellKey={(this._subExtractor(index - 1) || {}).key}
549
- // Callback to provide updateHighlight for this item
550
- setSelfHighlightCallback={this._setUpdateHighlightFor}
551
- setSelfUpdatePropsCallback={this._setUpdatePropsFor}
552
- // Provide child ability to set highlight/updateProps for previous item using prevCellKey
553
- updateHighlightFor={this._updateHighlightFor}
554
- updatePropsFor={this._updatePropsFor}
555
- renderItem={renderItem}
556
- section={info.section}
557
- trailingItem={info.trailingItem}
558
- trailingSection={info.trailingSection}
559
- inverted={!!this.props.inverted}
560
- />
561
- );
562
- }
563
- };
560
+ };
564
561
 
565
562
  _updatePropsFor = (cellKey, value) => {
566
563
  const updateProps = this._updatePropsMap[cellKey];
@@ -673,10 +670,8 @@ function ItemWithSeparator(props: ItemWithSeparatorProps): React.Node {
673
670
  inverted,
674
671
  } = props;
675
672
 
676
- const [
677
- leadingSeparatorHiglighted,
678
- setLeadingSeparatorHighlighted,
679
- ] = React.useState(false);
673
+ const [leadingSeparatorHiglighted, setLeadingSeparatorHighlighted] =
674
+ React.useState(false);
680
675
 
681
676
  const [separatorHighlighted, setSeparatorHighlighted] = React.useState(false);
682
677
 
@@ -71,7 +71,7 @@ let updateTimeout = null;
71
71
  let _isDisabled = false;
72
72
  let _selectedIndex = -1;
73
73
 
74
- let warningFilter: WarningFilter = function(format) {
74
+ let warningFilter: WarningFilter = function (format) {
75
75
  return {
76
76
  finalFormat: format,
77
77
  forceDialogImmediately: false,
@@ -14,9 +14,12 @@ import type {ExceptionData} from '../../Core/NativeExceptionsManager';
14
14
  import type {LogBoxLogData} from './LogBoxLog';
15
15
  import parseErrorStack from '../../Core/Devtools/parseErrorStack';
16
16
 
17
- const BABEL_TRANSFORM_ERROR_FORMAT = /^(?:TransformError )?(?:SyntaxError: |ReferenceError: )(.*): (.*) \((\d+):(\d+)\)\n\n([\s\S]+)/;
18
- const BABEL_CODE_FRAME_ERROR_FORMAT = /^(?:TransformError )?(?:.*):? (?:.*?)(\/.*): ([\s\S]+?)\n([ >]{2}[\d\s]+ \|[\s\S]+|\u{001b}[\s\S]+)/u;
19
- const METRO_ERROR_FORMAT = /^(?:InternalError Metro has encountered an error:) (.*): (.*) \((\d+):(\d+)\)\n\n([\s\S]+)/u;
17
+ const BABEL_TRANSFORM_ERROR_FORMAT =
18
+ /^(?:TransformError )?(?:SyntaxError: |ReferenceError: )(.*): (.*) \((\d+):(\d+)\)\n\n([\s\S]+)/;
19
+ const BABEL_CODE_FRAME_ERROR_FORMAT =
20
+ /^(?:TransformError )?(?:.*):? (?:.*?)(\/.*): ([\s\S]+?)\n([ >]{2}[\d\s]+ \|[\s\S]+|\u{001b}[\s\S]+)/u;
21
+ const METRO_ERROR_FORMAT =
22
+ /^(?:InternalError Metro has encountered an error:) (.*): (.*) \((\d+):(\d+)\)\n\n([\s\S]+)/u;
20
23
 
21
24
  export type ExtendedExceptionData = ExceptionData & {
22
25
  isComponentError: boolean,
@@ -51,9 +54,7 @@ export type ComponentStack = $ReadOnlyArray<CodeFrame>;
51
54
 
52
55
  const SUBSTITUTION = UTFSequence.BOM + '%s';
53
56
 
54
- export function parseInterpolation(
55
- args: $ReadOnlyArray<mixed>,
56
- ): $ReadOnly<{|
57
+ export function parseInterpolation(args: $ReadOnlyArray<mixed>): $ReadOnly<{|
57
58
  category: Category,
58
59
  message: Message,
59
60
  |}> {
@@ -186,13 +187,8 @@ export function parseLogBoxException(
186
187
 
187
188
  const metroInternalError = message.match(METRO_ERROR_FORMAT);
188
189
  if (metroInternalError) {
189
- const [
190
- content,
191
- fileName,
192
- row,
193
- column,
194
- codeFrame,
195
- ] = metroInternalError.slice(1);
190
+ const [content, fileName, row, column, codeFrame] =
191
+ metroInternalError.slice(1);
196
192
 
197
193
  return {
198
194
  level: 'fatal',
@@ -219,13 +215,8 @@ export function parseLogBoxException(
219
215
  const babelTransformError = message.match(BABEL_TRANSFORM_ERROR_FORMAT);
220
216
  if (babelTransformError) {
221
217
  // Transform errors are thrown from inside the Babel transformer.
222
- const [
223
- fileName,
224
- content,
225
- row,
226
- column,
227
- codeFrame,
228
- ] = babelTransformError.slice(1);
218
+ const [fileName, content, row, column, codeFrame] =
219
+ babelTransformError.slice(1);
229
220
 
230
221
  return {
231
222
  level: 'syntax',
@@ -318,9 +309,7 @@ export function parseLogBoxException(
318
309
  };
319
310
  }
320
311
 
321
- export function parseLogBoxLog(
322
- args: $ReadOnlyArray<mixed>,
323
- ): {|
312
+ export function parseLogBoxLog(args: $ReadOnlyArray<mixed>): {|
324
313
  componentStack: ComponentStack,
325
314
  category: Category,
326
315
  message: Message,
@@ -48,8 +48,7 @@ function LogBoxButton(props: Props): React.Node {
48
48
  : backgroundColor.default,
49
49
  },
50
50
  props.style,
51
- )}
52
- >
51
+ )}>
53
52
  {props.children}
54
53
  </View>
55
54
  );
@@ -61,8 +60,7 @@ function LogBoxButton(props: Props): React.Node {
61
60
  hitSlop={props.hitSlop}
62
61
  onPress={props.onPress}
63
62
  onPressIn={() => setPressed(true)}
64
- onPressOut={() => setPressed(false)}
65
- >
63
+ onPressOut={() => setPressed(false)}>
66
64
  {content}
67
65
  </TouchableWithoutFeedback>
68
66
  );
@@ -67,8 +67,7 @@ function LogBoxInspectorCodeFrame(props: Props): React.Node {
67
67
  style={styles.button}
68
68
  onPress={() => {
69
69
  openFileInEditor(codeFrame.fileName, codeFrame.location?.row ?? 0);
70
- }}
71
- >
70
+ }}>
72
71
  <Text style={styles.fileText}>
73
72
  {getFileName()}
74
73
  {getLocation()}
@@ -94,8 +93,7 @@ function AppInfo() {
94
93
  : 'transparent',
95
94
  }}
96
95
  style={appInfoStyles.buildButton}
97
- onPress={appInfo.onPress}
98
- >
96
+ onPress={appInfo.onPress}>
99
97
  <Text style={appInfoStyles.text}>
100
98
  {appInfo.appVersion} ({appInfo.engine})
101
99
  </Text>
@@ -58,8 +58,7 @@ function FooterButton(props: ButtonProps): React.Node {
58
58
  pressed: LogBoxStyle.getBackgroundDarkColor(),
59
59
  }}
60
60
  onPress={props.onPress}
61
- style={buttonStyles.safeArea}
62
- >
61
+ style={buttonStyles.safeArea}>
63
62
  <View style={buttonStyles.content}>
64
63
  <Text style={buttonStyles.label}>{props.text}</Text>
65
64
  </View>
@@ -100,8 +100,7 @@ function LogBoxInspectorHeaderButton(
100
100
  <LogBoxButton
101
101
  backgroundColor={backgroundForLevel(props.level)}
102
102
  onPress={props.disabled ? null : props.onPress}
103
- style={headerStyles.button}
104
- >
103
+ style={headerStyles.button}>
105
104
  {props.disabled ? null : (
106
105
  <Image source={props.image} style={headerStyles.buttonImage} />
107
106
  )}
@@ -80,8 +80,7 @@ function LogBoxInspectorReactFrames(props: Props): React.Node {
80
80
  <View
81
81
  // Unfortunately we don't have a unique identifier for stack traces.
82
82
  key={index}
83
- style={componentStyles.frameContainer}
84
- >
83
+ style={componentStyles.frameContainer}>
85
84
  <LogBoxButton
86
85
  backgroundColor={{
87
86
  default: 'transparent',
@@ -96,8 +95,7 @@ function LogBoxInspectorReactFrames(props: Props): React.Node {
96
95
  openFileInEditor(frame.fileName, frame.location?.row ?? 1)
97
96
  : null
98
97
  }
99
- style={componentStyles.frame}
100
- >
98
+ style={componentStyles.frame}>
101
99
  <View style={componentStyles.component}>
102
100
  <Text style={componentStyles.frameName}>
103
101
  <Text style={componentStyles.bracket}>{'<'}</Text>
@@ -119,8 +117,7 @@ function LogBoxInspectorReactFrames(props: Props): React.Node {
119
117
  pressed: LogBoxStyle.getBackgroundColor(1),
120
118
  }}
121
119
  onPress={() => setCollapsed(!collapsed)}
122
- style={componentStyles.collapseButton}
123
- >
120
+ style={componentStyles.collapseButton}>
124
121
  <Text style={componentStyles.collapse}>{getCollapseMessage()}</Text>
125
122
  </LogBoxButton>
126
123
  </View>
@@ -95,8 +95,7 @@ function LogBoxInspectorSourceMapStatus(props: Props): React.Node {
95
95
  }}
96
96
  hitSlop={{bottom: 8, left: 8, right: 8, top: 8}}
97
97
  onPress={props.onPress}
98
- style={styles.root}
99
- >
98
+ style={styles.root}>
100
99
  <Animated.Image
101
100
  source={image}
102
101
  style={[
@@ -42,16 +42,14 @@ function LogBoxInspectorStackFrame(props: Props): React.Node {
42
42
  pressed: onPress ? LogBoxStyle.getBackgroundColor(1) : 'transparent',
43
43
  }}
44
44
  onPress={onPress}
45
- style={styles.frame}
46
- >
45
+ style={styles.frame}>
47
46
  <Text style={[styles.name, frame.collapse === true && styles.dim]}>
48
47
  {frame.methodName}
49
48
  </Text>
50
49
  <Text
51
50
  ellipsizeMode="middle"
52
51
  numberOfLines={1}
53
- style={[styles.location, frame.collapse === true && styles.dim]}
54
- >
52
+ style={[styles.location, frame.collapse === true && styles.dim]}>
55
53
  {location}
56
54
  </Text>
57
55
  </LogBoxButton>
@@ -90,8 +90,7 @@ function LogBoxInspectorStackFrames(props: Props): React.Node {
90
90
  }
91
91
  status={props.log.symbolicated.status}
92
92
  />
93
- }
94
- >
93
+ }>
95
94
  {props.log.symbolicated.status !== 'COMPLETE' && (
96
95
  <View style={stackStyles.hintBox}>
97
96
  <Text style={stackStyles.hintText}>
@@ -144,8 +143,7 @@ function StackFrameFooter(
144
143
  pressed: LogBoxStyle.getBackgroundColor(1),
145
144
  }}
146
145
  onPress={props.onPress}
147
- style={stackStyles.collapseButton}
148
- >
146
+ style={stackStyles.collapseButton}>
149
147
  <Text style={stackStyles.collapse}>{props.message}</Text>
150
148
  </LogBoxButton>
151
149
  </View>
@@ -44,8 +44,7 @@ function LogBoxLogNotification(props: Props): React.Node {
44
44
  backgroundColor={{
45
45
  default: LogBoxStyle.getBackgroundColor(1),
46
46
  pressed: LogBoxStyle.getBackgroundColor(0.9),
47
- }}
48
- >
47
+ }}>
49
48
  <View style={toastStyles.content}>
50
49
  <CountBadge count={totalLogCount} level={level} />
51
50
  <Message message={log.message} />
@@ -104,8 +103,7 @@ function DismissButton(props: $TEMPORARY$object<{onPress: () => void}>) {
104
103
  left: 10,
105
104
  }}
106
105
  onPress={props.onPress}
107
- style={dismissStyles.press}
108
- >
106
+ style={dismissStyles.press}>
109
107
  <Image
110
108
  source={require('./LogBoxImages/close.png')}
111
109
  style={dismissStyles.image}
@@ -265,14 +265,12 @@ class Modal extends React.Component<Props> {
265
265
  onStartShouldSetResponder={this._shouldSetResponder}
266
266
  supportedOrientations={this.props.supportedOrientations}
267
267
  onOrientationChange={this.props.onOrientationChange}
268
- testID={this.props.testID}
269
- >
268
+ testID={this.props.testID}>
270
269
  <VirtualizedListContextResetter>
271
270
  <ScrollView.Context.Provider value={null}>
272
271
  <View
273
272
  style={[styles.container, containerStyles]}
274
- collapsable={false}
275
- >
273
+ collapsable={false}>
276
274
  {innerChildren}
277
275
  </View>
278
276
  </ScrollView.Context.Provider>
@@ -5,8 +5,10 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
- #include "MountingTransactionMetadata.h"
8
+ #import <React/RCTAnimatedNode.h>
9
9
 
10
- namespace facebook {
11
- namespace react {} // namespace react
12
- } // namespace facebook
10
+ @interface RCTColorAnimatedNode : RCTAnimatedNode
11
+
12
+ @property (nonatomic, assign) int32_t color;
13
+
14
+ @end
@@ -0,0 +1,30 @@
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
+ #import <React/RCTColorAnimatedNode.h>
9
+ #import <React/RCTValueAnimatedNode.h>
10
+
11
+ @implementation RCTColorAnimatedNode
12
+
13
+ - (void)performUpdate
14
+ {
15
+ [super performUpdate];
16
+
17
+ RCTValueAnimatedNode *rNode = (RCTValueAnimatedNode *)[self.parentNodes objectForKey:self.config[@"r"]];
18
+ RCTValueAnimatedNode *gNode = (RCTValueAnimatedNode *)[self.parentNodes objectForKey:self.config[@"g"]];
19
+ RCTValueAnimatedNode *bNode = (RCTValueAnimatedNode *)[self.parentNodes objectForKey:self.config[@"b"]];
20
+ RCTValueAnimatedNode *aNode = (RCTValueAnimatedNode *)[self.parentNodes objectForKey:self.config[@"a"]];
21
+
22
+ _color = ((int)round(aNode.value * 255) & 0xff) << 24 |
23
+ ((int)round(rNode.value) & 0xff) << 16 |
24
+ ((int)round(gNode.value) & 0xff) << 8 |
25
+ ((int)round(bNode.value) & 0xff);
26
+
27
+ // TODO (T111179606): Support platform colors for color animations
28
+ }
29
+
30
+ @end
@@ -12,6 +12,7 @@
12
12
  #import <React/RCTStyleAnimatedNode.h>
13
13
  #import <React/RCTUIManager.h>
14
14
  #import <React/RCTValueAnimatedNode.h>
15
+ #import <React/RCTColorAnimatedNode.h>
15
16
 
16
17
  @implementation RCTPropsAnimatedNode
17
18
  {
@@ -118,17 +119,21 @@
118
119
  for (NSNumber *parentTag in self.parentNodes.keyEnumerator) {
119
120
  RCTAnimatedNode *parentNode = [self.parentNodes objectForKey:parentTag];
120
121
  if ([parentNode isKindOfClass:[RCTStyleAnimatedNode class]]) {
121
- [self->_propsDictionary addEntriesFromDictionary:[(RCTStyleAnimatedNode *)parentNode propsDictionary]];
122
-
122
+ RCTStyleAnimatedNode *styleAnimatedNode = (RCTStyleAnimatedNode *)parentNode;
123
+ [_propsDictionary addEntriesFromDictionary:styleAnimatedNode.propsDictionary];
123
124
  } else if ([parentNode isKindOfClass:[RCTValueAnimatedNode class]]) {
125
+ RCTValueAnimatedNode *valueAnimatedNode = (RCTValueAnimatedNode *)parentNode;
124
126
  NSString *property = [self propertyNameForParentTag:parentTag];
125
- id animatedObject = [(RCTValueAnimatedNode *)parentNode animatedObject];
127
+ id animatedObject = valueAnimatedNode.animatedObject;
126
128
  if (animatedObject) {
127
- self->_propsDictionary[property] = animatedObject;
129
+ _propsDictionary[property] = animatedObject;
128
130
  } else {
129
- CGFloat value = [(RCTValueAnimatedNode *)parentNode value];
130
- self->_propsDictionary[property] = @(value);
131
+ _propsDictionary[property] = @(valueAnimatedNode.value);
131
132
  }
133
+ } else if ([parentNode isKindOfClass:[RCTColorAnimatedNode class]]) {
134
+ RCTColorAnimatedNode *colorAnimatedNode = (RCTColorAnimatedNode *)parentNode;
135
+ NSString *property = [self propertyNameForParentTag:parentTag];
136
+ _propsDictionary[property] = @(colorAnimatedNode.color);
132
137
  }
133
138
  }
134
139
 
@@ -9,6 +9,7 @@
9
9
  #import <React/RCTAnimationUtils.h>
10
10
  #import <React/RCTValueAnimatedNode.h>
11
11
  #import <React/RCTTransformAnimatedNode.h>
12
+ #import <React/RCTColorAnimatedNode.h>
12
13
 
13
14
  @implementation RCTStyleAnimatedNode
14
15
  {
@@ -38,11 +39,14 @@
38
39
  RCTAnimatedNode *node = [self.parentNodes objectForKey:nodeTag];
39
40
  if (node) {
40
41
  if ([node isKindOfClass:[RCTValueAnimatedNode class]]) {
41
- RCTValueAnimatedNode *parentNode = (RCTValueAnimatedNode *)node;
42
- [self->_propsDictionary setObject:@(parentNode.value) forKey:property];
42
+ RCTValueAnimatedNode *valueAnimatedNode = (RCTValueAnimatedNode *)node;
43
+ _propsDictionary[property] = @(valueAnimatedNode.value);
43
44
  } else if ([node isKindOfClass:[RCTTransformAnimatedNode class]]) {
44
- RCTTransformAnimatedNode *parentNode = (RCTTransformAnimatedNode *)node;
45
- [self->_propsDictionary addEntriesFromDictionary:parentNode.propsDictionary];
45
+ RCTTransformAnimatedNode *transformAnimatedNode = (RCTTransformAnimatedNode *)node;
46
+ [_propsDictionary addEntriesFromDictionary:transformAnimatedNode.propsDictionary];
47
+ } else if ([node isKindOfClass:[RCTColorAnimatedNode class]]) {
48
+ RCTColorAnimatedNode *colorAnimatedNode = (RCTColorAnimatedNode *)node;
49
+ _propsDictionary[property] = @(colorAnimatedNode.color);
46
50
  }
47
51
  }
48
52
  }];
@@ -12,6 +12,7 @@
12
12
  #import <React/RCTAdditionAnimatedNode.h>
13
13
  #import <React/RCTAnimatedNode.h>
14
14
  #import <React/RCTAnimationDriver.h>
15
+ #import <React/RCTColorAnimatedNode.h>
15
16
  #import <React/RCTDiffClampAnimatedNode.h>
16
17
  #import <React/RCTDivisionAnimatedNode.h>
17
18
  #import <React/RCTEventAnimation.h>
@@ -86,6 +87,7 @@ static NSString *RCTNormalizeAnimatedEventName(NSString *eventName)
86
87
  dispatch_once(&mapToken, ^{
87
88
  map = @{@"style" : [RCTStyleAnimatedNode class],
88
89
  @"value" : [RCTValueAnimatedNode class],
90
+ @"color" : [RCTColorAnimatedNode class],
89
91
  @"props" : [RCTPropsAnimatedNode class],
90
92
  @"interpolation" : [RCTInterpolationAnimatedNode class],
91
93
  @"addition" : [RCTAdditionAnimatedNode class],
@@ -29,12 +29,12 @@ Pod::Spec.new do |s|
29
29
  s.platforms = { :ios => "11.0", :osx => "10.15" } # TODO(macOS GH#214)
30
30
  s.compiler_flags = folly_compiler_flags + ' -Wno-nullability-completeness'
31
31
  s.source = source
32
- s.source_files = "{Drivers/*,Nodes/*,*}.{m,mm}"
32
+ s.source_files = "**/*.{h,m,mm}"
33
33
  s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs"
34
34
  s.header_dir = "RCTAnimation"
35
35
  s.pod_target_xcconfig = {
36
36
  "USE_HEADERMAP" => "YES",
37
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
37
+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
38
38
  "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\""
39
39
  }
40
40
 
@@ -33,9 +33,7 @@ let componentNameToExists: Map<string, boolean> = new Map();
33
33
  * the current environment.
34
34
  */
35
35
  export function setRuntimeConfigProvider(
36
- runtimeConfigProvider: (
37
- name: string,
38
- ) => ?{
36
+ runtimeConfigProvider: (name: string) => ?{
39
37
  native: boolean,
40
38
  strict: boolean,
41
39
  verify: boolean,
@@ -130,7 +128,7 @@ export function getWithFallback_DEPRECATED<Config>(
130
128
  }
131
129
  }
132
130
 
133
- const FallbackNativeComponent = function(props: Config): React.Node {
131
+ const FallbackNativeComponent = function (props: Config): React.Node {
134
132
  return null;
135
133
  };
136
134
  FallbackNativeComponent.displayName = `Fallback(${name})`;
@@ -34,7 +34,7 @@ Pod::Spec.new do |s|
34
34
  s.header_dir = "RCTNetwork"
35
35
  s.pod_target_xcconfig = {
36
36
  "USE_HEADERMAP" => "YES",
37
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
37
+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
38
38
  "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\""
39
39
  }
40
40
  s.ios.frameworks = "MobileCoreServices" # TODO(macOS GH#214) - Restrict to iOS