@surdeddd/bottom-sheet 0.1.0 → 0.3.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 (57) hide show
  1. package/README.md +57 -21
  2. package/dist/BottomSheetEngine-CAymrH-P.d.cts +285 -0
  3. package/dist/BottomSheetEngine-DcqcuudN.d.ts +285 -0
  4. package/dist/element.cjs +775 -537
  5. package/dist/element.d.cts +9 -57
  6. package/dist/element.d.ts +9 -57
  7. package/dist/element.iife.global.js +2 -2
  8. package/dist/element.js +775 -537
  9. package/dist/index.cjs +760 -600
  10. package/dist/index.d.cts +18 -85
  11. package/dist/index.d.ts +18 -85
  12. package/dist/index.js +758 -601
  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 +168 -122
  18. package/dist/overlay.d.cts +14 -137
  19. package/dist/overlay.d.ts +14 -137
  20. package/dist/overlay.js +168 -122
  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 +667 -519
  25. package/dist/qwik.d.cts +3 -24
  26. package/dist/qwik.d.ts +3 -24
  27. package/dist/qwik.js +668 -520
  28. package/dist/react.cjs +873 -648
  29. package/dist/react.d.cts +34 -159
  30. package/dist/react.d.ts +34 -159
  31. package/dist/react.js +873 -648
  32. package/dist/solid.cjs +703 -560
  33. package/dist/solid.d.cts +264 -32
  34. package/dist/solid.d.ts +264 -32
  35. package/dist/solid.js +704 -561
  36. package/dist/solid.source.jsx +3215 -0
  37. package/dist/styles.css +37 -112
  38. package/dist/svelte-core.cjs +3149 -0
  39. package/dist/svelte-core.js +3147 -0
  40. package/dist/svelte-src/BottomSheet.svelte +210 -0
  41. package/dist/svelte-src/index.js +2 -0
  42. package/dist/svelte.cjs +718 -547
  43. package/dist/svelte.d.cts +100 -0
  44. package/dist/svelte.d.ts +15 -4
  45. package/dist/svelte.js +719 -548
  46. package/dist/themes/ios.css +0 -3
  47. package/dist/themes/material.css +0 -3
  48. package/dist/themes/vercel.css +0 -3
  49. package/dist/{transform-Brkf-wzo.d.cts → transform-jVfAikE9.d.cts} +0 -1
  50. package/dist/{transform-Brkf-wzo.d.ts → transform-jVfAikE9.d.ts} +0 -1
  51. package/dist/vue.cjs +677 -526
  52. package/dist/vue.d.cts +78 -0
  53. package/dist/vue.d.ts +12 -2
  54. package/dist/vue.js +678 -527
  55. package/package.json +105 -45
  56. package/dist/BottomSheetEngine-CvSVbo6c.d.cts +0 -704
  57. package/dist/BottomSheetEngine-DbO8rW_3.d.ts +0 -704
package/dist/qwik.d.cts CHANGED
@@ -1,28 +1,9 @@
1
1
  import * as _builder_io_qwik from '@builder.io/qwik';
2
2
  import { QRL } from '@builder.io/qwik';
3
- import { S as SnapPointDef, a as SheetMode, E as EngineState } from './BottomSheetEngine-CvSVbo6c.cjs';
4
- export { b as EngineOptions, c as SnapPoint } from './BottomSheetEngine-CvSVbo6c.cjs';
5
- import './transform-Brkf-wzo.cjs';
3
+ import { a as SnapPointDef, b as SheetMode, E as EngineState } from './BottomSheetEngine-CAymrH-P.cjs';
4
+ export { c as EngineOptions, d as SnapPoint } from './BottomSheetEngine-CAymrH-P.cjs';
5
+ import './transform-jVfAikE9.cjs';
6
6
 
