@lodev09/react-native-true-sheet 4.0.0-beta.0 → 4.0.0-beta.1
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 +42 -31
- package/RNTrueSheet.podspec +10 -2
- package/android/build.gradle +2 -1
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetContainerView.kt +174 -49
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetContainerViewManager.kt +7 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetContentView.kt +371 -18
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetContentViewManager.kt +14 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetFooterView.kt +150 -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/TrueSheetPackage.kt +5 -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 +45 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetView.kt +526 -231
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetViewController.kt +1217 -603
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetViewManager.kt +136 -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 +303 -0
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetDetentCalculator.kt +277 -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/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 +112 -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/ViewUtils.kt +30 -0
- package/android/src/main/jni/CMakeLists.txt +63 -0
- package/android/src/main/jni/TrueSheetSpec.h +19 -0
- package/android/src/main/jni/TrueSheetStateUpdater.cpp +96 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewComponentDescriptor.h +24 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewShadowNode.cpp +43 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewShadowNode.h +28 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewState.cpp +11 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewState.h +37 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewComponentDescriptor.h +24 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewShadowNode.cpp +56 -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/TrueSheetViewComponentDescriptor.h +28 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewShadowNode.cpp +61 -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 +81 -6
- package/ios/TrueSheetContainerView.mm +275 -21
- package/ios/TrueSheetContentView.h +38 -1
- package/ios/TrueSheetContentView.mm +413 -43
- package/ios/TrueSheetFooterView.h +27 -2
- package/ios/TrueSheetFooterView.mm +141 -35
- package/ios/{events/OnDidDismissEvent.h → TrueSheetHeaderView.h} +10 -7
- package/ios/TrueSheetHeaderView.mm +64 -0
- package/ios/TrueSheetModule.mm +92 -5
- package/ios/TrueSheetPeekView.h +32 -0
- package/ios/TrueSheetPeekView.mm +99 -0
- package/ios/TrueSheetView.h +7 -15
- package/ios/TrueSheetView.mm +633 -215
- package/ios/TrueSheetViewController.h +84 -16
- package/ios/TrueSheetViewController.mm +1136 -333
- 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 +178 -0
- package/ios/core/TrueSheetKeyboardObserver.h +39 -0
- package/ios/core/TrueSheetKeyboardObserver.mm +112 -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 +40 -0
- package/ios/events/TrueSheetLifecycleEvents.mm +71 -0
- package/ios/events/TrueSheetStateEvents.h +35 -0
- package/ios/events/TrueSheetStateEvents.mm +49 -0
- package/ios/tvos/TrueSheetStubs.mm +154 -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/{events/OnWillDismissEvent.h → utils/UIView+ScrollEdgeInteraction.h} +6 -7
- package/ios/utils/UIView+ScrollEdgeInteraction.mm +62 -0
- package/ios/utils/WindowUtil.mm +17 -1
- package/lib/module/TrueSheet.js +224 -64
- package/lib/module/TrueSheet.js.map +1 -1
- package/lib/module/TrueSheet.web.js +1201 -0
- package/lib/module/TrueSheet.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/TrueSheetPeekViewNativeComponent.ts +8 -0
- package/lib/module/fabric/TrueSheetViewNativeComponent.ts +105 -18
- package/lib/module/index.js +3 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/mocks/index.js +93 -0
- package/lib/module/mocks/index.js.map +1 -0
- package/lib/module/mocks/navigation.js +85 -0
- package/lib/module/mocks/navigation.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/TrueSheetRouter.js +170 -0
- package/lib/module/navigation/TrueSheetRouter.js.map +1 -0
- package/lib/module/navigation/TrueSheetView.js +71 -0
- package/lib/module/navigation/TrueSheetView.js.map +1 -0
- package/lib/module/navigation/createTrueSheetNavigator.js +63 -0
- package/lib/module/navigation/createTrueSheetNavigator.js.map +1 -0
- package/lib/module/navigation/index.js +6 -0
- package/lib/module/navigation/index.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 +68 -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/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 +15 -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 +93 -0
- package/lib/module/web/vaul/helpers.js.map +1 -0
- package/lib/module/web/vaul/index.js +1309 -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 +51 -14
- package/lib/typescript/src/TrueSheet.d.ts.map +1 -1
- package/lib/typescript/src/TrueSheet.types.d.ts +463 -54
- 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/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/TrueSheetPeekViewNativeComponent.d.ts +6 -0
- package/lib/typescript/src/fabric/TrueSheetPeekViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/fabric/TrueSheetViewNativeComponent.d.ts +67 -16
- package/lib/typescript/src/fabric/TrueSheetViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +2 -2
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mocks/index.d.ts +43 -0
- package/lib/typescript/src/mocks/index.d.ts.map +1 -0
- package/lib/typescript/src/mocks/navigation.d.ts +66 -0
- package/lib/typescript/src/mocks/navigation.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/TrueSheetRouter.d.ts +57 -0
- package/lib/typescript/src/navigation/TrueSheetRouter.d.ts.map +1 -0
- package/lib/typescript/src/navigation/TrueSheetView.d.ts +10 -0
- package/lib/typescript/src/navigation/TrueSheetView.d.ts.map +1 -0
- package/lib/typescript/src/navigation/createTrueSheetNavigator.d.ts +35 -0
- package/lib/typescript/src/navigation/createTrueSheetNavigator.d.ts.map +1 -0
- package/lib/typescript/src/navigation/index.d.ts +6 -0
- package/lib/typescript/src/navigation/index.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 +15 -0
- package/lib/typescript/src/navigation/screen/types.d.ts.map +1 -0
- package/lib/typescript/src/navigation/screen/useSheetScreenState.d.ts +35 -0
- package/lib/typescript/src/navigation/screen/useSheetScreenState.d.ts.map +1 -0
- package/lib/typescript/src/navigation/types.d.ts +153 -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/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 +13 -0
- package/lib/typescript/src/web/vaul/constants.d.ts.map +1 -0
- package/lib/typescript/src/web/vaul/context.d.ts +53 -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 +228 -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 +78 -34
- package/react-native.config.js +9 -2
- package/src/TrueSheet.tsx +276 -60
- package/src/TrueSheet.types.ts +525 -71
- package/src/TrueSheet.web.tsx +1366 -0
- package/src/TrueSheetPeek.tsx +11 -0
- package/src/TrueSheetPeek.web.tsx +63 -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/TrueSheetPeekViewNativeComponent.ts +8 -0
- package/src/fabric/TrueSheetViewNativeComponent.ts +105 -18
- package/src/index.ts +2 -2
- package/src/mocks/index.ts +89 -0
- package/src/mocks/navigation.ts +72 -0
- package/src/mocks/reanimated.ts +101 -0
- package/src/navigation/TrueSheetRouter.ts +234 -0
- package/src/navigation/TrueSheetView.tsx +99 -0
- package/src/navigation/createTrueSheetNavigator.tsx +93 -0
- package/src/navigation/index.ts +14 -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 +21 -0
- package/src/navigation/screen/useSheetScreenState.ts +107 -0
- package/src/navigation/types.ts +219 -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/vaul/README.md +9 -0
- package/src/web/vaul/browser.ts +38 -0
- package/src/web/vaul/constants.ts +20 -0
- package/src/web/vaul/context.ts +101 -0
- package/src/web/vaul/helpers.ts +124 -0
- package/src/web/vaul/index.tsx +1740 -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.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,228 @@
|
|
|
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
|
+
* When `false` the drawer can't be dragged by the user. Programmatic snap-point
|
|
69
|
+
* changes still animate. Defaults to `true`.
|
|
70
|
+
*/
|
|
71
|
+
draggable?: boolean;
|
|
72
|
+
onDrag?: (event: React.PointerEvent<HTMLDivElement>, percentageDragged: number) => void;
|
|
73
|
+
onRelease?: (event: React.PointerEvent<HTMLDivElement>, open: boolean) => void;
|
|
74
|
+
/**
|
|
75
|
+
* When `false` it allows to interact with elements outside of the drawer without closing it.
|
|
76
|
+
* @default true
|
|
77
|
+
*/
|
|
78
|
+
modal?: boolean;
|
|
79
|
+
nested?: boolean;
|
|
80
|
+
onClose?: () => void;
|
|
81
|
+
/**
|
|
82
|
+
* Direction of the drawer. Can be `top` or `bottom`, `left`, `right`.
|
|
83
|
+
* @default 'bottom'
|
|
84
|
+
*/
|
|
85
|
+
direction?: 'top' | 'bottom' | 'left' | 'right';
|
|
86
|
+
/**
|
|
87
|
+
* Opened by default, skips initial enter animation. Still reacts to `open` state changes
|
|
88
|
+
* @default false
|
|
89
|
+
*/
|
|
90
|
+
defaultOpen?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* When set to `true` prevents scrolling on the document body on mount, and restores it on unmount.
|
|
93
|
+
* @default false
|
|
94
|
+
*/
|
|
95
|
+
disablePreventScroll?: boolean;
|
|
96
|
+
/**
|
|
97
|
+
* When `true` Vaul will reposition inputs rather than scroll then into view if the keyboard is in the way.
|
|
98
|
+
* Setting it to `false` will fall back to the default browser behavior.
|
|
99
|
+
* @default true when {@link snapPoints} is defined
|
|
100
|
+
*/
|
|
101
|
+
repositionInputs?: boolean;
|
|
102
|
+
/**
|
|
103
|
+
* Disabled velocity based swiping for snap points.
|
|
104
|
+
* This means that a snap point won't be skipped even if the velocity is high enough.
|
|
105
|
+
* Useful if each snap point in a drawer is equally important.
|
|
106
|
+
* @default false
|
|
107
|
+
*/
|
|
108
|
+
snapToSequentialPoint?: boolean;
|
|
109
|
+
container?: HTMLElement | null;
|
|
110
|
+
/**
|
|
111
|
+
* 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.
|
|
112
|
+
* Useful to revert any state changes for example.
|
|
113
|
+
*/
|
|
114
|
+
onAnimationEnd?: (open: boolean) => void;
|
|
115
|
+
/**
|
|
116
|
+
* Fires on every animation frame while the drawer is open with the drawer's
|
|
117
|
+
* current top edge in the viewport (px). Emits during drag, snap, and the
|
|
118
|
+
* open/close transitions.
|
|
119
|
+
*/
|
|
120
|
+
onPositionChange?: (position: number) => void;
|
|
121
|
+
preventScrollRestoration?: boolean;
|
|
122
|
+
autoFocus?: boolean;
|
|
123
|
+
/**
|
|
124
|
+
* Renders the drawer as a floating card offset from the bottom edge so it
|
|
125
|
+
* doesn't visually attach to the viewport. Snap points are computed against
|
|
126
|
+
* the reduced floating area, so {@link detachedOffset} is preserved during
|
|
127
|
+
* drag and snap.
|
|
128
|
+
* @default false
|
|
129
|
+
*/
|
|
130
|
+
detached?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* Gap (in px) between the drawer's bottom edge and the viewport bottom when
|
|
133
|
+
* {@link detached} is `true`.
|
|
134
|
+
* @default 0
|
|
135
|
+
*/
|
|
136
|
+
detachedOffset?: number;
|
|
137
|
+
/**
|
|
138
|
+
* Corner radius (in px) applied to the clip wrapper's bottom when
|
|
139
|
+
* {@link detached} is `true`, so the floating card's bottom edge stays
|
|
140
|
+
* rounded while it's clipped at the floating anchor.
|
|
141
|
+
* @default 0
|
|
142
|
+
*/
|
|
143
|
+
detachedRadius?: number;
|
|
144
|
+
/**
|
|
145
|
+
* Extra styles merged into the detached clip wrapper. Use this to match the
|
|
146
|
+
* wrapper's horizontal bounds to the drawer's on desktop (e.g. `maxWidth` +
|
|
147
|
+
* auto margins) so its rounded-bottom clip aligns with the drawer.
|
|
148
|
+
*/
|
|
149
|
+
detachedWrapperStyle?: React.CSSProperties;
|
|
150
|
+
/**
|
|
151
|
+
* Caps the visible sheet height (in px) so full and 'auto' snap points
|
|
152
|
+
* respect a user-specified ceiling.
|
|
153
|
+
*/
|
|
154
|
+
maxContentHeight?: number;
|
|
155
|
+
/**
|
|
156
|
+
* Resolved height (in px) for the 'peek' snap point — the caller measures
|
|
157
|
+
* its header/footer and passes the combined height.
|
|
158
|
+
*/
|
|
159
|
+
peekHeight?: number;
|
|
160
|
+
/**
|
|
161
|
+
* When `false` the first snap on mount is applied without a transition so
|
|
162
|
+
* the sheet appears at its target detent instantly. Defaults to `true`.
|
|
163
|
+
*/
|
|
164
|
+
initialAnimated?: boolean;
|
|
165
|
+
/**
|
|
166
|
+
* Fires when the auto-size wrapper's measured content height changes.
|
|
167
|
+
* Useful for callers that want to size the surrounding card to fit
|
|
168
|
+
* content (e.g. iPad-style form sheets).
|
|
169
|
+
*/
|
|
170
|
+
onContentHeightChange?: (height: number) => void;
|
|
171
|
+
/**
|
|
172
|
+
* Overrides the measured content height used to resolve the 'auto' snap
|
|
173
|
+
* point. Used when the caller bounds the content to the visible sheet
|
|
174
|
+
* (e.g. a plugged scrollable) so the auto-size wrapper can't be measured
|
|
175
|
+
* from natural flow.
|
|
176
|
+
*/
|
|
177
|
+
contentHeight?: number;
|
|
178
|
+
} & (WithFadeFromProps | WithoutFadeFromProps);
|
|
179
|
+
export declare function Root({ open: openProp, onOpenChange, children, onDrag: onDragProp, onRelease: onReleaseProp, snapPoints, shouldScaleBackground, setBackgroundColorOnScale, closeThreshold, scrollLockTimeout, dismissible, 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;
|
|
180
|
+
export declare const Overlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
181
|
+
export type ContentProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & {
|
|
182
|
+
/**
|
|
183
|
+
* Extra nodes rendered inside the detached clip wrapper as siblings of the
|
|
184
|
+
* drawer. Use for floating elements (e.g. a footer) that should slide with
|
|
185
|
+
* the wrapper on dismiss and drag-overshoot instead of staying pinned.
|
|
186
|
+
*/
|
|
187
|
+
detachedSiblings?: React.ReactNode;
|
|
188
|
+
};
|
|
189
|
+
export declare const Content: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
190
|
+
/**
|
|
191
|
+
* Extra nodes rendered inside the detached clip wrapper as siblings of the
|
|
192
|
+
* drawer. Use for floating elements (e.g. a footer) that should slide with
|
|
193
|
+
* the wrapper on dismiss and drag-overshoot instead of staying pinned.
|
|
194
|
+
*/
|
|
195
|
+
detachedSiblings?: React.ReactNode;
|
|
196
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
197
|
+
export type HandleProps = React.ComponentPropsWithoutRef<'div'> & {
|
|
198
|
+
preventCycle?: boolean;
|
|
199
|
+
};
|
|
200
|
+
export declare const Handle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
201
|
+
preventCycle?: boolean;
|
|
202
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
203
|
+
export declare function NestedRoot({ onDrag, onOpenChange, open: nestedIsOpen, ...rest }: DialogProps): import("react/jsx-runtime").JSX.Element;
|
|
204
|
+
type PortalProps = React.ComponentPropsWithoutRef<typeof DialogPrimitive.Portal>;
|
|
205
|
+
export declare function Portal(props: PortalProps): import("react/jsx-runtime").JSX.Element;
|
|
206
|
+
export declare const Drawer: {
|
|
207
|
+
Root: typeof Root;
|
|
208
|
+
NestedRoot: typeof NestedRoot;
|
|
209
|
+
Content: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
210
|
+
/**
|
|
211
|
+
* Extra nodes rendered inside the detached clip wrapper as siblings of the
|
|
212
|
+
* drawer. Use for floating elements (e.g. a footer) that should slide with
|
|
213
|
+
* the wrapper on dismiss and drag-overshoot instead of staying pinned.
|
|
214
|
+
*/
|
|
215
|
+
detachedSiblings?: React.ReactNode;
|
|
216
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
217
|
+
Overlay: React.ForwardRefExoticComponent<Omit<DialogPrimitive.DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
218
|
+
Trigger: React.ForwardRefExoticComponent<DialogPrimitive.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
219
|
+
Portal: typeof Portal;
|
|
220
|
+
Handle: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
|
|
221
|
+
preventCycle?: boolean;
|
|
222
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
223
|
+
Close: React.ForwardRefExoticComponent<DialogPrimitive.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
224
|
+
Title: React.ForwardRefExoticComponent<DialogPrimitive.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;
|
|
225
|
+
Description: React.ForwardRefExoticComponent<DialogPrimitive.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
|
|
226
|
+
};
|
|
227
|
+
export {};
|
|
228
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/web/vaul/index.tsx"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/web/vaul/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;AAClE,MAAM,WAAW,SAAS;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,WAAW,GAAG,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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
export declare const useIsomorphicLayoutEffect: typeof useEffect;
|
|
3
|
+
interface PreventScrollOptions {
|
|
4
|
+
/** Whether the scroll lock is disabled. */
|
|
5
|
+
isDisabled?: boolean;
|
|
6
|
+
focusCallback?: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function isScrollable(node: Element): boolean;
|
|
9
|
+
export declare function getScrollParent(node: Element): Element;
|
|
10
|
+
/**
|
|
11
|
+
* Prevents scrolling on the document body on mount, and
|
|
12
|
+
* restores it on unmount. Also ensures that content does not
|
|
13
|
+
* shift due to the scrollbars disappearing.
|
|
14
|
+
*/
|
|
15
|
+
export declare function usePreventScroll(options?: PreventScrollOptions): void;
|
|
16
|
+
export declare function isInput(target: Element): boolean;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=use-prevent-scroll.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-prevent-scroll.d.ts","sourceRoot":"","sources":["../../../../../src/web/vaul/use-prevent-scroll.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAmB,MAAM,OAAO,CAAC;AAKnD,eAAO,MAAM,yBAAyB,kBACuB,CAAC;AAE9D,UAAU,oBAAoB;IAC5B,2CAA2C;IAC3C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;AAeD,wBAAgB,YAAY,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAGnD;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAUtD;AAmBD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE,oBAAyB,QAsBlE;AAoND,wBAAgB,OAAO,CAAC,MAAM,EAAE,OAAO,WAMtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-scale-background.d.ts","sourceRoot":"","sources":["../../../../../src/web/vaul/use-scale-background.ts"],"names":[],"mappings":"AAQA,wBAAgB,kBAAkB,SAuDjC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DrawerDirection } from './types';
|
|
3
|
+
export declare function useSnapPoints({ activeSnapPointProp, setActiveSnapPointProp, snapPoints, drawerRef, overlayRef, fadeFromIndex, onSnapPointChange, direction, container, snapToSequentialPoint, isOpen, contentHeight, detachedOffset, maxContentHeight, peekHeight, initialAnimated, }: {
|
|
4
|
+
activeSnapPointProp?: number | string | null;
|
|
5
|
+
setActiveSnapPointProp?(snapPoint: number | null | string): void;
|
|
6
|
+
snapPoints?: (number | string)[];
|
|
7
|
+
fadeFromIndex?: number;
|
|
8
|
+
drawerRef: React.RefObject<HTMLDivElement | null>;
|
|
9
|
+
overlayRef: React.RefObject<HTMLDivElement | null>;
|
|
10
|
+
onSnapPointChange(activeSnapPointIndex: number): void;
|
|
11
|
+
direction?: DrawerDirection;
|
|
12
|
+
container?: HTMLElement | null | undefined;
|
|
13
|
+
snapToSequentialPoint?: boolean;
|
|
14
|
+
isOpen?: boolean;
|
|
15
|
+
contentHeight?: number;
|
|
16
|
+
detachedOffset?: number;
|
|
17
|
+
maxContentHeight?: number;
|
|
18
|
+
peekHeight?: number;
|
|
19
|
+
initialAnimated?: boolean;
|
|
20
|
+
}): {
|
|
21
|
+
isLastSnapPoint: true | null;
|
|
22
|
+
activeSnapPoint: string | number | null | undefined;
|
|
23
|
+
shouldFade: boolean;
|
|
24
|
+
getPercentageDragged: (absDraggedDistance: number, isDraggingDown: boolean) => number | null;
|
|
25
|
+
setActiveSnapPoint: React.Dispatch<React.SetStateAction<string | number | null | undefined>>;
|
|
26
|
+
activeSnapPointIndex: number | null;
|
|
27
|
+
onRelease: ({ draggedDistance, closeDrawer, velocity, dismissible, }: {
|
|
28
|
+
draggedDistance: number;
|
|
29
|
+
closeDrawer: () => void;
|
|
30
|
+
velocity: number;
|
|
31
|
+
dismissible: boolean;
|
|
32
|
+
}) => void;
|
|
33
|
+
onDrag: ({ draggedDistance }: {
|
|
34
|
+
draggedDistance: number;
|
|
35
|
+
}) => void;
|
|
36
|
+
snapPointsOffset: number[];
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=use-snap-points.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-snap-points.d.ts","sourceRoot":"","sources":["../../../../../src/web/vaul/use-snap-points.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,wBAAgB,aAAa,CAAC,EAC5B,mBAAmB,EACnB,sBAAsB,EACtB,UAAU,EACV,SAAS,EACT,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,SAAoB,EACpB,SAAS,EACT,qBAAqB,EACrB,MAAM,EACN,aAAa,EACb,cAAkB,EAClB,gBAAgB,EAChB,UAAU,EACV,eAAsB,GACvB,EAAE;IACD,mBAAmB,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC7C,sBAAsB,CAAC,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAAC;IACjE,UAAU,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAClD,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IACnD,iBAAiB,CAAC,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACtD,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,SAAS,CAAC,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;IAC3C,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;;;;+CA0VmD,MAAM,kBAAkB,OAAO;;;0EAhI9E;QACD,eAAe,EAAE,MAAM,CAAC;QACxB,WAAW,EAAE,MAAM,IAAI,CAAC;QACxB,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,EAAE,OAAO,CAAC;KACtB;kCA4EoC;QAAE,eAAe,EAAE,MAAM,CAAA;KAAE;;EAkHjE"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lodev09/react-native-true-sheet",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.1",
|
|
4
4
|
"description": "The true native bottom sheet experience for your React Native Apps.",
|
|
5
5
|
"source": "./src/index.ts",
|
|
6
6
|
"main": "./lib/module/index.js",
|
|
7
7
|
"types": "./lib/typescript/src/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
|
-
"source": "./src/index.
|
|
10
|
+
"source": "./src/index.ts",
|
|
11
11
|
"types": "./lib/typescript/src/index.d.ts",
|
|
12
12
|
"default": "./lib/module/index.js"
|
|
13
13
|
},
|
|
14
|
+
"./mock": "./lib/module/mocks/index.js",
|
|
15
|
+
"./navigation/mock": "./lib/module/mocks/navigation.js",
|
|
16
|
+
"./reanimated/mock": "./lib/module/mocks/reanimated.js",
|
|
17
|
+
"./reanimated": {
|
|
18
|
+
"source": "./src/reanimated/index.ts",
|
|
19
|
+
"types": "./lib/typescript/src/reanimated/index.d.ts",
|
|
20
|
+
"default": "./lib/module/reanimated/index.js"
|
|
21
|
+
},
|
|
22
|
+
"./navigation": {
|
|
23
|
+
"source": "./src/navigation/index.ts",
|
|
24
|
+
"types": "./lib/typescript/src/navigation/index.d.ts",
|
|
25
|
+
"default": "./lib/module/navigation/index.js"
|
|
26
|
+
},
|
|
14
27
|
"./package.json": "./package.json"
|
|
15
28
|
},
|
|
16
29
|
"files": [
|
|
@@ -18,7 +31,7 @@
|
|
|
18
31
|
"lib",
|
|
19
32
|
"android",
|
|
20
33
|
"ios",
|
|
21
|
-
"
|
|
34
|
+
"common",
|
|
22
35
|
"*.podspec",
|
|
23
36
|
"react-native.config.js",
|
|
24
37
|
"!ios/build",
|
|
@@ -32,16 +45,18 @@
|
|
|
32
45
|
"!**/.*"
|
|
33
46
|
],
|
|
34
47
|
"scripts": {
|
|
35
|
-
"
|
|
48
|
+
"bare": "yarn workspace @example/bare",
|
|
49
|
+
"expo": "yarn workspace @example/expo",
|
|
36
50
|
"docs": "yarn workspace docs",
|
|
37
51
|
"test": "jest",
|
|
38
52
|
"typecheck": "tsc",
|
|
39
53
|
"lint": "eslint --fix \"**/*.{ts,tsx}\"",
|
|
40
54
|
"format": "prettier --write \"**/*.{ts,tsx}\"",
|
|
41
|
-
"tidy": "yarn typecheck && yarn lint && yarn format && scripts/
|
|
55
|
+
"tidy": "yarn typecheck && yarn lint && yarn format && scripts/objclint.sh && scripts/ktlint.sh",
|
|
42
56
|
"clean": "scripts/clean.sh",
|
|
43
57
|
"prepare": "bob build",
|
|
44
|
-
"release": "
|
|
58
|
+
"release": "release-it",
|
|
59
|
+
"release:beta": "yarn release --preRelease=beta --no-github.release"
|
|
45
60
|
},
|
|
46
61
|
"keywords": [
|
|
47
62
|
"react-native",
|
|
@@ -73,40 +88,60 @@
|
|
|
73
88
|
"@eslint/eslintrc": "^3.3.1",
|
|
74
89
|
"@eslint/js": "^9.35.0",
|
|
75
90
|
"@evilmartians/lefthook": "^2.0.4",
|
|
76
|
-
"@
|
|
77
|
-
"@
|
|
78
|
-
"@
|
|
91
|
+
"@radix-ui/react-dialog": "^1.1.1",
|
|
92
|
+
"@radix-ui/react-presence": "^1",
|
|
93
|
+
"@react-native/babel-preset": "^0.86.0",
|
|
94
|
+
"@react-native/eslint-config": "^0.86.0",
|
|
95
|
+
"@react-native/jest-preset": "^0.86.0",
|
|
96
|
+
"@react-navigation/core": "^7.13.7",
|
|
97
|
+
"@react-navigation/native": "^7.1.6",
|
|
98
|
+
"@release-it/conventional-changelog": "^11.0.0",
|
|
79
99
|
"@testing-library/react-native": "^13.3.3",
|
|
80
100
|
"@types/babel__core": "^7",
|
|
81
101
|
"@types/jest": "^29.5.14",
|
|
82
|
-
"@types/react": "19.
|
|
102
|
+
"@types/react": "~19.2.14",
|
|
83
103
|
"commitlint": "^19.8.1",
|
|
84
104
|
"del-cli": "^6.0.0",
|
|
85
105
|
"eslint": "^9.35.0",
|
|
86
106
|
"eslint-config-prettier": "^10.1.8",
|
|
87
107
|
"eslint-plugin-prettier": "^5.5.4",
|
|
88
108
|
"jest": "^29.7.0",
|
|
109
|
+
"nanoid": "^5.1.5",
|
|
89
110
|
"prettier": "^3.0.3",
|
|
90
|
-
"react": "19.
|
|
91
|
-
"react-native": "0.
|
|
92
|
-
"react-native-builder-bob": "^0.
|
|
93
|
-
"react-native-reanimated": "
|
|
94
|
-
"react-native-worklets": "
|
|
95
|
-
"react-test-renderer": "19.
|
|
96
|
-
"release-it": "^
|
|
111
|
+
"react": "19.2.3",
|
|
112
|
+
"react-native": "0.86.0",
|
|
113
|
+
"react-native-builder-bob": "^0.41.0",
|
|
114
|
+
"react-native-reanimated": "4.5.0",
|
|
115
|
+
"react-native-worklets": "0.10.0",
|
|
116
|
+
"react-test-renderer": "19.2.3",
|
|
117
|
+
"release-it": "^20.0.1",
|
|
97
118
|
"turbo": "^2.5.6",
|
|
98
|
-
"typescript": "
|
|
119
|
+
"typescript": "~6.0.3"
|
|
99
120
|
},
|
|
100
121
|
"resolutions": {
|
|
101
|
-
"@types/react": "19.
|
|
122
|
+
"@types/react": "~19.2.14",
|
|
123
|
+
"react-native-reanimated": "4.5.0",
|
|
124
|
+
"react-native-worklets": "0.10.0"
|
|
102
125
|
},
|
|
103
126
|
"peerDependencies": {
|
|
127
|
+
"@radix-ui/react-dialog": ">=1",
|
|
128
|
+
"@radix-ui/react-presence": ">=1",
|
|
129
|
+
"@react-navigation/core": ">=7",
|
|
104
130
|
"react": "*",
|
|
105
|
-
"react-native": "
|
|
106
|
-
"react-native-reanimated": ">=4
|
|
131
|
+
"react-native": ">=0.82.0",
|
|
132
|
+
"react-native-reanimated": ">=4",
|
|
107
133
|
"react-native-worklets": "*"
|
|
108
134
|
},
|
|
109
135
|
"peerDependenciesMeta": {
|
|
136
|
+
"@radix-ui/react-dialog": {
|
|
137
|
+
"optional": true
|
|
138
|
+
},
|
|
139
|
+
"@radix-ui/react-presence": {
|
|
140
|
+
"optional": true
|
|
141
|
+
},
|
|
142
|
+
"@react-navigation/core": {
|
|
143
|
+
"optional": true
|
|
144
|
+
},
|
|
110
145
|
"react-native-reanimated": {
|
|
111
146
|
"optional": true
|
|
112
147
|
},
|
|
@@ -115,12 +150,14 @@
|
|
|
115
150
|
}
|
|
116
151
|
},
|
|
117
152
|
"workspaces": [
|
|
118
|
-
"example",
|
|
153
|
+
"example/bare",
|
|
154
|
+
"example/expo",
|
|
155
|
+
"example/shared",
|
|
119
156
|
"docs"
|
|
120
157
|
],
|
|
121
158
|
"packageManager": "yarn@4.11.0",
|
|
122
159
|
"jest": {
|
|
123
|
-
"preset": "react-native",
|
|
160
|
+
"preset": "@react-native/jest-preset",
|
|
124
161
|
"setupFilesAfterEnv": [
|
|
125
162
|
"<rootDir>/jest.setup.js"
|
|
126
163
|
],
|
|
@@ -128,14 +165,16 @@
|
|
|
128
165
|
"node_modules/(?!(react-native|@react-native|react-native-reanimated|react-native-worklets|react-native-worklets-core)/)"
|
|
129
166
|
],
|
|
130
167
|
"modulePathIgnorePatterns": [
|
|
131
|
-
"<rootDir>/example/node_modules",
|
|
168
|
+
"<rootDir>/example/bare/node_modules",
|
|
169
|
+
"<rootDir>/example/expo/node_modules",
|
|
170
|
+
"<rootDir>/example/shared/node_modules",
|
|
132
171
|
"<rootDir>/lib/",
|
|
133
172
|
"<rootDir>/docs/node_modules",
|
|
134
173
|
"<rootDir>/docs/build"
|
|
135
174
|
],
|
|
136
175
|
"testPathIgnorePatterns": [
|
|
137
176
|
"/node_modules/",
|
|
138
|
-
"<rootDir>/
|
|
177
|
+
"<rootDir>/example/"
|
|
139
178
|
]
|
|
140
179
|
},
|
|
141
180
|
"commitlint": {
|
|
@@ -146,10 +185,16 @@
|
|
|
146
185
|
"release-it": {
|
|
147
186
|
"git": {
|
|
148
187
|
"commitMessage": "chore: release ${version}",
|
|
149
|
-
"tagName": "v${version}"
|
|
188
|
+
"tagName": "v${version}",
|
|
189
|
+
"tagExclude": "*-beta*",
|
|
190
|
+
"addUntrackedFiles": true
|
|
150
191
|
},
|
|
151
192
|
"npm": {
|
|
152
|
-
"publish":
|
|
193
|
+
"publish": false
|
|
194
|
+
},
|
|
195
|
+
"hooks": {
|
|
196
|
+
"before:init": "yarn test",
|
|
197
|
+
"after:bump": "scripts/release.sh ${version}"
|
|
153
198
|
},
|
|
154
199
|
"github": {
|
|
155
200
|
"release": true,
|
|
@@ -158,13 +203,6 @@
|
|
|
158
203
|
"issue": ":rocket: _This issue has been resolved in v${version}. See [${releaseName}](${releaseUrl}) for release notes._",
|
|
159
204
|
"pr": ":rocket: _This pull request is included in v${version}. See [${releaseName}](${releaseUrl}) for release notes._"
|
|
160
205
|
}
|
|
161
|
-
},
|
|
162
|
-
"plugins": {
|
|
163
|
-
"@release-it/conventional-changelog": {
|
|
164
|
-
"preset": {
|
|
165
|
-
"name": "angular"
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
206
|
}
|
|
169
207
|
},
|
|
170
208
|
"prettier": {
|
|
@@ -222,8 +260,14 @@
|
|
|
222
260
|
"TrueSheetContentView": {
|
|
223
261
|
"className": "TrueSheetContentView"
|
|
224
262
|
},
|
|
263
|
+
"TrueSheetHeaderView": {
|
|
264
|
+
"className": "TrueSheetHeaderView"
|
|
265
|
+
},
|
|
225
266
|
"TrueSheetFooterView": {
|
|
226
267
|
"className": "TrueSheetFooterView"
|
|
268
|
+
},
|
|
269
|
+
"TrueSheetPeekView": {
|
|
270
|
+
"className": "TrueSheetPeekView"
|
|
227
271
|
}
|
|
228
272
|
}
|
|
229
273
|
}
|
package/react-native.config.js
CHANGED
|
@@ -2,7 +2,14 @@ module.exports = {
|
|
|
2
2
|
dependency: {
|
|
3
3
|
platforms: {
|
|
4
4
|
ios: {},
|
|
5
|
-
android: {
|
|
5
|
+
android: {
|
|
6
|
+
componentDescriptors: [
|
|
7
|
+
'TrueSheetViewComponentDescriptor',
|
|
8
|
+
'TrueSheetContentViewComponentDescriptor',
|
|
9
|
+
'TrueSheetFooterViewComponentDescriptor',
|
|
10
|
+
],
|
|
11
|
+
cmakeListsPath: '../android/src/main/jni/CMakeLists.txt',
|
|
12
|
+
},
|
|
6
13
|
},
|
|
7
14
|
},
|
|
8
15
|
dependencies: {
|
|
@@ -14,4 +21,4 @@ module.exports = {
|
|
|
14
21
|
},
|
|
15
22
|
},
|
|
16
23
|
},
|
|
17
|
-
}
|
|
24
|
+
};
|