react-native-tvos 0.69.6-2 → 0.69.8-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/Pressable/Pressable.js +11 -2
- package/Libraries/Components/ScrollView/ScrollView.js +1 -0
- package/Libraries/Components/TV/TVEventHandler.js +4 -2
- package/Libraries/Components/TV/TVFocusEventHandler.js +4 -2
- package/Libraries/Components/TV/TVFocusGuideView.js +77 -47
- package/Libraries/Components/TV/TVViewPropTypes.js +7 -0
- package/Libraries/Components/TV/useTVEventHandler.js +2 -1
- package/Libraries/Components/TextInput/TextInput.js +1 -1
- package/Libraries/Components/Touchable/TouchableBounce.js +5 -0
- package/Libraries/Components/Touchable/TouchableHighlight.js +7 -2
- package/Libraries/Components/Touchable/TouchableOpacity.js +7 -2
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +7 -0
- package/Libraries/Components/View/View.js +36 -2
- package/Libraries/Components/View/ViewNativeComponent.js +9 -3
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Lists/VirtualizedList.js +25 -10
- package/Libraries/LogBox/UI/LogBoxButton.js +16 -12
- package/Libraries/LogBox/UI/LogBoxNotification.js +1 -1
- package/Libraries/NativeAnimation/RCTNativeAnimatedTurboModule.mm +2 -20
- package/Libraries/StyleSheet/StyleSheetTypes.js +1 -0
- package/Libraries/Types/CoreEventTypes.js +9 -0
- package/README.md +3 -1
- package/React/Base/RCTRootView.m +6 -0
- package/React/Base/RCTRootViewInternal.h +1 -0
- package/React/Base/RCTVersion.m +2 -2
- package/React/Fabric/Mounting/ComponentViews/Root/RCTRootComponentView.h +1 -0
- package/React/Fabric/Mounting/ComponentViews/Root/RCTRootComponentView.mm +6 -0
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +111 -8
- package/React/Views/RCTTVView.h +13 -1
- package/React/Views/RCTTVView.m +91 -0
- package/React/Views/RCTViewManager.m +14 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/EventAnimationDriver.java +6 -1
- package/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedModule.java +4 -5
- package/ReactAndroid/src/main/java/com/facebook/react/animated/NativeAnimatedNodesManager.java +57 -62
- package/ReactAndroid/src/main/java/com/facebook/react/config/ReactFeatureFlags.java +7 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/core/ReactAndroidHWInputDeviceHelper.java +44 -14
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/Event.java +18 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.java +25 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +247 -7
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.java +50 -4
- package/ReactCommon/cxxreact/ReactNativeVersion.h +2 -2
- package/ReactCommon/react/renderer/components/view/ViewProps.cpp +87 -11
- package/ReactCommon/react/renderer/components/view/ViewProps.h +10 -1
- package/android/com/facebook/react/hermes-engine/{0.69.6-2/hermes-engine-0.69.6-2-release-javadoc.jar → 0.69.8-0/hermes-engine-0.69.8-0-debug-javadoc.jar} +0 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0-debug-javadoc.jar.md5 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0-debug-javadoc.jar.sha1 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0-debug-javadoc.jar.sha256 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0-debug-javadoc.jar.sha512 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0-debug.aar +0 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0-debug.aar.md5 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0-debug.aar.sha1 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0-debug.aar.sha256 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0-debug.aar.sha512 +1 -0
- package/android/com/facebook/react/hermes-engine/{0.69.6-2/hermes-engine-0.69.6-2-debug-javadoc.jar → 0.69.8-0/hermes-engine-0.69.8-0-release-javadoc.jar} +0 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0-release-javadoc.jar.md5 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0-release-javadoc.jar.sha1 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0-release-javadoc.jar.sha256 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0-release-javadoc.jar.sha512 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0-release.aar +0 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0-release.aar.md5 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0-release.aar.sha1 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0-release.aar.sha256 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0-release.aar.sha512 +1 -0
- package/android/com/facebook/react/hermes-engine/{0.69.6-2/hermes-engine-0.69.6-2.module → 0.69.8-0/hermes-engine-0.69.8-0.module} +47 -47
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0.module.md5 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0.module.sha1 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0.module.sha256 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0.module.sha512 +1 -0
- package/android/com/facebook/react/hermes-engine/{0.69.6-2/hermes-engine-0.69.6-2.pom → 0.69.8-0/hermes-engine-0.69.8-0.pom} +1 -1
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0.pom.md5 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0.pom.sha1 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0.pom.sha256 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.8-0/hermes-engine-0.69.8-0.pom.sha512 +1 -0
- package/android/com/facebook/react/hermes-engine/maven-metadata.xml +4 -4
- package/android/com/facebook/react/hermes-engine/maven-metadata.xml.md5 +1 -1
- package/android/com/facebook/react/hermes-engine/maven-metadata.xml.sha1 +1 -1
- package/android/com/facebook/react/hermes-engine/maven-metadata.xml.sha256 +1 -1
- package/android/com/facebook/react/hermes-engine/maven-metadata.xml.sha512 +1 -1
- package/android/com/facebook/react/react-native/{0.69.6-2/react-native-0.69.6-2-release-javadoc.jar → 0.69.8-0/react-native-0.69.8-0-debug-javadoc.jar} +0 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-debug-javadoc.jar.md5 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-debug-javadoc.jar.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-debug-javadoc.jar.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-debug-javadoc.jar.sha512 +1 -0
- package/android/com/facebook/react/react-native/{0.69.6-2/react-native-0.69.6-2-debug-sources.jar → 0.69.8-0/react-native-0.69.8-0-debug-sources.jar} +0 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-debug-sources.jar.md5 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-debug-sources.jar.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-debug-sources.jar.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-debug-sources.jar.sha512 +1 -0
- package/android/com/facebook/react/react-native/{0.69.6-2/react-native-0.69.6-2-debug.aar → 0.69.8-0/react-native-0.69.8-0-debug.aar} +0 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-debug.aar.md5 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-debug.aar.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-debug.aar.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-debug.aar.sha512 +1 -0
- package/android/com/facebook/react/react-native/{0.69.6-2/react-native-0.69.6-2-debug-javadoc.jar → 0.69.8-0/react-native-0.69.8-0-release-javadoc.jar} +0 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-release-javadoc.jar.md5 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-release-javadoc.jar.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-release-javadoc.jar.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-release-javadoc.jar.sha512 +1 -0
- package/android/com/facebook/react/react-native/{0.69.6-2/react-native-0.69.6-2-release-sources.jar → 0.69.8-0/react-native-0.69.8-0-release-sources.jar} +0 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-release-sources.jar.md5 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-release-sources.jar.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-release-sources.jar.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-release-sources.jar.sha512 +1 -0
- package/android/com/facebook/react/react-native/{0.69.6-2/react-native-0.69.6-2-release.aar → 0.69.8-0/react-native-0.69.8-0-release.aar} +0 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-release.aar.md5 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-release.aar.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-release.aar.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0-release.aar.sha512 +1 -0
- package/android/com/facebook/react/react-native/{0.69.6-2/react-native-0.69.6-2.module → 0.69.8-0/react-native-0.69.8-0.module} +57 -57
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0.module.md5 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0.module.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0.module.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0.module.sha512 +1 -0
- package/android/com/facebook/react/react-native/{0.69.6-2/react-native-0.69.6-2.pom → 0.69.8-0/react-native-0.69.8-0.pom} +1 -1
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0.pom.md5 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0.pom.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0.pom.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.69.8-0/react-native-0.69.8-0.pom.sha512 +1 -0
- package/android/com/facebook/react/react-native/maven-metadata.xml +4 -4
- package/android/com/facebook/react/react-native/maven-metadata.xml.md5 +1 -1
- package/android/com/facebook/react/react-native/maven-metadata.xml.sha1 +1 -1
- package/android/com/facebook/react/react-native/maven-metadata.xml.sha256 +1 -1
- package/android/com/facebook/react/react-native/maven-metadata.xml.sha512 +1 -1
- package/index.js +1 -7
- package/package.json +2 -2
- package/sdks/hermesc/linux64-bin/hermesc +0 -0
- package/sdks/hermesc/osx-bin/hermesc +0 -0
- package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
- package/template/package.json +1 -1
- package/tvos-types.d.ts +41 -5
- package/Libraries/DeprecatedPropTypes/DeprecatedTVViewPropTypes.js +0 -23
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2-debug-javadoc.jar.md5 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2-debug-javadoc.jar.sha1 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2-debug-javadoc.jar.sha256 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2-debug-javadoc.jar.sha512 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2-debug.aar +0 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2-debug.aar.md5 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2-debug.aar.sha1 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2-debug.aar.sha256 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2-debug.aar.sha512 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2-release-javadoc.jar.md5 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2-release-javadoc.jar.sha1 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2-release-javadoc.jar.sha256 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2-release-javadoc.jar.sha512 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2-release.aar +0 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2-release.aar.md5 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2-release.aar.sha1 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2-release.aar.sha256 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2-release.aar.sha512 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2.module.md5 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2.module.sha1 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2.module.sha256 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2.module.sha512 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2.pom.md5 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2.pom.sha1 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2.pom.sha256 +0 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-2/hermes-engine-0.69.6-2.pom.sha512 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-debug-javadoc.jar.md5 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-debug-javadoc.jar.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-debug-javadoc.jar.sha256 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-debug-javadoc.jar.sha512 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-debug-sources.jar.md5 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-debug-sources.jar.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-debug-sources.jar.sha256 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-debug-sources.jar.sha512 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-debug.aar.md5 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-debug.aar.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-debug.aar.sha256 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-debug.aar.sha512 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-release-javadoc.jar.md5 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-release-javadoc.jar.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-release-javadoc.jar.sha256 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-release-javadoc.jar.sha512 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-release-sources.jar.md5 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-release-sources.jar.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-release-sources.jar.sha256 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-release-sources.jar.sha512 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-release.aar.md5 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-release.aar.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-release.aar.sha256 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2-release.aar.sha512 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2.module.md5 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2.module.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2.module.sha256 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2.module.sha512 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2.pom.md5 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2.pom.sha1 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2.pom.sha256 +0 -1
- package/android/com/facebook/react/react-native/0.69.6-2/react-native-0.69.6-2.pom.sha512 +0 -1
- /package/android/com/facebook/react/hermes-engine/{0.69.6-2/hermes-engine-0.69.6-2-debug-sources.jar → 0.69.8-0/hermes-engine-0.69.8-0-debug-sources.jar} +0 -0
- /package/android/com/facebook/react/hermes-engine/{0.69.6-2/hermes-engine-0.69.6-2-debug-sources.jar.md5 → 0.69.8-0/hermes-engine-0.69.8-0-debug-sources.jar.md5} +0 -0
- /package/android/com/facebook/react/hermes-engine/{0.69.6-2/hermes-engine-0.69.6-2-debug-sources.jar.sha1 → 0.69.8-0/hermes-engine-0.69.8-0-debug-sources.jar.sha1} +0 -0
- /package/android/com/facebook/react/hermes-engine/{0.69.6-2/hermes-engine-0.69.6-2-debug-sources.jar.sha256 → 0.69.8-0/hermes-engine-0.69.8-0-debug-sources.jar.sha256} +0 -0
- /package/android/com/facebook/react/hermes-engine/{0.69.6-2/hermes-engine-0.69.6-2-debug-sources.jar.sha512 → 0.69.8-0/hermes-engine-0.69.8-0-debug-sources.jar.sha512} +0 -0
- /package/android/com/facebook/react/hermes-engine/{0.69.6-2/hermes-engine-0.69.6-2-release-sources.jar → 0.69.8-0/hermes-engine-0.69.8-0-release-sources.jar} +0 -0
- /package/android/com/facebook/react/hermes-engine/{0.69.6-2/hermes-engine-0.69.6-2-release-sources.jar.md5 → 0.69.8-0/hermes-engine-0.69.8-0-release-sources.jar.md5} +0 -0
- /package/android/com/facebook/react/hermes-engine/{0.69.6-2/hermes-engine-0.69.6-2-release-sources.jar.sha1 → 0.69.8-0/hermes-engine-0.69.8-0-release-sources.jar.sha1} +0 -0
- /package/android/com/facebook/react/hermes-engine/{0.69.6-2/hermes-engine-0.69.6-2-release-sources.jar.sha256 → 0.69.8-0/hermes-engine-0.69.8-0-release-sources.jar.sha256} +0 -0
- /package/android/com/facebook/react/hermes-engine/{0.69.6-2/hermes-engine-0.69.6-2-release-sources.jar.sha512 → 0.69.8-0/hermes-engine-0.69.8-0-release-sources.jar.sha512} +0 -0
|
@@ -34,9 +34,10 @@ import type {
|
|
|
34
34
|
LayoutEvent,
|
|
35
35
|
MouseEvent,
|
|
36
36
|
PressEvent,
|
|
37
|
+
TVRemoteEvent,
|
|
37
38
|
} from '../../Types/CoreEventTypes';
|
|
38
39
|
import View from '../View/View';
|
|
39
|
-
import
|
|
40
|
+
import type {TVParallaxPropertiesType} from '../TV/TVViewPropTypes';
|
|
40
41
|
import Platform from '../../Utilities/Platform';
|
|
41
42
|
import {tvFocusEventHandler} from '../TV/TVFocusEventHandler';
|
|
42
43
|
import tagForComponentOrHandle from '../TV/tagForComponentOrHandle';
|
|
@@ -317,14 +318,17 @@ function Pressable(props: Props, forwardedRef): React.Node {
|
|
|
317
318
|
unstable_pressDelay,
|
|
318
319
|
],
|
|
319
320
|
);
|
|
321
|
+
// $FlowFixMe[incompatible-call]
|
|
320
322
|
const eventHandlers = usePressability(config);
|
|
321
323
|
|
|
322
324
|
const pressableTVFocusEventHandler = useCallback(
|
|
323
|
-
(evt:
|
|
325
|
+
(evt: FocusEvent) => {
|
|
324
326
|
if (isTVSelectable !== false || focusable !== false) {
|
|
327
|
+
// $FlowFixMe[prop-missing]
|
|
325
328
|
if (evt?.eventType === 'focus') {
|
|
326
329
|
setFocused(true);
|
|
327
330
|
onFocus && onFocus(evt);
|
|
331
|
+
// $FlowFixMe[prop-missing]
|
|
328
332
|
} else if (evt.eventType === 'blur') {
|
|
329
333
|
onBlur && onBlur(evt);
|
|
330
334
|
setFocused(false);
|
|
@@ -333,10 +337,14 @@ function Pressable(props: Props, forwardedRef): React.Node {
|
|
|
333
337
|
// Use these on tvOS only. Android press events go to onClick() so we don't
|
|
334
338
|
// need to call onPress() again here
|
|
335
339
|
if (Platform.isTVOS) {
|
|
340
|
+
// $FlowFixMe[prop-missing]
|
|
336
341
|
if (focused && evt.eventType === 'select') {
|
|
342
|
+
// $FlowFixMe[incompatible-exact]
|
|
337
343
|
onPress && onPress(evt);
|
|
338
344
|
}
|
|
345
|
+
// $FlowFixMe[prop-missing]
|
|
339
346
|
if (focused && evt.eventType === 'longSelect') {
|
|
347
|
+
// $FlowFixMe[incompatible-exact]
|
|
340
348
|
onLongPress && onLongPress(evt);
|
|
341
349
|
}
|
|
342
350
|
}
|
|
@@ -348,6 +356,7 @@ function Pressable(props: Props, forwardedRef): React.Node {
|
|
|
348
356
|
if (!tvFocusEventHandler) {
|
|
349
357
|
return;
|
|
350
358
|
}
|
|
359
|
+
// $FlowFixMe[prop-missing]
|
|
351
360
|
const viewTag = viewRef?.current?._nativeTag;
|
|
352
361
|
tvFocusEventHandler.register(viewTag, pressableTVFocusEventHandler);
|
|
353
362
|
return () => {
|
|
@@ -1834,6 +1834,7 @@ ForwardedScrollView.Context = ScrollViewContext;
|
|
|
1834
1834
|
|
|
1835
1835
|
ForwardedScrollView.displayName = 'ScrollView';
|
|
1836
1836
|
|
|
1837
|
+
// $FlowFixMe[not-an-object]
|
|
1837
1838
|
module.exports = ((ForwardedScrollView: $FlowFixMe): React.AbstractComponent<
|
|
1838
1839
|
React.ElementConfig<typeof ScrollView>,
|
|
1839
1840
|
$ReadOnly<{|
|
|
@@ -14,20 +14,22 @@ import NativeEventEmitter from '../../EventEmitter/NativeEventEmitter';
|
|
|
14
14
|
import Platform from '../../Utilities/Platform';
|
|
15
15
|
import {type EventSubscription} from '../../vendor/emitter/EventEmitter';
|
|
16
16
|
import NativeTVNavigationEventEmitter from './NativeTVNavigationEventEmitter';
|
|
17
|
+
import type {TVRemoteEvent} from '../../Types/CoreEventTypes';
|
|
17
18
|
|
|
18
19
|
class TVEventHandler {
|
|
19
20
|
__nativeTVNavigationEventListener: ?EventSubscription = null;
|
|
20
|
-
__nativeTVNavigationEventEmitter: ?NativeEventEmitter = null;
|
|
21
|
+
__nativeTVNavigationEventEmitter: ?NativeEventEmitter<TVRemoteEvent> = null;
|
|
21
22
|
|
|
22
23
|
enable(component: ?any, callback: Function): void {
|
|
23
24
|
if (Platform.OS === 'ios' && !NativeTVNavigationEventEmitter) {
|
|
24
25
|
return;
|
|
25
26
|
}
|
|
26
27
|
|
|
27
|
-
this.__nativeTVNavigationEventEmitter = new NativeEventEmitter(
|
|
28
|
+
this.__nativeTVNavigationEventEmitter = new NativeEventEmitter<TVRemoteEvent>(
|
|
28
29
|
NativeTVNavigationEventEmitter,
|
|
29
30
|
);
|
|
30
31
|
this.__nativeTVNavigationEventListener = this.__nativeTVNavigationEventEmitter.addListener(
|
|
32
|
+
// $FlowFixMe[prop-missing]
|
|
31
33
|
'onHWKeyEvent',
|
|
32
34
|
data => {
|
|
33
35
|
if (callback) {
|
|
@@ -14,10 +14,11 @@ import NativeEventEmitter from '../../EventEmitter/NativeEventEmitter';
|
|
|
14
14
|
import Platform from '../../Utilities/Platform';
|
|
15
15
|
import {type EventSubscription} from '../../vendor/emitter/EventEmitter';
|
|
16
16
|
import NativeTVNavigationEventEmitter from './NativeTVNavigationEventEmitter';
|
|
17
|
+
import type {TVRemoteEvent} from '../../Types/CoreEventTypes';
|
|
17
18
|
|
|
18
19
|
class TVFocusEventHandler {
|
|
19
20
|
__nativeTVNavigationEventListener: ?EventSubscription = null;
|
|
20
|
-
__nativeTVNavigationEventEmitter: ?NativeEventEmitter = null;
|
|
21
|
+
__nativeTVNavigationEventEmitter: ?NativeEventEmitter<TVRemoteEvent> = null;
|
|
21
22
|
__callbackMap: Map<any, Function> = new Map();
|
|
22
23
|
|
|
23
24
|
constructor() {
|
|
@@ -25,10 +26,11 @@ class TVFocusEventHandler {
|
|
|
25
26
|
return;
|
|
26
27
|
}
|
|
27
28
|
|
|
28
|
-
this.__nativeTVNavigationEventEmitter = new NativeEventEmitter(
|
|
29
|
+
this.__nativeTVNavigationEventEmitter = new NativeEventEmitter<TVRemoteEvent>(
|
|
29
30
|
NativeTVNavigationEventEmitter,
|
|
30
31
|
);
|
|
31
32
|
this.__nativeTVNavigationEventListener = this.__nativeTVNavigationEventEmitter.addListener(
|
|
33
|
+
// $FlowFixMe[prop-missing]
|
|
32
34
|
'onHWKeyEvent',
|
|
33
35
|
data => {
|
|
34
36
|
const callback = this.__callbackMap.get(data.tag);
|
|
@@ -10,10 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
const React = require('react');
|
|
12
12
|
const ReactNative = require('react-native');
|
|
13
|
-
|
|
14
|
-
const Platform = require('../../Utilities/Platform');
|
|
13
|
+
|
|
15
14
|
import {Commands} from '../View/ViewNativeComponent';
|
|
16
15
|
import type {ViewProps} from '../View/ViewPropTypes';
|
|
16
|
+
import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
|
|
17
|
+
import setAndForwardRef from '../../Utilities/setAndForwardRef';
|
|
18
|
+
|
|
19
|
+
const {View} = ReactNative;
|
|
17
20
|
|
|
18
21
|
type TVFocusGuideViewProps = $ReadOnly<{
|
|
19
22
|
...ViewProps,
|
|
@@ -28,70 +31,91 @@ type TVFocusGuideViewProps = $ReadOnly<{
|
|
|
28
31
|
/**
|
|
29
32
|
* The views the focus should go to
|
|
30
33
|
*/
|
|
31
|
-
destinations
|
|
34
|
+
destinations?: (?React.ElementRef<HostComponent<mixed>>)[],
|
|
32
35
|
|
|
33
36
|
/**
|
|
34
37
|
* @deprecated Don't use it, no longer necessary.
|
|
35
38
|
*/
|
|
36
39
|
safePadding?: 'vertical' | 'horizontal' | 'both' | null,
|
|
37
|
-
}>;
|
|
38
40
|
|
|
39
|
-
|
|
40
|
-
enabled = true,
|
|
41
|
-
safePadding,
|
|
42
|
-
...props
|
|
43
|
-
}: TVFocusGuideViewProps): React.Node => {
|
|
44
|
-
const enabledStyle = {display: enabled ? 'flex' : 'none'};
|
|
45
|
-
const style = [styles.container, props.style, enabledStyle];
|
|
41
|
+
autoFocus?: boolean,
|
|
46
42
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
trapFocusUp?: boolean,
|
|
44
|
+
trapFocusDown?: boolean,
|
|
45
|
+
trapFocusLeft?: boolean,
|
|
46
|
+
trapFocusRight?: boolean,
|
|
47
|
+
}>;
|
|
50
48
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
export type TVFocusGuideViewImperativeMethods = $ReadOnly<{
|
|
50
|
+
setDestinations: (
|
|
51
|
+
destinations: (?React.ElementRef<HostComponent<mixed>>)[],
|
|
52
|
+
) => void,
|
|
53
|
+
}>;
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
function TVFocusGuideView(
|
|
56
|
+
{
|
|
57
|
+
enabled = true,
|
|
58
|
+
safePadding,
|
|
59
|
+
destinations: destinationsProp,
|
|
60
|
+
...props
|
|
61
|
+
}: TVFocusGuideViewProps,
|
|
62
|
+
forwardedRef,
|
|
63
|
+
): React.Node {
|
|
64
|
+
const focusGuideRef = React.useRef<React.ElementRef<
|
|
65
|
+
typeof ReactNative.View,
|
|
66
|
+
> | null>(null);
|
|
67
|
+
|
|
68
|
+
const setDestinations = React.useCallback(
|
|
69
|
+
(destinations: (?React.ElementRef<HostComponent<mixed>>)[]) => {
|
|
70
|
+
const dests: number[] = (destinations || [])
|
|
71
|
+
.map(ReactNative.findNodeHandle)
|
|
72
|
+
.filter(Boolean);
|
|
73
|
+
|
|
74
|
+
if (focusGuideRef.current != null) {
|
|
75
|
+
Commands.setDestinations(focusGuideRef.current, dests);
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
[],
|
|
79
|
+
);
|
|
57
80
|
|
|
58
|
-
const
|
|
59
|
-
|
|
81
|
+
const _setNativeRef = setAndForwardRef({
|
|
82
|
+
getForwardedRef: () => forwardedRef,
|
|
83
|
+
setLocalRef: ref => {
|
|
84
|
+
focusGuideRef.current = ref;
|
|
85
|
+
|
|
86
|
+
// This is a hack. Ideally we would forwardRef to the underlying
|
|
87
|
+
// host component. However, since TVFocusGuide has its own methods that can be
|
|
88
|
+
// called as well, if we used the standard forwardRef then these
|
|
89
|
+
// methods wouldn't be accessible
|
|
90
|
+
//
|
|
91
|
+
// Here we mutate the ref, so that the user can use the standard native
|
|
92
|
+
// methods like `focus()`, `blur()`, etc. while also having access to
|
|
93
|
+
// imperative methods of this component like `setDestinations()`.
|
|
94
|
+
if (ref) {
|
|
95
|
+
ref.setDestinations = setDestinations;
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
});
|
|
60
99
|
|
|
61
100
|
React.useEffect(() => {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
focusGuideRef?.current,
|
|
67
|
-
);
|
|
68
|
-
hostComponentRef &&
|
|
69
|
-
Commands.setDestinations(hostComponentRef, nativeDestinations);
|
|
70
|
-
}, [props.destinations]);
|
|
101
|
+
if (destinationsProp != null) {
|
|
102
|
+
setDestinations(destinationsProp);
|
|
103
|
+
}
|
|
104
|
+
}, [setDestinations, destinationsProp]);
|
|
71
105
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
);
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
const FocusGuideViewAndroidTV = (props: TVFocusGuideViewProps) => {
|
|
78
|
-
const nativeDestinations = React.useMemo(
|
|
79
|
-
() =>
|
|
80
|
-
(props.destinations || [])
|
|
81
|
-
.map(d => ReactNative.findNodeHandle(d))
|
|
82
|
-
.filter(c => c !== 0 && c !== null && c !== undefined),
|
|
83
|
-
[props.destinations],
|
|
84
|
-
);
|
|
106
|
+
const enabledStyle = {display: enabled ? 'flex' : 'none'};
|
|
107
|
+
const style = [styles.container, props.style, enabledStyle];
|
|
85
108
|
|
|
86
109
|
return (
|
|
110
|
+
// $FlowFixMe[prop-missing]
|
|
87
111
|
<ReactNative.View
|
|
88
112
|
{...props}
|
|
89
|
-
|
|
90
|
-
|
|
113
|
+
style={style}
|
|
114
|
+
ref={_setNativeRef}
|
|
91
115
|
collapsable={false}
|
|
92
116
|
/>
|
|
93
117
|
);
|
|
94
|
-
}
|
|
118
|
+
}
|
|
95
119
|
|
|
96
120
|
const styles = ReactNative.StyleSheet.create({
|
|
97
121
|
container: {
|
|
@@ -100,4 +124,10 @@ const styles = ReactNative.StyleSheet.create({
|
|
|
100
124
|
},
|
|
101
125
|
});
|
|
102
126
|
|
|
103
|
-
|
|
127
|
+
const ForwardedTVFocusGuideView: React.AbstractComponent<
|
|
128
|
+
TVFocusGuideViewProps,
|
|
129
|
+
React.ElementRef<typeof View> & TVFocusGuideViewImperativeMethods,
|
|
130
|
+
> = React.forwardRef(TVFocusGuideView);
|
|
131
|
+
ForwardedTVFocusGuideView.displayName = 'TVFocusGuideView';
|
|
132
|
+
|
|
133
|
+
module.exports = ForwardedTVFocusGuideView;
|
|
@@ -78,4 +78,11 @@ export type TVViewProps = $ReadOnly<{|
|
|
|
78
78
|
*/
|
|
79
79
|
tvParallaxProperties?: TVParallaxPropertiesType,
|
|
80
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Additional properties needed for flow checks on TVFocusGuideView
|
|
83
|
+
*/
|
|
84
|
+
destinations?: ?(Object[]),
|
|
85
|
+
enabled?: boolean,
|
|
86
|
+
autofocus?: boolean,
|
|
87
|
+
safePadding?: string | null,
|
|
81
88
|
|}>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import TVEventHandler from './TVEventHandler';
|
|
4
|
+
import type {TVRemoteEvent} from '../../Types/CoreEventTypes';
|
|
4
5
|
|
|
5
|
-
const useTVEventHandler = (handleEvent: (evt:
|
|
6
|
+
const useTVEventHandler = (handleEvent: (evt: TVRemoteEvent) => void) => {
|
|
6
7
|
React.useEffect(() => {
|
|
7
8
|
const handler: TVEventHandler = new TVEventHandler();
|
|
8
9
|
handler.enable(null, function(cmp, evt) {
|
|
@@ -1233,7 +1233,7 @@ function InternalTextInput(props: Props): React.Node {
|
|
|
1233
1233
|
(props.unstable_onChangeSync || props.unstable_onChangeTextSync) &&
|
|
1234
1234
|
!(props.onChange || props.onChangeText);
|
|
1235
1235
|
|
|
1236
|
-
if (props.multiline && Platform.isTVOS) {
|
|
1236
|
+
if (props.multiline === true && Platform.isTVOS) {
|
|
1237
1237
|
warnOnce(
|
|
1238
1238
|
'text-input-multiline-tvos',
|
|
1239
1239
|
'Multiline TextInput not supported on Apple TV. See https://github.com/react-native-tvos/react-native-tvos/issues/109',
|
|
@@ -19,7 +19,7 @@ import typeof TouchableWithoutFeedback from './TouchableWithoutFeedback';
|
|
|
19
19
|
import Platform from '../../Utilities/Platform';
|
|
20
20
|
import View from '../../Components/View/View';
|
|
21
21
|
import type {ViewProps} from '../../Components/View/ViewPropTypes';
|
|
22
|
-
import
|
|
22
|
+
import type {TVParallaxPropertiesType} from '../TV/TVViewPropTypes';
|
|
23
23
|
import tagForComponentOrHandle from '../TV/tagForComponentOrHandle';
|
|
24
24
|
import * as React from 'react';
|
|
25
25
|
|
|
@@ -34,7 +34,7 @@ type AndroidProps = $ReadOnly<{|
|
|
|
34
34
|
type TVProps = $ReadOnly<{|
|
|
35
35
|
hasTVPreferredFocus?: ?boolean,
|
|
36
36
|
isTVSelectable?: ?boolean,
|
|
37
|
-
tvParallaxProperties?:
|
|
37
|
+
tvParallaxProperties?: TVParallaxPropertiesType,
|
|
38
38
|
nextFocusDown?: ?number,
|
|
39
39
|
nextFocusForward?: ?number,
|
|
40
40
|
nextFocusLeft?: ?number,
|
|
@@ -379,6 +379,11 @@ class TouchableHighlight extends React.Component<Props, State> {
|
|
|
379
379
|
this.props.onPress(event);
|
|
380
380
|
}
|
|
381
381
|
},
|
|
382
|
+
onLongPress: event => {
|
|
383
|
+
if (this.props.onLongPress != null && Platform.OS !== 'android') {
|
|
384
|
+
this.props.onLongPress(event);
|
|
385
|
+
}
|
|
386
|
+
},
|
|
382
387
|
});
|
|
383
388
|
}
|
|
384
389
|
}
|
|
@@ -19,7 +19,7 @@ import Easing from '../../Animated/Easing';
|
|
|
19
19
|
import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
|
|
20
20
|
import flattenStyle from '../../StyleSheet/flattenStyle';
|
|
21
21
|
import Platform from '../../Utilities/Platform';
|
|
22
|
-
import
|
|
22
|
+
import type {TVParallaxPropertiesType} from '../TV/TVViewPropTypes';
|
|
23
23
|
import tagForComponentOrHandle from '../TV/tagForComponentOrHandle';
|
|
24
24
|
|
|
25
25
|
import * as React from 'react';
|
|
@@ -27,7 +27,7 @@ import * as React from 'react';
|
|
|
27
27
|
type TVProps = $ReadOnly<{|
|
|
28
28
|
hasTVPreferredFocus?: ?boolean,
|
|
29
29
|
isTVSelectable?: ?boolean,
|
|
30
|
-
tvParallaxProperties?:
|
|
30
|
+
tvParallaxProperties?: TVParallaxPropertiesType,
|
|
31
31
|
nextFocusDown?: ?number,
|
|
32
32
|
nextFocusForward?: ?number,
|
|
33
33
|
nextFocusLeft?: ?number,
|
|
@@ -292,6 +292,11 @@ class TouchableOpacity extends React.Component<Props, State> {
|
|
|
292
292
|
this.props.onPress(event);
|
|
293
293
|
}
|
|
294
294
|
},
|
|
295
|
+
onLongPress: event => {
|
|
296
|
+
if (this.props.onLongPress != null && Platform.OS !== 'android') {
|
|
297
|
+
this.props.onLongPress(event);
|
|
298
|
+
}
|
|
299
|
+
},
|
|
295
300
|
});
|
|
296
301
|
}
|
|
297
302
|
}
|
|
@@ -13,6 +13,7 @@ import Pressability, {
|
|
|
13
13
|
} from '../../Pressability/Pressability';
|
|
14
14
|
import {PressabilityDebugView} from '../../Pressability/PressabilityDebug';
|
|
15
15
|
import TVTouchable from './TVTouchable';
|
|
16
|
+
import type {TVParallaxPropertiesType} from '../TV/TVViewPropTypes';
|
|
16
17
|
import type {
|
|
17
18
|
AccessibilityActionEvent,
|
|
18
19
|
AccessibilityActionInfo,
|
|
@@ -65,6 +66,7 @@ type Props = $ReadOnly<{|
|
|
|
65
66
|
rejectResponderTermination?: ?boolean,
|
|
66
67
|
testID?: ?string,
|
|
67
68
|
touchSoundDisabled?: ?boolean,
|
|
69
|
+
tvParallaxProperties?: TVParallaxPropertiesType,
|
|
68
70
|
|}>;
|
|
69
71
|
|
|
70
72
|
type State = $ReadOnly<{|
|
|
@@ -156,6 +158,11 @@ class TouchableWithoutFeedback extends React.Component<Props, State> {
|
|
|
156
158
|
this.props.onPress(event);
|
|
157
159
|
}
|
|
158
160
|
},
|
|
161
|
+
onLongPress: event => {
|
|
162
|
+
if (this.props.onLongPress != null) {
|
|
163
|
+
this.props.onLongPress(event);
|
|
164
|
+
}
|
|
165
|
+
},
|
|
159
166
|
});
|
|
160
167
|
}
|
|
161
168
|
}
|
|
@@ -13,6 +13,9 @@ import type {ViewProps} from './ViewPropTypes';
|
|
|
13
13
|
import ViewNativeComponent from './ViewNativeComponent';
|
|
14
14
|
import TextAncestor from '../../Text/TextAncestor';
|
|
15
15
|
import * as React from 'react';
|
|
16
|
+
import {Commands} from './ViewNativeComponent';
|
|
17
|
+
|
|
18
|
+
import setAndForwardRef from '../../Utilities/setAndForwardRef';
|
|
16
19
|
|
|
17
20
|
export type Props = ViewProps;
|
|
18
21
|
|
|
@@ -23,13 +26,44 @@ export type Props = ViewProps;
|
|
|
23
26
|
*
|
|
24
27
|
* @see https://reactnative.dev/docs/view
|
|
25
28
|
*/
|
|
29
|
+
type ViewImperativeMethods = $ReadOnly<{
|
|
30
|
+
requestTVFocus: () => void,
|
|
31
|
+
}>;
|
|
32
|
+
|
|
26
33
|
const View: React.AbstractComponent<
|
|
27
34
|
ViewProps,
|
|
28
|
-
React.ElementRef<typeof ViewNativeComponent
|
|
35
|
+
React.ElementRef<typeof ViewNativeComponent> & ViewImperativeMethods,
|
|
29
36
|
> = React.forwardRef((props: ViewProps, forwardedRef) => {
|
|
37
|
+
const viewRef = React.useRef<?React.ElementRef<typeof View>>(null);
|
|
38
|
+
|
|
39
|
+
const requestTVFocus = React.useCallback(() => {
|
|
40
|
+
if (viewRef.current) {
|
|
41
|
+
Commands.requestTVFocus(viewRef.current);
|
|
42
|
+
}
|
|
43
|
+
}, []);
|
|
44
|
+
|
|
45
|
+
const _setNativeRef = setAndForwardRef({
|
|
46
|
+
getForwardedRef: () => forwardedRef,
|
|
47
|
+
setLocalRef: ref => {
|
|
48
|
+
viewRef.current = ref;
|
|
49
|
+
|
|
50
|
+
// This is a hack. Ideally we would forwardRef to the underlying
|
|
51
|
+
// host component. However, since TVFocusGuide has its own methods that can be
|
|
52
|
+
// called as well, if we used the standard forwardRef then these
|
|
53
|
+
// methods wouldn't be accessible
|
|
54
|
+
//
|
|
55
|
+
// Here we mutate the ref, so that the user can use the standart native
|
|
56
|
+
// methods like `measureLayout()` etc. while also having access to
|
|
57
|
+
// imperative methods of this component like `requestTVFocus()`.
|
|
58
|
+
if (ref) {
|
|
59
|
+
ref.requestTVFocus = requestTVFocus;
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
});
|
|
63
|
+
|
|
30
64
|
return (
|
|
31
65
|
<TextAncestor.Provider value={false}>
|
|
32
|
-
<ViewNativeComponent {...props} ref={
|
|
66
|
+
<ViewNativeComponent {...props} ref={_setNativeRef} />
|
|
33
67
|
</TextAncestor.Provider>
|
|
34
68
|
);
|
|
35
69
|
});
|
|
@@ -93,15 +93,21 @@ interface NativeCommands {
|
|
|
93
93
|
viewRef: React.ElementRef<HostComponent<mixed>>,
|
|
94
94
|
pressed: boolean,
|
|
95
95
|
) => void;
|
|
96
|
-
//
|
|
96
|
+
// Focus Guide API
|
|
97
97
|
+setDestinations: (
|
|
98
98
|
viewRef: React.ElementRef<HostComponent<mixed>>,
|
|
99
|
-
destinations: Array<
|
|
99
|
+
destinations: Array<number>, // Node handles are basically integers
|
|
100
100
|
) => void;
|
|
101
|
+
+requestTVFocus: (viewRef: React.ElementRef<HostComponent<mixed>>) => void;
|
|
101
102
|
}
|
|
102
103
|
|
|
103
104
|
export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
|
|
104
|
-
supportedCommands: [
|
|
105
|
+
supportedCommands: [
|
|
106
|
+
'hotspotUpdate',
|
|
107
|
+
'setPressed',
|
|
108
|
+
'setDestinations',
|
|
109
|
+
'requestTVFocus',
|
|
110
|
+
],
|
|
105
111
|
});
|
|
106
112
|
|
|
107
113
|
export default ViewNativeComponent;
|
|
@@ -42,6 +42,7 @@ import {
|
|
|
42
42
|
type ChildListState,
|
|
43
43
|
type ListDebugInfo,
|
|
44
44
|
} from './VirtualizedListContext.js';
|
|
45
|
+
import TVFocusGuideView from '../Components/TV/TVFocusGuideView';
|
|
45
46
|
|
|
46
47
|
type Item = any;
|
|
47
48
|
|
|
@@ -1116,16 +1117,30 @@ class VirtualizedList extends React.PureComponent<Props, State> {
|
|
|
1116
1117
|
unregisterAsNestedChild: this._unregisterAsNestedChild,
|
|
1117
1118
|
debugInfo: this._getDebugInfo(),
|
|
1118
1119
|
}}>
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
this.props.
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1120
|
+
<TVFocusGuideView
|
|
1121
|
+
trapFocusLeft={
|
|
1122
|
+
horizontalOrDefault(this.props.horizontal) && this.state.first > 0
|
|
1123
|
+
}
|
|
1124
|
+
trapFocusRight={
|
|
1125
|
+
horizontalOrDefault(this.props.horizontal) && this._hasMore
|
|
1126
|
+
}
|
|
1127
|
+
trapFocusUp={
|
|
1128
|
+
!horizontalOrDefault(this.props.horizontal) && this.state.first > 0
|
|
1129
|
+
}
|
|
1130
|
+
trapFocusDown={
|
|
1131
|
+
!horizontalOrDefault(this.props.horizontal) && this._hasMore
|
|
1132
|
+
}>
|
|
1133
|
+
{React.cloneElement(
|
|
1134
|
+
(
|
|
1135
|
+
this.props.renderScrollComponent ||
|
|
1136
|
+
this._defaultRenderScrollComponent
|
|
1137
|
+
)(scrollProps),
|
|
1138
|
+
{
|
|
1139
|
+
ref: this._captureScrollRef,
|
|
1140
|
+
},
|
|
1141
|
+
cells,
|
|
1142
|
+
)}
|
|
1143
|
+
</TVFocusGuideView>
|
|
1129
1144
|
</VirtualizedListContextProvider>
|
|
1130
1145
|
);
|
|
1131
1146
|
let ret: React.Node = innerRet;
|
|
@@ -19,10 +19,6 @@ import type {EdgeInsetsProp} from '../../StyleSheet/EdgeInsetsPropType';
|
|
|
19
19
|
import type {ViewStyleProp} from '../../StyleSheet/StyleSheet';
|
|
20
20
|
import type {PressEvent} from '../../Types/CoreEventTypes';
|
|
21
21
|
|
|
22
|
-
const LogBoxTouchable = Platform.isTVOS ?
|
|
23
|
-
TouchableHighlight :
|
|
24
|
-
TouchableWithoutFeedback;
|
|
25
|
-
|
|
26
22
|
type Props = $ReadOnly<{|
|
|
27
23
|
backgroundColor: $ReadOnly<{|
|
|
28
24
|
default: string,
|
|
@@ -61,15 +57,23 @@ function LogBoxButton(props: Props): React.Node {
|
|
|
61
57
|
|
|
62
58
|
return props.onPress == null ? (
|
|
63
59
|
content
|
|
60
|
+
) : Platform.isTV ? (
|
|
61
|
+
<TouchableHighlight
|
|
62
|
+
tvParallaxProperties={{enabled: false}}
|
|
63
|
+
hitSlop={props.hitSlop}
|
|
64
|
+
onPress={props.onPress}
|
|
65
|
+
onPressIn={() => setPressed(true)}
|
|
66
|
+
onPressOut={() => setPressed(false)}>
|
|
67
|
+
{content}
|
|
68
|
+
</TouchableHighlight>
|
|
64
69
|
) : (
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
</LogBoxTouchable>
|
|
70
|
+
<TouchableWithoutFeedback
|
|
71
|
+
hitSlop={props.hitSlop}
|
|
72
|
+
onPress={props.onPress}
|
|
73
|
+
onPressIn={() => setPressed(true)}
|
|
74
|
+
onPressOut={() => setPressed(false)}>
|
|
75
|
+
{content}
|
|
76
|
+
</TouchableWithoutFeedback>
|
|
73
77
|
);
|
|
74
78
|
}
|
|
75
79
|
|
|
@@ -67,7 +67,7 @@ function LogBoxLogNotification(props: Props): React.Node {
|
|
|
67
67
|
}}>
|
|
68
68
|
<View
|
|
69
69
|
style={toastStyles.tvDismissContainer}>
|
|
70
|
-
<Message message={{content: 'Dismiss'}} />
|
|
70
|
+
<Message message={{content: 'Dismiss', substitutions: []}} />
|
|
71
71
|
</View>
|
|
72
72
|
</LogBoxButton>
|
|
73
73
|
) : null}
|