@office-iss/react-native-win32 0.76.2 → 0.77.0-preview.2

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 (249) hide show
  1. package/.eslintignore +1 -1
  2. package/.flowconfig +5 -1
  3. package/CHANGELOG.json +179 -53
  4. package/CHANGELOG.md +82 -28
  5. package/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +1 -0
  6. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +13 -0
  7. package/Libraries/Animated/AnimatedEvent.js +1 -1
  8. package/Libraries/Animated/AnimatedImplementation.js +2 -2
  9. package/Libraries/Animated/NativeAnimatedAllowlist.js +20 -9
  10. package/Libraries/Animated/animations/Animation.js +60 -25
  11. package/Libraries/Animated/animations/DecayAnimation.js +26 -38
  12. package/Libraries/Animated/animations/SpringAnimation.js +33 -39
  13. package/Libraries/Animated/animations/TimingAnimation.js +34 -42
  14. package/Libraries/Animated/components/AnimatedFlatList.js +1 -1
  15. package/Libraries/Animated/components/AnimatedSectionList.js +3 -1
  16. package/Libraries/Animated/createAnimatedComponent.js +60 -33
  17. package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
  18. package/Libraries/Animated/nodes/AnimatedInterpolation.js +1 -1
  19. package/Libraries/Animated/nodes/AnimatedNode.js +39 -45
  20. package/Libraries/Animated/nodes/AnimatedObject.js +13 -3
  21. package/Libraries/Animated/nodes/AnimatedProps.js +104 -46
  22. package/Libraries/Animated/nodes/AnimatedStyle.js +116 -39
  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.win32.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.win32.js +12 -4
  33. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +3 -1
  34. package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +7 -0
  35. package/Libraries/Components/Pressable/Pressable.js +4 -4
  36. package/Libraries/Components/Pressable/Pressable.win32.js +4 -4
  37. package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +13 -7
  38. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +3 -2
  39. package/Libraries/Components/SafeAreaView/SafeAreaView.js +4 -4
  40. package/Libraries/Components/SafeAreaView/SafeAreaView.win32.js +4 -4
  41. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +0 -1
  42. package/Libraries/Components/ScrollView/ScrollView.js +49 -88
  43. package/Libraries/Components/ScrollView/ScrollViewCommands.js +1 -1
  44. package/Libraries/Components/ScrollView/ScrollViewContext.js +2 -0
  45. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +0 -2
  46. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +8 -9
  47. package/Libraries/Components/Switch/Switch.js +8 -6
  48. package/Libraries/Components/TextInput/InputAccessoryView.js +1 -1
  49. package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +4 -4
  50. package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +6 -4
  51. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +2 -1
  52. package/Libraries/Components/TextInput/TextInput.d.ts +27 -4
  53. package/Libraries/Components/TextInput/TextInput.flow.js +36 -19
  54. package/Libraries/Components/TextInput/TextInput.js +37 -13
  55. package/Libraries/Components/TextInput/TextInput.win32.js +40 -15
  56. package/Libraries/Components/TextInput/TextInputState.js +11 -13
  57. package/Libraries/Components/TextInput/TextInputState.win32.js +13 -16
  58. package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +3 -0
  59. package/Libraries/Components/Touchable/BoundingDimensions.js +11 -3
  60. package/Libraries/Components/Touchable/Position.js +7 -2
  61. package/Libraries/Components/Touchable/Touchable.js +4 -0
  62. package/Libraries/Components/Touchable/Touchable.win32.js +4 -0
  63. package/Libraries/Components/Touchable/TouchableBounce.js +6 -2
  64. package/Libraries/Components/Touchable/TouchableHighlight.js +5 -5
  65. package/Libraries/Components/Touchable/TouchableOpacity.js +6 -5
  66. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -2
  67. package/Libraries/Components/View/ReactNativeStyleAttributes.js +6 -1
  68. package/Libraries/Components/View/View.js +4 -4
  69. package/Libraries/Components/View/View.win32.js +4 -4
  70. package/Libraries/Components/View/ViewNativeComponent.js +6 -98
  71. package/Libraries/Components/View/ViewPropTypes.d.ts +7 -0
  72. package/Libraries/Components/View/ViewPropTypes.js +0 -3
  73. package/Libraries/Components/View/ViewPropTypes.win32.js +0 -3
  74. package/Libraries/Components/View/ViewWin32.js +1 -0
  75. package/Libraries/Core/ExceptionsManager.js +50 -29
  76. package/Libraries/Core/ReactNativeVersion.js +3 -3
  77. package/Libraries/Core/__mocks__/NativeExceptionsManager.js +0 -1
  78. package/Libraries/Core/setUpBatchedBridge.js +1 -10
  79. package/Libraries/Core/setUpDeveloperTools.js +1 -5
  80. package/Libraries/Core/setUpErrorHandling.js +20 -18
  81. package/Libraries/Core/setUpReactDevTools.js +107 -8
  82. package/Libraries/Core/setUpSegmentFetcher.js +1 -0
  83. package/Libraries/Core/setUpTimers.js +21 -18
  84. package/Libraries/Debugging/DebuggingOverlay.js +4 -5
  85. package/Libraries/Image/AssetSourceResolver.js +12 -1
  86. package/Libraries/Image/Image.android.js +1 -5
  87. package/Libraries/Image/Image.d.ts +20 -29
  88. package/Libraries/Image/Image.ios.js +0 -2
  89. package/Libraries/Image/Image.win32.js +0 -2
  90. package/Libraries/Image/ImageBackground.js +2 -5
  91. package/Libraries/Image/ImageProps.js +7 -6
  92. package/Libraries/Image/ImageResizeMode.d.ts +8 -1
  93. package/Libraries/Image/ImageResizeMode.js +4 -1
  94. package/Libraries/Image/ImageSource.d.ts +0 -2
  95. package/Libraries/Image/ImageSource.js +0 -2
  96. package/Libraries/Image/ImageTypes.flow.js +11 -9
  97. package/Libraries/Image/ImageUtils.js +6 -3
  98. package/Libraries/Image/ImageViewNativeComponent.js +5 -3
  99. package/Libraries/Inspector/Inspector.js +1 -0
  100. package/Libraries/Inspector/Inspector.win32.js +2 -1
  101. package/Libraries/Inspector/NetworkOverlay.js +4 -0
  102. package/Libraries/Inspector/ReactDevToolsOverlay.js +8 -14
  103. package/Libraries/Inspector/getInspectorDataForViewAtPoint.js +3 -5
  104. package/Libraries/Interaction/InteractionManager.js +6 -1
  105. package/Libraries/Interaction/InteractionManagerStub.js +176 -0
  106. package/Libraries/Interaction/TouchHistoryMath.js +22 -19
  107. package/Libraries/JSInspector/NetworkAgent.js +1 -1
  108. package/Libraries/Lists/FlatList.d.ts +1 -2
  109. package/Libraries/Lists/FlatList.js +2 -2
  110. package/Libraries/Lists/SectionListModern.js +7 -7
  111. package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +2 -2
  112. package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +1 -1
  113. package/Libraries/LogBox/Data/LogBoxData.js +3 -3
  114. package/Libraries/LogBox/LogBox.js +18 -5
  115. package/Libraries/LogBox/LogBoxInspectorContainer.js +1 -1
  116. package/Libraries/LogBox/LogBoxNotificationContainer.js +2 -2
  117. package/Libraries/LogBox/UI/AnsiHighlight.js +26 -17
  118. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +6 -1
  119. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.win32.js +6 -1
  120. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -1
  121. package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +1 -1
  122. package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +1 -1
  123. package/Libraries/LogBox/UI/LogBoxMessage.js +2 -2
  124. package/Libraries/Modal/Modal.d.ts +12 -0
  125. package/Libraries/Modal/Modal.js +31 -4
  126. package/Libraries/NativeComponent/BaseViewConfig.android.js +72 -1
  127. package/Libraries/NativeComponent/BaseViewConfig.ios.js +2 -1
  128. package/Libraries/NativeComponent/BaseViewConfig.win32.js +3 -11
  129. package/Libraries/NativeComponent/NativeComponentRegistry.js +3 -3
  130. package/Libraries/NativeComponent/StaticViewConfigValidator.js +0 -1
  131. package/Libraries/Network/FormData.js +11 -3
  132. package/Libraries/Network/XHRInterceptor.js +63 -14
  133. package/Libraries/Network/XMLHttpRequest.js +26 -1
  134. package/Libraries/NewAppScreen/components/HermesBadge.js +1 -1
  135. package/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +49 -2
  136. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +4 -4
  137. package/Libraries/Pressability/HoverState.js +2 -0
  138. package/Libraries/Pressability/HoverState.win32.js +2 -0
  139. package/Libraries/Pressability/Pressability.js +2 -3
  140. package/Libraries/Pressability/Pressability.win32.js +2 -3
  141. package/Libraries/Pressability/usePressability.js +4 -1
  142. package/Libraries/ReactNative/AppContainer.js +1 -1
  143. package/Libraries/ReactNative/AppRegistry.js +1 -11
  144. package/Libraries/ReactNative/DisplayMode.js +1 -1
  145. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +2 -3
  146. package/Libraries/ReactNative/RendererImplementation.js +18 -17
  147. package/Libraries/ReactNative/getCachedComponentWithDebugName.js +1 -3
  148. package/Libraries/ReactNative/renderApplication.js +9 -8
  149. package/Libraries/ReactNative/requireNativeComponent.js +5 -2
  150. package/Libraries/Renderer/shims/ReactFabric.js +3 -3
  151. package/Libraries/Renderer/shims/ReactFeatureFlags.js +2 -2
  152. package/Libraries/Renderer/shims/ReactNative.js +3 -3
  153. package/Libraries/Renderer/shims/ReactNativeTypes.js +22 -35
  154. package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +5 -6
  155. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +2 -2
  156. package/Libraries/StyleSheet/StyleSheet.js +7 -1
  157. package/Libraries/StyleSheet/StyleSheet.win32.js +7 -1
  158. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +13 -2
  159. package/Libraries/StyleSheet/StyleSheetTypes.js +24 -6
  160. package/Libraries/StyleSheet/processBackgroundImage.js +87 -110
  161. package/Libraries/StyleSheet/processTransform.js +3 -34
  162. package/Libraries/Text/Text.js +248 -249
  163. package/Libraries/Text/Text.win32.js +282 -295
  164. package/Libraries/Text/TextNativeComponent.js +0 -1
  165. package/Libraries/TurboModule/TurboModuleRegistry.js +5 -5
  166. package/Libraries/Types/CoreEventTypes.d.ts +3 -10
  167. package/Libraries/Types/CoreEventTypes.js +4 -6
  168. package/Libraries/Types/CoreEventTypes.win32.js +4 -6
  169. package/Libraries/Utilities/Appearance.js +3 -1
  170. package/Libraries/Utilities/BackHandler.android.js +6 -18
  171. package/Libraries/Utilities/BackHandler.d.ts +0 -4
  172. package/Libraries/Utilities/BackHandler.ios.js +0 -7
  173. package/Libraries/Utilities/BackHandler.win32.js +6 -18
  174. package/Libraries/Utilities/FocusManager.win32.js +1 -1
  175. package/Libraries/Utilities/HMRClient.js +3 -4
  176. package/Libraries/Utilities/Platform.flow.js +2 -2
  177. package/Libraries/Utilities/Platform.flow.win32.js +3 -2
  178. package/Libraries/Utilities/__mocks__/BackHandler.js +3 -8
  179. package/Libraries/Utilities/codegenNativeComponent.js +1 -1
  180. package/Libraries/Utilities/useMergeRefs.js +26 -7
  181. package/Libraries/WebSocket/WebSocketEvent.js +4 -1
  182. package/Libraries/WebSocket/WebSocketInterceptor.js +31 -13
  183. package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +6 -5
  184. package/Libraries/promiseRejectionTrackingOptions.js +1 -1
  185. package/index.js +10 -3
  186. package/index.win32.js +10 -3
  187. package/jest/setup.js +36 -1
  188. package/overrides.json +37 -37
  189. package/package.json +20 -20
  190. package/src/private/animated/NativeAnimatedHelper.js +18 -16
  191. package/src/private/animated/NativeAnimatedHelper.win32.js +18 -15
  192. package/src/private/animated/useAnimatedPropsMemo.js +356 -0
  193. package/src/private/components/HScrollViewNativeComponents.js +1 -27
  194. package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +11 -8
  195. package/src/private/components/VScrollViewNativeComponents.js +2 -25
  196. package/src/private/debugging/ReactDevToolsSettingsManager.android.js +20 -0
  197. package/src/private/debugging/ReactDevToolsSettingsManager.ios.js +30 -0
  198. package/src/private/debugging/ReactDevToolsSettingsManager.win32.js +20 -0
  199. package/src/private/{fusebox → debugging}/setUpFuseboxReactDevToolsDispatcher.js +6 -0
  200. package/src/private/devmenu/DevMenu.d.ts +20 -0
  201. package/src/private/devmenu/DevMenu.js +31 -0
  202. package/src/private/featureflags/ReactNativeFeatureFlags.js +95 -86
  203. package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +8 -2
  204. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +17 -19
  205. package/src/private/fusebox/specs/NativeReactDevToolsRuntimeSettingsModule.js +34 -0
  206. package/src/private/setup/setUpDOM.js +14 -6
  207. package/src/private/setup/setUpMutationObserver.js +5 -0
  208. package/src/private/specs/components/AndroidHorizontalScrollContentViewNativeComponent.js +1 -0
  209. package/src/private/specs/components/RCTModalHostViewNativeComponent.js +8 -0
  210. package/src/private/specs/modules/NativeAccessibilityInfo.js +9 -0
  211. package/src/private/specs/modules/NativeAccessibilityInfoWin32.js +9 -0
  212. package/src/private/specs/modules/NativeAccessibilityManager.js +4 -0
  213. package/src/private/specs/modules/NativeActionSheetManager.js +2 -0
  214. package/src/private/specs/modules/NativeAppearance.js +4 -10
  215. package/src/private/specs/modules/NativeExceptionsManager.js +0 -12
  216. package/src/private/specs/modules/{NativeDevToolsSettingsManager.js → NativeReactDevToolsSettingsManager.js} +3 -5
  217. package/src/private/webapis/dom/geometry/DOMRect.js +2 -2
  218. package/src/private/webapis/dom/geometry/DOMRectReadOnly.js +2 -2
  219. package/src/private/webapis/dom/nodes/ReactNativeElement.js +2 -3
  220. package/src/private/webapis/intersectionobserver/IntersectionObserver.js +102 -11
  221. package/src/private/webapis/intersectionobserver/IntersectionObserverEntry.js +26 -0
  222. package/src/private/webapis/intersectionobserver/IntersectionObserverManager.js +1 -0
  223. package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +1 -0
  224. package/src/private/webapis/intersectionobserver/specs/__mocks__/NativeIntersectionObserver.js +9 -0
  225. package/src/private/webapis/performance/EventTiming.js +13 -8
  226. package/src/private/webapis/performance/Performance.js +66 -73
  227. package/src/private/webapis/performance/PerformanceEntry.js +2 -5
  228. package/src/private/webapis/performance/PerformanceObserver.js +65 -164
  229. package/src/private/webapis/performance/RawPerformanceEntry.js +1 -1
  230. package/src/private/webapis/performance/UserTiming.js +11 -7
  231. package/src/private/webapis/performance/Utilities.js +18 -0
  232. package/src/private/webapis/performance/specs/NativePerformance.js +71 -2
  233. package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +267 -0
  234. package/src-win/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +19 -3
  235. package/src-win/Libraries/Components/View/ViewPropTypes.d.ts +7 -0
  236. package/types/index.d.ts +1 -1
  237. package/types/public/ReactNativeTypes.d.ts +4 -8
  238. package/Libraries/DevToolsSettings/DevToolsSettingsManager.android.js +0 -35
  239. package/Libraries/DevToolsSettings/DevToolsSettingsManager.d.ts +0 -20
  240. package/Libraries/DevToolsSettings/DevToolsSettingsManager.ios.js +0 -49
  241. package/Libraries/DevToolsSettings/DevToolsSettingsManager.win32.js +0 -35
  242. package/Libraries/DevToolsSettings/NativeDevToolsSettingsManager.js +0 -13
  243. package/Libraries/ReactNative/ReactFabricInternals.js +0 -17
  244. package/src/private/components/useSyncOnScroll.js +0 -48
  245. package/src/private/webapis/performance/specs/NativePerformanceObserver.js +0 -61
  246. package/src/private/webapis/performance/specs/__mocks__/NativePerformance.js +0 -67
  247. package/src/private/webapis/performance/specs/__mocks__/NativePerformanceObserver.js +0 -127
  248. package/types/experimental.d.ts +0 -59
  249. /package/src/private/{fusebox → debugging}/FuseboxSessionObserver.js +0 -0
