@surdeddd/bottom-sheet 0.23.3 → 0.24.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 (80) hide show
  1. package/README.md +513 -525
  2. package/README.ru.md +685 -0
  3. package/dist/{BottomSheetCore-COvILxmR.d.ts → BottomSheetCore-B_r4KCQL.d.cts} +48 -12
  4. package/dist/{BottomSheetCore-CaJwHnxY.d.cts → BottomSheetCore-B_r4KCQL.d.ts} +48 -12
  5. package/dist/{BottomSheetEngine-C_1aPJsU.d.cts → BottomSheetEngine-0F7mjyvF.d.cts} +1 -1
  6. package/dist/{BottomSheetEngine-CsgCcCSO.d.ts → BottomSheetEngine-CJV_DDrM.d.ts} +1 -1
  7. package/dist/core.cjs +810 -436
  8. package/dist/core.d.cts +2 -3
  9. package/dist/core.d.ts +2 -3
  10. package/dist/core.js +810 -436
  11. package/dist/debug.d.cts +3 -3
  12. package/dist/debug.d.ts +3 -3
  13. package/dist/{default-features-BJx7J0NH.d.ts → default-features-4Xwv6aVt.d.ts} +4 -2
  14. package/dist/{default-features-CTJb8Wdk.d.cts → default-features-DX2NOxP6.d.cts} +4 -2
  15. package/dist/element.cjs +1428 -699
  16. package/dist/element.d.cts +15 -5
  17. package/dist/element.d.ts +15 -5
  18. package/dist/element.iife.global.js +2 -2
  19. package/dist/element.js +1428 -699
  20. package/dist/features.cjs +334 -190
  21. package/dist/features.d.cts +3 -4
  22. package/dist/features.d.ts +3 -4
  23. package/dist/features.js +334 -191
  24. package/dist/{index-CXN7t3rr.d.ts → index-2shlxhcG.d.cts} +3 -2
  25. package/dist/{index-BBrJJjy5.d.cts → index-CNCRQnpc.d.ts} +3 -2
  26. package/dist/index.cjs +1129 -631
  27. package/dist/index.d.cts +13 -7
  28. package/dist/index.d.ts +13 -7
  29. package/dist/index.js +1129 -632
  30. package/dist/integrations/formik.cjs +21 -10
  31. package/dist/integrations/formik.d.cts +3 -3
  32. package/dist/integrations/formik.d.ts +3 -3
  33. package/dist/integrations/formik.js +22 -11
  34. package/dist/integrations/react-hook-form.cjs +21 -12
  35. package/dist/integrations/react-hook-form.d.cts +3 -3
  36. package/dist/integrations/react-hook-form.d.ts +3 -3
  37. package/dist/integrations/react-hook-form.js +21 -12
  38. package/dist/option-keys-DItuAjUw.d.cts +6 -0
  39. package/dist/option-keys-a5DYNwwO.d.ts +6 -0
  40. package/dist/overlay.cjs +386 -189
  41. package/dist/overlay.d.cts +3 -4
  42. package/dist/overlay.d.ts +3 -4
  43. package/dist/overlay.js +386 -189
  44. package/dist/preact.d.cts +3 -4
  45. package/dist/preact.d.ts +3 -4
  46. package/dist/qwik-lib/index.qwik.cjs +1306 -671
  47. package/dist/qwik-lib/index.qwik.mjs +1306 -671
  48. package/dist/qwik.cjs +1326 -701
  49. package/dist/qwik.d.cts +14 -30
  50. package/dist/qwik.d.ts +14 -30
  51. package/dist/qwik.js +1326 -701
  52. package/dist/react.cjs +1373 -750
  53. package/dist/react.d.cts +31 -14
  54. package/dist/react.d.ts +31 -14
  55. package/dist/react.js +1375 -752
  56. package/dist/solid.cjs +1332 -727
  57. package/dist/solid.d.cts +13 -437
  58. package/dist/solid.d.ts +13 -437
  59. package/dist/solid.js +1334 -729
  60. package/dist/solid.source.jsx +1374 -751
  61. package/dist/styles.css +20 -6
  62. package/dist/svelte-core.cjs +1211 -676
  63. package/dist/svelte-core.js +1207 -677
  64. package/dist/svelte-src/BottomSheet.svelte +102 -59
  65. package/dist/svelte.cjs +1324 -707
  66. package/dist/svelte.d.cts +45 -25
  67. package/dist/svelte.d.ts +45 -25
  68. package/dist/svelte.js +1324 -707
  69. package/dist/vue.cjs +1354 -773
  70. package/dist/vue.d.cts +20 -3
  71. package/dist/vue.d.ts +20 -3
  72. package/dist/vue.js +1354 -773
  73. package/dist/webgl.cjs +38 -7
  74. package/dist/webgl.d.cts +3 -3
  75. package/dist/webgl.d.ts +3 -3
  76. package/dist/webgl.js +38 -7
  77. package/llms.txt +330 -0
  78. package/package.json +62 -42
  79. package/dist/transform-jVfAikE9.d.cts +0 -3
  80. package/dist/transform-jVfAikE9.d.ts +0 -3
