@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.
- package/README.md +52 -1
- package/dist/{BottomSheetEngine-D6oiEfZ4.d.cts → BottomSheetCore-CsIjyq7C.d.cts} +60 -5
- package/dist/{BottomSheetEngine-Dhy0X_e9.d.ts → BottomSheetCore-D16lsa6g.d.ts} +60 -5
- package/dist/BottomSheetEngine-BYjAVrmd.d.cts +7 -0
- package/dist/BottomSheetEngine-YuCNugZn.d.ts +7 -0
- package/dist/core.cjs +3476 -0
- package/dist/core.d.cts +3 -0
- package/dist/core.d.ts +3 -0
- package/dist/core.js +3474 -0
- package/dist/debug.cjs +109 -0
- package/dist/debug.d.cts +22 -0
- package/dist/debug.d.ts +22 -0
- package/dist/debug.js +107 -0
- package/dist/element.cjs +972 -685
- package/dist/element.d.cts +2 -1
- package/dist/element.d.ts +2 -1
- package/dist/element.iife.global.js +2 -2
- package/dist/element.js +972 -685
- package/dist/features.cjs +533 -0
- package/dist/features.d.cts +13 -0
- package/dist/features.d.ts +13 -0
- package/dist/features.js +526 -0
- package/dist/index-DdYLOIIT.d.ts +15 -0
- package/dist/index-dfrzw-lI.d.cts +15 -0
- package/dist/index.cjs +805 -534
- package/dist/index.d.cts +6 -15
- package/dist/index.d.ts +6 -15
- package/dist/index.js +799 -535
- package/dist/integrations/formik.d.cts +1 -1
- package/dist/integrations/formik.d.ts +1 -1
- package/dist/integrations/react-hook-form.d.cts +1 -1
- package/dist/integrations/react-hook-form.d.ts +1 -1
- package/dist/overlay.cjs +6 -5
- package/dist/overlay.js +6 -5
- package/dist/preact.d.cts +2 -1
- package/dist/preact.d.ts +2 -1
- package/dist/qwik-lib/index.qwik.cjs +4267 -0
- package/dist/qwik-lib/index.qwik.mjs +4267 -0
- package/dist/qwik.cjs +798 -534
- package/dist/qwik.d.cts +2 -2
- package/dist/qwik.d.ts +2 -2
- package/dist/qwik.js +798 -534
- package/dist/react.cjs +798 -534
- package/dist/react.d.cts +3 -2
- package/dist/react.d.ts +3 -2
- package/dist/react.js +798 -534
- package/dist/solid.cjs +798 -534
- package/dist/solid.d.cts +63 -4
- package/dist/solid.d.ts +63 -4
- package/dist/solid.js +798 -534
- package/dist/solid.source.jsx +798 -534
- package/dist/svelte-core.cjs +798 -534
- package/dist/svelte-core.js +798 -534
- package/dist/svelte.cjs +798 -534
- package/dist/svelte.js +798 -534
- package/dist/vue.cjs +909 -637
- package/dist/vue.js +909 -637
- package/package.json +63 -11
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
|
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
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,
|
|
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';
|