@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
@@ -1,1646 +0,0 @@
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
- * @generated SignedSource<<2aa191314924bd0f969fba0e64b86142>>
8
- */
9
-
10
- /**
11
- * THIS FILE IS GENERATED - DO NOT EDIT DIRECTLY
12
- * Source: ReactScrollView.java
13
- * Run: node generate-nested-scroll-view.js
14
- */
15
-
16
- package com.facebook.react.views.scroll;
17
-
18
- import static com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_CENTER;
19
- import static com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_DISABLED;
20
- import static com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_END;
21
- import static com.facebook.react.views.scroll.ReactScrollViewHelper.SNAP_ALIGNMENT_START;
22
- import static com.facebook.react.views.scroll.ReactScrollViewHelper.findNextFocusableView;
23
-
24
- import android.animation.ObjectAnimator;
25
- import android.animation.ValueAnimator;
26
- import android.content.Context;
27
- import android.graphics.Canvas;
28
- import android.graphics.Color;
29
- import android.graphics.Point;
30
- import android.graphics.Rect;
31
- import android.graphics.drawable.ColorDrawable;
32
- import android.graphics.drawable.Drawable;
33
- import android.os.Build;
34
- import android.view.KeyEvent;
35
- import android.view.MotionEvent;
36
- import android.view.View;
37
- import android.view.ViewGroup;
38
- import android.view.accessibility.AccessibilityNodeInfo;
39
- import android.widget.OverScroller;
40
- import androidx.core.widget.NestedScrollView;
41
- import androidx.annotation.NonNull;
42
- import androidx.annotation.Nullable;
43
- import androidx.core.view.ViewCompat;
44
- import androidx.core.view.ViewCompat.FocusDirection;
45
- import com.facebook.common.logging.FLog;
46
- import com.facebook.infer.annotation.Assertions;
47
- import com.facebook.infer.annotation.Nullsafe;
48
- import com.facebook.react.R;
49
- import com.facebook.react.bridge.ReadableMap;
50
- import com.facebook.react.common.ReactConstants;
51
- import com.facebook.react.internal.featureflags.ReactNativeFeatureFlags;
52
- import com.facebook.react.uimanager.BackgroundStyleApplicator;
53
- import com.facebook.react.uimanager.LengthPercentage;
54
- import com.facebook.react.uimanager.LengthPercentageType;
55
- import com.facebook.react.uimanager.MeasureSpecAssertions;
56
- import com.facebook.react.uimanager.PixelUtil;
57
- import com.facebook.react.uimanager.PointerEvents;
58
- import com.facebook.react.uimanager.ReactClippingViewGroup;
59
- import com.facebook.react.uimanager.ReactClippingViewGroupHelper;
60
- import com.facebook.react.uimanager.ReactOverflowViewWithInset;
61
- import com.facebook.react.uimanager.StateWrapper;
62
- import com.facebook.react.uimanager.events.NativeGestureUtil;
63
- import com.facebook.react.uimanager.style.BorderRadiusProp;
64
- import com.facebook.react.uimanager.style.BorderStyle;
65
- import com.facebook.react.uimanager.style.LogicalEdge;
66
- import com.facebook.react.uimanager.style.Overflow;
67
- import com.facebook.react.views.scroll.ReactScrollViewHelper.HasFlingAnimator;
68
- import com.facebook.react.views.scroll.ReactScrollViewHelper.HasScrollEventThrottle;
69
- import com.facebook.react.views.scroll.ReactScrollViewHelper.HasScrollState;
70
- import com.facebook.react.views.scroll.ReactScrollViewHelper.HasSmoothScroll;
71
- import com.facebook.react.views.scroll.ReactScrollViewHelper.HasStateWrapper;
72
- import com.facebook.react.views.scroll.ReactScrollViewHelper.ReactScrollViewScrollState;
73
- import com.facebook.systrace.Systrace;
74
- import java.lang.reflect.Field;
75
- import java.util.List;
76
- import java.util.Set;
77
-
78
- /**
79
- * A simple subclass of NestedScrollView that doesn't dispatch measure and layout to its children and has
80
- * a scroll listener to send scroll events to JS.
81
- *
82
- * <p>ReactNestedScrollView only supports vertical scrolling. For horizontal scrolling, use {@link
83
- * ReactHorizontalScrollView}.
84
- */
85
- @Nullsafe(Nullsafe.Mode.LOCAL)
86
- class ReactNestedScrollView extends NestedScrollView
87
- implements ReactClippingViewGroup,
88
- ViewGroup.OnHierarchyChangeListener,
89
- View.OnLayoutChangeListener,
90
- ReactAccessibleScrollView,
91
- ReactOverflowViewWithInset,
92
- HasScrollState,
93
- HasStateWrapper,
94
- HasFlingAnimator,
95
- HasScrollEventThrottle,
96
- HasSmoothScroll,
97
- VirtualViewContainer {
98
-
99
- private static @Nullable Field sScrollerField;
100
- private static boolean sTriedToGetScrollerField = false;
101
-
102
- private static final int UNSET_CONTENT_OFFSET = -1;
103
-
104
- private final OnScrollDispatchHelper mOnScrollDispatchHelper = new OnScrollDispatchHelper();
105
- private final @Nullable OverScroller mScroller;
106
- private final VelocityHelper mVelocityHelper = new VelocityHelper();
107
- private final Rect mTempRect = new Rect();
108
- private final ValueAnimator DEFAULT_FLING_ANIMATOR = ObjectAnimator.ofInt(this, "scrollY", 0, 0);
109
- private final @Nullable FpsListener mFpsListener;
110
-
111
- private Rect mOverflowInset;
112
- private @Nullable VirtualViewContainerState mVirtualViewContainerState;
113
- private boolean mActivelyScrolling;
114
- private @Nullable Rect mClippingRect;
115
- private Overflow mOverflow;
116
- private boolean mDragging;
117
- private boolean mPagingEnabled;
118
- private @Nullable Runnable mPostTouchRunnable;
119
- private boolean mRemoveClippedSubviews;
120
- private boolean mScrollEnabled;
121
- private boolean mSendMomentumEvents;
122
- private @Nullable String mScrollPerfTag;
123
- private @Nullable Drawable mEndBackground;
124
- private int mEndFillColor;
125
- private boolean mDisableIntervalMomentum;
126
- private int mSnapInterval;
127
- private @Nullable List<Integer> mSnapOffsets;
128
- private boolean mSnapToStart;
129
- private boolean mSnapToEnd;
130
- private int mSnapToAlignment;
131
- private @Nullable View mContentView;
132
- private @Nullable ReadableMap mCurrentContentOffset;
133
- private int mPendingContentOffsetX;
134
- private int mPendingContentOffsetY;
135
- private @Nullable StateWrapper mStateWrapper;
136
- private ReactScrollViewScrollState mReactScrollViewScrollState;
137
- private PointerEvents mPointerEvents;
138
- private long mLastScrollDispatchTime;
139
- private int mScrollEventThrottle;
140
- private @Nullable MaintainVisibleScrollPositionHelper mMaintainVisibleContentPositionHelper;
141
- private int mFadingEdgeLengthStart;
142
- private int mFadingEdgeLengthEnd;
143
- private boolean mEmittedOverScrollSinceScrollBegin;
144
- private boolean mScrollsChildToFocus = true;
145
-
146
- public ReactNestedScrollView(Context context) {
147
- this(context, null);
148
- }
149
-
150
- public ReactNestedScrollView(Context context, @Nullable FpsListener fpsListener) {
151
- super(context);
152
- mFpsListener = fpsListener;
153
-
154
- mScroller = getOverScrollerFromParent();
155
- setOnHierarchyChangeListener(this);
156
- setScrollBarStyle(SCROLLBARS_OUTSIDE_OVERLAY);
157
- setClipChildren(false);
158
-
159
- ViewCompat.setAccessibilityDelegate(this, new ReactScrollViewAccessibilityDelegate());
160
- initView();
161
- }
162
-
163
- /**
164
- * Set all default values here as opposed to in the constructor or field defaults. It is important
165
- * that these properties are set during the constructor, but also on-demand whenever an existing
166
- * ReactTextView is recycled.
167
- */
168
- private void initView() {
169
- mOverflowInset = new Rect();
170
- mVirtualViewContainerState = null;
171
- mActivelyScrolling = false;
172
- mClippingRect = null;
173
-
174
- // The default value for `overflow` is set to `Visible` in the Yoga style props.
175
- mOverflow =
176
- ReactNativeFeatureFlags.enablePropsUpdateReconciliationAndroid()
177
- ? Overflow.VISIBLE
178
- : Overflow.SCROLL;
179
-
180
- mDragging = false;
181
- mPagingEnabled = false;
182
- mPostTouchRunnable = null;
183
- mRemoveClippedSubviews = false;
184
- mScrollEnabled = true;
185
- mSendMomentumEvents = false;
186
- mScrollPerfTag = null;
187
- mEndBackground = null;
188
- mEndFillColor = Color.TRANSPARENT;
189
- mDisableIntervalMomentum = false;
190
- mSnapInterval = 0;
191
- mSnapOffsets = null;
192
- mSnapToStart = true;
193
- mSnapToEnd = true;
194
- mSnapToAlignment = SNAP_ALIGNMENT_DISABLED;
195
- mContentView = null;
196
- mCurrentContentOffset = null;
197
- mPendingContentOffsetX = UNSET_CONTENT_OFFSET;
198
- mPendingContentOffsetY = UNSET_CONTENT_OFFSET;
199
- mStateWrapper = null;
200
- mReactScrollViewScrollState = new ReactScrollViewScrollState();
201
- mPointerEvents = PointerEvents.AUTO;
202
- mLastScrollDispatchTime = 0;
203
- mScrollEventThrottle = 0;
204
- mMaintainVisibleContentPositionHelper = null;
205
- mFadingEdgeLengthStart = 0;
206
- mFadingEdgeLengthEnd = 0;
207
- mEmittedOverScrollSinceScrollBegin = false;
208
- mScrollsChildToFocus = true;
209
- }
210
-
211
- /* package */ void recycleView() {
212
- // Set default field values
213
- initView();
214
-
215
- // If the view is still attached to a parent, we need to remove it from the parent
216
- // before we can recycle it.
217
- if (getParent() != null) {
218
- ((ViewGroup) getParent()).removeView(this);
219
- }
220
- updateView();
221
- }
222
-
223
- private void updateView() {}
224
-
225
- @Override
226
- public VirtualViewContainerState getVirtualViewContainerState() {
227
- if (mVirtualViewContainerState == null) {
228
- mVirtualViewContainerState = VirtualViewContainerState.create(this);
229
- }
230
-
231
- return mVirtualViewContainerState;
232
- }
233
-
234
- @Override
235
- public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
236
- super.onInitializeAccessibilityNodeInfo(info);
237
-
238
- // Expose the testID prop as the resource-id name of the view. Black-box E2E/UI testing
239
- // frameworks, which interact with the UI through the accessibility framework, do not have
240
- // access to view tags. This allows developers/testers to avoid polluting the
241
- // content-description with test identifiers.
242
- final String testId = (String) this.getTag(R.id.react_test_id);
243
- if (testId != null) {
244
- info.setViewIdResourceName(testId);
245
- }
246
- }
247
-
248
- @Nullable
249
- protected OverScroller getOverScrollerFromParent() {
250
- OverScroller scroller;
251
-
252
- if (!sTriedToGetScrollerField) {
253
- sTriedToGetScrollerField = true;
254
- try {
255
- sScrollerField = NestedScrollView.class.getDeclaredField("mScroller");
256
- sScrollerField.setAccessible(true);
257
- } catch (NoSuchFieldException e) {
258
- FLog.w(
259
- ReactConstants.TAG,
260
- "Failed to get mScroller field for NestedScrollView! "
261
- + "This app will exhibit the bounce-back scrolling bug :(");
262
- }
263
- }
264
-
265
- if (sScrollerField != null) {
266
- try {
267
- Object scrollerValue = sScrollerField.get(this);
268
- if (scrollerValue instanceof OverScroller) {
269
- scroller = (OverScroller) scrollerValue;
270
- } else {
271
- FLog.w(
272
- ReactConstants.TAG,
273
- "Failed to cast mScroller field in NestedScrollView (probably due to OEM changes to AOSP)! "
274
- + "This app will exhibit the bounce-back scrolling bug :(");
275
- scroller = null;
276
- }
277
- } catch (IllegalAccessException e) {
278
- throw new RuntimeException("Failed to get mScroller from NestedScrollView!", e);
279
- }
280
- } else {
281
- scroller = null;
282
- }
283
-
284
- return scroller;
285
- }
286
-
287
- public void setDisableIntervalMomentum(boolean disableIntervalMomentum) {
288
- mDisableIntervalMomentum = disableIntervalMomentum;
289
- }
290
-
291
- public void setSendMomentumEvents(boolean sendMomentumEvents) {
292
- mSendMomentumEvents = sendMomentumEvents;
293
- }
294
-
295
- public void setScrollPerfTag(@Nullable String scrollPerfTag) {
296
- mScrollPerfTag = scrollPerfTag;
297
- }
298
-
299
- public void setScrollEnabled(boolean scrollEnabled) {
300
- mScrollEnabled = scrollEnabled;
301
- }
302
-
303
- @Override
304
- public boolean getScrollEnabled() {
305
- return mScrollEnabled;
306
- }
307
-
308
- public void setPagingEnabled(boolean pagingEnabled) {
309
- mPagingEnabled = pagingEnabled;
310
- }
311
-
312
- public void setScrollsChildToFocus(boolean scrollsChildToFocus) {
313
- mScrollsChildToFocus = scrollsChildToFocus;
314
- }
315
-
316
- public void setDecelerationRate(float decelerationRate) {
317
- getReactScrollViewScrollState().setDecelerationRate(decelerationRate);
318
-
319
- if (mScroller != null) {
320
- mScroller.setFriction(1.0f - decelerationRate);
321
- }
322
- }
323
-
324
- public void abortAnimation() {
325
- if (mScroller != null && !mScroller.isFinished()) {
326
- mScroller.abortAnimation();
327
- }
328
- }
329
-
330
- public void setSnapInterval(int snapInterval) {
331
- mSnapInterval = snapInterval;
332
- }
333
-
334
- public void setSnapOffsets(@Nullable List<Integer> snapOffsets) {
335
- mSnapOffsets = snapOffsets;
336
- }
337
-
338
- public void setSnapToStart(boolean snapToStart) {
339
- mSnapToStart = snapToStart;
340
- }
341
-
342
- public void setSnapToEnd(boolean snapToEnd) {
343
- mSnapToEnd = snapToEnd;
344
- }
345
-
346
- public void setSnapToAlignment(int snapToAlignment) {
347
- mSnapToAlignment = snapToAlignment;
348
- }
349
-
350
- public void flashScrollIndicators() {
351
- awakenScrollBars();
352
- }
353
-
354
- public int getFadingEdgeLengthStart() {
355
- return mFadingEdgeLengthStart;
356
- }
357
-
358
- public int getFadingEdgeLengthEnd() {
359
- return mFadingEdgeLengthEnd;
360
- }
361
-
362
- public void setFadingEdgeLengthStart(int start) {
363
- mFadingEdgeLengthStart = start;
364
- invalidate();
365
- }
366
-
367
- public void setFadingEdgeLengthEnd(int end) {
368
- mFadingEdgeLengthEnd = end;
369
- invalidate();
370
- }
371
-
372
- @Override
373
- protected float getTopFadingEdgeStrength() {
374
- float max = Math.max(mFadingEdgeLengthStart, mFadingEdgeLengthEnd);
375
- return (mFadingEdgeLengthStart / max);
376
- }
377
-
378
- @Override
379
- protected float getBottomFadingEdgeStrength() {
380
- float max = Math.max(mFadingEdgeLengthStart, mFadingEdgeLengthEnd);
381
- return (mFadingEdgeLengthEnd / max);
382
- }
383
-
384
- public void setOverflow(@Nullable String overflow) {
385
- if (overflow == null) {
386
- mOverflow = Overflow.SCROLL;
387
- } else {
388
- @Nullable Overflow parsedOverflow = Overflow.fromString(overflow);
389
- mOverflow =
390
- parsedOverflow == null
391
- ? (ReactNativeFeatureFlags.enablePropsUpdateReconciliationAndroid()
392
- ? Overflow.VISIBLE
393
- : Overflow.SCROLL)
394
- : parsedOverflow;
395
- }
396
-
397
- invalidate();
398
- }
399
-
400
- public void setMaintainVisibleContentPosition(
401
- @Nullable MaintainVisibleScrollPositionHelper.Config config) {
402
- if (config != null && mMaintainVisibleContentPositionHelper == null) {
403
- mMaintainVisibleContentPositionHelper = new MaintainVisibleScrollPositionHelper(this, false);
404
- mMaintainVisibleContentPositionHelper.start();
405
- } else if (config == null && mMaintainVisibleContentPositionHelper != null) {
406
- mMaintainVisibleContentPositionHelper.stop();
407
- mMaintainVisibleContentPositionHelper = null;
408
- }
409
- if (mMaintainVisibleContentPositionHelper != null) {
410
- mMaintainVisibleContentPositionHelper.setConfig(config);
411
- }
412
- }
413
-
414
- @Override
415
- public @Nullable String getOverflow() {
416
- switch (mOverflow) {
417
- case HIDDEN:
418
- return "hidden";
419
- case SCROLL:
420
- return "scroll";
421
- case VISIBLE:
422
- return "visible";
423
- }
424
-
425
- return null;
426
- }
427
-
428
- @Override
429
- public void setOverflowInset(int left, int top, int right, int bottom) {
430
- mOverflowInset.set(left, top, right, bottom);
431
- }
432
-
433
- @Override
434
- public Rect getOverflowInset() {
435
- return mOverflowInset;
436
- }
437
-
438
- @Override
439
- protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
440
- MeasureSpecAssertions.assertExplicitMeasureSpec(widthMeasureSpec, heightMeasureSpec);
441
-
442
- setMeasuredDimension(
443
- MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.getSize(heightMeasureSpec));
444
- }
445
-
446
- @Override
447
- protected void onLayout(boolean changed, int l, int t, int r, int b) {
448
- // Apply pending contentOffset in case it was set before the view was laid out.
449
- if (isContentReady()) {
450
- // If a "pending" content offset value has been set, we restore that value.
451
- // Upon call to scrollTo, the "pending" values will be re-set.
452
- int scrollToX =
453
- mPendingContentOffsetX != UNSET_CONTENT_OFFSET ? mPendingContentOffsetX : getScrollX();
454
- int scrollToY =
455
- mPendingContentOffsetY != UNSET_CONTENT_OFFSET ? mPendingContentOffsetY : getScrollY();
456
- scrollTo(scrollToX, scrollToY);
457
- }
458
-
459
- ReactScrollViewHelper.emitLayoutEvent(this);
460
- if (mVirtualViewContainerState != null) {
461
- mVirtualViewContainerState.updateState();
462
- }
463
- }
464
-
465
- @Override
466
- protected void onSizeChanged(int w, int h, int oldw, int oldh) {
467
- super.onSizeChanged(w, h, oldw, oldh);
468
- if (mRemoveClippedSubviews) {
469
- updateClippingRect();
470
- }
471
- if (mVirtualViewContainerState != null) {
472
- mVirtualViewContainerState.updateState();
473
- }
474
- }
475
-
476
- @Override
477
- public void onAttachedToWindow() {
478
- super.onAttachedToWindow();
479
- if (mRemoveClippedSubviews) {
480
- updateClippingRect();
481
- }
482
- if (mMaintainVisibleContentPositionHelper != null) {
483
- mMaintainVisibleContentPositionHelper.start();
484
- }
485
- }
486
-
487
- @Override
488
- protected void onDetachedFromWindow() {
489
- super.onDetachedFromWindow();
490
- if (mMaintainVisibleContentPositionHelper != null) {
491
- mMaintainVisibleContentPositionHelper.stop();
492
- }
493
- }
494
-
495
- @Override
496
- public @Nullable View focusSearch(View focused, @FocusDirection int direction) {
497
- View nextFocus = super.focusSearch(focused, direction);
498
-
499
- if (ReactNativeFeatureFlags.enableCustomFocusSearchOnClippedElementsAndroid()) {
500
- // If we can find the next focus and it is a child of this view, return it, else it means we
501
- // are leaving the scroll view and we should try to find a clipped element
502
- if (nextFocus != null && this.findViewById(nextFocus.getId()) != null) {
503
- return nextFocus;
504
- }
505
-
506
- @Nullable View nextfocusableView = findNextFocusableView(this, focused, direction);
507
-
508
- if (nextfocusableView != null) {
509
- return nextfocusableView;
510
- }
511
- }
512
-
513
- return nextFocus;
514
- }
515
-
516
- /**
517
- * Since ReactNestedScrollView handles layout changes on JS side, it does not call super.onlayout due to
518
- * which mIsLayoutDirty flag in NestedScrollView remains true and prevents scrolling to child when
519
- * requestChildFocus is called. Overriding this method and scrolling to child without checking any
520
- * layout dirty flag. This will fix focus navigation issue for KeyEvents which are not handled by
521
- * NestedScrollView, for example: KEYCODE_TAB.
522
- */
523
- @Override
524
- public void requestChildFocus(View child, View focused) {
525
- if (focused != null && mScrollsChildToFocus) {
526
- scrollToChild(focused);
527
- }
528
- requestChildFocusWithoutScroll(child, focused);
529
- }
530
-
531
- /**
532
- * In rare cases where an app overrides the built-in ReactNestedScrollView by overriding it, and also
533
- * needs to customize scroll into view on focus behaviors, this protected method can be used to
534
- * unblocks such customization.
535
- */
536
- protected void requestChildFocusWithoutScroll(View child, View focused) {
537
- super.requestChildFocus(child, focused);
538
- }
539
-
540
- @Override
541
- public boolean requestChildRectangleOnScreen(View child, Rect rectangle, boolean immediate) {
542
- if (!mScrollsChildToFocus) {
543
- return false;
544
- }
545
- return super.requestChildRectangleOnScreen(child, rectangle, immediate);
546
- }
547
-
548
- private int getScrollDelta(View descendent) {
549
- descendent.getDrawingRect(mTempRect);
550
- offsetDescendantRectToMyCoords(descendent, mTempRect);
551
- return computeScrollDeltaToGetChildRectOnScreen(mTempRect);
552
- }
553
-
554
- /** Returns whether the given descendent is partially scrolled in view */
555
- @Override
556
- public boolean isPartiallyScrolledInView(View descendent) {
557
- int scrollDelta = getScrollDelta(descendent);
558
- descendent.getDrawingRect(mTempRect);
559
- return scrollDelta != 0 && Math.abs(scrollDelta) < mTempRect.width();
560
- }
561
-
562
- private void scrollToChild(View child) {
563
- // Only scroll the nearest ReactNestedScrollView ancestor into view, rather than the focused child.
564
- // Nested NestedScrollView instances will handle scrolling the child into their respective viewports.
565
- View parent = child;
566
- View scrollViewAncestor = null;
567
- while (parent != null && parent != this) {
568
- if (parent instanceof ReactNestedScrollView) {
569
- scrollViewAncestor = parent;
570
- }
571
- parent = (View) parent.getParent();
572
- }
573
-
574
- View scrollIntoViewTarget = scrollViewAncestor != null ? scrollViewAncestor : child;
575
-
576
- Rect tempRect = new Rect();
577
- scrollIntoViewTarget.getDrawingRect(tempRect);
578
-
579
- /* Offset from child's local coordinates to NestedScrollView coordinates */
580
- offsetDescendantRectToMyCoords(scrollIntoViewTarget, tempRect);
581
-
582
- int scrollDelta = computeScrollDeltaToGetChildRectOnScreen(tempRect);
583
-
584
- if (scrollDelta != 0) {
585
- scrollBy(0, scrollDelta);
586
- }
587
- }
588
-
589
- @Override
590
- protected void onScrollChanged(int x, int y, int oldX, int oldY) {
591
- Systrace.beginSection(Systrace.TRACE_TAG_REACT, "ReactNestedScrollView.onScrollChanged");
592
- try {
593
- super.onScrollChanged(x, y, oldX, oldY);
594
-
595
- mActivelyScrolling = true;
596
-
597
- if (mOnScrollDispatchHelper.onScrollChanged(x, y)) {
598
- if (mRemoveClippedSubviews) {
599
- updateClippingRect();
600
- }
601
- ReactScrollViewHelper.updateStateOnScrollChanged(
602
- this,
603
- mOnScrollDispatchHelper.getXFlingVelocity(),
604
- mOnScrollDispatchHelper.getYFlingVelocity());
605
- if (mVirtualViewContainerState != null) {
606
- mVirtualViewContainerState.updateState();
607
- }
608
- }
609
- } finally {
610
- Systrace.endSection(Systrace.TRACE_TAG_REACT);
611
- }
612
- }
613
-
614
- @Override
615
- public boolean onInterceptTouchEvent(MotionEvent ev) {
616
- if (!mScrollEnabled) {
617
- return false;
618
- }
619
-
620
- // We intercept the touch event if the children are not supposed to receive it.
621
- if (!PointerEvents.canChildrenBeTouchTarget(mPointerEvents)) {
622
- return true;
623
- }
624
-
625
- try {
626
- if (super.onInterceptTouchEvent(ev)) {
627
- handleInterceptedTouchEvent(ev);
628
- return true;
629
- }
630
- } catch (IllegalArgumentException e) {
631
- // Log and ignore the error. This seems to be a bug in the android SDK and
632
- // this is the commonly accepted workaround.
633
- // https://tinyurl.com/mw6qkod (Stack Overflow)
634
- FLog.w(ReactConstants.TAG, "Error intercepting touch event.", e);
635
- }
636
-
637
- return false;
638
- }
639
-
640
- protected void handleInterceptedTouchEvent(MotionEvent ev) {
641
- if (!ReactNativeFeatureFlags.shouldTriggerResponderTransferOnScrollAndroid()) {
642
- NativeGestureUtil.notifyNativeGestureStarted(this, ev);
643
- }
644
- ReactScrollViewHelper.emitScrollBeginDragEvent(this);
645
- mDragging = true;
646
- mEmittedOverScrollSinceScrollBegin = false;
647
- enableFpsListener();
648
- getFlingAnimator().cancel();
649
- }
650
-
651
- @Override
652
- public boolean onTouchEvent(MotionEvent ev) {
653
- if (!mScrollEnabled) {
654
- return false;
655
- }
656
-
657
- // We do not accept the touch event if this view is not supposed to receive it.
658
- if (!PointerEvents.canBeTouchTarget(mPointerEvents)) {
659
- return false;
660
- }
661
-
662
- mVelocityHelper.calculateVelocity(ev);
663
- int action = ev.getActionMasked();
664
- if (action == MotionEvent.ACTION_UP && mDragging) {
665
- ReactScrollViewHelper.updateFabricScrollState(this);
666
-
667
- float velocityX = mVelocityHelper.getXVelocity();
668
- float velocityY = mVelocityHelper.getYVelocity();
669
- ReactScrollViewHelper.emitScrollEndDragEvent(this, velocityX, velocityY);
670
- if (!ReactNativeFeatureFlags.shouldTriggerResponderTransferOnScrollAndroid()) {
671
- NativeGestureUtil.notifyNativeGestureEnded(this, ev);
672
- }
673
- mDragging = false;
674
- // After the touch finishes, we may need to do some scrolling afterwards either as a result
675
- // of a fling or because we need to page align the content
676
- handlePostTouchScrolling(Math.round(velocityX), Math.round(velocityY));
677
- }
678
-
679
- if (action == MotionEvent.ACTION_DOWN) {
680
- cancelPostTouchScrolling();
681
- }
682
-
683
- return super.onTouchEvent(ev);
684
- }
685
-
686
- @Override
687
- public boolean dispatchGenericMotionEvent(MotionEvent ev) {
688
- // Ignore generic motion events (joystick, mouse wheel, trackpad) if scrolling is disabled
689
- if (!mScrollEnabled) {
690
- return false;
691
- }
692
-
693
- // We do not dispatch the motion event if its children are not supposed to receive it
694
- if (!PointerEvents.canChildrenBeTouchTarget(mPointerEvents)) {
695
- return false;
696
- }
697
-
698
- // Handle ACTION_SCROLL events (mouse wheel, trackpad, joystick)
699
- if (ev.getActionMasked() == MotionEvent.ACTION_SCROLL) {
700
- float vScroll = ev.getAxisValue(MotionEvent.AXIS_VSCROLL);
701
- if (vScroll != 0) {
702
- // Perform the scroll
703
- enableFpsListener();
704
- boolean result = super.dispatchGenericMotionEvent(ev);
705
- // Schedule snap alignment to run after scrolling stops
706
- if (result
707
- && (mPagingEnabled
708
- || mSnapInterval != 0
709
- || mSnapOffsets != null
710
- || mSnapToAlignment != SNAP_ALIGNMENT_DISABLED)) {
711
- // Cancel any pending post-touch runnable and reschedule
712
- if (mPostTouchRunnable != null) {
713
- removeCallbacks(mPostTouchRunnable);
714
- mPostTouchRunnable = null;
715
- }
716
- mPostTouchRunnable =
717
- new Runnable() {
718
- @Override
719
- public void run() {
720
- mPostTouchRunnable = null;
721
- // +1/-1 velocity if scrolling down or up. This is to ensure that the
722
- // next/previous page is picked rather than sliding backwards to the current page
723
- int velocityY = (int) -Math.signum(vScroll);
724
- if (mDisableIntervalMomentum) {
725
- velocityY = 0;
726
- }
727
- flingAndSnap(velocityY);
728
- handlePostTouchScrolling(0, velocityY);
729
- }
730
- };
731
- postOnAnimationDelayed(mPostTouchRunnable, ReactScrollViewHelper.MOMENTUM_DELAY);
732
- } else {
733
- handlePostTouchScrolling(0, 0);
734
- }
735
- return result;
736
- }
737
- }
738
-
739
- return super.dispatchGenericMotionEvent(ev);
740
- }
741
-
742
- @Override
743
- public boolean executeKeyEvent(KeyEvent event) {
744
- int eventKeyCode = event.getKeyCode();
745
- if (!mScrollEnabled
746
- && (eventKeyCode == KeyEvent.KEYCODE_DPAD_UP
747
- || eventKeyCode == KeyEvent.KEYCODE_DPAD_DOWN)) {
748
- return false;
749
- }
750
- return super.executeKeyEvent(event);
751
- }
752
-
753
- @Override
754
- public void setRemoveClippedSubviews(boolean removeClippedSubviews) {
755
- if (ReactNativeFeatureFlags.disableSubviewClippingAndroid()) {
756
- return;
757
- }
758
-
759
- if (removeClippedSubviews && mClippingRect == null) {
760
- mClippingRect = new Rect();
761
- }
762
- mRemoveClippedSubviews = removeClippedSubviews;
763
- updateClippingRect();
764
- }
765
-
766
- @Override
767
- public boolean getRemoveClippedSubviews() {
768
- return mRemoveClippedSubviews;
769
- }
770
-
771
- @Override
772
- public void updateClippingRect() {
773
- updateClippingRect(null);
774
- }
775
-
776
- @Override
777
- public void updateClippingRect(@Nullable Set<Integer> excludedViewsSet) {
778
- if (!mRemoveClippedSubviews) {
779
- return;
780
- }
781
-
782
- Systrace.beginSection(Systrace.TRACE_TAG_REACT, "ReactNestedScrollView.updateClippingRect");
783
- try {
784
- Assertions.assertNotNull(mClippingRect);
785
-
786
- ReactClippingViewGroupHelper.calculateClippingRect(this, mClippingRect);
787
- View contentView = getContentView();
788
- if (contentView instanceof ReactClippingViewGroup) {
789
- ((ReactClippingViewGroup) contentView).updateClippingRect(excludedViewsSet);
790
- }
791
- } finally {
792
- Systrace.endSection(Systrace.TRACE_TAG_REACT);
793
- }
794
- }
795
-
796
- @Override
797
- public void getClippingRect(Rect outClippingRect) {
798
- outClippingRect.set(Assertions.assertNotNull(mClippingRect));
799
- }
800
-
801
- @Override
802
- public boolean getChildVisibleRect(View child, Rect r, android.graphics.Point offset) {
803
- return super.getChildVisibleRect(child, r, offset);
804
- }
805
-
806
- @Override
807
- public void fling(int velocityY) {
808
- final int correctedVelocityY = correctFlingVelocityY(velocityY);
809
-
810
- if (mPagingEnabled) {
811
- flingAndSnap(correctedVelocityY);
812
- } else if (mScroller != null) {
813
- // We provide our own version of fling that uses a different call to the standard OverScroller
814
- // which takes into account the possibility of adding new content while the NestedScrollView is
815
- // animating. Because we give essentially no max Y for the fling, the fling will continue as
816
- // long
817
- // as there is content. See #onOverScrolled() to see the second part of this change which
818
- // properly
819
- // aborts the scroller animation when we get to the bottom of the NestedScrollView content.
820
-
821
- int scrollWindowHeight = getHeight() - getPaddingBottom() - getPaddingTop();
822
-
823
- mScroller.fling(
824
- getScrollX(), // startX
825
- getScrollY(), // startY
826
- 0, // velocityX
827
- correctedVelocityY, // velocityY
828
- 0, // minX
829
- 0, // maxX
830
- 0, // minY
831
- Integer.MAX_VALUE, // maxY
832
- 0, // overX
833
- scrollWindowHeight / 2 // overY
834
- );
835
-
836
- ViewCompat.postInvalidateOnAnimation(this);
837
- } else {
838
- super.fling(correctedVelocityY);
839
- }
840
- handlePostTouchScrolling(0, correctedVelocityY);
841
- }
842
-
843
- private int correctFlingVelocityY(int velocityY) {
844
- if (Build.VERSION.SDK_INT != Build.VERSION_CODES.P) {
845
- return velocityY;
846
- }
847
-
848
- // Workaround.
849
- // On Android P if a NestedScrollView is inverted, we will get a wrong sign for
850
- // velocityY (see https://issuetracker.google.com/issues/112385925).
851
- // At the same time, mOnScrollDispatchHelper tracks the correct velocity direction.
852
- //
853
- // Hence, we can use the absolute value from whatever the OS gives
854
- // us and use the sign of what mOnScrollDispatchHelper has tracked.
855
- float signum = Math.signum(mOnScrollDispatchHelper.getYFlingVelocity());
856
- if (signum == 0) {
857
- signum = Math.signum(velocityY);
858
- }
859
- return (int) (Math.abs(velocityY) * signum);
860
- }
861
-
862
- private void enableFpsListener() {
863
- if (isScrollPerfLoggingEnabled()) {
864
- Assertions.assertNotNull(mFpsListener);
865
- Assertions.assertNotNull(mScrollPerfTag);
866
- mFpsListener.enable(mScrollPerfTag);
867
- }
868
- }
869
-
870
- private void disableFpsListener() {
871
- if (isScrollPerfLoggingEnabled()) {
872
- Assertions.assertNotNull(mFpsListener);
873
- Assertions.assertNotNull(mScrollPerfTag);
874
- mFpsListener.disable(mScrollPerfTag);
875
- }
876
- }
877
-
878
- private boolean isScrollPerfLoggingEnabled() {
879
- return mFpsListener != null && mScrollPerfTag != null && !mScrollPerfTag.isEmpty();
880
- }
881
-
882
- private int getMaxScrollY() {
883
- int contentHeight = mContentView == null ? 0 : mContentView.getHeight();
884
- int viewportHeight = getHeight() - getPaddingBottom() - getPaddingTop();
885
- return Math.max(0, contentHeight - viewportHeight);
886
- }
887
-
888
- @Nullable
889
- @Override
890
- public StateWrapper getStateWrapper() {
891
- return mStateWrapper;
892
- }
893
-
894
- public void setStateWrapper(StateWrapper stateWrapper) {
895
- mStateWrapper = stateWrapper;
896
- }
897
-
898
- @Override
899
- public void draw(Canvas canvas) {
900
- if (mEndFillColor != Color.TRANSPARENT) {
901
- final View contentView = getContentView();
902
- if (mEndBackground != null && contentView != null && contentView.getBottom() < getHeight()) {
903
- mEndBackground.setBounds(0, contentView.getBottom(), getWidth(), getHeight());
904
- mEndBackground.draw(canvas);
905
- }
906
- }
907
-
908
- super.draw(canvas);
909
- }
910
-
911
- @Override
912
- public void onDraw(Canvas canvas) {
913
- if (mOverflow != Overflow.VISIBLE) {
914
- BackgroundStyleApplicator.clipToPaddingBox(this, canvas);
915
- }
916
- super.onDraw(canvas);
917
- }
918
-
919
- /**
920
- * This handles any sort of scrolling that may occur after a touch is finished. This may be
921
- * momentum scrolling (fling) or because you have pagingEnabled on the scroll view. Because we
922
- * don't get any events from Android about this lifecycle, we do all our detection by creating a
923
- * runnable that checks if we scrolled in the last frame and if so assumes we are still scrolling.
924
- */
925
- private void handlePostTouchScrolling(int velocityX, int velocityY) {
926
- // Check if we are already handling this which may occur if this is called by both the touch up
927
- // and a fling call
928
- if (mPostTouchRunnable != null) {
929
- return;
930
- }
931
-
932
- if (mSendMomentumEvents) {
933
- enableFpsListener();
934
- ReactScrollViewHelper.emitScrollMomentumBeginEvent(this, velocityX, velocityY);
935
- }
936
-
937
- mActivelyScrolling = false;
938
- mPostTouchRunnable =
939
- new Runnable() {
940
-
941
- private boolean mSnappingToPage = false;
942
- private int mStableFrames = 0;
943
-
944
- @Override
945
- public void run() {
946
- if (mActivelyScrolling) {
947
- // We are still scrolling.
948
- mActivelyScrolling = false;
949
- mStableFrames = 0;
950
- ReactNestedScrollView.this.postOnAnimationDelayed(
951
- this, ReactScrollViewHelper.MOMENTUM_DELAY);
952
- } else {
953
- // There has not been a scroll update since the last time this Runnable executed.
954
- ReactScrollViewHelper.updateFabricScrollState(ReactNestedScrollView.this);
955
-
956
- // We keep checking for updates until the NestedScrollView has "stabilized" and hasn't
957
- // scrolled for N consecutive frames. This number is arbitrary: big enough to catch
958
- // a number of race conditions, but small enough to not cause perf regressions, etc.
959
- // In anecdotal testing, it seemed like a decent number.
960
- // Without this check, sometimes this Runnable stops executing too soon - it will
961
- // fire before the first scroll event of an animated scroll/fling, and stop
962
- // immediately.
963
- mStableFrames++;
964
-
965
- if (mStableFrames >= 3) {
966
- mPostTouchRunnable = null;
967
- if (mSendMomentumEvents) {
968
- ReactScrollViewHelper.emitScrollMomentumEndEvent(ReactNestedScrollView.this);
969
- }
970
- ReactScrollViewHelper.notifyUserDrivenScrollEnded_internal(ReactNestedScrollView.this);
971
- disableFpsListener();
972
- } else {
973
- if (mPagingEnabled && !mSnappingToPage) {
974
- // If we have pagingEnabled and we have not snapped to the page
975
- // we need to cause that scroll by asking for it
976
- mSnappingToPage = true;
977
- flingAndSnap(0);
978
- }
979
- // The scrollview has not "stabilized" so we just post to check again a frame later
980
- ReactNestedScrollView.this.postOnAnimationDelayed(
981
- this, ReactScrollViewHelper.MOMENTUM_DELAY);
982
- }
983
- }
984
- }
985
- };
986
- postOnAnimationDelayed(mPostTouchRunnable, ReactScrollViewHelper.MOMENTUM_DELAY);
987
- }
988
-
989
- private void cancelPostTouchScrolling() {
990
- if (mPostTouchRunnable != null) {
991
- removeCallbacks(mPostTouchRunnable);
992
- mPostTouchRunnable = null;
993
- getFlingAnimator().cancel();
994
- }
995
- }
996
-
997
- private int predictFinalScrollPosition(int velocityY) {
998
- // predict where a fling would end up so we can scroll to the nearest snap offset
999
- // TODO(T106335409): Existing prediction still uses overscroller. Consider change this to use
1000
- // fling animator instead.
1001
- return getFlingAnimator() == DEFAULT_FLING_ANIMATOR
1002
- ? ReactScrollViewHelper.predictFinalScrollPosition(this, 0, velocityY, 0, getMaxScrollY()).y
1003
- : ReactScrollViewHelper.getNextFlingStartValue(
1004
- this,
1005
- getScrollY(),
1006
- getReactScrollViewScrollState().getFinalAnimatedPositionScroll().y,
1007
- velocityY)
1008
- + getFlingExtrapolatedDistance(velocityY);
1009
- }
1010
-
1011
- private View getContentView() {
1012
- return getChildAt(0);
1013
- }
1014
-
1015
- /**
1016
- * This will smooth scroll us to the nearest snap offset point It currently just looks at where
1017
- * the content is and slides to the nearest point. It is intended to be run after we are done
1018
- * scrolling, and handling any momentum scrolling.
1019
- */
1020
- private void smoothScrollAndSnap(int velocity) {
1021
- double interval = (double) getSnapInterval();
1022
- double currentOffset =
1023
- (double)
1024
- (ReactScrollViewHelper.getNextFlingStartValue(
1025
- this,
1026
- getScrollY(),
1027
- getReactScrollViewScrollState().getFinalAnimatedPositionScroll().y,
1028
- velocity));
1029
- double targetOffset = (double) predictFinalScrollPosition(velocity);
1030
-
1031
- int previousPage = (int) Math.floor(currentOffset / interval);
1032
- int nextPage = (int) Math.ceil(currentOffset / interval);
1033
- int currentPage = (int) Math.round(currentOffset / interval);
1034
- int targetPage = (int) Math.round(targetOffset / interval);
1035
-
1036
- if (velocity > 0 && nextPage == previousPage) {
1037
- nextPage++;
1038
- } else if (velocity < 0 && previousPage == nextPage) {
1039
- previousPage--;
1040
- }
1041
-
1042
- if (
1043
- // if scrolling towards next page
1044
- velocity > 0
1045
- &&
1046
- // and the middle of the page hasn't been crossed already
1047
- currentPage < nextPage
1048
- &&
1049
- // and it would have been crossed after flinging
1050
- targetPage > previousPage) {
1051
- currentPage = nextPage;
1052
- } else if (
1053
- // if scrolling towards previous page
1054
- velocity < 0
1055
- &&
1056
- // and the middle of the page hasn't been crossed already
1057
- currentPage > previousPage
1058
- &&
1059
- // and it would have been crossed after flinging
1060
- targetPage < nextPage) {
1061
- currentPage = previousPage;
1062
- }
1063
-
1064
- targetOffset = currentPage * interval;
1065
- if (targetOffset != currentOffset) {
1066
- mActivelyScrolling = true;
1067
- reactSmoothScrollTo(getScrollX(), (int) targetOffset);
1068
- }
1069
- }
1070
-
1071
- private void flingAndSnap(int velocityY) {
1072
- if (getChildCount() <= 0) {
1073
- return;
1074
- }
1075
-
1076
- // pagingEnabled only allows snapping one interval at a time
1077
- if (mSnapInterval == 0 && mSnapOffsets == null && mSnapToAlignment == SNAP_ALIGNMENT_DISABLED) {
1078
- smoothScrollAndSnap(velocityY);
1079
- return;
1080
- }
1081
-
1082
- boolean hasCustomizedFlingAnimator = getFlingAnimator() != DEFAULT_FLING_ANIMATOR;
1083
- int maximumOffset = getMaxScrollY();
1084
- int targetOffset = predictFinalScrollPosition(velocityY);
1085
- if (mDisableIntervalMomentum) {
1086
- targetOffset = getScrollY();
1087
- }
1088
-
1089
- int smallerOffset = 0;
1090
- int largerOffset = maximumOffset;
1091
- int firstOffset = 0;
1092
- int lastOffset = maximumOffset;
1093
- int height = getHeight() - getPaddingBottom() - getPaddingTop();
1094
-
1095
- // get the nearest snap points to the target offset
1096
- if (mSnapOffsets != null) {
1097
- firstOffset = mSnapOffsets.get(0);
1098
- lastOffset = mSnapOffsets.get(mSnapOffsets.size() - 1);
1099
-
1100
- for (int i = 0; i < mSnapOffsets.size(); i++) {
1101
- int offset = mSnapOffsets.get(i);
1102
-
1103
- if (offset <= targetOffset) {
1104
- if (targetOffset - offset < targetOffset - smallerOffset) {
1105
- smallerOffset = offset;
1106
- }
1107
- }
1108
-
1109
- if (offset >= targetOffset) {
1110
- if (offset - targetOffset < largerOffset - targetOffset) {
1111
- largerOffset = offset;
1112
- }
1113
- }
1114
- }
1115
-
1116
- } else if (mSnapToAlignment != SNAP_ALIGNMENT_DISABLED) {
1117
- if (mSnapInterval > 0) {
1118
- double ratio = (double) targetOffset / mSnapInterval;
1119
- smallerOffset =
1120
- Math.max(
1121
- getItemStartOffset(
1122
- mSnapToAlignment,
1123
- (int) (Math.floor(ratio) * mSnapInterval),
1124
- mSnapInterval,
1125
- height),
1126
- 0);
1127
- largerOffset =
1128
- Math.min(
1129
- getItemStartOffset(
1130
- mSnapToAlignment,
1131
- (int) (Math.ceil(ratio) * mSnapInterval),
1132
- mSnapInterval,
1133
- height),
1134
- maximumOffset);
1135
- } else {
1136
- ViewGroup contentView = (ViewGroup) getContentView();
1137
- int smallerChildOffset = largerOffset;
1138
- int largerChildOffset = smallerOffset;
1139
- for (int i = 0; i < contentView.getChildCount(); i++) {
1140
- View item = contentView.getChildAt(i);
1141
- int itemStartOffset;
1142
- switch (mSnapToAlignment) {
1143
- case SNAP_ALIGNMENT_CENTER:
1144
- itemStartOffset = item.getTop() - (height - item.getHeight()) / 2;
1145
- break;
1146
- case SNAP_ALIGNMENT_START:
1147
- itemStartOffset = item.getTop();
1148
- break;
1149
- case SNAP_ALIGNMENT_END:
1150
- itemStartOffset = item.getTop() - (height - item.getHeight());
1151
- break;
1152
- default:
1153
- throw new IllegalStateException("Invalid SnapToAlignment value: " + mSnapToAlignment);
1154
- }
1155
- if (itemStartOffset <= targetOffset) {
1156
- if (targetOffset - itemStartOffset < targetOffset - smallerOffset) {
1157
- smallerOffset = itemStartOffset;
1158
- }
1159
- }
1160
-
1161
- if (itemStartOffset >= targetOffset) {
1162
- if (itemStartOffset - targetOffset < largerOffset - targetOffset) {
1163
- largerOffset = itemStartOffset;
1164
- }
1165
- }
1166
-
1167
- smallerChildOffset = Math.min(smallerChildOffset, itemStartOffset);
1168
- largerChildOffset = Math.max(largerChildOffset, itemStartOffset);
1169
- }
1170
-
1171
- // For Recycler ViewGroup, the maximumOffset can be much larger than the total heights of
1172
- // items in the layout. In this case snapping is not possible beyond the currently rendered
1173
- // children.
1174
- smallerOffset = Math.max(smallerOffset, smallerChildOffset);
1175
- largerOffset = Math.min(largerOffset, largerChildOffset);
1176
- }
1177
- } else {
1178
- double interval = (double) getSnapInterval();
1179
- double ratio = (double) targetOffset / interval;
1180
- smallerOffset = (int) (Math.floor(ratio) * interval);
1181
- largerOffset = Math.min((int) (Math.ceil(ratio) * interval), maximumOffset);
1182
- }
1183
-
1184
- // Calculate the nearest offset
1185
- int nearestOffset =
1186
- Math.abs(targetOffset - smallerOffset) < Math.abs(largerOffset - targetOffset)
1187
- ? smallerOffset
1188
- : largerOffset;
1189
-
1190
- // if scrolling after the last snap offset and snapping to the
1191
- // end of the list is disabled, then we allow free scrolling
1192
- if (!mSnapToEnd && targetOffset >= lastOffset) {
1193
- if (getScrollY() >= lastOffset) {
1194
- // free scrolling
1195
- } else {
1196
- // snap to end
1197
- targetOffset = lastOffset;
1198
- }
1199
- } else if (!mSnapToStart && targetOffset <= firstOffset) {
1200
- if (getScrollY() <= firstOffset) {
1201
- // free scrolling
1202
- } else {
1203
- // snap to beginning
1204
- targetOffset = firstOffset;
1205
- }
1206
- } else if (velocityY > 0) {
1207
- if (!hasCustomizedFlingAnimator) {
1208
- // The default animator requires boost on initial velocity as when snapping velocity can
1209
- // feel sluggish for slow swipes
1210
- velocityY += (int) ((largerOffset - targetOffset) * 10.0);
1211
- }
1212
-
1213
- targetOffset = largerOffset;
1214
- } else if (velocityY < 0) {
1215
- if (!hasCustomizedFlingAnimator) {
1216
- // The default animator requires boost on initial velocity as when snapping velocity can
1217
- // feel sluggish for slow swipes
1218
- velocityY -= (int) ((targetOffset - smallerOffset) * 10.0);
1219
- }
1220
-
1221
- targetOffset = smallerOffset;
1222
- } else {
1223
- targetOffset = nearestOffset;
1224
- }
1225
-
1226
- // Make sure the new offset isn't out of bounds
1227
- targetOffset = Math.min(Math.max(0, targetOffset), maximumOffset);
1228
-
1229
- if (hasCustomizedFlingAnimator || mScroller == null) {
1230
- reactSmoothScrollTo(getScrollX(), targetOffset);
1231
- } else {
1232
- // smoothScrollTo will always scroll over 250ms which is often *waaay*
1233
- // too short and will cause the scrolling to feel almost instant
1234
- // try to manually interact with OverScroller instead
1235
- // if velocity is 0 however, fling() won't work, so we want to use smoothScrollTo
1236
- mActivelyScrolling = true;
1237
-
1238
- mScroller.fling(
1239
- getScrollX(), // startX
1240
- getScrollY(), // startY
1241
- // velocity = 0 doesn't work with fling() so we pretend there's a reasonable
1242
- // initial velocity going on when a touch is released without any movement
1243
- 0, // velocityX
1244
- velocityY != 0 ? velocityY : targetOffset - getScrollY(), // velocityY
1245
- 0, // minX
1246
- 0, // maxX
1247
- // setting both minY and maxY to the same value will guarantee that we scroll to it
1248
- // but using the standard fling-style easing rather than smoothScrollTo's 250ms animation
1249
- targetOffset, // minY
1250
- targetOffset, // maxY
1251
- 0, // overX
1252
- // we only want to allow overscrolling if the final offset is at the very edge of the view
1253
- (targetOffset == 0 || targetOffset == maximumOffset) ? height / 2 : 0 // overY
1254
- );
1255
-
1256
- postInvalidateOnAnimation();
1257
- }
1258
- }
1259
-
1260
- private int getItemStartOffset(
1261
- int snapToAlignment, int itemStartPosition, int itemHeight, int viewPortHeight) {
1262
- int itemStartOffset;
1263
- switch (snapToAlignment) {
1264
- case SNAP_ALIGNMENT_CENTER:
1265
- itemStartOffset = itemStartPosition - (viewPortHeight - itemHeight) / 2;
1266
- break;
1267
- case SNAP_ALIGNMENT_START:
1268
- itemStartOffset = itemStartPosition;
1269
- break;
1270
- case SNAP_ALIGNMENT_END:
1271
- itemStartOffset = itemStartPosition - (viewPortHeight - itemHeight);
1272
- break;
1273
- default:
1274
- throw new IllegalStateException("Invalid SnapToAlignment value: " + mSnapToAlignment);
1275
- }
1276
- return itemStartOffset;
1277
- }
1278
-
1279
- private int getSnapInterval() {
1280
- if (mSnapInterval != 0) {
1281
- return mSnapInterval;
1282
- }
1283
- return getHeight();
1284
- }
1285
-
1286
- public void setEndFillColor(int color) {
1287
- if (color != mEndFillColor) {
1288
- mEndFillColor = color;
1289
- mEndBackground = new ColorDrawable(mEndFillColor);
1290
- }
1291
- }
1292
-
1293
- @Override
1294
- protected void onOverScrolled(int scrollX, int scrollY, boolean clampedX, boolean clampedY) {
1295
- if (mScroller != null && mContentView != null) {
1296
- // This is part two of the reimplementation of fling to fix the bounce-back bug. See #fling()
1297
- // for more information.
1298
-
1299
- if (!mScroller.isFinished() && mScroller.getCurrY() != mScroller.getFinalY()) {
1300
- int scrollRange = getMaxScrollY();
1301
- if (scrollY >= scrollRange) {
1302
- mScroller.abortAnimation();
1303
- scrollY = scrollRange;
1304
- }
1305
- }
1306
- }
1307
-
1308
- if (ReactNativeFeatureFlags.shouldTriggerResponderTransferOnScrollAndroid()
1309
- && clampedY
1310
- && mEmittedOverScrollSinceScrollBegin == false) {
1311
- ReactScrollViewHelper.emitScrollEvent(this, 0f, 0f);
1312
- mEmittedOverScrollSinceScrollBegin = true;
1313
- }
1314
-
1315
- super.onOverScrolled(scrollX, scrollY, clampedX, clampedY);
1316
- }
1317
-
1318
- @Override
1319
- public void onChildViewAdded(View parent, View child) {
1320
- mContentView = child;
1321
- mContentView.addOnLayoutChangeListener(this);
1322
- }
1323
-
1324
- @Override
1325
- public void onChildViewRemoved(View parent, View child) {
1326
- if (mContentView != null) {
1327
- mContentView.removeOnLayoutChangeListener(this);
1328
- mContentView = null;
1329
- }
1330
- }
1331
-
1332
- public void setContentOffset(@Nullable ReadableMap value) {
1333
- // When contentOffset={{x:0,y:0}} with lazy load items, setContentOffset
1334
- // is repeatedly called, causing an unexpected scroll to top behavior.
1335
- // Avoid updating contentOffset if the value has not changed.
1336
- if (mCurrentContentOffset == null || !mCurrentContentOffset.equals(value)) {
1337
- mCurrentContentOffset = value;
1338
-
1339
- if (value != null) {
1340
- double x = value.hasKey("x") ? value.getDouble("x") : 0;
1341
- double y = value.hasKey("y") ? value.getDouble("y") : 0;
1342
- scrollTo((int) PixelUtil.toPixelFromDIP(x), (int) PixelUtil.toPixelFromDIP(y));
1343
- } else {
1344
- scrollTo(0, 0);
1345
- }
1346
- }
1347
- }
1348
-
1349
- /**
1350
- * Calls `smoothScrollTo` and updates state.
1351
- *
1352
- * <p>`smoothScrollTo` changes `contentOffset` and we need to keep `contentOffset` in sync between
1353
- * scroll view and state. Calling raw `smoothScrollTo` doesn't update state.
1354
- */
1355
- @Override
1356
- public void reactSmoothScrollTo(int x, int y) {
1357
- ReactScrollViewHelper.smoothScrollTo(this, x, y);
1358
- setPendingContentOffsets(x, y);
1359
- }
1360
-
1361
- /**
1362
- * Calls `super.scrollTo` and updates state.
1363
- *
1364
- * <p>`super.scrollTo` changes `contentOffset` and we need to keep `contentOffset` in sync between
1365
- * scroll view and state.
1366
- *
1367
- * <p>Note that while we can override scrollTo, we *cannot* override `smoothScrollTo` because it
1368
- * is final. See `reactSmoothScrollTo`.
1369
- */
1370
- @Override
1371
- public void scrollTo(int x, int y) {
1372
- super.scrollTo(x, y);
1373
- ReactScrollViewHelper.updateFabricScrollState(this);
1374
- setPendingContentOffsets(x, y);
1375
- }
1376
-
1377
- /**
1378
- * If we are in the middle of a fling animation from the user removing their finger (OverScroller
1379
- * is in `FLING_MODE`), recreate the existing fling animation since it was calculated against
1380
- * outdated scroll offsets.
1381
- */
1382
- private void recreateFlingAnimation(int scrollY) {
1383
- // If we have any pending custom flings (e.g. from animated `scrollTo`, or flinging to a snap
1384
- // point), cancel them.
1385
- // TODO: Can we be more graceful (like OverScroller flings)?
1386
- if (getFlingAnimator().isRunning()) {
1387
- getFlingAnimator().cancel();
1388
- }
1389
-
1390
- if (mScroller != null && !mScroller.isFinished()) {
1391
- // Calculate the velocity and position of the fling animation at the time of this layout
1392
- // event, which may be later than the last NestedScrollView tick. These values are not committed to
1393
- // the underlying NestedScrollView, which will recalculate positions on its next tick.
1394
- int scrollerYBeforeTick = mScroller.getCurrY();
1395
- boolean hasMoreTicks = mScroller.computeScrollOffset();
1396
-
1397
- // Stop the existing animation at the current state of the scroller. We will then recreate
1398
- // it starting at the adjusted y offset.
1399
- mScroller.forceFinished(true);
1400
-
1401
- if (hasMoreTicks) {
1402
- // OverScroller.getCurrVelocity() returns an absolute value of the velocity a current fling
1403
- // animation (only FLING_MODE animations). We derive direction along the Y axis from the
1404
- // start and end of the, animation assuming NestedScrollView never fires horizontal fling
1405
- // animations.
1406
- // TODO: This does not fully handle overscroll.
1407
- float direction = Math.signum(mScroller.getFinalY() - mScroller.getStartY());
1408
- float flingVelocityY = mScroller.getCurrVelocity() * direction;
1409
-
1410
- mScroller.fling(getScrollX(), scrollY, 0, (int) flingVelocityY, 0, 0, 0, Integer.MAX_VALUE);
1411
- } else {
1412
- scrollTo(getScrollX(), scrollY + (mScroller.getCurrY() - scrollerYBeforeTick));
1413
- }
1414
- }
1415
- }
1416
-
1417
- /** Scrolls to a new position preserving any momentum scrolling animation. */
1418
- @Override
1419
- public void scrollToPreservingMomentum(int x, int y) {
1420
- scrollTo(x, y);
1421
- recreateFlingAnimation(y);
1422
- }
1423
-
1424
- private boolean isContentReady() {
1425
- View child = getContentView();
1426
- return child != null && child.getWidth() != 0 && child.getHeight() != 0;
1427
- }
1428
-
1429
- /**
1430
- * If contentOffset is set before the View has been laid out, store the values and set them when
1431
- * `onLayout` is called.
1432
- *
1433
- * @param x
1434
- * @param y
1435
- */
1436
- private void setPendingContentOffsets(int x, int y) {
1437
- if (isContentReady()) {
1438
- mPendingContentOffsetX = UNSET_CONTENT_OFFSET;
1439
- mPendingContentOffsetY = UNSET_CONTENT_OFFSET;
1440
- } else {
1441
- mPendingContentOffsetX = x;
1442
- mPendingContentOffsetY = y;
1443
- }
1444
- }
1445
-
1446
- /**
1447
- * Called when a mContentView's layout has changed. Fixes the scroll position if it's too large
1448
- * after the content resizes. Without this, the user would see a blank NestedScrollView when the scroll
1449
- * position is larger than the NestedScrollView's max scroll position after the content shrinks.
1450
- */
1451
- @Override
1452
- public void onLayoutChange(
1453
- View v,
1454
- int left,
1455
- int top,
1456
- int right,
1457
- int bottom,
1458
- int oldLeft,
1459
- int oldTop,
1460
- int oldRight,
1461
- int oldBottom) {
1462
- if (mContentView == null) {
1463
- return;
1464
- }
1465
-
1466
- if (isShown() && isContentReady()) {
1467
- int currentScrollY = getScrollY();
1468
- int maxScrollY = getMaxScrollY();
1469
- if (currentScrollY > maxScrollY) {
1470
- scrollTo(getScrollX(), maxScrollY);
1471
- }
1472
- }
1473
-
1474
- ReactScrollViewHelper.emitLayoutChangeEvent(this);
1475
- }
1476
-
1477
- @Override
1478
- public void setBackgroundColor(int color) {
1479
- BackgroundStyleApplicator.setBackgroundColor(this, color);
1480
- }
1481
-
1482
- public void setBorderWidth(int position, float width) {
1483
- BackgroundStyleApplicator.setBorderWidth(
1484
- this, LogicalEdge.values()[position], PixelUtil.toDIPFromPixel(width));
1485
- }
1486
-
1487
- public void setBorderColor(int position, @Nullable Integer color) {
1488
- BackgroundStyleApplicator.setBorderColor(this, LogicalEdge.values()[position], color);
1489
- }
1490
-
1491
- public void setBorderRadius(float borderRadius) {
1492
- setBorderRadius(borderRadius, BorderRadiusProp.BORDER_RADIUS.ordinal());
1493
- }
1494
-
1495
- public void setBorderRadius(float borderRadius, int position) {
1496
- @Nullable
1497
- LengthPercentage radius =
1498
- Float.isNaN(borderRadius)
1499
- ? null
1500
- : new LengthPercentage(
1501
- PixelUtil.toDIPFromPixel(borderRadius), LengthPercentageType.POINT);
1502
- BackgroundStyleApplicator.setBorderRadius(this, BorderRadiusProp.values()[position], radius);
1503
- }
1504
-
1505
- public void setBorderStyle(@Nullable String style) {
1506
- BackgroundStyleApplicator.setBorderStyle(
1507
- this, style == null ? null : BorderStyle.fromString(style));
1508
- }
1509
-
1510
- /**
1511
- * ScrollAway: This enables a natively-controlled navbar that optionally obscures the top content
1512
- * of the NestedScrollView. Whether or not the navbar is obscuring the React Native surface is
1513
- * determined outside of React Native.
1514
- *
1515
- * <p>Note: all NestedScrollViews and HorizontalScrollViews in React have exactly one child: the
1516
- * "content" View (see NestedScrollView.js). That View is non-collapsable so it will never be
1517
- * View-flattened away. However, it is possible to pass custom styles into that View.
1518
- *
1519
- * <p>If you are using this feature it is assumed that you have full control over this NestedScrollView
1520
- * and that you are **not** overriding the NestedScrollView content view to pass in a `translateY`
1521
- * style. `translateY` must never be set from ReactJS while using this feature!
1522
- */
1523
- public void setScrollAwayPaddingEnabledUnstable(int topPadding, int bottomPadding) {
1524
- setScrollAwayPaddingEnabledUnstable(topPadding, bottomPadding, true);
1525
- }
1526
-
1527
- public void setScrollAwayPaddingEnabledUnstable(
1528
- int topPadding, int bottomPadding, boolean updateState) {
1529
- int count = getChildCount();
1530
-
1531
- Assertions.assertCondition(
1532
- count <= 1,
1533
- "React Native NestedScrollView should not have more than one child, it should have exactly 1"
1534
- + " child; a content View");
1535
-
1536
- if (count > 0) {
1537
- for (int i = 0; i < count; i++) {
1538
- View childView = getChildAt(i);
1539
- childView.setTranslationY(topPadding);
1540
- }
1541
-
1542
- // Add the topPadding value as the bottom padding for the NestedScrollView.
1543
- // Otherwise, we'll push down the contents of the scroll view down too
1544
- // far off screen.
1545
- setPadding(0, 0, 0, topPadding + bottomPadding);
1546
- }
1547
-
1548
- if (updateState) {
1549
- updateScrollAwayState(topPadding, bottomPadding);
1550
- }
1551
- setRemoveClippedSubviews(mRemoveClippedSubviews);
1552
- }
1553
-
1554
- private void updateScrollAwayState(int scrollAwayPaddingTop, int scrollAwayPaddingBottom) {
1555
- getReactScrollViewScrollState().setScrollAwayPaddingTop(scrollAwayPaddingTop);
1556
- getReactScrollViewScrollState().setScrollAwayPaddingBottom(scrollAwayPaddingBottom);
1557
- ReactScrollViewHelper.forceUpdateState(this);
1558
- }
1559
-
1560
- @Override
1561
- public void setReactScrollViewScrollState(ReactScrollViewScrollState scrollState) {
1562
- mReactScrollViewScrollState = scrollState;
1563
- if (ReactNativeFeatureFlags.enableViewCulling()
1564
- || ReactNativeFeatureFlags.useTraitHiddenOnAndroid()) {
1565
- setScrollAwayPaddingEnabledUnstable(
1566
- scrollState.getScrollAwayPaddingTop(), scrollState.getScrollAwayPaddingBottom(), false);
1567
-
1568
- Point scrollPosition = scrollState.getLastStateUpdateScroll();
1569
- scrollTo(scrollPosition.x, scrollPosition.y);
1570
- }
1571
- }
1572
-
1573
- @Override
1574
- public ReactScrollViewScrollState getReactScrollViewScrollState() {
1575
- return mReactScrollViewScrollState;
1576
- }
1577
-
1578
- @Override
1579
- public void startFlingAnimator(int start, int end) {
1580
- // Always cancel existing animator before starting the new one. `smoothScrollTo` contains some
1581
- // logic that, if called multiple times in a short amount of time, will treat all calls as part
1582
- // of the same animation and will not lengthen the duration of the animation. This means that,
1583
- // for example, if the user is scrolling rapidly, multiple pages could be considered part of one
1584
- // animation, causing some page animations to be animated very rapidly - looking like they're
1585
- // not animated at all.
1586
- DEFAULT_FLING_ANIMATOR.cancel();
1587
-
1588
- // Update the fling animator with new values
1589
- int duration = ReactScrollViewHelper.getDefaultScrollAnimationDuration(getContext());
1590
- DEFAULT_FLING_ANIMATOR.setDuration(duration).setIntValues(start, end);
1591
-
1592
- // Start the animator
1593
- DEFAULT_FLING_ANIMATOR.start();
1594
-
1595
- if (mSendMomentumEvents) {
1596
- int yVelocity = 0;
1597
- if (duration > 0) {
1598
- yVelocity = (end - start) / duration;
1599
- }
1600
- ReactScrollViewHelper.emitScrollMomentumBeginEvent(this, 0, yVelocity);
1601
- ReactScrollViewHelper.dispatchMomentumEndOnAnimationEnd(this);
1602
- }
1603
- }
1604
-
1605
- @NonNull
1606
- @Override
1607
- public ValueAnimator getFlingAnimator() {
1608
- return DEFAULT_FLING_ANIMATOR;
1609
- }
1610
-
1611
- @Override
1612
- public int getFlingExtrapolatedDistance(int velocityY) {
1613
- // The DEFAULT_FLING_ANIMATOR uses AccelerateDecelerateInterpolator, which is not depending on
1614
- // the init velocity. We use the overscroller to decide the fling distance.
1615
- return ReactScrollViewHelper.predictFinalScrollPosition(this, 0, velocityY, 0, getMaxScrollY())
1616
- .y;
1617
- }
1618
-
1619
- public void setPointerEvents(PointerEvents pointerEvents) {
1620
- mPointerEvents = pointerEvents;
1621
- }
1622
-
1623
- public PointerEvents getPointerEvents() {
1624
- return mPointerEvents;
1625
- }
1626
-
1627
- @Override
1628
- public void setScrollEventThrottle(int scrollEventThrottle) {
1629
- mScrollEventThrottle = scrollEventThrottle;
1630
- }
1631
-
1632
- @Override
1633
- public int getScrollEventThrottle() {
1634
- return mScrollEventThrottle;
1635
- }
1636
-
1637
- @Override
1638
- public void setLastScrollDispatchTime(long lastScrollDispatchTime) {
1639
- mLastScrollDispatchTime = lastScrollDispatchTime;
1640
- }
1641
-
1642
- @Override
1643
- public long getLastScrollDispatchTime() {
1644
- return mLastScrollDispatchTime;
1645
- }
1646
- }