@amazon-devices/react-native-screens 2.0.1759135970 → 3.0.9000000000
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/31d5b6b69618249f6233b73a1de7c4d890c86be7ccb031ce7cf2dcc41783f9f7.bundle +45301 -0
- package/SystemBundles/31d5b6b69618249f6233b73a1de7c4d890c86be7ccb031ce7cf2dcc41783f9f7.map +13711 -0
- package/SystemModules/amzn__react-native-screens-3.modules.txt +158 -0
- package/SystemModules/amzn__react-native-screens-3.private.modules.txt +377 -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 +1 -0
- package/lib/commonjs/TransitionProgressContext.js.map +1 -1
- package/lib/commonjs/components/DebugContainer.js +39 -0
- package/lib/commonjs/components/DebugContainer.js.map +1 -0
- package/lib/commonjs/components/DebugContainer.web.js +15 -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 +47 -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 +90 -0
- package/lib/commonjs/components/ScreenStackHeaderConfig.js.map +1 -0
- package/lib/commonjs/components/ScreenStackHeaderConfig.web.js +27 -0
- package/lib/commonjs/components/ScreenStackHeaderConfig.web.js.map +1 -0
- package/lib/commonjs/components/ScreenStackItem.js +107 -0
- package/lib/commonjs/components/ScreenStackItem.js.map +1 -0
- package/lib/commonjs/components/SearchBar.js +63 -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 +15 -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 +16 -1
- 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 +2 -1
- 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 +5 -2
- 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 +4 -5
- 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 +201 -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 -94
- 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.map +1 -1
- package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js +21 -20
- 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.map +1 -1
- package/lib/commonjs/native-stack/utils/HeaderHeightContext.js.map +1 -1
- 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.map +1 -1
- package/lib/commonjs/native-stack/utils/useBackPressSubscription.js +2 -4
- package/lib/commonjs/native-stack/utils/useBackPressSubscription.js.map +1 -1
- package/lib/commonjs/native-stack/utils/useHeaderHeight.js.map +1 -1
- package/lib/commonjs/native-stack/views/FontProcessor.js +1 -3
- 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 +21 -13
- package/lib/commonjs/native-stack/views/HeaderConfig.js.map +1 -1
- package/lib/commonjs/native-stack/views/NativeStackView.js +118 -52
- package/lib/commonjs/native-stack/views/NativeStackView.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedHeaderHeightContext.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js +15 -21
- package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedScreen.js +2 -2
- package/lib/commonjs/reanimated/ReanimatedScreen.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedScreenProvider.js +8 -16
- package/lib/commonjs/reanimated/ReanimatedScreenProvider.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js.map +1 -1
- package/lib/commonjs/reanimated/index.js.map +1 -1
- package/lib/commonjs/reanimated/useReanimatedHeaderHeight.js +2 -2
- package/lib/commonjs/reanimated/useReanimatedHeaderHeight.js.map +1 -1
- package/lib/commonjs/reanimated/useReanimatedTransitionProgress.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- 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 +40 -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 +81 -0
- package/lib/module/components/ScreenStackHeaderConfig.js.map +1 -0
- package/lib/module/components/ScreenStackHeaderConfig.web.js +14 -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 +57 -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 +9 -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 +21 -20
- 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 +2 -4
- 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 +13 -6
- package/lib/module/native-stack/views/HeaderConfig.js.map +1 -1
- package/lib/module/native-stack/views/NativeStackView.js +114 -46
- 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 +8 -12
- package/lib/module/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
- package/lib/module/reanimated/ReanimatedScreen.js +1 -2
- package/lib/module/reanimated/ReanimatedScreen.js.map +1 -1
- package/lib/module/reanimated/ReanimatedScreenProvider.js +7 -15
- 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 +3 -2
- 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 +186 -36
- 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/package.json +1 -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 +46 -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 +122 -0
- package/src/components/ScreenStackHeaderConfig.web.tsx +39 -0
- package/src/components/ScreenStackItem.tsx +174 -0
- package/src/components/SearchBar.tsx +102 -0
- package/src/components/SearchBar.web.tsx +5 -0
- package/src/components/helpers/DelayedFreeze.tsx +27 -0
- package/src/components/helpers/usePrevious.tsx +11 -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 +1 -1
- 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 +20 -5
- package/src/native-stack/views/NativeStackView.tsx +137 -53
- 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 +210 -40
- 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/4a5c11b5bb8dfc0553e927a2c8678e1dbd4a75220fe24dfbdba59b5550215de6.bundle +0 -33681
- package/SystemBundles/4a5c11b5bb8dfc0553e927a2c8678e1dbd4a75220fe24dfbdba59b5550215de6.map +0 -1
- package/SystemModules/amzn__react-native-screens.modules.txt +0 -101
- package/SystemModules/amzn__react-native-screens.private.modules.txt +0 -244
- 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
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
// amznmod_react - change imports to kepler packages
|
|
25
25
|
} from '@amazon-devices/react-navigation__native';
|
|
26
26
|
import * as React from 'react';
|
|
27
|
+
import { PropsWithChildren } from 'react';
|
|
27
28
|
import {
|
|
28
29
|
ImageSourcePropType,
|
|
29
30
|
StyleProp,
|
|
@@ -31,12 +32,15 @@ import {
|
|
|
31
32
|
ColorValue,
|
|
32
33
|
} from 'react-native';
|
|
33
34
|
import {
|
|
35
|
+
GestureDetectorBridge,
|
|
34
36
|
ScreenProps,
|
|
35
37
|
ScreenStackHeaderConfigProps,
|
|
36
38
|
SearchBarProps,
|
|
37
|
-
|
|
38
|
-
} from '@amazon-devices/react-native-screens';
|
|
39
|
+
} from '../types';
|
|
39
40
|
|
|
41
|
+
/**
|
|
42
|
+
* @deprecated 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.
|
|
43
|
+
*/
|
|
40
44
|
export type NativeStackNavigationEventMap = {
|
|
41
45
|
/**
|
|
42
46
|
* Event which fires when the screen appears.
|
|
@@ -64,11 +68,23 @@ export type NativeStackNavigationEventMap = {
|
|
|
64
68
|
* Event which fires when a header height gets changed.
|
|
65
69
|
*/
|
|
66
70
|
headerHeightChange: { data: { headerHeight: number } };
|
|
71
|
+
/**
|
|
72
|
+
* Event which fires when screen is in sheet presentation & it's detent changes.
|
|
73
|
+
*
|
|
74
|
+
* In payload it caries two fields:
|
|
75
|
+
*
|
|
76
|
+
* * index - current detent index in the `sheetAllowedDetents` array,
|
|
77
|
+
* * isStable - on Android `false` value means that the user is dragging the sheet or it is settling; on iOS it is always `true`.
|
|
78
|
+
*/
|
|
79
|
+
sheetDetentChange: { data: { index: number; isStable: boolean } };
|
|
67
80
|
};
|
|
68
81
|
|
|
82
|
+
/**
|
|
83
|
+
* @deprecated 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.
|
|
84
|
+
*/
|
|
69
85
|
export type NativeStackNavigationProp<
|
|
70
86
|
ParamList extends ParamListBase,
|
|
71
|
-
RouteName extends keyof ParamList = string
|
|
87
|
+
RouteName extends keyof ParamList = string,
|
|
72
88
|
> = NavigationProp<
|
|
73
89
|
ParamList,
|
|
74
90
|
RouteName,
|
|
@@ -79,23 +95,34 @@ export type NativeStackNavigationProp<
|
|
|
79
95
|
> &
|
|
80
96
|
StackActionHelpers<ParamList>;
|
|
81
97
|
|
|
98
|
+
/**
|
|
99
|
+
* @deprecated 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.
|
|
100
|
+
*/
|
|
82
101
|
export type NativeStackScreenProps<
|
|
83
102
|
ParamList extends ParamListBase,
|
|
84
|
-
RouteName extends keyof ParamList = string
|
|
103
|
+
RouteName extends keyof ParamList = string,
|
|
85
104
|
> = {
|
|
86
105
|
navigation: NativeStackNavigationProp<ParamList, RouteName>;
|
|
87
106
|
route: RouteProp<ParamList, RouteName>;
|
|
88
107
|
};
|
|
89
108
|
|
|
109
|
+
/**
|
|
110
|
+
* @deprecated 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.
|
|
111
|
+
*/
|
|
90
112
|
export type NativeStackNavigationHelpers = NavigationHelpers<
|
|
91
113
|
ParamListBase,
|
|
92
114
|
NativeStackNavigationEventMap
|
|
93
115
|
>;
|
|
94
116
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
117
|
+
/**
|
|
118
|
+
* We want it to be an empty object beacuse navigator does not have any additional config
|
|
119
|
+
* @deprecated 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.
|
|
120
|
+
*/
|
|
121
|
+
export type NativeStackNavigationConfig = {}; // eslint-disable-line @typescript-eslint/ban-types
|
|
98
122
|
|
|
123
|
+
/**
|
|
124
|
+
* @deprecated 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.
|
|
125
|
+
*/
|
|
99
126
|
export type NativeStackNavigationOptions = {
|
|
100
127
|
/**
|
|
101
128
|
* Image to display in the header as the back button.
|
|
@@ -108,6 +135,8 @@ export type NativeStackNavigationOptions = {
|
|
|
108
135
|
backButtonInCustomView?: boolean;
|
|
109
136
|
/**
|
|
110
137
|
* Style object for the scene content.
|
|
138
|
+
*
|
|
139
|
+
* As a workaround to truncated sheet content, formSheet uses backgroundColor from contentStyle and applies it on Screen.
|
|
111
140
|
*/
|
|
112
141
|
contentStyle?: StyleProp<ViewStyle>;
|
|
113
142
|
/**
|
|
@@ -125,6 +154,15 @@ export type NativeStackNavigationOptions = {
|
|
|
125
154
|
* @platform ios
|
|
126
155
|
*/
|
|
127
156
|
disableBackButtonMenu?: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* How the back button behaves by default (when not customized). Available on iOS>=14, and is used only when none of: `backTitleFontFamily`, `backTitleFontSize`, `disableBackButtonMenu` or `backTitle` is set.
|
|
159
|
+
* The following values are currently supported (they correspond to https://developer.apple.com/documentation/uikit/uinavigationitembackbuttondisplaymode?language=objc):
|
|
160
|
+
* - "default" – show given back button previous controller title, system generic or just icon based on available space
|
|
161
|
+
* - "generic" – show given system generic or just icon based on available space
|
|
162
|
+
* - "minimal" – show just an icon
|
|
163
|
+
* @platform ios
|
|
164
|
+
*/
|
|
165
|
+
backButtonDisplayMode?: ScreenStackHeaderConfigProps['backButtonDisplayMode'];
|
|
128
166
|
/**
|
|
129
167
|
* Whether inactive screens should be suspended from re-rendering. Defaults to `false`.
|
|
130
168
|
* Defaults to `true` when `enableFreeze()` is run at the top of the application.
|
|
@@ -138,6 +176,16 @@ export type NativeStackNavigationOptions = {
|
|
|
138
176
|
* @platform ios
|
|
139
177
|
*/
|
|
140
178
|
fullScreenSwipeEnabled?: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Whether the full screen dismiss gesture has shadow under view during transition. The gesture uses custom transition and thus
|
|
181
|
+
* doesn't have a shadow by default. When enabled, a custom shadow view is added during the transition which tries to mimic the
|
|
182
|
+
* default iOS shadow. Defaults to `true`.
|
|
183
|
+
*
|
|
184
|
+
* This does not affect the behavior of transitions that don't use gestures, enabled by `fullScreenGestureEnabled` prop.
|
|
185
|
+
*
|
|
186
|
+
* @platform ios
|
|
187
|
+
*/
|
|
188
|
+
fullScreenSwipeShadowEnabled?: boolean;
|
|
141
189
|
/**
|
|
142
190
|
* Whether you can use gestures to dismiss this screen. Defaults to `true`.
|
|
143
191
|
* Only supported on iOS.
|
|
@@ -309,6 +357,12 @@ export type NativeStackNavigationOptions = {
|
|
|
309
357
|
* @platform android
|
|
310
358
|
*/
|
|
311
359
|
navigationBarColor?: ColorValue;
|
|
360
|
+
/**
|
|
361
|
+
* Boolean indicating whether the content should be visible behind the navigation bar. Defaults to `false`.
|
|
362
|
+
*
|
|
363
|
+
* @platform android
|
|
364
|
+
*/
|
|
365
|
+
navigationBarTranslucent?: boolean;
|
|
312
366
|
/**
|
|
313
367
|
* Sets the visibility of the navigation bar. Defaults to `false`.
|
|
314
368
|
*
|
|
@@ -342,17 +396,24 @@ export type NativeStackNavigationOptions = {
|
|
|
342
396
|
/**
|
|
343
397
|
* Describes heights where a sheet can rest.
|
|
344
398
|
* Works only when `stackPresentation` is set to `formSheet`.
|
|
345
|
-
* Defaults to `large`.
|
|
346
399
|
*
|
|
347
|
-
*
|
|
400
|
+
* Heights should be described as fraction (a number from [0, 1] interval) of screen height / maximum detent height.
|
|
348
401
|
*
|
|
349
|
-
*
|
|
350
|
-
* - `medium` - only medium detent level will be allowed
|
|
351
|
-
* - `all` - all detent levels will be allowed
|
|
402
|
+
* Please note that the array **must** be sorted in ascending order.
|
|
352
403
|
*
|
|
353
|
-
*
|
|
404
|
+
* Defaults to `[1.0]` literal.
|
|
405
|
+
*/
|
|
406
|
+
sheetAllowedDetents?: ScreenProps['sheetAllowedDetents'] | 'fitToContents';
|
|
407
|
+
/**
|
|
408
|
+
* Integer value describing elevation of the sheet, impacting shadow on the top edge of the sheet.
|
|
409
|
+
*
|
|
410
|
+
* Not dynamic.
|
|
411
|
+
*
|
|
412
|
+
* Defaults to `24`.
|
|
413
|
+
*
|
|
414
|
+
* @platform Android
|
|
354
415
|
*/
|
|
355
|
-
|
|
416
|
+
sheetElevation?: ScreenProps['sheetElevation'];
|
|
356
417
|
/**
|
|
357
418
|
* Whether the sheet should expand to larger detent when scrolling.
|
|
358
419
|
* Works only when `stackPresentation` is set to `formSheet`.
|
|
@@ -360,7 +421,7 @@ export type NativeStackNavigationOptions = {
|
|
|
360
421
|
*
|
|
361
422
|
* @platform ios
|
|
362
423
|
*/
|
|
363
|
-
sheetExpandsWhenScrolledToEdge?:
|
|
424
|
+
sheetExpandsWhenScrolledToEdge?: ScreenProps['sheetExpandsWhenScrolledToEdge'];
|
|
364
425
|
/**
|
|
365
426
|
* The corner radius that the sheet will try to render with.
|
|
366
427
|
* Works only when `stackPresentation` is set to `formSheet`.
|
|
@@ -368,10 +429,8 @@ export type NativeStackNavigationOptions = {
|
|
|
368
429
|
* If set to non-negative value it will try to render sheet with provided radius, else it will apply system default.
|
|
369
430
|
*
|
|
370
431
|
* If left unset system default is used.
|
|
371
|
-
*
|
|
372
|
-
* @platform ios
|
|
373
432
|
*/
|
|
374
|
-
sheetCornerRadius?:
|
|
433
|
+
sheetCornerRadius?: ScreenProps['sheetCornerRadius'];
|
|
375
434
|
/**
|
|
376
435
|
* Boolean indicating whether the sheet shows a grabber at the top.
|
|
377
436
|
* Works only when `stackPresentation` is set to `formSheet`.
|
|
@@ -379,22 +438,32 @@ export type NativeStackNavigationOptions = {
|
|
|
379
438
|
*
|
|
380
439
|
* @platform ios
|
|
381
440
|
*/
|
|
382
|
-
sheetGrabberVisible?:
|
|
441
|
+
sheetGrabberVisible?: ScreenProps['sheetGrabberVisible'];
|
|
442
|
+
/**
|
|
443
|
+
* Index of the detent the sheet should expand to after being opened.
|
|
444
|
+
* Works only when `stackPresentation` is set to `formSheet`.
|
|
445
|
+
*
|
|
446
|
+
* Defaults to `0` - which represents first detent in the detents array.
|
|
447
|
+
*/
|
|
448
|
+
sheetInitialDetentIndex?: ScreenProps['sheetInitialDetentIndex'];
|
|
383
449
|
/**
|
|
384
450
|
* The largest sheet detent for which a view underneath won't be dimmed.
|
|
385
|
-
* Works only when `stackPresentation` is
|
|
451
|
+
* Works only when `stackPresentation` is set to `formSheet`.
|
|
386
452
|
*
|
|
387
|
-
*
|
|
453
|
+
* This prop can be set to an number, which indicates index of detent in `sheetAllowedDetents` array for which
|
|
454
|
+
* there won't be a dimming view beneath the sheet.
|
|
388
455
|
*
|
|
389
|
-
*
|
|
390
|
-
* - `medium` - the view underneath will be dimmed only when detent level is `large`
|
|
391
|
-
* - `all` - the view underneath will be dimmed for any detent level
|
|
456
|
+
* Additionaly there are following options available:
|
|
392
457
|
*
|
|
393
|
-
*
|
|
458
|
+
* * `none` - there will be dimming view for all detents levels,
|
|
459
|
+
* * `largest` - there won't be a dimming view for any detent level.
|
|
394
460
|
*
|
|
395
|
-
*
|
|
461
|
+
* There also legacy & **deprecated** prop values available: `medium`, `large` (don't confuse with `largest`), `all`, which work in tandem with
|
|
462
|
+
* corresponding legacy prop values for `sheetAllowedDetents` prop.
|
|
463
|
+
*
|
|
464
|
+
* Defaults to `none`, indicating that the dimming view should be always present.
|
|
396
465
|
*/
|
|
397
|
-
|
|
466
|
+
sheetLargestUndimmedDetentIndex?: ScreenProps['sheetLargestUndimmedDetentIndex'];
|
|
398
467
|
/**
|
|
399
468
|
* How the screen should appear/disappear when pushed or popped at the top of the stack.
|
|
400
469
|
* The following values are currently supported:
|
|
@@ -402,10 +471,12 @@ export type NativeStackNavigationOptions = {
|
|
|
402
471
|
* - "fade" – fades screen in or out
|
|
403
472
|
* - "fade_from_bottom" – performs a fade from bottom animation
|
|
404
473
|
* - "flip" – flips the screen, requires stackPresentation: "modal" (iOS only)
|
|
405
|
-
* - "simple_push" – performs a default animation, but without
|
|
474
|
+
* - "simple_push" – performs a default animation, but without native header transition (iOS only)
|
|
406
475
|
* - "slide_from_bottom" – performs a slide from bottom animation
|
|
407
476
|
* - "slide_from_right" - slide in the new screen from right to left (Android only, resolves to default transition on iOS)
|
|
408
|
-
* - "slide_from_left" - slide in the new screen from left to right
|
|
477
|
+
* - "slide_from_left" - slide in the new screen from left to right
|
|
478
|
+
* - "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)
|
|
479
|
+
* - "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)
|
|
409
480
|
* - "none" – the screen appears/dissapears without an animation
|
|
410
481
|
*/
|
|
411
482
|
stackAnimation?: ScreenProps['stackAnimation'];
|
|
@@ -459,21 +530,43 @@ export type NativeStackNavigationOptions = {
|
|
|
459
530
|
*/
|
|
460
531
|
title?: string;
|
|
461
532
|
/**
|
|
462
|
-
* Changes the duration (in milliseconds) of `slide_from_bottom`, `fade_from_bottom`, `fade` and `simple_push` transitions on iOS. Defaults to `
|
|
533
|
+
* Changes the duration (in milliseconds) of `slide_from_bottom`, `fade_from_bottom`, `fade` and `simple_push` transitions on iOS. Defaults to `500`.
|
|
463
534
|
* The duration of `default` and `flip` transitions isn't customizable.
|
|
464
535
|
*
|
|
465
536
|
* @platform ios
|
|
466
537
|
*/
|
|
467
538
|
transitionDuration?: number;
|
|
539
|
+
|
|
540
|
+
goBackGesture?: GoBackGesture;
|
|
541
|
+
transitionAnimation?: AnimatedScreenTransition;
|
|
542
|
+
screenEdgeGesture?: boolean;
|
|
543
|
+
/**
|
|
544
|
+
* Footer component that can be used alongside form sheet stack presentation style.
|
|
545
|
+
*
|
|
546
|
+
* This option is provided, because due to implementation details it might be problematic
|
|
547
|
+
* to implement such layout with JS-only code.
|
|
548
|
+
*
|
|
549
|
+
* Please note that this prop is marked as unstable and might be subject of breaking changes,
|
|
550
|
+
* even removal.
|
|
551
|
+
*
|
|
552
|
+
* @platform android
|
|
553
|
+
*/
|
|
554
|
+
unstable_sheetFooter?: () => React.ReactNode;
|
|
468
555
|
};
|
|
469
556
|
|
|
557
|
+
/**
|
|
558
|
+
* @deprecated 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.
|
|
559
|
+
*/
|
|
470
560
|
export type NativeStackNavigatorProps =
|
|
471
561
|
//@ts-ignore
|
|
472
562
|
DefaultNavigatorOptions<NativeStackNavigationOptions> &
|
|
473
563
|
StackRouterOptions &
|
|
474
564
|
NativeStackNavigationConfig;
|
|
475
565
|
|
|
476
|
-
|
|
566
|
+
/**
|
|
567
|
+
* @deprecated 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.
|
|
568
|
+
*/
|
|
569
|
+
//@ts-ignore
|
|
477
570
|
export type NativeStackDescriptor = Descriptor<
|
|
478
571
|
ParamListBase,
|
|
479
572
|
string,
|
|
@@ -481,6 +574,86 @@ export type NativeStackDescriptor = Descriptor<
|
|
|
481
574
|
NativeStackNavigationOptions
|
|
482
575
|
>;
|
|
483
576
|
|
|
577
|
+
/**
|
|
578
|
+
* @deprecated 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.
|
|
579
|
+
*/
|
|
484
580
|
export type NativeStackDescriptorMap = {
|
|
485
581
|
[key: string]: NativeStackDescriptor;
|
|
486
582
|
};
|
|
583
|
+
|
|
584
|
+
/**
|
|
585
|
+
* Those below copied to src/types.ts should be removed with next minor and native-stack v5 removal
|
|
586
|
+
*/
|
|
587
|
+
|
|
588
|
+
/**
|
|
589
|
+
* copy from GestureHandler to avoid strong dependency
|
|
590
|
+
* @deprecated 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.
|
|
591
|
+
*/
|
|
592
|
+
export type PanGestureHandlerEventPayload = {
|
|
593
|
+
x: number;
|
|
594
|
+
y: number;
|
|
595
|
+
absoluteX: number;
|
|
596
|
+
absoluteY: number;
|
|
597
|
+
translationX: number;
|
|
598
|
+
translationY: number;
|
|
599
|
+
velocityX: number;
|
|
600
|
+
velocityY: number;
|
|
601
|
+
};
|
|
602
|
+
|
|
603
|
+
/**
|
|
604
|
+
* copy from Reanimated to avoid strong dependency
|
|
605
|
+
* @deprecated 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.
|
|
606
|
+
*/
|
|
607
|
+
export type GoBackGesture =
|
|
608
|
+
| 'swipeRight'
|
|
609
|
+
| 'swipeLeft'
|
|
610
|
+
| 'swipeUp'
|
|
611
|
+
| 'swipeDown'
|
|
612
|
+
| 'verticalSwipe'
|
|
613
|
+
| 'horizontalSwipe'
|
|
614
|
+
| 'twoDimensionalSwipe';
|
|
615
|
+
|
|
616
|
+
/**
|
|
617
|
+
* @deprecated 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.
|
|
618
|
+
*/
|
|
619
|
+
export interface MeasuredDimensions {
|
|
620
|
+
x: number;
|
|
621
|
+
y: number;
|
|
622
|
+
width: number;
|
|
623
|
+
height: number;
|
|
624
|
+
pageX: number;
|
|
625
|
+
pageY: number;
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* @deprecated 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.
|
|
630
|
+
*/
|
|
631
|
+
export type AnimatedScreenTransition = {
|
|
632
|
+
topScreenStyle: (
|
|
633
|
+
event: PanGestureHandlerEventPayload,
|
|
634
|
+
screenSize: MeasuredDimensions,
|
|
635
|
+
) => Record<string, unknown>;
|
|
636
|
+
belowTopScreenStyle: (
|
|
637
|
+
event: PanGestureHandlerEventPayload,
|
|
638
|
+
screenSize: MeasuredDimensions,
|
|
639
|
+
) => Record<string, unknown>;
|
|
640
|
+
};
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* @deprecated 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.
|
|
644
|
+
*/
|
|
645
|
+
export type ScreensRefsHolder = React.MutableRefObject<
|
|
646
|
+
Record<string, React.MutableRefObject<React.Ref<React.Component>>>
|
|
647
|
+
>;
|
|
648
|
+
|
|
649
|
+
/**
|
|
650
|
+
* @deprecated 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.
|
|
651
|
+
*/
|
|
652
|
+
export type GestureProviderProps = PropsWithChildren<{
|
|
653
|
+
gestureDetectorBridge: React.MutableRefObject<GestureDetectorBridge>;
|
|
654
|
+
screensRefs: ScreensRefsHolder;
|
|
655
|
+
currentRouteKey: string;
|
|
656
|
+
goBackGesture: GoBackGesture | undefined;
|
|
657
|
+
transitionAnimation: AnimatedScreenTransition | undefined;
|
|
658
|
+
screenEdgeGesture: boolean | undefined;
|
|
659
|
+
}>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Platform } from 'react-native';
|
|
2
|
-
import { StackPresentationTypes } from '
|
|
2
|
+
import { StackPresentationTypes } from '../../types';
|
|
3
3
|
type Layout = { width: number; height: number };
|
|
4
4
|
|
|
5
5
|
const formSheetModalHeight = 56;
|
|
@@ -8,7 +8,7 @@ export default function getDefaultHeaderHeight(
|
|
|
8
8
|
layout: Layout,
|
|
9
9
|
statusBarHeight: number,
|
|
10
10
|
stackPresentation: StackPresentationTypes,
|
|
11
|
-
isLargeHeader = false
|
|
11
|
+
isLargeHeader = false,
|
|
12
12
|
): number {
|
|
13
13
|
// default header heights
|
|
14
14
|
let headerHeight = Platform.OS === 'android' ? 56 : 64;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Rect } from 'react-native-safe-area-context';
|
|
2
|
+
import { Platform } from 'react-native';
|
|
3
|
+
|
|
4
|
+
export default function getStatusBarHeight(
|
|
5
|
+
topInset: number,
|
|
6
|
+
dimensions: Rect,
|
|
7
|
+
isStatusBarTranslucent: boolean,
|
|
8
|
+
) {
|
|
9
|
+
if (Platform.OS === 'ios') {
|
|
10
|
+
// It looks like some iOS devices don't have strictly set status bar height to 44.
|
|
11
|
+
// Thus, if the top inset is higher than 50, then the device should have a dynamic island.
|
|
12
|
+
// On models with Dynamic Island the status bar height is smaller than the safe area top inset by 5 pixels.
|
|
13
|
+
// See https://developer.apple.com/forums/thread/662466 for more details about status bar height.
|
|
14
|
+
const hasDynamicIsland = topInset > 50;
|
|
15
|
+
return hasDynamicIsland ? topInset - 5 : topInset;
|
|
16
|
+
} else if (Platform.OS === 'android') {
|
|
17
|
+
// On Android we should also rely on frame's y-axis position, as topInset is 0 on visible status bar.
|
|
18
|
+
return isStatusBarTranslucent ? topInset : dimensions.y;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return topInset;
|
|
22
|
+
}
|
|
@@ -7,7 +7,7 @@ export default function useAnimatedHeaderHeight() {
|
|
|
7
7
|
|
|
8
8
|
if (animatedValue === undefined) {
|
|
9
9
|
throw new Error(
|
|
10
|
-
"Couldn't find the header height. Are you inside a screen in a navigator with a header?"
|
|
10
|
+
"Couldn't find the header height. Are you inside a screen in a navigator with a header?",
|
|
11
11
|
);
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ export default function useHeaderHeight() {
|
|
|
7
7
|
|
|
8
8
|
if (height === undefined) {
|
|
9
9
|
throw new Error(
|
|
10
|
-
"Couldn't find the header height. Are you inside a screen in a navigator with a header?"
|
|
10
|
+
"Couldn't find the header height. Are you inside a screen in a navigator with a header?",
|
|
11
11
|
);
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// @ts-ignore: No declaration available
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
import ReactNativeStyleAttributes from 'react-native/Libraries/Components/View/ReactNativeStyleAttributes';
|
|
4
4
|
|
|
5
5
|
export function processFonts(
|
|
6
|
-
fontFamilies: (string | undefined)[]
|
|
6
|
+
fontFamilies: (string | undefined)[],
|
|
7
7
|
): (string | undefined)[] {
|
|
8
8
|
// @ts-ignore: React Native types are incorrect here and don't consider fontFamily a style value
|
|
9
9
|
const fontFamilyProcessor = ReactNativeStyleAttributes.fontFamily?.process;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import ScreenFooter from '../../components/ScreenFooter';
|
|
3
|
+
|
|
4
|
+
type FooterProps = {
|
|
5
|
+
children?: React.ReactNode;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export default function FooterComponent({ children }: FooterProps) {
|
|
9
|
+
return <ScreenFooter collapsable={false}>{children}</ScreenFooter>;
|
|
10
|
+
}
|
|
@@ -15,6 +15,11 @@
|
|
|
15
15
|
import { Route, useTheme } from '@amazon-devices/react-navigation__native';
|
|
16
16
|
import * as React from 'react';
|
|
17
17
|
import { Platform } from 'react-native';
|
|
18
|
+
import { SearchBarProps } from '../../types';
|
|
19
|
+
import {
|
|
20
|
+
isSearchBarAvailableForCurrentPlatform,
|
|
21
|
+
executeNativeBackPress,
|
|
22
|
+
} from '../../utils';
|
|
18
23
|
import {
|
|
19
24
|
ScreenStackHeaderBackButtonImage,
|
|
20
25
|
ScreenStackHeaderCenterView,
|
|
@@ -22,14 +27,12 @@ import {
|
|
|
22
27
|
ScreenStackHeaderLeftView,
|
|
23
28
|
ScreenStackHeaderRightView,
|
|
24
29
|
ScreenStackHeaderSearchBarView,
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
isSearchBarAvailableForCurrentPlatform,
|
|
28
|
-
executeNativeBackPress,
|
|
29
|
-
} from '@amazon-devices/react-native-screens';
|
|
30
|
+
} from '../../components/ScreenStackHeaderConfig';
|
|
31
|
+
import SearchBar from '../../components/SearchBar';
|
|
30
32
|
import { NativeStackNavigationOptions } from '../types';
|
|
31
33
|
import { useBackPressSubscription } from '../utils/useBackPressSubscription';
|
|
32
34
|
import { processFonts } from './FontProcessor';
|
|
35
|
+
import warnOnce from 'warn-once';
|
|
33
36
|
|
|
34
37
|
type Props = NativeStackNavigationOptions & {
|
|
35
38
|
route: Route<string>;
|
|
@@ -40,6 +43,7 @@ export default function HeaderConfig({
|
|
|
40
43
|
backButtonInCustomView,
|
|
41
44
|
direction,
|
|
42
45
|
disableBackButtonMenu,
|
|
46
|
+
backButtonDisplayMode = 'default',
|
|
43
47
|
headerBackTitle,
|
|
44
48
|
headerBackTitleStyle = {},
|
|
45
49
|
headerBackTitleVisible = true,
|
|
@@ -110,6 +114,15 @@ export default function HeaderConfig({
|
|
|
110
114
|
return searchBar;
|
|
111
115
|
}, [searchBar, createSubscription, clearSubscription]);
|
|
112
116
|
|
|
117
|
+
// @ts-ignore isVision is not yet in the type definitions (RN 0.74+)
|
|
118
|
+
const isVisionOS = Platform?.isVision;
|
|
119
|
+
|
|
120
|
+
warnOnce(
|
|
121
|
+
isVisionOS &&
|
|
122
|
+
(headerTitleStyle.color !== undefined || headerTintColor !== undefined),
|
|
123
|
+
'headerTitleStyle.color and headerTintColor are not supported on visionOS.',
|
|
124
|
+
);
|
|
125
|
+
|
|
113
126
|
return (
|
|
114
127
|
<ScreenStackHeaderConfig
|
|
115
128
|
backButtonInCustomView={backButtonInCustomView}
|
|
@@ -124,6 +137,7 @@ export default function HeaderConfig({
|
|
|
124
137
|
color={tintColor}
|
|
125
138
|
direction={direction}
|
|
126
139
|
disableBackButtonMenu={disableBackButtonMenu}
|
|
140
|
+
backButtonDisplayMode={backButtonDisplayMode}
|
|
127
141
|
hidden={headerShown === false}
|
|
128
142
|
hideBackButton={headerHideBackButton}
|
|
129
143
|
hideShadow={headerHideShadow}
|
|
@@ -179,6 +193,7 @@ export default function HeaderConfig({
|
|
|
179
193
|
{isSearchBarAvailableForCurrentPlatform &&
|
|
180
194
|
processedSearchBarOptions !== undefined ? (
|
|
181
195
|
<ScreenStackHeaderSearchBarView>
|
|
196
|
+
{/* @ts-ignore Skip incorrect error about incompatible ref types */}
|
|
182
197
|
<SearchBar {...processedSearchBarOptions} />
|
|
183
198
|
</ScreenStackHeaderSearchBarView>
|
|
184
199
|
) : null}
|