@surdeddd/bottom-sheet 0.9.1 → 0.10.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.
Files changed (50) hide show
  1. package/README.md +108 -66
  2. package/dist/{BottomSheetEngine-CBRcBwV-.d.ts → BottomSheetEngine-DRjCU73e.d.ts} +6 -5
  3. package/dist/{BottomSheetEngine-BcyruNP1.d.cts → BottomSheetEngine-DzsIwD28.d.cts} +6 -5
  4. package/dist/element.cjs +161 -99
  5. package/dist/element.d.cts +1 -1
  6. package/dist/element.d.ts +1 -1
  7. package/dist/element.iife.global.js +2 -2
  8. package/dist/element.js +161 -99
  9. package/dist/index.cjs +155 -115
  10. package/dist/index.d.cts +2 -2
  11. package/dist/index.d.ts +2 -2
  12. package/dist/index.js +155 -115
  13. package/dist/integrations/formik.d.cts +1 -1
  14. package/dist/integrations/formik.d.ts +1 -1
  15. package/dist/integrations/react-hook-form.d.cts +1 -1
  16. package/dist/integrations/react-hook-form.d.ts +1 -1
  17. package/dist/overlay.cjs +34 -25
  18. package/dist/overlay.d.cts +3 -0
  19. package/dist/overlay.d.ts +3 -0
  20. package/dist/overlay.js +34 -25
  21. package/dist/preact.d.cts +2 -1
  22. package/dist/preact.d.ts +2 -1
  23. package/dist/qwik.cjs +179 -93
  24. package/dist/qwik.d.cts +11 -2
  25. package/dist/qwik.d.ts +11 -2
  26. package/dist/qwik.js +179 -93
  27. package/dist/react.cjs +266 -181
  28. package/dist/react.d.cts +26 -4
  29. package/dist/react.d.ts +26 -4
  30. package/dist/react.js +266 -181
  31. package/dist/solid.cjs +145 -92
  32. package/dist/solid.d.cts +14 -4
  33. package/dist/solid.d.ts +14 -4
  34. package/dist/solid.js +145 -92
  35. package/dist/solid.source.jsx +145 -92
  36. package/dist/styles.css +17 -1
  37. package/dist/svelte-core.cjs +128 -90
  38. package/dist/svelte-core.js +128 -90
  39. package/dist/svelte-src/BottomSheet.svelte +6 -0
  40. package/dist/svelte.cjs +130 -90
  41. package/dist/svelte.d.cts +2 -0
  42. package/dist/svelte.d.ts +2 -0
  43. package/dist/svelte.js +130 -90
  44. package/dist/teleport-7uYNiEAT.d.cts +3 -0
  45. package/dist/teleport-7uYNiEAT.d.ts +3 -0
  46. package/dist/vue.cjs +136 -91
  47. package/dist/vue.d.cts +3 -1
  48. package/dist/vue.d.ts +3 -1
  49. package/dist/vue.js +136 -91
  50. package/package.json +6 -6
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  > Universal, headless bottom-sheet engine. **One core, eight adapters, GPU-accelerated, fully tested.**
4
4
 
