react-native-windows 0.76.3 → 0.77.0-preview.1

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 (369) hide show
  1. package/.flowconfig +5 -1
  2. package/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +1 -0
  3. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +13 -0
  4. package/Libraries/Animated/AnimatedEvent.js +1 -1
  5. package/Libraries/Animated/AnimatedImplementation.js +2 -2
  6. package/Libraries/Animated/NativeAnimatedAllowlist.js +20 -9
  7. package/Libraries/Animated/NativeAnimatedAllowlist.windows.js +122 -0
  8. package/Libraries/Animated/animations/Animation.js +60 -25
  9. package/Libraries/Animated/animations/DecayAnimation.js +26 -38
  10. package/Libraries/Animated/animations/SpringAnimation.js +33 -39
  11. package/Libraries/Animated/animations/TimingAnimation.js +34 -42
  12. package/Libraries/Animated/components/AnimatedFlatList.js +1 -1
  13. package/Libraries/Animated/components/AnimatedSectionList.js +3 -1
  14. package/Libraries/Animated/createAnimatedComponent.js +60 -33
  15. package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
  16. package/Libraries/Animated/nodes/AnimatedInterpolation.js +1 -1
  17. package/Libraries/Animated/nodes/AnimatedNode.js +39 -45
  18. package/Libraries/Animated/nodes/AnimatedObject.js +13 -3
  19. package/Libraries/Animated/nodes/AnimatedProps.js +96 -46
  20. package/Libraries/Animated/nodes/AnimatedProps.windows.js +281 -0
  21. package/Libraries/Animated/nodes/AnimatedStyle.js +108 -39
  22. package/Libraries/Animated/nodes/AnimatedStyle.windows.js +251 -0
  23. package/Libraries/Animated/nodes/AnimatedTransform.js +56 -23
  24. package/Libraries/Animated/nodes/AnimatedValue.js +1 -1
  25. package/Libraries/Animated/nodes/AnimatedWithChildren.js +1 -3
  26. package/Libraries/Animated/useAnimatedProps.js +41 -35
  27. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +19 -3
  28. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +77 -5
  29. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.windows.js +82 -5
  30. package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +4 -4
  31. package/Libraries/Components/Button.js +9 -4
  32. package/Libraries/Components/Button.windows.js +19 -5
  33. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +3 -1
  34. package/Libraries/Components/Glyph/Glyph.js +2 -1
  35. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +7 -0
  36. package/Libraries/Components/Popup/PopupNativeComponent.js +0 -1
  37. package/Libraries/Components/Pressable/Pressable.js +4 -4
  38. package/Libraries/Components/Pressable/Pressable.windows.js +10 -4
  39. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +13 -7
  40. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +3 -2
  41. package/Libraries/Components/SafeAreaView/SafeAreaView.js +4 -4
  42. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +0 -1
  43. package/Libraries/Components/ScrollView/ScrollView.js +49 -88
  44. package/Libraries/Components/ScrollView/ScrollViewCommands.js +1 -1
  45. package/Libraries/Components/ScrollView/ScrollViewContext.js +2 -0
  46. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +0 -2
  47. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.windows.js +0 -5
  48. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +8 -9
  49. package/Libraries/Components/Switch/Switch.js +8 -6
  50. package/Libraries/Components/Switch/Switch.windows.js +8 -6
  51. package/Libraries/Components/TextInput/InputAccessoryView.js +1 -1
  52. package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +4 -4
  53. package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +6 -4
  54. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +2 -1
  55. package/Libraries/Components/TextInput/TextInput.d.ts +27 -4
  56. package/Libraries/Components/TextInput/TextInput.flow.js +36 -19
  57. package/Libraries/Components/TextInput/TextInput.js +37 -13
  58. package/Libraries/Components/TextInput/TextInput.windows.js +47 -16
  59. package/Libraries/Components/TextInput/TextInputState.js +11 -13
  60. package/Libraries/Components/TextInput/TextInputState.windows.js +11 -13
  61. package/Libraries/Components/Touchable/BoundingDimensions.js +11 -3
  62. package/Libraries/Components/Touchable/Position.js +7 -2
  63. package/Libraries/Components/Touchable/Touchable.js +4 -0
  64. package/Libraries/Components/Touchable/Touchable.windows.js +4 -0
  65. package/Libraries/Components/Touchable/TouchableBounce.js +6 -2
  66. package/Libraries/Components/Touchable/TouchableBounce.windows.js +227 -0
  67. package/Libraries/Components/Touchable/TouchableHighlight.js +5 -5
  68. package/Libraries/Components/Touchable/TouchableHighlight.windows.js +5 -5
  69. package/Libraries/Components/Touchable/TouchableNativeFeedback.windows.js +371 -0
  70. package/Libraries/Components/Touchable/TouchableOpacity.js +6 -5
  71. package/Libraries/Components/Touchable/TouchableOpacity.windows.js +11 -5
  72. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -2
  73. package/Libraries/Components/Touchable/TouchableWithoutFeedback.windows.js +9 -3
  74. package/Libraries/Components/View/ReactNativeStyleAttributes.js +6 -1
  75. package/Libraries/Components/View/View.js +4 -4
  76. package/Libraries/Components/View/View.windows.js +12 -5
  77. package/Libraries/Components/View/ViewAccessibility.d.ts +10 -0
  78. package/Libraries/Components/View/ViewAccessibility.windows.js +2 -0
  79. package/Libraries/Components/View/ViewNativeComponent.js +6 -98
  80. package/Libraries/Components/View/ViewPropTypes.d.ts +7 -0
  81. package/Libraries/Components/View/ViewPropTypes.js +0 -3
  82. package/Libraries/Components/View/ViewPropTypes.windows.js +2 -3
  83. package/Libraries/Core/ExceptionsManager.js +50 -29
  84. package/Libraries/Core/ReactNativeVersion.js +3 -3
  85. package/Libraries/Core/__mocks__/NativeExceptionsManager.js +0 -1
  86. package/Libraries/Core/setUpBatchedBridge.js +1 -10
  87. package/Libraries/Core/setUpDeveloperTools.js +1 -5
  88. package/Libraries/Core/setUpErrorHandling.js +20 -18
  89. package/Libraries/Core/setUpReactDevTools.js +107 -8
  90. package/Libraries/Core/setUpSegmentFetcher.js +1 -0
  91. package/Libraries/Core/setUpTimers.js +21 -18
  92. package/Libraries/Debugging/DebuggingOverlay.js +4 -5
  93. package/Libraries/Image/AssetSourceResolver.js +12 -1
  94. package/Libraries/Image/AssetSourceResolver.windows.js +12 -1
  95. package/Libraries/Image/Image.android.js +1 -5
  96. package/Libraries/Image/Image.d.ts +20 -29
  97. package/Libraries/Image/Image.ios.js +0 -2
  98. package/Libraries/Image/Image.windows.js +5 -1
  99. package/Libraries/Image/ImageBackground.js +2 -5
  100. package/Libraries/Image/ImageProps.js +7 -6
  101. package/Libraries/Image/ImageResizeMode.d.ts +8 -1
  102. package/Libraries/Image/ImageResizeMode.js +4 -1
  103. package/Libraries/Image/ImageSource.d.ts +0 -2
  104. package/Libraries/Image/ImageSource.js +0 -2
  105. package/Libraries/Image/ImageTypes.flow.js +11 -9
  106. package/Libraries/Image/ImageUtils.js +6 -3
  107. package/Libraries/Image/ImageViewNativeComponent.js +5 -3
  108. package/Libraries/Inspector/Inspector.js +1 -0
  109. package/Libraries/Inspector/NetworkOverlay.js +4 -0
  110. package/Libraries/Inspector/ReactDevToolsOverlay.js +8 -14
  111. package/Libraries/Inspector/getInspectorDataForViewAtPoint.js +3 -5
  112. package/Libraries/Interaction/InteractionManager.js +6 -1
  113. package/Libraries/Interaction/InteractionManagerStub.js +176 -0
  114. package/Libraries/Interaction/TouchHistoryMath.js +22 -19
  115. package/Libraries/JSInspector/NetworkAgent.js +1 -1
  116. package/Libraries/Lists/FlatList.d.ts +1 -2
  117. package/Libraries/Lists/FlatList.js +2 -2
  118. package/Libraries/Lists/SectionListModern.js +7 -7
  119. package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +2 -2
  120. package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +1 -1
  121. package/Libraries/LogBox/Data/LogBoxData.js +3 -3
  122. package/Libraries/LogBox/LogBox.js +18 -5
  123. package/Libraries/LogBox/LogBoxInspectorContainer.js +1 -1
  124. package/Libraries/LogBox/LogBoxNotificationContainer.js +2 -2
  125. package/Libraries/LogBox/UI/AnsiHighlight.js +26 -17
  126. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +6 -1
  127. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.windows.js +6 -1
  128. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -1
  129. package/Libraries/LogBox/UI/LogBoxInspectorHeader.windows.js +1 -1
  130. package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +1 -1
  131. package/Libraries/LogBox/UI/LogBoxMessage.js +2 -2
  132. package/Libraries/Modal/Modal.d.ts +12 -0
  133. package/Libraries/Modal/Modal.js +31 -4
  134. package/Libraries/Modal/Modal.windows.js +18 -0
  135. package/Libraries/NativeComponent/BaseViewConfig.android.js +72 -1
  136. package/Libraries/NativeComponent/BaseViewConfig.ios.js +2 -1
  137. package/Libraries/NativeComponent/BaseViewConfig.windows.js +3 -11
  138. package/Libraries/NativeComponent/NativeComponentRegistry.js +3 -3
  139. package/Libraries/NativeComponent/StaticViewConfigValidator.js +0 -1
  140. package/Libraries/Network/XHRInterceptor.js +63 -14
  141. package/Libraries/Network/XMLHttpRequest.js +26 -1
  142. package/Libraries/NewAppScreen/components/HermesBadge.js +1 -1
  143. package/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +49 -2
  144. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +4 -4
  145. package/Libraries/Pressability/HoverState.js +2 -0
  146. package/Libraries/Pressability/Pressability.js +2 -3
  147. package/Libraries/Pressability/Pressability.windows.js +2 -3
  148. package/Libraries/Pressability/usePressability.js +4 -1
  149. package/Libraries/ReactNative/AppContainer.js +1 -1
  150. package/Libraries/ReactNative/AppRegistry.js +1 -11
  151. package/Libraries/ReactNative/DisplayMode.js +1 -1
  152. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +2 -3
  153. package/Libraries/ReactNative/RendererImplementation.js +18 -17
  154. package/Libraries/ReactNative/getCachedComponentWithDebugName.js +1 -3
  155. package/Libraries/ReactNative/renderApplication.js +9 -8
  156. package/Libraries/ReactNative/requireNativeComponent.js +5 -2
  157. package/Libraries/Renderer/shims/ReactFabric.js +3 -3
  158. package/Libraries/Renderer/shims/ReactFeatureFlags.js +2 -2
  159. package/Libraries/Renderer/shims/ReactNative.js +3 -3
  160. package/Libraries/Renderer/shims/ReactNativeTypes.js +22 -35
  161. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +5 -6
  162. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +2 -2
  163. package/Libraries/StyleSheet/StyleSheet.js +7 -1
  164. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +13 -2
  165. package/Libraries/StyleSheet/StyleSheetTypes.js +24 -6
  166. package/Libraries/StyleSheet/processBackgroundImage.js +87 -110
  167. package/Libraries/StyleSheet/processTransform.js +3 -34
  168. package/Libraries/Text/Text.js +248 -249
  169. package/Libraries/Text/Text.windows.js +298 -292
  170. package/Libraries/Text/TextNativeComponent.js +0 -1
  171. package/Libraries/Text/TextProps.windows.js +2 -0
  172. package/Libraries/TurboModule/TurboModuleRegistry.js +5 -5
  173. package/Libraries/Types/CoreEventTypes.d.ts +3 -10
  174. package/Libraries/Types/CoreEventTypes.js +4 -6
  175. package/Libraries/Types/CoreEventTypes.windows.js +4 -6
  176. package/Libraries/Utilities/Appearance.js +3 -1
  177. package/Libraries/Utilities/BackHandler.android.js +6 -18
  178. package/Libraries/Utilities/BackHandler.d.ts +0 -4
  179. package/Libraries/Utilities/BackHandler.ios.js +0 -7
  180. package/Libraries/Utilities/BackHandler.windows.js +6 -18
  181. package/Libraries/Utilities/HMRClient.js +3 -4
  182. package/Libraries/Utilities/Platform.flow.js +2 -2
  183. package/Libraries/Utilities/Platform.flow.windows.js +3 -2
  184. package/Libraries/Utilities/__mocks__/BackHandler.js +3 -8
  185. package/Libraries/Utilities/codegenNativeComponent.js +1 -1
  186. package/Libraries/Utilities/useMergeRefs.js +26 -7
  187. package/Libraries/WebSocket/WebSocketEvent.js +4 -1
  188. package/Libraries/WebSocket/WebSocketInterceptor.js +31 -13
  189. package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +6 -5
  190. package/Libraries/promiseRejectionTrackingOptions.js +1 -1
  191. package/Microsoft.ReactNative/AsynchronousEventBeat.cpp +9 -8
  192. package/Microsoft.ReactNative/AsynchronousEventBeat.h +5 -5
  193. package/Microsoft.ReactNative/FBReactNativeSpec/FBReactNativeSpecJSI.h +5 -0
  194. package/Microsoft.ReactNative/Fabric/AbiComponentDescriptor.cpp +2 -2
  195. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp +197 -18
  196. package/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.h +19 -1
  197. package/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp +13 -0
  198. package/Microsoft.ReactNative/Fabric/Composition/ReactNativeIsland.cpp +1 -1
  199. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentDescriptor.h +6 -8
  200. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputComponentView.cpp +2 -2
  201. package/Microsoft.ReactNative/Fabric/Composition/TextInput/WindowsTextInputShadowNode.cpp +3 -2
  202. package/Microsoft.ReactNative/Fabric/Composition/TooltipService.cpp +1 -1
  203. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.cpp +24 -0
  204. package/Microsoft.ReactNative/Fabric/Composition/UiaHelpers.h +5 -0
  205. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.cpp +12 -12
  206. package/Microsoft.ReactNative/Fabric/FabricUIManagerModule.h +4 -4
  207. package/Microsoft.ReactNative/Fabric/ImageRequest.cpp +4 -8
  208. package/Microsoft.ReactNative/Fabric/platform/react/renderer/components/view/HostPlatformViewProps.cpp +16 -15
  209. package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.cpp +15 -0
  210. package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.h +9 -0
  211. package/Microsoft.ReactNative/ReactHost/ReactHost.cpp +20 -1
  212. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +11 -6
  213. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.h +1 -1
  214. package/Microsoft.ReactNative/SynchronousEventBeat.cpp +14 -4
  215. package/Microsoft.ReactNative/SynchronousEventBeat.h +4 -2
  216. package/Microsoft.ReactNative.Cxx/ApiLoaders/JSRuntimeApi.cpp +78 -0
  217. package/Microsoft.ReactNative.Cxx/ApiLoaders/JSRuntimeApi.h +51 -0
  218. package/Microsoft.ReactNative.Cxx/ApiLoaders/JSRuntimeApi.inc +48 -0
  219. package/Microsoft.ReactNative.Cxx/ApiLoaders/NodeApi.cpp +41 -0
  220. package/Microsoft.ReactNative.Cxx/ApiLoaders/NodeApi.h +127 -0
  221. package/Microsoft.ReactNative.Cxx/ApiLoaders/NodeApi.inc +125 -0
  222. package/Microsoft.ReactNative.Cxx/ApiLoaders/NodeApi_posix.cpp +16 -0
  223. package/Microsoft.ReactNative.Cxx/ApiLoaders/NodeApi_win.cpp +23 -0
  224. package/Microsoft.ReactNative.Cxx/JSI/decorator.h +834 -0
  225. package/Microsoft.ReactNative.Cxx/JSI/instrumentation.h +117 -0
  226. package/Microsoft.ReactNative.Cxx/JSI/jsi-inl.h +366 -0
  227. package/Microsoft.ReactNative.Cxx/JSI/jsi.cpp +560 -0
  228. package/Microsoft.ReactNative.Cxx/JSI/jsi.h +1611 -0
  229. package/Microsoft.ReactNative.Cxx/JSI/threadsafe.h +79 -0
  230. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems +7 -11
  231. package/Microsoft.ReactNative.Cxx/Microsoft.ReactNative.Cxx.vcxitems.filters +1 -1
  232. package/Microsoft.ReactNative.Cxx/NodeApiJsiRuntime.cpp +2878 -0
  233. package/Microsoft.ReactNative.Cxx/NodeApiJsiRuntime.h +36 -0
  234. package/Microsoft.ReactNative.Cxx/ReactCommon/CallInvoker.h +64 -0
  235. package/Microsoft.ReactNative.Cxx/ReactCommon/SchedulerPriority.h +22 -0
  236. package/{ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core → Microsoft.ReactNative.Cxx}/ReactCommon/TurboModule.cpp +63 -63
  237. package/Microsoft.ReactNative.Cxx/ReactCommon/TurboModule.h +165 -0
  238. package/Microsoft.ReactNative.Cxx/ReactCommon/TurboModuleUtils.cpp +105 -0
  239. package/{ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core → Microsoft.ReactNative.Cxx}/ReactCommon/TurboModuleUtils.h +57 -58
  240. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/AString.h +42 -0
  241. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Array.h +151 -0
  242. package/{ReactCommon/TEMP_UntilReactCommonUpdate → Microsoft.ReactNative.Cxx/ReactCommon}/react/bridging/Base.h +177 -154
  243. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Bool.h +25 -0
  244. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Bridging.h +21 -0
  245. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/CallbackWrapper.h +67 -0
  246. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Class.h +90 -0
  247. package/{ReactCommon/TEMP_UntilReactCommonUpdate → Microsoft.ReactNative.Cxx/ReactCommon}/react/bridging/Convert.h +170 -172
  248. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Error.h +51 -0
  249. package/{ReactCommon/TEMP_UntilReactCommonUpdate → Microsoft.ReactNative.Cxx/ReactCommon}/react/bridging/EventEmitter.h +134 -136
  250. package/{ReactCommon/TEMP_UntilReactCommonUpdate → Microsoft.ReactNative.Cxx/ReactCommon}/react/bridging/Function.h +283 -283
  251. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/LongLivedObject.cpp +63 -0
  252. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/LongLivedObject.h +61 -0
  253. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Object.h +93 -0
  254. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Promise.h +104 -0
  255. package/Microsoft.ReactNative.Cxx/ReactCommon/react/bridging/Value.h +107 -0
  256. package/Microsoft.ReactNative.Cxx/ReactCommon/react/debug/flags.h +22 -0
  257. package/Microsoft.ReactNative.Cxx/ReactCommon/react/debug/react_native_assert.h +72 -0
  258. package/Microsoft.ReactNative.Cxx/node-api/js_native_api.h +553 -0
  259. package/Microsoft.ReactNative.Cxx/node-api/js_native_api_types.h +167 -0
  260. package/Microsoft.ReactNative.Cxx/node-api/js_runtime_api.h +186 -0
  261. package/Microsoft.ReactNative.Cxx/stubs/glog/logging.h +82 -0
  262. package/PropertySheets/Bundle.Common.targets +1 -1
  263. package/PropertySheets/Bundle.props +3 -0
  264. package/PropertySheets/Generated/PackageVersion.g.props +4 -4
  265. package/PropertySheets/ManagedCodeGen/Microsoft.ReactNative.Managed.CodeGen.targets +1 -1
  266. package/PropertySheets/OutputMSBuildProperties.targets +3 -1
  267. package/ReactCommon/ReactCommon.vcxproj +5 -0
  268. package/ReactCommon/TEMP_UntilReactCommonUpdate/cxxreact/JSExecutor.cpp +2 -3
  269. package/ReactCommon/TEMP_UntilReactCommonUpdate/jsi/jsi/test/testlib.cpp +61 -0
  270. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/nativemodule/core/ReactCommon/TurboModule.h +26 -23
  271. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/componentregistry/ComponentDescriptorRegistry.cpp +150 -0
  272. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/AccessibilityPrimitives.h +252 -0
  273. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/view/accessibilityPropsConversions.h +795 -0
  274. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/runtimescheduler/SchedulerPriorityUtils.h +59 -0
  275. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/runtime/ReactInstance.cpp +188 -39
  276. package/Scripts/Microsoft.ReactNative.Managed.CodeGen.targets +1 -1
  277. package/Scripts/Tfs/Layout-MSRN-Headers.ps1 +97 -62
  278. package/Shared/InspectorPackagerConnection.cpp +3 -6
  279. package/Shared/InspectorPackagerConnection.h +2 -2
  280. package/Shared/InstanceManager.h +1 -1
  281. package/Shared/OInstance.h +1 -1
  282. package/Shared/Shared.vcxitems +17 -2
  283. package/Shared/Shared.vcxitems.filters +3 -1
  284. package/Shared/TurboModuleManager.cpp +29 -4
  285. package/codegen/NativeAccessibilityInfoSpec.g.h +27 -9
  286. package/codegen/NativeAccessibilityManagerSpec.g.h +19 -13
  287. package/codegen/NativeActionSheetManagerSpec.g.h +4 -0
  288. package/codegen/NativeExceptionsManagerSpec.g.h +1 -7
  289. package/codegen/NativeIntersectionObserverSpec.g.h +2 -0
  290. package/codegen/NativePerformanceSpec.g.h +127 -3
  291. package/codegen/NativeReactDevToolsRuntimeSettingsModuleSpec.g.h +67 -0
  292. package/codegen/NativeReactDevToolsSettingsManagerSpec.g.h +41 -0
  293. package/codegen/NativeReactNativeFeatureFlagsSpec.g.h +125 -137
  294. package/codegen/react/components/rnwcore/ComponentDescriptors.h +0 -1
  295. package/codegen/react/components/rnwcore/Props.cpp +1 -0
  296. package/codegen/react/components/rnwcore/Props.h +1 -0
  297. package/codegen/react/components/rnwcore/ShadowNodes.cpp +0 -1
  298. package/codegen/react/components/rnwcore/ShadowNodes.h +0 -11
  299. package/codegen/react/components/rnwcore/States.h +0 -12
  300. package/codegen/rnwcoreJSI-generated.cpp +219 -186
  301. package/codegen/rnwcoreJSI.h +942 -511
  302. package/index.js +10 -3
  303. package/index.windows.js +10 -3
  304. package/jest/setup.js +36 -1
  305. package/just-task.js +15 -0
  306. package/package.json +22 -22
  307. package/src/private/animated/NativeAnimatedHelper.js +18 -16
  308. package/src/private/animated/useAnimatedPropsMemo.js +348 -0
  309. package/src/private/animated/useAnimatedPropsMemo.windows.js +356 -0
  310. package/src/private/components/HScrollViewNativeComponents.js +1 -27
  311. package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +11 -8
  312. package/src/private/components/VScrollViewNativeComponents.js +2 -25
  313. package/src/private/debugging/ReactDevToolsSettingsManager.android.js +20 -0
  314. package/src/private/debugging/ReactDevToolsSettingsManager.ios.js +30 -0
  315. package/src/private/debugging/ReactDevToolsSettingsManager.windows.js +20 -0
  316. package/src/private/{fusebox → debugging}/setUpFuseboxReactDevToolsDispatcher.js +6 -0
  317. package/src/private/devmenu/DevMenu.d.ts +20 -0
  318. package/src/private/devmenu/DevMenu.js +31 -0
  319. package/src/private/featureflags/ReactNativeFeatureFlags.js +95 -86
  320. package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +8 -2
  321. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +17 -19
  322. package/src/private/fusebox/specs/NativeReactDevToolsRuntimeSettingsModule.js +34 -0
  323. package/src/private/setup/setUpDOM.js +14 -6
  324. package/src/private/setup/setUpMutationObserver.js +5 -0
  325. package/src/private/specs/components/AndroidHorizontalScrollContentViewNativeComponent.js +1 -0
  326. package/src/private/specs/components/RCTModalHostViewNativeComponent.js +8 -0
  327. package/src/private/specs/modules/NativeAccessibilityInfo.js +9 -0
  328. package/src/private/specs/modules/NativeAccessibilityManager.js +4 -0
  329. package/src/private/specs/modules/NativeActionSheetManager.js +2 -0
  330. package/src/private/specs/modules/NativeAppearance.js +4 -10
  331. package/src/private/specs/modules/NativeExceptionsManager.js +0 -12
  332. package/src/private/specs/modules/{NativeDevToolsSettingsManager.js → NativeReactDevToolsSettingsManager.js} +3 -5
  333. package/src/private/webapis/dom/geometry/DOMRect.js +2 -2
  334. package/src/private/webapis/dom/geometry/DOMRectReadOnly.js +2 -2
  335. package/src/private/webapis/dom/nodes/ReactNativeElement.js +2 -3
  336. package/src/private/webapis/intersectionobserver/IntersectionObserver.js +102 -11
  337. package/src/private/webapis/intersectionobserver/IntersectionObserverEntry.js +26 -0
  338. package/src/private/webapis/intersectionobserver/IntersectionObserverManager.js +1 -0
  339. package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +1 -0
  340. package/src/private/webapis/intersectionobserver/specs/__mocks__/NativeIntersectionObserver.js +9 -0
  341. package/src/private/webapis/performance/EventTiming.js +13 -8
  342. package/src/private/webapis/performance/Performance.js +66 -73
  343. package/src/private/webapis/performance/PerformanceEntry.js +2 -5
  344. package/src/private/webapis/performance/PerformanceObserver.js +65 -164
  345. package/src/private/webapis/performance/RawPerformanceEntry.js +1 -1
  346. package/src/private/webapis/performance/UserTiming.js +11 -7
  347. package/src/private/webapis/performance/Utilities.js +18 -0
  348. package/src/private/webapis/performance/specs/NativePerformance.js +71 -2
  349. package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +267 -0
  350. package/templates/cpp-lib/template.config.js +13 -7
  351. package/templates/templateUtils.js +10 -0
  352. package/types/index.d.ts +1 -1
  353. package/types/public/ReactNativeTypes.d.ts +4 -8
  354. package/Libraries/DevToolsSettings/DevToolsSettingsManager.android.js +0 -35
  355. package/Libraries/DevToolsSettings/DevToolsSettingsManager.d.ts +0 -20
  356. package/Libraries/DevToolsSettings/DevToolsSettingsManager.ios.js +0 -49
  357. package/Libraries/DevToolsSettings/DevToolsSettingsManager.windows.js +0 -35
  358. package/Libraries/DevToolsSettings/NativeDevToolsSettingsManager.js +0 -13
  359. package/Libraries/ReactNative/ReactFabricInternals.js +0 -17
  360. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/bridging/CallbackWrapper.h +0 -101
  361. package/ReactCommon/TEMP_UntilReactCommonUpdate/react/renderer/components/scrollview/ScrollViewProps.cpp +0 -569
  362. package/codegen/NativeDevToolsSettingsManagerSpec.g.h +0 -53
  363. package/codegen/NativePerformanceObserverSpec.g.h +0 -131
  364. package/src/private/components/useSyncOnScroll.js +0 -48
  365. package/src/private/webapis/performance/specs/NativePerformanceObserver.js +0 -61
  366. package/src/private/webapis/performance/specs/__mocks__/NativePerformance.js +0 -67
  367. package/src/private/webapis/performance/specs/__mocks__/NativePerformanceObserver.js +0 -127
  368. package/types/experimental.d.ts +0 -59
  369. /package/src/private/{fusebox → debugging}/FuseboxSessionObserver.js +0 -0