7
- /**
8
- * Props for the Qwik `BottomSheet` component. Optionally narrows to a
9
- * literal-id union `TId` when the consumer pins `snapPoints` with `as const`
10
- * and explicitly types the call site:
11
- *
12
- * ```tsx
13
- * const points = [
14
- * { id: "min", size: 96 },
15
- * { id: "full", size: "85%" },
16
- * ] as const;
17
- * <BottomSheet<"min" | "full"> snapPoints={points} onSnap$={$((id) => ...)} />
18
- * ```
19
- *
20
- * Without an explicit type argument `TId` defaults to `string` so existing
21
- * call sites compile unchanged. The underlying engine stays `string`-typed;
22
- * the literal narrowing is a TS-only convenience layered on top of the
23
- * runtime. Note: Qwik wraps event handlers in `QRL<...>` because component
24
- * boundaries are serialised — that wrapper preserves the inner `TId`.
25
- */
26
7
  type BottomSheetProps<TId extends string = string> = {
27
8
  snapPoints: SnapPointDef<TId>[] | ReadonlyArray<SnapPointDef<TId>>;
28
9
  allowed?: TId[] | ReadonlyArray<TId>;
@@ -43,9 +24,7 @@ type BottomSheetProps<TId extends string = string> = {
43
24
  backdrop?: boolean;
44
25
  closeOnBackdrop?: boolean;
45
26
  ariaLabel?: string;
46
- /** Fires when the active snap settles. */
47
27
  onSnap$?: QRL<(id: TId) => void>;
48
- /** Fires on every state-affecting engine event (snap/dragstart/dragend). */
49
28
  onChange$?: QRL<(state: EngineState & {
50
29
  activeId: TId;
51
30
  }) => void>;
package/dist/qwik.d.ts CHANGED
@@ -1,28 +1,9 @@
1
1
  import * as _builder_io_qwik from '@builder.io/qwik';
2
2
  import { QRL } from '@builder.io/qwik';
3
- import { S as SnapPointDef, a as SheetMode, E as EngineState } from './BottomSheetEngine-DbO8rW_3.js';
4
- export { b as EngineOptions, c as SnapPoint } from './BottomSheetEngine-DbO8rW_3.js';
5
- import './transform-Brkf-wzo.js';
3
+ import { a as SnapPointDef, b as SheetMode, E as EngineState } from './BottomSheetEngine-DcqcuudN.js';
4
+ export { c as EngineOptions, d as SnapPoint } from './BottomSheetEngine-DcqcuudN.js';
5
+ import './transform-jVfAikE9.js';
6
6
 
7
- /**
8
- * Props for the Qwik `BottomSheet` component. Optionally narrows to a
9
- * literal-id union `TId` when the consumer pins `snapPoints` with `as const`
10
- * and explicitly types the call site:
11
- *
12
- * ```tsx
13
- * const points = [
14
- * { id: "min", size: 96 },
15
- * { id: "full", size: "85%" },
16
- * ] as const;
17
- * <BottomSheet<"min" | "full"> snapPoints={points} onSnap$={$((id) => ...)} />
18
- * ```
19
- *
20
- * Without an explicit type argument `TId` defaults to `string` so existing
21
- * call sites compile unchanged. The underlying engine stays `string`-typed;
22
- * the literal narrowing is a TS-only convenience layered on top of the
23
- * runtime. Note: Qwik wraps event handlers in `QRL<...>` because component
24
- * boundaries are serialised — that wrapper preserves the inner `TId`.
25
- */
26
7
  type BottomSheetProps<TId extends string = string> = {
27
8
  snapPoints: SnapPointDef<TId>[] | ReadonlyArray<SnapPointDef<TId>>;
28
9
  allowed?: TId[] | ReadonlyArray<TId>;
@@ -43,9 +24,7 @@ type BottomSheetProps<TId extends string = string> = {
43
24
  backdrop?: boolean;
44
25
  closeOnBackdrop?: boolean;
45
26
  ariaLabel?: string;
46
- /** Fires when the active snap settles. */
47
27
  onSnap$?: QRL<(id: TId) => void>;
48
- /** Fires on every state-affecting engine event (snap/dragstart/dragend). */
49
28
  onChange$?: QRL<(state: EngineState & {
50
29
  activeId: TId;
51
30
  }) => void>;