@@ -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.
@@ -4,7 +4,7 @@
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
- * @flow strict-local
7
+ * @flow strict
8
8
  * @format
9
9
  */
10
10
 
@@ -20,6 +20,12 @@ let overrides: ?ReactNativeFeatureFlagsJsOnlyOverrides;
20
20
 
21
21
  export type Getter<T> = () => T;
22
22
 
23
+ // This defines the types for the overrides object, whose methods also receive
24
+ // the default value as a parameter.
25
+ export type OverridesFor<T> = Partial<{
26
+ [key in keyof T]: (ReturnType<T[key]>) => ReturnType<T[key]>,
27
+ }>;
28
+
23
29
  function createGetter<T: boolean | number | string>(
24
30
  configName: string,
25
31
  customValueGetter: Getter<?T>,
@@ -45,7 +51,7 @@ export function createJavaScriptFlagGetter<
45
51
  configName,
46
52
  () => {
47
53
  accessedFeatureFlags.add(configName);
48
- return overrides?.[configName]?.();
54
+ return overrides?.[configName]?.(defaultValue);
49
55
  },
50
56
  defaultValue,
51
57
  );
@@ -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<<6d4aa48dfdd3b78ac5f0f8e70eb3895f>>
8
- * @flow strict-local
7
+ * @generated SignedSource<<4caaf5dbaa68614ce53c8aecbd512df8>>
8
+ * @flow strict
9
9
  */
