@office-iss/react-native-win32 0.0.0-canary.273 → 0.0.0-canary.275

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 (114) hide show
  1. package/.flowconfig +5 -1
  2. package/CHANGELOG.json +31 -1
  3. package/CHANGELOG.md +20 -4
  4. package/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +1 -0
  5. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +13 -0
  6. package/Libraries/Animated/animations/Animation.js +1 -5
  7. package/Libraries/Animated/components/AnimatedFlatList.js +1 -1
  8. package/Libraries/Animated/components/AnimatedSectionList.js +3 -1
  9. package/Libraries/Animated/createAnimatedComponent.js +7 -7
  10. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +16 -2
  11. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +21 -2
  12. package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +1 -1
  13. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +3 -2
  14. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +0 -1
  15. package/Libraries/Components/ScrollView/ScrollView.js +39 -78
  16. package/Libraries/Components/ScrollView/ScrollViewCommands.js +1 -1
  17. package/Libraries/Components/ScrollView/ScrollViewContext.js +2 -0
  18. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +0 -2
  19. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +2 -3
  20. package/Libraries/Components/TextInput/InputAccessoryView.js +1 -1
  21. package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +4 -4
  22. package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +6 -4
  23. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
  24. package/Libraries/Components/TextInput/TextInput.flow.js +11 -9
  25. package/Libraries/Components/TextInput/TextInput.js +7 -1
  26. package/Libraries/Components/TextInput/TextInput.win32.js +8 -1
  27. package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +3 -0
  28. package/Libraries/Components/Touchable/TouchableBounce.js +1 -0
  29. package/Libraries/Components/Touchable/TouchableOpacity.js +1 -0
  30. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -2
  31. package/Libraries/Components/View/ViewPropTypes.d.ts +7 -0
  32. package/Libraries/Components/View/ViewWin32.js +1 -0
  33. package/Libraries/Core/ExceptionsManager.js +41 -27
  34. package/Libraries/Core/ReactNativeVersion.js +1 -1
  35. package/Libraries/Core/__mocks__/NativeExceptionsManager.js +0 -1
  36. package/Libraries/Core/setUpErrorHandling.js +18 -22
  37. package/Libraries/Core/setUpTimers.js +4 -12
  38. package/Libraries/Image/Image.d.ts +20 -29
  39. package/Libraries/Image/ImageProps.js +2 -1
  40. package/Libraries/Image/ImageResizeMode.d.ts +8 -1
  41. package/Libraries/Image/ImageResizeMode.js +4 -1
  42. package/Libraries/Image/ImageSource.d.ts +0 -2
  43. package/Libraries/Image/ImageSource.js +0 -2
  44. package/Libraries/Image/ImageUtils.js +6 -3
  45. package/Libraries/Inspector/Inspector.win32.js +1 -1
  46. package/Libraries/Interaction/InteractionManager.js +6 -1
  47. package/Libraries/Interaction/InteractionManagerStub.js +176 -0
  48. package/Libraries/Lists/FlatList.js +2 -2
  49. package/Libraries/Lists/SectionListModern.js +7 -7
  50. package/Libraries/LogBox/Data/LogBoxData.js +2 -2
  51. package/Libraries/LogBox/LogBox.js +1 -1
  52. package/Libraries/LogBox/LogBoxInspectorContainer.js +1 -1
  53. package/Libraries/LogBox/LogBoxNotificationContainer.js +1 -1
  54. package/Libraries/LogBox/UI/AnsiHighlight.js +26 -17
  55. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +6 -1
  56. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.win32.js +6 -1
  57. package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -1
  58. package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +1 -1
  59. package/Libraries/Modal/Modal.d.ts +5 -0
  60. package/Libraries/Modal/Modal.js +19 -3
  61. package/Libraries/NativeComponent/NativeComponentRegistry.js +3 -3
  62. package/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +49 -2
  63. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +4 -4
  64. package/Libraries/Pressability/usePressability.js +4 -1
  65. package/Libraries/ReactNative/AppContainer.js +1 -1
  66. package/Libraries/ReactNative/AppRegistry.js +0 -6
  67. package/Libraries/ReactNative/DisplayMode.js +1 -1
  68. package/Libraries/ReactNative/RendererImplementation.js +14 -14
  69. package/Libraries/ReactNative/getCachedComponentWithDebugName.js +1 -3
  70. package/Libraries/ReactNative/renderApplication.js +9 -8
  71. package/Libraries/ReactNative/requireNativeComponent.js +5 -2
  72. package/Libraries/Renderer/implementations/ReactFabric-dev.js +26149 -15434
  73. package/Libraries/Renderer/implementations/ReactFabric-prod.js +1630 -2675
  74. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +1691 -2954
  75. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +27069 -16192
  76. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +1657 -2714
  77. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +1733 -2980
  78. package/Libraries/Renderer/shims/ReactFabric.js +3 -3
  79. package/Libraries/Renderer/shims/ReactFeatureFlags.js +2 -2
  80. package/Libraries/Renderer/shims/ReactNative.js +3 -3
  81. package/Libraries/Renderer/shims/ReactNativeTypes.js +9 -10
  82. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +2 -2
  83. package/Libraries/StyleSheet/StyleSheet.js +7 -1
  84. package/Libraries/StyleSheet/StyleSheet.win32.js +7 -1
  85. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +7 -1
  86. package/Libraries/StyleSheet/StyleSheetTypes.js +5 -4
  87. package/Libraries/Utilities/BackHandler.android.js +6 -18
  88. package/Libraries/Utilities/BackHandler.d.ts +0 -4
  89. package/Libraries/Utilities/BackHandler.ios.js +0 -7
  90. package/Libraries/Utilities/BackHandler.win32.js +6 -18
  91. package/Libraries/Utilities/__mocks__/BackHandler.js +3 -8
  92. package/Libraries/Utilities/codegenNativeComponent.js +1 -1
  93. package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +1 -1
  94. package/index.js +1 -1
  95. package/index.win32.js +1 -1
  96. package/overrides.json +11 -11
  97. package/package.json +13 -13
  98. package/src/private/components/HScrollViewNativeComponents.js +1 -26
  99. package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +4 -4
  100. package/src/private/components/VScrollViewNativeComponents.js +2 -24
  101. package/src/private/featureflags/ReactNativeFeatureFlags.js +36 -46
  102. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +7 -9
  103. package/src/private/specs/components/RCTModalHostViewNativeComponent.js +8 -0
  104. package/src/private/specs/modules/NativeAccessibilityInfo.js +6 -0
  105. package/src/private/specs/modules/NativeAccessibilityInfoWin32.js +6 -0
  106. package/src/private/specs/modules/NativeActionSheetManager.js +2 -0
  107. package/src/private/specs/modules/NativeExceptionsManager.js +0 -12
  108. package/src/private/webapis/intersectionobserver/IntersectionObserver.js +6 -0
  109. package/src/private/webapis/performance/Performance.js +1 -1
  110. package/src/private/webapis/performance/UserTiming.js +5 -5
  111. package/src-win/Libraries/Components/View/ViewPropTypes.d.ts +7 -0
  112. package/Libraries/ReactNative/ReactFabricInternals.js +0 -17
  113. package/src/private/components/useSyncOnScroll.js +0 -48
  114. package/types/experimental.d.ts +0 -59
