@surdeddd/bottom-sheet 0.11.0 → 0.13.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 (58) hide show
  1. package/README.md +68 -1
  2. package/dist/{BottomSheetEngine-DzsIwD28.d.cts → BottomSheetCore-CsIjyq7C.d.cts} +61 -5
  3. package/dist/{BottomSheetEngine-DRjCU73e.d.ts → BottomSheetCore-D16lsa6g.d.ts} +61 -5
  4. package/dist/BottomSheetEngine-BYjAVrmd.d.cts +7 -0
  5. package/dist/BottomSheetEngine-YuCNugZn.d.ts +7 -0
  6. package/dist/core.cjs +3476 -0
  7. package/dist/core.d.cts +3 -0
  8. package/dist/core.d.ts +3 -0
  9. package/dist/core.js +3474 -0
  10. package/dist/debug.cjs +109 -0
  11. package/dist/debug.d.cts +22 -0
  12. package/dist/debug.d.ts +22 -0
  13. package/dist/debug.js +107 -0
  14. package/dist/element.cjs +994 -697
  15. package/dist/element.d.cts +2 -1
  16. package/dist/element.d.ts +2 -1
  17. package/dist/element.iife.global.js +2 -2
  18. package/dist/element.js +994 -697
  19. package/dist/features.cjs +533 -0
  20. package/dist/features.d.cts +13 -0
  21. package/dist/features.d.ts +13 -0
  22. package/dist/features.js +526 -0
  23. package/dist/index-DdYLOIIT.d.ts +15 -0
  24. package/dist/index-dfrzw-lI.d.cts +15 -0
  25. package/dist/index.cjs +823 -542
  26. package/dist/index.d.cts +6 -15
  27. package/dist/index.d.ts +6 -15
  28. package/dist/index.js +817 -543
  29. package/dist/integrations/formik.d.cts +1 -1
  30. package/dist/integrations/formik.d.ts +1 -1
  31. package/dist/integrations/react-hook-form.d.cts +1 -1
  32. package/dist/integrations/react-hook-form.d.ts +1 -1
  33. package/dist/overlay.cjs +13 -8
  34. package/dist/overlay.js +13 -8
  35. package/dist/preact.d.cts +2 -1
  36. package/dist/preact.d.ts +2 -1
  37. package/dist/qwik-lib/index.qwik.cjs +4267 -0
  38. package/dist/qwik-lib/index.qwik.mjs +4267 -0
  39. package/dist/qwik.cjs +816 -542
  40. package/dist/qwik.d.cts +2 -2
  41. package/dist/qwik.d.ts +2 -2
  42. package/dist/qwik.js +816 -542
  43. package/dist/react.cjs +816 -542
  44. package/dist/react.d.cts +3 -2
  45. package/dist/react.d.ts +3 -2
  46. package/dist/react.js +816 -542
  47. package/dist/solid.cjs +816 -542
  48. package/dist/solid.d.cts +64 -4
  49. package/dist/solid.d.ts +64 -4
  50. package/dist/solid.js +816 -542
  51. package/dist/solid.source.jsx +816 -542
  52. package/dist/svelte-core.cjs +816 -542
  53. package/dist/svelte-core.js +816 -542
  54. package/dist/svelte.cjs +816 -542
  55. package/dist/svelte.js +816 -542
  56. package/dist/vue.cjs +927 -645
  57. package/dist/vue.js +927 -645
  58. package/package.json +63 -11
