@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,71 @@
|
|
|
1
|
+
export type TrueSheetActionType = {
|
|
2
|
+
type: 'PUSH';
|
|
3
|
+
payload: {
|
|
4
|
+
name: string;
|
|
5
|
+
params?: object;
|
|
6
|
+
};
|
|
7
|
+
source?: string;
|
|
8
|
+
target?: string;
|
|
9
|
+
} | {
|
|
10
|
+
type: 'POP';
|
|
11
|
+
payload: {
|
|
12
|
+
count: number;
|
|
13
|
+
};
|
|
14
|
+
source?: string;
|
|
15
|
+
target?: string;
|
|
16
|
+
} | {
|
|
17
|
+
type: 'POP_TO';
|
|
18
|
+
payload: {
|
|
19
|
+
name: string;
|
|
20
|
+
params?: object;
|
|
21
|
+
merge?: boolean;
|
|
22
|
+
};
|
|
23
|
+
source?: string;
|
|
24
|
+
target?: string;
|
|
25
|
+
} | {
|
|
26
|
+
type: 'POP_TO_TOP';
|
|
27
|
+
source?: string;
|
|
28
|
+
target?: string;
|
|
29
|
+
} | {
|
|
30
|
+
type: 'REPLACE';
|
|
31
|
+
payload: {
|
|
32
|
+
name: string;
|
|
33
|
+
params?: object;
|
|
34
|
+
};
|
|
35
|
+
source?: string;
|
|
36
|
+
target?: string;
|
|
37
|
+
} | {
|
|
38
|
+
type: 'GO_BACK';
|
|
39
|
+
source?: string;
|
|
40
|
+
target?: string;
|
|
41
|
+
} | {
|
|
42
|
+
type: 'RESIZE';
|
|
43
|
+
index: number;
|
|
44
|
+
source?: string;
|
|
45
|
+
target?: string;
|
|
46
|
+
} | {
|
|
47
|
+
type: 'DISMISS';
|
|
48
|
+
source?: string;
|
|
49
|
+
target?: string;
|
|
50
|
+
} | {
|
|
51
|
+
type: 'REMOVE';
|
|
52
|
+
source?: string;
|
|
53
|
+
target?: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Action creators for the TrueSheet navigator.
|
|
57
|
+
* Plain objects matching `StackActions` shapes, plus sheet-specific actions.
|
|
58
|
+
*/
|
|
59
|
+
export declare const TrueSheetActions: {
|
|
60
|
+
push: (name: string, params?: object) => TrueSheetActionType;
|
|
61
|
+
pop: (count?: number) => TrueSheetActionType;
|
|
62
|
+
popTo: (name: string, params?: object, options?: {
|
|
63
|
+
merge?: boolean;
|
|
64
|
+
}) => TrueSheetActionType;
|
|
65
|
+
popToTop: () => TrueSheetActionType;
|
|
66
|
+
replace: (name: string, params?: object) => TrueSheetActionType;
|
|
67
|
+
resize: (index: number) => TrueSheetActionType;
|
|
68
|
+
dismiss: () => TrueSheetActionType;
|
|
69
|
+
remove: () => TrueSheetActionType;
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/navigation/actions.ts"],"names":[],"mappings":"AAAA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E,IAAI,EAAE,SAAS,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GACD;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEN;;;GAGG;AACH,eAAO,MAAM,gBAAgB;iBACd,MAAM,WAAW,MAAM,KAAG,mBAAmB;kBAI7C,MAAM,KAAO,mBAAmB;kBAI/B,MAAM,WAAW,MAAM,YAAY;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,KAAG,mBAAmB;oBAI5E,mBAAmB;oBACjB,MAAM,WAAW,MAAM,KAAG,mBAAmB;oBAI7C,MAAM,KAAG,mBAAmB;mBAC/B,mBAAmB;kBACpB,mBAAmB;CAChC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base navigation types for the React Navigation entry point.
|
|
3
|
+
*
|
|
4
|
+
* The Expo Router entry has its own copy sourced from `expo-router/react-navigation`
|
|
5
|
+
* (see `./expo-router/base-types`) because Expo Router apps never install
|
|
6
|
+
* `@react-navigation/*` — importing it there would silently resolve to `any`.
|
|
7
|
+
*/
|
|
8
|
+
export type { DefaultNavigatorOptions, Descriptor, NavigationAction, NavigationHelpers, NavigationProp, NavigationState, ParamListBase, RouteProp, Router, StackActionHelpers, StackRouterOptions, } from '@react-navigation/core';
|
|
9
|
+
//# sourceMappingURL=base-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-types.d.ts","sourceRoot":"","sources":["../../../../src/navigation/base-types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,YAAY,EACV,uBAAuB,EACvB,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,aAAa,EACb,SAAS,EACT,MAAM,EACN,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { TrueSheetRouter, TrueSheetRouterFactory, TrueSheetRouterOptions } from './types';
|
|
2
|
+
export declare const createTrueSheetRouter: (stackRouter: TrueSheetRouterFactory) => (routerOptions: TrueSheetRouterOptions) => TrueSheetRouter;
|
|
3
|
+
//# sourceMappingURL=createTrueSheetRouter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createTrueSheetRouter.d.ts","sourceRoot":"","sources":["../../../../src/navigation/createTrueSheetRouter.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAgC/F,eAAO,MAAM,qBAAqB,GAC/B,aAAa,sBAAsB,MACnC,eAAe,sBAAsB,KAAG,eA8JxC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base navigation types for the Expo Router entry point.
|
|
3
|
+
*
|
|
4
|
+
* Sourced from Expo Router's vendored React Navigation so apps that only install
|
|
5
|
+
* `expo-router` still get real types — see `../base-types` for the React Navigation copy.
|
|
6
|
+
*/
|
|
7
|
+
export type { DefaultNavigatorOptions, NavigationAction, NavigationHelpers, NavigationProp, NavigationState, ParamListBase, RouteProp, Router, StackActionHelpers, StackRouterOptions, } from 'expo-router/react-navigation';
|
|
8
|
+
//# sourceMappingURL=base-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base-types.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/expo-router/base-types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,YAAY,EACV,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,aAAa,EACb,SAAS,EACT,MAAM,EACN,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ParamListBase } from './base-types';
|
|
2
|
+
import type { TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetNavigatorContentExtraProps, TrueSheetNavigatorProps, TrueSheetStandardEventMap } from './types';
|
|
3
|
+
declare const SheetNavigator: import("react").ForwardRefExoticComponent<Omit<import("expo-router/build/standard-navigation/types").StandardRouterNavigatorProps<TrueSheetNavigationState<ParamListBase>, TrueSheetNavigationOptions, TrueSheetStandardEventMap, TrueSheetNavigatorContentExtraProps, import("expo-router").StackRouterOptions>, "children"> & Partial<Pick<import("expo-router/build/standard-navigation/types").StandardRouterNavigatorProps<TrueSheetNavigationState<ParamListBase>, TrueSheetNavigationOptions, TrueSheetStandardEventMap, TrueSheetNavigatorContentExtraProps, import("expo-router").StackRouterOptions>, "children">> & import("react").RefAttributes<unknown>> & {
|
|
4
|
+
Screen: (props: import("expo-router").ScreenProps<TrueSheetNavigationOptions, TrueSheetNavigationState<ParamListBase>, TrueSheetStandardEventMap & import("expo-router/react-navigation").EventMapBase>) => null;
|
|
5
|
+
Protected: typeof import("expo-router/build/views/Protected").Protected;
|
|
6
|
+
};
|
|
7
|
+
type SheetProps = Omit<React.ComponentProps<typeof SheetNavigator>, 'screenListeners' | 'routes' | 'dispatch'> & Partial<Pick<React.ComponentProps<typeof SheetNavigator>, 'routes' | 'dispatch'>> & Pick<TrueSheetNavigatorProps, 'screenListeners'>;
|
|
8
|
+
/**
|
|
9
|
+
* TrueSheet navigator layout for Expo Router.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* // app/sheet/_layout.tsx
|
|
14
|
+
* import { Sheet } from '@lodev09/react-native-true-sheet/navigation/expo-router';
|
|
15
|
+
*
|
|
16
|
+
* export default function SheetLayout() {
|
|
17
|
+
* return (
|
|
18
|
+
* <Sheet initialRouteName="(home)">
|
|
19
|
+
* <Sheet.Screen name="details" options={{ detents: [0.5, 1] }} />
|
|
20
|
+
* </Sheet>
|
|
21
|
+
* );
|
|
22
|
+
* }
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare const Sheet: React.ComponentType<SheetProps> & {
|
|
26
|
+
Screen: typeof SheetNavigator.Screen;
|
|
27
|
+
Protected: typeof SheetNavigator.Protected;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Hook to access TrueSheet navigation with the resize helper.
|
|
31
|
+
* Built on expo-router's `useNavigation`.
|
|
32
|
+
*/
|
|
33
|
+
export declare const useTrueSheetNavigation: <T extends ParamListBase = ParamListBase>() => TrueSheetNavigationProp<T>;
|
|
34
|
+
export { TrueSheetActions, type TrueSheetActionType } from '../actions';
|
|
35
|
+
export type { DetentInfoEventPayload, PositionChangeEventPayload } from '../../TrueSheet.types';
|
|
36
|
+
export type { TrueSheetNavigationEventMap, TrueSheetNavigationHelpers, TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetScreenProps, } from './types';
|
|
37
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/expo-router/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAEV,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACxB,mCAAmC,EACnC,uBAAuB,EAGvB,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AASjB,QAAA,MAAM,cAAc;;;CAWlB,CAAC;AAMH,KAAK,UAAU,GAAG,IAAI,CACpB,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,EAC3C,iBAAiB,GAAG,QAAQ,GAAG,UAAU,CAC1C,GACC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC,CAAC,GACjF,IAAI,CAAC,uBAAuB,EAAE,iBAAiB,CAAC,CAAC;AAEnD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,KAAK,EAAqB,KAAK,CAAC,aAAa,CAAC,UAAU,CAAC,GAAG;IACvE,MAAM,EAAE,OAAO,cAAc,CAAC,MAAM,CAAC;IACrC,SAAS,EAAE,OAAO,cAAc,CAAC,SAAS,CAAC;CAC5C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,GACjC,CAAC,SAAS,aAAa,GAAG,aAAa,OACpC,uBAAuB,CAAC,CAAC,CAAgD,CAAC;AAE/E,OAAO,EAAE,gBAAgB,EAAE,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAExE,YAAY,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,uBAAuB,CAAC;AAEhG,YAAY,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Expo Router flavour of `../types`: same shapes, but bound to Expo Router's
|
|
3
|
+
* vendored React Navigation types so apps that only install `expo-router` still
|
|
4
|
+
* get real types instead of `any` — see `./base-types`.
|
|
5
|
+
*/
|
|
6
|
+
import type { TrueSheetActionType } from '../actions';
|
|
7
|
+
import type { TrueSheetActionHelpersOf, TrueSheetDispatch, TrueSheetNavigationEventMap, TrueSheetNavigationOptions, TrueSheetStateOf } from '../types';
|
|
8
|
+
import type { DefaultNavigatorOptions, NavigationAction, NavigationHelpers, NavigationProp, NavigationState, ParamListBase, RouteProp, Router, StackActionHelpers, StackRouterOptions } from './base-types';
|
|
9
|
+
export type TrueSheetRouterOptions = StackRouterOptions;
|
|
10
|
+
export type TrueSheetNavigationState<ParamList extends ParamListBase> = TrueSheetStateOf<NavigationState<ParamList>>;
|
|
11
|
+
export type TrueSheetRouterState = TrueSheetNavigationState<ParamListBase>;
|
|
12
|
+
export type TrueSheetRouter = Router<TrueSheetRouterState, TrueSheetActionType>;
|
|
13
|
+
export type TrueSheetRouterFactory = (options: TrueSheetRouterOptions) => TrueSheetRouter;
|
|
14
|
+
/**
|
|
15
|
+
* The base `StackRouter` factory to wrap — see `../types` for the shared contract.
|
|
16
|
+
*/
|
|
17
|
+
export type StackRouterFactory = <State extends NavigationState<ParamListBase>, Action extends NavigationAction>(options: TrueSheetRouterOptions) => Router<State, Action>;
|
|
18
|
+
export type TrueSheetRoute = TrueSheetNavigationState<ParamListBase>['routes'][number];
|
|
19
|
+
/**
|
|
20
|
+
* Props injected into the navigator content by Expo Router's `createProps`.
|
|
21
|
+
* Raw routes carry the custom fields (`closing`, `resizeIndex`, `resizeKey`)
|
|
22
|
+
* that the standard state strips out.
|
|
23
|
+
*/
|
|
24
|
+
export interface TrueSheetNavigatorContentExtraProps {
|
|
25
|
+
routes: TrueSheetRoute[];
|
|
26
|
+
dispatch: TrueSheetDispatch;
|
|
27
|
+
}
|
|
28
|
+
export type TrueSheetActionHelpers<ParamList extends ParamListBase> = TrueSheetActionHelpersOf<StackActionHelpers<ParamList>>;
|
|
29
|
+
export type TrueSheetNavigationProp<ParamList extends ParamListBase, RouteName extends keyof ParamList = string, NavigatorID extends string | undefined = undefined> = NavigationProp<ParamList, RouteName, NavigatorID, TrueSheetNavigationState<ParamList>, TrueSheetNavigationOptions, TrueSheetNavigationEventMap> & TrueSheetActionHelpers<ParamList>;
|
|
30
|
+
export type TrueSheetScreenProps<ParamList extends ParamListBase, RouteName extends keyof ParamList = string, NavigatorID extends string | undefined = undefined> = {
|
|
31
|
+
navigation: TrueSheetNavigationProp<ParamList, RouteName, NavigatorID>;
|
|
32
|
+
route: RouteProp<ParamList, RouteName>;
|
|
33
|
+
};
|
|
34
|
+
export type TrueSheetNavigationHelpers = NavigationHelpers<ParamListBase, TrueSheetNavigationEventMap>;
|
|
35
|
+
export type TrueSheetNavigatorProps = DefaultNavigatorOptions<ParamListBase, string | undefined, TrueSheetNavigationState<ParamListBase>, TrueSheetNavigationOptions, TrueSheetNavigationEventMap, unknown> & {
|
|
36
|
+
/**
|
|
37
|
+
* The name of the route to use as the base screen.
|
|
38
|
+
* This screen will be rendered as a regular screen, while other screens are presented as sheets.
|
|
39
|
+
* Defaults to the first screen defined in the navigator.
|
|
40
|
+
*/
|
|
41
|
+
initialRouteName?: string;
|
|
42
|
+
};
|
|
43
|
+
export type { PositionChangeHandler, TrueSheetDispatch, TrueSheetNavigationEventMap, TrueSheetNavigationOptions, TrueSheetNavigationSheetProps, TrueSheetStandardEventMap, } from '../types';
|
|
44
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/expo-router/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EACjB,2BAA2B,EAC3B,0BAA0B,EAC1B,gBAAgB,EACjB,MAAM,UAAU,CAAC;AAClB,OAAO,KAAK,EACV,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,aAAa,EACb,SAAS,EACT,MAAM,EACN,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,sBAAsB,GAAG,kBAAkB,CAAC;AAExD,MAAM,MAAM,wBAAwB,CAAC,SAAS,SAAS,aAAa,IAAI,gBAAgB,CACtF,eAAe,CAAC,SAAS,CAAC,CAC3B,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,wBAAwB,CAAC,aAAa,CAAC,CAAC;AAE3E,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,oBAAoB,EAAE,mBAAmB,CAAC,CAAC;AAEhF,MAA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AAa,EACb,2BAA2B,CAC5B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,uBAAuB,CAC3D,aAAa,EACb,MAAM,GAAG,SAAS,EAClB,wBAAwB,CAAC,aAAa,CAAC,EACvC,0BAA0B,EAC1B,2BAA2B,EAC3B,OAAO,CACR,GAAG;IACF;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,YAAY,EACV,qBAAqB,EACrB,iBAAiB,EACjB,2BAA2B,EAC3B,0BAA0B,EAC1B,6BAA6B,EAC7B,yBAAyB,GAC1B,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { type StandardNavigationTypeBagBase } from '@react-navigation/native';
|
|
2
|
+
import type { TrueSheetActionHelpers, TrueSheetNavigationOptions, TrueSheetNavigationEventMap, TrueSheetNavigationState, TrueSheetRouterOptions } from './types';
|
|
3
|
+
export interface TrueSheetNavigationTypeBag extends StandardNavigationTypeBagBase {
|
|
4
|
+
State: TrueSheetNavigationState<this['ParamList']>;
|
|
5
|
+
ActionHelpers: TrueSheetActionHelpers<this['ParamList']>;
|
|
6
|
+
ScreenOptions: TrueSheetNavigationOptions;
|
|
7
|
+
EventMap: TrueSheetNavigationEventMap;
|
|
8
|
+
RouterOptions: TrueSheetRouterOptions;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Creates a TrueSheet navigator.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const Sheet = createTrueSheetNavigator();
|
|
16
|
+
*
|
|
17
|
+
* function App() {
|
|
18
|
+
* return (
|
|
19
|
+
* <Sheet.Navigator>
|
|
20
|
+
* <Sheet.Screen name="Home" component={HomeScreen} />
|
|
21
|
+
* <Sheet.Screen
|
|
22
|
+
* name="Details"
|
|
23
|
+
* component={DetailsSheet}
|
|
24
|
+
* options={{ detents: [0.5, 1] }}
|
|
25
|
+
* />
|
|
26
|
+
* </Sheet.Navigator>
|
|
27
|
+
* );
|
|
28
|
+
* }
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare const createTrueSheetNavigator: import("@react-navigation/native").StandardNavigationCreateNavigator<TrueSheetNavigationTypeBag, {}>;
|
|
32
|
+
/**
|
|
33
|
+
* Creates a screen configuration for the static API.
|
|
34
|
+
*/
|
|
35
|
+
export declare const createTrueSheetScreen: import("@react-navigation/core").StaticScreenFactory<TrueSheetNavigationTypeBag & {
|
|
36
|
+
ParamList: import("@react-navigation/routers").ParamListBase;
|
|
37
|
+
NavigatorID: string | undefined;
|
|
38
|
+
Navigator: import("react").ComponentType<{}>;
|
|
39
|
+
}>;
|
|
40
|
+
export { TrueSheetActions, type TrueSheetActionType } from './actions';
|
|
41
|
+
export { createTrueSheetRouter } from './createTrueSheetRouter';
|
|
42
|
+
export { useTrueSheetNavigation } from './useTrueSheetNavigation';
|
|
43
|
+
export type { DetentInfoEventPayload, PositionChangeEventPayload } from '../TrueSheet.types';
|
|
44
|
+
export type { StackRouterFactory, TrueSheetNavigationEventMap, TrueSheetNavigationHelpers, TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetRouterOptions, TrueSheetScreenProps, } from './types';
|
|
45
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/navigation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,6BAA6B,EACnC,MAAM,0BAA0B,CAAC;AAIlC,OAAO,KAAK,EAEV,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,wBAAwB,EAExB,sBAAsB,EACvB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,0BAA2B,SAAQ,6BAA6B;IAC/E,KAAK,EAAE,wBAAwB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IACnD,aAAa,EAAE,sBAAsB,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IACzD,aAAa,EAAE,0BAA0B,CAAC;IAC1C,QAAQ,EAAE,2BAA2B,CAAC;IACtC,aAAa,EAAE,sBAAsB,CAAC;CACvC;AAYD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,wBAAwB,sGAAkB,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;EAAe,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAE,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,YAAY,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAE7F,YAAY,EACV,kBAAkB,EAClB,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACxB,sBAAsB,EACtB,oBAAoB,GACrB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { TrueSheetNavigationOptions, TrueSheetNavigatorContentExtraProps, TrueSheetStandardEventMap } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Framework-agnostic TrueSheet navigator.
|
|
4
|
+
* Wired into React Navigation via `./index` and Expo Router via `./expo-router`.
|
|
5
|
+
*/
|
|
6
|
+
export declare const trueSheetNavigator: import("standard-navigation").StandardNavigator<TrueSheetNavigationOptions, TrueSheetStandardEventMap, TrueSheetNavigatorContentExtraProps>;
|
|
7
|
+
//# sourceMappingURL=navigator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigator.d.ts","sourceRoot":"","sources":["../../../../src/navigation/navigator.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,0BAA0B,EAC1B,mCAAmC,EACnC,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AAEjB;;;GAGG;AACH,eAAO,MAAM,kBAAkB,6IAIH,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { TrueSheetScreenProps } from './types';
|
|
2
|
+
export declare const ReanimatedTrueSheetScreen: ({ detentIndex, resizeKey, dispatch, emit, routeKey, closing, detents, children, positionChangeHandler, ...sheetProps }: TrueSheetScreenProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=ReanimatedTrueSheetScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReanimatedTrueSheetScreen.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/screen/ReanimatedTrueSheetScreen.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAKpD,eAAO,MAAM,yBAAyB,GAAI,wHAWvC,oBAAoB,4CAsCtB,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { TrueSheetScreenProps } from './types';
|
|
2
|
+
export declare const TrueSheetScreen: ({ detentIndex, resizeKey, dispatch, emit, routeKey, closing, detents, children, positionChangeHandler, ...sheetProps }: TrueSheetScreenProps) => import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=TrueSheetScreen.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrueSheetScreen.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/screen/TrueSheetScreen.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAGpD,eAAO,MAAM,eAAe,GAAI,wHAW7B,oBAAoB,4CAmCtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/screen/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { TrueSheetProps } from '../../TrueSheet.types';
|
|
2
|
+
import type { PositionChangeHandler, TrueSheetDispatch, TrueSheetEmitFn, TrueSheetNavigationSheetProps } from '../types';
|
|
3
|
+
export interface TrueSheetScreenProps extends TrueSheetNavigationSheetProps {
|
|
4
|
+
detentIndex: number;
|
|
5
|
+
resizeKey?: number;
|
|
6
|
+
dispatch: TrueSheetDispatch;
|
|
7
|
+
emit: TrueSheetEmitFn;
|
|
8
|
+
routeKey: string;
|
|
9
|
+
closing?: boolean;
|
|
10
|
+
detents: TrueSheetProps['detents'];
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
positionChangeHandler?: PositionChangeHandler;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/screen/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EACV,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,6BAA6B,EAC9B,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,oBAAqB,SAAQ,6BAA6B;IACzE,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,cAAc,CAAC,SAAS,CAAC,CAAC;IACnC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;CAC/C"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { TrueSheet } from '../../TrueSheet';
|
|
2
|
+
import type { DetentChangeEvent, DetentInfoEventPayload, DidBlurEvent, DidFocusEvent, DidPresentEvent, DragBeginEvent, DragChangeEvent, DragEndEvent, PositionChangeEvent, PositionChangeEventPayload, WillBlurEvent, WillDismissEvent, DismissAttemptEvent, WillFocusEvent, WillPresentEvent } from '../../TrueSheet.types';
|
|
3
|
+
import type { TrueSheetDispatch, TrueSheetEmitFn, TrueSheetNavigationEventMap } from '../types';
|
|
4
|
+
interface UseSheetScreenStateProps {
|
|
5
|
+
detentIndex: number;
|
|
6
|
+
resizeKey?: number;
|
|
7
|
+
closing?: boolean;
|
|
8
|
+
dispatch: TrueSheetDispatch;
|
|
9
|
+
routeKey: string;
|
|
10
|
+
emit: TrueSheetEmitFn;
|
|
11
|
+
}
|
|
12
|
+
export declare const useSheetScreenState: (props: UseSheetScreenStateProps) => {
|
|
13
|
+
ref: import("react").RefObject<TrueSheet | null>;
|
|
14
|
+
initialDetentIndex: number;
|
|
15
|
+
emitEvent: (type: keyof TrueSheetNavigationEventMap, data: DetentInfoEventPayload | PositionChangeEventPayload | undefined) => void;
|
|
16
|
+
eventHandlers: {
|
|
17
|
+
onWillPresent: (e: WillPresentEvent) => void;
|
|
18
|
+
onDidPresent: (e: DidPresentEvent) => void;
|
|
19
|
+
onWillDismiss: (_e: WillDismissEvent) => void;
|
|
20
|
+
onDidDismiss: () => void;
|
|
21
|
+
onDismissAttempt: (_e: DismissAttemptEvent) => void;
|
|
22
|
+
onDetentChange: (e: DetentChangeEvent) => void;
|
|
23
|
+
onDragBegin: (e: DragBeginEvent) => void;
|
|
24
|
+
onDragChange: (e: DragChangeEvent) => void;
|
|
25
|
+
onDragEnd: (e: DragEndEvent) => void;
|
|
26
|
+
onPositionChange: (e: PositionChangeEvent) => void;
|
|
27
|
+
onWillFocus: (_e: WillFocusEvent) => void;
|
|
28
|
+
onDidFocus: (_e: DidFocusEvent) => void;
|
|
29
|
+
onWillBlur: (_e: WillBlurEvent) => void;
|
|
30
|
+
onDidBlur: (_e: DidBlurEvent) => void;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=useSheetScreenState.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSheetScreenState.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/screen/useSheetScreenState.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,KAAK,EACV,iBAAiB,EACjB,sBAAsB,EACtB,YAAY,EACZ,aAAa,EACb,eAAe,EACf,cAAc,EACd,eAAe,EACf,YAAY,EACZ,mBAAmB,EACnB,0BAA0B,EAC1B,aAAa,EACb,gBAAgB,EAChB,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EACjB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAGhG,UAAU,wBAAwB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,iBAAiB,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,eAAe,CAAC;CACvB;AAED,eAAO,MAAM,mBAAmB,GAAI,OAAO,wBAAwB;;;sBAyBvD,MAAM,2BAA2B,QACjC,sBAAsB,GAAG,0BAA0B,GAAG,SAAS;;2BAmBlD,gBAAgB;0BACjB,eAAe;4BACb,gBAAgB;;+BAEb,mBAAmB;4BACtB,iBAAiB;yBACpB,cAAc;0BACb,eAAe;uBAClB,YAAY;8BACL,mBAAmB;0BACvB,cAAc;yBACf,aAAa;yBACb,aAAa;wBACd,YAAY;;CAWjC,CAAC"}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import type { NavigatorArgs } from 'standard-navigation';
|
|
2
|
+
import type { DetentInfoEventPayload, PositionChangeEventPayload, TrueSheetProps } from '../TrueSheet.types';
|
|
3
|
+
import type { TrueSheetActionType } from './actions';
|
|
4
|
+
import type { DefaultNavigatorOptions, Descriptor, NavigationAction, NavigationHelpers, NavigationProp, NavigationState, ParamListBase, RouteProp, Router, StackActionHelpers, StackRouterOptions } from './base-types';
|
|
5
|
+
export type PositionChangeHandler = (payload: PositionChangeEventPayload) => void;
|
|
6
|
+
export type TrueSheetNavigationEventMap = {
|
|
7
|
+
/**
|
|
8
|
+
* Event fired when the sheet is about to be presented.
|
|
9
|
+
*/
|
|
10
|
+
sheetWillPresent: {
|
|
11
|
+
data: DetentInfoEventPayload;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Event fired when the sheet has been presented.
|
|
15
|
+
*/
|
|
16
|
+
sheetDidPresent: {
|
|
17
|
+
data: DetentInfoEventPayload;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Event fired when the sheet is about to be dismissed.
|
|
21
|
+
*/
|
|
22
|
+
sheetWillDismiss: {
|
|
23
|
+
data: undefined;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Event fired when the sheet has been dismissed.
|
|
27
|
+
*/
|
|
28
|
+
sheetDidDismiss: {
|
|
29
|
+
data: undefined;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Event fired when the user tries to dismiss a non-dismissible sheet.
|
|
33
|
+
*/
|
|
34
|
+
sheetDismissAttempt: {
|
|
35
|
+
data: undefined;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Event fired when the sheet's detent changes.
|
|
39
|
+
*/
|
|
40
|
+
sheetDetentChange: {
|
|
41
|
+
data: DetentInfoEventPayload;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Event fired when the user starts dragging the sheet.
|
|
45
|
+
*/
|
|
46
|
+
sheetDragBegin: {
|
|
47
|
+
data: DetentInfoEventPayload;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Event fired while the user is dragging the sheet.
|
|
51
|
+
*/
|
|
52
|
+
sheetDragChange: {
|
|
53
|
+
data: DetentInfoEventPayload;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Event fired when the user stops dragging the sheet.
|
|
57
|
+
*/
|
|
58
|
+
sheetDragEnd: {
|
|
59
|
+
data: DetentInfoEventPayload;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Event fired when the sheet's position changes.
|
|
63
|
+
*/
|
|
64
|
+
sheetPositionChange: {
|
|
65
|
+
data: PositionChangeEventPayload;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Event fired when the sheet is about to regain focus.
|
|
69
|
+
*/
|
|
70
|
+
sheetWillFocus: {
|
|
71
|
+
data: undefined;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Event fired when the sheet regains focus.
|
|
75
|
+
*/
|
|
76
|
+
sheetDidFocus: {
|
|
77
|
+
data: undefined;
|
|
78
|
+
};
|
|
79
|
+
/**
|
|
80
|
+
* Event fired when the sheet is about to lose focus.
|
|
81
|
+
*/
|
|
82
|
+
sheetWillBlur: {
|
|
83
|
+
data: undefined;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Event fired when the sheet loses focus.
|
|
87
|
+
*/
|
|
88
|
+
sheetDidBlur: {
|
|
89
|
+
data: undefined;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* A navigation state tagged as `true-sheet`, with the sheet fields the router
|
|
94
|
+
* adds to each route.
|
|
95
|
+
* Generic over the base state so each entry point can bind its own
|
|
96
|
+
* `NavigationState` — see `./base-types`.
|
|
97
|
+
*/
|
|
98
|
+
export type TrueSheetStateOf<State extends {
|
|
99
|
+
routes: readonly unknown[];
|
|
100
|
+
}> = Omit<State, 'routes'> & {
|
|
101
|
+
type: 'true-sheet';
|
|
102
|
+
routes: (State['routes'][number] & {
|
|
103
|
+
resizeIndex?: number;
|
|
104
|
+
resizeKey?: number;
|
|
105
|
+
closing?: boolean;
|
|
106
|
+
})[];
|
|
107
|
+
};
|
|
108
|
+
export type TrueSheetNavigationState<ParamList extends ParamListBase> = TrueSheetStateOf<NavigationState<ParamList>>;
|
|
109
|
+
export type TrueSheetRouterState = TrueSheetNavigationState<ParamListBase>;
|
|
110
|
+
export type TrueSheetRouterOptions = StackRouterOptions;
|
|
111
|
+
export type TrueSheetRouter = Router<TrueSheetRouterState, TrueSheetActionType>;
|
|
112
|
+
/**
|
|
113
|
+
* The wrapped router factory — also the shape `createTrueSheetRouter` accepts,
|
|
114
|
+
* pre-instantiated so either entry point's `StackRouterFactory` fits it.
|
|
115
|
+
*/
|
|
116
|
+
export type TrueSheetRouterFactory = (options: TrueSheetRouterOptions) => TrueSheetRouter;
|
|
117
|
+
/**
|
|
118
|
+
* The base `StackRouter` factory to wrap, typed generically over the state and
|
|
119
|
+
* action types the wrapper threads through — `StackRouter` is structural and
|
|
120
|
+
* never touches the sheet-specific fields.
|
|
121
|
+
* Injected by each entry point so the shared router never imports
|
|
122
|
+
* `@react-navigation/*` at runtime (Expo Router apps don't install it).
|
|
123
|
+
*/
|
|
124
|
+
export type StackRouterFactory = <State extends NavigationState<ParamListBase>, Action extends NavigationAction>(options: TrueSheetRouterOptions) => Router<State, Action>;
|
|
125
|
+
/**
|
|
126
|
+
* `TrueSheetNavigationEventMap` in the `standard-navigation` event-map shape.
|
|
127
|
+
*/
|
|
128
|
+
export type TrueSheetStandardEventMap = {
|
|
129
|
+
[K in keyof TrueSheetNavigationEventMap]: {
|
|
130
|
+
data: TrueSheetNavigationEventMap[K]['data'];
|
|
131
|
+
canPreventDefault: false;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
export type TrueSheetRoute = TrueSheetNavigationState<ParamListBase>['routes'][number];
|
|
135
|
+
export type TrueSheetDispatch = (action: TrueSheetActionType) => void;
|
|
136
|
+
export type TrueSheetEmitFn = NavigatorArgs<TrueSheetNavigationOptions, TrueSheetStandardEventMap>['emitter']['emit'];
|
|
137
|
+
/**
|
|
138
|
+
* Props injected into the navigator content by each adapter
|
|
139
|
+
* (React Navigation's `mapper` / Expo Router's `createProps`).
|
|
140
|
+
* Raw routes carry the custom fields (`closing`, `resizeIndex`, `resizeKey`)
|
|
141
|
+
* that the standard state strips out.
|
|
142
|
+
*/
|
|
143
|
+
export interface TrueSheetNavigatorContentExtraProps {
|
|
144
|
+
routes: TrueSheetRoute[];
|
|
145
|
+
dispatch: TrueSheetDispatch;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Generic over the base helpers so each entry point can bind its own
|
|
149
|
+
* `StackActionHelpers` — see `./base-types`.
|
|
150
|
+
*/
|
|
151
|
+
export type TrueSheetActionHelpersOf<Helpers> = Helpers & {
|
|
152
|
+
/**
|
|
153
|
+
* Resize the sheet to a specific detent index.
|
|
154
|
+
*/
|
|
155
|
+
resize(index?: number): void;
|
|
156
|
+
};
|
|
157
|
+
export type TrueSheetActionHelpers<ParamList extends ParamListBase> = TrueSheetActionHelpersOf<StackActionHelpers<ParamList>>;
|
|
158
|
+
export type TrueSheetNavigationProp<ParamList extends ParamListBase, RouteName extends keyof ParamList = string, NavigatorID extends string | undefined = undefined> = NavigationProp<ParamList, RouteName, NavigatorID, TrueSheetNavigationState<ParamList>, TrueSheetNavigationOptions, TrueSheetNavigationEventMap> & TrueSheetActionHelpers<ParamList>;
|
|
159
|
+
export type TrueSheetScreenProps<ParamList extends ParamListBase, RouteName extends keyof ParamList = string, NavigatorID extends string | undefined = undefined> = {
|
|
160
|
+
navigation: TrueSheetNavigationProp<ParamList, RouteName, NavigatorID>;
|
|
161
|
+
route: RouteProp<ParamList, RouteName>;
|
|
162
|
+
};
|
|
163
|
+
export type TrueSheetNavigationHelpers = NavigationHelpers<ParamListBase, TrueSheetNavigationEventMap>;
|
|
164
|
+
export type TrueSheetNavigationSheetProps = Pick<TrueSheetProps, 'detents' | 'backgroundColor' | 'cornerRadius' | 'dismissible' | 'draggable' | 'grabber' | 'grabberOptions' | 'accessibilityOptions' | 'dimmed' | 'dimmedDetentIndex' | 'backgroundBlur' | 'blurOptions' | 'maxContentHeight' | 'maxContentWidth' | 'presentation' | 'style' | 'header' | 'headerStyle' | 'headerOptions' | 'footer' | 'footerStyle' | 'footerOptions' | 'scrollableRef' | 'scrollableOptions' | 'insetAdjustment' | 'anchor' | 'anchorOffset' | 'elevation' | 'detached' | 'detachedOffset'>;
|
|
165
|
+
/**
|
|
166
|
+
* Screen options for TrueSheet navigator screens.
|
|
167
|
+
*/
|
|
168
|
+
export type TrueSheetNavigationOptions = TrueSheetNavigationSheetProps & {
|
|
169
|
+
/**
|
|
170
|
+
* The detent index to present at.
|
|
171
|
+
* @default 0
|
|
172
|
+
*/
|
|
173
|
+
detentIndex?: number;
|
|
174
|
+
/**
|
|
175
|
+
* Use ReanimatedTrueSheet for this screen.
|
|
176
|
+
* Enables worklet-based `onPositionChange` events.
|
|
177
|
+
*
|
|
178
|
+
* @default false
|
|
179
|
+
*/
|
|
180
|
+
reanimated?: boolean;
|
|
181
|
+
/**
|
|
182
|
+
* A callback that receives position change events.
|
|
183
|
+
* When `reanimated` is enabled, this must be a worklet function.
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* ```tsx
|
|
187
|
+
* <Navigator.Screen
|
|
188
|
+
* name="Sheet"
|
|
189
|
+
* options={{
|
|
190
|
+
* reanimated: true,
|
|
191
|
+
* positionChangeHandler: (payload) => {
|
|
192
|
+
* 'worklet';
|
|
193
|
+
* animatedValue.value = payload.position;
|
|
194
|
+
* },
|
|
195
|
+
* }}
|
|
196
|
+
* />
|
|
197
|
+
* ```
|
|
198
|
+
*/
|
|
199
|
+
positionChangeHandler?: PositionChangeHandler;
|
|
200
|
+
};
|
|
201
|
+
export type TrueSheetNavigatorProps = DefaultNavigatorOptions<ParamListBase, string | undefined, TrueSheetNavigationState<ParamListBase>, TrueSheetNavigationOptions, TrueSheetNavigationEventMap, unknown> & {
|
|
202
|
+
/**
|
|
203
|
+
* The name of the route to use as the base screen.
|
|
204
|
+
* This screen will be rendered as a regular screen, while other screens are presented as sheets.
|
|
205
|
+
* Defaults to the first screen defined in the navigator.
|
|
206
|
+
*/
|
|
207
|
+
initialRouteName?: string;
|
|
208
|
+
};
|
|
209
|
+
export type TrueSheetDescriptor = Descriptor<TrueSheetNavigationOptions, TrueSheetNavigationProp<ParamListBase>, RouteProp<ParamListBase>>;
|
|
210
|
+
export type TrueSheetDescriptorMap = {
|
|
211
|
+
[key: string]: TrueSheetDescriptor;
|
|
212
|
+
};
|
|
213
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/navigation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,KAAK,EACV,sBAAsB,EACtB,0BAA0B,EAC1B,cAAc,EACf,MAAM,oBAAoB,CAAC;AAC5B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,KAAK,EACV,uBAAuB,EACvB,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,aAAa,EACb,SAAS,EACT,MAAM,EACN,kBAAkB,EAClB,kBAAkB,EACnB,MAAM,cAAc,CAAC;AAEtB,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,0BAA0B,KAAK,IAAI,CAAC;AAElF,MAAM,MAAM,2BAA2B,GAAG;IACxC;;OAEG;IACH,gBAAgB,EAAE;QAAE,IAAI,EAAE,sBAAsB,CAAA;KAAE,CAAC;IACnD;;OAEG;IACH,eAAe,EAAE;QA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,kBAAkB,GAClB,iBAAiB,GACjB,cAAc,GACd,OAAO,GACP,QAAQ,GACR,aAAa,GACb,eAAe,GACf,QAAQ,GACR,aAAa,GACb,eAAe,GACf,eAAe,GACf,mBAAmB,GACnB,iBAAiB,GACjB,QAAQ,GACR,cAAc,GACd,WAAW,GACX,UAAU,GACV,gBAAgB,CACnB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG,6BAA6B,GAAG;IACvE;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;;;;;;;;;;;;;;;OAiBG;IACH,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,uBAAuB,CAC3D,aAAa,EACb,MAAM,GAAG,SAAS,EAClB,wBAAwB,CAAC,aAAa,CAAC,EACvC,0BAA0B,EAC1B,2BAA2B,EAC3B,OAAO,CACR,GAAG;IACF;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,UAAU,CAC1C,0BAA0B,EAC1B,uBAAuB,CAAC,aAAa,CAAC,EACtC,SAAS,CAAC,aAAa,CAAC,CACzB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,CAAC,GAAG,EAAE,MAAM,GAAG,mBAAmB,CAAC;CACpC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { type ParamListBase } from '@react-navigation/native';
|
|
2
|
+
import type { TrueSheetNavigationProp } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Hook to access TrueSheet navigation with the resize helper.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* function MySheet() {
|
|
9
|
+
* const navigation = useTrueSheetNavigation();
|
|
10
|
+
*
|
|
11
|
+
* // Resize to a specific detent
|
|
12
|
+
* const handleExpand = () => {
|
|
13
|
+
* navigation.resize(1); // Resize to second detent
|
|
14
|
+
* };
|
|
15
|
+
*
|
|
16
|
+
* return (
|
|
17
|
+
* <Button title="Expand" onPress={handleExpand} />
|
|
18
|
+
* );
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare const useTrueSheetNavigation: <T extends ParamListBase = ParamListBase>() => TrueSheetNavigationProp<T>;
|
|
23
|
+
//# sourceMappingURL=useTrueSheetNavigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTrueSheetNavigation.d.ts","sourceRoot":"","sources":["../../../../src/navigation/useTrueSheetNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE7E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,sBAAsB,GACjC,CAAC,SAAS,aAAa,GAAG,aAAa,OACpC,uBAAuB,CAAC,CAAC,CAAgD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReanimatedTrueSheet.d.ts","sourceRoot":"","sources":["../../../../src/reanimated/ReanimatedTrueSheet.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAuB,MAAM,oBAAoB,CAAC;AAgB9E,UAAU,wBAAyB,SAAQ,cAAc;IACvD;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,cAAc,CAAC,kBAAkB,CAAC,CAAC;CACvD;AAKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"ReanimatedTrueSheet.d.ts","sourceRoot":"","sources":["../../../../src/reanimated/ReanimatedTrueSheet.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,KAAK,EAAE,cAAc,EAAuB,MAAM,oBAAoB,CAAC;AAgB9E,UAAU,wBAAyB,SAAQ,cAAc;IACvD;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,cAAc,CAAC,kBAAkB,CAAC,CAAC;CACvD;AAKD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,eAAO,MAAM,mBAAmB,gHA8B9B,CAAC"}
|