@amazon-devices/react-native-screens 2.0.9000000000 → 3.0.9000000000-rn-83
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/README.md +57 -18
- package/RNScreens.podspec +12 -30
- package/SystemBundles/d557bc3ccca761f329c4a0be9f40c5edeceaeb72783a7971e6e3dcf80a6bedb0.bundle +45130 -0
- package/SystemBundles/d557bc3ccca761f329c4a0be9f40c5edeceaeb72783a7971e6e3dcf80a6bedb0.map +13686 -0
- package/SystemModules/amzn__react-native-screens-3.modules.txt +158 -0
- package/SystemModules/amzn__react-native-screens-3.private.modules.txt +376 -0
- package/SystemModules/keplerscript-system-bundle-config.json +4 -4
- package/android/CMakeLists.txt +80 -0
- package/android/build.gradle +96 -17
- package/android/src/fabric/java/com/swmansion/rnscreens/FabricEnabledHeaderConfigViewGroup.kt +61 -0
- package/android/src/fabric/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt +38 -25
- package/android/src/fabric/java/com/swmansion/rnscreens/NativeProxy.kt +53 -0
- package/android/src/main/cpp/NativeProxy.cpp +51 -0
- package/android/src/main/cpp/NativeProxy.h +35 -0
- package/android/src/main/cpp/OnLoad.cpp +8 -0
- package/android/src/main/cpp/jni-adapter.cpp +106 -0
- package/android/src/main/java/com/swmansion/rnscreens/CustomSearchView.kt +20 -10
- package/android/src/main/java/com/swmansion/rnscreens/CustomToolbar.kt +69 -1
- package/android/src/main/java/com/swmansion/rnscreens/FragmentBackPressOverrider.kt +8 -8
- package/android/src/main/java/com/swmansion/rnscreens/InsetsObserverProxy.kt +104 -0
- package/android/src/main/java/com/swmansion/rnscreens/ModalScreenViewManager.kt +12 -0
- package/android/src/main/java/com/swmansion/rnscreens/NativeDismissalObserver.kt +12 -0
- package/android/src/main/java/com/swmansion/rnscreens/RNScreensPackage.kt +65 -7
- package/android/src/main/java/com/swmansion/rnscreens/Screen.kt +327 -84
- package/android/src/main/java/com/swmansion/rnscreens/ScreenContainer.kt +122 -72
- package/android/src/main/java/com/swmansion/rnscreens/ScreenContainerViewManager.kt +27 -4
- package/android/src/main/java/com/swmansion/rnscreens/ScreenContentWrapper.kt +38 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenContentWrapperManager.kt +25 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenEventDispatcher.kt +10 -2
- package/android/src/main/java/com/swmansion/rnscreens/ScreenFooter.kt +299 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenFooterManager.kt +25 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenFragment.kt +91 -67
- package/android/src/main/java/com/swmansion/rnscreens/ScreenFragmentWrapper.kt +12 -1
- package/android/src/main/java/com/swmansion/rnscreens/ScreenModalFragment.kt +281 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt +184 -81
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragment.kt +467 -80
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragmentWrapper.kt +8 -1
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt +156 -124
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfigShadowNode.kt +25 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfigViewManager.kt +159 -39
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubview.kt +24 -9
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderSubviewManager.kt +19 -13
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackViewManager.kt +31 -28
- package/android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt +276 -71
- package/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt +124 -64
- package/android/src/main/java/com/swmansion/rnscreens/ScreensModule.kt +127 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreensShadowNode.kt +4 -2
- package/android/src/main/java/com/swmansion/rnscreens/SearchBarManager.kt +160 -53
- package/android/src/main/java/com/swmansion/rnscreens/SearchBarView.kt +57 -32
- package/android/src/main/java/com/swmansion/rnscreens/SearchViewFormatter.kt +15 -10
- package/android/src/main/java/com/swmansion/rnscreens/bottomsheet/BottomSheetBehaviorExt.kt +42 -0
- package/android/src/main/java/com/swmansion/rnscreens/bottomsheet/BottomSheetDialogRootView.kt +104 -0
- package/android/src/main/java/com/swmansion/rnscreens/bottomsheet/BottomSheetDialogScreen.kt +26 -0
- package/android/src/main/java/com/swmansion/rnscreens/bottomsheet/DimmingFragment.kt +493 -0
- package/android/src/main/java/com/swmansion/rnscreens/bottomsheet/DimmingView.kt +66 -0
- package/android/src/main/java/com/swmansion/rnscreens/bottomsheet/GestureTransparentViewGroup.kt +24 -0
- package/android/src/main/java/com/swmansion/rnscreens/bottomsheet/SheetUtils.kt +135 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/HeaderAttachedEvent.kt +7 -8
- package/android/src/main/java/com/swmansion/rnscreens/events/HeaderBackButtonClickedEvent.kt +8 -9
- package/android/src/main/java/com/swmansion/rnscreens/events/HeaderDetachedEvent.kt +7 -8
- package/android/src/main/java/com/swmansion/rnscreens/events/HeaderHeightChangeEvent.kt +9 -10
- package/android/src/main/java/com/swmansion/rnscreens/events/ScreenAppearEvent.kt +4 -1
- package/android/src/main/java/com/swmansion/rnscreens/events/ScreenDisappearEvent.kt +4 -1
- package/android/src/main/java/com/swmansion/rnscreens/events/ScreenDismissedEvent.kt +8 -4
- package/android/src/main/java/com/swmansion/rnscreens/events/ScreenTransitionProgressEvent.kt +13 -16
- package/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillAppearEvent.kt +4 -1
- package/android/src/main/java/com/swmansion/rnscreens/events/ScreenWillDisappearEvent.kt +4 -1
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarBlurEvent.kt +8 -9
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarChangeTextEvent.kt +8 -11
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarCloseEvent.kt +7 -8
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarFocusEvent.kt +8 -9
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarOpenEvent.kt +7 -8
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarSearchButtonPressEvent.kt +12 -11
- package/android/src/main/java/com/swmansion/rnscreens/events/SheetDetentChangedEvent.kt +27 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/StackFinishTransitioningEvent.kt +4 -1
- package/android/src/main/java/com/swmansion/rnscreens/ext/NumericExt.kt +12 -0
- package/android/src/main/java/com/swmansion/rnscreens/ext/ViewExt.kt +32 -0
- package/android/src/main/java/com/swmansion/rnscreens/utils/DeviceUtils.kt +1 -5
- package/android/src/main/java/com/swmansion/rnscreens/utils/PaddingBundle.kt +8 -0
- package/android/src/main/java/com/swmansion/rnscreens/utils/ScreenDummyLayoutHelper.kt +282 -0
- package/android/src/main/jni/CMakeLists.txt +35 -23
- package/android/src/main/jni/rnscreens.h +3 -0
- package/android/src/main/res/base/anim/rns_ios_from_left_background_close.xml +5 -0
- package/android/src/main/res/base/anim/rns_ios_from_left_background_open.xml +5 -0
- package/android/src/main/res/base/anim/rns_ios_from_left_foreground_close.xml +6 -0
- package/android/src/main/res/base/anim/rns_ios_from_left_foreground_open.xml +6 -0
- package/android/src/main/res/base/anim/rns_ios_from_right_background_close.xml +5 -0
- package/android/src/main/res/base/anim/rns_ios_from_right_background_open.xml +5 -0
- package/android/src/main/res/base/anim/rns_ios_from_right_foreground_close.xml +6 -0
- package/android/src/main/res/base/anim/rns_ios_from_right_foreground_open.xml +6 -0
- package/android/src/main/res/base/drawable/rns_rounder_top_corners_shape.xml +8 -0
- package/android/src/main/res/v33/anim-v33/rns_default_enter_in.xml +0 -1
- package/android/src/main/res/v33/anim-v33/rns_default_enter_out.xml +2 -2
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenContainerManagerDelegate.java +25 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenContainerManagerInterface.java +16 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenContentWrapperManagerDelegate.java +25 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenContentWrapperManagerInterface.java +16 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenFooterManagerDelegate.java +25 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenFooterManagerInterface.java +16 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerDelegate.java +16 -3
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerInterface.java +7 -2
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerDelegate.java +6 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerInterface.java +2 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSSearchBarManagerDelegate.java +99 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSSearchBarManagerInterface.java +37 -0
- package/android/src/paper/java/com/swmansion/rnscreens/FabricEnabledHeaderConfigViewGroup.kt +39 -0
- package/android/src/paper/java/com/swmansion/rnscreens/FabricEnabledViewGroup.kt +11 -2
- package/android/src/paper/java/com/swmansion/rnscreens/NativeProxy.kt +19 -0
- package/android/src/paper/java/com/swmansion/rnscreens/NativeScreensModuleSpec.java +36 -0
- package/common/cpp/react/renderer/components/rnscreens/FrameCorrectionModes.h +51 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSModalScreenComponentDescriptor.h +40 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSModalScreenShadowNode.cpp +16 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSModalScreenShadowNode.h +32 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenComponentDescriptor.h +55 -12
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.cpp +157 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenShadowNode.h +31 -11
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenStackHeaderConfigComponentDescriptor.h +49 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenStackHeaderConfigShadowNode.cpp +22 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenStackHeaderConfigShadowNode.h +40 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenStackHeaderConfigState.cpp +34 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenStackHeaderConfigState.h +57 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenStackHeaderSubviewComponentDescriptor.h +27 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenStackHeaderSubviewShadowNode.cpp +8 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenStackHeaderSubviewShadowNode.h +31 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenStackHeaderSubviewState.cpp +15 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenStackHeaderSubviewState.h +39 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenState.cpp +23 -2
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenState.h +33 -8
- package/common/cpp/react/renderer/components/rnscreens/utils/RectUtil.h +36 -0
- package/cpp/RNSScreenRemovalListener.cpp +25 -0
- package/cpp/RNSScreenRemovalListener.h +20 -0
- package/cpp/RNScreensTurboModule.cpp +115 -0
- package/cpp/RNScreensTurboModule.h +40 -0
- package/gesture-handler/package.json +6 -0
- package/ios/RNSConvert.h +24 -4
- package/ios/RNSConvert.mm +180 -55
- package/ios/RNSEnums.h +48 -0
- package/ios/RNSFullWindowOverlay.mm +12 -2
- package/ios/RNSModalScreen.h +8 -0
- package/ios/RNSModalScreen.mm +65 -0
- package/ios/RNSModule.h +19 -0
- package/ios/RNSModule.mm +173 -0
- package/ios/RNSPercentDrivenInteractiveTransition.h +12 -0
- package/ios/RNSPercentDrivenInteractiveTransition.mm +69 -0
- package/ios/RNSScreen.h +24 -5
- package/ios/RNSScreen.mm +652 -173
- package/ios/RNSScreenContainer.mm +12 -1
- package/ios/RNSScreenContentWrapper.h +44 -0
- package/ios/RNSScreenContentWrapper.mm +67 -0
- package/ios/RNSScreenFooter.h +30 -0
- package/ios/RNSScreenFooter.mm +142 -0
- package/ios/RNSScreenNavigationContainer.mm +7 -0
- package/ios/RNSScreenStack.h +6 -0
- package/ios/RNSScreenStack.mm +333 -109
- package/ios/RNSScreenStackAnimator.h +15 -1
- package/ios/RNSScreenStackAnimator.mm +380 -115
- package/ios/RNSScreenStackHeaderConfig.h +74 -6
- package/ios/RNSScreenStackHeaderConfig.mm +338 -69
- package/ios/RNSScreenStackHeaderSubview.h +0 -7
- package/ios/RNSScreenStackHeaderSubview.mm +61 -24
- package/ios/RNSScreenWindowTraits.h +1 -1
- package/ios/RNSScreenWindowTraits.mm +24 -50
- package/ios/RNSSearchBar.h +5 -5
- package/ios/RNSSearchBar.mm +42 -11
- package/ios/events/RNSHeaderHeightChangeEvent.h +0 -1
- package/ios/events/RNSHeaderHeightChangeEvent.mm +15 -0
- package/ios/events/RNSScreenViewEvent.h +0 -1
- package/ios/utils/RCTSurfaceTouchHandler+RNSUtility.h +15 -0
- package/ios/utils/RCTSurfaceTouchHandler+RNSUtility.mm +14 -0
- package/ios/utils/RCTTouchHandler+RNSUtility.h +15 -0
- package/ios/utils/RCTTouchHandler+RNSUtility.mm +15 -0
- package/ios/utils/RNSDefines.h +7 -0
- package/ios/utils/RNSUIBarButtonItem.h +2 -0
- package/ios/utils/UINavigationBar+RNSUtility.h +37 -0
- package/ios/utils/UINavigationBar+RNSUtility.mm +44 -0
- package/ios/utils/UIView+RNSUtility.h +23 -0
- package/ios/utils/UIView+RNSUtility.mm +54 -0
- package/kepler-compatibility.json +2 -2
- package/lib/commonjs/TransitionProgressContext.js +2 -2
- package/lib/commonjs/TransitionProgressContext.js.map +1 -1
- package/lib/commonjs/components/DebugContainer.js +38 -0
- package/lib/commonjs/components/DebugContainer.js.map +1 -0
- package/lib/commonjs/components/DebugContainer.web.js +14 -0
- package/lib/commonjs/components/DebugContainer.web.js.map +1 -0
- package/lib/commonjs/components/FullWindowOverlay.js +31 -0
- package/lib/commonjs/components/FullWindowOverlay.js.map +1 -0
- package/lib/commonjs/components/FullWindowOverlay.web.js +9 -0
- package/lib/commonjs/components/FullWindowOverlay.web.js.map +1 -0
- package/lib/commonjs/components/Screen.js +286 -0
- package/lib/commonjs/components/Screen.js.map +1 -0
- package/lib/commonjs/components/Screen.web.js +48 -0
- package/lib/commonjs/components/Screen.web.js.map +1 -0
- package/lib/commonjs/components/ScreenContainer.js +32 -0
- package/lib/commonjs/components/ScreenContainer.js.map +1 -0
- package/lib/commonjs/components/ScreenContainer.web.js +10 -0
- package/lib/commonjs/components/ScreenContainer.web.js.map +1 -0
- package/lib/commonjs/components/ScreenContentWrapper.js +17 -0
- package/lib/commonjs/components/ScreenContentWrapper.js.map +1 -0
- package/lib/commonjs/components/ScreenContentWrapper.web.js +10 -0
- package/lib/commonjs/components/ScreenContentWrapper.web.js.map +1 -0
- package/lib/commonjs/components/ScreenFooter.js +25 -0
- package/lib/commonjs/components/ScreenFooter.js.map +1 -0
- package/lib/commonjs/components/ScreenFooter.web.js +11 -0
- package/lib/commonjs/components/ScreenFooter.web.js.map +1 -0
- package/lib/commonjs/components/ScreenStack.js +67 -0
- package/lib/commonjs/components/ScreenStack.js.map +1 -0
- package/lib/commonjs/components/ScreenStack.web.js +10 -0
- package/lib/commonjs/components/ScreenStack.web.js.map +1 -0
- package/lib/commonjs/components/ScreenStackHeaderConfig.js +100 -0
- package/lib/commonjs/components/ScreenStackHeaderConfig.js.map +1 -0
- package/lib/commonjs/components/ScreenStackHeaderConfig.web.js +39 -0
- package/lib/commonjs/components/ScreenStackHeaderConfig.web.js.map +1 -0
- package/lib/commonjs/components/ScreenStackItem.js +106 -0
- package/lib/commonjs/components/ScreenStackItem.js.map +1 -0
- package/lib/commonjs/components/SearchBar.js +67 -0
- package/lib/commonjs/components/SearchBar.js.map +1 -0
- package/lib/commonjs/components/SearchBar.web.js +10 -0
- package/lib/commonjs/components/SearchBar.web.js.map +1 -0
- package/lib/commonjs/components/helpers/DelayedFreeze.js +31 -0
- package/lib/commonjs/components/helpers/DelayedFreeze.js.map +1 -0
- package/lib/commonjs/components/helpers/usePrevious.js +16 -0
- package/lib/commonjs/components/helpers/usePrevious.js.map +1 -0
- package/lib/commonjs/contexts.js +11 -0
- package/lib/commonjs/contexts.js.map +1 -0
- package/lib/commonjs/core.js +40 -0
- package/lib/commonjs/core.js.map +1 -0
- package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js +17 -2
- package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ModalScreenNativeComponent.js +14 -0
- package/lib/commonjs/fabric/ModalScreenNativeComponent.js.map +1 -0
- package/lib/commonjs/fabric/NativeScreensModule.js +10 -0
- package/lib/commonjs/fabric/NativeScreensModule.js.map +1 -0
- package/lib/commonjs/fabric/NativeScreensModule.web.js +8 -0
- package/lib/commonjs/fabric/NativeScreensModule.web.js.map +1 -0
- package/lib/commonjs/fabric/ScreenContainerNativeComponent.js +8 -11
- package/lib/commonjs/fabric/ScreenContainerNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenContentWrapperNativeComponent.js +18 -0
- package/lib/commonjs/fabric/ScreenContentWrapperNativeComponent.js.map +1 -0
- package/lib/commonjs/fabric/ScreenFooterNativeComponent.js +10 -0
- package/lib/commonjs/fabric/ScreenFooterNativeComponent.js.map +1 -0
- package/lib/commonjs/fabric/ScreenNativeComponent.js +13 -15
- package/lib/commonjs/fabric/ScreenNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js +3 -2
- package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js +10 -9
- package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js +6 -3
- package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenStackNativeComponent.js +8 -11
- package/lib/commonjs/fabric/ScreenStackNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/SearchBarNativeComponent.js +5 -6
- package/lib/commonjs/fabric/SearchBarNativeComponent.js.map +1 -1
- package/lib/commonjs/gesture-handler/GestureDetectorProvider.js +19 -0
- package/lib/commonjs/gesture-handler/GestureDetectorProvider.js.map +1 -0
- package/lib/commonjs/gesture-handler/RNScreensTurboModule.js +8 -0
- package/lib/commonjs/gesture-handler/RNScreensTurboModule.js.map +1 -0
- package/lib/commonjs/gesture-handler/ScreenGestureDetector.js +200 -0
- package/lib/commonjs/gesture-handler/ScreenGestureDetector.js.map +1 -0
- package/lib/commonjs/gesture-handler/constraints.js +64 -0
- package/lib/commonjs/gesture-handler/constraints.js.map +1 -0
- package/lib/commonjs/gesture-handler/defaults.js +45 -0
- package/lib/commonjs/gesture-handler/defaults.js.map +1 -0
- package/lib/commonjs/gesture-handler/fabricUtils.js +66 -0
- package/lib/commonjs/gesture-handler/fabricUtils.js.map +1 -0
- package/lib/commonjs/gesture-handler/fabricUtils.web.js +17 -0
- package/lib/commonjs/gesture-handler/fabricUtils.web.js.map +1 -0
- package/lib/commonjs/gesture-handler/index.js +14 -0
- package/lib/commonjs/gesture-handler/index.js.map +1 -0
- package/lib/commonjs/index.js +157 -95
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/native-stack/contexts/GHContext.js +12 -0
- package/lib/commonjs/native-stack/contexts/GHContext.js.map +1 -0
- package/lib/commonjs/native-stack/index.js +1 -1
- package/lib/commonjs/native-stack/index.js.map +1 -1
- package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js +24 -24
- package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/commonjs/native-stack/types.js.map +1 -1
- package/lib/commonjs/native-stack/utils/AnimatedHeaderHeightContext.js +1 -2
- package/lib/commonjs/native-stack/utils/AnimatedHeaderHeightContext.js.map +1 -1
- package/lib/commonjs/native-stack/utils/HeaderHeightContext.js +1 -2
- package/lib/commonjs/native-stack/utils/HeaderHeightContext.js.map +1 -1
- package/lib/commonjs/native-stack/utils/SafeAreaProviderCompat.js +1 -2
- package/lib/commonjs/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
- package/lib/commonjs/native-stack/utils/getDefaultHeaderHeight.js.map +1 -1
- package/lib/commonjs/native-stack/utils/getStatusBarHeight.js +22 -0
- package/lib/commonjs/native-stack/utils/getStatusBarHeight.js.map +1 -0
- package/lib/commonjs/native-stack/utils/useAnimatedHeaderHeight.js +2 -3
- package/lib/commonjs/native-stack/utils/useAnimatedHeaderHeight.js.map +1 -1
- package/lib/commonjs/native-stack/utils/useBackPressSubscription.js +5 -6
- package/lib/commonjs/native-stack/utils/useBackPressSubscription.js.map +1 -1
- package/lib/commonjs/native-stack/utils/useHeaderHeight.js +2 -3
- package/lib/commonjs/native-stack/utils/useHeaderHeight.js.map +1 -1
- package/lib/commonjs/native-stack/views/FontProcessor.js +2 -4
- package/lib/commonjs/native-stack/views/FontProcessor.js.map +1 -1
- package/lib/commonjs/native-stack/views/FooterComponent.js +17 -0
- package/lib/commonjs/native-stack/views/FooterComponent.js.map +1 -0
- package/lib/commonjs/native-stack/views/HeaderConfig.js +23 -15
- package/lib/commonjs/native-stack/views/HeaderConfig.js.map +1 -1
- package/lib/commonjs/native-stack/views/NativeStackView.js +124 -56
- package/lib/commonjs/native-stack/views/NativeStackView.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedHeaderHeightContext.js +1 -2
- package/lib/commonjs/reanimated/ReanimatedHeaderHeightContext.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js +14 -21
- package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedScreen.js +4 -4
- package/lib/commonjs/reanimated/ReanimatedScreen.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedScreenProvider.js +10 -18
- package/lib/commonjs/reanimated/ReanimatedScreenProvider.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js +1 -2
- package/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js.map +1 -1
- package/lib/commonjs/reanimated/index.js +1 -1
- package/lib/commonjs/reanimated/index.js.map +1 -1
- package/lib/commonjs/reanimated/useReanimatedHeaderHeight.js +4 -5
- package/lib/commonjs/reanimated/useReanimatedHeaderHeight.js.map +1 -1
- package/lib/commonjs/reanimated/useReanimatedTransitionProgress.js +2 -3
- package/lib/commonjs/reanimated/useReanimatedTransitionProgress.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/useTransitionProgress.js +2 -3
- package/lib/commonjs/useTransitionProgress.js.map +1 -1
- package/lib/commonjs/utils.js +28 -6
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/TransitionProgressContext.js +2 -0
- package/lib/module/TransitionProgressContext.js.map +1 -1
- package/lib/module/components/DebugContainer.js +30 -0
- package/lib/module/components/DebugContainer.js.map +1 -0
- package/lib/module/components/DebugContainer.web.js +6 -0
- package/lib/module/components/DebugContainer.web.js.map +1 -0
- package/lib/module/components/FullWindowOverlay.js +24 -0
- package/lib/module/components/FullWindowOverlay.js.map +1 -0
- package/lib/module/components/FullWindowOverlay.web.js +3 -0
- package/lib/module/components/FullWindowOverlay.web.js.map +1 -0
- package/lib/module/components/Screen.js +282 -0
- package/lib/module/components/Screen.js.map +1 -0
- package/lib/module/components/Screen.web.js +41 -0
- package/lib/module/components/Screen.web.js.map +1 -0
- package/lib/module/components/ScreenContainer.js +26 -0
- package/lib/module/components/ScreenContainer.js.map +1 -0
- package/lib/module/components/ScreenContainer.web.js +4 -0
- package/lib/module/components/ScreenContainer.web.js.map +1 -0
- package/lib/module/components/ScreenContentWrapper.js +10 -0
- package/lib/module/components/ScreenContentWrapper.js.map +1 -0
- package/lib/module/components/ScreenContentWrapper.web.js +4 -0
- package/lib/module/components/ScreenContentWrapper.web.js.map +1 -0
- package/lib/module/components/ScreenFooter.js +18 -0
- package/lib/module/components/ScreenFooter.js.map +1 -0
- package/lib/module/components/ScreenFooter.web.js +6 -0
- package/lib/module/components/ScreenFooter.web.js.map +1 -0
- package/lib/module/components/ScreenStack.js +63 -0
- package/lib/module/components/ScreenStack.js.map +1 -0
- package/lib/module/components/ScreenStack.web.js +4 -0
- package/lib/module/components/ScreenStack.web.js.map +1 -0
- package/lib/module/components/ScreenStackHeaderConfig.js +91 -0
- package/lib/module/components/ScreenStackHeaderConfig.js.map +1 -0
- package/lib/module/components/ScreenStackHeaderConfig.web.js +26 -0
- package/lib/module/components/ScreenStackHeaderConfig.web.js.map +1 -0
- package/lib/module/components/ScreenStackItem.js +98 -0
- package/lib/module/components/ScreenStackItem.js.map +1 -0
- package/lib/module/components/SearchBar.js +62 -0
- package/lib/module/components/SearchBar.js.map +1 -0
- package/lib/module/components/SearchBar.web.js +4 -0
- package/lib/module/components/SearchBar.web.js.map +1 -0
- package/lib/module/components/helpers/DelayedFreeze.js +24 -0
- package/lib/module/components/helpers/DelayedFreeze.js.map +1 -0
- package/lib/module/components/helpers/usePrevious.js +10 -0
- package/lib/module/components/helpers/usePrevious.js.map +1 -0
- package/lib/module/contexts.js +4 -0
- package/lib/module/contexts.js.map +1 -0
- package/lib/module/core.js +31 -0
- package/lib/module/core.js.map +1 -0
- package/lib/module/fabric/FullWindowOverlayNativeComponent.js +16 -0
- package/lib/module/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
- package/lib/module/fabric/ModalScreenNativeComponent.js +10 -0
- package/lib/module/fabric/ModalScreenNativeComponent.js.map +1 -0
- package/lib/module/fabric/NativeScreensModule.js +5 -0
- package/lib/module/fabric/NativeScreensModule.js.map +1 -0
- package/lib/module/fabric/NativeScreensModule.web.js +2 -0
- package/lib/module/fabric/NativeScreensModule.web.js.map +1 -0
- package/lib/module/fabric/ScreenContainerNativeComponent.js +3 -4
- package/lib/module/fabric/ScreenContainerNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenContentWrapperNativeComponent.js +10 -0
- package/lib/module/fabric/ScreenContentWrapperNativeComponent.js.map +1 -0
- package/lib/module/fabric/ScreenFooterNativeComponent.js +3 -0
- package/lib/module/fabric/ScreenFooterNativeComponent.js.map +1 -0
- package/lib/module/fabric/ScreenNativeComponent.js +8 -7
- package/lib/module/fabric/ScreenNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js +2 -0
- package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js +8 -2
- package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js +5 -1
- package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenStackNativeComponent.js +3 -3
- package/lib/module/fabric/ScreenStackNativeComponent.js.map +1 -1
- package/lib/module/fabric/SearchBarNativeComponent.js +3 -1
- package/lib/module/fabric/SearchBarNativeComponent.js.map +1 -1
- package/lib/module/gesture-handler/GestureDetectorProvider.js +12 -0
- package/lib/module/gesture-handler/GestureDetectorProvider.js.map +1 -0
- package/lib/module/gesture-handler/RNScreensTurboModule.js +2 -0
- package/lib/module/gesture-handler/RNScreensTurboModule.js.map +1 -0
- package/lib/module/gesture-handler/ScreenGestureDetector.js +193 -0
- package/lib/module/gesture-handler/ScreenGestureDetector.js.map +1 -0
- package/lib/module/gesture-handler/constraints.js +56 -0
- package/lib/module/gesture-handler/constraints.js.map +1 -0
- package/lib/module/gesture-handler/defaults.js +39 -0
- package/lib/module/gesture-handler/defaults.js.map +1 -0
- package/lib/module/gesture-handler/fabricUtils.js +61 -0
- package/lib/module/gesture-handler/fabricUtils.js.map +1 -0
- package/lib/module/gesture-handler/fabricUtils.web.js +10 -0
- package/lib/module/gesture-handler/fabricUtils.web.js.map +1 -0
- package/lib/module/gesture-handler/index.js +5 -0
- package/lib/module/gesture-handler/index.js.map +1 -0
- package/lib/module/index.js +29 -64
- package/lib/module/index.js.map +1 -1
- package/lib/module/native-stack/contexts/GHContext.js +6 -0
- package/lib/module/native-stack/contexts/GHContext.js.map +1 -0
- package/lib/module/native-stack/index.js.map +1 -1
- package/lib/module/native-stack/navigators/createNativeStackNavigator.js +22 -21
- package/lib/module/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/module/native-stack/types.js.map +1 -1
- package/lib/module/native-stack/utils/AnimatedHeaderHeightContext.js.map +1 -1
- package/lib/module/native-stack/utils/HeaderHeightContext.js.map +1 -1
- package/lib/module/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
- package/lib/module/native-stack/utils/getDefaultHeaderHeight.js.map +1 -1
- package/lib/module/native-stack/utils/getStatusBarHeight.js +16 -0
- package/lib/module/native-stack/utils/getStatusBarHeight.js.map +1 -0
- package/lib/module/native-stack/utils/useAnimatedHeaderHeight.js.map +1 -1
- package/lib/module/native-stack/utils/useBackPressSubscription.js +4 -5
- package/lib/module/native-stack/utils/useBackPressSubscription.js.map +1 -1
- package/lib/module/native-stack/utils/useHeaderHeight.js.map +1 -1
- package/lib/module/native-stack/views/FontProcessor.js +2 -3
- package/lib/module/native-stack/views/FontProcessor.js.map +1 -1
- package/lib/module/native-stack/views/FooterComponent.js +10 -0
- package/lib/module/native-stack/views/FooterComponent.js.map +1 -0
- package/lib/module/native-stack/views/HeaderConfig.js +14 -6
- package/lib/module/native-stack/views/HeaderConfig.js.map +1 -1
- package/lib/module/native-stack/views/NativeStackView.js +118 -47
- package/lib/module/native-stack/views/NativeStackView.js.map +1 -1
- package/lib/module/reanimated/ReanimatedHeaderHeightContext.js.map +1 -1
- package/lib/module/reanimated/ReanimatedNativeStackScreen.js +9 -13
- package/lib/module/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
- package/lib/module/reanimated/ReanimatedScreen.js +2 -3
- package/lib/module/reanimated/ReanimatedScreen.js.map +1 -1
- package/lib/module/reanimated/ReanimatedScreenProvider.js +8 -16
- package/lib/module/reanimated/ReanimatedScreenProvider.js.map +1 -1
- package/lib/module/reanimated/ReanimatedTransitionProgressContext.js.map +1 -1
- package/lib/module/reanimated/index.js.map +1 -1
- package/lib/module/reanimated/useReanimatedHeaderHeight.js +1 -1
- package/lib/module/reanimated/useReanimatedHeaderHeight.js.map +1 -1
- package/lib/module/reanimated/useReanimatedTransitionProgress.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/useTransitionProgress.js.map +1 -1
- package/lib/module/utils.js +26 -5
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/TransitionProgressContext.d.ts +2 -1
- package/lib/typescript/TransitionProgressContext.d.ts.map +1 -0
- package/lib/typescript/components/DebugContainer.d.ts +15 -0
- package/lib/typescript/components/DebugContainer.d.ts.map +1 -0
- package/lib/typescript/components/DebugContainer.web.d.ts +4 -0
- package/lib/typescript/components/DebugContainer.web.d.ts.map +1 -0
- package/lib/typescript/components/FullWindowOverlay.d.ts +6 -0
- package/lib/typescript/components/FullWindowOverlay.d.ts.map +1 -0
- package/lib/typescript/components/FullWindowOverlay.web.d.ts +6 -0
- package/lib/typescript/components/FullWindowOverlay.web.d.ts.map +1 -0
- package/lib/typescript/components/Screen.d.ts +8 -0
- package/lib/typescript/components/Screen.d.ts.map +1 -0
- package/lib/typescript/components/Screen.web.d.ts +11 -0
- package/lib/typescript/components/Screen.web.d.ts.map +1 -0
- package/lib/typescript/components/ScreenContainer.d.ts +5 -0
- package/lib/typescript/components/ScreenContainer.d.ts.map +1 -0
- package/lib/typescript/components/ScreenContainer.web.d.ts +4 -0
- package/lib/typescript/components/ScreenContainer.web.d.ts.map +1 -0
- package/lib/typescript/components/ScreenContentWrapper.d.ts +5 -0
- package/lib/typescript/components/ScreenContentWrapper.d.ts.map +1 -0
- package/lib/typescript/components/ScreenContentWrapper.web.d.ts +4 -0
- package/lib/typescript/components/ScreenContentWrapper.web.d.ts.map +1 -0
- package/lib/typescript/components/ScreenFooter.d.ts +12 -0
- package/lib/typescript/components/ScreenFooter.d.ts.map +1 -0
- package/lib/typescript/components/ScreenFooter.web.d.ts +6 -0
- package/lib/typescript/components/ScreenFooter.web.d.ts.map +1 -0
- package/lib/typescript/components/ScreenStack.d.ts +5 -0
- package/lib/typescript/components/ScreenStack.d.ts.map +1 -0
- package/lib/typescript/components/ScreenStack.web.d.ts +4 -0
- package/lib/typescript/components/ScreenStack.web.d.ts.map +1 -0
- package/lib/typescript/components/ScreenStackHeaderConfig.d.ts +13 -0
- package/lib/typescript/components/ScreenStackHeaderConfig.d.ts.map +1 -0
- package/lib/typescript/components/ScreenStackHeaderConfig.web.d.ts +13 -0
- package/lib/typescript/components/ScreenStackHeaderConfig.web.d.ts.map +1 -0
- package/lib/typescript/components/ScreenStackItem.d.ts +11 -0
- package/lib/typescript/components/ScreenStackItem.d.ts.map +1 -0
- package/lib/typescript/components/SearchBar.d.ts +5 -0
- package/lib/typescript/components/SearchBar.d.ts.map +1 -0
- package/lib/typescript/components/SearchBar.web.d.ts +4 -0
- package/lib/typescript/components/SearchBar.web.d.ts.map +1 -0
- package/lib/typescript/components/helpers/DelayedFreeze.d.ts +8 -0
- package/lib/typescript/components/helpers/DelayedFreeze.d.ts.map +1 -0
- package/lib/typescript/components/helpers/usePrevious.d.ts +2 -0
- package/lib/typescript/components/helpers/usePrevious.d.ts.map +1 -0
- package/lib/typescript/contexts.d.ts +5 -0
- package/lib/typescript/contexts.d.ts.map +1 -0
- package/lib/typescript/core.d.ts +6 -0
- package/lib/typescript/core.d.ts.map +1 -0
- package/lib/typescript/fabric/FullWindowOverlayNativeComponent.d.ts +1 -1
- package/lib/typescript/fabric/FullWindowOverlayNativeComponent.d.ts.map +1 -0
- package/lib/typescript/fabric/ModalScreenNativeComponent.d.ts +76 -0
- package/lib/typescript/fabric/ModalScreenNativeComponent.d.ts.map +1 -0
- package/lib/typescript/fabric/NativeScreensModule.d.ts +6 -0
- package/lib/typescript/fabric/NativeScreensModule.d.ts.map +1 -0
- package/lib/typescript/fabric/NativeScreensModule.web.d.ts +3 -0
- package/lib/typescript/fabric/NativeScreensModule.web.d.ts.map +1 -0
- package/lib/typescript/fabric/ScreenContainerNativeComponent.d.ts +1 -0
- package/lib/typescript/fabric/ScreenContainerNativeComponent.d.ts.map +1 -0
- package/lib/typescript/fabric/ScreenContentWrapperNativeComponent.d.ts +6 -0
- package/lib/typescript/fabric/ScreenContentWrapperNativeComponent.d.ts.map +1 -0
- package/lib/typescript/fabric/ScreenFooterNativeComponent.d.ts +7 -0
- package/lib/typescript/fabric/ScreenFooterNativeComponent.d.ts.map +1 -0
- package/lib/typescript/fabric/ScreenNativeComponent.d.ts +34 -24
- package/lib/typescript/fabric/ScreenNativeComponent.d.ts.map +1 -0
- package/lib/typescript/fabric/ScreenNavigationContainerNativeComponent.d.ts +1 -1
- package/lib/typescript/fabric/ScreenNavigationContainerNativeComponent.d.ts.map +1 -0
- package/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts +12 -2
- package/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts.map +1 -0
- package/lib/typescript/fabric/ScreenStackHeaderSubviewNativeComponent.d.ts +2 -2
- package/lib/typescript/fabric/ScreenStackHeaderSubviewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/fabric/ScreenStackNativeComponent.d.ts +4 -2
- package/lib/typescript/fabric/ScreenStackNativeComponent.d.ts.map +1 -0
- package/lib/typescript/fabric/SearchBarNativeComponent.d.ts +17 -16
- package/lib/typescript/fabric/SearchBarNativeComponent.d.ts.map +1 -0
- package/lib/typescript/gesture-handler/GestureDetectorProvider.d.ts +5 -0
- package/lib/typescript/gesture-handler/GestureDetectorProvider.d.ts.map +1 -0
- package/lib/typescript/gesture-handler/RNScreensTurboModule.d.ts +13 -0
- package/lib/typescript/gesture-handler/RNScreensTurboModule.d.ts.map +1 -0
- package/lib/typescript/gesture-handler/ScreenGestureDetector.d.ts +5 -0
- package/lib/typescript/gesture-handler/ScreenGestureDetector.d.ts.map +1 -0
- package/lib/typescript/gesture-handler/constraints.d.ts +6 -0
- package/lib/typescript/gesture-handler/constraints.d.ts.map +1 -0
- package/lib/typescript/gesture-handler/defaults.d.ts +20 -0
- package/lib/typescript/gesture-handler/defaults.d.ts.map +1 -0
- package/lib/typescript/gesture-handler/fabricUtils.d.ts +10 -0
- package/lib/typescript/gesture-handler/fabricUtils.d.ts.map +1 -0
- package/lib/typescript/gesture-handler/fabricUtils.web.d.ts +6 -0
- package/lib/typescript/gesture-handler/fabricUtils.web.d.ts.map +1 -0
- package/lib/typescript/gesture-handler/index.d.ts +2 -0
- package/lib/typescript/gesture-handler/index.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +25 -31
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/native-stack/contexts/GHContext.d.ts +4 -0
- package/lib/typescript/native-stack/contexts/GHContext.d.ts.map +1 -0
- package/lib/typescript/native-stack/index.d.ts +1 -0
- package/lib/typescript/native-stack/index.d.ts.map +1 -0
- package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts +4 -0
- package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts.map +1 -0
- package/lib/typescript/native-stack/types.d.ts +191 -33
- package/lib/typescript/native-stack/types.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/AnimatedHeaderHeightContext.d.ts +1 -0
- package/lib/typescript/native-stack/utils/AnimatedHeaderHeightContext.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/HeaderHeightContext.d.ts +1 -0
- package/lib/typescript/native-stack/utils/HeaderHeightContext.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/SafeAreaProviderCompat.d.ts +2 -1
- package/lib/typescript/native-stack/utils/SafeAreaProviderCompat.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/getDefaultHeaderHeight.d.ts +3 -2
- package/lib/typescript/native-stack/utils/getDefaultHeaderHeight.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/getStatusBarHeight.d.ts +3 -0
- package/lib/typescript/native-stack/utils/getStatusBarHeight.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/useAnimatedHeaderHeight.d.ts +2 -1
- package/lib/typescript/native-stack/utils/useAnimatedHeaderHeight.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/useBackPressSubscription.d.ts +1 -0
- package/lib/typescript/native-stack/utils/useBackPressSubscription.d.ts.map +1 -0
- package/lib/typescript/native-stack/utils/useHeaderHeight.d.ts +1 -0
- package/lib/typescript/native-stack/utils/useHeaderHeight.d.ts.map +1 -0
- package/lib/typescript/native-stack/views/FontProcessor.d.ts +1 -0
- package/lib/typescript/native-stack/views/FontProcessor.d.ts.map +1 -0
- package/lib/typescript/native-stack/views/FooterComponent.d.ts +7 -0
- package/lib/typescript/native-stack/views/FooterComponent.d.ts.map +1 -0
- package/lib/typescript/native-stack/views/HeaderConfig.d.ts +4 -3
- package/lib/typescript/native-stack/views/HeaderConfig.d.ts.map +1 -0
- package/lib/typescript/native-stack/views/NativeStackView.d.ts +2 -1
- package/lib/typescript/native-stack/views/NativeStackView.d.ts.map +1 -0
- package/lib/typescript/reanimated/ReanimatedHeaderHeightContext.d.ts +1 -0
- package/lib/typescript/reanimated/ReanimatedHeaderHeightContext.d.ts.map +1 -0
- package/lib/typescript/reanimated/ReanimatedNativeStackScreen.d.ts +3 -3
- package/lib/typescript/reanimated/ReanimatedNativeStackScreen.d.ts.map +1 -0
- package/lib/typescript/reanimated/ReanimatedScreen.d.ts +3 -3
- package/lib/typescript/reanimated/ReanimatedScreen.d.ts.map +1 -0
- package/lib/typescript/reanimated/ReanimatedScreenProvider.d.ts +1 -0
- package/lib/typescript/reanimated/ReanimatedScreenProvider.d.ts.map +1 -0
- package/lib/typescript/reanimated/ReanimatedTransitionProgressContext.d.ts +2 -1
- package/lib/typescript/reanimated/ReanimatedTransitionProgressContext.d.ts.map +1 -0
- package/lib/typescript/reanimated/index.d.ts +1 -0
- package/lib/typescript/reanimated/index.d.ts.map +1 -0
- package/lib/typescript/reanimated/useReanimatedHeaderHeight.d.ts +2 -3
- package/lib/typescript/reanimated/useReanimatedHeaderHeight.d.ts.map +1 -0
- package/lib/typescript/reanimated/useReanimatedTransitionProgress.d.ts +4 -9
- package/lib/typescript/reanimated/useReanimatedTransitionProgress.d.ts.map +1 -0
- package/lib/typescript/types.d.ts +187 -37
- package/lib/typescript/types.d.ts.map +1 -0
- package/lib/typescript/useTransitionProgress.d.ts +4 -3
- package/lib/typescript/useTransitionProgress.d.ts.map +1 -0
- package/lib/typescript/utils.d.ts +27 -1
- package/lib/typescript/utils.d.ts.map +1 -0
- package/native-stack/README.md +156 -108
- package/native-stack/package.json +4 -4
- package/oss-attribution/attribution.txt +77 -0
- package/oss-attribution/licenseInfos.json +27 -0
- package/package.json +196 -1
- package/react-native.config.js +19 -16
- package/reanimated/package.json +1 -1
- package/src/TransitionProgressContext.tsx +3 -1
- package/src/components/DebugContainer.tsx +46 -0
- package/src/components/DebugContainer.web.tsx +7 -0
- package/src/components/FullWindowOverlay.tsx +33 -0
- package/src/components/FullWindowOverlay.web.tsx +6 -0
- package/src/components/Screen.tsx +392 -0
- package/src/components/Screen.web.tsx +47 -0
- package/src/components/ScreenContainer.tsx +28 -0
- package/src/components/ScreenContainer.web.tsx +5 -0
- package/src/components/ScreenContentWrapper.tsx +9 -0
- package/src/components/ScreenContentWrapper.web.tsx +5 -0
- package/src/components/ScreenFooter.tsx +20 -0
- package/src/components/ScreenFooter.web.tsx +7 -0
- package/src/components/ScreenStack.tsx +112 -0
- package/src/components/ScreenStack.web.tsx +5 -0
- package/src/components/ScreenStackHeaderConfig.tsx +127 -0
- package/src/components/ScreenStackHeaderConfig.web.tsx +45 -0
- package/src/components/ScreenStackItem.tsx +174 -0
- package/src/components/SearchBar.tsx +105 -0
- package/src/components/SearchBar.web.tsx +5 -0
- package/src/components/helpers/DelayedFreeze.tsx +27 -0
- package/src/components/helpers/usePrevious.tsx +12 -0
- package/src/contexts.tsx +9 -0
- package/src/core.ts +45 -0
- package/src/fabric/FullWindowOverlayNativeComponent.ts +16 -0
- package/src/fabric/ModalScreenNativeComponent.ts +115 -0
- package/src/fabric/NativeScreensModule.ts +8 -0
- package/src/fabric/NativeScreensModule.web.ts +1 -0
- package/src/fabric/ScreenContainerNativeComponent.ts +3 -3
- package/src/fabric/ScreenContentWrapperNativeComponent.ts +14 -0
- package/src/fabric/ScreenFooterNativeComponent.ts +6 -0
- package/src/fabric/ScreenNativeComponent.ts +34 -23
- package/src/fabric/ScreenNavigationContainerNativeComponent.ts +3 -1
- package/src/fabric/ScreenStackHeaderConfigNativeComponent.ts +38 -2
- package/src/fabric/ScreenStackHeaderSubviewNativeComponent.ts +5 -1
- package/src/fabric/ScreenStackNativeComponent.ts +3 -2
- package/src/fabric/SearchBarNativeComponent.ts +17 -13
- package/src/gesture-handler/GestureDetectorProvider.tsx +16 -0
- package/src/gesture-handler/RNScreensTurboModule.ts +13 -0
- package/src/gesture-handler/ScreenGestureDetector.tsx +241 -0
- package/src/gesture-handler/constraints.ts +87 -0
- package/src/gesture-handler/defaults.ts +46 -0
- package/src/gesture-handler/fabricUtils.ts +86 -0
- package/src/gesture-handler/fabricUtils.web.ts +10 -0
- package/src/gesture-handler/index.tsx +4 -0
- package/src/index.tsx +49 -113
- package/src/native-stack/contexts/GHContext.tsx +9 -0
- package/src/native-stack/navigators/createNativeStackNavigator.tsx +6 -3
- package/src/native-stack/types.tsx +204 -31
- package/src/native-stack/utils/getDefaultHeaderHeight.tsx +2 -2
- package/src/native-stack/utils/getStatusBarHeight.tsx +22 -0
- package/src/native-stack/utils/useAnimatedHeaderHeight.tsx +1 -1
- package/src/native-stack/utils/useBackPressSubscription.tsx +3 -2
- package/src/native-stack/utils/useHeaderHeight.tsx +1 -1
- package/src/native-stack/views/FontProcessor.tsx +2 -2
- package/src/native-stack/views/FooterComponent.tsx +10 -0
- package/src/native-stack/views/HeaderConfig.tsx +22 -6
- package/src/native-stack/views/NativeStackView.tsx +141 -54
- package/src/reanimated/ReanimatedHeaderHeightContext.tsx +1 -1
- package/src/reanimated/ReanimatedNativeStackScreen.tsx +15 -13
- package/src/reanimated/ReanimatedScreen.tsx +4 -3
- package/src/reanimated/ReanimatedScreenProvider.tsx +3 -2
- package/src/reanimated/useReanimatedHeaderHeight.tsx +2 -2
- package/src/reanimated/useReanimatedTransitionProgress.tsx +1 -1
- package/src/types.tsx +213 -41
- package/src/useTransitionProgress.tsx +1 -1
- package/src/utils.ts +27 -5
- package/windows/README.md +4 -1
- package/windows/RNScreens/Screen.h +3 -1
- package/SystemBundles/3d72c1ccdc1866604203e2067a94f7ab2c45408da644bb242aa980ffea58a74d.bundle +0 -33190
- package/SystemBundles/3d72c1ccdc1866604203e2067a94f7ab2c45408da644bb242aa980ffea58a74d.map +0 -10181
- package/SystemModules/amzn__react-native-screens.modules.txt +0 -101
- package/SystemModules/amzn__react-native-screens.private.modules.txt +0 -243
- package/lib/commonjs/index.native.js +0 -409
- package/lib/commonjs/index.native.js.map +0 -1
- package/lib/module/index.native.js +0 -412
- package/lib/module/index.native.js.map +0 -1
- package/lib/typescript/index.native.d.ts +0 -2
- package/src/index.native.tsx +0 -601
package/native-stack/README.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Native Stack Navigator
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> [!CAUTION]
|
|
4
|
+
> NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
|
|
4
5
|
|
|
5
6
|
Provides a way for your app to transition between screens where each new screen is placed on top of a stack.
|
|
6
7
|
|
|
@@ -79,17 +80,31 @@ String that applies `rtl` or `ltr` form to the stack. On Android, you have to ad
|
|
|
79
80
|
|
|
80
81
|
Boolean indicating whether to show the menu on longPress of iOS >= 14 back button.
|
|
81
82
|
|
|
83
|
+
#### `backButtonDisplayMode` (iOS only)
|
|
84
|
+
|
|
85
|
+
Enum value indicating display mode of **default** back button. It works on iOS >= 14, and is used only when none of: `backTitleFontFamily`, `backTitleFontSize`, `disableBackButtonMenu` or `backTitle` is set. Otherwise, when the button is customized, under the hood we use iOS native `backButtonItem` which overrides `backButtonDisplayMode`. Read more [#2123](https://github.com/software-mansion/react-native-screens/pull/2123). Possible options:
|
|
86
|
+
|
|
87
|
+
- `default` – show given back button previous controller title, system generic or just icon based on available space
|
|
88
|
+
- `generic` – show given system generic or just icon based on available space
|
|
89
|
+
- `minimal` – show just an icon
|
|
90
|
+
|
|
82
91
|
#### `fullScreenSwipeEnabled` (iOS only)
|
|
83
92
|
|
|
84
93
|
Boolean indicating whether the swipe gesture should work on whole screen. Swiping with this option results in the same transition animation as `simple_push` by default. It can be changed to other custom animations with `customAnimationOnSwipe` prop, but default iOS swipe animation is not achievable due to usage of custom recognizer. Defaults to `false`.
|
|
85
94
|
|
|
95
|
+
### `fullScreenSwipeShadowEnabled` (iOS only)
|
|
96
|
+
|
|
97
|
+
Boolean indicating whether the full screen dismiss gesture has shadow under view during transition. The gesture uses custom transition and thus
|
|
98
|
+
doesn't have a shadow by default. When enabled, a custom shadow view is added during the transition which tries to mimic the
|
|
99
|
+
default iOS shadow. Defaults to `true`.
|
|
100
|
+
|
|
86
101
|
#### `gestureEnabled` (iOS only)
|
|
87
102
|
|
|
88
103
|
Whether you can use gestures to dismiss this screen. Defaults to `true`.
|
|
89
104
|
|
|
90
105
|
#### `gestureResponseDistance` (iOS only)
|
|
91
106
|
|
|
92
|
-
Use it to restrict the distance from the edges of screen in which the gesture should be recognized. To be used alongside `fullScreenSwipeEnabled`. The responsive area is covered with 4 values: `start`, `end`, `top`, `bottom`. Example usage:
|
|
107
|
+
Use it to restrict the distance from the edges of screen in which the gesture should be recognized. To be used alongside `fullScreenSwipeEnabled`. The responsive area is covered with 4 values: `start`, `end`, `top`, `bottom`. Example usage:
|
|
93
108
|
|
|
94
109
|
```tsx
|
|
95
110
|
gestureResponseDistance: {
|
|
@@ -189,13 +204,13 @@ Style object for header title. Supported properties:
|
|
|
189
204
|
|
|
190
205
|
#### `headerTopInsetEnabled` (Android only)
|
|
191
206
|
|
|
192
|
-
A Boolean to that lets you opt out of insetting the header. You may want to
|
|
207
|
+
A Boolean to that lets you opt out of insetting the header. You may want to \* set this to `false` if you use an opaque status bar. Defaults to `true`. Insets are always applied on iOS because the header cannot be opaque.
|
|
193
208
|
|
|
194
209
|
#### `headerTranslucent`
|
|
195
210
|
|
|
196
211
|
Boolean indicating whether the navigation bar is translucent.
|
|
197
212
|
|
|
198
|
-
####
|
|
213
|
+
#### `hideKeyboardOnSwipe` (iOS only)
|
|
199
214
|
|
|
200
215
|
Whether the keyboard should hide when swiping to the previous screen. Defaults to `false`.
|
|
201
216
|
|
|
@@ -222,23 +237,38 @@ Sets the visibility of the navigation bar. Defaults to `false`.
|
|
|
222
237
|
|
|
223
238
|
How should the screen replacing another screen animate.
|
|
224
239
|
The following values are currently supported:
|
|
225
|
-
|
|
226
|
-
|
|
240
|
+
|
|
241
|
+
- `push` – the new screen will perform push animation.
|
|
242
|
+
- `pop` – the new screen will perform pop animation.
|
|
227
243
|
|
|
228
244
|
Defaults to `pop`.
|
|
229
245
|
|
|
230
|
-
#### `sheetAllowedDetents`
|
|
246
|
+
#### `sheetAllowedDetents`
|
|
231
247
|
|
|
232
|
-
Describes heights where a sheet can rest.
|
|
248
|
+
Describes heights where a sheet can rest.
|
|
233
249
|
Works only when `stackPresentation` is set to `formSheet`.
|
|
234
250
|
|
|
235
|
-
|
|
251
|
+
Heights should be described as fraction (a number from `[0, 1]` interval) of screen height / maximum detent height.
|
|
252
|
+
There is also possibility to specify `[-1]` literal array with single element, which intets to set the sheet height
|
|
253
|
+
to the height of its contents.
|
|
254
|
+
|
|
255
|
+
Please note that the array **must** be sorted in ascending order.
|
|
256
|
+
|
|
257
|
+
There are also legacy & **deprecated** options available:
|
|
258
|
+
|
|
259
|
+
* 'medium' - corresponds to `[0.5]` detent value, around half of the screen height,
|
|
260
|
+
* 'large' - corresponds to `[1.0]` detent value, maximum height,
|
|
261
|
+
* 'all' - corresponds to `[0.5, 1.0]` value, the name is deceiving due to compatibility reasons.
|
|
262
|
+
|
|
263
|
+
Defaults to `[1.0]` literal.
|
|
264
|
+
|
|
265
|
+
#### `sheetElevation` (Android only)
|
|
266
|
+
|
|
267
|
+
Integer value describing elevation of the sheet, impacting shadow on the top edge of the sheet.
|
|
236
268
|
|
|
237
|
-
|
|
238
|
-
- `medium` - only medium detent level will be allowed
|
|
239
|
-
- `all` - all detent levels will be allowed
|
|
269
|
+
Not dynamic - changing it after the component is rendered won't have an effect.
|
|
240
270
|
|
|
241
|
-
Defaults to `
|
|
271
|
+
Defaults to `24`.
|
|
242
272
|
|
|
243
273
|
#### `sheetExpandsWhenScrolledToEdge` (iOS only)
|
|
244
274
|
|
|
@@ -247,7 +277,7 @@ Works only when `stackPresentation` is set to `formSheet`.
|
|
|
247
277
|
|
|
248
278
|
Defaults to `true`.
|
|
249
279
|
|
|
250
|
-
#### `sheetCornerRadius
|
|
280
|
+
#### `sheetCornerRadius`
|
|
251
281
|
|
|
252
282
|
The corner radius that the sheet will try to render with.
|
|
253
283
|
Works only when `stackPresentation` is set to `formSheet`.
|
|
@@ -256,24 +286,36 @@ If set to non-negative value it will try to render sheet with provided radius, e
|
|
|
256
286
|
|
|
257
287
|
Defaults to system default.
|
|
258
288
|
|
|
289
|
+
#### `sheetInitialDetent`
|
|
290
|
+
|
|
291
|
+
Index of the detent the sheet should expand to after being opened.
|
|
292
|
+
Works only when `presentation` is set to `formSheet`.
|
|
293
|
+
|
|
294
|
+
Defaults to `0` - which represents first detent in the detents array.
|
|
295
|
+
|
|
259
296
|
#### `sheetGrabberVisible` (iOS only)
|
|
260
297
|
|
|
261
298
|
Boolean indicating whether the sheet shows a grabber at the top.
|
|
262
299
|
Works only when `stackPresentation` is set to `formSheet`.
|
|
263
300
|
Defaults to `false`.
|
|
264
301
|
|
|
265
|
-
#### `sheetLargestUndimmedDetent`
|
|
302
|
+
#### `sheetLargestUndimmedDetent`
|
|
303
|
+
|
|
304
|
+
The largest sheet detent for which a view underneath won't be dimmed.
|
|
305
|
+
Works only when `stackPresentation` is set to `formSheet`.
|
|
306
|
+
|
|
307
|
+
This prop can be set to an number, which indicates index of detent in `sheetAllowedDetents` array for which
|
|
308
|
+
there won't be a dimming view beneath the sheet.
|
|
266
309
|
|
|
267
|
-
|
|
268
|
-
Works only when `stackPresentation` is set to `formSheet`.
|
|
310
|
+
Additionaly there are following options available:
|
|
269
311
|
|
|
270
|
-
|
|
312
|
+
* `none` - there will be dimming view for all detents levels,
|
|
313
|
+
* `largest` - there won't be a dimming view for any detent level.
|
|
271
314
|
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
- `all` - the view underneath will be dimmed for any detent level
|
|
315
|
+
There also legacy & **deprecated** prop values available: `medium`, `large` (don't confuse with `largest`), `all`, which work in tandem with
|
|
316
|
+
corresponding legacy prop values for `sheetAllowedDetents` prop.
|
|
275
317
|
|
|
276
|
-
|
|
318
|
+
Defaults to `none`, indicating that the dimming view should be always present.
|
|
277
319
|
|
|
278
320
|
#### `stackAnimation`
|
|
279
321
|
|
|
@@ -283,10 +325,12 @@ How the given screen should appear/disappear when pushed or popped at the top of
|
|
|
283
325
|
- `fade` - fades screen in or out.
|
|
284
326
|
- `fade_from_bottom` – performs a fade from bottom animation
|
|
285
327
|
- `flip` – flips the screen, requires stackPresentation: `modal` (iOS only)
|
|
286
|
-
- `simple_push` – performs a default animation, but without
|
|
328
|
+
- `simple_push` – performs a default animation, but without native header transition (iOS only)
|
|
287
329
|
- `slide_from_bottom` – performs a slide from bottom animation
|
|
288
330
|
- `slide_from_right` - slide in the new screen from right to left (Android only, resolves to default transition on iOS)
|
|
289
|
-
- `slide_from_left` - slide in the new screen from left to right
|
|
331
|
+
- `slide_from_left` - slide in the new screen from left to right
|
|
332
|
+
- `"ios_from_right"` - iOS like slide in animation. pushes in the new screen from right to left (Android only, resolves to default transition on iOS)
|
|
333
|
+
- `"ios_from_left"` - iOS like slide in animation. pushes in the new screen from left to right (Android only, resolves to default transition on iOS)
|
|
290
334
|
- `none` - the screen appears/disappears without an animation.
|
|
291
335
|
|
|
292
336
|
Defaults to `default`.
|
|
@@ -310,6 +354,7 @@ Using `containedModal` and `containedTransparentModal` with other types of modal
|
|
|
310
354
|
#### `swipeDirection` (iOS only)
|
|
311
355
|
|
|
312
356
|
Sets the direction in which you should swipe to dismiss the screen. The following values are supported:
|
|
357
|
+
|
|
313
358
|
- `vertical` – dismiss screen vertically
|
|
314
359
|
- `horizontal` – dismiss screen horizontally (default)
|
|
315
360
|
|
|
@@ -321,7 +366,7 @@ A string that can be used as a fallback for `headerTitle`.
|
|
|
321
366
|
|
|
322
367
|
#### `transitionDuration` (iOS only)
|
|
323
368
|
|
|
324
|
-
Changes the duration (in milliseconds) of `slide_from_bottom`, `fade_from_bottom`, `fade` and `simple_push` transitions on iOS. Defaults to `
|
|
369
|
+
Changes the duration (in milliseconds) of `slide_from_bottom`, `fade_from_bottom`, `fade` and `simple_push` transitions on iOS. Defaults to `500`.
|
|
325
370
|
|
|
326
371
|
The duration of `default` and `flip` transitions isn't customizable.
|
|
327
372
|
|
|
@@ -334,25 +379,28 @@ Defaults to `false`. When `enableFreeze()` is run at the top of the application
|
|
|
334
379
|
#### `useTransitionProgress`
|
|
335
380
|
|
|
336
381
|
Hook providing context value of transition progress of the current screen to be used with `react-native` `Animated`. It consists of 2 values:
|
|
382
|
+
|
|
337
383
|
- `progress` - `Animated.Value` between `0.0` and `1.0` with the progress of the current transition.
|
|
338
384
|
- `closing` - `Animated.Value` of `1` or `0` indicating if the current screen is being navigated into or from.
|
|
339
385
|
- `goingForward` - `Animated.Value` of `1` or `0` indicating if the current transition is pushing or removing screens.
|
|
340
386
|
|
|
341
387
|
```jsx
|
|
342
|
-
import {Animated} from 'react-native';
|
|
343
|
-
import {useTransitionProgress} from 'react-native-screens';
|
|
388
|
+
import { Animated } from 'react-native';
|
|
389
|
+
import { useTransitionProgress } from 'react-native-screens';
|
|
344
390
|
|
|
345
391
|
function Home() {
|
|
346
|
-
const {progress} = useTransitionProgress();
|
|
392
|
+
const { progress } = useTransitionProgress();
|
|
347
393
|
|
|
348
394
|
const opacity = progress.interpolate({
|
|
349
395
|
inputRange: [0, 0.5, 1],
|
|
350
|
-
outputRange: [1.0, 0.0
|
|
396
|
+
outputRange: [1.0, 0.0, 1.0],
|
|
351
397
|
extrapolate: 'clamp',
|
|
352
398
|
});
|
|
353
399
|
|
|
354
400
|
return (
|
|
355
|
-
<Animated.View
|
|
401
|
+
<Animated.View
|
|
402
|
+
style={{ opacity, height: 50, width: '100%', backgroundColor: 'green' }}
|
|
403
|
+
/>
|
|
356
404
|
);
|
|
357
405
|
}
|
|
358
406
|
```
|
|
@@ -360,14 +408,15 @@ function Home() {
|
|
|
360
408
|
#### `useReanimatedTransitionProgress`
|
|
361
409
|
|
|
362
410
|
A callback called every frame during the transition of screens to be used with `react-native-reanimated` version `2.x`. It consists of 2 shared values:
|
|
411
|
+
|
|
363
412
|
- `progress` - between `0.0` and `1.0` with the progress of the current transition.
|
|
364
|
-
- `closing` -
|
|
413
|
+
- `closing` - `1` or `0` indicating if the current screen is being navigated into or from.
|
|
365
414
|
- `goingForward` - `1` or `0` indicating if the current transition is pushing or removing screens.
|
|
366
415
|
|
|
367
416
|
In order to use it, you need to have `react-native-reanimated` version `2.x` installed in your project and wrap your code with `ReanimatedScreenProvider`, like this:
|
|
368
417
|
|
|
369
418
|
```jsx
|
|
370
|
-
import {ReanimatedScreenProvider} from 'react-native-screens/reanimated';
|
|
419
|
+
import { ReanimatedScreenProvider } from 'react-native-screens/reanimated';
|
|
371
420
|
|
|
372
421
|
export default function App() {
|
|
373
422
|
return (
|
|
@@ -381,12 +430,20 @@ export default function App() {
|
|
|
381
430
|
Then you can use `useReanimatedTransitionProgress` to get the shared values:
|
|
382
431
|
|
|
383
432
|
```jsx
|
|
384
|
-
import {useReanimatedTransitionProgress} from 'react-native-screens/reanimated';
|
|
385
|
-
import Animated, {
|
|
433
|
+
import { useReanimatedTransitionProgress } from 'react-native-screens/reanimated';
|
|
434
|
+
import Animated, {
|
|
435
|
+
useAnimatedStyle,
|
|
436
|
+
useDerivedValue,
|
|
437
|
+
} from 'react-native-reanimated';
|
|
386
438
|
|
|
387
439
|
function Home() {
|
|
388
440
|
const reaProgress = useReanimatedTransitionProgress();
|
|
389
|
-
const sv = useDerivedValue(
|
|
441
|
+
const sv = useDerivedValue(
|
|
442
|
+
() =>
|
|
443
|
+
(reaProgress.progress.value < 0.5
|
|
444
|
+
? reaProgress.progress.value * 50
|
|
445
|
+
: (1 - reaProgress.progress.value) * 50) + 50,
|
|
446
|
+
);
|
|
390
447
|
const reaStyle = useAnimatedStyle(() => {
|
|
391
448
|
return {
|
|
392
449
|
width: sv.value,
|
|
@@ -395,9 +452,7 @@ function Home() {
|
|
|
395
452
|
};
|
|
396
453
|
});
|
|
397
454
|
|
|
398
|
-
return
|
|
399
|
-
<Animated.View style={reaStyle} />
|
|
400
|
-
);
|
|
455
|
+
return <Animated.View style={reaStyle} />;
|
|
401
456
|
}
|
|
402
457
|
```
|
|
403
458
|
|
|
@@ -405,10 +460,11 @@ function Home() {
|
|
|
405
460
|
|
|
406
461
|
With `native-stack`, the status bar and screen orientation can be managed by `UIViewController` on iOS. On Android, the status bar and screen orientation can be managed by `FragmentActivity`. On iOS, it requires:
|
|
407
462
|
|
|
408
|
-
1. For status bar managment: enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file (it disables the option to use React Native's `StatusBar` component).
|
|
463
|
+
1. For status bar managment: enabling (or deleting) `View controller-based status bar appearance` in your Info.plist file (it disables the option to use React Native's `StatusBar` component).
|
|
409
464
|
2. For both status bar and orientation managment: adding `#import <RNScreens/UIViewController+RNScreens.h>` in your project's `AppDelegate.m` (you can see this change applied in the `AppDelegate.m` of `Example` project).
|
|
410
465
|
|
|
411
466
|
On Android, no additional setup is required, although, you should keep in mind that once you set the orientation or status bar props, `react-native-screens` will manage them on every screen, so you shouldn't use other methods of manipulating them then.
|
|
467
|
+
|
|
412
468
|
#### `screenOrientation`
|
|
413
469
|
|
|
414
470
|
Sets the current screen's available orientations and forces rotation if current orientation is not included. On iOS, if you have supported orientations set in `info.plist`, they will take precedence over this prop. Possible values:
|
|
@@ -454,14 +510,14 @@ Sets the translucency of the status bar (similar to the `StatusBar` component).
|
|
|
454
510
|
|
|
455
511
|
The search bar is just a `searchBar` property that can be specified in the navigator's `screenOptions` or an individual screen's `options`. Search bars are rarely static so normally it is controlled by passing an object to `searchBar` navigation option in the component's body.
|
|
456
512
|
|
|
457
|
-
Example:
|
|
513
|
+
Example:
|
|
458
514
|
|
|
459
515
|
```js
|
|
460
516
|
React.useLayoutEffect(() => {
|
|
461
517
|
navigation.setOptions({
|
|
462
518
|
searchBar: {
|
|
463
519
|
// search bar options
|
|
464
|
-
}
|
|
520
|
+
},
|
|
465
521
|
});
|
|
466
522
|
}, [navigation]);
|
|
467
523
|
```
|
|
@@ -502,7 +558,7 @@ The text to be used instead of default `Cancel` button text.
|
|
|
502
558
|
|
|
503
559
|
#### `disableBackButtonOverride` (Android only)
|
|
504
560
|
|
|
505
|
-
Default behavior is to prevent screen from going back when search bar is open (`disableBackButtonOverride: false`). If you don't want this to happen set `disableBackButtonOverride` to `true`
|
|
561
|
+
Default behavior is to prevent screen from going back when search bar is open (`disableBackButtonOverride: false`). If you don't want this to happen set `disableBackButtonOverride` to `true`
|
|
506
562
|
|
|
507
563
|
#### `hideNavigationBar` (iOS only)
|
|
508
564
|
|
|
@@ -521,12 +577,13 @@ Defaults to `true`.
|
|
|
521
577
|
This prop is used to change type of the input and keyboard. Default value is `'text'`.
|
|
522
578
|
|
|
523
579
|
All values:
|
|
580
|
+
|
|
524
581
|
- `'text'` - normal text input
|
|
525
582
|
- `'number'` - number input
|
|
526
583
|
- `'email'` - email input
|
|
527
584
|
- `'phone'` - phone input
|
|
528
585
|
|
|
529
|
-
####
|
|
586
|
+
#### `obscureBackground` (iOS only)
|
|
530
587
|
|
|
531
588
|
Boolean indicating whether to obscure the underlying content with semi-transparent overlay.
|
|
532
589
|
|
|
@@ -552,11 +609,12 @@ const [search, setSearch] = React.useState('');
|
|
|
552
609
|
React.useLayoutEffect(() => {
|
|
553
610
|
navigation.setOptions({
|
|
554
611
|
searchBar: {
|
|
555
|
-
onChangeText:
|
|
556
|
-
}
|
|
612
|
+
onChangeText: event => setSearch(event.nativeEvent.text),
|
|
613
|
+
},
|
|
557
614
|
});
|
|
558
615
|
}, [navigation]);
|
|
559
616
|
```
|
|
617
|
+
|
|
560
618
|
#### `onClose` (Android only)
|
|
561
619
|
|
|
562
620
|
A callback that gets called when search bar is closing
|
|
@@ -582,15 +640,15 @@ Defaults to an empty string.
|
|
|
582
640
|
#### `placement` (iOS only)
|
|
583
641
|
|
|
584
642
|
Position of the search bar
|
|
585
|
-
|
|
643
|
+
|
|
586
644
|
Supported values:
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
645
|
+
|
|
646
|
+
- `automatic` - the search bar is placed according to current layout
|
|
647
|
+
- `inline` - the search bar is placed on the trailing edge of navigation bar
|
|
648
|
+
- `stacked` - the search bar is placed below the other content in navigation bar
|
|
591
649
|
|
|
592
650
|
Defaults to `stacked`
|
|
593
|
-
|
|
651
|
+
|
|
594
652
|
#### `textColor`
|
|
595
653
|
|
|
596
654
|
The search field text color.
|
|
@@ -611,11 +669,12 @@ Show the search hint icon when search bar is focused. (Android only)
|
|
|
611
669
|
|
|
612
670
|
A React ref to imperatively modify search bar. Supported actions:
|
|
613
671
|
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
672
|
+
- `focus` - focus on search bar
|
|
673
|
+
- `blur` - remove focus from search bar
|
|
674
|
+
- `clearText` - clear text in search bar
|
|
675
|
+
- `setText` - set search bar's content to given string
|
|
676
|
+
- `cancelSearch` - cancel search in search bar.
|
|
677
|
+
- `toggleCancelButton` (iOS only) - toggle cancel button display near search bar.
|
|
619
678
|
|
|
620
679
|
### Events
|
|
621
680
|
|
|
@@ -630,16 +689,13 @@ Event which fires when the screen appears.
|
|
|
630
689
|
Example:
|
|
631
690
|
|
|
632
691
|
```js
|
|
633
|
-
React.useEffect(
|
|
634
|
-
(
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
},
|
|
641
|
-
[navigation]
|
|
642
|
-
);
|
|
692
|
+
React.useEffect(() => {
|
|
693
|
+
const unsubscribe = navigation.addListener('appear', e => {
|
|
694
|
+
// Do something
|
|
695
|
+
});
|
|
696
|
+
|
|
697
|
+
return unsubscribe;
|
|
698
|
+
}, [navigation]);
|
|
643
699
|
```
|
|
644
700
|
|
|
645
701
|
#### `dismiss`
|
|
@@ -649,16 +705,13 @@ Event which fires when the current screen is dismissed by hardware back (on Andr
|
|
|
649
705
|
Example:
|
|
650
706
|
|
|
651
707
|
```js
|
|
652
|
-
React.useEffect(
|
|
653
|
-
(
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
},
|
|
660
|
-
[navigation]
|
|
661
|
-
);
|
|
708
|
+
React.useEffect(() => {
|
|
709
|
+
const unsubscribe = navigation.addListener('dismiss', e => {
|
|
710
|
+
// Do something
|
|
711
|
+
});
|
|
712
|
+
|
|
713
|
+
return unsubscribe;
|
|
714
|
+
}, [navigation]);
|
|
662
715
|
```
|
|
663
716
|
|
|
664
717
|
#### `transitionStart`
|
|
@@ -672,20 +725,17 @@ Event data:
|
|
|
672
725
|
Example:
|
|
673
726
|
|
|
674
727
|
```js
|
|
675
|
-
React.useEffect(
|
|
676
|
-
(
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
},
|
|
687
|
-
[navigation]
|
|
688
|
-
);
|
|
728
|
+
React.useEffect(() => {
|
|
729
|
+
const unsubscribe = navigation.addListener('transitionStart', e => {
|
|
730
|
+
if (e.data.closing) {
|
|
731
|
+
// Will be dismissed
|
|
732
|
+
} else {
|
|
733
|
+
// Will appear
|
|
734
|
+
}
|
|
735
|
+
});
|
|
736
|
+
|
|
737
|
+
return unsubscribe;
|
|
738
|
+
}, [navigation]);
|
|
689
739
|
```
|
|
690
740
|
|
|
691
741
|
#### `transitionEnd`
|
|
@@ -699,20 +749,17 @@ Event data:
|
|
|
699
749
|
Example:
|
|
700
750
|
|
|
701
751
|
```js
|
|
702
|
-
React.useEffect(
|
|
703
|
-
(
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
},
|
|
714
|
-
[navigation]
|
|
715
|
-
);
|
|
752
|
+
React.useEffect(() => {
|
|
753
|
+
const unsubscribe = navigation.addListener('transitionEnd', e => {
|
|
754
|
+
if (e.data.closing) {
|
|
755
|
+
// Was dismissed
|
|
756
|
+
} else {
|
|
757
|
+
// Did appear
|
|
758
|
+
}
|
|
759
|
+
});
|
|
760
|
+
|
|
761
|
+
return unsubscribe;
|
|
762
|
+
}, [navigation]);
|
|
716
763
|
```
|
|
717
764
|
|
|
718
765
|
### Helpers
|
|
@@ -751,9 +798,10 @@ navigation.popToTop();
|
|
|
751
798
|
### Measuring header's height
|
|
752
799
|
|
|
753
800
|
To measure header's height, you can use the `useHeaderHeight`, `useAnimatedHeaderHeight` or `useReanimatedHeaderHeight` hook.
|
|
801
|
+
|
|
754
802
|
- `useHeaderHeight` returns the static header's height. The value provided by this hook changes when screen appears, when there's a change in header options or screen orientation.
|
|
755
803
|
Use this hook if you're sure your header height won't change dynamically, or when the screen is heavy.
|
|
756
|
-
- `useAnimatedHeaderHeight` dynamically calculates the header's height. The value provided by this hook changes with every view layout (such as shrinking a large header into small one with a ScrollView). It returns an Animated.Value.
|
|
804
|
+
- `useAnimatedHeaderHeight` dynamically calculates the header's height. The value provided by this hook changes with every view layout (such as shrinking a large header into small one with a ScrollView). It returns an Animated.Value.
|
|
757
805
|
Please beware of using this hook in heavy components, as it may result in performance issues.
|
|
758
806
|
- `useReanimatedHeaderHeight` also dynamically calculates the header's height but uses React Native Reanimated under the hood. It returns an Animated.SharedValue.
|
|
759
807
|
Make sure to wrap your Stack.Navigator with `ReanimatedScreenProvider` before using this hook.
|
|
@@ -762,13 +810,13 @@ We recommend using `useReanimatedHeaderHeight` rather than `useAnimatedHeaderHei
|
|
|
762
810
|
|
|
763
811
|
```tsx
|
|
764
812
|
// for using useHeaderHeight
|
|
765
|
-
import {useHeaderHeight} from 'react-native-screens/native-stack';
|
|
813
|
+
import { useHeaderHeight } from 'react-native-screens/native-stack';
|
|
766
814
|
|
|
767
815
|
// for using useAnimatedHeaderHeight
|
|
768
|
-
import {useAnimatedHeaderHeight} from 'react-native-screens/native-stack';
|
|
816
|
+
import { useAnimatedHeaderHeight } from 'react-native-screens/native-stack';
|
|
769
817
|
|
|
770
818
|
// for using useReanimatedHeaderHeight
|
|
771
|
-
import {useReanimatedHeaderHeight} from 'react-native-screens/reanimated';
|
|
819
|
+
import { useReanimatedHeaderHeight } from 'react-native-screens/reanimated';
|
|
772
820
|
```
|
|
773
821
|
|
|
774
822
|
## Example
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
"main": "../lib/commonjs/native-stack/index",
|
|
3
|
+
"module": "../lib/module/native-stack/index",
|
|
4
|
+
"react-native": "../src/native-stack/index",
|
|
5
|
+
"types": "../lib/typescript/native-stack/index.d.ts"
|
|
6
6
|
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
react
|
|
2
|
+
19.2.4 <https://github.com/facebook/react>
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
+
|
|
7
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
9
|
+
in the Software without restriction, including without limitation the rights
|
|
10
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
11
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
12
|
+
furnished to do so, subject to the following conditions:
|
|
13
|
+
|
|
14
|
+
The above copyright notice and this permission notice shall be included in all
|
|
15
|
+
copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
18
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
19
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
20
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
21
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
22
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
23
|
+
SOFTWARE.
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
******************************
|
|
27
|
+
|
|
28
|
+
react-freeze
|
|
29
|
+
1.0.4 <https://github.com/software-mansion/react-freeze>
|
|
30
|
+
The MIT License (MIT)
|
|
31
|
+
|
|
32
|
+
Copyright (c) 2021 Software Mansion
|
|
33
|
+
|
|
34
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
35
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
36
|
+
in the Software without restriction, including without limitation the rights
|
|
37
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
38
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
39
|
+
furnished to do so, subject to the following conditions:
|
|
40
|
+
|
|
41
|
+
The above copyright notice and this permission notice shall be included in all
|
|
42
|
+
copies or substantial portions of the Software.
|
|
43
|
+
|
|
44
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
45
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
46
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
47
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
48
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
49
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
50
|
+
SOFTWARE.
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
******************************
|
|
54
|
+
|
|
55
|
+
warn-once
|
|
56
|
+
0.1.1 <https://github.com/satya164/warn-once>
|
|
57
|
+
MIT License
|
|
58
|
+
|
|
59
|
+
Copyright (c) 2022 Satyajit Sahoo
|
|
60
|
+
|
|
61
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
62
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
63
|
+
in the Software without restriction, including without limitation the rights
|
|
64
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
65
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
66
|
+
furnished to do so, subject to the following conditions:
|
|
67
|
+
|
|
68
|
+
The above copyright notice and this permission notice shall be included in all
|
|
69
|
+
copies or substantial portions of the Software.
|
|
70
|
+
|
|
71
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
72
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
73
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
74
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
75
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
76
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
77
|
+
SOFTWARE.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"ignore": false,
|
|
4
|
+
"name": "react-freeze",
|
|
5
|
+
"version": "1.0.4",
|
|
6
|
+
"url": "https://github.com/software-mansion/react-freeze",
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"licenseText": "The MIT License (MIT)\n\nCopyright (c) 2021 Software Mansion\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"ignore": false,
|
|
12
|
+
"name": "react",
|
|
13
|
+
"version": "19.2.4",
|
|
14
|
+
"url": "https://github.com/facebook/react",
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"licenseText": "MIT License\n\nCopyright (c) Meta Platforms, Inc. and affiliates.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"ignore": false,
|
|
20
|
+
"name": "warn-once",
|
|
21
|
+
"version": "0.1.1",
|
|
22
|
+
"authors": "Satyajit Sahoo <satyajit.happy@gmail.com>",
|
|
23
|
+
"url": "https://github.com/satya164/warn-once",
|
|
24
|
+
"license": "MIT",
|
|
25
|
+
"licenseText": "MIT License\n\nCopyright (c) 2022 Satyajit Sahoo\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n"
|
|
26
|
+
}
|
|
27
|
+
]
|