@office-iss/react-native-win32 0.81.2 → 0.82.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/.flowconfig +3 -11
- package/CHANGELOG.json +118 -43
- package/CHANGELOG.md +45 -27
- package/IntegrationTests/IntegrationTestsApp.js +2 -2
- package/IntegrationTests/LayoutEventsTest.js +3 -3
- package/Libraries/ActionSheetIOS/ActionSheetIOS.js +7 -3
- package/Libraries/Alert/RCTAlertManager.android.js +4 -2
- package/Libraries/Animated/Animated.d.ts +2 -0
- package/Libraries/Animated/AnimatedEvent.js +1 -1
- package/Libraries/Animated/AnimatedExports.js.flow +1 -0
- package/Libraries/Animated/AnimatedImplementation.js +4 -2
- package/Libraries/Animated/AnimatedMock.js +1 -1
- package/Libraries/Animated/Easing.js +2 -0
- package/Libraries/Animated/NativeAnimatedAllowlist.js +1 -0
- package/Libraries/Animated/animations/Animation.js +19 -20
- package/Libraries/Animated/animations/TimingAnimation.js +2 -0
- package/Libraries/Animated/components/AnimatedScrollView.js +3 -2
- package/Libraries/Animated/components/AnimatedSectionList.js +1 -1
- package/Libraries/Animated/nodes/AnimatedColor.js +9 -9
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +4 -4
- package/Libraries/Animated/nodes/AnimatedNode.js +14 -7
- package/Libraries/Animated/nodes/AnimatedObject.js +7 -7
- package/Libraries/Animated/nodes/AnimatedProps.js +32 -32
- package/Libraries/Animated/nodes/AnimatedStyle.js +23 -21
- package/Libraries/Animated/nodes/AnimatedTransform.js +6 -6
- package/Libraries/Animated/nodes/AnimatedValue.js +18 -26
- package/Libraries/AppState/AppState.js +8 -4
- package/Libraries/BatchedBridge/BatchedBridge.js +1 -0
- package/Libraries/BatchedBridge/MessageQueue.js +5 -0
- package/Libraries/BatchedBridge/NativeModules.js +1 -1
- package/Libraries/Blob/BlobManager.js +1 -1
- package/Libraries/Blob/URLSearchParams.js +2 -0
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +2 -2
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +2 -2
- package/Libraries/Components/Button.js +1 -1
- package/Libraries/Components/Button.win32.js +1 -1
- package/Libraries/Components/Pressable/Pressable.js +10 -1
- package/Libraries/Components/Pressable/Pressable.win32.js +9 -0
- package/Libraries/Components/Pressable/useAndroidRippleForView.js +2 -2
- package/Libraries/Components/ScrollView/ScrollView.js +13 -4
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
- package/Libraries/Components/StatusBar/StatusBar.js +2 -2
- package/Libraries/Components/Switch/Switch.js +1 -1
- package/Libraries/Components/TextInput/TextInput.flow.js +12 -5
- package/Libraries/Components/TextInput/TextInput.flow.win32.js +12 -5
- package/Libraries/Components/TextInput/TextInput.js +14 -5
- package/Libraries/Components/TextInput/TextInput.win32.js +15 -7
- package/Libraries/Components/TextInput/TextInputState.js +1 -1
- package/Libraries/Components/TextInput/TextInputState.win32.js +1 -1
- package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +2 -3
- package/Libraries/Components/Touchable/TouchableBounce.js +1 -1
- package/Libraries/Components/Touchable/TouchableHighlight.js +1 -1
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -1
- package/Libraries/Components/Touchable/TouchableOpacity.js +1 -1
- package/Libraries/Components/Touchable/TouchableWin32.js +1 -1
- package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +3 -3
- package/Libraries/Components/View/View.js +81 -167
- package/Libraries/Components/View/View.win32.js +3 -1
- package/Libraries/Core/Devtools/loadBundleFromServer.js +1 -1
- package/Libraries/Core/Devtools/loadBundleFromServer.win32.js +1 -1
- package/Libraries/Core/ExceptionsManager.js +4 -2
- package/Libraries/Core/ReactFiberErrorDialog.js +3 -3
- package/Libraries/Core/ReactNativeVersion.js +37 -10
- package/Libraries/Core/Timers/JSTimers.js +4 -1
- package/Libraries/Core/Timers/NativeTiming.js +1 -0
- package/Libraries/Core/Timers/immediateShim.js +2 -1
- package/Libraries/Core/Timers/queueMicrotask.js +1 -0
- package/Libraries/Core/setUpPerformance.js +3 -4
- package/Libraries/Debugging/DebuggingOverlayRegistry.js +5 -3
- package/Libraries/Image/Image.android.js +327 -111
- package/Libraries/Image/Image.ios.js +6 -1
- package/Libraries/Image/Image.win32.js +6 -1
- package/Libraries/Image/ImageSourceUtils.js +8 -2
- package/Libraries/Image/assetPaths.js +1 -1
- package/Libraries/Image/resolveAssetSource.js +1 -1
- package/Libraries/Image/resolveAssetSource.win32.js +6 -7
- package/Libraries/Interaction/InteractionManager.js +118 -167
- package/Libraries/Interaction/PanResponder.js +7 -52
- package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -0
- package/Libraries/Lists/FlatList.js +5 -6
- package/Libraries/LogBox/Data/LogBoxData.js +5 -2
- package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +2 -2
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.win32.js +1 -1
- package/Libraries/Modal/Modal.js +3 -3
- package/Libraries/NativeComponent/NativeComponentRegistry.js +1 -1
- package/Libraries/NativeComponent/ViewConfig.js +2 -2
- package/Libraries/Network/RCTNetworking.android.js +1 -1
- package/Libraries/Network/RCTNetworking.ios.js +1 -1
- package/Libraries/Network/RCTNetworking.win32.js +1 -1
- package/Libraries/Network/XMLHttpRequest.js +20 -5
- package/Libraries/Network/convertRequestBody.js +1 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +10 -9
- package/Libraries/Pressability/HoverState.js +2 -0
- package/Libraries/Pressability/HoverState.win32.js +2 -0
- package/Libraries/Pressability/Pressability.js +1 -1
- package/Libraries/Pressability/Pressability.win32.js +1 -1
- package/Libraries/PushNotificationIOS/PushNotificationIOS.js +2 -2
- package/Libraries/ReactNative/AppRegistryImpl.js +4 -2
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +2 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +3 -3
- package/Libraries/ReactNative/RendererImplementation.js +116 -116
- package/Libraries/ReactNative/UIManager.js +3 -3
- package/Libraries/ReactNative/renderApplication.js +1 -0
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +1 -1
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +38 -35
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +51 -22
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +54 -24
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +36 -33
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +5 -5
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +5 -5
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -1
- package/Libraries/Share/Share.js +4 -0
- package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +2 -2
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +2 -2
- package/Libraries/StyleSheet/PlatformColorValueTypes.win32.js +4 -0
- package/Libraries/StyleSheet/StyleSheet.d.ts +7 -22
- package/Libraries/StyleSheet/StyleSheetExports.js +2 -8
- package/Libraries/StyleSheet/StyleSheetExports.js.flow +11 -18
- package/Libraries/StyleSheet/flattenStyle.js +2 -2
- package/Libraries/StyleSheet/processAspectRatio.js +2 -0
- package/Libraries/StyleSheet/processFilter.js +5 -5
- package/Libraries/StyleSheet/splitLayoutProps.js +2 -2
- package/Libraries/Text/Text.js +534 -234
- package/Libraries/Text/Text.win32.js +647 -274
- package/Libraries/Text/TextNativeComponent.js +2 -2
- package/Libraries/Text/TextNativeComponent.win32.js +2 -2
- package/Libraries/Utilities/Appearance.d.ts +3 -5
- package/Libraries/Utilities/Appearance.js +5 -17
- package/Libraries/Utilities/HMRClient.js +2 -1
- package/Libraries/Utilities/Platform.android.js +3 -3
- package/Libraries/Utilities/Platform.d.ts +1 -0
- package/Libraries/Utilities/Platform.ios.js +1 -1
- package/Libraries/Utilities/Platform.win32.js +3 -3
- package/Libraries/Utilities/PlatformTypes.js +1 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +12 -0
- package/Libraries/Utilities/SceneTracker.js +1 -1
- package/Libraries/Utilities/codegenNativeCommands.js +1 -1
- package/Libraries/Utilities/codegenNativeComponent.js +1 -1
- package/Libraries/Utilities/createPerformanceLogger.js +32 -0
- package/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.js +2 -0
- package/Libraries/Utilities/differ/pointsDiffer.js +1 -1
- package/Libraries/Utilities/useMergeRefs.js +1 -1
- package/Libraries/WebSocket/WebSocketInterceptor.js +2 -0
- package/Libraries/promiseRejectionTrackingOptions.js +17 -31
- package/Libraries/vendor/emitter/EventEmitter.js +1 -1
- package/flow/bom.js.flow +223 -1
- package/flow/prettier.js.flow +14 -0
- package/index.js +14 -2
- package/index.win32.js +16 -2
- package/jest/local-setup.js +2 -2
- package/jest/mock.js +1 -1
- package/jest/mockComponent.js +9 -9
- package/jest/mockNativeComponent.js +3 -2
- package/jest/mocks/Modal.js +1 -1
- package/jest/mocks/ScrollView.js +1 -1
- package/jest/mocks/ViewNativeComponent.js +1 -1
- package/jest/setup.js +23 -12
- package/overrides.json +23 -23
- package/package.json +28 -27
- package/saveAssetPlugin.js +2 -2
- package/src/private/animated/NativeAnimatedHelper.js +16 -5
- package/src/private/animated/NativeAnimatedHelper.win32.js +16 -5
- package/src/private/animated/createAnimatedPropsHook.js +11 -60
- package/src/private/animated/createAnimatedPropsMemoHook.js +8 -54
- package/src/private/components/virtualview/VirtualView.js +43 -12
- package/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js +93 -0
- package/src/private/components/virtualview/VirtualViewNativeComponent.js +6 -0
- package/src/private/devsupport/devmenu/elementinspector/Inspector.js +2 -2
- package/src/private/devsupport/devmenu/elementinspector/ReactDevToolsOverlay.js +2 -2
- package/src/private/featureflags/ReactNativeFeatureFlags.js +85 -52
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +23 -4
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +15 -6
- package/src/private/renderer/errorhandling/ErrorHandlers.js +3 -3
- package/src/private/setup/{setUpPerformanceObserver.js → setUpPerformanceModern.js} +43 -18
- package/src/private/specs_DEPRECATED/modules/NativeTiming.js +1 -0
- package/src/private/types/HostInstance.js +4 -1
- package/src/private/webapis/dom/nodes/ReactNativeDocument.js +22 -2
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +1 -1
- package/src/private/webapis/dom/nodes/ReadOnlyElement.js +5 -3
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +16 -13
- package/src/private/webapis/dom/nodes/internals/NodeInternals.js +45 -22
- package/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.js +1 -1
- package/src/private/webapis/dom/nodes/specs/NativeDOM.js +26 -192
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +15 -12
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +14 -11
- package/src/private/webapis/geometry/DOMRectList.js +2 -2
- package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +19 -74
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +0 -4
- package/src/private/webapis/mutationobserver/internals/MutationObserverManager.js +1 -1
- package/src/private/webapis/performance/EventTiming.js +40 -25
- package/src/private/webapis/performance/LongTasks.js +35 -2
- package/src/private/webapis/performance/Performance.js +347 -166
- package/src/private/webapis/performance/PerformanceEntry.js +40 -23
- package/src/private/webapis/performance/PerformanceObserver.js +37 -29
- package/src/private/webapis/performance/ReactNativeStartupTiming.js +3 -24
- package/src/private/webapis/performance/ResourceTiming.js +29 -18
- package/src/private/webapis/performance/UserTiming.js +92 -34
- package/src/private/webapis/performance/UserTimingExtensibility.js.flow +38 -0
- package/src/private/webapis/performance/internals/RawPerformanceEntry.js +3 -4
- package/src/private/webapis/performance/internals/Utilities.js +9 -0
- package/src/private/webapis/performance/specs/NativePerformance.js +23 -23
- package/src/private/webapis/structuredClone/structuredClone.js +10 -10
- package/src-win/Libraries/Components/Touchable/TouchableWin32.tsx +1 -1
- package/Libraries/Interaction/InteractionManagerStub.js +0 -184
- package/Libraries/Interaction/TaskQueue.js +0 -183
- package/Libraries/ReactNative/ReactNativeFeatureFlags.js +0 -31
|
@@ -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<<
|
|
7
|
+
* @generated SignedSource<<5ba27aa5af4c69dedd733ca5ccb09fe3>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
* @noformat
|
|
10
10
|
*/
|
|
@@ -29,21 +29,19 @@ import {
|
|
|
29
29
|
|
|
30
30
|
export type ReactNativeFeatureFlagsJsOnly = $ReadOnly<{
|
|
31
31
|
jsOnlyTestFlag: Getter<boolean>,
|
|
32
|
-
alwaysFlattenAnimatedStyles: Getter<boolean>,
|
|
33
32
|
animatedShouldDebounceQueueFlush: Getter<boolean>,
|
|
34
33
|
animatedShouldUseSingleOp: Getter<boolean>,
|
|
35
|
-
avoidStateUpdateInAnimatedPropsMemo: Getter<boolean>,
|
|
36
34
|
deferFlatListFocusChangeRenderUpdate: Getter<boolean>,
|
|
37
|
-
|
|
35
|
+
disableMaintainVisibleContentPosition: Getter<boolean>,
|
|
38
36
|
enableAccessToHostTreeInFabric: Getter<boolean>,
|
|
39
37
|
fixVirtualizeListCollapseWindowSize: Getter<boolean>,
|
|
40
38
|
isLayoutAnimationEnabled: Getter<boolean>,
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
reduceDefaultPropsInImage: Getter<boolean>,
|
|
40
|
+
reduceDefaultPropsInText: Getter<boolean>,
|
|
43
41
|
shouldUseAnimatedObjectForTransform: Getter<boolean>,
|
|
44
42
|
shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter<boolean>,
|
|
45
43
|
shouldUseSetNativePropsInFabric: Getter<boolean>,
|
|
46
|
-
|
|
44
|
+
virtualViewActivityBehavior: Getter<string>,
|
|
47
45
|
}>;
|
|
48
46
|
|
|
49
47
|
export type ReactNativeFeatureFlagsJsOnlyOverrides = OverridesFor<ReactNativeFeatureFlagsJsOnly>;
|
|
@@ -52,11 +50,12 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
52
50
|
...ReactNativeFeatureFlagsJsOnly,
|
|
53
51
|
commonTestFlag: Getter<boolean>,
|
|
54
52
|
commonTestFlagWithoutNativeImplementation: Getter<boolean>,
|
|
55
|
-
|
|
53
|
+
cdpInteractionMetricsEnabled: Getter<boolean>,
|
|
56
54
|
cxxNativeAnimatedEnabled: Getter<boolean>,
|
|
57
55
|
cxxNativeAnimatedRemoveJsSync: Getter<boolean>,
|
|
58
|
-
|
|
56
|
+
disableFabricCommitInCXXAnimated: Getter<boolean>,
|
|
59
57
|
disableMountItemReorderingAndroid: Getter<boolean>,
|
|
58
|
+
disableOldAndroidAttachmentMetricsWorkarounds: Getter<boolean>,
|
|
60
59
|
disableTextLayoutManagerCacheAndroid: Getter<boolean>,
|
|
61
60
|
enableAccessibilityOrder: Getter<boolean>,
|
|
62
61
|
enableAccumulatedUpdatesInRawPropsAndroid: Getter<boolean>,
|
|
@@ -66,18 +65,19 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
66
65
|
enableCustomFocusSearchOnClippedElementsAndroid: Getter<boolean>,
|
|
67
66
|
enableDestroyShadowTreeRevisionAsync: Getter<boolean>,
|
|
68
67
|
enableDoubleMeasurementFixAndroid: Getter<boolean>,
|
|
68
|
+
enableEagerMainQueueModulesOnIOS: Getter<boolean>,
|
|
69
69
|
enableEagerRootViewAttachment: Getter<boolean>,
|
|
70
70
|
enableFabricLogs: Getter<boolean>,
|
|
71
71
|
enableFabricRenderer: Getter<boolean>,
|
|
72
|
-
enableFixForParentTagDuringReparenting: Getter<boolean>,
|
|
73
72
|
enableFontScaleChangesUpdatingLayout: Getter<boolean>,
|
|
74
73
|
enableIOSTextBaselineOffsetPerLine: Getter<boolean>,
|
|
75
74
|
enableIOSViewClipToPaddingBox: Getter<boolean>,
|
|
75
|
+
enableImagePrefetchingAndroid: Getter<boolean>,
|
|
76
|
+
enableImmediateUpdateModeForContentOffsetChanges: Getter<boolean>,
|
|
76
77
|
enableInteropViewManagerClassLookUpOptimizationIOS: Getter<boolean>,
|
|
77
78
|
enableLayoutAnimationsOnAndroid: Getter<boolean>,
|
|
78
79
|
enableLayoutAnimationsOnIOS: Getter<boolean>,
|
|
79
80
|
enableMainQueueCoordinatorOnIOS: Getter<boolean>,
|
|
80
|
-
enableMainQueueModulesOnIOS: Getter<boolean>,
|
|
81
81
|
enableModuleArgumentNSNullConversionIOS: Getter<boolean>,
|
|
82
82
|
enableNativeCSSParsing: Getter<boolean>,
|
|
83
83
|
enableNetworkEventReporting: Getter<boolean>,
|
|
@@ -85,20 +85,26 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
85
85
|
enablePreparedTextLayout: Getter<boolean>,
|
|
86
86
|
enablePropsUpdateReconciliationAndroid: Getter<boolean>,
|
|
87
87
|
enableResourceTimingAPI: Getter<boolean>,
|
|
88
|
-
enableSynchronousStateUpdates: Getter<boolean>,
|
|
89
88
|
enableViewCulling: Getter<boolean>,
|
|
90
89
|
enableViewRecycling: Getter<boolean>,
|
|
90
|
+
enableViewRecyclingForScrollView: Getter<boolean>,
|
|
91
91
|
enableViewRecyclingForText: Getter<boolean>,
|
|
92
92
|
enableViewRecyclingForView: Getter<boolean>,
|
|
93
93
|
enableVirtualViewDebugFeatures: Getter<boolean>,
|
|
94
94
|
enableVirtualViewRenderState: Getter<boolean>,
|
|
95
95
|
enableVirtualViewWindowFocusDetection: Getter<boolean>,
|
|
96
|
+
enableWebPerformanceAPIsByDefault: Getter<boolean>,
|
|
96
97
|
fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean>,
|
|
97
98
|
fuseboxEnabledRelease: Getter<boolean>,
|
|
98
99
|
fuseboxNetworkInspectionEnabled: Getter<boolean>,
|
|
99
100
|
hideOffscreenVirtualViewsOnIOS: Getter<boolean>,
|
|
101
|
+
perfMonitorV2Enabled: Getter<boolean>,
|
|
100
102
|
preparedTextCacheSize: Getter<number>,
|
|
101
103
|
preventShadowTreeCommitExhaustion: Getter<boolean>,
|
|
104
|
+
releaseImageDataWhenConsumed: Getter<boolean>,
|
|
105
|
+
shouldPressibilityUseW3CPointerEventsForHover: Getter<boolean>,
|
|
106
|
+
skipActivityIdentityAssertionOnHostPause: Getter<boolean>,
|
|
107
|
+
sweepActiveTouchOnChildNativeGesturesAndroid: Getter<boolean>,
|
|
102
108
|
traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean>,
|
|
103
109
|
updateRuntimeShadowNodeReferencesOnCommit: Getter<boolean>,
|
|
104
110
|
useAlwaysAvailableJSErrorHandling: Getter<boolean>,
|
|
@@ -111,6 +117,7 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
111
117
|
useShadowNodeStateOnClone: Getter<boolean>,
|
|
112
118
|
useTurboModuleInterop: Getter<boolean>,
|
|
113
119
|
useTurboModules: Getter<boolean>,
|
|
120
|
+
virtualViewHysteresisRatio: Getter<number>,
|
|
114
121
|
virtualViewPrerenderRatio: Getter<number>,
|
|
115
122
|
}>;
|
|
116
123
|
|
|
@@ -119,11 +126,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
119
126
|
*/
|
|
120
127
|
export const jsOnlyTestFlag: Getter<boolean> = createJavaScriptFlagGetter('jsOnlyTestFlag', false);
|
|
121
128
|
|
|
122
|
-
/**
|
|
123
|
-
* Changes `Animated` to always flatten style, fixing a bug with shadowed `AnimatedNode` instances.
|
|
124
|
-
*/
|
|
125
|
-
export const alwaysFlattenAnimatedStyles: Getter<boolean> = createJavaScriptFlagGetter('alwaysFlattenAnimatedStyles', false);
|
|
126
|
-
|
|
127
129
|
/**
|
|
128
130
|
* Enables an experimental flush-queue debouncing in Animated.js.
|
|
129
131
|
*/
|
|
@@ -134,25 +136,20 @@ export const animatedShouldDebounceQueueFlush: Getter<boolean> = createJavaScrip
|
|
|
134
136
|
*/
|
|
135
137
|
export const animatedShouldUseSingleOp: Getter<boolean> = createJavaScriptFlagGetter('animatedShouldUseSingleOp', false);
|
|
136
138
|
|
|
137
|
-
/**
|
|
138
|
-
* Changes `useAnimatedPropsMemo` to avoid state updates to invalidate the cached `AnimatedProps`.
|
|
139
|
-
*/
|
|
140
|
-
export const avoidStateUpdateInAnimatedPropsMemo: Getter<boolean> = createJavaScriptFlagGetter('avoidStateUpdateInAnimatedPropsMemo', true);
|
|
141
|
-
|
|
142
139
|
/**
|
|
143
140
|
* Use the deferred cell render update mechanism for focus change in FlatList.
|
|
144
141
|
*/
|
|
145
142
|
export const deferFlatListFocusChangeRenderUpdate: Getter<boolean> = createJavaScriptFlagGetter('deferFlatListFocusChangeRenderUpdate', false);
|
|
146
143
|
|
|
147
144
|
/**
|
|
148
|
-
*
|
|
145
|
+
* Disable prop maintainVisibleContentPosition in ScrollView
|
|
149
146
|
*/
|
|
150
|
-
export const
|
|
147
|
+
export const disableMaintainVisibleContentPosition: Getter<boolean> = createJavaScriptFlagGetter('disableMaintainVisibleContentPosition', false);
|
|
151
148
|
|
|
152
149
|
/**
|
|
153
150
|
* Enables access to the host tree in Fabric using DOM-compatible APIs.
|
|
154
151
|
*/
|
|
155
|
-
export const enableAccessToHostTreeInFabric: Getter<boolean> = createJavaScriptFlagGetter('enableAccessToHostTreeInFabric',
|
|
152
|
+
export const enableAccessToHostTreeInFabric: Getter<boolean> = createJavaScriptFlagGetter('enableAccessToHostTreeInFabric', true);
|
|
156
153
|
|
|
157
154
|
/**
|
|
158
155
|
* Fixing an edge case where the current window size is not properly calculated with fast scrolling. Window size collapsed to 1 element even if windowSize more than the current amount of elements
|
|
@@ -165,14 +162,14 @@ export const fixVirtualizeListCollapseWindowSize: Getter<boolean> = createJavaSc
|
|
|
165
162
|
export const isLayoutAnimationEnabled: Getter<boolean> = createJavaScriptFlagGetter('isLayoutAnimationEnabled', true);
|
|
166
163
|
|
|
167
164
|
/**
|
|
168
|
-
* Optimize how default
|
|
165
|
+
* Optimize how default props are processed in Image to avoid unnecessary keys.
|
|
169
166
|
*/
|
|
170
|
-
export const
|
|
167
|
+
export const reduceDefaultPropsInImage: Getter<boolean> = createJavaScriptFlagGetter('reduceDefaultPropsInImage', false);
|
|
171
168
|
|
|
172
169
|
/**
|
|
173
|
-
*
|
|
170
|
+
* Optimize how default props are processed in Text to avoid unnecessary keys.
|
|
174
171
|
*/
|
|
175
|
-
export const
|
|
172
|
+
export const reduceDefaultPropsInText: Getter<boolean> = createJavaScriptFlagGetter('reduceDefaultPropsInText', false);
|
|
176
173
|
|
|
177
174
|
/**
|
|
178
175
|
* Enables use of AnimatedObject for animating transform values.
|
|
@@ -190,9 +187,9 @@ export const shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter<boolean> = cre
|
|
|
190
187
|
export const shouldUseSetNativePropsInFabric: Getter<boolean> = createJavaScriptFlagGetter('shouldUseSetNativePropsInFabric', true);
|
|
191
188
|
|
|
192
189
|
/**
|
|
193
|
-
*
|
|
190
|
+
* Changes whether and how `VirtualView` uses `Activity`.
|
|
194
191
|
*/
|
|
195
|
-
export const
|
|
192
|
+
export const virtualViewActivityBehavior: Getter<string> = createJavaScriptFlagGetter('virtualViewActivityBehavior', "no-activity");
|
|
196
193
|
|
|
197
194
|
/**
|
|
198
195
|
* Common flag for testing. Do NOT modify.
|
|
@@ -203,9 +200,9 @@ export const commonTestFlag: Getter<boolean> = createNativeFlagGetter('commonTes
|
|
|
203
200
|
*/
|
|
204
201
|
export const commonTestFlagWithoutNativeImplementation: Getter<boolean> = createNativeFlagGetter('commonTestFlagWithoutNativeImplementation', false);
|
|
205
202
|
/**
|
|
206
|
-
*
|
|
203
|
+
* Enable emitting of InteractionEntry live metrics to the debugger. Requires `enableBridgelessArchitecture`.
|
|
207
204
|
*/
|
|
208
|
-
export const
|
|
205
|
+
export const cdpInteractionMetricsEnabled: Getter<boolean> = createNativeFlagGetter('cdpInteractionMetricsEnabled', false);
|
|
209
206
|
/**
|
|
210
207
|
* Use a C++ implementation of Native Animated instead of the platform implementation.
|
|
211
208
|
*/
|
|
@@ -215,13 +212,17 @@ export const cxxNativeAnimatedEnabled: Getter<boolean> = createNativeFlagGetter(
|
|
|
215
212
|
*/
|
|
216
213
|
export const cxxNativeAnimatedRemoveJsSync: Getter<boolean> = createNativeFlagGetter('cxxNativeAnimatedRemoveJsSync', false);
|
|
217
214
|
/**
|
|
218
|
-
*
|
|
215
|
+
* Prevents use of Fabric commit in C++ Animated implementation
|
|
219
216
|
*/
|
|
220
|
-
export const
|
|
217
|
+
export const disableFabricCommitInCXXAnimated: Getter<boolean> = createNativeFlagGetter('disableFabricCommitInCXXAnimated', false);
|
|
221
218
|
/**
|
|
222
219
|
* Prevent FabricMountingManager from reordering mountItems, which may lead to invalid state on the UI thread
|
|
223
220
|
*/
|
|
224
221
|
export const disableMountItemReorderingAndroid: Getter<boolean> = createNativeFlagGetter('disableMountItemReorderingAndroid', false);
|
|
222
|
+
/**
|
|
223
|
+
* Disable some workarounds for old Android versions in TextLayoutManager logic for retrieving attachment metrics
|
|
224
|
+
*/
|
|
225
|
+
export const disableOldAndroidAttachmentMetricsWorkarounds: Getter<boolean> = createNativeFlagGetter('disableOldAndroidAttachmentMetricsWorkarounds', true);
|
|
225
226
|
/**
|
|
226
227
|
* Turns off the global measurement cache used by TextLayoutManager on Android.
|
|
227
228
|
*/
|
|
@@ -258,6 +259,10 @@ export const enableDestroyShadowTreeRevisionAsync: Getter<boolean> = createNativ
|
|
|
258
259
|
* When enabled a subset of components will avoid double measurement on Android.
|
|
259
260
|
*/
|
|
260
261
|
export const enableDoubleMeasurementFixAndroid: Getter<boolean> = createNativeFlagGetter('enableDoubleMeasurementFixAndroid', false);
|
|
262
|
+
/**
|
|
263
|
+
* This infra allows native modules to initialize on the main thread, during React Native init.
|
|
264
|
+
*/
|
|
265
|
+
export const enableEagerMainQueueModulesOnIOS: Getter<boolean> = createNativeFlagGetter('enableEagerMainQueueModulesOnIOS', false);
|
|
261
266
|
/**
|
|
262
267
|
* Feature flag to configure eager attachment of the root view/initialisation of the JS code.
|
|
263
268
|
*/
|
|
@@ -270,14 +275,10 @@ export const enableFabricLogs: Getter<boolean> = createNativeFlagGetter('enableF
|
|
|
270
275
|
* Enables the use of the Fabric renderer in the whole app.
|
|
271
276
|
*/
|
|
272
277
|
export const enableFabricRenderer: Getter<boolean> = createNativeFlagGetter('enableFabricRenderer', false);
|
|
273
|
-
/**
|
|
274
|
-
* This feature flag enables a fix for reparenting fix in differentiator
|
|
275
|
-
*/
|
|
276
|
-
export const enableFixForParentTagDuringReparenting: Getter<boolean> = createNativeFlagGetter('enableFixForParentTagDuringReparenting', false);
|
|
277
278
|
/**
|
|
278
279
|
* Enables font scale changes updating layout for measurable nodes.
|
|
279
280
|
*/
|
|
280
|
-
export const enableFontScaleChangesUpdatingLayout: Getter<boolean> = createNativeFlagGetter('enableFontScaleChangesUpdatingLayout',
|
|
281
|
+
export const enableFontScaleChangesUpdatingLayout: Getter<boolean> = createNativeFlagGetter('enableFontScaleChangesUpdatingLayout', true);
|
|
281
282
|
/**
|
|
282
283
|
* Applies base offset for each line of text separately on iOS.
|
|
283
284
|
*/
|
|
@@ -286,6 +287,14 @@ export const enableIOSTextBaselineOffsetPerLine: Getter<boolean> = createNativeF
|
|
|
286
287
|
* iOS Views will clip to their padding box vs border box
|
|
287
288
|
*/
|
|
288
289
|
export const enableIOSViewClipToPaddingBox: Getter<boolean> = createNativeFlagGetter('enableIOSViewClipToPaddingBox', false);
|
|
290
|
+
/**
|
|
291
|
+
* When enabled, Android will build and initiate image prefetch requests on ImageShadowNode::layout
|
|
292
|
+
*/
|
|
293
|
+
export const enableImagePrefetchingAndroid: Getter<boolean> = createNativeFlagGetter('enableImagePrefetchingAndroid', false);
|
|
294
|
+
/**
|
|
295
|
+
* Dispatches state updates for content offset changes synchronously on the main thread.
|
|
296
|
+
*/
|
|
297
|
+
export const enableImmediateUpdateModeForContentOffsetChanges: Getter<boolean> = createNativeFlagGetter('enableImmediateUpdateModeForContentOffsetChanges', false);
|
|
289
298
|
/**
|
|
290
299
|
* This is to fix the issue with interop view manager where component descriptor lookup is causing ViewManager to preload.
|
|
291
300
|
*/
|
|
@@ -302,10 +311,6 @@ export const enableLayoutAnimationsOnIOS: Getter<boolean> = createNativeFlagGett
|
|
|
302
311
|
* Make RCTUnsafeExecuteOnMainQueueSync less likely to deadlock, when used in conjuction with sync rendering/events.
|
|
303
312
|
*/
|
|
304
313
|
export const enableMainQueueCoordinatorOnIOS: Getter<boolean> = createNativeFlagGetter('enableMainQueueCoordinatorOnIOS', false);
|
|
305
|
-
/**
|
|
306
|
-
* Makes modules requiring main queue setup initialize on the main thread, during React Native init.
|
|
307
|
-
*/
|
|
308
|
-
export const enableMainQueueModulesOnIOS: Getter<boolean> = createNativeFlagGetter('enableMainQueueModulesOnIOS', false);
|
|
309
314
|
/**
|
|
310
315
|
* Enable NSNull conversion when handling module arguments on iOS
|
|
311
316
|
*/
|
|
@@ -334,10 +339,6 @@ export const enablePropsUpdateReconciliationAndroid: Getter<boolean> = createNat
|
|
|
334
339
|
* Enables the reporting of network resource timings through `PerformanceObserver`.
|
|
335
340
|
*/
|
|
336
341
|
export const enableResourceTimingAPI: Getter<boolean> = createNativeFlagGetter('enableResourceTimingAPI', false);
|
|
337
|
-
/**
|
|
338
|
-
* Dispatches state updates synchronously in Fabric (e.g.: updates the scroll position in the shadow tree synchronously from the main thread).
|
|
339
|
-
*/
|
|
340
|
-
export const enableSynchronousStateUpdates: Getter<boolean> = createNativeFlagGetter('enableSynchronousStateUpdates', false);
|
|
341
342
|
/**
|
|
342
343
|
* Enables View Culling: as soon as a view goes off screen, it can be reused anywhere in the UI and pieced together with other items to create new UI elements.
|
|
343
344
|
*/
|
|
@@ -346,6 +347,10 @@ export const enableViewCulling: Getter<boolean> = createNativeFlagGetter('enable
|
|
|
346
347
|
* Enables View Recycling. When enabled, individual ViewManagers must still opt-in.
|
|
347
348
|
*/
|
|
348
349
|
export const enableViewRecycling: Getter<boolean> = createNativeFlagGetter('enableViewRecycling', false);
|
|
350
|
+
/**
|
|
351
|
+
* Enables View Recycling for <ScrollView> via ReactViewGroup/ReactViewManager.
|
|
352
|
+
*/
|
|
353
|
+
export const enableViewRecyclingForScrollView: Getter<boolean> = createNativeFlagGetter('enableViewRecyclingForScrollView', false);
|
|
349
354
|
/**
|
|
350
355
|
* Enables View Recycling for <Text> via ReactTextView/ReactTextViewManager.
|
|
351
356
|
*/
|
|
@@ -361,11 +366,15 @@ export const enableVirtualViewDebugFeatures: Getter<boolean> = createNativeFlagG
|
|
|
361
366
|
/**
|
|
362
367
|
* Enables reading render state when dispatching VirtualView events.
|
|
363
368
|
*/
|
|
364
|
-
export const enableVirtualViewRenderState: Getter<boolean> = createNativeFlagGetter('enableVirtualViewRenderState',
|
|
369
|
+
export const enableVirtualViewRenderState: Getter<boolean> = createNativeFlagGetter('enableVirtualViewRenderState', true);
|
|
365
370
|
/**
|
|
366
371
|
* Enables window focus detection for prioritizing VirtualView events.
|
|
367
372
|
*/
|
|
368
373
|
export const enableVirtualViewWindowFocusDetection: Getter<boolean> = createNativeFlagGetter('enableVirtualViewWindowFocusDetection', false);
|
|
374
|
+
/**
|
|
375
|
+
* Enable Web Performance APIs (Performance Timeline, User Timings, etc.) by default.
|
|
376
|
+
*/
|
|
377
|
+
export const enableWebPerformanceAPIsByDefault: Getter<boolean> = createNativeFlagGetter('enableWebPerformanceAPIsByDefault', false);
|
|
369
378
|
/**
|
|
370
379
|
* Uses the default event priority instead of the discreet event priority by default when dispatching events from Fabric to React.
|
|
371
380
|
*/
|
|
@@ -382,6 +391,10 @@ export const fuseboxNetworkInspectionEnabled: Getter<boolean> = createNativeFlag
|
|
|
382
391
|
* Hides offscreen VirtualViews on iOS by setting hidden = YES to avoid extra cost of views
|
|
383
392
|
*/
|
|
384
393
|
export const hideOffscreenVirtualViewsOnIOS: Getter<boolean> = createNativeFlagGetter('hideOffscreenVirtualViewsOnIOS', false);
|
|
394
|
+
/**
|
|
395
|
+
* Enable the V2 in-app Performance Monitor. This flag is global and should not be changed across React Host lifetimes.
|
|
396
|
+
*/
|
|
397
|
+
export const perfMonitorV2Enabled: Getter<boolean> = createNativeFlagGetter('perfMonitorV2Enabled', false);
|
|
385
398
|
/**
|
|
386
399
|
* Number cached PreparedLayouts in TextLayoutManager cache
|
|
387
400
|
*/
|
|
@@ -390,6 +403,22 @@ export const preparedTextCacheSize: Getter<number> = createNativeFlagGetter('pre
|
|
|
390
403
|
* Enables a new mechanism in ShadowTree to prevent problems caused by multiple threads trying to commit concurrently. If a thread tries to commit a few times unsuccessfully, it will acquire a lock and try again.
|
|
391
404
|
*/
|
|
392
405
|
export const preventShadowTreeCommitExhaustion: Getter<boolean> = createNativeFlagGetter('preventShadowTreeCommitExhaustion', false);
|
|
406
|
+
/**
|
|
407
|
+
* Releases the cached image data when it is consumed by the observers.
|
|
408
|
+
*/
|
|
409
|
+
export const releaseImageDataWhenConsumed: Getter<boolean> = createNativeFlagGetter('releaseImageDataWhenConsumed', false);
|
|
410
|
+
/**
|
|
411
|
+
* Function used to enable / disable Pressibility from using W3C Pointer Events for its hover callbacks
|
|
412
|
+
*/
|
|
413
|
+
export const shouldPressibilityUseW3CPointerEventsForHover: Getter<boolean> = createNativeFlagGetter('shouldPressibilityUseW3CPointerEventsForHover', false);
|
|
414
|
+
/**
|
|
415
|
+
* Skip activity identity assertion in ReactHostImpl::onHostPause()
|
|
416
|
+
*/
|
|
417
|
+
export const skipActivityIdentityAssertionOnHostPause: Getter<boolean> = createNativeFlagGetter('skipActivityIdentityAssertionOnHostPause', false);
|
|
418
|
+
/**
|
|
419
|
+
* A flag to tell Fabric to sweep active touches from JSTouchDispatcher in Android when a child native gesture is started.
|
|
420
|
+
*/
|
|
421
|
+
export const sweepActiveTouchOnChildNativeGesturesAndroid: Getter<boolean> = createNativeFlagGetter('sweepActiveTouchOnChildNativeGesturesAndroid', false);
|
|
393
422
|
/**
|
|
394
423
|
* Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
|
|
395
424
|
*/
|
|
@@ -409,11 +438,11 @@ export const useFabricInterop: Getter<boolean> = createNativeFlagGetter('useFabr
|
|
|
409
438
|
/**
|
|
410
439
|
* Use a native implementation of equals in NativeReadableArray.
|
|
411
440
|
*/
|
|
412
|
-
export const useNativeEqualsInNativeReadableArrayAndroid: Getter<boolean> = createNativeFlagGetter('useNativeEqualsInNativeReadableArrayAndroid',
|
|
441
|
+
export const useNativeEqualsInNativeReadableArrayAndroid: Getter<boolean> = createNativeFlagGetter('useNativeEqualsInNativeReadableArrayAndroid', true);
|
|
413
442
|
/**
|
|
414
443
|
* Use a native implementation of TransformHelper
|
|
415
444
|
*/
|
|
416
|
-
export const useNativeTransformHelperAndroid: Getter<boolean> = createNativeFlagGetter('useNativeTransformHelperAndroid',
|
|
445
|
+
export const useNativeTransformHelperAndroid: Getter<boolean> = createNativeFlagGetter('useNativeTransformHelperAndroid', true);
|
|
417
446
|
/**
|
|
418
447
|
* When enabled, the native view configs are used in bridgeless mode.
|
|
419
448
|
*/
|
|
@@ -425,7 +454,7 @@ export const useOptimizedEventBatchingOnAndroid: Getter<boolean> = createNativeF
|
|
|
425
454
|
/**
|
|
426
455
|
* Instead of using folly::dynamic as internal representation in RawProps and RawValue, use jsi::Value
|
|
427
456
|
*/
|
|
428
|
-
export const useRawPropsJsiValue: Getter<boolean> = createNativeFlagGetter('useRawPropsJsiValue',
|
|
457
|
+
export const useRawPropsJsiValue: Getter<boolean> = createNativeFlagGetter('useRawPropsJsiValue', true);
|
|
429
458
|
/**
|
|
430
459
|
* Use the state stored on the source shadow node when cloning it instead of reading in the most recent state on the shadow node family.
|
|
431
460
|
*/
|
|
@@ -438,6 +467,10 @@ export const useTurboModuleInterop: Getter<boolean> = createNativeFlagGetter('us
|
|
|
438
467
|
* When enabled, NativeModules will be executed by using the TurboModule system
|
|
439
468
|
*/
|
|
440
469
|
export const useTurboModules: Getter<boolean> = createNativeFlagGetter('useTurboModules', false);
|
|
470
|
+
/**
|
|
471
|
+
* Sets a hysteresis window for transition between prerender and hidden modes.
|
|
472
|
+
*/
|
|
473
|
+
export const virtualViewHysteresisRatio: Getter<number> = createNativeFlagGetter('virtualViewHysteresisRatio', 0);
|
|
441
474
|
/**
|
|
442
475
|
* Initial prerender ratio for VirtualView.
|
|
443
476
|
*/
|
|
@@ -18,12 +18,16 @@ import NativeReactNativeFeatureFlags from './specs/NativeReactNativeFeatureFlags
|
|
|
18
18
|
const accessedFeatureFlags: Set<string> = new Set();
|
|
19
19
|
let overrides: ?ReactNativeFeatureFlagsJsOnlyOverrides;
|
|
20
20
|
|
|
21
|
+
// This is a list of functions to clear the cached value for each feature flag
|
|
22
|
+
// getter. This is only used in development.
|
|
23
|
+
const clearCachedValuesFns: Array<() => void> = [];
|
|
24
|
+
|
|
21
25
|
export type Getter<T> = () => T;
|
|
22
26
|
|
|
23
|
-
// This defines the types for the overrides object, whose methods
|
|
24
|
-
// the default value
|
|
27
|
+
// This defines the types for the overrides object, whose methods can return
|
|
28
|
+
// null or undefined to fallback to the default value.
|
|
25
29
|
export type OverridesFor<T> = Partial<{
|
|
26
|
-
[key in keyof T]:
|
|
30
|
+
[key in keyof T]: Getter<?ReturnType<T[key]>>,
|
|
27
31
|
}>;
|
|
28
32
|
|
|
29
33
|
function createGetter<T: boolean | number | string>(
|
|
@@ -33,6 +37,12 @@ function createGetter<T: boolean | number | string>(
|
|
|
33
37
|
): Getter<T> {
|
|
34
38
|
let cachedValue: ?T;
|
|
35
39
|
|
|
40
|
+
if (__DEV__) {
|
|
41
|
+
clearCachedValuesFns.push(() => {
|
|
42
|
+
cachedValue = undefined;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
36
46
|
return () => {
|
|
37
47
|
if (cachedValue == null) {
|
|
38
48
|
cachedValue = customValueGetter() ?? defaultValue;
|
|
@@ -51,7 +61,7 @@ export function createJavaScriptFlagGetter<
|
|
|
51
61
|
configName,
|
|
52
62
|
() => {
|
|
53
63
|
accessedFeatureFlags.add(configName);
|
|
54
|
-
return overrides?.[configName]?.(
|
|
64
|
+
return overrides?.[configName]?.();
|
|
55
65
|
},
|
|
56
66
|
defaultValue,
|
|
57
67
|
);
|
|
@@ -115,3 +125,12 @@ function maybeLogUnavailableNativeModuleError(configName: string): void {
|
|
|
115
125
|
);
|
|
116
126
|
}
|
|
117
127
|
}
|
|
128
|
+
|
|
129
|
+
export function dangerouslyResetForTesting(): void {
|
|
130
|
+
if (__DEV__) {
|
|
131
|
+
overrides = null;
|
|
132
|
+
accessedFeatureFlags.clear();
|
|
133
|
+
reportedConfigNames.clear();
|
|
134
|
+
clearCachedValuesFns.forEach(fn => fn());
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -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<<
|
|
7
|
+
* @generated SignedSource<<9feb9fa0298078e66d362b41d21db655>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
* @noformat
|
|
10
10
|
*/
|
|
@@ -26,11 +26,12 @@ import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboMod
|
|
|
26
26
|
export interface Spec extends TurboModule {
|
|
27
27
|
+commonTestFlag?: () => boolean;
|
|
28
28
|
+commonTestFlagWithoutNativeImplementation?: () => boolean;
|
|
29
|
-
+
|
|
29
|
+
+cdpInteractionMetricsEnabled?: () => boolean;
|
|
30
30
|
+cxxNativeAnimatedEnabled?: () => boolean;
|
|
31
31
|
+cxxNativeAnimatedRemoveJsSync?: () => boolean;
|
|
32
|
-
+
|
|
32
|
+
+disableFabricCommitInCXXAnimated?: () => boolean;
|
|
33
33
|
+disableMountItemReorderingAndroid?: () => boolean;
|
|
34
|
+
+disableOldAndroidAttachmentMetricsWorkarounds?: () => boolean;
|
|
34
35
|
+disableTextLayoutManagerCacheAndroid?: () => boolean;
|
|
35
36
|
+enableAccessibilityOrder?: () => boolean;
|
|
36
37
|
+enableAccumulatedUpdatesInRawPropsAndroid?: () => boolean;
|
|
@@ -40,18 +41,19 @@ export interface Spec extends TurboModule {
|
|
|
40
41
|
+enableCustomFocusSearchOnClippedElementsAndroid?: () => boolean;
|
|
41
42
|
+enableDestroyShadowTreeRevisionAsync?: () => boolean;
|
|
42
43
|
+enableDoubleMeasurementFixAndroid?: () => boolean;
|
|
44
|
+
+enableEagerMainQueueModulesOnIOS?: () => boolean;
|
|
43
45
|
+enableEagerRootViewAttachment?: () => boolean;
|
|
44
46
|
+enableFabricLogs?: () => boolean;
|
|
45
47
|
+enableFabricRenderer?: () => boolean;
|
|
46
|
-
+enableFixForParentTagDuringReparenting?: () => boolean;
|
|
47
48
|
+enableFontScaleChangesUpdatingLayout?: () => boolean;
|
|
48
49
|
+enableIOSTextBaselineOffsetPerLine?: () => boolean;
|
|
49
50
|
+enableIOSViewClipToPaddingBox?: () => boolean;
|
|
51
|
+
+enableImagePrefetchingAndroid?: () => boolean;
|
|
52
|
+
+enableImmediateUpdateModeForContentOffsetChanges?: () => boolean;
|
|
50
53
|
+enableInteropViewManagerClassLookUpOptimizationIOS?: () => boolean;
|
|
51
54
|
+enableLayoutAnimationsOnAndroid?: () => boolean;
|
|
52
55
|
+enableLayoutAnimationsOnIOS?: () => boolean;
|
|
53
56
|
+enableMainQueueCoordinatorOnIOS?: () => boolean;
|
|
54
|
-
+enableMainQueueModulesOnIOS?: () => boolean;
|
|
55
57
|
+enableModuleArgumentNSNullConversionIOS?: () => boolean;
|
|
56
58
|
+enableNativeCSSParsing?: () => boolean;
|
|
57
59
|
+enableNetworkEventReporting?: () => boolean;
|
|
@@ -59,20 +61,26 @@ export interface Spec extends TurboModule {
|
|
|
59
61
|
+enablePreparedTextLayout?: () => boolean;
|
|
60
62
|
+enablePropsUpdateReconciliationAndroid?: () => boolean;
|
|
61
63
|
+enableResourceTimingAPI?: () => boolean;
|
|
62
|
-
+enableSynchronousStateUpdates?: () => boolean;
|
|
63
64
|
+enableViewCulling?: () => boolean;
|
|
64
65
|
+enableViewRecycling?: () => boolean;
|
|
66
|
+
+enableViewRecyclingForScrollView?: () => boolean;
|
|
65
67
|
+enableViewRecyclingForText?: () => boolean;
|
|
66
68
|
+enableViewRecyclingForView?: () => boolean;
|
|
67
69
|
+enableVirtualViewDebugFeatures?: () => boolean;
|
|
68
70
|
+enableVirtualViewRenderState?: () => boolean;
|
|
69
71
|
+enableVirtualViewWindowFocusDetection?: () => boolean;
|
|
72
|
+
+enableWebPerformanceAPIsByDefault?: () => boolean;
|
|
70
73
|
+fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean;
|
|
71
74
|
+fuseboxEnabledRelease?: () => boolean;
|
|
72
75
|
+fuseboxNetworkInspectionEnabled?: () => boolean;
|
|
73
76
|
+hideOffscreenVirtualViewsOnIOS?: () => boolean;
|
|
77
|
+
+perfMonitorV2Enabled?: () => boolean;
|
|
74
78
|
+preparedTextCacheSize?: () => number;
|
|
75
79
|
+preventShadowTreeCommitExhaustion?: () => boolean;
|
|
80
|
+
+releaseImageDataWhenConsumed?: () => boolean;
|
|
81
|
+
+shouldPressibilityUseW3CPointerEventsForHover?: () => boolean;
|
|
82
|
+
+skipActivityIdentityAssertionOnHostPause?: () => boolean;
|
|
83
|
+
+sweepActiveTouchOnChildNativeGesturesAndroid?: () => boolean;
|
|
76
84
|
+traceTurboModulePromiseRejectionsOnAndroid?: () => boolean;
|
|
77
85
|
+updateRuntimeShadowNodeReferencesOnCommit?: () => boolean;
|
|
78
86
|
+useAlwaysAvailableJSErrorHandling?: () => boolean;
|
|
@@ -85,6 +93,7 @@ export interface Spec extends TurboModule {
|
|
|
85
93
|
+useShadowNodeStateOnClone?: () => boolean;
|
|
86
94
|
+useTurboModuleInterop?: () => boolean;
|
|
87
95
|
+useTurboModules?: () => boolean;
|
|
96
|
+
+virtualViewHysteresisRatio?: () => number;
|
|
88
97
|
+virtualViewPrerenderRatio?: () => number;
|
|
89
98
|
}
|
|
90
99
|
|
|
@@ -32,17 +32,17 @@ function getExtendedError(
|
|
|
32
32
|
if (errorValue instanceof Error) {
|
|
33
33
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
34
34
|
* this parameters */
|
|
35
|
-
// $FlowFixMe[incompatible-
|
|
35
|
+
// $FlowFixMe[incompatible-type]
|
|
36
36
|
error = (errorValue: ExtendedError);
|
|
37
37
|
} else if (typeof errorValue === 'string') {
|
|
38
38
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
39
39
|
* this parameters */
|
|
40
|
-
// $FlowFixMe[incompatible-
|
|
40
|
+
// $FlowFixMe[incompatible-type]
|
|
41
41
|
error = (new SyntheticError(errorValue): ExtendedError);
|
|
42
42
|
} else {
|
|
43
43
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
44
44
|
* this parameters */
|
|
45
|
-
// $FlowFixMe[incompatible-
|
|
45
|
+
// $FlowFixMe[incompatible-type]
|
|
46
46
|
error = (new SyntheticError('Unspecified error'): ExtendedError);
|
|
47
47
|
}
|
|
48
48
|
try {
|
|
@@ -12,29 +12,49 @@ import {polyfillGlobal} from '../../../Libraries/Utilities/PolyfillFunctions';
|
|
|
12
12
|
|
|
13
13
|
let initialized = false;
|
|
14
14
|
|
|
15
|
-
export default function
|
|
15
|
+
export default function setUpPerformanceModern() {
|
|
16
16
|
if (initialized) {
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
initialized = true;
|
|
21
21
|
|
|
22
|
+
const Performance = require('../webapis/performance/Performance').default;
|
|
23
|
+
|
|
24
|
+
// We don't use `polyfillGlobal` to define this lazily because the
|
|
25
|
+
// `performance` object is always accessed.
|
|
26
|
+
// $FlowExpectedError[cannot-write]
|
|
27
|
+
global.performance = new Performance();
|
|
28
|
+
|
|
22
29
|
polyfillGlobal(
|
|
23
|
-
'
|
|
30
|
+
'EventCounts',
|
|
31
|
+
() => require('../webapis/performance/EventTiming').EventCounts_public,
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
polyfillGlobal(
|
|
35
|
+
'Performance',
|
|
36
|
+
() => require('../webapis/performance/Performance').Performance_public,
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
polyfillGlobal(
|
|
40
|
+
'PerformanceEntry',
|
|
24
41
|
() =>
|
|
25
|
-
require('../webapis/performance/
|
|
42
|
+
require('../webapis/performance/PerformanceEntry')
|
|
43
|
+
.PerformanceEntry_public,
|
|
26
44
|
);
|
|
27
45
|
|
|
28
46
|
polyfillGlobal(
|
|
29
|
-
'
|
|
47
|
+
'PerformanceEventTiming',
|
|
30
48
|
() =>
|
|
31
|
-
require('../webapis/performance/
|
|
32
|
-
.
|
|
49
|
+
require('../webapis/performance/EventTiming')
|
|
50
|
+
.PerformanceEventTiming_public,
|
|
33
51
|
);
|
|
34
52
|
|
|
35
53
|
polyfillGlobal(
|
|
36
|
-
'
|
|
37
|
-
() =>
|
|
54
|
+
'PerformanceLongTaskTiming',
|
|
55
|
+
() =>
|
|
56
|
+
require('../webapis/performance/LongTasks')
|
|
57
|
+
.PerformanceLongTaskTiming_public,
|
|
38
58
|
);
|
|
39
59
|
|
|
40
60
|
polyfillGlobal(
|
|
@@ -44,28 +64,33 @@ export default function setUpPerformanceObserver() {
|
|
|
44
64
|
|
|
45
65
|
polyfillGlobal(
|
|
46
66
|
'PerformanceMeasure',
|
|
47
|
-
() =>
|
|
67
|
+
() =>
|
|
68
|
+
require('../webapis/performance/UserTiming').PerformanceMeasure_public,
|
|
48
69
|
);
|
|
49
70
|
|
|
50
71
|
polyfillGlobal(
|
|
51
|
-
'
|
|
52
|
-
() =>
|
|
72
|
+
'PerformanceObserver',
|
|
73
|
+
() =>
|
|
74
|
+
require('../webapis/performance/PerformanceObserver').PerformanceObserver,
|
|
53
75
|
);
|
|
54
76
|
|
|
55
77
|
polyfillGlobal(
|
|
56
|
-
'
|
|
78
|
+
'PerformanceObserverEntryList',
|
|
57
79
|
() =>
|
|
58
|
-
require('../webapis/performance/
|
|
59
|
-
.
|
|
80
|
+
require('../webapis/performance/PerformanceObserver')
|
|
81
|
+
.PerformanceObserverEntryList_public,
|
|
60
82
|
);
|
|
61
83
|
|
|
62
84
|
polyfillGlobal(
|
|
63
|
-
'
|
|
64
|
-
() =>
|
|
85
|
+
'PerformanceResourceTiming',
|
|
86
|
+
() =>
|
|
87
|
+
require('../webapis/performance/ResourceTiming')
|
|
88
|
+
.PerformanceResourceTiming_public,
|
|
65
89
|
);
|
|
66
90
|
|
|
67
91
|
polyfillGlobal(
|
|
68
|
-
'
|
|
69
|
-
() =>
|
|
92
|
+
'TaskAttributionTiming',
|
|
93
|
+
() =>
|
|
94
|
+
require('../webapis/performance/LongTasks').TaskAttributionTiming_public,
|
|
70
95
|
);
|
|
71
96
|
}
|
|
@@ -8,6 +8,9 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
// $FlowExpectedError[nonstrict-import] Making this module `strict-local` would require too many modules to revert back to `strict-local` as well.
|
|
12
|
+
import type ReactNativeElement from '../webapis/dom/nodes/ReactNativeElement';
|
|
13
|
+
|
|
11
14
|
export type MeasureOnSuccessCallback = (
|
|
12
15
|
x: number,
|
|
13
16
|
y: number,
|
|
@@ -105,7 +108,7 @@ export interface LegacyHostInstanceMethods {
|
|
|
105
108
|
setNativeProps(nativeProps: {...}): void;
|
|
106
109
|
}
|
|
107
110
|
|
|
108
|
-
export type HostInstance =
|
|
111
|
+
export type HostInstance = ReactNativeElement;
|
|
109
112
|
|
|
110
113
|
/** @deprecated Use HostInstance instead */
|
|
111
114
|
export type NativeMethods = LegacyHostInstanceMethods;
|