10
10
 
11
11
  /**
@@ -15,7 +15,7 @@
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 type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';
@@ -24,53 +24,51 @@ import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboMod
24
24
 
25
25
  export interface Spec extends TurboModule {
26
26
  +commonTestFlag?: () => boolean;
27
- +allowRecursiveCommitsWithSynchronousMountOnAndroid?: () => boolean;
28
- +batchRenderingUpdatesInEventLoop?: () => boolean;
27
+ +commonTestFlagWithoutNativeImplementation?: () => boolean;
29
28
  +completeReactInstanceCreationOnBgThreadOnAndroid?: () => boolean;
30
- +destroyFabricSurfacesInReactInstanceManager?: () => boolean;
29
+ +disableEventLoopOnBridgeless?: () => boolean;
30
+ +disableMountItemReorderingAndroid?: () => boolean;
31
31
  +enableAlignItemsBaselineOnFabricIOS?: () => boolean;
32
- +enableAndroidMixBlendModeProp?: () => boolean;
33
- +enableBackgroundStyleApplicator?: () => boolean;
34
- +enableCleanTextInputYogaNode?: () => boolean;
32
+ +enableAndroidLineHeightCentering?: () => boolean;
33
+ +enableBridgelessArchitecture?: () => boolean;
34
+ +enableCppPropsIteratorSetter?: () => boolean;
35
+ +enableDeletionOfUnmountedViews?: () => boolean;
35
36
  +enableEagerRootViewAttachment?: () => boolean;
36
37
  +enableEventEmitterRetentionDuringGesturesOnAndroid?: () => boolean;
37
38
  +enableFabricLogs?: () => boolean;
39
+ +enableFabricRenderer?: () => boolean;
38
40
  +enableFabricRendererExclusively?: () => boolean;
41
+ +enableFixForViewCommandRace?: () => boolean;
39
42
  +enableGranularShadowTreeStateReconciliation?: () => boolean;
40
43
  +enableIOSViewClipToPaddingBox?: () => boolean;
44
+ +enableLayoutAnimationsOnAndroid?: () => boolean;
41
45
  +enableLayoutAnimationsOnIOS?: () => boolean;
42
46
  +enableLongTaskAPI?: () => boolean;
43
- +enableMicrotasks?: () => boolean;
47
+ +enableNewBackgroundAndBorderDrawables?: () => boolean;
48
+ +enablePreciseSchedulingForPremountItemsOnAndroid?: () => boolean;
44
49
  +enablePropsUpdateReconciliationAndroid?: () => boolean;
45
50
  +enableReportEventPaintTime?: () => boolean;
46
51
  +enableSynchronousStateUpdates?: () => boolean;
47
52
  +enableUIConsistency?: () => boolean;
48
53
  +enableViewRecycling?: () => boolean;
49
54
  +excludeYogaFromRawProps?: () => boolean;
50
- +fetchImagesInViewPreallocation?: () => boolean;
51
- +fixIncorrectScrollViewStateUpdateOnAndroid?: () => boolean;
52
55
  +fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean;
53
- +fixMissedFabricStateUpdatesOnAndroid?: () => boolean;
54
56
  +fixMountingCoordinatorReportedPendingTransactionsOnAndroid?: () => boolean;
55
- +forceBatchingMountItemsOnAndroid?: () => boolean;
56
57
  +fuseboxEnabledDebug?: () => boolean;
57
58
  +fuseboxEnabledRelease?: () => boolean;
58
59
  +initEagerTurboModulesOnNativeModulesQueueAndroid?: () => boolean;
59
60
  +lazyAnimationCallbacks?: () => boolean;
60
61
  +loadVectorDrawablesOnImages?: () => boolean;
61
- +setAndroidLayoutDirection?: () => boolean;
62
62
  +traceTurboModulePromiseRejectionsOnAndroid?: () => boolean;
63
+ +useAlwaysAvailableJSErrorHandling?: () => boolean;
63
64
  +useFabricInterop?: () => boolean;
64
65
  +useImmediateExecutorInAndroidBridgeless?: () => boolean;
65
- +useModernRuntimeScheduler?: () => boolean;
66
66
  +useNativeViewConfigsInBridgelessMode?: () => boolean;
67
- +useNewReactImageViewBackgroundDrawing?: () => boolean;
68
67
  +useOptimisedViewPreallocationOnAndroid?: () => boolean;
69
68
  +useOptimizedEventBatchingOnAndroid?: () => boolean;
70
69
  +useRuntimeShadowNodeReferenceUpdate?: () => boolean;
71
- +useRuntimeShadowNodeReferenceUpdateOnLayout?: () => boolean;
72
- +useStateAlignmentMechanism?: () => boolean;
73
70
  +useTurboModuleInterop?: () => boolean;
71
+ +useTurboModules?: () => boolean;
74
72
  }
75
73
 
76
74
  const NativeReactNativeFeatureFlags: ?Spec = TurboModuleRegistry.get<Spec>(
@@ -0,0 +1,34 @@
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
+ * @oncall react_native
10
+ */
11
+
12
+ import type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';
13
+
14
+ import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';
15
+
16
+ export type ReloadAndProfileConfig = {
17
+ shouldReloadAndProfile: boolean,
18
+ recordChangeDescriptions: boolean,
19
+ };
20
+
21
+ // Linter doesn't speak Flow's `Partial` type
22
+ export type PartialReloadAndProfileConfig = {
23
+ shouldReloadAndProfile?: boolean,
24
+ recordChangeDescriptions?: boolean,
25
+ };
26
+
27
+ export interface Spec extends TurboModule {
28
+ +setReloadAndProfileConfig: (config: PartialReloadAndProfileConfig) => void;
29
+ +getReloadAndProfileConfig: () => ReloadAndProfileConfig;
30
+ }
31
+
32
+ export default (TurboModuleRegistry.get<Spec>(
33
+ 'ReactDevToolsRuntimeSettingsModule',
34
+ ): ?Spec);
@@ -8,8 +8,7 @@
8
8
  * @format