@@ -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
- * @generated SignedSource<<1c91049b99046065031ca8b826ab20a6>>
7
+ * @generated SignedSource<<8334fdc6d34d4a090eb8be73f92ccd0f>>
8
8
  * @flow strict
9
9
  */
10
10
 
@@ -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 {
@@ -30,13 +30,13 @@ export type ReactNativeFeatureFlagsJsOnly = {
30
30
  jsOnlyTestFlag: Getter<boolean>,
31
31
  animatedShouldDebounceQueueFlush: Getter<boolean>,
32
32
  animatedShouldUseSingleOp: Getter<boolean>,
33
+ disableInteractionManager: Getter<boolean>,
33
34
  enableAccessToHostTreeInFabric: Getter<boolean>,
34
35
  enableAnimatedAllowlist: Getter<boolean>,
35
36
  enableAnimatedClearImmediateFix: Getter<boolean>,
36
37
  enableAnimatedPropsMemo: Getter<boolean>,
37
38
  enableOptimisedVirtualizedCells: Getter<boolean>,
38
39
  isLayoutAnimationEnabled: Getter<boolean>,
39
- scheduleAnimatedEndCallbackInMicrotask: Getter<boolean>,
40
40
  shouldSkipStateUpdatesForLoopingAnimations: Getter<boolean>,
41
41
  shouldUseAnimatedObjectForTransform: Getter<boolean>,
42
42
  shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter<boolean>,
@@ -52,37 +52,35 @@ export type ReactNativeFeatureFlags = {
52
52
  ...ReactNativeFeatureFlagsJsOnly,
53
53
  commonTestFlag: Getter<boolean>,
54
54
  commonTestFlagWithoutNativeImplementation: Getter<boolean>,
55
- allowRecursiveCommitsWithSynchronousMountOnAndroid: Getter<boolean>,
56
- batchRenderingUpdatesInEventLoop: Getter<boolean>,
57
55
  completeReactInstanceCreationOnBgThreadOnAndroid: Getter<boolean>,
58
56
  disableEventLoopOnBridgeless: Getter<boolean>,
57
+ disableMountItemReorderingAndroid: Getter<boolean>,
59
58
  enableAlignItemsBaselineOnFabricIOS: Getter<boolean>,
60
59
  enableAndroidLineHeightCentering: Getter<boolean>,
61
60
  enableBridgelessArchitecture: Getter<boolean>,
62
- enableCleanTextInputYogaNode: Getter<boolean>,
61
+ enableCppPropsIteratorSetter: Getter<boolean>,
63
62
  enableDeletionOfUnmountedViews: Getter<boolean>,
64
63
  enableEagerRootViewAttachment: Getter<boolean>,
65
64
  enableEventEmitterRetentionDuringGesturesOnAndroid: Getter<boolean>,
66
65
  enableFabricLogs: Getter<boolean>,
67
66
  enableFabricRenderer: Getter<boolean>,
68
67
  enableFabricRendererExclusively: Getter<boolean>,
68
+ enableFixForViewCommandRace: Getter<boolean>,
69
69
  enableGranularShadowTreeStateReconciliation: Getter<boolean>,
70
70
  enableIOSViewClipToPaddingBox: Getter<boolean>,
71
71
  enableLayoutAnimationsOnAndroid: Getter<boolean>,
72
72
  enableLayoutAnimationsOnIOS: Getter<boolean>,
73
73
  enableLongTaskAPI: Getter<boolean>,
74
- enableMicrotasks: Getter<boolean>,
74
+ enableNewBackgroundAndBorderDrawables: Getter<boolean>,
75
75
  enablePreciseSchedulingForPremountItemsOnAndroid: Getter<boolean>,
76
76
  enablePropsUpdateReconciliationAndroid: Getter<boolean>,
77
77
  enableReportEventPaintTime: Getter<boolean>,
78
78
  enableSynchronousStateUpdates: Getter<boolean>,
79
- enableTextPreallocationOptimisation: Getter<boolean>,
80
79
  enableUIConsistency: Getter<boolean>,
81
80
  enableViewRecycling: Getter<boolean>,
82
81
  excludeYogaFromRawProps: Getter<boolean>,
83
82
  fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean>,
84
83
  fixMountingCoordinatorReportedPendingTransactionsOnAndroid: Getter<boolean>,
85
- forceBatchingMountItemsOnAndroid: Getter<boolean>,
86
84
  fuseboxEnabledDebug: Getter<boolean>,
87
85
  fuseboxEnabledRelease: Getter<boolean>,
88
86
  initEagerTurboModulesOnNativeModulesQueueAndroid: Getter<boolean>,
@@ -90,9 +88,9 @@ export type ReactNativeFeatureFlags = {
90
88
  loadVectorDrawablesOnImages: Getter<boolean>,
91
89
  setAndroidLayoutDirection: Getter<boolean>,
92
90
  traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean>,
91
+ useAlwaysAvailableJSErrorHandling: Getter<boolean>,
93
92
  useFabricInterop: Getter<boolean>,
94
93
  useImmediateExecutorInAndroidBridgeless: Getter<boolean>,
95
- useModernRuntimeScheduler: Getter<boolean>,
96
94
  useNativeViewConfigsInBridgelessMode: Getter<boolean>,
97
95
  useOptimisedViewPreallocationOnAndroid: Getter<boolean>,
98
96
  useOptimizedEventBatchingOnAndroid: Getter<boolean>,
@@ -116,6 +114,11 @@ export const animatedShouldDebounceQueueFlush: Getter<boolean> = createJavaScrip
116
114
  */
117
115
  export const animatedShouldUseSingleOp: Getter<boolean> = createJavaScriptFlagGetter('animatedShouldUseSingleOp', false);
118
116
 
117
+ /**
118
+ * Disables InteractionManager and replaces its scheduler with `setImmediate`.
119
+ */
120
+ export const disableInteractionManager: Getter<boolean> = createJavaScriptFlagGetter('disableInteractionManager', false);
121
+
119
122
  /**
120
123
  * Enables access to the host tree in Fabric using DOM-compatible APIs.
121
124
  */
@@ -124,7 +127,7 @@ export const enableAccessToHostTreeInFabric: Getter<boolean> = createJavaScriptF
124
127
  /**
125
128
  * Enables Animated to skip non-allowlisted props and styles.
126
129
  */
127
- export const enableAnimatedAllowlist: Getter<boolean> = createJavaScriptFlagGetter('enableAnimatedAllowlist', false);
130
+ export const enableAnimatedAllowlist: Getter<boolean> = createJavaScriptFlagGetter('enableAnimatedAllowlist', true);
128
131
 
129
132
  /**
130
133
  * Enables an experimental to use the proper clearIntermediate instead of calling the wrong clearTimeout and canceling another timer.
@@ -134,7 +137,7 @@ export const enableAnimatedClearImmediateFix: Getter<boolean> = createJavaScript
134
137
  /**
135
138
  * Enables Animated to analyze props to minimize invalidating `AnimatedProps`.
136
139
  */
137
- export const enableAnimatedPropsMemo: Getter<boolean> = createJavaScriptFlagGetter('enableAnimatedPropsMemo', false);
140
+ export const enableAnimatedPropsMemo: Getter<boolean> = createJavaScriptFlagGetter('enableAnimatedPropsMemo', true);
138
141
 
139
142
  /**
140
143
  * Removing unnecessary rerenders Virtualized cells after any rerenders of Virualized list. Works with strict=true option
@@ -146,11 +149,6 @@ export const enableOptimisedVirtualizedCells: Getter<boolean> = createJavaScript
146
149
  */
147
150
  export const isLayoutAnimationEnabled: Getter<boolean> = createJavaScriptFlagGetter('isLayoutAnimationEnabled', true);
148
151
 
149
- /**
150
- * Changes the completion callback supplied via `Animation#start` to be scheduled in a microtask instead of synchronously executed.
151
- */
152
- export const scheduleAnimatedEndCallbackInMicrotask: Getter<boolean> = createJavaScriptFlagGetter('scheduleAnimatedEndCallbackInMicrotask', false);
153
-
154
152
  /**
155
153
  * If the animation is within Animated.loop, we do not send state updates to React.
156
154
  */
@@ -179,7 +177,7 @@ export const shouldUseSetNativePropsInNativeAnimationsInFabric: Getter<boolean>
179
177
  /**
180
178
  * Changes construction of the animation graph to `useInsertionEffect` instead of `useLayoutEffect`.
181
179
  */
182
- export const useInsertionEffectsForAnimations: Getter<boolean> = createJavaScriptFlagGetter('useInsertionEffectsForAnimations', false);
180
+ export const useInsertionEffectsForAnimations: Getter<boolean> = createJavaScriptFlagGetter('useInsertionEffectsForAnimations', true);
183
181
 
184
182
  /**
185
183
  * Enable a variant of TextInput that moves some state to refs to avoid unnecessary re-renders
@@ -194,22 +192,18 @@ export const commonTestFlag: Getter<boolean> = createNativeFlagGetter('commonTes
194
192
  * Common flag for testing (without native implementation). Do NOT modify.
195
193
  */
196
194
  export const commonTestFlagWithoutNativeImplementation: Getter<boolean> = createNativeFlagGetter('commonTestFlagWithoutNativeImplementation', false);
197
- /**
198
- * Adds support for recursively processing commits that mount synchronously (Android only).
199
- */
200
- export const allowRecursiveCommitsWithSynchronousMountOnAndroid: Getter<boolean> = createNativeFlagGetter('allowRecursiveCommitsWithSynchronousMountOnAndroid', false);
201
- /**
202
- * 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.
203
- */
204
- export const batchRenderingUpdatesInEventLoop: Getter<boolean> = createNativeFlagGetter('batchRenderingUpdatesInEventLoop', false);
205
195
  /**
206
196
  * Do not wait for a main-thread dispatch to complete init to start executing work on the JS thread on Android
207
197
  */
208
- export const completeReactInstanceCreationOnBgThreadOnAndroid: Getter<boolean> = createNativeFlagGetter('completeReactInstanceCreationOnBgThreadOnAndroid', false);
198
+ export const completeReactInstanceCreationOnBgThreadOnAndroid: Getter<boolean> = createNativeFlagGetter('completeReactInstanceCreationOnBgThreadOnAndroid', true);
209
199
  /**
210
200
  * The bridgeless architecture enables the event loop by default. This feature flag allows us to force disabling it in specific instances.
211
201
  */
212
202
  export const disableEventLoopOnBridgeless: Getter<boolean> = createNativeFlagGetter('disableEventLoopOnBridgeless', false);
203
+ /**
204
+ * Prevent FabricMountingManager from reordering mountitems, which may lead to invalid state on the UI thread
205
+ */
206
+ export const disableMountItemReorderingAndroid: Getter<boolean> = createNativeFlagGetter('disableMountItemReorderingAndroid', false);
213
207
  /**
214
208
  * Kill-switch to turn off support for aling-items:baseline on Fabric iOS.
215
209
  */
@@ -217,15 +211,15 @@ export const enableAlignItemsBaselineOnFabricIOS: Getter<boolean> = createNative
217
211
  /**
218
212
  * When enabled, custom line height calculation will be centered from top to bottom.
219
213
  */
220
- export const enableAndroidLineHeightCentering: Getter<boolean> = createNativeFlagGetter('enableAndroidLineHeightCentering', false);
214
+ export const enableAndroidLineHeightCentering: Getter<boolean> = createNativeFlagGetter('enableAndroidLineHeightCentering', true);
221
215
  /**
222
216
  * Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flags: `useTurboModules` & `enableFabricRenderer.
223
217
  */
224
218
  export const enableBridgelessArchitecture: Getter<boolean> = createNativeFlagGetter('enableBridgelessArchitecture', false);
225
219
  /**
226
- * Clean yoga node when <TextInput /> does not change.
220
+ * Enable prop iterator setter-style construction of Props in C++ (this flag is not used in Java).
227
221
  */
228
- export const enableCleanTextInputYogaNode: Getter<boolean> = createNativeFlagGetter('enableCleanTextInputYogaNode', false);
222
+ export const enableCppPropsIteratorSetter: Getter<boolean> = createNativeFlagGetter('enableCppPropsIteratorSetter', false);
229
223
  /**
230
224
  * Deletes views that were pre-allocated but never mounted on the screen.
231
225
  */
@@ -250,6 +244,10 @@ export const enableFabricRenderer: Getter<boolean> = createNativeFlagGetter('ena
250
244
  * 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.
251
245
  */
252
246
  export const enableFabricRendererExclusively: Getter<boolean> = createNativeFlagGetter('enableFabricRendererExclusively', false);
247
+ /**
248
+ * Synchronise the view command dispatching with mounting of new transaction
249
+ */
250
+ export const enableFixForViewCommandRace: Getter<boolean> = createNativeFlagGetter('enableFixForViewCommandRace', false);
253
251
  /**
254
252
  * When enabled, the renderer would only fail commits when they propagate state and the last commit that updated state changed before committing.
255
253
  */
@@ -271,9 +269,9 @@ export const enableLayoutAnimationsOnIOS: Getter<boolean> = createNativeFlagGett
271
269
  */
272
270
  export const enableLongTaskAPI: Getter<boolean> = createNativeFlagGetter('enableLongTaskAPI', false);
273
271
  /**
274
- * Enables the use of microtasks in Hermes (scheduling) and RuntimeScheduler (execution).
272
+ * Use BackgroundDrawable and BorderDrawable instead of CSSBackgroundDrawable
275
273
  */
276
- export const enableMicrotasks: Getter<boolean> = createNativeFlagGetter('enableMicrotasks', false);
274
+ export const enableNewBackgroundAndBorderDrawables: Getter<boolean> = createNativeFlagGetter('enableNewBackgroundAndBorderDrawables', false);
277
275
  /**
278
276
  * Moves execution of pre-mount items to outside the choregrapher in the main thread, so we can estimate idle time more precisely (Android only).
279
277
  */
@@ -290,10 +288,6 @@ export const enableReportEventPaintTime: Getter<boolean> = createNativeFlagGette
290
288
  * Dispatches state updates synchronously in Fabric (e.g.: updates the scroll position in the shadow tree synchronously from the main thread).
291
289
  */
292
290
  export const enableSynchronousStateUpdates: Getter<boolean> = createNativeFlagGetter('enableSynchronousStateUpdates', false);
293
- /**
294
- * Text preallocation optimisation where unnecessary work is removed.
295
- */
296
- export const enableTextPreallocationOptimisation: Getter<boolean> = createNativeFlagGetter('enableTextPreallocationOptimisation', false);
297
291
  /**
298
292
  * Ensures that JavaScript always has a consistent view of the state of the UI (e.g.: commits done in other threads are not immediately propagated to JS during its execution).
299
293
  */
@@ -314,10 +308,6 @@ export const fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean> =
314
308
  * 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.
315
309
  */
316
310
  export const fixMountingCoordinatorReportedPendingTransactionsOnAndroid: Getter<boolean> = createNativeFlagGetter('fixMountingCoordinatorReportedPendingTransactionsOnAndroid', false);
317
- /**
318
- * 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.
319
- */
320
- export const forceBatchingMountItemsOnAndroid: Getter<boolean> = createNativeFlagGetter('forceBatchingMountItemsOnAndroid', false);
321
311
  /**
322
312
  * 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.
323
313
  */
@@ -329,7 +319,7 @@ export const fuseboxEnabledRelease: Getter<boolean> = createNativeFlagGetter('fu
329
319
  /**
330
320
  * Construct modules that requires eager init on the dedicate native modules thread
331
321
  */
332
- export const initEagerTurboModulesOnNativeModulesQueueAndroid: Getter<boolean> = createNativeFlagGetter('initEagerTurboModulesOnNativeModulesQueueAndroid', false);
322
+ export const initEagerTurboModulesOnNativeModulesQueueAndroid: Getter<boolean> = createNativeFlagGetter('initEagerTurboModulesOnNativeModulesQueueAndroid', true);
333
323
  /**
334
324
  * Only enqueue Choreographer calls if there is an ongoing animation, instead of enqueueing every frame.
335
325
  */
@@ -346,6 +336,10 @@ export const setAndroidLayoutDirection: Getter<boolean> = createNativeFlagGetter
346
336
  * Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
347
337
  */
348
338
  export const traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean> = createNativeFlagGetter('traceTurboModulePromiseRejectionsOnAndroid', false);
339
+ /**
340
+ * In Bridgeless mode, use the always available javascript error reporting pipeline.
341
+ */
342
+ export const useAlwaysAvailableJSErrorHandling: Getter<boolean> = createNativeFlagGetter('useAlwaysAvailableJSErrorHandling', false);
349
343
  /**
350
344
  * 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.
351
345
  */
@@ -353,11 +347,7 @@ export const useFabricInterop: Getter<boolean> = createNativeFlagGetter('useFabr
353
347
  /**
354
348
  * Invoke callbacks immediately on the ReactInstance rather than going through a background thread for synchronization
355
349
  */
356
- export const useImmediateExecutorInAndroidBridgeless: Getter<boolean> = createNativeFlagGetter('useImmediateExecutorInAndroidBridgeless', false);
357
- /**
358
- * When enabled, it uses the modern fork of RuntimeScheduler that allows scheduling tasks with priorities from any thread.
359
- */
360
- export const useModernRuntimeScheduler: Getter<boolean> = createNativeFlagGetter('useModernRuntimeScheduler', false);
350
+ export const useImmediateExecutorInAndroidBridgeless: Getter<boolean> = createNativeFlagGetter('useImmediateExecutorInAndroidBridgeless', true);
361
351
  /**
362
352
  * When enabled, the native view configs are used in bridgeless mode.
363
353
  */
@@ -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
- * @generated SignedSource<<255e1fec50a4c211c3cc814eaf92ee9b>>
7
+ * @generated SignedSource<<ced421dd8531e9a074999a1cdb5e4a16>>
8
8
  * @flow strict
9
9
  */
10
10
 
@@ -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';
@@ -25,37 +25,35 @@ import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboMod
25
25
  export interface Spec extends TurboModule {
26
26
  +commonTestFlag?: () => boolean;
27
27
  +commonTestFlagWithoutNativeImplementation?: () => boolean;
28
- +allowRecursiveCommitsWithSynchronousMountOnAndroid?: () => boolean;
29
- +batchRenderingUpdatesInEventLoop?: () => boolean;
30
28
  +completeReactInstanceCreationOnBgThreadOnAndroid?: () => boolean;
31
29
  +disableEventLoopOnBridgeless?: () => boolean;
30
+ +disableMountItemReorderingAndroid?: () => boolean;
32
31
  +enableAlignItemsBaselineOnFabricIOS?: () => boolean;
33
32
  +enableAndroidLineHeightCentering?: () => boolean;
34
33
  +enableBridgelessArchitecture?: () => boolean;
35
- +enableCleanTextInputYogaNode?: () => boolean;
34
+ +enableCppPropsIteratorSetter?: () => boolean;
36
35
  +enableDeletionOfUnmountedViews?: () => boolean;
37
36
  +enableEagerRootViewAttachment?: () => boolean;
38
37
  +enableEventEmitterRetentionDuringGesturesOnAndroid?: () => boolean;
39
38
  +enableFabricLogs?: () => boolean;
40
39
  +enableFabricRenderer?: () => boolean;
41
40
  +enableFabricRendererExclusively?: () => boolean;
41
+ +enableFixForViewCommandRace?: () => boolean;
42
42
  +enableGranularShadowTreeStateReconciliation?: () => boolean;
43
43
  +enableIOSViewClipToPaddingBox?: () => boolean;
44
44
  +enableLayoutAnimationsOnAndroid?: () => boolean;
45
45
  +enableLayoutAnimationsOnIOS?: () => boolean;
46
46
  +enableLongTaskAPI?: () => boolean;
47
- +enableMicrotasks?: () => boolean;
47
+ +enableNewBackgroundAndBorderDrawables?: () => boolean;
48
48
  +enablePreciseSchedulingForPremountItemsOnAndroid?: () => boolean;
49
49
  +enablePropsUpdateReconciliationAndroid?: () => boolean;
50
50
  +enableReportEventPaintTime?: () => boolean;
51
51
  +enableSynchronousStateUpdates?: () => boolean;
52
- +enableTextPreallocationOptimisation?: () => boolean;
53
52
  +enableUIConsistency?: () => boolean;
54
53
  +enableViewRecycling?: () => boolean;
55
54
  +excludeYogaFromRawProps?: () => boolean;
56
55
  +fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean;
57
56
  +fixMountingCoordinatorReportedPendingTransactionsOnAndroid?: () => boolean;
58
- +forceBatchingMountItemsOnAndroid?: () => boolean;
59
57
  +fuseboxEnabledDebug?: () => boolean;
60
58
  +fuseboxEnabledRelease?: () => boolean;
61
59
  +initEagerTurboModulesOnNativeModulesQueueAndroid?: () => boolean;
@@ -63,9 +61,9 @@ export interface Spec extends TurboModule {
63
61
  +loadVectorDrawablesOnImages?: () => boolean;
64
62
  +setAndroidLayoutDirection?: () => boolean;
65
63
  +traceTurboModulePromiseRejectionsOnAndroid?: () => boolean;
64
+ +useAlwaysAvailableJSErrorHandling?: () => boolean;
66
65
  +useFabricInterop?: () => boolean;
67
66
  +useImmediateExecutorInAndroidBridgeless?: () => boolean;
68
- +useModernRuntimeScheduler?: () => boolean;
69
67
  +useNativeViewConfigsInBridgelessMode?: () => boolean;
70
68
  +useOptimisedViewPreallocationOnAndroid?: () => boolean;
71
69
  +useOptimizedEventBatchingOnAndroid?: () => boolean;
@@ -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,9 @@ 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;
19
22
  +isHighTextContrastEnabled?: (
20
23
  onSuccess: (isHighTextContrastEnabled: boolean) => void,
21
24
  ) => void;
@@ -31,6 +34,9 @@ export interface Spec extends TurboModule {
31
34
  mSec: number,
32
35
  onSuccess: (recommendedTimeoutMillis: number) => void,
33
36
  ) => void;
37
+ +isGrayscaleEnabled?: (
38
+ onSuccess: (isGrayscaleEnabled: boolean) => void,
39
+ ) => void;
34
40
  }
35
41
 
36
42
  export default (TurboModuleRegistry.get<Spec>('AccessibilityInfo'): ?Spec);
@@ -16,6 +16,9 @@ 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;
19
22
  +isHighTextContrastEnabled?: (
20
23
  onSuccess: (isHighTextContrastEnabled: boolean) => void,
21
24
  ) => void;
@@ -37,6 +40,9 @@ export interface Spec extends TurboModule {
37
40
  mSec: number,
38
41
  onSuccess: (recommendedTimeoutMillis: number) => void,
39
42
  ) => void;
43
+ +isGrayscaleEnabled?: (
44
+ onSuccess: (isGrayscaleEnabled: boolean) => void,
45
+ ) => void;
40
46
  }
41
47
 
42
48
  export default (TurboModuleRegistry.get<Spec>('AccessibilityInfo'): ?Spec);
@@ -24,6 +24,7 @@ export interface Spec extends TurboModule {
24
24
  +anchor?: ?number,
25
25
  +tintColor?: ?number,
26
26
  +cancelButtonTintColor?: ?number,
27
+ +disabledButtonTintColor?: ?number,
27
28
  +userInterfaceStyle?: ?string,
28
29
  +disabledButtonIndices?: Array<number>,
29
30
  |},
@@ -37,6 +38,7 @@ export interface Spec extends TurboModule {
37
38
  +anchor?: ?number,
38
39
  +tintColor?: ?number,
39
40
  +cancelButtonTintColor?: ?number,
41
+ +disabledButtonTintColor?: ?number,
40
42
  +excludedActivityTypes?: ?Array<string>,
41
43
  +userInterfaceStyle?: ?string,
42
44
  |},
@@ -47,11 +47,6 @@ export interface Spec extends TurboModule {
47
47
  exceptionId: number,
48
48
  ) => void;
49
49
  +reportException?: (data: ExceptionData) => void;
50
- +updateExceptionMessage: (
51
- message: string,
52
- stack: Array<StackFrame>,
53
- exceptionId: number,
54
- ) => void;
55
50
  // TODO(T53311281): This is a noop on iOS now. Implement it.
56
51
  +dismissRedbox?: () => void;
57
52
  }
@@ -74,13 +69,6 @@ const ExceptionsManager = {
74
69
  ) {
75
70
  NativeModule.reportSoftException(message, stack, exceptionId);
76
71
  },
77
- updateExceptionMessage(
78
- message: string,
79
- stack: Array<StackFrame>,
80
- exceptionId: number,
81
- ) {
82
- NativeModule.updateExceptionMessage(message, stack, exceptionId);
83
- },
84
72
  dismissRedbox(): void {
85
73
  if (Platform.OS !== 'ios' && NativeModule.dismissRedbox) {
86
74
  // TODO(T53311281): This is a noop on iOS now. Implement it.
@@ -131,6 +131,12 @@ export default class IntersectionObserver {
131
131
  * To stop observing the element, call `IntersectionObserver.unobserve()`.
132
132
  */
133
133
  observe(target: ReactNativeElement): void {
134
+ if (target == null) {
135
+ throw new TypeError(
136
+ "Failed to execute 'observe' on 'IntersectionObserver': parameter 1 is null or undefined.",
137
+ );
138
+ }
139
+
134
140
  if (!(target instanceof ReactNativeElement)) {
135
141
  throw new TypeError(
136
142
  "Failed to execute 'observe' on 'IntersectionObserver': parameter 1 is not of type 'ReactNativeElement'.",
@@ -218,7 +218,7 @@ export default class Performance {
218
218
 
219
219
  const measure = new PerformanceMeasure(measureName, {
220
220
  startTime: computedStartTime,
221
- duration: computedDuration,
221
+ duration: computedDuration ?? 0,
222
222
  detail: options?.detail,
223
223
  });
224
224
 
@@ -25,8 +25,8 @@ export type TimeStampOrName = DOMHighResTimeStamp | string;
25
25
 
26
26
  export type PerformanceMeasureInit = {
27
27
  detail?: DetailType,
28
- startTime?: DOMHighResTimeStamp,
29
- duration?: DOMHighResTimeStamp,
28
+ startTime: DOMHighResTimeStamp,
29
+ duration: DOMHighResTimeStamp,
30
30
  };
31
31
 
32
32
  export class PerformanceMark extends PerformanceEntry {
@@ -53,12 +53,12 @@ export class PerformanceMark extends PerformanceEntry {
53
53
  export class PerformanceMeasure extends PerformanceEntry {
54
54
  #detail: DetailType;
55
55
 
56
- constructor(measureName: string, measureOptions?: PerformanceMeasureInit) {
56
+ constructor(measureName: string, measureOptions: PerformanceMeasureInit) {
57
57
  super({
58
58
  name: measureName,
59
59
  entryType: 'measure',
60
- startTime: measureOptions?.startTime ?? 0,
61
- duration: measureOptions?.duration ?? 0,
60
+ startTime: measureOptions.startTime,
61
+ duration: measureOptions.duration,
62
62
  });
63
63
 
64
64
  if (measureOptions) {
@@ -343,6 +343,13 @@ export interface ViewProps
343
343
  * Used to reference react managed views from native code.
344
344
  */
345
345
  nativeID?: string | undefined;
346
+
347
+ /**
348
+ * Contols whether this view, and its transitive children, are laid in a way
349
+ * consistent with web browsers ('strict'), or consistent with existing
350
+ * React Native code which may rely on incorrect behavior ('classic').
351
+ */
352
+ experimental_layoutConformance?: 'strict' | 'classic' | undefined;
346
353
  }
347
354
 
348
355
  // For backwards compat.... // Win32
@@ -1,17 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow strict-local
8
- * @format
9
- */
10
-
11
- 'use strict';
12
-
13
- const createReactNativeComponentClass = require('../Renderer/shims/createReactNativeComponentClass');
14
-
15
- module.exports = {
16
- createReactNativeComponentClass,
17
- };
@@ -1,48 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @flow strict-local
8
- * @format
9
- * @oncall react_native
10
- */
11
-
12
- import type {ScrollViewNativeProps} from '../../../Libraries/Components/ScrollView/ScrollViewNativeComponentType';
13
- import type {HostComponent} from '../../../Libraries/Renderer/shims/ReactNativeTypes';
14
-
15
- import * as React from 'react';
16
- import {useImperativeHandle, useRef, useState} from 'react';
17
-
18
- export type TScrollViewNativeComponentInstance = React.ElementRef<
19
- HostComponent<ScrollViewNativeProps>,
20
- >;
21
-
22
- export type TScrollViewNativeImperativeHandle = {
23
- componentRef: React.RefObject<TScrollViewNativeComponentInstance | null>,
24
- unstable_setEnableSyncOnScroll: (enabled: true) => void,
25
- };
26
-
27
- /**
28
- * Hook used by `HScrollViewNativeComponent` and `VScrollViewNativeComponent`
29
- * to make an implementation of `unstable_setEnableSyncOnScroll` available that
30
- * does not require updating all `ScrollView` children.
31
- */
32
- export default function useSyncOnScroll(
33
- inputRef: ?React.RefSetter<TScrollViewNativeImperativeHandle | null>,
34
- ): [React.RefSetter<TScrollViewNativeComponentInstance | null>, true | void] {
35
- const componentRef = useRef<TScrollViewNativeComponentInstance | null>(null);
36
- const [enableSyncOnScroll, setEnableSyncOnScroll] = useState<true | void>();
37
-
38
- useImperativeHandle<TScrollViewNativeImperativeHandle>(inputRef, () => {
39
- return {
40
- componentRef,
41
- unstable_setEnableSyncOnScroll(enabled: true): void {
42
- setEnableSyncOnScroll(enabled);
43
- },
44
- };
45
- }, []);
46
-
47
- return [componentRef, enableSyncOnScroll];
48
- }
@@ -1,59 +0,0 @@
1
- /**
2
- * Copyright (c) Meta Platforms, Inc. and affiliates.
3
- *
4
- * This source code is licensed under the MIT license found in the
5
- * LICENSE file in the root directory of this source tree.
6
- *
7
- * @format
8
- */
9
-
10
- /**
11
- * These are types for things that are present for New Architecture enabled apps
12
- * which is currently considered experimental.
13
- *
14
- * To load the types declared here in an actual project, there are three ways.
15
- *
16
- * 1. If your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
17
- * is to add `"react-native/types/experimental"` to the `"types"` array.
18
- *
19
- * 2. Alternatively, a specific import syntax can to be used from a typescript file.
20
- * This module does not exist in reality, which is why the {} is important:
21
- *
22
- * ```ts
23
- * import {} from 'react-native/types/experimental'
24
- * ```
25
- *
26
- * 3. It is also possible to include it through a triple-slash reference:
27
- *
28
- * ```ts
29
- * /// <reference types="react-native/types/experimental" />
30
- * ```
31
- *
32
- * Either the import or the reference only needs to appear once, anywhere in the project.
33
- */
34
-
35
- import {
36
- GradientValue,
37
- BlendMode,
38
- } from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
39
-
40
- export {};
41
-
42
- declare module '.' {
43
- export interface ViewProps {
44
- /**
45
- * Contols whether this view, and its transitive children, are laid in a way
46
- * consistent with web browsers ('strict'), or consistent with existing
47
- * React Native code which may rely on incorrect behavior ('classic').
48
- */
49
- experimental_layoutConformance?: 'strict' | 'classic' | undefined;
50
- }
51
-
52
- export interface ViewStyle {
53
- mixBlendMode?: BlendMode | undefined;
54
- experimental_backgroundImage?:
55
- | ReadonlyArray<GradientValue>
56
- | string
57
- | undefined;
58
- }
59
- }