@office-iss/react-native-win32 0.0.0-canary.298 → 0.0.0-canary.299
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 +5 -3
- package/CHANGELOG.json +28 -1
- package/CHANGELOG.md +16 -6
- package/IntegrationTests/IntegrationTestsApp.js +1 -0
- package/IntegrationTests/LoggingTestModule.js +16 -20
- package/IntegrationTests/TimersTest.js +1 -0
- package/IntegrationTests/WebSocketTest.js +1 -0
- package/Libraries/ActionSheetIOS/NativeActionSheetManager.js +1 -0
- package/Libraries/Alert/Alert.js +2 -2
- package/Libraries/Alert/NativeAlertManager.js +1 -0
- package/Libraries/Alert/RCTAlertManager.android.js +19 -13
- package/Libraries/Alert/RCTAlertManager.ios.js +9 -11
- package/Libraries/Alert/RCTAlertManager.js +1 -3
- package/Libraries/Alert/RCTAlertManager.js.flow +4 -6
- package/Libraries/Animated/AnimatedEvent.js +4 -3
- package/Libraries/Animated/AnimatedExports.js.flow +5 -0
- package/Libraries/Animated/AnimatedImplementation.js +44 -44
- package/Libraries/Animated/AnimatedMock.js +2 -2
- package/Libraries/Animated/NativeAnimatedModule.js +1 -0
- package/Libraries/Animated/NativeAnimatedTurboModule.js +1 -0
- package/Libraries/Animated/animations/Animation.js +6 -1
- package/Libraries/Animated/components/AnimatedScrollView.js +6 -5
- package/Libraries/Animated/components/AnimatedText.js +2 -5
- package/Libraries/Animated/components/AnimatedView.js +2 -1
- package/Libraries/Animated/createAnimatedComponent.js +2 -4
- package/Libraries/Animated/nodes/AnimatedProps.js +2 -7
- package/Libraries/AppState/NativeAppState.js +1 -0
- package/Libraries/Blob/NativeBlobModule.js +1 -0
- package/Libraries/Blob/NativeFileReaderModule.js +1 -0
- package/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfo.js +1 -2
- package/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfoWin32.js +1 -2
- package/Libraries/Components/AccessibilityInfo/NativeAccessibilityManager.js +1 -2
- package/Libraries/Components/ActivityIndicator/ActivityIndicatorViewNativeComponent.js +1 -2
- package/Libraries/Components/Button.js +7 -4
- package/Libraries/Components/Button.win32.js +7 -4
- package/Libraries/Components/Clipboard/NativeClipboard.js +1 -2
- package/Libraries/Components/DrawerAndroid/AndroidDrawerLayoutNativeComponent.js +1 -2
- package/Libraries/Components/Keyboard/NativeKeyboardObserver.js +1 -2
- package/Libraries/Components/Pressable/Pressable.js +8 -2
- package/Libraries/Components/Pressable/Pressable.win32.js +8 -8
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.js +1 -2
- package/Libraries/Components/RefreshControl/AndroidSwipeRefreshLayoutNativeComponent.js +1 -2
- package/Libraries/Components/RefreshControl/PullToRefreshViewNativeComponent.js +1 -0
- package/Libraries/Components/SafeAreaView/RCTSafeAreaViewNativeComponent.js +1 -2
- package/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +9 -0
- package/Libraries/Components/SafeAreaView/SafeAreaView.js +3 -2
- package/Libraries/Components/SafeAreaView/SafeAreaView.win32.js +3 -2
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollContentViewNativeComponent.js +1 -2
- package/Libraries/Components/ScrollView/ScrollView.d.ts +10 -1
- package/Libraries/Components/ScrollView/ScrollView.js +3 -1
- package/Libraries/Components/Sound/NativeSoundManager.js +1 -2
- package/Libraries/Components/StatusBar/NativeStatusBarManagerAndroid.js +1 -2
- package/Libraries/Components/StatusBar/NativeStatusBarManagerIOS.js +1 -2
- package/Libraries/Components/StatusBar/StatusBar.d.ts +4 -0
- package/Libraries/Components/StatusBar/StatusBar.js +5 -0
- package/Libraries/Components/Switch/AndroidSwitchNativeComponent.js +1 -2
- package/Libraries/Components/Switch/Switch.js +2 -1
- package/Libraries/Components/Switch/SwitchNativeComponent.js +1 -2
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +8 -7
- package/Libraries/Components/TextInput/RCTInputAccessoryViewNativeComponent.js +1 -2
- package/Libraries/Components/TextInput/TextInput.flow.js +1 -1
- package/Libraries/Components/TextInput/TextInput.js +2 -4
- package/Libraries/Components/TextInput/TextInput.win32.js +28 -3
- package/Libraries/Components/ToastAndroid/NativeToastAndroid.js +1 -2
- package/Libraries/Components/Touchable/Touchable.js +7 -3
- package/Libraries/Components/Touchable/Touchable.win32.js +7 -3
- package/Libraries/Components/Touchable/TouchableHighlight.js +5 -1
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +3 -2
- package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +3 -2
- package/Libraries/Components/Touchable/TouchableOpacity.d.ts +1 -0
- package/Libraries/Components/Touchable/TouchableOpacity.js +3 -2
- package/Libraries/Components/UnimplementedViews/UnimplementedNativeViewNativeComponent.js +1 -2
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +6 -15
- package/Libraries/Components/View/View.js +17 -18
- package/Libraries/Components/View/View.win32.js +16 -2
- package/Libraries/Components/View/ViewAccessibility.js +0 -7
- package/Libraries/Components/View/ViewAccessibility.win32.js +0 -7
- package/Libraries/Components/View/ViewPropTypes.d.ts +4 -0
- package/Libraries/Components/View/ViewPropTypes.js +8 -0
- package/Libraries/Components/View/ViewPropTypes.win32.js +8 -0
- package/Libraries/Core/ExceptionsManager.js +28 -15
- package/Libraries/Core/NativeExceptionsManager.js +1 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/SegmentFetcher/NativeSegmentFetcher.js +1 -0
- package/Libraries/Core/Timers/NativeTiming.js +1 -0
- package/Libraries/Core/checkNativeVersion.js +1 -0
- package/Libraries/Core/setUpReactDevTools.js +21 -4
- package/Libraries/Debugging/DebuggingOverlayNativeComponent.js +1 -0
- package/Libraries/EventEmitter/NativeEventEmitter.js +3 -3
- package/Libraries/Image/Image.android.js +3 -3
- package/Libraries/Image/ImageSource.d.ts +5 -0
- package/Libraries/Image/ImageViewNativeComponent.js +3 -3
- package/Libraries/Image/NativeImageEditor.js +1 -0
- package/Libraries/Image/NativeImageLoaderAndroid.js +1 -0
- package/Libraries/Image/NativeImageLoaderIOS.js +1 -0
- package/Libraries/Image/NativeImageLoaderWin32.js +1 -0
- package/Libraries/Image/NativeImageStoreAndroid.js +1 -0
- package/Libraries/Image/NativeImageStoreIOS.js +1 -0
- package/Libraries/Image/RelativeImageStub.js +1 -1
- package/Libraries/Image/TextInlineImageNativeComponent.js +3 -3
- package/Libraries/Interaction/InteractionManager.js +6 -1
- package/Libraries/Interaction/NativeFrameRateLogger.js +1 -0
- package/Libraries/Interaction/TaskQueue.js +14 -0
- package/Libraries/LayoutAnimation/LayoutAnimation.js +12 -8
- package/Libraries/Linking/NativeIntentAndroid.js +1 -0
- package/Libraries/Linking/NativeLinkingManager.js +1 -0
- package/Libraries/Lists/FlatList.js +5 -6
- package/Libraries/Lists/SectionList.js +4 -4
- package/Libraries/Lists/VirtualizedList.js +3 -2
- package/Libraries/LogBox/Data/LogBoxData.js +7 -4
- package/Libraries/LogBox/LogBox.js +72 -101
- package/Libraries/Modal/Modal.d.ts +8 -2
- package/Libraries/Modal/Modal.js +19 -2
- package/Libraries/Modal/NativeModalManager.js +1 -0
- package/Libraries/Modal/RCTModalHostViewNativeComponent.js +1 -0
- package/Libraries/NativeComponent/BaseViewConfig.android.js +6 -15
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +6 -15
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +6 -15
- package/Libraries/NativeModules/specs/NativeDevMenu.js +1 -0
- package/Libraries/NativeModules/specs/NativeDevSettings.js +1 -0
- package/Libraries/NativeModules/specs/NativeDeviceEventManager.js +1 -0
- package/Libraries/NativeModules/specs/NativeDialogManagerAndroid.js +1 -0
- package/Libraries/NativeModules/specs/NativeLogBox.js +1 -0
- package/Libraries/NativeModules/specs/NativeRedBox.js +1 -0
- package/Libraries/NativeModules/specs/NativeSourceCode.js +1 -0
- package/Libraries/Network/NativeNetworkingAndroid.js +1 -0
- package/Libraries/Network/NativeNetworkingIOS.js +1 -0
- package/Libraries/Network/XMLHttpRequest.js +2 -0
- package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +1 -0
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +3 -2
- package/Libraries/PushNotificationIOS/NativePushNotificationManagerIOS.js +1 -0
- package/Libraries/ReactNative/AppRegistry.flow.js +2 -2
- package/Libraries/ReactNative/AppRegistryImpl.js +0 -10
- package/Libraries/ReactNative/BridgelessUIManager.js +1 -1
- package/Libraries/ReactNative/NativeHeadlessJsTaskSupport.js +1 -0
- package/Libraries/ReactNative/NativeI18nManager.js +1 -0
- package/Libraries/ReactNative/NativeUIManager.js +1 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.js +80 -61
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +1 -1
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js.flow +2 -2
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +3 -1
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +3 -1
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3 -1
- package/Libraries/Renderer/shims/ReactNativeTypes.js +3 -12
- package/Libraries/Renderer/shims/ReactNativeTypes.win32.js +3 -12
- package/Libraries/Settings/NativeSettingsManager.js +1 -0
- package/Libraries/Share/NativeShareModule.js +1 -0
- package/Libraries/StyleSheet/StyleSheet.js +1 -0
- package/Libraries/StyleSheet/processAspectRatio.js +2 -0
- package/Libraries/Text/Text.js +4 -6
- package/Libraries/Text/TextAncestor.js +3 -10
- package/Libraries/Text/TextAncestorContext.js +23 -0
- package/Libraries/Text/TextProps.js +2 -2
- package/Libraries/Text/TextProps.win32.js +2 -2
- package/Libraries/TurboModule/samples/NativeSampleTurboModule.js +1 -0
- package/Libraries/Types/CodegenTypesNamespace.js +1 -0
- package/Libraries/Utilities/HMRClient.js +12 -2
- package/Libraries/Utilities/NativeAppearance.js +1 -0
- package/Libraries/Utilities/NativeDevLoadingView.js +1 -0
- package/Libraries/Utilities/NativeDeviceInfo.js +1 -2
- package/Libraries/Utilities/NativePlatformConstantsAndroid.js +1 -0
- package/Libraries/Utilities/NativePlatformConstantsIOS.js +1 -0
- package/Libraries/Utilities/NativePlatformConstantsWin.js +1 -0
- package/Libraries/Utilities/Platform.android.js +1 -4
- package/Libraries/Utilities/Platform.ios.js +1 -4
- package/Libraries/Utilities/Platform.js.flow +2 -2
- package/Libraries/Utilities/Platform.win32.js +1 -4
- package/Libraries/Utilities/PlatformTypes.js +1 -1
- package/Libraries/Utilities/codegenNativeCommands.js +4 -2
- package/Libraries/Utilities/codegenNativeComponent.js +3 -3
- package/Libraries/Utilities/createPerformanceLogger.js +32 -0
- package/Libraries/Vibration/NativeVibration.js +1 -0
- package/Libraries/WebSocket/NativeWebSocketModule.js +1 -0
- package/Libraries/vendor/emitter/EventEmitter.js +6 -6
- package/index.js +21 -0
- package/index.win32.js +12 -1
- package/jest/setup.js +1 -0
- package/overrides.json +25 -25
- package/package.json +11 -11
- package/src/private/animated/createAnimatedPropsHook.js +4 -1
- package/src/private/animated/createAnimatedPropsMemoHook.js +2 -2
- package/src/private/components/virtualview/VirtualView.js +145 -0
- package/src/private/components/virtualview/VirtualViewNativeComponent.js +90 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +43 -23
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +9 -5
- package/src/private/setup/setUpPerformanceObserver.js +7 -0
- package/src/private/specs_DEPRECATED/components/ActivityIndicatorViewNativeComponent.js +7 -4
- package/src/private/specs_DEPRECATED/components/AndroidDrawerLayoutNativeComponent.js +3 -3
- package/src/private/specs_DEPRECATED/components/AndroidHorizontalScrollContentViewNativeComponent.js +3 -3
- package/src/private/specs_DEPRECATED/components/AndroidSwipeRefreshLayoutNativeComponent.js +3 -3
- package/src/private/specs_DEPRECATED/components/AndroidSwitchNativeComponent.js +10 -7
- package/src/private/specs_DEPRECATED/components/DebuggingOverlayNativeComponent.js +5 -4
- package/src/private/specs_DEPRECATED/components/ProgressBarAndroidNativeComponent.js +7 -4
- package/src/private/specs_DEPRECATED/components/PullToRefreshViewNativeComponent.js +9 -6
- package/src/private/specs_DEPRECATED/components/RCTInputAccessoryViewNativeComponent.js +9 -6
- package/src/private/specs_DEPRECATED/components/RCTModalHostViewNativeComponent.js +14 -5
- package/src/private/specs_DEPRECATED/components/RCTSafeAreaViewNativeComponent.js +8 -5
- package/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js +5 -5
- package/src/private/specs_DEPRECATED/components/UnimplementedNativeViewNativeComponent.js +3 -3
- package/src/private/specs_DEPRECATED/modules/NativeDeviceInfo.js +1 -0
- package/src/private/specs_DEPRECATED/modules/NativeUIManager.js +9 -6
- package/src/private/styles/composeStyles.js +5 -12
- package/src/private/webapis/errors/DOMException.js +1 -1
- package/src/private/webapis/idlecallbacks/specs/NativeIdleCallbacks.js +4 -2
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +12 -7
- package/src/private/webapis/intersectionobserver/internals/IntersectionObserverManager.js +13 -0
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +2 -1
- package/src/private/webapis/performance/Performance.js +164 -61
- package/src/private/webapis/performance/PerformanceEntry.js +20 -16
- package/src/private/webapis/performance/PerformanceObserver.js +31 -27
- package/src/private/webapis/performance/ResourceTiming.js +108 -0
- package/src/private/webapis/performance/UserTiming.js +60 -8
- package/src/private/webapis/performance/internals/RawPerformanceEntry.js +47 -32
- package/src/private/webapis/performance/specs/NativePerformance.js +13 -1
- package/src-win/Libraries/Components/View/ViewPropTypes.d.ts +4 -0
- package/Libraries/BugReporting/BugReporting.js +0 -140
- package/Libraries/BugReporting/NativeBugReporting.js +0 -13
- package/Libraries/BugReporting/dumpReactTree.js +0 -151
- package/Libraries/BugReporting/getReactData.js +0 -187
- package/src/private/specs_DEPRECATED/modules/NativeBugReporting.js +0 -20
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @flow strict-local
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type {ViewStyleProp} from '../../../../Libraries/StyleSheet/StyleSheet';
|
|
12
|
+
import type {NativeSyntheticEvent} from '../../../../Libraries/Types/CoreEventTypes';
|
|
13
|
+
import type ReadOnlyElement from '../../webapis/dom/nodes/ReadOnlyElement';
|
|
14
|
+
import type {NativeModeChangeEvent} from './VirtualViewNativeComponent';
|
|
15
|
+
|
|
16
|
+
import StyleSheet from '../../../../Libraries/StyleSheet/StyleSheet';
|
|
17
|
+
import VirtualViewNativeComponent from './VirtualViewNativeComponent';
|
|
18
|
+
import nullthrows from 'nullthrows';
|
|
19
|
+
import * as React from 'react';
|
|
20
|
+
import {startTransition, useState} from 'react';
|
|
21
|
+
|
|
22
|
+
// @see VirtualViewNativeComponent
|
|
23
|
+
export enum VirtualViewMode {
|
|
24
|
+
Visible = 0,
|
|
25
|
+
Prerender = 1,
|
|
26
|
+
Hidden = 2,
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// @see VirtualViewNativeComponent
|
|
30
|
+
export enum VirtualViewRenderState {
|
|
31
|
+
Unknown = 0,
|
|
32
|
+
Rendered = 1,
|
|
33
|
+
None = 2,
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export type Rect = $ReadOnly<{
|
|
37
|
+
x: number,
|
|
38
|
+
y: number,
|
|
39
|
+
width: number,
|
|
40
|
+
height: number,
|
|
41
|
+
}>;
|
|
42
|
+
|
|
43
|
+
export type ModeChangeEvent = $ReadOnly<{
|
|
44
|
+
...Omit<NativeModeChangeEvent, 'mode'>,
|
|
45
|
+
mode: VirtualViewMode,
|
|
46
|
+
target: ReadOnlyElement,
|
|
47
|
+
}>;
|
|
48
|
+
|
|
49
|
+
type VirtualViewComponent = component(
|
|
50
|
+
children?: React.Node,
|
|
51
|
+
nativeID?: string,
|
|
52
|
+
ref?: ?React.RefSetter<React.ElementRef<typeof VirtualViewNativeComponent>>,
|
|
53
|
+
style?: ?ViewStyleProp,
|
|
54
|
+
onModeChange?: (event: ModeChangeEvent) => void,
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
type HiddenHeight = number;
|
|
58
|
+
const NotHidden = null;
|
|
59
|
+
|
|
60
|
+
type State = HiddenHeight | typeof NotHidden;
|
|
61
|
+
|
|
62
|
+
function createVirtualView(initialState: State): VirtualViewComponent {
|
|
63
|
+
const initialHidden = initialState !== NotHidden;
|
|
64
|
+
|
|
65
|
+
component VirtualView(
|
|
66
|
+
children?: React.Node,
|
|
67
|
+
nativeID?: string,
|
|
68
|
+
ref?: ?React.RefSetter<React.ElementRef<typeof VirtualViewNativeComponent>>,
|
|
69
|
+
style?: ?ViewStyleProp,
|
|
70
|
+
onModeChange?: (event: ModeChangeEvent) => void,
|
|
71
|
+
) {
|
|
72
|
+
const [state, setState] = useState<State>(initialState);
|
|
73
|
+
if (__DEV__) {
|
|
74
|
+
_logs.states?.push(state);
|
|
75
|
+
}
|
|
76
|
+
const isHidden = state !== NotHidden;
|
|
77
|
+
|
|
78
|
+
const handleModeChange = (
|
|
79
|
+
event: NativeSyntheticEvent<NativeModeChangeEvent>,
|
|
80
|
+
) => {
|
|
81
|
+
const mode = nullthrows(VirtualViewMode.cast(event.nativeEvent.mode));
|
|
82
|
+
const emitModeChange =
|
|
83
|
+
onModeChange == null
|
|
84
|
+
? null
|
|
85
|
+
: onModeChange.bind(null, {
|
|
86
|
+
mode,
|
|
87
|
+
// $FlowIgnore[incompatible-cast]
|
|
88
|
+
target: event.currentTarget as ReadOnlyElement,
|
|
89
|
+
targetRect: event.nativeEvent.targetRect,
|
|
90
|
+
thresholdRect: event.nativeEvent.thresholdRect,
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
match (mode) {
|
|
94
|
+
VirtualViewMode.Visible => {
|
|
95
|
+
setState(NotHidden);
|
|
96
|
+
emitModeChange?.();
|
|
97
|
+
}
|
|
98
|
+
VirtualViewMode.Prerender => {
|
|
99
|
+
startTransition(() => {
|
|
100
|
+
setState(NotHidden);
|
|
101
|
+
emitModeChange?.();
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
VirtualViewMode.Hidden => {
|
|
105
|
+
const {height} = event.nativeEvent.targetRect;
|
|
106
|
+
startTransition(() => {
|
|
107
|
+
setState(height as HiddenHeight);
|
|
108
|
+
emitModeChange?.();
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
return (
|
|
115
|
+
<VirtualViewNativeComponent
|
|
116
|
+
initialHidden={initialHidden}
|
|
117
|
+
nativeID={nativeID}
|
|
118
|
+
ref={ref}
|
|
119
|
+
renderState={
|
|
120
|
+
(isHidden
|
|
121
|
+
? VirtualViewRenderState.None
|
|
122
|
+
: VirtualViewRenderState.Rendered) as number
|
|
123
|
+
}
|
|
124
|
+
style={
|
|
125
|
+
isHidden
|
|
126
|
+
? StyleSheet.compose(style, {
|
|
127
|
+
height: Math.abs(nullthrows(state) as HiddenHeight),
|
|
128
|
+
})
|
|
129
|
+
: style
|
|
130
|
+
}
|
|
131
|
+
onModeChange={handleModeChange}>
|
|
132
|
+
{isHidden ? null : children}
|
|
133
|
+
</VirtualViewNativeComponent>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
return VirtualView;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export default createVirtualView(NotHidden) as VirtualViewComponent;
|
|
140
|
+
|
|
141
|
+
export function createHiddenVirtualView(height: number): VirtualViewComponent {
|
|
142
|
+
return createVirtualView(height as HiddenHeight);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export const _logs: {states?: Array<State>} = {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @flow strict-local
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';
|
|
12
|
+
import type {
|
|
13
|
+
DirectEventHandler,
|
|
14
|
+
Double,
|
|
15
|
+
Int32,
|
|
16
|
+
} from '../../../../Libraries/Types/CodegenTypes';
|
|
17
|
+
import type {HostComponent} from '../../types/HostComponent';
|
|
18
|
+
|
|
19
|
+
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
20
|
+
|
|
21
|
+
export type NativeModeChangeEvent = $ReadOnly<{
|
|
22
|
+
/**
|
|
23
|
+
* Virtualization mode of the target view.
|
|
24
|
+
*
|
|
25
|
+
* - `0`: Target view is visible.
|
|
26
|
+
* - `1`: Target view is hidden, but can be prerendered.
|
|
27
|
+
* - `2`: Target view is hidden.
|
|
28
|
+
*
|
|
29
|
+
* WORKAROUND: As of this writing, codegen doesn't support enums, so we need
|
|
30
|
+
* to convert `number` into an enum in `VirtualView`.
|
|
31
|
+
*/
|
|
32
|
+
mode: Int32,
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Rect of the target view, relative to the nearest ancestor scroll container.
|
|
36
|
+
*/
|
|
37
|
+
targetRect: $ReadOnly<{
|
|
38
|
+
x: Double,
|
|
39
|
+
y: Double,
|
|
40
|
+
width: Double,
|
|
41
|
+
height: Double,
|
|
42
|
+
}>,
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Rect of the threshold that determines the mode of the target view, relative
|
|
46
|
+
* to the nearest ancestor scroll container.
|
|
47
|
+
*
|
|
48
|
+
* - `Visible`: Rect in which the target view is visible.
|
|
49
|
+
* - `Prerender`: Rect in which the target view is prerendered.
|
|
50
|
+
* - `Hidden`: Unused, without any guarantees.
|
|
51
|
+
*
|
|
52
|
+
* This can be used to determine whether and how much new content to render.
|
|
53
|
+
*/
|
|
54
|
+
thresholdRect: $ReadOnly<{
|
|
55
|
+
x: Double,
|
|
56
|
+
y: Double,
|
|
57
|
+
width: Double,
|
|
58
|
+
height: Double,
|
|
59
|
+
}>,
|
|
60
|
+
}>;
|
|
61
|
+
|
|
62
|
+
type VirtualViewNativeProps = $ReadOnly<{
|
|
63
|
+
...ViewProps,
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Whether the initial mode should be `Hidden`.
|
|
67
|
+
*/
|
|
68
|
+
initialHidden?: boolean,
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Render state of children.
|
|
72
|
+
*
|
|
73
|
+
* - `0`: Reserved to represent unknown future values.
|
|
74
|
+
* - `1`: Children are rendered.
|
|
75
|
+
* - `2`: Children are not rendered.
|
|
76
|
+
*
|
|
77
|
+
* WORKAROUND: As of this writing, codegen doesn't support enums, so we need
|
|
78
|
+
* to convert `number` into an enum in `VirtualView`.
|
|
79
|
+
*/
|
|
80
|
+
renderState: Int32,
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* See `NativeModeChangeEvent`.
|
|
84
|
+
*/
|
|
85
|
+
onModeChange?: ?DirectEventHandler<NativeModeChangeEvent>,
|
|
86
|
+
}>;
|
|
87
|
+
|
|
88
|
+
export default codegenNativeComponent<VirtualViewNativeProps>('VirtualView', {
|
|
89
|
+
interfaceOnly: true,
|
|
90
|
+
}) as HostComponent<VirtualViewNativeProps>;
|
|
@@ -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<<b75fccb46a36b07c692d890f0659f9a3>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
* @noformat
|
|
10
10
|
*/
|
|
@@ -33,9 +33,9 @@ export type ReactNativeFeatureFlagsJsOnly = $ReadOnly<{
|
|
|
33
33
|
animatedShouldDebounceQueueFlush: Getter<boolean>,
|
|
34
34
|
animatedShouldUseSingleOp: Getter<boolean>,
|
|
35
35
|
avoidStateUpdateInAnimatedPropsMemo: Getter<boolean>,
|
|
36
|
+
deferFlatListFocusChangeRenderUpdate: Getter<boolean>,
|
|
36
37
|
disableInteractionManager: Getter<boolean>,
|
|
37
38
|
enableAccessToHostTreeInFabric: Getter<boolean>,
|
|
38
|
-
enableVirtualViewDebugFeatures: Getter<boolean>,
|
|
39
39
|
fixVirtualizeListCollapseWindowSize: Getter<boolean>,
|
|
40
40
|
isLayoutAnimationEnabled: Getter<boolean>,
|
|
41
41
|
reduceDefaultPropsInView: Getter<boolean>,
|
|
@@ -53,13 +53,14 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
53
53
|
commonTestFlag: Getter<boolean>,
|
|
54
54
|
commonTestFlagWithoutNativeImplementation: Getter<boolean>,
|
|
55
55
|
animatedShouldSignalBatch: Getter<boolean>,
|
|
56
|
-
avoidCeilingAvailableAndroidTextWidth: Getter<boolean>,
|
|
57
56
|
cxxNativeAnimatedEnabled: Getter<boolean>,
|
|
57
|
+
cxxNativeAnimatedRemoveJsSync: Getter<boolean>,
|
|
58
58
|
disableMainQueueSyncDispatchIOS: Getter<boolean>,
|
|
59
59
|
disableMountItemReorderingAndroid: Getter<boolean>,
|
|
60
60
|
disableTextLayoutManagerCacheAndroid: Getter<boolean>,
|
|
61
61
|
enableAccessibilityOrder: Getter<boolean>,
|
|
62
62
|
enableAccumulatedUpdatesInRawPropsAndroid: Getter<boolean>,
|
|
63
|
+
enableAndroidTextMeasurementOptimizations: Getter<boolean>,
|
|
63
64
|
enableBridgelessArchitecture: Getter<boolean>,
|
|
64
65
|
enableCppPropsIteratorSetter: Getter<boolean>,
|
|
65
66
|
enableCustomFocusSearchOnClippedElementsAndroid: Getter<boolean>,
|
|
@@ -72,7 +73,7 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
72
73
|
enableFontScaleChangesUpdatingLayout: Getter<boolean>,
|
|
73
74
|
enableIOSTextBaselineOffsetPerLine: Getter<boolean>,
|
|
74
75
|
enableIOSViewClipToPaddingBox: Getter<boolean>,
|
|
75
|
-
|
|
76
|
+
enableInteropViewManagerClassLookUpOptimizationIOS: Getter<boolean>,
|
|
76
77
|
enableLayoutAnimationsOnAndroid: Getter<boolean>,
|
|
77
78
|
enableLayoutAnimationsOnIOS: Getter<boolean>,
|
|
78
79
|
enableMainQueueCoordinatorOnIOS: Getter<boolean>,
|
|
@@ -89,14 +90,17 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
89
90
|
enableViewRecycling: Getter<boolean>,
|
|
90
91
|
enableViewRecyclingForText: Getter<boolean>,
|
|
91
92
|
enableViewRecyclingForView: Getter<boolean>,
|
|
93
|
+
enableVirtualViewDebugFeatures: Getter<boolean>,
|
|
94
|
+
enableVirtualViewRenderState: Getter<boolean>,
|
|
95
|
+
enableVirtualViewWindowFocusDetection: Getter<boolean>,
|
|
92
96
|
fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean>,
|
|
93
97
|
fuseboxEnabledRelease: Getter<boolean>,
|
|
94
98
|
fuseboxNetworkInspectionEnabled: Getter<boolean>,
|
|
95
|
-
|
|
99
|
+
hideOffscreenVirtualViewsOnIOS: Getter<boolean>,
|
|
100
|
+
preparedTextCacheSize: Getter<number>,
|
|
96
101
|
traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean>,
|
|
97
102
|
updateRuntimeShadowNodeReferencesOnCommit: Getter<boolean>,
|
|
98
103
|
useAlwaysAvailableJSErrorHandling: Getter<boolean>,
|
|
99
|
-
useAndroidTextLayoutWidthDirectly: Getter<boolean>,
|
|
100
104
|
useFabricInterop: Getter<boolean>,
|
|
101
105
|
useNativeViewConfigsInBridgelessMode: Getter<boolean>,
|
|
102
106
|
useOptimizedEventBatchingOnAndroid: Getter<boolean>,
|
|
@@ -132,6 +136,11 @@ export const animatedShouldUseSingleOp: Getter<boolean> = createJavaScriptFlagGe
|
|
|
132
136
|
*/
|
|
133
137
|
export const avoidStateUpdateInAnimatedPropsMemo: Getter<boolean> = createJavaScriptFlagGetter('avoidStateUpdateInAnimatedPropsMemo', true);
|
|
134
138
|
|
|
139
|
+
/**
|
|
140
|
+
* Use the deferred cell render update mechanism for focus change in FlatList.
|
|
141
|
+
*/
|
|
142
|
+
export const deferFlatListFocusChangeRenderUpdate: Getter<boolean> = createJavaScriptFlagGetter('deferFlatListFocusChangeRenderUpdate', false);
|
|
143
|
+
|
|
135
144
|
/**
|
|
136
145
|
* Disables InteractionManager and replaces its scheduler with `setImmediate`.
|
|
137
146
|
*/
|
|
@@ -142,11 +151,6 @@ export const disableInteractionManager: Getter<boolean> = createJavaScriptFlagGe
|
|
|
142
151
|
*/
|
|
143
152
|
export const enableAccessToHostTreeInFabric: Getter<boolean> = createJavaScriptFlagGetter('enableAccessToHostTreeInFabric', false);
|
|
144
153
|
|
|
145
|
-
/**
|
|
146
|
-
* Enables VirtualView debug features such as logging and overlays.
|
|
147
|
-
*/
|
|
148
|
-
export const enableVirtualViewDebugFeatures: Getter<boolean> = createJavaScriptFlagGetter('enableVirtualViewDebugFeatures', false);
|
|
149
|
-
|
|
150
154
|
/**
|
|
151
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
|
|
152
156
|
*/
|
|
@@ -199,14 +203,14 @@ export const commonTestFlagWithoutNativeImplementation: Getter<boolean> = create
|
|
|
199
203
|
* Enables start- and finishOperationBatch on any platform.
|
|
200
204
|
*/
|
|
201
205
|
export const animatedShouldSignalBatch: Getter<boolean> = createNativeFlagGetter('animatedShouldSignalBatch', false);
|
|
202
|
-
/**
|
|
203
|
-
* Do not incorrectly ceil the available width of an Android text layout
|
|
204
|
-
*/
|
|
205
|
-
export const avoidCeilingAvailableAndroidTextWidth: Getter<boolean> = createNativeFlagGetter('avoidCeilingAvailableAndroidTextWidth', true);
|
|
206
206
|
/**
|
|
207
207
|
* Use a C++ implementation of Native Animated instead of the platform implementation.
|
|
208
208
|
*/
|
|
209
209
|
export const cxxNativeAnimatedEnabled: Getter<boolean> = createNativeFlagGetter('cxxNativeAnimatedEnabled', false);
|
|
210
|
+
/**
|
|
211
|
+
* Removes JS sync at end of native animation
|
|
212
|
+
*/
|
|
213
|
+
export const cxxNativeAnimatedRemoveJsSync: Getter<boolean> = createNativeFlagGetter('cxxNativeAnimatedRemoveJsSync', false);
|
|
210
214
|
/**
|
|
211
215
|
* Disable sync dispatch on the main queue on iOS
|
|
212
216
|
*/
|
|
@@ -227,6 +231,10 @@ export const enableAccessibilityOrder: Getter<boolean> = createNativeFlagGetter(
|
|
|
227
231
|
* When enabled, Android will accumulate updates in rawProps to reduce the number of mounting instructions for cascading re-renders.
|
|
228
232
|
*/
|
|
229
233
|
export const enableAccumulatedUpdatesInRawPropsAndroid: Getter<boolean> = createNativeFlagGetter('enableAccumulatedUpdatesInRawPropsAndroid', false);
|
|
234
|
+
/**
|
|
235
|
+
* Enables various optimizations throughout the path of measuring text on Android.
|
|
236
|
+
*/
|
|
237
|
+
export const enableAndroidTextMeasurementOptimizations: Getter<boolean> = createNativeFlagGetter('enableAndroidTextMeasurementOptimizations', false);
|
|
230
238
|
/**
|
|
231
239
|
* Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flags: `useTurboModules` & `enableFabricRenderer`.
|
|
232
240
|
*/
|
|
@@ -276,9 +284,9 @@ export const enableIOSTextBaselineOffsetPerLine: Getter<boolean> = createNativeF
|
|
|
276
284
|
*/
|
|
277
285
|
export const enableIOSViewClipToPaddingBox: Getter<boolean> = createNativeFlagGetter('enableIOSViewClipToPaddingBox', false);
|
|
278
286
|
/**
|
|
279
|
-
*
|
|
287
|
+
* This is to fix the issue with interop view manager where component descriptor lookup is causing ViewManager to preload.
|
|
280
288
|
*/
|
|
281
|
-
export const
|
|
289
|
+
export const enableInteropViewManagerClassLookUpOptimizationIOS: Getter<boolean> = createNativeFlagGetter('enableInteropViewManagerClassLookUpOptimizationIOS', false);
|
|
282
290
|
/**
|
|
283
291
|
* When enabled, LayoutAnimations API will animate state changes on Android.
|
|
284
292
|
*/
|
|
@@ -343,6 +351,18 @@ export const enableViewRecyclingForText: Getter<boolean> = createNativeFlagGette
|
|
|
343
351
|
* Enables View Recycling for <View> via ReactViewGroup/ReactViewManager.
|
|
344
352
|
*/
|
|
345
353
|
export const enableViewRecyclingForView: Getter<boolean> = createNativeFlagGetter('enableViewRecyclingForView', true);
|
|
354
|
+
/**
|
|
355
|
+
* Enables VirtualView debug features such as logging and overlays.
|
|
356
|
+
*/
|
|
357
|
+
export const enableVirtualViewDebugFeatures: Getter<boolean> = createNativeFlagGetter('enableVirtualViewDebugFeatures', false);
|
|
358
|
+
/**
|
|
359
|
+
* Enables reading render state when dispatching VirtualView events.
|
|
360
|
+
*/
|
|
361
|
+
export const enableVirtualViewRenderState: Getter<boolean> = createNativeFlagGetter('enableVirtualViewRenderState', false);
|
|
362
|
+
/**
|
|
363
|
+
* Enables window focus detection for prioritizing VirtualView events.
|
|
364
|
+
*/
|
|
365
|
+
export const enableVirtualViewWindowFocusDetection: Getter<boolean> = createNativeFlagGetter('enableVirtualViewWindowFocusDetection', false);
|
|
346
366
|
/**
|
|
347
367
|
* Uses the default event priority instead of the discreet event priority by default when dispatching events from Fabric to React.
|
|
348
368
|
*/
|
|
@@ -356,9 +376,13 @@ export const fuseboxEnabledRelease: Getter<boolean> = createNativeFlagGetter('fu
|
|
|
356
376
|
*/
|
|
357
377
|
export const fuseboxNetworkInspectionEnabled: Getter<boolean> = createNativeFlagGetter('fuseboxNetworkInspectionEnabled', false);
|
|
358
378
|
/**
|
|
359
|
-
*
|
|
379
|
+
* Hides offscreen VirtualViews on iOS by setting hidden = YES to avoid extra cost of views
|
|
380
|
+
*/
|
|
381
|
+
export const hideOffscreenVirtualViewsOnIOS: Getter<boolean> = createNativeFlagGetter('hideOffscreenVirtualViewsOnIOS', false);
|
|
382
|
+
/**
|
|
383
|
+
* Number cached PreparedLayouts in TextLayoutManager cache
|
|
360
384
|
*/
|
|
361
|
-
export const
|
|
385
|
+
export const preparedTextCacheSize: Getter<number> = createNativeFlagGetter('preparedTextCacheSize', 200);
|
|
362
386
|
/**
|
|
363
387
|
* Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
|
|
364
388
|
*/
|
|
@@ -371,10 +395,6 @@ export const updateRuntimeShadowNodeReferencesOnCommit: Getter<boolean> = create
|
|
|
371
395
|
* In Bridgeless mode, use the always available javascript error reporting pipeline.
|
|
372
396
|
*/
|
|
373
397
|
export const useAlwaysAvailableJSErrorHandling: Getter<boolean> = createNativeFlagGetter('useAlwaysAvailableJSErrorHandling', false);
|
|
374
|
-
/**
|
|
375
|
-
* Trust the width of a text layout we create, instead of re-deriving it from its contents
|
|
376
|
-
*/
|
|
377
|
-
export const useAndroidTextLayoutWidthDirectly: Getter<boolean> = createNativeFlagGetter('useAndroidTextLayoutWidthDirectly', true);
|
|
378
398
|
/**
|
|
379
399
|
* Should this application enable the Fabric Interop Layer for Android? If yes, the application will behave so that it can accept non-Fabric components and render them on Fabric. This toggle is controlling extra logic such as custom event dispatching that are needed for the Fabric Interop Layer to work correctly.
|
|
380
400
|
*/
|
|
@@ -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<<55c1f0223345b5680bbdd888a358f210>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
* @noformat
|
|
10
10
|
*/
|
|
@@ -27,13 +27,14 @@ export interface Spec extends TurboModule {
|
|
|
27
27
|
+commonTestFlag?: () => boolean;
|
|
28
28
|
+commonTestFlagWithoutNativeImplementation?: () => boolean;
|
|
29
29
|
+animatedShouldSignalBatch?: () => boolean;
|
|
30
|
-
+avoidCeilingAvailableAndroidTextWidth?: () => boolean;
|
|
31
30
|
+cxxNativeAnimatedEnabled?: () => boolean;
|
|
31
|
+
+cxxNativeAnimatedRemoveJsSync?: () => boolean;
|
|
32
32
|
+disableMainQueueSyncDispatchIOS?: () => boolean;
|
|
33
33
|
+disableMountItemReorderingAndroid?: () => boolean;
|
|
34
34
|
+disableTextLayoutManagerCacheAndroid?: () => boolean;
|
|
35
35
|
+enableAccessibilityOrder?: () => boolean;
|
|
36
36
|
+enableAccumulatedUpdatesInRawPropsAndroid?: () => boolean;
|
|
37
|
+
+enableAndroidTextMeasurementOptimizations?: () => boolean;
|
|
37
38
|
+enableBridgelessArchitecture?: () => boolean;
|
|
38
39
|
+enableCppPropsIteratorSetter?: () => boolean;
|
|
39
40
|
+enableCustomFocusSearchOnClippedElementsAndroid?: () => boolean;
|
|
@@ -46,7 +47,7 @@ export interface Spec extends TurboModule {
|
|
|
46
47
|
+enableFontScaleChangesUpdatingLayout?: () => boolean;
|
|
47
48
|
+enableIOSTextBaselineOffsetPerLine?: () => boolean;
|
|
48
49
|
+enableIOSViewClipToPaddingBox?: () => boolean;
|
|
49
|
-
+
|
|
50
|
+
+enableInteropViewManagerClassLookUpOptimizationIOS?: () => boolean;
|
|
50
51
|
+enableLayoutAnimationsOnAndroid?: () => boolean;
|
|
51
52
|
+enableLayoutAnimationsOnIOS?: () => boolean;
|
|
52
53
|
+enableMainQueueCoordinatorOnIOS?: () => boolean;
|
|
@@ -63,14 +64,17 @@ export interface Spec extends TurboModule {
|
|
|
63
64
|
+enableViewRecycling?: () => boolean;
|
|
64
65
|
+enableViewRecyclingForText?: () => boolean;
|
|
65
66
|
+enableViewRecyclingForView?: () => boolean;
|
|
67
|
+
+enableVirtualViewDebugFeatures?: () => boolean;
|
|
68
|
+
+enableVirtualViewRenderState?: () => boolean;
|
|
69
|
+
+enableVirtualViewWindowFocusDetection?: () => boolean;
|
|
66
70
|
+fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean;
|
|
67
71
|
+fuseboxEnabledRelease?: () => boolean;
|
|
68
72
|
+fuseboxNetworkInspectionEnabled?: () => boolean;
|
|
69
|
-
+
|
|
73
|
+
+hideOffscreenVirtualViewsOnIOS?: () => boolean;
|
|
74
|
+
+preparedTextCacheSize?: () => number;
|
|
70
75
|
+traceTurboModulePromiseRejectionsOnAndroid?: () => boolean;
|
|
71
76
|
+updateRuntimeShadowNodeReferencesOnCommit?: () => boolean;
|
|
72
77
|
+useAlwaysAvailableJSErrorHandling?: () => boolean;
|
|
73
|
-
+useAndroidTextLayoutWidthDirectly?: () => boolean;
|
|
74
78
|
+useFabricInterop?: () => boolean;
|
|
75
79
|
+useNativeViewConfigsInBridgelessMode?: () => boolean;
|
|
76
80
|
+useOptimizedEventBatchingOnAndroid?: () => boolean;
|
|
@@ -52,6 +52,13 @@ export default function setUpPerformanceObserver() {
|
|
|
52
52
|
() => require('../webapis/performance/EventTiming').PerformanceEventTiming,
|
|
53
53
|
);
|
|
54
54
|
|
|
55
|
+
polyfillGlobal(
|
|
56
|
+
'PerformanceResourceTiming',
|
|
57
|
+
() =>
|
|
58
|
+
require('../webapis/performance/ResourceTiming')
|
|
59
|
+
.PerformanceResourceTiming,
|
|
60
|
+
);
|
|
61
|
+
|
|
55
62
|
polyfillGlobal(
|
|
56
63
|
'TaskAttributionTiming',
|
|
57
64
|
() => require('../webapis/performance/LongTasks').TaskAttributionTiming,
|
|
@@ -15,7 +15,7 @@ import type {HostComponent} from '../../types/HostComponent';
|
|
|
15
15
|
|
|
16
16
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
17
17
|
|
|
18
|
-
type
|
|
18
|
+
type RCTActivityIndicatorViewNativeProps = $ReadOnly<{
|
|
19
19
|
...ViewProps,
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -48,6 +48,9 @@ type NativeProps = $ReadOnly<{
|
|
|
48
48
|
size?: WithDefault<'small' | 'large', 'small'>,
|
|
49
49
|
}>;
|
|
50
50
|
|
|
51
|
-
export default (codegenNativeComponent<
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
export default (codegenNativeComponent<RCTActivityIndicatorViewNativeProps>(
|
|
52
|
+
'ActivityIndicatorView',
|
|
53
|
+
{
|
|
54
|
+
paperComponentName: 'RCTActivityIndicatorView',
|
|
55
|
+
},
|
|
56
|
+
): HostComponent<RCTActivityIndicatorViewNativeProps>);
|
|
@@ -30,7 +30,7 @@ type DrawerSlideEvent = $ReadOnly<{
|
|
|
30
30
|
offset: Float,
|
|
31
31
|
}>;
|
|
32
32
|
|
|
33
|
-
type
|
|
33
|
+
type AndroidDrawerLayoutNativeProps = $ReadOnly<{
|
|
34
34
|
...ViewProps,
|
|
35
35
|
/**
|
|
36
36
|
* Determines whether the keyboard gets dismissed in response to a drag.
|
|
@@ -108,7 +108,7 @@ type NativeProps = $ReadOnly<{
|
|
|
108
108
|
statusBarBackgroundColor?: ?ColorValue,
|
|
109
109
|
}>;
|
|
110
110
|
|
|
111
|
-
type NativeType = HostComponent<
|
|
111
|
+
type NativeType = HostComponent<AndroidDrawerLayoutNativeProps>;
|
|
112
112
|
|
|
113
113
|
interface NativeCommands {
|
|
114
114
|
+openDrawer: (viewRef: React.ElementRef<NativeType>) => void;
|
|
@@ -119,6 +119,6 @@ export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
|
|
|
119
119
|
supportedCommands: ['openDrawer', 'closeDrawer'],
|
|
120
120
|
});
|
|
121
121
|
|
|
122
|
-
export default (codegenNativeComponent<
|
|
122
|
+
export default (codegenNativeComponent<AndroidDrawerLayoutNativeProps>(
|
|
123
123
|
'AndroidDrawerLayout',
|
|
124
124
|
): NativeType);
|
package/src/private/specs_DEPRECATED/components/AndroidHorizontalScrollContentViewNativeComponent.js
CHANGED
|
@@ -13,15 +13,15 @@ import type {HostComponent} from '../../types/HostComponent';
|
|
|
13
13
|
|
|
14
14
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
15
15
|
|
|
16
|
-
type
|
|
16
|
+
type AndroidHorizontalScrollContentViewNativeProps = $ReadOnly<{
|
|
17
17
|
...ViewProps,
|
|
18
18
|
|
|
19
19
|
removeClippedSubviews?: ?boolean,
|
|
20
20
|
}>;
|
|
21
21
|
|
|
22
|
-
type NativeType = HostComponent<
|
|
22
|
+
type NativeType = HostComponent<AndroidHorizontalScrollContentViewNativeProps>;
|
|
23
23
|
|
|
24
|
-
export default (codegenNativeComponent<
|
|
24
|
+
export default (codegenNativeComponent<AndroidHorizontalScrollContentViewNativeProps>(
|
|
25
25
|
'AndroidHorizontalScrollContentView',
|
|
26
26
|
{interfaceOnly: true},
|
|
27
27
|
): NativeType);
|
|
@@ -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
|
|
24
|
+
type AndroidSwipeRefreshLayoutNativeProps = $ReadOnly<{
|
|
25
25
|
...ViewProps,
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -56,7 +56,7 @@ type NativeProps = $ReadOnly<{
|
|
|
56
56
|
refreshing: boolean,
|
|
57
57
|
}>;
|
|
58
58
|
|
|
59
|
-
type NativeType = HostComponent<
|
|
59
|
+
type NativeType = HostComponent<AndroidSwipeRefreshLayoutNativeProps>;
|
|
60
60
|
|
|
61
61
|
interface NativeCommands {
|
|
62
62
|
+setNativeRefreshing: (
|
|
@@ -69,6 +69,6 @@ export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
|
|
|
69
69
|
supportedCommands: ['setNativeRefreshing'],
|
|
70
70
|
});
|
|
71
71
|
|
|
72
|
-
export default (codegenNativeComponent<
|
|
72
|
+
export default (codegenNativeComponent<AndroidSwipeRefreshLayoutNativeProps>(
|
|
73
73
|
'AndroidSwipeRefreshLayout',
|
|
74
74
|
): NativeType);
|
|
@@ -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
|
|
24
|
+
type AndroidSwitchChangeEvent = $ReadOnly<{
|
|
25
25
|
value: boolean,
|
|
26
26
|
target: Int32,
|
|
27
27
|
}>;
|
|
28
28
|
|
|
29
|
-
type
|
|
29
|
+
type AndroidSwitchNativeProps = $ReadOnly<{
|
|
30
30
|
...ViewProps,
|
|
31
31
|
|
|
32
32
|
// Props
|
|
@@ -41,10 +41,10 @@ type NativeProps = $ReadOnly<{
|
|
|
41
41
|
trackTintColor?: ?ColorValue,
|
|
42
42
|
|
|
43
43
|
// Events
|
|
44
|
-
onChange?: BubblingEventHandler<
|
|
44
|
+
onChange?: BubblingEventHandler<AndroidSwitchChangeEvent>,
|
|
45
45
|
}>;
|
|
46
46
|
|
|
47
|
-
type NativeType = HostComponent<
|
|
47
|
+
type NativeType = HostComponent<AndroidSwitchNativeProps>;
|
|
48
48
|
|
|
49
49
|
interface NativeCommands {
|
|
50
50
|
+setNativeValue: (
|
|
@@ -57,6 +57,9 @@ export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
|
|
|
57
57
|
supportedCommands: ['setNativeValue'],
|
|
58
58
|
});
|
|
59
59
|
|
|
60
|
-
export default (codegenNativeComponent<
|
|
61
|
-
|
|
62
|
-
|
|
60
|
+
export default (codegenNativeComponent<AndroidSwitchNativeProps>(
|
|
61
|
+
'AndroidSwitch',
|
|
62
|
+
{
|
|
63
|
+
interfaceOnly: true,
|
|
64
|
+
},
|
|
65
|
+
): NativeType);
|
|
@@ -16,10 +16,11 @@ 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
|
|
19
|
+
type DebuggingOverlayNativeProps = $ReadOnly<{
|
|
20
20
|
...ViewProps,
|
|
21
21
|
}>;
|
|
22
|
-
export type DebuggingOverlayNativeComponentType =
|
|
22
|
+
export type DebuggingOverlayNativeComponentType =
|
|
23
|
+
HostComponent<DebuggingOverlayNativeProps>;
|
|
23
24
|
|
|
24
25
|
export type TraceUpdate = {
|
|
25
26
|
id: number,
|
|
@@ -56,6 +57,6 @@ export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
|
|
|
56
57
|
],
|
|
57
58
|
});
|
|
58
59
|
|
|
59
|
-
export default (codegenNativeComponent<
|
|
60
|
+
export default (codegenNativeComponent<DebuggingOverlayNativeProps>(
|
|
60
61
|
'DebuggingOverlay',
|
|
61
|
-
): HostComponent<
|
|
62
|
+
): HostComponent<DebuggingOverlayNativeProps>);
|
|
@@ -18,7 +18,7 @@ import type {HostComponent} from '../../types/HostComponent';
|
|
|
18
18
|
|
|
19
19
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
20
20
|
|
|
21
|
-
type
|
|
21
|
+
type AndroidProgressBarNativeProps = $ReadOnly<{
|
|
22
22
|
...ViewProps,
|
|
23
23
|
|
|
24
24
|
//Props
|
|
@@ -31,6 +31,9 @@ type NativeProps = $ReadOnly<{
|
|
|
31
31
|
testID?: WithDefault<string, ''>,
|
|
32
32
|
}>;
|
|
33
33
|
|
|
34
|
-
export default (codegenNativeComponent<
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
export default (codegenNativeComponent<AndroidProgressBarNativeProps>(
|
|
35
|
+
'AndroidProgressBar',
|
|
36
|
+
{
|
|
37
|
+
interfaceOnly: true,
|
|
38
|
+
},
|
|
39
|
+
): HostComponent<AndroidProgressBarNativeProps>);
|