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
@@ -27,8 +27,8 @@ function __fetchSegment(
27
27
  }>,
28
28
  callback: (?Error) => void,
29
29
  ) {
30
- const SegmentFetcher = require('./SegmentFetcher/NativeSegmentFetcher')
31
- .default;
30
+ const SegmentFetcher =
31
+ require('./SegmentFetcher/NativeSegmentFetcher').default;
32
32
  SegmentFetcher.fetchSegment(
33
33
  segmentId,
34
34
  options,
@@ -61,8 +61,8 @@ function __getSegment(
61
61
  }>,
62
62
  callback: (?Error, ?string) => void,
63
63
  ) {
64
- const SegmentFetcher = require('./SegmentFetcher/NativeSegmentFetcher')
65
- .default;
64
+ const SegmentFetcher =
65
+ require('./SegmentFetcher/NativeSegmentFetcher').default;
66
66
 
67
67
  if (!SegmentFetcher.getSegment) {
68
68
  throw new Error('SegmentFetcher.getSegment must be defined');
@@ -36,7 +36,8 @@ export type {EventSubscription};
36
36
  * can theoretically listen to `RCTDeviceEventEmitter` (although discouraged).
37
37
  */
38
38
  export default class NativeEventEmitter<TEventToArgsMap: {...}>
39
- implements IEventEmitter<TEventToArgsMap> {
39
+ implements IEventEmitter<TEventToArgsMap>
40
+ {
40
41
  _nativeModule: ?NativeModule;
41
42
 
42
43
  constructor(nativeModule: ?NativeModule) {
@@ -18,7 +18,8 @@ import RCTDeviceEventEmitter from '../RCTDeviceEventEmitter';
18
18
  * Mock `NativeEventEmitter` to ignore Native Modules.
19
19
  */
20
20
  export default class NativeEventEmitter<TEventToArgsMap: {...}>
21
- implements IEventEmitter<TEventToArgsMap> {
21
+ implements IEventEmitter<TEventToArgsMap>
22
+ {
22
23
  addListener<TEvent: $Keys<TEventToArgsMap>>(
23
24
  eventType: TEvent,
24
25
  listener: (...args: $ElementType<TEventToArgsMap, TEvent>) => mixed,
@@ -11,7 +11,7 @@
11
11
  import NativeJSCHeapCapture from './NativeJSCHeapCapture';
12
12
 
13
13
  const HeapCapture = {
14
- captureHeap: function(path: string) {
14
+ captureHeap: function (path: string) {
15
15
  let error = null;
16
16
  try {
17
17
  global.nativeCaptureHeap(path);
@@ -159,10 +159,8 @@ class AssetSourceResolver {
159
159
  };
160
160
  }
161
161
 
162
- static pickScale: (
163
- scales: Array<number>,
164
- deviceScale?: number,
165
- ) => number = pickScale;
162
+ static pickScale: (scales: Array<number>, deviceScale?: number) => number =
163
+ pickScale;
166
164
  }
167
165
 
168
166
  module.exports = AssetSourceResolver;
@@ -40,12 +40,12 @@ function getSize(
40
40
  failure?: (error: any) => void,
41
41
  ): any {
42
42
  return NativeImageLoaderAndroid.getSize(url)
43
- .then(function(sizes) {
43
+ .then(function (sizes) {
44
44
  success(sizes.width, sizes.height);
45
45
  })
46
46
  .catch(
47
47
  failure ||
48
- function() {
48
+ function () {
49
49
  console.warn('Failed to get size for image: ' + url);
50
50
  },
51
51
  );
@@ -64,12 +64,12 @@ function getSizeWithHeaders(
64
64
  failure?: (error: any) => void,
65
65
  ): any {
66
66
  return NativeImageLoaderAndroid.getSizeWithHeaders(url, headers)
67
- .then(function(sizes) {
67
+ .then(function (sizes) {
68
68
  success(sizes.width, sizes.height);
69
69
  })
70
70
  .catch(
71
71
  failure ||
72
- function() {
72
+ function () {
73
73
  console.warn('Failed to get size for image: ' + url);
74
74
  },
75
75
  );
@@ -33,7 +33,7 @@ function getSize(
33
33
  .then(([width, height]) => success(width, height))
34
34
  .catch(
35
35
  failure ||
36
- function() {
36
+ function () {
37
37
  console.warn('Failed to get size for image ' + uri);
38
38
  },
39
39
  );
@@ -46,12 +46,12 @@ function getSizeWithHeaders(
46
46
  failure?: (error: any) => void,
47
47
  ): any {
48
48
  return NativeImageLoaderIOS.getSizeWithHeaders(uri, headers)
49
- .then(function(sizes) {
49
+ .then(function (sizes) {
50
50
  success(sizes.width, sizes.height);
51
51
  })
52
52
  .catch(
53
53
  failure ||
54
- function() {
54
+ function () {
55
55
  console.warn('Failed to get size for image: ' + uri);
56
56
  },
57
57
  );
@@ -12,9 +12,8 @@ import * as React from 'react';
12
12
 
13
13
  type ContextType = ?string;
14
14
 
15
- const Context: React.Context<ContextType> = React.createContext<ContextType>(
16
- null,
17
- );
15
+ const Context: React.Context<ContextType> =
16
+ React.createContext<ContextType>(null);
18
17
 
19
18
  if (__DEV__) {
20
19
  Context.displayName = 'ImageAnalyticsTagContext';
@@ -72,8 +72,7 @@ class ImageBackground extends React.Component<ImageBackgroundProps> {
72
72
  <View
73
73
  accessibilityIgnoresInvertColors={true}
74
74
  style={style}
75
- ref={this._captureRef}
76
- >
75
+ ref={this._captureRef}>
77
76
  <Image
78
77
  {...props}
79
78
  style={[
@@ -12,15 +12,15 @@ import NativeImagePickerIOS from './NativeImagePickerIOS';
12
12
  import invariant from 'invariant';
13
13
 
14
14
  const ImagePickerIOS = {
15
- canRecordVideos: function(callback: (result: boolean) => void): void {
15
+ canRecordVideos: function (callback: (result: boolean) => void): void {
16
16
  invariant(NativeImagePickerIOS, 'ImagePickerIOS is not available');
17
17
  return NativeImagePickerIOS.canRecordVideos(callback);
18
18
  },
19
- canUseCamera: function(callback: (result: boolean) => void): void {
19
+ canUseCamera: function (callback: (result: boolean) => void): void {
20
20
  invariant(NativeImagePickerIOS, 'ImagePickerIOS is not available');
21
21
  return NativeImagePickerIOS.canUseCamera(callback);
22
22
  },
23
- openCameraDialog: function(
23
+ openCameraDialog: function (
24
24
  config: $ReadOnly<{|
25
25
  unmirrorFrontFacingCamera?: boolean,
26
26
  videoMode?: boolean,
@@ -49,7 +49,7 @@ const ImagePickerIOS = {
49
49
  cancelCallback,
50
50
  );
51
51
  },
52
- openSelectDialog: function(
52
+ openSelectDialog: function (
53
53
  config: $ReadOnly<{|
54
54
  showImages?: boolean,
55
55
  showVideos?: boolean,
@@ -86,7 +86,7 @@ const ImagePickerIOS = {
86
86
  * It is safe to call this method for urlsthat aren't video URLs;
87
87
  * it will be a no-op.
88
88
  */
89
- removePendingVideo: function(url: string): void {
89
+ removePendingVideo: function (url: string): void {
90
90
  invariant(NativeImagePickerIOS, 'ImagePickerIOS is not available');
91
91
  NativeImagePickerIOS.removePendingVideo(url);
92
92
  },
@@ -94,7 +94,7 @@ const ImagePickerIOS = {
94
94
  * WARNING: In most cases, removePendingVideo should be used instead because
95
95
  * clearAllPendingVideos could clear out pending videos made by other callers.
96
96
  */
97
- clearAllPendingVideos: function(): void {
97
+ clearAllPendingVideos: function (): void {
98
98
  invariant(NativeImagePickerIOS, 'ImagePickerIOS is not available');
99
99
  NativeImagePickerIOS.clearAllPendingVideos();
100
100
  },
@@ -128,9 +128,7 @@ const ImageViewViewConfig =
128
128
  },
129
129
  };
130
130
 
131
- const ImageViewNativeComponent: HostComponent<Props> = NativeComponentRegistry.get<Props>(
132
- 'RCTImageView',
133
- () => ImageViewViewConfig,
134
- );
131
+ const ImageViewNativeComponent: HostComponent<Props> =
132
+ NativeComponentRegistry.get<Props>('RCTImageView', () => ImageViewViewConfig);
135
133
 
136
134
  export default ImageViewNativeComponent;
@@ -14,9 +14,7 @@ import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';
14
14
  export interface Spec extends TurboModule {
15
15
  +abortRequest: (requestId: number) => void;
16
16
  +getConstants: () => {||};
17
- +getSize: (
18
- uri: string,
19
- ) => Promise<
17
+ +getSize: (uri: string) => Promise<
20
18
  $ReadOnly<{
21
19
  width: number,
22
20
  height: number,
@@ -38,10 +38,10 @@ static NSString *RCTCacheKeyForImage(NSString *imageTag, CGSize size, CGFloat sc
38
38
  {
39
39
  if (self = [super init]) {
40
40
  _decodedImageCache = [NSCache new];
41
- #if !TARGET_OS_OSX // TODO(macOS GH#774)
42
41
  _decodedImageCache.totalCostLimit = 20 * 1024 * 1024; // 20 MB
43
42
  _cacheStaleTimes = [NSMutableDictionary new];
44
43
 
44
+ #if !TARGET_OS_OSX // TODO(macOS GH#774)
45
45
  [[NSNotificationCenter defaultCenter] addObserver:self
46
46
  selector:@selector(clearCache)
47
47
  name:UIApplicationDidReceiveMemoryWarningNotification
@@ -128,6 +128,8 @@ static NSDictionary *onLoadParamsForSource(RCTImageSource *source)
128
128
  // Whether the latest change of props requires the image to be reloaded
129
129
  BOOL _needsReload;
130
130
 
131
+ UIImage *_image; // TODO(macOS GH#774)
132
+
131
133
  RCTUIImageViewAnimated *_imageView;
132
134
 
133
135
  #if TARGET_OS_OSX // [TODO(macOS GH#774)
@@ -199,10 +201,6 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
199
201
  if (_renderingMode != image.renderingMode) {
200
202
  image = [image imageWithRenderingMode:_renderingMode];
201
203
  }
202
- #else // [TODO(macOS GH#774)
203
- if ((_renderingMode == UIImageRenderingModeAlwaysTemplate) != [image isTemplate]) {
204
- [image setTemplate:(_renderingMode == UIImageRenderingModeAlwaysTemplate)];
205
- }
206
204
  #endif // ]TODO(macOS GH#774)
207
205
 
208
206
  if (_resizeMode == RCTResizeModeRepeat) {
@@ -211,6 +209,10 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
211
209
  #else // [TODO(macOS GH#774)
212
210
  image.capInsets = _capInsets;
213
211
  image.resizingMode = NSImageResizingModeTile;
212
+ } else if (_resizeMode == RCTResizeModeCover) {
213
+ if (!NSEqualSizes(self.bounds.size, NSZeroSize)) {
214
+ image = RCTFillImagePreservingAspectRatio(image, self.bounds.size, self.window.backingScaleFactor ?: 1.0);
215
+ }
214
216
  #endif // ]TODO(macOS GH#774)
215
217
  } else if (!UIEdgeInsetsEqualToEdgeInsets(UIEdgeInsetsZero, _capInsets)) {
216
218
  // Applying capInsets of 0 will switch the "resizingMode" of the image to "tile" which is undesired
@@ -222,6 +224,12 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
222
224
  #endif // ]TODO(macOS GH#774)
223
225
  }
224
226
 
227
+ #if TARGET_OS_OSX // [TODO(macOS GH#774)
228
+ if ((_renderingMode == UIImageRenderingModeAlwaysTemplate) != [image isTemplate]) {
229
+ [image setTemplate:(_renderingMode == UIImageRenderingModeAlwaysTemplate)];
230
+ }
231
+ #endif // ]TODO(macOS GH#774)
232
+
225
233
  // Apply trilinear filtering to smooth out mis-sized images
226
234
  _imageView.layer.minificationFilter = kCAFilterTrilinear;
227
235
  _imageView.layer.magnificationFilter = kCAFilterTrilinear;
@@ -233,17 +241,13 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithFrame:(CGRect)frame)
233
241
  {
234
242
  image = image ?: _defaultImage;
235
243
  if (image != self.image) {
236
- #if TARGET_OS_OSX // [TODO(macOS GH#774)
237
- if (image && _resizeMode == RCTResizeModeCover && !NSEqualSizes(self.bounds.size, NSZeroSize)) {
238
- image = RCTFillImagePreservingAspectRatio(image, self.bounds.size, self.window.backingScaleFactor ?: 1.0);
239
- }
240
- #endif // ]TODO(macOS GH#774)
244
+ _image = image; // TODO(macOS GH#774)
241
245
  [self updateWithImage:image];
242
246
  }
243
247
  }
244
248
 
245
249
  - (UIImage *)image {
246
- return _imageView.image;
250
+ return _image ?: _imageView.image; // TODO(macOS GH#774)
247
251
  }
248
252
 
249
253
  - (void)setBlurRadius:(CGFloat)blurRadius
@@ -35,7 +35,7 @@ Pod::Spec.new do |s|
35
35
  s.header_dir = "RCTImage"
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
 
@@ -24,9 +24,8 @@ type NativeProps = $ReadOnly<{
24
24
  headers?: ?{[string]: string},
25
25
  }>;
26
26
 
27
- const TextInlineImage: HostComponent<NativeProps> = NativeComponentRegistry.get<NativeProps>(
28
- 'RCTTextInlineImage',
29
- () => ({
27
+ const TextInlineImage: HostComponent<NativeProps> =
28
+ NativeComponentRegistry.get<NativeProps>('RCTTextInlineImage', () => ({
30
29
  uiViewClassName: 'RCTTextInlineImage',
31
30
  bubblingEventTypes: {},
32
31
  directEventTypes: {},
@@ -38,7 +37,6 @@ const TextInlineImage: HostComponent<NativeProps> = NativeComponentRegistry.get<
38
37
  },
39
38
  headers: true,
40
39
  },
41
- }),
42
- );
40
+ }));
43
41
 
44
42
  module.exports = TextInlineImage;
@@ -51,8 +51,7 @@ class ElementProperties extends React.Component<Props> {
51
51
  openFileButton = (
52
52
  <TouchableHighlight
53
53
  style={styles.openButton}
54
- onPress={openFileInEditor.bind(null, fileName, lineNumber)}
55
- >
54
+ onPress={openFileInEditor.bind(null, fileName, lineNumber)}>
56
55
  <Text style={styles.openButtonTitle} numberOfLines={1}>
57
56
  {fileNameShort}:{lineNumber}
58
57
  </Text>
@@ -72,8 +71,7 @@ class ElementProperties extends React.Component<Props> {
72
71
  key={'item-' + i}
73
72
  style={[styles.breadItem, i === selection && styles.selected]}
74
73
  // $FlowFixMe[not-a-function] found when converting React.createClass to ES6
75
- onPress={() => this.props.setSelection(i)}
76
- >
74
+ onPress={() => this.props.setSelection(i)}>
77
75
  <Text style={styles.breadItemText}>{hierarchyItem.name}</Text>
78
76
  </TouchableHighlight>
79
77
  ),
@@ -57,8 +57,7 @@ class InspectorOverlay extends React.Component<Props> {
57
57
  onStartShouldSetResponder={this.shouldSetResponser}
58
58
  onResponderMove={this.findViewForTouchEvent}
59
59
  nativeID="inspectorOverlay" /* TODO: T68258846. */
60
- style={[styles.inspector, {height: Dimensions.get('window').height}]}
61
- >
60
+ style={[styles.inspector, {height: Dimensions.get('window').height}]}>
62
61
  {content}
63
62
  </View>
64
63
  );
@@ -124,8 +124,7 @@ class InspectorPanelButton extends React.Component<InspectorPanelButtonProps> {
124
124
  return (
125
125
  <TouchableHighlight
126
126
  onPress={() => this.props.onClick(!this.props.pressed)}
127
- style={[styles.button, this.props.pressed && styles.buttonPressed]}
128
- >
127
+ style={[styles.button, this.props.pressed && styles.buttonPressed]}>
129
128
  <Text style={styles.buttonText}>{this.props.title}</Text>
130
129
  </TouchableHighlight>
131
130
  );
@@ -339,8 +339,7 @@ class NetworkOverlay extends React.Component<Props, State> {
339
339
  <TouchableHighlight
340
340
  onPress={() => {
341
341
  this._pressRow(index);
342
- }}
343
- >
342
+ }}>
344
343
  <View>
345
344
  <View style={tableRowViewStyle}>
346
345
  <View style={urlCellViewStyle}>
@@ -381,16 +380,14 @@ class NetworkOverlay extends React.Component<Props, State> {
381
380
  <View>
382
381
  <TouchableHighlight
383
382
  style={styles.closeButton}
384
- onPress={this._closeButtonClicked}
385
- >
383
+ onPress={this._closeButtonClicked}>
386
384
  <View>
387
385
  <Text style={styles.closeButtonText}>v</Text>
388
386
  </View>
389
387
  </TouchableHighlight>
390
388
  <ScrollView
391
389
  style={styles.detailScrollView}
392
- ref={scrollRef => (this._detailScrollView = scrollRef)}
393
- >
390
+ ref={scrollRef => (this._detailScrollView = scrollRef)}>
394
391
  {details}
395
392
  </ScrollView>
396
393
  </View>
@@ -400,11 +397,8 @@ class NetworkOverlay extends React.Component<Props, State> {
400
397
  _indicateAdditionalRequests = (): void => {
401
398
  if (this._requestsListView) {
402
399
  const distanceFromEndThreshold = LISTVIEW_CELL_HEIGHT * 2;
403
- const {
404
- offset,
405
- visibleLength,
406
- contentLength,
407
- } = this._requestsListViewScrollMetrics;
400
+ const {offset, visibleLength, contentLength} =
401
+ this._requestsListViewScrollMetrics;
408
402
  const distanceFromEnd = contentLength - visibleLength - offset;
409
403
  const isCloseToEnd = distanceFromEnd <= distanceFromEndThreshold;
410
404
  if (isCloseToEnd) {
@@ -16,7 +16,7 @@ const MessageQueue = require('../BatchedBridge/MessageQueue');
16
16
  const infoLog = require('../Utilities/infoLog');
17
17
 
18
18
  const BridgeSpyStallHandler = {
19
- register: function() {
19
+ register: function () {
20
20
  let spyBuffer = [];
21
21
  MessageQueue.spy(data => {
22
22
  spyBuffer.push(data);
@@ -33,7 +33,7 @@ const FrameRateLogger = {
33
33
  * Enable `debug` to see local logs of what's going on. `reportStackTraces` will grab stack traces
34
34
  * during UI thread stalls and upload them if the native module supports it.
35
35
  */
36
- setGlobalOptions: function(options: {
36
+ setGlobalOptions: function (options: {
37
37
  debug?: boolean,
38
38
  reportStackTraces?: boolean,
39
39
  ...
@@ -58,7 +58,7 @@ const FrameRateLogger = {
58
58
  * Must call `setContext` before any events can be properly tracked, which is done automatically
59
59
  * in `AppRegistry`, but navigation is also a common place to hook in.
60
60
  */
61
- setContext: function(context: string) {
61
+ setContext: function (context: string) {
62
62
  NativeFrameRateLogger && NativeFrameRateLogger.setContext(context);
63
63
  },
64
64
 
@@ -86,9 +86,7 @@ const InteractionManager = {
86
86
  * Schedule a function to run after all interactions have completed. Returns a cancellable
87
87
  * "promise".
88
88
  */
89
- runAfterInteractions(
90
- task: ?Task,
91
- ): {
89
+ runAfterInteractions(task: ?Task): {
92
90
  then: <U>(
93
91
  onFulfill?: ?(void) => ?(Promise<U> | U),
94
92
  onReject?: ?(error: mixed) => ?(Promise<U> | U),
@@ -122,7 +120,7 @@ const InteractionManager = {
122
120
  );
123
121
  }
124
122
  },
125
- cancel: function() {
123
+ cancel: function () {
126
124
  _taskQueue.cancelTasks(tasks);
127
125
  },
128
126
  };
@@ -35,20 +35,20 @@ type Handler = {
35
35
  * queried with `getStats`.
36
36
  */
37
37
  const JSEventLoopWatchdog = {
38
- getStats: function(): Object {
38
+ getStats: function (): Object {
39
39
  return {stallCount, totalStallTime, longestStall, acceptableBusyTime};
40
40
  },
41
- reset: function() {
41
+ reset: function () {
42
42
  infoLog('JSEventLoopWatchdog: reset');
43
43
  totalStallTime = 0;
44
44
  stallCount = 0;
45
45
  longestStall = 0;
46
46
  lastInterval = global.performance.now();
47
47
  },
48
- addHandler: function(handler: Handler) {
48
+ addHandler: function (handler: Handler) {
49
49
  handlers.push(handler);
50
50
  },
51
- install: function({thresholdMS}: {thresholdMS: number, ...}) {
51
+ install: function ({thresholdMS}: {thresholdMS: number, ...}) {
52
52
  acceptableBusyTime = thresholdMS;
53
53
  if (installed) {
54
54
  return;
@@ -383,9 +383,7 @@ const PanResponder = {
383
383
  * accordingly. (numberActiveTouches) may not be totally accurate unless you
384
384
  * are the responder.
385
385
  */
386
- create(
387
- config: PanResponderConfig,
388
- ): $TEMPORARY$object<{|
386
+ create(config: PanResponderConfig): $TEMPORARY$object<{|
389
387
  getInteractionHandle: () => ?number,
390
388
  panHandlers: $TEMPORARY$object<{|
391
389
  onMoveShouldSetResponder: (event: PressEvent) => boolean,
@@ -462,7 +460,8 @@ const PanResponder = {
462
460
 
463
461
  onResponderGrant(event: PressEvent): boolean {
464
462
  if (!interactionState.handle) {
465
- interactionState.handle = InteractionManager.createInteractionHandle();
463
+ interactionState.handle =
464
+ InteractionManager.createInteractionHandle();
466
465
  }
467
466
  gestureState.x0 = currentCentroidX(event.touchHistory);
468
467
  gestureState.y0 = currentCentroidY(event.touchHistory);
@@ -24,7 +24,7 @@ const TouchHistoryMath = {
24
24
  * touches vs. previous centroid of now actively moving touches.
25
25
  * @return {number} value of centroid in specified dimension.
26
26
  */
27
- centroidDimension: function(
27
+ centroidDimension: function (
28
28
  touchHistory,
29
29
  touchesChangedAfter,
30
30
  isXAxis,
@@ -81,7 +81,7 @@ const TouchHistoryMath = {
81
81
  return count > 0 ? total / count : TouchHistoryMath.noCentroid;
82
82
  },
83
83
 
84
- currentCentroidXOfTouchesChangedAfter: function(
84
+ currentCentroidXOfTouchesChangedAfter: function (
85
85
  touchHistory,
86
86
  touchesChangedAfter,
87
87
  ) {
@@ -93,7 +93,7 @@ const TouchHistoryMath = {
93
93
  );
94
94
  },
95
95
 
96
- currentCentroidYOfTouchesChangedAfter: function(
96
+ currentCentroidYOfTouchesChangedAfter: function (
97
97
  touchHistory,
98
98
  touchesChangedAfter,
99
99
  ) {
@@ -105,7 +105,7 @@ const TouchHistoryMath = {
105
105
  );
106
106
  },
107
107
 
108
- previousCentroidXOfTouchesChangedAfter: function(
108
+ previousCentroidXOfTouchesChangedAfter: function (
109
109
  touchHistory,
110
110
  touchesChangedAfter,
111
111
  ) {
@@ -117,7 +117,7 @@ const TouchHistoryMath = {
117
117
  );
118
118
  },
119
119
 
120
- previousCentroidYOfTouchesChangedAfter: function(
120
+ previousCentroidYOfTouchesChangedAfter: function (
121
121
  touchHistory,
122
122
  touchesChangedAfter,
123
123
  ) {
@@ -129,7 +129,7 @@ const TouchHistoryMath = {
129
129
  );
130
130
  },
131
131
 
132
- currentCentroidX: function(touchHistory) {
132
+ currentCentroidX: function (touchHistory) {
133
133
  return TouchHistoryMath.centroidDimension(
134
134
  touchHistory,
135
135
  0, // touchesChangedAfter
@@ -138,7 +138,7 @@ const TouchHistoryMath = {
138
138
  );
139
139
  },
140
140
 
141
- currentCentroidY: function(touchHistory) {
141
+ currentCentroidY: function (touchHistory) {
142
142
  return TouchHistoryMath.centroidDimension(
143
143
  touchHistory,
144
144
  0, // touchesChangedAfter
@@ -275,12 +275,7 @@ class NetworkAgent extends InspectorAgent {
275
275
  this._interceptor = null;
276
276
  }
277
277
 
278
- getResponseBody({
279
- requestId,
280
- }: {
281
- requestId: RequestId,
282
- ...
283
- }): {
278
+ getResponseBody({requestId}: {requestId: RequestId, ...}): {
284
279
  body: ?string,
285
280
  base64Encoded: boolean,
286
281
  ...
@@ -70,7 +70,7 @@ function configureNext(
70
70
  config,
71
71
  onAnimationComplete,
72
72
  onAnimationDidFail ??
73
- function() {} /* this will only be called if configuration parsing fails */,
73
+ function () {} /* this will only be called if configuration parsing fails */,
74
74
  );
75
75
  return;
76
76
  }
@@ -81,9 +81,9 @@ function configureNext(
81
81
  if (UIManager?.configureNextLayoutAnimation) {
82
82
  UIManager.configureNextLayoutAnimation(
83
83
  config,
84
- onAnimationComplete ?? function() {},
84
+ onAnimationComplete ?? function () {},
85
85
  onAnimationDidFail ??
86
- function() {} /* this should never be called in Non-Fabric */,
86
+ function () {} /* this should never be called in Non-Fabric */,
87
87
  );
88
88
  }
89
89
  }
@@ -15,6 +15,7 @@
15
15
 
16
16
  #if TARGET_OS_OSX // [TODO(macOS GH#774)
17
17
  + (void)getUrlEventHandler:(NSAppleEventDescriptor *)event withReplyEvent:(NSAppleEventDescriptor *)replyEvent;
18
+ + (void)setAlwaysForegroundLastWindow:(BOOL)alwaysForeground;
18
19
  #else // ]TODO(macOS GH#774)
19
20
  + (BOOL)application:(nonnull UIApplication *)app
20
21
  openURL:(nonnull NSURL *)URL
@@ -39,7 +39,7 @@ Pod::Spec.new do |s|
39
39
  s.header_dir = "RCTLinking"
40
40
  s.pod_target_xcconfig = {
41
41
  "USE_HEADERMAP" => "YES",
42
- "CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
42
+ "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
43
43
  "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\" \"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\""
44
44
  }
45
45