@surdeddd/bottom-sheet 0.13.0 → 0.20.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 +46 -0
- package/dist/{BottomSheetCore-D16lsa6g.d.ts → BottomSheetCore-Cgn8b_6A.d.ts} +36 -2
- package/dist/{BottomSheetCore-CsIjyq7C.d.cts → BottomSheetCore-VPJZcKcg.d.cts} +36 -2
- package/dist/{BottomSheetEngine-BYjAVrmd.d.cts → BottomSheetEngine-B8C2CwF9.d.cts} +1 -1
- package/dist/{BottomSheetEngine-YuCNugZn.d.ts → BottomSheetEngine-DwYR_ygJ.d.ts} +1 -1
- package/dist/core.cjs +328 -33
- package/dist/core.d.cts +2 -2
- package/dist/core.d.ts +2 -2
- package/dist/core.js +328 -33
- package/dist/debug.d.cts +1 -1
- package/dist/debug.d.ts +1 -1
- package/dist/element.cjs +404 -108
- package/dist/element.d.cts +2 -2
- package/dist/element.d.ts +2 -2
- package/dist/element.iife.global.js +2 -2
- package/dist/element.js +404 -108
- package/dist/features.cjs +6 -50
- package/dist/features.d.cts +4 -4
- package/dist/features.d.ts +4 -4
- package/dist/features.js +6 -50
- package/dist/index-CnfbOKx0.d.cts +9 -0
- package/dist/index-DcMkhXAy.d.ts +9 -0
- package/dist/index.cjs +335 -829
- package/dist/index.d.cts +44 -47
- package/dist/index.d.ts +44 -47
- package/dist/index.js +336 -816
- 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 +5 -5
- package/dist/overlay.js +5 -5
- package/dist/preact.d.cts +2 -2
- package/dist/preact.d.ts +2 -2
- package/dist/qwik-lib/index.qwik.cjs +323 -83
- package/dist/qwik-lib/index.qwik.mjs +323 -83
- package/dist/qwik.cjs +342 -83
- package/dist/qwik.d.cts +4 -2
- package/dist/qwik.d.ts +4 -2
- package/dist/qwik.js +342 -83
- package/dist/react.cjs +347 -85
- package/dist/react.d.cts +3 -4
- package/dist/react.d.ts +3 -4
- package/dist/react.js +347 -85
- package/dist/solid.cjs +348 -83
- package/dist/solid.d.cts +37 -1
- package/dist/solid.d.ts +37 -1
- package/dist/solid.js +348 -83
- package/dist/solid.source.jsx +356 -83
- package/dist/styles.css +24 -4
- package/dist/svelte-core.cjs +334 -83
- package/dist/svelte-core.js +334 -83
- package/dist/svelte-src/BottomSheet.svelte +14 -0
- package/dist/svelte.cjs +344 -83
- package/dist/svelte.d.cts +2 -0
- package/dist/svelte.d.ts +2 -0
- package/dist/svelte.js +344 -83
- package/dist/vue.cjs +350 -83
- package/dist/vue.js +350 -83
- package/dist/webgl.cjs +673 -0
- package/dist/webgl.d.cts +17 -0
- package/dist/webgl.d.ts +17 -0
- package/dist/webgl.js +671 -0
- package/package.json +64 -40
- package/dist/index-DdYLOIIT.d.ts +0 -15
- package/dist/index-dfrzw-lI.d.cts +0 -15
package/dist/index.d.cts
CHANGED
|
@@ -1,48 +1,10 @@
|
|
|
1
|
-
export { B as BottomSheetEngine } from './BottomSheetEngine-
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
1
|
+
export { B as BottomSheetEngine } from './BottomSheetEngine-B8C2CwF9.cjs';
|
|
2
|
+
import { d as SnapPoint, b as SheetMode, c as EngineOptions, P as PhysicalSheetMode, g as ScrimOverlayPosition } from './BottomSheetCore-VPJZcKcg.cjs';
|
|
3
|
+
export { h as AnchorAnimationPreset, i as AnchorAnimationSpec, j as AnchorHandle, A as AnchorOptions, k as AnchorPosition, l as AnchorState, B as BottomSheetCore, C as CloseReason, f as EngineFeature, m as EngineFeatureContext, n as EngineFeatureOptions, o as EngineFeatureStage, E as EngineState, L as LogicalSheetMode, p as Plugin, q as SCRIM_PRESETS, r as ScrimOverlayOptions, s as ScrimPreset, t as ScrimPresetConfig, u as ScrimStageDef, e as ScrimStagesOptions, v as ScrimUpdate, S as SheetEventMap, w as SnapId, a as SnapPointDef, T as TeardownScope, x as runAnchorTransition } from './BottomSheetCore-VPJZcKcg.cjs';
|
|
4
4
|
export { autoCollapseFeature, contentSwipeFeature, defaultEngineFeatures, persistFeature, routeFeature, visualViewportFeature } from './features.cjs';
|
|
5
|
-
export { R as ResolvedSnap,
|
|
6
|
-
export { OVERLAY_PRESETS, Overlay, OverlayAnimation, OverlayCloseReason, OverlayEdge, Overlay as OverlayEngine, OverlayEventMap, OverlayMountTarget, OverlayOptions, OverlayPreset, OverlayState, OverlayUpdate, SwipeToCloseConfig, createOverlay } from './overlay.cjs';
|
|
5
|
+
export { R as ResolvedSnap, r as resolveSnapList } from './index-CnfbOKx0.cjs';
|
|
7
6
|
import './transform-jVfAikE9.cjs';
|
|
8
7
|
|
|
9
|
-
declare const easeOutBack: (t: number) => number;
|
|
10
|
-
declare const easeOutCubic: (t: number) => number;
|
|
11
|
-
type Tween = {
|
|
12
|
-
cancel: () => void;
|
|
13
|
-
promise: Promise<void>;
|
|
14
|
-
};
|
|
15
|
-
type TweenOptions = {
|
|
16
|
-
from: number;
|
|
17
|
-
to: number;
|
|
18
|
-
duration: number;
|
|
19
|
-
easing?: (t: number) => number;
|
|
20
|
-
onUpdate: (value: number) => void;
|
|
21
|
-
};
|
|
22
|
-
declare const tween: ({ from, to, duration, easing, onUpdate, }: TweenOptions) => Tween;
|
|
23
|
-
declare const prefersReducedMotion: () => boolean;
|
|
24
|
-
|
|
25
|
-
type SpringConfig = {
|
|
26
|
-
stiffness: number;
|
|
27
|
-
damping: number;
|
|
28
|
-
mass: number;
|
|
29
|
-
restDelta?: number;
|
|
30
|
-
restSpeed?: number;
|
|
31
|
-
};
|
|
32
|
-
declare const DEFAULT_SPRING: SpringConfig;
|
|
33
|
-
type SpringRunOptions = {
|
|
34
|
-
from: number;
|
|
35
|
-
to: number;
|
|
36
|
-
velocity?: number;
|
|
37
|
-
config?: Partial<SpringConfig>;
|
|
38
|
-
onUpdate: (value: number, velocity: number) => void;
|
|
39
|
-
};
|
|
40
|
-
type SpringHandle = {
|
|
41
|
-
cancel: () => void;
|
|
42
|
-
promise: Promise<void>;
|
|
43
|
-
};
|
|
44
|
-
declare const runSpring: ({ from, to, velocity, config, onUpdate, }: SpringRunOptions) => SpringHandle;
|
|
45
|
-
|
|
46
8
|
declare const resolveSnap: (point: SnapPoint | string, mode: SheetMode, measureFit?: () => number) => number;
|
|
47
9
|
|
|
48
10
|
type PointerKind = "touch" | "mouse" | "pen";
|
|
@@ -52,8 +14,12 @@ type GestureCallbacks = {
|
|
|
52
14
|
onEnd: (delta: number, velocity: number, pointerType: PointerKind) => void;
|
|
53
15
|
onCancel?: () => void;
|
|
54
16
|
};
|
|
55
|
-
|
|
56
|
-
|
|
17
|
+
type GestureOptions = {
|
|
18
|
+
shouldStart?: (e: PointerEvent) => boolean;
|
|
19
|
+
deferStart?: (e: PointerEvent, delta: number, crossDelta: number) => boolean | null;
|
|
20
|
+
manageTouchAction?: boolean;
|
|
21
|
+
};
|
|
22
|
+
declare const installGestures: (handle: HTMLElement, mode: SheetMode, callbacks: GestureCallbacks, options?: GestureOptions) => (() => void);
|
|
57
23
|
|
|
58
24
|
declare const installFocusTrap: (container: HTMLElement, options?: {
|
|
59
25
|
initialFocus?: HTMLElement | string | false;
|
|
@@ -96,6 +62,37 @@ type SheetManager<Key extends string = string> = {
|
|
|
96
62
|
};
|
|
97
63
|
declare const createSheetManager: <Key extends string = string>(initial?: Record<Key, SheetConfig<Key>>) => SheetManager<Key>;
|
|
98
64
|
|
|
65
|
+
type Tween = {
|
|
66
|
+
cancel: () => void;
|
|
67
|
+
promise: Promise<void>;
|
|
68
|
+
};
|
|
69
|
+
type TweenOptions = {
|
|
70
|
+
from: number;
|
|
71
|
+
to: number;
|
|
72
|
+
duration: number;
|
|
73
|
+
easing?: (t: number) => number;
|
|
74
|
+
onUpdate: (value: number) => void;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
type SpringConfig = {
|
|
78
|
+
stiffness: number;
|
|
79
|
+
damping: number;
|
|
80
|
+
mass: number;
|
|
81
|
+
restDelta?: number;
|
|
82
|
+
restSpeed?: number;
|
|
83
|
+
};
|
|
84
|
+
type SpringRunOptions = {
|
|
85
|
+
from: number;
|
|
86
|
+
to: number;
|
|
87
|
+
velocity?: number;
|
|
88
|
+
config?: Partial<SpringConfig>;
|
|
89
|
+
onUpdate: (value: number, velocity: number) => void;
|
|
90
|
+
};
|
|
91
|
+
type SpringHandle = {
|
|
92
|
+
cancel: () => void;
|
|
93
|
+
promise: Promise<void>;
|
|
94
|
+
};
|
|
95
|
+
|
|
99
96
|
type SheetAnchoredStyle = {
|
|
100
97
|
top?: string;
|
|
101
98
|
bottom?: string;
|
|
@@ -103,7 +100,7 @@ type SheetAnchoredStyle = {
|
|
|
103
100
|
right?: string;
|
|
104
101
|
transform?: string;
|
|
105
102
|
};
|
|
106
|
-
declare function resolveSheetAnchoredStyle(mode:
|
|
107
|
-
declare function applyOverlayPosition(ws: CSSStyleDeclaration, mode:
|
|
103
|
+
declare function resolveSheetAnchoredStyle(mode: PhysicalSheetMode, position: "sheet-top-left" | "sheet-top-center" | "sheet-top-right", inset: string): SheetAnchoredStyle;
|
|
104
|
+
declare function applyOverlayPosition(ws: CSSStyleDeclaration, mode: PhysicalSheetMode, position: ScrimOverlayPosition, inset: string): void;
|
|
108
105
|
|
|
109
|
-
export {
|
|
106
|
+
export { EngineOptions, PhysicalSheetMode, ScrimOverlayPosition, type SheetConfig, type SheetManager, SheetMode, SnapPoint, type SpringConfig, type SpringHandle, type SpringRunOptions, type StackEntry, type Tween, type TweenOptions, applyOverlayPosition, createSheetManager, installFocusTrap, installGestures, lockBodyScroll, resolveSheetAnchoredStyle, resolveSnap, sheetStack };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,48 +1,10 @@
|
|
|
1
|
-
export { B as BottomSheetEngine } from './BottomSheetEngine-
|
|
2
|
-
import {
|
|
3
|
-
export {
|
|
1
|
+
export { B as BottomSheetEngine } from './BottomSheetEngine-DwYR_ygJ.js';
|
|
2
|
+
import { d as SnapPoint, b as SheetMode, c as EngineOptions, P as PhysicalSheetMode, g as ScrimOverlayPosition } from './BottomSheetCore-Cgn8b_6A.js';
|
|
3
|
+
export { h as AnchorAnimationPreset, i as AnchorAnimationSpec, j as AnchorHandle, A as AnchorOptions, k as AnchorPosition, l as AnchorState, B as BottomSheetCore, C as CloseReason, f as EngineFeature, m as EngineFeatureContext, n as EngineFeatureOptions, o as EngineFeatureStage, E as EngineState, L as LogicalSheetMode, p as Plugin, q as SCRIM_PRESETS, r as ScrimOverlayOptions, s as ScrimPreset, t as ScrimPresetConfig, u as ScrimStageDef, e as ScrimStagesOptions, v as ScrimUpdate, S as SheetEventMap, w as SnapId, a as SnapPointDef, T as TeardownScope, x as runAnchorTransition } from './BottomSheetCore-Cgn8b_6A.js';
|
|
4
4
|
export { autoCollapseFeature, contentSwipeFeature, defaultEngineFeatures, persistFeature, routeFeature, visualViewportFeature } from './features.js';
|
|
5
|
-
export { R as ResolvedSnap,
|
|
6
|
-
export { OVERLAY_PRESETS, Overlay, OverlayAnimation, OverlayCloseReason, OverlayEdge, Overlay as OverlayEngine, OverlayEventMap, OverlayMountTarget, OverlayOptions, OverlayPreset, OverlayState, OverlayUpdate, SwipeToCloseConfig, createOverlay } from './overlay.js';
|
|
5
|
+
export { R as ResolvedSnap, r as resolveSnapList } from './index-DcMkhXAy.js';
|
|
7
6
|
import './transform-jVfAikE9.js';
|
|
8
7
|
|
|
9
|
-
declare const easeOutBack: (t: number) => number;
|
|
10
|
-
declare const easeOutCubic: (t: number) => number;
|
|
11
|
-
type Tween = {
|
|
12
|
-
cancel: () => void;
|
|
13
|
-
promise: Promise<void>;
|
|
14
|
-
};
|
|
15
|
-
type TweenOptions = {
|
|
16
|
-
from: number;
|
|
17
|
-
to: number;
|
|
18
|
-
duration: number;
|
|
19
|
-
easing?: (t: number) => number;
|
|
20
|
-
onUpdate: (value: number) => void;
|
|
21
|
-
};
|
|
22
|
-
declare const tween: ({ from, to, duration, easing, onUpdate, }: TweenOptions) => Tween;
|
|
23
|
-
declare const prefersReducedMotion: () => boolean;
|
|
24
|
-
|
|
25
|
-
type SpringConfig = {
|
|
26
|
-
stiffness: number;
|
|
27
|
-
damping: number;
|
|
28
|
-
mass: number;
|
|
29
|
-
restDelta?: number;
|
|
30
|
-
restSpeed?: number;
|
|
31
|
-
};
|
|
32
|
-
declare const DEFAULT_SPRING: SpringConfig;
|
|
33
|
-
type SpringRunOptions = {
|
|
34
|
-
from: number;
|
|
35
|
-
to: number;
|
|
36
|
-
velocity?: number;
|
|
37
|
-
config?: Partial<SpringConfig>;
|
|
38
|
-
onUpdate: (value: number, velocity: number) => void;
|
|
39
|
-
};
|
|
40
|
-
type SpringHandle = {
|
|
41
|
-
cancel: () => void;
|
|
42
|
-
promise: Promise<void>;
|
|
43
|
-
};
|
|
44
|
-
declare const runSpring: ({ from, to, velocity, config, onUpdate, }: SpringRunOptions) => SpringHandle;
|
|
45
|
-
|
|
46
8
|
declare const resolveSnap: (point: SnapPoint | string, mode: SheetMode, measureFit?: () => number) => number;
|
|
47
9
|
|
|
48
10
|
type PointerKind = "touch" | "mouse" | "pen";
|
|
@@ -52,8 +14,12 @@ type GestureCallbacks = {
|
|
|
52
14
|
onEnd: (delta: number, velocity: number, pointerType: PointerKind) => void;
|
|
53
15
|
onCancel?: () => void;
|
|
54
16
|
};
|
|
55
|
-
|
|
56
|
-
|
|
17
|
+
type GestureOptions = {
|
|
18
|
+
shouldStart?: (e: PointerEvent) => boolean;
|
|
19
|
+
deferStart?: (e: PointerEvent, delta: number, crossDelta: number) => boolean | null;
|
|
20
|
+
manageTouchAction?: boolean;
|
|
21
|
+
};
|
|
22
|
+
declare const installGestures: (handle: HTMLElement, mode: SheetMode, callbacks: GestureCallbacks, options?: GestureOptions) => (() => void);
|
|
57
23
|
|
|
58
24
|
declare const installFocusTrap: (container: HTMLElement, options?: {
|
|
59
25
|
initialFocus?: HTMLElement | string | false;
|
|
@@ -96,6 +62,37 @@ type SheetManager<Key extends string = string> = {
|
|
|
96
62
|
};
|
|
97
63
|
declare const createSheetManager: <Key extends string = string>(initial?: Record<Key, SheetConfig<Key>>) => SheetManager<Key>;
|
|
98
64
|
|
|
65
|
+
type Tween = {
|
|
66
|
+
cancel: () => void;
|
|
67
|
+
promise: Promise<void>;
|
|
68
|
+
};
|
|
69
|
+
type TweenOptions = {
|
|
70
|
+
from: number;
|
|
71
|
+
to: number;
|
|
72
|
+
duration: number;
|
|
73
|
+
easing?: (t: number) => number;
|
|
74
|
+
onUpdate: (value: number) => void;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
type SpringConfig = {
|
|
78
|
+
stiffness: number;
|
|
79
|
+
damping: number;
|
|
80
|
+
mass: number;
|
|
81
|
+
restDelta?: number;
|
|
82
|
+
restSpeed?: number;
|
|
83
|
+
};
|
|
84
|
+
type SpringRunOptions = {
|
|
85
|
+
from: number;
|
|
86
|
+
to: number;
|
|
87
|
+
velocity?: number;
|
|
88
|
+
config?: Partial<SpringConfig>;
|
|
89
|
+
onUpdate: (value: number, velocity: number) => void;
|
|
90
|
+
};
|
|
91
|
+
type SpringHandle = {
|
|
92
|
+
cancel: () => void;
|
|
93
|
+
promise: Promise<void>;
|
|
94
|
+
};
|
|
95
|
+
|
|
99
96
|
type SheetAnchoredStyle = {
|
|
100
97
|
top?: string;
|
|
101
98
|
bottom?: string;
|
|
@@ -103,7 +100,7 @@ type SheetAnchoredStyle = {
|
|
|
103
100
|
right?: string;
|
|
104
101
|
transform?: string;
|
|
105
102
|
};
|
|
106
|
-
declare function resolveSheetAnchoredStyle(mode:
|
|
107
|
-
declare function applyOverlayPosition(ws: CSSStyleDeclaration, mode:
|
|
103
|
+
declare function resolveSheetAnchoredStyle(mode: PhysicalSheetMode, position: "sheet-top-left" | "sheet-top-center" | "sheet-top-right", inset: string): SheetAnchoredStyle;
|
|
104
|
+
declare function applyOverlayPosition(ws: CSSStyleDeclaration, mode: PhysicalSheetMode, position: ScrimOverlayPosition, inset: string): void;
|
|
108
105
|
|
|
109
|
-
export {
|
|
106
|
+
export { EngineOptions, PhysicalSheetMode, ScrimOverlayPosition, type SheetConfig, type SheetManager, SheetMode, SnapPoint, type SpringConfig, type SpringHandle, type SpringRunOptions, type StackEntry, type Tween, type TweenOptions, applyOverlayPosition, createSheetManager, installFocusTrap, installGestures, lockBodyScroll, resolveSheetAnchoredStyle, resolveSnap, sheetStack };
|