react-native-tvos 0.69.6-2 → 0.69.6-3
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 +28 -11
- 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/Core/ReactNativeVersion.js +1 -1
- 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 +2 -1
- package/React/Base/RCTVersion.m +1 -1
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +48 -4
- package/React/Views/RCTTVView.h +5 -0
- package/React/Views/RCTTVView.m +19 -0
- package/React/Views/RCTViewManager.m +1 -0
- 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/modules/systeminfo/ReactNativeVersion.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/events/Event.java +18 -0
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.java +190 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.java +5 -0
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/ReactCommon/react/renderer/components/view/ViewProps.cpp +13 -1
- package/ReactCommon/react/renderer/components/view/ViewProps.h +2 -1
- package/android/com/facebook/react/hermes-engine/{0.69.6-2/hermes-engine-0.69.6-2-release-javadoc.jar → 0.69.6-3/hermes-engine-0.69.6-3-debug-javadoc.jar} +0 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3-debug-javadoc.jar.md5 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3-debug-javadoc.jar.sha1 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3-debug-javadoc.jar.sha256 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3-debug-javadoc.jar.sha512 +1 -0
- package/android/com/facebook/react/hermes-engine/{0.69.6-2/hermes-engine-0.69.6-2-debug-sources.jar → 0.69.6-3/hermes-engine-0.69.6-3-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.6-3/hermes-engine-0.69.6-3-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.6-3/hermes-engine-0.69.6-3-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.6-3/hermes-engine-0.69.6-3-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.6-3/hermes-engine-0.69.6-3-debug-sources.jar.sha512} +0 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3-debug.aar +0 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3-debug.aar.md5 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3-debug.aar.sha1 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3-debug.aar.sha256 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3-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.6-3/hermes-engine-0.69.6-3-release-javadoc.jar} +0 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3-release-javadoc.jar.md5 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3-release-javadoc.jar.sha1 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3-release-javadoc.jar.sha256 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3-release-javadoc.jar.sha512 +1 -0
- package/android/com/facebook/react/hermes-engine/{0.69.6-2/hermes-engine-0.69.6-2-release-sources.jar → 0.69.6-3/hermes-engine-0.69.6-3-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.6-3/hermes-engine-0.69.6-3-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.6-3/hermes-engine-0.69.6-3-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.6-3/hermes-engine-0.69.6-3-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.6-3/hermes-engine-0.69.6-3-release-sources.jar.sha512} +0 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3-release.aar +0 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3-release.aar.md5 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3-release.aar.sha1 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3-release.aar.sha256 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3-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.6-3/hermes-engine-0.69.6-3.module} +45 -45
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3.module.md5 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3.module.sha1 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3.module.sha256 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3.module.sha512 +1 -0
- package/android/com/facebook/react/hermes-engine/{0.69.6-2/hermes-engine-0.69.6-2.pom → 0.69.6-3/hermes-engine-0.69.6-3.pom} +1 -1
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3.pom.md5 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3.pom.sha1 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3.pom.sha256 +1 -0
- package/android/com/facebook/react/hermes-engine/0.69.6-3/hermes-engine-0.69.6-3.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-debug-javadoc.jar → 0.69.6-3/react-native-0.69.6-3-debug-javadoc.jar} +0 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-debug-javadoc.jar.md5 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-debug-javadoc.jar.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-debug-javadoc.jar.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-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.6-3/react-native-0.69.6-3-debug-sources.jar} +0 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-debug-sources.jar.md5 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-debug-sources.jar.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-debug-sources.jar.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-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.6-3/react-native-0.69.6-3-debug.aar} +0 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-debug.aar.md5 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-debug.aar.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-debug.aar.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-debug.aar.sha512 +1 -0
- package/android/com/facebook/react/react-native/{0.69.6-2/react-native-0.69.6-2-release-javadoc.jar → 0.69.6-3/react-native-0.69.6-3-release-javadoc.jar} +0 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-release-javadoc.jar.md5 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-release-javadoc.jar.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-release-javadoc.jar.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-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.6-3/react-native-0.69.6-3-release-sources.jar} +0 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-release-sources.jar.md5 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-release-sources.jar.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-release-sources.jar.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-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.6-3/react-native-0.69.6-3-release.aar} +0 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-release.aar.md5 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-release.aar.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-release.aar.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3-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.6-3/react-native-0.69.6-3.module} +57 -57
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3.module.md5 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3.module.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3.module.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3.module.sha512 +1 -0
- package/android/com/facebook/react/react-native/{0.69.6-2/react-native-0.69.6-2.pom → 0.69.6-3/react-native-0.69.6-3.pom} +1 -1
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3.pom.md5 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3.pom.sha1 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3.pom.sha256 +1 -0
- package/android/com/facebook/react/react-native/0.69.6-3/react-native-0.69.6-3.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 +1 -1
- package/template/package.json +1 -1
- package/tvos-types.d.ts +9 -0
- 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
|
@@ -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);
|
|
@@ -28,12 +28,14 @@ type TVFocusGuideViewProps = $ReadOnly<{
|
|
|
28
28
|
/**
|
|
29
29
|
* The views the focus should go to
|
|
30
30
|
*/
|
|
31
|
-
destinations
|
|
31
|
+
destinations?: ?(Object[]),
|
|
32
32
|
|
|
33
33
|
/**
|
|
34
34
|
* @deprecated Don't use it, no longer necessary.
|
|
35
35
|
*/
|
|
36
36
|
safePadding?: 'vertical' | 'horizontal' | 'both' | null,
|
|
37
|
+
|
|
38
|
+
autoFocus?: boolean,
|
|
37
39
|
}>;
|
|
38
40
|
|
|
39
41
|
const TVFocusGuideView = ({
|
|
@@ -44,14 +46,24 @@ const TVFocusGuideView = ({
|
|
|
44
46
|
const enabledStyle = {display: enabled ? 'flex' : 'none'};
|
|
45
47
|
const style = [styles.container, props.style, enabledStyle];
|
|
46
48
|
|
|
49
|
+
// `autoFocus` and `destinations` props shouldn't be used together.
|
|
50
|
+
// Otherwise they can conflict with each other. So if `destinations` is
|
|
51
|
+
// provided, we set `autoFocus` prop to false to avoid that conflict.
|
|
52
|
+
const autoFocus = props.destinations?.length ? false : props.autoFocus;
|
|
53
|
+
|
|
47
54
|
if (Platform.isTVOS) {
|
|
48
|
-
return
|
|
55
|
+
return (
|
|
56
|
+
<FocusGuideViewTVOS {...props} style={style} autoFocus={autoFocus} />
|
|
57
|
+
);
|
|
49
58
|
}
|
|
50
59
|
|
|
51
60
|
if (Platform.isTV) {
|
|
52
|
-
return
|
|
61
|
+
return (
|
|
62
|
+
<FocusGuideViewAndroidTV {...props} style={style} autoFocus={autoFocus} />
|
|
63
|
+
);
|
|
53
64
|
}
|
|
54
65
|
|
|
66
|
+
// $FlowFixMe[prop-missing]
|
|
55
67
|
return <ReactNative.View {...props} style={style} />;
|
|
56
68
|
};
|
|
57
69
|
|
|
@@ -59,17 +71,21 @@ const FocusGuideViewTVOS = (props: TVFocusGuideViewProps) => {
|
|
|
59
71
|
const focusGuideRef = React.useRef(null);
|
|
60
72
|
|
|
61
73
|
React.useEffect(() => {
|
|
62
|
-
|
|
63
|
-
.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
74
|
+
if (props.destinations) {
|
|
75
|
+
const nativeDestinations: any = (props.destinations || [])
|
|
76
|
+
.map(d => ReactNative.findNodeHandle(d))
|
|
77
|
+
.filter(c => c !== 0 && c !== null && c !== undefined);
|
|
78
|
+
const hostComponentRef = ReactNativeShims.findHostInstance_DEPRECATED(
|
|
79
|
+
focusGuideRef?.current,
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
hostComponentRef &&
|
|
83
|
+
Commands.setDestinations(hostComponentRef, nativeDestinations);
|
|
84
|
+
}
|
|
70
85
|
}, [props.destinations]);
|
|
71
86
|
|
|
72
87
|
return (
|
|
88
|
+
// $FlowFixMe[prop-missing]
|
|
73
89
|
<ReactNative.View ref={focusGuideRef} {...props} collapsable={false} />
|
|
74
90
|
);
|
|
75
91
|
};
|
|
@@ -84,6 +100,7 @@ const FocusGuideViewAndroidTV = (props: TVFocusGuideViewProps) => {
|
|
|
84
100
|
);
|
|
85
101
|
|
|
86
102
|
return (
|
|
103
|
+
// $FlowFixMe[prop-missing]
|
|
87
104
|
<ReactNative.View
|
|
88
105
|
{...props}
|
|
89
106
|
focusable={props.focusable ?? true}
|
|
@@ -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
|
}
|
|
@@ -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}
|
|
@@ -26,9 +26,6 @@ typedef void (^AnimatedOperation)(RCTNativeAnimatedNodesManager *nodesManager);
|
|
|
26
26
|
NSMutableArray<AnimatedOperation> *_operations;
|
|
27
27
|
// Operations called before views have been updated.
|
|
28
28
|
NSMutableArray<AnimatedOperation> *_preOperations;
|
|
29
|
-
NSMutableDictionary<NSNumber *, NSNumber *> *_animIdIsManagedByFabric;
|
|
30
|
-
// A set of nodeIDs managed by Fabric.
|
|
31
|
-
NSMutableSet<NSNumber *> *_nodeIDsManagedByFabric;
|
|
32
29
|
}
|
|
33
30
|
|
|
34
31
|
RCT_EXPORT_MODULE();
|
|
@@ -43,8 +40,6 @@ RCT_EXPORT_MODULE();
|
|
|
43
40
|
if (self = [super init]) {
|
|
44
41
|
_operations = [NSMutableArray new];
|
|
45
42
|
_preOperations = [NSMutableArray new];
|
|
46
|
-
_animIdIsManagedByFabric = [NSMutableDictionary new];
|
|
47
|
-
_nodeIDsManagedByFabric = [NSMutableSet new];
|
|
48
43
|
}
|
|
49
44
|
return self;
|
|
50
45
|
}
|
|
@@ -113,9 +108,6 @@ RCT_EXPORT_METHOD(updateAnimatedNodeConfig:(double)tag
|
|
|
113
108
|
RCT_EXPORT_METHOD(connectAnimatedNodes:(double)parentTag
|
|
114
109
|
childTag:(double)childTag)
|
|
115
110
|
{
|
|
116
|
-
if ([_nodeIDsManagedByFabric containsObject:@(childTag)]) {
|
|
117
|
-
[_nodeIDsManagedByFabric addObject:@(parentTag)];
|
|
118
|
-
}
|
|
119
111
|
[self addOperationBlock:^(RCTNativeAnimatedNodesManager *nodesManager) {
|
|
120
112
|
[nodesManager connectAnimatedNodes:[NSNumber numberWithDouble:parentTag] childTag:[NSNumber numberWithDouble:childTag]];
|
|
121
113
|
}];
|
|
@@ -138,11 +130,7 @@ RCT_EXPORT_METHOD(startAnimatingNode:(double)animationId
|
|
|
138
130
|
[nodesManager startAnimatingNode:[NSNumber numberWithDouble:animationId] nodeTag:[NSNumber numberWithDouble:nodeTag] config:config endCallback:callBack];
|
|
139
131
|
}];
|
|
140
132
|
|
|
141
|
-
|
|
142
|
-
if (isNodeManagedByFabric) {
|
|
143
|
-
self->_animIdIsManagedByFabric[[NSNumber numberWithDouble:animationId]] = @YES;
|
|
144
|
-
[self flushOperationQueues];
|
|
145
|
-
}
|
|
133
|
+
[self flushOperationQueues];
|
|
146
134
|
}
|
|
147
135
|
|
|
148
136
|
RCT_EXPORT_METHOD(stopAnimation:(double)animationId)
|
|
@@ -150,9 +138,7 @@ RCT_EXPORT_METHOD(stopAnimation:(double)animationId)
|
|
|
150
138
|
[self addOperationBlock:^(RCTNativeAnimatedNodesManager *nodesManager) {
|
|
151
139
|
[nodesManager stopAnimation:[NSNumber numberWithDouble:animationId]];
|
|
152
140
|
}];
|
|
153
|
-
|
|
154
|
-
[self flushOperationQueues];
|
|
155
|
-
}
|
|
141
|
+
[self flushOperationQueues];
|
|
156
142
|
}
|
|
157
143
|
|
|
158
144
|
RCT_EXPORT_METHOD(setAnimatedNodeValue:(double)nodeTag
|
|
@@ -192,9 +178,6 @@ RCT_EXPORT_METHOD(extractAnimatedNodeOffset:(double)nodeTag)
|
|
|
192
178
|
RCT_EXPORT_METHOD(connectAnimatedNodeToView:(double)nodeTag
|
|
193
179
|
viewTag:(double)viewTag)
|
|
194
180
|
{
|
|
195
|
-
if (RCTUIManagerTypeForTagIsFabric(@(viewTag))) {
|
|
196
|
-
[_nodeIDsManagedByFabric addObject:@(nodeTag)];
|
|
197
|
-
}
|
|
198
181
|
[self addOperationBlock:^(RCTNativeAnimatedNodesManager *nodesManager) {
|
|
199
182
|
// viewName is not used when node is managed by Fabric, and nodes are always managed by Fabric in Bridgeless.
|
|
200
183
|
[nodesManager connectAnimatedNodeToView:[NSNumber numberWithDouble:nodeTag] viewTag:[NSNumber numberWithDouble:viewTag] viewName:nil];
|
|
@@ -291,7 +274,6 @@ RCT_EXPORT_METHOD(getValue:(double)nodeTag saveValueCallback:(RCTResponseSenderB
|
|
|
291
274
|
_preOperations = [NSMutableArray new];
|
|
292
275
|
_operations = [NSMutableArray new];
|
|
293
276
|
|
|
294
|
-
|
|
295
277
|
RCTExecuteOnMainQueue(^{
|
|
296
278
|
for (AnimatedOperation operation in preOperations) {
|
|
297
279
|
operation(self->_nodesManager);
|
|
@@ -16,6 +16,7 @@ import type {NativeColorValue} from './PlatformColorValueTypes';
|
|
|
16
16
|
|
|
17
17
|
export type ____ColorValue_Internal = null | string | number | NativeColorValue;
|
|
18
18
|
|
|
19
|
+
export type ColorValue = ____ColorValue_Internal;
|
|
19
20
|
export type ColorArrayValue = null | $ReadOnlyArray<____ColorValue_Internal>;
|
|
20
21
|
export type PointValue = {
|
|
21
22
|
x: number,
|
package/README.md
CHANGED
|
@@ -206,7 +206,8 @@ class Game2048 extends React.Component {
|
|
|
206
206
|
|
|
207
207
|
| Prop | Value | Description |
|
|
208
208
|
|---|---|---|
|
|
209
|
-
| destinations | any[] | Array of `Component`s to register as destinations of the FocusGuideView |
|
|
209
|
+
| destinations | any[]? | Array of `Component`s to register as destinations of the FocusGuideView |
|
|
210
|
+
| autoFocus | boolean? | If true, `TVFocusGuide` will automatically manage focus for you. It will redirect the focus to the first focusable child on the first visit. It also remembers the last focused child and redirects the focus to it on the subsequent visits. |
|
|
210
211
|
|
|
211
212
|
- _Next Focus Direction_: the props `nextFocus*` on `View` should work as expected on iOS too (previously android only). One caveat is that if there is no focusable in the `nextFocusable*` direction next to the starting view, iOS doesn't check if we want to override the destination.
|
|
212
213
|
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -52,6 +52,7 @@ using namespace facebook::react;
|
|
|
52
52
|
UIView *_nextFocusLeft;
|
|
53
53
|
UIView *_nextFocusRight;
|
|
54
54
|
UIView *_nextFocusActiveTarget;
|
|
55
|
+
BOOL _autoFocus;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
@synthesize removeClippedSubviews = _removeClippedSubviews;
|
|
@@ -131,7 +132,7 @@ using namespace facebook::react;
|
|
|
131
132
|
return (RCTRootComponentView *)rootview;
|
|
132
133
|
}
|
|
133
134
|
|
|
134
|
-
- (void)
|
|
135
|
+
- (void)addFocusGuide {
|
|
135
136
|
if (self.focusGuide == nil) {
|
|
136
137
|
self.focusGuide = [UIFocusGuide new];
|
|
137
138
|
[self addLayoutGuide:self.focusGuide];
|
|
@@ -141,7 +142,17 @@ using namespace facebook::react;
|
|
|
141
142
|
[self.focusGuide.widthAnchor constraintEqualToAnchor:self.widthAnchor].active = YES;
|
|
142
143
|
[self.focusGuide.heightAnchor constraintEqualToAnchor:self.heightAnchor].active = YES;
|
|
143
144
|
}
|
|
145
|
+
}
|
|
144
146
|
|
|
147
|
+
- (void)removeFocusGuide {
|
|
148
|
+
if (self.focusGuide != nil) {
|
|
149
|
+
[self removeLayoutGuide:self.focusGuide];
|
|
150
|
+
self.focusGuide = nil;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
- (void)addFocusDestinations:(NSArray*)destinations {
|
|
155
|
+
[self addFocusGuide];
|
|
145
156
|
self.focusGuide.preferredFocusEnvironments = destinations;
|
|
146
157
|
}
|
|
147
158
|
|
|
@@ -416,6 +427,17 @@ using namespace facebook::react;
|
|
|
416
427
|
if (context.previouslyFocusedView == context.nextFocusedView) {
|
|
417
428
|
return;
|
|
418
429
|
}
|
|
430
|
+
|
|
431
|
+
if (_autoFocus && self.focusGuide != nil && context.previouslyFocusedItem != nil) {
|
|
432
|
+
// Whenever focus leaves the container, `nextFocusedView` is the destination, the item outside the container.
|
|
433
|
+
// So, `previouslyFocusedItem` is always the last focused child of `TVFocusGuide`.
|
|
434
|
+
// We should update `preferredFocusEnvironments` in this case to make sure `FocusGuide` remembers
|
|
435
|
+
// the last focused element and redirects the focus to it whenever focus comes back.
|
|
436
|
+
// We also add `self` as the second option in case `previouslyFocusedItem` becomes unreachable (e.g gets detached).
|
|
437
|
+
// `self` helps redirecting focus to the first focusable element in that case.
|
|
438
|
+
self.focusGuide.preferredFocusEnvironments = @[context.previouslyFocusedItem, self];
|
|
439
|
+
}
|
|
440
|
+
|
|
419
441
|
if (context.nextFocusedView == self && self.isUserInteractionEnabled ) {
|
|
420
442
|
[self becomeFirstResponder];
|
|
421
443
|
[self enableDirectionalFocusGuides];
|
|
@@ -825,6 +847,16 @@ using namespace facebook::react;
|
|
|
825
847
|
_nextFocusRight = nil;
|
|
826
848
|
}
|
|
827
849
|
}
|
|
850
|
+
|
|
851
|
+
// `autoFocus`
|
|
852
|
+
if (oldViewProps.autoFocus != newViewProps.autoFocus) {
|
|
853
|
+
_autoFocus = newViewProps.autoFocus;
|
|
854
|
+
if (_autoFocus == true) {
|
|
855
|
+
[self addFocusGuide];
|
|
856
|
+
} else {
|
|
857
|
+
[self removeFocusGuide];
|
|
858
|
+
}
|
|
859
|
+
}
|
|
828
860
|
#endif
|
|
829
861
|
|
|
830
862
|
|
|
@@ -910,10 +942,22 @@ using namespace facebook::react;
|
|
|
910
942
|
if ([_propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN containsObject:@"opacity"]) {
|
|
911
943
|
self.layer.opacity = (float)props.opacity;
|
|
912
944
|
}
|
|
913
|
-
|
|
945
|
+
|
|
946
|
+
// We reset the `preferredFocusEnvironments` in case of recycling to prevent bugs.
|
|
947
|
+
// Resetting it also introduces a bug but it prevents much worse ones.
|
|
948
|
+
// The destination `focusEnvironment` reference could be recycled and used in another place so we might
|
|
949
|
+
// be holding a reference and redirecting the focus to the wrong view.
|
|
950
|
+
// To make sure that's not the case, we reset the destination to `self` which will
|
|
951
|
+
// redirect the focus to the first focusable child.
|
|
914
952
|
if (self.focusGuide != nil) {
|
|
915
|
-
|
|
916
|
-
|
|
953
|
+
self.focusGuide.preferredFocusEnvironments = @[self];
|
|
954
|
+
}
|
|
955
|
+
|
|
956
|
+
// If `autoFocus` is enabled, addition/removal process of `UIFocusGuide` is managed
|
|
957
|
+
// inside `updateProps` method. Removing `UIFocusGuide` here for that case would cause
|
|
958
|
+
// weird bugs and state loss.
|
|
959
|
+
if (!_autoFocus) {
|
|
960
|
+
[self removeFocusGuide];
|
|
917
961
|
}
|
|
918
962
|
|
|
919
963
|
_propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN = nil;
|
package/React/Views/RCTTVView.h
CHANGED
|
@@ -42,6 +42,11 @@
|
|
|
42
42
|
@property (nonatomic, strong) UIFocusGuide * focusGuideLeft;
|
|
43
43
|
@property (nonatomic, strong) UIFocusGuide * focusGuideRight;
|
|
44
44
|
|
|
45
|
+
/**
|
|
46
|
+
* Auto focus
|
|
47
|
+
*/
|
|
48
|
+
@property (nonatomic, assign) BOOL autoFocus;
|
|
49
|
+
|
|
45
50
|
- (instancetype)initWithBridge:(RCTBridge *)bridge;
|
|
46
51
|
|
|
47
52
|
/**
|
package/React/Views/RCTTVView.m
CHANGED
|
@@ -261,6 +261,17 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : unused)
|
|
|
261
261
|
if (context.previouslyFocusedView == context.nextFocusedView) {
|
|
262
262
|
return;
|
|
263
263
|
}
|
|
264
|
+
|
|
265
|
+
if (_autoFocus && self.focusGuide != nil && context.previouslyFocusedItem != nil) {
|
|
266
|
+
// Whenever focus leaves the container, `nextFocusedView` is the destination, the item outside the container.
|
|
267
|
+
// So, `previouslyFocusedItem` is always the last focused child of `TVFocusGuide`.
|
|
268
|
+
// We should update `preferredFocusEnvironments` in this case to make sure `FocusGuide` remembers
|
|
269
|
+
// the last focused element and redirects the focus to it whenever focus comes back.
|
|
270
|
+
// We also add `self` as the second option in case `previouslyFocusedItem` becomes unreachable (e.g gets detached).
|
|
271
|
+
// `self` helps redirecting focus to the first focusable element in that case.
|
|
272
|
+
self.focusGuide.preferredFocusEnvironments = @[context.previouslyFocusedItem, self];
|
|
273
|
+
}
|
|
274
|
+
|
|
264
275
|
if (context.nextFocusedView == self && self.isTVSelectable ) {
|
|
265
276
|
[self becomeFirstResponder];
|
|
266
277
|
[self enableDirectionalFocusGuides];
|
|
@@ -432,6 +443,14 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : unused)
|
|
|
432
443
|
[self setPreferredFocus:hasTVPreferredFocus];
|
|
433
444
|
}
|
|
434
445
|
|
|
446
|
+
- (void)setAutoFocus:(BOOL)autoFocus
|
|
447
|
+
{
|
|
448
|
+
if (_autoFocus != autoFocus) {
|
|
449
|
+
_autoFocus = autoFocus;
|
|
450
|
+
[self addFocusGuide:@[self]];
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
|
|
435
454
|
- (void)addFocusGuide:(NSArray*)destinations {
|
|
436
455
|
if (self.focusGuide == nil) {
|
|
437
456
|
self.focusGuide = [UIFocusGuide new];
|
|
@@ -137,6 +137,7 @@ RCT_EXPORT_VIEW_PROPERTY(nextFocusUp, NSNumber)
|
|
|
137
137
|
RCT_EXPORT_VIEW_PROPERTY(nextFocusDown, NSNumber)
|
|
138
138
|
RCT_EXPORT_VIEW_PROPERTY(nextFocusLeft, NSNumber)
|
|
139
139
|
RCT_EXPORT_VIEW_PROPERTY(nextFocusRight, NSNumber)
|
|
140
|
+
RCT_EXPORT_VIEW_PROPERTY(autoFocus, BOOL)
|
|
140
141
|
#endif
|
|
141
142
|
|
|
142
143
|
// Accessibility related properties
|