@@ -12,44 +12,18 @@
12
12
  import type {ScrollViewNativeProps} from '../../../Libraries/Components/ScrollView/ScrollViewNativeComponentType';
13
13
  import type {ViewProps} from '../../../Libraries/Components/View/ViewPropTypes';
14
14
  import type {HostComponent} from '../../../Libraries/Renderer/shims/ReactNativeTypes';
15
- import type {TScrollViewNativeImperativeHandle} from './useSyncOnScroll';
16
15
 
17
16
  import AndroidHorizontalScrollViewNativeComponent from '../../../Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent';
18
17
  import ScrollContentViewNativeComponent from '../../../Libraries/Components/ScrollView/ScrollContentViewNativeComponent';
19
18
  import ScrollViewNativeComponent from '../../../Libraries/Components/ScrollView/ScrollViewNativeComponent';
20
19
  import Platform from '../../../Libraries/Utilities/Platform';
21
20
  import AndroidHorizontalScrollContentViewNativeComponent from '../specs/components/AndroidHorizontalScrollContentViewNativeComponent';
22
- import useSyncOnScroll from './useSyncOnScroll';
23
- import * as React from 'react';
24
- import {forwardRef} from 'react';
25
21
 
26
- const HScrollViewNativeComponentForPlatform =
22
+ export const HScrollViewNativeComponent: HostComponent<ScrollViewNativeProps> =
27
23
  Platform.OS === 'android'
