@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.
- package/.eslintignore +1 -1
- package/.flowconfig +5 -1
- package/CHANGELOG.json +179 -53
- package/CHANGELOG.md +82 -28
- package/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +1 -0
- package/Libraries/ActionSheetIOS/ActionSheetIOS.js +13 -0
- package/Libraries/Animated/AnimatedEvent.js +1 -1
- package/Libraries/Animated/AnimatedImplementation.js +2 -2
- package/Libraries/Animated/NativeAnimatedAllowlist.js +20 -9
- package/Libraries/Animated/animations/Animation.js +60 -25
- package/Libraries/Animated/animations/DecayAnimation.js +26 -38
- package/Libraries/Animated/animations/SpringAnimation.js +33 -39
- package/Libraries/Animated/animations/TimingAnimation.js +34 -42
- package/Libraries/Animated/components/AnimatedFlatList.js +1 -1
- package/Libraries/Animated/components/AnimatedSectionList.js +3 -1
- package/Libraries/Animated/createAnimatedComponent.js +60 -33
- package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +1 -1
- package/Libraries/Animated/nodes/AnimatedNode.js +39 -45
- package/Libraries/Animated/nodes/AnimatedObject.js +13 -3
- package/Libraries/Animated/nodes/AnimatedProps.js +104 -46
- package/Libraries/Animated/nodes/AnimatedStyle.js +116 -39
- package/Libraries/Animated/nodes/AnimatedTransform.js +56 -23
- package/Libraries/Animated/nodes/AnimatedValue.js +1 -1
- package/Libraries/Animated/nodes/AnimatedWithChildren.js +1 -3
- package/Libraries/Animated/useAnimatedProps.js +41 -35
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +19 -3
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +77 -5
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +82 -5
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +4 -4
- package/Libraries/Components/Button.js +9 -4
- package/Libraries/Components/Button.win32.js +12 -4
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +3 -1
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +7 -0
- package/Libraries/Components/Pressable/Pressable.js +4 -4
- package/Libraries/Components/Pressable/Pressable.win32.js +4 -4
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +13 -7
- package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +3 -2
- package/Libraries/Components/SafeAreaView/SafeAreaView.js +4 -4
- package/Libraries/Components/SafeAreaView/SafeAreaView.win32.js +4 -4
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +0 -1
- package/Libraries/Components/ScrollView/ScrollView.js +49 -88
- package/Libraries/Components/ScrollView/ScrollViewCommands.js +1 -1
- package/Libraries/Components/ScrollView/ScrollViewContext.js +2 -0
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +0 -2
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +8 -9
- package/Libraries/Components/Switch/Switch.js +8 -6
- package/Libraries/Components/TextInput/InputAccessoryView.js +1 -1
- package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +4 -4
- package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +6 -4
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +2 -1
- package/Libraries/Components/TextInput/TextInput.d.ts +27 -4
- package/Libraries/Components/TextInput/TextInput.flow.js +36 -19
- package/Libraries/Components/TextInput/TextInput.js +37 -13
- package/Libraries/Components/TextInput/TextInput.win32.js +40 -15
- package/Libraries/Components/TextInput/TextInputState.js +11 -13
- package/Libraries/Components/TextInput/TextInputState.win32.js +13 -16
- package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +3 -0
- package/Libraries/Components/Touchable/BoundingDimensions.js +11 -3
- package/Libraries/Components/Touchable/Position.js +7 -2
- package/Libraries/Components/Touchable/Touchable.js +4 -0
- package/Libraries/Components/Touchable/Touchable.win32.js +4 -0
- package/Libraries/Components/Touchable/TouchableBounce.js +6 -2
- package/Libraries/Components/Touchable/TouchableHighlight.js +5 -5
- package/Libraries/Components/Touchable/TouchableOpacity.js +6 -5
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -2
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +6 -1
- package/Libraries/Components/View/View.js +4 -4
- package/Libraries/Components/View/View.win32.js +4 -4
- package/Libraries/Components/View/ViewNativeComponent.js +6 -98
- package/Libraries/Components/View/ViewPropTypes.d.ts +7 -0
- package/Libraries/Components/View/ViewPropTypes.js +0 -3
- package/Libraries/Components/View/ViewPropTypes.win32.js +0 -3
- package/Libraries/Components/View/ViewWin32.js +1 -0
- package/Libraries/Core/ExceptionsManager.js +50 -29
- package/Libraries/Core/ReactNativeVersion.js +3 -3
- package/Libraries/Core/__mocks__/NativeExceptionsManager.js +0 -1
- package/Libraries/Core/setUpBatchedBridge.js +1 -10
- package/Libraries/Core/setUpDeveloperTools.js +1 -5
- package/Libraries/Core/setUpErrorHandling.js +20 -18
- package/Libraries/Core/setUpReactDevTools.js +107 -8
- package/Libraries/Core/setUpSegmentFetcher.js +1 -0
- package/Libraries/Core/setUpTimers.js +21 -18
- package/Libraries/Debugging/DebuggingOverlay.js +4 -5
- package/Libraries/Image/AssetSourceResolver.js +12 -1
- package/Libraries/Image/Image.android.js +1 -5
- package/Libraries/Image/Image.d.ts +20 -29
- package/Libraries/Image/Image.ios.js +0 -2
- package/Libraries/Image/Image.win32.js +0 -2
- package/Libraries/Image/ImageBackground.js +2 -5
- package/Libraries/Image/ImageProps.js +7 -6
- package/Libraries/Image/ImageResizeMode.d.ts +8 -1
- package/Libraries/Image/ImageResizeMode.js +4 -1
- package/Libraries/Image/ImageSource.d.ts +0 -2
- package/Libraries/Image/ImageSource.js +0 -2
- package/Libraries/Image/ImageTypes.flow.js +11 -9
- package/Libraries/Image/ImageUtils.js +6 -3
- package/Libraries/Image/ImageViewNativeComponent.js +5 -3
- package/Libraries/Inspector/Inspector.js +1 -0
- package/Libraries/Inspector/Inspector.win32.js +2 -1
- package/Libraries/Inspector/NetworkOverlay.js +4 -0
- package/Libraries/Inspector/ReactDevToolsOverlay.js +8 -14
- package/Libraries/Inspector/getInspectorDataForViewAtPoint.js +3 -5
- package/Libraries/Interaction/InteractionManager.js +6 -1
- package/Libraries/Interaction/InteractionManagerStub.js +176 -0
- package/Libraries/Interaction/TouchHistoryMath.js +22 -19
- package/Libraries/JSInspector/NetworkAgent.js +1 -1
- package/Libraries/Lists/FlatList.d.ts +1 -2
- package/Libraries/Lists/FlatList.js +2 -2
- package/Libraries/Lists/SectionListModern.js +7 -7
- package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +2 -2
- package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +1 -1
- package/Libraries/LogBox/Data/LogBoxData.js +3 -3
- package/Libraries/LogBox/LogBox.js +18 -5
- package/Libraries/LogBox/LogBoxInspectorContainer.js +1 -1
- package/Libraries/LogBox/LogBoxNotificationContainer.js +2 -2
- package/Libraries/LogBox/UI/AnsiHighlight.js +26 -17
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +6 -1
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.win32.js +6 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +1 -1
- package/Libraries/LogBox/UI/LogBoxMessage.js +2 -2
- package/Libraries/Modal/Modal.d.ts +12 -0
- package/Libraries/Modal/Modal.js +31 -4
- package/Libraries/NativeComponent/BaseViewConfig.android.js +72 -1
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +2 -1
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +3 -11
- package/Libraries/NativeComponent/NativeComponentRegistry.js +3 -3
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +0 -1
- package/Libraries/Network/FormData.js +11 -3
- package/Libraries/Network/XHRInterceptor.js +63 -14
- package/Libraries/Network/XMLHttpRequest.js +26 -1
- package/Libraries/NewAppScreen/components/HermesBadge.js +1 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +49 -2
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +4 -4
- package/Libraries/Pressability/HoverState.js +2 -0
- package/Libraries/Pressability/HoverState.win32.js +2 -0
- package/Libraries/Pressability/Pressability.js +2 -3
- package/Libraries/Pressability/Pressability.win32.js +2 -3
- package/Libraries/Pressability/usePressability.js +4 -1
- package/Libraries/ReactNative/AppContainer.js +1 -1
- package/Libraries/ReactNative/AppRegistry.js +1 -11
- package/Libraries/ReactNative/DisplayMode.js +1 -1
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +2 -3
- package/Libraries/ReactNative/RendererImplementation.js +18 -17
- package/Libraries/ReactNative/getCachedComponentWithDebugName.js +1 -3
- package/Libraries/ReactNative/renderApplication.js +9 -8
- package/Libraries/ReactNative/requireNativeComponent.js +5 -2
- package/Libraries/Renderer/shims/ReactFabric.js +3 -3
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +2 -2
- package/Libraries/Renderer/shims/ReactNative.js +3 -3
- package/Libraries/Renderer/shims/ReactNativeTypes.js +22 -35
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +5 -6
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +2 -2
- package/Libraries/StyleSheet/StyleSheet.js +7 -1
- package/Libraries/StyleSheet/StyleSheet.win32.js +7 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +13 -2
- package/Libraries/StyleSheet/StyleSheetTypes.js +24 -6
- package/Libraries/StyleSheet/processBackgroundImage.js +87 -110
- package/Libraries/StyleSheet/processTransform.js +3 -34
- package/Libraries/Text/Text.js +248 -249
- package/Libraries/Text/Text.win32.js +282 -295
- package/Libraries/Text/TextNativeComponent.js +0 -1
- package/Libraries/TurboModule/TurboModuleRegistry.js +5 -5
- package/Libraries/Types/CoreEventTypes.d.ts +3 -10
- package/Libraries/Types/CoreEventTypes.js +4 -6
- package/Libraries/Types/CoreEventTypes.win32.js +4 -6
- package/Libraries/Utilities/Appearance.js +3 -1
- package/Libraries/Utilities/BackHandler.android.js +6 -18
- package/Libraries/Utilities/BackHandler.d.ts +0 -4
- package/Libraries/Utilities/BackHandler.ios.js +0 -7
- package/Libraries/Utilities/BackHandler.win32.js +6 -18
- package/Libraries/Utilities/FocusManager.win32.js +1 -1
- package/Libraries/Utilities/HMRClient.js +3 -4
- package/Libraries/Utilities/Platform.flow.js +2 -2
- package/Libraries/Utilities/Platform.flow.win32.js +3 -2
- package/Libraries/Utilities/__mocks__/BackHandler.js +3 -8
- package/Libraries/Utilities/codegenNativeComponent.js +1 -1
- package/Libraries/Utilities/useMergeRefs.js +26 -7
- package/Libraries/WebSocket/WebSocketEvent.js +4 -1
- package/Libraries/WebSocket/WebSocketInterceptor.js +31 -13
- package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +6 -5
- package/Libraries/promiseRejectionTrackingOptions.js +1 -1
- package/index.js +10 -3
- package/index.win32.js +10 -3
- package/jest/setup.js +36 -1
- package/overrides.json +37 -37
- package/package.json +20 -20
- package/src/private/animated/NativeAnimatedHelper.js +18 -16
- package/src/private/animated/NativeAnimatedHelper.win32.js +18 -15
- package/src/private/animated/useAnimatedPropsMemo.js +356 -0
- package/src/private/components/HScrollViewNativeComponents.js +1 -27
- package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +11 -8
- package/src/private/components/VScrollViewNativeComponents.js +2 -25
- package/src/private/debugging/ReactDevToolsSettingsManager.android.js +20 -0
- package/src/private/debugging/ReactDevToolsSettingsManager.ios.js +30 -0
- package/src/private/debugging/ReactDevToolsSettingsManager.win32.js +20 -0
- package/src/private/{fusebox → debugging}/setUpFuseboxReactDevToolsDispatcher.js +6 -0
- package/src/private/devmenu/DevMenu.d.ts +20 -0
- package/src/private/devmenu/DevMenu.js +31 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +95 -86
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +8 -2
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +17 -19
- package/src/private/fusebox/specs/NativeReactDevToolsRuntimeSettingsModule.js +34 -0
- package/src/private/setup/setUpDOM.js +14 -6
- package/src/private/setup/setUpMutationObserver.js +5 -0
- package/src/private/specs/components/AndroidHorizontalScrollContentViewNativeComponent.js +1 -0
- package/src/private/specs/components/RCTModalHostViewNativeComponent.js +8 -0
- package/src/private/specs/modules/NativeAccessibilityInfo.js +9 -0
- package/src/private/specs/modules/NativeAccessibilityInfoWin32.js +9 -0
- package/src/private/specs/modules/NativeAccessibilityManager.js +4 -0
- package/src/private/specs/modules/NativeActionSheetManager.js +2 -0
- package/src/private/specs/modules/NativeAppearance.js +4 -10
- package/src/private/specs/modules/NativeExceptionsManager.js +0 -12
- package/src/private/specs/modules/{NativeDevToolsSettingsManager.js → NativeReactDevToolsSettingsManager.js} +3 -5
- package/src/private/webapis/dom/geometry/DOMRect.js +2 -2
- package/src/private/webapis/dom/geometry/DOMRectReadOnly.js +2 -2
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +2 -3
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +102 -11
- package/src/private/webapis/intersectionobserver/IntersectionObserverEntry.js +26 -0
- package/src/private/webapis/intersectionobserver/IntersectionObserverManager.js +1 -0
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +1 -0
- package/src/private/webapis/intersectionobserver/specs/__mocks__/NativeIntersectionObserver.js +9 -0
- package/src/private/webapis/performance/EventTiming.js +13 -8
- package/src/private/webapis/performance/Performance.js +66 -73
- package/src/private/webapis/performance/PerformanceEntry.js +2 -5
- package/src/private/webapis/performance/PerformanceObserver.js +65 -164
- package/src/private/webapis/performance/RawPerformanceEntry.js +1 -1
- package/src/private/webapis/performance/UserTiming.js +11 -7
- package/src/private/webapis/performance/Utilities.js +18 -0
- package/src/private/webapis/performance/specs/NativePerformance.js +71 -2
- package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +267 -0
- package/src-win/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +19 -3
- package/src-win/Libraries/Components/View/ViewPropTypes.d.ts +7 -0
- package/types/index.d.ts +1 -1
- package/types/public/ReactNativeTypes.d.ts +4 -8
- package/Libraries/DevToolsSettings/DevToolsSettingsManager.android.js +0 -35
- package/Libraries/DevToolsSettings/DevToolsSettingsManager.d.ts +0 -20
- package/Libraries/DevToolsSettings/DevToolsSettingsManager.ios.js +0 -49
- package/Libraries/DevToolsSettings/DevToolsSettingsManager.win32.js +0 -35
- package/Libraries/DevToolsSettings/NativeDevToolsSettingsManager.js +0 -13
- package/Libraries/ReactNative/ReactFabricInternals.js +0 -17
- package/src/private/components/useSyncOnScroll.js +0 -48
- package/src/private/webapis/performance/specs/NativePerformanceObserver.js +0 -61
- package/src/private/webapis/performance/specs/__mocks__/NativePerformance.js +0 -67
- package/src/private/webapis/performance/specs/__mocks__/NativePerformanceObserver.js +0 -127
- package/types/experimental.d.ts +0 -59
- /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<<
|
|
8
|
-
* @flow strict
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
40
|
-
usePassiveEffectsForAnimations: Getter<boolean>,
|
|
44
|
+
useInsertionEffectsForAnimations: Getter<boolean>,
|
|
41
45
|
useRefsForTextInputState: Getter<boolean>,
|
|
42
46
|
};
|
|
43
47
|
|
|
44
|
-
export type ReactNativeFeatureFlagsJsOnlyOverrides =
|
|
48
|
+
export type ReactNativeFeatureFlagsJsOnlyOverrides = OverridesFor<ReactNativeFeatureFlagsJsOnly>;
|
|
45
49
|
|
|
46
50
|
export type ReactNativeFeatureFlags = {
|
|
47
51
|
...ReactNativeFeatureFlagsJsOnly,
|
|
48
52
|
commonTestFlag: Getter<boolean>,
|
|
49
|
-
|
|
50
|
-
batchRenderingUpdatesInEventLoop: Getter<boolean>,
|
|
53
|
+
commonTestFlagWithoutNativeImplementation: Getter<boolean>,
|
|
51
54
|
completeReactInstanceCreationOnBgThreadOnAndroid: Getter<boolean>,
|
|
52
|
-
|
|
55
|
+
disableEventLoopOnBridgeless: Getter<boolean>,
|
|
56
|
+
disableMountItemReorderingAndroid: Getter<boolean>,
|
|
53
57
|
enableAlignItemsBaselineOnFabricIOS: Getter<boolean>,
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
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
|
-
|
|
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
|
-
*
|
|
131
|
+
* Enables Animated to skip non-allowlisted props and styles.
|
|
120
132
|
*/
|
|
121
|
-
export const
|
|
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
|
-
*
|
|
171
|
+
* Changes construction of the animation graph to `useInsertionEffect` instead of `useLayoutEffect`.
|
|
150
172
|
*/
|
|
151
|
-
export const
|
|
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
|
-
*
|
|
185
|
+
* Common flag for testing (without native implementation). Do NOT modify.
|
|
169
186
|
*/
|
|
170
|
-
export const
|
|
187
|
+
export const commonTestFlagWithoutNativeImplementation: Getter<boolean> = createNativeFlagGetter('commonTestFlagWithoutNativeImplementation', false);
|
|
171
188
|
/**
|
|
172
|
-
*
|
|
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
|
|
191
|
+
export const completeReactInstanceCreationOnBgThreadOnAndroid: Getter<boolean> = createNativeFlagGetter('completeReactInstanceCreationOnBgThreadOnAndroid', true);
|
|
175
192
|
/**
|
|
176
|
-
*
|
|
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
|
|
195
|
+
export const disableEventLoopOnBridgeless: Getter<boolean> = createNativeFlagGetter('disableEventLoopOnBridgeless', false);
|
|
179
196
|
/**
|
|
180
|
-
*
|
|
197
|
+
* Prevent FabricMountingManager from reordering mountitems, which may lead to invalid state on the UI thread
|
|
181
198
|
*/
|
|
182
|
-
export const
|
|
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
|
-
*
|
|
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
|
|
211
|
+
export const enableBridgelessArchitecture: Getter<boolean> = createNativeFlagGetter('enableBridgelessArchitecture', false);
|
|
191
212
|
/**
|
|
192
|
-
*
|
|
213
|
+
* Enable prop iterator setter-style construction of Props in C++ (this flag is not used in Java).
|
|
193
214
|
*/
|
|
194
|
-
export const
|
|
215
|
+
export const enableCppPropsIteratorSetter: Getter<boolean> = createNativeFlagGetter('enableCppPropsIteratorSetter', false);
|
|
195
216
|
/**
|
|
196
|
-
*
|
|
217
|
+
* Deletes views that were pre-allocated but never mounted on the screen.
|
|
197
218
|
*/
|
|
198
|
-
export const
|
|
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
|
-
*
|
|
265
|
+
* Use BackgroundDrawable and BorderDrawable instead of CSSBackgroundDrawable
|
|
233
266
|
*/
|
|
234
|
-
export const
|
|
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',
|
|
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',
|
|
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
|
|
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<<
|
|
8
|
-
* @flow strict
|
|
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
|
|
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
|
-
+
|
|
28
|
-
+batchRenderingUpdatesInEventLoop?: () => boolean;
|
|
27
|
+
+commonTestFlagWithoutNativeImplementation?: () => boolean;
|
|
29
28
|
+completeReactInstanceCreationOnBgThreadOnAndroid?: () => boolean;
|
|
30
|
-
+
|
|
29
|
+
+disableEventLoopOnBridgeless?: () => boolean;
|
|
30
|
+
+disableMountItemReorderingAndroid?: () => boolean;
|
|
31
31
|
+enableAlignItemsBaselineOnFabricIOS?: () => boolean;
|
|
32
|
-
+
|
|
33
|
-
+
|
|
34
|
-
+
|
|
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
|
-
+
|
|
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
|
|
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
|
-
|
|
24
|
-
|
|
22
|
+
polyfillGlobal(
|
|
23
|
+
'DOMRect',
|
|
24
|
+
() => require('../webapis/dom/geometry/DOMRect').default,
|
|
25
|
+
);
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
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
|
}
|
|
@@ -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);
|