@surdeddd/bottom-sheet 0.12.0 → 0.14.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 (66) hide show
  1. package/README.md +85 -1
  2. package/dist/{BottomSheetEngine-D6oiEfZ4.d.cts → BottomSheetCore-Cp7dWy91.d.cts} +85 -5
  3. package/dist/{BottomSheetEngine-Dhy0X_e9.d.ts → BottomSheetCore-DJYwWOqt.d.ts} +85 -5
  4. package/dist/BottomSheetEngine-Lm7HIVHv.d.cts +7 -0
  5. package/dist/BottomSheetEngine-O5PbeKfe.d.ts +7 -0
  6. package/dist/core.cjs +3680 -0
  7. package/dist/core.d.cts +3 -0
  8. package/dist/core.d.ts +3 -0
  9. package/dist/core.js +3678 -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 +1314 -829
  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 +1314 -829
  19. package/dist/features.cjs +489 -0
  20. package/dist/features.d.cts +13 -0
  21. package/dist/features.d.ts +13 -0
  22. package/dist/features.js +482 -0
  23. package/dist/index-Bb5TRmyg.d.cts +9 -0
  24. package/dist/index-Cl9ebCP2.d.ts +9 -0
  25. package/dist/index.cjs +979 -1293
  26. package/dist/index.d.cts +43 -55
  27. package/dist/index.d.ts +43 -55
  28. package/dist/index.js +973 -1280
  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 +11 -10
  34. package/dist/overlay.js +11 -10
  35. package/dist/preact.d.cts +2 -1
  36. package/dist/preact.d.ts +2 -1
  37. package/dist/qwik-lib/index.qwik.cjs +4418 -0
  38. package/dist/qwik-lib/index.qwik.mjs +4418 -0
  39. package/dist/qwik.cjs +1089 -657
  40. package/dist/qwik.d.cts +4 -2
  41. package/dist/qwik.d.ts +4 -2
  42. package/dist/qwik.js +1089 -657
  43. package/dist/react.cjs +1100 -665
  44. package/dist/react.d.cts +3 -3
  45. package/dist/react.d.ts +3 -3
  46. package/dist/react.js +1100 -665
  47. package/dist/solid.cjs +1095 -657
  48. package/dist/solid.d.cts +90 -4
  49. package/dist/solid.d.ts +90 -4
  50. package/dist/solid.js +1095 -657
  51. package/dist/solid.source.jsx +1103 -657
  52. package/dist/styles.css +24 -4
  53. package/dist/svelte-core.cjs +981 -557
  54. package/dist/svelte-core.js +981 -557
  55. package/dist/svelte-src/BottomSheet.svelte +14 -0
  56. package/dist/svelte.cjs +1091 -657
  57. package/dist/svelte.d.cts +2 -0
  58. package/dist/svelte.d.ts +2 -0
  59. package/dist/svelte.js +1091 -657
  60. package/dist/vue.cjs +1105 -657
  61. package/dist/vue.js +1105 -657
  62. package/dist/webgl.cjs +583 -0
  63. package/dist/webgl.d.cts +17 -0
  64. package/dist/webgl.d.ts +17 -0
  65. package/dist/webgl.js +581 -0
  66. package/package.json +88 -12
@@ -1,4 +1,4 @@
1
- import { d as SheetEventMap } from '../BottomSheetEngine-D6oiEfZ4.cjs';
1
+ import { d as SheetEventMap } from '../BottomSheetCore-Cp7dWy91.cjs';
2
2
  import '../transform-jVfAikE9.cjs';
3
3
 
