@depup/react-native 0.86.2-depup.0 → 0.87.1-depup.0

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 (1283) hide show
  1. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +19 -24
  2. package/Libraries/ActionSheetIOS/React-RCTActionSheet.podspec +1 -1
  3. package/Libraries/Alert/Alert.js +38 -1
  4. package/Libraries/Animated/AnimatedEvent.js +1 -1
  5. package/Libraries/Animated/AnimatedExports.js +22 -0
  6. package/Libraries/Animated/AnimatedExports.js.flow +1 -1
  7. package/Libraries/Animated/AnimatedImplementation.js +126 -5
  8. package/Libraries/Animated/Easing.js +4 -3
  9. package/Libraries/Animated/NativeAnimatedAllowlist.js +37 -0
  10. package/Libraries/Animated/animations/Animation.js +14 -5
  11. package/Libraries/Animated/animations/DecayAnimation.js +1 -0
  12. package/Libraries/Animated/animations/SpringAnimation.js +1 -0
  13. package/Libraries/Animated/animations/TimingAnimation.js +9 -0
  14. package/Libraries/Animated/components/AnimatedScrollView.js +1 -1
  15. package/Libraries/Animated/createAnimatedComponent.js +3 -3
  16. package/Libraries/Animated/nodes/AnimatedColor.js +8 -8
  17. package/Libraries/Animated/nodes/AnimatedInterpolation.js +106 -0
  18. package/Libraries/Animated/nodes/AnimatedNode.js +1 -1
  19. package/Libraries/Animated/nodes/AnimatedProps.js +27 -3
  20. package/Libraries/Animated/nodes/AnimatedValue.js +10 -2
  21. package/Libraries/Animated/nodes/AnimatedValueXY.js +2 -2
  22. package/Libraries/AppDelegate/RCTAppDelegate.h +5 -9
  23. package/Libraries/AppDelegate/RCTAppDelegate.mm +0 -20
  24. package/Libraries/AppDelegate/RCTAppSetupUtils.h +0 -18
  25. package/Libraries/AppDelegate/RCTAppSetupUtils.mm +0 -78
  26. package/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm +18 -21
  27. package/Libraries/AppDelegate/RCTReactNativeFactory.h +5 -41
  28. package/Libraries/AppDelegate/RCTReactNativeFactory.mm +0 -82
  29. package/Libraries/AppDelegate/RCTRootViewFactory.h +4 -1
  30. package/Libraries/AppDelegate/RCTRootViewFactory.mm +3 -101
  31. package/Libraries/AppDelegate/React-RCTAppDelegate.podspec +2 -1
  32. package/Libraries/AppState/AppState.d.ts +4 -1
  33. package/Libraries/AppState/AppState.js +32 -17
  34. package/Libraries/BatchedBridge/MessageQueue.js +42 -51
  35. package/Libraries/BatchedBridge/NativeModules.js +7 -0
  36. package/Libraries/Blob/Blob.js +7 -1
  37. package/Libraries/Blob/FileReader.js +6 -0
  38. package/Libraries/Blob/React-RCTBlob.podspec +1 -1
  39. package/Libraries/Blob/URLSearchParams.js.flow +1 -1
  40. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +20 -9
  41. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +30 -43
  42. package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +59 -49
  43. package/Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js +2 -2
  44. package/Libraries/Components/Button.js +98 -183
  45. package/Libraries/Components/Clipboard/Clipboard.js +5 -0
  46. package/Libraries/Components/DrawerAndroid/AndroidDrawerLayoutNativeComponent.js +2 -2
  47. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +8 -69
  48. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +10 -1
  49. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.ios.js +2 -0
  50. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.js +26 -31
  51. package/Libraries/Components/Keyboard/Keyboard.js +23 -60
  52. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +15 -7
  53. package/Libraries/Components/Pressable/Pressable.js +39 -17
  54. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +5 -6
  55. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +4 -4
  56. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.js +2 -2
  57. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.js +17 -0
  58. package/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js +2 -2
  59. package/Libraries/Components/RefreshControl/PullToRefreshViewNativeComponent.js +2 -2
  60. package/Libraries/Components/RefreshControl/RefreshControl.js +40 -50
  61. package/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js +2 -2
  62. package/Libraries/Components/SafeAreaView/SafeAreaView.js +8 -8
  63. package/Libraries/Components/ScrollView/AndroidHorizontalScrollContentViewNativeComponent.js +2 -2
  64. package/Libraries/Components/ScrollView/ScrollView.d.ts +55 -43
  65. package/Libraries/Components/ScrollView/ScrollView.js +205 -118
  66. package/Libraries/Components/ScrollView/ScrollViewCommands.js +4 -4
  67. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
  68. package/Libraries/Components/StatusBar/StatusBar.d.ts +7 -54
  69. package/Libraries/Components/StatusBar/StatusBar.js +84 -160
  70. package/Libraries/Components/Switch/AndroidSwitchNativeComponent.js +2 -2
  71. package/Libraries/Components/Switch/Switch.js +76 -75
  72. package/Libraries/Components/Switch/SwitchNativeComponent.js +2 -2
  73. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +1 -1
  74. package/Libraries/Components/TextInput/InputAccessoryView.js +13 -61
  75. package/Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js +2 -2
  76. package/Libraries/Components/TextInput/TextInput.d.ts +9 -2
  77. package/Libraries/Components/TextInput/TextInput.flow.js +20 -3
  78. package/Libraries/Components/TextInput/TextInput.js +116 -111
  79. package/Libraries/Components/TextInput/TextInputNativeCommands.js +3 -3
  80. package/Libraries/Components/ToastAndroid/ToastAndroid.android.js +25 -19
  81. package/Libraries/Components/Touchable/Touchable.d.ts +1 -1
  82. package/Libraries/Components/Touchable/Touchable.js +94 -95
  83. package/Libraries/Components/Touchable/TouchableHighlight.js +45 -112
  84. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +13 -25
  85. package/Libraries/Components/Touchable/TouchableOpacity.js +14 -84
  86. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +4 -3
  87. package/Libraries/Components/UnimplementedViews/UnimplementedNativeViewNativeComponent.js +2 -2
  88. package/Libraries/Components/View/ReactNativeStyleAttributes.js +1 -0
  89. package/Libraries/Components/View/View.js +83 -86
  90. package/Libraries/Components/View/ViewAccessibility.d.ts +12 -2
  91. package/Libraries/Components/View/ViewAccessibility.js +17 -6
  92. package/Libraries/Components/View/ViewNativeComponent.js +4 -6
  93. package/Libraries/Components/View/ViewPropTypes.js +65 -13
  94. package/Libraries/Core/InitializeCore.js +9 -1
  95. package/Libraries/Core/ReactFiberErrorDialog.js +3 -3
  96. package/Libraries/Core/ReactNativeVersion.js +2 -2
  97. package/Libraries/Core/Timers/JSTimers.js +53 -52
  98. package/Libraries/Core/setUpGlobals.js +9 -4
  99. package/Libraries/Core/setUpNavigator.js +7 -2
  100. package/Libraries/Core/setUpReactDevTools.js +0 -118
  101. package/Libraries/Core/setUpXHR.js +6 -2
  102. package/Libraries/Debugging/DebuggingOverlay.js +2 -2
  103. package/Libraries/Debugging/DebuggingOverlayNativeComponent.js +2 -2
  104. package/Libraries/EventEmitter/NativeEventEmitter.js +29 -0
  105. package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +7 -7
  106. package/Libraries/EventEmitter/RCTNativeAppEventEmitter.d.ts +1 -1
  107. package/Libraries/EventEmitter/RCTNativeAppEventEmitter.js +3 -0
  108. package/Libraries/FBLazyVector/FBLazyVector.podspec +1 -1
  109. package/Libraries/Image/AssetSourceResolver.js +18 -27
  110. package/Libraries/Image/Image.android.js +13 -2
  111. package/Libraries/Image/Image.ios.js +3 -1
  112. package/Libraries/Image/ImageBackground.js +30 -18
  113. package/Libraries/Image/ImageProps.js +116 -117
  114. package/Libraries/Image/ImageSource.d.ts +1 -1
  115. package/Libraries/Image/ImageSource.js +9 -9
  116. package/Libraries/Image/ImageSourceUtils.js +10 -7
  117. package/Libraries/Image/ImageTypes.flow.js +2 -0
  118. package/Libraries/Image/ImageViewNativeComponent.js +1 -1
  119. package/Libraries/Image/RCTImageLoader.mm +61 -64
  120. package/Libraries/Image/RCTImageStoreManager.h +0 -2
  121. package/Libraries/Image/React-RCTImage.podspec +1 -1
  122. package/Libraries/Image/RelativeImageStub.js +1 -1
  123. package/Libraries/Image/resolveAssetSource.js +1 -1
  124. package/Libraries/Interaction/PanResponder.js +102 -97
  125. package/Libraries/LayoutAnimation/LayoutAnimation.js +22 -6
  126. package/Libraries/Linking/Linking.js +24 -23
  127. package/Libraries/LinkingIOS/React-RCTLinking.podspec +1 -1
  128. package/Libraries/Lists/FlatList.d.ts +6 -17
  129. package/Libraries/Lists/FlatList.js +7 -8
  130. package/Libraries/Lists/SectionList.js +7 -0
  131. package/Libraries/Lists/VirtualizedList.js +3 -0
  132. package/Libraries/Lists/VirtualizedSectionList.js +4 -0
  133. package/Libraries/LogBox/LogBox.js +3 -3
  134. package/Libraries/LogBox/UI/AnsiHighlight.js +2 -1
  135. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +2 -2
  136. package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +4 -1
  137. package/Libraries/LogBox/UI/LogBoxInspectorFooterButton.js +3 -1
  138. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +8 -2
  139. package/Libraries/LogBox/UI/LogBoxInspectorMessageHeader.js +9 -2
  140. package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +17 -4
  141. package/Libraries/LogBox/UI/LogBoxInspectorSection.js +3 -1
  142. package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +3 -1
  143. package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +2 -0
  144. package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +4 -2
  145. package/Libraries/LogBox/UI/LogBoxMessage.js +18 -5
  146. package/Libraries/LogBox/UI/LogBoxNotificationCountBadge.js +4 -1
  147. package/Libraries/LogBox/UI/LogBoxNotificationMessage.js +1 -0
  148. package/Libraries/LogBox/UI/LogBoxStyle.js +0 -4
  149. package/Libraries/Modal/Modal.d.ts +5 -4
  150. package/Libraries/Modal/Modal.js +71 -37
  151. package/Libraries/Modal/RCTModalHostViewNativeComponent.js +2 -2
  152. package/Libraries/NativeAnimation/React-RCTAnimation.podspec +1 -1
  153. package/Libraries/NativeComponent/BaseViewConfig.android.js +17 -0
  154. package/Libraries/NativeComponent/ViewConfig.js +3 -3
  155. package/Libraries/NativeComponent/ViewConfigIgnore.js +1 -1
  156. package/Libraries/Network/RCTHTTPRequestHandler.h +1 -1
  157. package/Libraries/Network/React-RCTNetwork.podspec +1 -1
  158. package/Libraries/Performance/Systrace.js +36 -0
  159. package/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +4 -2
  160. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +29 -17
  161. package/Libraries/Pressability/Pressability.js +1 -1
  162. package/Libraries/PushNotificationIOS/PushNotificationIOS.js +4 -0
  163. package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +1 -1
  164. package/Libraries/ReactNative/AppContainer-dev.js +3 -1
  165. package/Libraries/ReactNative/AppRegistry.flow.js +1 -0
  166. package/Libraries/ReactNative/AppRegistry.js +15 -11
  167. package/Libraries/ReactNative/AppRegistryImpl.js +57 -11
  168. package/Libraries/ReactNative/DisplayMode.js +1 -1
  169. package/Libraries/ReactNative/FabricUIManager.js +29 -26
  170. package/Libraries/ReactNative/I18nManager.js +20 -0
  171. package/Libraries/ReactNative/UIManager.js +53 -0
  172. package/Libraries/ReactNative/renderApplication.js +1 -1
  173. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +5 -126
  174. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js.flow +5 -41
  175. package/Libraries/Renderer/README.md +2 -2
  176. package/Libraries/Renderer/shims/ReactNativeTypes.js +36 -36
  177. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +4 -4
  178. package/Libraries/Required/RCTRequired.podspec +1 -1
  179. package/Libraries/Settings/React-RCTSettings.podspec +1 -1
  180. package/Libraries/Settings/Settings.ios.js +22 -0
  181. package/Libraries/Share/Share.js +25 -28
  182. package/Libraries/StyleSheet/PlatformColorValueTypes.js.flow +6 -0
  183. package/Libraries/StyleSheet/StyleSheet.js +42 -2
  184. package/Libraries/StyleSheet/StyleSheet.js.flow +1 -1
  185. package/Libraries/StyleSheet/StyleSheetExports.js +7 -5
  186. package/Libraries/StyleSheet/StyleSheetExports.js.flow +1 -1
  187. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +24 -3
  188. package/Libraries/StyleSheet/StyleSheetTypes.js +34 -6
  189. package/Libraries/StyleSheet/flattenStyle.js +28 -13
  190. package/Libraries/StyleSheet/private/_TransformStyle.js +16 -14
  191. package/Libraries/Text/React-RCTText.podspec +1 -1
  192. package/Libraries/Text/Text.js +12 -9
  193. package/Libraries/Text/TextEffectNativeComponent.js +31 -0
  194. package/Libraries/Text/TextInput/Multiline/RCTUITextView.mm +0 -1
  195. package/Libraries/Text/TextInput/RCTBackedTextInputViewProtocol.h +0 -1
  196. package/Libraries/Text/TextInput/Singleline/RCTUITextField.mm +0 -1
  197. package/Libraries/Text/TextProps.js +59 -93
  198. package/Libraries/Text/requireNativeTextEffect.js +28 -0
  199. package/Libraries/TurboModule/RCTExport.js +1 -1
  200. package/Libraries/TypeSafety/RCTTypeSafety.podspec +1 -1
  201. package/Libraries/Types/CoreEventTypes.d.ts +8 -0
  202. package/Libraries/Types/CoreEventTypes.js +32 -29
  203. package/Libraries/Types/UIManagerJSInterface.js +2 -2
  204. package/Libraries/Utilities/Appearance.d.ts +32 -17
  205. package/Libraries/Utilities/Appearance.js +35 -18
  206. package/Libraries/Utilities/BackHandler.android.js +13 -28
  207. package/Libraries/Utilities/BackHandler.js.flow +18 -2
  208. package/Libraries/Utilities/DevSettings.js +8 -1
  209. package/Libraries/Utilities/Dimensions.js +18 -12
  210. package/Libraries/Utilities/PixelRatio.js +5 -2
  211. package/Libraries/Utilities/Platform.js.flow +4 -0
  212. package/Libraries/Utilities/PlatformTypes.js +77 -0
  213. package/Libraries/Utilities/PolyfillFunctions.js +1 -1
  214. package/Libraries/Utilities/differ/deepDiffer.js +5 -2
  215. package/Libraries/Utilities/useColorScheme.js +11 -1
  216. package/Libraries/Utilities/useWindowDimensions.js +6 -0
  217. package/Libraries/Vibration/React-RCTVibration.podspec +1 -1
  218. package/Libraries/Vibration/Vibration.js +14 -11
  219. package/Libraries/vendor/emitter/EventEmitter.js +3 -3
  220. package/README.md +7 -9
  221. package/React/Base/RCTBridge+Private.h +0 -22
  222. package/React/Base/RCTBridge.h +10 -8
  223. package/React/Base/RCTBridge.mm +5 -447
  224. package/React/Base/RCTBridgeDelegate.h +1 -56
  225. package/React/Base/RCTBridgeModule.h +0 -9
  226. package/React/Base/RCTBridgeProxy.h +8 -0
  227. package/React/Base/RCTBridgeProxy.mm +3 -20
  228. package/React/Base/RCTBundleManager.h +0 -3
  229. package/React/Base/RCTBundleManager.m +0 -31
  230. package/React/Base/RCTBundleURLProvider.mm +4 -4
  231. package/React/Base/RCTCallableJSModules.m +0 -18
  232. package/React/Base/RCTConstants.h +1 -0
  233. package/React/Base/RCTConstants.m +1 -0
  234. package/React/Base/RCTConvert.mm +3 -0
  235. package/React/Base/RCTDisplayLink.h +3 -1
  236. package/React/Base/RCTJavaScriptExecutor.h +0 -69
  237. package/React/Base/RCTModuleData.mm +2 -483
  238. package/React/Base/RCTModuleRegistry.m +0 -25
  239. package/React/Base/RCTRootView.m +3 -374
  240. package/React/Base/RCTUtils.h +0 -3
  241. package/React/Base/RCTUtils.mm +17 -27
  242. package/React/Base/RCTVersion.m +2 -2
  243. package/React/Base/RCTViewRegistry.m +1 -29
  244. package/React/Base/Surface/RCTSurface.mm +1 -582
  245. package/React/Base/Surface/RCTSurfaceRootShadowView.m +0 -89
  246. package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.mm +0 -1
  247. package/React/CoreModules/PlatformStubs/RCTStatusBarManager.mm +0 -2
  248. package/React/CoreModules/RCTAlertController.mm +1 -0
  249. package/React/CoreModules/RCTAlertManager.mm +0 -5
  250. package/React/CoreModules/RCTLogBox.mm +0 -11
  251. package/React/CoreModules/RCTLogBoxView.h +0 -3
  252. package/React/CoreModules/RCTLogBoxView.mm +0 -31
  253. package/React/CoreModules/RCTPerfMonitor.mm +0 -2
  254. package/React/CoreModules/RCTStatusBarManager.mm +0 -11
  255. package/React/CoreModules/React-CoreModules.podspec +1 -1
  256. package/React/CxxModule/RCTCxxUtils.h +0 -8
  257. package/React/CxxModule/RCTCxxUtils.mm +0 -17
  258. package/React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec-generated.mm +179 -7
  259. package/React/FBReactNativeSpec/FBReactNativeSpec/FBReactNativeSpec.h +100 -2
  260. package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +373 -119
  261. package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/ComponentDescriptors.cpp +1 -1
  262. package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/ComponentDescriptors.h +1 -1
  263. package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/EventEmitters.cpp +71 -71
  264. package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/EventEmitters.h +96 -96
  265. package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/Props.cpp +357 -363
  266. package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/Props.h +211 -212
  267. package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/RCTComponentViewHelpers.h +107 -107
  268. package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/ShadowNodes.cpp +1 -1
  269. package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/ShadowNodes.h +11 -11
  270. package/React/FBReactNativeSpec/react/renderer/components/FBReactNativeSpec/States.h +2 -2
  271. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.h +4 -0
  272. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropComponentView.mm +4 -0
  273. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.h +4 -0
  274. package/React/Fabric/Mounting/ComponentViews/LegacyViewManagerInterop/RCTLegacyViewManagerInteropCoordinatorAdapter.mm +5 -0
  275. package/React/Fabric/Mounting/ComponentViews/Modal/RCTModalHostViewComponentView.mm +0 -1
  276. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTEnhancedScrollView.mm +14 -0
  277. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +13 -4
  278. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTVirtualViewContainerState.mm +12 -26
  279. package/React/Fabric/Mounting/ComponentViews/Text/RCTParagraphComponentView.mm +39 -4
  280. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +1 -1
  281. package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +5 -5
  282. package/React/Fabric/Mounting/ComponentViews/VirtualView/RCTVirtualViewComponentView.mm +0 -18
  283. package/React/Fabric/Mounting/RCTComponentViewFactory.mm +9 -5
  284. package/React/Fabric/RCTSurfacePresenter.mm +86 -5
  285. package/React/Fabric/RCTSurfacePresenterBridgeAdapter.h +2 -0
  286. package/React/I18n/RCTLocalizedString.mm +38 -2
  287. package/React/Modules/RCTEventEmitter.m +30 -10
  288. package/React/Modules/RCTI18nUtil.m +3 -1
  289. package/React/Modules/RCTUIManager.mm +0 -1501
  290. package/React/React-RCTFBReactNativeSpec.podspec +2 -2
  291. package/React/React-RCTFabric.podspec +1 -1
  292. package/React/Runtime/React-RCTRuntime.podspec +1 -1
  293. package/React/Tests/Text/RCTAttributedTextUtilsTest.mm +27 -0
  294. package/React/Views/RCTModalHostViewController.h +0 -15
  295. package/React/Views/RCTModalHostViewManager.h +0 -24
  296. package/React/Views/RCTShadowView.h +0 -2
  297. package/React/Views/RCTShadowView.m +0 -723
  298. package/React/Views/ScrollView/RCTScrollView.h +0 -81
  299. package/React/Views/ScrollView/RCTScrollableProtocol.h +0 -4
  300. package/React-Core-prebuilt.podspec +45 -17
  301. package/React-Core.podspec +10 -3
  302. package/React.podspec +1 -1
  303. package/ReactAndroid/api/ReactAndroid.api +128 -142
  304. package/ReactAndroid/build.gradle.kts +27 -22
  305. package/ReactAndroid/external-artifacts/build.gradle.kts +49 -0
  306. package/ReactAndroid/gradle.properties +1 -1
  307. package/ReactAndroid/hermes-engine/build.gradle.kts +14 -14
  308. package/ReactAndroid/publish.gradle +5 -5
  309. package/ReactAndroid/src/debug/AndroidManifest.xml +6 -0
  310. package/ReactAndroid/src/debugOptimized/AndroidManifest.xml +22 -0
  311. package/ReactAndroid/src/main/java/com/facebook/react/BaseReactPackage.kt +3 -7
  312. package/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java +4 -2
  313. package/ReactAndroid/src/main/java/com/facebook/react/ReactDelegate.kt +4 -6
  314. package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +0 -3
  315. package/ReactAndroid/src/main/java/com/facebook/react/ReactNativeHost.kt +212 -0
  316. package/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +0 -16
  317. package/ReactAndroid/src/main/java/com/facebook/react/animated/PropsAnimatedNode.kt +6 -1
  318. package/ReactAndroid/src/main/java/com/facebook/react/bridge/Arguments.kt +1 -0
  319. package/ReactAndroid/src/main/java/com/facebook/react/bridge/BridgeReactContext.kt +287 -0
  320. package/ReactAndroid/src/main/java/com/facebook/react/bridge/ColorPropConverter.kt +16 -0
  321. package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java +15 -2
  322. package/ReactAndroid/src/main/java/com/facebook/react/bridge/interop/InteropModuleRegistry.kt +1 -3
  323. package/ReactAndroid/src/main/java/com/facebook/react/common/build/ReactBuildConfig.kt +4 -0
  324. package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/MapBuffer.kt +50 -2
  325. package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/ReadableMapBuffer.kt +63 -22
  326. package/ReactAndroid/src/main/java/com/facebook/react/common/mapbuffer/WritableMapBuffer.kt +33 -0
  327. package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultNewArchitectureEntryPoint.kt +4 -12
  328. package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactActivityDelegate.kt +14 -10
  329. package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultReactNativeHost.kt +6 -6
  330. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/BundleDownloader.kt +50 -47
  331. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/CxxInspectorPackagerConnection.kt +1 -1
  332. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevServerHelper.kt +0 -4
  333. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/DevSupportManagerFactory.kt +10 -10
  334. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/LocalNetworkPermissionUtil.kt +49 -0
  335. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/MultipartStreamReader.kt +101 -26
  336. package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +40 -38
  337. package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManagerBinding.kt +1 -10
  338. package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManagerProviderImpl.kt +0 -3
  339. package/ReactAndroid/src/main/java/com/facebook/react/fabric/ViewTransitionSnapshotManager.kt +15 -11
  340. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.kt +4 -4
  341. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.kt +7 -13
  342. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.kt +160 -187
  343. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/SynchronousMountItem.kt +12 -8
  344. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +30 -66
  345. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +51 -111
  346. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +11 -23
  347. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +12 -24
  348. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +57 -123
  349. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Canary_Android.kt +7 -5
  350. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Experimental_Android.kt +3 -5
  351. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +11 -23
  352. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeNewArchitectureFeatureFlags.kt +0 -24
  353. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeNewArchitectureFeatureFlagsDefaults.kt +0 -4
  354. package/ReactAndroid/src/main/java/com/facebook/react/modules/appearance/AppearanceModule.kt +1 -0
  355. package/ReactAndroid/src/main/java/com/facebook/react/modules/core/JavaTimerManager.kt +2 -2
  356. package/ReactAndroid/src/main/java/com/facebook/react/modules/core/TimingModule.kt +3 -0
  357. package/ReactAndroid/src/main/java/com/facebook/react/modules/image/ImageLoaderModule.kt +50 -0
  358. package/ReactAndroid/src/main/java/com/facebook/react/modules/intent/IntentModule.kt +8 -4
  359. package/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkEventUtil.kt +53 -3
  360. package/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.kt +2 -2
  361. package/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.kt +2 -77
  362. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +2 -2
  363. package/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.kt +2 -2
  364. package/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessCatalystInstance.kt +1 -1
  365. package/ReactAndroid/src/main/java/com/facebook/react/runtime/BridgelessReactContext.kt +9 -4
  366. package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.kt +4 -19
  367. package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactInstance.kt +2 -6
  368. package/ReactAndroid/src/main/java/com/facebook/react/touch/ReactInterceptingViewGroup.kt +4 -4
  369. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +47 -10
  370. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/DisplayMetricsHolder.kt +1 -49
  371. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/HasChildPressedStateDelay.kt +29 -0
  372. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/JSPointerDispatcher.kt +796 -0
  373. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/JSTouchDispatcher.kt +2 -4
  374. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/LayoutShadowNode.kt +27 -27
  375. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.kt +184 -0
  376. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNode.kt +486 -0
  377. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNodeImpl.java +8 -8
  378. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ShadowNodeRegistry.kt +2 -2
  379. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/SkewMatrixHelper.kt +200 -0
  380. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ThemedReactContext.kt +3 -0
  381. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/TouchTargetHelper.kt +6 -1
  382. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/TransformHelper.kt +2 -2
  383. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIBlock.kt +7 -1
  384. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.kt +645 -0
  385. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModuleConstantsHelper.kt +2 -3
  386. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIViewOperationQueue.kt +142 -0
  387. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewGroupManager.kt +0 -10
  388. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManager.java +3 -3
  389. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagersPropertyCache.kt +527 -0
  390. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewProps.kt +3 -1
  391. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/BorderRadiusStyle.kt +6 -6
  392. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/style/ColorStop.kt +6 -0
  393. package/ReactAndroid/src/main/java/com/facebook/react/util/AndroidVersion.kt +7 -0
  394. package/ReactAndroid/src/main/java/com/facebook/react/views/drawer/ReactDrawerLayout.kt +8 -1
  395. package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostManager.kt +0 -3
  396. package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +2 -0
  397. package/ReactAndroid/src/main/java/com/facebook/react/views/progressbar/ReactProgressBarViewManager.kt +4 -4
  398. package/ReactAndroid/src/main/java/com/facebook/react/views/safeareaview/ReactSafeAreaView.kt +2 -0
  399. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.kt +1640 -0
  400. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollViewManager.kt +6 -6
  401. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactNestedScrollView.kt +1317 -0
  402. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactNestedScrollViewManager.kt +8 -8
  403. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.kt +1309 -0
  404. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.kt +7 -7
  405. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/VirtualViewContainer.kt +19 -33
  406. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/VirtualViewContainerStateClassic.kt +8 -6
  407. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/VirtualViewContainerStateExperimental.kt +4 -4
  408. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/generate-nested-scroll-view.js +13 -20
  409. package/ReactAndroid/src/main/java/com/facebook/react/views/swiperefresh/ReactSwipeRefreshLayout.kt +7 -1
  410. package/ReactAndroid/src/main/java/com/facebook/react/views/text/MutableSpannableLayout.kt +107 -0
  411. package/ReactAndroid/src/main/java/com/facebook/react/views/text/PreparedLayoutTextView.kt +122 -10
  412. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java +92 -2
  413. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextViewManager.kt +3 -0
  414. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTypefaceUtils.kt +41 -0
  415. package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextAttributeProps.kt +48 -2
  416. package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextDecorationStyle.kt +200 -0
  417. package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextEffectRegistry.kt +45 -0
  418. package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextEffectSpanFactory.kt +17 -0
  419. package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.kt +361 -15
  420. package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/AnimatedEffectSpan.kt +37 -0
  421. package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/{DrawCommandSpan.kt → CanvasEffectSpan.kt} +3 -4
  422. package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/CustomStyleSpan.kt +23 -3
  423. package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactStrikethroughSpan.kt +30 -3
  424. package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/ReactUnderlineSpan.kt +25 -3
  425. package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/SetSpanOperation.kt +1 -1
  426. package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/StatefulSpan.kt +21 -0
  427. package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/TextEffectSpan.kt +19 -0
  428. package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/TouchableSpan.kt +29 -0
  429. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.kt +83 -11
  430. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.kt +6 -2
  431. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextSelectionWatcher.kt +1 -1
  432. package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.kt +3 -17
  433. package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.kt +8 -0
  434. package/ReactAndroid/src/main/java/com/facebook/react/views/view/WindowUtil.kt +2 -0
  435. package/ReactAndroid/src/main/java/com/facebook/react/views/virtual/VirtualViewRenderState.kt +1 -1
  436. package/ReactAndroid/src/main/java/com/facebook/react/views/virtual/view/ReactVirtualView.kt +7 -8
  437. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaAlign.kt +45 -0
  438. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaBoxSizing.kt +27 -0
  439. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaConfig.kt +15 -0
  440. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaConfigJNIBase.kt +6 -0
  441. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaDimension.kt +27 -0
  442. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaDisplay.kt +31 -0
  443. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaEdge.kt +41 -0
  444. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaErrata.kt +37 -0
  445. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaExperimentalFeature.kt +27 -0
  446. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaFlexDirection.kt +31 -0
  447. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaGridTrackType.kt +33 -0
  448. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaGutter.kt +29 -0
  449. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaJustify.kt +43 -0
  450. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaLogLevel.kt +39 -0
  451. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaMeasureMode.kt +29 -0
  452. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaNative.kt +16 -0
  453. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaNode.kt +12 -2
  454. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeJNIBase.kt +762 -0
  455. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeJNIFinalizer.kt +4 -4
  456. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeType.kt +27 -0
  457. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaOverflow.kt +29 -0
  458. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaPositionType.kt +29 -0
  459. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaProps.kt +24 -2
  460. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaUnit.kt +37 -0
  461. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaWrap.kt +29 -0
  462. package/ReactAndroid/src/main/jni/CMakeLists.txt +1 -2
  463. package/ReactAndroid/src/main/jni/first-party/yogajni/jni/YGJNIVanilla.cpp +94 -0
  464. package/ReactAndroid/src/main/jni/react/devsupport/JCxxInspectorPackagerConnectionDelegateImpl.cpp +3 -0
  465. package/ReactAndroid/src/main/jni/react/fabric/AndroidAnimationChoreographer.h +10 -10
  466. package/ReactAndroid/src/main/jni/react/fabric/CoreComponentsRegistry.cpp +3 -0
  467. package/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp +12 -15
  468. package/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.h +1 -3
  469. package/ReactAndroid/src/main/jni/react/fabric/test/FabricMountingManagerTest.cpp +159 -0
  470. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +69 -153
  471. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +15 -33
  472. package/ReactAndroid/src/main/jni/react/jni/JReactMarker.cpp +10 -24
  473. package/ReactAndroid/src/main/jni/react/jni/JReactMarker.h +0 -2
  474. package/ReactAndroid/src/main/jni/react/mapbuffer/react/common/mapbuffer/JWritableMapBuffer.cpp +13 -0
  475. package/ReactAndroid/src/main/jni/react/runtime/jni/JReactInstance.cpp +4 -1
  476. package/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManager.cpp +8 -0
  477. package/ReactAndroid/src/main/jni/react/turbomodule/ReactCommon/TurboModuleManager.h +4 -0
  478. package/ReactAndroid/src/main/res/views/uimanager/values/ids.xml +5 -0
  479. package/ReactAndroid/src/main/res/views/uimanager/values-zu/strings.xml +3 -0
  480. package/ReactApple/Libraries/RCTFoundation/RCTDeprecation/RCTDeprecation.podspec +1 -1
  481. package/ReactApple/RCTAnimatedModuleProvider/React-RCTAnimatedModuleProvider.podspec +63 -0
  482. package/ReactApple/RCTSwiftUI/RCTSwiftUI.podspec +1 -1
  483. package/ReactApple/RCTSwiftUIWrapper/RCTSwiftUIWrapper.podspec +1 -1
  484. package/ReactCommon/React-Fabric.podspec +3 -1
  485. package/ReactCommon/React-FabricComponents.podspec +1 -1
  486. package/ReactCommon/React-FabricImage.podspec +1 -1
  487. package/ReactCommon/React-Mapbuffer.podspec +1 -1
  488. package/ReactCommon/ReactCommon.podspec +3 -13
  489. package/ReactCommon/callinvoker/React-callinvoker.podspec +1 -1
  490. package/ReactCommon/cmake-utils/react-native-flags.cmake +1 -3
  491. package/ReactCommon/cxxreact/CMakeLists.txt +1 -0
  492. package/ReactCommon/cxxreact/ErrorUtils.h +2 -32
  493. package/ReactCommon/cxxreact/Instance.cpp +1 -26
  494. package/ReactCommon/cxxreact/Instance.h +0 -2
  495. package/ReactCommon/cxxreact/NativeToJsBridge.cpp +3 -2
  496. package/ReactCommon/cxxreact/RAMBundleRegistry.cpp +0 -12
  497. package/ReactCommon/cxxreact/RAMBundleRegistry.h +0 -5
  498. package/ReactCommon/cxxreact/React-cxxreact.podspec +3 -2
  499. package/ReactCommon/cxxreact/ReactMarker.cpp +4 -30
  500. package/ReactCommon/cxxreact/ReactMarker.h +38 -21
  501. package/ReactCommon/cxxreact/ReactNativeVersion.h +4 -4
  502. package/ReactCommon/cxxreact/TraceSection.h +1 -1
  503. package/ReactCommon/cxxreact/tests/methodcall.cpp +4 -0
  504. package/ReactCommon/hermes/React-hermes.podspec +1 -1
  505. package/ReactCommon/hermes/executor/HermesExecutorFactory.cpp +6 -79
  506. package/ReactCommon/hermes/executor/React-jsitracing.podspec +1 -1
  507. package/ReactCommon/jserrorhandler/ErrorUtils.cpp +42 -0
  508. package/{React/CxxLogUtils/RCTDefaultCxxLogFunction.h → ReactCommon/jserrorhandler/ErrorUtils.h} +2 -2
  509. package/ReactCommon/jserrorhandler/JsErrorHandler.cpp +1 -1
  510. package/ReactCommon/jserrorhandler/React-jserrorhandler.podspec +3 -4
  511. package/ReactCommon/jsi/React-jsi.podspec +1 -1
  512. package/ReactCommon/jsi/jsi/hermes-interfaces.h +53 -0
  513. package/ReactCommon/jsiexecutor/React-jsiexecutor.podspec +3 -2
  514. package/ReactCommon/jsiexecutor/jsireact/JSIExecutor.cpp +3 -14
  515. package/ReactCommon/jsiexecutor/jsireact/JSINativeModules.cpp +4 -13
  516. package/ReactCommon/jsinspector-modern/HostAgent.cpp +54 -0
  517. package/ReactCommon/jsinspector-modern/HostTarget.h +0 -7
  518. package/ReactCommon/jsinspector-modern/HostTargetTraceRecording.cpp +10 -7
  519. package/ReactCommon/jsinspector-modern/InspectorPackagerConnection.cpp +4 -1
  520. package/ReactCommon/jsinspector-modern/React-jsinspector.podspec +1 -1
  521. package/ReactCommon/jsinspector-modern/RuntimeAgent.cpp +7 -0
  522. package/ReactCommon/jsinspector-modern/RuntimeTarget.cpp +20 -0
  523. package/ReactCommon/jsinspector-modern/RuntimeTarget.h +16 -0
  524. package/ReactCommon/jsinspector-modern/SessionState.h +31 -0
  525. package/ReactCommon/jsinspector-modern/cdp/React-jsinspectorcdp.podspec +1 -1
  526. package/ReactCommon/jsinspector-modern/network/React-jsinspectornetwork.podspec +1 -1
  527. package/ReactCommon/jsinspector-modern/tests/HostTargetTest.cpp +53 -0
  528. package/ReactCommon/jsinspector-modern/tracing/HostTracingProfile.h +14 -1
  529. package/ReactCommon/jsinspector-modern/tracing/React-jsinspectortracing.podspec +1 -1
  530. package/ReactCommon/jsinspector-modern/tracing/TraceRecordingState.h +11 -0
  531. package/ReactCommon/jsitooling/React-jsitooling.podspec +1 -1
  532. package/ReactCommon/logger/React-logger.podspec +1 -1
  533. package/ReactCommon/oscompat/React-oscompat.podspec +1 -1
  534. package/ReactCommon/react/bridging/ArrayBuffer.h +180 -0
  535. package/ReactCommon/react/bridging/Bridging.h +1 -0
  536. package/ReactCommon/react/bridging/Convert.h +12 -0
  537. package/ReactCommon/react/bridging/React-bridging.podspec +44 -0
  538. package/ReactCommon/react/bridging/tests/BridgingTest.cpp +185 -11
  539. package/ReactCommon/react/bridging/tests/ClassTest.cpp +22 -0
  540. package/ReactCommon/react/cxxstableapi/CMakeLists.txt +18 -0
  541. package/ReactCommon/react/cxxstableapi/FrameworksGuard.h +35 -0
  542. package/ReactCommon/react/cxxstableapi/PrivateGuard.h +34 -0
  543. package/ReactCommon/react/cxxstableapi/React-cxxstableapi.podspec +34 -0
  544. package/ReactCommon/react/cxxstableapi/UmbrellaGuard.h +53 -0
  545. package/ReactCommon/react/debug/React-debug.podspec +1 -1
  546. package/ReactCommon/react/debug/redbox/JscSafeUrl.h +1 -1
  547. package/ReactCommon/react/featureflags/React-featureflags.podspec +1 -1
  548. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +21 -45
  549. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +26 -56
  550. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +134 -242
  551. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +14 -26
  552. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +20 -44
  553. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +43 -97
  554. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSCanary.h +10 -6
  555. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSExperimental.h +3 -7
  556. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSStable.h +0 -8
  557. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +7 -13
  558. package/ReactCommon/react/nativemodule/core/ReactCommon/TurboModule.h +1 -0
  559. package/ReactCommon/react/nativemodule/core/iostests/RCTTurboModuleTests.mm +49 -0
  560. package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaInteropTurboModule.cpp +4 -0
  561. package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaInteropTurboModule.h +4 -0
  562. package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp +2 -2
  563. package/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +2 -2
  564. package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTInteropTurboModule.h +4 -0
  565. package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTInteropTurboModule.mm +5 -1
  566. package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm +61 -4
  567. package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.h +0 -9
  568. package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleManager.mm +37 -139
  569. package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModuleWithJSIBindings.h +0 -3
  570. package/ReactCommon/react/nativemodule/defaults/DefaultTurboModules.cpp +6 -0
  571. package/ReactCommon/react/nativemodule/defaults/React-defaultsnativemodule.podspec +1 -1
  572. package/ReactCommon/react/nativemodule/dom/NativeDOM.cpp +10 -4
  573. package/ReactCommon/react/nativemodule/dom/React-domnativemodule.podspec +2 -1
  574. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +25 -55
  575. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +11 -23
  576. package/ReactCommon/react/nativemodule/featureflags/React-featureflagsnativemodule.podspec +1 -1
  577. package/ReactCommon/react/nativemodule/idlecallbacks/React-idlecallbacksnativemodule.podspec +2 -1
  578. package/ReactCommon/react/nativemodule/intersectionobserver/React-intersectionobservernativemodule.podspec +2 -1
  579. package/ReactCommon/react/nativemodule/microtasks/React-microtasksnativemodule.podspec +1 -1
  580. package/ReactCommon/react/nativemodule/mutationobserver/NativeMutationObserver.cpp +4 -0
  581. package/ReactCommon/react/nativemodule/mutationobserver/React-mutationobservernativemodule.podspec +2 -1
  582. package/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec +1 -1
  583. package/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTSampleTurboModule.h +1 -1
  584. package/ReactCommon/react/nativemodule/viewtransition/React-viewtransitionnativemodule.podspec +1 -1
  585. package/ReactCommon/react/nativemodule/webperformance/React-webperformancenativemodule.podspec +2 -1
  586. package/ReactCommon/react/networking/React-networking.podspec +1 -1
  587. package/ReactCommon/react/performance/cdpmetrics/React-performancecdpmetrics.podspec +1 -1
  588. package/ReactCommon/react/performance/timeline/React-performancetimeline.podspec +1 -1
  589. package/ReactCommon/react/renderer/animated/NativeAnimatedNodesManager.cpp +95 -63
  590. package/ReactCommon/react/renderer/animated/NativeAnimatedNodesManager.h +20 -1
  591. package/ReactCommon/react/renderer/animated/NativeAnimatedNodesManagerProvider.cpp +7 -10
  592. package/ReactCommon/react/renderer/animated/drivers/FrameAnimationDriver.cpp +20 -1
  593. package/ReactCommon/react/renderer/animated/drivers/FrameAnimationDriver.h +1 -0
  594. package/ReactCommon/react/renderer/animated/internal/primitives.h +1 -1
  595. package/ReactCommon/react/renderer/animated/nodes/InterpolationAnimatedNode.cpp +67 -6
  596. package/ReactCommon/react/renderer/animated/nodes/InterpolationAnimatedNode.h +12 -0
  597. package/ReactCommon/react/renderer/animated/nodes/PropsAnimatedNode.cpp +25 -13
  598. package/ReactCommon/react/renderer/animated/nodes/PropsAnimatedNode.h +7 -0
  599. package/ReactCommon/react/renderer/animated/tests/AnimationDriverTests.cpp +48 -0
  600. package/ReactCommon/react/renderer/animated/tests/DecayAnimationDriverTest.cpp +245 -0
  601. package/ReactCommon/react/renderer/animated/tests/ManagedPropsMountingOverrideTests.cpp +204 -0
  602. package/ReactCommon/react/renderer/animationbackend/AnimatedPropsRegistry.cpp +10 -1
  603. package/ReactCommon/react/renderer/animationbackend/AnimatedPropsRegistry.h +1 -0
  604. package/ReactCommon/react/renderer/animationbackend/AnimationBackend.cpp +17 -0
  605. package/ReactCommon/react/renderer/animations/tests/LayoutAnimationTest.cpp +0 -2
  606. package/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp +6 -2
  607. package/ReactCommon/react/renderer/attributedstring/TextAttributes.h +25 -1
  608. package/ReactCommon/react/renderer/attributedstring/conversions.h +29 -1
  609. package/ReactCommon/react/renderer/attributedstring/primitives.h +4 -2
  610. package/ReactCommon/react/renderer/attributedstring/tests/ParagraphAttributesTest.cpp +73 -0
  611. package/ReactCommon/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp +6 -0
  612. package/ReactCommon/react/renderer/components/image/ImageProps.cpp +79 -126
  613. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropShadowNode.cpp +4 -0
  614. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropShadowNode.h +4 -0
  615. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropState.h +4 -0
  616. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewProps.cpp +5 -0
  617. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropViewProps.h +4 -0
  618. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/UnstableLegacyViewManagerAutomaticComponentDescriptor.cpp +5 -0
  619. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/UnstableLegacyViewManagerAutomaticComponentDescriptor.h +4 -0
  620. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/UnstableLegacyViewManagerAutomaticShadowNode.cpp +4 -0
  621. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/UnstableLegacyViewManagerAutomaticShadowNode.h +4 -0
  622. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/UnstableLegacyViewManagerInteropComponentDescriptor.h +4 -0
  623. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/platform/ios/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.h +4 -0
  624. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/platform/ios/react/renderer/components/legacyviewmanagerinterop/LegacyViewManagerInteropComponentDescriptor.mm +5 -0
  625. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/platform/ios/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.h +4 -0
  626. package/ReactCommon/react/renderer/components/legacyviewmanagerinterop/platform/ios/react/renderer/components/legacyviewmanagerinterop/RCTLegacyViewManagerInteropCoordinator.mm +5 -0
  627. package/ReactCommon/react/renderer/components/scrollview/BaseScrollViewProps.cpp +235 -352
  628. package/ReactCommon/react/renderer/components/scrollview/platform/android/react/renderer/components/scrollview/HostPlatformScrollViewProps.cpp +30 -46
  629. package/ReactCommon/react/renderer/components/text/BaseParagraphProps.cpp +17 -27
  630. package/ReactCommon/react/renderer/components/text/BaseTextProps.cpp +8 -10
  631. package/ReactCommon/react/renderer/components/text/BaseTextShadowNode.cpp +19 -0
  632. package/ReactCommon/react/renderer/components/text/TextEffectComponentDescriptor.h +17 -0
  633. package/ReactCommon/react/renderer/components/text/TextEffectProps.cpp +59 -0
  634. package/ReactCommon/react/renderer/components/text/TextEffectProps.h +30 -0
  635. package/{Libraries/Text/VirtualText/RCTVirtualTextView.mm → ReactCommon/react/renderer/components/text/TextEffectShadowNode.cpp} +4 -6
  636. package/ReactCommon/react/renderer/components/text/TextEffectShadowNode.h +26 -0
  637. package/ReactCommon/react/renderer/components/text/platform/android/react/renderer/components/text/HostPlatformParagraphProps.cpp +18 -28
  638. package/ReactCommon/react/renderer/components/text/tests/BaseTextShadowNodeTest.cpp +15 -0
  639. package/ReactCommon/react/renderer/components/textinput/platform/android/react/renderer/components/androidtextinput/AndroidTextInputProps.cpp +42 -50
  640. package/ReactCommon/react/renderer/components/view/AccessibilityProps.cpp +168 -754
  641. package/ReactCommon/react/renderer/components/view/AccessibilityProps.h +0 -9
  642. package/ReactCommon/react/renderer/components/view/BaseViewProps.cpp +248 -312
  643. package/ReactCommon/react/renderer/components/view/ViewShadowNode.cpp +0 -6
  644. package/ReactCommon/react/renderer/components/view/ViewShadowNode.h +2 -12
  645. package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +73 -27
  646. package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.h +7 -9
  647. package/ReactCommon/react/renderer/components/view/YogaStylableProps.cpp +3 -11
  648. package/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.cpp +82 -162
  649. package/ReactCommon/react/renderer/components/view/primitives.h +5 -0
  650. package/ReactCommon/react/renderer/components/view/propsConversions.h +74 -42
  651. package/ReactCommon/react/renderer/components/view/tests/LayoutTest.cpp +5 -5
  652. package/ReactCommon/react/renderer/components/view/tests/ViewTest.cpp +353 -6
  653. package/ReactCommon/react/renderer/consistency/React-rendererconsistency.podspec +1 -1
  654. package/ReactCommon/react/renderer/core/ConcreteComponentDescriptor.h +41 -16
  655. package/ReactCommon/react/renderer/core/ConcreteShadowNode.h +19 -0
  656. package/ReactCommon/react/renderer/core/EventEmitter.cpp +20 -4
  657. package/ReactCommon/react/renderer/core/LayoutMetrics.h +3 -0
  658. package/ReactCommon/react/renderer/core/Props.cpp +8 -39
  659. package/ReactCommon/react/renderer/core/Props.h +63 -13
  660. package/ReactCommon/react/renderer/core/RawProps.cpp +20 -3
  661. package/ReactCommon/react/renderer/core/RawProps.h +44 -0
  662. package/ReactCommon/react/renderer/core/RawPropsKeyMap.cpp +11 -27
  663. package/ReactCommon/react/renderer/core/RawPropsKeyMap.h +3 -3
  664. package/ReactCommon/react/renderer/core/RawPropsParser.cpp +4 -6
  665. package/ReactCommon/react/renderer/core/RawPropsParser.h +3 -3
  666. package/ReactCommon/react/renderer/core/StateData.h +4 -4
  667. package/ReactCommon/react/renderer/core/propsConversions.h +3 -7
  668. package/ReactCommon/react/renderer/core/tests/ComponentDescriptorTest.cpp +8 -0
  669. package/ReactCommon/react/renderer/core/tests/FindNodeAtPointTest.cpp +7 -7
  670. package/ReactCommon/react/renderer/core/tests/LayoutableShadowNodeTest.cpp +19 -19
  671. package/ReactCommon/react/renderer/core/tests/PropsConceptsTest.cpp +135 -0
  672. package/ReactCommon/react/renderer/core/tests/RawPropsTest.cpp +43 -53
  673. package/ReactCommon/react/renderer/css/React-renderercss.podspec +1 -1
  674. package/ReactCommon/react/renderer/debug/React-rendererdebug.podspec +1 -1
  675. package/ReactCommon/react/renderer/element/tests/ElementTest.cpp +3 -3
  676. package/ReactCommon/react/renderer/graphics/React-graphics.podspec +1 -1
  677. package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/conversions.h +17 -0
  678. package/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec +1 -1
  679. package/ReactCommon/react/renderer/imagemanager/platform/ios/react/renderer/imagemanager/RCTSyncImageManager.mm +1 -1
  680. package/ReactCommon/react/renderer/mapbuffer/MapBuffer.cpp +123 -33
  681. package/ReactCommon/react/renderer/mapbuffer/MapBuffer.h +26 -14
  682. package/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.cpp +96 -53
  683. package/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.h +4 -0
  684. package/ReactCommon/react/renderer/mapbuffer/tests/MapBufferTest.cpp +96 -1
  685. package/ReactCommon/react/renderer/mounting/Differentiator.cpp +29 -318
  686. package/ReactCommon/react/renderer/mounting/ShadowTree.cpp +105 -33
  687. package/ReactCommon/react/renderer/mounting/ShadowTree.h +2 -0
  688. package/ReactCommon/react/renderer/mounting/internal/CullingContext.cpp +1 -1
  689. package/ReactCommon/react/renderer/mounting/tests/DifferentiatorUnflattenTest.cpp +11 -3
  690. package/ReactCommon/react/renderer/mounting/tests/OrderIndexTest.cpp +1 -1
  691. package/ReactCommon/react/renderer/mounting/tests/ShadowTreeLifeCycleTest.cpp +15 -250
  692. package/ReactCommon/react/renderer/mounting/tests/ShadowTreeReactBranchingTest.cpp +141 -0
  693. package/ReactCommon/react/renderer/mounting/tests/StackingContextTest.cpp +1 -1
  694. package/ReactCommon/react/renderer/runtimescheduler/CMakeLists.txt +1 -0
  695. package/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +2 -1
  696. package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.cpp +22 -2
  697. package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler.h +13 -2
  698. package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Legacy.cpp +13 -0
  699. package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Legacy.h +9 -0
  700. package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.cpp +43 -5
  701. package/ReactCommon/react/renderer/runtimescheduler/RuntimeScheduler_Modern.h +17 -1
  702. package/ReactCommon/react/renderer/runtimescheduler/Task.h +4 -0
  703. package/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp +113 -8
  704. package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +14 -6
  705. package/ReactCommon/react/renderer/scheduler/Scheduler.h +3 -2
  706. package/ReactCommon/react/renderer/scheduler/SurfaceHandler.cpp +1 -85
  707. package/ReactCommon/react/renderer/scheduler/SurfaceHandler.h +0 -6
  708. package/ReactCommon/react/renderer/scheduler/tests/SchedulerDelegateInvalidationTest.cpp +671 -0
  709. package/ReactCommon/react/renderer/textlayoutmanager/TextMeasureCache.h +22 -5
  710. package/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.cpp +4 -2
  711. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.h +11 -0
  712. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTAttributedTextUtils.mm +65 -26
  713. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm +1 -1
  714. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.mm +193 -1
  715. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextPrimitivesConversions.h +14 -2
  716. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/TextLayoutManager.mm +2 -1
  717. package/ReactCommon/react/renderer/textlayoutmanager/tests/TextLayoutManagerTest.cpp +86 -5
  718. package/ReactCommon/react/renderer/uimanager/UIManager.cpp +31 -41
  719. package/ReactCommon/react/renderer/uimanager/UIManager.h +2 -2
  720. package/ReactCommon/react/renderer/uimanager/UIManagerDelegate.h +1 -1
  721. package/ReactCommon/react/renderer/uimanager/tests/FindShadowNodeByTagTest.cpp +1 -52
  722. package/ReactCommon/react/renderer/uimanager/tests/PointerEventsProcessorTest.cpp +4 -4
  723. package/ReactCommon/react/renderer/viewtransition/ViewTransitionModule.cpp +88 -39
  724. package/ReactCommon/react/renderer/viewtransition/ViewTransitionModule.h +12 -2
  725. package/ReactCommon/react/runtime/PlatformTimerRegistry.h +10 -0
  726. package/ReactCommon/react/runtime/React-RuntimeCore.podspec +1 -1
  727. package/ReactCommon/react/runtime/React-RuntimeHermes.podspec +1 -1
  728. package/ReactCommon/react/runtime/ReactInstance.cpp +79 -64
  729. package/ReactCommon/react/runtime/hermes/HermesInstance.cpp +0 -89
  730. package/ReactCommon/react/runtime/iostests/MainQueueCoordinatorTests.mm +99 -0
  731. package/ReactCommon/react/runtime/iostests/RCTInstanceTests.mm +244 -0
  732. package/ReactCommon/react/runtime/platform/ios/React-RuntimeApple.podspec +1 -1
  733. package/ReactCommon/react/runtime/platform/ios/ReactCommon/ObjCTimerRegistry.h +1 -1
  734. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTInstance.mm +47 -30
  735. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTJscInstance.mm +3 -2
  736. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTPerformanceLoggerUtils.mm +3 -2
  737. package/ReactCommon/react/runtime/tests/cxx/ReactInstanceTest.cpp +27 -3
  738. package/ReactCommon/react/runtime/tests/cxx/RuntimeExecutorShutdownTest.cpp +155 -0
  739. package/ReactCommon/react/timing/React-timing.podspec +1 -1
  740. package/ReactCommon/react/utils/React-utils.podspec +1 -1
  741. package/ReactCommon/react/utils/Telemetry.h +0 -13
  742. package/ReactCommon/react/utils/tests/Base64Tests.cpp +36 -0
  743. package/ReactCommon/reactperflogger/React-perflogger.podspec +1 -1
  744. package/ReactCommon/reactperflogger/reactperflogger/ReactPerfettoLogger.cpp +0 -1
  745. package/ReactCommon/runtimeexecutor/React-runtimeexecutor.podspec +1 -1
  746. package/ReactCommon/runtimeexecutor/platform/ios/ReactCommon/RuntimeExecutorSyncUIThreadUtils.mm +21 -38
  747. package/ReactCommon/yoga/Yoga.podspec +2 -2
  748. package/ReactCommon/yoga/yoga/YGEnums.cpp +2 -0
  749. package/ReactCommon/yoga/yoga/YGEnums.h +1 -0
  750. package/ReactCommon/yoga/yoga/YGNode.cpp +27 -0
  751. package/ReactCommon/yoga/yoga/YGNode.h +69 -0
  752. package/ReactCommon/yoga/yoga/YGNodeLayout.h +0 -2
  753. package/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp +283 -10
  754. package/ReactCommon/yoga/yoga/config/Config.h +1 -1
  755. package/ReactCommon/yoga/yoga/enums/Errata.h +1 -0
  756. package/ReactCommon/yoga/yoga/node/LayoutResults.h +8 -0
  757. package/ReactCommon/yoga/yoga/node/Node.cpp +32 -0
  758. package/ReactCommon/yoga/yoga/node/Node.h +33 -0
  759. package/changes.json +6 -14
  760. package/cli.js +3 -182
  761. package/flow/bom.js.flow +42 -42
  762. package/flow/cssom.js.flow +21 -21
  763. package/flow/dom.js.flow +128 -128
  764. package/flow/global.js +6 -0
  765. package/gradle/libs.versions.toml +7 -5
  766. package/index.js +53 -86
  767. package/index.js.flow +53 -23
  768. package/package.json +47 -66
  769. package/react-native.config.js +82 -1
  770. package/scripts/cocoapods/fabric.rb +1 -1
  771. package/scripts/cocoapods/jsengine.rb +1 -1
  772. package/scripts/cocoapods/new_architecture.rb +1 -1
  773. package/scripts/cocoapods/rncore.rb +36 -78
  774. package/scripts/cocoapods/rncore_facades.rb +232 -0
  775. package/scripts/cocoapods/rndependencies.rb +83 -16
  776. package/scripts/cocoapods/rndeps_facades.rb +193 -0
  777. package/scripts/cocoapods/spm.rb +79 -12
  778. package/scripts/cocoapods/utils.rb +7 -9
  779. package/scripts/codegen/generate-artifacts-executor/generateSchemaInfos.js +0 -1
  780. package/scripts/codegen/templates/Package.swift.spm-template +97 -0
  781. package/scripts/codegen/templates/ReactAppDependencyProvider.podspec.template +1 -1
  782. package/scripts/codegen/templates/ReactCodegen.podspec.template +2 -2
  783. package/scripts/hermes/hermes-utils.js +27 -58
  784. package/scripts/ios-configure-glog.sh +1 -1
  785. package/scripts/react-native-xcode.sh +20 -0
  786. package/scripts/react_native_pods.rb +71 -21
  787. package/scripts/react_native_pods_utils/script_phases.sh +4 -3
  788. package/scripts/replace-rncore-version.js +75 -88
  789. package/scripts/setup-apple-spm.js +1283 -0
  790. package/scripts/spm/autolinking-plugins.js +411 -0
  791. package/scripts/spm/download-spm-artifacts.js +1467 -0
  792. package/scripts/spm/expand-spm-dependencies.js +435 -0
  793. package/scripts/spm/flavored-frameworks.js +1008 -0
  794. package/scripts/spm/generate-spm-autolinking-config.js +221 -0
  795. package/scripts/spm/generate-spm-autolinking.js +2005 -0
  796. package/scripts/spm/generate-spm-package.js +314 -0
  797. package/scripts/spm/generate-spm-xcodeproj.js +2790 -0
  798. package/scripts/spm/read-podspec.js +695 -0
  799. package/scripts/spm/scaffold-package-swift.js +1247 -0
  800. package/scripts/spm/spm-pbxproj.js +784 -0
  801. package/scripts/spm/spm-types.js +546 -0
  802. package/scripts/spm/spm-utils.js +760 -0
  803. package/scripts/spm/sync-spm-autolinking.js +160 -0
  804. package/sdks/.hermesv1version +1 -1
  805. package/sdks/hermes-engine/hermes-engine.podspec +9 -39
  806. package/sdks/hermes-engine/hermes-utils.rb +19 -73
  807. package/sdks/hermes-engine/utils/replace_hermes_version.js +18 -4
  808. package/sdks/hermes-engine/version.properties +1 -2
  809. package/settings.gradle.kts +0 -43
  810. package/src/asset-registry.js +29 -0
  811. package/src/private/animated/NativeAnimatedHelper.js +45 -21
  812. package/src/private/assets/AssetRegistry.js +52 -0
  813. package/src/private/{specs_DEPRECATED/components → components/activityindicator/specs}/ActivityIndicatorViewNativeComponent.js +5 -5
  814. package/src/private/{specs_DEPRECATED/components → components/debuggingoverlay/specs}/DebuggingOverlayNativeComponent.js +8 -8
  815. package/src/private/{specs_DEPRECATED/components → components/drawerlayoutandroid/specs}/AndroidDrawerLayoutNativeComponent.js +8 -8
  816. package/src/private/{specs_DEPRECATED/components → components/inputaccessoryview/specs}/RCTInputAccessoryViewNativeComponent.js +4 -4
  817. package/src/private/{specs_DEPRECATED/components → components/modal/specs}/RCTModalHostViewNativeComponent.js +4 -9
  818. package/src/private/{specs_DEPRECATED/components → components/progressbarandroid/specs}/ProgressBarAndroidNativeComponent.js +5 -5
  819. package/src/private/{specs_DEPRECATED/components → components/refreshcontrol/specs}/AndroidSwipeRefreshLayoutNativeComponent.js +7 -7
  820. package/src/private/{specs_DEPRECATED/components → components/refreshcontrol/specs}/PullToRefreshViewNativeComponent.js +7 -7
  821. package/src/private/components/safeareaview/SafeAreaView_INTERNAL_DO_NOT_USE.js +2 -2
  822. package/src/private/{specs_DEPRECATED/components → components/safeareaview/specs}/RCTSafeAreaViewNativeComponent.js +3 -3
  823. package/src/private/components/scrollview/HScrollViewNativeComponents.js +1 -1
  824. package/src/private/{specs_DEPRECATED/components → components/scrollview/specs}/AndroidHorizontalScrollContentViewNativeComponent.js +3 -3
  825. package/src/private/{specs_DEPRECATED/components → components/switch/specs}/AndroidSwitchNativeComponent.js +7 -7
  826. package/src/private/{specs_DEPRECATED/components → components/switch/specs}/SwitchNativeComponent.js +10 -7
  827. package/src/private/{specs_DEPRECATED/components → components/unimplementedview/specs}/UnimplementedNativeViewNativeComponent.js +4 -4
  828. package/src/private/components/virtualcollection/Virtual.js +5 -5
  829. package/src/private/components/virtualcollection/VirtualCollectionView.js +2 -6
  830. package/src/private/components/virtualcollection/column/VirtualColumn.js +1 -1
  831. package/src/private/components/virtualcollection/row/VirtualRow.js +1 -1
  832. package/src/private/devsupport/devmenu/elementinspector/Inspector.js +3 -1
  833. package/src/private/devsupport/devmenu/specs/NativeDevMenu.js +4 -4
  834. package/src/private/devsupport/rndevtools/specs/NativeReactDevToolsRuntimeSettingsModule.js +4 -2
  835. package/src/private/devsupport/rndevtools/specs/NativeReactDevToolsSettingsManager.js +2 -2
  836. package/src/private/featureflags/ReactNativeFeatureFlags.js +46 -70
  837. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +88 -94
  838. package/src/private/renderer/errorhandling/ErrorHandlers.js +2 -2
  839. package/src/private/renderer/events/ReactNativeResponder.js +49 -4
  840. package/src/private/renderer/events/ResponderTouchHistoryStore.js +11 -2
  841. package/src/private/renderer/events/dispatchNativeEvent.js +71 -36
  842. package/src/private/setup/setUpDOM.js +19 -9
  843. package/src/private/setup/setUpIntersectionObserver.js +7 -0
  844. package/src/private/setup/setUpMutationObserver.js +3 -1
  845. package/src/private/specs_DEPRECATED/modules/NativeAccessibilityInfo.js +9 -9
  846. package/src/private/specs_DEPRECATED/modules/NativeAccessibilityManager.js +24 -24
  847. package/src/private/specs_DEPRECATED/modules/NativeActionSheetManager.js +28 -28
  848. package/src/private/specs_DEPRECATED/modules/NativeAlertManager.js +1 -1
  849. package/src/private/specs_DEPRECATED/modules/NativeAnimatedModule.js +45 -25
  850. package/src/private/specs_DEPRECATED/modules/NativeAnimatedTurboModule.js +44 -24
  851. package/src/private/specs_DEPRECATED/modules/NativeAppState.js +4 -4
  852. package/src/private/specs_DEPRECATED/modules/NativeAppearance.js +8 -6
  853. package/src/private/specs_DEPRECATED/modules/NativeBlobModule.js +7 -7
  854. package/src/private/specs_DEPRECATED/modules/NativeClipboard.js +3 -3
  855. package/src/private/specs_DEPRECATED/modules/NativeDevLoadingView.js +2 -2
  856. package/src/private/specs_DEPRECATED/modules/NativeDevSettings.js +11 -11
  857. package/src/private/specs_DEPRECATED/modules/NativeDeviceEventManager.js +1 -1
  858. package/src/private/specs_DEPRECATED/modules/NativeDeviceInfo.js +4 -4
  859. package/src/private/specs_DEPRECATED/modules/NativeDialogManagerAndroid.js +7 -7
  860. package/src/private/specs_DEPRECATED/modules/NativeExceptionsManager.js +4 -4
  861. package/src/private/specs_DEPRECATED/modules/NativeFileReaderModule.js +2 -2
  862. package/src/private/specs_DEPRECATED/modules/NativeFrameRateLogger.js +4 -4
  863. package/src/private/specs_DEPRECATED/modules/NativeHeadlessJsTaskSupport.js +2 -2
  864. package/src/private/specs_DEPRECATED/modules/NativeI18nManager.js +1 -1
  865. package/src/private/specs_DEPRECATED/modules/NativeImageEditor.js +13 -13
  866. package/src/private/specs_DEPRECATED/modules/NativeImageLoaderAndroid.js +9 -6
  867. package/src/private/specs_DEPRECATED/modules/NativeImageLoaderIOS.js +6 -6
  868. package/src/private/specs_DEPRECATED/modules/NativeImageStoreAndroid.js +2 -2
  869. package/src/private/specs_DEPRECATED/modules/NativeImageStoreIOS.js +8 -5
  870. package/src/private/specs_DEPRECATED/modules/NativeIntentAndroid.js +5 -5
  871. package/src/private/specs_DEPRECATED/modules/NativeJSCHeapCapture.js +1 -1
  872. package/src/private/specs_DEPRECATED/modules/NativeKeyboardObserver.js +2 -2
  873. package/src/private/specs_DEPRECATED/modules/NativeLinkingManager.js +6 -6
  874. package/src/private/specs_DEPRECATED/modules/NativeLogBox.js +2 -2
  875. package/src/private/specs_DEPRECATED/modules/NativeModalManager.js +2 -2
  876. package/src/private/specs_DEPRECATED/modules/NativeNetworkingAndroid.js +5 -5
  877. package/src/private/specs_DEPRECATED/modules/NativeNetworkingIOS.js +6 -6
  878. package/src/private/specs_DEPRECATED/modules/NativePermissionsAndroid.js +6 -4
  879. package/src/private/specs_DEPRECATED/modules/NativePlatformConstantsAndroid.js +2 -2
  880. package/src/private/specs_DEPRECATED/modules/NativePlatformConstantsIOS.js +1 -1
  881. package/src/private/specs_DEPRECATED/modules/NativePushNotificationManagerIOS.js +35 -31
  882. package/src/private/specs_DEPRECATED/modules/NativeRedBox.js +2 -2
  883. package/src/private/specs_DEPRECATED/modules/NativeSampleTurboModule.js +24 -24
  884. package/src/private/specs_DEPRECATED/modules/NativeSegmentFetcher.js +2 -2
  885. package/src/private/specs_DEPRECATED/modules/NativeSettingsManager.js +3 -3
  886. package/src/private/specs_DEPRECATED/modules/NativeShareModule.js +2 -2
  887. package/src/private/specs_DEPRECATED/modules/NativeSoundManager.js +1 -1
  888. package/src/private/specs_DEPRECATED/modules/NativeSourceCode.js +1 -1
  889. package/src/private/specs_DEPRECATED/modules/NativeStatusBarManagerAndroid.js +5 -17
  890. package/src/private/specs_DEPRECATED/modules/NativeStatusBarManagerIOS.js +10 -15
  891. package/src/private/specs_DEPRECATED/modules/NativeTiming.js +3 -3
  892. package/src/private/specs_DEPRECATED/modules/NativeToastAndroid.js +4 -4
  893. package/src/private/specs_DEPRECATED/modules/NativeUIManager.js +35 -22
  894. package/src/private/specs_DEPRECATED/modules/NativeVibration.js +4 -4
  895. package/src/private/specs_DEPRECATED/modules/NativeWebSocketModule.js +7 -7
  896. package/src/private/types/HostInstance.js +38 -80
  897. package/src/private/viewtransition/specs/NativeViewTransition.js +6 -4
  898. package/src/private/webapis/dom/abort-api/AbortController.js +92 -0
  899. package/src/private/webapis/dom/abort-api/AbortSignal.js +243 -0
  900. package/src/private/webapis/dom/events/CustomEvent.js +1 -1
  901. package/src/private/webapis/dom/events/Event.js +12 -12
  902. package/src/private/webapis/dom/events/EventTarget.js +146 -37
  903. package/src/private/webapis/dom/events/internals/EventInternals.js +36 -0
  904. package/src/private/webapis/dom/events/internals/EventTargetInternals.js +38 -3
  905. package/src/private/webapis/dom/nodes/ReactNativeDocument.js +11 -0
  906. package/src/private/webapis/dom/nodes/ReactNativeElement.js +105 -4
  907. package/src/private/webapis/dom/nodes/ReadOnlyCharacterData.js +11 -0
  908. package/src/private/webapis/dom/nodes/ReadOnlyElement.js +9 -0
  909. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +34 -7
  910. package/src/private/webapis/dom/nodes/ReadOnlyText.js +33 -0
  911. package/src/private/webapis/dom/nodes/specs/NativeDOM.js +46 -42
  912. package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +12 -0
  913. package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js.flow +4 -2
  914. package/src/private/webapis/dom/oldstylecollections/NodeList.js +10 -0
  915. package/src/private/webapis/dom/oldstylecollections/NodeList.js.flow +4 -3
  916. package/src/private/webapis/errors/DOMException.js +50 -50
  917. package/src/private/webapis/geometry/DOMRectList.js +12 -0
  918. package/src/private/webapis/geometry/DOMRectList.js.flow +3 -1
  919. package/src/private/webapis/html/events/MessageEvent.js +3 -3
  920. package/src/private/webapis/idlecallbacks/specs/NativeIdleCallbacks.js +2 -2
  921. package/src/private/webapis/intersectionobserver/IntersectionObserverEntry.js +13 -0
  922. package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +3 -7
  923. package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +5 -5
  924. package/src/private/webapis/microtasks/specs/NativeMicrotasks.js +1 -1
  925. package/src/private/webapis/mutationobserver/MutationObserver.js +7 -7
  926. package/src/private/webapis/mutationobserver/MutationRecord.js +12 -0
  927. package/src/private/webapis/mutationobserver/internals/MutationObserverManager.js +5 -7
  928. package/src/private/webapis/mutationobserver/specs/NativeMutationObserver.js +5 -5
  929. package/src/private/webapis/performance/EventTiming.js +3 -3
  930. package/src/private/webapis/performance/PerformanceEntry.js +3 -3
  931. package/src/private/webapis/performance/PerformanceObserver.js +4 -4
  932. package/src/private/webapis/performance/ResourceTiming.js +13 -13
  933. package/src/private/webapis/performance/UserTiming.js +3 -3
  934. package/src/private/webapis/performance/internals/Utilities.js +1 -1
  935. package/src/private/webapis/performance/specs/NativePerformance.js +26 -20
  936. package/src/private/webapis/utils/ArrayLikeUtils.js +1 -1
  937. package/src/private/webapis/websockets/events/CloseEvent.js +3 -3
  938. package/src/private/webapis/xhr/events/ProgressEvent.js +3 -3
  939. package/src/react-private-interface.js +145 -0
  940. package/src/react-private-interface.js.flow +48 -0
  941. package/src/setup-env.js +22 -0
  942. package/src/types/globals.d.ts +35 -3
  943. package/src/unstable-internals-do-not-use.d.ts +214 -0
  944. package/src/unstable-internals-do-not-use.js +76 -0
  945. package/third-party-podspecs/RCT-Folly.podspec +1 -1
  946. package/third-party-podspecs/ReactNativeDependencies.podspec +3 -3
  947. package/third-party-podspecs/glog.podspec +1 -1
  948. package/types/index.d.ts +0 -1
  949. package/types/public/DeprecatedPropertiesAlias.d.ts +0 -4
  950. package/types/public/ReactNativeTypes.d.ts +6 -4
  951. package/types_generated/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +26 -31
  952. package/types_generated/Libraries/Alert/Alert.d.ts +44 -7
  953. package/types_generated/Libraries/Animated/AnimatedEvent.d.ts +2 -2
  954. package/types_generated/Libraries/Animated/AnimatedExports.d.ts +2 -2
  955. package/types_generated/Libraries/Animated/AnimatedImplementation.d.ts +108 -4
  956. package/types_generated/Libraries/Animated/Easing.d.ts +5 -4
  957. package/types_generated/Libraries/Animated/animations/Animation.d.ts +7 -7
  958. package/types_generated/Libraries/Animated/animations/DecayAnimation.d.ts +5 -5
  959. package/types_generated/Libraries/Animated/animations/SpringAnimation.d.ts +49 -49
  960. package/types_generated/Libraries/Animated/animations/TimingAnimation.d.ts +13 -13
  961. package/types_generated/Libraries/Animated/components/AnimatedFlatList.d.ts +3 -3
  962. package/types_generated/Libraries/Animated/components/AnimatedScrollView.d.ts +2 -2
  963. package/types_generated/Libraries/Animated/components/AnimatedSectionList.d.ts +3 -3
  964. package/types_generated/Libraries/Animated/createAnimatedComponent.d.ts +4 -4
  965. package/types_generated/Libraries/Animated/nodes/AnimatedColor.d.ts +2 -2
  966. package/types_generated/Libraries/Animated/nodes/AnimatedInterpolation.d.ts +9 -9
  967. package/types_generated/Libraries/Animated/nodes/AnimatedNode.d.ts +6 -3
  968. package/types_generated/Libraries/Animated/nodes/AnimatedValue.d.ts +3 -3
  969. package/types_generated/Libraries/AppState/AppState.d.ts +41 -22
  970. package/types_generated/Libraries/BatchedBridge/NativeModules.d.ts +8 -1
  971. package/types_generated/Libraries/Blob/BlobTypes.d.ts +4 -4
  972. package/types_generated/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +37 -46
  973. package/types_generated/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +92 -43
  974. package/types_generated/Libraries/Components/Button.d.ts +118 -197
  975. package/types_generated/Libraries/Components/Clipboard/Clipboard.d.ts +6 -1
  976. package/types_generated/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.d.ts +44 -63
  977. package/types_generated/Libraries/Components/Keyboard/Keyboard.d.ts +30 -61
  978. package/types_generated/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts +30 -21
  979. package/types_generated/Libraries/Components/Pressable/Pressable.d.ts +41 -17
  980. package/types_generated/Libraries/Components/Pressable/useAndroidRippleForView.d.ts +6 -6
  981. package/types_generated/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts +5 -5
  982. package/types_generated/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.d.ts +18 -1
  983. package/types_generated/Libraries/Components/RefreshControl/RefreshControl.d.ts +35 -52
  984. package/types_generated/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +9 -11
  985. package/types_generated/Libraries/Components/ScrollView/ScrollView.d.ts +212 -88
  986. package/types_generated/Libraries/Components/ScrollView/ScrollViewStickyHeader.d.ts +4 -4
  987. package/types_generated/Libraries/Components/StatusBar/StatusBar.d.ts +29 -62
  988. package/types_generated/Libraries/Components/Switch/Switch.d.ts +75 -70
  989. package/types_generated/Libraries/Components/TextInput/InputAccessoryView.d.ts +16 -65
  990. package/types_generated/Libraries/Components/TextInput/TextInput.d.ts +118 -3
  991. package/types_generated/Libraries/Components/TextInput/TextInput.flow.d.ts +24 -9
  992. package/types_generated/Libraries/Components/ToastAndroid/ToastAndroid.d.ts +18 -18
  993. package/types_generated/Libraries/Components/Touchable/TouchableHighlight.d.ts +24 -13
  994. package/types_generated/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts +27 -64
  995. package/types_generated/Libraries/Components/Touchable/TouchableOpacity.d.ts +18 -6
  996. package/types_generated/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +28 -28
  997. package/types_generated/Libraries/Components/View/View.d.ts +13 -9
  998. package/types_generated/Libraries/Components/View/ViewAccessibility.d.ts +31 -20
  999. package/types_generated/Libraries/Components/View/ViewNativeComponent.d.ts +1 -2
  1000. package/types_generated/Libraries/Components/View/ViewPropTypes.d.ts +75 -24
  1001. package/types_generated/Libraries/Core/ExtendedError.d.ts +10 -10
  1002. package/types_generated/Libraries/EventEmitter/NativeEventEmitter.d.ts +34 -1
  1003. package/types_generated/Libraries/EventEmitter/RCTNativeAppEventEmitter.d.ts +4 -1
  1004. package/types_generated/Libraries/Image/AssetSourceResolver.d.ts +2 -13
  1005. package/types_generated/Libraries/Image/ImageBackground.d.ts +33 -22
  1006. package/types_generated/Libraries/Image/ImageProps.d.ts +201 -251
  1007. package/types_generated/Libraries/Image/ImageTypes.flow.d.ts +6 -5
  1008. package/types_generated/Libraries/Interaction/PanResponder.d.ts +103 -97
  1009. package/types_generated/Libraries/LayoutAnimation/LayoutAnimation.d.ts +18 -7
  1010. package/types_generated/Libraries/Linking/Linking.d.ts +28 -20
  1011. package/types_generated/Libraries/Lists/FlatList.d.ts +17 -18
  1012. package/types_generated/Libraries/Lists/SectionList.d.ts +10 -5
  1013. package/types_generated/Libraries/Lists/VirtualizedList.d.ts +3 -1
  1014. package/types_generated/Libraries/Lists/VirtualizedSectionList.d.ts +3 -1
  1015. package/types_generated/Libraries/LogBox/Data/LogBoxData.d.ts +2 -2
  1016. package/types_generated/Libraries/LogBox/Data/LogBoxLog.d.ts +2 -2
  1017. package/types_generated/Libraries/LogBox/Data/parseLogBoxLog.d.ts +2 -2
  1018. package/types_generated/Libraries/LogBox/LogBox.d.ts +4 -1
  1019. package/types_generated/Libraries/Modal/Modal.d.ts +70 -35
  1020. package/types_generated/Libraries/Network/FormData.d.ts +5 -5
  1021. package/types_generated/Libraries/Performance/Systrace.d.ts +11 -1
  1022. package/types_generated/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +31 -21
  1023. package/types_generated/Libraries/Pressability/Pressability.d.ts +5 -5
  1024. package/types_generated/Libraries/PushNotificationIOS/PushNotificationIOS.d.ts +15 -11
  1025. package/types_generated/Libraries/ReactNative/AppRegistry.flow.d.ts +5 -5
  1026. package/types_generated/Libraries/ReactNative/AppRegistryImpl.d.ts +56 -9
  1027. package/types_generated/Libraries/ReactNative/I18nManager.d.ts +20 -1
  1028. package/types_generated/Libraries/ReactNative/IPerformanceLogger.flow.d.ts +5 -5
  1029. package/types_generated/Libraries/ReactPrivate/ReactNativePrivateInterface.d.ts +6 -22
  1030. package/types_generated/Libraries/Renderer/shims/ReactNativeTypes.d.ts +34 -34
  1031. package/types_generated/Libraries/Share/Share.d.ts +36 -39
  1032. package/types_generated/Libraries/StyleSheet/PlatformColorValueTypes.d.ts +7 -1
  1033. package/types_generated/Libraries/StyleSheet/PlatformColorValueTypesIOS.d.ts +3 -3
  1034. package/types_generated/Libraries/StyleSheet/StyleSheetTypes.d.ts +202 -181
  1035. package/types_generated/Libraries/StyleSheet/private/_TransformStyle.d.ts +3 -3
  1036. package/types_generated/Libraries/Text/Text.d.ts +10 -6
  1037. package/types_generated/Libraries/Text/TextProps.d.ts +57 -102
  1038. package/types_generated/Libraries/TurboModule/RCTExport.d.ts +2 -2
  1039. package/types_generated/Libraries/Types/CoreEventTypes.d.ts +14 -8
  1040. package/types_generated/Libraries/Utilities/Appearance.d.ts +25 -13
  1041. package/types_generated/Libraries/Utilities/BackHandler.d.ts +17 -1
  1042. package/types_generated/Libraries/Utilities/DevSettings.d.ts +9 -2
  1043. package/types_generated/Libraries/Utilities/Dimensions.d.ts +19 -13
  1044. package/types_generated/Libraries/Utilities/PixelRatio.d.ts +6 -3
  1045. package/types_generated/Libraries/Utilities/Platform.d.ts +5 -1
  1046. package/types_generated/Libraries/Utilities/PlatformTypes.d.ts +65 -6
  1047. package/types_generated/Libraries/Utilities/codegenNativeComponent.d.ts +5 -5
  1048. package/types_generated/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.d.ts +2 -2
  1049. package/types_generated/Libraries/Utilities/differ/deepDiffer.d.ts +2 -2
  1050. package/types_generated/Libraries/Utilities/useColorScheme.d.ts +12 -2
  1051. package/types_generated/Libraries/Utilities/useWindowDimensions.d.ts +7 -1
  1052. package/types_generated/Libraries/Vibration/Vibration.d.ts +14 -6
  1053. package/types_generated/index.d.ts +31 -25
  1054. package/types_generated/src/private/assets/AssetRegistry.d.ts +42 -0
  1055. package/types_generated/src/private/components/virtualcollection/VirtualCollectionView.d.ts +5 -5
  1056. package/types_generated/src/private/components/virtualcollection/column/VirtualColumn.d.ts +3 -3
  1057. package/types_generated/src/private/components/virtualcollection/row/VirtualRow.d.ts +3 -3
  1058. package/types_generated/src/private/components/virtualview/VirtualView.d.ts +7 -7
  1059. package/types_generated/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.d.ts +5 -5
  1060. package/types_generated/src/private/components/virtualview/VirtualViewNativeComponent.d.ts +5 -5
  1061. package/types_generated/src/private/renderer/events/dispatchNativeEvent.d.ts +26 -0
  1062. package/types_generated/src/private/specs_DEPRECATED/modules/NativeAppearance.d.ts +6 -5
  1063. package/types_generated/src/private/specs_DEPRECATED/modules/NativeDeviceInfo.d.ts +7 -7
  1064. package/types_generated/src/private/specs_DEPRECATED/modules/NativeExceptionsManager.d.ts +5 -5
  1065. package/types_generated/src/private/specs_DEPRECATED/modules/NativeUIManager.d.ts +8 -8
  1066. package/types_generated/src/private/types/HostComponent.d.ts +3 -3
  1067. package/types_generated/src/private/types/HostInstance.d.ts +39 -74
  1068. package/types_generated/src/private/webapis/dom/events/CustomEvent.d.ts +2 -2
  1069. package/types_generated/src/private/webapis/dom/events/Event.d.ts +4 -4
  1070. package/types_generated/src/private/webapis/dom/events/EventTarget.d.ts +8 -8
  1071. package/types_generated/src/private/webapis/dom/nodes/ReactNativeDocument.d.ts +3 -1
  1072. package/types_generated/src/private/webapis/dom/nodes/ReactNativeElement.d.ts +57 -4
  1073. package/types_generated/src/private/webapis/dom/nodes/ReadOnlyCharacterData.d.ts +3 -1
  1074. package/types_generated/src/private/webapis/dom/nodes/ReadOnlyElement.d.ts +3 -1
  1075. package/types_generated/src/private/webapis/dom/nodes/ReadOnlyNode.d.ts +4 -2
  1076. package/types_generated/src/private/webapis/dom/nodes/ReadOnlyText.d.ts +3 -1
  1077. package/types_generated/src/private/webapis/dom/nodes/specs/NativeDOM.d.ts +3 -3
  1078. package/types_generated/src/private/webapis/dom/oldstylecollections/HTMLCollection.d.ts +3 -1
  1079. package/types_generated/src/private/webapis/dom/oldstylecollections/NodeList.d.ts +3 -1
  1080. package/types_generated/src/react-private-interface.d.ts +33 -0
  1081. package/Libraries/AppDelegate/RCTArchConfiguratorProtocol.h +0 -38
  1082. package/Libraries/Image/AssetRegistry.js +0 -14
  1083. package/Libraries/Image/RCTImageShadowView.h +0 -17
  1084. package/Libraries/Image/RCTImageShadowView.mm +0 -28
  1085. package/Libraries/Image/RCTImageView.h +0 -32
  1086. package/Libraries/Image/RCTImageView.mm +0 -508
  1087. package/Libraries/Image/RCTImageViewManager.h +0 -17
  1088. package/Libraries/Image/RCTImageViewManager.mm +0 -115
  1089. package/Libraries/Interaction/InteractionManager.d.ts +0 -87
  1090. package/Libraries/Interaction/InteractionManager.js +0 -189
  1091. package/Libraries/Text/BaseText/RCTBaseTextShadowView.h +0 -35
  1092. package/Libraries/Text/BaseText/RCTBaseTextShadowView.mm +0 -162
  1093. package/Libraries/Text/BaseText/RCTBaseTextViewManager.h +0 -21
  1094. package/Libraries/Text/BaseText/RCTBaseTextViewManager.mm +0 -64
  1095. package/Libraries/Text/RCTTextAttributes.h +0 -107
  1096. package/Libraries/Text/RCTTextAttributes.mm +0 -358
  1097. package/Libraries/Text/RawText/RCTRawTextShadowView.h +0 -23
  1098. package/Libraries/Text/RawText/RCTRawTextShadowView.mm +0 -38
  1099. package/Libraries/Text/RawText/RCTRawTextViewManager.h +0 -21
  1100. package/Libraries/Text/RawText/RCTRawTextViewManager.mm +0 -32
  1101. package/Libraries/Text/Text/RCTTextShadowView.h +0 -33
  1102. package/Libraries/Text/Text/RCTTextShadowView.mm +0 -469
  1103. package/Libraries/Text/Text/RCTTextView.h +0 -34
  1104. package/Libraries/Text/Text/RCTTextView.mm +0 -298
  1105. package/Libraries/Text/Text/RCTTextViewManager.h +0 -19
  1106. package/Libraries/Text/Text/RCTTextViewManager.mm +0 -97
  1107. package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.h +0 -21
  1108. package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputView.mm +0 -67
  1109. package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputViewManager.h +0 -21
  1110. package/Libraries/Text/TextInput/Multiline/RCTMultilineTextInputViewManager.mm +0 -28
  1111. package/Libraries/Text/TextInput/RCTBaseTextInputShadowView.h +0 -30
  1112. package/Libraries/Text/TextInput/RCTBaseTextInputShadowView.mm +0 -367
  1113. package/Libraries/Text/TextInput/RCTBaseTextInputView.h +0 -68
  1114. package/Libraries/Text/TextInput/RCTBaseTextInputView.mm +0 -849
  1115. package/Libraries/Text/TextInput/RCTBaseTextInputViewManager.h +0 -17
  1116. package/Libraries/Text/TextInput/RCTBaseTextInputViewManager.mm +0 -181
  1117. package/Libraries/Text/TextInput/RCTInputAccessoryShadowView.h +0 -17
  1118. package/Libraries/Text/TextInput/RCTInputAccessoryShadowView.mm +0 -24
  1119. package/Libraries/Text/TextInput/RCTInputAccessoryView.h +0 -22
  1120. package/Libraries/Text/TextInput/RCTInputAccessoryView.mm +0 -82
  1121. package/Libraries/Text/TextInput/RCTInputAccessoryViewContent.h +0 -17
  1122. package/Libraries/Text/TextInput/RCTInputAccessoryViewContent.mm +0 -78
  1123. package/Libraries/Text/TextInput/RCTInputAccessoryViewManager.h +0 -17
  1124. package/Libraries/Text/TextInput/RCTInputAccessoryViewManager.mm +0 -33
  1125. package/Libraries/Text/TextInput/Singleline/RCTSinglelineTextInputView.h +0 -21
  1126. package/Libraries/Text/TextInput/Singleline/RCTSinglelineTextInputView.mm +0 -43
  1127. package/Libraries/Text/TextInput/Singleline/RCTSinglelineTextInputViewManager.h +0 -21
  1128. package/Libraries/Text/TextInput/Singleline/RCTSinglelineTextInputViewManager.mm +0 -35
  1129. package/Libraries/Text/VirtualText/RCTVirtualTextShadowView.h +0 -17
  1130. package/Libraries/Text/VirtualText/RCTVirtualTextShadowView.mm +0 -42
  1131. package/Libraries/Text/VirtualText/RCTVirtualTextView.h +0 -28
  1132. package/Libraries/Text/VirtualText/RCTVirtualTextViewManager.h +0 -17
  1133. package/Libraries/Text/VirtualText/RCTVirtualTextViewManager.mm +0 -30
  1134. package/Libraries/Utilities/SceneTracker.js +0 -42
  1135. package/Libraries/Wrapper/Example/RCTWrapperExampleView.h +0 -21
  1136. package/Libraries/Wrapper/Example/RCTWrapperExampleView.m +0 -57
  1137. package/Libraries/Wrapper/Example/RCTWrapperExampleViewController.h +0 -21
  1138. package/Libraries/Wrapper/Example/RCTWrapperExampleViewController.m +0 -27
  1139. package/Libraries/Wrapper/Example/RCTWrapperReactRootViewController.h +0 -25
  1140. package/Libraries/Wrapper/Example/RCTWrapperReactRootViewController.m +0 -50
  1141. package/Libraries/Wrapper/Example/RCTWrapperReactRootViewManager.h +0 -23
  1142. package/Libraries/Wrapper/Example/RCTWrapperReactRootViewManager.m +0 -35
  1143. package/Libraries/Wrapper/RCTWrapper.h +0 -73
  1144. package/Libraries/Wrapper/RCTWrapperShadowView.h +0 -27
  1145. package/Libraries/Wrapper/RCTWrapperShadowView.m +0 -138
  1146. package/Libraries/Wrapper/RCTWrapperView.h +0 -42
  1147. package/Libraries/Wrapper/RCTWrapperView.m +0 -99
  1148. package/Libraries/Wrapper/RCTWrapperViewControllerHostingView.h +0 -30
  1149. package/Libraries/Wrapper/RCTWrapperViewControllerHostingView.m +0 -137
  1150. package/Libraries/Wrapper/RCTWrapperViewManager.h +0 -25
  1151. package/Libraries/Wrapper/RCTWrapperViewManager.m +0 -31
  1152. package/React/Base/RCTRootContentView.h +0 -43
  1153. package/React/Base/RCTRootContentView.m +0 -111
  1154. package/React/Base/RCTRootViewInternal.h +0 -28
  1155. package/React/CxxBridge/RCTCxxBridge.mm +0 -1572
  1156. package/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.h +0 -25
  1157. package/React/CxxBridge/RCTJSIExecutorRuntimeInstaller.mm +0 -34
  1158. package/React/CxxBridge/RCTObjcExecutor.h +0 -34
  1159. package/React/CxxBridge/RCTObjcExecutor.mm +0 -150
  1160. package/React/CxxLogUtils/RCTDefaultCxxLogFunction.mm +0 -34
  1161. package/React/CxxModule/DispatchMessageQueueThread.h +0 -50
  1162. package/React/CxxModule/RCTCxxMethod.h +0 -17
  1163. package/React/CxxModule/RCTCxxMethod.mm +0 -147
  1164. package/React/CxxModule/RCTNativeModule.h +0 -34
  1165. package/React/CxxModule/RCTNativeModule.mm +0 -241
  1166. package/React/Fabric/RCTSurfacePresenterBridgeAdapter.mm +0 -205
  1167. package/React/Tests/Text/RCTTextAttributesTest.mm +0 -49
  1168. package/React/Views/RCTActivityIndicatorView.h +0 -16
  1169. package/React/Views/RCTActivityIndicatorView.m +0 -26
  1170. package/React/Views/RCTActivityIndicatorViewManager.h +0 -23
  1171. package/React/Views/RCTActivityIndicatorViewManager.m +0 -65
  1172. package/React/Views/RCTDebuggingOverlayManager.h +0 -17
  1173. package/React/Views/RCTDebuggingOverlayManager.m +0 -68
  1174. package/React/Views/RCTModalHostView.h +0 -64
  1175. package/React/Views/RCTModalHostView.m +0 -264
  1176. package/React/Views/RCTModalHostViewController.m +0 -74
  1177. package/React/Views/RCTModalHostViewManager.m +0 -131
  1178. package/React/Views/RCTModalManager.h +0 -22
  1179. package/React/Views/RCTModalManager.m +0 -46
  1180. package/React/Views/RCTRootShadowView.h +0 -35
  1181. package/React/Views/RCTRootShadowView.m +0 -53
  1182. package/React/Views/RCTShadowView+Internal.h +0 -18
  1183. package/React/Views/RCTShadowView+Internal.m +0 -23
  1184. package/React/Views/RCTSwitch.h +0 -22
  1185. package/React/Views/RCTSwitch.m +0 -24
  1186. package/React/Views/RCTSwitchManager.h +0 -17
  1187. package/React/Views/RCTSwitchManager.m +0 -70
  1188. package/React/Views/RefreshControl/RCTRefreshControl.h +0 -24
  1189. package/React/Views/RefreshControl/RCTRefreshControl.m +0 -230
  1190. package/React/Views/RefreshControl/RCTRefreshControlManager.h +0 -17
  1191. package/React/Views/RefreshControl/RCTRefreshControlManager.m +0 -47
  1192. package/React/Views/SafeAreaView/RCTSafeAreaShadowView.h +0 -21
  1193. package/React/Views/SafeAreaView/RCTSafeAreaShadowView.m +0 -57
  1194. package/React/Views/SafeAreaView/RCTSafeAreaView.h +0 -27
  1195. package/React/Views/SafeAreaView/RCTSafeAreaView.m +0 -79
  1196. package/React/Views/SafeAreaView/RCTSafeAreaViewLocalData.h +0 -25
  1197. package/React/Views/SafeAreaView/RCTSafeAreaViewLocalData.m +0 -25
  1198. package/React/Views/SafeAreaView/RCTSafeAreaViewManager.h +0 -21
  1199. package/React/Views/SafeAreaView/RCTSafeAreaViewManager.m +0 -32
  1200. package/React/Views/ScrollView/RCTScrollContentShadowView.h +0 -19
  1201. package/React/Views/ScrollView/RCTScrollContentShadowView.m +0 -35
  1202. package/React/Views/ScrollView/RCTScrollContentView.h +0 -19
  1203. package/React/Views/ScrollView/RCTScrollContentView.m +0 -36
  1204. package/React/Views/ScrollView/RCTScrollContentViewManager.h +0 -17
  1205. package/React/Views/ScrollView/RCTScrollContentViewManager.m +0 -31
  1206. package/React/Views/ScrollView/RCTScrollView.m +0 -1168
  1207. package/React/Views/ScrollView/RCTScrollViewManager.h +0 -25
  1208. package/React/Views/ScrollView/RCTScrollViewManager.m +0 -202
  1209. package/ReactAndroid/src/main/java/com/facebook/react/ReactNativeHost.java +0 -251
  1210. package/ReactAndroid/src/main/java/com/facebook/react/bridge/BridgeReactContext.java +0 -315
  1211. package/ReactAndroid/src/main/java/com/facebook/react/common/ClearableSynchronizedPool.kt +0 -51
  1212. package/ReactAndroid/src/main/java/com/facebook/react/fabric/AnimationBackendChoreographer.kt +0 -89
  1213. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/JSPointerDispatcher.java +0 -736
  1214. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java +0 -221
  1215. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactShadowNode.java +0 -399
  1216. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactZIndexedViewGroup.kt +0 -35
  1217. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java +0 -346
  1218. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +0 -666
  1219. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIViewOperationQueue.java +0 -147
  1220. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewGroupDrawingOrderHelper.kt +0 -113
  1221. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ViewManagersPropertyCache.java +0 -614
  1222. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java +0 -1838
  1223. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactNestedScrollView.java +0 -1646
  1224. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +0 -1638
  1225. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaAlign.java +0 -51
  1226. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaBoxSizing.java +0 -33
  1227. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaDimension.java +0 -33
  1228. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaDisplay.java +0 -37
  1229. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaEdge.java +0 -47
  1230. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaErrata.java +0 -41
  1231. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaExperimentalFeature.java +0 -33
  1232. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaFlexDirection.java +0 -37
  1233. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaGridTrackType.java +0 -39
  1234. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaGutter.java +0 -35
  1235. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaJustify.java +0 -49
  1236. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaLogLevel.java +0 -45
  1237. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaMeasureMode.java +0 -35
  1238. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeJNIBase.java +0 -928
  1239. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeType.java +0 -33
  1240. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaOverflow.java +0 -35
  1241. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaPositionType.java +0 -35
  1242. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaUnit.java +0 -43
  1243. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaWrap.java +0 -35
  1244. package/ReactAndroid/src/main/jni/react/fabric/JAnimationBackendChoreographer.cpp +0 -23
  1245. package/ReactAndroid/src/main/jni/react/fabric/JAnimationBackendChoreographer.h +0 -37
  1246. package/ReactCommon/cxxreact/JSIndexedRAMBundle.cpp +0 -135
  1247. package/ReactCommon/cxxreact/JSIndexedRAMBundle.h +0 -72
  1248. package/ReactCommon/hermes/inspector-modern/chrome/ConnectionDemux.cpp +0 -143
  1249. package/ReactCommon/hermes/inspector-modern/chrome/ConnectionDemux.h +0 -55
  1250. package/ReactCommon/hermes/inspector-modern/chrome/Registration.cpp +0 -78
  1251. package/ReactCommon/hermes/inspector-modern/chrome/Registration.h +0 -39
  1252. package/ReactCommon/hermes/inspector-modern/chrome/tests/ConnectionDemuxTests.cpp +0 -148
  1253. package/ReactCommon/react/nativemodule/samples/platform/android/NativeSampleTurboModuleSpec.java +0 -168
  1254. package/ReactCommon/react/nativemodule/samples/platform/android/ReactCommon/SampleTurboModuleSpec.cpp +0 -416
  1255. package/ReactCommon/react/nativemodule/samples/platform/android/ReactCommon/SampleTurboModuleSpec.h +0 -31
  1256. package/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTNativeSampleTurboModuleSpec.h +0 -134
  1257. package/ReactCommon/react/nativemodule/samples/platform/ios/ReactCommon/RCTNativeSampleTurboModuleSpec.mm +0 -290
  1258. package/ReactCommon/react/renderer/core/RawPropsKey.cpp +0 -62
  1259. package/ReactCommon/react/renderer/core/RawPropsKey.h +0 -39
  1260. package/ReactCommon/react/renderer/mounting/internal/DiffMap.h +0 -170
  1261. package/ReactCommon/react/renderer/mounting/internal/LongestIncreasingSubsequence.h +0 -95
  1262. package/ReactCommon/react/renderer/mounting/internal/TinyMap.h +0 -147
  1263. package/ReactCommon/react/renderer/mounting/tests/LongestIncreasingSubsequenceTest.cpp +0 -154
  1264. package/interface.js +0 -21
  1265. package/jest-preset.js +0 -26
  1266. package/rn-get-polyfills.js +0 -13
  1267. package/sdks/.hermesversion +0 -1
  1268. package/src/private/components/virtualcollection/debug/FlingItemOverlay.js +0 -13
  1269. package/types/tsconfig.json +0 -15
  1270. package/types_generated/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.d.ts +0 -14
  1271. package/types_generated/Libraries/Components/ScrollView/ScrollViewNativeComponent.d.ts +0 -21
  1272. package/types_generated/Libraries/Components/ScrollView/ScrollViewNativeComponentType.d.ts +0 -134
  1273. package/types_generated/Libraries/Components/Switch/AndroidSwitchNativeComponent.d.ts +0 -14
  1274. package/types_generated/Libraries/Components/Switch/SwitchNativeComponent.d.ts +0 -14
  1275. package/types_generated/Libraries/Components/Touchable/Touchable.d.ts +0 -262
  1276. package/types_generated/Libraries/Interaction/InteractionManager.d.ts +0 -117
  1277. package/types_generated/Libraries/NativeModules/specs/NativeDialogManagerAndroid.d.ts +0 -17
  1278. package/types_generated/src/private/specs_DEPRECATED/components/AndroidSwitchNativeComponent.d.ts +0 -53
  1279. package/types_generated/src/private/specs_DEPRECATED/components/ProgressBarAndroidNativeComponent.d.ts +0 -36
  1280. package/types_generated/src/private/specs_DEPRECATED/components/SwitchNativeComponent.d.ts +0 -51
  1281. package/types_generated/src/private/specs_DEPRECATED/modules/NativeDialogManagerAndroid.d.ts +0 -37
  1282. package/types_generated/tsconfig.test.json +0 -16
  1283. /package/ReactCommon/{cxxreact → react/utils}/MoveWrapper.h +0 -0
