@lodev09/react-native-true-sheet 4.0.0-beta.3 → 4.0.0-beta.30
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/README.md +28 -5
- package/android/build.gradle +23 -1
- package/android/proguard-rules.pro +3 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetContainerView.kt +50 -16
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetContentView.kt +303 -184
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetContentViewManager.kt +5 -1
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetFooterView.kt +38 -109
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetModule.kt +13 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetOverlayView.kt +127 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetOverlayViewManager.kt +45 -0
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetPackage.kt +2 -1
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetStateUpdater.kt +29 -3
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetView.kt +234 -66
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetViewController.kt +491 -186
- package/android/src/main/java/com/lodev09/truesheet/TrueSheetViewManager.kt +64 -10
- package/android/src/main/java/com/lodev09/truesheet/core/RNScreensEventObserver.kt +31 -14
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetBottomSheetBehavior.kt +135 -0
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetBottomSheetView.kt +23 -23
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetCoordinatorLayout.kt +130 -6
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetDetentCalculator.kt +104 -39
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetDimView.kt +14 -17
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetGrabberView.kt +2 -4
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetOverlayRootView.kt +148 -0
- package/android/src/main/java/com/lodev09/truesheet/core/TrueSheetStackManager.kt +33 -40
- package/android/src/main/java/com/lodev09/truesheet/events/TrueSheetLifecycleEvents.kt +15 -0
- package/android/src/main/java/com/lodev09/truesheet/utils/ColorUtils.kt +19 -0
- package/android/src/main/java/com/lodev09/truesheet/utils/KeyboardUtils.kt +15 -2
- package/android/src/main/java/com/lodev09/truesheet/utils/ScreenUtils.kt +0 -12
- package/android/src/main/java/com/lodev09/truesheet/utils/ViewUtils.kt +19 -7
- package/android/src/main/jni/TrueSheetSpec.h +1 -0
- package/android/src/main/jni/TrueSheetStateUpdater.cpp +37 -6
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewComponentDescriptor.h +1 -9
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewShadowNode.cpp +114 -30
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewShadowNode.h +30 -7
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewState.cpp +2 -2
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetContentViewState.h +9 -8
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewComponentDescriptor.h +3 -5
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewShadowNode.cpp +14 -3
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewShadowNode.h +5 -6
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewState.cpp +1 -1
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetFooterViewState.h +10 -6
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetInsets.cpp +1 -1
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetInsets.h +1 -1
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetLayoutUtils.h +43 -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 +33 -0
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewComponentDescriptor.h +3 -5
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewShadowNode.cpp +7 -40
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewShadowNode.h +3 -7
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewState.cpp +3 -5
- package/common/cpp/react/renderer/components/TrueSheetSpec/TrueSheetViewState.h +4 -5
- package/ios/TrueSheetContainerView.h +23 -7
- package/ios/TrueSheetContainerView.mm +45 -25
- package/ios/TrueSheetContentView.h +44 -15
- package/ios/TrueSheetContentView.mm +221 -190
- package/ios/TrueSheetFooterView.mm +133 -28
- package/ios/TrueSheetModule.h +2 -7
- package/ios/TrueSheetModule.mm +18 -18
- package/ios/TrueSheetOverlayView.h +42 -0
- package/ios/TrueSheetOverlayView.mm +175 -0
- package/ios/TrueSheetView.h +2 -0
- package/ios/TrueSheetView.mm +268 -52
- package/ios/TrueSheetViewController.h +36 -3
- package/ios/TrueSheetViewController.mm +797 -102
- package/ios/core/RNScreensEventObserver.mm +31 -28
- package/ios/core/TrueSheetBlurView.h +0 -2
- package/ios/core/TrueSheetBlurView.mm +3 -36
- package/ios/core/TrueSheetDetentCalculator.h +18 -1
- package/ios/core/TrueSheetDetentCalculator.mm +44 -9
- package/ios/core/TrueSheetDimView.h +27 -0
- package/ios/core/TrueSheetDimView.mm +41 -0
- package/ios/core/TrueSheetGrabberView.mm +13 -3
- package/ios/core/TrueSheetKeyboardObserver.h +7 -0
- package/ios/core/TrueSheetKeyboardObserver.mm +107 -15
- package/ios/core/TrueSheetOverlayContainerView.h +31 -0
- package/ios/core/TrueSheetOverlayContainerView.mm +35 -0
- package/ios/events/TrueSheetLifecycleEvents.h +2 -0
- package/ios/events/TrueSheetLifecycleEvents.mm +8 -0
- package/ios/tvos/TrueSheetStubs.mm +12 -0
- package/ios/utils/UIView+ScrollEdgeInteraction.h +1 -0
- package/ios/utils/UIView+ScrollEdgeInteraction.mm +24 -2
- package/lib/module/TrueSheet.js +222 -54
- package/lib/module/TrueSheet.js.map +1 -1
- package/lib/module/TrueSheet.web.js +364 -275
- package/lib/module/TrueSheet.web.js.map +1 -1
- package/lib/module/TrueSheetBackground.js +15 -0
- package/lib/module/TrueSheetBackground.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.web.js +20 -15
- package/lib/module/TrueSheetPeek.web.js.map +1 -1
- package/lib/module/TrueSheetProvider.web.js +13 -9
- package/lib/module/TrueSheetProvider.web.js.map +1 -1
- package/lib/module/detentBackgrounds.js +21 -0
- package/lib/module/detentBackgrounds.js.map +1 -0
- package/lib/module/fabric/TrueSheetContentViewNativeComponent.ts +1 -1
- package/lib/module/fabric/TrueSheetFooterViewNativeComponent.ts +2 -3
- package/lib/module/fabric/TrueSheetOverlayViewNativeComponent.ts +12 -0
- package/lib/module/fabric/TrueSheetViewNativeComponent.ts +89 -73
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/mocks/index.js +18 -2
- package/lib/module/mocks/index.js.map +1 -1
- package/lib/module/mocks/navigationExpoRouter.js.map +1 -1
- 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 +158 -100
- package/lib/module/navigation/createTrueSheetRouter.js.map +1 -1
- 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/extendTrueSheetRouter.js +71 -0
- package/lib/module/navigation/expo-router/extendTrueSheetRouter.js.map +1 -0
- package/lib/module/navigation/expo-router/index.js +18 -7
- package/lib/module/navigation/expo-router/index.js.map +1 -1
- 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.map +1 -1
- package/lib/module/navigation/screen/useSheetScreenState.js +1 -0
- package/lib/module/navigation/screen/useSheetScreenState.js.map +1 -1
- package/lib/module/scrollable.js +28 -0
- package/lib/module/scrollable.js.map +1 -0
- package/lib/module/web/constants.js +1 -1
- package/lib/module/web/constants.js.map +1 -1
- package/lib/module/web/keyboard.js +69 -0
- package/lib/module/web/keyboard.js.map +1 -0
- package/lib/module/web/layout.js +168 -0
- package/lib/module/web/layout.js.map +1 -0
- package/lib/module/web/vaul/constants.js +9 -0
- package/lib/module/web/vaul/constants.js.map +1 -1
- package/lib/module/web/vaul/context.js +4 -0
- package/lib/module/web/vaul/context.js.map +1 -1
- package/lib/module/web/vaul/helpers.js +1 -0
- package/lib/module/web/vaul/helpers.js.map +1 -1
- package/lib/module/web/vaul/index.js +83 -21
- package/lib/module/web/vaul/index.js.map +1 -1
- package/lib/module/web/vaul/use-snap-points.js +57 -28
- package/lib/module/web/vaul/use-snap-points.js.map +1 -1
- package/lib/typescript/src/TrueSheet.d.ts +18 -1
- package/lib/typescript/src/TrueSheet.d.ts.map +1 -1
- package/lib/typescript/src/TrueSheet.types.d.ts +209 -35
- package/lib/typescript/src/TrueSheet.types.d.ts.map +1 -1
- package/lib/typescript/src/TrueSheet.web.d.ts.map +1 -1
- package/lib/typescript/src/TrueSheetBackground.d.ts +3 -0
- package/lib/typescript/src/TrueSheetBackground.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.web.d.ts +8 -4
- package/lib/typescript/src/TrueSheetPeek.web.d.ts.map +1 -1
- package/lib/typescript/src/TrueSheetProvider.web.d.ts +5 -1
- package/lib/typescript/src/TrueSheetProvider.web.d.ts.map +1 -1
- package/lib/typescript/src/detentBackgrounds.d.ts +10 -0
- package/lib/typescript/src/detentBackgrounds.d.ts.map +1 -0
- package/lib/typescript/src/fabric/TrueSheetFooterViewNativeComponent.d.ts +2 -3
- package/lib/typescript/src/fabric/TrueSheetFooterViewNativeComponent.d.ts.map +1 -1
- 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/TrueSheetViewNativeComponent.d.ts +76 -65
- package/lib/typescript/src/fabric/TrueSheetViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mocks/index.d.ts +4 -0
- package/lib/typescript/src/mocks/index.d.ts.map +1 -1
- package/lib/typescript/src/mocks/navigationExpoRouter.d.ts +3 -3
- package/lib/typescript/src/mocks/navigationExpoRouter.d.ts.map +1 -1
- 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 +36 -10
- package/lib/typescript/src/navigation/createTrueSheetRouter.d.ts.map +1 -1
- 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/extendTrueSheetRouter.d.ts +33 -0
- package/lib/typescript/src/navigation/expo-router/extendTrueSheetRouter.d.ts.map +1 -0
- package/lib/typescript/src/navigation/expo-router/index.d.ts +9 -6
- package/lib/typescript/src/navigation/expo-router/index.d.ts.map +1 -1
- 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 +3 -4
- package/lib/typescript/src/navigation/index.d.ts.map +1 -1
- package/lib/typescript/src/navigation/screen/useSheetScreenState.d.ts +2 -1
- package/lib/typescript/src/navigation/screen/useSheetScreenState.d.ts.map +1 -1
- package/lib/typescript/src/navigation/types.d.ts +43 -6
- package/lib/typescript/src/navigation/types.d.ts.map +1 -1
- package/lib/typescript/src/scrollable.d.ts +2 -0
- package/lib/typescript/src/scrollable.d.ts.map +1 -0
- package/lib/typescript/src/web/constants.d.ts +1 -1
- package/lib/typescript/src/web/constants.d.ts.map +1 -1
- package/lib/typescript/src/web/keyboard.d.ts +15 -0
- package/lib/typescript/src/web/keyboard.d.ts.map +1 -0
- package/lib/typescript/src/web/layout.d.ts +20 -0
- package/lib/typescript/src/web/layout.d.ts.map +1 -0
- package/lib/typescript/src/web/vaul/constants.d.ts +3 -0
- package/lib/typescript/src/web/vaul/constants.d.ts.map +1 -1
- package/lib/typescript/src/web/vaul/context.d.ts +5 -1
- package/lib/typescript/src/web/vaul/context.d.ts.map +1 -1
- package/lib/typescript/src/web/vaul/helpers.d.ts +1 -0
- package/lib/typescript/src/web/vaul/helpers.d.ts.map +1 -1
- package/lib/typescript/src/web/vaul/index.d.ts +20 -1
- package/lib/typescript/src/web/vaul/index.d.ts.map +1 -1
- package/lib/typescript/src/web/vaul/types.d.ts +9 -0
- package/lib/typescript/src/web/vaul/types.d.ts.map +1 -1
- package/lib/typescript/src/web/vaul/use-snap-points.d.ts +6 -4
- package/lib/typescript/src/web/vaul/use-snap-points.d.ts.map +1 -1
- package/package.json +18 -8
- package/react-native.config.js +1 -0
- package/src/TrueSheet.tsx +257 -62
- package/src/TrueSheet.types.ts +225 -35
- package/src/TrueSheet.web.tsx +445 -333
- package/src/TrueSheetBackground.tsx +17 -0
- package/src/TrueSheetOverlay.tsx +24 -0
- package/src/TrueSheetOverlay.web.tsx +33 -0
- package/src/TrueSheetPeek.web.tsx +25 -23
- package/src/TrueSheetProvider.web.tsx +22 -13
- package/src/detentBackgrounds.ts +24 -0
- package/src/fabric/TrueSheetContentViewNativeComponent.ts +1 -1
- package/src/fabric/TrueSheetFooterViewNativeComponent.ts +2 -3
- package/src/fabric/TrueSheetOverlayViewNativeComponent.ts +12 -0
- package/src/fabric/TrueSheetViewNativeComponent.ts +89 -73
- package/src/index.ts +1 -0
- package/src/mocks/index.ts +17 -2
- package/src/mocks/navigationExpoRouter.ts +6 -5
- package/src/navigation/base-types.ts +20 -0
- package/src/navigation/createTrueSheetRouter.ts +220 -144
- package/src/navigation/expo-router/base-types.ts +18 -0
- package/src/navigation/expo-router/extendTrueSheetRouter.ts +99 -0
- package/src/navigation/expo-router/index.ts +41 -30
- package/src/navigation/expo-router/types.ts +116 -0
- package/src/navigation/index.ts +6 -7
- package/src/navigation/screen/useSheetScreenState.ts +2 -0
- package/src/navigation/types.ts +81 -23
- package/src/scrollable.ts +25 -0
- package/src/web/constants.ts +1 -1
- package/src/web/keyboard.ts +79 -0
- package/src/web/layout.ts +196 -0
- package/src/web/vaul/constants.ts +9 -0
- package/src/web/vaul/context.ts +7 -1
- package/src/web/vaul/helpers.ts +5 -0
- package/src/web/vaul/index.tsx +113 -16
- package/src/web/vaul/types.ts +10 -0
- package/src/web/vaul/use-snap-points.ts +86 -33
|
@@ -1,92 +1,103 @@
|
|
|
1
|
-
import type { ColorValue, ProcessedColorValue, ViewProps } from 'react-native';
|
|
2
|
-
import type { DirectEventHandler, Double, Int32, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
|
|
1
|
+
import type { CodegenTypes, ColorValue, ProcessedColorValue, ViewProps } from 'react-native';
|
|
3
2
|
type GrabberOptionsType = Readonly<{
|
|
4
|
-
width?: Double;
|
|
5
|
-
height?: Double;
|
|
6
|
-
topMargin?: Double;
|
|
7
|
-
cornerRadius?: WithDefault<Double, -1>;
|
|
3
|
+
width?: CodegenTypes.Double;
|
|
4
|
+
height?: CodegenTypes.Double;
|
|
5
|
+
topMargin?: CodegenTypes.Double;
|
|
6
|
+
cornerRadius?: CodegenTypes.WithDefault<CodegenTypes.Double, -1>;
|
|
8
7
|
color?: ProcessedColorValue | null;
|
|
9
|
-
adaptive?: WithDefault<boolean, true>;
|
|
8
|
+
adaptive?: CodegenTypes.WithDefault<boolean, true>;
|
|
10
9
|
}>;
|
|
11
10
|
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>;
|
|
11
|
+
grabberLabel?: CodegenTypes.WithDefault<string, 'Sheet Grabber'>;
|
|
12
|
+
grabberHint?: CodegenTypes.WithDefault<string, 'Double-tap to expand. Swipe up or down to resize the sheet'>;
|
|
13
|
+
expandedValue?: CodegenTypes.WithDefault<string, 'Expanded'>;
|
|
14
|
+
collapsedValue?: CodegenTypes.WithDefault<string, 'Collapsed'>;
|
|
15
|
+
detentValue?: CodegenTypes.WithDefault<string, 'Detent {index} of {count}'>;
|
|
16
|
+
expandActionLabel?: CodegenTypes.WithDefault<string, 'Expand'>;
|
|
17
|
+
collapseActionLabel?: CodegenTypes.WithDefault<string, 'Collapse'>;
|
|
18
|
+
paneTitle?: CodegenTypes.WithDefault<string, 'Bottom sheet'>;
|
|
24
19
|
}>;
|
|
25
20
|
type ScrollEdgeEffect = 'automatic' | 'hard' | 'soft' | 'hidden';
|
|
26
21
|
type ScrollableOptionsType = Readonly<{
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
22
|
+
contentInsetAdjustment?: CodegenTypes.WithDefault<'automatic' | 'safe-area' | 'footer' | 'never', 'automatic'>;
|
|
23
|
+
keyboardScrollOffset?: CodegenTypes.WithDefault<CodegenTypes.Double, 0>;
|
|
24
|
+
keyboardOffset?: CodegenTypes.WithDefault<CodegenTypes.Double, 0>;
|
|
25
|
+
scrollingExpandsSheet?: CodegenTypes.WithDefault<boolean, true>;
|
|
26
|
+
topScrollEdgeEffect?: CodegenTypes.WithDefault<ScrollEdgeEffect, 'hidden'>;
|
|
27
|
+
bottomScrollEdgeEffect?: CodegenTypes.WithDefault<ScrollEdgeEffect, 'hidden'>;
|
|
31
28
|
}>;
|
|
32
29
|
type FooterOptionsType = Readonly<{
|
|
33
|
-
footerPosition?: WithDefault<'relative' | 'absolute', 'relative'>;
|
|
34
|
-
keyboardOffset?: WithDefault<Double, 0>;
|
|
30
|
+
footerPosition?: CodegenTypes.WithDefault<'relative' | 'absolute', 'relative'>;
|
|
31
|
+
keyboardOffset?: CodegenTypes.WithDefault<CodegenTypes.Double, 0>;
|
|
32
|
+
avoidKeyboard?: CodegenTypes.WithDefault<boolean, true>;
|
|
35
33
|
}>;
|
|
36
34
|
type HeaderOptionsType = Readonly<{
|
|
37
|
-
position?: WithDefault<'relative' | 'absolute', 'relative'>;
|
|
35
|
+
position?: CodegenTypes.WithDefault<'relative' | 'absolute', 'relative'>;
|
|
36
|
+
}>;
|
|
37
|
+
type FoldOptionsType = Readonly<{
|
|
38
|
+
hingeDetentIndex?: CodegenTypes.WithDefault<CodegenTypes.Int32, -1>;
|
|
39
|
+
hingeBehavior?: CodegenTypes.WithDefault<'none' | 'avoid' | 'snap', 'none'>;
|
|
38
40
|
}>;
|
|
39
41
|
export interface DetentInfoEventPayload {
|
|
40
|
-
index: Int32;
|
|
41
|
-
position: Double;
|
|
42
|
-
detent: Double;
|
|
42
|
+
index: CodegenTypes.Int32;
|
|
43
|
+
position: CodegenTypes.Double;
|
|
44
|
+
detent: CodegenTypes.Double;
|
|
43
45
|
}
|
|
44
46
|
export interface PositionChangeEventPayload {
|
|
45
|
-
index: Double;
|
|
46
|
-
position: Double;
|
|
47
|
-
detent: Double;
|
|
47
|
+
index: CodegenTypes.Double;
|
|
48
|
+
position: CodegenTypes.Double;
|
|
49
|
+
detent: CodegenTypes.Double;
|
|
48
50
|
realtime: boolean;
|
|
49
51
|
}
|
|
50
52
|
export interface NativeProps extends ViewProps {
|
|
51
|
-
detents?: ReadonlyArray<Double>;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
detents?: ReadonlyArray<CodegenTypes.Double>;
|
|
54
|
+
detentBackgrounds?: ReadonlyArray<Readonly<{
|
|
55
|
+
color?: ProcessedColorValue | null;
|
|
56
|
+
blur?: string;
|
|
57
|
+
}>>;
|
|
58
|
+
maxContentHeight?: CodegenTypes.WithDefault<CodegenTypes.Double, 0>;
|
|
59
|
+
maxContentWidth?: CodegenTypes.WithDefault<CodegenTypes.Double, 0>;
|
|
60
|
+
cornerRadius?: CodegenTypes.WithDefault<CodegenTypes.Double, -1>;
|
|
61
|
+
elevation?: CodegenTypes.WithDefault<CodegenTypes.Double, -1>;
|
|
56
62
|
backgroundColor?: ColorValue;
|
|
57
|
-
initialDetentIndex?: WithDefault<Int32, -1>;
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
initialDetentIndex?: CodegenTypes.WithDefault<CodegenTypes.Int32, -1>;
|
|
64
|
+
dimColor?: ColorValue;
|
|
65
|
+
dimOpacity?: CodegenTypes.WithDefault<CodegenTypes.Double, -1>;
|
|
66
|
+
dimmedDetentIndex?: CodegenTypes.WithDefault<CodegenTypes.Int32, 0>;
|
|
67
|
+
backgroundBlur?: CodegenTypes.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'>;
|
|
68
|
+
placement?: CodegenTypes.WithDefault<'automatic' | 'leading' | 'center' | 'trailing', 'automatic'>;
|
|
69
|
+
placementOffset?: CodegenTypes.WithDefault<CodegenTypes.Double, 16>;
|
|
70
|
+
insetAdjustment?: CodegenTypes.WithDefault<'automatic' | 'never', 'automatic'>;
|
|
71
|
+
dismissThreshold?: CodegenTypes.WithDefault<'half' | 'short', 'half'>;
|
|
72
|
+
grabber?: CodegenTypes.WithDefault<boolean, true>;
|
|
65
73
|
grabberOptions?: GrabberOptionsType;
|
|
66
74
|
accessibilityOptions?: AccessibilityOptionsType;
|
|
67
|
-
dismissible?: WithDefault<boolean, true>;
|
|
68
|
-
draggable?: WithDefault<boolean, true>;
|
|
69
|
-
dimmed?: WithDefault<boolean, true>;
|
|
70
|
-
initialDetentAnimated?: WithDefault<boolean, true>;
|
|
75
|
+
dismissible?: CodegenTypes.WithDefault<boolean, true>;
|
|
76
|
+
draggable?: CodegenTypes.WithDefault<boolean, true>;
|
|
77
|
+
dimmed?: CodegenTypes.WithDefault<boolean, true>;
|
|
78
|
+
initialDetentAnimated?: CodegenTypes.WithDefault<boolean, true>;
|
|
79
|
+
scrollableHandle?: CodegenTypes.WithDefault<CodegenTypes.Int32, -1>;
|
|
71
80
|
scrollableOptions?: ScrollableOptionsType;
|
|
72
81
|
headerOptions?: HeaderOptionsType;
|
|
73
82
|
footerOptions?: FooterOptionsType;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
83
|
+
foldOptions?: FoldOptionsType;
|
|
84
|
+
presentation?: CodegenTypes.WithDefault<'page' | 'form', 'page'>;
|
|
85
|
+
onMount?: CodegenTypes.DirectEventHandler<null>;
|
|
86
|
+
onWillPresent?: CodegenTypes.DirectEventHandler<DetentInfoEventPayload>;
|
|
87
|
+
onDidPresent?: CodegenTypes.DirectEventHandler<DetentInfoEventPayload>;
|
|
88
|
+
onWillDismiss?: CodegenTypes.DirectEventHandler<null>;
|
|
89
|
+
onDidDismiss?: CodegenTypes.DirectEventHandler<null>;
|
|
90
|
+
onDismissAttempt?: CodegenTypes.DirectEventHandler<null>;
|
|
91
|
+
onDetentChange?: CodegenTypes.DirectEventHandler<DetentInfoEventPayload>;
|
|
92
|
+
onDragBegin?: CodegenTypes.DirectEventHandler<DetentInfoEventPayload>;
|
|
93
|
+
onDragChange?: CodegenTypes.DirectEventHandler<DetentInfoEventPayload>;
|
|
94
|
+
onDragEnd?: CodegenTypes.DirectEventHandler<DetentInfoEventPayload>;
|
|
95
|
+
onPositionChange?: CodegenTypes.DirectEventHandler<PositionChangeEventPayload>;
|
|
96
|
+
onWillFocus?: CodegenTypes.DirectEventHandler<null>;
|
|
97
|
+
onDidFocus?: CodegenTypes.DirectEventHandler<null>;
|
|
98
|
+
onWillBlur?: CodegenTypes.DirectEventHandler<null>;
|
|
99
|
+
onDidBlur?: CodegenTypes.DirectEventHandler<null>;
|
|
100
|
+
onVisibilityChange?: CodegenTypes.DirectEventHandler<Readonly<{
|
|
90
101
|
visible: boolean;
|
|
91
102
|
}>>;
|
|
92
103
|
}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
1
|
+
{"version":3,"file":"TrueSheetViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/TrueSheetViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAG7F,KAAK,kBAAkB,GAAG,QAAQ,CAAC;IACjC,KAAK,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC;IAC7B,SAAS,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC;IAChC,YAAY,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,CAAC;IACjE,KAAK,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACnC,QAAQ,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;CACpD,CAAC,CAAC;AAEH,KAAK,wBAAwB,GAAG,QAAQ,CAAC;IACvC,YAAY,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IACjE,WAAW,CAAC,EAAE,YAAY,CAAC,WAAW,CACpC,MAAM,EACN,4DAA4D,CAC7D,CAAC;IACF,aAAa,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;IAC7D,cAAc,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC/D,WAAW,CAAC,EAAE,YAAY,CAAC,WAAW,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAAC;IAC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C,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACrD,gBAAgB,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACzD,cAAc,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;IACzE,WAAW,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;IACtE,YAAY,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;IACvE,SAAS,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;IACpE,gBAAgB,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,0BAA0B,CAAC,CAAC;IAC/E,WAAW,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACpD,UAAU,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACnD,UAAU,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IACnD,SAAS,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAClD,kBAAkB,CAAC,EAAE,YAAY,CAAC,kBAAkB,CAAC,QAAQ,CAAC;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC,CAAC;CACtF;;AAED,wBAEG"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export * from './TrueSheet';
|
|
2
2
|
export * from './TrueSheet.types';
|
|
3
3
|
export { TrueSheetPeek } from './TrueSheetPeek';
|
|
4
|
+
export { TrueSheetOverlay } from './TrueSheetOverlay';
|
|
4
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,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
|
|
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"}
|
|
@@ -29,6 +29,10 @@ export declare class TrueSheet extends React.Component<TrueSheetProps, TrueSheet
|
|
|
29
29
|
* Mock TrueSheetPeek component for testing.
|
|
30
30
|
*/
|
|
31
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>;
|
|
32
36
|
/**
|
|
33
37
|
* Mock TrueSheetProvider for testing.
|
|
34
38
|
*/
|
|
@@ -1 +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;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/mocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAwD,M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ParamListBase } from '../navigation/expo-router/base-types';
|
|
2
|
+
import type { TrueSheetNavigationProp } from '../navigation/expo-router/types';
|
|
3
3
|
import { TrueSheetActions } from './navigation';
|
|
4
4
|
/**
|
|
5
5
|
* Mock Sheet layout for testing.
|
|
@@ -18,5 +18,5 @@ export declare const useTrueSheetNavigation: jest.Mock<TrueSheetNavigationProp<P
|
|
|
18
18
|
export { TrueSheetActions };
|
|
19
19
|
export type { TrueSheetActionType } from '../navigation/actions';
|
|
20
20
|
export type { DetentInfoEventPayload, PositionChangeEventPayload } from '../TrueSheet.types';
|
|
21
|
-
export type { TrueSheetNavigationEventMap, TrueSheetNavigationHelpers, TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetScreenProps, } from '../navigation/types';
|
|
21
|
+
export type { TrueSheetNavigationEventMap, TrueSheetNavigationHelpers, TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetScreenProps, } from '../navigation/expo-router/types';
|
|
22
22
|
//# sourceMappingURL=navigationExpoRouter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigationExpoRouter.d.ts","sourceRoot":"","sources":["../../../../src/mocks/navigationExpoRouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
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,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"}
|
|
@@ -1,14 +1,40 @@
|
|
|
1
|
-
import type { NavigationAction, NavigationState, ParamListBase, Router, StackRouterOptions } from '@react-navigation/core';
|
|
2
1
|
import { type TrueSheetActionType } from './actions';
|
|
3
|
-
import type {
|
|
4
|
-
|
|
2
|
+
import type { TrueSheetRouter, TrueSheetRouterFactory, TrueSheetRouterOptions } from './types';
|
|
3
|
+
type SheetRoute = {
|
|
4
|
+
key: string;
|
|
5
|
+
name: string;
|
|
6
|
+
closing?: boolean;
|
|
7
|
+
dismissing?: boolean;
|
|
8
|
+
resizeIndex?: number;
|
|
9
|
+
resizeKey?: number;
|
|
10
|
+
};
|
|
11
|
+
type SheetState = {
|
|
12
|
+
key: string;
|
|
13
|
+
index: number;
|
|
14
|
+
routes: SheetRoute[];
|
|
15
|
+
};
|
|
5
16
|
/**
|
|
6
|
-
*
|
|
7
|
-
* action types the wrapper threads through — `StackRouter` is structural and
|
|
8
|
-
* never touches the sheet-specific fields.
|
|
9
|
-
* Injected by each entry point so the shared router never imports
|
|
10
|
-
* `@react-navigation/*` at runtime (Expo Router apps don't install it).
|
|
17
|
+
* Index of the route a `RESIZE` targets: the dispatching screen, else the focused route.
|
|
11
18
|
*/
|
|
12
|
-
export
|
|
13
|
-
|
|
19
|
+
export declare const getResizeRouteIndex: (state: SheetState, action: {
|
|
20
|
+
source?: string;
|
|
21
|
+
target?: string;
|
|
22
|
+
}) => number;
|
|
23
|
+
/**
|
|
24
|
+
* Reduces the sheet-specific actions shared by every router flavour.
|
|
25
|
+
* Returns `undefined` for actions the base `StackRouter` should handle.
|
|
26
|
+
*/
|
|
27
|
+
export declare const getTrueSheetStateForAction: <State extends SheetState>(state: State, action: TrueSheetActionType) => State | null | undefined;
|
|
28
|
+
/**
|
|
29
|
+
* Reduces an action that targets the base route by name. React Navigation 7 adds another base
|
|
30
|
+
* route for a `PUSH`, a `REPLACE` or a `NAVIGATE` without `pop`, which presents the base screen
|
|
31
|
+
* as a sheet, and this router's `POP_TO` drops the params and nested state. This goes back to it
|
|
32
|
+
* instead: `getPoppedState` reduces the action as a `NAVIGATE` with `pop` (a `PUSH` ignores
|
|
33
|
+
* `pop`) to update the base route (params, nested state), then the sheets above it are dismissed.
|
|
34
|
+
* Returns `undefined` for other actions, a `REPLACE` with no sheet (it swaps the base route), or
|
|
35
|
+
* when the base router doesn't land on the base route.
|
|
36
|
+
*/
|
|
37
|
+
export declare const getStateForNavigateToBase: <State extends SheetState>(state: State, action: TrueSheetActionType, getPoppedState: (action: TrueSheetActionType) => State | null | undefined) => State | undefined;
|
|
38
|
+
export declare const createTrueSheetRouter: (stackRouter: TrueSheetRouterFactory) => (routerOptions: TrueSheetRouterOptions) => TrueSheetRouter;
|
|
39
|
+
export {};
|
|
14
40
|
//# sourceMappingURL=createTrueSheetRouter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTrueSheetRouter.d.ts","sourceRoot":"","sources":["../../../../src/navigation/createTrueSheetRouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"createTrueSheetRouter.d.ts","sourceRoot":"","sources":["../../../../src/navigation/createTrueSheetRouter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC;AACvE,OAAO,KAAK,EACV,eAAe,EACf,sBAAsB,EACtB,sBAAsB,EAEvB,MAAM,SAAS,CAAC;AAgCjB,KAAK,UAAU,GAAG;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AACF,KAAK,UAAU,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,UAAU,EAAE,CAAA;CAAE,CAAC;AAEvE;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAC9B,OAAO,UAAU,EACjB,QAAQ;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,KAC3C,MAGc,CAAC;AAElB;;;GAGG;AACH,eAAO,MAAM,0BAA0B,GAAI,KAAK,SAAS,UAAU,EACjE,OAAO,KAAK,EACZ,QAAQ,mBAAmB,KAC1B,KAAK,GAAG,IAAI,GAAG,SAoHjB,CAAC;AAUF;;;;;;;;GAQG;AACH,eAAO,MAAM,yBAAyB,GAAI,KAAK,SAAS,UAAU,EAChE,OAAO,KAAK,EACZ,QAAQ,mBAAmB,EAC3B,gBAAgB,CAAC,MAAM,EAAE,mBAAmB,KAAK,KAAK,GAAG,IAAI,GAAG,SAAS,KACxE,KAAK,GAAG,SAgCV,CAAC;AAEF,eAAO,MAAM,qBAAqB,GAC/B,aAAa,sBAAsB,MACnC,eAAe,sBAAsB,KAAG,eAwDxC,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,33 @@
|
|
|
1
|
+
import { type TrueSheetActionType } from '../actions';
|
|
2
|
+
import type { StackRouterFactory, TrueSheetRouterFactory, TrueSheetRouterState } from './types';
|
|
3
|
+
type ActionResult = {
|
|
4
|
+
state: TrueSheetRouterState;
|
|
5
|
+
affectedRouteKey?: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* `RouterActionHandling.Unhandled` from Expo Router 58+, which deprecates `null`.
|
|
9
|
+
*/
|
|
10
|
+
export type Unhandled = 'UNHANDLED';
|
|
11
|
+
type RouterExtension = (context: {
|
|
12
|
+
baseRouter: {
|
|
13
|
+
getStateForAction(state: TrueSheetRouterState, action: TrueSheetActionType, options: object): ActionResult | Unhandled;
|
|
14
|
+
};
|
|
15
|
+
options: {
|
|
16
|
+
initialRouteName?: string;
|
|
17
|
+
};
|
|
18
|
+
}) => object;
|
|
19
|
+
/**
|
|
20
|
+
* `extendRouter` from Expo Router 58+. Declared locally because the
|
|
21
|
+
* Expo Router types this package builds against predate it.
|
|
22
|
+
*/
|
|
23
|
+
export type ExtendRouter = (base: StackRouterFactory, extension: RouterExtension, options: {
|
|
24
|
+
type: string;
|
|
25
|
+
}) => TrueSheetRouterFactory;
|
|
26
|
+
/**
|
|
27
|
+
* Router for Expo Router 58+, where navigator state is seeded by Expo Router
|
|
28
|
+
* (no `getInitialState`/`getRehydratedState`) and `getStateForAction` returns
|
|
29
|
+
* `{ state, affectedRouteKey }`.
|
|
30
|
+
*/
|
|
31
|
+
export declare const extendTrueSheetRouter: (extendRouter: ExtendRouter, stackRouter: StackRouterFactory, unhandled: Unhandled) => TrueSheetRouterFactory;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=extendTrueSheetRouter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"extendTrueSheetRouter.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/expo-router/extendTrueSheetRouter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAMxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEhG,KAAK,YAAY,GAAG;IAAE,KAAK,EAAE,oBAAoB,CAAC;IAAC,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/E;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,WAAW,CAAC;AAEpC,KAAK,eAAe,GAAG,CAAC,OAAO,EAAE;IAC/B,UAAU,EAAE;QACV,iBAAiB,CACf,KAAK,EAAE,oBAAoB,EAC3B,MAAM,EAAE,mBAAmB,EAC3B,OAAO,EAAE,MAAM,GACd,YAAY,GAAG,SAAS,CAAC;KAC7B,CAAC;IACF,OAAO,EAAE;QAAE,gBAAgB,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACxC,KAAK,MAAM,CAAC;AAEb;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,CACzB,IAAI,EAAE,kBAAkB,EACxB,SAAS,EAAE,eAAe,EAC1B,OAAO,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,KACtB,sBAAsB,CAAC;AAE5B;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,GAChC,cAAc,YAAY,EAC1B,aAAa,kBAAkB,EAC/B,WAAW,SAAS,KACnB,sBAqDA,CAAC"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type {
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import * as ExpoRouter from 'expo-router';
|
|
2
|
+
import type { ParamListBase } from './base-types';
|
|
3
|
+
import type { TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetNavigatorProps, TrueSheetStandardEventMap } from './types';
|
|
4
|
+
declare const SheetNavigator: import("react").ForwardRefExoticComponent<Omit<import("expo-router/build/standard-navigation/types").StandardRouterNavigatorProps<TrueSheetNavigationState<ParamListBase>, TrueSheetNavigationOptions, TrueSheetStandardEventMap, object, ExpoRouter.StackRouterOptions>, "children"> & Partial<Pick<import("expo-router/build/standard-navigation/types").StandardRouterNavigatorProps<TrueSheetNavigationState<ParamListBase>, TrueSheetNavigationOptions, TrueSheetStandardEventMap, object, ExpoRouter.StackRouterOptions>, "children">> & import("react").RefAttributes<unknown> & {
|
|
5
|
+
unstable_screenErrorBoundary?: import("react").ComponentType<import("expo-router").ErrorBoundaryProps>;
|
|
6
|
+
}> & {
|
|
7
|
+
Screen: (props: ExpoRouter.ScreenProps<TrueSheetNavigationOptions, TrueSheetNavigationState<ParamListBase>, TrueSheetStandardEventMap & import("expo-router/react-navigation").EventMapBase>) => null;
|
|
5
8
|
Protected: typeof import("expo-router/build/views/Protected").Protected;
|
|
6
9
|
};
|
|
7
|
-
type SheetProps = Omit<React.ComponentProps<typeof SheetNavigator>, 'screenListeners'
|
|
10
|
+
type SheetProps = Omit<React.ComponentProps<typeof SheetNavigator>, 'screenListeners'> & Pick<TrueSheetNavigatorProps, 'screenListeners'>;
|
|
8
11
|
/**
|
|
9
12
|
* TrueSheet navigator layout for Expo Router.
|
|
10
13
|
*
|
|
@@ -33,5 +36,5 @@ export declare const Sheet: React.ComponentType<SheetProps> & {
|
|
|
33
36
|
export declare const useTrueSheetNavigation: <T extends ParamListBase = ParamListBase>() => TrueSheetNavigationProp<T>;
|
|
34
37
|
export { TrueSheetActions, type TrueSheetActionType } from '../actions';
|
|
35
38
|
export type { DetentInfoEventPayload, PositionChangeEventPayload } from '../../TrueSheet.types';
|
|
36
|
-
export type { TrueSheetNavigationEventMap, TrueSheetNavigationHelpers, TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetScreenProps, } from '
|
|
39
|
+
export type { TrueSheetNavigationEventMap, TrueSheetNavigationHelpers, TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetScreenProps, } from './types';
|
|
37
40
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/expo-router/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/navigation/expo-router/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,aAAa,CAAC;AAK1C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,OAAO,KAAK,EAEV,0BAA0B,EAC1B,uBAAuB,EACvB,wBAAwB,EAExB,uBAAuB,EAGvB,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AAsBjB,QAAA,MAAM,cAAc;;;;;CAYlB,CAAC;AAIH,KAAK,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,EAAE,iBAAiB,CAAC,GACpF,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`, `dismissing`, `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,KA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,EACT,WAAW,EACX,wBAAwB,CAAC,SAAS,CAAC,EACnC,0BAA0B,EAC1B,2BAA2B,CAC5B,GACC,sBAAsB,CAAC,SAAS,CAAC,CAAC;AAEpC,MAAM,MAAM,oBAAoB,CAC9B,SAAS,SAAS,aAAa,EAC/B,SAAS,SAAS,MAAM,SAAS,GAAG,MAAM,EAC1C,WAAW,SAAS,MAAM,GAAG,SAAS,GAAG,SAAS,IAChD;IACF,UAAU,EAAE,uBAAuB,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC;IACvE,KAAK,EAAE,SAAS,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG,iBAAiB,CACxD,aAAa,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"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type StandardNavigationTypeBagBase } from '@react-navigation/native';
|
|
2
|
-
import type { TrueSheetActionHelpers, TrueSheetNavigationOptions, TrueSheetNavigationEventMap, TrueSheetNavigationState } from './types';
|
|
3
|
-
import type { TrueSheetRouterOptions } from './createTrueSheetRouter';
|
|
2
|
+
import type { TrueSheetActionHelpers, TrueSheetNavigationOptions, TrueSheetNavigationEventMap, TrueSheetNavigationState, TrueSheetRouterOptions } from './types';
|
|
4
3
|
export interface TrueSheetNavigationTypeBag extends StandardNavigationTypeBagBase {
|
|
5
4
|
State: TrueSheetNavigationState<this['ParamList']>;
|
|
6
5
|
ActionHelpers: TrueSheetActionHelpers<this['ParamList']>;
|
|
@@ -39,8 +38,8 @@ export declare const createTrueSheetScreen: import("@react-navigation/core").Sta
|
|
|
39
38
|
Navigator: import("react").ComponentType<{}>;
|
|
40
39
|
}>;
|
|
41
40
|
export { TrueSheetActions, type TrueSheetActionType } from './actions';
|
|
42
|
-
export { createTrueSheetRouter
|
|
41
|
+
export { createTrueSheetRouter } from './createTrueSheetRouter';
|
|
43
42
|
export { useTrueSheetNavigation } from './useTrueSheetNavigation';
|
|
44
43
|
export type { DetentInfoEventPayload, PositionChangeEventPayload } from '../TrueSheet.types';
|
|
45
|
-
export type { TrueSheetNavigationEventMap, TrueSheetNavigationHelpers, TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetScreenProps, } from './types';
|
|
44
|
+
export type { StackRouterFactory, TrueSheetNavigationEventMap, TrueSheetNavigationHelpers, TrueSheetNavigationOptions, TrueSheetNavigationProp, TrueSheetNavigationState, TrueSheetRouterOptions, TrueSheetScreenProps, } from './types';
|
|
46
45
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +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,
|
|
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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TrueSheet } from '../../TrueSheet';
|
|
2
|
-
import type { DetentChangeEvent, DetentInfoEventPayload, DidBlurEvent, DidFocusEvent, DidPresentEvent, DragBeginEvent, DragChangeEvent, DragEndEvent, PositionChangeEvent, PositionChangeEventPayload, WillBlurEvent, WillDismissEvent, WillFocusEvent, WillPresentEvent } from '../../TrueSheet.types';
|
|
2
|
+
import type { DetentChangeEvent, DetentInfoEventPayload, DidBlurEvent, DidFocusEvent, DidPresentEvent, DragBeginEvent, DragChangeEvent, DragEndEvent, PositionChangeEvent, PositionChangeEventPayload, WillBlurEvent, WillDismissEvent, DismissAttemptEvent, WillFocusEvent, WillPresentEvent } from '../../TrueSheet.types';
|
|
3
3
|
import type { TrueSheetDispatch, TrueSheetEmitFn, TrueSheetNavigationEventMap } from '../types';
|
|
4
4
|
interface UseSheetScreenStateProps {
|
|
5
5
|
detentIndex: number;
|
|
@@ -18,6 +18,7 @@ export declare const useSheetScreenState: (props: UseSheetScreenStateProps) => {
|
|
|
18
18
|
onDidPresent: (e: DidPresentEvent) => void;
|
|
19
19
|
onWillDismiss: (_e: WillDismissEvent) => void;
|
|
20
20
|
onDidDismiss: () => void;
|
|
21
|
+
onDismissAttempt: (_e: DismissAttemptEvent) => void;
|
|
21
22
|
onDetentChange: (e: DetentChangeEvent) => void;
|
|
22
23
|
onDragBegin: (e: DragBeginEvent) => void;
|
|
23
24
|
onDragChange: (e: DragChangeEvent) => void;
|
|
@@ -1 +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,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
|
|
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"}
|