react-native-tvos 0.85.2-0 → 0.86.0-0rc2

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 (731) hide show
  1. package/Libraries/Animated/AnimatedImplementation.js +6 -6
  2. package/Libraries/Animated/NativeAnimatedAllowlist.js +21 -0
  3. package/Libraries/Animated/components/AnimatedImage.js +3 -3
  4. package/Libraries/Animated/components/AnimatedText.js +3 -3
  5. package/Libraries/Animated/createAnimatedComponent.js +7 -7
  6. package/Libraries/Animated/nodes/AnimatedAddition.js +1 -1
  7. package/Libraries/Animated/nodes/AnimatedColor.js +7 -7
  8. package/Libraries/Animated/nodes/AnimatedDiffClamp.js +1 -1
  9. package/Libraries/Animated/nodes/AnimatedDivision.js +1 -1
  10. package/Libraries/Animated/nodes/AnimatedInterpolation.js +22 -24
  11. package/Libraries/Animated/nodes/AnimatedModulo.js +1 -1
  12. package/Libraries/Animated/nodes/AnimatedMultiplication.js +1 -1
  13. package/Libraries/Animated/nodes/AnimatedStyle.js +2 -2
  14. package/Libraries/Animated/nodes/AnimatedSubtraction.js +1 -1
  15. package/Libraries/Animated/nodes/AnimatedTracking.js +1 -1
  16. package/Libraries/Animated/nodes/AnimatedValue.js +2 -2
  17. package/Libraries/AppDelegate/RCTDefaultReactNativeFactoryDelegate.mm +4 -0
  18. package/Libraries/AppDelegate/RCTRootViewFactory.h +5 -5
  19. package/Libraries/AppDelegate/RCTRootViewFactory.mm +2 -2
  20. package/Libraries/AppState/AppState.js +1 -1
  21. package/Libraries/BatchedBridge/NativeModules.js +1 -1
  22. package/Libraries/Blob/RCTBlobCollector.h +1 -1
  23. package/Libraries/Blob/RCTBlobCollector.mm +14 -26
  24. package/Libraries/Blob/RCTBlobManager.mm +11 -3
  25. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +29 -23
  26. package/Libraries/Components/Keyboard/Keyboard.js +4 -2
  27. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +1 -1
  28. package/Libraries/Components/LayoutConformance/LayoutConformance.js +1 -27
  29. package/Libraries/Components/Pressable/Pressable.d.ts +1 -0
  30. package/Libraries/Components/Pressable/Pressable.js +2 -2
  31. package/Libraries/Components/Pressable/useAndroidRippleForView.js +7 -8
  32. package/Libraries/Components/ScrollView/ScrollView.js +3 -3
  33. package/Libraries/Components/ScrollView/ScrollViewCommands.js +2 -2
  34. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +2 -2
  35. package/Libraries/Components/Switch/Switch.js +1 -1
  36. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +25 -1
  37. package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +1 -1
  38. package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +2 -2
  39. package/Libraries/Components/TextInput/TextInput.d.ts +24 -0
  40. package/Libraries/Components/TextInput/TextInput.flow.js +24 -0
  41. package/Libraries/Components/TextInput/TextInput.js +5 -5
  42. package/Libraries/Components/ToastAndroid/ToastAndroid.android.js +5 -5
  43. package/Libraries/Components/ToastAndroid/ToastAndroidFallback.js +5 -5
  44. package/Libraries/Components/Touchable/PooledClass.js +4 -4
  45. package/Libraries/Components/Touchable/Touchable.js +1 -1
  46. package/Libraries/Components/Touchable/TouchableNativeFeedback.js +6 -10
  47. package/Libraries/Components/View/ReactNativeStyleAttributes.js +10 -2
  48. package/Libraries/Components/View/View.js +96 -91
  49. package/Libraries/Components/View/ViewPropTypes.js +3 -1
  50. package/Libraries/Core/Devtools/loadBundleFromServer.js +8 -0
  51. package/Libraries/Core/ExceptionsManager.js +2 -8
  52. package/Libraries/Core/InitializeCore.js +0 -13
  53. package/Libraries/Core/ReactFiberErrorDialog.js +3 -3
  54. package/Libraries/Core/ReactNativeVersion.js +3 -3
  55. package/Libraries/Core/ReactNativeVersionCheck.js +1 -1
  56. package/Libraries/Core/Timers/JSTimers.js +2 -2
  57. package/Libraries/Core/Timers/immediateShim.js +1 -1
  58. package/Libraries/Core/setUpBatchedBridge.js +1 -1
  59. package/Libraries/Core/setUpSegmentFetcher.js +1 -1
  60. package/Libraries/Debugging/DebuggingOverlayRegistry.js +1 -1
  61. package/Libraries/EventEmitter/NativeEventEmitter.js +9 -5
  62. package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +2 -2
  63. package/Libraries/Image/Image.android.js +15 -35
  64. package/Libraries/Image/RCTImageLoader.mm +4 -2
  65. package/Libraries/Image/RelativeImageStub.js +2 -2
  66. package/Libraries/LayoutAnimation/LayoutAnimation.js +12 -12
  67. package/Libraries/Linking/Linking.js +1 -1
  68. package/Libraries/Lists/FlatList.js +1 -1
  69. package/Libraries/LogBox/LogBox.js +2 -2
  70. package/Libraries/LogBox/LogBoxInspectorContainer.js +24 -2
  71. package/Libraries/LogBox/LogBoxNotificationContainer.js +27 -4
  72. package/Libraries/LogBox/UI/LogBoxButton.js +47 -33
  73. package/Libraries/LogBox/UI/LogBoxInspector.js +61 -1
  74. package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +6 -0
  75. package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +3 -1
  76. package/Libraries/LogBox/UI/LogBoxNotification.js +2 -0
  77. package/Libraries/Modal/Modal.js +12 -7
  78. package/Libraries/NativeAnimation/Nodes/RCTInterpolationAnimatedNode.mm +0 -2
  79. package/Libraries/NativeComponent/BaseViewConfig.android.js +15 -0
  80. package/Libraries/NativeComponent/BaseViewConfig.ios.js +17 -0
  81. package/Libraries/NativeComponent/NativeComponentRegistry.js +2 -2
  82. package/Libraries/NativeComponent/ViewConfigIgnore.js +4 -2
  83. package/Libraries/Network/RCTNetworking.android.js +1 -1
  84. package/Libraries/Network/RCTNetworking.ios.js +1 -1
  85. package/Libraries/Network/RCTNetworking.js.flow +1 -1
  86. package/Libraries/Network/RCTNetworking.mm +1 -2
  87. package/Libraries/Network/XMLHttpRequest.js +29 -12
  88. package/Libraries/Pressability/Pressability.js +2 -2
  89. package/Libraries/ReactNative/AppContainer-dev.js +2 -3
  90. package/Libraries/ReactNative/AppContainer-prod.js +1 -2
  91. package/Libraries/ReactNative/AppContainer.js +0 -1
  92. package/Libraries/ReactNative/AppRegistry.d.ts +1 -1
  93. package/Libraries/ReactNative/AppRegistry.flow.js +1 -2
  94. package/Libraries/ReactNative/AppRegistryImpl.js +16 -16
  95. package/Libraries/ReactNative/DeprecatedPerformanceLoggerStub.js +83 -0
  96. package/Libraries/ReactNative/FabricUIManager.js +6 -0
  97. package/Libraries/{Utilities → ReactNative}/IPerformanceLogger.d.ts +8 -5
  98. package/Libraries/{Utilities/IPerformanceLogger.js → ReactNative/IPerformanceLogger.flow.js} +12 -9
  99. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.js +14 -14
  100. package/Libraries/ReactNative/RendererImplementation.js +26 -143
  101. package/Libraries/ReactNative/RendererProxy.js +4 -15
  102. package/Libraries/ReactNative/renderApplication.js +33 -59
  103. package/Libraries/ReactNative/requireNativeComponent.js +3 -3
  104. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +5 -0
  105. package/Libraries/Renderer/shims/ReactNativeTypes.js +2 -32
  106. package/Libraries/Settings/Settings.ios.js +1 -1
  107. package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +2 -2
  108. package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +3 -3
  109. package/Libraries/StyleSheet/StyleSheet.js +1 -1
  110. package/Libraries/StyleSheet/StyleSheet.js.flow +2 -2
  111. package/Libraries/StyleSheet/StyleSheetExports.js +1 -1
  112. package/Libraries/StyleSheet/StyleSheetExports.js.flow +1 -1
  113. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +6 -8
  114. package/Libraries/StyleSheet/StyleSheetTypes.js +11 -11
  115. package/Libraries/StyleSheet/flattenStyle.js +1 -1
  116. package/Libraries/StyleSheet/private/_TransformStyle.js +1 -1
  117. package/Libraries/StyleSheet/processBackgroundImage.js +19 -9
  118. package/Libraries/StyleSheet/processBackgroundSize.js +7 -12
  119. package/Libraries/StyleSheet/processBoxShadow.js +9 -47
  120. package/Libraries/StyleSheet/processFilter.js +16 -8
  121. package/Libraries/StyleSheet/processTransformOrigin.js +10 -3
  122. package/Libraries/Text/Text.js +4 -4
  123. package/Libraries/Text/TextInput/RCTBackedTextInputDelegateAdapter.mm +16 -2
  124. package/Libraries/Text/TextNativeComponent.js +4 -4
  125. package/Libraries/TurboModule/RCTExport.js +1 -1
  126. package/Libraries/TurboModule/TurboModuleRegistry.js +3 -3
  127. package/Libraries/Types/CodegenTypes.js +7 -4
  128. package/Libraries/Types/ReactDevToolsTypes.js +1 -1
  129. package/Libraries/Utilities/BackHandler.android.js +11 -3
  130. package/Libraries/Utilities/BackHandler.d.ts +11 -1
  131. package/Libraries/Utilities/BackHandler.ios.js +3 -1
  132. package/Libraries/Utilities/BackHandler.js.flow +6 -1
  133. package/Libraries/Utilities/HMRClient.js +28 -1
  134. package/Libraries/Utilities/HardwareBackPressEvent.js +22 -0
  135. package/Libraries/Utilities/ReactNativeTestTools.js +4 -4
  136. package/Libraries/Utilities/binaryToBase64.js +1 -1
  137. package/Libraries/Utilities/codegenNativeCommands.js +2 -2
  138. package/Libraries/Utilities/codegenNativeComponent.js +4 -4
  139. package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +2 -2
  140. package/Libraries/Utilities/stringifySafe.js +1 -1
  141. package/Libraries/promiseRejectionTrackingOptions.js +1 -1
  142. package/Libraries/vendor/core/ErrorUtils.js +4 -4
  143. package/Libraries/vendor/emitter/EventEmitter.js +27 -13
  144. package/React/Base/RCTBundleURLProvider.h +19 -1
  145. package/React/Base/RCTBundleURLProvider.mm +82 -0
  146. package/React/Base/RCTDefines.h +1 -1
  147. package/React/Base/RCTMultipartDataTask.h +1 -1
  148. package/React/Base/RCTMultipartDataTask.m +0 -3
  149. package/React/Base/RCTRootView.h +4 -0
  150. package/React/Base/RCTRootViewDelegate.h +5 -2
  151. package/React/Base/RCTVersion.m +3 -3
  152. package/React/Base/Surface/RCTSurface.h +3 -0
  153. package/React/Base/Surface/RCTSurfaceDelegate.h +7 -3
  154. package/React/Base/Surface/RCTSurfaceRootView.mm +1 -1
  155. package/React/Base/Surface/RCTSurfaceView.mm +2 -1
  156. package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingProxyRootView.mm +2 -0
  157. package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.h +0 -3
  158. package/React/Base/Surface/SurfaceHostingView/RCTSurfaceHostingView.mm +3 -1
  159. package/React/CoreModules/RCTDevMenuConfigurationDecorator.h +2 -2
  160. package/React/CoreModules/RCTJscSafeUrl+Internal.h +23 -0
  161. package/React/CoreModules/RCTJscSafeUrl.mm +38 -0
  162. package/React/CoreModules/RCTRedBox+Internal.h +42 -0
  163. package/React/CoreModules/RCTRedBox.mm +30 -471
  164. package/React/CoreModules/RCTRedBox2AnsiParser+Internal.h +22 -0
  165. package/React/CoreModules/RCTRedBox2AnsiParser.mm +55 -0
  166. package/React/CoreModules/RCTRedBox2Controller+Internal.h +34 -0
  167. package/React/CoreModules/RCTRedBox2Controller.mm +764 -0
  168. package/React/CoreModules/RCTRedBox2ErrorParser+Internal.h +46 -0
  169. package/React/CoreModules/RCTRedBox2ErrorParser.mm +57 -0
  170. package/React/CoreModules/RCTRedBoxController+Internal.h +31 -0
  171. package/React/CoreModules/RCTRedBoxController.mm +447 -0
  172. package/React/CoreModules/RCTRedBoxHMRClient+Internal.h +26 -0
  173. package/React/CoreModules/RCTRedBoxHMRClient.mm +125 -0
  174. package/React/CoreModules/RCTWebSocketModule.mm +45 -6
  175. package/React/CoreModules/React-CoreModules.podspec +1 -0
  176. package/React/CxxLogUtils/RCTDefaultCxxLogFunction.mm +0 -1
  177. package/React/DevSupport/RCTFrameTimingsObserver.h +24 -0
  178. package/React/DevSupport/RCTFrameTimingsObserver.mm +298 -0
  179. package/React/DevSupport/RCTInspectorDevServerHelper.mm +4 -0
  180. package/React/DevSupport/RCTPackagerConnection.mm +13 -11
  181. package/React/FBReactNativeSpec/FBReactNativeSpecJSI.h +148 -43
  182. package/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.h +1 -0
  183. package/React/Fabric/Mounting/ComponentViews/RCTFabricComponentsPlugins.mm +1 -0
  184. package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.h +1 -1
  185. package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +2 -2
  186. package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +70 -8
  187. package/React/Fabric/RCTConversions.h +14 -0
  188. package/React/Fabric/RCTScheduler.mm +18 -0
  189. package/React/Fabric/RCTSurfacePointerHandler.mm +8 -2
  190. package/React/Fabric/RCTSurfaceTouchHandler.mm +1 -0
  191. package/React/Fabric/Surface/RCTFabricSurface.mm +3 -0
  192. package/React/I18n/strings/pt.lproj/fbt_language_pack.bin +0 -0
  193. package/React/Modules/RCTUIManager.mm +1 -1
  194. package/React/Profiler/RCTProfile.h +5 -0
  195. package/React/Profiler/RCTProfile.m +2 -1
  196. package/React/Profiler/RCTProfileTrampoline-arm.S +1 -1
  197. package/React/Profiler/RCTProfileTrampoline-arm64.S +1 -1
  198. package/React/Profiler/RCTProfileTrampoline-i386.S +1 -1
  199. package/React/Profiler/RCTProfileTrampoline-x86_64.S +1 -1
  200. package/React/Tests/Mounting/RCTViewComponentViewTests.mm +186 -0
  201. package/React/Tests/Text/RCTAttributedTextUtilsTest.mm +5 -5
  202. package/React/Views/RCTLayout.m +4 -3
  203. package/React/Views/ScrollView/RCTScrollView.h +6 -2
  204. package/ReactAndroid/api/ReactAndroid.api +37 -27
  205. package/ReactAndroid/build.gradle.kts +28 -21
  206. package/ReactAndroid/gradle.properties +1 -1
  207. package/ReactAndroid/hermes-engine/build.gradle.kts +17 -0
  208. package/ReactAndroid/publish.gradle +20 -46
  209. package/ReactAndroid/src/main/java/com/facebook/hermes/instrumentation/HermesSamplingProfiler.kt +2 -0
  210. package/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java +1 -3
  211. package/ReactAndroid/src/main/java/com/facebook/react/ReactAndroidHWInputDeviceHelper.kt +2 -0
  212. package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +40 -110
  213. package/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java +32 -87
  214. package/ReactAndroid/src/main/java/com/facebook/react/animated/EventAnimationDriver.kt +1 -0
  215. package/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.kt +9 -99
  216. package/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.kt +7 -28
  217. package/ReactAndroid/src/main/java/com/facebook/react/animated/PropsAnimatedNode.kt +2 -19
  218. package/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaModuleWrapper.kt +15 -23
  219. package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactContext.java +36 -0
  220. package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactNativeJNISoLoader.kt +2 -0
  221. package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactNativeJniCommonSoLoader.kt +2 -0
  222. package/ReactAndroid/src/main/java/com/facebook/react/bridge/ReactSoftExceptionLogger.kt +4 -0
  223. package/ReactAndroid/src/main/java/com/facebook/react/defaults/DefaultSoLoader.kt +2 -0
  224. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/FpsView.kt +2 -2
  225. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/InspectorFlags.kt +6 -0
  226. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/LogBoxDialogSurfaceDelegate.kt +15 -2
  227. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/RedBoxDialogSurfaceDelegate.kt +1 -0
  228. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/DevSupportHttpClient.kt +9 -34
  229. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/FrameTimingSequence.kt +1 -1
  230. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/FrameTimingsObserver.kt +135 -35
  231. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/inspector/InspectorNetworkRequestListener.kt +2 -0
  232. package/ReactAndroid/src/main/java/com/facebook/react/devsupport/perfmonitor/PerfMonitorOverlayView.kt +10 -10
  233. package/ReactAndroid/src/main/java/com/facebook/react/fabric/AnimationBackendChoreographer.kt +15 -13
  234. package/ReactAndroid/src/main/java/com/facebook/react/fabric/DevToolsReactPerfLogger.kt +4 -1
  235. package/ReactAndroid/src/main/java/com/facebook/react/fabric/FabricUIManager.java +139 -43
  236. package/ReactAndroid/src/main/java/com/facebook/react/fabric/ViewTransitionSnapshotManager.kt +223 -0
  237. package/ReactAndroid/src/main/java/com/facebook/react/fabric/events/EventEmitterWrapper.kt +25 -8
  238. package/ReactAndroid/src/main/java/com/facebook/react/fabric/events/FabricEventEmitter.kt +34 -1
  239. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountItemDispatcher.kt +104 -65
  240. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/MountingManager.kt +9 -1
  241. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.kt +172 -36
  242. package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/mountitems/PreAllocateViewMountItem.kt +1 -1
  243. package/ReactAndroid/src/main/java/com/facebook/react/interfaces/ExtraWindowEventListener.kt +29 -0
  244. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlags.kt +71 -29
  245. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxAccessor.kt +121 -51
  246. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsCxxInterop.kt +25 -11
  247. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsDefaults.kt +26 -12
  248. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsLocalAccessor.kt +134 -57
  249. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Experimental_Android.kt +3 -3
  250. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsOverrides_RNOSS_Stable_Android.kt +1 -4
  251. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeFeatureFlagsProvider.kt +25 -11
  252. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/ReactNativeNewArchitectureFeatureFlagsDefaults.kt +5 -9
  253. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/rewrite_feature_flag_defaults.py +76 -0
  254. package/ReactAndroid/src/main/java/com/facebook/react/internal/featureflags/tests/test_rewrite_feature_flag_defaults.py +63 -0
  255. package/ReactAndroid/src/main/java/com/facebook/react/internal/tracing/PerformanceTracer.kt +40 -1
  256. package/ReactAndroid/src/main/java/com/facebook/react/modules/appearance/AppearanceModule.kt +3 -0
  257. package/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobModule.kt +10 -5
  258. package/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobProvider.kt +1 -2
  259. package/ReactAndroid/src/main/java/com/facebook/react/modules/clipboard/ClipboardModule.kt +3 -0
  260. package/ReactAndroid/src/main/java/com/facebook/react/modules/core/DeviceEventManagerModule.kt +2 -1
  261. package/ReactAndroid/src/main/java/com/facebook/react/modules/core/ReactChoreographer.kt +21 -20
  262. package/ReactAndroid/src/main/java/com/facebook/react/modules/deviceinfo/DeviceInfoModule.kt +63 -3
  263. package/ReactAndroid/src/main/java/com/facebook/react/modules/image/ImageLoaderModule.kt +59 -62
  264. package/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.kt +8 -0
  265. package/ReactAndroid/src/main/java/com/facebook/react/modules/statusbar/StatusBarModule.kt +45 -36
  266. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +3 -3
  267. package/ReactAndroid/src/main/java/com/facebook/react/modules/websocket/WebSocketModule.kt +5 -2
  268. package/ReactAndroid/src/main/java/com/facebook/react/runtime/CoreReactPackage.kt +4 -0
  269. package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImpl.kt +68 -15
  270. package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactHostImplDevHelper.kt +8 -1
  271. package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactSurfaceView.kt +21 -19
  272. package/ReactAndroid/src/main/java/com/facebook/react/shell/MainReactPackage.kt +4 -0
  273. package/ReactAndroid/src/main/java/com/facebook/react/soloader/OpenSourceMergedSoMapping.kt +4 -0
  274. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BackgroundStyleApplicator.kt +77 -72
  275. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +7 -16
  276. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BlendModeHelper.kt +3 -2
  277. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/DisplayMetricsHolder.kt +3 -0
  278. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/FilterHelper.kt +3 -1
  279. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/NativeViewHierarchyManager.java +25 -0
  280. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactAccessibilityDelegate.kt +2 -2
  281. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ReactRootViewTagGenerator.kt +3 -2
  282. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/RootViewUtil.kt +17 -7
  283. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/ThemedReactContext.kt +18 -0
  284. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/TouchTargetHelper.kt +20 -12
  285. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/TransformHelper.kt +18 -24
  286. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIConstantsProviderBinding.kt +2 -0
  287. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java +4 -0
  288. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerHelper.kt +11 -71
  289. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIManagerModule.java +10 -17
  290. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/common/ViewUtil.kt +29 -30
  291. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/drawable/BackgroundImageDrawable.kt +5 -3
  292. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/drawable/InsetBoxShadowDrawable.kt +12 -13
  293. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/FabricEventDispatcher.kt +1 -0
  294. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/PointerEvent.kt +1 -0
  295. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/RCTModernEventEmitter.kt +30 -0
  296. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/SynchronousEventReceiver.kt +28 -0
  297. package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/TouchesHelper.kt +9 -9
  298. package/ReactAndroid/src/main/java/com/facebook/react/util/AndroidVersion.kt +27 -3
  299. package/ReactAndroid/src/main/java/com/facebook/react/views/modal/ReactModalHostView.kt +4 -0
  300. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/MaintainVisibleScrollPositionHelper.kt +1 -14
  301. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollContainerViewManager.kt +1 -22
  302. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollView.java +18 -20
  303. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactNestedScrollView.java +20 -21
  304. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java +19 -20
  305. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewHelper.kt +14 -5
  306. package/ReactAndroid/src/main/java/com/facebook/react/views/text/FontMetricsUtil.kt +2 -3
  307. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java +5 -162
  308. package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextViewManager.kt +1 -1
  309. package/ReactAndroid/src/main/java/com/facebook/react/views/text/TextLayoutManager.kt +71 -97
  310. package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/CustomStyleSpan.kt +1 -4
  311. package/ReactAndroid/src/main/java/com/facebook/react/views/text/internal/span/DrawCommandSpan.kt +1 -1
  312. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.kt +7 -13
  313. package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.kt +40 -2
  314. package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactDrawableHelper.kt +59 -20
  315. package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.kt +84 -20
  316. package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.kt +41 -65
  317. package/ReactAndroid/src/main/java/com/facebook/react/views/view/WindowUtil.kt +85 -13
  318. package/ReactAndroid/src/main/java/com/facebook/soloader/annotation/SoLoaderLibrary.kt +17 -0
  319. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaAlign.java +5 -1
  320. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaConfigJNIFinalizer.kt +30 -0
  321. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaDisplay.java +3 -1
  322. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaExperimentalFeature.java +3 -1
  323. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaGridTrackType.java +39 -0
  324. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaJustify.java +20 -12
  325. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeJNIBase.java +101 -0
  326. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeJNIFinalizer.kt +33 -0
  327. package/ReactAndroid/src/main/jni/CMakeLists.txt +17 -1
  328. package/ReactAndroid/src/main/jni/react/devsupport/JInspectorFlags.cpp +22 -0
  329. package/ReactAndroid/src/main/jni/react/devsupport/JInspectorFlags.h +2 -0
  330. package/ReactAndroid/src/main/jni/react/fabric/ComponentFactory.cpp +0 -1
  331. package/ReactAndroid/src/main/jni/react/fabric/CoreComponentsRegistry.cpp +0 -2
  332. package/ReactAndroid/src/main/jni/react/fabric/EventEmitterWrapper.cpp +26 -6
  333. package/ReactAndroid/src/main/jni/react/fabric/EventEmitterWrapper.h +3 -3
  334. package/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.cpp +47 -0
  335. package/ReactAndroid/src/main/jni/react/fabric/FabricMountingManager.h +20 -6
  336. package/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.cpp +24 -1
  337. package/ReactAndroid/src/main/jni/react/fabric/FabricUIManagerBinding.h +6 -0
  338. package/ReactAndroid/src/main/jni/react/fabric/FocusOrderingHelper.cpp +0 -1
  339. package/ReactAndroid/src/main/jni/react/fabric/SurfaceHandlerBinding.cpp +1 -0
  340. package/ReactAndroid/src/main/jni/react/fabric/test_helper/FabricMountingManagerTestHelper.cpp +85 -0
  341. package/ReactAndroid/src/main/jni/react/fabric/test_helper/FabricMountingManagerTestHelper.h +46 -0
  342. package/ReactAndroid/src/main/jni/react/fabric/test_helper/OnLoad.cpp +16 -0
  343. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.cpp +167 -69
  344. package/ReactAndroid/src/main/jni/react/featureflags/JReactNativeFeatureFlagsCxxInterop.h +36 -15
  345. package/ReactAndroid/src/main/jni/react/hermes/instrumentation/HermesSamplingProfiler.cpp +1 -1
  346. package/ReactAndroid/src/main/jni/react/jni/OnLoad-common.cpp +0 -2
  347. package/ReactAndroid/src/main/jni/react/jni/OnLoad.cpp +2 -1
  348. package/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.cpp +37 -30
  349. package/ReactAndroid/src/main/jni/react/reactnativeblob/BlobCollector.h +11 -8
  350. package/ReactAndroid/src/main/jni/react/reactnativeblob/CMakeLists.txt +2 -1
  351. package/ReactAndroid/src/main/jni/react/reactnativeblob/OnLoad.cpp +1 -1
  352. package/ReactAndroid/src/main/jni/react/runtime/jni/JReactHostInspectorTarget.cpp +24 -0
  353. package/ReactAndroid/src/main/jni/react/runtime/jni/JReactHostInspectorTarget.h +25 -4
  354. package/ReactAndroid/src/main/jni/react/tracing/CMakeLists.txt +28 -0
  355. package/ReactCommon/React-Fabric.podspec +13 -0
  356. package/ReactCommon/React-FabricComponents.podspec +1 -1
  357. package/ReactCommon/cxxreact/ReactNativeVersion.h +5 -5
  358. package/ReactCommon/jsc/JSCRuntime.cpp +9 -0
  359. package/ReactCommon/jserrorhandler/JsErrorHandler.cpp +1 -0
  360. package/ReactCommon/jserrorhandler/JsErrorHandler.h +1 -1
  361. package/ReactCommon/jsi/jsi/JSIDynamic.cpp +1 -0
  362. package/ReactCommon/jsi/jsi/decorator.h +93 -0
  363. package/ReactCommon/jsi/jsi/jsi-inl.h +97 -68
  364. package/ReactCommon/jsi/jsi/jsi.cpp +208 -27
  365. package/ReactCommon/jsi/jsi/jsi.h +553 -224
  366. package/ReactCommon/jsi/jsi/test/testlib.cpp +453 -0
  367. package/ReactCommon/jsiexecutor/jsireact/JSINativeModules.cpp +1 -1
  368. package/ReactCommon/jsinspector-modern/EmulationAgent.cpp +108 -0
  369. package/ReactCommon/jsinspector-modern/EmulationAgent.h +47 -0
  370. package/ReactCommon/jsinspector-modern/HostAgent.cpp +46 -1
  371. package/ReactCommon/jsinspector-modern/HostTarget.cpp +7 -1
  372. package/ReactCommon/jsinspector-modern/HostTarget.h +50 -0
  373. package/ReactCommon/jsinspector-modern/HostTargetTracing.cpp +1 -1
  374. package/ReactCommon/jsinspector-modern/HostTargetTracing.h +4 -4
  375. package/ReactCommon/jsinspector-modern/InspectorFlags.cpp +18 -2
  376. package/ReactCommon/jsinspector-modern/InspectorFlags.h +17 -2
  377. package/ReactCommon/jsinspector-modern/InspectorPackagerConnection.cpp +19 -2
  378. package/ReactCommon/jsinspector-modern/InspectorPackagerConnectionImpl.h +3 -0
  379. package/ReactCommon/jsinspector-modern/NetworkIOAgent.cpp +1 -1
  380. package/ReactCommon/jsinspector-modern/RuntimeAgent.cpp +19 -0
  381. package/ReactCommon/jsinspector-modern/RuntimeAgent.h +7 -0
  382. package/ReactCommon/jsinspector-modern/RuntimeTarget.cpp +33 -0
  383. package/ReactCommon/jsinspector-modern/RuntimeTarget.h +6 -0
  384. package/ReactCommon/jsinspector-modern/TracingAgent.cpp +10 -0
  385. package/ReactCommon/jsinspector-modern/tests/HostTargetTest.cpp +12 -0
  386. package/ReactCommon/jsinspector-modern/tests/InspectorMocks.h +3 -2
  387. package/ReactCommon/jsinspector-modern/tests/JsiIntegrationTest.cpp +1 -0
  388. package/ReactCommon/jsinspector-modern/tests/NetworkReporterTest.cpp +1 -1
  389. package/ReactCommon/jsinspector-modern/tests/TracingTest.cpp +1 -1
  390. package/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.cpp +10 -0
  391. package/ReactCommon/jsinspector-modern/tests/utils/InspectorFlagOverridesGuard.h +3 -1
  392. package/ReactCommon/jsinspector-modern/tracing/CMakeLists.txt +1 -0
  393. package/ReactCommon/jsinspector-modern/tracing/FrameTimingSequence.h +7 -3
  394. package/ReactCommon/jsinspector-modern/tracing/HostTracingProfileSerializer.cpp +52 -29
  395. package/ReactCommon/jsinspector-modern/tracing/HostTracingProfileSerializer.h +6 -6
  396. package/ReactCommon/jsinspector-modern/tracing/PerformanceTracerSection.h +113 -0
  397. package/ReactCommon/jsinspector-modern/tracing/React-jsinspectortracing.podspec +1 -0
  398. package/ReactCommon/jsinspector-modern/tracing/TraceEventGenerator.cpp +12 -5
  399. package/ReactCommon/jsinspector-modern/tracing/TraceEventGenerator.h +3 -1
  400. package/ReactCommon/jsinspector-modern/tracing/TraceEventSerializer.cpp +42 -0
  401. package/ReactCommon/jsinspector-modern/tracing/TraceEventSerializer.h +7 -0
  402. package/ReactCommon/jsinspector-modern/tracing/TracingCategory.h +0 -1
  403. package/ReactCommon/logger/react_native_log.cpp +0 -1
  404. package/ReactCommon/react/bridging/Array.h +1 -1
  405. package/ReactCommon/react/debug/CMakeLists.txt +2 -1
  406. package/ReactCommon/react/debug/React-debug.podspec +7 -1
  407. package/ReactCommon/react/debug/redbox/AnsiParser.cpp +139 -0
  408. package/ReactCommon/react/debug/redbox/AnsiParser.h +35 -0
  409. package/ReactCommon/react/debug/redbox/JscSafeUrl.cpp +179 -0
  410. package/ReactCommon/react/debug/redbox/JscSafeUrl.h +27 -0
  411. package/ReactCommon/react/debug/redbox/RedBoxErrorParser.cpp +171 -0
  412. package/ReactCommon/react/debug/redbox/RedBoxErrorParser.h +40 -0
  413. package/ReactCommon/react/debug/redbox/tests/AnsiParserTest.cpp +97 -0
  414. package/ReactCommon/react/debug/redbox/tests/JscSafeUrlTest.cpp +173 -0
  415. package/ReactCommon/react/debug/redbox/tests/RedBoxErrorParserTest.cpp +107 -0
  416. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.cpp +49 -21
  417. package/ReactCommon/react/featureflags/ReactNativeFeatureFlags.h +60 -25
  418. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.cpp +267 -141
  419. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsAccessor.h +28 -14
  420. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDefaults.h +48 -20
  421. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsDynamicProvider.h +106 -43
  422. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsOverridesOSSExperimental.h +3 -3
  423. package/ReactCommon/react/featureflags/ReactNativeFeatureFlagsProvider.h +14 -7
  424. package/ReactCommon/react/featureflags/rewrite_feature_flag_defaults.py +111 -0
  425. package/ReactCommon/react/featureflags/tests/test_rewrite_feature_flag_defaults.py +60 -0
  426. package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTInteropTurboModule.h +3 -9
  427. package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm +0 -1
  428. package/ReactCommon/react/nativemodule/defaults/CMakeLists.txt +2 -0
  429. package/ReactCommon/react/nativemodule/defaults/DefaultTurboModules.cpp +14 -0
  430. package/ReactCommon/react/nativemodule/defaults/React-defaultsnativemodule.podspec +2 -0
  431. package/ReactCommon/react/nativemodule/fantomtestspecificmethods/NativeFantomTestSpecificMethods.cpp +2 -2
  432. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.cpp +60 -25
  433. package/ReactCommon/react/nativemodule/featureflags/NativeReactNativeFeatureFlags.h +25 -11
  434. package/ReactCommon/react/nativemodule/mutationobserver/NativeMutationObserver.cpp +3 -2
  435. package/ReactCommon/react/nativemodule/mutationobserver/NativeMutationObserver.h +4 -0
  436. package/ReactCommon/react/nativemodule/mutationobserver/React-mutationobservernativemodule.podspec +66 -0
  437. package/ReactCommon/react/nativemodule/viewtransition/CMakeLists.txt +24 -0
  438. package/ReactCommon/react/nativemodule/viewtransition/NativeViewTransition.cpp +92 -0
  439. package/ReactCommon/react/nativemodule/viewtransition/NativeViewTransition.h +37 -0
  440. package/ReactCommon/react/nativemodule/viewtransition/React-viewtransitionnativemodule.podspec +58 -0
  441. package/ReactCommon/react/nativemodule/webperformance/NativePerformance.cpp +10 -1
  442. package/ReactCommon/react/networking/NetworkReporter.h +0 -1
  443. package/ReactCommon/react/performance/cdpmetrics/CdpPerfIssuesReporter.h +0 -1
  444. package/ReactCommon/react/performance/timeline/PerformanceEntry.h +1 -1
  445. package/ReactCommon/react/performance/timeline/PerformanceObserver.cpp +18 -6
  446. package/ReactCommon/react/performance/timeline/PerformanceObserver.h +2 -0
  447. package/ReactCommon/react/performance/timeline/tests/PerformanceEntryTest.cpp +62 -0
  448. package/ReactCommon/react/renderer/animated/NativeAnimatedNodesManager.cpp +24 -12
  449. package/ReactCommon/react/renderer/animated/NativeAnimatedNodesManager.h +1 -1
  450. package/ReactCommon/react/renderer/animationbackend/AnimatedPropSerializer.cpp +3 -0
  451. package/ReactCommon/react/renderer/animationbackend/AnimatedPropsRegistry.cpp +10 -3
  452. package/ReactCommon/react/renderer/animationbackend/AnimatedPropsRegistry.h +1 -0
  453. package/ReactCommon/react/renderer/animationbackend/AnimationBackend.cpp +4 -0
  454. package/ReactCommon/react/renderer/animationbackend/AnimationBackend.h +1 -1
  455. package/ReactCommon/react/renderer/animationbackend/AnimationBackendCommitHook.h +0 -1
  456. package/ReactCommon/react/renderer/animations/LayoutAnimationDriver.cpp +8 -3
  457. package/ReactCommon/react/renderer/animations/tests/MutationComparatorTest.cpp +273 -0
  458. package/ReactCommon/react/renderer/animations/utils.h +12 -1
  459. package/ReactCommon/react/renderer/attributedstring/TextAttributes.cpp +1 -1
  460. package/ReactCommon/react/renderer/attributedstring/conversions.h +104 -3
  461. package/ReactCommon/react/renderer/components/image/conversions.h +2 -3
  462. package/ReactCommon/react/renderer/components/scrollview/ScrollViewEventEmitter.h +0 -1
  463. package/ReactCommon/react/renderer/components/scrollview/conversions.h +0 -1
  464. package/ReactCommon/react/renderer/components/text/stateConversions.h +0 -1
  465. package/ReactCommon/react/renderer/components/view/AccessibilityProps.cpp +531 -21
  466. package/ReactCommon/react/renderer/components/view/AccessibilityProps.h +9 -0
  467. package/ReactCommon/react/renderer/components/view/BaseTouch.cpp +3 -2
  468. package/ReactCommon/react/renderer/components/view/BaseTouch.h +7 -0
  469. package/ReactCommon/react/renderer/components/view/BaseViewProps.cpp +8 -0
  470. package/ReactCommon/react/renderer/components/view/PointerEvent.cpp +2 -0
  471. package/ReactCommon/react/renderer/components/view/PointerEvent.h +5 -0
  472. package/ReactCommon/react/renderer/components/view/TouchEvent.h +0 -2
  473. package/ReactCommon/react/renderer/components/view/TouchEventEmitter.cpp +23 -5
  474. package/ReactCommon/react/renderer/components/view/TouchEventEmitter.h +1 -0
  475. package/ReactCommon/react/renderer/components/view/YogaLayoutableShadowNode.cpp +5 -0
  476. package/ReactCommon/react/renderer/components/view/YogaStylableProps.cpp +33 -28
  477. package/ReactCommon/react/renderer/components/view/accessibilityPropsConversions.h +0 -1
  478. package/ReactCommon/react/renderer/components/view/conversions.h +44 -28
  479. package/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/HostPlatformViewProps.cpp +53 -5
  480. package/ReactCommon/react/renderer/components/view/platform/android/react/renderer/components/view/NativeDrawable.h +47 -16
  481. package/ReactCommon/react/renderer/components/view/platform/cxx/react/renderer/components/view/HostPlatformViewTraitsInitializer.h +2 -2
  482. package/ReactCommon/react/renderer/{graphics/DoubleConversions.h → components/view/platform/tvos/react/renderer/components/view/HostPlatformTouch.h} +2 -4
  483. package/ReactCommon/react/renderer/components/view/platform/tvos/react/renderer/components/view/HostPlatformViewEventEmitter.h +14 -0
  484. package/ReactCommon/react/renderer/components/view/platform/tvos/react/renderer/components/view/HostPlatformViewProps.cpp +38 -0
  485. package/ReactCommon/react/renderer/components/view/platform/tvos/react/renderer/components/view/HostPlatformViewProps.h +29 -0
  486. package/ReactCommon/react/renderer/components/view/platform/tvos/react/renderer/components/view/HostPlatformViewTraitsInitializer.h +30 -0
  487. package/ReactCommon/react/renderer/components/view/propsConversions.h +8 -2
  488. package/ReactCommon/react/renderer/components/view/tests/ConversionsTest.cpp +86 -0
  489. package/ReactCommon/react/renderer/components/view/tests/ViewTest.cpp +34 -0
  490. package/ReactCommon/react/renderer/core/EventEmitter.cpp +67 -2
  491. package/ReactCommon/react/renderer/core/EventEmitter.h +25 -0
  492. package/ReactCommon/react/renderer/core/EventPipe.h +3 -1
  493. package/ReactCommon/react/renderer/core/EventQueueProcessor.cpp +18 -10
  494. package/ReactCommon/react/renderer/core/EventTarget.cpp +8 -5
  495. package/ReactCommon/react/renderer/core/LayoutContext.h +9 -2
  496. package/ReactCommon/react/renderer/core/LayoutMetrics.cpp +5 -3
  497. package/ReactCommon/react/renderer/core/LayoutPrimitives.h +1 -0
  498. package/ReactCommon/react/renderer/core/Props.cpp +20 -0
  499. package/ReactCommon/react/renderer/core/RawEvent.cpp +4 -2
  500. package/ReactCommon/react/renderer/core/RawEvent.h +6 -6
  501. package/ReactCommon/react/renderer/core/ShadowNode.h +2 -2
  502. package/ReactCommon/react/renderer/core/conversions.h +4 -0
  503. package/ReactCommon/react/renderer/core/graphicsConversions.h +4 -4
  504. package/ReactCommon/react/renderer/core/propsConversions.h +1 -1
  505. package/ReactCommon/react/renderer/core/tests/EventQueueProcessorTest.cpp +52 -3
  506. package/ReactCommon/react/renderer/core/tests/EventTargetTests.cpp +26 -0
  507. package/ReactCommon/react/renderer/css/tests/CSSValueParserTest.cpp +1 -1
  508. package/ReactCommon/react/renderer/debug/DebugStringConvertible.cpp +42 -26
  509. package/ReactCommon/react/renderer/debug/DebugStringConvertible.h +4 -2
  510. package/ReactCommon/react/renderer/debug/tests/DebugStringConvertibleTest.cpp +34 -3
  511. package/ReactCommon/react/renderer/graphics/BlendMode.h +5 -0
  512. package/ReactCommon/react/renderer/graphics/CMakeLists.txt +1 -0
  513. package/ReactCommon/react/renderer/graphics/ColorStop.h +3 -0
  514. package/ReactCommon/react/renderer/graphics/LinearGradient.h +3 -0
  515. package/ReactCommon/react/renderer/graphics/RadialGradient.h +4 -0
  516. package/ReactCommon/react/renderer/graphics/React-graphics.podspec +1 -0
  517. package/ReactCommon/react/renderer/graphics/ValueUnit.cpp +1 -1
  518. package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/ImageFetcher.cpp +0 -5
  519. package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/ImageManager.cpp +2 -2
  520. package/ReactCommon/react/renderer/imagemanager/platform/ios/react/renderer/imagemanager/RCTImagePrimitivesConversions.h +0 -4
  521. package/ReactCommon/react/renderer/imagemanager/platform/ios/react/renderer/imagemanager/RCTSyncImageManager.mm +5 -1
  522. package/ReactCommon/react/renderer/mapbuffer/MapBufferBuilder.cpp +12 -4
  523. package/ReactCommon/react/renderer/mounting/CMakeLists.txt +1 -0
  524. package/ReactCommon/react/renderer/mounting/Differentiator.cpp +307 -4
  525. package/ReactCommon/react/renderer/mounting/ShadowTree.cpp +27 -2
  526. package/ReactCommon/react/renderer/mounting/internal/LongestIncreasingSubsequence.h +95 -0
  527. package/ReactCommon/react/renderer/mounting/tests/DifferentiatorUnflattenTest.cpp +212 -0
  528. package/ReactCommon/react/renderer/mounting/tests/LongestIncreasingSubsequenceTest.cpp +154 -0
  529. package/ReactCommon/react/renderer/mounting/tests/ShadowTreeLifeCycleTest.cpp +314 -18
  530. package/ReactCommon/react/renderer/mounting/updateMountedFlag.cpp +38 -20
  531. package/ReactCommon/react/renderer/runtimescheduler/tests/RuntimeSchedulerTest.cpp +20 -22
  532. package/ReactCommon/react/renderer/scheduler/CMakeLists.txt +1 -0
  533. package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +76 -3
  534. package/ReactCommon/react/renderer/scheduler/Scheduler.h +12 -0
  535. package/ReactCommon/react/renderer/scheduler/SchedulerDelegate.h +5 -0
  536. package/ReactCommon/react/renderer/textlayoutmanager/platform/android/react/renderer/textlayoutmanager/TextLayoutManager.cpp +0 -7
  537. package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTTextLayoutManager.mm +2 -1
  538. package/ReactCommon/react/renderer/uimanager/UIManager.cpp +16 -1
  539. package/ReactCommon/react/renderer/uimanager/UIManager.h +8 -0
  540. package/ReactCommon/react/renderer/uimanager/UIManagerAnimationBackend.h +1 -0
  541. package/ReactCommon/react/renderer/uimanager/UIManagerBinding.cpp +347 -5
  542. package/ReactCommon/react/renderer/uimanager/UIManagerBinding.h +5 -3
  543. package/ReactCommon/react/renderer/uimanager/UIManagerDelegate.h +5 -0
  544. package/ReactCommon/react/renderer/uimanager/UIManagerViewTransitionDelegate.h +82 -0
  545. package/ReactCommon/react/renderer/viewtransition/CMakeLists.txt +22 -0
  546. package/ReactCommon/react/renderer/viewtransition/ViewTransitionModule.cpp +520 -0
  547. package/ReactCommon/react/renderer/viewtransition/ViewTransitionModule.h +161 -0
  548. package/ReactCommon/react/runtime/TimerManager.cpp +4 -2
  549. package/ReactCommon/react/runtime/platform/ios/ReactCommon/RCTHost.mm +152 -0
  550. package/ReactCommon/react/timing/PrivacyInfo.xcprivacy +21 -0
  551. package/ReactCommon/react/timing/React-timing.podspec +2 -0
  552. package/ReactCommon/react/timing/primitives.h +33 -1
  553. package/ReactCommon/{jsinspector-modern → react/utils}/Base64.h +2 -2
  554. package/ReactCommon/yoga/yoga/YGEnums.cpp +32 -0
  555. package/ReactCommon/yoga/yoga/YGEnums.h +20 -4
  556. package/ReactCommon/yoga/yoga/YGMacros.h +2 -0
  557. package/ReactCommon/yoga/yoga/YGNode.h +1 -1
  558. package/ReactCommon/yoga/yoga/YGNodeStyle.cpp +269 -0
  559. package/ReactCommon/yoga/yoga/YGNodeStyle.h +93 -1
  560. package/ReactCommon/yoga/yoga/algorithm/AbsoluteLayout.cpp +40 -9
  561. package/ReactCommon/yoga/yoga/algorithm/Align.h +12 -1
  562. package/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp +106 -14
  563. package/ReactCommon/yoga/yoga/algorithm/CalculateLayout.h +22 -0
  564. package/ReactCommon/yoga/yoga/enums/Align.h +3 -1
  565. package/ReactCommon/yoga/yoga/enums/Display.h +2 -1
  566. package/ReactCommon/yoga/yoga/enums/ExperimentalFeature.h +2 -1
  567. package/ReactCommon/yoga/yoga/enums/GridTrackType.h +43 -0
  568. package/ReactCommon/yoga/yoga/enums/Justify.h +5 -1
  569. package/ReactCommon/yoga/yoga/event/event.cpp +2 -0
  570. package/ReactCommon/yoga/yoga/event/event.h +1 -0
  571. package/ReactCommon/yoga/yoga/node/Node.cpp +6 -1
  572. package/ReactCommon/yoga/yoga/node/Node.h +4 -4
  573. package/ReactCommon/yoga/yoga/style/GridLine.h +53 -0
  574. package/ReactCommon/yoga/yoga/style/GridTrack.h +63 -0
  575. package/ReactCommon/yoga/yoga/style/Style.h +261 -71
  576. package/ReactCommon/yoga/yoga/style/StyleSizeLength.h +7 -1
  577. package/ReactCommon/yoga/yoga/style/StyleValueHandle.h +8 -0
  578. package/ReactCommon/yoga/yoga/style/StyleValuePool.h +10 -0
  579. package/cli.js +1 -1
  580. package/flow/HermesInternalType.js +1 -1
  581. package/flow/bom.js.flow +95 -3
  582. package/flow/dom.js.flow +89 -89
  583. package/gradle/libs.versions.toml +3 -1
  584. package/index.js +30 -3
  585. package/index.js.flow +23 -1
  586. package/package.json +13 -13
  587. package/react-native.config.js +3 -3
  588. package/scripts/cocoapods/rncore.rb +65 -11
  589. package/scripts/cocoapods/rndependencies.rb +65 -11
  590. package/scripts/cocoapods/utils.rb +53 -0
  591. package/scripts/codegen/generate-artifacts-executor/generateCustomURLHandlers.js +1 -1
  592. package/scripts/codegen/generate-artifacts-executor/generateNativeCode.js +13 -4
  593. package/scripts/codegen/generate-artifacts-executor/generateRCTModuleProviders.js +1 -1
  594. package/scripts/codegen/generate-artifacts-executor/generateRCTThirdPartyComponents.js +1 -1
  595. package/scripts/codegen/generate-artifacts-executor/generateReactCodegenPodspec.js +17 -6
  596. package/scripts/codegen/generate-artifacts-executor/generateSchemaInfos.js +1 -1
  597. package/scripts/codegen/generate-artifacts-executor/generateUnstableModulesRequiringMainQueueSetupProvider.js +1 -1
  598. package/scripts/codegen/generate-artifacts-executor/index.js +2 -0
  599. package/scripts/codegen/generate-artifacts-executor/utils.js +1 -1
  600. package/scripts/codegen/generate-specs-cli-executor.js +1 -1
  601. package/scripts/generate-codegen-artifacts.js +20 -2
  602. package/scripts/generate-provider-cli.js +1 -1
  603. package/scripts/react_native_pods.rb +26 -2
  604. package/scripts/react_native_pods_utils/script_phases.rb +9 -3
  605. package/scripts/replace-rncore-version.js +91 -14
  606. package/scripts/xcode/with-environment.sh +7 -1
  607. package/sdks/.hermesv1version +1 -1
  608. package/sdks/.hermesversion +1 -1
  609. package/sdks/hermes-engine/hermes-utils.rb +92 -5
  610. package/sdks/hermes-engine/version.properties +2 -2
  611. package/src/private/animated/NativeAnimatedValidation.js +1 -1
  612. package/src/private/animated/createAnimatedPropsHook.js +2 -2
  613. package/src/private/components/virtualcollection/FlingConstants.js +21 -0
  614. package/src/private/components/virtualcollection/Virtual.js +62 -0
  615. package/src/private/components/virtualcollection/VirtualCollectionView.js +238 -0
  616. package/src/private/components/virtualcollection/column/VirtualColumn.js +43 -0
  617. package/src/private/components/virtualcollection/column/VirtualColumnGenerator.js +72 -0
  618. package/src/private/components/virtualcollection/debug/FlingItemOverlay.js +13 -0
  619. package/src/private/components/virtualcollection/dom/getScrollParent.js +43 -0
  620. package/src/private/components/virtualcollection/dom/isScrollableNode.js +22 -0
  621. package/src/private/components/virtualcollection/row/VirtualRow.js +43 -0
  622. package/src/private/components/virtualcollection/row/VirtualRowGenerator.js +72 -0
  623. package/src/private/devsupport/devmenu/elementinspector/getInspectorDataForViewAtPoint.js +2 -2
  624. package/src/private/devsupport/devmenu/elementinspector/useExternalInspection.js +1 -1
  625. package/src/private/devsupport/devmenu/specs/NativeDevMenu.js +1 -1
  626. package/src/private/devsupport/rndevtools/specs/NativeReactDevToolsRuntimeSettingsModule.js +2 -2
  627. package/src/private/devsupport/rndevtools/specs/NativeReactDevToolsSettingsManager.js +2 -2
  628. package/src/private/featureflags/ReactNativeFeatureFlags.js +66 -37
  629. package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +3 -3
  630. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +14 -7
  631. package/src/private/renderer/errorhandling/ErrorHandlers.js +3 -3
  632. package/src/private/renderer/events/LegacySyntheticEvent.js +90 -0
  633. package/src/private/renderer/events/ReactNativeEventTypeMapping.js +103 -0
  634. package/src/private/renderer/events/ReactNativeResponder.js +687 -0
  635. package/src/private/renderer/events/ResponderEvent.js +40 -0
  636. package/src/private/renderer/events/ResponderTouchHistoryStore.js +258 -0
  637. package/src/private/renderer/events/dispatchNativeEvent.js +83 -0
  638. package/src/private/setup/setUpDOM.js +20 -0
  639. package/src/private/setup/setUpDefaultReactNativeEnvironment.js +6 -0
  640. package/src/private/specs_DEPRECATED/components/ActivityIndicatorViewNativeComponent.js +2 -2
  641. package/src/private/specs_DEPRECATED/components/AndroidDrawerLayoutNativeComponent.js +2 -2
  642. package/src/private/specs_DEPRECATED/components/AndroidHorizontalScrollContentViewNativeComponent.js +2 -2
  643. package/src/private/specs_DEPRECATED/components/AndroidSwipeRefreshLayoutNativeComponent.js +2 -2
  644. package/src/private/specs_DEPRECATED/components/AndroidSwitchNativeComponent.js +2 -2
  645. package/src/private/specs_DEPRECATED/components/DebuggingOverlayNativeComponent.js +2 -2
  646. package/src/private/specs_DEPRECATED/components/ProgressBarAndroidNativeComponent.js +2 -2
  647. package/src/private/specs_DEPRECATED/components/PullToRefreshViewNativeComponent.js +2 -2
  648. package/src/private/specs_DEPRECATED/components/RCTInputAccessoryViewNativeComponent.js +2 -2
  649. package/src/private/specs_DEPRECATED/components/RCTModalHostViewNativeComponent.js +2 -2
  650. package/src/private/specs_DEPRECATED/components/RCTSafeAreaViewNativeComponent.js +2 -2
  651. package/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js +2 -2
  652. package/src/private/specs_DEPRECATED/components/UnimplementedNativeViewNativeComponent.js +2 -2
  653. package/src/private/specs_DEPRECATED/modules/NativeAccessibilityInfo.js +1 -1
  654. package/src/private/specs_DEPRECATED/modules/NativeAccessibilityManager.js +1 -1
  655. package/src/private/specs_DEPRECATED/modules/NativeActionSheetManager.js +1 -1
  656. package/src/private/specs_DEPRECATED/modules/NativeAlertManager.js +1 -1
  657. package/src/private/specs_DEPRECATED/modules/NativeAppState.js +1 -1
  658. package/src/private/specs_DEPRECATED/modules/NativeAppearance.js +1 -1
  659. package/src/private/specs_DEPRECATED/modules/NativeBlobModule.js +1 -1
  660. package/src/private/specs_DEPRECATED/modules/NativeClipboard.js +1 -1
  661. package/src/private/specs_DEPRECATED/modules/NativeDevLoadingView.js +1 -1
  662. package/src/private/specs_DEPRECATED/modules/NativeDevSettings.js +1 -1
  663. package/src/private/specs_DEPRECATED/modules/NativeDeviceEventManager.js +1 -1
  664. package/src/private/specs_DEPRECATED/modules/NativeDialogManagerAndroid.js +1 -1
  665. package/src/private/specs_DEPRECATED/modules/NativeFileReaderModule.js +2 -2
  666. package/src/private/specs_DEPRECATED/modules/NativeFrameRateLogger.js +1 -1
  667. package/src/private/specs_DEPRECATED/modules/NativeHeadlessJsTaskSupport.js +1 -1
  668. package/src/private/specs_DEPRECATED/modules/NativeI18nManager.js +1 -1
  669. package/src/private/specs_DEPRECATED/modules/NativeImageEditor.js +2 -2
  670. package/src/private/specs_DEPRECATED/modules/NativeImageLoaderAndroid.js +1 -1
  671. package/src/private/specs_DEPRECATED/modules/NativeImageLoaderIOS.js +1 -1
  672. package/src/private/specs_DEPRECATED/modules/NativeImageStoreAndroid.js +2 -2
  673. package/src/private/specs_DEPRECATED/modules/NativeImageStoreIOS.js +2 -2
  674. package/src/private/specs_DEPRECATED/modules/NativeIntentAndroid.js +1 -1
  675. package/src/private/specs_DEPRECATED/modules/NativeJSCHeapCapture.js +1 -1
  676. package/src/private/specs_DEPRECATED/modules/NativeKeyboardObserver.js +1 -1
  677. package/src/private/specs_DEPRECATED/modules/NativeLinkingManager.js +1 -1
  678. package/src/private/specs_DEPRECATED/modules/NativeLogBox.js +1 -1
  679. package/src/private/specs_DEPRECATED/modules/NativeModalManager.js +1 -1
  680. package/src/private/specs_DEPRECATED/modules/NativeNetworkingAndroid.js +1 -1
  681. package/src/private/specs_DEPRECATED/modules/NativeNetworkingIOS.js +1 -1
  682. package/src/private/specs_DEPRECATED/modules/NativePermissionsAndroid.js +1 -1
  683. package/src/private/specs_DEPRECATED/modules/NativePlatformConstantsAndroid.js +2 -2
  684. package/src/private/specs_DEPRECATED/modules/NativePlatformConstantsIOS.js +2 -2
  685. package/src/private/specs_DEPRECATED/modules/NativePushNotificationManagerIOS.js +2 -2
  686. package/src/private/specs_DEPRECATED/modules/NativeRedBox.js +1 -1
  687. package/src/private/specs_DEPRECATED/modules/NativeSampleTurboModule.js +2 -2
  688. package/src/private/specs_DEPRECATED/modules/NativeSegmentFetcher.js +1 -1
  689. package/src/private/specs_DEPRECATED/modules/NativeSettingsManager.js +2 -2
  690. package/src/private/specs_DEPRECATED/modules/NativeShareModule.js +1 -1
  691. package/src/private/specs_DEPRECATED/modules/NativeSoundManager.js +1 -1
  692. package/src/private/specs_DEPRECATED/modules/NativeTiming.js +1 -1
  693. package/src/private/specs_DEPRECATED/modules/NativeToastAndroid.js +1 -1
  694. package/src/private/specs_DEPRECATED/modules/NativeUIManager.js +1 -1
  695. package/src/private/specs_DEPRECATED/modules/NativeVibration.js +1 -1
  696. package/src/private/specs_DEPRECATED/modules/NativeWebSocketModule.js +2 -2
  697. package/src/private/styles/composeStyles.js +1 -1
  698. package/src/private/types/HostComponent.js +1 -1
  699. package/src/private/utilities/toExtendedError.js +1 -1
  700. package/src/private/viewtransition/specs/NativeViewTransition.js +33 -0
  701. package/src/private/webapis/dom/events/Event.js +10 -1
  702. package/src/private/webapis/dom/events/EventTarget.js +60 -18
  703. package/src/private/webapis/dom/events/internals/EventInternals.js +18 -1
  704. package/src/private/webapis/dom/events/internals/EventTargetInternals.js +12 -0
  705. package/src/private/webapis/dom/nodes/ReactNativeElement.js +24 -0
  706. package/src/private/webapis/dom/nodes/ReadOnlyElement.js +4 -6
  707. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +70 -1
  708. package/src/private/webapis/dom/nodes/internals/NodeInternals.js +10 -0
  709. package/src/private/webapis/dom/nodes/specs/NativeDOM.js +1 -1
  710. package/src/private/webapis/idlecallbacks/specs/NativeIdleCallbacks.js +2 -2
  711. package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +5 -9
  712. package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +2 -2
  713. package/src/private/webapis/microtasks/specs/NativeMicrotasks.js +2 -2
  714. package/src/private/webapis/mutationobserver/specs/NativeMutationObserver.js +2 -2
  715. package/src/private/webapis/performance/internals/RawPerformanceEntry.js +1 -1
  716. package/src/private/webapis/performance/specs/NativePerformance.js +1 -1
  717. package/src/private/webapis/structuredClone/structuredClone.js +1 -1
  718. package/src/private/webapis/webidl/PlatformObjects.js +4 -4
  719. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +0 -19669
  720. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +0 -11129
  721. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +0 -12930
  722. package/Libraries/Renderer/shims/ReactNative.js +0 -27
  723. package/Libraries/Utilities/GlobalPerformanceLogger.js +0 -24
  724. package/Libraries/Utilities/PerformanceLoggerContext.js +0 -33
  725. package/Libraries/Utilities/createPerformanceLogger.js +0 -329
  726. package/ReactAndroid/src/main/java/com/facebook/react/bridge/JavaMethodWrapper.kt +0 -442
  727. package/ReactAndroid/src/main/java/com/facebook/react/modules/blob/BlobCollector.kt +0 -31
  728. package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactHorizontalScrollContainerLegacyView.kt +0 -47
  729. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaConfigJNIFinalizer.java +0 -31
  730. package/ReactAndroid/src/main/java/com/facebook/yoga/YogaNodeJNIFinalizer.java +0 -35
  731. package/ReactCommon/react/renderer/graphics/DoubleConversions.cpp +0 -38
