@surdeddd/bottom-sheet 0.12.0 → 0.13.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 (58) hide show
  1. package/README.md +52 -1
  2. package/dist/{BottomSheetEngine-D6oiEfZ4.d.cts → BottomSheetCore-CsIjyq7C.d.cts} +60 -5
  3. package/dist/{BottomSheetEngine-Dhy0X_e9.d.ts → BottomSheetCore-D16lsa6g.d.ts} +60 -5
  4. package/dist/BottomSheetEngine-BYjAVrmd.d.cts +7 -0
  5. package/dist/BottomSheetEngine-YuCNugZn.d.ts +7 -0
  6. package/dist/core.cjs +3476 -0
  7. package/dist/core.d.cts +3 -0
  8. package/dist/core.d.ts +3 -0
  9. package/dist/core.js +3474 -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 +972 -685
  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 +972 -685
  19. package/dist/features.cjs +533 -0
  20. package/dist/features.d.cts +13 -0
  21. package/dist/features.d.ts +13 -0
  22. package/dist/features.js +526 -0
  23. package/dist/index-DdYLOIIT.d.ts +15 -0
  24. package/dist/index-dfrzw-lI.d.cts +15 -0
  25. package/dist/index.cjs +805 -534
  26. package/dist/index.d.cts +6 -15
  27. package/dist/index.d.ts +6 -15
  28. package/dist/index.js +799 -535
  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 +6 -5
  34. package/dist/overlay.js +6 -5
  35. package/dist/preact.d.cts +2 -1
  36. package/dist/preact.d.ts +2 -1
  37. package/dist/qwik-lib/index.qwik.cjs +4267 -0
  38. package/dist/qwik-lib/index.qwik.mjs +4267 -0
  39. package/dist/qwik.cjs +798 -534
  40. package/dist/qwik.d.cts +2 -2
  41. package/dist/qwik.d.ts +2 -2
  42. package/dist/qwik.js +798 -534
  43. package/dist/react.cjs +798 -534
  44. package/dist/react.d.cts +3 -2
  45. package/dist/react.d.ts +3 -2
  46. package/dist/react.js +798 -534
  47. package/dist/solid.cjs +798 -534
  48. package/dist/solid.d.cts +63 -4
  49. package/dist/solid.d.ts +63 -4
  50. package/dist/solid.js +798 -534
  51. package/dist/solid.source.jsx +798 -534
  52. package/dist/svelte-core.cjs +798 -534
  53. package/dist/svelte-core.js +798 -534
  54. package/dist/svelte.cjs +798 -534
  55. package/dist/svelte.js +798 -534
  56. package/dist/vue.cjs +909 -637
  57. package/dist/vue.js +909 -637
  58. package/package.json +63 -11
@@ -1,4 +1,4 @@
1
- import { d as SheetEventMap } from '../BottomSheetEngine-D6oiEfZ4.cjs';
1
+ import { d as SheetEventMap } from '../BottomSheetCore-CsIjyq7C.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-D16lsa6g.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-CsIjyq7C.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-D16lsa6g.js';
2
2
  import '../transform-jVfAikE9.js';
3
3
 
4
4
  type RhfFormStateLike = {
package/dist/overlay.cjs CHANGED
@@ -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
@@ -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-CsIjyq7C.cjs';
3
3
  export { OverlayEdge, OverlayOptions, OverlayState } from './overlay.cjs';
4
4
  import 'react';
5
+ import './BottomSheetEngine-BYjAVrmd.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-D16lsa6g.js';
3
3
  export { OverlayEdge, OverlayOptions, OverlayState } from './overlay.js';
4
4
  import 'react';
5
+ import './BottomSheetEngine-YuCNugZn.js';
5
6
  import './teleport-7uYNiEAT.js';
6
7
  import './transform-jVfAikE9.js';