package/dist/index.d.cts CHANGED
@@ -1,5 +1,8 @@
1
- import { e as SnapPoint, b as SheetMode, a as SnapPointDef, c as EngineOptions, f as ScrimOverlayPosition } from './BottomSheetEngine-DzsIwD28.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, d as SheetEventMap, r as SnapId, T as TeardownScope, s as runAnchorTransition } from './BottomSheetEngine-DzsIwD28.cjs';
1
+ export { B as BottomSheetEngine } from './BottomSheetEngine-BYjAVrmd.cjs';
2
+ import { e as SnapPoint, c as SheetMode, a as EngineOptions, f as ScrimOverlayPosition } from './BottomSheetCore-CsIjyq7C.cjs';
3
+ export { g as AnchorAnimationPreset, h as AnchorAnimationSpec, i as AnchorHandle, A as AnchorOptions, j as AnchorPosition, k as AnchorState, B as BottomSheetCore, C as CloseReason, l as EngineFeature, m as EngineFeatureContext, n as EngineFeatureOptions, o as EngineFeatureStage, E as EngineState, P as Plugin, p as SCRIM_PRESETS, q as ScrimOverlayOptions, r as ScrimPreset, s as ScrimPresetConfig, t as ScrimStageDef, S as ScrimStagesOptions, u as ScrimUpdate, d as SheetEventMap, v as SnapId, b as SnapPointDef, T as TeardownScope, w as runAnchorTransition } from './BottomSheetCore-CsIjyq7C.cjs';
4
+ export { autoCollapseFeature, contentSwipeFeature, defaultEngineFeatures, persistFeature, routeFeature, visualViewportFeature } from './features.cjs';
5
+ export { R as ResolvedSnap, a as allowedRange, f as findById, b as findNearest, r as resolveSnapList } from './index-dfrzw-lI.cjs';
3
6
  export { OVERLAY_PRESETS, Overlay, OverlayAnimation, OverlayCloseReason, OverlayEdge, Overlay as OverlayEngine, OverlayEventMap, OverlayMountTarget, OverlayOptions, OverlayPreset, OverlayState, OverlayUpdate, SwipeToCloseConfig, createOverlay } from './overlay.cjs';
4
7
  import './transform-jVfAikE9.cjs';
5
8
 
