@lodev09/react-native-true-sheet 4.0.0-beta.0 → 4.0.0-beta.10
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/LICENSE +1 -1
- package/README.md +62 -30
- package/RNTrueSheet.podspec +10 -2
- package/android/build.gradle +24 -2
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetContainerView.kt +189 -47
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetContainerViewManager.kt +7 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetContentView.kt +401 -19
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetContentViewManager.kt +18 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetFooterView.kt +145 -21
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetFooterViewManager.kt +14 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetHeaderView.kt +38 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetHeaderViewManager.kt +28 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetModule.kt +84 -24
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetOverlayView.kt +106 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetOverlayViewManager.kt +45 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetPackage.kt +6 -4
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetPeekView.kt +72 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetPeekViewManager.kt +33 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetStateUpdater.kt +63 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetView.kt +564 -226
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetViewController.kt +1399 -598
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetViewManager.kt +161 -29
- package/android/src/main/java/com/lodev09/truesheet/core/RNScreensEventObserver.kt +63 -0
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetBottomSheetBehavior.kt +36 -0
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetBottomSheetView.kt +255 -0
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetCoordinatorLayout.kt +375 -0
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetDetentCalculator.kt +299 -0
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetDimView.kt +162 -0
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetGrabberView.kt +180 -0
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetKeyboardObserver.kt +207 -0
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetOverlayRootView.kt +137 -0
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetStackManager.kt +220 -0
- package/android/src/main/java/com/lodev09/truesheet/events/TrueSheetDragEvents.kt +71 -0
- package/android/src/main/java/com/lodev09/truesheet/events/TrueSheetFocusEvents.kt +65 -0
- package/android/src/main/java/com/lodev09/truesheet/events/TrueSheetLifecycleEvents.kt +127 -0
- package/android/src/main/java/com/lodev09/truesheet/events/TrueSheetStateEvents.kt +56 -0
- package/android/src/main/java/com/lodev09/truesheet/utils/KeyboardUtils.kt +84 -0
- package/android/src/main/java/com/lodev09/truesheet/utils/ScreenUtils.kt +93 -67
- package/android/src/main/java/com/lodev09/truesheet/utils/TouchEventDeduper.kt +31 -0
- package/android/src/main/java/com/lodev09/truesheet/utils/ViewUtils.kt +42 -0
- package/android/src/main/jni/CMakeLists.txt +63 -0
- package/android/src/main/jni/TrueSheetSpec.h +20 -0
- package/android/src/main/jni/TrueSheetStateUpdater.cpp +96 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewComponentDescriptor.h +16 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewShadowNode.cpp +68 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewShadowNode.h +33 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewState.cpp +11 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewState.h +39 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewComponentDescriptor.h +24 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewShadowNode.cpp +63 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewShadowNode.h +28 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewState.cpp +11 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewState.h +41 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetInsets.cpp +18 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetInsets.h +16 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetLayoutUtils.h +46 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetOverlayViewComponentDescriptor.h +21 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetOverlayViewShadowNode.cpp +17 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetOverlayViewShadowNode.h +36 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewComponentDescriptor.h +28 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewShadowNode.cpp +30 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewShadowNode.h +45 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewState.cpp +23 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewState.h +52 -0
- package/ios/TrueSheetContainerView.h +88 -6
- package/ios/TrueSheetContainerView.mm +278 -21
- package/ios/TrueSheetContentView.h +54 -1
- package/ios/TrueSheetContentView.mm +371 -47
- package/ios/TrueSheetFooterView.h +33 -2
- package/ios/TrueSheetFooterView.mm +187 -35
- package/ios/{events/OnWillDismissEvent.h → TrueSheetHeaderView.h} +10 -7
- package/ios/TrueSheetHeaderView.mm +64 -0
- package/ios/TrueSheetModule.h +2 -7
- package/ios/TrueSheetModule.mm +98 -20
- package/ios/TrueSheetOverlayView.h +32 -0
- package/ios/TrueSheetOverlayView.mm +161 -0
- package/ios/TrueSheetPeekView.h +32 -0
- package/ios/TrueSheetPeekView.mm +99 -0
- package/ios/TrueSheetView.h +7 -15
- package/ios/TrueSheetView.mm +775 -215
- package/ios/TrueSheetViewController.h +94 -16
- package/ios/TrueSheetViewController.mm +1316 -331
- package/ios/core/RNScreensEventObserver.h +46 -0
- package/ios/core/RNScreensEventObserver.mm +280 -0
- package/ios/core/TrueSheetBlurView.h +27 -0
- package/ios/core/TrueSheetBlurView.mm +82 -0
- package/ios/core/TrueSheetDetentCalculator.h +107 -0
- package/ios/core/TrueSheetDetentCalculator.mm +197 -0
- package/ios/core/TrueSheetGrabberView.h +72 -0
- package/ios/core/TrueSheetGrabberView.mm +188 -0
- package/ios/core/TrueSheetKeyboardObserver.h +39 -0
- package/ios/core/TrueSheetKeyboardObserver.mm +112 -0
- package/ios/core/TrueSheetOverlayContainerView.h +31 -0
- package/ios/core/TrueSheetOverlayContainerView.mm +35 -0
- package/ios/events/TrueSheetDragEvents.h +39 -0
- package/ios/events/TrueSheetDragEvents.mm +62 -0
- package/ios/events/{OnPositionChangeEvent.h → TrueSheetFocusEvents.h} +8 -5
- package/ios/events/TrueSheetFocusEvents.mm +49 -0
- package/ios/events/TrueSheetLifecycleEvents.h +42 -0
- package/ios/events/TrueSheetLifecycleEvents.mm +79 -0
- package/ios/events/TrueSheetStateEvents.h +35 -0
- package/ios/events/TrueSheetStateEvents.mm +49 -0
- package/ios/tvos/TrueSheetStubs.mm +166 -0
- package/ios/{events/OnMountEvent.h → utils/BlurUtil.h} +5 -7
- package/ios/utils/BlurUtil.mm +69 -0
- package/ios/utils/GestureUtil.h +7 -0
- package/ios/utils/GestureUtil.mm +12 -0
- package/ios/utils/PlatformUtil.h +15 -0
- package/ios/utils/UIView+FirstResponder.h +15 -0
- package/ios/utils/UIView+FirstResponder.mm +26 -0
- package/ios/utils/UIView+ScrollEdgeInteraction.h +26 -0
- package/ios/utils/UIView+ScrollEdgeInteraction.mm +84 -0
- package/ios/utils/WindowUtil.mm +17 -1
- package/lib/module/TrueSheet.js +349 -74
- package/lib/module/TrueSheet.js.map +1 -1
- package/lib/module/TrueSheet.web.js +1270 -0
- package/lib/module/TrueSheet.web.js.map +1 -0
- package/lib/module/TrueSheetOverlay.js +30 -0
- package/lib/module/TrueSheetOverlay.js.map +1 -0
- package/lib/module/TrueSheetOverlay.web.js +35 -0
- package/lib/module/TrueSheetOverlay.web.js.map +1 -0
- package/lib/module/TrueSheetPeek.js +15 -0
- package/lib/module/TrueSheetPeek.js.map +1 -0
- package/lib/module/TrueSheetPeek.web.js +55 -0
- package/lib/module/TrueSheetPeek.web.js.map +1 -0
- package/lib/module/TrueSheetProvider.js +28 -0
- package/lib/module/TrueSheetProvider.js.map +1 -0
- package/lib/module/TrueSheetProvider.web.js +157 -0
- package/lib/module/TrueSheetProvider.web.js.map +1 -0
- package/lib/module/fabric/TrueSheetContainerViewNativeComponent.ts +1 -1
- package/lib/module/fabric/TrueSheetContentViewNativeComponent.ts +5 -1
- package/lib/module/fabric/TrueSheetFooterViewNativeComponent.ts +10 -2
- package/lib/module/fabric/TrueSheetHeaderViewNativeComponent.ts +8 -0
- package/lib/module/fabric/TrueSheetOverlayViewNativeComponent.ts +12 -0
- package/lib/module/fabric/TrueSheetPeekViewNativeComponent.ts +8 -0
- package/lib/module/fabric/TrueSheetViewNativeComponent.ts +110 -18
- package/lib/module/index.js +4 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/mocks/index.js +103 -0
- package/lib/module/mocks/index.js.map +1 -0
- package/lib/module/mocks/navigation.js +95 -0
- package/lib/module/mocks/navigation.js.map +1 -0
- package/lib/module/mocks/navigationExpoRouter.js +21 -0
- package/lib/module/mocks/navigationExpoRouter.js.map +1 -0
- package/lib/module/mocks/reanimated.js +91 -0
- package/lib/module/mocks/reanimated.js.map +1 -0
- package/lib/module/navigation/TrueSheetNavigatorContent.js +73 -0
- package/lib/module/navigation/TrueSheetNavigatorContent.js.map +1 -0
- package/lib/module/navigation/actions.js +50 -0
- package/lib/module/navigation/actions.js.map +1 -0
- package/lib/module/navigation/base-types.js +2 -0
- package/lib/module/navigation/base-types.js.map +1 -0
- package/lib/module/navigation/createTrueSheetRouter.js +157 -0
- package/lib/module/navigation/createTrueSheetRouter.js.map +1 -0
- package/lib/module/navigation/expo-router/base-types.js +2 -0
- package/lib/module/navigation/expo-router/base-types.js.map +1 -0
- package/lib/module/navigation/expo-router/index.js +50 -0
- package/lib/module/navigation/expo-router/index.js.map +1 -0
- package/lib/module/navigation/expo-router/types.js +4 -0
- package/lib/module/navigation/expo-router/types.js.map +1 -0
- package/lib/module/navigation/index.js +47 -0
- package/lib/module/navigation/index.js.map +1 -0
- package/lib/module/navigation/navigator.js +10 -0
- package/lib/module/navigation/navigator.js.map +1 -0
- package/lib/module/navigation/screen/ReanimatedTrueSheetScreen.js +56 -0
- package/lib/module/navigation/screen/ReanimatedTrueSheetScreen.js.map +1 -0
- package/lib/module/navigation/screen/TrueSheetScreen.js +49 -0
- package/lib/module/navigation/screen/TrueSheetScreen.js.map +1 -0
- package/lib/module/navigation/screen/index.js +5 -0
- package/lib/module/navigation/screen/index.js.map +1 -0
- package/lib/module/navigation/screen/types.js +4 -0
- package/lib/module/navigation/screen/types.js.map +1 -0
- package/lib/module/navigation/screen/useSheetScreenState.js +69 -0
- package/lib/module/navigation/screen/useSheetScreenState.js.map +1 -0
- package/lib/module/navigation/types.js +4 -0
- package/lib/module/navigation/types.js.map +1 -0
- package/lib/module/navigation/useTrueSheetNavigation.js +24 -0
- package/lib/module/navigation/useTrueSheetNavigation.js.map +1 -0
- package/lib/module/reanimated/ReanimatedTrueSheet.js +15 -9
- package/lib/module/reanimated/ReanimatedTrueSheet.js.map +1 -1
- package/lib/module/reanimated/ReanimatedTrueSheet.web.js +81 -0
- package/lib/module/reanimated/ReanimatedTrueSheet.web.js.map +1 -0
- package/lib/module/reanimated/ReanimatedTrueSheetProvider.js +4 -2
- package/lib/module/reanimated/ReanimatedTrueSheetProvider.js.map +1 -1
- package/lib/module/reanimated/index.js +2 -2
- package/lib/module/reanimated/index.js.map +1 -1
- package/lib/module/reanimated/useReanimatedPositionChangeHandler.web.js +20 -0
- package/lib/module/reanimated/useReanimatedPositionChangeHandler.web.js.map +1 -0
- package/lib/module/specs/NativeTrueSheetModule.js.map +1 -1
- package/lib/module/web/constants.js +16 -0
- package/lib/module/web/constants.js.map +1 -0
- package/lib/module/web/dom.js +10 -0
- package/lib/module/web/dom.js.map +1 -0
- package/lib/module/web/vaul/README.md +9 -0
- package/lib/module/web/vaul/browser.js +30 -0
- package/lib/module/web/vaul/browser.js.map +1 -0
- package/lib/module/web/vaul/constants.js +19 -0
- package/lib/module/web/vaul/constants.js.map +1 -0
- package/lib/module/web/vaul/context.js +59 -0
- package/lib/module/web/vaul/context.js.map +1 -0
- package/lib/module/web/vaul/helpers.js +99 -0
- package/lib/module/web/vaul/helpers.js.map +1 -0
- package/lib/module/web/vaul/index.js +1342 -0
- package/lib/module/web/vaul/index.js.map +1 -0
- package/lib/module/web/vaul/style.css +287 -0
- package/lib/module/web/vaul/style.css.d.js +2 -0
- package/lib/module/web/vaul/style.css.d.js.map +1 -0
- package/lib/module/web/vaul/types.js +2 -0
- package/lib/module/web/vaul/types.js.map +1 -0
- package/lib/module/web/vaul/use-composed-refs.js +34 -0
- package/lib/module/web/vaul/use-composed-refs.js.map +1 -0
- package/lib/module/web/vaul/use-controllable-state.js +54 -0
- package/lib/module/web/vaul/use-controllable-state.js.map +1 -0
- package/lib/module/web/vaul/use-position-fixed.js +123 -0
- package/lib/module/web/vaul/use-position-fixed.js.map +1 -0
- package/lib/module/web/vaul/use-prevent-scroll.js +258 -0
- package/lib/module/web/vaul/use-prevent-scroll.js.map +1 -0
- package/lib/module/web/vaul/use-scale-background.js +57 -0
- package/lib/module/web/vaul/use-scale-background.js.map +1 -0
- package/lib/module/web/vaul/use-snap-points.js +305 -0
- package/lib/module/web/vaul/use-snap-points.js.map +1 -0
- package/lib/typescript/src/TrueSheet.d.ts +57 -14
- package/lib/typescript/src/TrueSheet.d.ts.map +1 -1
- package/lib/typescript/src/TrueSheet.types.d.ts +535 -55
- package/lib/typescript/src/TrueSheet.types.d.ts.map +1 -1
- package/lib/typescript/src/TrueSheet.web.d.ts +5 -0
- package/lib/typescript/src/TrueSheet.web.d.ts.map +1 -0
- package/lib/typescript/src/TrueSheetOverlay.d.ts +8 -0
- package/lib/typescript/src/TrueSheetOverlay.d.ts.map +1 -0
- package/lib/typescript/src/TrueSheetOverlay.web.d.ts +8 -0
- package/lib/typescript/src/TrueSheetOverlay.web.d.ts.map +1 -0
- package/lib/typescript/src/TrueSheetPeek.d.ts +9 -0
- package/lib/typescript/src/TrueSheetPeek.d.ts.map +1 -0
- package/lib/typescript/src/TrueSheetPeek.web.d.ts +28 -0
- package/lib/typescript/src/TrueSheetPeek.web.d.ts.map +1 -0
- package/lib/typescript/src/TrueSheetProvider.d.ts +18 -0
- package/lib/typescript/src/TrueSheetProvider.d.ts.map +1 -0
- package/lib/typescript/src/TrueSheetProvider.web.d.ts +27 -0
- package/lib/typescript/src/TrueSheetProvider.web.d.ts.map +1 -0
- package/lib/typescript/src/fabric/TrueSheetContainerViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/fabric/TrueSheetContentViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/fabric/TrueSheetFooterViewNativeComponent.d.ts +2 -0
- package/lib/typescript/src/fabric/TrueSheetFooterViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/fabric/TrueSheetHeaderViewNativeComponent.d.ts +6 -0
- package/lib/typescript/src/fabric/TrueSheetHeaderViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/fabric/TrueSheetOverlayViewNativeComponent.d.ts +6 -0
- package/lib/typescript/src/fabric/TrueSheetOverlayViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/fabric/TrueSheetPeekViewNativeComponent.d.ts +6 -0
- package/lib/typescript/src/fabric/TrueSheetPeekViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/fabric/TrueSheetViewNativeComponent.d.ts +71 -16
- package/lib/typescript/src/fabric/TrueSheetViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +3 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mocks/index.d.ts +47 -0
- package/lib/typescript/src/mocks/index.d.ts.map +1 -0
- package/lib/typescript/src/mocks/navigation.d.ts +70 -0
- package/lib/typescript/src/mocks/navigation.d.ts.map +1 -0
- package/lib/typescript/src/mocks/navigationExpoRouter.d.ts +22 -0
- package/lib/typescript/src/mocks/navigationExpoRouter.d.ts.map +1 -0
- package/lib/typescript/src/mocks/reanimated.d.ts +48 -0
- package/lib/typescript/src/mocks/reanimated.d.ts.map +1 -0
- package/lib/typescript/src/navigation/TrueSheetNavigatorContent.d.ts +5 -0
- package/lib/typescript/src/navigation/TrueSheetNavigatorContent.d.ts.map +1 -0
- package/lib/typescript/src/navigation/actions.d.ts +71 -0
- package/lib/typescript/src/navigation/actions.d.ts.map +1 -0
- package/lib/typescript/src/navigation/base-types.d.ts +9 -0
- package/lib/typescript/src/navigation/base-types.d.ts.map +1 -0
- package/lib/typescript/src/navigation/createTrueSheetRouter.d.ts +3 -0
- package/lib/typescript/src/navigation/createTrueSheetRouter.d.ts.map +1 -0
- package/lib/typescript/src/navigation/expo-router/base-types.d.ts +8 -0
- package/lib/typescript/src/navigation/expo-router/base-types.d.ts.map +1 -0
- package/lib/typescript/src/navigation/expo-router/index.d.ts +37 -0
- package/lib/typescript/src/navigation/expo-router/index.d.ts.map +1 -0
- package/lib/typescript/src/navigation/expo-router/types.d.ts +44 -0
- package/lib/typescript/src/navigation/expo-router/types.d.ts.map +1 -0
- package/lib/typescript/src/navigation/index.d.ts +45 -0
- package/lib/typescript/src/navigation/index.d.ts.map +1 -0
- package/lib/typescript/src/navigation/navigator.d.ts +7 -0
- package/lib/typescript/src/navigation/navigator.d.ts.map +1 -0
- package/lib/typescript/src/navigation/screen/ReanimatedTrueSheetScreen.d.ts +3 -0
- package/lib/typescript/src/navigation/screen/ReanimatedTrueSheetScreen.d.ts.map +1 -0
- package/lib/typescript/src/navigation/screen/TrueSheetScreen.d.ts +3 -0
- package/lib/typescript/src/navigation/screen/TrueSheetScreen.d.ts.map +1 -0
- package/lib/typescript/src/navigation/screen/index.d.ts +4 -0
- package/lib/typescript/src/navigation/screen/index.d.ts.map +1 -0
- package/lib/typescript/src/navigation/screen/types.d.ts +14 -0
- package/lib/typescript/src/navigation/screen/types.d.ts.map +1 -0
- package/lib/typescript/src/navigation/screen/useSheetScreenState.d.ts +34 -0
- package/lib/typescript/src/navigation/screen/useSheetScreenState.d.ts.map +1 -0
- package/lib/typescript/src/navigation/types.d.ts +213 -0
- package/lib/typescript/src/navigation/types.d.ts.map +1 -0
- package/lib/typescript/src/navigation/useTrueSheetNavigation.d.ts +23 -0
- package/lib/typescript/src/navigation/useTrueSheetNavigation.d.ts.map +1 -0
- package/lib/typescript/src/reanimated/ReanimatedTrueSheet.d.ts.map +1 -1
- package/lib/typescript/src/reanimated/ReanimatedTrueSheet.web.d.ts +41 -0
- package/lib/typescript/src/reanimated/ReanimatedTrueSheet.web.d.ts.map +1 -0
- package/lib/typescript/src/reanimated/ReanimatedTrueSheetProvider.d.ts +8 -2
- package/lib/typescript/src/reanimated/ReanimatedTrueSheetProvider.d.ts.map +1 -1
- package/lib/typescript/src/reanimated/useReanimatedPositionChangeHandler.web.d.ts +15 -0
- package/lib/typescript/src/reanimated/useReanimatedPositionChangeHandler.web.d.ts.map +1 -0
- package/lib/typescript/src/specs/NativeTrueSheetModule.d.ts +25 -3
- package/lib/typescript/src/specs/NativeTrueSheetModule.d.ts.map +1 -1
- package/lib/typescript/src/web/constants.d.ts +14 -0
- package/lib/typescript/src/web/constants.d.ts.map +1 -0
- package/lib/typescript/src/web/dom.d.ts +7 -0
- package/lib/typescript/src/web/dom.d.ts.map +1 -0
- package/lib/typescript/src/web/vaul/browser.d.ts +8 -0
- package/lib/typescript/src/web/vaul/browser.d.ts.map +1 -0
- package/lib/typescript/src/web/vaul/constants.d.ts +14 -0
- package/lib/typescript/src/web/vaul/constants.d.ts.map +1 -0
- package/lib/typescript/src/web/vaul/context.d.ts +54 -0
- package/lib/typescript/src/web/vaul/context.d.ts.map +1 -0
- package/lib/typescript/src/web/vaul/helpers.d.ts +17 -0
- package/lib/typescript/src/web/vaul/helpers.d.ts.map +1 -0
- package/lib/typescript/src/web/vaul/index.d.ts +234 -0
- package/lib/typescript/src/web/vaul/index.d.ts.map +1 -0
- package/lib/typescript/src/web/vaul/types.d.ts +7 -0
- package/lib/typescript/src/web/vaul/types.d.ts.map +1 -0
- package/lib/typescript/src/web/vaul/use-composed-refs.d.ts +14 -0
- package/lib/typescript/src/web/vaul/use-composed-refs.d.ts.map +1 -0
- package/lib/typescript/src/web/vaul/use-controllable-state.d.ts +9 -0
- package/lib/typescript/src/web/vaul/use-controllable-state.d.ts.map +1 -0
- package/lib/typescript/src/web/vaul/use-position-fixed.d.ts +19 -0
- package/lib/typescript/src/web/vaul/use-position-fixed.d.ts.map +1 -0
- package/lib/typescript/src/web/vaul/use-prevent-scroll.d.ts +18 -0
- package/lib/typescript/src/web/vaul/use-prevent-scroll.d.ts.map +1 -0
- package/lib/typescript/src/web/vaul/use-scale-background.d.ts +2 -0
- package/lib/typescript/src/web/vaul/use-scale-background.d.ts.map +1 -0
- package/lib/typescript/src/web/vaul/use-snap-points.d.ts +38 -0
- package/lib/typescript/src/web/vaul/use-snap-points.d.ts.map +1 -0
- package/package.json +104 -37
- package/react-native.config.js +10 -2
- package/src/TrueSheet.tsx +424 -70
- package/src/TrueSheet.types.ts +602 -72
- package/src/TrueSheet.web.tsx +1437 -0
- package/src/TrueSheetOverlay.tsx +24 -0
- package/src/TrueSheetOverlay.web.tsx +33 -0
- package/src/TrueSheetPeek.tsx +11 -0
- package/src/TrueSheetPeek.web.tsx +64 -0
- package/src/TrueSheetProvider.tsx +33 -0
- package/src/TrueSheetProvider.web.tsx +220 -0
- package/src/fabric/TrueSheetContainerViewNativeComponent.ts +1 -1
- package/src/fabric/TrueSheetContentViewNativeComponent.ts +5 -1
- package/src/fabric/TrueSheetFooterViewNativeComponent.ts +10 -2
- package/src/fabric/TrueSheetHeaderViewNativeComponent.ts +8 -0
- package/src/fabric/TrueSheetOverlayViewNativeComponent.ts +12 -0
- package/src/fabric/TrueSheetPeekViewNativeComponent.ts +8 -0
- package/src/fabric/TrueSheetViewNativeComponent.ts +110 -18
- package/src/index.ts +3 -2
- package/src/mocks/index.ts +96 -0
- package/src/mocks/navigation.ts +79 -0
- package/src/mocks/navigationExpoRouter.ts +41 -0
- package/src/mocks/reanimated.ts +100 -0
- package/src/navigation/TrueSheetNavigatorContent.tsx +106 -0
- package/src/navigation/actions.ts +78 -0
- package/src/navigation/base-types.ts +20 -0
- package/src/navigation/createTrueSheetRouter.ts +194 -0
- package/src/navigation/expo-router/base-types.ts +18 -0
- package/src/navigation/expo-router/index.ts +90 -0
- package/src/navigation/expo-router/types.ts +116 -0
- package/src/navigation/index.ts +80 -0
- package/src/navigation/navigator.ts +18 -0
- package/src/navigation/screen/ReanimatedTrueSheetScreen.tsx +61 -0
- package/src/navigation/screen/TrueSheetScreen.tsx +54 -0
- package/src/navigation/screen/index.ts +3 -0
- package/src/navigation/screen/types.ts +19 -0
- package/src/navigation/screen/useSheetScreenState.ts +102 -0
- package/src/navigation/types.ts +302 -0
- package/src/navigation/useTrueSheetNavigation.ts +26 -0
- package/src/reanimated/ReanimatedTrueSheet.tsx +12 -7
- package/src/reanimated/ReanimatedTrueSheet.web.tsx +75 -0
- package/src/reanimated/ReanimatedTrueSheetProvider.tsx +12 -8
- package/src/reanimated/useReanimatedPositionChangeHandler.web.ts +31 -0
- package/src/specs/NativeTrueSheetModule.ts +28 -3
- package/src/web/constants.ts +13 -0
- package/src/web/dom.ts +9 -0
- package/src/web/vaul/README.md +9 -0
- package/src/web/vaul/browser.ts +38 -0
- package/src/web/vaul/constants.ts +24 -0
- package/src/web/vaul/context.ts +102 -0
- package/src/web/vaul/helpers.ts +131 -0
- package/src/web/vaul/index.tsx +1785 -0
- package/src/web/vaul/style.css +287 -0
- package/src/web/vaul/style.css.d.ts +1 -0
- package/src/web/vaul/types.ts +7 -0
- package/src/web/vaul/use-composed-refs.ts +35 -0
- package/src/web/vaul/use-controllable-state.ts +66 -0
- package/src/web/vaul/use-position-fixed.ts +147 -0
- package/src/web/vaul/use-prevent-scroll.ts +309 -0
- package/src/web/vaul/use-scale-background.ts +64 -0
- package/src/web/vaul/use-snap-points.ts +455 -0
- package/android/src/main/java/com/lodev09/truesheet/events/DetentChangeEvent.kt +0 -26
- package/android/src/main/java/com/lodev09/truesheet/events/DidDismissEvent.kt +0 -20
- package/android/src/main/java/com/lodev09/truesheet/events/DidPresentEvent.kt +0 -26
- package/android/src/main/java/com/lodev09/truesheet/events/DragBeginEvent.kt +0 -26
- package/android/src/main/java/com/lodev09/truesheet/events/DragChangeEvent.kt +0 -26
- package/android/src/main/java/com/lodev09/truesheet/events/DragEndEvent.kt +0 -26
- package/android/src/main/java/com/lodev09/truesheet/events/MountEvent.kt +0 -20
- package/android/src/main/java/com/lodev09/truesheet/events/PositionChangeEvent.kt +0 -32
- package/android/src/main/java/com/lodev09/truesheet/events/SizeChangeEvent.kt +0 -27
- package/android/src/main/java/com/lodev09/truesheet/events/WillDismissEvent.kt +0 -20
- package/android/src/main/java/com/lodev09/truesheet/events/WillPresentEvent.kt +0 -26
- package/android/src/main/res/values/styles.xml +0 -8
- package/ios/events/OnDetentChangeEvent.h +0 -28
- package/ios/events/OnDetentChangeEvent.mm +0 -30
- package/ios/events/OnDidDismissEvent.h +0 -26
- package/ios/events/OnDidDismissEvent.mm +0 -25
- package/ios/events/OnDidPresentEvent.h +0 -28
- package/ios/events/OnDidPresentEvent.mm +0 -30
- package/ios/events/OnDragBeginEvent.h +0 -28
- package/ios/events/OnDragBeginEvent.mm +0 -30
- package/ios/events/OnDragChangeEvent.h +0 -28
- package/ios/events/OnDragChangeEvent.mm +0 -30
- package/ios/events/OnDragEndEvent.h +0 -28
- package/ios/events/OnDragEndEvent.mm +0 -30
- package/ios/events/OnMountEvent.mm +0 -25
- package/ios/events/OnPositionChangeEvent.mm +0 -32
- package/ios/events/OnSizeChangeEvent.h +0 -28
- package/ios/events/OnSizeChangeEvent.mm +0 -30
- package/ios/events/OnWillDismissEvent.mm +0 -25
- package/ios/events/OnWillPresentEvent.h +0 -28
- package/ios/events/OnWillPresentEvent.mm +0 -30
- package/ios/utils/LayoutUtil.h +0 -44
- package/ios/utils/LayoutUtil.mm +0 -50
- package/lib/module/TrueSheetGrabber.js +0 -51
- package/lib/module/TrueSheetGrabber.js.map +0 -1
- package/lib/typescript/src/TrueSheetGrabber.d.ts +0 -39
- package/lib/typescript/src/TrueSheetGrabber.d.ts.map +0 -1
- package/src/TrueSheetGrabber.tsx +0 -82
- package/src/__mocks__/index.js +0 -67
package/src/TrueSheet.types.ts
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
import type { ComponentType, ReactElement } from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { Component, ComponentType, ReactElement, RefObject } from 'react';
|
|
2
|
+
import type {
|
|
3
|
+
ColorValue,
|
|
4
|
+
NativeSyntheticEvent,
|
|
5
|
+
StyleProp,
|
|
6
|
+
ViewProps,
|
|
7
|
+
ViewStyle,
|
|
8
|
+
} from 'react-native';
|
|
5
9
|
|
|
6
10
|
export interface DetentInfoEventPayload {
|
|
7
11
|
/**
|
|
@@ -12,14 +16,18 @@ export interface DetentInfoEventPayload {
|
|
|
12
16
|
* The Y position of the sheet relative to the screen.
|
|
13
17
|
*/
|
|
14
18
|
position: number;
|
|
19
|
+
/**
|
|
20
|
+
* The detent value (0-1) for the current index.
|
|
21
|
+
*/
|
|
22
|
+
detent: number;
|
|
15
23
|
}
|
|
16
24
|
|
|
17
25
|
export interface PositionChangeEventPayload extends DetentInfoEventPayload {
|
|
18
26
|
/**
|
|
19
|
-
*
|
|
20
|
-
* When
|
|
27
|
+
* Indicates whether the position value is real-time (e.g., during drag or animation tracking).
|
|
28
|
+
* When false, the position should be animated in JS.
|
|
21
29
|
*/
|
|
22
|
-
|
|
30
|
+
realtime: boolean;
|
|
23
31
|
}
|
|
24
32
|
|
|
25
33
|
export type MountEvent = NativeSyntheticEvent<null>;
|
|
@@ -28,70 +36,337 @@ export type WillPresentEvent = NativeSyntheticEvent<DetentInfoEventPayload>;
|
|
|
28
36
|
export type DidPresentEvent = NativeSyntheticEvent<DetentInfoEventPayload>;
|
|
29
37
|
export type WillDismissEvent = NativeSyntheticEvent<null>;
|
|
30
38
|
export type DidDismissEvent = NativeSyntheticEvent<null>;
|
|
39
|
+
export type DismissAttemptEvent = NativeSyntheticEvent<null>;
|
|
31
40
|
export type DragBeginEvent = NativeSyntheticEvent<DetentInfoEventPayload>;
|
|
32
41
|
export type DragChangeEvent = NativeSyntheticEvent<DetentInfoEventPayload>;
|
|
33
42
|
export type DragEndEvent = NativeSyntheticEvent<DetentInfoEventPayload>;
|
|
34
43
|
export type PositionChangeEvent = NativeSyntheticEvent<PositionChangeEventPayload>;
|
|
44
|
+
export type DidFocusEvent = NativeSyntheticEvent<null>;
|
|
45
|
+
export type DidBlurEvent = NativeSyntheticEvent<null>;
|
|
46
|
+
export type WillFocusEvent = NativeSyntheticEvent<null>;
|
|
47
|
+
export type WillBlurEvent = NativeSyntheticEvent<null>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Options for customizing the grabber (drag handle) appearance.
|
|
51
|
+
*/
|
|
52
|
+
export interface GrabberOptions {
|
|
53
|
+
/**
|
|
54
|
+
* The width of the grabber pill.
|
|
55
|
+
*
|
|
56
|
+
* @default iOS: 36, Android: 32
|
|
57
|
+
*/
|
|
58
|
+
width?: number;
|
|
59
|
+
/**
|
|
60
|
+
* The height of the grabber pill.
|
|
61
|
+
*
|
|
62
|
+
* @default iOS: 5, Android: 4
|
|
63
|
+
*/
|
|
64
|
+
height?: number;
|
|
65
|
+
/**
|
|
66
|
+
* The top margin of the grabber from the sheet edge.
|
|
67
|
+
*
|
|
68
|
+
* @default iOS: 5, Android: 16
|
|
69
|
+
*/
|
|
70
|
+
topMargin?: number;
|
|
71
|
+
/**
|
|
72
|
+
* The corner radius of the grabber pill.
|
|
73
|
+
*
|
|
74
|
+
* @default height / 2
|
|
75
|
+
*/
|
|
76
|
+
cornerRadius?: number;
|
|
77
|
+
/**
|
|
78
|
+
* The color of the grabber.
|
|
79
|
+
* Uses native vibrancy/material styling when not provided.
|
|
80
|
+
*/
|
|
81
|
+
color?: ColorValue;
|
|
82
|
+
/**
|
|
83
|
+
* Whether the grabber color adapts to light/dark mode.
|
|
84
|
+
* When enabled, the grabber uses vibrancy effect on iOS and
|
|
85
|
+
* adjusts color based on the current theme on Android.
|
|
86
|
+
*
|
|
87
|
+
* @default true
|
|
88
|
+
*/
|
|
89
|
+
adaptive?: boolean;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Options for customizing (e.g. localizing) the accessibility strings
|
|
94
|
+
* announced by screen readers.
|
|
95
|
+
*
|
|
96
|
+
* On iOS, the grabber strings only apply when `grabberOptions` is provided.
|
|
97
|
+
* Without it, iOS uses the system grabber which is already localized.
|
|
98
|
+
*/
|
|
99
|
+
export interface AccessibilityOptions {
|
|
100
|
+
/**
|
|
101
|
+
* The accessibility label of the grabber.
|
|
102
|
+
*
|
|
103
|
+
* @default iOS: 'Sheet Grabber', Android: 'Drag handle'
|
|
104
|
+
*/
|
|
105
|
+
grabberLabel?: string;
|
|
106
|
+
/**
|
|
107
|
+
* The accessibility hint of the grabber.
|
|
108
|
+
*
|
|
109
|
+
* @platform ios
|
|
110
|
+
* @default 'Double-tap to expand. Swipe up or down to resize the sheet'
|
|
111
|
+
*/
|
|
112
|
+
grabberHint?: string;
|
|
113
|
+
/**
|
|
114
|
+
* The value announced when the sheet is at the last detent.
|
|
115
|
+
*
|
|
116
|
+
* @default 'Expanded'
|
|
117
|
+
*/
|
|
118
|
+
expandedValue?: string;
|
|
119
|
+
/**
|
|
120
|
+
* The value announced when the sheet is at the first detent.
|
|
121
|
+
*
|
|
122
|
+
* @default 'Collapsed'
|
|
123
|
+
*/
|
|
124
|
+
collapsedValue?: string;
|
|
125
|
+
/**
|
|
126
|
+
* The value announced when the sheet is at an intermediate detent.
|
|
127
|
+
* Supports `{index}` and `{count}` placeholders.
|
|
128
|
+
*
|
|
129
|
+
* @default 'Detent {index} of {count}'
|
|
130
|
+
*/
|
|
131
|
+
detentValue?: string;
|
|
132
|
+
/**
|
|
133
|
+
* The label of the expand accessibility action.
|
|
134
|
+
*
|
|
135
|
+
* @platform android
|
|
136
|
+
* @default 'Expand'
|
|
137
|
+
*/
|
|
138
|
+
expandActionLabel?: string;
|
|
139
|
+
/**
|
|
140
|
+
* The label of the collapse accessibility action.
|
|
141
|
+
*
|
|
142
|
+
* @platform android
|
|
143
|
+
* @default 'Collapse'
|
|
144
|
+
*/
|
|
145
|
+
collapseActionLabel?: string;
|
|
146
|
+
/**
|
|
147
|
+
* The title announced when the sheet appears.
|
|
148
|
+
* Sets the accessibility pane title on Android and the
|
|
149
|
+
* hidden dialog title on Web.
|
|
150
|
+
*
|
|
151
|
+
* @platform android, web
|
|
152
|
+
* @default Android: 'Bottom sheet', Web: 'Sheet'
|
|
153
|
+
*/
|
|
154
|
+
paneTitle?: string;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Scroll edge effect style for iOS 26+.
|
|
159
|
+
* Controls the blur/gradient overlay applied to scroll view edges.
|
|
160
|
+
*
|
|
161
|
+
* @platform ios 26+
|
|
162
|
+
*/
|
|
163
|
+
export type ScrollEdgeEffect = 'automatic' | 'hard' | 'soft' | 'hidden';
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Options for scrollable behavior.
|
|
167
|
+
*/
|
|
168
|
+
export interface ScrollableOptions {
|
|
169
|
+
/**
|
|
170
|
+
* Applies the bottom safe-area inset to the scroll content automatically
|
|
171
|
+
* while the content can scroll, so the last item clears the home indicator
|
|
172
|
+
* (iOS) and navigation bar (Android).
|
|
173
|
+
*
|
|
174
|
+
* - **iOS**: Sets the scroll view's native
|
|
175
|
+
* [`contentInsetAdjustmentBehavior`](https://developer.apple.com/documentation/uikit/uiscrollview/contentinsetadjustmentbehavior)
|
|
176
|
+
* to `automatic` while it's plugged into the sheet — no need to set React
|
|
177
|
+
* Native's iOS-only prop yourself.
|
|
178
|
+
* - **Android**: Pads the scroll content with the bottom window inset,
|
|
179
|
+
* mirroring iOS's `automatic` behavior — parity React Native's iOS-only
|
|
180
|
+
* prop can't provide.
|
|
181
|
+
* - **Web**: Lifts the content above the safe area
|
|
182
|
+
* (`env(safe-area-inset-bottom)`).
|
|
183
|
+
*
|
|
184
|
+
* Only applies while the sheet's `insetAdjustment` is `'automatic'`. When
|
|
185
|
+
* the sheet has a relative footer, the footer absorbs the inset instead.
|
|
186
|
+
*
|
|
187
|
+
* @default true
|
|
188
|
+
*/
|
|
189
|
+
contentInsetAdjustmentBehavior?: boolean;
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* Extra offset when scrolling to the focused input when keyboard appears.
|
|
193
|
+
*
|
|
194
|
+
* @default 0
|
|
195
|
+
*/
|
|
196
|
+
keyboardScrollOffset?: number;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Adjusts the bottom inset applied to the scrollable when the keyboard is shown.
|
|
200
|
+
* Positive values increase the inset; negative values reduce it.
|
|
201
|
+
* Pass `-insets.bottom` to cancel out safe-area padding already included in
|
|
202
|
+
* the content's `paddingBottom`.
|
|
203
|
+
* Does not affect the auto scroll of the focused input — it always targets
|
|
204
|
+
* the keyboard edge.
|
|
205
|
+
*
|
|
206
|
+
* @default 0
|
|
207
|
+
*/
|
|
208
|
+
keyboardOffset?: number;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Whether scrolling the content expands the sheet to the next detent.
|
|
212
|
+
* When `false`, only the grabber can expand the sheet.
|
|
213
|
+
*
|
|
214
|
+
* @default true
|
|
215
|
+
*/
|
|
216
|
+
scrollingExpandsSheet?: boolean;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* The scroll edge effect applied to the top edge of the scroll view.
|
|
220
|
+
*
|
|
221
|
+
* @platform ios 26+
|
|
222
|
+
* @default 'hidden'
|
|
223
|
+
*/
|
|
224
|
+
topScrollEdgeEffect?: ScrollEdgeEffect;
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* The scroll edge effect applied to the bottom edge of the scroll view.
|
|
228
|
+
*
|
|
229
|
+
* @platform ios 26+
|
|
230
|
+
* @default 'hidden'
|
|
231
|
+
*/
|
|
232
|
+
bottomScrollEdgeEffect?: ScrollEdgeEffect;
|
|
233
|
+
}
|
|
35
234
|
|
|
36
235
|
/**
|
|
37
|
-
*
|
|
38
|
-
* @internal
|
|
236
|
+
* Options for header behavior
|
|
39
237
|
*/
|
|
40
|
-
export interface
|
|
41
|
-
|
|
42
|
-
|
|
238
|
+
export interface HeaderOptions {
|
|
239
|
+
/**
|
|
240
|
+
* How the header participates in the sheet layout.
|
|
241
|
+
*
|
|
242
|
+
* - `'relative'`: The header takes up space above the content, and its height
|
|
243
|
+
* is included in the `auto` detent calculation.
|
|
244
|
+
* - `'absolute'`: The header floats over the content, pinned to the top edge,
|
|
245
|
+
* and is excluded from the `auto` detent calculation.
|
|
246
|
+
*
|
|
247
|
+
* @default 'relative'
|
|
248
|
+
*/
|
|
249
|
+
position?: 'relative' | 'absolute';
|
|
43
250
|
}
|
|
44
251
|
|
|
45
252
|
/**
|
|
46
|
-
*
|
|
47
|
-
* @internal
|
|
253
|
+
* Options for footer behavior
|
|
48
254
|
*/
|
|
49
|
-
export
|
|
255
|
+
export interface FooterOptions {
|
|
256
|
+
/**
|
|
257
|
+
* How the footer participates in the sheet layout.
|
|
258
|
+
*
|
|
259
|
+
* - `'relative'`: The footer takes up space below the content, pinned to the
|
|
260
|
+
* bottom edge. Its height is included in the `auto` detent calculation but
|
|
261
|
+
* excluded from the `peek` detent (it's pushed off-screen at peek).
|
|
262
|
+
* - `'absolute'`: The footer floats over the content, pinned to the bottom
|
|
263
|
+
* edge. Its height is excluded from the `auto` detent calculation but
|
|
264
|
+
* included in the `peek` detent.
|
|
265
|
+
*
|
|
266
|
+
* @default 'relative'
|
|
267
|
+
*/
|
|
268
|
+
position?: 'relative' | 'absolute';
|
|
269
|
+
|
|
270
|
+
/**
|
|
271
|
+
* Adjusts how far an `absolute` footer rises when the keyboard opens.
|
|
272
|
+
* Positive values raise it higher; negative values reduce the rise.
|
|
273
|
+
* Pass `-insets.bottom` to tuck the footer's safe-area padding behind the keyboard.
|
|
274
|
+
* A `relative` footer stays in the layout flow behind the keyboard, so this has no effect.
|
|
275
|
+
*
|
|
276
|
+
* @default 0
|
|
277
|
+
*/
|
|
278
|
+
keyboardOffset?: number;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* Options for customizing the blur effect.
|
|
283
|
+
* Only applies when `backgroundBlur` is set.
|
|
284
|
+
*
|
|
285
|
+
* @platform ios
|
|
286
|
+
*/
|
|
287
|
+
export interface BlurOptions {
|
|
288
|
+
/**
|
|
289
|
+
* The intensity of the blur effect (0-100).
|
|
290
|
+
* Uses system default if not provided.
|
|
291
|
+
*/
|
|
292
|
+
intensity?: number;
|
|
293
|
+
/**
|
|
294
|
+
* Enables or disables user interaction on the blur view.
|
|
295
|
+
* Disabling this can help with visual artifacts (flash) on iOS 18+
|
|
296
|
+
* when touching the sheet content with blur enabled.
|
|
297
|
+
*
|
|
298
|
+
* @default true
|
|
299
|
+
*/
|
|
300
|
+
interaction?: boolean;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
/**
|
|
304
|
+
* Inset adjustment behavior for the sheet content.
|
|
305
|
+
*/
|
|
306
|
+
export type InsetAdjustment =
|
|
307
|
+
/**
|
|
308
|
+
* Automatically adjusts the sheet height to account for system insets (safe area).
|
|
309
|
+
* This ensures the sheet content is properly inset from system UI elements.
|
|
310
|
+
*/
|
|
311
|
+
| 'automatic'
|
|
312
|
+
/**
|
|
313
|
+
* Does not adjust the sheet height for system insets.
|
|
314
|
+
* The sheet height is calculated purely from the detent values.
|
|
315
|
+
*/
|
|
316
|
+
| 'never';
|
|
50
317
|
|
|
51
318
|
/**
|
|
52
319
|
* Blur style mapped to native values in IOS.
|
|
53
320
|
*
|
|
54
321
|
* @platform ios
|
|
55
322
|
*/
|
|
56
|
-
export type
|
|
323
|
+
export type BackgroundBlur =
|
|
57
324
|
| 'light'
|
|
58
325
|
| 'dark'
|
|
59
326
|
| 'default'
|
|
60
|
-
| '
|
|
327
|
+
| 'extra-light'
|
|
61
328
|
| 'regular'
|
|
62
329
|
| 'prominent'
|
|
63
|
-
| '
|
|
64
|
-
| '
|
|
65
|
-
| '
|
|
66
|
-
| '
|
|
67
|
-
| '
|
|
68
|
-
| '
|
|
69
|
-
| '
|
|
70
|
-
| '
|
|
71
|
-
| '
|
|
72
|
-
| '
|
|
73
|
-
| '
|
|
74
|
-
| '
|
|
75
|
-
| '
|
|
76
|
-
| '
|
|
77
|
-
| '
|
|
330
|
+
| 'system-ultra-thin-material'
|
|
331
|
+
| 'system-thin-material'
|
|
332
|
+
| 'system-material'
|
|
333
|
+
| 'system-thick-material'
|
|
334
|
+
| 'system-chrome-material'
|
|
335
|
+
| 'system-ultra-thin-material-light'
|
|
336
|
+
| 'system-thin-material-light'
|
|
337
|
+
| 'system-material-light'
|
|
338
|
+
| 'system-thick-material-light'
|
|
339
|
+
| 'system-chrome-material-light'
|
|
340
|
+
| 'system-ultra-thin-material-dark'
|
|
341
|
+
| 'system-thin-material-dark'
|
|
342
|
+
| 'system-material-dark'
|
|
343
|
+
| 'system-thick-material-dark'
|
|
344
|
+
| 'system-chrome-material-dark';
|
|
78
345
|
|
|
79
346
|
/**
|
|
80
347
|
* Supported Sheet detent.
|
|
81
|
-
*
|
|
82
|
-
* @platform android
|
|
83
|
-
* @platform ios 15+
|
|
84
348
|
*/
|
|
85
349
|
export type SheetDetent =
|
|
86
350
|
/**
|
|
87
351
|
* Auto resize based on content height, clamped to container height.
|
|
88
|
-
* Use the `
|
|
352
|
+
* Use the `maxContentHeight` prop to set a custom limit.
|
|
89
353
|
*
|
|
90
354
|
* @platform android
|
|
91
355
|
* @platform ios 16+
|
|
92
356
|
*/
|
|
93
357
|
| 'auto'
|
|
94
358
|
|
|
359
|
+
/**
|
|
360
|
+
* Collapsed height based on the combined `header` and `footer` heights.
|
|
361
|
+
* Render a `TrueSheetPeek` component within the content to also include
|
|
362
|
+
* the content up to its bottom edge.
|
|
363
|
+
* Falls back to a fixed height of `150` when none is provided.
|
|
364
|
+
*
|
|
365
|
+
* @platform android
|
|
366
|
+
* @platform ios 16+
|
|
367
|
+
*/
|
|
368
|
+
| 'peek'
|
|
369
|
+
|
|
95
370
|
/**
|
|
96
371
|
* Relative height as a fraction (0-1) of the available height.
|
|
97
372
|
* For example, 0.5 represents 50% of the available height.
|
|
@@ -126,6 +401,9 @@ export interface TrueSheetProps extends ViewProps {
|
|
|
126
401
|
* detents={['auto', 0.6, 1]}
|
|
127
402
|
* ```
|
|
128
403
|
*
|
|
404
|
+
* @note It's recommended to sort detents from smallest to largest.
|
|
405
|
+
* When using `auto`, place it at the first index if you plan to adjust content dynamically.
|
|
406
|
+
*
|
|
129
407
|
* @default [0.5, 1]
|
|
130
408
|
*/
|
|
131
409
|
detents?: SheetDetent[];
|
|
@@ -134,8 +412,6 @@ export interface TrueSheetProps extends ViewProps {
|
|
|
134
412
|
* Specify whether the sheet background is dimmed.
|
|
135
413
|
* Set to `false` to allow interaction with the background components.
|
|
136
414
|
*
|
|
137
|
-
* @platform android
|
|
138
|
-
* @platform ios 15+
|
|
139
415
|
* @default true
|
|
140
416
|
*/
|
|
141
417
|
dimmed?: boolean;
|
|
@@ -156,25 +432,48 @@ export interface TrueSheetProps extends ViewProps {
|
|
|
156
432
|
*/
|
|
157
433
|
initialDetentAnimated?: boolean;
|
|
158
434
|
|
|
435
|
+
/**
|
|
436
|
+
* Specify whether the sheet content should mount lazily, on first presentation.
|
|
437
|
+
* Set to `false` to mount the content before presentation without presenting the sheet.
|
|
438
|
+
* Use this when content is not ready on the first render, then call `present()`
|
|
439
|
+
* after your readiness signal so auto detents measure the settled content.
|
|
440
|
+
*
|
|
441
|
+
* Content that requires window attachment to measure, such as SwiftUI-hosted views,
|
|
442
|
+
* still only measures during presentation.
|
|
443
|
+
*
|
|
444
|
+
* @platform android
|
|
445
|
+
* @platform ios
|
|
446
|
+
* @default true
|
|
447
|
+
*/
|
|
448
|
+
lazy?: boolean;
|
|
449
|
+
|
|
159
450
|
/**
|
|
160
451
|
* The detent index that the sheet should start to dim the background.
|
|
161
452
|
* This is ignored if `dimmed` is set to `false`.
|
|
162
453
|
*
|
|
163
454
|
* @default 0
|
|
164
455
|
*/
|
|
165
|
-
|
|
456
|
+
dimmedDetentIndex?: number;
|
|
166
457
|
|
|
167
458
|
/**
|
|
168
459
|
* Prevents interactive dismissal of the Sheet.
|
|
460
|
+
* Blocked attempts fire `onDismissAttempt`, so you can confirm before dismissing programmatically.
|
|
169
461
|
*
|
|
170
462
|
* @default true
|
|
171
463
|
*/
|
|
172
464
|
dismissible?: boolean;
|
|
173
465
|
|
|
174
466
|
/**
|
|
175
|
-
*
|
|
467
|
+
* Enables or disables dragging the sheet to resize it.
|
|
468
|
+
* When disabled, the sheet becomes static and can only be resized programmatically.
|
|
469
|
+
*
|
|
470
|
+
* @default true
|
|
471
|
+
*/
|
|
472
|
+
draggable?: boolean;
|
|
176
473
|
|
|
177
|
-
|
|
474
|
+
/**
|
|
475
|
+
* Main sheet background color.
|
|
476
|
+
* Uses system default when not provided.
|
|
178
477
|
*/
|
|
179
478
|
backgroundColor?: ColorValue;
|
|
180
479
|
|
|
@@ -184,49 +483,131 @@ export interface TrueSheetProps extends ViewProps {
|
|
|
184
483
|
* - `undefined` (not provided): Uses system default corner radius
|
|
185
484
|
* - `0`: Sharp corners (no rounding)
|
|
186
485
|
* - `> 0`: Custom corner radius value
|
|
187
|
-
*
|
|
188
|
-
* @platform android
|
|
189
|
-
* @platform ios 15+
|
|
190
486
|
*/
|
|
191
487
|
cornerRadius?: number;
|
|
192
488
|
|
|
193
489
|
/**
|
|
194
|
-
* Shows native grabber (or handle) on
|
|
490
|
+
* Shows a native grabber (or drag handle) on the sheet.
|
|
491
|
+
*
|
|
492
|
+
* iOS uses the native `UISheetPresentationController` grabber.
|
|
493
|
+
* Android renders a native view following Material Design 3 specifications.
|
|
195
494
|
*
|
|
196
|
-
* @platform ios
|
|
197
495
|
* @default true
|
|
198
496
|
*/
|
|
199
497
|
grabber?: boolean;
|
|
200
498
|
|
|
201
499
|
/**
|
|
202
|
-
*
|
|
500
|
+
* Options for customizing the grabber appearance.
|
|
501
|
+
* Only applies when `grabber` is `true`.
|
|
502
|
+
*/
|
|
503
|
+
grabberOptions?: GrabberOptions;
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Options for customizing (e.g. localizing) the accessibility strings
|
|
507
|
+
* announced by screen readers.
|
|
508
|
+
*/
|
|
509
|
+
accessibilityOptions?: AccessibilityOptions;
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* Controls the sheet presentation style on iPad and web (landscape/tablet).
|
|
513
|
+
* - `'page'`: bottom-attached page sheet (full or readable width).
|
|
514
|
+
* - `'form'`: centered floating form sheet (default form-sheet width).
|
|
203
515
|
*
|
|
204
|
-
*
|
|
516
|
+
* `'form'` is absolute — `maxContentWidth` is ignored when set.
|
|
517
|
+
*
|
|
518
|
+
* @platform ios 17+, web
|
|
519
|
+
* @default 'page'
|
|
205
520
|
*/
|
|
206
|
-
|
|
521
|
+
presentation?: 'page' | 'form';
|
|
207
522
|
|
|
208
523
|
/**
|
|
209
524
|
* The blur effect style on iOS.
|
|
210
|
-
*
|
|
525
|
+
* Blends with `backgroundColor` when provided.
|
|
211
526
|
*
|
|
212
527
|
* @platform ios
|
|
213
528
|
*/
|
|
214
|
-
|
|
529
|
+
backgroundBlur?: BackgroundBlur;
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* Options for customizing the blur effect.
|
|
533
|
+
* Only applies when `backgroundBlur` is set.
|
|
534
|
+
*
|
|
535
|
+
* @platform ios
|
|
536
|
+
*/
|
|
537
|
+
blurOptions?: BlurOptions;
|
|
215
538
|
|
|
216
539
|
/**
|
|
217
540
|
* Overrides `large` or `100%` height.
|
|
218
541
|
* Also sets the maximum height for 'auto' detents.
|
|
219
542
|
*/
|
|
220
|
-
|
|
543
|
+
maxContentHeight?: number;
|
|
544
|
+
|
|
545
|
+
/**
|
|
546
|
+
* The maximum width of the sheet content.
|
|
547
|
+
* On Android and Web, defaults to `640dp`. On iOS, the sheet uses system default width.
|
|
548
|
+
*
|
|
549
|
+
* Ignored on phones in portrait orientation.
|
|
550
|
+
*/
|
|
551
|
+
maxContentWidth?: number;
|
|
552
|
+
|
|
553
|
+
/**
|
|
554
|
+
* Anchors the sheet to the specified horizontal edge.
|
|
555
|
+
*
|
|
556
|
+
* - `'center'`: Centers the sheet horizontally (default).
|
|
557
|
+
* - `'left'`: Anchors the sheet to the left edge.
|
|
558
|
+
* - `'right'`: Anchors the sheet to the right edge.
|
|
559
|
+
*
|
|
560
|
+
* Ignored on phones in portrait orientation.
|
|
561
|
+
*
|
|
562
|
+
* @default 'center'
|
|
563
|
+
*/
|
|
564
|
+
anchor?: 'left' | 'center' | 'right';
|
|
221
565
|
|
|
222
566
|
/**
|
|
223
|
-
*
|
|
224
|
-
*
|
|
567
|
+
* The offset from the screen edge.
|
|
568
|
+
* Only applies when `anchor` is `'left'` or `'right'`.
|
|
225
569
|
*
|
|
226
570
|
* @platform android
|
|
227
|
-
* @
|
|
571
|
+
* @platform web
|
|
572
|
+
* @default 16
|
|
228
573
|
*/
|
|
229
|
-
|
|
574
|
+
anchorOffset?: number;
|
|
575
|
+
|
|
576
|
+
/**
|
|
577
|
+
* Controls how the sheet adjusts its height for system insets (safe area).
|
|
578
|
+
*
|
|
579
|
+
* - `'automatic'`: Adds the bottom safe area inset to the sheet height,
|
|
580
|
+
* ensuring content is properly inset from system UI elements.
|
|
581
|
+
* - `'never'`: Does not adjust for insets; height is calculated purely from detent values.
|
|
582
|
+
*
|
|
583
|
+
* @default 'automatic'
|
|
584
|
+
*/
|
|
585
|
+
insetAdjustment?: InsetAdjustment;
|
|
586
|
+
|
|
587
|
+
/**
|
|
588
|
+
* The elevation (shadow depth) of the sheet.
|
|
589
|
+
*
|
|
590
|
+
* @platform android
|
|
591
|
+
* @platform web
|
|
592
|
+
* @default 4
|
|
593
|
+
*/
|
|
594
|
+
elevation?: number;
|
|
595
|
+
|
|
596
|
+
/**
|
|
597
|
+
* A component that is fixed at the top of the Sheet content.
|
|
598
|
+
* Useful for search bars, titles, or other header content.
|
|
599
|
+
*/
|
|
600
|
+
header?: ComponentType<unknown> | ReactElement;
|
|
601
|
+
|
|
602
|
+
/**
|
|
603
|
+
* Style for the header container.
|
|
604
|
+
*/
|
|
605
|
+
headerStyle?: StyleProp<ViewStyle>;
|
|
606
|
+
|
|
607
|
+
/**
|
|
608
|
+
* Options for header behavior.
|
|
609
|
+
*/
|
|
610
|
+
headerOptions?: HeaderOptions;
|
|
230
611
|
|
|
231
612
|
/**
|
|
232
613
|
* A component that floats at the bottom of the Sheet.
|
|
@@ -234,13 +615,53 @@ export interface TrueSheetProps extends ViewProps {
|
|
|
234
615
|
footer?: ComponentType<unknown> | ReactElement;
|
|
235
616
|
|
|
236
617
|
/**
|
|
237
|
-
*
|
|
238
|
-
|
|
618
|
+
* Style for the footer container.
|
|
619
|
+
*/
|
|
620
|
+
footerStyle?: StyleProp<ViewStyle>;
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* A ref to the scrollable component (e.g. `ScrollView`, `FlatList`)
|
|
624
|
+
* rendered within the sheet content.
|
|
625
|
+
* Required for scrollable handling — nested scrolling, keyboard insets,
|
|
626
|
+
* and `auto` detent sizing are wired to this scrollable.
|
|
239
627
|
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
628
|
+
* Example:
|
|
629
|
+
* ```tsx
|
|
630
|
+
* const scrollableRef = useRef<ScrollView>(null)
|
|
631
|
+
*
|
|
632
|
+
* <TrueSheet scrollableRef={scrollableRef}>
|
|
633
|
+
* <ScrollView ref={scrollableRef} />
|
|
634
|
+
* </TrueSheet>
|
|
635
|
+
* ```
|
|
636
|
+
*/
|
|
637
|
+
scrollableRef?: RefObject<Component<unknown> | null>;
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* Options for scrollable behavior.
|
|
641
|
+
* Applies to the scrollable provided via `scrollableRef`.
|
|
642
|
+
*/
|
|
643
|
+
scrollableOptions?: ScrollableOptions;
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* Options for footer behavior.
|
|
242
647
|
*/
|
|
243
|
-
|
|
648
|
+
footerOptions?: FooterOptions;
|
|
649
|
+
|
|
650
|
+
/**
|
|
651
|
+
* Renders the sheet as a detached floating card, not attached to the bottom edge.
|
|
652
|
+
*
|
|
653
|
+
* @platform web
|
|
654
|
+
* @default false
|
|
655
|
+
*/
|
|
656
|
+
detached?: boolean;
|
|
657
|
+
|
|
658
|
+
/**
|
|
659
|
+
* The offset from the bottom edge when [`detached`](#detached) is enabled.
|
|
660
|
+
*
|
|
661
|
+
* @platform web
|
|
662
|
+
* @default 16
|
|
663
|
+
*/
|
|
664
|
+
detachedOffset?: number;
|
|
244
665
|
|
|
245
666
|
/**
|
|
246
667
|
* Called when the sheet's content is mounted and ready.
|
|
@@ -269,6 +690,13 @@ export interface TrueSheetProps extends ViewProps {
|
|
|
269
690
|
*/
|
|
270
691
|
onDidDismiss?: (event: DidDismissEvent) => void;
|
|
271
692
|
|
|
693
|
+
/**
|
|
694
|
+
* Called when the user tries to dismiss the sheet while `dismissible` is `false`,
|
|
695
|
+
* e.g. by dragging down or pressing back/escape. Tapping the dim does not count.
|
|
696
|
+
* The sheet stays presented. Confirm with the user, then call `dismiss()` to proceed.
|
|
697
|
+
*/
|
|
698
|
+
onDismissAttempt?: (event: DismissAttemptEvent) => void;
|
|
699
|
+
|
|
272
700
|
/**
|
|
273
701
|
* Called when the detent of the sheet has changed.
|
|
274
702
|
* Either by dragging or programatically.
|
|
@@ -278,27 +706,18 @@ export interface TrueSheetProps extends ViewProps {
|
|
|
278
706
|
/**
|
|
279
707
|
* Called when the sheet has began dragging.
|
|
280
708
|
* Comes with the detent info.
|
|
281
|
-
*
|
|
282
|
-
* @platform android
|
|
283
|
-
* @platform ios 15+
|
|
284
709
|
*/
|
|
285
710
|
onDragBegin?: (event: DragBeginEvent) => void;
|
|
286
711
|
|
|
287
712
|
/**
|
|
288
713
|
* Called when the sheet is being dragged.
|
|
289
714
|
* Comes with the detent info.
|
|
290
|
-
*
|
|
291
|
-
* @platform android
|
|
292
|
-
* @platform ios 15+
|
|
293
715
|
*/
|
|
294
716
|
onDragChange?: (event: DragChangeEvent) => void;
|
|
295
717
|
|
|
296
718
|
/**
|
|
297
719
|
* Called when the sheet dragging has ended.
|
|
298
720
|
* Comes with the detent info.
|
|
299
|
-
*
|
|
300
|
-
* @platform android
|
|
301
|
-
* @platform ios 15+
|
|
302
721
|
*/
|
|
303
722
|
onDragEnd?: (event: DragEndEvent) => void;
|
|
304
723
|
|
|
@@ -306,9 +725,120 @@ export interface TrueSheetProps extends ViewProps {
|
|
|
306
725
|
* Called when the sheet's position changes.
|
|
307
726
|
* This fires continuously during sheet position changes.
|
|
308
727
|
* Comes with the detent info.
|
|
728
|
+
*/
|
|
729
|
+
onPositionChange?: (event: PositionChangeEvent) => void;
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* Called when the sheet is about to regain focus because a sheet presented on top of it is being dismissed.
|
|
733
|
+
*/
|
|
734
|
+
onWillFocus?: (event: WillFocusEvent) => void;
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* Called when the sheet regains focus after a sheet presented on top of it is dismissed.
|
|
738
|
+
*/
|
|
739
|
+
onDidFocus?: (event: DidFocusEvent) => void;
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* Called when the sheet is about to lose focus because another sheet is being presented on top of it.
|
|
743
|
+
*/
|
|
744
|
+
onWillBlur?: (event: WillBlurEvent) => void;
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* Called when the sheet loses focus because another sheet is presented on top of it.
|
|
748
|
+
*/
|
|
749
|
+
onDidBlur?: (event: DidBlurEvent) => void;
|
|
750
|
+
|
|
751
|
+
/**
|
|
752
|
+
* Called when the hardware back button is pressed on Android.
|
|
753
|
+
* Optionally return `false` to let the back event propagate to other handlers (e.g. navigation).
|
|
309
754
|
*
|
|
310
755
|
* @platform android
|
|
311
|
-
* @platform ios 15+
|
|
312
756
|
*/
|
|
313
|
-
|
|
757
|
+
onBackPress?: () => boolean | void;
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
/**
|
|
761
|
+
* Imperative methods available on a TrueSheet ref.
|
|
762
|
+
*
|
|
763
|
+
* Example:
|
|
764
|
+
* ```tsx
|
|
765
|
+
* const sheetRef = useRef<TrueSheetMethods>(null);
|
|
766
|
+
* sheetRef.current?.present();
|
|
767
|
+
* ```
|
|
768
|
+
*/
|
|
769
|
+
export interface TrueSheetMethods {
|
|
770
|
+
/**
|
|
771
|
+
* Present the sheet at a given detent index.
|
|
772
|
+
*
|
|
773
|
+
* @param index - The detent index to present at (default: `0`).
|
|
774
|
+
* @param animated - Whether to animate the presentation (default: `true`). Ignored on web.
|
|
775
|
+
*/
|
|
776
|
+
present(index?: number, animated?: boolean): Promise<void>;
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* Resize the sheet to a given detent index.
|
|
780
|
+
*
|
|
781
|
+
* @param index - The detent index to resize to.
|
|
782
|
+
*/
|
|
783
|
+
resize(index: number): Promise<void>;
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* Dismiss this sheet and all sheets presented on top of it in a single animation.
|
|
787
|
+
*
|
|
788
|
+
* @param animated - Whether to animate the dismissal (default: `true`). Ignored on web.
|
|
789
|
+
*/
|
|
790
|
+
dismiss(animated?: boolean): Promise<void>;
|
|
791
|
+
|
|
792
|
+
/**
|
|
793
|
+
* Dismiss only the sheets presented on top of this sheet, keeping this sheet presented.
|
|
794
|
+
* No-op if no sheets are presented on top.
|
|
795
|
+
*
|
|
796
|
+
* @param animated - Whether to animate the dismissal (default: `true`). Ignored on web.
|
|
797
|
+
*/
|
|
798
|
+
dismissStack(animated?: boolean): Promise<void>;
|
|
799
|
+
}
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* Static methods exposed on the `TrueSheet` component for controlling sheets by `name`.
|
|
803
|
+
*
|
|
804
|
+
* Example:
|
|
805
|
+
* ```ts
|
|
806
|
+
* TrueSheet.present('my-sheet')
|
|
807
|
+
* ```
|
|
808
|
+
*
|
|
809
|
+
* @note Not supported on web — use the `useTrueSheet()` hook instead.
|
|
810
|
+
*/
|
|
811
|
+
export interface TrueSheetStaticMethods {
|
|
812
|
+
/**
|
|
813
|
+
* Present the sheet with the given `name`.
|
|
814
|
+
*
|
|
815
|
+
* @throws if no sheet with the given `name` is registered.
|
|
816
|
+
*/
|
|
817
|
+
present(name: string, index?: number, animated?: boolean): Promise<void>;
|
|
818
|
+
|
|
819
|
+
/**
|
|
820
|
+
* Resize the sheet with the given `name`.
|
|
821
|
+
*
|
|
822
|
+
* @throws if no sheet with the given `name` is registered.
|
|
823
|
+
*/
|
|
824
|
+
resize(name: string, index: number): Promise<void>;
|
|
825
|
+
|
|
826
|
+
/**
|
|
827
|
+
* Dismiss the sheet with the given `name` and all sheets presented on top of it.
|
|
828
|
+
*
|
|
829
|
+
* @throws if no sheet with the given `name` is registered.
|
|
830
|
+
*/
|
|
831
|
+
dismiss(name: string, animated?: boolean): Promise<void>;
|
|
832
|
+
|
|
833
|
+
/**
|
|
834
|
+
* Dismiss only the sheets presented on top of the sheet with the given `name`.
|
|
835
|
+
*
|
|
836
|
+
* @throws if no sheet with the given `name` is registered.
|
|
837
|
+
*/
|
|
838
|
+
dismissStack(name: string, animated?: boolean): Promise<void>;
|
|
839
|
+
|
|
840
|
+
/**
|
|
841
|
+
* Dismiss every presented sheet, from the top of the stack downward.
|
|
842
|
+
*/
|
|
843
|
+
dismissAll(animated?: boolean): Promise<void>;
|
|
314
844
|
}
|