react-native-tvos 0.81.4-0 → 0.81.5-0
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 +1 -1
- package/React/Base/RCTUtils.mm +5 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/CoreModules/RCTDeviceInfo.mm +3 -4
- package/React/Views/RCTSwitchManager.m +24 -0
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/ReactActivityDelegate.java +25 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextShadowNode.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextViewManager.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.kt +13 -26
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.kt +9 -10
- package/ReactAndroid/src/main/jni/react/jni/TransformHelper.cpp +3 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- package/ReactCommon/react/renderer/components/view/BaseViewProps.cpp +0 -3
- package/ReactCommon/react/renderer/components/view/tests/ResolveTransformTest.cpp +377 -0
- package/package.json +8 -8
- 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/third-party-podspecs/ReactNativeDependencies.podspec +1 -1
- 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
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
import {View} from '../View/View';
|
|
21
21
|
import {AccessibilityProps} from '../View/ViewAccessibility';
|
|
22
22
|
import {ViewProps} from '../View/ViewPropTypes';
|
|
23
|
-
import {TVParallaxProperties} from '
|
|
23
|
+
import {TVParallaxProperties} from '../TV/TVParallaxProperties';
|
|
24
24
|
|
|
25
25
|
export interface PressableStateCallbackType {
|
|
26
26
|
readonly pressed: boolean;
|
|
@@ -244,7 +244,7 @@ function Pressable({
|
|
|
244
244
|
const android_rippleConfig = useAndroidRippleForView(android_ripple, viewRef);
|
|
245
245
|
|
|
246
246
|
const [pressed, setPressed] = usePressState(testOnly_pressed === true);
|
|
247
|
-
const [focused, setFocused] =
|
|
247
|
+
const [focused, setFocused] = useState(false);
|
|
248
248
|
|
|
249
249
|
const shouldUpdatePressed =
|
|
250
250
|
typeof children === 'function' || typeof style === 'function';
|
|
@@ -280,9 +280,6 @@ function Pressable({
|
|
|
280
280
|
accessibilityLiveRegion,
|
|
281
281
|
accessibilityLabel,
|
|
282
282
|
accessibilityState: _accessibilityState,
|
|
283
|
-
focusable:
|
|
284
|
-
focusable !== false && disabled !== true && ariaDisabled !== true,
|
|
285
|
-
isTVSelectable: isTVSelectable !== false && accessible !== false,
|
|
286
283
|
accessibilityValue,
|
|
287
284
|
hitSlop,
|
|
288
285
|
};
|
|
@@ -367,6 +364,16 @@ function Pressable({
|
|
|
367
364
|
|
|
368
365
|
const eventHandlers = usePressability(config);
|
|
369
366
|
|
|
367
|
+
const computedStyle = useMemo(() => {
|
|
368
|
+
return typeof style === 'function' ? style({pressed, focused}) : style;
|
|
369
|
+
}, [pressed, focused, style]);
|
|
370
|
+
|
|
371
|
+
const computedChildren = useMemo(() => {
|
|
372
|
+
return typeof children === 'function'
|
|
373
|
+
? children({pressed, focused})
|
|
374
|
+
: children;
|
|
375
|
+
}, [pressed, focused, children]);
|
|
376
|
+
|
|
370
377
|
return (
|
|
371
378
|
<View
|
|
372
379
|
{...restPropsWithDefaults}
|
|
@@ -377,16 +384,11 @@ function Pressable({
|
|
|
377
384
|
nextFocusLeft={tagForComponentOrHandle(props.nextFocusLeft)}
|
|
378
385
|
nextFocusRight={tagForComponentOrHandle(props.nextFocusRight)}
|
|
379
386
|
nextFocusUp={tagForComponentOrHandle(props.nextFocusUp)}
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
accessible !== false &&
|
|
383
|
-
disabled !== true &&
|
|
384
|
-
ariaDisabled !== true
|
|
385
|
-
}
|
|
386
|
-
style={typeof style === 'function' ? style({pressed, focused}) : style}
|
|
387
|
+
focusable={focusable !== false && isTVSelectable !== false}
|
|
388
|
+
style={computedStyle}
|
|
387
389
|
tvParallaxProperties={tvParallaxProperties}
|
|
388
390
|
collapsable={false}>
|
|
389
|
-
{
|
|
391
|
+
{computedChildren}
|
|
390
392
|
{__DEV__ ? <PressabilityDebugView color="red" hitSlop={hitSlop} /> : null}
|
|
391
393
|
</View>
|
|
392
394
|
);
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export type TVParallaxProperties = {
|
|
2
|
+
/**
|
|
3
|
+
* If true, parallax effects are enabled. Defaults to true.
|
|
4
|
+
*/
|
|
5
|
+
enabled?: boolean | undefined,
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Defaults to 2.0.
|
|
9
|
+
*/
|
|
10
|
+
shiftDistanceX?: number | undefined,
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Defaults to 2.0.
|
|
14
|
+
*/
|
|
15
|
+
shiftDistanceY?: number | undefined,
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Defaults to 0.05.
|
|
19
|
+
*/
|
|
20
|
+
tiltAngle?: number | undefined,
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Defaults to 1.0
|
|
24
|
+
*/
|
|
25
|
+
magnification?: number | undefined,
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Defaults to 1.0
|
|
29
|
+
*/
|
|
30
|
+
pressMagnification?: number | undefined,
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Defaults to 0.3
|
|
34
|
+
*/
|
|
35
|
+
pressDuration?: number | undefined,
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* @deprecated No longer used
|
|
39
|
+
*/
|
|
40
|
+
pressDelay?: number | undefined,
|
|
41
|
+
};
|
|
42
|
+
|
|
@@ -53,30 +53,36 @@ export type TVParallaxPropertiesType = $ReadOnly<{|
|
|
|
53
53
|
|}>;
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* These props are for both Apple TV and Android TV.
|
|
57
|
+
* TODO: update `@react-native/eslint-plugin` so that the
|
|
58
|
+
* name can be changed to TVViewProps
|
|
57
59
|
*/
|
|
58
60
|
export type TVViewProps = $ReadOnly<{|
|
|
59
61
|
/**
|
|
60
|
-
*
|
|
61
|
-
* and navigable using the Apple TV remote.
|
|
62
|
+
* @deprecated Replaced by `focusable`.
|
|
62
63
|
*
|
|
63
64
|
* @platform ios
|
|
64
65
|
*/
|
|
65
|
-
isTVSelectable?: boolean,
|
|
66
|
+
isTVSelectable?: ?boolean,
|
|
66
67
|
|
|
67
68
|
/**
|
|
68
|
-
*
|
|
69
|
+
* Whether this `View` should be focusable with a non-touch input device, eg. receive focus with a hardware keyboard.
|
|
69
70
|
*
|
|
70
|
-
* @platform ios
|
|
71
71
|
*/
|
|
72
|
-
|
|
72
|
+
focusable?: ?boolean,
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* May be set to true to force the focus engine to move focus to this view.
|
|
76
|
+
*
|
|
77
|
+
*/
|
|
78
|
+
hasTVPreferredFocus?: ?boolean,
|
|
73
79
|
|
|
74
80
|
/**
|
|
75
81
|
* *(Apple TV only)* Object with properties to control Apple TV parallax effects.
|
|
76
82
|
*
|
|
77
83
|
* @platform ios
|
|
78
84
|
*/
|
|
79
|
-
tvParallaxProperties?: TVParallaxPropertiesType,
|
|
85
|
+
tvParallaxProperties?: ?TVParallaxPropertiesType,
|
|
80
86
|
|
|
81
87
|
/**
|
|
82
88
|
* Additional properties needed for flow checks on TVFocusGuideView
|
|
@@ -87,4 +93,35 @@ export type TVViewProps = $ReadOnly<{|
|
|
|
87
93
|
safePadding?: string | null,
|
|
88
94
|
onPressIn?: (event: any) => void,
|
|
89
95
|
onPressOut?: (event: any) => void,
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* TV next focus forward (see documentation for the View component).
|
|
99
|
+
*
|
|
100
|
+
* @platform android
|
|
101
|
+
*/
|
|
102
|
+
nextFocusForward?: ?number,
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* TV next focus down (see documentation for the View component).
|
|
106
|
+
*
|
|
107
|
+
*/
|
|
108
|
+
nextFocusDown?: ?number,
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* TV next focus left (see documentation for the View component).
|
|
112
|
+
*
|
|
113
|
+
*/
|
|
114
|
+
nextFocusLeft?: ?number,
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* TV next focus right (see documentation for the View component).
|
|
118
|
+
*
|
|
119
|
+
*/
|
|
120
|
+
nextFocusRight?: ?number,
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* TV next focus up (see documentation for the View component).
|
|
124
|
+
*
|
|
125
|
+
*/
|
|
126
|
+
nextFocusUp?: ?number,
|
|
90
127
|
|}>;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {ColorValue} from '../../StyleSheet/StyleSheet';
|
|
12
|
-
import type {
|
|
12
|
+
import type {TVViewProps} from '../TV/TVViewPropTypes';
|
|
13
13
|
import type {AccessibilityState} from '../View/ViewAccessibility';
|
|
14
14
|
import type {TouchableWithoutFeedbackProps} from './TouchableWithoutFeedback';
|
|
15
15
|
|
|
@@ -24,28 +24,6 @@ import tagForComponentOrHandle from '../TV/tagForComponentOrHandle';
|
|
|
24
24
|
import * as React from 'react';
|
|
25
25
|
import {cloneElement} from 'react';
|
|
26
26
|
|
|
27
|
-
type AndroidProps = $ReadOnly<{
|
|
28
|
-
nextFocusDown?: ?number,
|
|
29
|
-
nextFocusForward?: ?number,
|
|
30
|
-
nextFocusLeft?: ?number,
|
|
31
|
-
nextFocusRight?: ?number,
|
|
32
|
-
nextFocusUp?: ?number,
|
|
33
|
-
}>;
|
|
34
|
-
|
|
35
|
-
type IOSProps = $ReadOnly<{
|
|
36
|
-
/**
|
|
37
|
-
* @deprecated Use `focusable` instead
|
|
38
|
-
*/
|
|
39
|
-
hasTVPreferredFocus?: ?boolean,
|
|
40
|
-
isTVSelectable?: ?boolean,
|
|
41
|
-
tvParallaxProperties?: TVParallaxPropertiesType,
|
|
42
|
-
nextFocusDown?: ?number,
|
|
43
|
-
nextFocusForward?: ?number,
|
|
44
|
-
nextFocusLeft?: ?number,
|
|
45
|
-
nextFocusRight?: ?number,
|
|
46
|
-
nextFocusUp?: ?number,
|
|
47
|
-
}>;
|
|
48
|
-
|
|
49
27
|
type TouchableHighlightBaseProps = $ReadOnly<{
|
|
50
28
|
/**
|
|
51
29
|
* Determines what the opacity of the wrapped view should be when touch is active.
|
|
@@ -74,8 +52,7 @@ type TouchableHighlightBaseProps = $ReadOnly<{
|
|
|
74
52
|
|
|
75
53
|
export type TouchableHighlightProps = $ReadOnly<{
|
|
76
54
|
...TouchableWithoutFeedbackProps,
|
|
77
|
-
...
|
|
78
|
-
...IOSProps,
|
|
55
|
+
...TVViewProps,
|
|
79
56
|
...TouchableHighlightBaseProps,
|
|
80
57
|
}>;
|
|
81
58
|
|
|
@@ -374,8 +351,9 @@ class TouchableHighlightImpl extends React.Component<
|
|
|
374
351
|
onLayout={this.props.onLayout}
|
|
375
352
|
hitSlop={this.props.hitSlop}
|
|
376
353
|
hasTVPreferredFocus={this.props.hasTVPreferredFocus === true}
|
|
377
|
-
|
|
378
|
-
this.props.
|
|
354
|
+
focusable={
|
|
355
|
+
this.props.focusable !== false &&
|
|
356
|
+
this.props.isTVSelectable !== false
|
|
379
357
|
}
|
|
380
358
|
tvParallaxProperties={this.props.tvParallaxProperties}
|
|
381
359
|
nextFocusDown={tagForComponentOrHandle(this.props.nextFocusDown)}
|
|
@@ -383,11 +361,6 @@ class TouchableHighlightImpl extends React.Component<
|
|
|
383
361
|
nextFocusLeft={tagForComponentOrHandle(this.props.nextFocusLeft)}
|
|
384
362
|
nextFocusRight={tagForComponentOrHandle(this.props.nextFocusRight)}
|
|
385
363
|
nextFocusUp={tagForComponentOrHandle(this.props.nextFocusUp)}
|
|
386
|
-
focusable={
|
|
387
|
-
this.props.focusable !== false &&
|
|
388
|
-
this.props.onPress !== undefined &&
|
|
389
|
-
!this.props.disabled
|
|
390
|
-
}
|
|
391
364
|
nativeID={this.props.id ?? this.props.nativeID}
|
|
392
365
|
testID={this.props.testID}
|
|
393
366
|
ref={this.props.hostRef}
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {GestureResponderEvent} from '../../Types/CoreEventTypes';
|
|
12
|
+
import type {TVViewProps} from '../TV/TVViewPropTypes';
|
|
12
13
|
import type {TouchableWithoutFeedbackProps} from './TouchableWithoutFeedback';
|
|
13
14
|
|
|
14
15
|
import View from '../../Components/View/View';
|
|
@@ -25,54 +26,9 @@ import invariant from 'invariant';
|
|
|
25
26
|
import * as React from 'react';
|
|
26
27
|
import {cloneElement} from 'react';
|
|
27
28
|
|
|
28
|
-
type TouchableNativeFeedbackTVProps = {
|
|
29
|
-
/**
|
|
30
|
-
* *(Apple TV only)* TV preferred focus (see documentation for the View component).
|
|
31
|
-
*
|
|
32
|
-
* @platform ios
|
|
33
|
-
* @deprecated Use `focusable` instead
|
|
34
|
-
*/
|
|
35
|
-
hasTVPreferredFocus?: ?boolean,
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Designates the next view to receive focus when the user navigates down. See the Android documentation.
|
|
39
|
-
*
|
|
40
|
-
* @platform android
|
|
41
|
-
*/
|
|
42
|
-
nextFocusDown?: ?number,
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Designates the next view to receive focus when the user navigates forward. See the Android documentation.
|
|
46
|
-
*
|
|
47
|
-
* @platform android
|
|
48
|
-
*/
|
|
49
|
-
nextFocusForward?: ?number,
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Designates the next view to receive focus when the user navigates left. See the Android documentation.
|
|
53
|
-
*
|
|
54
|
-
* @platform android
|
|
55
|
-
*/
|
|
56
|
-
nextFocusLeft?: ?number,
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Designates the next view to receive focus when the user navigates right. See the Android documentation.
|
|
60
|
-
*
|
|
61
|
-
* @platform android
|
|
62
|
-
*/
|
|
63
|
-
nextFocusRight?: ?number,
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Designates the next view to receive focus when the user navigates up. See the Android documentation.
|
|
67
|
-
*
|
|
68
|
-
* @platform android
|
|
69
|
-
*/
|
|
70
|
-
nextFocusUp?: ?number,
|
|
71
|
-
};
|
|
72
|
-
|
|
73
29
|
export type TouchableNativeFeedbackProps = $ReadOnly<{
|
|
74
30
|
...TouchableWithoutFeedbackProps,
|
|
75
|
-
...
|
|
31
|
+
...TVViewProps,
|
|
76
32
|
/**
|
|
77
33
|
* Determines the type of background drawable that's going to be used to display feedback.
|
|
78
34
|
* It takes an object with type property and extra data depending on the type.
|
|
@@ -367,16 +323,15 @@ class TouchableNativeFeedback extends React.Component<
|
|
|
367
323
|
this.props['aria-hidden'] ?? this.props.accessibilityElementsHidden,
|
|
368
324
|
hasTVPreferredFocus: this.props.hasTVPreferredFocus,
|
|
369
325
|
hitSlop: this.props.hitSlop,
|
|
370
|
-
focusable:
|
|
371
|
-
this.props.focusable !== false &&
|
|
372
|
-
this.props.onPress !== undefined &&
|
|
373
|
-
!this.props.disabled,
|
|
374
326
|
nativeID: this.props.id ?? this.props.nativeID,
|
|
375
327
|
nextFocusDown: tagForComponentOrHandle(this.props.nextFocusDown),
|
|
376
328
|
nextFocusForward: tagForComponentOrHandle(this.props.nextFocusForward),
|
|
377
329
|
nextFocusLeft: tagForComponentOrHandle(this.props.nextFocusLeft),
|
|
378
330
|
nextFocusRight: tagForComponentOrHandle(this.props.nextFocusRight),
|
|
379
331
|
nextFocusUp: tagForComponentOrHandle(this.props.nextFocusUp),
|
|
332
|
+
focusable:
|
|
333
|
+
this.props.focusable !== false &&
|
|
334
|
+
this.props.isTVSelectable !== false,
|
|
380
335
|
onLayout: this.props.onLayout,
|
|
381
336
|
testID: this.props.testID,
|
|
382
337
|
},
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
|
|
12
|
-
import type {
|
|
12
|
+
import type {TVViewProps} from '../TV/TVViewPropTypes';
|
|
13
13
|
import type {TouchableWithoutFeedbackProps} from './TouchableWithoutFeedback';
|
|
14
14
|
|
|
15
15
|
import Animated from '../../Animated/Animated';
|
|
@@ -23,53 +23,6 @@ import Platform from '../../Utilities/Platform';
|
|
|
23
23
|
import tagForComponentOrHandle from '../TV/tagForComponentOrHandle';
|
|
24
24
|
import * as React from 'react';
|
|
25
25
|
|
|
26
|
-
export type TouchableOpacityTVProps = $ReadOnly<{
|
|
27
|
-
/**
|
|
28
|
-
* *(Apple TV only)* TV preferred focus (see documentation for the View component).
|
|
29
|
-
*
|
|
30
|
-
* @platform ios
|
|
31
|
-
* @deprecated Use `focusable` instead
|
|
32
|
-
*/
|
|
33
|
-
hasTVPreferredFocus?: ?boolean,
|
|
34
|
-
isTVSelectable?: ?boolean,
|
|
35
|
-
tvParallaxProperties?: TVParallaxPropertiesType,
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Designates the next view to receive focus when the user navigates down. See the Android documentation.
|
|
39
|
-
*
|
|
40
|
-
* @platform android
|
|
41
|
-
*/
|
|
42
|
-
nextFocusDown?: ?number,
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Designates the next view to receive focus when the user navigates forward. See the Android documentation.
|
|
46
|
-
*
|
|
47
|
-
* @platform android
|
|
48
|
-
*/
|
|
49
|
-
nextFocusForward?: ?number,
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Designates the next view to receive focus when the user navigates left. See the Android documentation.
|
|
53
|
-
*
|
|
54
|
-
* @platform android
|
|
55
|
-
*/
|
|
56
|
-
nextFocusLeft?: ?number,
|
|
57
|
-
|
|
58
|
-
/**
|
|
59
|
-
* Designates the next view to receive focus when the user navigates right. See the Android documentation.
|
|
60
|
-
*
|
|
61
|
-
* @platform android
|
|
62
|
-
*/
|
|
63
|
-
nextFocusRight?: ?number,
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Designates the next view to receive focus when the user navigates up. See the Android documentation.
|
|
67
|
-
*
|
|
68
|
-
* @platform android
|
|
69
|
-
*/
|
|
70
|
-
nextFocusUp?: ?number,
|
|
71
|
-
}>;
|
|
72
|
-
|
|
73
26
|
type TouchableOpacityBaseProps = $ReadOnly<{
|
|
74
27
|
/**
|
|
75
28
|
* Determines what the opacity of the wrapped view should be when touch is active.
|
|
@@ -83,7 +36,7 @@ type TouchableOpacityBaseProps = $ReadOnly<{
|
|
|
83
36
|
|
|
84
37
|
export type TouchableOpacityProps = $ReadOnly<{
|
|
85
38
|
...TouchableWithoutFeedbackProps,
|
|
86
|
-
...
|
|
39
|
+
...TVViewProps,
|
|
87
40
|
...TouchableOpacityBaseProps,
|
|
88
41
|
}>;
|
|
89
42
|
|
|
@@ -339,16 +292,12 @@ class TouchableOpacity extends React.Component<
|
|
|
339
292
|
nextFocusRight={tagForComponentOrHandle(this.props.nextFocusRight)}
|
|
340
293
|
nextFocusUp={tagForComponentOrHandle(this.props.nextFocusUp)}
|
|
341
294
|
hasTVPreferredFocus={this.props.hasTVPreferredFocus === true}
|
|
342
|
-
isTVSelectable={
|
|
343
|
-
this.props.isTVSelectable !== false && this.props.accessible !== false
|
|
344
|
-
}
|
|
345
|
-
tvParallaxProperties={this.props.tvParallaxProperties}
|
|
346
|
-
hitSlop={this.props.hitSlop}
|
|
347
295
|
focusable={
|
|
348
296
|
this.props.focusable !== false &&
|
|
349
|
-
this.props.
|
|
350
|
-
!this.props.disabled
|
|
297
|
+
this.props.isTVSelectable !== false
|
|
351
298
|
}
|
|
299
|
+
tvParallaxProperties={this.props.tvParallaxProperties}
|
|
300
|
+
hitSlop={this.props.hitSlop}
|
|
352
301
|
// $FlowFixMe[prop-missing]
|
|
353
302
|
ref={this.props.hostRef}
|
|
354
303
|
{...eventHandlers}>
|
|
@@ -8,10 +8,12 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
import type {HostInstance} from '../../../src/private/types/HostInstance';
|
|
11
12
|
import type {ViewProps} from './ViewPropTypes';
|
|
12
13
|
|
|
13
14
|
import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';
|
|
14
15
|
import TextAncestorContext from '../../Text/TextAncestorContext';
|
|
16
|
+
import Platform from '../../Utilities/Platform';
|
|
15
17
|
import useMergeRefs from '../../Utilities/useMergeRefs';
|
|
16
18
|
import ViewNativeComponent from './ViewNativeComponent';
|
|
17
19
|
import {Commands} from './ViewNativeComponent';
|
|
@@ -62,6 +64,8 @@ component View(
|
|
|
62
64
|
const {
|
|
63
65
|
accessibilityState,
|
|
64
66
|
accessibilityValue,
|
|
67
|
+
isTVSelectable,
|
|
68
|
+
focusable,
|
|
65
69
|
'aria-busy': ariaBusy,
|
|
66
70
|
'aria-checked': ariaChecked,
|
|
67
71
|
'aria-disabled': ariaDisabled,
|
|
@@ -144,6 +148,14 @@ component View(
|
|
|
144
148
|
};
|
|
145
149
|
}
|
|
146
150
|
|
|
151
|
+
if (Platform.OS === 'ios') {
|
|
152
|
+
processedProps.isTVSelectable = focusable ?? isTVSelectable ?? false;
|
|
153
|
+
delete processedProps.focusable;
|
|
154
|
+
} else {
|
|
155
|
+
processedProps.focusable = focusable ?? false;
|
|
156
|
+
delete processedProps.isTVSelectable;
|
|
157
|
+
}
|
|
158
|
+
|
|
147
159
|
actualView =
|
|
148
160
|
ref == null ? (
|
|
149
161
|
<ViewNativeComponent {...processedProps} />
|
|
@@ -211,6 +223,13 @@ component View(
|
|
|
211
223
|
}
|
|
212
224
|
: undefined;
|
|
213
225
|
|
|
226
|
+
const modifiedIsTVSelectable = Platform.OS === 'ios' ?
|
|
227
|
+
(focusable ?? isTVSelectable ?? false) :
|
|
228
|
+
undefined;
|
|
229
|
+
const modifiedFocusable = Platform.OS === 'android' ?
|
|
230
|
+
(focusable ?? false) :
|
|
231
|
+
undefined;
|
|
232
|
+
|
|
214
233
|
actualView = (
|
|
215
234
|
<ViewNativeComponent
|
|
216
235
|
{...otherProps}
|
|
@@ -218,7 +237,8 @@ component View(
|
|
|
218
237
|
ariaLive === 'off' ? 'none' : ariaLive ?? accessibilityLiveRegion
|
|
219
238
|
}
|
|
220
239
|
accessibilityLabel={ariaLabel ?? accessibilityLabel}
|
|
221
|
-
focusable={tabIndex !== undefined ? !tabIndex :
|
|
240
|
+
focusable={tabIndex !== undefined ? !tabIndex : modifiedFocusable}
|
|
241
|
+
isTVSelectable={tabIndex !== undefined ? !tabIndex : modifiedIsTVSelectable}
|
|
222
242
|
accessibilityState={_accessibilityState}
|
|
223
243
|
accessibilityElementsHidden={ariaHidden ?? accessibilityElementsHidden}
|
|
224
244
|
accessibilityLabelledBy={_accessibilityLabelledBy}
|
|
@@ -26,56 +26,92 @@ import {Touchable} from '../Touchable/Touchable';
|
|
|
26
26
|
import {AccessibilityProps} from './ViewAccessibility';
|
|
27
27
|
import type {BubblingEventHandler} from 'react-native/Libraries/Types/CodegenTypes';
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
export type TVParallaxProperties = {
|
|
30
|
+
/**
|
|
31
|
+
* If true, parallax effects are enabled. Defaults to true.
|
|
32
|
+
*/
|
|
33
|
+
enabled?: boolean | undefined;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Defaults to 2.0.
|
|
37
|
+
*/
|
|
38
|
+
shiftDistanceX?: number | undefined;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Defaults to 2.0.
|
|
42
|
+
*/
|
|
43
|
+
shiftDistanceY?: number | undefined;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Defaults to 0.05.
|
|
47
|
+
*/
|
|
48
|
+
tiltAngle?: number | undefined;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Defaults to 1.0
|
|
52
|
+
*/
|
|
53
|
+
magnification?: number | undefined;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Defaults to 1.0
|
|
57
|
+
*/
|
|
58
|
+
pressMagnification?: number | undefined;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Defaults to 0.3
|
|
62
|
+
*/
|
|
63
|
+
pressDuration?: number | undefined;
|
|
64
|
+
|
|
33
65
|
/**
|
|
34
|
-
*
|
|
35
|
-
|
|
66
|
+
* @deprecated No longer used
|
|
67
|
+
*/
|
|
68
|
+
pressDelay?: number | undefined;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export interface TVViewProps {
|
|
72
|
+
/**
|
|
73
|
+
* Callback that is called when the view is blurred.
|
|
36
74
|
*
|
|
37
|
-
*
|
|
75
|
+
* Note: This will only be called if the view is focusable.
|
|
38
76
|
*/
|
|
39
|
-
|
|
77
|
+
onBlur?: ((e: BlurEvent) => void) | null | undefined;
|
|
40
78
|
|
|
41
79
|
/**
|
|
42
|
-
*
|
|
80
|
+
* Callback that is called when the view is focused.
|
|
43
81
|
*
|
|
44
|
-
*
|
|
45
|
-
* @deprecated Use `focusable` instead
|
|
82
|
+
* Note: This will only be called if the view is focusable.
|
|
46
83
|
*/
|
|
47
|
-
|
|
84
|
+
onFocus?: ((e: FocusEvent) => void) | null | undefined;
|
|
48
85
|
|
|
49
86
|
/**
|
|
50
|
-
*
|
|
87
|
+
* @deprecated Replaced by `focusable`.
|
|
51
88
|
*
|
|
52
89
|
* @platform ios
|
|
53
90
|
*/
|
|
54
|
-
|
|
91
|
+
isTVSelectable?: boolean | undefined;
|
|
55
92
|
|
|
56
93
|
/**
|
|
57
|
-
* *(Apple TV
|
|
94
|
+
* *(Apple TV and Android TV)* May be set to true to force the Apple TV focus engine to move focus to this view.
|
|
58
95
|
*
|
|
59
96
|
* @platform ios
|
|
60
97
|
*/
|
|
61
|
-
|
|
98
|
+
hasTVPreferredFocus?: boolean | undefined;
|
|
62
99
|
|
|
63
100
|
/**
|
|
64
|
-
*
|
|
101
|
+
* Whether this `View` should be focusable with a non-touch input device, eg. receive focus with a hardware keyboard.
|
|
65
102
|
*
|
|
66
|
-
* @platform ios
|
|
67
103
|
*/
|
|
68
|
-
|
|
104
|
+
focusable?: boolean | undefined;
|
|
69
105
|
|
|
70
106
|
/**
|
|
71
|
-
* *(Apple TV only)*
|
|
107
|
+
* *(Apple TV only)* Object with properties to control Apple TV parallax effects.
|
|
72
108
|
*
|
|
73
109
|
* @platform ios
|
|
74
110
|
*/
|
|
75
|
-
|
|
111
|
+
tvParallaxProperties?: TVParallaxProperties | undefined;
|
|
76
112
|
}
|
|
77
113
|
|
|
78
|
-
export interface ViewPropsIOS
|
|
114
|
+
export interface ViewPropsIOS {
|
|
79
115
|
/**
|
|
80
116
|
* Whether this view should be rendered as a bitmap before compositing.
|
|
81
117
|
*
|
|
@@ -90,20 +126,6 @@ export interface ViewPropsIOS extends TVViewPropsIOS {
|
|
|
90
126
|
}
|
|
91
127
|
|
|
92
128
|
export interface ViewPropsAndroid {
|
|
93
|
-
/**
|
|
94
|
-
* Callback that is called when the view is blurred.
|
|
95
|
-
*
|
|
96
|
-
* Note: This will only be called if the view is focusable.
|
|
97
|
-
*/
|
|
98
|
-
onBlur?: ((e: BlurEvent) => void) | null | undefined;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Callback that is called when the view is focused.
|
|
102
|
-
*
|
|
103
|
-
* Note: This will only be called if the view is focusable.
|
|
104
|
-
*/
|
|
105
|
-
onFocus?: ((e: FocusEvent) => void) | null | undefined;
|
|
106
|
-
|
|
107
129
|
/**
|
|
108
130
|
* Whether this view should render itself (and all of its children) into a single hardware texture on the GPU.
|
|
109
131
|
*
|
|
@@ -113,11 +135,6 @@ export interface ViewPropsAndroid {
|
|
|
113
135
|
*/
|
|
114
136
|
renderToHardwareTextureAndroid?: boolean | undefined;
|
|
115
137
|
|
|
116
|
-
/**
|
|
117
|
-
* Whether this `View` should be focusable with a non-touch input device, eg. receive focus with a hardware keyboard.
|
|
118
|
-
*/
|
|
119
|
-
focusable?: boolean | undefined;
|
|
120
|
-
|
|
121
138
|
/**
|
|
122
139
|
* Indicates whether this `View` should be focusable with a non-touch input device, eg. receive focus with a hardware keyboard.
|
|
123
140
|
* See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
|
|
@@ -136,6 +153,7 @@ export interface ViewPropsAndroid {
|
|
|
136
153
|
export interface ViewProps
|
|
137
154
|
extends ViewPropsAndroid,
|
|
138
155
|
ViewPropsIOS,
|
|
156
|
+
TVViewProps,
|
|
139
157
|
GestureResponderHandlers,
|
|
140
158
|
Touchable,
|
|
141
159
|
PointerEvents,
|