4
4
  type FormikStateLike = {
@@ -1,4 +1,4 @@
1
- import { d as SheetEventMap } from '../BottomSheetEngine-Dhy0X_e9.js';
1
+ import { d as SheetEventMap } from '../BottomSheetCore-DJYwWOqt.js';
2
2
  import '../transform-jVfAikE9.js';
3
3
 
4
4
  type FormikStateLike = {
@@ -1,4 +1,4 @@
1
- import { d as SheetEventMap } from '../BottomSheetEngine-D6oiEfZ4.cjs';
1
+ import { d as SheetEventMap } from '../BottomSheetCore-Cp7dWy91.cjs';
2
2
  import '../transform-jVfAikE9.cjs';
3
3
 
4
4
  type RhfFormStateLike = {
@@ -1,4 +1,4 @@
1
- import { d as SheetEventMap } from '../BottomSheetEngine-Dhy0X_e9.js';
1
+ import { d as SheetEventMap } from '../BottomSheetCore-DJYwWOqt.js';
2
2
  import '../transform-jVfAikE9.js';
3
3
 
4
4
  type RhfFormStateLike = {
package/dist/overlay.cjs CHANGED
@@ -4,7 +4,7 @@ var __defProp = Object.defineProperty;
4
4
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
5
5
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
6
6
 
7
- // src/core/lifecycle/sheetStack.ts
7
+ // src/core/lifecycle/sheet-stack.ts
8
8
  var BASE_Z = 100;
9
9
  var STEP = 10;
10
10
  var SheetStack = class {
@@ -73,7 +73,7 @@ var SheetStack = class {
73
73
  };
74
74
  var sheetStack = new SheetStack();
75
75
 
76
- // src/core/primitives/cssLength.ts
76
+ // src/core/primitives/css-length.ts
77
77
  var probe = null;
78
78
  var PROBE_ATTR = "data-bs-probe";
79
79
  var ensureProbe = (axis) => {
@@ -120,7 +120,7 @@ var resolveSnap = (point, mode, measureFit) => {
120
120
  }
121
121
  };
122
122
 
123
- // src/core/primitives/devWarn.ts
123
+ // src/core/primitives/dev-warn.ts
124
124
  function devWarn(...args) {
125
125
  if (typeof process !== "undefined" && process.env && process.env.NODE_ENV !== "production" && typeof console !== "undefined") {
126
126
  console.warn(...args);
@@ -168,7 +168,7 @@ function createEventBus() {
168
168
  };
169
169
  }
170
170
 
171
- // src/core/lifecycle/focusTrap.ts
171
+ // src/core/lifecycle/focus-trap.ts
172
172
  var FOCUSABLE = [
173
173
  "a[href]",
174
174
  "area[href]",
@@ -286,7 +286,7 @@ var installFocusTrap = (container, options = {}) => {
286
286
  };
287
287
  };
288
288
 
289
- // src/core/lifecycle/scrollLock.ts
289
+ // src/core/lifecycle/scroll-lock.ts
290
290
  var lockCount = 0;
291
291
  var savedStyles = null;
292
292
  var lockBodyScroll = () => {
@@ -533,7 +533,7 @@ function installOverlaySwipe(deps) {
533
533
  var entries = [];
534
534
  var subscribers = /* @__PURE__ */ new Set();
535
535
  var suppress = 0;
536
- var pendingRebrand = null;
536
+ var pendingRebrands = [];
537
537
  var listenerInstalled = false;
538
538
  var hasWindow = () => typeof window !== "undefined";
539
539
  var hasHistory = () => typeof history !== "undefined";
@@ -565,8 +565,7 @@ var maybeTeardownListener = () => {
565
565
  function onPopState() {
566
566
  if (suppress > 0) {
567
567
  suppress -= 1;
568
- const rebrand = pendingRebrand;
569
- pendingRebrand = null;
568
+ const rebrand = pendingRebrands.shift();
570
569
  if (rebrand) rebrand();
571
570
  maybeTeardownListener();
572
571
  return;
@@ -648,10 +647,11 @@ function popBackMarker(handle) {
648
647
  const last = entries.length - 1;
649
648
  entry.live = false;
650
649
  entries.splice(idx, 1);
650
+ let rebrand = null;
651
651
  if (idx !== last) {
652
652
  const rebrandSurface = entries[entries.length - 1].surface;
653
653
  const rebrandUrl = entry.priorUrl;
654
- pendingRebrand = () => {
654
+ rebrand = () => {
655
655
  runInternal(() => {
656
656
  history.replaceState(
657
657
  brandMarker(rebrandSurface),
@@ -661,13 +661,14 @@ function popBackMarker(handle) {
661
661
  });
662
662
  };
663
663
  }
664
+ pendingRebrands.push(rebrand);
664
665
  suppress += 1;
665
666
  runInternal(() => {
666
667
  try {
667
668
  history.back();
668
669
  } catch {
669
670
  suppress = Math.max(0, suppress - 1);
670
- pendingRebrand = null;
671
+ pendingRebrands.pop();
671
672
  }
672
673
  });
673
674
  maybeTeardownListener();
package/dist/overlay.js CHANGED
@@ -2,7 +2,7 @@ var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
3
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
4
 
5
- // src/core/lifecycle/sheetStack.ts
5
+ // src/core/lifecycle/sheet-stack.ts
6
6
  var BASE_Z = 100;
7
7
  var STEP = 10;
8
8
  var SheetStack = class {
@@ -71,7 +71,7 @@ var SheetStack = class {
71
71
  };
72
72
  var sheetStack = new SheetStack();
73
73
 
74
- // src/core/primitives/cssLength.ts
74
+ // src/core/primitives/css-length.ts
75
75
  var probe = null;
76
76
  var PROBE_ATTR = "data-bs-probe";
77
77
  var ensureProbe = (axis) => {
@@ -118,7 +118,7 @@ var resolveSnap = (point, mode, measureFit) => {
118
118
  }
119
119
  };
120
120
 
121
- // src/core/primitives/devWarn.ts
121
+ // src/core/primitives/dev-warn.ts
122
122
  function devWarn(...args) {
123
123
  if (typeof process !== "undefined" && process.env && process.env.NODE_ENV !== "production" && typeof console !== "undefined") {
124
124
  console.warn(...args);
@@ -166,7 +166,7 @@ function createEventBus() {
166
166
  };
167
167
  }
168
168
 
169
- // src/core/lifecycle/focusTrap.ts
169
+ // src/core/lifecycle/focus-trap.ts
170
170
  var FOCUSABLE = [
171
171
  "a[href]",
172
172
  "area[href]",
@@ -284,7 +284,7 @@ var installFocusTrap = (container, options = {}) => {
284
284
  };
285
285
  };
286
286
 
287
- // src/core/lifecycle/scrollLock.ts
287
+ // src/core/lifecycle/scroll-lock.ts
288
288
  var lockCount = 0;
289
289
  var savedStyles = null;
290
290
  var lockBodyScroll = () => {
@@ -531,7 +531,7 @@ function installOverlaySwipe(deps) {
531
531
  var entries = [];
532
532
  var subscribers = /* @__PURE__ */ new Set();
533
533
  var suppress = 0;
534
- var pendingRebrand = null;
534
+ var pendingRebrands = [];
535
535
  var listenerInstalled = false;
536
536
  var hasWindow = () => typeof window !== "undefined";
537
537
  var hasHistory = () => typeof history !== "undefined";
@@ -563,8 +563,7 @@ var maybeTeardownListener = () => {
563
563
  function onPopState() {
564
564
  if (suppress > 0) {
565
565
  suppress -= 1;
566
- const rebrand = pendingRebrand;
567
- pendingRebrand = null;
566
+ const rebrand = pendingRebrands.shift();
568
567
  if (rebrand) rebrand();
569
568
  maybeTeardownListener();
570
569
  return;
@@ -646,10 +645,11 @@ function popBackMarker(handle) {
646
645
  const last = entries.length - 1;
647
646
  entry.live = false;
648
647
  entries.splice(idx, 1);
648
+ let rebrand = null;
649
649
  if (idx !== last) {
650
650
  const rebrandSurface = entries[entries.length - 1].surface;
651
651
  const rebrandUrl = entry.priorUrl;
652
- pendingRebrand = () => {
652
+ rebrand = () => {
653
653
  runInternal(() => {
654
654
  history.replaceState(
655
655
  brandMarker(rebrandSurface),
@@ -659,13 +659,14 @@ function popBackMarker(handle) {
659
659
  });
660
660
  };
661
661
  }
662
+ pendingRebrands.push(rebrand);
662
663
  suppress += 1;
663
664
  runInternal(() => {
664
665
  try {
665
666
  history.back();
666
667
  } catch {
667
668
  suppress = Math.max(0, suppress - 1);
668
- pendingRebrand = null;
669
+ pendingRebrands.pop();
669
670
  }
670
671
  });
671
672
  maybeTeardownListener();
package/dist/preact.d.cts CHANGED
@@ -1,6 +1,7 @@
1
1
  export { BottomSheet, BottomSheetFromConfig, BottomSheetFromConfigProps, BottomSheetHandle, BottomSheetProps, HeaderProp, Overlay, OverlayHandle, OverlayProps, SheetConfig, UseBottomSheetRefs, UseBottomSheetReturn, UseOverlayReturn, useBottomSheet, useOverlay } from './react.cjs';
2
- export { E as EngineState, b as SheetMode, e as SnapPoint, a as SnapPointDef } from './BottomSheetEngine-D6oiEfZ4.cjs';
2
+ export { E as EngineState, c as SheetMode, e as SnapPoint, b as SnapPointDef } from './BottomSheetCore-Cp7dWy91.cjs';
3
3
  export { OverlayEdge, OverlayOptions, OverlayState } from './overlay.cjs';
4
4
  import 'react';
5
+ import './BottomSheetEngine-Lm7HIVHv.cjs';
5
6
  import './teleport-7uYNiEAT.cjs';
6
7
  import './transform-jVfAikE9.cjs';
package/dist/preact.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export { BottomSheet, BottomSheetFromConfig, BottomSheetFromConfigProps, BottomSheetHandle, BottomSheetProps, HeaderProp, Overlay, OverlayHandle, OverlayProps, SheetConfig, UseBottomSheetRefs, UseBottomSheetReturn, UseOverlayReturn, useBottomSheet, useOverlay } from './react.js';
2
- export { E as EngineState, b as SheetMode, e as SnapPoint, a as SnapPointDef } from './BottomSheetEngine-Dhy0X_e9.js';
2
+ export { E as EngineState, c as SheetMode, e as SnapPoint, b as SnapPointDef } from './BottomSheetCore-DJYwWOqt.js';
3
3
  export { OverlayEdge, OverlayOptions, OverlayState } from './overlay.js';
4
4
  import 'react';
5
+ import './BottomSheetEngine-O5PbeKfe.js';
5
6
  import './teleport-7uYNiEAT.js';
6
7
  import './transform-jVfAikE9.js';