9
9
  */
10
10
 
11
- import DOMRect from '../webapis/dom/geometry/DOMRect';
12
- import DOMRectReadOnly from '../webapis/dom/geometry/DOMRectReadOnly';
11
+ import {polyfillGlobal} from '../../../Libraries/Utilities/PolyfillFunctions';
13
12
 
14
13
  let initialized = false;
15
14
 
@@ -20,9 +19,18 @@ export default function setUpDOM() {
20
19
 
21
20
  initialized = true;
22
21
 
23
- // $FlowExpectedError[cannot-write] The global isn't writable anywhere but here, where we define it
24
- global.DOMRect = DOMRect;
22
+ polyfillGlobal(
23
+ 'DOMRect',
24
+ () => require('../webapis/dom/geometry/DOMRect').default,
25
+ );
25
26
 
26
- // $FlowExpectedError[cannot-write] The global isn't writable anywhere but here, where we define it
27
- global.DOMRectReadOnly = DOMRectReadOnly;
27
+ polyfillGlobal(
28
+ 'DOMRectReadOnly',
29
+ () => require('../webapis/dom/geometry/DOMRectReadOnly').default,
30
+ );
31
+
32
+ polyfillGlobal(
33
+ 'NodeList',
34
+ () => require('../webapis/dom/oldstylecollections/NodeList').default,
35
+ );
28
36
  }
