@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
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { TrueSheet } from '../TrueSheet';
|
|
2
|
+
import type { TrueSheetProps } from '../TrueSheet.types';
|
|
3
|
+
interface ReanimatedTrueSheetProps extends TrueSheetProps {
|
|
4
|
+
/**
|
|
5
|
+
* Callback for position changes.
|
|
6
|
+
*
|
|
7
|
+
* @see {@link TrueSheetProps.onPositionChange}
|
|
8
|
+
*/
|
|
9
|
+
onPositionChange?: TrueSheetProps['onPositionChange'];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Reanimated-enabled version of TrueSheet for web that automatically syncs
|
|
13
|
+
* position with the provider's shared value.
|
|
14
|
+
* Must be used within a ReanimatedTrueSheetProvider.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* import { ReanimatedTrueSheet, ReanimatedTrueSheetProvider } from '@lodev09/react-native-true-sheet/reanimated'
|
|
19
|
+
*
|
|
20
|
+
* function MyScreen() {
|
|
21
|
+
* const sheetRef = useRef<TrueSheet>(null)
|
|
22
|
+
*
|
|
23
|
+
* return (
|
|
24
|
+
* <ReanimatedTrueSheetProvider>
|
|
25
|
+
* <View>
|
|
26
|
+
* <ReanimatedTrueSheet
|
|
27
|
+
* ref={sheetRef}
|
|
28
|
+
* detents={[0.25, 0.5, 1]}
|
|
29
|
+
* initialDetentIndex={1}
|
|
30
|
+
* >
|
|
31
|
+
* <Text>Sheet Content</Text>
|
|
32
|
+
* </ReanimatedTrueSheet>
|
|
33
|
+
* </View>
|
|
34
|
+
* </ReanimatedTrueSheetProvider>
|
|
35
|
+
* )
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare const ReanimatedTrueSheet: import("react").ForwardRefExoticComponent<ReanimatedTrueSheetProps & import("react").RefAttributes<TrueSheet>>;
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=ReanimatedTrueSheet.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReanimatedTrueSheet.web.d.ts","sourceRoot":"","sources":["../../../../src/reanimated/ReanimatedTrueSheet.web.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAuB,MAAM,oBAAoB,CAAC;AAG9E,UAAU,wBAAyB,SAAQ,cAAc;IACvD;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,cAAc,CAAC,kBAAkB,CAAC,CAAC;CACvD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,mBAAmB,gHA8B9B,CAAC"}
|
|
@@ -2,13 +2,19 @@ import { type ReactNode } from 'react';
|
|
|
2
2
|
import { type SharedValue } from 'react-native-reanimated';
|
|
3
3
|
export interface ReanimatedTrueSheetContextValue {
|
|
4
4
|
/**
|
|
5
|
-
* Shared value representing the current sheet position (Y offset from
|
|
5
|
+
* Shared value representing the current sheet position (Y offset from top of screen)
|
|
6
6
|
*/
|
|
7
7
|
animatedPosition: SharedValue<number>;
|
|
8
8
|
/**
|
|
9
|
-
* Shared value representing the current detent index
|
|
9
|
+
* Shared value representing the current detent index as a continuous float.
|
|
10
|
+
* Interpolates smoothly between -1 (off-screen) and the target detent index.
|
|
10
11
|
*/
|
|
11
12
|
animatedIndex: SharedValue<number>;
|
|
13
|
+
/**
|
|
14
|
+
* Shared value representing the current detent value (0-1 fraction of screen height).
|
|
15
|
+
* Interpolates smoothly between detent values as the sheet is dragged.
|
|
16
|
+
*/
|
|
17
|
+
animatedDetent: SharedValue<number>;
|
|
12
18
|
}
|
|
13
19
|
export interface ReanimatedTrueSheetProviderProps {
|
|
14
20
|
children: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReanimatedTrueSheetProvider.d.ts","sourceRoot":"","sources":["../../../../src/reanimated/ReanimatedTrueSheetProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3E,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtC
|
|
1
|
+
{"version":3,"file":"ReanimatedTrueSheetProvider.d.ts","sourceRoot":"","sources":["../../../../src/reanimated/ReanimatedTrueSheetProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE3E,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3E,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtC;;;OAGG;IACH,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC;;;OAGG;IACH,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACrC;AAID,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,2BAA2B,GAAI,cAAc,gCAAgC,4CAgBzF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,sBAAsB,QAAO,+BAWzC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { PositionChangeEvent, PositionChangeEventPayload } from '../TrueSheet.types';
|
|
2
|
+
type PositionChangeHandler = (payload: PositionChangeEventPayload, context: Record<string, unknown>) => void;
|
|
3
|
+
/**
|
|
4
|
+
* Web implementation of useReanimatedPositionChangeHandler.
|
|
5
|
+
*
|
|
6
|
+
* Returns a simple callback wrapper. The worklet directive is ignored on web
|
|
7
|
+
* since there's no native UI thread.
|
|
8
|
+
*
|
|
9
|
+
* @param handler - The position change handler function
|
|
10
|
+
* @param _dependencies - Unused on web, kept for API compatibility
|
|
11
|
+
* @returns An event handler compatible with onPositionChange prop
|
|
12
|
+
*/
|
|
13
|
+
export declare const useReanimatedPositionChangeHandler: (handler: PositionChangeHandler, _dependencies?: unknown[]) => (event: PositionChangeEvent) => void;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=useReanimatedPositionChangeHandler.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useReanimatedPositionChangeHandler.web.d.ts","sourceRoot":"","sources":["../../../../src/reanimated/useReanimatedPositionChangeHandler.web.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAE1F,KAAK,qBAAqB,GAAG,CAC3B,OAAO,EAAE,0BAA0B,EACnC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC7B,IAAI,CAAC;AAEV;;;;;;;;;GASG;AACH,eAAO,MAAM,kCAAkC,GAC7C,SAAS,qBAAqB,EAC9B,gBAAe,OAAO,EAAO,aAKnB,mBAAmB,SAK9B,CAAC"}
|
|
@@ -10,17 +10,27 @@ interface Spec extends TurboModule {
|
|
|
10
10
|
* Present a sheet by reference
|
|
11
11
|
* @param viewTag - Native view tag of the sheet component
|
|
12
12
|
* @param index - Detent index to present at
|
|
13
|
+
* @param animated - Whether to animate the presentation
|
|
13
14
|
* @returns Promise that resolves when sheet is fully presented
|
|
14
15
|
* @throws PRESENT_FAILED if presentation fails
|
|
15
16
|
*/
|
|
16
|
-
presentByRef(viewTag: number, index: number): Promise<void>;
|
|
17
|
+
presentByRef(viewTag: number, index: number, animated: boolean): Promise<void>;
|
|
17
18
|
/**
|
|
18
|
-
* Dismiss a sheet
|
|
19
|
+
* Dismiss a sheet and all sheets presented on top of it
|
|
19
20
|
* @param viewTag - Native view tag of the sheet component
|
|
21
|
+
* @param animated - Whether to animate the dismissal
|
|
20
22
|
* @returns Promise that resolves when sheet is fully dismissed
|
|
21
23
|
* @throws DISMISS_FAILED if dismissal fails
|
|
22
24
|
*/
|
|
23
|
-
dismissByRef(viewTag: number): Promise<void>;
|
|
25
|
+
dismissByRef(viewTag: number, animated: boolean): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Dismiss only the sheets presented on top of this sheet, keeping this sheet presented
|
|
28
|
+
* @param viewTag - Native view tag of the sheet component
|
|
29
|
+
* @param animated - Whether to animate the dismissal
|
|
30
|
+
* @returns Promise that resolves when all child sheets are fully dismissed
|
|
31
|
+
* @throws DISMISS_FAILED if dismissal fails
|
|
32
|
+
*/
|
|
33
|
+
dismissStackByRef(viewTag: number, animated: boolean): Promise<void>;
|
|
24
34
|
/**
|
|
25
35
|
* Resize a sheet to a different index by reference
|
|
26
36
|
* @param viewTag - Native view tag of the sheet component
|
|
@@ -28,6 +38,18 @@ interface Spec extends TurboModule {
|
|
|
28
38
|
* @returns Promise that resolves when resize is complete
|
|
29
39
|
*/
|
|
30
40
|
resizeByRef(viewTag: number, index: number): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Dismiss all presented sheets
|
|
43
|
+
* @param animated - Whether to animate the dismissals
|
|
44
|
+
* @returns Promise that resolves when all sheets are dismissed
|
|
45
|
+
*/
|
|
46
|
+
dismissAll(animated: boolean): Promise<void>;
|
|
47
|
+
/**
|
|
48
|
+
* Handle back press for a sheet (Android only)
|
|
49
|
+
* Dismisses or collapses to the lowest detent natively
|
|
50
|
+
* @param viewTag - Native view tag of the sheet component
|
|
51
|
+
*/
|
|
52
|
+
handleBackPress(viewTag: number): Promise<void>;
|
|
31
53
|
}
|
|
32
54
|
declare const _default: Spec | null;
|
|
33
55
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NativeTrueSheetModule.d.ts","sourceRoot":"","sources":["../../../../src/specs/NativeTrueSheetModule.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,UAAU,IAAK,SAAQ,WAAW;IAChC
|
|
1
|
+
{"version":3,"file":"NativeTrueSheetModule.d.ts","sourceRoot":"","sources":["../../../../src/specs/NativeTrueSheetModule.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,UAAU,IAAK,SAAQ,WAAW;IAChC;;;;;;;OAOG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE/E;;;;;;OAMG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEhE;;;;;;OAMG;IACH,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErE;;;;;OAKG;IACH,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE3D;;;;OAIG;IACH,UAAU,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE7C;;;;OAIG;IACH,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjD;;AAED,wBAAgE"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const DEFAULT_CORNER_RADIUS = 16;
|
|
2
|
+
export declare const DEFAULT_MAX_WIDTH = 640;
|
|
3
|
+
export declare const DEFAULT_FORM_SHEET_WIDTH = 580;
|
|
4
|
+
export declare const DEFAULT_FORM_SHEET_HEIGHT_RATIO = 0.5;
|
|
5
|
+
export declare const COLOR_SURFACE_CONTAINER_LOW_LIGHT = "#F7F2FA";
|
|
6
|
+
export declare const COLOR_SURFACE_CONTAINER_LOW_DARK = "#1D1B20";
|
|
7
|
+
export declare const DEFAULT_ANCHOR_OFFSET = 16;
|
|
8
|
+
export declare const DEFAULT_DETACHED_OFFSET = 16;
|
|
9
|
+
export declare const DEFAULT_GRABBER_COLOR_LIGHT = "rgba(0, 0, 0, 0.3)";
|
|
10
|
+
export declare const DEFAULT_GRABBER_COLOR_DARK = "rgba(255, 255, 255, 0.3)";
|
|
11
|
+
export declare const DEFAULT_GRABBER_WIDTH = 32;
|
|
12
|
+
export declare const DEFAULT_GRABBER_HEIGHT = 4;
|
|
13
|
+
export declare const DEFAULT_GRABBER_TOP_MARGIN = 8;
|
|
14
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/web/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,iBAAiB,MAAM,CAAC;AACrC,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAC5C,eAAO,MAAM,+BAA+B,MAAM,CAAC;AACnD,eAAO,MAAM,iCAAiC,YAAY,CAAC;AAC3D,eAAO,MAAM,gCAAgC,YAAY,CAAC;AAC1D,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAC1C,eAAO,MAAM,2BAA2B,uBAAuB,CAAC;AAChE,eAAO,MAAM,0BAA0B,6BAA6B,CAAC;AACrE,eAAO,MAAM,qBAAqB,KAAK,CAAC;AACxC,eAAO,MAAM,sBAAsB,IAAI,CAAC;AACxC,eAAO,MAAM,0BAA0B,IAAI,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { View } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Resolves a React Native web `View` ref value to its underlying DOM element —
|
|
4
|
+
* RN-web refs expose the host DOM node directly.
|
|
5
|
+
*/
|
|
6
|
+
export declare const getDOMElement: (view: View | null) => HTMLElement | null;
|
|
7
|
+
//# sourceMappingURL=dom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dom.d.ts","sourceRoot":"","sources":["../../../../src/web/dom.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,MAAM,IAAI,GAAG,IAAI,KAAG,WAAW,GAAG,IACrB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function isMobileFirefox(): boolean | undefined;
|
|
2
|
+
export declare function isMac(): boolean | undefined;
|
|
3
|
+
export declare function isIPhone(): boolean | undefined;
|
|
4
|
+
export declare function isSafari(): boolean | undefined;
|
|
5
|
+
export declare function isIPad(): boolean | undefined;
|
|
6
|
+
export declare function isIOS(): boolean | undefined;
|
|
7
|
+
export declare function testPlatform(re: RegExp): boolean | undefined;
|
|
8
|
+
//# sourceMappingURL=browser.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../../../src/web/vaul/browser.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,IAAI,OAAO,GAAG,SAAS,CAOrD;AAED,wBAAgB,KAAK,IAAI,OAAO,GAAG,SAAS,CAE3C;AAED,wBAAgB,QAAQ,IAAI,OAAO,GAAG,SAAS,CAE9C;AAED,wBAAgB,QAAQ,IAAI,OAAO,GAAG,SAAS,CAE9C;AAED,wBAAgB,MAAM,IAAI,OAAO,GAAG,SAAS,CAM5C;AAED,wBAAgB,KAAK,IAAI,OAAO,GAAG,SAAS,CAE3C;AAED,wBAAgB,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAI5D"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const TRANSITIONS: {
|
|
2
|
+
DURATION: number;
|
|
3
|
+
EASE: number[];
|
|
4
|
+
};
|
|
5
|
+
export declare const VELOCITY_THRESHOLD = 0.4;
|
|
6
|
+
export declare const DEFAULT_PEEK_HEIGHT = 150;
|
|
7
|
+
export declare const CLOSE_THRESHOLD = 0.25;
|
|
8
|
+
export declare const DISMISS_ATTEMPT_THRESHOLD = 24;
|
|
9
|
+
export declare const SCROLL_LOCK_TIMEOUT = 100;
|
|
10
|
+
export declare const BORDER_RADIUS = 8;
|
|
11
|
+
export declare const NESTED_DISPLACEMENT = 16;
|
|
12
|
+
export declare const WINDOW_TOP_OFFSET = 26;
|
|
13
|
+
export declare const DRAG_CLASS = "vaul-dragging";
|
|
14
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/web/vaul/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW;;;CAGvB,CAAC;AAEF,eAAO,MAAM,kBAAkB,MAAM,CAAC;AAEtC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,eAAO,MAAM,eAAe,OAAO,CAAC;AAIpC,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C,eAAO,MAAM,mBAAmB,MAAM,CAAC;AAEvC,eAAO,MAAM,aAAa,IAAI,CAAC;AAE/B,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAEtC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,eAAO,MAAM,UAAU,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DrawerDirection } from './types';
|
|
3
|
+
export interface DragEvent {
|
|
4
|
+
target: EventTarget;
|
|
5
|
+
pageX: number;
|
|
6
|
+
pageY: number;
|
|
7
|
+
pointerType: string;
|
|
8
|
+
}
|
|
9
|
+
interface DrawerContextValue {
|
|
10
|
+
drawerRef: React.RefObject<HTMLDivElement | null>;
|
|
11
|
+
overlayRef: React.RefObject<HTMLDivElement | null>;
|
|
12
|
+
onPress: (event: React.PointerEvent<HTMLDivElement>) => void;
|
|
13
|
+
onRelease: (event: React.PointerEvent<HTMLDivElement> | null) => void;
|
|
14
|
+
onDrag: (event: React.PointerEvent<HTMLDivElement>) => void;
|
|
15
|
+
onTouchDrag: (event: DragEvent, pointerEvent?: React.PointerEvent<HTMLDivElement>) => void;
|
|
16
|
+
onTouchRelease: (event: DragEvent | null, pointerEvent?: React.PointerEvent<HTMLDivElement>) => void;
|
|
17
|
+
onNestedDrag: (event: React.PointerEvent<HTMLDivElement>, percentageDragged: number) => void;
|
|
18
|
+
onNestedOpenChange: (o: boolean) => void;
|
|
19
|
+
onNestedRelease: (event: React.PointerEvent<HTMLDivElement>, open: boolean) => void;
|
|
20
|
+
dismissible: boolean;
|
|
21
|
+
onDismissAttempt?: () => void;
|
|
22
|
+
isOpen: boolean;
|
|
23
|
+
isDragging: boolean;
|
|
24
|
+
keyboardIsOpen: React.MutableRefObject<boolean>;
|
|
25
|
+
snapPointsOffset: number[] | null;
|
|
26
|
+
snapPoints?: (number | string)[] | null;
|
|
27
|
+
activeSnapPointIndex?: number | null;
|
|
28
|
+
fadeFromIndex?: number;
|
|
29
|
+
modal: boolean;
|
|
30
|
+
shouldFade: boolean;
|
|
31
|
+
activeSnapPoint?: number | string | null;
|
|
32
|
+
setActiveSnapPoint: (o: number | string | null) => void;
|
|
33
|
+
closeDrawer: () => void;
|
|
34
|
+
openProp?: boolean;
|
|
35
|
+
onOpenChange?: (o: boolean) => void;
|
|
36
|
+
direction: DrawerDirection;
|
|
37
|
+
shouldScaleBackground: boolean;
|
|
38
|
+
setBackgroundColorOnScale: boolean;
|
|
39
|
+
noBodyStyles: boolean;
|
|
40
|
+
handleOnly?: boolean;
|
|
41
|
+
container?: HTMLElement | null;
|
|
42
|
+
autoFocus?: boolean;
|
|
43
|
+
shouldAnimate?: React.RefObject<boolean>;
|
|
44
|
+
onPositionChangeRef: React.RefObject<((position: number) => void) | undefined>;
|
|
45
|
+
setContentHeight: (height: number) => void;
|
|
46
|
+
detached: boolean;
|
|
47
|
+
detachedOffset: number;
|
|
48
|
+
detachedRadius: number;
|
|
49
|
+
detachedWrapperStyle?: React.CSSProperties;
|
|
50
|
+
}
|
|
51
|
+
export declare const DrawerContext: React.Context<DrawerContextValue>;
|
|
52
|
+
export declare const useDrawerContext: () => DrawerContextValue;
|
|
53
|
+
export {};
|
|
54
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../src/web/vaul/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;A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QAAQ,EAAE,OAAO,CAAC;IAClB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC5C;AAED,eAAO,MAAM,aAAa,mCAqCxB,CAAC;AAEH,eAAO,MAAM,gBAAgB,0BAM5B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { AnyFunction, DrawerDirection } from './types';
|
|
2
|
+
interface Style {
|
|
3
|
+
[key: string]: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function isInView(el: HTMLElement): boolean;
|
|
6
|
+
export declare function set(el: Element | HTMLElement | null | undefined, styles: Style, ignoreCache?: boolean): void;
|
|
7
|
+
export declare function reset(el: Element | HTMLElement | null, prop?: string): void;
|
|
8
|
+
export declare const isVertical: (direction: DrawerDirection) => boolean;
|
|
9
|
+
export declare function getTranslate(element: HTMLElement, direction: DrawerDirection): number | null;
|
|
10
|
+
export declare function dampenValue(v: number): number;
|
|
11
|
+
export declare function assignStyle(element: HTMLElement | null | undefined, style: Partial<CSSStyleDeclaration>): () => void;
|
|
12
|
+
/**
|
|
13
|
+
* Receives functions as arguments and returns a new function that calls all.
|
|
14
|
+
*/
|
|
15
|
+
export declare function chain<T>(...fns: T[]): (...args: T extends AnyFunction ? Parameters<T> : never) => void;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/web/vaul/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE5D,UAAU,KAAK;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;CACvB;AASD,wBAAgB,QAAQ,CAAC,EAAE,EAAE,WAAW,GAAG,OAAO,CAYjD;AAED,wBAAgB,GAAG,CACjB,EAAE,EAAE,OAAO,GAAG,WAAW,GAAG,IAAI,GAAG,SAAS,EAC5C,MAAM,EAAE,KAAK,EACb,WAAW,UAAQ,QAmBpB;AAED,wBAAgB,KAAK,CAAC,EAAE,EAAE,OAAO,GAAG,WAAW,GAAG,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM,QAgBpE;AAED,eAAO,MAAM,UAAU,GAAI,WAAW,eAAe,YAWpD,CAAC;AAEF,wBAAgB,YAAY,CAAC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,eAAe,GAAG,MAAM,GAAG,IAAI,CAgB5F;AAED,wBAAgB,WAAW,CAAC,CAAC,EAAE,MAAM,UAEpC;AAED,wBAAgB,WAAW,CACzB,OAAO,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,EACvC,KAAK,EAAE,OAAO,CAAC,mBAAmB,CAAC,cAUpC;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,EAAE,CAAC,EAAE,IAC1B,GAAG,MAAM,CAAC,SAAS,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,GAAG,KAAK,UAQ/D"}
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
3
|
+
import './style.css';
|
|
4
|
+
export interface WithFadeFromProps {
|
|
5
|
+
/**
|
|
6
|
+
* Array of numbers from 0 to 100 that corresponds to % of the screen a given snap point should take up.
|
|
7
|
+
* Should go from least visible. Example `[0.2, 0.5, 0.8]`.
|
|
8
|
+
* You can also use px values, which doesn't take screen height into account.
|
|
9
|
+
*/
|
|
10
|
+
snapPoints: (number | string)[];
|
|
11
|
+
/**
|
|
12
|
+
* Index of a `snapPoint` from which the overlay fade should be applied. Defaults to the last snap point.
|
|
13
|
+
*/
|
|
14
|
+
fadeFromIndex: number;
|
|
15
|
+
}
|
|
16
|
+
export interface WithoutFadeFromProps {
|
|
17
|
+
/**
|
|
18
|
+
* Array of numbers from 0 to 100 that corresponds to % of the screen a given snap point should take up.
|
|
19
|
+
* Should go from least visible. Example `[0.2, 0.5, 0.8]`.
|
|
20
|
+
* You can also use px values, which doesn't take screen height into account.
|
|
21
|
+
*/
|
|
22
|
+
snapPoints?: (number | string)[];
|
|
23
|
+
fadeFromIndex?: never;
|
|
24
|
+
}
|
|
25
|
+
export type DialogProps = {
|
|
26
|
+
activeSnapPoint?: number | string | null;
|
|
27
|
+
setActiveSnapPoint?: (snapPoint: number | string | null) => void;
|
|
28
|
+
children?: React.ReactNode;
|
|
29
|
+
open?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Number between 0 and 1 that determines when the drawer should be closed.
|
|
32
|
+
* Example: threshold of 0.5 would close the drawer if the user swiped for 50% of the height of the drawer or more.
|
|
33
|
+
* @default 0.25
|
|
34
|
+
*/
|
|
35
|
+
closeThreshold?: number;
|
|
36
|
+
/**
|
|
37
|
+
* When `true` the `body` doesn't get any styles assigned from Vaul
|
|
38
|
+
*/
|
|
39
|
+
noBodyStyles?: boolean;
|
|
40
|
+
onOpenChange?: (open: boolean) => void;
|
|
41
|
+
shouldScaleBackground?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* When `false` we don't change body's background color when the drawer is open.
|
|
44
|
+
* @default true
|
|
45
|
+
*/
|
|
46
|
+
setBackgroundColorOnScale?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* Duration for which the drawer is not draggable after scrolling content inside of the drawer.
|
|
49
|
+
* @default 500ms
|
|
50
|
+
*/
|
|
51
|
+
scrollLockTimeout?: number;
|
|
52
|
+
/**
|
|
53
|
+
* When `true`, don't move the drawer upwards if there's space, but rather only change it's height so it's fully scrollable when the keyboard is open
|
|
54
|
+
*/
|
|
55
|
+
fixed?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* When `true` only allows the drawer to be dragged by the `<Drawer.Handle />` component.
|
|
58
|
+
* @default false
|
|
59
|
+
*/
|
|
60
|
+
handleOnly?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* When `false` dragging, clicking outside, pressing esc, etc. will not close the drawer.
|
|
63
|
+
* Use this in comination with the `open` prop, otherwise you won't be able to open/close the drawer.
|
|
64
|
+
* @default true
|
|
65
|
+
*/
|
|
66
|
+
dismissible?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Called when the user tries to close a non-dismissible drawer — dragging down
|
|
69
|
+
* at the first snap point, pressing escape, or tapping the handle of a
|
|
70
|
+
* single-snap-point drawer. Overlay clicks don't count, mirroring iOS.
|
|
71
|
+
*/
|
|
72
|
+
onDismissAttempt?: () => void;
|
|
73
|
+
/**
|
|
74
|
+
* When `false` the drawer can't be dragged by the user. Programmatic snap-point
|
|
75
|
+
* changes still animate. Defaults to `true`.
|
|
76
|
+
*/
|
|
77
|
+
draggable?: boolean;
|
|
78
|
+
onDrag?: (event: React.PointerEvent<HTMLDivElement>, percentageDragged: number) => void;
|
|
79
|
+
onRelease?: (event: React.PointerEvent<HTMLDivElement>, open: boolean) => void;
|
|
80
|
+
/**
|
|
81
|
+
* When `false` it allows to interact with elements outside of the drawer without closing it.
|
|
82
|
+
* @default true
|
|
83
|
+
*/
|
|
84
|
+
modal?: boolean;
|
|
85
|
+
nested?: boolean;
|
|
86
|
+
onClose?: () => void;
|
|
87
|
+
/**
|
|
88
|
+
* Direction of the drawer. Can be `top` or `bottom`, `left`, `right`.
|
|
89
|
+
* @default 'bottom'
|
|
90
|
+
*/
|
|
91
|
+
direction?: 'top' | 'bottom' | 'left' | 'right';
|
|
92
|
+
/**
|
|
93
|
+
* Opened by default, skips initial enter animation. Still reacts to `open` state changes
|
|
94
|
+
* @default false
|
|
95
|
+
*/
|
|
96
|
+
defaultOpen?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* When set to `true` prevents scrolling on the document body on mount, and restores it on unmount.
|
|
99
|
+
* @default false
|
|
100
|
+
*/
|
|
101
|
+
disablePreventScroll?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* When `true` Vaul will reposition inputs rather than scroll then into view if the keyboard is in the way.
|
|
104
|
+
* Setting it to `false` will fall back to the default browser behavior.
|
|
105
|
+
* @default true when {@link snapPoints} is defined
|
|
106
|
+
*/
|
|
107
|
+
repositionInputs?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Disabled velocity based swiping for snap points.
|
|
110
|
+
* This means that a snap point won't be skipped even if the velocity is high enough.
|
|
111
|
+
* Useful if each snap point in a drawer is equally important.
|
|
112
|
+
* @default false
|
|
113
|
+
*/
|
|
114
|
+
snapToSequentialPoint?: boolean;
|
|
115
|
+
container?: HTMLElement | null;
|
|
116
|
+
/**
|
|
117
|
+
* Gets triggered after the open or close animation ends, it receives an `open` argument with the `open` state of the drawer by the time the function was triggered.
|
|
118
|
+
* Useful to revert any state changes for example.
|
|
119
|
+
*/
|
|
120
|
+
onAnimationEnd?: (open: boolean) => void;
|
|
121
|
+
/**
|
|
122
|
+
* Fires on every animation frame while the drawer is open with the drawer's
|
|
123
|
+
* current top edge in the viewport (px). Emits during drag, snap, and the
|
|
124
|
+
* open/close transitions.
|
|
125
|
+
*/
|
|
126
|
+
onPositionChange?: (position: number) => void;
|
|
127
|
+
preventScrollRestoration?: boolean;
|
|
128
|
+
autoFocus?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Renders the drawer as a floating card offset from the bottom edge so it
|
|
131
|
+
* doesn't visually attach to the viewport. Snap points are computed against
|
|
132
|
+
* the reduced floating area, so {@link detachedOffset} is preserved during
|
|
133
|
+
* drag and snap.
|
|
134
|
+
* @default false
|
|
135
|
+
*/
|
|
136
|
+
detached?: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* Gap (in px) between the drawer's bottom edge and the viewport bottom when
|
|
139
|
+
* {@link detached} is `true`.
|
|
140
|
+
* @default 0
|
|
141
|
+
*/
|
|
142
|
+
detachedOffset?: number;
|
|
143
|
+
/**
|
|
144
|
+
* Corner radius (in px) applied to the clip wrapper's bottom when
|
|
145
|
+
* {@link detached} is `true`, so the floating card's bottom edge stays
|
|
146
|
+
* rounded while it's clipped at the floating anchor.
|
|
147
|
+
* @default 0
|
|
148
|
+
*/
|
|
149
|
+
detachedRadius?: number;
|
|
150
|
+
/**
|
|
151
|
+
* Extra styles merged into the detached clip wrapper. Use this to match the
|
|
152
|
+
* wrapper's horizontal bounds to the drawer's on desktop (e.g. `maxWidth` +
|
|
153
|
+
* auto margins) so its rounded-bottom clip aligns with the drawer.
|
|
154
|
+
*/
|
|
155
|
+
detachedWrapperStyle?: React.CSSProperties;
|
|
156
|
+
/**
|
|
157
|
+
* Caps the visible sheet height (in px) so full and 'auto' snap points
|
|
158
|
+
* respect a user-specified ceiling.
|
|
159
|
+
*/
|
|
160
|
+
maxContentHeight?: number;
|
|
161
|
+
/**
|
|
162
|
+
* Resolved height (in px) for the 'peek' snap point — the caller measures
|
|
163
|
+
* its header/footer and passes the combined height.
|
|
164
|
+
*/
|
|
165
|
+
peekHeight?: number;
|
|
166
|
+
/**
|
|
167
|
+
* When `false` the first snap on mount is applied without a transition so
|
|
168
|
+
* the sheet appears at its target detent instantly. Defaults to `true`.
|
|
169
|
+
*/
|
|
170
|
+
initialAnimated?: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* Fires when the auto-size wrapper's measured content height changes.
|
|
173
|
+
* Useful for callers that want to size the surrounding card to fit
|
|
174
|
+
* content (e.g. iPad-style form sheets).
|
|
175
|
+
*/
|
|
176
|
+
onContentHeightChange?: (height: number) => void;
|
|
177
|
+
/**
|
|
178
|
+
* Overrides the measured content height used to resolve the 'auto' snap
|
|
179
|
+
* point. Used when the caller bounds the content to the visible sheet
|
|
180
|
+
* (e.g. a plugged scrollable) so the auto-size wrapper can't be measured
|
|
181
|
+
* from natural flow.
|
|
182
|
+
*/
|
|
183
|
+
contentHeight?: number;
|
|
184
|
+
} & (WithFadeFromProps | WithoutFadeFromProps);
|
|
185
|
+
export declare function Root({ open: openProp, onOpenChange, children, onDrag: onDragProp, onRelease: onReleaseProp, snapPoints, shouldScaleBackground, setBackgroundColorOnScale, closeThreshold, scrollLockTimeout, dismissible, onDismissAttempt, draggable, handleOnly, fadeFromIndex, activeSnapPoint: activeSnapPointProp, setActiveSnapPoint: setActiveSnapPointProp, fixed, modal, onClose, nested, noBodyStyles, direction, defaultOpen, disablePreventScroll, snapToSequentialPoint, preventScrollRestoration, repositionInputs, onAnimationEnd, onPositionChange, container, autoFocus, detached, detachedOffset, detachedRadius, detachedWrapperStyle, maxContentHeight, peekHeight, initialAnimated, onContentHeightChange, contentHeight: contentHeightProp, }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
186
|
+
export declare const Overlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
187
|
+
export type ContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {
|
|
188
|
+
/**
|
|
189
|
+
* Extra nodes rendered inside the detached clip wrapper as siblings of the
|
|
190
|
+
* drawer. Use for floating elements (e.g. a footer) that should slide with
|
|
191
|
+
* the wrapper on dismiss and drag-overshoot instead of staying pinned.
|
|
192
|
+
*/
|
|
193
|
+
detachedSiblings?: React.ReactNode;
|
|
194
|
+
};
|
|
195
|
+
export declare const Content: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
196
|
+
/**
|
|
197
|
+
* Extra nodes rendered inside the detached clip wrapper as siblings of the
|
|
198
|
+
* drawer. Use for floating elements (e.g. a footer) that should slide with
|
|
199
|
+
* the wrapper on dismiss and drag-overshoot instead of staying pinned.
|
|
200
|
+
*/
|
|
201
|
+
detachedSiblings?: React.ReactNode;
|
|
202
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
203
|
+
export type HandleProps = React.ComponentPropsWithoutRef<'div'> & {
|
|
204
|
+
preventCycle?: boolean;
|
|
205
|
+
};
|
|
206
|
+
export declare const Handle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
207
|
+
preventCycle?: boolean;
|
|
208
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
209
|
+
export declare function NestedRoot({ onDrag, onOpenChange, open: nestedIsOpen, ...rest }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
210
|
+
type PortalProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>;
|
|
211
|
+
export declare function Portal(props: PortalProps): import("react/jsx-runtime").JSX.Element;
|
|
212
|
+
export declare const Drawer: {
|
|
213
|
+
Root: typeof Root;
|
|
214
|
+
NestedRoot: typeof NestedRoot;
|
|
215
|
+
Content: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
216
|
+
/**
|
|
217
|
+
* Extra nodes rendered inside the detached clip wrapper as siblings of the
|
|
218
|
+
* drawer. Use for floating elements (e.g. a footer) that should slide with
|
|
219
|
+
* the wrapper on dismiss and drag-overshoot instead of staying pinned.
|
|
220
|
+
*/
|
|
221
|
+
detachedSiblings?: React.ReactNode;
|
|
222
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
223
|
+
Overlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
224
|
+
Trigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
225
|
+
Portal: typeof Portal;
|
|
226
|
+
Handle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
227
|
+
preventCycle?: boolean;
|
|
228
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
229
|
+
Close: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
230
|
+
Title: React.ForwardRefExoticComponent<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
231
|
+
Description: React.ForwardRefExoticComponent<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
232
|
+
};
|
|
233
|
+
export {};
|
|
234
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/web/vaul/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAI1D,OAAO,aAAa,CAAC;AAuBrB,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,UAAU,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAChC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACjC,aAAa,CAAC,EAAE,KAAK,CAAC;CACvB;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACzC,kBAAkB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACjE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,qBAAqB,CAAC,EAAE,OAAO,CAA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AG,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
type PossibleRef<T> = React.Ref<T> | undefined;
|
|
3
|
+
/**
|
|
4
|
+
* A utility to compose multiple refs together
|
|
5
|
+
* Accepts callback refs and RefObject(s)
|
|
6
|
+
*/
|
|
7
|
+
declare function composeRefs<T>(...refs: PossibleRef<T>[]): (node: T) => void;
|
|
8
|
+
/**
|
|
9
|
+
* A custom hook that composes multiple refs
|
|
10
|
+
* Accepts callback refs and RefObject(s)
|
|
11
|
+
*/
|
|
12
|
+
declare function useComposedRefs<T>(...refs: PossibleRef<T>[]): (node: T) => void;
|
|
13
|
+
export { composeRefs, useComposedRefs };
|
|
14
|
+
//# sourceMappingURL=use-composed-refs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-composed-refs.d.ts","sourceRoot":"","sources":["../../../../../src/web/vaul/use-composed-refs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,KAAK,WAAW,CAAC,CAAC,IAAI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC;AAc/C;;;GAGG;AACH,iBAAS,WAAW,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,IACvC,MAAM,CAAC,UAChB;AAED;;;GAGG;AACH,iBAAS,eAAe,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,EAAE,qBAEpD;AAED,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
type UseControllableStateParams<T> = {
|
|
3
|
+
prop?: T | undefined;
|
|
4
|
+
defaultProp?: T | undefined;
|
|
5
|
+
onChange?: (state: T) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function useControllableState<T>({ prop, defaultProp, onChange, }: UseControllableStateParams<T>): readonly [T | undefined, React.Dispatch<React.SetStateAction<T | undefined>>];
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=use-controllable-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-controllable-state.d.ts","sourceRoot":"","sources":["../../../../../src/web/vaul/use-controllable-state.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,KAAK,0BAA0B,CAAC,CAAC,IAAI;IACnC,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC;IACrB,WAAW,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC;IAC5B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,IAAI,CAAC;CAC/B,CAAC;AAiCF,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,EACtC,IAAI,EACJ,WAAW,EACX,QAAmB,GACpB,EAAE,0BAA0B,CAAC,CAAC,CAAC,iFAoB/B"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This hook is necessary to prevent buggy behavior on iOS devices (need to test on Android).
|
|
3
|
+
* I won't get into too much detail about what bugs it solves, but so far I've found that setting the body to `position: fixed` is the most reliable way to prevent those bugs.
|
|
4
|
+
* Issues that this hook solves:
|
|
5
|
+
* https://github.com/emilkowalski/vaul/issues/435
|
|
6
|
+
* https://github.com/emilkowalski/vaul/issues/433
|
|
7
|
+
* And more that I discovered, but were just not reported.
|
|
8
|
+
*/
|
|
9
|
+
export declare function usePositionFixed({ isOpen, modal, nested, hasBeenOpened, preventScrollRestoration, noBodyStyles, }: {
|
|
10
|
+
isOpen: boolean;
|
|
11
|
+
modal: boolean;
|
|
12
|
+
nested: boolean;
|
|
13
|
+
hasBeenOpened: boolean;
|
|
14
|
+
preventScrollRestoration: boolean;
|
|
15
|
+
noBodyStyles: boolean;
|
|
16
|
+
}): {
|
|
17
|
+
restorePositionSetting: () => void;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=use-position-fixed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-position-fixed.d.ts","sourceRoot":"","sources":["../../../../../src/web/vaul/use-position-fixed.ts"],"names":[],"mappings":"AAKA;;;;;;;GAOG;AAEH,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,KAAK,EACL,MAAM,EACN,aAAa,EACb,wBAAwB,EACxB,YAAY,GACb,EAAE;IACD,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,aAAa,EAAE,OAAO,CAAC;IACvB,wBAAwB,EAAE,OAAO,CAAC;IAClC,YAAY,EAAE,OAAO,CAAC;CACvB;;EAsHA"}
|