@office-iss/react-native-win32 0.0.0-canary.310 → 0.0.0-canary.312
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 -0
- package/.flowconfig +1 -5
- package/CHANGELOG.json +90 -0
- package/CHANGELOG.md +22 -1
- package/IntegrationTests/IntegrationTestHarnessTest.js +1 -1
- package/IntegrationTests/LayoutEventsTest.js +1 -1
- package/IntegrationTests/TimersTest.js +1 -1
- package/Libraries/ActionSheetIOS/ActionSheetIOS.js +3 -3
- package/Libraries/Animated/Animated.d.ts +8 -1
- package/Libraries/Animated/AnimatedEvent.js +4 -4
- package/Libraries/Animated/AnimatedImplementation.js +2 -2
- package/Libraries/Animated/animations/Animation.js +3 -3
- package/Libraries/Animated/animations/DecayAnimation.js +4 -4
- package/Libraries/Animated/animations/SpringAnimation.js +5 -5
- package/Libraries/Animated/animations/TimingAnimation.js +5 -5
- package/Libraries/Animated/createAnimatedComponent.js +7 -7
- package/Libraries/Animated/nodes/AnimatedColor.js +2 -2
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +12 -12
- package/Libraries/Animated/nodes/AnimatedNode.js +3 -3
- package/Libraries/Animated/nodes/AnimatedObject.js +3 -3
- package/Libraries/Animated/nodes/AnimatedProps.js +6 -6
- package/Libraries/Animated/nodes/AnimatedStyle.js +7 -7
- package/Libraries/Animated/nodes/AnimatedTransform.js +13 -13
- package/Libraries/Animated/nodes/AnimatedValue.js +1 -1
- package/Libraries/Animated/nodes/AnimatedValueXY.js +1 -1
- package/Libraries/Animated/nodes/AnimatedWithChildren.js +1 -1
- package/Libraries/Animated/useAnimatedColor.d.ts +15 -0
- package/Libraries/Animated/useAnimatedColor.js +25 -0
- package/Libraries/Animated/useAnimatedValueXY.d.ts +15 -0
- package/Libraries/Animated/useAnimatedValueXY.js +26 -0
- package/Libraries/AppState/AppState.js +1 -1
- package/Libraries/BatchedBridge/MessageQueue.js +3 -3
- package/Libraries/BatchedBridge/NativeModules.js +4 -4
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +23 -25
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +27 -29
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +2 -2
- package/Libraries/Components/Button.js +2 -2
- package/Libraries/Components/Button.win32.js +2 -2
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.js +2 -2
- package/Libraries/Components/EnterString.win32.js +2 -2
- package/Libraries/Components/EnterString.win32.js.map +1 -1
- package/Libraries/Components/Keyboard/Keyboard.js +6 -6
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +1 -1
- package/Libraries/Components/LayoutConformance/LayoutConformance.js +1 -1
- package/Libraries/Components/LayoutConformance/LayoutConformanceNativeComponent.js +1 -1
- package/Libraries/Components/Pressable/Pressable.d.ts +5 -0
- package/Libraries/Components/Pressable/Pressable.js +3 -3
- package/Libraries/Components/Pressable/Pressable.win32.js +3 -3
- package/Libraries/Components/Pressable/useAndroidRippleForView.js +4 -4
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +1 -1
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.js +3 -3
- package/Libraries/Components/RefreshControl/RefreshControl.js +5 -5
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +8 -12
- package/Libraries/Components/ScrollView/ScrollView.d.ts +9 -0
- package/Libraries/Components/ScrollView/ScrollView.js +19 -9
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +8 -18
- package/Libraries/Components/ScrollView/ScrollViewNativeComponentType.js +4 -3
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
- package/Libraries/Components/StaticRenderer.js +1 -1
- package/Libraries/Components/StatusBar/StatusBar.js +8 -8
- package/Libraries/Components/Switch/Switch.js +3 -3
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +33 -48
- package/Libraries/Components/TextInput/InputAccessoryView.js +1 -1
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +6 -11
- package/Libraries/Components/TextInput/TextInput.flow.js +21 -20
- package/Libraries/Components/TextInput/TextInput.flow.win32.js +23 -22
- package/Libraries/Components/TextInput/TextInput.js +8 -4
- package/Libraries/Components/TextInput/TextInput.win32.js +3 -4
- package/Libraries/Components/Touchable/PooledClass.js +1 -1
- package/Libraries/Components/Touchable/Touchable.js +2 -2
- package/Libraries/Components/Touchable/Touchable.win32.js +2 -2
- package/Libraries/Components/Touchable/TouchableBounce.js +4 -4
- package/Libraries/Components/Touchable/TouchableHighlight.js +8 -8
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +7 -7
- package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +7 -7
- package/Libraries/Components/Touchable/TouchableOpacity.js +4 -4
- package/Libraries/Components/Touchable/TouchableWin32.js +1 -1
- package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -1
- package/Libraries/Components/UnimplementedViews/UnimplementedView.js +1 -1
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +68 -31
- package/Libraries/Components/View/ViewAccessibility.js +7 -7
- package/Libraries/Components/View/ViewAccessibility.win32.js +7 -7
- package/Libraries/Components/View/ViewPropTypes.js +14 -14
- package/Libraries/Components/View/ViewPropTypes.win32.js +16 -16
- package/Libraries/Core/Devtools/parseHermesStack.js +8 -8
- package/Libraries/Core/Devtools/symbolicateStackTrace.js +2 -2
- package/Libraries/Core/ExceptionsManager.js +2 -2
- package/Libraries/Core/ExtendedError.js +3 -3
- package/Libraries/Core/RawEventEmitter.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/Timers/JSTimers.js +3 -2
- package/Libraries/Core/setUpDeveloperTools.js +1 -1
- package/Libraries/Core/setUpErrorHandling.js +4 -2
- package/Libraries/Core/setUpSegmentFetcher.js +1 -1
- package/Libraries/Debugging/DebuggingOverlay.js +2 -2
- package/Libraries/EventEmitter/NativeEventEmitter.js +7 -9
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +1 -1
- package/Libraries/Image/AssetSourceResolver.js +1 -1
- package/Libraries/Image/Image.android.js +172 -306
- package/Libraries/Image/ImageProps.js +9 -11
- package/Libraries/Image/ImageSource.js +2 -2
- package/Libraries/Image/ImageSourceUtils.js +8 -4
- package/Libraries/Image/ImageTypes.flow.js +2 -2
- package/Libraries/Image/ImageViewNativeComponent.js +7 -16
- package/Libraries/Image/nativeImageSource.js +1 -1
- package/Libraries/Interaction/InteractionManager.js +5 -4
- package/Libraries/Interaction/PanResponder.js +1 -1
- package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -2
- package/Libraries/Linking/Linking.js +1 -1
- package/Libraries/Lists/FlatList.js +3 -3
- package/Libraries/Lists/SectionList.js +1 -1
- package/Libraries/Lists/SectionListModern.js +2 -2
- package/Libraries/LogBox/Data/LogBoxData.js +38 -24
- package/Libraries/LogBox/Data/LogBoxLog.js +43 -112
- package/Libraries/LogBox/Data/parseLogBoxLog.js +21 -117
- package/Libraries/LogBox/LogBox.js +42 -19
- package/Libraries/LogBox/LogBoxInspectorContainer.js +2 -2
- package/Libraries/LogBox/LogBoxNotificationContainer.js +2 -2
- package/Libraries/LogBox/UI/LogBoxButton.js +14 -16
- package/Libraries/LogBox/UI/LogBoxInspector.js +2 -2
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +6 -9
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.win32.js +6 -9
- package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorFooterButton.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeaderButton.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorMessageHeader.js +10 -15
- package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +25 -18
- package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.win32.js +15 -16
- package/Libraries/LogBox/UI/LogBoxInspectorSection.js +5 -7
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +8 -10
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.win32.js +11 -13
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +8 -6
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.win32.js +3 -5
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +17 -29
- package/Libraries/LogBox/UI/LogBoxMessage.js +28 -37
- package/Libraries/LogBox/UI/LogBoxNotification.js +1 -1
- package/Libraries/Modal/Modal.js +3 -3
- package/Libraries/NativeComponent/BaseViewConfig.android.js +28 -52
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +19 -21
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +16 -16
- package/Libraries/Network/RCTNetworking.android.js +1 -1
- package/Libraries/Network/RCTNetworking.ios.js +1 -1
- package/Libraries/Network/RCTNetworking.js.flow +1 -1
- package/Libraries/Network/RCTNetworking.win32.js +1 -1
- package/Libraries/Network/RCTNetworkingEventDefinitions.flow.js +1 -1
- package/Libraries/Network/XMLHttpRequest.js +1 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +3 -3
- package/Libraries/Pressability/Pressability.js +5 -5
- package/Libraries/Pressability/Pressability.win32.js +5 -5
- package/Libraries/Pressability/PressabilityDebug.js +1 -1
- package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +1 -1
- package/Libraries/PushNotificationIOS/PushNotificationIOS.js +2 -2
- package/Libraries/ReactNative/AppContainer-dev.js +18 -1
- package/Libraries/ReactNative/AppContainer.js +1 -1
- package/Libraries/ReactNative/AppRegistry.flow.js +2 -2
- package/Libraries/ReactNative/AppRegistryImpl.js +2 -2
- package/Libraries/ReactNative/FabricUIManager.js +1 -1
- package/Libraries/ReactNative/RendererImplementation.js +4 -4
- package/Libraries/ReactNative/UIManagerProperties.js +1 -1
- package/Libraries/Renderer/shims/ReactFabric.js +1 -3
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +1 -3
- package/Libraries/Renderer/shims/ReactNativeTypes.js +1 -3
- package/Libraries/Renderer/shims/ReactNativeTypes.win32.js +1 -3
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +1 -3
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +1 -3
- package/Libraries/StyleSheet/PointPropType.js +1 -1
- package/Libraries/StyleSheet/Rect.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.d.ts +0 -5
- package/Libraries/StyleSheet/StyleSheet.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.js.flow +1 -1
- package/Libraries/StyleSheet/StyleSheetExports.js +16 -25
- package/Libraries/StyleSheet/StyleSheetExports.js.flow +2 -7
- package/Libraries/StyleSheet/StyleSheetTypes.js +33 -35
- package/Libraries/StyleSheet/private/_StyleSheetTypesOverrides.js +5 -5
- package/Libraries/StyleSheet/private/_TransformStyle.js +7 -7
- package/Libraries/StyleSheet/processBackgroundImage.js +7 -7
- package/Libraries/StyleSheet/processBackgroundPosition.js +4 -4
- package/Libraries/StyleSheet/processBackgroundRepeat.js +4 -4
- package/Libraries/StyleSheet/processBackgroundSize.js +4 -4
- package/Libraries/StyleSheet/processBoxShadow.js +44 -4
- package/Libraries/StyleSheet/processColorArray.js +2 -2
- package/Libraries/StyleSheet/processFilter.js +2 -2
- package/Libraries/Text/Text.js +295 -627
- package/Libraries/Text/Text.win32.js +360 -744
- package/Libraries/Text/TextNativeComponent.js +14 -7
- package/Libraries/Text/TextNativeComponent.win32.js +14 -7
- package/Libraries/Text/TextProps.js +4 -4
- package/Libraries/Text/TextProps.win32.js +4 -4
- package/Libraries/Types/CodegenTypes.js +1 -1
- package/Libraries/Types/CoreEventTypes.js +21 -21
- package/Libraries/Types/CoreEventTypes.win32.js +22 -21
- package/Libraries/Types/ReactDevToolsTypes.js +2 -2
- package/Libraries/Utilities/Appearance.js +6 -1
- package/Libraries/Utilities/Dimensions.js +1 -1
- package/Libraries/Utilities/Dimensions.win32.js +1 -1
- package/Libraries/Utilities/HMRClient.js +4 -4
- package/Libraries/Utilities/IPerformanceLogger.js +4 -4
- package/Libraries/Utilities/codegenNativeCommands.js +4 -4
- package/Libraries/Utilities/codegenNativeComponent.d.ts +2 -0
- package/Libraries/Utilities/codegenNativeComponent.js +2 -2
- package/Libraries/Utilities/logError.js +1 -1
- package/Libraries/Utilities/stringifySafe.js +3 -3
- package/Libraries/Utilities/useMergeRefs.js +2 -2
- package/Libraries/vendor/core/ErrorUtils.js +4 -4
- package/Libraries/vendor/emitter/EventEmitter.js +16 -20
- package/flow/bom.js.flow +18 -17
- package/flow/dom.js.flow +12 -5
- package/flow/global.js +1 -1
- package/index.js +9 -0
- package/index.win32.js +9 -0
- package/index.win32.js.flow +8 -1
- package/jest/RefreshControlMock.js +2 -2
- package/jest/assetFileTransformer.js +8 -3
- package/jest/mockComponent.js +3 -4
- package/jest/mockNativeComponent.js +1 -1
- package/jest/mocks/ActivityIndicator.js +2 -2
- package/jest/mocks/Image.js +2 -2
- package/jest/mocks/Modal.js +2 -2
- package/jest/mocks/RefreshControl.js +3 -3
- package/jest/mocks/RendererProxy.js +2 -2
- package/jest/mocks/ScrollView.js +5 -5
- package/jest/mocks/Text.js +2 -2
- package/jest/mocks/TextInput.js +2 -2
- package/jest/mocks/View.js +2 -2
- package/jest/mocks/ViewNativeComponent.js +1 -1
- package/jest/mocks/requireNativeComponent.js +1 -1
- package/jest/mocks/useColorScheme.js +1 -1
- package/jest/setup.js +68 -31
- package/overrides.json +30 -36
- package/package.json +21 -18
- package/src/private/animated/NativeAnimatedHelper.js +2 -2
- package/src/private/animated/NativeAnimatedHelper.win32.js +2 -2
- package/src/private/animated/createAnimatedPropsMemoHook.js +19 -19
- package/src/private/components/virtualview/VirtualView.js +14 -21
- package/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js +11 -10
- package/src/private/components/virtualview/VirtualViewNativeComponent.js +4 -4
- package/src/private/devsupport/devmenu/elementinspector/BorderBox.js +2 -2
- package/src/private/devsupport/devmenu/elementinspector/BoxInspector.js +3 -3
- package/src/private/devsupport/devmenu/elementinspector/ElementBox.js +4 -4
- package/src/private/devsupport/devmenu/elementinspector/ElementProperties.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/Inspector.js +39 -17
- package/src/private/devsupport/devmenu/elementinspector/InspectorOverlay.js +15 -3
- package/src/private/devsupport/devmenu/elementinspector/InspectorPanel.js +2 -2
- package/src/private/devsupport/devmenu/elementinspector/ReactDevToolsOverlay.js +2 -8
- package/src/private/devsupport/devmenu/elementinspector/StyleInspector.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/resolveBoxStyle.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/useExternalInspection.js +102 -0
- package/src/private/devsupport/rndevtools/FuseboxSessionObserver.js +12 -25
- package/src/private/devsupport/rndevtools/GlobalStateObserver.js +56 -0
- package/src/private/devsupport/rndevtools/TracingStateObserver.js +28 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +48 -65
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +2 -2
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +9 -10
- package/src/private/specs_DEPRECATED/components/ActivityIndicatorViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/AndroidDrawerLayoutNativeComponent.js +3 -3
- package/src/private/specs_DEPRECATED/components/AndroidHorizontalScrollContentViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/AndroidSwipeRefreshLayoutNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/AndroidSwitchNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/DebuggingOverlayNativeComponent.js +3 -3
- package/src/private/specs_DEPRECATED/components/ProgressBarAndroidNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/PullToRefreshViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/RCTInputAccessoryViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/RCTModalHostViewNativeComponent.js +3 -3
- package/src/private/specs_DEPRECATED/components/RCTSafeAreaViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/UnimplementedNativeViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeImageLoaderIOS.js +1 -1
- package/src/private/styles/composeStyles.js +1 -1
- package/src/private/utilities/toError.js +27 -0
- package/src/private/utilities/toExtendedError.js +30 -0
- package/src/private/webapis/dom/events/Event.js +1 -1
- package/src/private/webapis/dom/events/EventHandlerAttributes.js +2 -2
- package/src/private/webapis/dom/events/EventTarget.js +3 -3
- package/src/private/webapis/dom/events/internals/EventInternals.js +2 -2
- package/src/private/webapis/dom/nodes/ReadOnlyElement.js +1 -1
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +2 -2
- package/src/private/webapis/dom/nodes/specs/NativeDOM.js +14 -14
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +2 -2
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +2 -2
- package/src/private/webapis/geometry/DOMRectList.js +2 -2
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +8 -8
- package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +5 -9
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +6 -6
- package/src/private/webapis/mutationobserver/MutationObserver.js +2 -2
- package/src/private/webapis/mutationobserver/MutationRecord.js +2 -2
- package/src/private/webapis/mutationobserver/internals/MutationObserverManager.js +1 -1
- package/src/private/webapis/mutationobserver/specs/NativeMutationObserver.js +3 -3
- package/src/private/webapis/performance/LongTasks.js +3 -3
- package/src/private/webapis/performance/Performance.js +4 -4
- package/src/private/webapis/performance/PerformanceEntry.js +1 -1
- package/src/private/webapis/performance/PerformanceObserver.js +2 -2
- package/src/private/webapis/performance/specs/NativePerformance.js +8 -8
- package/src/private/webapis/structuredClone/structuredClone.js +2 -2
- package/src/types/globals.d.ts +4 -4
- package/src-win/Libraries/Components/EnterString.win32.tsx +2 -2
- package/src-win/Libraries/Components/Touchable/TouchableWin32.tsx +14 -14
- package/src-win/index.win32.js.flow +8 -1
- package/types/index.d.ts +2 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.js +0 -60
- package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +0 -94
- package/Libraries/Image/TextInlineImageNativeComponent.js +0 -49
|
@@ -0,0 +1,56 @@
|
|
|
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
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Generic observer for a boolean state exposed via a native global object.
|
|
13
|
+
*
|
|
14
|
+
* Native code installs a global object with the following shape:
|
|
15
|
+
* global[globalName] = {
|
|
16
|
+
* [statusProperty]: boolean,
|
|
17
|
+
* subscribers: Set<(status: boolean) => void>,
|
|
18
|
+
* [callbackName]: (status: boolean) => void,
|
|
19
|
+
* }
|
|
20
|
+
*
|
|
21
|
+
* This class provides a JS-friendly API over that global object.
|
|
22
|
+
*/
|
|
23
|
+
class GlobalStateObserver {
|
|
24
|
+
#globalName: string;
|
|
25
|
+
#statusProperty: string;
|
|
26
|
+
|
|
27
|
+
constructor(globalName: string, statusProperty: string) {
|
|
28
|
+
this.#globalName = globalName;
|
|
29
|
+
this.#statusProperty = statusProperty;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
#hasNativeSupport(): boolean {
|
|
33
|
+
return global.hasOwnProperty(this.#globalName);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
getStatus(): boolean {
|
|
37
|
+
if (!this.#hasNativeSupport()) {
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return global[this.#globalName][this.#statusProperty];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
subscribe(callback: (status: boolean) => void): () => void {
|
|
45
|
+
if (!this.#hasNativeSupport()) {
|
|
46
|
+
return () => {};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
global[this.#globalName].subscribers.add(callback);
|
|
50
|
+
return () => {
|
|
51
|
+
global[this.#globalName].subscribers.delete(callback);
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export default GlobalStateObserver;
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import GlobalStateObserver from './GlobalStateObserver';
|
|
12
|
+
|
|
13
|
+
const observer = new GlobalStateObserver(
|
|
14
|
+
'__TRACING_STATE_OBSERVER__',
|
|
15
|
+
'isTracing',
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
const TracingStateObserver = {
|
|
19
|
+
isTracing(): boolean {
|
|
20
|
+
return observer.getStatus();
|
|
21
|
+
},
|
|
22
|
+
|
|
23
|
+
subscribe(callback: (isTracing: boolean) => void): () => void {
|
|
24
|
+
return observer.subscribe(callback);
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default TracingStateObserver;
|
|
@@ -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<<03688450419694f6d3f4fc709df4de9a>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
* @noformat
|
|
10
10
|
*/
|
|
@@ -33,16 +33,14 @@ export type ReactNativeFeatureFlagsJsOnly = $ReadOnly<{
|
|
|
33
33
|
animatedShouldUseSingleOp: Getter<boolean>,
|
|
34
34
|
deferFlatListFocusChangeRenderUpdate: Getter<boolean>,
|
|
35
35
|
disableMaintainVisibleContentPosition: Getter<boolean>,
|
|
36
|
-
|
|
36
|
+
enableOptimizedBoxShadowParsing: Getter<boolean>,
|
|
37
|
+
externalElementInspectionEnabled: Getter<boolean>,
|
|
38
|
+
fixImageSrcDimensionPropagation: Getter<boolean>,
|
|
37
39
|
fixVirtualizeListCollapseWindowSize: Getter<boolean>,
|
|
38
40
|
isLayoutAnimationEnabled: Getter<boolean>,
|
|
39
|
-
reduceDefaultPropsInImage: Getter<boolean>,
|
|
40
|
-
reduceDefaultPropsInText: Getter<boolean>,
|
|
41
41
|
shouldUseAnimatedObjectForTransform: Getter<boolean>,
|
|
42
|
-
shouldUseLinkRoleForPressableText: Getter<boolean>,
|
|
43
42
|
shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter<boolean>,
|
|
44
43
|
shouldUseSetNativePropsInFabric: Getter<boolean>,
|
|
45
|
-
virtualViewActivityBehavior: Getter<string>,
|
|
46
44
|
}>;
|
|
47
45
|
|
|
48
46
|
export type ReactNativeFeatureFlagsJsOnlyOverrides = OverridesFor<ReactNativeFeatureFlagsJsOnly>;
|
|
@@ -53,10 +51,10 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
53
51
|
commonTestFlagWithoutNativeImplementation: Getter<boolean>,
|
|
54
52
|
cdpInteractionMetricsEnabled: Getter<boolean>,
|
|
55
53
|
cxxNativeAnimatedEnabled: Getter<boolean>,
|
|
54
|
+
defaultTextToOverflowHidden: Getter<boolean>,
|
|
56
55
|
disableEarlyViewCommandExecution: Getter<boolean>,
|
|
57
56
|
disableImageViewPreallocationAndroid: Getter<boolean>,
|
|
58
57
|
disableMountItemReorderingAndroid: Getter<boolean>,
|
|
59
|
-
disableOldAndroidAttachmentMetricsWorkarounds: Getter<boolean>,
|
|
60
58
|
disableSubviewClippingAndroid: Getter<boolean>,
|
|
61
59
|
disableTextLayoutManagerCacheAndroid: Getter<boolean>,
|
|
62
60
|
disableViewPreallocationAndroid: Getter<boolean>,
|
|
@@ -73,6 +71,7 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
73
71
|
enableEagerMainQueueModulesOnIOS: Getter<boolean>,
|
|
74
72
|
enableEagerRootViewAttachment: Getter<boolean>,
|
|
75
73
|
enableExclusivePropsUpdateAndroid: Getter<boolean>,
|
|
74
|
+
enableFabricCommitBranching: Getter<boolean>,
|
|
76
75
|
enableFabricLogs: Getter<boolean>,
|
|
77
76
|
enableFabricRenderer: Getter<boolean>,
|
|
78
77
|
enableFontScaleChangesUpdatingLayout: Getter<boolean>,
|
|
@@ -103,8 +102,7 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
103
102
|
enableViewRecyclingForView: Getter<boolean>,
|
|
104
103
|
enableVirtualViewContainerStateExperimental: Getter<boolean>,
|
|
105
104
|
enableVirtualViewDebugFeatures: Getter<boolean>,
|
|
106
|
-
|
|
107
|
-
enableVirtualViewWindowFocusDetection: Getter<boolean>,
|
|
105
|
+
fixFindShadowNodeByTagRaceCondition: Getter<boolean>,
|
|
108
106
|
fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean>,
|
|
109
107
|
fixTextClippingAndroid15useBoundsForWidth: Getter<boolean>,
|
|
110
108
|
fuseboxAssertSingleHostState: Getter<boolean>,
|
|
@@ -117,24 +115,23 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
117
115
|
preparedTextCacheSize: Getter<number>,
|
|
118
116
|
preventShadowTreeCommitExhaustion: Getter<boolean>,
|
|
119
117
|
shouldPressibilityUseW3CPointerEventsForHover: Getter<boolean>,
|
|
120
|
-
shouldResetClickableWhenRecyclingView: Getter<boolean>,
|
|
121
|
-
shouldResetOnClickListenerWhenRecyclingView: Getter<boolean>,
|
|
122
|
-
shouldSetEnabledBasedOnAccessibilityState: Getter<boolean>,
|
|
123
|
-
shouldSetIsClickableByDefault: Getter<boolean>,
|
|
124
118
|
shouldTriggerResponderTransferOnScrollAndroid: Getter<boolean>,
|
|
125
119
|
skipActivityIdentityAssertionOnHostPause: Getter<boolean>,
|
|
120
|
+
syncAndroidClipToPaddingWithOverflow: Getter<boolean>,
|
|
126
121
|
traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean>,
|
|
127
122
|
updateRuntimeShadowNodeReferencesOnCommit: Getter<boolean>,
|
|
123
|
+
updateRuntimeShadowNodeReferencesOnCommitThread: Getter<boolean>,
|
|
128
124
|
useAlwaysAvailableJSErrorHandling: Getter<boolean>,
|
|
129
125
|
useFabricInterop: Getter<boolean>,
|
|
130
126
|
useNativeViewConfigsInBridgelessMode: Getter<boolean>,
|
|
131
|
-
|
|
127
|
+
useNestedScrollViewAndroid: Getter<boolean>,
|
|
132
128
|
useSharedAnimatedBackend: Getter<boolean>,
|
|
133
129
|
useTraitHiddenOnAndroid: Getter<boolean>,
|
|
134
130
|
useTurboModuleInterop: Getter<boolean>,
|
|
135
131
|
useTurboModules: Getter<boolean>,
|
|
132
|
+
useUnorderedMapInDifferentiator: Getter<boolean>,
|
|
136
133
|
viewCullingOutsetRatio: Getter<number>,
|
|
137
|
-
|
|
134
|
+
viewTransitionEnabled: Getter<boolean>,
|
|
138
135
|
virtualViewPrerenderRatio: Getter<number>,
|
|
139
136
|
}>;
|
|
140
137
|
|
|
@@ -164,40 +161,35 @@ export const deferFlatListFocusChangeRenderUpdate: Getter<boolean> = createJavaS
|
|
|
164
161
|
export const disableMaintainVisibleContentPosition: Getter<boolean> = createJavaScriptFlagGetter('disableMaintainVisibleContentPosition', false);
|
|
165
162
|
|
|
166
163
|
/**
|
|
167
|
-
*
|
|
164
|
+
* Hoists regex patterns to module scope and optimizes parseLength in processBoxShadow for improved performance.
|
|
168
165
|
*/
|
|
169
|
-
export const
|
|
166
|
+
export const enableOptimizedBoxShadowParsing: Getter<boolean> = createJavaScriptFlagGetter('enableOptimizedBoxShadowParsing', false);
|
|
170
167
|
|
|
171
168
|
/**
|
|
172
|
-
*
|
|
169
|
+
* Enable the external inspection API for DevTools to communicate with the Inspector overlay.
|
|
173
170
|
*/
|
|
174
|
-
export const
|
|
171
|
+
export const externalElementInspectionEnabled: Getter<boolean> = createJavaScriptFlagGetter('externalElementInspectionEnabled', true);
|
|
175
172
|
|
|
176
173
|
/**
|
|
177
|
-
*
|
|
174
|
+
* Fix image dimensions not being passed through when src is used
|
|
178
175
|
*/
|
|
179
|
-
export const
|
|
176
|
+
export const fixImageSrcDimensionPropagation: Getter<boolean> = createJavaScriptFlagGetter('fixImageSrcDimensionPropagation', true);
|
|
180
177
|
|
|
181
178
|
/**
|
|
182
|
-
*
|
|
179
|
+
* 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
|
|
183
180
|
*/
|
|
184
|
-
export const
|
|
181
|
+
export const fixVirtualizeListCollapseWindowSize: Getter<boolean> = createJavaScriptFlagGetter('fixVirtualizeListCollapseWindowSize', false);
|
|
185
182
|
|
|
186
183
|
/**
|
|
187
|
-
*
|
|
184
|
+
* Function used to enable / disabled Layout Animations in React Native.
|
|
188
185
|
*/
|
|
189
|
-
export const
|
|
186
|
+
export const isLayoutAnimationEnabled: Getter<boolean> = createJavaScriptFlagGetter('isLayoutAnimationEnabled', true);
|
|
190
187
|
|
|
191
188
|
/**
|
|
192
189
|
* Enables use of AnimatedObject for animating transform values.
|
|
193
190
|
*/
|
|
194
191
|
export const shouldUseAnimatedObjectForTransform: Getter<boolean> = createJavaScriptFlagGetter('shouldUseAnimatedObjectForTransform', false);
|
|
195
192
|
|
|
196
|
-
/**
|
|
197
|
-
* Set accessibilityRole to "link" for pressable Text components by default.
|
|
198
|
-
*/
|
|
199
|
-
export const shouldUseLinkRoleForPressableText: Getter<boolean> = createJavaScriptFlagGetter('shouldUseLinkRoleForPressableText', true);
|
|
200
|
-
|
|
201
193
|
/**
|
|
202
194
|
* removeClippedSubviews prop will be used as the default in FlatList on iOS to match Android
|
|
203
195
|
*/
|
|
@@ -208,11 +200,6 @@ export const shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter<boolean> = cre
|
|
|
208
200
|
*/
|
|
209
201
|
export const shouldUseSetNativePropsInFabric: Getter<boolean> = createJavaScriptFlagGetter('shouldUseSetNativePropsInFabric', true);
|
|
210
202
|
|
|
211
|
-
/**
|
|
212
|
-
* Changes whether and how `VirtualView` uses `Activity`.
|
|
213
|
-
*/
|
|
214
|
-
export const virtualViewActivityBehavior: Getter<string> = createJavaScriptFlagGetter('virtualViewActivityBehavior', "no-activity");
|
|
215
|
-
|
|
216
203
|
/**
|
|
217
204
|
* Common flag for testing. Do NOT modify.
|
|
218
205
|
*/
|
|
@@ -229,6 +216,10 @@ export const cdpInteractionMetricsEnabled: Getter<boolean> = createNativeFlagGet
|
|
|
229
216
|
* Use a C++ implementation of Native Animated instead of the platform implementation.
|
|
230
217
|
*/
|
|
231
218
|
export const cxxNativeAnimatedEnabled: Getter<boolean> = createNativeFlagGetter('cxxNativeAnimatedEnabled', false);
|
|
219
|
+
/**
|
|
220
|
+
* When enabled, sets the default overflow style for Text components to hidden instead of visible.
|
|
221
|
+
*/
|
|
222
|
+
export const defaultTextToOverflowHidden: Getter<boolean> = createNativeFlagGetter('defaultTextToOverflowHidden', true);
|
|
232
223
|
/**
|
|
233
224
|
* Dispatch view commands in mount item order.
|
|
234
225
|
*/
|
|
@@ -241,10 +232,6 @@ export const disableImageViewPreallocationAndroid: Getter<boolean> = createNativ
|
|
|
241
232
|
* Prevent FabricMountingManager from reordering mountItems, which may lead to invalid state on the UI thread
|
|
242
233
|
*/
|
|
243
234
|
export const disableMountItemReorderingAndroid: Getter<boolean> = createNativeFlagGetter('disableMountItemReorderingAndroid', false);
|
|
244
|
-
/**
|
|
245
|
-
* Disable some workarounds for old Android versions in TextLayoutManager logic for retrieving attachment metrics
|
|
246
|
-
*/
|
|
247
|
-
export const disableOldAndroidAttachmentMetricsWorkarounds: Getter<boolean> = createNativeFlagGetter('disableOldAndroidAttachmentMetricsWorkarounds', true);
|
|
248
235
|
/**
|
|
249
236
|
* Force disable subview clipping for ReactViewGroup on Android
|
|
250
237
|
*/
|
|
@@ -309,6 +296,10 @@ export const enableEagerRootViewAttachment: Getter<boolean> = createNativeFlagGe
|
|
|
309
296
|
* When enabled, Android will disable Props 1.5 raw value merging when Props 2.0 is available.
|
|
310
297
|
*/
|
|
311
298
|
export const enableExclusivePropsUpdateAndroid: Getter<boolean> = createNativeFlagGetter('enableExclusivePropsUpdateAndroid', false);
|
|
299
|
+
/**
|
|
300
|
+
* Enables Fabric commit branching to fix starvation problems and atomic JS updates.
|
|
301
|
+
*/
|
|
302
|
+
export const enableFabricCommitBranching: Getter<boolean> = createNativeFlagGetter('enableFabricCommitBranching', false);
|
|
312
303
|
/**
|
|
313
304
|
* This feature flag enables logs for Fabric.
|
|
314
305
|
*/
|
|
@@ -430,13 +421,9 @@ export const enableVirtualViewContainerStateExperimental: Getter<boolean> = crea
|
|
|
430
421
|
*/
|
|
431
422
|
export const enableVirtualViewDebugFeatures: Getter<boolean> = createNativeFlagGetter('enableVirtualViewDebugFeatures', false);
|
|
432
423
|
/**
|
|
433
|
-
*
|
|
424
|
+
* Fix a use-after-free race condition in findShadowNodeByTag_DEPRECATED by using getCurrentRevision() instead of tryCommit() with a raw pointer.
|
|
434
425
|
*/
|
|
435
|
-
export const
|
|
436
|
-
/**
|
|
437
|
-
* Enables window focus detection for prioritizing VirtualView events.
|
|
438
|
-
*/
|
|
439
|
-
export const enableVirtualViewWindowFocusDetection: Getter<boolean> = createNativeFlagGetter('enableVirtualViewWindowFocusDetection', false);
|
|
426
|
+
export const fixFindShadowNodeByTagRaceCondition: Getter<boolean> = createNativeFlagGetter('fixFindShadowNodeByTagRaceCondition', false);
|
|
440
427
|
/**
|
|
441
428
|
* Uses the default event priority instead of the discreet event priority by default when dispatching events from Fabric to React.
|
|
442
429
|
*/
|
|
@@ -485,22 +472,6 @@ export const preventShadowTreeCommitExhaustion: Getter<boolean> = createNativeFl
|
|
|
485
472
|
* Function used to enable / disable Pressibility from using W3C Pointer Events for its hover callbacks
|
|
486
473
|
*/
|
|
487
474
|
export const shouldPressibilityUseW3CPointerEventsForHover: Getter<boolean> = createNativeFlagGetter('shouldPressibilityUseW3CPointerEventsForHover', false);
|
|
488
|
-
/**
|
|
489
|
-
* Reset isClickable to false when recycling views on Android to avoid accessibility tools finding views with incorrect state after recycling.
|
|
490
|
-
*/
|
|
491
|
-
export const shouldResetClickableWhenRecyclingView: Getter<boolean> = createNativeFlagGetter('shouldResetClickableWhenRecyclingView', true);
|
|
492
|
-
/**
|
|
493
|
-
* Reset OnClickListener to null when recycling views on Android to avoid accessibility tools finding views with incorrect state after recycling.
|
|
494
|
-
*/
|
|
495
|
-
export const shouldResetOnClickListenerWhenRecyclingView: Getter<boolean> = createNativeFlagGetter('shouldResetOnClickListenerWhenRecyclingView', true);
|
|
496
|
-
/**
|
|
497
|
-
* Fix BaseViewManager to properly set view.setEnabled() based on accessibilityState.disabled.
|
|
498
|
-
*/
|
|
499
|
-
export const shouldSetEnabledBasedOnAccessibilityState: Getter<boolean> = createNativeFlagGetter('shouldSetEnabledBasedOnAccessibilityState', true);
|
|
500
|
-
/**
|
|
501
|
-
* Sets isClickable=true by default on all React Native views on Android to improve UI harvesting detection while maintaining focusable=false to preserve expected behavior.
|
|
502
|
-
*/
|
|
503
|
-
export const shouldSetIsClickableByDefault: Getter<boolean> = createNativeFlagGetter('shouldSetIsClickableByDefault', false);
|
|
504
475
|
/**
|
|
505
476
|
* Do not emit touchcancel from Android ScrollView, instead native topScroll event will trigger responder transfer and terminate in RN renderer.
|
|
506
477
|
*/
|
|
@@ -509,6 +480,10 @@ export const shouldTriggerResponderTransferOnScrollAndroid: Getter<boolean> = cr
|
|
|
509
480
|
* Skip activity identity assertion in ReactHostImpl::onHostPause()
|
|
510
481
|
*/
|
|
511
482
|
export const skipActivityIdentityAssertionOnHostPause: Getter<boolean> = createNativeFlagGetter('skipActivityIdentityAssertionOnHostPause', false);
|
|
483
|
+
/**
|
|
484
|
+
* Sync clipToPadding on Android views with the overflow property
|
|
485
|
+
*/
|
|
486
|
+
export const syncAndroidClipToPaddingWithOverflow: Getter<boolean> = createNativeFlagGetter('syncAndroidClipToPaddingWithOverflow', false);
|
|
512
487
|
/**
|
|
513
488
|
* Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
|
|
514
489
|
*/
|
|
@@ -517,6 +492,10 @@ export const traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean> = creat
|
|
|
517
492
|
* When enabled, runtime shadow node references will be updated during the commit. This allows running RSNRU from any thread without corrupting the renderer state.
|
|
518
493
|
*/
|
|
519
494
|
export const updateRuntimeShadowNodeReferencesOnCommit: Getter<boolean> = createNativeFlagGetter('updateRuntimeShadowNodeReferencesOnCommit', false);
|
|
495
|
+
/**
|
|
496
|
+
* When enabled, runtime shadow node references will be updated during the commit only on the allowed thread.
|
|
497
|
+
*/
|
|
498
|
+
export const updateRuntimeShadowNodeReferencesOnCommitThread: Getter<boolean> = createNativeFlagGetter('updateRuntimeShadowNodeReferencesOnCommitThread', false);
|
|
520
499
|
/**
|
|
521
500
|
* In Bridgeless mode, use the always available javascript error reporting pipeline.
|
|
522
501
|
*/
|
|
@@ -530,9 +509,9 @@ export const useFabricInterop: Getter<boolean> = createNativeFlagGetter('useFabr
|
|
|
530
509
|
*/
|
|
531
510
|
export const useNativeViewConfigsInBridgelessMode: Getter<boolean> = createNativeFlagGetter('useNativeViewConfigsInBridgelessMode', false);
|
|
532
511
|
/**
|
|
533
|
-
*
|
|
512
|
+
* When enabled, ReactScrollView will extend NestedScrollView instead of ScrollView on Android for improved nested scrolling support.
|
|
534
513
|
*/
|
|
535
|
-
export const
|
|
514
|
+
export const useNestedScrollViewAndroid: Getter<boolean> = createNativeFlagGetter('useNestedScrollViewAndroid', false);
|
|
536
515
|
/**
|
|
537
516
|
* Use shared animation backend in C++ Animated
|
|
538
517
|
*/
|
|
@@ -549,14 +528,18 @@ export const useTurboModuleInterop: Getter<boolean> = createNativeFlagGetter('us
|
|
|
549
528
|
* When enabled, NativeModules will be executed by using the TurboModule system
|
|
550
529
|
*/
|
|
551
530
|
export const useTurboModules: Getter<boolean> = createNativeFlagGetter('useTurboModules', false);
|
|
531
|
+
/**
|
|
532
|
+
* Use std::unordered_map instead of TinyMap in the Differentiator for improved lookup performance.
|
|
533
|
+
*/
|
|
534
|
+
export const useUnorderedMapInDifferentiator: Getter<boolean> = createNativeFlagGetter('useUnorderedMapInDifferentiator', false);
|
|
552
535
|
/**
|
|
553
536
|
* Outset the culling context frame with the provided ratio. The culling context frame size will be outset by width * ratio on the left and right, and height * ratio on the top and bottom.
|
|
554
537
|
*/
|
|
555
538
|
export const viewCullingOutsetRatio: Getter<number> = createNativeFlagGetter('viewCullingOutsetRatio', 0);
|
|
556
539
|
/**
|
|
557
|
-
*
|
|
540
|
+
* Enable the View Transition API for animating transitions between views.
|
|
558
541
|
*/
|
|
559
|
-
export const
|
|
542
|
+
export const viewTransitionEnabled: Getter<boolean> = createNativeFlagGetter('viewTransitionEnabled', false);
|
|
560
543
|
/**
|
|
561
544
|
* Initial prerender ratio for VirtualView.
|
|
562
545
|
*/
|
|
@@ -52,7 +52,7 @@ function createGetter<T: boolean | number | string>(
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export function createJavaScriptFlagGetter<
|
|
55
|
-
K:
|
|
55
|
+
K: keyof ReactNativeFeatureFlagsJsOnly,
|
|
56
56
|
>(
|
|
57
57
|
configName: K,
|
|
58
58
|
defaultValue: ReturnType<ReactNativeFeatureFlagsJsOnly[K]>,
|
|
@@ -69,7 +69,7 @@ export function createJavaScriptFlagGetter<
|
|
|
69
69
|
|
|
70
70
|
type NativeFeatureFlags = NonNullable<typeof NativeReactNativeFeatureFlags>;
|
|
71
71
|
|
|
72
|
-
export function createNativeFlagGetter<K:
|
|
72
|
+
export function createNativeFlagGetter<K: keyof NativeFeatureFlags>(
|
|
73
73
|
configName: K,
|
|
74
74
|
defaultValue: ReturnType<NonNullable<NativeFeatureFlags[K]>>,
|
|
75
75
|
skipUnavailableNativeModuleError: boolean = false,
|
|
@@ -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<<2955ab3f744af8b5cdf587312ba423d7>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
* @noformat
|
|
10
10
|
*/
|
|
@@ -28,10 +28,10 @@ export interface Spec extends TurboModule {
|
|
|
28
28
|
+commonTestFlagWithoutNativeImplementation?: () => boolean;
|
|
29
29
|
+cdpInteractionMetricsEnabled?: () => boolean;
|
|
30
30
|
+cxxNativeAnimatedEnabled?: () => boolean;
|
|
31
|
+
+defaultTextToOverflowHidden?: () => boolean;
|
|
31
32
|
+disableEarlyViewCommandExecution?: () => boolean;
|
|
32
33
|
+disableImageViewPreallocationAndroid?: () => boolean;
|
|
33
34
|
+disableMountItemReorderingAndroid?: () => boolean;
|
|
34
|
-
+disableOldAndroidAttachmentMetricsWorkarounds?: () => boolean;
|
|
35
35
|
+disableSubviewClippingAndroid?: () => boolean;
|
|
36
36
|
+disableTextLayoutManagerCacheAndroid?: () => boolean;
|
|
37
37
|
+disableViewPreallocationAndroid?: () => boolean;
|
|
@@ -48,6 +48,7 @@ export interface Spec extends TurboModule {
|
|
|
48
48
|
+enableEagerMainQueueModulesOnIOS?: () => boolean;
|
|
49
49
|
+enableEagerRootViewAttachment?: () => boolean;
|
|
50
50
|
+enableExclusivePropsUpdateAndroid?: () => boolean;
|
|
51
|
+
+enableFabricCommitBranching?: () => boolean;
|
|
51
52
|
+enableFabricLogs?: () => boolean;
|
|
52
53
|
+enableFabricRenderer?: () => boolean;
|
|
53
54
|
+enableFontScaleChangesUpdatingLayout?: () => boolean;
|
|
@@ -78,8 +79,7 @@ export interface Spec extends TurboModule {
|
|
|
78
79
|
+enableViewRecyclingForView?: () => boolean;
|
|
79
80
|
+enableVirtualViewContainerStateExperimental?: () => boolean;
|
|
80
81
|
+enableVirtualViewDebugFeatures?: () => boolean;
|
|
81
|
-
+
|
|
82
|
-
+enableVirtualViewWindowFocusDetection?: () => boolean;
|
|
82
|
+
+fixFindShadowNodeByTagRaceCondition?: () => boolean;
|
|
83
83
|
+fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean;
|
|
84
84
|
+fixTextClippingAndroid15useBoundsForWidth?: () => boolean;
|
|
85
85
|
+fuseboxAssertSingleHostState?: () => boolean;
|
|
@@ -92,24 +92,23 @@ export interface Spec extends TurboModule {
|
|
|
92
92
|
+preparedTextCacheSize?: () => number;
|
|
93
93
|
+preventShadowTreeCommitExhaustion?: () => boolean;
|
|
94
94
|
+shouldPressibilityUseW3CPointerEventsForHover?: () => boolean;
|
|
95
|
-
+shouldResetClickableWhenRecyclingView?: () => boolean;
|
|
96
|
-
+shouldResetOnClickListenerWhenRecyclingView?: () => boolean;
|
|
97
|
-
+shouldSetEnabledBasedOnAccessibilityState?: () => boolean;
|
|
98
|
-
+shouldSetIsClickableByDefault?: () => boolean;
|
|
99
95
|
+shouldTriggerResponderTransferOnScrollAndroid?: () => boolean;
|
|
100
96
|
+skipActivityIdentityAssertionOnHostPause?: () => boolean;
|
|
97
|
+
+syncAndroidClipToPaddingWithOverflow?: () => boolean;
|
|
101
98
|
+traceTurboModulePromiseRejectionsOnAndroid?: () => boolean;
|
|
102
99
|
+updateRuntimeShadowNodeReferencesOnCommit?: () => boolean;
|
|
100
|
+
+updateRuntimeShadowNodeReferencesOnCommitThread?: () => boolean;
|
|
103
101
|
+useAlwaysAvailableJSErrorHandling?: () => boolean;
|
|
104
102
|
+useFabricInterop?: () => boolean;
|
|
105
103
|
+useNativeViewConfigsInBridgelessMode?: () => boolean;
|
|
106
|
-
+
|
|
104
|
+
+useNestedScrollViewAndroid?: () => boolean;
|
|
107
105
|
+useSharedAnimatedBackend?: () => boolean;
|
|
108
106
|
+useTraitHiddenOnAndroid?: () => boolean;
|
|
109
107
|
+useTurboModuleInterop?: () => boolean;
|
|
110
108
|
+useTurboModules?: () => boolean;
|
|
109
|
+
+useUnorderedMapInDifferentiator?: () => boolean;
|
|
111
110
|
+viewCullingOutsetRatio?: () => number;
|
|
112
|
-
+
|
|
111
|
+
+viewTransitionEnabled?: () => boolean;
|
|
113
112
|
+virtualViewPrerenderRatio?: () => number;
|
|
114
113
|
}
|
|
115
114
|
|
|
@@ -15,7 +15,7 @@ import type {HostComponent} from '../../types/HostComponent';
|
|
|
15
15
|
|
|
16
16
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
17
17
|
|
|
18
|
-
type RCTActivityIndicatorViewNativeProps =
|
|
18
|
+
type RCTActivityIndicatorViewNativeProps = Readonly<{
|
|
19
19
|
...ViewProps,
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -22,15 +22,15 @@ import codegenNativeCommands from '../../../../Libraries/Utilities/codegenNative
|
|
|
22
22
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
23
23
|
import * as React from 'react';
|
|
24
24
|
|
|
25
|
-
type DrawerStateEvent =
|
|
25
|
+
type DrawerStateEvent = Readonly<{
|
|
26
26
|
drawerState: Int32,
|
|
27
27
|
}>;
|
|
28
28
|
|
|
29
|
-
type DrawerSlideEvent =
|
|
29
|
+
type DrawerSlideEvent = Readonly<{
|
|
30
30
|
offset: Float,
|
|
31
31
|
}>;
|
|
32
32
|
|
|
33
|
-
type AndroidDrawerLayoutNativeProps =
|
|
33
|
+
type AndroidDrawerLayoutNativeProps = Readonly<{
|
|
34
34
|
...ViewProps,
|
|
35
35
|
/**
|
|
36
36
|
* Determines whether the keyboard gets dismissed in response to a drag.
|
package/src/private/specs_DEPRECATED/components/AndroidHorizontalScrollContentViewNativeComponent.js
CHANGED
|
@@ -13,7 +13,7 @@ import type {HostComponent} from '../../types/HostComponent';
|
|
|
13
13
|
|
|
14
14
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
15
15
|
|
|
16
|
-
type AndroidHorizontalScrollContentViewNativeProps =
|
|
16
|
+
type AndroidHorizontalScrollContentViewNativeProps = Readonly<{
|
|
17
17
|
...ViewProps,
|
|
18
18
|
|
|
19
19
|
removeClippedSubviews?: ?boolean,
|
|
@@ -21,7 +21,7 @@ import codegenNativeCommands from '../../../../Libraries/Utilities/codegenNative
|
|
|
21
21
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
22
22
|
import * as React from 'react';
|
|
23
23
|
|
|
24
|
-
type AndroidSwipeRefreshLayoutNativeProps =
|
|
24
|
+
type AndroidSwipeRefreshLayoutNativeProps = Readonly<{
|
|
25
25
|
...ViewProps,
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -31,7 +31,7 @@ type AndroidSwipeRefreshLayoutNativeProps = $ReadOnly<{
|
|
|
31
31
|
/**
|
|
32
32
|
* The colors (at least one) that will be used to draw the refresh indicator.
|
|
33
33
|
*/
|
|
34
|
-
colors?:
|
|
34
|
+
colors?: ?ReadonlyArray<ColorValue>,
|
|
35
35
|
/**
|
|
36
36
|
* The background color of the refresh indicator.
|
|
37
37
|
*/
|
|
@@ -21,12 +21,12 @@ import codegenNativeCommands from '../../../../Libraries/Utilities/codegenNative
|
|
|
21
21
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
22
22
|
import * as React from 'react';
|
|
23
23
|
|
|
24
|
-
type AndroidSwitchChangeEvent =
|
|
24
|
+
type AndroidSwitchChangeEvent = Readonly<{
|
|
25
25
|
value: boolean,
|
|
26
26
|
target: Int32,
|
|
27
27
|
}>;
|
|
28
28
|
|
|
29
|
-
type AndroidSwitchNativeProps =
|
|
29
|
+
type AndroidSwitchNativeProps = Readonly<{
|
|
30
30
|
...ViewProps,
|
|
31
31
|
|
|
32
32
|
// Props
|
|
@@ -16,7 +16,7 @@ import codegenNativeCommands from '../../../../Libraries/Utilities/codegenNative
|
|
|
16
16
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
17
17
|
import * as React from 'react';
|
|
18
18
|
|
|
19
|
-
type DebuggingOverlayNativeProps =
|
|
19
|
+
type DebuggingOverlayNativeProps = Readonly<{
|
|
20
20
|
...ViewProps,
|
|
21
21
|
}>;
|
|
22
22
|
export type DebuggingOverlayNativeComponentType =
|
|
@@ -38,11 +38,11 @@ export type ElementRectangle = {
|
|
|
38
38
|
interface NativeCommands {
|
|
39
39
|
+highlightTraceUpdates: (
|
|
40
40
|
viewRef: React.ElementRef<DebuggingOverlayNativeComponentType>,
|
|
41
|
-
updates:
|
|
41
|
+
updates: ReadonlyArray<TraceUpdate>,
|
|
42
42
|
) => void;
|
|
43
43
|
+highlightElements: (
|
|
44
44
|
viewRef: React.ElementRef<DebuggingOverlayNativeComponentType>,
|
|
45
|
-
elements:
|
|
45
|
+
elements: ReadonlyArray<ElementRectangle>,
|
|
46
46
|
) => void;
|
|
47
47
|
+clearElementsHighlights: (
|
|
48
48
|
viewRef: React.ElementRef<DebuggingOverlayNativeComponentType>,
|
|
@@ -18,7 +18,7 @@ import type {HostComponent} from '../../types/HostComponent';
|
|
|
18
18
|
|
|
19
19
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
20
20
|
|
|
21
|
-
type AndroidProgressBarNativeProps =
|
|
21
|
+
type AndroidProgressBarNativeProps = Readonly<{
|
|
22
22
|
...ViewProps,
|
|
23
23
|
|
|
24
24
|
//Props
|
|
@@ -21,7 +21,7 @@ import codegenNativeCommands from '../../../../Libraries/Utilities/codegenNative
|
|
|
21
21
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
22
22
|
import * as React from 'react';
|
|
23
23
|
|
|
24
|
-
type PullToRefreshNativeProps =
|
|
24
|
+
type PullToRefreshNativeProps = Readonly<{
|
|
25
25
|
...ViewProps,
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -14,7 +14,7 @@ import type {HostComponent} from '../../types/HostComponent';
|
|
|
14
14
|
|
|
15
15
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
16
16
|
|
|
17
|
-
type InputAccessoryNativeProps =
|
|
17
|
+
type InputAccessoryNativeProps = Readonly<{
|
|
18
18
|
...ViewProps,
|
|
19
19
|
backgroundColor?: ?ColorValue,
|
|
20
20
|
}>;
|
|
@@ -18,11 +18,11 @@ import type {HostComponent} from '../../types/HostComponent';
|
|
|
18
18
|
|
|
19
19
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
20
20
|
|
|
21
|
-
type OrientationChangeEvent =
|
|
21
|
+
type OrientationChangeEvent = Readonly<{
|
|
22
22
|
orientation: 'portrait' | 'landscape',
|
|
23
23
|
}>;
|
|
24
24
|
|
|
25
|
-
type RCTModalHostViewNativeProps =
|
|
25
|
+
type RCTModalHostViewNativeProps = Readonly<{
|
|
26
26
|
...ViewProps,
|
|
27
27
|
|
|
28
28
|
/**
|
|
@@ -124,7 +124,7 @@ type RCTModalHostViewNativeProps = $ReadOnly<{
|
|
|
124
124
|
* See https://reactnative.dev/docs/modal#supportedorientations
|
|
125
125
|
*/
|
|
126
126
|
supportedOrientations?: WithDefault<
|
|
127
|
-
|
|
127
|
+
ReadonlyArray<
|
|
128
128
|
| 'portrait'
|
|
129
129
|
| 'portrait-upside-down'
|
|
130
130
|
| 'landscape'
|
|
@@ -13,7 +13,7 @@ import type {HostComponent} from '../../types/HostComponent';
|
|
|
13
13
|
|
|
14
14
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
15
15
|
|
|
16
|
-
type RCTSafeAreaViewNativeProps =
|
|
16
|
+
type RCTSafeAreaViewNativeProps = Readonly<{
|
|
17
17
|
...ViewProps,
|
|
18
18
|
|
|
19
19
|
// No props
|
|
@@ -21,12 +21,12 @@ import codegenNativeCommands from '../../../../Libraries/Utilities/codegenNative
|
|
|
21
21
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
22
22
|
import * as React from 'react';
|
|
23
23
|
|
|
24
|
-
type NativeSwitchChangeEvent =
|
|
24
|
+
type NativeSwitchChangeEvent = Readonly<{
|
|
25
25
|
value: boolean,
|
|
26
26
|
target: Int32,
|
|
27
27
|
}>;
|
|
28
28
|
|
|
29
|
-
type SwitchNativeProps =
|
|
29
|
+
type SwitchNativeProps = Readonly<{
|
|
30
30
|
...ViewProps,
|
|
31
31
|
|
|
32
32
|
// Props
|
|
@@ -14,7 +14,7 @@ import type {HostComponent} from '../../types/HostComponent';
|
|
|
14
14
|
|
|
15
15
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
16
16
|
|
|
17
|
-
type UnimplementedNativeViewNativeProps =
|
|
17
|
+
type UnimplementedNativeViewNativeProps = Readonly<{
|
|
18
18
|
...ViewProps,
|
|
19
19
|
name?: WithDefault<string, ''>,
|
|
20
20
|
}>;
|
|
@@ -16,7 +16,7 @@ import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboMod
|
|
|
16
16
|
export interface Spec extends TurboModule {
|
|
17
17
|
+getConstants: () => {};
|
|
18
18
|
// Return [width, height] of image uri
|
|
19
|
-
+getSize: (uri: string) => Promise
|
|
19
|
+
+getSize: (uri: string) => Promise<ReadonlyArray<number>>;
|
|
20
20
|
+getSizeWithHeaders: (
|
|
21
21
|
uri: string,
|
|
22
22
|
headers: Object,
|