package/dist/index.d.cts CHANGED
@@ -1,9 +1,10 @@
1
- export { B as BottomSheetEngine } from './BottomSheetEngine-C_1aPJsU.cjs';
2
- import { h as SnapPoint, f as SheetMode, g as EngineOptions, P as PhysicalSheetMode, j as ScrimOverlayPosition } from './BottomSheetCore-CaJwHnxY.cjs';
3
- export { k as AnchorAnimationPreset, l as AnchorAnimationSpec, m as AnchorHandle, A as AnchorOptions, n as AnchorPosition, o as AnchorState, B as BottomSheetCore, C as CloseReason, E as EngineFeature, a as EngineFeatureContext, b as EngineFeatureOptions, c as EngineFeatureStage, d as EngineState, L as LogicalSheetMode, p as Plugin, q as SCRIM_PRESETS, r as ScrimOverlayOptions, s as ScrimPreset, t as ScrimPresetConfig, u as ScrimStageDef, i as ScrimStagesOptions, v as ScrimUpdate, S as SheetEventMap, w as SnapId, e as SnapPointDef, T as TeardownScope, x as runAnchorTransition } from './BottomSheetCore-CaJwHnxY.cjs';
4
- export { a as autoCollapseFeature, c as contentSwipeFeature, d as defaultEngineFeatures, p as persistFeature, r as routeFeature, v as visualViewportFeature } from './default-features-CTJb8Wdk.cjs';
5
- export { R as ResolvedSnap, r as resolveSnapList } from './index-BBrJJjy5.cjs';
6
- import './transform-jVfAikE9.cjs';
1
+ export { B as BottomSheetEngine } from './BottomSheetEngine-0F7mjyvF.cjs';
2
+ import { h as SnapPoint, g as SheetMode, f as EngineOptions, P as PhysicalSheetMode, j as ScrimOverlayPosition } from './BottomSheetCore-B_r4KCQL.cjs';
3
+ export { k as AnchorAnimationPreset, l as AnchorAnimationSpec, m as AnchorHandle, A as AnchorOptions, n as AnchorPosition, o as AnchorState, B as BottomSheetCore, C as CloseReason, E as EngineFeature, a as EngineFeatureContext, b as EngineFeatureOptions, c as EngineFeatureStage, d as EngineState, L as LogicalSheetMode, p as Plugin, q as SCRIM_PRESETS, r as ScrimOverlayOptions, s as ScrimPreset, t as ScrimPresetConfig, u as ScrimStageDef, i as ScrimStagesOptions, v as ScrimUpdate, S as SheetEventMap, w as SheetPhase, x as SnapId, e as SnapPointDef, T as TeardownScope, y as runAnchorTransition } from './BottomSheetCore-B_r4KCQL.cjs';
4
+ export { a as autoCollapseFeature, c as contentSwipeFeature, d as defaultEngineFeatures, h as historySettled, p as persistFeature, r as routeFeature, v as visualViewportFeature } from './default-features-DX2NOxP6.cjs';
5
+ export { R as ResolvedSnap, r as resolveSnapList } from './index-2shlxhcG.cjs';
6
+ export { E as EngineConfig } from './option-keys-DItuAjUw.cjs';
7
+ export { T as TeleportTarget } from './teleport-7uYNiEAT.cjs';
7
8
 
8
9
  declare const resolveSnap: (point: SnapPoint | string, mode: SheetMode, measureFit?: () => number) => number;
9
10
 