5
5
  ![bundle](https://img.shields.io/badge/core-16.8%20KB%20gzip-1a1614?style=flat-square)
6
- ![tests](https://img.shields.io/badge/tests-452%20unit-2ea44f?style=flat-square)
6
+ ![tests](https://img.shields.io/badge/tests-501%20unit-2ea44f?style=flat-square)
7
7
  ![ts](https://img.shields.io/badge/TypeScript-strict-3178c6?style=flat-square&logo=typescript&logoColor=white)
8
8
  ![license](https://img.shields.io/badge/license-MIT-dc3522?style=flat-square)
9
9
 
@@ -33,21 +33,21 @@ stacking — and the exact same engine behind every adapter.
33
33
 
34
34
  ## Why another bottom-sheet?
35
35
 
36
- | Feature | vaul | react-modal-sheet | **this lib** |
37
- | ------------------------------------ | :-----: | :---------------: | :-----------: |
38
- | React adapter | ✓ | ✓ | ✓ |
39
- | Vue / Svelte / Web Component | — | — | **✓ ✓ ✓** |
40
- | Vanilla / no framework | — | — | **✓** |
41
- | `bottom` mode | ✓ | ✓ | ✓ |
42
- | `top` / `left` / `right` / overlay | — | — | **✓** |
43
- | Spring physics with velocity carry | ✓ | partial | **✓** |
44
- | Pointer-type-aware tuning | — | — | **✓** |
45
- | Hardware-back interception (Android) | — | — | **✓** |
46
- | `env(safe-area-inset-*)` | partial | — | **✓** |
47
- | WCAG 2.1 AA keyboard slider | partial | — | **✓** |
48
- | Multi-sheet stacking | — | — | **✓** |
49
- | Sheet-manager registry (typed) | — | — | **✓** |
50
- | Tests (unit + e2e) | partial | partial | **452 + 164** |
36
+ | Feature | vaul | react-modal-sheet | **this lib** |
37
+ | ------------------------------------ | ------- | ----------------- | ------------- |
38
+ | React adapter | ✓ | ✓ | ✓ |
39
+ | Vue / Svelte / Web Component | — | — | **✓ ✓ ✓** |
40
+ | Vanilla / no framework | — | — | **✓** |
41
+ | `bottom` mode | ✓ | ✓ | ✓ |
42
+ | `top` / `left` / `right` / overlay | — | — | **✓** |
43
+ | Spring physics with velocity carry | ✓ | partial | **✓** |
44
+ | Pointer-type-aware tuning | — | — | **✓** |
45
+ | Hardware-back interception (Android) | — | — | **✓** |
46
+ | `env(safe-area-inset-*)` | partial | — | **✓** |
47
+ | WCAG 2.1 AA keyboard slider | partial | — | **✓** |
48
+ | Multi-sheet stacking | — | — | **✓** |
49
+ | Sheet-manager registry (typed) | — | — | **✓** |
50
+ | Tests (unit + e2e) | partial | partial | **501 + 195** |
51
51
 
52
52
  ## Install
53
53
 
@@ -210,31 +210,41 @@ engine.snapTo('full');
210
210
  type SnapPoint =
211
211
  | number // pixels
212
212
  | `${number}%` // percent of viewport along the axis
213
- | 'fit' // natural height of header
213
+ | 'fit' // natural height of the whole sheet (handle + header + content + footer)
214
+ | 'content' // alias of 'fit'
214
215
  | 'full' // 100 % of axis
215
216
  | string; // any CSS length — "50dvh", "clamp(200px, 60%, 800px)"
216
217
  ```
217
218
 
218
219
  ### Engine options
219
220
 
220
- | Option | Default | What it does |
221
- | ---------------- | ------------- | ---------------------------------------------------------------------- |
222
- | `snapPoints` | required | Ordered list of `{ id, size }` |
223
- | `allowed` | all ids | Subset the sheet may settle on right now |
224
- | `initial` | first allowed | Snap id to start at |
225
- | `mode` | `"bottom"` | `bottom`, `top`, `left`, `right` |
226
- | `animation` | `"spring"` | `spring`, `tween`, `ios-spring`, `material-bounce`, `linear`, `snappy` |
227
- | `spring` | snappy | `{ stiffness, damping, mass }` |
228
- | `flickVelocity` | `0.65 px/ms` | Mobile flick threshold |
229
- | `dragThreshold` | `18 px` | Below this, drag snaps back |
230
- | `rubberBand` | `true` | iOS-style soft over-drag |
231
- | `backdropRange` | `[0, 1]` | Progress range over which backdrop fades |
232
- | `focusTrap` | `false` | Trap Tab focus inside the sheet when open |
233
- | `closeOnEscape` | `true` | Listen for Escape and close |
234
- | `closeOnBack` | `false` | Intercept Android back button (history.popstate) |
235
- | `lockBodyScroll` | `true` | iOS-safe body lock (`position: fixed`) |
236
- | `stackEffect` | `false` | iOS card-stack: back sheets scale down per depth |
237
- | `inertSiblings` | `false` | Mark page siblings `inert` while open (full modal) |
221
+ | Option | Default | What it does |
222
+ | -------------------- | ------------- | -------------------------------------------------------------------------------------------------------------------------- |
223
+ | `snapPoints` | required | Ordered list of `{ id, size }` |
224
+ | `allowed` | all ids | Subset the sheet may settle on right now |
225
+ | `initial` | first allowed | Snap id to start at |
226
+ | `mode` | `"bottom"` | `bottom`, `top`, `left`, `right` |
227
+ | `animation` | `"spring"` | `spring`, `tween`, `ios-spring`, `material-bounce`, `linear`, `snappy` |
228
+ | `spring` | snappy | `{ stiffness, damping, mass }` |
229
+ | `flickVelocity` | `0.65 px/ms` | Mobile flick threshold |
230
+ | `dragThreshold` | `18 px` | Below this, drag snaps back |
231
+ | `rubberBand` | `true` | iOS-style soft over-drag |
232
+ | `backdropRange` | `[0, 1]` | Progress range over which backdrop fades |
233
+ | `screenRange` | `[0, 1]` | Progress range over which the `screen`/scrim content fades |
234
+ | `focusTrap` | `false` | Trap Tab focus inside the sheet when open |
235
+ | `initialFocus` | first field | Element / selector to focus on open; `false` focuses the sheet container (`tabindex=-1`) instead — avoids the iOS keyboard |
236
+ | `closeOnEscape` | `true` | Listen for Escape and close |
237
+ | `closeOnBack` | `false` | Intercept Android back button (history.popstate) |
238
+ | `closeOnRouteChange` | `false` | Close when the URL changes (patches `pushState`/`replaceState` + popstate) |
239
+ | `lockBodyScroll` | `true` | iOS-safe body lock (`position: fixed`) |
240
+ | `stackEffect` | `false` | iOS card-stack: back sheets scale down per depth |
241
+ | `inertSiblings` | `false` | Mark page siblings `inert` while open (full modal) |
242
+ | `persistent` | `false` | Block dismissal (backdrop / Escape / back); programmatic `close()` still works |
243
+ | `disableClose` | `false` | Block all closing, including programmatic |
244
+ | `disableDrag` | `false` | Suppress the drag gesture (imperative snaps still work) |
245
+ | `radius` | token default | Corner radius (`string` CSS length or `number` px); also `setRadius()` |
246
+ | `maxHeight` | none | Cap the sheet height. `number` (px) or a string (`"92dvh"`, `"50%"`) re-resolved on viewport / orientation changes |
247
+ | `returnFocusTo` | opener | Focus target on dismiss — an `HTMLElement`, a selector `string`, or a `() => HTMLElement` factory |
238
248
 
239
249
  ### Anchored elements, docked bars & scrim stages
240
250
 
@@ -268,23 +278,41 @@ engine.setScrimStages({
268
278
  ### Events
269
279
 
270
280
  ```ts
271
- engine.on('snap', ({ id, size }) => {}); // settled state change
272
- engine.on('open', ({ id }) => {}); // 0 → >0
273
- engine.on('close', () => {}); // → 0
281
+ engine.on('snap', ({ id, size, progress }) => {}); // settled state change
282
+ engine.on('open', ({ id }) => {}); // 0 → >0 (enter starts)
283
+ engine.on('opened', ({ id }) => {}); // enter settled
284
+ engine.on('close', () => {}); // → 0 (exit starts)
285
+ engine.on('closed', () => {}); // exit settled
274
286
  engine.on('dragstart', ({ size }) => {});
275
- engine.on('drag', ({ size, delta }) => {}); // ~60 fps
287
+ engine.on('drag', ({ size, delta }) => {}); // ~60 fps — payload is pooled, don't retain
276
288
  engine.on('dragend', ({ size, velocity }) => {});
277
289
  engine.on('progress', ({ value, size }) => {}); // ~60 fps
290
+
291
+ // Cancelable — call cancel() synchronously to veto the transition:
292
+ engine.on('before-snap', ({ id, size, previousId, cancel }) => {});
293
+ engine.on('before-close', ({ reason, cancel }) => {}); // reason: programmatic | backdrop | escape | back
278
294
  ```
279
295
 
280
296
  ### Imperative
281
297
 
282
298
  ```ts
283
299
  engine.snapTo('half');
284
- engine.open(); // → first non-closed allowed
285
- engine.close(); // → "closed" or first allowed
300
+ engine.open(); // → first allowed snap with resolved size > 0
301
+ engine.close(reason?); // → first snap that resolves to size 0, else first allowed
302
+ engine.expand(); // → largest allowed snap
303
+ engine.collapse(); // → smallest allowed snap with size > 0
286
304
  engine.setAllowed(ids, snapId); // dynamic allowlist
287
305
  engine.setSnapPoints(points); // re-measure
306
+ engine.recompute(); // re-measure a 'fit' / 'content' snap on demand
307
+ engine.getResolvedSnaps(); // → [{ id, size }] resolved to pixels right now
308
+ engine.setPersistent(bool); // toggle persistence (block dismissal) at runtime
309
+ engine.setDisableClose(bool); // toggle close-blocking at runtime
310
+ engine.setDisableDrag(bool); // toggle the drag gesture at runtime
311
+ engine.setRadius('28px'); // corner radius
312
+ engine.setMaxHeight('92dvh'); // height cap (re-resolved on viewport change)
313
+ engine.canDismiss(); // false when persistent / disableClose
314
+ engine.isTop(); // top of the multi-sheet stack?
315
+ engine.depth(); // open sheets above this one
288
316
  engine.destroy(); // remove listeners + cancel animation
289
317
  ```
290
318
 
@@ -293,17 +321,17 @@ engine.destroy(); // remove listeners + cancel animation
293
321
  The scrim is the dim layer behind/around the sheet (`screenComponent`). All
294
322
  scrim properties can be mutated at runtime — no remount needed.
295
323
 
296
- | Method | Purpose |
297
- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
298
- | `setScrimMode('full' \| 'above-sheet' \| 'off')` | Switch positioning at runtime. `'off'` fully disables the scrim layer. |
299
- | `setScrimEnabled(boolean)` | Convenience switch — stashes/restores opacity ranges. |
300
- | `setScrimTapToClose(boolean)` | Install/teardown click-to-close on the scrim. |
301
- | `setScrimColor(color \| null)` / `setScrimBlur(blur \| null)` | Live color & backdrop-filter blur. `null` clears. |
302
- | `setScrimInteractive(boolean)` | Toggle `pointer-events` on the scrim layer. |
303
- | `setBackdropRange([s, e])` / `setScreenRange([s, e])` | Opacity-range mapping (progress 0..1 → opacity 0..1). |
304
- | `setScrim({ ... })` | Batch — applies preset + individual fields in one pass with a single `applySize`. |
305
- | `setScrimOverlay({ children, position, interactive })` | Inject a positioned floating element into the scrim area. Returns a teardown. Useful for monitoring-style "dim everything except this badge" UX. |
306
- | `getScrimState()` | Read-only `{ mode, enabled }` snapshot. Stable public API for introspection without coupling to internals. |
324
+ | Method | Purpose | | |
325
+ | ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------ | ------- | ---------------------------------------------------------------------- |
326
+ | `setScrimMode('full' \ | 'above-sheet' \ | 'off')` | Switch positioning at runtime. `'off'` fully disables the scrim layer. |
327
+ | `setScrimEnabled(boolean)` | Convenience switch — stashes/restores opacity ranges. | | |
328
+ | `setScrimTapToClose(boolean)` | Install/teardown click-to-close on the scrim. | | |
329
+ | `setScrimColor(color \ | null)` / `setScrimBlur(blur \ | null)` | Live color & backdrop-filter blur. `null` clears. |
330
+ | `setScrimInteractive(boolean)` | Toggle `pointer-events` on the scrim layer. | | |
331
+ | `setBackdropRange([s, e])` / `setScreenRange([s, e])` | Opacity-range mapping (progress 0..1 → opacity 0..1). | | |
332
+ | `setScrim({ ... })` | Batch — applies preset + individual fields in one pass with a single `applySize`. | | |
333
+ | `setScrimOverlay({ children, position, interactive })` | Inject a positioned floating element into the scrim area. Returns a teardown. Useful for monitoring-style "dim everything except this badge" UX. | | |
334
+ | `getScrimState()` | Read-only `{ mode, enabled }` snapshot. Stable public API for introspection without coupling to internals. | | |
307
335
 
308
336
  **Presets**: `'subtle' | 'standard' | 'monitoring' | 'cinematic'` — use via `scrimPreset` constructor option or `setScrim({ preset })`.
309
337
 
@@ -312,11 +340,11 @@ scrim properties can be mutated at runtime — no remount needed.
312
340
  The overlay engine (`@surdeddd/bottom-sheet/overlay`) is a standalone slide-up
313
341
  panel that mirrors the scrim's runtime-mutability story for content.
314
342
 
315
- | Method | Purpose |
316
- | ------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
317
- | `setOverlayChildren(node \| fragment \| factory)` | Replace overlay contents at runtime. Pass a `Node`, a `DocumentFragment`, or a `() => Node` factory. |
318
- | `clearOverlayChildren()` | Remove any injected content. |
319
- | `setOverlay({ children, ... })` | Batch update — `children` is one of the accepted fields alongside positioning/preset overrides. |
343
+ | Method | Purpose | | |
344
+ | ------------------------------- | ----------------------------------------------------------------------------------------------- | --------- | ---------------------------------------------------------------------------------------------------- |
345
+ | `setOverlayChildren(node \ | fragment \ | factory)` | Replace overlay contents at runtime. Pass a `Node`, a `DocumentFragment`, or a `() => Node` factory. |
346
+ | `clearOverlayChildren()` | Remove any injected content. | | |
347
+ | `setOverlay({ children, ... })` | Batch update — `children` is one of the accepted fields alongside positioning/preset overrides. | | |
320
348
 
321
349
  **Presets**: `OverlayPreset` is `'sheet' | 'dialog' | 'sidebar' | 'toast'` —
322
350
  exposed as the `OVERLAY_PRESETS` const map and accepted by `setOverlay({ preset })`.
@@ -379,6 +407,20 @@ element — drive any CSS animation from drag without touching JS:
379
407
  }
380
408
  ```
381
409
 
410
+ ### Scrim, blur & high contrast
411
+
412
+ | Token | Default | Region |
413
+ | ------------------------ | ----------- | ---------------------------------------------------- |
414
+ | `--bs-scrim-color` | transparent | Fill of the scrim layer (`.bs-screen`) |
415
+ | `--bs-scrim-blur` | `0px` | `backdrop-filter: blur()` applied to the scrim layer |
416
+ | `--bs-header-min-height` | `0px` | Minimum height of the `.bs-header` region |
417
+
418
+ `--bs-scrim-blur` drives a real `backdrop-filter` blur on the scrim — set it
419
+ for a frosted backdrop (or use the `monitoring` / `cinematic` scrim presets,
420
+ which set both color and blur). Under Windows High Contrast / `forced-colors`
421
+ the stylesheet ships a `@media (forced-colors: active)` block so the sheet
422
+ surface, handle and focus ring stay visible.
423
+
382
424
  ### Padding & layout
383
425
 
384
426
  Every region's padding is a token — override or zero it to go edge-to-edge.
@@ -386,12 +428,12 @@ Defaults match the built-in look. Set the variable on the host / `.bs-root` /
386
428
  `:root`; custom properties inherit through the Web Component's shadow boundary,
387
429
  so the same override works for every adapter:
388
430
 
389
- | Token | Default | Region |
390
- | ---------------------- | ---------------------- | ------------------- |
391
- | `--bs-content-padding` | `0 16px 16px` | scrollable body |
392
- | `--bs-handle-padding` | `8px 16px 4px` | grabber strip (top) |
393
- | `--bs-header-padding` | `0 16px 8px` | header slot |
394
- | `--bs-footer-padding` | `12px 16px (+ inset)` | footer slot |
431
+ | Token | Default | Region |
432
+ | ---------------------- | --------------------- | ------------------- |
433
+ | `--bs-content-padding` | `0 16px 16px` | scrollable body |
434
+ | `--bs-handle-padding` | `8px 16px 4px` | grabber strip (top) |
435
+ | `--bs-header-padding` | `0 16px 8px` | header slot |
436
+ | `--bs-footer-padding` | `12px 16px (+ inset)` | footer slot |
395
437
 
396
438
  (The footer default is `12px 16px calc(12px + env(safe-area-inset-bottom))` — it
397
439
  keeps action buttons clear of the home indicator.)
@@ -421,12 +463,12 @@ snap, progress, velocity, FPS). EN/RU and light/dark toggles in the corner.
421
463
  ## Testing
422
464
 
423
465
  ```bash
424
- npm test # 452 unit tests via vitest + happy-dom (~6s)
425
- npx playwright test # 32 e2e via Playwright on mobile-Chrome (~25s)
466
+ npm test # 501 unit tests via vitest + happy-dom (~6s)
467
+ npx playwright test # e2e via Playwright on mobile-Chrome / mobile-Safari / Firefox
426
468
  npm run typecheck # TypeScript --noEmit
427
469
  ```
428
470
 
429
- CI runs all three across Node 18/20/22 on every PR and tag.
471
+ CI runs all three across Node 20/22 on every PR and tag.
430
472
 
431
473
  ## Contributing
432
474
 
@@ -222,8 +222,7 @@ declare class BottomSheetEngine {
222
222
  private disableCloseFlag;
223
223
  private disableDragFlag;
224
224
  private closeOnRouteChange;
225
- private maxHeightCap;
226
- private maxHeightRaw;
225
+ private maxHeight;
227
226
  private snapPointsRaw;
228
227
  private snaps;
229
228
  private activeId;
@@ -259,6 +258,10 @@ declare class BottomSheetEngine {
259
258
  use(plugin: Plugin): this;
260
259
  setLinkedSheets(sheets: BottomSheetEngine[]): void;
261
260
  getAllowedIds(): string[];
261
+ getResolvedSnaps(): readonly {
262
+ id: string;
263
+ size: number;
264
+ }[];
262
265
  snapTo(id: string, velocityOrOpts?: number | {
263
266
  velocity?: number;
264
267
  signal?: AbortSignal;
@@ -282,8 +285,6 @@ declare class BottomSheetEngine {
282
285
  collapse(): Promise<void>;
283
286
  setRadius(r: string | number): void;
284
287
  setMaxHeight(h: string | number): void;
285
- private resolveMaxHeightCap;
286
- private clampToMaxHeight;
287
288
  setAllowed(ids: string[], snap?: string): void;
288
289
  setBackdropRange(range: [number, number]): void;
289
290
  setScreenRange(range: [number, number]): void;
@@ -328,4 +329,4 @@ declare class BottomSheetEngine {
328
329
  private handleClose;
329
330
  }
330
331
 
331
- export { type AnchorOptions as A, BottomSheetEngine as B, type CloseReason as C, type EngineState as E, type Plugin as P, type ScrimStagesOptions as S, type TeardownScope as T, type SnapPointDef as a, type SheetMode as b, type EngineOptions as c, type SnapPoint as d, type SheetEventMap as e, type ScrimOverlayPosition as f, type AnchorAnimationPreset as g, type AnchorAnimationSpec as h, type AnchorHandle as i, type AnchorPosition as j, type AnchorState as k, SCRIM_PRESETS as l, type ScrimOverlayOptions as m, type ScrimPreset as n, type ScrimPresetConfig as o, type ScrimStageDef as p, type ScrimUpdate as q, type SnapId as r, runAnchorTransition as s };
332
+ export { type AnchorOptions as A, BottomSheetEngine as B, type CloseReason as C, type EngineState as E, type Plugin as P, type ScrimStagesOptions as S, type TeardownScope as T, type SnapPointDef as a, type SheetMode as b, type EngineOptions as c, type SheetEventMap as d, type SnapPoint as e, type ScrimOverlayPosition as f, type AnchorAnimationPreset as g, type AnchorAnimationSpec as h, type AnchorHandle as i, type AnchorPosition as j, type AnchorState as k, SCRIM_PRESETS as l, type ScrimOverlayOptions as m, type ScrimPreset as n, type ScrimPresetConfig as o, type ScrimStageDef as p, type ScrimUpdate as q, type SnapId as r, runAnchorTransition as s };
@@ -222,8 +222,7 @@ declare class BottomSheetEngine {
222
222
  private disableCloseFlag;
223
223
  private disableDragFlag;
224
224
  private closeOnRouteChange;
225
- private maxHeightCap;
226
- private maxHeightRaw;
225
+ private maxHeight;
227
226
  private snapPointsRaw;
228
227
  private snaps;
229
228
  private activeId;
@@ -259,6 +258,10 @@ declare class BottomSheetEngine {
259
258
  use(plugin: Plugin): this;
260
259
  setLinkedSheets(sheets: BottomSheetEngine[]): void;
261
260
  getAllowedIds(): string[];
261
+ getResolvedSnaps(): readonly {
262
+ id: string;
263
+ size: number;
264
+ }[];
262
265
  snapTo(id: string, velocityOrOpts?: number | {
263
266
  velocity?: number;
264
267
  signal?: AbortSignal;
@@ -282,8 +285,6 @@ declare class BottomSheetEngine {
282
285
  collapse(): Promise<void>;
283
286
  setRadius(r: string | number): void;
284
287
  setMaxHeight(h: string | number): void;
285
- private resolveMaxHeightCap;
286
- private clampToMaxHeight;
287
288
  setAllowed(ids: string[], snap?: string): void;
288
289
  setBackdropRange(range: [number, number]): void;
289
290
  setScreenRange(range: [number, number]): void;
@@ -328,4 +329,4 @@ declare class BottomSheetEngine {
328
329
  private handleClose;
329
330
  }
330
331
 
331
- export { type AnchorOptions as A, BottomSheetEngine as B, type CloseReason as C, type EngineState as E, type Plugin as P, type ScrimStagesOptions as S, type TeardownScope as T, type SnapPointDef as a, type SheetMode as b, type EngineOptions as c, type SnapPoint as d, type SheetEventMap as e, type ScrimOverlayPosition as f, type AnchorAnimationPreset as g, type AnchorAnimationSpec as h, type AnchorHandle as i, type AnchorPosition as j, type AnchorState as k, SCRIM_PRESETS as l, type ScrimOverlayOptions as m, type ScrimPreset as n, type ScrimPresetConfig as o, type ScrimStageDef as p, type ScrimUpdate as q, type SnapId as r, runAnchorTransition as s };
332
+ export { type AnchorOptions as A, BottomSheetEngine as B, type CloseReason as C, type EngineState as E, type Plugin as P, type ScrimStagesOptions as S, type TeardownScope as T, type SnapPointDef as a, type SheetMode as b, type EngineOptions as c, type SheetEventMap as d, type SnapPoint as e, type ScrimOverlayPosition as f, type AnchorAnimationPreset as g, type AnchorAnimationSpec as h, type AnchorHandle as i, type AnchorPosition as j, type AnchorState as k, SCRIM_PRESETS as l, type ScrimOverlayOptions as m, type ScrimPreset as n, type ScrimPresetConfig as o, type ScrimStageDef as p, type ScrimUpdate as q, type SnapId as r, runAnchorTransition as s };