@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrueSheet.types.d.ts","sourceRoot":"","sources":["../../../src/TrueSheet.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TrueSheet.types.d.ts","sourceRoot":"","sources":["../../../src/TrueSheet.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,aAAa,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC/E,OAAO,KAAK,EACV,UAAU,EACV,oBAAoB,EACpB,SAAS,EACT,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AAEtB,MAAM,WAAW,sBAAsB;IACrC;;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AO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzE;;;;OAIG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnD;;;;OAIG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzD;;;;OAIG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9D;;OAEG;IACH,UAAU,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/C"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { TrueSheetMethods, TrueSheetProps, TrueSheetStaticMethods } from './TrueSheet.types';
|
|
2
|
+
declare const TrueSheetComponent: import("react").ForwardRefExoticComponent<TrueSheetProps & import("react").RefAttributes<TrueSheetMethods>>;
|
|
3
|
+
export declare const TrueSheet: typeof TrueSheetComponent & TrueSheetStaticMethods;
|
|
4
|
+
export {};
|
|
5
|
+
//# sourceMappingURL=TrueSheet.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrueSheet.web.d.ts","sourceRoot":"","sources":["../../../src/TrueSheet.web.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAaV,gBAAgB,EAChB,cAAc,EACd,sBAAsB,EAMvB,MAAM,mBAAmB,CAAC;AAiC3B,QAAA,MAAM,kBAAkB,6GAuxCtB,CAAC;AAsDH,eAAO,MAAM,SAAS,EAAyB,OAAO,kBAAkB,GAAG,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ViewProps } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Renders its children in a native layer above every presented sheet — for
|
|
4
|
+
* toasts, dialogs, and other content a sheet must not cover.
|
|
5
|
+
* Fills the window; touches that miss its children pass through to the views beneath.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TrueSheetOverlay: ({ style, ...rest }: ViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=TrueSheetOverlay.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrueSheetOverlay.d.ts","sourceRoot":"","sources":["../../../src/TrueSheetOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAI1D;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,oBAAoB,SAAS,4CAE7D,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ViewProps } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Renders its children in a layer above every presented sheet — for
|
|
4
|
+
* toasts, dialogs, and other content a sheet must not cover.
|
|
5
|
+
* Fills the window; touches that miss its children pass through to the views beneath.
|
|
6
|
+
*/
|
|
7
|
+
export declare const TrueSheetOverlay: ({ style, ...rest }: ViewProps) => import("react").ReactPortal | null;
|
|
8
|
+
//# sourceMappingURL=TrueSheetOverlay.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrueSheetOverlay.web.d.ts","sourceRoot":"","sources":["../../../src/TrueSheetOverlay.web.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAoB,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEhE;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,GAAI,oBAAoB,SAAS,uCAsB7D,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ViewProps } from 'react-native';
|
|
2
|
+
/**
|
|
3
|
+
* Wrapper component that marks its children as the sheet's peek content.
|
|
4
|
+
* When rendered within a `TrueSheet`, the `"peek"` detent reveals everything
|
|
5
|
+
* from the top of the sheet through the bottom of this component — content
|
|
6
|
+
* below it stays hidden until the sheet is expanded.
|
|
7
|
+
*/
|
|
8
|
+
export declare const TrueSheetPeek: (props: ViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=TrueSheetPeek.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrueSheetPeek.d.ts","sourceRoot":"","sources":["../../../src/TrueSheetPeek.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAI9C;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,SAAS,4CAAoD,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
|
+
import { View, type ViewProps } from 'react-native';
|
|
3
|
+
/**
|
|
4
|
+
* Reports the measured peek content height to the owning TrueSheet.
|
|
5
|
+
* @internal
|
|
6
|
+
*/
|
|
7
|
+
export interface TrueSheetPeekContextValue {
|
|
8
|
+
contentRef: RefObject<View | null>;
|
|
9
|
+
peekRef: RefObject<View | null>;
|
|
10
|
+
setPeekContentHeight: (height: number) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare const TrueSheetPeekContext: import("react").Context<TrueSheetPeekContextValue | null>;
|
|
13
|
+
/**
|
|
14
|
+
* Distance from the top of the content view to the bottom of the peek view,
|
|
15
|
+
* so the peek view's offset within the content (padding, views above it)
|
|
16
|
+
* counts toward the peek detent. Both rects live in the drawer's transformed
|
|
17
|
+
* subtree, so an in-flight translate cancels out of the delta.
|
|
18
|
+
* @internal
|
|
19
|
+
*/
|
|
20
|
+
export declare const measurePeekContentHeight: (peekElement: HTMLElement, contentElement: HTMLElement) => number;
|
|
21
|
+
/**
|
|
22
|
+
* Wrapper component that marks its children as the sheet's peek content.
|
|
23
|
+
* When rendered within a `TrueSheet`, the `"peek"` detent reveals everything
|
|
24
|
+
* from the top of the sheet through the bottom of this component — content
|
|
25
|
+
* below it stays hidden until the sheet is expanded.
|
|
26
|
+
*/
|
|
27
|
+
export declare const TrueSheetPeek: ({ onLayout, ...rest }: ViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
//# sourceMappingURL=TrueSheetPeek.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrueSheetPeek.web.d.ts","sourceRoot":"","sources":["../../../src/TrueSheetPeek.web.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,SAAS,EAAiC,MAAM,OAAO,CAAC;AACrF,OAAO,EAA0B,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAI5E;;;GAGG;AACH,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACnC,OAAO,EAAE,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IAChC,oBAAoB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAChD;AAED,eAAO,MAAM,oBAAoB,2DAAwD,CAAC;AAE1F;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,GACnC,aAAa,WAAW,EACxB,gBAAgB,WAAW,KAC1B,MACsF,CAAC;AAE1F;;;;;GAKG;AACH,eAAO,MAAM,aAAa,GAAI,uBAAuB,SAAS,4CA2B7D,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { TrueSheetStaticMethods } from './TrueSheet.types';
|
|
3
|
+
export type { TrueSheetStaticMethods };
|
|
4
|
+
export interface TrueSheetProviderProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Provider for TrueSheet on native platforms.
|
|
9
|
+
* This is a pass-through component - no context is needed on native
|
|
10
|
+
* since TrueSheet uses static instance methods internally.
|
|
11
|
+
*/
|
|
12
|
+
export declare function TrueSheetProvider({ children }: TrueSheetProviderProps): ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* Hook to control TrueSheet instances by name.
|
|
15
|
+
* On native, this maps directly to TrueSheet static methods.
|
|
16
|
+
*/
|
|
17
|
+
export declare function useTrueSheet(): TrueSheetStaticMethods;
|
|
18
|
+
//# sourceMappingURL=TrueSheetProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrueSheetProvider.d.ts","sourceRoot":"","sources":["../../../src/TrueSheetProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAEhE,YAAY,EAAE,sBAAsB,EAAE,CAAC;AAEvC,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,EAAE,sBAAsB,aAErE;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,sBAAsB,CAQrD"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ReactNode, type RefObject } from 'react';
|
|
2
|
+
import type { TrueSheetMethods, TrueSheetStaticMethods } from './TrueSheet.types';
|
|
3
|
+
type SheetRef = RefObject<TrueSheetMethods | null>;
|
|
4
|
+
type NodeRef = RefObject<HTMLDivElement | null>;
|
|
5
|
+
interface StackEntry {
|
|
6
|
+
ref: SheetRef;
|
|
7
|
+
nodeRef: NodeRef;
|
|
8
|
+
isFormSheetRef: RefObject<boolean>;
|
|
9
|
+
}
|
|
10
|
+
export interface TrueSheetProviderProps {
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare function TrueSheetProvider({ children }: TrueSheetProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare function usePortalContainer(): HTMLElement | null;
|
|
15
|
+
export declare function useTrueSheet(): TrueSheetStaticMethods;
|
|
16
|
+
export declare function useRegisterSheet(name: string | undefined, ref: SheetRef): void;
|
|
17
|
+
/**
|
|
18
|
+
* Registers the sheet in the open stack while `isOpen` is true and returns
|
|
19
|
+
* live data used by each sheet to render stacked visuals and dismiss children.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useSheetStack(ref: SheetRef, nodeRef: NodeRef, isOpen: boolean, isFormSheet: boolean): {
|
|
22
|
+
descendants: readonly StackEntry[];
|
|
23
|
+
isNested: boolean;
|
|
24
|
+
dismissAbove: (animated?: boolean) => Promise<void>;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
27
|
+
//# sourceMappingURL=TrueSheetProvider.web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrueSheetProvider.web.d.ts","sourceRoot":"","sources":["../../../src/TrueSheetProvider.web.tsx"],"names":[],"mappings":"AAAA,OAAO,EASL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAEf,OAAO,KAAK,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAElF,KAAK,QAAQ,GAAG,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;AACnD,KAAK,OAAO,GAAG,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;AAEhD,UAAU,UAAU;IAClB,GAAG,EAAE,QAAQ,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,cAAc,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;CACpC;AAmBD,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,EAAE,sBAAsB,2CAyErE;AAED,wBAAgB,kBAAkB,IAAI,WAAW,GAAG,IAAI,CAGvD;AAED,wBAAgB,YAAY,IAAI,sBAAsB,CA8BrD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,QAAQ,GAAG,IAAI,CAM9E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,GAAG,EAAE,QAAQ,EACb,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,OAAO,EACf,WAAW,EAAE,OAAO;;;8BAkCA,OAAO;EAY5B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrueSheetContainerViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetContainerViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,WAAW,WAAY,SAAQ,SAAS;CAE7C;;AAED,
|
|
1
|
+
{"version":3,"file":"TrueSheetContainerViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetContainerViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,WAAW,WAAY,SAAQ,SAAS;CAE7C;;AAED,wBAA6E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrueSheetContentViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetContentViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,WAAW,WAAY,SAAQ,SAAS;CAE7C;;
|
|
1
|
+
{"version":3,"file":"TrueSheetContentViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetContentViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,WAAW,WAAY,SAAQ,SAAS;CAE7C;;AAID,wBAEG"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { ViewProps } from 'react-native';
|
|
2
|
+
import type { WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
2
3
|
export interface NativeProps extends ViewProps {
|
|
4
|
+
autoBottomInset?: WithDefault<boolean, false>;
|
|
3
5
|
}
|
|
4
6
|
declare const _default: import("react-native").HostComponent<NativeProps>;
|
|
5
7
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrueSheetFooterViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetFooterViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"TrueSheetFooterViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetFooterViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2CAA2C,CAAC;AAG7E,MAAM,WAAW,WAAY,SAAQ,SAAS;IAI5C,eAAe,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;CAC/C;;AAID,wBAEG"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ViewProps } from 'react-native';
|
|
2
|
+
export interface NativeProps extends ViewProps {
|
|
3
|
+
}
|
|
4
|
+
declare const _default: import("react-native").HostComponent<NativeProps>;
|
|
5
|
+
export default _default;
|
|
6
|
+
//# sourceMappingURL=TrueSheetHeaderViewNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrueSheetHeaderViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetHeaderViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,WAAW,WAAY,SAAQ,SAAS;CAE7C;;AAED,wBAA8E"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ViewProps } from 'react-native';
|
|
2
|
+
export interface NativeProps extends ViewProps {
|
|
3
|
+
}
|
|
4
|
+
declare const _default: import("react-native").HostComponent<NativeProps>;
|
|
5
|
+
export default _default;
|
|
6
|
+
//# sourceMappingURL=TrueSheetOverlayViewNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrueSheetOverlayViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetOverlayViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,WAAW,WAAY,SAAQ,SAAS;CAE7C;;AAID,wBAEG"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ViewProps } from 'react-native';
|
|
2
|
+
export interface NativeProps extends ViewProps {
|
|
3
|
+
}
|
|
4
|
+
declare const _default: import("react-native").HostComponent<NativeProps>;
|
|
5
|
+
export default _default;
|
|
6
|
+
//# sourceMappingURL=TrueSheetPeekViewNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrueSheetPeekViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetPeekViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG9C,MAAM,WAAW,WAAY,SAAQ,SAAS;CAE7C;;AAED,wBAA4E"}
|
|
@@ -1,43 +1,98 @@
|
|
|
1
|
-
import type { ViewProps } from 'react-native';
|
|
2
|
-
import type { DirectEventHandler, Double, Int32, WithDefault
|
|
1
|
+
import type { ColorValue, ProcessedColorValue, ViewProps } from 'react-native';
|
|
2
|
+
import type { DirectEventHandler, Double, Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
3
|
+
type GrabberOptionsType = Readonly<{
|
|
4
|
+
width?: Double;
|
|
5
|
+
height?: Double;
|
|
6
|
+
topMargin?: Double;
|
|
7
|
+
cornerRadius?: WithDefault<Double, -1>;
|
|
8
|
+
color?: ProcessedColorValue | null;
|
|
9
|
+
adaptive?: WithDefault<boolean, true>;
|
|
10
|
+
}>;
|
|
11
|
+
type AccessibilityOptionsType = Readonly<{
|
|
12
|
+
grabberLabel?: WithDefault<string, 'Sheet Grabber'>;
|
|
13
|
+
grabberHint?: WithDefault<string, 'Double-tap to expand. Swipe up or down to resize the sheet'>;
|
|
14
|
+
expandedValue?: WithDefault<string, 'Expanded'>;
|
|
15
|
+
collapsedValue?: WithDefault<string, 'Collapsed'>;
|
|
16
|
+
detentValue?: WithDefault<string, 'Detent {index} of {count}'>;
|
|
17
|
+
expandActionLabel?: WithDefault<string, 'Expand'>;
|
|
18
|
+
collapseActionLabel?: WithDefault<string, 'Collapse'>;
|
|
19
|
+
paneTitle?: WithDefault<string, 'Bottom sheet'>;
|
|
20
|
+
}>;
|
|
21
|
+
type BlurOptionsType = Readonly<{
|
|
22
|
+
intensity?: WithDefault<Double, -1>;
|
|
23
|
+
interaction?: WithDefault<boolean, true>;
|
|
24
|
+
}>;
|
|
25
|
+
type ScrollEdgeEffect = 'automatic' | 'hard' | 'soft' | 'hidden';
|
|
26
|
+
type ScrollableOptionsType = Readonly<{
|
|
27
|
+
contentInsetAdjustmentBehavior?: WithDefault<boolean, true>;
|
|
28
|
+
keyboardScrollOffset?: WithDefault<Double, 0>;
|
|
29
|
+
keyboardOffset?: WithDefault<Double, 0>;
|
|
30
|
+
scrollingExpandsSheet?: WithDefault<boolean, true>;
|
|
31
|
+
topScrollEdgeEffect?: WithDefault<ScrollEdgeEffect, 'hidden'>;
|
|
32
|
+
bottomScrollEdgeEffect?: WithDefault<ScrollEdgeEffect, 'hidden'>;
|
|
33
|
+
}>;
|
|
34
|
+
type FooterOptionsType = Readonly<{
|
|
35
|
+
footerPosition?: WithDefault<'relative' | 'absolute', 'relative'>;
|
|
36
|
+
keyboardOffset?: WithDefault<Double, 0>;
|
|
37
|
+
}>;
|
|
38
|
+
type HeaderOptionsType = Readonly<{
|
|
39
|
+
position?: WithDefault<'relative' | 'absolute', 'relative'>;
|
|
40
|
+
}>;
|
|
3
41
|
export interface DetentInfoEventPayload {
|
|
4
42
|
index: Int32;
|
|
5
43
|
position: Double;
|
|
44
|
+
detent: Double;
|
|
6
45
|
}
|
|
7
46
|
export interface PositionChangeEventPayload {
|
|
8
|
-
index:
|
|
47
|
+
index: Double;
|
|
9
48
|
position: Double;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export interface SizeChangeEventPayload {
|
|
13
|
-
width: Double;
|
|
14
|
-
height: Double;
|
|
49
|
+
detent: Double;
|
|
50
|
+
realtime: boolean;
|
|
15
51
|
}
|
|
16
52
|
export interface NativeProps extends ViewProps {
|
|
17
|
-
detents?: ReadonlyArray<
|
|
18
|
-
|
|
19
|
-
|
|
53
|
+
detents?: ReadonlyArray<Double>;
|
|
54
|
+
maxContentHeight?: WithDefault<Double, 0>;
|
|
55
|
+
maxContentWidth?: WithDefault<Double, 0>;
|
|
20
56
|
cornerRadius?: WithDefault<Double, -1>;
|
|
57
|
+
elevation?: WithDefault<Double, -1>;
|
|
58
|
+
backgroundColor?: ColorValue;
|
|
21
59
|
initialDetentIndex?: WithDefault<Int32, -1>;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
60
|
+
dimmedDetentIndex?: WithDefault<Int32, 0>;
|
|
61
|
+
backgroundBlur?: WithDefault<'none' | 'light' | 'dark' | 'default' | 'extra-light' | 'regular' | 'prominent' | 'system-ultra-thin-material' | 'system-thin-material' | 'system-material' | 'system-thick-material' | 'system-chrome-material' | 'system-ultra-thin-material-light' | 'system-thin-material-light' | 'system-material-light' | 'system-thick-material-light' | 'system-chrome-material-light' | 'system-ultra-thin-material-dark' | 'system-thin-material-dark' | 'system-material-dark' | 'system-thick-material-dark' | 'system-chrome-material-dark', 'none'>;
|
|
62
|
+
anchor?: WithDefault<'left' | 'center' | 'right', 'center'>;
|
|
63
|
+
anchorOffset?: WithDefault<Double, 16>;
|
|
64
|
+
insetAdjustment?: WithDefault<'automatic' | 'never', 'automatic'>;
|
|
65
|
+
blurOptions?: BlurOptionsType;
|
|
25
66
|
grabber?: WithDefault<boolean, true>;
|
|
67
|
+
grabberOptions?: GrabberOptionsType;
|
|
68
|
+
accessibilityOptions?: AccessibilityOptionsType;
|
|
26
69
|
dismissible?: WithDefault<boolean, true>;
|
|
70
|
+
draggable?: WithDefault<boolean, true>;
|
|
27
71
|
dimmed?: WithDefault<boolean, true>;
|
|
28
72
|
initialDetentAnimated?: WithDefault<boolean, true>;
|
|
29
|
-
|
|
73
|
+
scrollableHandle?: WithDefault<Int32, -1>;
|
|
74
|
+
scrollableOptions?: ScrollableOptionsType;
|
|
75
|
+
headerOptions?: HeaderOptionsType;
|
|
76
|
+
footerOptions?: FooterOptionsType;
|
|
77
|
+
presentation?: WithDefault<'page' | 'form', 'page'>;
|
|
30
78
|
onMount?: DirectEventHandler<null>;
|
|
31
79
|
onWillPresent?: DirectEventHandler<DetentInfoEventPayload>;
|
|
32
80
|
onDidPresent?: DirectEventHandler<DetentInfoEventPayload>;
|
|
33
81
|
onWillDismiss?: DirectEventHandler<null>;
|
|
34
82
|
onDidDismiss?: DirectEventHandler<null>;
|
|
83
|
+
onDismissAttempt?: DirectEventHandler<null>;
|
|
35
84
|
onDetentChange?: DirectEventHandler<DetentInfoEventPayload>;
|
|
36
85
|
onDragBegin?: DirectEventHandler<DetentInfoEventPayload>;
|
|
37
86
|
onDragChange?: DirectEventHandler<DetentInfoEventPayload>;
|
|
38
87
|
onDragEnd?: DirectEventHandler<DetentInfoEventPayload>;
|
|
39
88
|
onPositionChange?: DirectEventHandler<PositionChangeEventPayload>;
|
|
40
|
-
|
|
89
|
+
onWillFocus?: DirectEventHandler<null>;
|
|
90
|
+
onDidFocus?: DirectEventHandler<null>;
|
|
91
|
+
onWillBlur?: DirectEventHandler<null>;
|
|
92
|
+
onDidBlur?: DirectEventHandler<null>;
|
|
93
|
+
onVisibilityChange?: DirectEventHandler<Readonly<{
|
|
94
|
+
visible: boolean;
|
|
95
|
+
}>>;
|
|
41
96
|
}
|
|
42
97
|
declare const _default: import("react-native").HostComponent<NativeProps>;
|
|
43
98
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TrueSheetViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"TrueSheetViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC/E,OAAO,KAAK,EACV,kBAAkB,EAClB,MAAM,EACN,KAAK,EACL,WAAW,EACZ,MAAM,2CAA2C,CAAC;AAGnD,KAAK,kBAAkB,GAAG,QAAQ,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IACvC,KAAK,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;CACvC,CAAC,CAAC;AAEH,KAAK,wBAAwB,GAAG,QAAQ,CAAC;IACvC,YAAY,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACpD,WAAW,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,4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O,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACnC,aAAa,CAAC,EAAE,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;IAC3D,YAAY,CAAC,EAAE,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;IAC1D,aAAa,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACzC,YAAY,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACxC,gBAAgB,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAC5C,cAAc,CAAC,EAAE,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;IAC5D,WAAW,CAAC,EAAE,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;IACzD,YAAY,CAAC,EAAE,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;IAC1D,SAAS,CAAC,EAAE,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;IACvD,gBAAgB,CAAC,EAAE,kBAAkB,CAAC,0BAA0B,CAAC,CAAC;IAClE,WAAW,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACvC,UAAU,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACtC,UAAU,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACtC,SAAS,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACrC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC,QAAQ,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC,CAAC;CACzE;;AAED,wBAEG"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './TrueSheet';
|
|
2
2
|
export * from './TrueSheet.types';
|
|
3
|
-
export
|
|
4
|
-
export
|
|
3
|
+
export { TrueSheetPeek } from './TrueSheetPeek';
|
|
4
|
+
export { TrueSheetOverlay } from './TrueSheetOverlay';
|
|
5
|
+
export { TrueSheetProvider, useTrueSheet } from './TrueSheetProvider';
|
|
5
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, type ViewProps } from 'react-native';
|
|
3
|
+
import type { TrueSheetProps, TrueSheetStaticMethods } from '../TrueSheet.types';
|
|
4
|
+
interface TrueSheetState {
|
|
5
|
+
shouldRenderNativeView: boolean;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Mock TrueSheet component for testing.
|
|
9
|
+
* Import from '@lodev09/react-native-true-sheet/mock' in your test setup.
|
|
10
|
+
*/
|
|
11
|
+
export declare class TrueSheet extends React.Component<TrueSheetProps, TrueSheetState> {
|
|
12
|
+
static instances: Record<string, TrueSheet>;
|
|
13
|
+
static dismiss: jest.Mock<Promise<void>, [_name: string, _animated?: boolean | undefined], any>;
|
|
14
|
+
static dismissStack: jest.Mock<Promise<void>, [_name: string, _animated?: boolean | undefined], any>;
|
|
15
|
+
static present: jest.Mock<Promise<void>, [_name: string, _index?: number | undefined, _animated?: boolean | undefined], any>;
|
|
16
|
+
static resize: jest.Mock<Promise<void>, [_name: string, _index: number], any>;
|
|
17
|
+
static dismissAll: jest.Mock<Promise<void>, [_animated?: boolean | undefined], any>;
|
|
18
|
+
dismiss: jest.Mock<Promise<void>, [_animated?: boolean | undefined], any>;
|
|
19
|
+
dismissStack: jest.Mock<Promise<void>, [_animated?: boolean | undefined], any>;
|
|
20
|
+
present: jest.Mock<Promise<void>, [_index?: number | undefined, _animated?: boolean | undefined], any>;
|
|
21
|
+
resize: jest.Mock<Promise<void>, [_index: number], any>;
|
|
22
|
+
componentDidMount(): void;
|
|
23
|
+
componentWillUnmount(): void;
|
|
24
|
+
private renderHeader;
|
|
25
|
+
private renderFooter;
|
|
26
|
+
render(): React.CElement<ViewProps, View>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Mock TrueSheetPeek component for testing.
|
|
30
|
+
*/
|
|
31
|
+
export declare function TrueSheetPeek({ children, ...rest }: ViewProps): React.CElement<ViewProps, View>;
|
|
32
|
+
/**
|
|
33
|
+
* Mock TrueSheetOverlay component for testing.
|
|
34
|
+
*/
|
|
35
|
+
export declare function TrueSheetOverlay({ children, ...rest }: ViewProps): React.CElement<ViewProps, View>;
|
|
36
|
+
/**
|
|
37
|
+
* Mock TrueSheetProvider for testing.
|
|
38
|
+
*/
|
|
39
|
+
export declare function TrueSheetProvider({ children }: {
|
|
40
|
+
children: React.ReactNode;
|
|
41
|
+
}): React.ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* Mock useTrueSheet hook for testing.
|
|
44
|
+
*/
|
|
45
|
+
export declare function useTrueSheet(): TrueSheetStaticMethods;
|
|
46
|
+
export * from '../TrueSheet.types';
|
|
47
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAwD,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAEjF,UAAU,cAAc;IACtB,sBAAsB,EAAE,OAAO,CAAC;CACjC;AAED;;;GAGG;AACH,qBAAa,SAAU,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,EAAE,cAAc,CAAC;IAC5E,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAM;IAEjD,MAAM,CAAC,OAAO,kFAAsE;IACpF,MAAM,CAAC,YAAY,kFAAsE;IACzF,MAAM,CAAC,OAAO,+GAEZ;IACF,MAAM,CAAC,MAAM,iEAAiE;IAC9E,MAAM,CAAC,UAAU,mEAAuD;IAExE,OAAO,mEAAuD;IAC9D,YAAY,mEAAuD;IACnE,OAAO,gGAAwE;IAC/E,MAAM,kDAAkD;IAExD,iBAAiB;IAOjB,oBAAoB;IAOpB,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,YAAY;IAMpB,MAAM;CAIP;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,mCAE7D;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,mCAEhE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,mBAE5E;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,sBAAsB,CAQrD;AAED,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { ParamListBase } from '@react-navigation/native';
|
|
2
|
+
import type { TrueSheetNavigationProp } from '../navigation/types';
|
|
3
|
+
/**
|
|
4
|
+
* Mock createTrueSheetNavigator for testing.
|
|
5
|
+
* Import from '@lodev09/react-native-true-sheet/navigation/mock' in your test setup.
|
|
6
|
+
*/
|
|
7
|
+
export declare const createTrueSheetNavigator: jest.Mock<{
|
|
8
|
+
Navigator: jest.Mock<import("react").ReactNode, [{
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}], any>;
|
|
11
|
+
Screen: jest.Mock<null, [], any>;
|
|
12
|
+
Group: jest.Mock<null, [], any>;
|
|
13
|
+
}, [], any>;
|
|
14
|
+
/**
|
|
15
|
+
* Mock createTrueSheetScreen for testing the static API.
|
|
16
|
+
*/
|
|
17
|
+
export declare const createTrueSheetScreen: jest.Mock<object, [config: object], any>;
|
|
18
|
+
/**
|
|
19
|
+
* Mock TrueSheetActions for testing.
|
|
20
|
+
*/
|
|
21
|
+
export declare const TrueSheetActions: {
|
|
22
|
+
push: jest.Mock<{
|
|
23
|
+
type: string;
|
|
24
|
+
payload: {
|
|
25
|
+
name: string;
|
|
26
|
+
params: object | undefined;
|
|
27
|
+
};
|
|
28
|
+
}, [name: string, params?: object | undefined], any>;
|
|
29
|
+
pop: jest.Mock<{
|
|
30
|
+
type: string;
|
|
31
|
+
payload: {
|
|
32
|
+
count: number | undefined;
|
|
33
|
+
};
|
|
34
|
+
}, [count?: number | undefined], any>;
|
|
35
|
+
popTo: jest.Mock<{
|
|
36
|
+
type: string;
|
|
37
|
+
payload: {
|
|
38
|
+
name: string;
|
|
39
|
+
params: object | undefined;
|
|
40
|
+
};
|
|
41
|
+
}, [name: string, params?: object | undefined], any>;
|
|
42
|
+
popToTop: jest.Mock<{
|
|
43
|
+
type: string;
|
|
44
|
+
}, [], any>;
|
|
45
|
+
replace: jest.Mock<{
|
|
46
|
+
type: string;
|
|
47
|
+
payload: {
|
|
48
|
+
name: string;
|
|
49
|
+
params: object | undefined;
|
|
50
|
+
};
|
|
51
|
+
}, [name: string, params?: object | undefined], any>;
|
|
52
|
+
resize: jest.Mock<{
|
|
53
|
+
type: string;
|
|
54
|
+
index: number;
|
|
55
|
+
}, [index: number], any>;
|
|
56
|
+
dismiss: jest.Mock<{
|
|
57
|
+
type: string;
|
|
58
|
+
}, [], any>;
|
|
59
|
+
remove: jest.Mock<{
|
|
60
|
+
type: string;
|
|
61
|
+
}, [], any>;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* Mock useTrueSheetNavigation hook for testing.
|
|
65
|
+
*/
|
|
66
|
+
export declare const useTrueSheetNavigation: jest.Mock<TrueSheetNavigationProp<ParamListBase>, [], any>;
|
|
67
|
+
export type { TrueSheetActionType } from '../navigation/actions';
|
|
68
|
+
export type { DetentInfoEventPayload, PositionChangeEventPayload } from '../TrueSheet.types';
|
|
69
|
+
export type { TrueSheetNavigationEventMap, TrueSheetNavigationHelpers, TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetScreenProps, } from '../navigation/types';
|
|
70
|
+
//# sourceMappingURL=navigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../../src/mocks/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAE9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnE;;;GAGG;AACH,eAAO,MAAM,wBAAwB;;kBACW,KAAK,CAAC,SAAS;;;;WAG5D,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,qBAAqB,0CAAsC,CAAC;AAEzE;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAe5B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,4DAyBjC,CAAC;AAEH,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,YAAY,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAC7F,YAAY,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { ParamListBase } from '../navigation/expo-router/base-types';
|
|
2
|
+
import type { TrueSheetNavigationProp } from '../navigation/expo-router/types';
|
|
3
|
+
import { TrueSheetActions } from './navigation';
|
|
4
|
+
/**
|
|
5
|
+
* Mock Sheet layout for testing.
|
|
6
|
+
* Import from '@lodev09/react-native-true-sheet/navigation/expo-router/mock' in your test setup.
|
|
7
|
+
*/
|
|
8
|
+
export declare const Sheet: jest.Mock<import("react").ReactNode, [{
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
}], any> & {
|
|
11
|
+
Screen: jest.Mock<null, [], any>;
|
|
12
|
+
Protected: jest.Mock<null, [], any>;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Mock useTrueSheetNavigation hook for testing.
|
|
16
|
+
*/
|
|
17
|
+
export declare const useTrueSheetNavigation: jest.Mock<TrueSheetNavigationProp<ParamListBase>, [], any>;
|
|
18
|
+
export { TrueSheetActions };
|
|
19
|
+
export type { TrueSheetActionType } from '../navigation/actions';
|
|
20
|
+
export type { DetentInfoEventPayload, PositionChangeEventPayload } from '../TrueSheet.types';
|
|
21
|
+
export type { TrueSheetNavigationEventMap, TrueSheetNavigationHelpers, TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetScreenProps, } from '../navigation/expo-router/types';
|
|
22
|
+
//# sourceMappingURL=navigationExpoRouter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigationExpoRouter.d.ts","sourceRoot":"","sources":["../../../../src/mocks/navigationExpoRouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,EACL,gBAAgB,EAEjB,MAAM,cAAc,CAAC;AAEtB;;;GAGG;AACH,eAAO,MAAM,KAAK;cACmB,KAAK,CAAC,SAAS;;;;CAKnD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,4DAKlC,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,YAAY,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,YAAY,EAAE,sBAAsB,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAC7F,YAAY,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EACxB,oBAAoB,GACrB,MAAM,iCAAiC,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import type { SharedValue } from 'react-native-reanimated';
|
|
4
|
+
import type { TrueSheetProps, PositionChangeEventPayload } from '../TrueSheet.types';
|
|
5
|
+
interface TrueSheetState {
|
|
6
|
+
shouldRenderNativeView: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface MockReanimatedTrueSheetContextValue {
|
|
9
|
+
animatedPosition: SharedValue<number>;
|
|
10
|
+
animatedIndex: SharedValue<number>;
|
|
11
|
+
animatedDetent: SharedValue<number>;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Mock ReanimatedTrueSheet component for testing.
|
|
15
|
+
* Import from '@lodev09/react-native-true-sheet/reanimated/mock' in your test setup.
|
|
16
|
+
*/
|
|
17
|
+
export declare class ReanimatedTrueSheet extends React.Component<TrueSheetProps, TrueSheetState> {
|
|
18
|
+
static instances: Record<string, ReanimatedTrueSheet>;
|
|
19
|
+
static dismiss: jest.Mock<Promise<void>, [_name: string, _animated?: boolean | undefined], any>;
|
|
20
|
+
static dismissStack: jest.Mock<Promise<void>, [_name: string, _animated?: boolean | undefined], any>;
|
|
21
|
+
static present: jest.Mock<Promise<void>, [_name: string, _index?: number | undefined, _animated?: boolean | undefined], any>;
|
|
22
|
+
static resize: jest.Mock<Promise<void>, [_name: string, _index: number], any>;
|
|
23
|
+
dismiss: jest.Mock<Promise<void>, [_animated?: boolean | undefined], any>;
|
|
24
|
+
dismissStack: jest.Mock<Promise<void>, [_animated?: boolean | undefined], any>;
|
|
25
|
+
present: jest.Mock<Promise<void>, [_index?: number | undefined, _animated?: boolean | undefined], any>;
|
|
26
|
+
resize: jest.Mock<Promise<void>, [_index: number], any>;
|
|
27
|
+
componentDidMount(): void;
|
|
28
|
+
componentWillUnmount(): void;
|
|
29
|
+
private renderHeader;
|
|
30
|
+
private renderFooter;
|
|
31
|
+
render(): React.CElement<import("react-native").ViewProps, View>;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Mock ReanimatedTrueSheetProvider for testing.
|
|
35
|
+
*/
|
|
36
|
+
export declare function ReanimatedTrueSheetProvider({ children }: {
|
|
37
|
+
children: React.ReactNode;
|
|
38
|
+
}): React.ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* Mock useReanimatedTrueSheet hook for testing.
|
|
41
|
+
*/
|
|
42
|
+
export declare const useReanimatedTrueSheet: jest.Mock<MockReanimatedTrueSheetContextValue, [], any>;
|
|
43
|
+
/**
|
|
44
|
+
* Mock useReanimatedPositionChangeHandler hook for testing.
|
|
45
|
+
*/
|
|
46
|
+
export declare const useReanimatedPositionChangeHandler: jest.Mock<jest.Mock<any, any, any>, [_handler: (payload: PositionChangeEventPayload) => void, _dependencies?: unknown[] | undefined], any>;
|
|
47
|
+
export {};
|
|
48
|
+
//# sourceMappingURL=reanimated.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reanimated.d.ts","sourceRoot":"","sources":["../../../../src/mocks/reanimated.ts"],"names":[],"mappings":"AAAA,OAAO,KAAwD,MAAM,OAAO,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,KAAK,EAAE,cAAc,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAC;AAErF,UAAU,cAAc;IACtB,sBAAsB,EAAE,OAAO,CAAC;CACjC;AAED,UAAU,mCAAmC;IAC3C,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACtC,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACnC,cAAc,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;CACrC;AAWD;;;GAGG;AACH,qBAAa,mBAAoB,SAAQ,KAAK,CAAC,SAAS,CAAC,cAAc,EAAE,cAAc,CAAC;IACtF,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAM;IAE3D,MAAM,CAAC,OAAO,kFAAsE;IACpF,MAAM,CAAC,YAAY,kFAAsE;IACzF,MAAM,CAAC,OAAO,+GAEZ;IACF,MAAM,CAAC,MAAM,iEAAiE;IAE9E,OAAO,mEAAuD;IAC9D,YAAY,mEAAuD;IACnE,OAAO,gGAAwE;IAC/E,MAAM,kDAAkD;IAExD,iBAAiB;IAOjB,oBAAoB;IAOpB,OAAO,CAAC,YAAY;IAMpB,OAAO,CAAC,YAAY;IAMpB,MAAM;CAIP;AAED;;GAEG;AACH,wBAAgB,2BAA2B,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,mBAEtF;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,yDAMlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kCAAkC,2DACxB,0BAA0B,KAAK,IAAI,8CACzD,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { NavigatorArgs } from 'standard-navigation';
|
|
2
|
+
import type { TrueSheetNavigationOptions, TrueSheetNavigatorContentExtraProps, TrueSheetStandardEventMap } from './types';
|
|
3
|
+
export type TrueSheetNavigatorContentProps = NavigatorArgs<TrueSheetNavigationOptions, TrueSheetStandardEventMap> & TrueSheetNavigatorContentExtraProps;
|
|
4
|
+
export declare const TrueSheetNavigatorContent: ({ routes, dispatch, descriptors, emitter, }: TrueSheetNavigatorContentProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
//# sourceMappingURL=TrueSheetNavigatorContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TrueSheetNavigatorContent.d.ts","sourceRoot":"","sources":["../../../../src/navigation/TrueSheetNavigatorContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,OAAO,KAAK,EACV,0BAA0B,EAC1B,mCAAmC,EACnC,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AAkBjB,MAAM,MAAM,8BAA8B,GAAG,aAAa,CACxD,0BAA0B,EAC1B,yBAAyB,CAC1B,GACC,mCAAmC,CAAC;AAEtC,eAAO,MAAM,yBAAyB,GAAI,6CAKvC,8BAA8B,4CAsEhC,CAAC"}
|