@@ -24,6 +25,7 @@ declare const installGestures: (handle: HTMLElement, mode: SheetMode, callbacks:
24
25
  declare const installFocusTrap: (container: HTMLElement, options?: {
25
26
  initialFocus?: HTMLElement | string | false;
26
27
  onEscape?: () => void;
28
+ isActive?: () => boolean;
27
29
  }) => (() => void);
28
30
 
29
31
  declare const lockBodyScroll: () => (() => void);
@@ -64,6 +66,7 @@ declare const createSheetManager: <Key extends string = string>(initial?: Record
64
66
 
65
67
  type Tween = {
66
68
  cancel: () => void;
69
+ retarget: (to: number) => void;
67
70
  promise: Promise<void>;
68
71
  };
69
72
  type TweenOptions = {
@@ -86,10 +89,12 @@ type SpringRunOptions = {
86
89
  to: number;
87
90
  velocity?: number;
88
91
  config?: Partial<SpringConfig>;
92
+ maxDuration?: number;
89
93
  onUpdate: (value: number, velocity: number) => void;
90
94
  };
91
95
  type SpringHandle = {
92
96
  cancel: () => void;
97
+ retarget: (to: number) => void;
93
98
  promise: Promise<void>;
94
99
  };
95
100
 
@@ -103,4 +108,5 @@ type SheetAnchoredStyle = {
103
108
  declare function resolveSheetAnchoredStyle(mode: PhysicalSheetMode, position: "sheet-top-left" | "sheet-top-center" | "sheet-top-right", inset: string): SheetAnchoredStyle;
104
109
  declare function applyOverlayPosition(ws: CSSStyleDeclaration, mode: PhysicalSheetMode, position: ScrimOverlayPosition, inset: string): void;
105
110
 
106
- export { EngineOptions, PhysicalSheetMode, ScrimOverlayPosition, type SheetConfig, type SheetManager, SheetMode, SnapPoint, type SpringConfig, type SpringHandle, type SpringRunOptions, type StackEntry, type Tween, type TweenOptions, applyOverlayPosition, createSheetManager, installFocusTrap, installGestures, lockBodyScroll, resolveSheetAnchoredStyle, resolveSnap, sheetStack };
111
+ export { EngineOptions, PhysicalSheetMode, ScrimOverlayPosition, SheetMode, SnapPoint, applyOverlayPosition, createSheetManager, installFocusTrap, installGestures, lockBodyScroll, resolveSheetAnchoredStyle, resolveSnap, sheetStack };
112
+ export type { SheetConfig, SheetManager, SpringConfig, SpringHandle, SpringRunOptions, StackEntry, Tween, TweenOptions };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,10 @@
1
- export { B as BottomSheetEngine } from './BottomSheetEngine-CsgCcCSO.js';
2
- import { h as SnapPoint, f as SheetMode, g as EngineOptions, P as PhysicalSheetMode, j as ScrimOverlayPosition } from './BottomSheetCore-COvILxmR.js';
3
- export { k as AnchorAnimationPreset, l as AnchorAnimationSpec, m as AnchorHandle, A as AnchorOptions, n as AnchorPosition, o as AnchorState, B as BottomSheetCore, C as CloseReason, E as EngineFeature, a as EngineFeatureContext, b as EngineFeatureOptions, c as EngineFeatureStage, d as EngineState, L as LogicalSheetMode, p as Plugin, q as SCRIM_PRESETS, r as ScrimOverlayOptions, s as ScrimPreset, t as ScrimPresetConfig, u as ScrimStageDef, i as ScrimStagesOptions, v as ScrimUpdate, S as SheetEventMap, w as SnapId, e as SnapPointDef, T as TeardownScope, x as runAnchorTransition } from './BottomSheetCore-COvILxmR.js';
4
- export { a as autoCollapseFeature, c as contentSwipeFeature, d as defaultEngineFeatures, p as persistFeature, r as routeFeature, v as visualViewportFeature } from './default-features-BJx7J0NH.js';
5
- export { R as ResolvedSnap, r as resolveSnapList } from './index-CXN7t3rr.js';
6
- import './transform-jVfAikE9.js';
1
+ export { B as BottomSheetEngine } from './BottomSheetEngine-CJV_DDrM.js';
2
+ import { h as SnapPoint, g as SheetMode, f as EngineOptions, P as PhysicalSheetMode, j as ScrimOverlayPosition } from './BottomSheetCore-B_r4KCQL.js';
3
+ export { k as AnchorAnimationPreset, l as AnchorAnimationSpec, m as AnchorHandle, A as AnchorOptions, n as AnchorPosition, o as AnchorState, B as BottomSheetCore, C as CloseReason, E as EngineFeature, a as EngineFeatureContext, b as EngineFeatureOptions, c as EngineFeatureStage, d as EngineState, L as LogicalSheetMode, p as Plugin, q as SCRIM_PRESETS, r as ScrimOverlayOptions, s as ScrimPreset, t as ScrimPresetConfig, u as ScrimStageDef, i as ScrimStagesOptions, v as ScrimUpdate, S as SheetEventMap, w as SheetPhase, x as SnapId, e as SnapPointDef, T as TeardownScope, y as runAnchorTransition } from './BottomSheetCore-B_r4KCQL.js';
4
+ export { a as autoCollapseFeature, c as contentSwipeFeature, d as defaultEngineFeatures, h as historySettled, p as persistFeature, r as routeFeature, v as visualViewportFeature } from './default-features-4Xwv6aVt.js';
5
+ export { R as ResolvedSnap, r as resolveSnapList } from './index-CNCRQnpc.js';
6
+ export { E as EngineConfig } from './option-keys-a5DYNwwO.js';
7
+ export { T as TeleportTarget } from './teleport-7uYNiEAT.js';
7
8
 
8
9
  declare const resolveSnap: (point: SnapPoint | string, mode: SheetMode, measureFit?: () => number) => number;
9
10
 
@@ -24,6 +25,7 @@ declare const installGestures: (handle: HTMLElement, mode: SheetMode, callbacks:
24
25
  declare const installFocusTrap: (container: HTMLElement, options?: {
25
26
  initialFocus?: HTMLElement | string | false;
26
27
  onEscape?: () => void;
28
+ isActive?: () => boolean;
27
29
  }) => (() => void);
28
30
 
29
31
  declare const lockBodyScroll: () => (() => void);
@@ -64,6 +66,7 @@ declare const createSheetManager: <Key extends string = string>(initial?: Record
64
66
 
65
67
  type Tween = {
66
68
  cancel: () => void;
69
+ retarget: (to: number) => void;
67
70
  promise: Promise<void>;
68
71
  };
69
72
  type TweenOptions = {
@@ -86,10 +89,12 @@ type SpringRunOptions = {
86
89
  to: number;
87
90
  velocity?: number;
88
91
  config?: Partial<SpringConfig>;
92
+ maxDuration?: number;
89
93
  onUpdate: (value: number, velocity: number) => void;
90
94
  };
91
95
  type SpringHandle = {
92
96
  cancel: () => void;
97
+ retarget: (to: number) => void;
93
98
  promise: Promise<void>;
94
99
  };
95
100
 
@@ -103,4 +108,5 @@ type SheetAnchoredStyle = {
103
108
  declare function resolveSheetAnchoredStyle(mode: PhysicalSheetMode, position: "sheet-top-left" | "sheet-top-center" | "sheet-top-right", inset: string): SheetAnchoredStyle;
104
109
  declare function applyOverlayPosition(ws: CSSStyleDeclaration, mode: PhysicalSheetMode, position: ScrimOverlayPosition, inset: string): void;
105
110
 
106
- export { EngineOptions, PhysicalSheetMode, ScrimOverlayPosition, type SheetConfig, type SheetManager, SheetMode, SnapPoint, type SpringConfig, type SpringHandle, type SpringRunOptions, type StackEntry, type Tween, type TweenOptions, applyOverlayPosition, createSheetManager, installFocusTrap, installGestures, lockBodyScroll, resolveSheetAnchoredStyle, resolveSnap, sheetStack };
111
+ export { EngineOptions, PhysicalSheetMode, ScrimOverlayPosition, SheetMode, SnapPoint, applyOverlayPosition, createSheetManager, installFocusTrap, installGestures, lockBodyScroll, resolveSheetAnchoredStyle, resolveSnap, sheetStack };
112
+ export type { SheetConfig, SheetManager, SpringConfig, SpringHandle, SpringRunOptions, StackEntry, Tween, TweenOptions };