@surdeddd/bottom-sheet 0.2.0 → 0.4.0
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 +51 -21
- package/dist/{BottomSheetEngine-CIT9Htti.d.cts → BottomSheetEngine-BJrH7qY3.d.cts} +105 -3
- package/dist/{BottomSheetEngine-Df9MwBbm.d.ts → BottomSheetEngine-L05jGZvU.d.ts} +105 -3
- package/dist/element.cjs +1170 -196
- package/dist/element.d.cts +29 -5
- package/dist/element.d.ts +29 -5
- package/dist/element.iife.global.js +2 -2
- package/dist/element.js +1170 -196
- package/dist/index.cjs +1051 -220
- package/dist/index.d.cts +18 -3
- package/dist/index.d.ts +18 -3
- package/dist/index.js +1049 -221
- package/dist/integrations/formik.d.cts +1 -1
- package/dist/integrations/formik.d.ts +1 -1
- package/dist/integrations/react-hook-form.d.cts +1 -1
- package/dist/integrations/react-hook-form.d.ts +1 -1
- package/dist/overlay.cjs +181 -37
- package/dist/overlay.d.cts +13 -0
- package/dist/overlay.d.ts +13 -0
- package/dist/overlay.js +181 -37
- package/dist/preact.d.cts +1 -1
- package/dist/preact.d.ts +1 -1
- package/dist/qwik.cjs +966 -195
- package/dist/qwik.d.cts +4 -2
- package/dist/qwik.d.ts +4 -2
- package/dist/qwik.js +967 -196
- package/dist/react.cjs +1242 -272
- package/dist/react.d.cts +47 -5
- package/dist/react.d.ts +47 -5
- package/dist/react.js +1242 -272
- package/dist/solid.cjs +992 -236
- package/dist/solid.d.cts +299 -4
- package/dist/solid.d.ts +299 -4
- package/dist/solid.js +993 -237
- package/dist/solid.source.jsx +3476 -0
- package/dist/styles.css +67 -66
- package/dist/svelte-core.cjs +3415 -0
- package/dist/svelte-core.js +3413 -0
- package/dist/svelte-src/BottomSheet.svelte +308 -0
- package/dist/svelte-src/index.js +2 -0
- package/dist/svelte.cjs +1034 -207
- package/dist/svelte.d.cts +121 -0
- package/dist/svelte.d.ts +28 -3
- package/dist/svelte.js +1035 -208
- package/dist/vue.cjs +1191 -205
- package/dist/vue.d.cts +127 -0
- package/dist/vue.d.ts +57 -4
- package/dist/vue.js +1192 -206
- package/package.json +105 -45
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { B as BottomSheetEngine, E as EngineState, P as Plugin,
|
|
1
|
+
import { d as SnapPoint, b as SheetMode, a as SnapPointDef, c as EngineOptions, f as ScrimOverlayPosition } from './BottomSheetEngine-BJrH7qY3.cjs';
|
|
2
|
+
export { g as AnchorAnimationPreset, h as AnchorAnimationSpec, i as AnchorHandle, A as AnchorOptions, j as AnchorPosition, k as AnchorState, B as BottomSheetEngine, C as CloseReason, E as EngineState, P as Plugin, l as SCRIM_PRESETS, m as ScrimOverlayOptions, n as ScrimPreset, o as ScrimPresetConfig, p as ScrimStageDef, S as ScrimStagesOptions, q as ScrimUpdate, e as SheetEventMap, r as SnapId, T as TeardownScope, s as runAnchorTransition } from './BottomSheetEngine-BJrH7qY3.cjs';
|
|
3
3
|
export { OVERLAY_PRESETS, Overlay, OverlayAnimation, OverlayCloseReason, OverlayEdge, Overlay as OverlayEngine, OverlayEventMap, OverlayMountTarget, OverlayOptions, OverlayPreset, OverlayState, OverlayUpdate, SwipeToCloseConfig, createOverlay } from './overlay.cjs';
|
|
4
4
|
import './transform-jVfAikE9.cjs';
|
|
5
5
|
|
|
@@ -75,12 +75,17 @@ type StackEntry = {
|
|
|
75
75
|
id: string;
|
|
76
76
|
setZIndex: (z: number) => void;
|
|
77
77
|
setIsTop: (isTop: boolean) => void;
|
|
78
|
+
isOpen?: () => boolean;
|
|
79
|
+
setDepth?: (depth: number) => void;
|
|
78
80
|
};
|
|
79
81
|
declare class SheetStack {
|
|
80
82
|
private entries;
|
|
81
83
|
push(entry: StackEntry): () => void;
|
|
82
84
|
remove(id: string): void;
|
|
85
|
+
promote(id: string): void;
|
|
86
|
+
update(): void;
|
|
83
87
|
size(): number;
|
|
88
|
+
depthOf(id: string): number;
|
|
84
89
|
clear(): void;
|
|
85
90
|
private recompute;
|
|
86
91
|
}
|
|
@@ -100,4 +105,14 @@ type SheetManager<Key extends string = string> = {
|
|
|
100
105
|
};
|
|
101
106
|
declare const createSheetManager: <Key extends string = string>(initial?: Record<Key, SheetConfig<Key>>) => SheetManager<Key>;
|
|
102
107
|
|
|
103
|
-
|
|
108
|
+
type SheetAnchoredStyle = {
|
|
109
|
+
top?: string;
|
|
110
|
+
bottom?: string;
|
|
111
|
+
left?: string;
|
|
112
|
+
right?: string;
|
|
113
|
+
transform?: string;
|
|
114
|
+
};
|
|
115
|
+
declare function resolveSheetAnchoredStyle(mode: SheetMode, position: "sheet-top-left" | "sheet-top-center" | "sheet-top-right", inset: string): SheetAnchoredStyle;
|
|
116
|
+
declare function applyOverlayPosition(ws: CSSStyleDeclaration, mode: SheetMode, position: ScrimOverlayPosition, inset: string): void;
|
|
117
|
+
|
|
118
|
+
export { DEFAULT_SPRING, EngineOptions, type ResolvedSnap, ScrimOverlayPosition, type SheetConfig, type SheetManager, SheetMode, SnapPoint, SnapPointDef, type SpringConfig, type SpringHandle, type SpringRunOptions, type StackEntry, type Tween, type TweenOptions, allowedRange, applyOverlayPosition, attachGestures, createSheetManager, easeOutBack, easeOutCubic, findById, findNearest, installFocusTrap, installGestures, lockBodyScroll, prefersReducedMotion, resolveSheetAnchoredStyle, resolveSnap, resolveSnapList, runSpring, sheetStack, tween };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { B as BottomSheetEngine, E as EngineState, P as Plugin,
|
|
1
|
+
import { d as SnapPoint, b as SheetMode, a as SnapPointDef, c as EngineOptions, f as ScrimOverlayPosition } from './BottomSheetEngine-L05jGZvU.js';
|
|
2
|
+
export { g as AnchorAnimationPreset, h as AnchorAnimationSpec, i as AnchorHandle, A as AnchorOptions, j as AnchorPosition, k as AnchorState, B as BottomSheetEngine, C as CloseReason, E as EngineState, P as Plugin, l as SCRIM_PRESETS, m as ScrimOverlayOptions, n as ScrimPreset, o as ScrimPresetConfig, p as ScrimStageDef, S as ScrimStagesOptions, q as ScrimUpdate, e as SheetEventMap, r as SnapId, T as TeardownScope, s as runAnchorTransition } from './BottomSheetEngine-L05jGZvU.js';
|
|
3
3
|
export { OVERLAY_PRESETS, Overlay, OverlayAnimation, OverlayCloseReason, OverlayEdge, Overlay as OverlayEngine, OverlayEventMap, OverlayMountTarget, OverlayOptions, OverlayPreset, OverlayState, OverlayUpdate, SwipeToCloseConfig, createOverlay } from './overlay.js';
|
|
4
4
|
import './transform-jVfAikE9.js';
|
|
5
5
|
|
|
@@ -75,12 +75,17 @@ type StackEntry = {
|
|
|
75
75
|
id: string;
|
|
76
76
|
setZIndex: (z: number) => void;
|
|
77
77
|
setIsTop: (isTop: boolean) => void;
|
|
78
|
+
isOpen?: () => boolean;
|
|
79
|
+
setDepth?: (depth: number) => void;
|
|
78
80
|
};
|
|
79
81
|
declare class SheetStack {
|
|
80
82
|
private entries;
|
|
81
83
|
push(entry: StackEntry): () => void;
|
|
82
84
|
remove(id: string): void;
|
|
85
|
+
promote(id: string): void;
|
|
86
|
+
update(): void;
|
|
83
87
|
size(): number;
|
|
88
|
+
depthOf(id: string): number;
|
|
84
89
|
clear(): void;
|
|
85
90
|
private recompute;
|
|
86
91
|
}
|
|
@@ -100,4 +105,14 @@ type SheetManager<Key extends string = string> = {
|
|
|
100
105
|
};
|
|
101
106
|
declare const createSheetManager: <Key extends string = string>(initial?: Record<Key, SheetConfig<Key>>) => SheetManager<Key>;
|
|
102
107
|
|
|
103
|
-
|
|
108
|
+
type SheetAnchoredStyle = {
|
|
109
|
+
top?: string;
|
|
110
|
+
bottom?: string;
|
|
111
|
+
left?: string;
|
|
112
|
+
right?: string;
|
|
113
|
+
transform?: string;
|
|
114
|
+
};
|
|
115
|
+
declare function resolveSheetAnchoredStyle(mode: SheetMode, position: "sheet-top-left" | "sheet-top-center" | "sheet-top-right", inset: string): SheetAnchoredStyle;
|
|
116
|
+
declare function applyOverlayPosition(ws: CSSStyleDeclaration, mode: SheetMode, position: ScrimOverlayPosition, inset: string): void;
|
|
117
|
+
|
|
118
|
+
export { DEFAULT_SPRING, EngineOptions, type ResolvedSnap, ScrimOverlayPosition, type SheetConfig, type SheetManager, SheetMode, SnapPoint, SnapPointDef, type SpringConfig, type SpringHandle, type SpringRunOptions, type StackEntry, type Tween, type TweenOptions, allowedRange, applyOverlayPosition, attachGestures, createSheetManager, easeOutBack, easeOutCubic, findById, findNearest, installFocusTrap, installGestures, lockBodyScroll, prefersReducedMotion, resolveSheetAnchoredStyle, resolveSnap, resolveSnapList, runSpring, sheetStack, tween };
|