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
|
@@ -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,9 @@ 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. `destinations` prop takes precedence over this prop when used together. |
|
|
211
|
+
| trapFocus* (Up, Down, Left, Right) | Prevents focus escaping from the container for the given directions. |
|
|
210
212
|
|
|
211
213
|
- _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
214
|
|
package/React/Base/RCTRootView.m
CHANGED
|
@@ -167,6 +167,12 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : (NSCoder *)aDecoder)
|
|
|
167
167
|
#if TARGET_OS_TV
|
|
168
168
|
- (NSArray<id<UIFocusEnvironment>> *)preferredFocusEnvironments
|
|
169
169
|
{
|
|
170
|
+
if (self.reactPreferredFocusEnvironments != nil) {
|
|
171
|
+
NSArray<id<UIFocusEnvironment>> *tempReactPreferredFocusEnvironments = self.reactPreferredFocusEnvironments;
|
|
172
|
+
self.reactPreferredFocusEnvironments = nil;
|
|
173
|
+
return tempReactPreferredFocusEnvironments;
|
|
174
|
+
}
|
|
175
|
+
|
|
170
176
|
if (self.reactPreferredFocusedView && self.reactPreferredFocusedView.window != nil) {
|
|
171
177
|
return @[self.reactPreferredFocusedView];
|
|
172
178
|
}
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
#if TARGET_OS_TV
|
|
28
28
|
@property (nonatomic, strong) RCTTVRemoteHandler *tvRemoteHandler;
|
|
29
29
|
@property (nonatomic, weak) UIView *reactPreferredFocusedView;
|
|
30
|
+
@property (nonatomic, copy, nullable) NSArray<id<UIFocusEnvironment>> *reactPreferredFocusEnvironments;
|
|
30
31
|
#endif
|
|
31
32
|
|
|
32
33
|
- (void)contentViewInvalidated;
|
package/React/Base/RCTVersion.m
CHANGED
|
@@ -23,8 +23,8 @@ NSDictionary* RCTGetReactNativeVersion(void)
|
|
|
23
23
|
__rnVersion = @{
|
|
24
24
|
RCTVersionMajor: @(0),
|
|
25
25
|
RCTVersionMinor: @(69),
|
|
26
|
-
RCTVersionPatch: @(
|
|
27
|
-
RCTVersionPrerelease: @"
|
|
26
|
+
RCTVersionPatch: @(8),
|
|
27
|
+
RCTVersionPrerelease: @"0",
|
|
28
28
|
};
|
|
29
29
|
});
|
|
30
30
|
return __rnVersion;
|
|
@@ -23,6 +23,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|
|
23
23
|
#if TARGET_OS_TV
|
|
24
24
|
@property (nonatomic, strong, nullable) RCTTVRemoteHandler *tvRemoteHandler;
|
|
25
25
|
@property (nonatomic, weak, nullable) UIView *reactPreferredFocusedView;
|
|
26
|
+
@property (nonatomic, copy, nullable) NSArray<id<UIFocusEnvironment>> *reactPreferredFocusEnvironments;
|
|
26
27
|
#endif
|
|
27
28
|
|
|
28
29
|
@end
|
|
@@ -35,6 +35,12 @@ using namespace facebook::react;
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
- (NSArray<id<UIFocusEnvironment>> *)preferredFocusEnvironments {
|
|
38
|
+
if (self.reactPreferredFocusEnvironments != nil) {
|
|
39
|
+
NSArray<id<UIFocusEnvironment>> *tempReactPreferredFocusEnvironments = self.reactPreferredFocusEnvironments;
|
|
40
|
+
self.reactPreferredFocusEnvironments = nil;
|
|
41
|
+
return tempReactPreferredFocusEnvironments;
|
|
42
|
+
}
|
|
43
|
+
|
|
38
44
|
if (self.reactPreferredFocusedView && self.reactPreferredFocusedView.window != nil) {
|
|
39
45
|
return @[self.reactPreferredFocusedView];
|
|
40
46
|
}
|
|
@@ -52,6 +52,13 @@ using namespace facebook::react;
|
|
|
52
52
|
UIView *_nextFocusLeft;
|
|
53
53
|
UIView *_nextFocusRight;
|
|
54
54
|
UIView *_nextFocusActiveTarget;
|
|
55
|
+
BOOL _autoFocus;
|
|
56
|
+
BOOL _trapFocusUp;
|
|
57
|
+
BOOL _trapFocusDown;
|
|
58
|
+
BOOL _trapFocusLeft;
|
|
59
|
+
BOOL _trapFocusRight;
|
|
60
|
+
NSArray* _focusDestinations;
|
|
61
|
+
id<UIFocusItem> _previouslyFocusedItem;
|
|
55
62
|
}
|
|
56
63
|
|
|
57
64
|
@synthesize removeClippedSubviews = _removeClippedSubviews;
|
|
@@ -131,7 +138,7 @@ using namespace facebook::react;
|
|
|
131
138
|
return (RCTRootComponentView *)rootview;
|
|
132
139
|
}
|
|
133
140
|
|
|
134
|
-
- (void)
|
|
141
|
+
- (void)addFocusGuide:(NSArray*)destinations {
|
|
135
142
|
if (self.focusGuide == nil) {
|
|
136
143
|
self.focusGuide = [UIFocusGuide new];
|
|
137
144
|
[self addLayoutGuide:self.focusGuide];
|
|
@@ -141,10 +148,49 @@ using namespace facebook::react;
|
|
|
141
148
|
[self.focusGuide.widthAnchor constraintEqualToAnchor:self.widthAnchor].active = YES;
|
|
142
149
|
[self.focusGuide.heightAnchor constraintEqualToAnchor:self.heightAnchor].active = YES;
|
|
143
150
|
}
|
|
144
|
-
|
|
151
|
+
|
|
145
152
|
self.focusGuide.preferredFocusEnvironments = destinations;
|
|
146
153
|
}
|
|
147
154
|
|
|
155
|
+
- (void)removeFocusGuide {
|
|
156
|
+
if (self.focusGuide != nil) {
|
|
157
|
+
_focusDestinations = nil;
|
|
158
|
+
_previouslyFocusedItem = nil;
|
|
159
|
+
|
|
160
|
+
[self removeLayoutGuide:self.focusGuide];
|
|
161
|
+
self.focusGuide = nil;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/// Responsible of determining what focusGuide's next state should be based on the active properties of the component.
|
|
166
|
+
- (void)handleFocusGuide
|
|
167
|
+
{
|
|
168
|
+
// `destinations` should always be favored against `autoFocus` feature, if provided.
|
|
169
|
+
if (_focusDestinations != nil) {
|
|
170
|
+
[self addFocusGuide:_focusDestinations];
|
|
171
|
+
} else if (_autoFocus && _previouslyFocusedItem != nil) {
|
|
172
|
+
// We also add `self` as the second option in case `previouslyFocusedItem` becomes unreachable (e.g gets detached).
|
|
173
|
+
// `self` helps redirecting focus to the first focusable element in that case.
|
|
174
|
+
[self addFocusGuide:@[_previouslyFocusedItem, self]];
|
|
175
|
+
} else if (_autoFocus) {
|
|
176
|
+
[self addFocusGuide:@[self]];
|
|
177
|
+
} else {
|
|
178
|
+
// Then there's no need to have `focusGuide`, remove it to prevent potential bugs.
|
|
179
|
+
[self removeFocusGuide];
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
- (void)setFocusDestinations:(NSArray*)destinations
|
|
184
|
+
{
|
|
185
|
+
if(destinations.count == 0) {
|
|
186
|
+
_focusDestinations = nil;
|
|
187
|
+
} else {
|
|
188
|
+
_focusDestinations = destinations;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
[self handleFocusGuide];
|
|
192
|
+
}
|
|
193
|
+
|
|
148
194
|
- (void)sendFocusNotification:(__unused UIFocusUpdateContext *)context
|
|
149
195
|
{
|
|
150
196
|
[self sendNotificationWithEventType:@"focus"];
|
|
@@ -411,11 +457,38 @@ using namespace facebook::react;
|
|
|
411
457
|
}
|
|
412
458
|
}
|
|
413
459
|
|
|
460
|
+
- (BOOL)shouldUpdateFocusInContext:(UIFocusUpdateContext *)context
|
|
461
|
+
{
|
|
462
|
+
// This is the `trapFocus*` logic that prevents the focus updates if
|
|
463
|
+
// focus should be trapped and `nextFocusedItem` is not a child FocusEnv.
|
|
464
|
+
if ((_trapFocusUp && context.focusHeading == UIFocusHeadingUp)
|
|
465
|
+
|| (_trapFocusDown && context.focusHeading == UIFocusHeadingDown)
|
|
466
|
+
|| (_trapFocusLeft && context.focusHeading == UIFocusHeadingLeft)
|
|
467
|
+
|| (_trapFocusRight && context.focusHeading == UIFocusHeadingRight)) {
|
|
468
|
+
|
|
469
|
+
// Checks if `nextFocusedItem` is a child `FocusEnvironment`.
|
|
470
|
+
// If not, it returns false thus it keeps the focus inside.
|
|
471
|
+
return [UIFocusSystem environment:self containsEnvironment:context.nextFocusedItem];
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
return [super shouldUpdateFocusInContext:context];
|
|
475
|
+
}
|
|
476
|
+
|
|
414
477
|
- (void)didUpdateFocusInContext:(UIFocusUpdateContext *)context withAnimationCoordinator:(UIFocusAnimationCoordinator *)coordinator
|
|
415
478
|
{
|
|
416
479
|
if (context.previouslyFocusedView == context.nextFocusedView) {
|
|
417
480
|
return;
|
|
418
481
|
}
|
|
482
|
+
|
|
483
|
+
if (_autoFocus && self.focusGuide != nil && context.previouslyFocusedItem != nil) {
|
|
484
|
+
// Whenever focus leaves the container, `nextFocusedView` is the destination, the item outside the container.
|
|
485
|
+
// So, `previouslyFocusedItem` is always the last focused child of `TVFocusGuide`.
|
|
486
|
+
// We should update `preferredFocusEnvironments` in this case to make sure `FocusGuide` remembers
|
|
487
|
+
// the last focused element and redirects the focus to it whenever focus comes back.
|
|
488
|
+
_previouslyFocusedItem = context.previouslyFocusedItem;
|
|
489
|
+
[self handleFocusGuide];
|
|
490
|
+
}
|
|
491
|
+
|
|
419
492
|
if (context.nextFocusedView == self && self.isUserInteractionEnabled ) {
|
|
420
493
|
[self becomeFirstResponder];
|
|
421
494
|
[self enableDirectionalFocusGuides];
|
|
@@ -459,9 +532,31 @@ using namespace facebook::react;
|
|
|
459
532
|
[destinations addObject:view];
|
|
460
533
|
}
|
|
461
534
|
}
|
|
462
|
-
[self
|
|
535
|
+
[self setFocusDestinations:destinations];
|
|
463
536
|
return;
|
|
464
537
|
#endif
|
|
538
|
+
} else if ([commandName isEqualToString:@"requestTVFocus"]) {
|
|
539
|
+
#if TARGET_OS_TV
|
|
540
|
+
if ([args count] != 0) {
|
|
541
|
+
RCTLogError(
|
|
542
|
+
@"%@ command %@ received %d arguments, expected %d.", @"View", commandName, (int)[args count], 0);
|
|
543
|
+
return;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
RCTRootComponentView *rootview = [self containingRootView];
|
|
547
|
+
if (rootview == nil) return;
|
|
548
|
+
|
|
549
|
+
if (self.focusGuide != nil) {
|
|
550
|
+
rootview.reactPreferredFocusEnvironments = self.focusGuide.preferredFocusEnvironments;
|
|
551
|
+
} else {
|
|
552
|
+
rootview.reactPreferredFocusEnvironments = @[self];
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
[rootview setNeedsFocusUpdate];
|
|
556
|
+
[rootview updateFocusIfNeeded];
|
|
557
|
+
|
|
558
|
+
#endif
|
|
559
|
+
return;
|
|
465
560
|
}
|
|
466
561
|
#if RCT_DEBUG
|
|
467
562
|
RCTLogError(@"%@ received command %@, which is not a supported command.", @"View", commandName);
|
|
@@ -825,6 +920,17 @@ using namespace facebook::react;
|
|
|
825
920
|
_nextFocusRight = nil;
|
|
826
921
|
}
|
|
827
922
|
}
|
|
923
|
+
|
|
924
|
+
// `autoFocus`
|
|
925
|
+
if (oldViewProps.autoFocus != newViewProps.autoFocus) {
|
|
926
|
+
_autoFocus = newViewProps.autoFocus;
|
|
927
|
+
[self handleFocusGuide];
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
_trapFocusUp = newViewProps.trapFocusUp;
|
|
931
|
+
_trapFocusDown = newViewProps.trapFocusDown;
|
|
932
|
+
_trapFocusLeft = newViewProps.trapFocusLeft;
|
|
933
|
+
_trapFocusRight = newViewProps.trapFocusRight;
|
|
828
934
|
#endif
|
|
829
935
|
|
|
830
936
|
|
|
@@ -910,11 +1016,8 @@ using namespace facebook::react;
|
|
|
910
1016
|
if ([_propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN containsObject:@"opacity"]) {
|
|
911
1017
|
self.layer.opacity = (float)props.opacity;
|
|
912
1018
|
}
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
[self removeLayoutGuide:self.focusGuide];
|
|
916
|
-
self.focusGuide = nil;
|
|
917
|
-
}
|
|
1019
|
+
|
|
1020
|
+
[self removeFocusGuide];
|
|
918
1021
|
|
|
919
1022
|
_propKeysManagedByAnimated_DO_NOT_USE_THIS_IS_BROKEN = nil;
|
|
920
1023
|
_eventEmitter.reset();
|
package/React/Views/RCTTVView.h
CHANGED
|
@@ -42,6 +42,16 @@
|
|
|
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
|
+
|
|
50
|
+
@property (nonatomic, assign) BOOL trapFocusUp;
|
|
51
|
+
@property (nonatomic, assign) BOOL trapFocusDown;
|
|
52
|
+
@property (nonatomic, assign) BOOL trapFocusLeft;
|
|
53
|
+
@property (nonatomic, assign) BOOL trapFocusRight;
|
|
54
|
+
|
|
45
55
|
- (instancetype)initWithBridge:(RCTBridge *)bridge;
|
|
46
56
|
|
|
47
57
|
/**
|
|
@@ -70,7 +80,9 @@
|
|
|
70
80
|
- (void)removeParallaxMotionEffects;
|
|
71
81
|
|
|
72
82
|
|
|
73
|
-
- (void)
|
|
83
|
+
- (void)setFocusDestinations:(NSArray*)destinations;
|
|
84
|
+
|
|
85
|
+
- (void)requestTVFocus;
|
|
74
86
|
|
|
75
87
|
@property (nonatomic, strong) UIFocusGuide * focusGuide;
|
|
76
88
|
|
package/React/Views/RCTTVView.m
CHANGED
|
@@ -23,6 +23,9 @@
|
|
|
23
23
|
__weak RCTBridge *_bridge;
|
|
24
24
|
UITapGestureRecognizer *_selectRecognizer;
|
|
25
25
|
BOOL motionEffectsAdded;
|
|
26
|
+
NSArray* focusDestinations;
|
|
27
|
+
id<UIFocusItem> previouslyFocusedItem;
|
|
28
|
+
|
|
26
29
|
}
|
|
27
30
|
|
|
28
31
|
- (instancetype)initWithBridge:(RCTBridge *)bridge {
|
|
@@ -255,12 +258,39 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : unused)
|
|
|
255
258
|
motionEffectsAdded = NO;
|
|
256
259
|
}
|
|
257
260
|
|
|
261
|
+
- (BOOL)shouldUpdateFocusInContext:(UIFocusUpdateContext *)context
|
|
262
|
+
{
|
|
263
|
+
// This is the `trapFocus*` logic that prevents the focus updates if
|
|
264
|
+
// focus should be trapped and `nextFocusedItem` is not a child FocusEnv.
|
|
265
|
+
if ((_trapFocusUp && context.focusHeading == UIFocusHeadingUp)
|
|
266
|
+
|| (_trapFocusDown && context.focusHeading == UIFocusHeadingDown)
|
|
267
|
+
|| (_trapFocusLeft && context.focusHeading == UIFocusHeadingLeft)
|
|
268
|
+
|| (_trapFocusRight && context.focusHeading == UIFocusHeadingRight)) {
|
|
269
|
+
|
|
270
|
+
// Checks if `nextFocusedItem` is a child `FocusEnvironment`.
|
|
271
|
+
// If not, it returns false thus it keeps the focus inside.
|
|
272
|
+
return [UIFocusSystem environment:self containsEnvironment:context.nextFocusedItem];
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
return [super shouldUpdateFocusInContext:context];
|
|
276
|
+
}
|
|
277
|
+
|
|
258
278
|
- (void)didUpdateFocusInContext:(UIFocusUpdateContext *)context
|
|
259
279
|
withAnimationCoordinator:(UIFocusAnimationCoordinator *)coordinator
|
|
260
280
|
{
|
|
261
281
|
if (context.previouslyFocusedView == context.nextFocusedView) {
|
|
262
282
|
return;
|
|
263
283
|
}
|
|
284
|
+
|
|
285
|
+
if (_autoFocus && self.focusGuide != nil && context.previouslyFocusedItem != nil) {
|
|
286
|
+
// Whenever focus leaves the container, `nextFocusedView` is the destination, the item outside the container.
|
|
287
|
+
// So, `previouslyFocusedItem` is always the last focused child of `TVFocusGuide`.
|
|
288
|
+
// We should update `preferredFocusEnvironments` in this case to make sure `FocusGuide` remembers
|
|
289
|
+
// the last focused element and redirects the focus to it whenever focus comes back.
|
|
290
|
+
previouslyFocusedItem = context.previouslyFocusedItem;
|
|
291
|
+
[self handleFocusGuide];
|
|
292
|
+
}
|
|
293
|
+
|
|
264
294
|
if (context.nextFocusedView == self && self.isTVSelectable ) {
|
|
265
295
|
[self becomeFirstResponder];
|
|
266
296
|
[self enableDirectionalFocusGuides];
|
|
@@ -432,6 +462,14 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : unused)
|
|
|
432
462
|
[self setPreferredFocus:hasTVPreferredFocus];
|
|
433
463
|
}
|
|
434
464
|
|
|
465
|
+
- (void)setAutoFocus:(BOOL)autoFocus
|
|
466
|
+
{
|
|
467
|
+
if (_autoFocus != autoFocus) {
|
|
468
|
+
_autoFocus = autoFocus;
|
|
469
|
+
[self handleFocusGuide];
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
|
|
435
473
|
- (void)addFocusGuide:(NSArray*)destinations {
|
|
436
474
|
if (self.focusGuide == nil) {
|
|
437
475
|
self.focusGuide = [UIFocusGuide new];
|
|
@@ -446,4 +484,57 @@ RCT_NOT_IMPLEMENTED(-(instancetype)initWithCoder : unused)
|
|
|
446
484
|
self.focusGuide.preferredFocusEnvironments = destinations;
|
|
447
485
|
}
|
|
448
486
|
|
|
487
|
+
- (void)removeFocusGuide {
|
|
488
|
+
if (self.focusGuide != nil) {
|
|
489
|
+
focusDestinations = nil;
|
|
490
|
+
previouslyFocusedItem = nil;
|
|
491
|
+
|
|
492
|
+
[self removeLayoutGuide:self.focusGuide];
|
|
493
|
+
self.focusGuide = nil;
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
/// Responsible of determining what focusGuide's next state should be based on the active properties of the component.
|
|
498
|
+
- (void)handleFocusGuide
|
|
499
|
+
{
|
|
500
|
+
// `destinations` should always be favored against `autoFocus` feature, if provided.
|
|
501
|
+
if (focusDestinations != nil) {
|
|
502
|
+
[self addFocusGuide:focusDestinations];
|
|
503
|
+
} else if (_autoFocus && previouslyFocusedItem != nil) {
|
|
504
|
+
// We also add `self` as the second option in case `previouslyFocusedItem` becomes unreachable (e.g gets detached).
|
|
505
|
+
// `self` helps redirecting focus to the first focusable element in that case.
|
|
506
|
+
[self addFocusGuide:@[previouslyFocusedItem, self]];
|
|
507
|
+
} else if (_autoFocus) {
|
|
508
|
+
[self addFocusGuide:@[self]];
|
|
509
|
+
} else {
|
|
510
|
+
// Then there's no need to have `focusGuide`, remove it to prevent potential bugs.
|
|
511
|
+
[self removeFocusGuide];
|
|
512
|
+
}
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
- (void)setFocusDestinations:(NSArray*)destinations
|
|
516
|
+
{
|
|
517
|
+
if(destinations.count == 0) {
|
|
518
|
+
focusDestinations = nil;
|
|
519
|
+
} else {
|
|
520
|
+
focusDestinations = destinations;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
[self handleFocusGuide];
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
- (void)requestTVFocus
|
|
527
|
+
{
|
|
528
|
+
RCTRootView *rootview = [self rootView];
|
|
529
|
+
if (rootview == nil) return;
|
|
530
|
+
|
|
531
|
+
if (self.focusGuide != nil) {
|
|
532
|
+
rootview.reactPreferredFocusEnvironments = self.focusGuide.preferredFocusEnvironments;
|
|
533
|
+
} else {
|
|
534
|
+
rootview.reactPreferredFocusEnvironments = @[self];
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
[rootview setNeedsFocusUpdate];
|
|
538
|
+
[rootview updateFocusIfNeeded];
|
|
539
|
+
}
|
|
449
540
|
@end
|
|
@@ -137,6 +137,11 @@ 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)
|
|
141
|
+
RCT_EXPORT_VIEW_PROPERTY(trapFocusUp, BOOL)
|
|
142
|
+
RCT_EXPORT_VIEW_PROPERTY(trapFocusDown, BOOL)
|
|
143
|
+
RCT_EXPORT_VIEW_PROPERTY(trapFocusLeft, BOOL)
|
|
144
|
+
RCT_EXPORT_VIEW_PROPERTY(trapFocusRight, BOOL)
|
|
140
145
|
#endif
|
|
141
146
|
|
|
142
147
|
// Accessibility related properties
|
|
@@ -451,9 +456,17 @@ RCT_EXPORT_METHOD(setDestinations : (nonnull NSNumber *)viewTag reactTags : (NSA
|
|
|
451
456
|
[destinations addObject:destination];
|
|
452
457
|
}
|
|
453
458
|
}
|
|
454
|
-
[view
|
|
459
|
+
[view setFocusDestinations:destinations];
|
|
455
460
|
}];
|
|
456
461
|
}
|
|
462
|
+
|
|
463
|
+
RCT_EXPORT_METHOD(requestTVFocus : (nonnull NSNumber *)viewTag)
|
|
464
|
+
{
|
|
465
|
+
[self.bridge.uiManager addUIBlock:^(RCTUIManager *uiManager, NSDictionary<NSNumber *, UIView *> *viewRegistry) {
|
|
466
|
+
RCTTVView *view = (RCTTVView *)viewRegistry[viewTag];
|
|
467
|
+
[view requestTVFocus];
|
|
468
|
+
}];
|
|
469
|
+
}
|
|
457
470
|
#endif
|
|
458
471
|
|
|
459
472
|
// The events below define the properties that are not used by native directly, but required in the view config for new
|
|
@@ -21,8 +21,13 @@ import java.util.List;
|
|
|
21
21
|
/* package */ class EventAnimationDriver implements RCTEventEmitter {
|
|
22
22
|
private List<String> mEventPath;
|
|
23
23
|
/* package */ ValueAnimatedNode mValueNode;
|
|
24
|
+
/* package */ String mEventName;
|
|
25
|
+
/* package */ int mViewTag;
|
|
24
26
|
|
|
25
|
-
public EventAnimationDriver(
|
|
27
|
+
public EventAnimationDriver(
|
|
28
|
+
String eventName, int viewTag, List<String> eventPath, ValueAnimatedNode valueNode) {
|
|
29
|
+
mEventName = eventName;
|
|
30
|
+
mViewTag = viewTag;
|
|
26
31
|
mEventPath = eventPath;
|
|
27
32
|
mValueNode = valueNode;
|
|
28
33
|
}
|
|
@@ -113,7 +113,7 @@ public class NativeAnimatedModule extends NativeAnimatedModuleSpec
|
|
|
113
113
|
|
|
114
114
|
@AnyThread
|
|
115
115
|
boolean isEmpty() {
|
|
116
|
-
return mQueue.isEmpty();
|
|
116
|
+
return mQueue.isEmpty() && mPeekedOperation != null;
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
void setSynchronizedAccess(boolean isSynchronizedAccess) {
|
|
@@ -393,8 +393,8 @@ public class NativeAnimatedModule extends NativeAnimatedModuleSpec
|
|
|
393
393
|
|
|
394
394
|
/**
|
|
395
395
|
* Given a viewTag, detect if we're running in Fabric or non-Fabric and attach an event listener
|
|
396
|
-
* to the correct UIManager, if necessary. This is expected to only be called from the
|
|
397
|
-
* and not concurrently.
|
|
396
|
+
* to the correct UIManager, if necessary. This is expected to only be called from the native
|
|
397
|
+
* module thread, and not concurrently.
|
|
398
398
|
*
|
|
399
399
|
* @param viewTag
|
|
400
400
|
*/
|
|
@@ -417,8 +417,7 @@ public class NativeAnimatedModule extends NativeAnimatedModuleSpec
|
|
|
417
417
|
}
|
|
418
418
|
|
|
419
419
|
// Subscribe to UIManager (Fabric or non-Fabric) lifecycle events if we haven't yet
|
|
420
|
-
if (
|
|
421
|
-
|| (mInitializedForNonFabric && mUIManagerType == UIManagerType.DEFAULT)) {
|
|
420
|
+
if (mUIManagerType == UIManagerType.FABRIC ? mInitializedForFabric : mInitializedForNonFabric) {
|
|
422
421
|
return;
|
|
423
422
|
}
|
|
424
423
|
|