@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.
Files changed (50) hide show
  1. package/README.md +6 -0
  2. package/dist/BottomSheetEngine-CIT9Htti.d.cts +219 -0
  3. package/dist/BottomSheetEngine-Df9MwBbm.d.ts +219 -0
  4. package/dist/element.cjs +95 -440
  5. package/dist/element.d.cts +3 -56
  6. package/dist/element.d.ts +3 -56
  7. package/dist/element.iife.global.js +2 -2
  8. package/dist/element.js +95 -440
  9. package/dist/index.cjs +84 -494
  10. package/dist/index.d.cts +3 -84
  11. package/dist/index.d.ts +3 -84
  12. package/dist/index.js +84 -494
  13. package/dist/integrations/formik.d.cts +2 -8
  14. package/dist/integrations/formik.d.ts +2 -8
  15. package/dist/integrations/react-hook-form.d.cts +2 -11
  16. package/dist/integrations/react-hook-form.d.ts +2 -11
  17. package/dist/overlay.cjs +0 -87
  18. package/dist/overlay.d.cts +1 -137
  19. package/dist/overlay.d.ts +1 -137
  20. package/dist/overlay.js +0 -87
  21. package/dist/preact.d.cts +2 -2
  22. package/dist/preact.d.ts +2 -2
  23. package/dist/preact.js +0 -1
  24. package/dist/qwik.cjs +87 -439
  25. package/dist/qwik.d.cts +3 -24
  26. package/dist/qwik.d.ts +3 -24
  27. package/dist/qwik.js +87 -439
  28. package/dist/react.cjs +91 -496
  29. package/dist/react.d.cts +16 -158
  30. package/dist/react.d.ts +16 -158
  31. package/dist/react.js +91 -496
  32. package/dist/solid.cjs +87 -439
  33. package/dist/solid.d.cts +4 -31
  34. package/dist/solid.d.ts +4 -31
  35. package/dist/solid.js +87 -439
  36. package/dist/styles.css +27 -102
  37. package/dist/svelte.cjs +139 -462
  38. package/dist/svelte.d.ts +9 -2
  39. package/dist/svelte.js +139 -462
  40. package/dist/themes/ios.css +0 -3
  41. package/dist/themes/material.css +0 -3
  42. package/dist/themes/vercel.css +0 -3
  43. package/dist/{transform-Brkf-wzo.d.cts → transform-jVfAikE9.d.cts} +0 -1
  44. package/dist/{transform-Brkf-wzo.d.ts → transform-jVfAikE9.d.ts} +0 -1
  45. package/dist/vue.cjs +104 -446
  46. package/dist/vue.d.ts +7 -1
  47. package/dist/vue.js +105 -447
  48. package/package.json +3 -3
  49. package/dist/BottomSheetEngine-CvSVbo6c.d.cts +0 -704
  50. package/dist/BottomSheetEngine-DbO8rW_3.d.ts +0 -704
package/dist/vue.d.ts CHANGED
@@ -6,7 +6,10 @@ import type {
6
6
  SheetMode,
7
7
  SnapPoint,
8
8
  SnapPointDef,
9
+ ScrimUpdate,
10
+ ScrimOverlayOptions,
9
11
  } from "../core/types";
12
+ import type { BottomSheetEngine } from "../core/BottomSheetEngine";
10
13
 
11
14
  export type UseBottomSheetVueOptions<TId extends string = string> = Omit<
12
15
  EngineOptions,
@@ -14,7 +17,7 @@ export type UseBottomSheetVueOptions<TId extends string = string> = Omit<
14
17
  | "handle"
15
18
  | "scrollContainer"
16
19
  | "backdrop"
17
- | "screenComponent"
20
+ | "scrim"
18
21
  | "snapPoints"
19
22
  | "allowed"
20
23
  | "initial"
@@ -40,10 +43,13 @@ export type UseBottomSheetVueReturn<TId extends string = string> = {
40
43
  points: EngineOptions["snapPoints"],
41
44
  allowed?: string[],
42
45
  ) => void;
46
+ setScrim: (opts: ScrimUpdate) => void;
47
+ setScrimOverlay: (opts: ScrimOverlayOptions) => () => void;
43
48
  on: <K extends keyof SheetEventMap>(
44
49
  event: K,
45
50
  fn: (payload: SheetEventMap[K]) => void,
46
51
  ) => () => void;
52
+ getEngine: () => BottomSheetEngine | null;
47
53
  };
48
54
 
49
55
  export function useBottomSheet<TId extends string = string>(