@@ -8,6 +8,7 @@
8
8
  #include <yoga/Yoga.h>
9
9
  #include <yoga/debug/AssertFatal.h>
10
10
  #include <yoga/node/Node.h>
11
+ #include <yoga/style/GridTrack.h>
11
12
 
12
13
  using namespace facebook;
13
14
  using namespace facebook::yoga;
@@ -74,6 +75,24 @@ YGJustify YGNodeStyleGetJustifyContent(const YGNodeConstRef node) {
74
75
  return unscopedEnum(resolveRef(node)->style().justifyContent());
75
76
  }
76
77
 
78
+ void YGNodeStyleSetJustifyItems(YGNodeRef node, const YGJustify justifyItems) {
79
+ updateStyle<&Style::justifyItems, &Style::setJustifyItems>(
80
+ node, scopedEnum(justifyItems));
81
+ }
82
+
83
+ YGJustify YGNodeStyleGetJustifyItems(const YGNodeConstRef node) {
84
+ return unscopedEnum(resolveRef(node)->style().justifyItems());
85
+ }
86
+
87
+ void YGNodeStyleSetJustifySelf(YGNodeRef node, const YGJustify justifySelf) {
88
+ updateStyle<&Style::justifySelf, &Style::setJustifySelf>(
89
+ node, scopedEnum(justifySelf));
90
+ }
91
+
92
+ YGJustify YGNodeStyleGetJustifySelf(const YGNodeConstRef node) {
93
+ return unscopedEnum(resolveRef(node)->style().justifySelf());
94
+ }
95
+
77
96
  void YGNodeStyleSetAlignContent(
78
97
  const YGNodeRef node,
79
98
  const YGAlign alignContent) {
@@ -503,3 +522,253 @@ void YGNodeStyleSetMaxHeightStretch(const YGNodeRef node) {
503
522
  YGValue YGNodeStyleGetMaxHeight(const YGNodeConstRef node) {
504
523
  return (YGValue)resolveRef(node)->style().maxDimension(Dimension::Height);
505
524
  }
525
+
526
+ // Grid Item Placement Properties
527
+
528
+ void YGNodeStyleSetGridColumnStart(YGNodeRef node, int32_t gridColumnStart) {
529
+ updateStyle<&Style::gridColumnStart, &Style::setGridColumnStart>(
530
+ node, GridLine::fromInteger(gridColumnStart));
531
+ }
532
+
533
+ void YGNodeStyleSetGridColumnStartAuto(YGNodeRef node) {
534
+ updateStyle<&Style::gridColumnStart, &Style::setGridColumnStart>(
535
+ node, GridLine::auto_());
536
+ }
537
+
538
+ void YGNodeStyleSetGridColumnStartSpan(YGNodeRef node, int32_t span) {
539
+ updateStyle<&Style::gridColumnStart, &Style::setGridColumnStart>(
540
+ node, GridLine::span(span));
541
+ }
542
+
543
+ int32_t YGNodeStyleGetGridColumnStart(YGNodeConstRef node) {
544
+ const auto& gridLine = resolveRef(node)->style().gridColumnStart();
545
+ return gridLine.isInteger() ? gridLine.integer : 0;
546
+ }
547
+
548
+ void YGNodeStyleSetGridColumnEnd(YGNodeRef node, int32_t gridColumnEnd) {
549
+ updateStyle<&Style::gridColumnEnd, &Style::setGridColumnEnd>(
550
+ node, GridLine::fromInteger(gridColumnEnd));
551
+ }
552
+
553
+ void YGNodeStyleSetGridColumnEndAuto(YGNodeRef node) {
554
+ updateStyle<&Style::gridColumnEnd, &Style::setGridColumnEnd>(
555
+ node, GridLine::auto_());
556
+ }
557
+
558
+ void YGNodeStyleSetGridColumnEndSpan(YGNodeRef node, int32_t span) {
559
+ updateStyle<&Style::gridColumnEnd, &Style::setGridColumnEnd>(
560
+ node, GridLine::span(span));
561
+ }
562
+
563
+ int32_t YGNodeStyleGetGridColumnEnd(YGNodeConstRef node) {
564
+ const auto& gridLine = resolveRef(node)->style().gridColumnEnd();
565
+ return gridLine.isInteger() ? gridLine.integer : 0;
566
+ }
567
+
568
+ void YGNodeStyleSetGridRowStart(YGNodeRef node, int32_t gridRowStart) {
569
+ updateStyle<&Style::gridRowStart, &Style::setGridRowStart>(
570
+ node, GridLine::fromInteger(gridRowStart));
571
+ }
572
+
573
+ void YGNodeStyleSetGridRowStartAuto(YGNodeRef node) {
574
+ updateStyle<&Style::gridRowStart, &Style::setGridRowStart>(
575
+ node, GridLine::auto_());
576
+ }
577
+
578
+ void YGNodeStyleSetGridRowStartSpan(YGNodeRef node, int32_t span) {
579
+ updateStyle<&Style::gridRowStart, &Style::setGridRowStart>(
580
+ node, GridLine::span(span));
581
+ }
582
+
583
+ int32_t YGNodeStyleGetGridRowStart(YGNodeConstRef node) {
584
+ const auto& gridLine = resolveRef(node)->style().gridRowStart();
585
+ return gridLine.isInteger() ? gridLine.integer : 0;
586
+ }
587
+
588
+ void YGNodeStyleSetGridRowEnd(YGNodeRef node, int32_t gridRowEnd) {
589
+ updateStyle<&Style::gridRowEnd, &Style::setGridRowEnd>(
590
+ node, GridLine::fromInteger(gridRowEnd));
591
+ }
592
+
593
+ void YGNodeStyleSetGridRowEndAuto(YGNodeRef node) {
594
+ updateStyle<&Style::gridRowEnd, &Style::setGridRowEnd>(
595
+ node, GridLine::auto_());
596
+ }
597
+
598
+ void YGNodeStyleSetGridRowEndSpan(YGNodeRef node, int32_t span) {
599
+ updateStyle<&Style::gridRowEnd, &Style::setGridRowEnd>(
600
+ node, GridLine::span(span));
601
+ }
602
+
603
+ int32_t YGNodeStyleGetGridRowEnd(YGNodeConstRef node) {
604
+ const auto& gridLine = resolveRef(node)->style().gridRowEnd();
605
+ return gridLine.isInteger() ? gridLine.integer : 0;
606
+ }
607
+
608
+ // Grid Container Properties
609
+
610
+ namespace {
611
+
612
+ GridTrackSize gridTrackSizeFromTypeAndValue(YGGridTrackType type, float value) {
613
+ switch (type) {
614
+ case YGGridTrackTypePoints:
615
+ return GridTrackSize::length(value);
616
+ case YGGridTrackTypePercent:
617
+ return GridTrackSize::percent(value);
618
+ case YGGridTrackTypeFr:
619
+ return GridTrackSize::fr(value);
620
+ case YGGridTrackTypeAuto:
621
+ return GridTrackSize::auto_();
622
+ case YGGridTrackTypeMinmax:
623
+ return GridTrackSize::auto_();
624
+ }
625
+ fatalWithMessage("Unknown YGGridTrackType");
626
+ }
627
+
628
+ StyleSizeLength styleSizeLengthFromTypeAndValue(
629
+ YGGridTrackType type,
630
+ float value) {
631
+ switch (type) {
632
+ case YGGridTrackTypePoints:
633
+ return StyleSizeLength::points(value);
634
+ case YGGridTrackTypePercent:
635
+ return StyleSizeLength::percent(value);
636
+ case YGGridTrackTypeFr:
637
+ return StyleSizeLength::stretch(value);
638
+ case YGGridTrackTypeAuto:
639
+ return StyleSizeLength::ofAuto();
640
+ case YGGridTrackTypeMinmax:
641
+ return StyleSizeLength::ofAuto();
642
+ }
643
+ fatalWithMessage("Unknown YGGridTrackType");
644
+ }
645
+
646
+ } // namespace
647
+
648
+ // GridTemplateColumns
649
+
650
+ void YGNodeStyleSetGridTemplateColumnsCount(YGNodeRef node, size_t count) {
651
+ resolveRef(node)->style().resizeGridTemplateColumns(count);
652
+ resolveRef(node)->markDirtyAndPropagate();
653
+ }
654
+
655
+ void YGNodeStyleSetGridTemplateColumn(
656
+ YGNodeRef node,
657
+ size_t index,
658
+ YGGridTrackType type,
659
+ float value) {
660
+ resolveRef(node)->style().setGridTemplateColumnAt(
661
+ index, gridTrackSizeFromTypeAndValue(type, value));
662
+ resolveRef(node)->markDirtyAndPropagate();
663
+ }
664
+
665
+ void YGNodeStyleSetGridTemplateColumnMinMax(
666
+ YGNodeRef node,
667
+ size_t index,
668
+ YGGridTrackType minType,
669
+ float minValue,
670
+ YGGridTrackType maxType,
671
+ float maxValue) {
672
+ resolveRef(node)->style().setGridTemplateColumnAt(
673
+ index,
674
+ GridTrackSize::minmax(
675
+ styleSizeLengthFromTypeAndValue(minType, minValue),
676
+ styleSizeLengthFromTypeAndValue(maxType, maxValue)));
677
+ resolveRef(node)->markDirtyAndPropagate();
678
+ }
679
+
680
+ // GridTemplateRows
681
+
682
+ void YGNodeStyleSetGridTemplateRowsCount(YGNodeRef node, size_t count) {
683
+ resolveRef(node)->style().resizeGridTemplateRows(count);
684
+ resolveRef(node)->markDirtyAndPropagate();
685
+ }
686
+
687
+ void YGNodeStyleSetGridTemplateRow(
688
+ YGNodeRef node,
689
+ size_t index,
690
+ YGGridTrackType type,
691
+ float value) {
692
+ resolveRef(node)->style().setGridTemplateRowAt(
693
+ index, gridTrackSizeFromTypeAndValue(type, value));
694
+ resolveRef(node)->markDirtyAndPropagate();
695
+ }
696
+
697
+ void YGNodeStyleSetGridTemplateRowMinMax(
698
+ YGNodeRef node,
699
+ size_t index,
700
+ YGGridTrackType minType,
701
+ float minValue,
702
+ YGGridTrackType maxType,
703
+ float maxValue) {
704
+ resolveRef(node)->style().setGridTemplateRowAt(
705
+ index,
706
+ GridTrackSize::minmax(
707
+ styleSizeLengthFromTypeAndValue(minType, minValue),
708
+ styleSizeLengthFromTypeAndValue(maxType, maxValue)));
709
+ resolveRef(node)->markDirtyAndPropagate();
710
+ }
711
+
712
+ // GridAutoColumns
713
+
714
+ void YGNodeStyleSetGridAutoColumnsCount(YGNodeRef node, size_t count) {
715
+ resolveRef(node)->style().resizeGridAutoColumns(count);
716
+ resolveRef(node)->markDirtyAndPropagate();
717
+ }
718
+
719
+ void YGNodeStyleSetGridAutoColumn(
720
+ YGNodeRef node,
721
+ size_t index,
722
+ YGGridTrackType type,
723
+ float value) {
724
+ resolveRef(node)->style().setGridAutoColumnAt(
725
+ index, gridTrackSizeFromTypeAndValue(type, value));
726
+ resolveRef(node)->markDirtyAndPropagate();
727
+ }
728
+
729
+ void YGNodeStyleSetGridAutoColumnMinMax(
730
+ YGNodeRef node,
731
+ size_t index,
732
+ YGGridTrackType minType,
733
+ float minValue,
734
+ YGGridTrackType maxType,
735
+ float maxValue) {
736
+ resolveRef(node)->style().setGridAutoColumnAt(
737
+ index,
738
+ GridTrackSize::minmax(
739
+ styleSizeLengthFromTypeAndValue(minType, minValue),
740
+ styleSizeLengthFromTypeAndValue(maxType, maxValue)));
741
+ resolveRef(node)->markDirtyAndPropagate();
742
+ }
743
+
744
+ // GridAutoRows
745
+
746
+ void YGNodeStyleSetGridAutoRowsCount(YGNodeRef node, size_t count) {
747
+ resolveRef(node)->style().resizeGridAutoRows(count);
748
+ resolveRef(node)->markDirtyAndPropagate();
749
+ }
750
+
751
+ void YGNodeStyleSetGridAutoRow(
752
+ YGNodeRef node,
753
+ size_t index,
754
+ YGGridTrackType type,
755
+ float value) {
756
+ resolveRef(node)->style().setGridAutoRowAt(
757
+ index, gridTrackSizeFromTypeAndValue(type, value));
758
+ resolveRef(node)->markDirtyAndPropagate();
759
+ }
760
+
761
+ void YGNodeStyleSetGridAutoRowMinMax(
762
+ YGNodeRef node,
763
+ size_t index,
764
+ YGGridTrackType minType,
765
+ float minValue,
766
+ YGGridTrackType maxType,
767
+ float maxValue) {
768
+ resolveRef(node)->style().setGridAutoRowAt(
769
+ index,
770
+ GridTrackSize::minmax(
771
+ styleSizeLengthFromTypeAndValue(minType, minValue),
772
+ styleSizeLengthFromTypeAndValue(maxType, maxValue)));
773
+ resolveRef(node)->markDirtyAndPropagate();
774
+ }
@@ -8,7 +8,7 @@
8
8
  #pragma once
9
9
 
10
10
  #include <stddef.h>
11
-
11
+ #include <yoga/YGEnums.h>
12
12
  #include <yoga/YGNode.h>
13
13
  #include <yoga/YGValue.h>
14
14
 
@@ -29,6 +29,14 @@ YG_EXPORT void YGNodeStyleSetJustifyContent(
29
29
  YGJustify justifyContent);
30
30
  YG_EXPORT YGJustify YGNodeStyleGetJustifyContent(YGNodeConstRef node);
31
31
 
32
+ YG_EXPORT void YGNodeStyleSetJustifyItems(
33
+ YGNodeRef node,
34
+ YGJustify justifyItems);
35
+ YG_EXPORT YGJustify YGNodeStyleGetJustifyItems(YGNodeConstRef node);
36
+
37
+ YG_EXPORT void YGNodeStyleSetJustifySelf(YGNodeRef node, YGJustify justifySelf);
38
+ YG_EXPORT YGJustify YGNodeStyleGetJustifySelf(YGNodeConstRef node);
39
+
32
40
  YG_EXPORT void YGNodeStyleSetAlignContent(YGNodeRef node, YGAlign alignContent);
33
41
  YG_EXPORT YGAlign YGNodeStyleGetAlignContent(YGNodeConstRef node);
34
42
 
@@ -148,4 +156,88 @@ YG_EXPORT YGValue YGNodeStyleGetMaxHeight(YGNodeConstRef node);
148
156
  YG_EXPORT void YGNodeStyleSetAspectRatio(YGNodeRef node, float aspectRatio);
149
157
  YG_EXPORT float YGNodeStyleGetAspectRatio(YGNodeConstRef node);
150
158
 
159
+ // Grid Item Properties
160
+ YG_EXPORT void YGNodeStyleSetGridColumnStart(
161
+ YGNodeRef node,
162
+ int gridColumnStart);
163
+ YG_EXPORT void YGNodeStyleSetGridColumnStartAuto(YGNodeRef node);
164
+ YG_EXPORT void YGNodeStyleSetGridColumnStartSpan(YGNodeRef node, int span);
165
+ YG_EXPORT int YGNodeStyleGetGridColumnStart(YGNodeConstRef node);
166
+
167
+ YG_EXPORT void YGNodeStyleSetGridColumnEnd(YGNodeRef node, int gridColumnEnd);
168
+ YG_EXPORT void YGNodeStyleSetGridColumnEndAuto(YGNodeRef node);
169
+ YG_EXPORT void YGNodeStyleSetGridColumnEndSpan(YGNodeRef node, int span);
170
+ YG_EXPORT int YGNodeStyleGetGridColumnEnd(YGNodeConstRef node);
171
+
172
+ YG_EXPORT void YGNodeStyleSetGridRowStart(YGNodeRef node, int gridRowStart);
173
+ YG_EXPORT void YGNodeStyleSetGridRowStartAuto(YGNodeRef node);
174
+ YG_EXPORT void YGNodeStyleSetGridRowStartSpan(YGNodeRef node, int span);
175
+ YG_EXPORT int YGNodeStyleGetGridRowStart(YGNodeConstRef node);
176
+
177
+ YG_EXPORT void YGNodeStyleSetGridRowEnd(YGNodeRef node, int gridRowEnd);
178
+ YG_EXPORT void YGNodeStyleSetGridRowEndAuto(YGNodeRef node);
179
+ YG_EXPORT void YGNodeStyleSetGridRowEndSpan(YGNodeRef node, int span);
180
+ YG_EXPORT int YGNodeStyleGetGridRowEnd(YGNodeConstRef node);
181
+
182
+ // Grid Container Properties
183
+ YG_EXPORT void YGNodeStyleSetGridTemplateColumnsCount(
184
+ YGNodeRef node,
185
+ size_t count);
186
+ YG_EXPORT void YGNodeStyleSetGridTemplateColumn(
187
+ YGNodeRef node,
188
+ size_t index,
189
+ YGGridTrackType type,
190
+ float value);
191
+ YG_EXPORT void YGNodeStyleSetGridTemplateColumnMinMax(
192
+ YGNodeRef node,
193
+ size_t index,
194
+ YGGridTrackType minType,
195
+ float minValue,
196
+ YGGridTrackType maxType,
197
+ float maxValue);
198
+
199
+ YG_EXPORT void YGNodeStyleSetGridTemplateRowsCount(
200
+ YGNodeRef node,
201
+ size_t count);
202
+ YG_EXPORT void YGNodeStyleSetGridTemplateRow(
203
+ YGNodeRef node,
204
+ size_t index,
205
+ YGGridTrackType type,
206
+ float value);
207
+ YG_EXPORT void YGNodeStyleSetGridTemplateRowMinMax(
208
+ YGNodeRef node,
209
+ size_t index,
210
+ YGGridTrackType minType,
211
+ float minValue,
212
+ YGGridTrackType maxType,
213
+ float maxValue);
214
+
215
+ YG_EXPORT void YGNodeStyleSetGridAutoColumnsCount(YGNodeRef node, size_t count);
216
+ YG_EXPORT void YGNodeStyleSetGridAutoColumn(
217
+ YGNodeRef node,
218
+ size_t index,
219
+ YGGridTrackType type,
220
+ float value);
221
+ YG_EXPORT void YGNodeStyleSetGridAutoColumnMinMax(
222
+ YGNodeRef node,
223
+ size_t index,
224
+ YGGridTrackType minType,
225
+ float minValue,
226
+ YGGridTrackType maxType,
227
+ float maxValue);
228
+
229
+ YG_EXPORT void YGNodeStyleSetGridAutoRowsCount(YGNodeRef node, size_t count);
230
+ YG_EXPORT void YGNodeStyleSetGridAutoRow(
231
+ YGNodeRef node,
232
+ size_t index,
233
+ YGGridTrackType type,
234
+ float value);
235
+ YG_EXPORT void YGNodeStyleSetGridAutoRowMinMax(
236
+ YGNodeRef node,
237
+ size_t index,
238
+ YGGridTrackType minType,
239
+ float minValue,
240
+ YGGridTrackType maxType,
241
+ float maxValue);
242
+
151
243
  YG_EXTERN_C_END
@@ -23,7 +23,11 @@ static inline void setFlexStartLayoutPosition(
23
23
  axis, direction, containingBlockWidth) +
24
24
  parent->getLayout().border(flexStartEdge(axis));
25
25
 
26
- if (!child->hasErrata(Errata::AbsolutePositionWithoutInsetsExcludesPadding)) {
26
+ // https://www.w3.org/TR/css-grid-1/#abspos
27
+ // absolute positioned grid items are positioned relative to the padding edge
28
+ // of the grid container
29
+ if (!child->hasErrata(Errata::AbsolutePositionWithoutInsetsExcludesPadding) &&
30
+ parent->style().display() != Display::Grid) {
27
31
  position += parent->getLayout().padding(flexStartEdge(axis));
28
32
  }
29
33
 
@@ -40,7 +44,11 @@ static inline void setFlexEndLayoutPosition(
40
44
  child->style().computeFlexEndMargin(
41
45
  axis, direction, containingBlockWidth);
42
46
 
43
- if (!child->hasErrata(Errata::AbsolutePositionWithoutInsetsExcludesPadding)) {
47
+ // https://www.w3.org/TR/css-grid-1/#abspos
48
+ // absolute positioned grid items are positioned relative to the padding edge
49
+ // of the grid container
50
+ if (!child->hasErrata(Errata::AbsolutePositionWithoutInsetsExcludesPadding) &&
51
+ parent->style().display() != Display::Grid) {
44
52
  flexEndPosition += parent->getLayout().padding(flexEndEdge(axis));
45
53
  }
46
54
 
@@ -60,7 +68,11 @@ static inline void setCenterLayoutPosition(
60
68
  parent->getLayout().border(flexStartEdge(axis)) -
61
69
  parent->getLayout().border(flexEndEdge(axis));
62
70
 
63
- if (!child->hasErrata(Errata::AbsolutePositionWithoutInsetsExcludesPadding)) {
71
+ // https://www.w3.org/TR/css-grid-1/#abspos
72
+ // absolute positioned grid items are positioned relative to the padding edge
73
+ // of the grid container
74
+ if (!child->hasErrata(Errata::AbsolutePositionWithoutInsetsExcludesPadding) &&
75
+ parent->style().display() != Display::Grid) {
64
76
  parentContentBoxSize -= parent->getLayout().padding(flexStartEdge(axis));
65
77
  parentContentBoxSize -= parent->getLayout().padding(flexEndEdge(axis));
66
78
  }
@@ -74,7 +86,11 @@ static inline void setCenterLayoutPosition(
74
86
  child->style().computeFlexStartMargin(
75
87
  axis, direction, containingBlockWidth);
76
88
 
77
- if (!child->hasErrata(Errata::AbsolutePositionWithoutInsetsExcludesPadding)) {
89
+ // https://www.w3.org/TR/css-grid-1/#abspos
90
+ // absolute positioned grid items are positioned relative to the padding edge
91
+ // of the grid container
92
+ if (!child->hasErrata(Errata::AbsolutePositionWithoutInsetsExcludesPadding) &&
93
+ parent->style().display() != Display::Grid) {
78
94
  position += parent->getLayout().padding(flexStartEdge(axis));
79
95
  }
80
96
 
@@ -87,13 +103,19 @@ static void justifyAbsoluteChild(
87
103
  const Direction direction,
88
104
  const FlexDirection mainAxis,
89
105
  const float containingBlockWidth) {
90
- const Justify parentJustifyContent = parent->style().justifyContent();
91
- switch (parentJustifyContent) {
106
+ const Justify justify = parent->style().display() == Display::Grid
107
+ ? resolveChildJustification(parent, child)
108
+ : parent->style().justifyContent();
109
+ switch (justify) {
110
+ case Justify::Start:
111
+ case Justify::Auto:
112
+ case Justify::Stretch:
92
113
  case Justify::FlexStart:
93
114
  case Justify::SpaceBetween:
94
115
  setFlexStartLayoutPosition(
95
116
  parent, child, direction, mainAxis, containingBlockWidth);
96
117
  break;
118
+ case Justify::End:
97
119
  case Justify::FlexEnd:
98
120
  setFlexEndLayoutPosition(
99
121
  parent, child, direction, mainAxis, containingBlockWidth);
@@ -124,6 +146,7 @@ static void alignAbsoluteChild(
124
146
  }
125
147
 
126
148
  switch (itemAlign) {
149
+ case Align::Start:
127
150
  case Align::Auto:
128
151
  case Align::FlexStart:
129
152
  case Align::Baseline:
@@ -134,6 +157,7 @@ static void alignAbsoluteChild(
134
157
  setFlexStartLayoutPosition(
135
158
  parent, child, direction, crossAxis, containingBlockWidth);
136
159
  break;
160
+ case Align::End:
137
161
  case Align::FlexEnd:
138
162
  setFlexEndLayoutPosition(
139
163
  parent, child, direction, crossAxis, containingBlockWidth);
@@ -234,9 +258,15 @@ void layoutAbsoluteChild(
234
258
  LayoutData& layoutMarkerData,
235
259
  const uint32_t depth,
236
260
  const uint32_t generationCount) {
237
- const FlexDirection mainAxis =
238
- resolveDirection(node->style().flexDirection(), direction);
239
- const FlexDirection crossAxis = resolveCrossDirection(mainAxis, direction);
261
+ // For grid containers, use inline (Row) and block (Column) axes for
262
+ // positioning, since grid alignment properties (justify-self, align-self)
263
+ // operate on inline/block axes, not main/cross axes based on flex-direction.
264
+ const FlexDirection mainAxis = node->style().display() == Display::Grid
265
+ ? resolveDirection(FlexDirection::Row, direction)
266
+ : resolveDirection(node->style().flexDirection(), direction);
267
+ const FlexDirection crossAxis = node->style().display() == Display::Grid
268
+ ? FlexDirection::Column
269
+ : resolveCrossDirection(mainAxis, direction);
240
270
  const bool isMainAxisRow = isRow(mainAxis);
241
271
 
242
272
  float childWidth = YGUndefined;
@@ -528,6 +558,7 @@ bool layoutAbsoluteDescendants(
528
558
  // we need to mutate these descendents. Make sure the path of
529
559
  // nodes to them is mutable before positioning.
530
560
  child->cloneChildrenIfNeeded();
561
+ cleanupContentsNodesRecursively(child);
531
562
  const Direction childDirection =
532
563
  child->resolveDirection(currentNodeDirection);
533
564
  // By now all descendants of the containing block that are not absolute
@@ -20,12 +20,23 @@ inline Align resolveChildAlignment(
20
20
  const Align align = child->style().alignSelf() == Align::Auto
21
21
  ? node->style().alignItems()
22
22
  : child->style().alignSelf();
23
- if (align == Align::Baseline && isColumn(node->style().flexDirection())) {
23
+
24
+ if (node->style().display() == Display::Flex && align == Align::Baseline &&
25
+ isColumn(node->style().flexDirection())) {
24
26
  return Align::FlexStart;
25
27
  }
28
+
26
29
  return align;
27
30
  }
28
31
 
32
+ inline Justify resolveChildJustification(
33
+ const yoga::Node* node,
34
+ const yoga::Node* child) {
35
+ return child->style().justifySelf() == Justify::Auto
36
+ ? node->style().justifyItems()
37
+ : child->style().justifySelf();
38
+ }
39
+
29
40
  /**
30
41
  * Fallback alignment to use on overflow
31
42
  * https://www.w3.org/TR/css-align-3/#distribution-values