react-native-tvos 0.81.3-0 → 0.81.4-1
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/Libraries/Components/Button.js +0 -1
- package/Libraries/Components/Pressable/Pressable.d.ts +1 -1
- package/Libraries/Components/Pressable/Pressable.js +14 -12
- package/Libraries/Components/TV/TVParallaxProperties.d.ts +42 -0
- package/Libraries/Components/TV/TVViewPropTypes.js +45 -8
- package/Libraries/Components/Touchable/TouchableHighlight.js +5 -32
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +5 -50
- package/Libraries/Components/Touchable/TouchableOpacity.d.ts +0 -1
- package/Libraries/Components/Touchable/TouchableOpacity.js +5 -56
- package/Libraries/Components/View/View.js +21 -1
- package/Libraries/Components/View/ViewPropTypes.d.ts +59 -41
- package/Libraries/Components/View/ViewPropTypes.js +5 -86
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/React/Base/RCTVersion.m +2 -2
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.kt +0 -25
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.kt +9 -10
- package/ReactCommon/cxxreact/ReactNativeVersion.h +3 -3
- package/package.json +8 -8
- package/scripts/cocoapods/autolinking.rb +6 -0
- package/scripts/cocoapods/codegen_utils.rb +1 -1
- package/scripts/codegen/generate-artifacts-executor/index.js +5 -6
- package/scripts/codegen/generate-artifacts-executor/utils.js +41 -10
- package/sdks/hermesc/osx-bin/hermes +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/types/public/ReactNativeTVTypes.d.ts +1 -43
- package/types_generated/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +0 -101
- package/types_generated/Libraries/Alert/Alert.d.ts +0 -55
- package/types_generated/Libraries/Animated/Animated.d.ts +0 -14
- package/types_generated/Libraries/Animated/AnimatedEvent.d.ts +0 -30
- package/types_generated/Libraries/Animated/AnimatedExports.d.ts +0 -190
- package/types_generated/Libraries/Animated/AnimatedImplementation.d.ts +0 -128
- package/types_generated/Libraries/Animated/AnimatedPlatformConfig.d.ts +0 -13
- package/types_generated/Libraries/Animated/Easing.d.ts +0 -171
- package/types_generated/Libraries/Animated/animations/Animation.d.ts +0 -35
- package/types_generated/Libraries/Animated/animations/DecayAnimation.d.ts +0 -42
- package/types_generated/Libraries/Animated/animations/SpringAnimation.d.ts +0 -130
- package/types_generated/Libraries/Animated/animations/TimingAnimation.d.ts +0 -54
- package/types_generated/Libraries/Animated/components/AnimatedFlatList.d.ts +0 -22
- package/types_generated/Libraries/Animated/components/AnimatedImage.d.ts +0 -18
- package/types_generated/Libraries/Animated/components/AnimatedScrollView.d.ts +0 -23
- package/types_generated/Libraries/Animated/components/AnimatedSectionList.d.ts +0 -22
- package/types_generated/Libraries/Animated/components/AnimatedText.d.ts +0 -18
- package/types_generated/Libraries/Animated/components/AnimatedView.d.ts +0 -19
- package/types_generated/Libraries/Animated/createAnimatedComponent.d.ts +0 -42
- package/types_generated/Libraries/Animated/nodes/AnimatedAddition.d.ts +0 -22
- package/types_generated/Libraries/Animated/nodes/AnimatedColor.d.ts +0 -76
- package/types_generated/Libraries/Animated/nodes/AnimatedDiffClamp.d.ts +0 -22
- package/types_generated/Libraries/Animated/nodes/AnimatedDivision.d.ts +0 -22
- package/types_generated/Libraries/Animated/nodes/AnimatedInterpolation.d.ts +0 -36
- package/types_generated/Libraries/Animated/nodes/AnimatedModulo.d.ts +0 -22
- package/types_generated/Libraries/Animated/nodes/AnimatedMultiplication.d.ts +0 -22
- package/types_generated/Libraries/Animated/nodes/AnimatedNode.d.ts +0 -46
- package/types_generated/Libraries/Animated/nodes/AnimatedProps.d.ts +0 -29
- package/types_generated/Libraries/Animated/nodes/AnimatedStyle.d.ts +0 -32
- package/types_generated/Libraries/Animated/nodes/AnimatedSubtraction.d.ts +0 -22
- package/types_generated/Libraries/Animated/nodes/AnimatedTracking.d.ts +0 -21
- package/types_generated/Libraries/Animated/nodes/AnimatedValue.d.ts +0 -126
- package/types_generated/Libraries/Animated/nodes/AnimatedValueXY.d.ts +0 -135
- package/types_generated/Libraries/Animated/nodes/AnimatedWithChildren.d.ts +0 -15
- package/types_generated/Libraries/Animated/useAnimatedValue.d.ts +0 -15
- package/types_generated/Libraries/AppState/AppState.d.ts +0 -63
- package/types_generated/Libraries/BatchedBridge/BatchedBridge.d.ts +0 -17
- package/types_generated/Libraries/BatchedBridge/MessageQueue.d.ts +0 -39
- package/types_generated/Libraries/BatchedBridge/NativeModules.d.ts +0 -20
- package/types_generated/Libraries/Blob/Blob.d.ts +0 -80
- package/types_generated/Libraries/Blob/BlobTypes.d.ts +0 -27
- package/types_generated/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +0 -220
- package/types_generated/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.d.ts +0 -20
- package/types_generated/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +0 -84
- package/types_generated/Libraries/Components/Button.d.ts +0 -251
- package/types_generated/Libraries/Components/Clipboard/Clipboard.d.ts +0 -38
- package/types_generated/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +0 -17
- package/types_generated/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidFallback.d.ts +0 -27
- package/types_generated/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.d.ts +0 -176
- package/types_generated/Libraries/Components/Keyboard/Keyboard.d.ts +0 -146
- package/types_generated/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts +0 -73
- package/types_generated/Libraries/Components/LayoutConformance/LayoutConformance.d.ts +0 -24
- package/types_generated/Libraries/Components/Pressable/Pressable.d.ts +0 -141
- package/types_generated/Libraries/Components/Pressable/useAndroidRippleForView.d.ts +0 -45
- package/types_generated/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts +0 -32
- package/types_generated/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.d.ts +0 -14
- package/types_generated/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.d.ts +0 -50
- package/types_generated/Libraries/Components/RefreshControl/RefreshControl.d.ts +0 -113
- package/types_generated/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +0 -33
- package/types_generated/Libraries/Components/ScrollView/ScrollView.d.ts +0 -560
- package/types_generated/Libraries/Components/ScrollView/ScrollViewContext.d.ts +0 -24
- package/types_generated/Libraries/Components/ScrollView/ScrollViewNativeComponent.d.ts +0 -21
- package/types_generated/Libraries/Components/ScrollView/ScrollViewNativeComponentType.d.ts +0 -134
- package/types_generated/Libraries/Components/ScrollView/ScrollViewStickyHeader.d.ts +0 -36
- package/types_generated/Libraries/Components/StatusBar/StatusBar.d.ts +0 -222
- package/types_generated/Libraries/Components/Switch/AndroidSwitchNativeComponent.d.ts +0 -14
- package/types_generated/Libraries/Components/Switch/Switch.d.ts +0 -138
- package/types_generated/Libraries/Components/Switch/SwitchNativeComponent.d.ts +0 -14
- package/types_generated/Libraries/Components/TV/TVEventControl.d.ts +0 -23
- package/types_generated/Libraries/Components/TV/TVEventHandler.d.ts +0 -21
- package/types_generated/Libraries/Components/TV/TVFocusGuideView.d.ts +0 -71
- package/types_generated/Libraries/Components/TV/TVTextScrollView.d.ts +0 -97
- package/types_generated/Libraries/Components/TV/TVViewPropTypes.d.ts +0 -79
- package/types_generated/Libraries/Components/TV/tagForComponentOrHandle.d.ts +0 -24
- package/types_generated/Libraries/Components/TV/useTVEventHandler.d.ts +0 -20
- package/types_generated/Libraries/Components/TextInput/InputAccessoryView.d.ts +0 -86
- package/types_generated/Libraries/Components/TextInput/TextInput.d.ts +0 -47
- package/types_generated/Libraries/Components/TextInput/TextInput.flow.d.ts +0 -984
- package/types_generated/Libraries/Components/TextInput/TextInputState.d.ts +0 -54
- package/types_generated/Libraries/Components/ToastAndroid/ToastAndroid.d.ts +0 -99
- package/types_generated/Libraries/Components/Touchable/Touchable.d.ts +0 -257
- package/types_generated/Libraries/Components/Touchable/TouchableHighlight.d.ts +0 -71
- package/types_generated/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts +0 -228
- package/types_generated/Libraries/Components/Touchable/TouchableOpacity.d.ts +0 -76
- package/types_generated/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +0 -121
- package/types_generated/Libraries/Components/View/View.d.ts +0 -30
- package/types_generated/Libraries/Components/View/ViewAccessibility.d.ts +0 -415
- package/types_generated/Libraries/Components/View/ViewNativeComponent.d.ts +0 -29
- package/types_generated/Libraries/Components/View/ViewPropTypes.d.ts +0 -431
- package/types_generated/Libraries/Core/Devtools/symbolicateStackTrace.d.ts +0 -27
- package/types_generated/Libraries/Core/ExceptionsManager.d.ts +0 -43
- package/types_generated/Libraries/Core/ExtendedError.d.ts +0 -26
- package/types_generated/Libraries/Core/NativeExceptionsManager.d.ts +0 -17
- package/types_generated/Libraries/Core/RawEventEmitter.d.ts +0 -26
- package/types_generated/Libraries/Core/ReactFiberErrorDialog.d.ts +0 -27
- package/types_generated/Libraries/Core/registerCallableModule.d.ts +0 -18
- package/types_generated/Libraries/EventEmitter/NativeEventEmitter.d.ts +0 -42
- package/types_generated/Libraries/EventEmitter/RCTDeviceEventEmitter.d.ts +0 -19
- package/types_generated/Libraries/EventEmitter/RCTEventEmitter.d.ts +0 -18
- package/types_generated/Libraries/EventEmitter/RCTNativeAppEventEmitter.d.ts +0 -21
- package/types_generated/Libraries/Image/AssetSourceResolver.d.ts +0 -71
- package/types_generated/Libraries/Image/Image.d.ts +0 -18
- package/types_generated/Libraries/Image/ImageBackground.d.ts +0 -44
- package/types_generated/Libraries/Image/ImageProps.d.ts +0 -512
- package/types_generated/Libraries/Image/ImageResizeMode.d.ts +0 -17
- package/types_generated/Libraries/Image/ImageSource.d.ts +0 -94
- package/types_generated/Libraries/Image/ImageTypes.flow.d.ts +0 -64
- package/types_generated/Libraries/Image/ImageViewNativeComponent.d.ts +0 -68
- package/types_generated/Libraries/Image/TextInlineImageNativeComponent.d.ts +0 -42
- package/types_generated/Libraries/Interaction/InteractionManager.d.ts +0 -100
- package/types_generated/Libraries/Interaction/PanResponder.d.ts +0 -231
- package/types_generated/Libraries/Interaction/TaskQueue.d.ts +0 -73
- package/types_generated/Libraries/LayoutAnimation/LayoutAnimation.d.ts +0 -76
- package/types_generated/Libraries/Linking/Linking.d.ts +0 -68
- package/types_generated/Libraries/Lists/FlatList.d.ts +0 -317
- package/types_generated/Libraries/Lists/SectionList.d.ts +0 -172
- package/types_generated/Libraries/Lists/VirtualizedList.d.ts +0 -19
- package/types_generated/Libraries/Lists/VirtualizedSectionList.d.ts +0 -19
- package/types_generated/Libraries/LogBox/Data/LogBoxData.d.ts +0 -78
- package/types_generated/Libraries/LogBox/Data/LogBoxLog.d.ts +0 -88
- package/types_generated/Libraries/LogBox/Data/LogBoxSymbolication.d.ts +0 -17
- package/types_generated/Libraries/LogBox/Data/parseLogBoxLog.d.ts +0 -53
- package/types_generated/Libraries/LogBox/LogBox.d.ts +0 -29
- package/types_generated/Libraries/Modal/Modal.d.ts +0 -110
- package/types_generated/Libraries/NativeModules/specs/NativeDialogManagerAndroid.d.ts +0 -17
- package/types_generated/Libraries/Network/FormData.d.ts +0 -56
- package/types_generated/Libraries/Network/RCTNetworking.d.ts +0 -25
- package/types_generated/Libraries/Network/RCTNetworkingEventDefinitions.flow.d.ts +0 -22
- package/types_generated/Libraries/Network/XMLHttpRequest.d.ts +0 -96
- package/types_generated/Libraries/Network/convertRequestBody.d.ts +0 -21
- package/types_generated/Libraries/Performance/Systrace.d.ts +0 -61
- package/types_generated/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +0 -129
- package/types_generated/Libraries/Pressability/Pressability.d.ts +0 -241
- package/types_generated/Libraries/PushNotificationIOS/PushNotificationIOS.d.ts +0 -323
- package/types_generated/Libraries/ReactNative/AppRegistry.d.ts +0 -14
- package/types_generated/Libraries/ReactNative/AppRegistry.flow.d.ts +0 -44
- package/types_generated/Libraries/ReactNative/AppRegistryImpl.d.ts +0 -73
- package/types_generated/Libraries/ReactNative/DisplayMode.d.ts +0 -24
- package/types_generated/Libraries/ReactNative/I18nManager.d.ts +0 -23
- package/types_generated/Libraries/ReactNative/NativeI18nManager.d.ts +0 -17
- package/types_generated/Libraries/ReactNative/NativeUIManager.d.ts +0 -17
- package/types_generated/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.d.ts +0 -28
- package/types_generated/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.d.ts +0 -32
- package/types_generated/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.d.ts +0 -15
- package/types_generated/Libraries/ReactNative/RendererImplementation.d.ts +0 -37
- package/types_generated/Libraries/ReactNative/RendererProxy.d.ts +0 -28
- package/types_generated/Libraries/ReactNative/RootTag.d.ts +0 -22
- package/types_generated/Libraries/ReactNative/UIManager.d.ts +0 -17
- package/types_generated/Libraries/ReactNative/requireNativeComponent.d.ts +0 -25
- package/types_generated/Libraries/ReactPrivate/ReactNativePrivateInterface.d.ts +0 -33
- package/types_generated/Libraries/Renderer/shims/ReactNativeTypes.d.ts +0 -169
- package/types_generated/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.d.ts +0 -41
- package/types_generated/Libraries/Settings/Settings.d.ts +0 -21
- package/types_generated/Libraries/Share/Share.d.ts +0 -85
- package/types_generated/Libraries/StyleSheet/EdgeInsetsPropType.d.ts +0 -15
- package/types_generated/Libraries/StyleSheet/PlatformColorValueTypes.d.ts +0 -17
- package/types_generated/Libraries/StyleSheet/PlatformColorValueTypesIOS.d.ts +0 -27
- package/types_generated/Libraries/StyleSheet/PointPropType.d.ts +0 -16
- package/types_generated/Libraries/StyleSheet/Rect.d.ts +0 -22
- package/types_generated/Libraries/StyleSheet/StyleSheet.d.ts +0 -153
- package/types_generated/Libraries/StyleSheet/StyleSheetExports.d.ts +0 -107
- package/types_generated/Libraries/StyleSheet/StyleSheetTypes.d.ts +0 -826
- package/types_generated/Libraries/StyleSheet/flattenStyle.d.ts +0 -19
- package/types_generated/Libraries/StyleSheet/private/_StyleSheetTypesOverrides.d.ts +0 -17
- package/types_generated/Libraries/StyleSheet/private/_TransformStyle.d.ts +0 -76
- package/types_generated/Libraries/StyleSheet/processColor.d.ts +0 -18
- package/types_generated/Libraries/Text/Text.d.ts +0 -30
- package/types_generated/Libraries/Text/TextAncestorContext.d.ts +0 -20
- package/types_generated/Libraries/Text/TextNativeComponent.d.ts +0 -31
- package/types_generated/Libraries/Text/TextProps.d.ts +0 -220
- package/types_generated/Libraries/TurboModule/RCTExport.d.ts +0 -35
- package/types_generated/Libraries/TurboModule/TurboModuleRegistry.d.ts +0 -15
- package/types_generated/Libraries/Types/CodegenTypes.d.ts +0 -24
- package/types_generated/Libraries/Types/CodegenTypesNamespace.d.ts +0 -14
- package/types_generated/Libraries/Types/CoreEventTypes.d.ts +0 -327
- package/types_generated/Libraries/Types/RootTagTypes.d.ts +0 -13
- package/types_generated/Libraries/Types/UIManagerJSInterface.d.ts +0 -17
- package/types_generated/Libraries/UTFSequence.d.ts +0 -39
- package/types_generated/Libraries/Utilities/Appearance.d.ts +0 -31
- package/types_generated/Libraries/Utilities/BackHandler.d.ts +0 -23
- package/types_generated/Libraries/Utilities/DevSettings.d.ts +0 -34
- package/types_generated/Libraries/Utilities/DeviceInfo.d.ts +0 -17
- package/types_generated/Libraries/Utilities/Dimensions.d.ts +0 -54
- package/types_generated/Libraries/Utilities/IPerformanceLogger.d.ts +0 -51
- package/types_generated/Libraries/Utilities/NativeAppearance.d.ts +0 -17
- package/types_generated/Libraries/Utilities/NativeDeviceInfo.d.ts +0 -14
- package/types_generated/Libraries/Utilities/PixelRatio.d.ts +0 -110
- package/types_generated/Libraries/Utilities/Platform.d.ts +0 -16
- package/types_generated/Libraries/Utilities/PlatformTypes.d.ts +0 -134
- package/types_generated/Libraries/Utilities/codegenNativeCommands.d.ts +0 -19
- package/types_generated/Libraries/Utilities/codegenNativeComponent.d.ts +0 -24
- package/types_generated/Libraries/Utilities/createPerformanceLogger.d.ts +0 -23
- package/types_generated/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.d.ts +0 -33
- package/types_generated/Libraries/Utilities/differ/deepDiffer.d.ts +0 -19
- package/types_generated/Libraries/Utilities/useColorScheme.d.ts +0 -15
- package/types_generated/Libraries/Utilities/useWindowDimensions.d.ts +0 -15
- package/types_generated/Libraries/Vibration/Vibration.d.ts +0 -29
- package/types_generated/Libraries/vendor/core/ErrorUtils.d.ts +0 -39
- package/types_generated/Libraries/vendor/emitter/EventEmitter.d.ts +0 -67
- package/types_generated/index.d.ts +0 -164
- package/types_generated/src/private/components/virtualview/VirtualView.d.ts +0 -70
- package/types_generated/src/private/components/virtualview/VirtualViewNativeComponent.d.ts +0 -97
- package/types_generated/src/private/devsupport/devmenu/DevMenu.d.ts +0 -28
- package/types_generated/src/private/specs_DEPRECATED/components/AndroidSwitchNativeComponent.d.ts +0 -53
- package/types_generated/src/private/specs_DEPRECATED/components/ProgressBarAndroidNativeComponent.d.ts +0 -36
- package/types_generated/src/private/specs_DEPRECATED/components/SwitchNativeComponent.d.ts +0 -51
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeAppearance.d.ts +0 -26
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeDeviceInfo.d.ts +0 -46
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeDialogManagerAndroid.d.ts +0 -37
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeExceptionsManager.d.ts +0 -45
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeI18nManager.d.ts +0 -27
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeUIManager.d.ts +0 -109
- package/types_generated/src/private/styles/composeStyles.d.ts +0 -19
- package/types_generated/src/private/types/HostComponent.d.ts +0 -19
- package/types_generated/src/private/types/HostInstance.d.ts +0 -91
- package/types_generated/src/private/webapis/dom/events/CustomEvent.d.ts +0 -27
- package/types_generated/src/private/webapis/dom/events/Event.d.ts +0 -58
- package/types_generated/src/private/webapis/dom/events/EventTarget.d.ts +0 -48
- package/types_generated/src/private/webapis/dom/nodes/ReactNativeDocument.d.ts +0 -32
- package/types_generated/src/private/webapis/dom/nodes/ReactNativeElement.d.ts +0 -36
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyCharacterData.d.ts +0 -30
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyElement.d.ts +0 -54
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyNode.d.ts +0 -126
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyText.d.ts +0 -24
- package/types_generated/src/private/webapis/dom/nodes/internals/NodeInternals.d.ts +0 -29
- package/types_generated/src/private/webapis/dom/nodes/internals/ReactNativeDocumentElementInstanceHandle.d.ts +0 -23
- package/types_generated/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.d.ts +0 -22
- package/types_generated/src/private/webapis/dom/nodes/specs/NativeDOM.d.ts +0 -222
- package/types_generated/src/private/webapis/dom/oldstylecollections/HTMLCollection.d.ts +0 -22
- package/types_generated/src/private/webapis/dom/oldstylecollections/NodeList.d.ts +0 -25
- package/types_generated/src/private/webapis/geometry/DOMRect.d.ts +0 -46
- package/types_generated/src/private/webapis/geometry/DOMRectReadOnly.d.ts +0 -73
- package/types_generated/src/private/webapis/utils/ArrayLikeUtils.d.ts +0 -27
- package/types_generated/tsconfig.json +0 -3
- package/types_generated/tsconfig.test.json +0 -16
|
@@ -1,317 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @generated SignedSource<<ecbd6745575781c8a33e39cbd72a5484>>
|
|
8
|
-
*
|
|
9
|
-
* This file was translated from Flow by scripts/build-types/index.js.
|
|
10
|
-
* Original file: packages/react-native/Libraries/Lists/FlatList.js
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import type $$IMPORT_TYPEOF_1$$ from "../Components/ScrollView/ScrollViewNativeComponent";
|
|
14
|
-
type ScrollViewNativeComponent = typeof $$IMPORT_TYPEOF_1$$;
|
|
15
|
-
import type { ViewStyleProp } from "../StyleSheet/StyleSheet";
|
|
16
|
-
import type { ListRenderItem, VirtualizedListProps } from "@react-native-tvos/virtualized-lists";
|
|
17
|
-
import { type ScrollResponderType } from "../Components/ScrollView/ScrollView";
|
|
18
|
-
import View from "../Components/View/View";
|
|
19
|
-
import * as React from "react";
|
|
20
|
-
type RequiredFlatListProps<ItemT> = {
|
|
21
|
-
/**
|
|
22
|
-
* An array (or array-like list) of items to render. Other data types can be
|
|
23
|
-
* used by targeting VirtualizedList directly.
|
|
24
|
-
*/
|
|
25
|
-
data: Readonly<ArrayLike<ItemT>> | undefined;
|
|
26
|
-
};
|
|
27
|
-
type OptionalFlatListProps<ItemT> = {
|
|
28
|
-
/**
|
|
29
|
-
* Takes an item from `data` and renders it into the list. Example usage:
|
|
30
|
-
*
|
|
31
|
-
* <FlatList
|
|
32
|
-
* ItemSeparatorComponent={Platform.OS !== 'android' && ({highlighted}) => (
|
|
33
|
-
* <View style={[style.separator, highlighted && {marginLeft: 0}]} />
|
|
34
|
-
* )}
|
|
35
|
-
* data={[{title: 'Title Text', key: 'item1'}]}
|
|
36
|
-
* renderItem={({item, separators}) => (
|
|
37
|
-
* <TouchableHighlight
|
|
38
|
-
* onPress={() => this._onPress(item)}
|
|
39
|
-
* onShowUnderlay={separators.highlight}
|
|
40
|
-
* onHideUnderlay={separators.unhighlight}>
|
|
41
|
-
* <View style={{backgroundColor: 'white'}}>
|
|
42
|
-
* <Text>{item.title}</Text>
|
|
43
|
-
* </View>
|
|
44
|
-
* </TouchableHighlight>
|
|
45
|
-
* )}
|
|
46
|
-
* />
|
|
47
|
-
*
|
|
48
|
-
* Provides additional metadata like `index` if you need it, as well as a more generic
|
|
49
|
-
* `separators.updateProps` function which let's you set whatever props you want to change the
|
|
50
|
-
* rendering of either the leading separator or trailing separator in case the more common
|
|
51
|
-
* `highlight` and `unhighlight` (which set the `highlighted: boolean` prop) are insufficient for
|
|
52
|
-
* your use-case.
|
|
53
|
-
*/
|
|
54
|
-
renderItem?: ListRenderItem<ItemT> | undefined;
|
|
55
|
-
/**
|
|
56
|
-
* Optional custom style for multi-item rows generated when numColumns > 1.
|
|
57
|
-
*/
|
|
58
|
-
columnWrapperStyle?: ViewStyleProp;
|
|
59
|
-
/**
|
|
60
|
-
* A marker property for telling the list to re-render (since it implements `PureComponent`). If
|
|
61
|
-
* any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the
|
|
62
|
-
* `data` prop, stick it here and treat it immutably.
|
|
63
|
-
*/
|
|
64
|
-
extraData?: any;
|
|
65
|
-
/**
|
|
66
|
-
* `getItemLayout` is an optional optimizations that let us skip measurement of dynamic content if
|
|
67
|
-
* you know the height of items a priori. `getItemLayout` is the most efficient, and is easy to
|
|
68
|
-
* use if you have fixed height items, for example:
|
|
69
|
-
*
|
|
70
|
-
* getItemLayout={(data, index) => (
|
|
71
|
-
* {length: ITEM_HEIGHT, offset: ITEM_HEIGHT * index, index}
|
|
72
|
-
* )}
|
|
73
|
-
*
|
|
74
|
-
* Adding `getItemLayout` can be a great performance boost for lists of several hundred items.
|
|
75
|
-
* Remember to include separator length (height or width) in your offset calculation if you
|
|
76
|
-
* specify `ItemSeparatorComponent`.
|
|
77
|
-
*/
|
|
78
|
-
getItemLayout?: (data: Readonly<ArrayLike<ItemT>> | undefined, index: number) => {
|
|
79
|
-
length: number;
|
|
80
|
-
offset: number;
|
|
81
|
-
index: number;
|
|
82
|
-
};
|
|
83
|
-
/**
|
|
84
|
-
* If true, renders items next to each other horizontally instead of stacked vertically.
|
|
85
|
-
*/
|
|
86
|
-
horizontal?: boolean | undefined;
|
|
87
|
-
/**
|
|
88
|
-
* How many items to render in the initial batch. This should be enough to fill the screen but not
|
|
89
|
-
* much more. Note these items will never be unmounted as part of the windowed rendering in order
|
|
90
|
-
* to improve perceived performance of scroll-to-top actions.
|
|
91
|
-
*/
|
|
92
|
-
initialNumToRender?: number | undefined;
|
|
93
|
-
/**
|
|
94
|
-
* Instead of starting at the top with the first item, start at `initialScrollIndex`. This
|
|
95
|
-
* disables the "scroll to top" optimization that keeps the first `initialNumToRender` items
|
|
96
|
-
* always rendered and immediately renders the items starting at this initial index. Requires
|
|
97
|
-
* `getItemLayout` to be implemented.
|
|
98
|
-
*/
|
|
99
|
-
initialScrollIndex?: number | undefined;
|
|
100
|
-
/**
|
|
101
|
-
* Reverses the direction of scroll. Uses scale transforms of -1.
|
|
102
|
-
*/
|
|
103
|
-
inverted?: boolean | undefined;
|
|
104
|
-
/**
|
|
105
|
-
* Used to extract a unique key for a given item at the specified index. Key is used for caching
|
|
106
|
-
* and as the react key to track item re-ordering. The default extractor checks `item.key`, then
|
|
107
|
-
* falls back to using the index, like React does.
|
|
108
|
-
*/
|
|
109
|
-
keyExtractor?: ((item: ItemT, index: number) => string) | undefined;
|
|
110
|
-
/**
|
|
111
|
-
* Multiple columns can only be rendered with `horizontal={false}` and will zig-zag like a
|
|
112
|
-
* `flexWrap` layout. Items should all be the same height - masonry layouts are not supported.
|
|
113
|
-
*
|
|
114
|
-
* The default value is 1.
|
|
115
|
-
*/
|
|
116
|
-
numColumns?: number;
|
|
117
|
-
/**
|
|
118
|
-
* Note: may have bugs (missing content) in some circumstances - use at your own risk.
|
|
119
|
-
*
|
|
120
|
-
* This may improve scroll performance for large lists.
|
|
121
|
-
*
|
|
122
|
-
* The default value is true for Android.
|
|
123
|
-
*/
|
|
124
|
-
removeClippedSubviews?: boolean;
|
|
125
|
-
/**
|
|
126
|
-
* See `ScrollView` for flow type and further documentation.
|
|
127
|
-
*/
|
|
128
|
-
fadingEdgeLength?: (number | undefined) | {
|
|
129
|
-
start: number;
|
|
130
|
-
end: number;
|
|
131
|
-
};
|
|
132
|
-
/**
|
|
133
|
-
* Enable an optimization to memoize the item renderer to prevent unnecessary rerenders.
|
|
134
|
-
*/
|
|
135
|
-
strictMode?: boolean;
|
|
136
|
-
};
|
|
137
|
-
type FlatListBaseProps<ItemT> = Omit<RequiredFlatListProps<ItemT>, keyof OptionalFlatListProps<ItemT> | keyof {}> & Omit<OptionalFlatListProps<ItemT>, keyof {}> & {};
|
|
138
|
-
export type FlatListProps<ItemT> = Omit<Omit<VirtualizedListProps, "data" | "getItem" | "getItemCount" | "getItemLayout" | "renderItem" | "keyExtractor">, keyof FlatListBaseProps<ItemT> | keyof {}> & Omit<FlatListBaseProps<ItemT>, keyof {}> & {};
|
|
139
|
-
/**
|
|
140
|
-
* A performant interface for rendering simple, flat lists, supporting the most handy features:
|
|
141
|
-
*
|
|
142
|
-
* - Fully cross-platform.
|
|
143
|
-
* - Optional horizontal mode.
|
|
144
|
-
* - Configurable viewability callbacks.
|
|
145
|
-
* - Header support.
|
|
146
|
-
* - Footer support.
|
|
147
|
-
* - Separator support.
|
|
148
|
-
* - Pull to Refresh.
|
|
149
|
-
* - Scroll loading.
|
|
150
|
-
* - ScrollToIndex support.
|
|
151
|
-
*
|
|
152
|
-
* If you need section support, use [`<SectionList>`](docs/sectionlist.html).
|
|
153
|
-
*
|
|
154
|
-
* Minimal Example:
|
|
155
|
-
*
|
|
156
|
-
* <FlatList
|
|
157
|
-
* data={[{key: 'a'}, {key: 'b'}]}
|
|
158
|
-
* renderItem={({item}) => <Text>{item.key}</Text>}
|
|
159
|
-
* />
|
|
160
|
-
*
|
|
161
|
-
* More complex, multi-select example demonstrating `PureComponent` usage for perf optimization and avoiding bugs.
|
|
162
|
-
*
|
|
163
|
-
* - By binding the `onPressItem` handler, the props will remain `===` and `PureComponent` will
|
|
164
|
-
* prevent wasteful re-renders unless the actual `id`, `selected`, or `title` props change, even
|
|
165
|
-
* if the components rendered in `MyListItem` did not have such optimizations.
|
|
166
|
-
* - By passing `extraData={this.state}` to `FlatList` we make sure `FlatList` itself will re-render
|
|
167
|
-
* when the `state.selected` changes. Without setting this prop, `FlatList` would not know it
|
|
168
|
-
* needs to re-render any items because it is also a `PureComponent` and the prop comparison will
|
|
169
|
-
* not show any changes.
|
|
170
|
-
* - `keyExtractor` tells the list to use the `id`s for the react keys instead of the default `key` property.
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
* class MyListItem extends React.PureComponent {
|
|
174
|
-
* _onPress = () => {
|
|
175
|
-
* this.props.onPressItem(this.props.id);
|
|
176
|
-
* };
|
|
177
|
-
*
|
|
178
|
-
* render() {
|
|
179
|
-
* const textColor = this.props.selected ? "red" : "black";
|
|
180
|
-
* return (
|
|
181
|
-
* <TouchableOpacity onPress={this._onPress}>
|
|
182
|
-
* <View>
|
|
183
|
-
* <Text style={{ color: textColor }}>
|
|
184
|
-
* {this.props.title}
|
|
185
|
-
* </Text>
|
|
186
|
-
* </View>
|
|
187
|
-
* </TouchableOpacity>
|
|
188
|
-
* );
|
|
189
|
-
* }
|
|
190
|
-
* }
|
|
191
|
-
*
|
|
192
|
-
* class MultiSelectList extends React.PureComponent {
|
|
193
|
-
* state = {selected: (new Map(): Map<string, boolean>)};
|
|
194
|
-
*
|
|
195
|
-
* _keyExtractor = (item, index) => item.id;
|
|
196
|
-
*
|
|
197
|
-
* _onPressItem = (id: string) => {
|
|
198
|
-
* // updater functions are preferred for transactional updates
|
|
199
|
-
* this.setState((state) => {
|
|
200
|
-
* // copy the map rather than modifying state.
|
|
201
|
-
* const selected = new Map(state.selected);
|
|
202
|
-
* selected.set(id, !selected.get(id)); // toggle
|
|
203
|
-
* return {selected};
|
|
204
|
-
* });
|
|
205
|
-
* };
|
|
206
|
-
*
|
|
207
|
-
* _renderItem = ({item}) => (
|
|
208
|
-
* <MyListItem
|
|
209
|
-
* id={item.id}
|
|
210
|
-
* onPressItem={this._onPressItem}
|
|
211
|
-
* selected={!!this.state.selected.get(item.id)}
|
|
212
|
-
* title={item.title}
|
|
213
|
-
* />
|
|
214
|
-
* );
|
|
215
|
-
*
|
|
216
|
-
* render() {
|
|
217
|
-
* return (
|
|
218
|
-
* <FlatList
|
|
219
|
-
* data={this.props.data}
|
|
220
|
-
* extraData={this.state}
|
|
221
|
-
* keyExtractor={this._keyExtractor}
|
|
222
|
-
* renderItem={this._renderItem}
|
|
223
|
-
* />
|
|
224
|
-
* );
|
|
225
|
-
* }
|
|
226
|
-
* }
|
|
227
|
-
*
|
|
228
|
-
* This is a convenience wrapper around [`<VirtualizedList>`](docs/virtualizedlist.html),
|
|
229
|
-
* and thus inherits its props (as well as those of `ScrollView`) that aren't explicitly listed
|
|
230
|
-
* here, along with the following caveats:
|
|
231
|
-
*
|
|
232
|
-
* - Internal state is not preserved when content scrolls out of the render window. Make sure all
|
|
233
|
-
* your data is captured in the item data or external stores like Flux, Redux, or Relay.
|
|
234
|
-
* - This is a `PureComponent` which means that it will not re-render if `props` remain shallow-
|
|
235
|
-
* equal. Make sure that everything your `renderItem` function depends on is passed as a prop
|
|
236
|
-
* (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on
|
|
237
|
-
* changes. This includes the `data` prop and parent component state.
|
|
238
|
-
* - In order to constrain memory and enable smooth scrolling, content is rendered asynchronously
|
|
239
|
-
* offscreen. This means it's possible to scroll faster than the fill rate ands momentarily see
|
|
240
|
-
* blank content. This is a tradeoff that can be adjusted to suit the needs of each application,
|
|
241
|
-
* and we are working on improving it behind the scenes.
|
|
242
|
-
* - By default, the list looks for a `key` prop on each item and uses that for the React key.
|
|
243
|
-
* Alternatively, you can provide a custom `keyExtractor` prop.
|
|
244
|
-
*
|
|
245
|
-
* Also inherits [ScrollView Props](docs/scrollview.html#props), unless it is nested in another FlatList of same orientation.
|
|
246
|
-
*/
|
|
247
|
-
declare class FlatList<ItemT = any> extends React.PureComponent<FlatListProps<ItemT>> {
|
|
248
|
-
/**
|
|
249
|
-
* Scrolls to the end of the content. May be janky without `getItemLayout` prop.
|
|
250
|
-
*/
|
|
251
|
-
scrollToEnd(params?: null | undefined | {
|
|
252
|
-
animated?: boolean | undefined;
|
|
253
|
-
}): void;
|
|
254
|
-
/**
|
|
255
|
-
* Scrolls to the item at the specified index such that it is positioned in the viewable area
|
|
256
|
-
* such that `viewPosition` 0 places it at the top, 1 at the bottom, and 0.5 centered in the
|
|
257
|
-
* middle. `viewOffset` is a fixed number of pixels to offset the final target position.
|
|
258
|
-
*
|
|
259
|
-
* Note: cannot scroll to locations outside the render window without specifying the
|
|
260
|
-
* `getItemLayout` prop.
|
|
261
|
-
*/
|
|
262
|
-
scrollToIndex(params: {
|
|
263
|
-
animated?: boolean | undefined;
|
|
264
|
-
index: number;
|
|
265
|
-
viewOffset?: number;
|
|
266
|
-
viewPosition?: number;
|
|
267
|
-
}): void;
|
|
268
|
-
/**
|
|
269
|
-
* Requires linear scan through data - use `scrollToIndex` instead if possible.
|
|
270
|
-
*
|
|
271
|
-
* Note: cannot scroll to locations outside the render window without specifying the
|
|
272
|
-
* `getItemLayout` prop.
|
|
273
|
-
*/
|
|
274
|
-
scrollToItem(params: {
|
|
275
|
-
animated?: boolean | undefined;
|
|
276
|
-
item: ItemT;
|
|
277
|
-
viewOffset?: number;
|
|
278
|
-
viewPosition?: number;
|
|
279
|
-
}): void;
|
|
280
|
-
/**
|
|
281
|
-
* Scroll to a specific content pixel offset in the list.
|
|
282
|
-
*
|
|
283
|
-
* Check out [scrollToOffset](docs/virtualizedlist.html#scrolltooffset) of VirtualizedList
|
|
284
|
-
*/
|
|
285
|
-
scrollToOffset(params: {
|
|
286
|
-
animated?: boolean | undefined;
|
|
287
|
-
offset: number;
|
|
288
|
-
}): void;
|
|
289
|
-
/**
|
|
290
|
-
* Tells the list an interaction has occurred, which should trigger viewability calculations, e.g.
|
|
291
|
-
* if `waitForInteractions` is true and the user has not scrolled. This is typically called by
|
|
292
|
-
* taps on items or by navigation actions.
|
|
293
|
-
*/
|
|
294
|
-
recordInteraction(): void;
|
|
295
|
-
/**
|
|
296
|
-
* Displays the scroll indicators momentarily.
|
|
297
|
-
*
|
|
298
|
-
* @platform ios
|
|
299
|
-
*/
|
|
300
|
-
flashScrollIndicators(): void;
|
|
301
|
-
/**
|
|
302
|
-
* Provides a handle to the underlying scroll responder.
|
|
303
|
-
*/
|
|
304
|
-
getScrollResponder(): null | undefined | ScrollResponderType;
|
|
305
|
-
/**
|
|
306
|
-
* Provides a reference to the underlying host component
|
|
307
|
-
*/
|
|
308
|
-
getNativeScrollRef(): (null | undefined | React.ComponentRef<typeof View>) | (null | undefined | React.ComponentRef<ScrollViewNativeComponent>);
|
|
309
|
-
getScrollableNode(): any;
|
|
310
|
-
setNativeProps(props: {
|
|
311
|
-
[$$Key$$: string]: unknown;
|
|
312
|
-
}): void;
|
|
313
|
-
constructor(props: FlatListProps<ItemT>);
|
|
314
|
-
componentDidUpdate(prevProps: FlatListProps<ItemT>): void;
|
|
315
|
-
render(): React.ReactNode;
|
|
316
|
-
}
|
|
317
|
-
export default FlatList;
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @generated SignedSource<<be5b6b22b57a335dda71e2f53505cd12>>
|
|
8
|
-
*
|
|
9
|
-
* This file was translated from Flow by scripts/build-types/index.js.
|
|
10
|
-
* Original file: packages/react-native/Libraries/Lists/SectionList.js
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import type { ScrollResponderType } from "../Components/ScrollView/ScrollView";
|
|
14
|
-
import type { ListRenderItemInfo, ScrollToLocationParamsType, SectionBase as _SectionBase, SectionData, VirtualizedSectionListProps } from "@react-native-tvos/virtualized-lists";
|
|
15
|
-
import * as React from "react";
|
|
16
|
-
type DefaultSectionT = {
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
};
|
|
19
|
-
export type SectionBase<SectionItemT, SectionT = DefaultSectionT> = _SectionBase<SectionItemT, SectionT>;
|
|
20
|
-
export type { SectionData as SectionListData, ScrollToLocationParamsType as SectionListScrollParams };
|
|
21
|
-
type RequiredSectionListProps<ItemT, SectionT = DefaultSectionT> = {
|
|
22
|
-
/**
|
|
23
|
-
* The actual data to render, akin to the `data` prop in [`<FlatList>`](https://reactnative.dev/docs/flatlist).
|
|
24
|
-
*
|
|
25
|
-
* General shape:
|
|
26
|
-
*
|
|
27
|
-
* sections: $ReadOnlyArray<{
|
|
28
|
-
* data: $ReadOnlyArray<SectionItem>,
|
|
29
|
-
* renderItem?: ({item: SectionItem, ...}) => ?React.MixedElement,
|
|
30
|
-
* ItemSeparatorComponent?: ?ReactClass<{highlighted: boolean, ...}>,
|
|
31
|
-
* }>
|
|
32
|
-
*/
|
|
33
|
-
sections: ReadonlyArray<SectionData<ItemT, SectionT>>;
|
|
34
|
-
};
|
|
35
|
-
export type SectionListRenderItemInfo<ItemT, SectionT = DefaultSectionT> = Omit<ListRenderItemInfo<ItemT>, keyof {
|
|
36
|
-
section: SectionData<ItemT, SectionT>;
|
|
37
|
-
}> & {
|
|
38
|
-
section: SectionData<ItemT, SectionT>;
|
|
39
|
-
};
|
|
40
|
-
export type SectionListRenderItem<ItemT, SectionT = DefaultSectionT> = (info: SectionListRenderItemInfo<ItemT, SectionT>) => React.ReactNode | null;
|
|
41
|
-
type OptionalSectionListProps<ItemT, SectionT = DefaultSectionT> = {
|
|
42
|
-
/**
|
|
43
|
-
* Default renderer for every item in every section. Can be over-ridden on a per-section basis.
|
|
44
|
-
*/
|
|
45
|
-
renderItem?: SectionListRenderItem<ItemT, SectionT>;
|
|
46
|
-
/**
|
|
47
|
-
* A marker property for telling the list to re-render (since it implements `PureComponent`). If
|
|
48
|
-
* any of your `renderItem`, Header, Footer, etc. functions depend on anything outside of the
|
|
49
|
-
* `data` prop, stick it here and treat it immutably.
|
|
50
|
-
*/
|
|
51
|
-
extraData?: any;
|
|
52
|
-
/**
|
|
53
|
-
* How many items to render in the initial batch. This should be enough to fill the screen but not
|
|
54
|
-
* much more. Note these items will never be unmounted as part of the windowed rendering in order
|
|
55
|
-
* to improve perceived performance of scroll-to-top actions.
|
|
56
|
-
*/
|
|
57
|
-
initialNumToRender?: number | undefined;
|
|
58
|
-
/**
|
|
59
|
-
* Reverses the direction of scroll. Uses scale transforms of -1.
|
|
60
|
-
*/
|
|
61
|
-
inverted?: boolean | undefined;
|
|
62
|
-
/**
|
|
63
|
-
* Used to extract a unique key for a given item at the specified index. Key is used for caching
|
|
64
|
-
* and as the react key to track item re-ordering. The default extractor checks item.key, then
|
|
65
|
-
* falls back to using the index, like react does. Note that this sets keys for each item, but
|
|
66
|
-
* each overall section still needs its own key.
|
|
67
|
-
*/
|
|
68
|
-
keyExtractor?: ((item: ItemT, index: number) => string) | undefined;
|
|
69
|
-
/**
|
|
70
|
-
* Called once when the scroll position gets within `onEndReachedThreshold` of the rendered
|
|
71
|
-
* content.
|
|
72
|
-
*/
|
|
73
|
-
onEndReached?: ((info: {
|
|
74
|
-
distanceFromEnd: number;
|
|
75
|
-
}) => void) | undefined;
|
|
76
|
-
/**
|
|
77
|
-
* Note: may have bugs (missing content) in some circumstances - use at your own risk.
|
|
78
|
-
*
|
|
79
|
-
* This may improve scroll performance for large lists.
|
|
80
|
-
*/
|
|
81
|
-
removeClippedSubviews?: boolean;
|
|
82
|
-
};
|
|
83
|
-
export type SectionListProps<ItemT, SectionT = DefaultSectionT> = Omit<Omit<VirtualizedSectionListProps<ItemT, SectionT>, "getItem" | "getItemCount" | "renderItem" | "keyExtractor">, keyof RequiredSectionListProps<ItemT, SectionT> | keyof OptionalSectionListProps<ItemT, SectionT> | keyof {}> & Omit<RequiredSectionListProps<ItemT, SectionT>, keyof OptionalSectionListProps<ItemT, SectionT> | keyof {}> & Omit<OptionalSectionListProps<ItemT, SectionT>, keyof {}> & {};
|
|
84
|
-
/**
|
|
85
|
-
* A performant interface for rendering sectioned lists, supporting the most handy features:
|
|
86
|
-
*
|
|
87
|
-
* - Fully cross-platform.
|
|
88
|
-
* - Configurable viewability callbacks.
|
|
89
|
-
* - List header support.
|
|
90
|
-
* - List footer support.
|
|
91
|
-
* - Item separator support.
|
|
92
|
-
* - Section header support.
|
|
93
|
-
* - Section separator support.
|
|
94
|
-
* - Heterogeneous data and item rendering support.
|
|
95
|
-
* - Pull to Refresh.
|
|
96
|
-
* - Scroll loading.
|
|
97
|
-
*
|
|
98
|
-
* If you don't need section support and want a simpler interface, use
|
|
99
|
-
* [`<FlatList>`](https://reactnative.dev/docs/flatlist).
|
|
100
|
-
*
|
|
101
|
-
* Simple Examples:
|
|
102
|
-
*
|
|
103
|
-
* <SectionList
|
|
104
|
-
* renderItem={({item}) => <ListItem title={item} />}
|
|
105
|
-
* renderSectionHeader={({section}) => <Header title={section.title} />}
|
|
106
|
-
* sections={[ // homogeneous rendering between sections
|
|
107
|
-
* {data: [...], title: ...},
|
|
108
|
-
* {data: [...], title: ...},
|
|
109
|
-
* {data: [...], title: ...},
|
|
110
|
-
* ]}
|
|
111
|
-
* />
|
|
112
|
-
*
|
|
113
|
-
* <SectionList
|
|
114
|
-
* sections={[ // heterogeneous rendering between sections
|
|
115
|
-
* {data: [...], renderItem: ...},
|
|
116
|
-
* {data: [...], renderItem: ...},
|
|
117
|
-
* {data: [...], renderItem: ...},
|
|
118
|
-
* ]}
|
|
119
|
-
* />
|
|
120
|
-
*
|
|
121
|
-
* This is a convenience wrapper around [`<VirtualizedList>`](docs/virtualizedlist),
|
|
122
|
-
* and thus inherits its props (as well as those of `ScrollView`) that aren't explicitly listed
|
|
123
|
-
* here, along with the following caveats:
|
|
124
|
-
*
|
|
125
|
-
* - Internal state is not preserved when content scrolls out of the render window. Make sure all
|
|
126
|
-
* your data is captured in the item data or external stores like Flux, Redux, or Relay.
|
|
127
|
-
* - This is a `PureComponent` which means that it will not re-render if `props` remain shallow-
|
|
128
|
-
* equal. Make sure that everything your `renderItem` function depends on is passed as a prop
|
|
129
|
-
* (e.g. `extraData`) that is not `===` after updates, otherwise your UI may not update on
|
|
130
|
-
* changes. This includes the `data` prop and parent component state.
|
|
131
|
-
* - In order to constrain memory and enable smooth scrolling, content is rendered asynchronously
|
|
132
|
-
* offscreen. This means it's possible to scroll faster than the fill rate and momentarily see
|
|
133
|
-
* blank content. This is a tradeoff that can be adjusted to suit the needs of each application,
|
|
134
|
-
* and we are working on improving it behind the scenes.
|
|
135
|
-
* - By default, the list looks for a `key` prop on each item and uses that for the React key.
|
|
136
|
-
* Alternatively, you can provide a custom `keyExtractor` prop.
|
|
137
|
-
*
|
|
138
|
-
*/
|
|
139
|
-
declare class SectionList<ItemT = any, SectionT = DefaultSectionT> extends React.PureComponent<SectionListProps<ItemT, SectionT>> {
|
|
140
|
-
props: SectionListProps<ItemT, SectionT>;
|
|
141
|
-
/**
|
|
142
|
-
* Scrolls to the item at the specified `sectionIndex` and `itemIndex` (within the section)
|
|
143
|
-
* positioned in the viewable area such that `viewPosition` 0 places it at the top (and may be
|
|
144
|
-
* covered by a sticky header), 1 at the bottom, and 0.5 centered in the middle. `viewOffset` is a
|
|
145
|
-
* fixed number of pixels to offset the final target position, e.g. to compensate for sticky
|
|
146
|
-
* headers.
|
|
147
|
-
*
|
|
148
|
-
* Note: cannot scroll to locations outside the render window without specifying the
|
|
149
|
-
* `getItemLayout` prop.
|
|
150
|
-
*/
|
|
151
|
-
scrollToLocation(params: ScrollToLocationParamsType): void;
|
|
152
|
-
/**
|
|
153
|
-
* Tells the list an interaction has occurred, which should trigger viewability calculations, e.g.
|
|
154
|
-
* if `waitForInteractions` is true and the user has not scrolled. This is typically called by
|
|
155
|
-
* taps on items or by navigation actions.
|
|
156
|
-
*/
|
|
157
|
-
recordInteraction(): void;
|
|
158
|
-
/**
|
|
159
|
-
* Displays the scroll indicators momentarily.
|
|
160
|
-
*
|
|
161
|
-
* @platform ios
|
|
162
|
-
*/
|
|
163
|
-
flashScrollIndicators(): void;
|
|
164
|
-
/**
|
|
165
|
-
* Provides a handle to the underlying scroll responder.
|
|
166
|
-
*/
|
|
167
|
-
getScrollResponder(): null | undefined | ScrollResponderType;
|
|
168
|
-
getScrollableNode(): any;
|
|
169
|
-
setNativeProps(props: Object): void;
|
|
170
|
-
render(): React.ReactNode;
|
|
171
|
-
}
|
|
172
|
-
export default SectionList;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @generated SignedSource<<8f252fe8b2954e3ae8fe817a89f5a661>>
|
|
8
|
-
*
|
|
9
|
-
* This file was translated from Flow by scripts/build-types/index.js.
|
|
10
|
-
* Original file: packages/react-native/Libraries/Lists/VirtualizedList.js
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import VirtualizedLists from "@react-native-tvos/virtualized-lists";
|
|
14
|
-
type VirtualizedListType = typeof VirtualizedLists.VirtualizedList;
|
|
15
|
-
declare const VirtualizedListComponent: VirtualizedListType;
|
|
16
|
-
export type { ListRenderItemInfo, ListRenderItem, Separators, VirtualizedListProps } from "@react-native-tvos/virtualized-lists";
|
|
17
|
-
declare const $$VirtualizedList: typeof VirtualizedListComponent;
|
|
18
|
-
declare type $$VirtualizedList = typeof $$VirtualizedList;
|
|
19
|
-
export default $$VirtualizedList;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @generated SignedSource<<a2a38e951283729628053ade6b95fdb9>>
|
|
8
|
-
*
|
|
9
|
-
* This file was translated from Flow by scripts/build-types/index.js.
|
|
10
|
-
* Original file: packages/react-native/Libraries/Lists/VirtualizedSectionList.js
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import VirtualizedLists from "@react-native-tvos/virtualized-lists";
|
|
14
|
-
type VirtualizedSectionListType = typeof VirtualizedLists.VirtualizedSectionList;
|
|
15
|
-
declare const VirtualizedSectionList: VirtualizedSectionListType;
|
|
16
|
-
export type { SectionBase, ScrollToLocationParamsType, VirtualizedSectionListProps } from "@react-native-tvos/virtualized-lists";
|
|
17
|
-
declare const $$VirtualizedSectionList: typeof VirtualizedSectionList;
|
|
18
|
-
declare type $$VirtualizedSectionList = typeof $$VirtualizedSectionList;
|
|
19
|
-
export default $$VirtualizedSectionList;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*
|
|
7
|
-
* @generated SignedSource<<416339c67e408edf80e10ef9929452c1>>
|
|
8
|
-
*
|
|
9
|
-
* This file was translated from Flow by scripts/build-types/index.js.
|
|
10
|
-
* Original file: packages/react-native/Libraries/LogBox/Data/LogBoxData.js
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
import type { ExtendedError } from "../../Core/ExtendedError";
|
|
14
|
-
import type { LogLevel } from "./LogBoxLog";
|
|
15
|
-
import type { Category, ComponentStack, ComponentStackType, ExtendedExceptionData, Message } from "./parseLogBoxLog";
|
|
16
|
-
import LogBoxLog from "./LogBoxLog";
|
|
17
|
-
import * as React from "react";
|
|
18
|
-
export type LogBoxLogs = Set<LogBoxLog>;
|
|
19
|
-
export type LogData = Readonly<{
|
|
20
|
-
level: LogLevel;
|
|
21
|
-
message: Message;
|
|
22
|
-
category: Category;
|
|
23
|
-
componentStack: ComponentStack;
|
|
24
|
-
componentStackType: ComponentStackType | null;
|
|
25
|
-
stack?: string;
|
|
26
|
-
}>;
|
|
27
|
-
export type Observer = ($$PARAM_0$$: Readonly<{
|
|
28
|
-
logs: LogBoxLogs;
|
|
29
|
-
isDisabled: boolean;
|
|
30
|
-
selectedLogIndex: number;
|
|
31
|
-
}>) => void;
|
|
32
|
-
export type IgnorePattern = string | RegExp;
|
|
33
|
-
export type Subscription = Readonly<{
|
|
34
|
-
unsubscribe: () => void;
|
|
35
|
-
}>;
|
|
36
|
-
export type WarningInfo = {
|
|
37
|
-
finalFormat: string;
|
|
38
|
-
forceDialogImmediately: boolean;
|
|
39
|
-
suppressDialog_LEGACY: boolean;
|
|
40
|
-
suppressCompletely: boolean;
|
|
41
|
-
monitorEvent: string | null;
|
|
42
|
-
monitorListVersion: number;
|
|
43
|
-
monitorSampleRate: number;
|
|
44
|
-
};
|
|
45
|
-
export type WarningFilter = (format: string) => WarningInfo;
|
|
46
|
-
type AppInfo = Readonly<{
|
|
47
|
-
appVersion: string;
|
|
48
|
-
engine: string;
|
|
49
|
-
onPress?: (() => void) | undefined;
|
|
50
|
-
}>;
|
|
51
|
-
export declare function reportLogBoxError(error: ExtendedError, componentStack?: string): void;
|
|
52
|
-
export declare function isLogBoxErrorMessage(message: string): boolean;
|
|
53
|
-
export declare function isMessageIgnored(message: string): boolean;
|
|
54
|
-
export declare function addLog(log: LogData): void;
|
|
55
|
-
export declare function addException(error: ExtendedExceptionData): void;
|
|
56
|
-
export declare function symbolicateLogNow(log: LogBoxLog): void;
|
|
57
|
-
export declare function retrySymbolicateLogNow(log: LogBoxLog): void;
|
|
58
|
-
export declare function symbolicateLogLazy(log: LogBoxLog): void;
|
|
59
|
-
export declare function clear(): void;
|
|
60
|
-
export declare function setSelectedLog(proposedNewIndex: number): void;
|
|
61
|
-
export declare function clearWarnings(): void;
|
|
62
|
-
export declare function clearErrors(): void;
|
|
63
|
-
export declare function dismiss(log: LogBoxLog): void;
|
|
64
|
-
export declare function setWarningFilter(filter: WarningFilter): void;
|
|
65
|
-
export declare function setAppInfo(info: () => AppInfo): void;
|
|
66
|
-
export declare function getAppInfo(): null | undefined | AppInfo;
|
|
67
|
-
export declare function checkWarningFilter(format: string): WarningInfo;
|
|
68
|
-
export declare function getIgnorePatterns(): ReadonlyArray<IgnorePattern>;
|
|
69
|
-
export declare function addIgnorePatterns(patterns: ReadonlyArray<IgnorePattern>): void;
|
|
70
|
-
export declare function setDisabled(value: boolean): void;
|
|
71
|
-
export declare function isDisabled(): boolean;
|
|
72
|
-
export declare function observe(observer: Observer): Subscription;
|
|
73
|
-
type SubscribedComponent = React.ComponentType<Readonly<{
|
|
74
|
-
logs: ReadonlyArray<LogBoxLog>;
|
|
75
|
-
isDisabled: boolean;
|
|
76
|
-
selectedLogIndex: number;
|
|
77
|
-
}>>;
|
|
78
|
-
export declare function withSubscription(WrappedComponent: SubscribedComponent): React.ComponentType<{}>;
|