@@ -0,0 +1,1283 @@
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
+ * @flow strict-local
8
+ * @format
9
+ */
10
+
11
+ 'use strict';
12
+
13
+ /*:: import type {CliConfigJson, SetupArgs} from './spm/spm-types'; */
14
+
15
+ /**
16
+ * setup-apple-spm.js – Entry point for setting up Swift Package Manager support
17
+ * in a React Native app using prebuilt XCFrameworks.
18
+ *
19
+ * Usage (from your app directory):
20
+ * node node_modules/react-native/scripts/setup-apple-spm.js [action] [options]
21
+ * (or `npx react-native spm [action]`)
22
+ *
23
+ * Actions:
24
+ * add Inject SPM packages (package refs, build
25
+ * settings, the Sync build phase) into your
26
+ * existing .xcodeproj, in place. Idempotent.
27
+ * Default on first run. `--deintegrate` first
28
+ * runs `pod deintegrate` + strips React Native
29
+ * from the Podfile (CocoaPods → SPM migration).
30
+ * update Re-run the pipeline and refresh the existing
31
+ * injection. Default once a project is injected.
32
+ * deinit The exact inverse of `add`: surgically remove
33
+ * only what `add` injected (recorded in
34
+ * .spm-injected.json) and drop the marker.
35
+ * scaffold Generate Package.swift for community deps that
36
+ * lack SPM support.
37
+ * sync / codegen / download Advanced/internal: `sync` is invoked by the
38
+ * generated Xcode build phase; `codegen` and
39
+ * `download` run a single pipeline step.
40
+ *
41
+ * Zero-arg `npx react-native spm` auto-detects: a freshly-scaffolded CocoaPods
42
+ * project (clean tree, stock Podfile) → `add --deintegrate`; an injected
43
+ * project → `update`; otherwise → `add` (fails loud on a CocoaPods project,
44
+ * directing you to `--deintegrate`).
45
+ *
46
+ * Options:
47
+ * --version <ver> React Native version. Pinned into
48
+ * .spm-injected.json and reused by later runs
49
+ * until a new one is passed (default: the
50
+ * resolved node_modules/react-native version).
51
+ * --yes Skip the dirty-pbxproj confirmation prompt.
52
+ * [add] --xcodeproj <path> Which .xcodeproj to inject into (when several).
53
+ * [add] --product-name <name> Which app target to inject into (when several).
54
+ * [add] --deintegrate Run `pod deintegrate` + strip RN from the
55
+ * Podfile before injecting.
56
+ * [advanced] --artifacts <path> Local two-flavor artifact root;
57
+ * must contain debug/ and release/ cache slots.
58
+ * [advanced] --download <auto|skip|force> Artifact policy (default: auto).
59
+ * [advanced] --skip-codegen Skip the react-native codegen step.
60
+ * [advanced] --config-command <json> Override the autolinking config command.
61
+ *
62
+ * Steps performed (add/update):
63
+ * 1. react-native codegen → build/generated/ios/ + install SPM codegen template
64
+ * 2. generate-spm-autolinking-config.js → build/generated/autolinking/autolinking.json
65
+ * 3. generate-spm-autolinking.js → build/generated/autolinking/Package.swift
66
+ * 4. download-spm-artifacts.js → cache dir (per --download policy)
67
+ * 5. generate-spm-package.js → build/xcframeworks/Package.swift + symlinks
68
+ * 6. inject SPM packages into the existing .xcodeproj (in place)
69
+ *
70
+ * The injection is committed with your project; its XCLocalSwiftPackageReference
71
+ * entries point at stable sub-package paths under build/ (xcframeworks,
72
+ * generated/autolinking, generated/ios), so adding/removing community deps
73
+ * changes those sub-packages (gitignored) and never re-injects. No app-level
74
+ * Package.swift is generated or required.
75
+ */
76
+
77
+ const {
78
+ main: downloadArtifacts,
79
+ resolveCacheSlotVersion,
80
+ validateArtifactsCache,
81
+ } = require('./spm/download-spm-artifacts');
82
+ const {finalizeArtifactPublication} = require('./spm/flavored-frameworks');
83
+ const {
84
+ MissingManifestError,
85
+ main: generateAutolinking,
86
+ } = require('./spm/generate-spm-autolinking');
87
+ const {
88
+ generateAutolinkingConfig,
89
+ parseConfigCommandJson,
90
+ readEnvConfigCommand,
91
+ resolveEnvConfigCommand,
92
+ } = require('./spm/generate-spm-autolinking-config');
93
+ const {main: generatePackage} = require('./spm/generate-spm-package');
94
+ const {findSourcePath} = require('./spm/generate-spm-package');
95
+ const {
96
+ SPM_INJECTED_MARKER,
97
+ cleanupDanglingJavaScriptCoreRef,
98
+ cleanupLeftoverPodsGroup,
99
+ findInjectedXcodeproj,
100
+ injectSpmIntoExistingXcodeproj,
101
+ readArtifactsVersionOverride,
102
+ readPinnedConfigCommand,
103
+ removeSpmInjection,
104
+ } = require('./spm/generate-spm-xcodeproj');
105
+ const {scaffoldAll} = require('./spm/scaffold-package-swift');
106
+ const {
107
+ RemoteVersionError,
108
+ buildPerAppHeaderTree,
109
+ defaultCacheDir,
110
+ deriveAppName,
111
+ displayPath,
112
+ findProjectRoot,
113
+ installSpmCodegenTemplate,
114
+ makeLogger,
115
+ readPackageJson,
116
+ remotePackageConfig,
117
+ runCodegenAndInstallTemplate,
118
+ } = require('./spm/spm-utils');
119
+ const {execFileSync} = require('child_process');
120
+ const fs = require('fs');
121
+ const path = require('path');
122
+ const readline = require('readline');
123
+ const yargs = require('yargs');
124
+
125
+ const {log, warn: logError} = makeLogger('setup-apple-spm');
126
+
127
+ const VALID_ACTIONS = new Set([
128
+ 'add',
129
+ 'update',
130
+ 'deinit',
131
+ 'sync',
132
+ 'codegen',
133
+ 'download',
134
+ 'scaffold',
135
+ ]);
136
+
137
+ /*::
138
+ type AutolinkingConfigResult = {
139
+ config: CliConfigJson,
140
+ outputPath: string,
141
+ rawJson: string,
142
+ };
143
+ */
144
+
145
+ function parseArgs(argv /*: Array<string> */) /*: SetupArgs */ {
146
+ const parsed = yargs(argv)
147
+ .version(false)
148
+ .command('$0 [action]', 'Set up Apple SPM support')
149
+ .positional('action', {
150
+ type: 'string',
151
+ choices: Array.from(VALID_ACTIONS),
152
+ describe:
153
+ 'Action to run: add, update, deinit, or scaffold. ' +
154
+ 'Defaults to add (or update if SPM is already set up).',
155
+ })
156
+ .option('version', {
157
+ type: 'string',
158
+ describe:
159
+ 'React Native version (e.g. 0.80.0). Sticks: later runs reuse it until you pass a new one. Defaults to the version in node_modules/react-native/package.json',
160
+ })
161
+ .option('yes', {
162
+ type: 'boolean',
163
+ default: false,
164
+ describe: 'Skip the dirty-pbxproj confirmation prompt',
165
+ })
166
+ .option('xcodeproj', {
167
+ type: 'string',
168
+ describe:
169
+ '[add] Path to the .xcodeproj to inject SPM packages into (disambiguates when several exist).',
170
+ })
171
+ .option('product-name', {
172
+ type: 'string',
173
+ describe:
174
+ '[add] App target to inject into (disambiguates when several exist).',
175
+ })
176
+ .option('deintegrate', {
177
+ type: 'boolean',
178
+ default: false,
179
+ describe:
180
+ '[add] Run `pod deintegrate` + strip React Native from the Podfile before injecting (CocoaPods → SPM migration).',
181
+ })
182
+ .option('artifacts', {
183
+ type: 'string',
184
+ describe:
185
+ '[advanced] Local artifact root containing complete debug/ and release/ cache slots.',
186
+ })
187
+ .option('download', {
188
+ type: 'string',
189
+ choices: ['auto', 'skip', 'force'],
190
+ default: 'auto',
191
+ describe:
192
+ '[advanced] Artifact download policy: auto (fetch if missing), skip (never fetch), force (clear cache + refetch).',
193
+ })
194
+ .option('skip-codegen', {
195
+ type: 'boolean',
196
+ default: false,
197
+ describe: '[advanced] Skip the react-native codegen step',
198
+ })
199
+ .option('config-command', {
200
+ type: 'string',
201
+ describe:
202
+ '[advanced] JSON array of the argv used to generate autolinking.json, overriding the default @react-native-community/cli config command. Also settable via RCT_SPM_AUTOLINKING_CONFIG_COMMAND. Either way `add`/`update` remembers the value in .spm-injected.json, so later runs and Xcode builds reuse it. Example: \'["npx","expo-modules-autolinking","react-native-config","--json","--platform","ios"]\'',
203
+ })
204
+ .usage(
205
+ 'Usage: $0 [action] [options]\n\nSets up Swift Package Manager support in a React Native app.',
206
+ )
207
+ .strictOptions()
208
+ .help()
209
+ .parseSync();
210
+
211
+ const positional = parsed._.map(String);
212
+ const requestedAction = parsed.action ?? positional[0] ?? null;
213
+ if (positional.length > 1) {
214
+ throw new Error(
215
+ `Expected at most one action, got: ${positional.join(', ')}`,
216
+ );
217
+ }
218
+ if (requestedAction != null && !VALID_ACTIONS.has(requestedAction)) {
219
+ throw new Error(
220
+ `Unknown action "${requestedAction}". Expected one of: ${Array.from(
221
+ VALID_ACTIONS,
222
+ ).join(', ')}`,
223
+ );
224
+ }
225
+
226
+ return {
227
+ action: requestedAction,
228
+ version: parsed.version ?? null,
229
+ artifacts: parsed.artifacts ?? null,
230
+ skipCodegen: parsed['skip-codegen'],
231
+ configCommand:
232
+ parsed['config-command'] != null
233
+ ? parseConfigCommandJson(parsed['config-command'], '--config-command')
234
+ : null,
235
+ downloadPolicy: parsed.download,
236
+ productName: parsed['product-name'] ?? null,
237
+ xcodeprojPath: parsed.xcodeproj ?? null,
238
+ deintegrate: parsed.deintegrate,
239
+ yes: parsed.yes,
240
+ };
241
+ }
242
+
243
+ const SPM_GITIGNORE_ENTRIES = [
244
+ 'Package.resolved',
245
+ 'build/generated/',
246
+ 'build/xcframeworks/',
247
+ '.build/',
248
+ ];
249
+
250
+ /**
251
+ * Ensure the project's .gitignore contains entries for SPM-generated
252
+ * directories. Called during init so that generated artifacts are not
253
+ * accidentally committed.
254
+ */
255
+ function ensureGitignoreSpmEntries(appRoot /*: string */) {
256
+ const gitignorePath = path.join(appRoot, '.gitignore');
257
+ let content = '';
258
+ if (fs.existsSync(gitignorePath)) {
259
+ content = fs.readFileSync(gitignorePath, 'utf8');
260
+ }
261
+
262
+ const existingEntries = new Set(content.split('\n').map(l => l.trim()));
263
+ const missing = SPM_GITIGNORE_ENTRIES.filter(e => !existingEntries.has(e));
264
+
265
+ if (missing.length === 0) {
266
+ return;
267
+ }
268
+
269
+ const block = [
270
+ '',
271
+ '# SPM – auto-generated at build time (do not commit)',
272
+ ...missing,
273
+ ].join('\n');
274
+
275
+ // Append, ensuring we start on a fresh line
276
+ const separator = content.length > 0 && !content.endsWith('\n') ? '\n' : '';
277
+ fs.writeFileSync(gitignorePath, content + separator + block + '\n', 'utf8');
278
+ log(`Updated .gitignore with SPM entries: ${missing.join(', ')}`);
279
+ }
280
+
281
+ /**
282
+ * Single TTY-gated Y/N prompt helper used by every interactive confirmation
283
+ * in this file. Non-TTY (CI / piped stdin) auto-confirms — every callsite
284
+ * either opted into the action explicitly or is downstream of an opt-in.
285
+ */
286
+ function promptYesNo(
287
+ question /*: string */,
288
+ defaultYes /*: boolean */,
289
+ ) /*: Promise<boolean> */ {
290
+ // $FlowFixMe[prop-missing] process.stdin.isTTY not in Flow stubs
291
+ if (process.stdin.isTTY !== true) {
292
+ return Promise.resolve(true);
293
+ }
294
+ const suffix = defaultYes ? '[Y/n]' : '[y/N]';
295
+ return new Promise(resolve => {
296
+ const rl = readline.createInterface({
297
+ input: process.stdin,
298
+ output: process.stdout,
299
+ });
300
+ rl.question(`${question} ${suffix} `, answer => {
301
+ rl.close();
302
+ const a = answer.trim().toLowerCase();
303
+ const yes = a === 'y' || a === 'yes';
304
+ resolve(defaultYes ? a === '' || yes : yes);
305
+ });
306
+ });
307
+ }
308
+
309
+ function resolveAction(
310
+ requestedAction /*: SetupArgs['action'] */,
311
+ appRoot /*: string */,
312
+ ) /*: 'add' | 'update' | 'deinit' | 'sync' | 'codegen' | 'download' | 'scaffold' */ {
313
+ if (requestedAction != null) {
314
+ return requestedAction;
315
+ }
316
+ // Zero-arg default. Once SPM has been injected, default to `update` (regen +
317
+ // refresh). Otherwise it's a first run → `add`. Whether `add` should imply
318
+ // `--deintegrate` (fresh CocoaPods project) is decided by the safe-gate in
319
+ // main(), which only applies on this implicit path.
320
+ return findInjectedXcodeproj(appRoot) != null ? 'update' : 'add';
321
+ }
322
+
323
+ /**
324
+ * Detects the JS-root-vs-ios-dir mismatch that produces silently-broken
325
+ * builds for standard RN apps. The community CLI writes
326
+ * `autolinking.json` under `<project.ios.sourceDir>/build/generated/autolinking/`
327
+ * (i.e. `<projectRoot>/ios/...`), while every SPM script anchors its
328
+ * inputs/outputs on `process.cwd()`. Running from the JS root therefore
329
+ * (a) writes outputs at `<projectRoot>/build/...` — away from the iOS
330
+ * project, and (b) makes the autolinker miss `autolinking.json` and
331
+ * silently skip every npm native dep. The build "succeeds" but anything
332
+ * touching a native module crashes at runtime.
333
+ *
334
+ * Returns the absolute path to the redirected app root (`<projectRoot>/ios`)
335
+ * when the redirect heuristic applies, else null. Pure: no side effects.
336
+ * The caller decides whether to auto-redirect (non-destructive actions) or
337
+ * refuse (destructive actions like `clean`).
338
+ */
339
+ function detectStandardRnLayoutRedirect(
340
+ appRoot /*: string */,
341
+ projectRoot /*: string */,
342
+ ) /*: string | null */ {
343
+ // Only relevant when cwd === projectRoot (i.e. user is at the JS root
344
+ // of their RN app). If they've already cd'd into a subdir, projectRoot
345
+ // walks up to find package.json and the two paths differ — leave alone.
346
+ if (path.resolve(appRoot) !== path.resolve(projectRoot)) {
347
+ return null;
348
+ }
349
+ // Standard RN layout has an `ios/` subdir holding the native project.
350
+ // Without it (e.g. rn-tester's flat layout), no mismatch to flag.
351
+ const iosSubdir = path.join(projectRoot, 'ios');
352
+ try {
353
+ if (!fs.statSync(iosSubdir).isDirectory()) {
354
+ return null;
355
+ }
356
+ } catch {
357
+ return null;
358
+ }
359
+ return iosSubdir;
360
+ }
361
+
362
+ function resolveReactNativeRoot(
363
+ autolinkingConfigResult /*: ?AutolinkingConfigResult */,
364
+ projectRoot /*: string */,
365
+ ) /*: string */ {
366
+ // Prefer the React Native path resolved by the CLI config we already run for
367
+ // autolinking. Fall back to this script's package root for direct repo usage.
368
+ let reactNativeRoot = path.resolve(__dirname, '..');
369
+ const cliConfig = autolinkingConfigResult?.config;
370
+ const cliReactNativePath = cliConfig?.reactNativePath;
371
+ const cliConfigRoot = cliConfig?.root;
372
+ if (typeof cliReactNativePath === 'string' && cliReactNativePath.length > 0) {
373
+ reactNativeRoot = path.resolve(
374
+ typeof cliConfigRoot === 'string' && cliConfigRoot.length > 0
375
+ ? cliConfigRoot
376
+ : projectRoot,
377
+ cliReactNativePath,
378
+ );
379
+ }
380
+ return reactNativeRoot;
381
+ }
382
+
383
+ // Explicit `--version` → the version an earlier `--version` pinned into the
384
+ // injection marker → node_modules/react-native/package.json. The pin makes
385
+ // `--version` stick for later flagless runs, which would otherwise re-point the
386
+ // project at a different artifact slot than the one it was wired to.
387
+ function determineVersion(
388
+ args /*: SetupArgs */,
389
+ reactNativeRoot /*: string */,
390
+ appRoot /*: string */,
391
+ ) /*: string */ {
392
+ if (args.version != null) {
393
+ return args.version;
394
+ }
395
+ const pinned = readArtifactsVersionOverride(appRoot);
396
+ if (pinned != null) {
397
+ log(
398
+ `Using version ${pinned} pinned in ${SPM_INJECTED_MARKER} by an earlier ` +
399
+ '--version. Pass --version to change it.',
400
+ );
401
+ return pinned;
402
+ }
403
+ // $FlowFixMe[incompatible-type] JSON.parse returns any
404
+ const pkgJson /*: {version: string} */ = JSON.parse(
405
+ fs.readFileSync(path.join(reactNativeRoot, 'package.json'), 'utf8'),
406
+ );
407
+ return pkgJson.version;
408
+ }
409
+
410
+ function runCodegenStep(
411
+ projectRoot /*: string */,
412
+ appRoot /*: string */,
413
+ reactNativeRoot /*: string */,
414
+ skipCodegen /*: boolean */,
415
+ ) /*: void */ {
416
+ if (skipCodegen) {
417
+ // Output dir may already exist from a previous run; still refresh the
418
+ // SPM template so cache-slot changes propagate.
419
+ log('Skipping codegen (--skip-codegen)');
420
+ installSpmCodegenTemplate(appRoot, reactNativeRoot, {log});
421
+ return;
422
+ }
423
+ log('Running react-native codegen...');
424
+ try {
425
+ runCodegenAndInstallTemplate(projectRoot, appRoot, reactNativeRoot, {log});
426
+ } catch {
427
+ logError('Codegen failed. Continuing anyway...');
428
+ }
429
+ }
430
+
431
+ /**
432
+ * Walks autolinking.json and writes a Package.swift into each community RN
433
+ * package that ships a podspec but no SPM manifest. Reuses the dep's
434
+ * podspec (via `pod ipc spec` when available) so the scaffolded file
435
+ * captures the dep's actual sources, header search paths, frameworks, and
436
+ * dependencies. Files carrying the scaffolder's own marker are regenerated
437
+ * when the cache slot changes (manifest-hash bump); files without the
438
+ * marker are left alone (upstream-shipped or user-managed).
439
+ *
440
+ * Runs as part of `init` / `update` / `scaffold` actions. Each invocation
441
+ * is a no-op for deps already in a clean state.
442
+ */
443
+ // Scaffolding is an EXPLICIT, manual step (`npx react-native spm scaffold`) and
444
+ // is NEVER run automatically by init/update/sync. A missing Package.swift is a
445
+ // real gap that must surface as a hard build error (see reportMissingManifests)
446
+ // so the user fixes it deliberately: scaffold, then persist with patch-package
447
+ // (node_modules is not committed), and ideally get it fixed upstream. There is
448
+ // intentionally no prompt and no auto-restore — auto-scaffolding would hide the
449
+ // error, and a wiped scaffold SHOULD re-surface it.
450
+ async function runScaffold(
451
+ args /*: SetupArgs */,
452
+ appRoot /*: string */,
453
+ projectRoot /*: string */,
454
+ reactNativeRoot /*: string */,
455
+ ) /*: Promise<void> */ {
456
+ // Resolve the cache slot identifier so the scaffolded files carry it as
457
+ // a comment — that's how SPM's manifest hash bumps on slot transitions.
458
+ let cacheSlotLabel /*: ?string */ = null;
459
+ try {
460
+ const rawVersion = determineVersion(args, reactNativeRoot, appRoot);
461
+ const slotVersion = await resolveCacheSlotVersion(rawVersion);
462
+ cacheSlotLabel = `${slotVersion}/dual-flavor`;
463
+ } catch {
464
+ // Without a slot label the scaffolder still works; the file just
465
+ // doesn't get the slot-bump comment.
466
+ }
467
+
468
+ let results;
469
+ try {
470
+ results = scaffoldAll({
471
+ appRoot,
472
+ projectRoot,
473
+ reactNativeRoot,
474
+ cacheSlotLabel,
475
+ // Always force a re-render so re-running after editing a podspec picks
476
+ // up the new content.
477
+ force: true,
478
+ });
479
+ } catch (e) {
480
+ logError(`scaffold failed: ${e.message}.`);
481
+ process.exitCode = 1;
482
+ return;
483
+ }
484
+
485
+ const written = results.filter(r => r.status === 'written');
486
+ const errored = results.filter(r => r.status === 'error');
487
+ const warned = results.filter(
488
+ r => r.status === 'written' && r.warnings && r.warnings.length > 0,
489
+ );
490
+
491
+ if (written.length > 0) {
492
+ log(`Scaffolded Package.swift for ${written.length} dep(s):`);
493
+ for (const r of written) {
494
+ log(` • ${r.depName}`);
495
+ }
496
+ log('');
497
+ log(
498
+ 'node_modules is NOT committed and is wiped by `npm install`. To keep\n' +
499
+ 'these manifests, create and commit a patch with a tool like patch-package:\n' +
500
+ ' • `npx patch-package <dep>` for each scaffolded dep, then commit the patch.\n' +
501
+ 'Also consider asking the maintainer to ship a Package.swift upstream.\n' +
502
+ 'Without a committed patch the build will hard-error again after a fresh install.',
503
+ );
504
+ log('');
505
+ }
506
+
507
+ for (const r of warned) {
508
+ if (r.status !== 'written') continue;
509
+ for (const w of r.warnings) {
510
+ log(` ! ${r.depName}: ${w}`);
511
+ }
512
+ }
513
+
514
+ for (const r of errored) {
515
+ if (r.status !== 'error') continue;
516
+ logError(` ! ${r.depName}: ${r.reason}`);
517
+ }
518
+ }
519
+
520
+ async function ensureArtifactFlavor(
521
+ args /*: SetupArgs */,
522
+ rawVersion /*: string */,
523
+ slotVersion /*: string */,
524
+ flavor /*: 'debug' | 'release' */,
525
+ ) /*: Promise<string> */ {
526
+ if (args.artifacts != null && args.artifacts.endsWith('.xcframework')) {
527
+ throw new Error(
528
+ '--artifacts must be a directory containing debug/ and release/ slots; ' +
529
+ 'a single XCFramework cannot satisfy automatic switching',
530
+ );
531
+ }
532
+ const resolvedArtifactsDir =
533
+ args.artifacts != null
534
+ ? path.resolve(args.artifacts, flavor)
535
+ : defaultCacheDir(slotVersion, flavor);
536
+
537
+ if (args.downloadPolicy === 'force' && resolvedArtifactsDir != null) {
538
+ log('Clearing cached artifacts (--download force)...');
539
+ fs.rmSync(resolvedArtifactsDir, {recursive: true, force: true});
540
+ }
541
+
542
+ if (args.downloadPolicy === 'skip') {
543
+ const error = validateArtifactsCache(resolvedArtifactsDir);
544
+ if (error != null) {
545
+ throw new Error(
546
+ `--download skip requires a complete ${flavor} slot: ${error}`,
547
+ );
548
+ }
549
+ log(`Using ${flavor} artifacts (--download skip)`);
550
+ return resolvedArtifactsDir;
551
+ }
552
+
553
+ // Validate the cache before trusting it. A bare existsSync(artifacts.json)
554
+ // check would accept a partial write from a prior failed download (e.g.
555
+ // hermes-engine 404 on a not-yet-published nightly) and silently propagate
556
+ // the gap into the xcodeproj, surfacing only as "Missing package product"
557
+ // in Xcode. validateArtifactsCache reads the JSON and confirms every
558
+ // REQUIRED_ARTIFACT has a present xcframework on disk.
559
+ const cacheError = validateArtifactsCache(resolvedArtifactsDir);
560
+ if (cacheError == null) {
561
+ log(
562
+ `${flavor} artifacts already present in ${displayPath(resolvedArtifactsDir)}`,
563
+ );
564
+ return resolvedArtifactsDir;
565
+ }
566
+ log(`Cache incomplete (${cacheError}); re-downloading...`);
567
+ log(`Downloading ${flavor} xcframework artifacts (slot: ${slotVersion})...`);
568
+ await downloadArtifacts([
569
+ '--version',
570
+ rawVersion,
571
+ '--flavor',
572
+ flavor,
573
+ '--output',
574
+ resolvedArtifactsDir,
575
+ ]);
576
+ const downloadedError = validateArtifactsCache(resolvedArtifactsDir);
577
+ if (downloadedError != null) {
578
+ throw new Error(
579
+ `downloaded ${flavor} slot is incomplete: ${downloadedError}`,
580
+ );
581
+ }
582
+ return resolvedArtifactsDir;
583
+ }
584
+
585
+ async function ensureBothArtifactFlavors(
586
+ args /*: SetupArgs */,
587
+ version /*: string */,
588
+ ) /*: Promise<{debug: string, release: string}> */ {
589
+ // Resolve aliases/nightly labels exactly once so both flavors are guaranteed
590
+ // to come from the same selected artifact version.
591
+ const rawVersion = args.version ?? version;
592
+ const slotVersion = await resolveCacheSlotVersion(rawVersion);
593
+ const debug = await ensureArtifactFlavor(
594
+ args,
595
+ rawVersion,
596
+ slotVersion,
597
+ 'debug',
598
+ );
599
+ const release = await ensureArtifactFlavor(
600
+ args,
601
+ rawVersion,
602
+ slotVersion,
603
+ 'release',
604
+ );
605
+ return {debug, release};
606
+ }
607
+
608
+ function generateXcframeworksPackage(
609
+ args /*: SetupArgs */,
610
+ appRoot /*: string */,
611
+ reactNativeRoot /*: string */,
612
+ version /*: string */,
613
+ artifactDirs /*: {debug: string, release: string} */,
614
+ ) {
615
+ log('Generating xcframeworks sub-package...');
616
+ const packageArgs = [
617
+ '--app-root',
618
+ appRoot,
619
+ '--react-native-root',
620
+ reactNativeRoot,
621
+ '--version',
622
+ version,
623
+ ];
624
+ packageArgs.push('--debug-artifacts-dir', artifactDirs.debug);
625
+ packageArgs.push('--release-artifacts-dir', artifactDirs.release);
626
+ generatePackage(packageArgs);
627
+ }
628
+
629
+ // True when the chosen pbxproj is still CocoaPods-integrated (its build configs
630
+ // layer a `Pods-*.xcconfig`) — the real blocker for SPM injection.
631
+ function pbxprojUsesCocoaPods(xcodeprojPath /*: string */) /*: boolean */ {
632
+ try {
633
+ const t = fs.readFileSync(
634
+ path.join(xcodeprojPath, 'project.pbxproj'),
635
+ 'utf8',
636
+ );
637
+ return /\bPods[-/][^\n]*\.xcconfig\b/.test(t);
638
+ } catch {
639
+ return false;
640
+ }
641
+ }
642
+
643
+ // True when the Podfile still declares React Native integration — a latent
644
+ // landmine even after `pod deintegrate` (a future `pod install` re-breaks the
645
+ // SPM graph). Warned about (not refused) once the pbxproj itself is clean.
646
+ function podfileHasRnIntegration(appRoot /*: string */) /*: boolean */ {
647
+ const podfilePath = path.join(appRoot, 'Podfile');
648
+ if (!fs.existsSync(podfilePath)) {
649
+ return false;
650
+ }
651
+ return /use_react_native!|use_native_modules!|prepare_react_native_project!/.test(
652
+ fs.readFileSync(podfilePath, 'utf8'),
653
+ );
654
+ }
655
+
656
+ // True when the Podfile declares any explicit `pod '...'` (third-party pods).
657
+ function podfileHasThirdPartyPods(appRoot /*: string */) /*: boolean */ {
658
+ const podfilePath = path.join(appRoot, 'Podfile');
659
+ if (!fs.existsSync(podfilePath)) {
660
+ return false;
661
+ }
662
+ return /^\s*pod\s+['"]/m.test(fs.readFileSync(podfilePath, 'utf8'));
663
+ }
664
+
665
+ // The zero-arg "fresh project" safe-gate: auto-`add --deintegrate` ONLY when it
666
+ // is provably safe — a first-run CocoaPods RN project with a stock Podfile (no
667
+ // third-party pods) whose pbxproj AND Podfile are git-tracked and clean, so the
668
+ // conversion is fully revertible. We check only the two files `deintegrate`
669
+ // mutates (not the whole tree) — a fresh app typically has a dirty
670
+ // node_modules/lockfile/patches after `npm install` + `spm scaffold`, none of
671
+ // which affect the revertibility of the CocoaPods → SwiftPM conversion.
672
+ // Otherwise false → strict `add` (which fails loud on a CocoaPods project).
673
+ function shouldAutoDeintegrate(
674
+ appRoot /*: string */,
675
+ xcodeprojPath /*: string | null */,
676
+ ) /*: boolean */ {
677
+ if (xcodeprojPath == null || !pbxprojUsesCocoaPods(xcodeprojPath)) {
678
+ return false;
679
+ }
680
+ if (podfileHasThirdPartyPods(appRoot)) {
681
+ return false;
682
+ }
683
+ const pbxprojPath = path.join(xcodeprojPath, 'project.pbxproj');
684
+ if (gitTrackedAndClean(appRoot, pbxprojPath) !== true) {
685
+ return false;
686
+ }
687
+ const podfilePath = path.join(appRoot, 'Podfile');
688
+ if (
689
+ fs.existsSync(podfilePath) &&
690
+ gitTrackedAndClean(appRoot, podfilePath) !== true
691
+ ) {
692
+ return false;
693
+ }
694
+ return true;
695
+ }
696
+
697
+ // Run `pod deintegrate` then strip React Native from the Podfile (leaving any
698
+ // non-RN pods). Requires CocoaPods on PATH (fail-loud otherwise). Flag-gated ⇒
699
+ // no prompt ⇒ CI-safe. Does NOT touch the .xcworkspace.
700
+ function runDeintegrate(appRoot /*: string */) /*: void */ {
701
+ try {
702
+ execFileSync('pod', ['--version'], {stdio: 'ignore'});
703
+ } catch {
704
+ logError(
705
+ '`--deintegrate` needs CocoaPods (`pod`) on PATH. Remove the React ' +
706
+ 'Native integration from your project manually, then run `spm add`.',
707
+ );
708
+ process.exitCode = 1;
709
+ throw new Error('pod not found');
710
+ }
711
+ log('Running `pod deintegrate`...');
712
+ execFileSync('pod', ['deintegrate'], {cwd: appRoot, stdio: 'inherit'});
713
+
714
+ const podfilePath = path.join(appRoot, 'Podfile');
715
+ if (fs.existsSync(podfilePath)) {
716
+ const orig = fs.readFileSync(podfilePath, 'utf8');
717
+ const stripped = orig
718
+ .split('\n')
719
+ .filter(
720
+ l =>
721
+ !/use_react_native!|use_native_modules!|prepare_react_native_project!/.test(
722
+ l,
723
+ ),
724
+ )
725
+ .join('\n');
726
+ if (stripped !== orig) {
727
+ fs.writeFileSync(podfilePath, stripped, 'utf8');
728
+ log('Stripped React Native integration from Podfile.');
729
+ }
730
+ }
731
+ }
732
+
733
+ // Pick the .xcodeproj to inject into: --xcodeproj override > a prior in-place
734
+ // target (re-run) > the single .xcodeproj in appRoot. Returns an error string
735
+ // (ambiguous / none) so the caller fails loud.
736
+ function resolveInjectionTarget(
737
+ args /*: SetupArgs */,
738
+ appRoot /*: string */,
739
+ ) /*: {path: string, error?: void} | {error: string, path?: void} */ {
740
+ if (args.xcodeprojPath != null) {
741
+ const p = path.resolve(appRoot, args.xcodeprojPath);
742
+ return fs.existsSync(p)
743
+ ? {path: p}
744
+ : {error: `--xcodeproj not found: ${p}`};
745
+ }
746
+ const injected = findInjectedXcodeproj(appRoot);
747
+ if (injected != null) {
748
+ return {path: injected};
749
+ }
750
+ const names /*: Array<string> */ = [];
751
+ let entries /*: Array<{name: string, isDirectory(): boolean}> */ = [];
752
+ try {
753
+ // $FlowFixMe[incompatible-type] Dirent typing
754
+ entries = fs.readdirSync(appRoot, {withFileTypes: true});
755
+ } catch {}
756
+ for (const entry of entries) {
757
+ if (!entry.isDirectory()) continue;
758
+ // $FlowFixMe[incompatible-type] Dirent.name is string|Buffer in Flow stubs
759
+ const name /*: string */ = entry.name;
760
+ if (name.endsWith('.xcodeproj')) {
761
+ names.push(name);
762
+ }
763
+ }
764
+ if (names.length === 0) {
765
+ return {
766
+ error:
767
+ 'no .xcodeproj found. Create an app first (e.g. `npx ' +
768
+ '@react-native-community/cli init`) or make one in Xcode, then `spm add`.',
769
+ };
770
+ }
771
+ if (names.length > 1) {
772
+ return {
773
+ error: `multiple .xcodeproj found (${names.join(', ')}); pass --xcodeproj to pick one.`,
774
+ };
775
+ }
776
+ return {path: path.join(appRoot, names[0])};
777
+ }
778
+
779
+ /**
780
+ * Inject SPM packages into the user's existing .xcodeproj, in place — the only
781
+ * xcodeproj strategy (`add` and `update` both run this; there is no
782
+ * from-scratch generation). Fails loud rather than silently retargeting. With
783
+ * `--deintegrate`, removes CocoaPods first.
784
+ */
785
+ async function setupXcodeproj(
786
+ args /*: SetupArgs */,
787
+ appRoot /*: string */,
788
+ reactNativeRoot /*: string */,
789
+ action /*: string */,
790
+ ) /*: Promise<void> */ {
791
+ const target = resolveInjectionTarget(args, appRoot);
792
+ if (target.error != null) {
793
+ logError(`Cannot set up SPM: ${target.error}`);
794
+ process.exitCode = 1;
795
+ throw new Error(target.error);
796
+ }
797
+ const xcodeprojPath = target.path;
798
+ const pbxprojPath = path.join(xcodeprojPath, 'project.pbxproj');
799
+
800
+ // Snapshot the pbxproj's git state BEFORE deintegrate — `pod deintegrate`
801
+ // rewrites it (removing the Pods xcconfig layering), so checking afterward
802
+ // would always look dirty and trigger a spurious confirmation prompt.
803
+ const cleanBeforeEdits = gitTrackedAndClean(appRoot, pbxprojPath);
804
+
805
+ if (args.deintegrate) {
806
+ runDeintegrate(appRoot);
807
+ // `pod deintegrate` strips the build integration but can leave an empty
808
+ // `Pods` group in the navigator — remove it so the converted project is
809
+ // visually clean.
810
+ if (cleanupLeftoverPodsGroup(xcodeprojPath)) {
811
+ log('Removed the leftover empty `Pods` group from the project.');
812
+ }
813
+ }
814
+
815
+ // Preflight: a still-CocoaPods-integrated pbxproj is the real build-breaker.
816
+ if (pbxprojUsesCocoaPods(xcodeprojPath)) {
817
+ logError(
818
+ `${path.basename(xcodeprojPath)} is CocoaPods-integrated. Re-run ` +
819
+ '`spm add --deintegrate` to convert it (runs `pod deintegrate` + ' +
820
+ 'strips React Native from the Podfile), or run `pod deintegrate` ' +
821
+ 'yourself first. Side-by-side non-RN pods are fine.',
822
+ );
823
+ process.exitCode = 1;
824
+ throw new Error('CocoaPods-integrated project');
825
+ }
826
+ if (podfileHasRnIntegration(appRoot)) {
827
+ log(
828
+ '\x1b[33mNote: your Podfile still declares React Native integration. ' +
829
+ 'Remove it and avoid `pod install`, or it will re-break the SPM ' +
830
+ 'package graph.\x1b[0m',
831
+ );
832
+ }
833
+
834
+ // No backup is made — git is the safety net. Refuse on a dirty/untracked
835
+ // pbxproj (as it was BEFORE any deintegrate edits) unless --yes, so a bad
836
+ // inject is always `git checkout`-able.
837
+ const clean = cleanBeforeEdits;
838
+ if (clean === false && !args.yes) {
839
+ const proceed = await promptYesNo(
840
+ `${path.basename(xcodeprojPath)} has uncommitted changes and no ` +
841
+ `backup is made (git is the only undo). Inject SPM packages anyway?`,
842
+ false,
843
+ );
844
+ if (!proceed) {
845
+ log('Aborted. Commit or stash the project, then re-run `spm add`.');
846
+ process.exitCode = 1;
847
+ throw new Error('In-place injection declined (dirty working tree)');
848
+ }
849
+ } else if (clean === null) {
850
+ log(
851
+ `\x1b[33mNote: ${path.basename(xcodeprojPath)} is not in a git ` +
852
+ `repo — no backup is made before in-place injection.\x1b[0m`,
853
+ );
854
+ }
855
+
856
+ const result = injectSpmIntoExistingXcodeproj({
857
+ appRoot,
858
+ reactNativeRoot,
859
+ xcodeprojPath,
860
+ appName: args.productName,
861
+ // Only an EXPLICIT `--version` pins the artifacts-cache slot in the
862
+ // marker; omitting it (null) leaves any previously-recorded pin alone
863
+ // (injectSpmIntoExistingXcodeproj preserves it — see
864
+ // generate-spm-xcodeproj.js).
865
+ artifactsVersionOverride: args.version ?? null,
866
+ configCommand: resolveConfigCommandToPin(args),
867
+ });
868
+ if (result.status !== 'injected') {
869
+ logError(`SPM injection failed: ${result.reason}`);
870
+ process.exitCode = 1;
871
+ throw new Error(result.reason);
872
+ }
873
+
874
+ // The community template has carried a dangling `JavaScriptCore.framework`
875
+ // reference since RN 0.60 (navigator-only, unlinked, meaningless under
876
+ // Hermes) — one-time migration hygiene at conversion time, like the empty
877
+ // Pods group above. `add` only; `update` stays a minimal re-sync.
878
+ if (action === 'add' && cleanupDanglingJavaScriptCoreRef(xcodeprojPath)) {
879
+ log(
880
+ "Removed the template's dangling JavaScriptCore.framework reference " +
881
+ '(unused; React Native uses Hermes).',
882
+ );
883
+ }
884
+ }
885
+
886
+ // True when `git status --porcelain` reports the path dirty/untracked. Returns
887
+ // null when git is unavailable or the path is outside a repo (no safety net).
888
+ function gitTrackedAndClean(
889
+ appRoot /*: string */,
890
+ targetPath /*: string */,
891
+ ) /*: boolean | null */ {
892
+ try {
893
+ const out = execFileSync(
894
+ 'git',
895
+ ['status', '--porcelain', '--', targetPath],
896
+ {cwd: appRoot, encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore']},
897
+ );
898
+ return out.trim() === '';
899
+ } catch {
900
+ return null; // not a git repo / git missing
901
+ }
902
+ }
903
+
904
+ function logNextSteps(
905
+ projectRoot /*: string */,
906
+ appRoot /*: string */,
907
+ productName /*: string | null */,
908
+ ) {
909
+ const appPkgJson = readPackageJson(projectRoot);
910
+ const rawName =
911
+ (appPkgJson != null ? appPkgJson.name : null) ?? path.basename(projectRoot);
912
+ const sourcePath = findSourcePath(appRoot, rawName);
913
+ const appDisplayName = productName ?? deriveAppName(rawName, sourcePath);
914
+
915
+ log('');
916
+ log('SPM setup complete!');
917
+ log('');
918
+ log('Next steps:');
919
+ log(` • Open ${appDisplayName}.xcodeproj in Xcode (or \`npm run ios\`)`);
920
+ log(' • Set your Development Team in Signing & Capabilities');
921
+ log(' • Build and run on Simulator or device');
922
+ log('');
923
+ log('To remove SPM later: `npx react-native spm deinit`');
924
+ }
925
+
926
+ // The autolinking config command for this run: an explicit `--config-command`
927
+ // first, then the value a previous `add`/`update` pinned into the injection
928
+ // marker. undefined means "no explicit command", which is what makes
929
+ // generateAutolinkingConfig fall back to RCT_SPM_AUTOLINKING_CONFIG_COMMAND and
930
+ // then to the built-in default — so the pin has to be WITHHELD while the env
931
+ // var is set, or a stale pin would outrank a developer's env override.
932
+ function resolveExplicitConfigCommand(
933
+ args /*: SetupArgs */,
934
+ appRoot /*: string */,
935
+ ) /*: Array<string> | void */ {
936
+ if (args.configCommand != null) {
937
+ return args.configCommand;
938
+ }
939
+ if (readEnvConfigCommand() != null) {
940
+ return undefined;
941
+ }
942
+ const pinned = readPinnedConfigCommand(appRoot);
943
+ if (pinned == null) {
944
+ return undefined;
945
+ }
946
+ log(
947
+ `Autolinking config command (pinned in ${SPM_INJECTED_MARKER}): ` +
948
+ pinned.join(' '),
949
+ );
950
+ return pinned;
951
+ }
952
+
953
+ // The command to record in the injection marker. The env var is resolved here
954
+ // too, because the Xcode build phase inherits neither the flag nor the shell
955
+ // that set it — an env-only override that went unpinned would leave the build
956
+ // re-deriving autolinking.json with the default command. null pins nothing and
957
+ // preserves any earlier pin. An invalid env value throws, as the flag does,
958
+ // though `add` has already failed closed on it by this point.
959
+ function resolveConfigCommandToPin(
960
+ args /*: SetupArgs */,
961
+ ) /*: ?Array<string> */ {
962
+ return args.configCommand ?? resolveEnvConfigCommand();
963
+ }
964
+
965
+ // Generate autolinking.json, failing closed on a config-command error.
966
+ //
967
+ // generateAutolinkingConfig throws ONLY when the config command itself fails —
968
+ // a non-zero exit, unparseable output, or a config missing
969
+ // project.ios.sourceDir. Swallowing that (the old behavior) let the run proceed
970
+ // and emit an empty Autolinked package, which only surfaced much later as an
971
+ // inscrutable `unable to resolve module dependency` at build time. Instead we
972
+ // set process.exitCode = 2 (a hard Xcode build-phase error, matching the
973
+ // RemoteVersionError path) and return null so the caller stops.
974
+ //
975
+ // A genuinely native-module-free app does NOT reach the error path: its command
976
+ // exits 0 with valid, empty-dependency JSON, so generateAutolinkingConfig
977
+ // returns normally and the empty-package path downstream stays valid.
978
+ function generateAutolinkingConfigOrFailClosed(
979
+ opts /*: {
980
+ projectRoot: string,
981
+ configCommand?: Array<string>,
982
+ generate?: typeof generateAutolinkingConfig,
983
+ } */,
984
+ ) /*: ?AutolinkingConfigResult */ {
985
+ const generate = opts.generate ?? generateAutolinkingConfig;
986
+ try {
987
+ return generate({
988
+ projectRoot: opts.projectRoot,
989
+ configCommand: opts.configCommand,
990
+ });
991
+ } catch (e) {
992
+ logError(
993
+ `Failed to generate autolinking.json: ${e.message}\n` +
994
+ 'The autolinking config command failed. If this app replaces ' +
995
+ '@react-native-community/cli autolinking (e.g. an Expo app), set ' +
996
+ 'RCT_SPM_AUTOLINKING_CONFIG_COMMAND (or pass --config-command) to a ' +
997
+ 'JSON argv array whose command prints the React Native CLI config, ' +
998
+ 'e.g. \'["npx","expo-modules-autolinking","react-native-config",' +
999
+ '"--json","--platform","ios"]\'. An earlier `add`/`update` may also ' +
1000
+ `have pinned a command in ${SPM_INJECTED_MARKER}; re-run with ` +
1001
+ '--config-command to replace a stale one.',
1002
+ );
1003
+ process.exitCode = 2;
1004
+ return null;
1005
+ }
1006
+ }
1007
+
1008
+ async function main(argv /*:: ?: Array<string> */) /*: Promise<void> */ {
1009
+ let appRoot = process.cwd();
1010
+ const projectRoot = findProjectRoot(appRoot);
1011
+ const args = parseArgs(argv ?? process.argv.slice(2));
1012
+
1013
+ // Standard-RN-layout redirect: if invoked from the JS root and there's an
1014
+ // `ios/` subdir, route the run there. Runs BEFORE resolveAction so the
1015
+ // first-run heuristic checks the correct directory.
1016
+ const redirectTo = detectStandardRnLayoutRedirect(appRoot, projectRoot);
1017
+ if (redirectTo != null) {
1018
+ const redirectAction = args.action ?? 'add';
1019
+ log(
1020
+ `\x1b[33mDetected standard RN layout — running ${redirectAction} in ${displayPath(redirectTo)} ` +
1021
+ `instead of ${displayPath(appRoot)}.\x1b[0m`,
1022
+ );
1023
+ appRoot = redirectTo;
1024
+ }
1025
+
1026
+ const action = resolveAction(args.action, appRoot);
1027
+
1028
+ // Zero-arg safe-gate: when `add` was resolved implicitly (no action typed)
1029
+ // on a freshly-scaffolded CocoaPods project, imply `--deintegrate` so the
1030
+ // common "new app → SPM" path is one command. Never on an explicit `spm add`
1031
+ // (that stays strict and fails loud on CocoaPods).
1032
+ if (
1033
+ action === 'add' &&
1034
+ args.action == null &&
1035
+ !args.deintegrate &&
1036
+ shouldAutoDeintegrate(
1037
+ appRoot,
1038
+ resolveInjectionTarget(args, appRoot).path ?? null,
1039
+ )
1040
+ ) {
1041
+ log(
1042
+ 'Detected a freshly-scaffolded CocoaPods project — converting to SwiftPM ' +
1043
+ '(running `pod deintegrate`). Revert with `git` or `spm deinit`.',
1044
+ );
1045
+ args.deintegrate = true;
1046
+ }
1047
+
1048
+ log(`Running SPM ${action} in: ${displayPath(appRoot)}`);
1049
+ if (projectRoot !== appRoot) {
1050
+ log(`Project root (package.json): ${displayPath(projectRoot)}`);
1051
+ }
1052
+
1053
+ if (action === 'deinit') {
1054
+ const xcodeprojPath =
1055
+ args.xcodeprojPath != null
1056
+ ? path.resolve(appRoot, args.xcodeprojPath)
1057
+ : findInjectedXcodeproj(appRoot);
1058
+ if (xcodeprojPath == null) {
1059
+ log('No SPM injection found — nothing to remove.');
1060
+ return;
1061
+ }
1062
+ const result = removeSpmInjection({appRoot, xcodeprojPath});
1063
+ log(
1064
+ result.status === 'removed'
1065
+ ? `Removed SPM packages from ${path.basename(xcodeprojPath)}.`
1066
+ : 'No SPM injection found — nothing to remove.',
1067
+ );
1068
+ return;
1069
+ }
1070
+
1071
+ // Fail fast on a CocoaPods-integrated target BEFORE the (expensive) pipeline,
1072
+ // so the user isn't made to wait through codegen + artifact download only to
1073
+ // be told to re-run with --deintegrate. Skipped when --deintegrate is set
1074
+ // (explicitly or via the safe-gate) — deintegration happens in setupXcodeproj.
1075
+ if ((action === 'add' || action === 'update') && !args.deintegrate) {
1076
+ const target = resolveInjectionTarget(args, appRoot);
1077
+ if (target.path != null && pbxprojUsesCocoaPods(target.path)) {
1078
+ logError(
1079
+ `${path.basename(target.path)} is CocoaPods-integrated. Re-run ` +
1080
+ '`spm add --deintegrate` to convert it (runs `pod deintegrate` + ' +
1081
+ 'strips React Native from the Podfile), or run `pod deintegrate` ' +
1082
+ 'yourself first. Side-by-side non-RN pods are fine.',
1083
+ );
1084
+ process.exitCode = 1;
1085
+ return;
1086
+ }
1087
+ }
1088
+
1089
+ const needsCliConfig =
1090
+ action === 'add' ||
1091
+ action === 'update' ||
1092
+ action === 'sync' ||
1093
+ action === 'scaffold';
1094
+ let autolinkingConfigResult /*: ?AutolinkingConfigResult */ = null;
1095
+ if (needsCliConfig) {
1096
+ log('Generating autolinking.json (CLI config)...');
1097
+ autolinkingConfigResult = generateAutolinkingConfigOrFailClosed({
1098
+ projectRoot,
1099
+ configCommand: resolveExplicitConfigCommand(args, appRoot),
1100
+ });
1101
+ if (autolinkingConfigResult == null) {
1102
+ // Fail closed: the config command errored and the helper already set
1103
+ // process.exitCode = 2. Stop rather than emit an empty Autolinked package.
1104
+ return;
1105
+ }
1106
+ log(`Wrote ${path.relative(appRoot, autolinkingConfigResult.outputPath)}`);
1107
+ }
1108
+ const reactNativeRoot = resolveReactNativeRoot(
1109
+ autolinkingConfigResult,
1110
+ projectRoot,
1111
+ );
1112
+ const version = determineVersion(args, reactNativeRoot, appRoot);
1113
+ log(`React Native version: ${version}`);
1114
+
1115
+ // Resolve remote SPM mode ONCE up front. remotePackageConfig throws
1116
+ // RemoteVersionError when remote mode is active but no usable RN version can
1117
+ // be derived (e.g. the monorepo '1000.0.0' placeholder with no override).
1118
+ // The downstream scaffold/autolinker/package steps all call it internally;
1119
+ // surfacing it here gives a single, predictable failure point before any of
1120
+ // them run. Exit 2 (same as a missing manifest) so the Xcode build phase
1121
+ // turns it into a hard build error while staying lenient on transient sync
1122
+ // failures. No-op in local mode (returns null).
1123
+ try {
1124
+ remotePackageConfig(appRoot);
1125
+ } catch (e) {
1126
+ if (e instanceof RemoteVersionError) {
1127
+ logError(e.message);
1128
+ process.exitCode = 2;
1129
+ return;
1130
+ }
1131
+ throw e;
1132
+ }
1133
+ // The artifact cache directory is resolved later in ensureArtifacts so the
1134
+ // nightly hash can be folded in for dev / nightly labels. That branch logs
1135
+ // either "Downloading xcframework artifacts (slot: ...)" or
1136
+ // "Artifacts already present in ...".
1137
+
1138
+ if (action === 'codegen') {
1139
+ runCodegenStep(projectRoot, appRoot, reactNativeRoot, false);
1140
+ return;
1141
+ }
1142
+
1143
+ if (action === 'sync') {
1144
+ const {main: runSync} = require('./spm/sync-spm-autolinking');
1145
+ try {
1146
+ await runSync([
1147
+ '--app-root',
1148
+ appRoot,
1149
+ '--react-native-root',
1150
+ reactNativeRoot,
1151
+ ]);
1152
+ } catch (e) {
1153
+ if (e instanceof MissingManifestError) {
1154
+ // The per-dep `error:` lines were already printed by the autolinker.
1155
+ // Exit 2 (distinct from generic failure) so the Xcode build phase can
1156
+ // turn this into a hard build error while staying lenient on transient
1157
+ // sync failures.
1158
+ process.exitCode = 2;
1159
+ } else {
1160
+ logError(`SPM sync failed: ${e.message}`);
1161
+ process.exitCode = 1;
1162
+ }
1163
+ }
1164
+ return;
1165
+ }
1166
+
1167
+ if (action === 'download') {
1168
+ try {
1169
+ await ensureBothArtifactFlavors(args, version);
1170
+ } catch (e) {
1171
+ logError(`Artifact setup failed: ${e.message}`);
1172
+ process.exitCode = 1;
1173
+ }
1174
+ return;
1175
+ }
1176
+
1177
+ // Scaffold Package.swift for community RN packages that don't ship SPM
1178
+ // support — ONLY for the explicit `scaffold` action. init/update never
1179
+ // auto-scaffold: a missing manifest must surface as a hard error (the
1180
+ // autolinker below throws MissingManifestError → exit 2) so the gap is
1181
+ // visible and fixed deliberately (scaffold + patch-package, or upstream).
1182
+ // Auto-scaffolding would silently hide that real error.
1183
+ if (action === 'scaffold') {
1184
+ await runScaffold(args, appRoot, projectRoot, reactNativeRoot);
1185
+ }
1186
+
1187
+ runCodegenStep(projectRoot, appRoot, reactNativeRoot, args.skipCodegen);
1188
+ log('Generating build/generated/autolinking/Package.swift...');
1189
+ try {
1190
+ generateAutolinking([
1191
+ '--app-root',
1192
+ appRoot,
1193
+ '--react-native-root',
1194
+ reactNativeRoot,
1195
+ ]);
1196
+ } catch (e) {
1197
+ if (e instanceof MissingManifestError) {
1198
+ // Per-dep `error:` lines already printed by the autolinker. This happens
1199
+ // on init/update when the user declined the scaffold prompt — surface it
1200
+ // as a hard failure (exit 2) directing them to scaffold.
1201
+ process.exitCode = 2;
1202
+ } else {
1203
+ logError(`generate-spm-autolinking.js failed: ${e.message}`);
1204
+ process.exitCode = 1;
1205
+ }
1206
+ return;
1207
+ }
1208
+
1209
+ const remote = remotePackageConfig(appRoot);
1210
+ if (remote != null) {
1211
+ log(`Remote ReactNative package: ${remote.url} @ ${remote.version}`);
1212
+ }
1213
+ let artifactDirs;
1214
+ try {
1215
+ artifactDirs = await ensureBothArtifactFlavors(args, version);
1216
+ } catch (e) {
1217
+ logError(`Artifact setup failed: ${e.message}`);
1218
+ process.exitCode = 1;
1219
+ return;
1220
+ }
1221
+ try {
1222
+ generateXcframeworksPackage(
1223
+ args,
1224
+ appRoot,
1225
+ reactNativeRoot,
1226
+ version,
1227
+ artifactDirs,
1228
+ );
1229
+ } catch (e) {
1230
+ logError(`generate-spm-package.js failed: ${e.message}`);
1231
+ process.exitCode = 1;
1232
+ return;
1233
+ }
1234
+
1235
+ // (Re)install the static codegen Package.swift template once build/generated/ios exists.
1236
+ installSpmCodegenTemplate(appRoot, reactNativeRoot, {log});
1237
+
1238
+ // Build the per-app generated-headers farm (vended as the ReactAppHeaders
1239
+ // SPM target inside the codegen package). React core headers need no trees
1240
+ // — they are vended by invariant SwiftPM compile products. The
1241
+ // generated manifests are fully declarative (fixed-relative package paths),
1242
+ // so no path-locator JSON is written.
1243
+ buildPerAppHeaderTree(appRoot, {log});
1244
+
1245
+ // First-time setup only adds the gitignore entries on `add`.
1246
+ if (action === 'add') {
1247
+ ensureGitignoreSpmEntries(appRoot);
1248
+ }
1249
+
1250
+ // Xcodeproj setup: in-place injection into the existing project (the only
1251
+ // strategy — no rename, no from-scratch; git is the safety net).
1252
+ try {
1253
+ await setupXcodeproj(args, appRoot, reactNativeRoot, action);
1254
+ } catch (e) {
1255
+ logError(`xcodeproj setup failed: ${e.message}`);
1256
+ if (process.exitCode == null) {
1257
+ process.exitCode = 1;
1258
+ }
1259
+ return;
1260
+ }
1261
+
1262
+ finalizeArtifactPublication(appRoot);
1263
+
1264
+ logNextSteps(projectRoot, appRoot, args.productName);
1265
+ }
1266
+
1267
+ if (require.main === module) {
1268
+ void main();
1269
+ }
1270
+
1271
+ module.exports = {
1272
+ main,
1273
+ detectStandardRnLayoutRedirect,
1274
+ determineVersion,
1275
+ findInjectedXcodeproj,
1276
+ generateAutolinkingConfigOrFailClosed,
1277
+ parseArgs,
1278
+ resolveAction,
1279
+ resolveConfigCommandToPin,
1280
+ resolveExplicitConfigCommand,
1281
+ shouldAutoDeintegrate,
1282
+ ensureBothArtifactFlavors,
1283
+ };