@@ -42,18 +45,6 @@ declare const runSpring: ({ from, to, velocity, config, onUpdate, }: SpringRunOp
42
45
 
43
46
  declare const resolveSnap: (point: SnapPoint | string, mode: SheetMode, measureFit?: () => number) => number;
44
47
 
45
- type ResolvedSnap = {
46
- id: string;
47
- size: number;
48
- };
49
- declare const resolveSnapList: (points: SnapPointDef[], mode: SheetMode, measureFit?: () => number) => ResolvedSnap[];
50
- declare const findNearest: (size: number, resolved: ResolvedSnap[], allowed: string[], direction?: 1 | -1 | 0, bias?: number) => ResolvedSnap | null;
51
- declare const allowedRange: (resolved: ResolvedSnap[], allowed: string[]) => {
52
- min: number;
53
- max: number;
54
- };
55
- declare const findById: (id: string, resolved: ResolvedSnap[]) => ResolvedSnap | null;
56
-
57
48
  type PointerKind = "touch" | "mouse" | "pen";
58
49
  type GestureCallbacks = {
59
50
  onStart: (axisCoord: number, pointerType: PointerKind) => void;
@@ -115,4 +106,4 @@ type SheetAnchoredStyle = {
115
106
  declare function resolveSheetAnchoredStyle(mode: SheetMode, position: "sheet-top-left" | "sheet-top-center" | "sheet-top-right", inset: string): SheetAnchoredStyle;
116
107
  declare function applyOverlayPosition(ws: CSSStyleDeclaration, mode: SheetMode, position: ScrimOverlayPosition, inset: string): void;
117
108
 
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 };
109
+ export { DEFAULT_SPRING, EngineOptions, ScrimOverlayPosition, type SheetConfig, type SheetManager, SheetMode, SnapPoint, type SpringConfig, type SpringHandle, type SpringRunOptions, type StackEntry, type Tween, type TweenOptions, applyOverlayPosition, attachGestures, createSheetManager, easeOutBack, easeOutCubic, installFocusTrap, installGestures, lockBodyScroll, prefersReducedMotion, resolveSheetAnchoredStyle, resolveSnap, runSpring, sheetStack, tween };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,8 @@
1
- import { e as SnapPoint, b as SheetMode, a as SnapPointDef, c as EngineOptions, f as ScrimOverlayPosition } from './BottomSheetEngine-DRjCU73e.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, d as SheetEventMap, r as SnapId, T as TeardownScope, s as runAnchorTransition } from './BottomSheetEngine-DRjCU73e.js';
1
+ export { B as BottomSheetEngine } from './BottomSheetEngine-YuCNugZn.js';
2
+ import { e as SnapPoint, c as SheetMode, a as EngineOptions, f as ScrimOverlayPosition } from './BottomSheetCore-D16lsa6g.js';
3
+ export { g as AnchorAnimationPreset, h as AnchorAnimationSpec, i as AnchorHandle, A as AnchorOptions, j as AnchorPosition, k as AnchorState, B as BottomSheetCore, C as CloseReason, l as EngineFeature, m as EngineFeatureContext, n as EngineFeatureOptions, o as EngineFeatureStage, E as EngineState, P as Plugin, p as SCRIM_PRESETS, q as ScrimOverlayOptions, r as ScrimPreset, s as ScrimPresetConfig, t as ScrimStageDef, S as ScrimStagesOptions, u as ScrimUpdate, d as SheetEventMap, v as SnapId, b as SnapPointDef, T as TeardownScope, w as runAnchorTransition } from './BottomSheetCore-D16lsa6g.js';
4
+ export { autoCollapseFeature, contentSwipeFeature, defaultEngineFeatures, persistFeature, routeFeature, visualViewportFeature } from './features.js';
5
+ export { R as ResolvedSnap, a as allowedRange, f as findById, b as findNearest, r as resolveSnapList } from './index-DdYLOIIT.js';
3
6
  export { OVERLAY_PRESETS, Overlay, OverlayAnimation, OverlayCloseReason, OverlayEdge, Overlay as OverlayEngine, OverlayEventMap, OverlayMountTarget, OverlayOptions, OverlayPreset, OverlayState, OverlayUpdate, SwipeToCloseConfig, createOverlay } from './overlay.js';
4
7
  import './transform-jVfAikE9.js';
5
8
 
@@ -42,18 +45,6 @@ declare const runSpring: ({ from, to, velocity, config, onUpdate, }: SpringRunOp
42
45
 
43
46
  declare const resolveSnap: (point: SnapPoint | string, mode: SheetMode, measureFit?: () => number) => number;
44
47
 
45
- type ResolvedSnap = {
46
- id: string;
47
- size: number;
48
- };
49
- declare const resolveSnapList: (points: SnapPointDef[], mode: SheetMode, measureFit?: () => number) => ResolvedSnap[];
50
- declare const findNearest: (size: number, resolved: ResolvedSnap[], allowed: string[], direction?: 1 | -1 | 0, bias?: number) => ResolvedSnap | null;
51
- declare const allowedRange: (resolved: ResolvedSnap[], allowed: string[]) => {
52
- min: number;
53
- max: number;
54
- };
55
- declare const findById: (id: string, resolved: ResolvedSnap[]) => ResolvedSnap | null;
56
-
57
48
  type PointerKind = "touch" | "mouse" | "pen";
58
49
  type GestureCallbacks = {
59
50
  onStart: (axisCoord: number, pointerType: PointerKind) => void;
@@ -115,4 +106,4 @@ type SheetAnchoredStyle = {
115
106
  declare function resolveSheetAnchoredStyle(mode: SheetMode, position: "sheet-top-left" | "sheet-top-center" | "sheet-top-right", inset: string): SheetAnchoredStyle;
116
107
  declare function applyOverlayPosition(ws: CSSStyleDeclaration, mode: SheetMode, position: ScrimOverlayPosition, inset: string): void;
117
108
 
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 };
109
+ export { DEFAULT_SPRING, EngineOptions, ScrimOverlayPosition, type SheetConfig, type SheetManager, SheetMode, SnapPoint, type SpringConfig, type SpringHandle, type SpringRunOptions, type StackEntry, type Tween, type TweenOptions, applyOverlayPosition, attachGestures, createSheetManager, easeOutBack, easeOutCubic, installFocusTrap, installGestures, lockBodyScroll, prefersReducedMotion, resolveSheetAnchoredStyle, resolveSnap, runSpring, sheetStack, tween };