@@ -23,4 +23,9 @@ export default function setUpMutationObserver() {
23
23
  'MutationObserver',
24
24
  () => require('../webapis/mutationobserver/MutationObserver').default,
25
25
  );
26
+
27
+ polyfillGlobal(
28
+ 'MutationRecord',
29
+ () => require('../webapis/mutationobserver/MutationRecord').default,
30
+ );
26
31
  }
@@ -23,4 +23,5 @@ type NativeType = HostComponent<NativeProps>;
23
23
 
24
24
  export default (codegenNativeComponent<NativeProps>(
25
25
  'AndroidHorizontalScrollContentView',
26
+ {interfaceOnly: true},
26
27
  ): NativeType);
@@ -58,6 +58,14 @@ type NativeProps = $ReadOnly<{|
58
58
  */
59
59
  statusBarTranslucent?: WithDefault<boolean, false>,
60
60
 
61
+ /**
62
+ * The `navigationBarTranslucent` prop determines whether your modal should go under
63
+ * the system navigationbar.
64
+ *
65
+ * See https://reactnative.dev/docs/modal#navigationBarTranslucent
66
+ */
67
+ navigationBarTranslucent?: WithDefault<boolean, false>,
68
+
61
69
  /**
62
70
  * The `hardwareAccelerated` prop controls whether to force hardware
63
71
  * acceleration for the underlying window.
@@ -16,6 +16,12 @@ export interface Spec extends TurboModule {
16
16
  +isReduceMotionEnabled: (
17
17
  onSuccess: (isReduceMotionEnabled: boolean) => void,
18
18
  ) => void;
19
+ +isInvertColorsEnabled?: (
20
+ onSuccess: (isInvertColorsEnabled: boolean) => void,
21
+ ) => void;
22
+ +isHighTextContrastEnabled?: (
23
+ onSuccess: (isHighTextContrastEnabled: boolean) => void,
24
+ ) => void;
19
25
  +isTouchExplorationEnabled: (
20
26
  onSuccess: (isScreenReaderEnabled: boolean) => void,
21
27
  ) => void;
@@ -28,6 +34,9 @@ export interface Spec extends TurboModule {
28
34
  mSec: number,
29
35
  onSuccess: (recommendedTimeoutMillis: number) => void,
30
36
  ) => void;
37
+ +isGrayscaleEnabled?: (
38
+ onSuccess: (isGrayscaleEnabled: boolean) => void,
39
+ ) => void;
31
40
  }
32
41
 
33
42
  export default (TurboModuleRegistry.get<Spec>('AccessibilityInfo'): ?Spec);