@surdeddd/bottom-sheet 0.1.0 → 0.2.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 +6 -0
- package/dist/BottomSheetEngine-CIT9Htti.d.cts +219 -0
- package/dist/BottomSheetEngine-Df9MwBbm.d.ts +219 -0
- package/dist/element.cjs +95 -440
- package/dist/element.d.cts +3 -56
- package/dist/element.d.ts +3 -56
- package/dist/element.iife.global.js +2 -2
- package/dist/element.js +95 -440
- package/dist/index.cjs +84 -494
- package/dist/index.d.cts +3 -84
- package/dist/index.d.ts +3 -84
- package/dist/index.js +84 -494
- package/dist/integrations/formik.d.cts +2 -8
- package/dist/integrations/formik.d.ts +2 -8
- package/dist/integrations/react-hook-form.d.cts +2 -11
- package/dist/integrations/react-hook-form.d.ts +2 -11
- package/dist/overlay.cjs +0 -87
- package/dist/overlay.d.cts +1 -137
- package/dist/overlay.d.ts +1 -137
- package/dist/overlay.js +0 -87
- package/dist/preact.d.cts +2 -2
- package/dist/preact.d.ts +2 -2
- package/dist/preact.js +0 -1
- package/dist/qwik.cjs +87 -439
- package/dist/qwik.d.cts +3 -24
- package/dist/qwik.d.ts +3 -24
- package/dist/qwik.js +87 -439
- package/dist/react.cjs +91 -496
- package/dist/react.d.cts +16 -158
- package/dist/react.d.ts +16 -158
- package/dist/react.js +91 -496
- package/dist/solid.cjs +87 -439
- package/dist/solid.d.cts +4 -31
- package/dist/solid.d.ts +4 -31
- package/dist/solid.js +87 -439
- package/dist/styles.css +27 -102
- package/dist/svelte.cjs +139 -462
- package/dist/svelte.d.ts +9 -2
- package/dist/svelte.js +139 -462
- package/dist/themes/ios.css +0 -3
- package/dist/themes/material.css +0 -3
- package/dist/themes/vercel.css +0 -3
- package/dist/{transform-Brkf-wzo.d.cts → transform-jVfAikE9.d.cts} +0 -1
- package/dist/{transform-Brkf-wzo.d.ts → transform-jVfAikE9.d.ts} +0 -1
- package/dist/vue.cjs +104 -446
- package/dist/vue.d.ts +7 -1
- package/dist/vue.js +105 -447
- package/package.json +3 -3
- package/dist/BottomSheetEngine-CvSVbo6c.d.cts +0 -704
- package/dist/BottomSheetEngine-DbO8rW_3.d.ts +0 -704
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as SnapPoint, a as SheetMode, S as SnapPointDef, b as EngineOptions } from './BottomSheetEngine-
|
|
2
|
-
export { B as BottomSheetEngine, E as EngineState, P as Plugin, e as SCRIM_PRESETS, f as ScrimOverlayOptions, g as ScrimOverlayPosition, h as ScrimPreset, i as ScrimPresetConfig, j as ScrimUpdate, d as SheetEventMap, k as SnapId, T as TeardownScope } from './BottomSheetEngine-
|
|
1
|
+
import { c as SnapPoint, a as SheetMode, S as SnapPointDef, b as EngineOptions } from './BottomSheetEngine-CIT9Htti.cjs';
|
|
2
|
+
export { B as BottomSheetEngine, E as EngineState, P as Plugin, e as SCRIM_PRESETS, f as ScrimOverlayOptions, g as ScrimOverlayPosition, h as ScrimPreset, i as ScrimPresetConfig, j as ScrimUpdate, d as SheetEventMap, k as SnapId, T as TeardownScope } from './BottomSheetEngine-CIT9Htti.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
|
-
import './transform-
|
|
4
|
+
import './transform-jVfAikE9.cjs';
|
|
5
5
|
|
|
6
6
|
declare const easeOutBack: (t: number) => number;
|
|
7
7
|
declare const easeOutCubic: (t: number) => number;
|
|
@@ -16,24 +16,13 @@ type TweenOptions = {
|
|
|
16
16
|
easing?: (t: number) => number;
|
|
17
17
|
onUpdate: (value: number) => void;
|
|
18
18
|
};
|
|
19
|
-
/**
|
|
20
|
-
* rAF tween. Promise resolves both on natural completion AND on cancel so
|
|
21
|
-
* callers awaiting it always settle; they're expected to cycle-nonce-check
|
|
22
|
-
* after the await before running post-settle effects.
|
|
23
|
-
*/
|
|
24
19
|
declare const tween: ({ from, to, duration, easing, onUpdate, }: TweenOptions) => Tween;
|
|
25
20
|
declare const prefersReducedMotion: () => boolean;
|
|
26
21
|
|
|
27
|
-
/**
|
|
28
|
-
* Damped harmonic oscillator: x'' = -k(x - target)/m - c*x'/m
|
|
29
|
-
* Integrated with semi-implicit Euler at variable dt; settles when both
|
|
30
|
-
* displacement and velocity drop below epsilon.
|
|
31
|
-
*/
|
|
32
22
|
type SpringConfig = {
|
|
33
23
|
stiffness: number;
|
|
34
24
|
damping: number;
|
|
35
25
|
mass: number;
|
|
36
|
-
/** Stop animation when |x - target| < restDelta AND |v| < restSpeed. */
|
|
37
26
|
restDelta?: number;
|
|
38
27
|
restSpeed?: number;
|
|
39
28
|
};
|
|
@@ -49,24 +38,8 @@ type SpringHandle = {
|
|
|
49
38
|
cancel: () => void;
|
|
50
39
|
promise: Promise<void>;
|
|
51
40
|
};
|
|
52
|
-
/**
|
|
53
|
-
* Run a spring animation from `from` to `to` with initial velocity. The
|
|
54
|
-
* promise resolves on natural settle AND on cancel so awaiters always
|
|
55
|
-
* settle; callers cycle-nonce-check after the await before running
|
|
56
|
-
* post-settle effects.
|
|
57
|
-
*/
|
|
58
41
|
declare const runSpring: ({ from, to, velocity, config, onUpdate, }: SpringRunOptions) => SpringHandle;
|
|
59
42
|
|
|
60
|
-
/**
|
|
61
|
-
* Resolve a `SnapPoint` to pixels.
|
|
62
|
-
*
|
|
63
|
-
* number → as-is
|
|
64
|
-
* "full" → viewport along the axis
|
|
65
|
-
* "fit" → measureFit() — handle/header offset
|
|
66
|
-
* "30%" → percent of viewport along axis (fast path)
|
|
67
|
-
* any other → CSS length resolved via probe element (dvh, vmin,
|
|
68
|
-
* clamp(), env(safe-area-inset-bottom), ...)
|
|
69
|
-
*/
|
|
70
43
|
declare const resolveSnap: (point: SnapPoint | string, mode: SheetMode, measureFit?: () => number) => number;
|
|
71
44
|
|
|
72
45
|
type ResolvedSnap = {
|
|
@@ -74,11 +47,6 @@ type ResolvedSnap = {
|
|
|
74
47
|
size: number;
|
|
75
48
|
};
|
|
76
49
|
declare const resolveSnapList: (points: SnapPointDef[], mode: SheetMode, measureFit?: () => number) => ResolvedSnap[];
|
|
77
|
-
/**
|
|
78
|
-
* Finds the snap point closest to `size`, optionally biased by drag
|
|
79
|
-
* direction (positive = expanding) so flicks settle on the next-up snap
|
|
80
|
-
* even when geometrically closer to the previous one.
|
|
81
|
-
*/
|
|
82
50
|
declare const findNearest: (size: number, resolved: ResolvedSnap[], allowed: string[], direction?: 1 | -1 | 0, bias?: number) => ResolvedSnap | null;
|
|
83
51
|
declare const allowedRange: (resolved: ResolvedSnap[], allowed: string[]) => {
|
|
84
52
|
min: number;
|
|
@@ -93,28 +61,9 @@ type GestureCallbacks = {
|
|
|
93
61
|
onEnd: (delta: number, velocity: number, pointerType: PointerKind) => void;
|
|
94
62
|
onCancel?: () => void;
|
|
95
63
|
};
|
|
96
|
-
/**
|
|
97
|
-
* Pointer Events handler with velocity tracking. Listens on `handle` for the
|
|
98
|
-
* initial press, then captures the pointer so movement outside the element is
|
|
99
|
-
* still tracked. Multi-touch is ignored: only the first pointer drives the gesture.
|
|
100
|
-
*
|
|
101
|
-
* Velocity is computed from the last ~80ms of samples for stable flick detection.
|
|
102
|
-
*/
|
|
103
64
|
declare const installGestures: (handle: HTMLElement, mode: SheetMode, callbacks: GestureCallbacks) => (() => void);
|
|
104
|
-
/**
|
|
105
|
-
* @deprecated Renamed to `installGestures` for naming consistency with the
|
|
106
|
-
* other `installX` feature factories. Will be removed in v2 — see
|
|
107
|
-
* `docs/migration-v2.md`.
|
|
108
|
-
*/
|
|
109
65
|
declare const attachGestures: (handle: HTMLElement, mode: SheetMode, callbacks: GestureCallbacks) => (() => void);
|
|
110
66
|
|
|
111
|
-
/**
|
|
112
|
-
* Trap Tab focus inside `container`. Calls `onEscape` when Esc is pressed
|
|
113
|
-
* (caller decides whether to close the sheet). Returns a teardown function
|
|
114
|
-
* that releases the trap and restores focus to the previously-active element.
|
|
115
|
-
*
|
|
116
|
-
* SSR-safe: if `document` is unavailable, returns a no-op teardown.
|
|
117
|
-
*/
|
|
118
67
|
declare const installFocusTrap: (container: HTMLElement, options?: {
|
|
119
68
|
initialFocus?: HTMLElement | string;
|
|
120
69
|
onEscape?: () => void;
|
|
@@ -122,14 +71,6 @@ declare const installFocusTrap: (container: HTMLElement, options?: {
|
|
|
122
71
|
|
|
123
72
|
declare const lockBodyScroll: () => (() => void);
|
|
124
73
|
|
|
125
|
-
/**
|
|
126
|
-
* Multi-sheet z-index orchestration.
|
|
127
|
-
*
|
|
128
|
-
* When you have a sheet that itself opens another sheet (e.g. menu → detail),
|
|
129
|
-
* naive rendering stacks them at the same z-index and the second one is
|
|
130
|
-
* obscured. The stack assigns ascending z-indices and notifies the topmost
|
|
131
|
-
* sheet so it can render its backdrop while inner sheets skip theirs.
|
|
132
|
-
*/
|
|
133
74
|
type StackEntry = {
|
|
134
75
|
id: string;
|
|
135
76
|
setZIndex: (z: number) => void;
|
|
@@ -143,40 +84,18 @@ declare class SheetStack {
|
|
|
143
84
|
clear(): void;
|
|
144
85
|
private recompute;
|
|
145
86
|
}
|
|
146
|
-
/** Process-wide singleton so any adapter can reach the same stack. */
|
|
147
87
|
declare const sheetStack: SheetStack;
|
|
148
88
|
|
|
149
|
-
/**
|
|
150
|
-
* Route-based / context-based sheet config registry. Caller maps a key
|
|
151
|
-
* (route name, screen id, modal kind, anything) to a partial engine config;
|
|
152
|
-
* `manager.resolve(key)` returns the merged options ready to feed into
|
|
153
|
-
* `BottomSheetEngine` or any adapter.
|
|
154
|
-
*
|
|
155
|
-
* Lifecycle hooks (`onOpen`, `onClose`) are stored alongside the config so
|
|
156
|
-
* the consumer can attach them via `engine.on(...)` without ceremony.
|
|
157
|
-
*
|
|
158
|
-
* const manager = createSheetManager({
|
|
159
|
-
* home: { snapPoints: [...], allowed: ["min","half","full"], onOpen: load },
|
|
160
|
-
* marker: { snapPoints: [...], allowed: ["half","full"], onOpen: focus },
|
|
161
|
-
* });
|
|
162
|
-
* manager.resolve("home"); // → { snapPoints, allowed, onOpen, onClose }
|
|
163
|
-
*/
|
|
164
89
|
type SheetConfig<Key extends string = string> = Partial<Omit<EngineOptions, "element" | "handle" | "scrollContainer" | "backdrop">> & {
|
|
165
|
-
/** Logical key (route name, modal kind, ...) — useful for telemetry. */
|
|
166
90
|
key?: Key;
|
|
167
91
|
onOpen?: (key: Key) => void;
|
|
168
92
|
onClose?: (key: Key) => void;
|
|
169
93
|
};
|
|
170
94
|
type SheetManager<Key extends string = string> = {
|
|
171
|
-
/** Register or replace a config. */
|
|
172
95
|
register(key: Key, config: SheetConfig<Key>): void;
|
|
173
|
-
/** Remove a registered config. */
|
|
174
96
|
unregister(key: Key): void;
|
|
175
|
-
/** Look up a config by key. Returns null if absent. */
|
|
176
97
|
resolve(key: Key): SheetConfig<Key> | null;
|
|
177
|
-
/** Get all registered keys. */
|
|
178
98
|
keys(): Key[];
|
|
179
|
-
/** Run `onClose(prev)` then `onOpen(next)` — for route transitions. */
|
|
180
99
|
transition(prev: Key | null, next: Key | null): void;
|
|
181
100
|
};
|
|
182
101
|
declare const createSheetManager: <Key extends string = string>(initial?: Record<Key, SheetConfig<Key>>) => SheetManager<Key>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as SnapPoint, a as SheetMode, S as SnapPointDef, b as EngineOptions } from './BottomSheetEngine-
|
|
2
|
-
export { B as BottomSheetEngine, E as EngineState, P as Plugin, e as SCRIM_PRESETS, f as ScrimOverlayOptions, g as ScrimOverlayPosition, h as ScrimPreset, i as ScrimPresetConfig, j as ScrimUpdate, d as SheetEventMap, k as SnapId, T as TeardownScope } from './BottomSheetEngine-
|
|
1
|
+
import { c as SnapPoint, a as SheetMode, S as SnapPointDef, b as EngineOptions } from './BottomSheetEngine-Df9MwBbm.js';
|
|
2
|
+
export { B as BottomSheetEngine, E as EngineState, P as Plugin, e as SCRIM_PRESETS, f as ScrimOverlayOptions, g as ScrimOverlayPosition, h as ScrimPreset, i as ScrimPresetConfig, j as ScrimUpdate, d as SheetEventMap, k as SnapId, T as TeardownScope } from './BottomSheetEngine-Df9MwBbm.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
|
-
import './transform-
|
|
4
|
+
import './transform-jVfAikE9.js';
|
|
5
5
|
|
|
6
6
|
declare const easeOutBack: (t: number) => number;
|
|
7
7
|
declare const easeOutCubic: (t: number) => number;
|
|
@@ -16,24 +16,13 @@ type TweenOptions = {
|
|
|
16
16
|
easing?: (t: number) => number;
|
|
17
17
|
onUpdate: (value: number) => void;
|
|
18
18
|
};
|
|
19
|
-
/**
|
|
20
|
-
* rAF tween. Promise resolves both on natural completion AND on cancel so
|
|
21
|
-
* callers awaiting it always settle; they're expected to cycle-nonce-check
|
|
22
|
-
* after the await before running post-settle effects.
|
|
23
|
-
*/
|
|
24
19
|
declare const tween: ({ from, to, duration, easing, onUpdate, }: TweenOptions) => Tween;
|
|
25
20
|
declare const prefersReducedMotion: () => boolean;
|
|
26
21
|
|
|
27
|
-
/**
|
|
28
|
-
* Damped harmonic oscillator: x'' = -k(x - target)/m - c*x'/m
|
|
29
|
-
* Integrated with semi-implicit Euler at variable dt; settles when both
|
|
30
|
-
* displacement and velocity drop below epsilon.
|
|
31
|
-
*/
|
|
32
22
|
type SpringConfig = {
|
|
33
23
|
stiffness: number;
|
|
34
24
|
damping: number;
|
|
35
25
|
mass: number;
|
|
36
|
-
/** Stop animation when |x - target| < restDelta AND |v| < restSpeed. */
|
|
37
26
|
restDelta?: number;
|
|
38
27
|
restSpeed?: number;
|
|
39
28
|
};
|
|
@@ -49,24 +38,8 @@ type SpringHandle = {
|
|
|
49
38
|
cancel: () => void;
|
|
50
39
|
promise: Promise<void>;
|
|
51
40
|
};
|
|
52
|
-
/**
|
|
53
|
-
* Run a spring animation from `from` to `to` with initial velocity. The
|
|
54
|
-
* promise resolves on natural settle AND on cancel so awaiters always
|
|
55
|
-
* settle; callers cycle-nonce-check after the await before running
|
|
56
|
-
* post-settle effects.
|
|
57
|
-
*/
|
|
58
41
|
declare const runSpring: ({ from, to, velocity, config, onUpdate, }: SpringRunOptions) => SpringHandle;
|
|
59
42
|
|
|
60
|
-
/**
|
|
61
|
-
* Resolve a `SnapPoint` to pixels.
|
|
62
|
-
*
|
|
63
|
-
* number → as-is
|
|
64
|
-
* "full" → viewport along the axis
|
|
65
|
-
* "fit" → measureFit() — handle/header offset
|
|
66
|
-
* "30%" → percent of viewport along axis (fast path)
|
|
67
|
-
* any other → CSS length resolved via probe element (dvh, vmin,
|
|
68
|
-
* clamp(), env(safe-area-inset-bottom), ...)
|
|
69
|
-
*/
|
|
70
43
|
declare const resolveSnap: (point: SnapPoint | string, mode: SheetMode, measureFit?: () => number) => number;
|
|
71
44
|
|
|
72
45
|
type ResolvedSnap = {
|
|
@@ -74,11 +47,6 @@ type ResolvedSnap = {
|
|
|
74
47
|
size: number;
|
|
75
48
|
};
|
|
76
49
|
declare const resolveSnapList: (points: SnapPointDef[], mode: SheetMode, measureFit?: () => number) => ResolvedSnap[];
|
|
77
|
-
/**
|
|
78
|
-
* Finds the snap point closest to `size`, optionally biased by drag
|
|
79
|
-
* direction (positive = expanding) so flicks settle on the next-up snap
|
|
80
|
-
* even when geometrically closer to the previous one.
|
|
81
|
-
*/
|
|
82
50
|
declare const findNearest: (size: number, resolved: ResolvedSnap[], allowed: string[], direction?: 1 | -1 | 0, bias?: number) => ResolvedSnap | null;
|
|
83
51
|
declare const allowedRange: (resolved: ResolvedSnap[], allowed: string[]) => {
|
|
84
52
|
min: number;
|
|
@@ -93,28 +61,9 @@ type GestureCallbacks = {
|
|
|
93
61
|
onEnd: (delta: number, velocity: number, pointerType: PointerKind) => void;
|
|
94
62
|
onCancel?: () => void;
|
|
95
63
|
};
|
|
96
|
-
/**
|
|
97
|
-
* Pointer Events handler with velocity tracking. Listens on `handle` for the
|
|
98
|
-
* initial press, then captures the pointer so movement outside the element is
|
|
99
|
-
* still tracked. Multi-touch is ignored: only the first pointer drives the gesture.
|
|
100
|
-
*
|
|
101
|
-
* Velocity is computed from the last ~80ms of samples for stable flick detection.
|
|
102
|
-
*/
|
|
103
64
|
declare const installGestures: (handle: HTMLElement, mode: SheetMode, callbacks: GestureCallbacks) => (() => void);
|
|
104
|
-
/**
|
|
105
|
-
* @deprecated Renamed to `installGestures` for naming consistency with the
|
|
106
|
-
* other `installX` feature factories. Will be removed in v2 — see
|
|
107
|
-
* `docs/migration-v2.md`.
|
|
108
|
-
*/
|
|
109
65
|
declare const attachGestures: (handle: HTMLElement, mode: SheetMode, callbacks: GestureCallbacks) => (() => void);
|
|
110
66
|
|
|
111
|
-
/**
|
|
112
|
-
* Trap Tab focus inside `container`. Calls `onEscape` when Esc is pressed
|
|
113
|
-
* (caller decides whether to close the sheet). Returns a teardown function
|
|
114
|
-
* that releases the trap and restores focus to the previously-active element.
|
|
115
|
-
*
|
|
116
|
-
* SSR-safe: if `document` is unavailable, returns a no-op teardown.
|
|
117
|
-
*/
|
|
118
67
|
declare const installFocusTrap: (container: HTMLElement, options?: {
|
|
119
68
|
initialFocus?: HTMLElement | string;
|
|
120
69
|
onEscape?: () => void;
|
|
@@ -122,14 +71,6 @@ declare const installFocusTrap: (container: HTMLElement, options?: {
|
|
|
122
71
|
|
|
123
72
|
declare const lockBodyScroll: () => (() => void);
|
|
124
73
|
|
|
125
|
-
/**
|
|
126
|
-
* Multi-sheet z-index orchestration.
|
|
127
|
-
*
|
|
128
|
-
* When you have a sheet that itself opens another sheet (e.g. menu → detail),
|
|
129
|
-
* naive rendering stacks them at the same z-index and the second one is
|
|
130
|
-
* obscured. The stack assigns ascending z-indices and notifies the topmost
|
|
131
|
-
* sheet so it can render its backdrop while inner sheets skip theirs.
|
|
132
|
-
*/
|
|
133
74
|
type StackEntry = {
|
|
134
75
|
id: string;
|
|
135
76
|
setZIndex: (z: number) => void;
|
|
@@ -143,40 +84,18 @@ declare class SheetStack {
|
|
|
143
84
|
clear(): void;
|
|
144
85
|
private recompute;
|
|
145
86
|
}
|
|
146
|
-
/** Process-wide singleton so any adapter can reach the same stack. */
|
|
147
87
|
declare const sheetStack: SheetStack;
|
|
148
88
|
|
|
149
|
-
/**
|
|
150
|
-
* Route-based / context-based sheet config registry. Caller maps a key
|
|
151
|
-
* (route name, screen id, modal kind, anything) to a partial engine config;
|
|
152
|
-
* `manager.resolve(key)` returns the merged options ready to feed into
|
|
153
|
-
* `BottomSheetEngine` or any adapter.
|
|
154
|
-
*
|
|
155
|
-
* Lifecycle hooks (`onOpen`, `onClose`) are stored alongside the config so
|
|
156
|
-
* the consumer can attach them via `engine.on(...)` without ceremony.
|
|
157
|
-
*
|
|
158
|
-
* const manager = createSheetManager({
|
|
159
|
-
* home: { snapPoints: [...], allowed: ["min","half","full"], onOpen: load },
|
|
160
|
-
* marker: { snapPoints: [...], allowed: ["half","full"], onOpen: focus },
|
|
161
|
-
* });
|
|
162
|
-
* manager.resolve("home"); // → { snapPoints, allowed, onOpen, onClose }
|
|
163
|
-
*/
|
|
164
89
|
type SheetConfig<Key extends string = string> = Partial<Omit<EngineOptions, "element" | "handle" | "scrollContainer" | "backdrop">> & {
|
|
165
|
-
/** Logical key (route name, modal kind, ...) — useful for telemetry. */
|
|
166
90
|
key?: Key;
|
|
167
91
|
onOpen?: (key: Key) => void;
|
|
168
92
|
onClose?: (key: Key) => void;
|
|
169
93
|
};
|
|
170
94
|
type SheetManager<Key extends string = string> = {
|
|
171
|
-
/** Register or replace a config. */
|
|
172
95
|
register(key: Key, config: SheetConfig<Key>): void;
|
|
173
|
-
/** Remove a registered config. */
|
|
174
96
|
unregister(key: Key): void;
|
|
175
|
-
/** Look up a config by key. Returns null if absent. */
|
|
176
97
|
resolve(key: Key): SheetConfig<Key> | null;
|
|
177
|
-
/** Get all registered keys. */
|
|
178
98
|
keys(): Key[];
|
|
179
|
-
/** Run `onClose(prev)` then `onOpen(next)` — for route transitions. */
|
|
180
99
|
transition(prev: Key | null, next: Key | null): void;
|
|
181
100
|
};
|
|
182
101
|
declare const createSheetManager: <Key extends string = string>(initial?: Record<Key, SheetConfig<Key>>) => SheetManager<Key>;
|