28
24
  ? AndroidHorizontalScrollViewNativeComponent
29
25
  : ScrollViewNativeComponent;
30
26
 
31
- // TODO: After upgrading to React 19, remove `forwardRef` from this component.
32
- export const HScrollViewNativeComponent: React.AbstractComponent<
33
- ScrollViewNativeProps,
34
- TScrollViewNativeImperativeHandle,
35
- // $FlowExpectedError[incompatible-type] - Flow cannot model imperative handles, yet.
36
- > = forwardRef(function HScrollViewNativeComponent(
37
- props: ScrollViewNativeProps,
38
- ref: ?React.RefSetter<TScrollViewNativeImperativeHandle | null>,
39
- ): React.Node {
40
- const [componentRef, enableSyncOnScroll] = useSyncOnScroll(ref);
41
- // NOTE: When `useSyncOnScroll` triggers an update, `props` will not have
42
- // changed. Notably, `props.children` will be the same, allowing React to
43
- // bail out during reconciliation.
44
- return (
45
- <HScrollViewNativeComponentForPlatform
46
- {...props}
47
- ref={componentRef}
48
- enableSyncOnScroll={enableSyncOnScroll}
49
- />
50
- );
51
- });
52
-
53
27
  export const HScrollContentViewNativeComponent: HostComponent<ViewProps> =
