react-native-tvos 0.86.0-2 → 0.86.3-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/ActionSheetIOS/React-RCTActionSheet.podspec +1 -1
- package/Libraries/Animated/components/AnimatedScrollView.js +1 -1
- package/Libraries/AppDelegate/React-RCTAppDelegate.podspec +1 -1
- package/Libraries/Blob/React-RCTBlob.podspec +1 -1
- package/Libraries/Components/Button.js +2 -2
- package/Libraries/Components/TV/TVFocusGuideView.js +31 -0
- package/Libraries/Components/TV/useFocusEnterLeave.js +112 -0
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +1 -1
- package/Libraries/Components/TextInput/TextInput.flow.js +1 -1
- package/Libraries/Components/Touchable/Touchable.d.ts +1 -1
- package/Libraries/Components/View/ViewAccessibility.d.ts +1 -1
- package/Libraries/Components/View/ViewAccessibility.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/Timers/JSTimers.js +1 -1
- package/Libraries/Core/setUpNavigator.js +1 -1
- package/Libraries/EventEmitter/RCTNativeAppEventEmitter.d.ts +1 -1
- package/Libraries/FBLazyVector/FBLazyVector.podspec +1 -1
- package/Libraries/Image/ImageSource.d.ts +1 -1
- package/Libraries/Image/RCTImageLoader.mm +1 -1
- package/Libraries/Image/React-RCTImage.podspec +1 -1
- package/Libraries/Interaction/PanResponder.js +1 -1
- package/Libraries/LinkingIOS/React-RCTLinking.podspec +1 -1
- package/Libraries/NativeAnimation/React-RCTAnimation.podspec +1 -1
- package/Libraries/Network/React-RCTNetwork.podspec +1 -1
- package/Libraries/PushNotificationIOS/React-RCTPushNotification.podspec +1 -1
- package/Libraries/Renderer/README.md +2 -2
- package/Libraries/Required/RCTRequired.podspec +1 -1
- package/Libraries/Settings/React-RCTSettings.podspec +1 -1
- package/Libraries/Text/React-RCTText.podspec +1 -1
- package/Libraries/TypeSafety/RCTTypeSafety.podspec +1 -1
- package/Libraries/Utilities/PolyfillFunctions.js +1 -1
- package/Libraries/Vibration/React-RCTVibration.podspec +1 -1
- package/README-core.md +6 -6
- package/README.md +2 -0
- package/React/Base/RCTVersion.m +2 -2
- package/React/CoreModules/React-CoreModules.podspec +1 -1
- package/React/Fabric/Mounting/ComponentViews/ScrollView/RCTScrollViewComponentView.mm +1 -1
- package/React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm +1 -1
- package/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +43 -17
- package/React/React-RCTFBReactNativeSpec.podspec +1 -1
- package/React/React-RCTFabric.podspec +1 -1
- package/React/Runtime/React-RCTRuntime.podspec +1 -1
- package/React/Views/ScrollView/RCTScrollView.m +1 -1
- package/React-Core.podspec +1 -1
- package/React.podspec +1 -1
- package/ReactAndroid/build.gradle.kts +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/publish.gradle +5 -5
- package/ReactAndroid/src/main/java/com/facebook/react/ReactInstanceManager.java +5 -4
- package/ReactAndroid/src/main/java/com/facebook/react/devsupport/CxxInspectorPackagerConnection.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/fabric/mounting/SurfaceMountingManager.kt +49 -12
- package/ReactAndroid/src/main/java/com/facebook/react/modules/core/JavaTimerManager.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/intent/IntentModule.kt +8 -4
- package/ReactAndroid/src/main/java/com/facebook/react/modules/network/NetworkingModule.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/runtime/ReactInstance.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactNestedScrollViewManager.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollViewManager.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/text/ReactTextView.java +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactEditText.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.kt +2 -2
- package/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextSelectionWatcher.kt +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewGroup.kt +4 -4
- package/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewManager.kt +1 -1
- package/ReactApple/Libraries/RCTFoundation/RCTDeprecation/RCTDeprecation.podspec +1 -1
- package/ReactApple/RCTSwiftUI/RCTSwiftUI.podspec +1 -1
- package/ReactApple/RCTSwiftUIWrapper/RCTSwiftUIWrapper.podspec +1 -1
- package/ReactCommon/React-Fabric.podspec +1 -1
- package/ReactCommon/React-FabricComponents.podspec +1 -1
- package/ReactCommon/React-FabricImage.podspec +1 -1
- package/ReactCommon/React-Mapbuffer.podspec +1 -1
- package/ReactCommon/ReactCommon.podspec +1 -1
- package/ReactCommon/callinvoker/React-callinvoker.podspec +1 -1
- package/ReactCommon/cxxreact/React-cxxreact.podspec +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +3 -3
- package/ReactCommon/hermes/React-hermes.podspec +1 -1
- package/ReactCommon/hermes/executor/React-jsitracing.podspec +1 -1
- package/ReactCommon/jserrorhandler/React-jserrorhandler.podspec +1 -1
- package/ReactCommon/jsi/React-jsi.podspec +1 -1
- package/ReactCommon/jsiexecutor/React-jsiexecutor.podspec +1 -1
- package/ReactCommon/jsinspector-modern/React-jsinspector.podspec +1 -1
- package/ReactCommon/jsinspector-modern/cdp/React-jsinspectorcdp.podspec +1 -1
- package/ReactCommon/jsinspector-modern/network/React-jsinspectornetwork.podspec +1 -1
- package/ReactCommon/jsinspector-modern/tracing/React-jsinspectortracing.podspec +1 -1
- package/ReactCommon/jsitooling/React-jsitooling.podspec +1 -1
- package/ReactCommon/logger/React-logger.podspec +1 -1
- package/ReactCommon/oscompat/React-oscompat.podspec +1 -1
- package/ReactCommon/react/debug/React-debug.podspec +1 -1
- package/ReactCommon/react/debug/redbox/JscSafeUrl.h +1 -1
- package/ReactCommon/react/featureflags/React-featureflags.podspec +1 -1
- package/ReactCommon/react/nativemodule/core/platform/android/ReactCommon/JavaTurboModule.cpp +1 -1
- package/ReactCommon/react/nativemodule/core/platform/ios/React-NativeModulesApple.podspec +1 -1
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTInteropTurboModule.mm +1 -1
- package/ReactCommon/react/nativemodule/core/platform/ios/ReactCommon/RCTTurboModule.mm +1 -1
- package/ReactCommon/react/nativemodule/defaults/React-defaultsnativemodule.podspec +1 -1
- package/ReactCommon/react/nativemodule/dom/NativeDOM.cpp +10 -4
- package/ReactCommon/react/nativemodule/dom/React-domnativemodule.podspec +1 -1
- package/ReactCommon/react/nativemodule/featureflags/React-featureflagsnativemodule.podspec +1 -1
- package/ReactCommon/react/nativemodule/idlecallbacks/React-idlecallbacksnativemodule.podspec +1 -1
- package/ReactCommon/react/nativemodule/intersectionobserver/React-intersectionobservernativemodule.podspec +1 -1
- package/ReactCommon/react/nativemodule/microtasks/React-microtasksnativemodule.podspec +1 -1
- package/ReactCommon/react/nativemodule/mutationobserver/React-mutationobservernativemodule.podspec +1 -1
- package/ReactCommon/react/nativemodule/samples/ReactCommon-Samples.podspec +1 -1
- package/ReactCommon/react/nativemodule/viewtransition/React-viewtransitionnativemodule.podspec +1 -1
- package/ReactCommon/react/nativemodule/webperformance/React-webperformancenativemodule.podspec +1 -1
- package/ReactCommon/react/networking/React-networking.podspec +1 -1
- package/ReactCommon/react/performance/cdpmetrics/React-performancecdpmetrics.podspec +1 -1
- package/ReactCommon/react/performance/timeline/React-performancetimeline.podspec +1 -1
- package/ReactCommon/react/renderer/animated/internal/primitives.h +1 -1
- package/ReactCommon/react/renderer/consistency/React-rendererconsistency.podspec +1 -1
- package/ReactCommon/react/renderer/core/EventEmitter.cpp +20 -4
- package/ReactCommon/react/renderer/core/ShadowNode.cpp +27 -19
- package/ReactCommon/react/renderer/core/ShadowNodeFamily.h +2 -0
- package/ReactCommon/react/renderer/css/React-renderercss.podspec +1 -1
- package/ReactCommon/react/renderer/debug/React-rendererdebug.podspec +1 -1
- package/ReactCommon/react/renderer/graphics/React-graphics.podspec +1 -1
- package/ReactCommon/react/renderer/imagemanager/platform/ios/React-ImageManager.podspec +1 -1
- package/ReactCommon/react/renderer/mounting/internal/CullingContext.cpp +1 -1
- package/ReactCommon/react/renderer/runtimescheduler/React-runtimescheduler.podspec +1 -1
- package/ReactCommon/react/renderer/textlayoutmanager/platform/ios/react/renderer/textlayoutmanager/RCTFontUtils.mm +1 -1
- package/ReactCommon/react/renderer/uimanager/UIManager.cpp +58 -53
- package/ReactCommon/react/renderer/uimanager/tests/FabricUIManagerTest.cpp +144 -3
- package/ReactCommon/react/runtime/React-RuntimeCore.podspec +1 -1
- package/ReactCommon/react/runtime/React-RuntimeHermes.podspec +1 -1
- package/ReactCommon/react/runtime/platform/ios/React-RuntimeApple.podspec +1 -1
- package/ReactCommon/react/timing/React-timing.podspec +1 -1
- package/ReactCommon/react/utils/React-utils.podspec +1 -1
- package/ReactCommon/reactperflogger/React-perflogger.podspec +1 -1
- package/ReactCommon/runtimeexecutor/React-runtimeexecutor.podspec +1 -1
- package/ReactCommon/yoga/Yoga.podspec +2 -2
- package/ReactCommon/yoga/yoga/algorithm/AbsoluteLayout.cpp +2 -1
- package/ReactCommon/yoga/yoga/algorithm/CalculateLayout.cpp +11 -7
- package/ReactCommon/yoga/yoga/algorithm/CalculateLayout.h +1 -1
- package/package.json +11 -11
- package/scripts/cocoapods/spm.rb +1 -1
- package/scripts/cocoapods/utils.rb +2 -2
- package/scripts/codegen/templates/ReactAppDependencyProvider.podspec.template +1 -1
- package/scripts/codegen/templates/ReactCodegen.podspec.template +1 -1
- package/scripts/ios-configure-glog.sh +1 -1
- package/sdks/.hermesv1version +1 -1
- package/sdks/hermes-engine/hermes-engine.podspec +7 -2
- package/sdks/hermes-engine/version.properties +1 -1
- package/src/private/types/HostInstance.js +1 -1
- package/src/types/globals.d.ts +2 -2
- package/third-party-podspecs/RCT-Folly.podspec +1 -1
- package/third-party-podspecs/ReactNativeDependencies.podspec +1 -1
- package/third-party-podspecs/glog.podspec +1 -1
- package/types/public/ReactNativeTVTypes.d.ts +12 -1
- package/types/public/ReactNativeTypes.d.ts +2 -2
- package/types_generated/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +101 -0
- package/types_generated/Libraries/Alert/Alert.d.ts +55 -0
- package/types_generated/Libraries/Animated/Animated.d.ts +14 -0
- package/types_generated/Libraries/Animated/AnimatedEvent.d.ts +30 -0
- package/types_generated/Libraries/Animated/AnimatedExports.d.ts +191 -0
- package/types_generated/Libraries/Animated/AnimatedImplementation.d.ts +128 -0
- package/types_generated/Libraries/Animated/AnimatedPlatformConfig.d.ts +13 -0
- package/types_generated/Libraries/Animated/Easing.d.ts +171 -0
- package/types_generated/Libraries/Animated/animations/Animation.d.ts +35 -0
- package/types_generated/Libraries/Animated/animations/DecayAnimation.d.ts +42 -0
- package/types_generated/Libraries/Animated/animations/SpringAnimation.d.ts +130 -0
- package/types_generated/Libraries/Animated/animations/TimingAnimation.d.ts +54 -0
- package/types_generated/Libraries/Animated/components/AnimatedFlatList.d.ts +22 -0
- package/types_generated/Libraries/Animated/components/AnimatedImage.d.ts +18 -0
- package/types_generated/Libraries/Animated/components/AnimatedScrollView.d.ts +23 -0
- package/types_generated/Libraries/Animated/components/AnimatedSectionList.d.ts +22 -0
- package/types_generated/Libraries/Animated/components/AnimatedText.d.ts +18 -0
- package/types_generated/Libraries/Animated/components/AnimatedView.d.ts +19 -0
- package/types_generated/Libraries/Animated/createAnimatedComponent.d.ts +44 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedAddition.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedColor.d.ts +80 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedDiffClamp.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedDivision.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedInterpolation.d.ts +38 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedModulo.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedMultiplication.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedNode.d.ts +47 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedProps.d.ts +30 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedStyle.d.ts +32 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedSubtraction.d.ts +22 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedTracking.d.ts +21 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedValue.d.ts +126 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedValueXY.d.ts +135 -0
- package/types_generated/Libraries/Animated/nodes/AnimatedWithChildren.d.ts +15 -0
- package/types_generated/Libraries/Animated/useAnimatedColor.d.ts +16 -0
- package/types_generated/Libraries/Animated/useAnimatedValue.d.ts +15 -0
- package/types_generated/Libraries/Animated/useAnimatedValueXY.d.ts +18 -0
- package/types_generated/Libraries/AppState/AppState.d.ts +63 -0
- package/types_generated/Libraries/BatchedBridge/BatchedBridge.d.ts +17 -0
- package/types_generated/Libraries/BatchedBridge/MessageQueue.d.ts +39 -0
- package/types_generated/Libraries/BatchedBridge/NativeModules.d.ts +20 -0
- package/types_generated/Libraries/Blob/Blob.d.ts +80 -0
- package/types_generated/Libraries/Blob/BlobTypes.d.ts +27 -0
- package/types_generated/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +232 -0
- package/types_generated/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.d.ts +20 -0
- package/types_generated/Libraries/Components/ActivityIndicator/ActivityIndicator.d.ts +84 -0
- package/types_generated/Libraries/Components/Button.d.ts +247 -0
- package/types_generated/Libraries/Components/Clipboard/Clipboard.d.ts +38 -0
- package/types_generated/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.d.ts +17 -0
- package/types_generated/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidFallback.d.ts +27 -0
- package/types_generated/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.d.ts +176 -0
- package/types_generated/Libraries/Components/Keyboard/Keyboard.d.ts +146 -0
- package/types_generated/Libraries/Components/Keyboard/KeyboardAvoidingView.d.ts +73 -0
- package/types_generated/Libraries/Components/LayoutConformance/LayoutConformance.d.ts +23 -0
- package/types_generated/Libraries/Components/Pressable/Pressable.d.ts +146 -0
- package/types_generated/Libraries/Components/Pressable/useAndroidRippleForView.d.ts +48 -0
- package/types_generated/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.d.ts +32 -0
- package/types_generated/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidNativeComponent.d.ts +14 -0
- package/types_generated/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.d.ts +50 -0
- package/types_generated/Libraries/Components/RefreshControl/RefreshControl.d.ts +113 -0
- package/types_generated/Libraries/Components/SafeAreaView/SafeAreaView.d.ts +33 -0
- package/types_generated/Libraries/Components/ScrollView/ScrollView.d.ts +581 -0
- package/types_generated/Libraries/Components/ScrollView/ScrollViewContext.d.ts +24 -0
- package/types_generated/Libraries/Components/ScrollView/ScrollViewNativeComponent.d.ts +21 -0
- package/types_generated/Libraries/Components/ScrollView/ScrollViewNativeComponentType.d.ts +140 -0
- package/types_generated/Libraries/Components/ScrollView/ScrollViewStickyHeader.d.ts +36 -0
- package/types_generated/Libraries/Components/StatusBar/StatusBar.d.ts +222 -0
- package/types_generated/Libraries/Components/Switch/AndroidSwitchNativeComponent.d.ts +14 -0
- package/types_generated/Libraries/Components/Switch/Switch.d.ts +138 -0
- package/types_generated/Libraries/Components/Switch/SwitchNativeComponent.d.ts +14 -0
- package/types_generated/Libraries/Components/TV/TVEventControl.d.ts +23 -0
- package/types_generated/Libraries/Components/TV/TVEventHandler.d.ts +21 -0
- package/types_generated/Libraries/Components/TV/TVFocusGuideView.d.ts +96 -0
- package/types_generated/Libraries/Components/TV/TVTextScrollView.d.ts +97 -0
- package/types_generated/Libraries/Components/TV/TVViewPropTypes.d.ts +123 -0
- package/types_generated/Libraries/Components/TV/tagForComponentOrHandle.d.ts +24 -0
- package/types_generated/Libraries/Components/TV/useTVEventHandler.d.ts +20 -0
- package/types_generated/Libraries/Components/TextInput/InputAccessoryView.d.ts +86 -0
- package/types_generated/Libraries/Components/TextInput/TextInput.d.ts +47 -0
- package/types_generated/Libraries/Components/TextInput/TextInput.flow.d.ts +1005 -0
- package/types_generated/Libraries/Components/TextInput/TextInputState.d.ts +54 -0
- package/types_generated/Libraries/Components/ToastAndroid/ToastAndroid.d.ts +99 -0
- package/types_generated/Libraries/Components/Touchable/Touchable.d.ts +257 -0
- package/types_generated/Libraries/Components/Touchable/TouchableHighlight.d.ts +51 -0
- package/types_generated/Libraries/Components/Touchable/TouchableNativeFeedback.d.ts +192 -0
- package/types_generated/Libraries/Components/Touchable/TouchableOpacity.d.ts +35 -0
- package/types_generated/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +121 -0
- package/types_generated/Libraries/Components/View/View.d.ts +30 -0
- package/types_generated/Libraries/Components/View/ViewAccessibility.d.ts +415 -0
- package/types_generated/Libraries/Components/View/ViewNativeComponent.d.ts +39 -0
- package/types_generated/Libraries/Components/View/ViewPropTypes.d.ts +367 -0
- package/types_generated/Libraries/Core/Devtools/symbolicateStackTrace.d.ts +27 -0
- package/types_generated/Libraries/Core/ExceptionsManager.d.ts +43 -0
- package/types_generated/Libraries/Core/ExtendedError.d.ts +26 -0
- package/types_generated/Libraries/Core/NativeExceptionsManager.d.ts +17 -0
- package/types_generated/Libraries/Core/RawEventEmitter.d.ts +26 -0
- package/types_generated/Libraries/Core/ReactFiberErrorDialog.d.ts +27 -0
- package/types_generated/Libraries/Core/ReactNativeVersion.d.ts +48 -0
- package/types_generated/Libraries/Core/registerCallableModule.d.ts +18 -0
- package/types_generated/Libraries/EventEmitter/NativeEventEmitter.d.ts +42 -0
- package/types_generated/Libraries/EventEmitter/RCTDeviceEventEmitter.d.ts +19 -0
- package/types_generated/Libraries/EventEmitter/RCTEventEmitter.d.ts +18 -0
- package/types_generated/Libraries/EventEmitter/RCTNativeAppEventEmitter.d.ts +21 -0
- package/types_generated/Libraries/Image/AssetSourceResolver.d.ts +71 -0
- package/types_generated/Libraries/Image/Image.d.ts +18 -0
- package/types_generated/Libraries/Image/ImageBackground.d.ts +44 -0
- package/types_generated/Libraries/Image/ImageProps.d.ts +512 -0
- package/types_generated/Libraries/Image/ImageResizeMode.d.ts +17 -0
- package/types_generated/Libraries/Image/ImageSource.d.ts +94 -0
- package/types_generated/Libraries/Image/ImageTypes.flow.d.ts +61 -0
- package/types_generated/Libraries/Interaction/InteractionManager.d.ts +117 -0
- package/types_generated/Libraries/Interaction/PanResponder.d.ts +228 -0
- package/types_generated/Libraries/LayoutAnimation/LayoutAnimation.d.ts +76 -0
- package/types_generated/Libraries/Linking/Linking.d.ts +68 -0
- package/types_generated/Libraries/Lists/FlatList.d.ts +317 -0
- package/types_generated/Libraries/Lists/SectionList.d.ts +172 -0
- package/types_generated/Libraries/Lists/VirtualizedList.d.ts +19 -0
- package/types_generated/Libraries/Lists/VirtualizedSectionList.d.ts +19 -0
- package/types_generated/Libraries/LogBox/Data/LogBoxData.d.ts +78 -0
- package/types_generated/Libraries/LogBox/Data/LogBoxLog.d.ts +71 -0
- package/types_generated/Libraries/LogBox/Data/LogBoxSymbolication.d.ts +17 -0
- package/types_generated/Libraries/LogBox/Data/parseLogBoxLog.d.ts +49 -0
- package/types_generated/Libraries/LogBox/LogBox.d.ts +29 -0
- package/types_generated/Libraries/Modal/Modal.d.ts +110 -0
- package/types_generated/Libraries/NativeComponent/NativeComponentRegistry.d.ts +50 -0
- package/types_generated/Libraries/NativeModules/specs/NativeDialogManagerAndroid.d.ts +17 -0
- package/types_generated/Libraries/Network/FormData.d.ts +56 -0
- package/types_generated/Libraries/Network/RCTNetworking.d.ts +25 -0
- package/types_generated/Libraries/Network/RCTNetworkingEventDefinitions.flow.d.ts +22 -0
- package/types_generated/Libraries/Network/XMLHttpRequest.d.ts +114 -0
- package/types_generated/Libraries/Network/convertRequestBody.d.ts +21 -0
- package/types_generated/Libraries/Performance/Systrace.d.ts +61 -0
- package/types_generated/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +129 -0
- package/types_generated/Libraries/Pressability/Pressability.d.ts +241 -0
- package/types_generated/Libraries/Pressability/usePressability.d.ts +27 -0
- package/types_generated/Libraries/PushNotificationIOS/PushNotificationIOS.d.ts +323 -0
- package/types_generated/Libraries/ReactNative/AppRegistry.d.ts +14 -0
- package/types_generated/Libraries/ReactNative/AppRegistry.flow.d.ts +43 -0
- package/types_generated/Libraries/ReactNative/AppRegistryImpl.d.ts +73 -0
- package/types_generated/Libraries/ReactNative/DisplayMode.d.ts +24 -0
- package/types_generated/Libraries/ReactNative/I18nManager.d.ts +23 -0
- package/types_generated/Libraries/ReactNative/IPerformanceLogger.flow.d.ts +57 -0
- package/types_generated/Libraries/ReactNative/NativeI18nManager.d.ts +17 -0
- package/types_generated/Libraries/ReactNative/NativeUIManager.d.ts +17 -0
- package/types_generated/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.d.ts +31 -0
- package/types_generated/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.d.ts +15 -0
- package/types_generated/Libraries/ReactNative/RendererImplementation.d.ts +36 -0
- package/types_generated/Libraries/ReactNative/RendererProxy.d.ts +13 -0
- package/types_generated/Libraries/ReactNative/RootTag.d.ts +22 -0
- package/types_generated/Libraries/ReactNative/UIManager.d.ts +17 -0
- package/types_generated/Libraries/ReactNative/requireNativeComponent.d.ts +25 -0
- package/types_generated/Libraries/ReactPrivate/ReactNativePrivateInterface.d.ts +33 -0
- package/types_generated/Libraries/Renderer/shims/ReactFabric.d.ts +17 -0
- package/types_generated/Libraries/Renderer/shims/ReactNativeTypes.d.ts +155 -0
- package/types_generated/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.d.ts +41 -0
- package/types_generated/Libraries/Settings/Settings.d.ts +21 -0
- package/types_generated/Libraries/Share/Share.d.ts +85 -0
- package/types_generated/Libraries/StyleSheet/EdgeInsetsPropType.d.ts +15 -0
- package/types_generated/Libraries/StyleSheet/PlatformColorValueTypes.d.ts +17 -0
- package/types_generated/Libraries/StyleSheet/PlatformColorValueTypesIOS.d.ts +27 -0
- package/types_generated/Libraries/StyleSheet/PointPropType.d.ts +16 -0
- package/types_generated/Libraries/StyleSheet/Rect.d.ts +22 -0
- package/types_generated/Libraries/StyleSheet/StyleSheet.d.ts +153 -0
- package/types_generated/Libraries/StyleSheet/StyleSheetExports.d.ts +94 -0
- package/types_generated/Libraries/StyleSheet/StyleSheetTypes.d.ts +851 -0
- package/types_generated/Libraries/StyleSheet/flattenStyle.d.ts +19 -0
- package/types_generated/Libraries/StyleSheet/private/_StyleSheetTypesOverrides.d.ts +17 -0
- package/types_generated/Libraries/StyleSheet/private/_TransformStyle.d.ts +76 -0
- package/types_generated/Libraries/StyleSheet/processColor.d.ts +18 -0
- package/types_generated/Libraries/Text/Text.d.ts +30 -0
- package/types_generated/Libraries/Text/TextAncestorContext.d.ts +20 -0
- package/types_generated/Libraries/Text/TextNativeComponent.d.ts +41 -0
- package/types_generated/Libraries/Text/TextProps.d.ts +220 -0
- package/types_generated/Libraries/TurboModule/RCTExport.d.ts +35 -0
- package/types_generated/Libraries/TurboModule/TurboModuleRegistry.d.ts +15 -0
- package/types_generated/Libraries/Types/CodegenTypes.d.ts +24 -0
- package/types_generated/Libraries/Types/CodegenTypesNamespace.d.ts +14 -0
- package/types_generated/Libraries/Types/CoreEventTypes.d.ts +355 -0
- package/types_generated/Libraries/Types/RootTagTypes.d.ts +13 -0
- package/types_generated/Libraries/Types/UIManagerJSInterface.d.ts +17 -0
- package/types_generated/Libraries/UTFSequence.d.ts +39 -0
- package/types_generated/Libraries/Utilities/Appearance.d.ts +31 -0
- package/types_generated/Libraries/Utilities/BackHandler.d.ts +27 -0
- package/types_generated/Libraries/Utilities/DevSettings.d.ts +34 -0
- package/types_generated/Libraries/Utilities/DeviceInfo.d.ts +17 -0
- package/types_generated/Libraries/Utilities/Dimensions.d.ts +54 -0
- package/types_generated/Libraries/Utilities/NativeAppearance.d.ts +17 -0
- package/types_generated/Libraries/Utilities/NativeDeviceInfo.d.ts +14 -0
- package/types_generated/Libraries/Utilities/PixelRatio.d.ts +110 -0
- package/types_generated/Libraries/Utilities/Platform.d.ts +16 -0
- package/types_generated/Libraries/Utilities/PlatformTypes.d.ts +134 -0
- package/types_generated/Libraries/Utilities/codegenNativeCommands.d.ts +19 -0
- package/types_generated/Libraries/Utilities/codegenNativeComponent.d.ts +24 -0
- package/types_generated/Libraries/Utilities/deepFreezeAndThrowOnMutationInDev.d.ts +33 -0
- package/types_generated/Libraries/Utilities/differ/deepDiffer.d.ts +19 -0
- package/types_generated/Libraries/Utilities/useColorScheme.d.ts +15 -0
- package/types_generated/Libraries/Utilities/useWindowDimensions.d.ts +15 -0
- package/types_generated/Libraries/Vibration/Vibration.d.ts +29 -0
- package/types_generated/Libraries/vendor/core/ErrorUtils.d.ts +39 -0
- package/types_generated/Libraries/vendor/emitter/EventEmitter.d.ts +67 -0
- package/types_generated/index.d.ts +184 -0
- package/types_generated/src/private/components/virtualcollection/FlingConstants.d.ts +20 -0
- package/types_generated/src/private/components/virtualcollection/Virtual.d.ts +46 -0
- package/types_generated/src/private/components/virtualcollection/VirtualCollectionView.d.ts +81 -0
- package/types_generated/src/private/components/virtualcollection/column/VirtualColumn.d.ts +23 -0
- package/types_generated/src/private/components/virtualcollection/column/VirtualColumnGenerator.d.ts +17 -0
- package/types_generated/src/private/components/virtualcollection/dom/getScrollParent.d.ts +21 -0
- package/types_generated/src/private/components/virtualcollection/row/VirtualRow.d.ts +23 -0
- package/types_generated/src/private/components/virtualview/VirtualView.d.ts +75 -0
- package/types_generated/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.d.ts +107 -0
- package/types_generated/src/private/components/virtualview/VirtualViewNativeComponent.d.ts +107 -0
- package/types_generated/src/private/devsupport/devmenu/DevMenu.d.ts +28 -0
- package/types_generated/src/private/specs_DEPRECATED/components/AndroidSwitchNativeComponent.d.ts +53 -0
- package/types_generated/src/private/specs_DEPRECATED/components/ProgressBarAndroidNativeComponent.d.ts +36 -0
- package/types_generated/src/private/specs_DEPRECATED/components/SwitchNativeComponent.d.ts +51 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeAppearance.d.ts +26 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeDeviceInfo.d.ts +46 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeDialogManagerAndroid.d.ts +37 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeExceptionsManager.d.ts +45 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeI18nManager.d.ts +27 -0
- package/types_generated/src/private/specs_DEPRECATED/modules/NativeUIManager.d.ts +109 -0
- package/types_generated/src/private/styles/composeStyles.d.ts +19 -0
- package/types_generated/src/private/types/HostComponent.d.ts +19 -0
- package/types_generated/src/private/types/HostInstance.d.ts +92 -0
- package/types_generated/src/private/webapis/dom/events/CustomEvent.d.ts +27 -0
- package/types_generated/src/private/webapis/dom/events/Event.d.ts +50 -0
- package/types_generated/src/private/webapis/dom/events/EventTarget.d.ts +36 -0
- package/types_generated/src/private/webapis/dom/nodes/ReactNativeDocument.d.ts +33 -0
- package/types_generated/src/private/webapis/dom/nodes/ReactNativeElement.d.ts +36 -0
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyCharacterData.d.ts +30 -0
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyElement.d.ts +54 -0
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyNode.d.ts +129 -0
- package/types_generated/src/private/webapis/dom/nodes/ReadOnlyText.d.ts +24 -0
- package/types_generated/src/private/webapis/dom/nodes/internals/NodeInternals.d.ts +36 -0
- package/types_generated/src/private/webapis/dom/nodes/internals/ReactNativeDocumentElementInstanceHandle.d.ts +23 -0
- package/types_generated/src/private/webapis/dom/nodes/internals/ReactNativeDocumentInstanceHandle.d.ts +22 -0
- package/types_generated/src/private/webapis/dom/nodes/specs/NativeDOM.d.ts +229 -0
- package/types_generated/src/private/webapis/dom/oldstylecollections/HTMLCollection.d.ts +22 -0
- package/types_generated/src/private/webapis/dom/oldstylecollections/NodeList.d.ts +25 -0
- package/types_generated/src/private/webapis/geometry/DOMRect.d.ts +46 -0
- package/types_generated/src/private/webapis/geometry/DOMRectReadOnly.d.ts +73 -0
- package/types_generated/src/private/webapis/utils/ArrayLikeUtils.d.ts +27 -0
- package/types_generated/tsconfig.json +3 -0
- package/types_generated/tsconfig.test.json +16 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @generated SignedSource<<31f3b3dff02e24160d4bd83ee6954750>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/Libraries/PermissionsAndroid/PermissionsAndroid.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export type Rationale = {
|
|
14
|
+
title: string;
|
|
15
|
+
message: string;
|
|
16
|
+
buttonPositive?: string;
|
|
17
|
+
buttonNegative?: string;
|
|
18
|
+
buttonNeutral?: string;
|
|
19
|
+
};
|
|
20
|
+
type PermissionsType = Readonly<{
|
|
21
|
+
READ_CALENDAR: "android.permission.READ_CALENDAR";
|
|
22
|
+
WRITE_CALENDAR: "android.permission.WRITE_CALENDAR";
|
|
23
|
+
CAMERA: "android.permission.CAMERA";
|
|
24
|
+
READ_CONTACTS: "android.permission.READ_CONTACTS";
|
|
25
|
+
WRITE_CONTACTS: "android.permission.WRITE_CONTACTS";
|
|
26
|
+
GET_ACCOUNTS: "android.permission.GET_ACCOUNTS";
|
|
27
|
+
ACCESS_FINE_LOCATION: "android.permission.ACCESS_FINE_LOCATION";
|
|
28
|
+
ACCESS_COARSE_LOCATION: "android.permission.ACCESS_COARSE_LOCATION";
|
|
29
|
+
ACCESS_BACKGROUND_LOCATION: "android.permission.ACCESS_BACKGROUND_LOCATION";
|
|
30
|
+
RECORD_AUDIO: "android.permission.RECORD_AUDIO";
|
|
31
|
+
READ_PHONE_STATE: "android.permission.READ_PHONE_STATE";
|
|
32
|
+
CALL_PHONE: "android.permission.CALL_PHONE";
|
|
33
|
+
READ_CALL_LOG: "android.permission.READ_CALL_LOG";
|
|
34
|
+
WRITE_CALL_LOG: "android.permission.WRITE_CALL_LOG";
|
|
35
|
+
ADD_VOICEMAIL: "com.android.voicemail.permission.ADD_VOICEMAIL";
|
|
36
|
+
READ_VOICEMAIL: "com.android.voicemail.permission.READ_VOICEMAIL";
|
|
37
|
+
WRITE_VOICEMAIL: "com.android.voicemail.permission.WRITE_VOICEMAIL";
|
|
38
|
+
USE_SIP: "android.permission.USE_SIP";
|
|
39
|
+
PROCESS_OUTGOING_CALLS: "android.permission.PROCESS_OUTGOING_CALLS";
|
|
40
|
+
BODY_SENSORS: "android.permission.BODY_SENSORS";
|
|
41
|
+
BODY_SENSORS_BACKGROUND: "android.permission.BODY_SENSORS_BACKGROUND";
|
|
42
|
+
SEND_SMS: "android.permission.SEND_SMS";
|
|
43
|
+
RECEIVE_SMS: "android.permission.RECEIVE_SMS";
|
|
44
|
+
READ_SMS: "android.permission.READ_SMS";
|
|
45
|
+
RECEIVE_WAP_PUSH: "android.permission.RECEIVE_WAP_PUSH";
|
|
46
|
+
RECEIVE_MMS: "android.permission.RECEIVE_MMS";
|
|
47
|
+
READ_EXTERNAL_STORAGE: "android.permission.READ_EXTERNAL_STORAGE";
|
|
48
|
+
READ_MEDIA_IMAGES: "android.permission.READ_MEDIA_IMAGES";
|
|
49
|
+
READ_MEDIA_VIDEO: "android.permission.READ_MEDIA_VIDEO";
|
|
50
|
+
READ_MEDIA_AUDIO: "android.permission.READ_MEDIA_AUDIO";
|
|
51
|
+
READ_MEDIA_VISUAL_USER_SELECTED: "android.permission.READ_MEDIA_VISUAL_USER_SELECTED";
|
|
52
|
+
WRITE_EXTERNAL_STORAGE: "android.permission.WRITE_EXTERNAL_STORAGE";
|
|
53
|
+
BLUETOOTH_CONNECT: "android.permission.BLUETOOTH_CONNECT";
|
|
54
|
+
BLUETOOTH_SCAN: "android.permission.BLUETOOTH_SCAN";
|
|
55
|
+
BLUETOOTH_ADVERTISE: "android.permission.BLUETOOTH_ADVERTISE";
|
|
56
|
+
ACCESS_MEDIA_LOCATION: "android.permission.ACCESS_MEDIA_LOCATION";
|
|
57
|
+
ACCEPT_HANDOVER: "android.permission.ACCEPT_HANDOVER";
|
|
58
|
+
ACTIVITY_RECOGNITION: "android.permission.ACTIVITY_RECOGNITION";
|
|
59
|
+
ANSWER_PHONE_CALLS: "android.permission.ANSWER_PHONE_CALLS";
|
|
60
|
+
READ_PHONE_NUMBERS: "android.permission.READ_PHONE_NUMBERS";
|
|
61
|
+
UWB_RANGING: "android.permission.UWB_RANGING";
|
|
62
|
+
POST_NOTIFICATIONS: "android.permission.POST_NOTIFICATIONS";
|
|
63
|
+
NEARBY_WIFI_DEVICES: "android.permission.NEARBY_WIFI_DEVICES";
|
|
64
|
+
}>;
|
|
65
|
+
export type PermissionStatus = "granted" | "denied" | "never_ask_again";
|
|
66
|
+
export type Permission = PermissionsType[keyof PermissionsType];
|
|
67
|
+
/**
|
|
68
|
+
* `PermissionsAndroid` provides access to Android M's new permissions model.
|
|
69
|
+
*
|
|
70
|
+
* See https://reactnative.dev/docs/permissionsandroid
|
|
71
|
+
*/
|
|
72
|
+
declare class PermissionsAndroidImpl {
|
|
73
|
+
PERMISSIONS: PermissionsType;
|
|
74
|
+
RESULTS: Readonly<{
|
|
75
|
+
DENIED: "denied";
|
|
76
|
+
GRANTED: "granted";
|
|
77
|
+
NEVER_ASK_AGAIN: "never_ask_again";
|
|
78
|
+
}>;
|
|
79
|
+
/**
|
|
80
|
+
* DEPRECATED - use check
|
|
81
|
+
*
|
|
82
|
+
* Returns a promise resolving to a boolean value as to whether the specified
|
|
83
|
+
* permissions has been granted
|
|
84
|
+
*
|
|
85
|
+
* @deprecated
|
|
86
|
+
*/
|
|
87
|
+
checkPermission(permission: Permission): Promise<boolean>;
|
|
88
|
+
/**
|
|
89
|
+
* Returns a promise resolving to a boolean value as to whether the specified
|
|
90
|
+
* permissions has been granted
|
|
91
|
+
*
|
|
92
|
+
* See https://reactnative.dev/docs/permissionsandroid#check
|
|
93
|
+
*/
|
|
94
|
+
check(permission: Permission): Promise<boolean>;
|
|
95
|
+
/**
|
|
96
|
+
* DEPRECATED - use request
|
|
97
|
+
*
|
|
98
|
+
* Prompts the user to enable a permission and returns a promise resolving to a
|
|
99
|
+
* boolean value indicating whether the user allowed or denied the request
|
|
100
|
+
*
|
|
101
|
+
* If the optional rationale argument is included (which is an object with a
|
|
102
|
+
* `title` and `message`), this function checks with the OS whether it is
|
|
103
|
+
* necessary to show a dialog explaining why the permission is needed
|
|
104
|
+
* (https://developer.android.com/training/permissions/requesting#explain)
|
|
105
|
+
* and then shows the system permission dialog
|
|
106
|
+
*
|
|
107
|
+
* @deprecated
|
|
108
|
+
*/
|
|
109
|
+
requestPermission(permission: Permission, rationale?: Rationale): Promise<boolean>;
|
|
110
|
+
/**
|
|
111
|
+
* Prompts the user to enable a permission and returns a promise resolving to a
|
|
112
|
+
* string value indicating whether the user allowed or denied the request
|
|
113
|
+
*
|
|
114
|
+
* See https://reactnative.dev/docs/permissionsandroid#request
|
|
115
|
+
*/
|
|
116
|
+
request(permission: Permission, rationale?: Rationale): Promise<PermissionStatus>;
|
|
117
|
+
/**
|
|
118
|
+
* Prompts the user to enable multiple permissions in the same dialog and
|
|
119
|
+
* returns an object with the permissions as keys and strings as values
|
|
120
|
+
* indicating whether the user allowed or denied the request
|
|
121
|
+
*
|
|
122
|
+
* See https://reactnative.dev/docs/permissionsandroid#requestmultiple
|
|
123
|
+
*/
|
|
124
|
+
requestMultiple(permissions: Array<Permission>): Promise<{ [permission in Permission]: PermissionStatus }>;
|
|
125
|
+
}
|
|
126
|
+
declare const PermissionsAndroidInstance: PermissionsAndroidImpl;
|
|
127
|
+
declare const $$PermissionsAndroid: typeof PermissionsAndroidInstance;
|
|
128
|
+
declare type $$PermissionsAndroid = typeof $$PermissionsAndroid;
|
|
129
|
+
export default $$PermissionsAndroid;
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @generated SignedSource<<75cff4d8ee564fce1b15f7201f798077>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/Libraries/Pressability/Pressability.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import type { BlurEvent, FocusEvent, GestureResponderEvent, MouseEvent } from "../Types/CoreEventTypes";
|
|
14
|
+
import { type RectOrSize } from "../StyleSheet/Rect";
|
|
15
|
+
import { type PointerEvent } from "../Types/CoreEventTypes";
|
|
16
|
+
export type PressabilityConfig = Readonly<{
|
|
17
|
+
/**
|
|
18
|
+
* Whether a press gesture can be interrupted by a parent gesture such as a
|
|
19
|
+
* scroll event. Defaults to true.
|
|
20
|
+
*/
|
|
21
|
+
cancelable?: boolean | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to disable initialization of the press gesture.
|
|
24
|
+
*/
|
|
25
|
+
disabled?: boolean | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Amount to extend the `VisualRect` by to create `HitRect`.
|
|
28
|
+
*/
|
|
29
|
+
hitSlop?: RectOrSize | undefined;
|
|
30
|
+
/**
|
|
31
|
+
* Amount to extend the `HitRect` by to create `PressRect`.
|
|
32
|
+
*/
|
|
33
|
+
pressRectOffset?: RectOrSize | undefined;
|
|
34
|
+
/**
|
|
35
|
+
* Whether to disable the systemm sound when `onPress` fires on Android.
|
|
36
|
+
**/
|
|
37
|
+
android_disableSound?: boolean | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Duration to wait after hover in before calling `onHoverIn`.
|
|
40
|
+
*/
|
|
41
|
+
delayHoverIn?: number | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Duration to wait after hover out before calling `onHoverOut`.
|
|
44
|
+
*/
|
|
45
|
+
delayHoverOut?: number | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Duration (in addition to `delayPressIn`) after which a press gesture is
|
|
48
|
+
* considered a long press gesture. Defaults to 500 (milliseconds).
|
|
49
|
+
*/
|
|
50
|
+
delayLongPress?: number | undefined;
|
|
51
|
+
/**
|
|
52
|
+
* Duration to wait after press down before calling `onPressIn`.
|
|
53
|
+
*/
|
|
54
|
+
delayPressIn?: number | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Duration to wait after letting up before calling `onPressOut`.
|
|
57
|
+
*/
|
|
58
|
+
delayPressOut?: number | undefined;
|
|
59
|
+
/**
|
|
60
|
+
* Minimum duration to wait between calling `onPressIn` and `onPressOut`.
|
|
61
|
+
*/
|
|
62
|
+
minPressDuration?: number | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Called after the element loses focus.
|
|
65
|
+
*/
|
|
66
|
+
onBlur?: ((event: BlurEvent) => unknown) | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Called after the element is focused.
|
|
69
|
+
*/
|
|
70
|
+
onFocus?: ((event: FocusEvent) => unknown) | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Called when the hover is activated to provide visual feedback.
|
|
73
|
+
*/
|
|
74
|
+
onHoverIn?: ((event: MouseEvent) => unknown) | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Called when the hover is deactivated to undo visual feedback.
|
|
77
|
+
*/
|
|
78
|
+
onHoverOut?: ((event: MouseEvent) => unknown) | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* Called when a long press gesture has been triggered.
|
|
81
|
+
*/
|
|
82
|
+
onLongPress?: ((event: GestureResponderEvent) => unknown) | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* Called when a press gesture has been triggered.
|
|
85
|
+
*/
|
|
86
|
+
onPress?: ((event: GestureResponderEvent) => unknown) | undefined;
|
|
87
|
+
/**
|
|
88
|
+
* Called when the press is activated to provide visual feedback.
|
|
89
|
+
*/
|
|
90
|
+
onPressIn?: ((event: GestureResponderEvent) => unknown) | undefined;
|
|
91
|
+
/**
|
|
92
|
+
* Called when the press location moves. (This should rarely be used.)
|
|
93
|
+
*/
|
|
94
|
+
onPressMove?: ((event: GestureResponderEvent) => unknown) | undefined;
|
|
95
|
+
/**
|
|
96
|
+
* Called when the press is deactivated to undo visual feedback.
|
|
97
|
+
*/
|
|
98
|
+
onPressOut?: ((event: GestureResponderEvent) => unknown) | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* Called when a TV event is passed to the config.
|
|
101
|
+
*/
|
|
102
|
+
onTVEvent?: ((event: any) => void) | undefined;
|
|
103
|
+
/**
|
|
104
|
+
* Whether to prevent any other native components from becoming responder
|
|
105
|
+
* while this pressable is responder.
|
|
106
|
+
*/
|
|
107
|
+
blockNativeResponder?: boolean | undefined;
|
|
108
|
+
}>;
|
|
109
|
+
export type EventHandlers = Readonly<{
|
|
110
|
+
onBlur: (event: BlurEvent) => void;
|
|
111
|
+
onClick: (event: GestureResponderEvent) => void;
|
|
112
|
+
onFocus: (event: FocusEvent) => void;
|
|
113
|
+
onMouseEnter?: (event: MouseEvent) => void;
|
|
114
|
+
onMouseLeave?: (event: MouseEvent) => void;
|
|
115
|
+
onPointerEnter?: (event: PointerEvent) => void;
|
|
116
|
+
onPointerLeave?: (event: PointerEvent) => void;
|
|
117
|
+
onResponderGrant: (event: GestureResponderEvent) => void | boolean;
|
|
118
|
+
onResponderMove: (event: GestureResponderEvent) => void;
|
|
119
|
+
onResponderRelease: (event: GestureResponderEvent) => void;
|
|
120
|
+
onResponderTerminate: (event: GestureResponderEvent) => void;
|
|
121
|
+
onResponderTerminationRequest: () => boolean;
|
|
122
|
+
onStartShouldSetResponder: () => boolean;
|
|
123
|
+
onPressIn: (event: any) => void;
|
|
124
|
+
onPressOut: (event: any) => void;
|
|
125
|
+
}>;
|
|
126
|
+
/**
|
|
127
|
+
* Pressability implements press handling capabilities.
|
|
128
|
+
*
|
|
129
|
+
* =========================== Pressability Tutorial ===========================
|
|
130
|
+
*
|
|
131
|
+
* The `Pressability` class helps you create press interactions by analyzing the
|
|
132
|
+
* geometry of elements and observing when another responder (e.g. ScrollView)
|
|
133
|
+
* has stolen the touch lock. It offers hooks for your component to provide
|
|
134
|
+
* interaction feedback to the user:
|
|
135
|
+
*
|
|
136
|
+
* - When a press has activated (e.g. highlight an element)
|
|
137
|
+
* - When a press has deactivated (e.g. un-highlight an element)
|
|
138
|
+
* - When a press should trigger an action, meaning it activated and deactivated
|
|
139
|
+
* while within the geometry of the element without the lock being stolen.
|
|
140
|
+
*
|
|
141
|
+
* A high quality interaction isn't as simple as you might think. There should
|
|
142
|
+
* be a slight delay before activation. Moving your finger beyond an element's
|
|
143
|
+
* bounds should trigger deactivation, but moving the same finger back within an
|
|
144
|
+
* element's bounds should trigger reactivation.
|
|
145
|
+
*
|
|
146
|
+
* This should be consumed by functional components using `usePressability`. The
|
|
147
|
+
* following steps are only relevant for using `Pressability` in classes:
|
|
148
|
+
*
|
|
149
|
+
* 1. Instantiate `Pressability` and store it on your component's state.
|
|
150
|
+
*
|
|
151
|
+
* state = {
|
|
152
|
+
* pressability: new Pressability({
|
|
153
|
+
* // ...
|
|
154
|
+
* }),
|
|
155
|
+
* };
|
|
156
|
+
*
|
|
157
|
+
* 2. Choose the rendered component who should collect the press events. On that
|
|
158
|
+
* element, spread `pressability.getEventHandlers()` into its props.
|
|
159
|
+
*
|
|
160
|
+
* return (
|
|
161
|
+
* <View {...this.state.pressability.getEventHandlers()} />
|
|
162
|
+
* );
|
|
163
|
+
*
|
|
164
|
+
* 3. Update `Pressability` when your component mounts, updates, and unmounts.
|
|
165
|
+
*
|
|
166
|
+
* componentDidMount() {
|
|
167
|
+
* this.state.pressability.configure(...);
|
|
168
|
+
* }
|
|
169
|
+
*
|
|
170
|
+
* componentDidUpdate() {
|
|
171
|
+
* this.state.pressability.configure(...);
|
|
172
|
+
* }
|
|
173
|
+
*
|
|
174
|
+
* componentWillUnmount() {
|
|
175
|
+
* this.state.pressability.reset();
|
|
176
|
+
* }
|
|
177
|
+
*
|
|
178
|
+
* ==================== Pressability Implementation Details ====================
|
|
179
|
+
*
|
|
180
|
+
* `Pressability` only assumes that there exists a `HitRect` node. The `PressRect`
|
|
181
|
+
* is an abstract box that is extended beyond the `HitRect`.
|
|
182
|
+
*
|
|
183
|
+
* # Geometry
|
|
184
|
+
*
|
|
185
|
+
* ┌────────────────────────┐
|
|
186
|
+
* │ ┌──────────────────┐ │ - Presses start anywhere within `HitRect`, which
|
|
187
|
+
* │ │ ┌────────────┐ │ │ is expanded via the prop `hitSlop`.
|
|
188
|
+
* │ │ │ VisualRect │ │ │
|
|
189
|
+
* │ │ └────────────┘ │ │ - When pressed down for sufficient amount of time
|
|
190
|
+
* │ │ HitRect │ │ before letting up, `VisualRect` activates for
|
|
191
|
+
* │ └──────────────────┘ │ as long as the press stays within `PressRect`.
|
|
192
|
+
* │ PressRect o │
|
|
193
|
+
* └────────────────────│───┘
|
|
194
|
+
* Out Region └────── `PressRect`, which is expanded via the prop
|
|
195
|
+
* `pressRectOffset`, allows presses to move
|
|
196
|
+
* beyond `HitRect` while maintaining activation
|
|
197
|
+
* and being eligible for a "press".
|
|
198
|
+
*
|
|
199
|
+
* # State Machine
|
|
200
|
+
*
|
|
201
|
+
* ┌───────────────┐ ◀──── RESPONDER_RELEASE
|
|
202
|
+
* │ NOT_RESPONDER │
|
|
203
|
+
* └───┬───────────┘ ◀──── RESPONDER_TERMINATED
|
|
204
|
+
* │
|
|
205
|
+
* │ RESPONDER_GRANT (HitRect)
|
|
206
|
+
* │
|
|
207
|
+
* ▼
|
|
208
|
+
* ┌─────────────────────┐ ┌───────────────────┐ ┌───────────────────┐
|
|
209
|
+
* │ RESPONDER_INACTIVE_ │ DELAY │ RESPONDER_ACTIVE_ │ T + DELAY │ RESPONDER_ACTIVE_ │
|
|
210
|
+
* │ PRESS_IN ├────────▶ │ PRESS_IN ├────────────▶ │ LONG_PRESS_IN │
|
|
211
|
+
* └─┬───────────────────┘ └─┬─────────────────┘ └─┬─────────────────┘
|
|
212
|
+
* │ ▲ │ ▲ │ ▲
|
|
213
|
+
* │LEAVE_ │ │LEAVE_ │ │LEAVE_ │
|
|
214
|
+
* │PRESS_RECT │ENTER_ │PRESS_RECT │ENTER_ │PRESS_RECT │ENTER_
|
|
215
|
+
* │ │PRESS_RECT │ │PRESS_RECT │ │PRESS_RECT
|
|
216
|
+
* ▼ │ ▼ │ ▼ │
|
|
217
|
+
* ┌─────────────┴───────┐ ┌─────────────┴─────┐ ┌─────────────┴─────┐
|
|
218
|
+
* │ RESPONDER_INACTIVE_ │ DELAY │ RESPONDER_ACTIVE_ │ │ RESPONDER_ACTIVE_ │
|
|
219
|
+
* │ PRESS_OUT ├────────▶ │ PRESS_OUT │ │ LONG_PRESS_OUT │
|
|
220
|
+
* └─────────────────────┘ └───────────────────┘ └───────────────────┘
|
|
221
|
+
*
|
|
222
|
+
* T + DELAY => LONG_PRESS_DELAY + DELAY
|
|
223
|
+
*
|
|
224
|
+
* Not drawn are the side effects of each transition. The most important side
|
|
225
|
+
* effect is the invocation of `onPress` and `onLongPress` that occur when a
|
|
226
|
+
* responder is release while in the "press in" states.
|
|
227
|
+
*/
|
|
228
|
+
declare class Pressability {
|
|
229
|
+
constructor(config: PressabilityConfig);
|
|
230
|
+
configure(config: PressabilityConfig): void;
|
|
231
|
+
/**
|
|
232
|
+
* Resets any pending timers. This should be called on unmount.
|
|
233
|
+
*/
|
|
234
|
+
reset(): void;
|
|
235
|
+
/**
|
|
236
|
+
* Returns a set of props to spread into the interactive element.
|
|
237
|
+
*/
|
|
238
|
+
getEventHandlers(): EventHandlers;
|
|
239
|
+
static setLongPressDeactivationDistance(distance: number): void;
|
|
240
|
+
}
|
|
241
|
+
export default Pressability;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @generated SignedSource<<679a6d7be762fc192387af04838933c3>>
|
|
8
|
+
*
|
|
9
|
+
* This file was translated from Flow by scripts/js-api/build-types/index.js.
|
|
10
|
+
* Original file: packages/react-native/Libraries/Pressability/usePressability.js
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import { type EventHandlers, type PressabilityConfig } from "./Pressability";
|
|
14
|
+
/**
|
|
15
|
+
* Creates a persistent instance of `Pressability` that automatically configures
|
|
16
|
+
* itself and resets. Accepts null `config` to support lazy initialization. Once
|
|
17
|
+
* initialized, will not un-initialize until the component has been unmounted.
|
|
18
|
+
*
|
|
19
|
+
* In order to use `usePressability`, do the following:
|
|
20
|
+
*
|
|
21
|
+
* const config = useMemo(...);
|
|
22
|
+
* const eventHandlers = usePressability(config);
|
|
23
|
+
* const pressableView = <View {...eventHandlers} />;
|
|
24
|
+
*
|
|
25
|
+
*/
|
|
26
|
+
declare function usePressability(config: null | undefined | PressabilityConfig): null | EventHandlers;
|
|
27
|
+
export default usePressability;
|