@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/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 { S as SnapPointDef, a as SheetMode, E as EngineState } from './BottomSheetEngine-CIT9Htti.cjs';
4
+ export { b as EngineOptions, c as SnapPoint } from './BottomSheetEngine-CIT9Htti.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 { S as SnapPointDef, a as SheetMode, E as EngineState } from './BottomSheetEngine-Df9MwBbm.js';
4
+ export { b as EngineOptions, c as SnapPoint } from './BottomSheetEngine-Df9MwBbm.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>;