54
28
  Platform.OS === 'android'
55
29
  ? AndroidHorizontalScrollContentViewNativeComponent
@@ -10,19 +10,22 @@
10
10
  */
11
11
 
12
12
  import type {ViewProps} from '../../../Libraries/Components/View/ViewPropTypes';
13
- import Platform from '../../../Libraries/Utilities/Platform';
13
+
14
14
  import View from '../../../Libraries/Components/View/View';
15
+ import UIManager from '../../../Libraries/ReactNative/UIManager';
16
+ import Platform from '../../../Libraries/Utilities/Platform';
15
17
  import * as React from 'react';
16
18
 
17
- const exported: React.AbstractComponent<
18
- ViewProps,
19
- React.ElementRef<typeof View>,
20
- > = Platform.select({
19
+ const exported: component(
20
+ ref?: React.RefSetter<React.ElementRef<typeof View>>,
21
+ ...ViewProps
22
+ ) = Platform.select({
21
23
  ios: require('../../../src/private/specs/components/RCTSafeAreaViewNativeComponent')
22
24
  .default,
23
- android:
24
- require('../../../src/private/specs/components/RCTSafeAreaViewNativeComponent')
25
- .default,
25
+ android: UIManager.hasViewManagerConfig('RCTSafeAreaView')
26
+ ? require('../../../src/private/specs/components/RCTSafeAreaViewNativeComponent')
27
+ .default
28
+ : View,
26
29
  default: View,
27
30
  });
28
31
 
@@ -12,37 +12,14 @@
12
12
  import type {ScrollViewNativeProps} from '../../../Libraries/Components/ScrollView/ScrollViewNativeComponentType';
13
13
  import type {ViewProps} from '../../../Libraries/Components/View/ViewPropTypes';
14
14
  import type {HostComponent} from '../../../Libraries/Renderer/shims/ReactNativeTypes';
15
- import type {TScrollViewNativeImperativeHandle} from './useSyncOnScroll';
16
15
 
17
16
  import ScrollContentViewNativeComponent from '../../../Libraries/Components/ScrollView/ScrollContentViewNativeComponent';
18
17
  import ScrollViewNativeComponent from '../../../Libraries/Components/ScrollView/ScrollViewNativeComponent';
19
18
  import View from '../../../Libraries/Components/View/View';
20
19
  import Platform from '../../../Libraries/Utilities/Platform';
21
- import useSyncOnScroll from './useSyncOnScroll';
22
- import * as React from 'react';
23
- import {forwardRef} from 'react';
24
20
 
25
- // TODO: After upgrading to React 19, remove `forwardRef` from this component.
26
- export const VScrollViewNativeComponent: React.AbstractComponent<
27
- ScrollViewNativeProps,
28
- TScrollViewNativeImperativeHandle,
29
- // $FlowExpectedError[incompatible-type] - Flow cannot model imperative handles, yet.
30
- > = forwardRef(function VScrollViewNativeComponent(
31
- props: ScrollViewNativeProps,
32
- ref: ?React.RefSetter<TScrollViewNativeImperativeHandle | null>,
33
- ): React.Node {
34
- const [componentRef, enableSyncOnScroll] = useSyncOnScroll(ref);
35
- // NOTE: When `useSyncOnScroll` triggers an update, `props` will not have
36
- // changed. Notably, `props.children` will be the same, allowing React to
37
- // bail out during reconciliation.
38
- return (
39
- <ScrollViewNativeComponent
40
- {...props}
41
- ref={componentRef}
42
- enableSyncOnScroll={enableSyncOnScroll}
43
- />
44
- );
45
- });
21
+ export const VScrollViewNativeComponent: HostComponent<ScrollViewNativeProps> =
22
+ ScrollViewNativeComponent;
46
23
 
47
24
  export const VScrollContentViewNativeComponent: HostComponent<ViewProps> =
48
25
  Platform.OS === 'android' ? View : ScrollContentViewNativeComponent;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow strict-local
8
+ * @format
9
+ */
10
+
11
+ import NativeReactDevToolsSettingsManager from '../specs/modules/NativeReactDevToolsSettingsManager';
12
+
13
+ module.exports = {
14
+ setGlobalHookSettings(settings: string) {
15
+ NativeReactDevToolsSettingsManager?.setGlobalHookSettings(settings);
16
+ },
17
+ getGlobalHookSettings(): ?string {
18
+ return NativeReactDevToolsSettingsManager?.getGlobalHookSettings();
19
+ },
20
+ };
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow strict-local
8
+ * @format
9
+ */
10
+
11
+ import Settings from '../../../Libraries/Settings/Settings';
12
+
13
+ const GLOBAL_HOOK_SETTINGS = 'ReactDevTools::HookSettings';
14
+
15
+ const ReactDevToolsSettingsManager = {
16
+ setGlobalHookSettings(settings: string): void {
17
+ Settings.set({
18
+ [GLOBAL_HOOK_SETTINGS]: settings,
19
+ });
20
+ },
21
+ getGlobalHookSettings(): ?string {
22
+ const value = Settings.get(GLOBAL_HOOK_SETTINGS);
23
+ if (typeof value === 'string') {
24
+ return value;
25
+ }
26
+ return null;
27
+ },
28
+ };
29
+
30
+ module.exports = ReactDevToolsSettingsManager;
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow strict-local
8
+ * @format
9
+ */
10
+
11
+ import NativeReactDevToolsSettingsManager from '../specs/modules/NativeReactDevToolsSettingsManager';
12
+
13
+ module.exports = {
14
+ setGlobalHookSettings(settings: string) {
15
+ NativeReactDevToolsSettingsManager?.setGlobalHookSettings(settings);
16
+ },
17
+ getGlobalHookSettings(): ?string {
18
+ return NativeReactDevToolsSettingsManager?.getGlobalHookSettings();
19
+ },
20
+ };
@@ -62,6 +62,12 @@ export class Domain {
62
62
  }
63
63
  }
64
64
 
65
+ /**
66
+ * Globally bound object providing a hook for React DevTools runtime API calls
67
+ * over CDP.
68
+ *
69
+ * @see {@link ./__docs__/FuseboxReactDevToolsDispatcher.excalidraw-embedded.png}
70
+ */
65
71
  class FuseboxReactDevToolsDispatcher {
66
72
  static #domainNameToDomainMap: Map<DomainName, Domain> = new Map();
67
73
 
@@ -0,0 +1,20 @@
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
+ * @format
8
+ */
9
+
10
+ /**
11
+ * The DevMenu module exposes methods for interacting with the Dev Menu in development.
12
+ */
13
+ export interface DevMenuStatic {
14
+ /**
15
+ * Show the Dev Menu.
16
+ */
17
+ show(): void;
18
+ }
19
+
20
+ export const DevMenu: DevMenuStatic;
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ * @flow strict-local
8
+ * @format
9
+ */
10
+
11
+ import NativeDevMenu from '../specs/modules/NativeDevMenu';
12
+
13
+ /**
14
+ * The DevMenu module exposes methods for interacting with the Dev Menu in development.
15
+ */
16
+ type DevMenuStatic = {
17
+ /**
18
+ * Show the Dev Menu.
19
+ */
20
+ show(): void,
21
+ };
22
+
23
+ const DevMenu: DevMenuStatic = {
24
+ show(): void {
25
+ if (__DEV__) {
26
+ NativeDevMenu.show?.();
27
+ }
28
+ },
29
+ };
30
+
31
+ module.exports = DevMenu;
@@ -4,8 +4,8 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<0bff47ec5af8ed96d8b2abe351f318f1>>
8
- * @flow strict-local
7
+ * @generated SignedSource<<83b5798ee1c7a28fffbf110e19641d69>>
8
+ * @flow strict
9
9
  */
10
10
 
11
11
  /**
@@ -15,11 +15,12 @@
15
15
  * packages/react-native/scripts/featureflags/ReactNativeFeatureFlags.config.js.
16
16
  *
17
17
  * To regenerate this code, run the following script from the repo root:
18
- * yarn featureflags-update
18
+ * yarn featureflags --update
19
19
  */
20
20
 
21
21
  import {
22
22
  type Getter,
23
+ type OverridesFor,
23
24
  createJavaScriptFlagGetter,
24
25
  createNativeFlagGetter,
25
26
  setOverrides,
@@ -29,70 +30,71 @@ export type ReactNativeFeatureFlagsJsOnly = {
29
30
  jsOnlyTestFlag: Getter<boolean>,
30
31
  animatedShouldDebounceQueueFlush: Getter<boolean>,
31
32
  animatedShouldUseSingleOp: Getter<boolean>,
33
+ disableInteractionManager: Getter<boolean>,
34
+ disableInteractionManagerInBatchinator: Getter<boolean>,
32
35
  enableAccessToHostTreeInFabric: Getter<boolean>,
33
- enableOptimisedVirtualizedCells: Getter<boolean>,
36
+ enableAnimatedAllowlist: Getter<boolean>,
37
+ enableAnimatedClearImmediateFix: Getter<boolean>,
38
+ enableAnimatedPropsMemo: Getter<boolean>,
34
39
  isLayoutAnimationEnabled: Getter<boolean>,
35
40
  shouldSkipStateUpdatesForLoopingAnimations: Getter<boolean>,
36
41
  shouldUseAnimatedObjectForTransform: Getter<boolean>,
37
42
  shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter<boolean>,
38
43
  shouldUseSetNativePropsInFabric: Getter<boolean>,
39
- shouldUseSetNativePropsInNativeAnimationsInFabric: Getter<boolean>,
40
- usePassiveEffectsForAnimations: Getter<boolean>,
44
+ useInsertionEffectsForAnimations: Getter<boolean>,
41
45
  useRefsForTextInputState: Getter<boolean>,
42
46
  };
43
47
 
44
- export type ReactNativeFeatureFlagsJsOnlyOverrides = Partial<ReactNativeFeatureFlagsJsOnly>;
48
+ export type ReactNativeFeatureFlagsJsOnlyOverrides = OverridesFor<ReactNativeFeatureFlagsJsOnly>;
45
49
 
46
50
  export type ReactNativeFeatureFlags = {
47
51
  ...ReactNativeFeatureFlagsJsOnly,
48
52
  commonTestFlag: Getter<boolean>,
49
- allowRecursiveCommitsWithSynchronousMountOnAndroid: Getter<boolean>,
50
- batchRenderingUpdatesInEventLoop: Getter<boolean>,
53
+ commonTestFlagWithoutNativeImplementation: Getter<boolean>,
51
54
  completeReactInstanceCreationOnBgThreadOnAndroid: Getter<boolean>,
52
- destroyFabricSurfacesInReactInstanceManager: Getter<boolean>,
55
+ disableEventLoopOnBridgeless: Getter<boolean>,
56
+ disableMountItemReorderingAndroid: Getter<boolean>,
53
57
  enableAlignItemsBaselineOnFabricIOS: Getter<boolean>,
54
- enableAndroidMixBlendModeProp: Getter<boolean>,
55
- enableBackgroundStyleApplicator: Getter<boolean>,
56
- enableCleanTextInputYogaNode: Getter<boolean>,
58
+ enableAndroidLineHeightCentering: Getter<boolean>,
59
+ enableBridgelessArchitecture: Getter<boolean>,
60
+ enableCppPropsIteratorSetter: Getter<boolean>,
61
+ enableDeletionOfUnmountedViews: Getter<boolean>,
57
62
  enableEagerRootViewAttachment: Getter<boolean>,
58
63
  enableEventEmitterRetentionDuringGesturesOnAndroid: Getter<boolean>,
59
64
  enableFabricLogs: Getter<boolean>,
65
+ enableFabricRenderer: Getter<boolean>,
60
66
  enableFabricRendererExclusively: Getter<boolean>,
67
+ enableFixForViewCommandRace: Getter<boolean>,
61
68
  enableGranularShadowTreeStateReconciliation: Getter<boolean>,
62
69
  enableIOSViewClipToPaddingBox: Getter<boolean>,
70
+ enableLayoutAnimationsOnAndroid: Getter<boolean>,
63
71
  enableLayoutAnimationsOnIOS: Getter<boolean>,
64
72
  enableLongTaskAPI: Getter<boolean>,
65
- enableMicrotasks: Getter<boolean>,
73
+ enableNewBackgroundAndBorderDrawables: Getter<boolean>,
74
+ enablePreciseSchedulingForPremountItemsOnAndroid: Getter<boolean>,
66
75
  enablePropsUpdateReconciliationAndroid: Getter<boolean>,
67
76
  enableReportEventPaintTime: Getter<boolean>,
68
77
  enableSynchronousStateUpdates: Getter<boolean>,
69
78
  enableUIConsistency: Getter<boolean>,
70
79
  enableViewRecycling: Getter<boolean>,
71
80
  excludeYogaFromRawProps: Getter<boolean>,
72
- fetchImagesInViewPreallocation: Getter<boolean>,
73
- fixIncorrectScrollViewStateUpdateOnAndroid: Getter<boolean>,
74
81
  fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean>,
75
- fixMissedFabricStateUpdatesOnAndroid: Getter<boolean>,
76
82
  fixMountingCoordinatorReportedPendingTransactionsOnAndroid: Getter<boolean>,
77
- forceBatchingMountItemsOnAndroid: Getter<boolean>,
78
83
  fuseboxEnabledDebug: Getter<boolean>,
79
84
  fuseboxEnabledRelease: Getter<boolean>,
80
85
  initEagerTurboModulesOnNativeModulesQueueAndroid: Getter<boolean>,
81
86
  lazyAnimationCallbacks: Getter<boolean>,
82
87
  loadVectorDrawablesOnImages: Getter<boolean>,
83
- setAndroidLayoutDirection: Getter<boolean>,
84
88
  traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean>,
89
+ useAlwaysAvailableJSErrorHandling: Getter<boolean>,
85
90
  useFabricInterop: Getter<boolean>,
86
91
  useImmediateExecutorInAndroidBridgeless: Getter<boolean>,
87
- useModernRuntimeScheduler: Getter<boolean>,
88
92
  useNativeViewConfigsInBridgelessMode: Getter<boolean>,
89
- useNewReactImageViewBackgroundDrawing: Getter<boolean>,
90
93
  useOptimisedViewPreallocationOnAndroid: Getter<boolean>,
91
94
  useOptimizedEventBatchingOnAndroid: Getter<boolean>,
92
95
  useRuntimeShadowNodeReferenceUpdate: Getter<boolean>,
93
- useRuntimeShadowNodeReferenceUpdateOnLayout: Getter<boolean>,
94
- useStateAlignmentMechanism: Getter<boolean>,
95
96
  useTurboModuleInterop: Getter<boolean>,
97
+ useTurboModules: Getter<boolean>,
96
98
  }
97
99
 
98
100
  /**
@@ -110,15 +112,35 @@ export const animatedShouldDebounceQueueFlush: Getter<boolean> = createJavaScrip
110
112
  */
111
113
  export const animatedShouldUseSingleOp: Getter<boolean> = createJavaScriptFlagGetter('animatedShouldUseSingleOp', false);
112
114
 
115
+ /**
116
+ * Disables InteractionManager and replaces its scheduler with `setImmediate`.
117
+ */
118
+ export const disableInteractionManager: Getter<boolean> = createJavaScriptFlagGetter('disableInteractionManager', false);
119
+
120
+ /**
121
+ * Skips InteractionManager in `Batchinator` and invokes callbacks synchronously.
122
+ */
123
+ export const disableInteractionManagerInBatchinator: Getter<boolean> = createJavaScriptFlagGetter('disableInteractionManagerInBatchinator', false);
124
+
113
125
  /**
114
126
  * Enables access to the host tree in Fabric using DOM-compatible APIs.
115
127
  */
116
128
  export const enableAccessToHostTreeInFabric: Getter<boolean> = createJavaScriptFlagGetter('enableAccessToHostTreeInFabric', false);
117
129
 
118
130
  /**
119
- * Removing unnecessary rerenders Virtualized cells after any rerenders of Virualized list. Works with strict=true option
131
+ * Enables Animated to skip non-allowlisted props and styles.
120
132
  */
121
- export const enableOptimisedVirtualizedCells: Getter<boolean> = createJavaScriptFlagGetter('enableOptimisedVirtualizedCells', false);
133
+ export const enableAnimatedAllowlist: Getter<boolean> = createJavaScriptFlagGetter('enableAnimatedAllowlist', true);
134
+
135
+ /**
136
+ * Enables an experimental to use the proper clearIntermediate instead of calling the wrong clearTimeout and canceling another timer.
137
+ */
138
+ export const enableAnimatedClearImmediateFix: Getter<boolean> = createJavaScriptFlagGetter('enableAnimatedClearImmediateFix', true);
139
+
140
+ /**
141
+ * Enables Animated to analyze props to minimize invalidating `AnimatedProps`.
142
+ */
143
+ export const enableAnimatedPropsMemo: Getter<boolean> = createJavaScriptFlagGetter('enableAnimatedPropsMemo', true);
122
144
 
123
145
  /**
124
146
  * Function used to enable / disabled Layout Animations in React Native.
@@ -146,14 +168,9 @@ export const shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter<boolean> = cre
146
168
  export const shouldUseSetNativePropsInFabric: Getter<boolean> = createJavaScriptFlagGetter('shouldUseSetNativePropsInFabric', true);
147
169
 
148
170
  /**
149
- * Enables use of setNativeProps in Native driven animations in Fabric.
171
+ * Changes construction of the animation graph to `useInsertionEffect` instead of `useLayoutEffect`.
150
172
  */
151
- export const shouldUseSetNativePropsInNativeAnimationsInFabric: Getter<boolean> = createJavaScriptFlagGetter('shouldUseSetNativePropsInNativeAnimationsInFabric', false);
152
-
153
- /**
154
- * Enable a variant of useAnimatedPropsLifecycle hook that constructs the animation graph in passive effect instead of layout effect
155
- */
156
- export const usePassiveEffectsForAnimations: Getter<boolean> = createJavaScriptFlagGetter('usePassiveEffectsForAnimations', false);
173
+ export const useInsertionEffectsForAnimations: Getter<boolean> = createJavaScriptFlagGetter('useInsertionEffectsForAnimations', true);
157
174
 
158
175
  /**
159
176
  * Enable a variant of TextInput that moves some state to refs to avoid unnecessary re-renders
@@ -165,37 +182,41 @@ export const useRefsForTextInputState: Getter<boolean> = createJavaScriptFlagGet
165
182
  */
166
183
  export const commonTestFlag: Getter<boolean> = createNativeFlagGetter('commonTestFlag', false);
167
184
  /**
168
- * Adds support for recursively processing commits that mount synchronously (Android only).
185
+ * Common flag for testing (without native implementation). Do NOT modify.
169
186
  */
170
- export const allowRecursiveCommitsWithSynchronousMountOnAndroid: Getter<boolean> = createNativeFlagGetter('allowRecursiveCommitsWithSynchronousMountOnAndroid', false);
187
+ export const commonTestFlagWithoutNativeImplementation: Getter<boolean> = createNativeFlagGetter('commonTestFlagWithoutNativeImplementation', false);
171
188
  /**
172
- * When enabled, the RuntimeScheduler processing the event loop will batch all rendering updates and dispatch them together at the end of each iteration of the loop.
189
+ * Do not wait for a main-thread dispatch to complete init to start executing work on the JS thread on Android
173
190
  */
174
- export const batchRenderingUpdatesInEventLoop: Getter<boolean> = createNativeFlagGetter('batchRenderingUpdatesInEventLoop', false);
191
+ export const completeReactInstanceCreationOnBgThreadOnAndroid: Getter<boolean> = createNativeFlagGetter('completeReactInstanceCreationOnBgThreadOnAndroid', true);
175
192
  /**
176
- * Do not wait for a main-thread dispatch to complete init to start executing work on the JS thread on Android
193
+ * The bridgeless architecture enables the event loop by default. This feature flag allows us to force disabling it in specific instances.
177
194
  */
178
- export const completeReactInstanceCreationOnBgThreadOnAndroid: Getter<boolean> = createNativeFlagGetter('completeReactInstanceCreationOnBgThreadOnAndroid', false);
195
+ export const disableEventLoopOnBridgeless: Getter<boolean> = createNativeFlagGetter('disableEventLoopOnBridgeless', false);
179
196
  /**
180
- * When enabled, ReactInstanceManager will clean up Fabric surfaces on destroy().
197
+ * Prevent FabricMountingManager from reordering mountitems, which may lead to invalid state on the UI thread
181
198
  */
182
- export const destroyFabricSurfacesInReactInstanceManager: Getter<boolean> = createNativeFlagGetter('destroyFabricSurfacesInReactInstanceManager', false);
199
+ export const disableMountItemReorderingAndroid: Getter<boolean> = createNativeFlagGetter('disableMountItemReorderingAndroid', false);
183
200
  /**
184
201
  * Kill-switch to turn off support for aling-items:baseline on Fabric iOS.
185
202
  */
186
203
  export const enableAlignItemsBaselineOnFabricIOS: Getter<boolean> = createNativeFlagGetter('enableAlignItemsBaselineOnFabricIOS', true);
187
204
  /**
188
- * Enables mix-blend-mode prop on Android.
205
+ * When enabled, custom line height calculation will be centered from top to bottom.
206
+ */
207
+ export const enableAndroidLineHeightCentering: Getter<boolean> = createNativeFlagGetter('enableAndroidLineHeightCentering', true);
208
+ /**
209
+ * Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flags: `useTurboModules` & `enableFabricRenderer.
189
210
  */
190
- export const enableAndroidMixBlendModeProp: Getter<boolean> = createNativeFlagGetter('enableAndroidMixBlendModeProp', false);
211
+ export const enableBridgelessArchitecture: Getter<boolean> = createNativeFlagGetter('enableBridgelessArchitecture', false);
191
212
  /**
192
- * Use BackgroundStyleApplicator in place of other background/border drawing code
213
+ * Enable prop iterator setter-style construction of Props in C++ (this flag is not used in Java).
193
214
  */
194
- export const enableBackgroundStyleApplicator: Getter<boolean> = createNativeFlagGetter('enableBackgroundStyleApplicator', true);
215
+ export const enableCppPropsIteratorSetter: Getter<boolean> = createNativeFlagGetter('enableCppPropsIteratorSetter', false);
195
216
  /**
196
- * Clean yoga node when <TextInput /> does not change.
217
+ * Deletes views that were pre-allocated but never mounted on the screen.
197
218
  */
198
- export const enableCleanTextInputYogaNode: Getter<boolean> = createNativeFlagGetter('enableCleanTextInputYogaNode', false);
219
+ export const enableDeletionOfUnmountedViews: Getter<boolean> = createNativeFlagGetter('enableDeletionOfUnmountedViews', false);
199
220
  /**
200
221
  * Feature flag to configure eager attachment of the root view/initialisation of the JS code.
201
222
  */
@@ -208,10 +229,18 @@ export const enableEventEmitterRetentionDuringGesturesOnAndroid: Getter<boolean>
208
229
  * This feature flag enables logs for Fabric.
209
230
  */
210
231
  export const enableFabricLogs: Getter<boolean> = createNativeFlagGetter('enableFabricLogs', false);
232
+ /**
233
+ * Enables the use of the Fabric renderer in the whole app.
234
+ */
235
+ export const enableFabricRenderer: Getter<boolean> = createNativeFlagGetter('enableFabricRenderer', false);
211
236
  /**
212
237
  * When the app is completely migrated to Fabric, set this flag to true to disable parts of Paper infrastructure that are not needed anymore but consume memory and CPU. Specifically, UIViewOperationQueue and EventDispatcherImpl will no longer work as they will not subscribe to ReactChoreographer for updates.
213
238
  */
214
239
  export const enableFabricRendererExclusively: Getter<boolean> = createNativeFlagGetter('enableFabricRendererExclusively', false);
240
+ /**
241
+ * Synchronise the view command dispatching with mounting of new transaction
242
+ */
243
+ export const enableFixForViewCommandRace: Getter<boolean> = createNativeFlagGetter('enableFixForViewCommandRace', false);
215
244
  /**
216
245
  * When enabled, the renderer would only fail commits when they propagate state and the last commit that updated state changed before committing.
217
246
  */
@@ -220,6 +249,10 @@ export const enableGranularShadowTreeStateReconciliation: Getter<boolean> = crea
220
249
  * iOS Views will clip to their padding box vs border box
221
250
  */
222
251
  export const enableIOSViewClipToPaddingBox: Getter<boolean> = createNativeFlagGetter('enableIOSViewClipToPaddingBox', false);
252
+ /**
253
+ * When enabled, LayoutAnimations API will animate state changes on Android.
254
+ */
255
+ export const enableLayoutAnimationsOnAndroid: Getter<boolean> = createNativeFlagGetter('enableLayoutAnimationsOnAndroid', false);
223
256
  /**
224
257
  * When enabled, LayoutAnimations API will animate state changes on iOS.
225
258
  */
@@ -229,9 +262,13 @@ export const enableLayoutAnimationsOnIOS: Getter<boolean> = createNativeFlagGett
229
262
  */
230
263
  export const enableLongTaskAPI: Getter<boolean> = createNativeFlagGetter('enableLongTaskAPI', false);
231
264
  /**
232
- * Enables the use of microtasks in Hermes (scheduling) and RuntimeScheduler (execution).
265
+ * Use BackgroundDrawable and BorderDrawable instead of CSSBackgroundDrawable
233
266
  */
234
- export const enableMicrotasks: Getter<boolean> = createNativeFlagGetter('enableMicrotasks', false);
267
+ export const enableNewBackgroundAndBorderDrawables: Getter<boolean> = createNativeFlagGetter('enableNewBackgroundAndBorderDrawables', false);
268
+ /**
269
+ * Moves execution of pre-mount items to outside the choregrapher in the main thread, so we can estimate idle time more precisely (Android only).
270
+ */
271
+ export const enablePreciseSchedulingForPremountItemsOnAndroid: Getter<boolean> = createNativeFlagGetter('enablePreciseSchedulingForPremountItemsOnAndroid', false);
235
272
  /**
236
273
  * When enabled, Android will receive prop updates based on the differences between the last rendered shadow node and the last committed shadow node.
237
274
  */
@@ -256,30 +293,14 @@ export const enableViewRecycling: Getter<boolean> = createNativeFlagGetter('enab
256
293
  * When enabled, rawProps in Props will not include Yoga specific props.
257
294
  */
258
295
  export const excludeYogaFromRawProps: Getter<boolean> = createNativeFlagGetter('excludeYogaFromRawProps', false);
259
- /**
260
- * Start image fetching during view preallocation instead of waiting for layout pass
261
- */
262
- export const fetchImagesInViewPreallocation: Getter<boolean> = createNativeFlagGetter('fetchImagesInViewPreallocation', false);
263
- /**
264
- * When doing a smooth scroll animation, it stops setting the state with the final scroll position in Fabric before the animation starts.
265
- */
266
- export const fixIncorrectScrollViewStateUpdateOnAndroid: Getter<boolean> = createNativeFlagGetter('fixIncorrectScrollViewStateUpdateOnAndroid', false);
267
296
  /**
268
297
  * Uses the default event priority instead of the discreet event priority by default when dispatching events from Fabric to React.
269
298
  */
270
299
  export const fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean> = createNativeFlagGetter('fixMappingOfEventPrioritiesBetweenFabricAndReact', false);
271
- /**
272
- * Enables a fix to prevent the possibility of state updates in Fabric being missed due to race conditions with previous state updates.
273
- */
274
- export const fixMissedFabricStateUpdatesOnAndroid: Getter<boolean> = createNativeFlagGetter('fixMissedFabricStateUpdatesOnAndroid', false);
275
300
  /**
276
301
  * Fixes a limitation on Android where the mounting coordinator would report there are no pending transactions but some of them were actually not processed due to the use of the push model.
277
302
  */
278
303
  export const fixMountingCoordinatorReportedPendingTransactionsOnAndroid: Getter<boolean> = createNativeFlagGetter('fixMountingCoordinatorReportedPendingTransactionsOnAndroid', false);
279
- /**
280
- * Forces the mounting layer on Android to always batch mount items instead of dispatching them immediately. This might fix some crashes related to synchronous state updates, where some views dispatch state updates during mount.
281
- */
282
- export const forceBatchingMountItemsOnAndroid: Getter<boolean> = createNativeFlagGetter('forceBatchingMountItemsOnAndroid', false);
283
304
  /**
284
305
  * Flag determining if the React Native DevTools (Fusebox) CDP backend should be enabled in debug builds. This flag is global and should not be changed across React Host lifetimes.
285
306
  */
@@ -291,7 +312,7 @@ export const fuseboxEnabledRelease: Getter<boolean> = createNativeFlagGetter('fu
291
312
  /**
292
313
  * Construct modules that requires eager init on the dedicate native modules thread
293
314
  */
294
- export const initEagerTurboModulesOnNativeModulesQueueAndroid: Getter<boolean> = createNativeFlagGetter('initEagerTurboModulesOnNativeModulesQueueAndroid', false);
315
+ export const initEagerTurboModulesOnNativeModulesQueueAndroid: Getter<boolean> = createNativeFlagGetter('initEagerTurboModulesOnNativeModulesQueueAndroid', true);
295
316
  /**
296
317
  * Only enqueue Choreographer calls if there is an ongoing animation, instead of enqueueing every frame.
297
318
  */
@@ -300,14 +321,14 @@ export const lazyAnimationCallbacks: Getter<boolean> = createNativeFlagGetter('l
300
321
  * Adds support for loading vector drawable assets in the Image component (only on Android)
301
322
  */
302
323
  export const loadVectorDrawablesOnImages: Getter<boolean> = createNativeFlagGetter('loadVectorDrawablesOnImages', false);
303
- /**
304
- * Propagate layout direction to Android views.
305
- */
306
- export const setAndroidLayoutDirection: Getter<boolean> = createNativeFlagGetter('setAndroidLayoutDirection', false);
307
324
  /**
308
325
  * Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
309
326
  */
310
327
  export const traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean> = createNativeFlagGetter('traceTurboModulePromiseRejectionsOnAndroid', false);
328
+ /**
329
+ * In Bridgeless mode, use the always available javascript error reporting pipeline.
330
+ */
331
+ export const useAlwaysAvailableJSErrorHandling: Getter<boolean> = createNativeFlagGetter('useAlwaysAvailableJSErrorHandling', false);
311
332
  /**
312
333
  * Should this application enable the Fabric Interop Layer for Android? If yes, the application will behave so that it can accept non-Fabric components and render them on Fabric. This toggle is controlling extra logic such as custom event dispatching that are needed for the Fabric Interop Layer to work correctly.
313
334
  */
@@ -315,19 +336,11 @@ export const useFabricInterop: Getter<boolean> = createNativeFlagGetter('useFabr
315
336
  /**
316
337
  * Invoke callbacks immediately on the ReactInstance rather than going through a background thread for synchronization
317
338
  */
318
- export const useImmediateExecutorInAndroidBridgeless: Getter<boolean> = createNativeFlagGetter('useImmediateExecutorInAndroidBridgeless', false);
319
- /**
320
- * When enabled, it uses the modern fork of RuntimeScheduler that allows scheduling tasks with priorities from any thread.
321
- */
322
- export const useModernRuntimeScheduler: Getter<boolean> = createNativeFlagGetter('useModernRuntimeScheduler', false);
339
+ export const useImmediateExecutorInAndroidBridgeless: Getter<boolean> = createNativeFlagGetter('useImmediateExecutorInAndroidBridgeless', true);
323
340
  /**
324
341
  * When enabled, the native view configs are used in bridgeless mode.
325
342
  */
326
343
  export const useNativeViewConfigsInBridgelessMode: Getter<boolean> = createNativeFlagGetter('useNativeViewConfigsInBridgelessMode', false);
327
- /**
328
- * Use shared background drawing code for ReactImageView instead of using Fresco to manipulate the bitmap
329
- */
330
- export const useNewReactImageViewBackgroundDrawing: Getter<boolean> = createNativeFlagGetter('useNewReactImageViewBackgroundDrawing', false);
331
344
  /**
332
345
  * Moves more of the work in view preallocation to the main thread to free up JS thread.
333
346
  */
@@ -340,18 +353,14 @@ export const useOptimizedEventBatchingOnAndroid: Getter<boolean> = createNativeF
340
353
  * When enabled, cloning shadow nodes within react native will update the reference held by the current JS fiber tree.
341
354
  */
342
355
  export const useRuntimeShadowNodeReferenceUpdate: Getter<boolean> = createNativeFlagGetter('useRuntimeShadowNodeReferenceUpdate', false);
343
- /**
344
- * When enabled, cloning shadow nodes during layout will update the reference held by the current JS fiber tree.
345
- */
346
- export const useRuntimeShadowNodeReferenceUpdateOnLayout: Getter<boolean> = createNativeFlagGetter('useRuntimeShadowNodeReferenceUpdateOnLayout', false);
347
- /**
348
- * When enabled, it uses optimised state reconciliation algorithm.
349
- */
350
- export const useStateAlignmentMechanism: Getter<boolean> = createNativeFlagGetter('useStateAlignmentMechanism', false);
351
356
  /**
352
357
  * In Bridgeless mode, should legacy NativeModules use the TurboModule system?
353
358
  */
354
359
  export const useTurboModuleInterop: Getter<boolean> = createNativeFlagGetter('useTurboModuleInterop', false);
360
+ /**
361
+ * When enabled, NativeModules will be executed by using the TurboModule system
362
+ */
363
+ export const useTurboModules: Getter<boolean> = createNativeFlagGetter('useTurboModules', false);
355
364
 
356
365
  /**
357
366
  * Overrides the feature flags with the provided methods.