@surdeddd/bottom-sheet 0.11.0 → 0.12.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 +16 -0
- package/dist/{BottomSheetEngine-DzsIwD28.d.cts → BottomSheetEngine-D6oiEfZ4.d.cts} +1 -0
- package/dist/{BottomSheetEngine-DRjCU73e.d.ts → BottomSheetEngine-Dhy0X_e9.d.ts} +1 -0
- package/dist/element.cjs +27 -17
- package/dist/element.d.cts +1 -1
- package/dist/element.d.ts +1 -1
- package/dist/element.iife.global.js +2 -2
- package/dist/element.js +27 -17
- package/dist/index.cjs +26 -16
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +26 -16
- 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 +7 -3
- package/dist/overlay.js +7 -3
- package/dist/preact.d.cts +1 -1
- package/dist/preact.d.ts +1 -1
- package/dist/qwik.cjs +26 -16
- package/dist/qwik.d.cts +2 -2
- package/dist/qwik.d.ts +2 -2
- package/dist/qwik.js +26 -16
- package/dist/react.cjs +26 -16
- package/dist/react.d.cts +2 -2
- package/dist/react.d.ts +2 -2
- package/dist/react.js +26 -16
- package/dist/solid.cjs +26 -16
- package/dist/solid.d.cts +1 -0
- package/dist/solid.d.ts +1 -0
- package/dist/solid.js +26 -16
- package/dist/solid.source.jsx +26 -16
- package/dist/svelte-core.cjs +26 -16
- package/dist/svelte-core.js +26 -16
- package/dist/svelte.cjs +26 -16
- package/dist/svelte.js +26 -16
- package/dist/vue.cjs +26 -16
- package/dist/vue.js +26 -16
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -458,6 +458,10 @@ var patchedPushState = null;
|
|
|
458
458
|
var patchedReplaceState = null;
|
|
459
459
|
var hasWindow = () => typeof window !== "undefined";
|
|
460
460
|
var hasHistory = () => typeof history !== "undefined";
|
|
461
|
+
var brandMarker = (surface) => ({
|
|
462
|
+
...surface.markerState(),
|
|
463
|
+
__bs: true
|
|
464
|
+
});
|
|
461
465
|
var runInternal = (fn) => {
|
|
462
466
|
internalDepth += 1;
|
|
463
467
|
try {
|
|
@@ -559,7 +563,7 @@ function restore(entry) {
|
|
|
559
563
|
entry.live = true;
|
|
560
564
|
runInternal(() => {
|
|
561
565
|
try {
|
|
562
|
-
history.pushState(entry.surface
|
|
566
|
+
history.pushState(brandMarker(entry.surface), "", entry.surface.url);
|
|
563
567
|
} catch {
|
|
564
568
|
entry.live = false;
|
|
565
569
|
}
|
|
@@ -577,7 +581,7 @@ function pushBackMarker(surface) {
|
|
|
577
581
|
entry.priorUrl = surface.url !== void 0 ? location.href : void 0;
|
|
578
582
|
runInternal(() => {
|
|
579
583
|
try {
|
|
580
|
-
history.pushState(surface
|
|
584
|
+
history.pushState(brandMarker(surface), "", surface.url);
|
|
581
585
|
entry.live = true;
|
|
582
586
|
} catch {
|
|
583
587
|
entry.live = false;
|
|
@@ -603,7 +607,7 @@ function popBackMarker(handle) {
|
|
|
603
607
|
pendingRebrand = () => {
|
|
604
608
|
runInternal(() => {
|
|
605
609
|
history.replaceState(
|
|
606
|
-
rebrandSurface
|
|
610
|
+
brandMarker(rebrandSurface),
|
|
607
611
|
"",
|
|
608
612
|
rebrandUrl !== void 0 ? rebrandUrl : location.href
|
|
609
613
|
);
|
|
@@ -947,11 +951,15 @@ function createMaxHeightController(deps) {
|
|
|
947
951
|
|
|
948
952
|
// src/core/features/fit-measurement.ts
|
|
949
953
|
var measureSheetNatural = (element, content, vertical) => {
|
|
950
|
-
if (!content) {
|
|
951
|
-
return vertical ? element.offsetHeight : element.offsetWidth;
|
|
952
|
-
}
|
|
953
954
|
const axis = vertical ? "height" : "width";
|
|
954
955
|
const sheetStyle = element.style;
|
|
956
|
+
if (!content) {
|
|
957
|
+
const prev = sheetStyle[axis];
|
|
958
|
+
sheetStyle[axis] = "auto";
|
|
959
|
+
const poked2 = vertical ? element.offsetHeight : element.offsetWidth;
|
|
960
|
+
sheetStyle[axis] = prev;
|
|
961
|
+
return poked2;
|
|
962
|
+
}
|
|
955
963
|
const cs = content.style;
|
|
956
964
|
const prevSheet = sheetStyle[axis];
|
|
957
965
|
const prevFlex = cs.flex;
|
|
@@ -2873,12 +2881,7 @@ var BottomSheetEngine = class {
|
|
|
2873
2881
|
if (!entry.isIntersecting) continue;
|
|
2874
2882
|
if (this.destroyed) return;
|
|
2875
2883
|
this.snaps.recompute();
|
|
2876
|
-
|
|
2877
|
-
if (current) {
|
|
2878
|
-
this.size = current.size;
|
|
2879
|
-
this.applySize(this.size);
|
|
2880
|
-
this.updateAriaSlider();
|
|
2881
|
-
}
|
|
2884
|
+
this.healActiveSnap();
|
|
2882
2885
|
io.disconnect();
|
|
2883
2886
|
return;
|
|
2884
2887
|
}
|
|
@@ -3042,6 +3045,8 @@ var BottomSheetEngine = class {
|
|
|
3042
3045
|
const vt = document.startViewTransition(() => {
|
|
3043
3046
|
this.applySize(target.size);
|
|
3044
3047
|
});
|
|
3048
|
+
vt.ready?.catch(() => {
|
|
3049
|
+
});
|
|
3045
3050
|
this.currentViewTransition = vt;
|
|
3046
3051
|
try {
|
|
3047
3052
|
await vt.finished;
|
|
@@ -3293,11 +3298,16 @@ var BottomSheetEngine = class {
|
|
|
3293
3298
|
this.maxHeight.clampTo();
|
|
3294
3299
|
this.scrim.invalidateOpacityCache();
|
|
3295
3300
|
if (this.gesture?.isDragging) return;
|
|
3301
|
+
this.healActiveSnap();
|
|
3302
|
+
}
|
|
3303
|
+
healActiveSnap() {
|
|
3296
3304
|
const current = this.snaps.findById(this.activeId);
|
|
3297
|
-
if (current)
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3305
|
+
if (!current) return;
|
|
3306
|
+
this.size = current.size;
|
|
3307
|
+
this.applySize(this.size);
|
|
3308
|
+
this.updateAriaSlider();
|
|
3309
|
+
if (this.size > 0 && !this.lifecycle.isInstalled && !this.opening && !this.animation.isAnimating) {
|
|
3310
|
+
this.emitOpenSequence(this.activeId);
|
|
3301
3311
|
}
|
|
3302
3312
|
}
|
|
3303
3313
|
destroy() {
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as SnapPoint, b as SheetMode, a as SnapPointDef, c as EngineOptions, f as ScrimOverlayPosition } from './BottomSheetEngine-
|
|
2
|
-
export { g as AnchorAnimationPreset, h as AnchorAnimationSpec, i as AnchorHandle, A as AnchorOptions, j as AnchorPosition, k as AnchorState, B as BottomSheetEngine, C as CloseReason, E as EngineState, P as Plugin, l as SCRIM_PRESETS, m as ScrimOverlayOptions, n as ScrimPreset, o as ScrimPresetConfig, p as ScrimStageDef, S as ScrimStagesOptions, q as ScrimUpdate, d as SheetEventMap, r as SnapId, T as TeardownScope, s as runAnchorTransition } from './BottomSheetEngine-
|
|
1
|
+
import { e as SnapPoint, b as SheetMode, a as SnapPointDef, c as EngineOptions, f as ScrimOverlayPosition } from './BottomSheetEngine-D6oiEfZ4.cjs';
|
|
2
|
+
export { g as AnchorAnimationPreset, h as AnchorAnimationSpec, i as AnchorHandle, A as AnchorOptions, j as AnchorPosition, k as AnchorState, B as BottomSheetEngine, C as CloseReason, E as EngineState, P as Plugin, l as SCRIM_PRESETS, m as ScrimOverlayOptions, n as ScrimPreset, o as ScrimPresetConfig, p as ScrimStageDef, S as ScrimStagesOptions, q as ScrimUpdate, d as SheetEventMap, r as SnapId, T as TeardownScope, s as runAnchorTransition } from './BottomSheetEngine-D6oiEfZ4.cjs';
|
|
3
3
|
export { OVERLAY_PRESETS, Overlay, OverlayAnimation, OverlayCloseReason, OverlayEdge, Overlay as OverlayEngine, OverlayEventMap, OverlayMountTarget, OverlayOptions, OverlayPreset, OverlayState, OverlayUpdate, SwipeToCloseConfig, createOverlay } from './overlay.cjs';
|
|
4
4
|
import './transform-jVfAikE9.cjs';
|
|
5
5
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { e as SnapPoint, b as SheetMode, a as SnapPointDef, c as EngineOptions, f as ScrimOverlayPosition } from './BottomSheetEngine-
|
|
2
|
-
export { g as AnchorAnimationPreset, h as AnchorAnimationSpec, i as AnchorHandle, A as AnchorOptions, j as AnchorPosition, k as AnchorState, B as BottomSheetEngine, C as CloseReason, E as EngineState, P as Plugin, l as SCRIM_PRESETS, m as ScrimOverlayOptions, n as ScrimPreset, o as ScrimPresetConfig, p as ScrimStageDef, S as ScrimStagesOptions, q as ScrimUpdate, d as SheetEventMap, r as SnapId, T as TeardownScope, s as runAnchorTransition } from './BottomSheetEngine-
|
|
1
|
+
import { e as SnapPoint, b as SheetMode, a as SnapPointDef, c as EngineOptions, f as ScrimOverlayPosition } from './BottomSheetEngine-Dhy0X_e9.js';
|
|
2
|
+
export { g as AnchorAnimationPreset, h as AnchorAnimationSpec, i as AnchorHandle, A as AnchorOptions, j as AnchorPosition, k as AnchorState, B as BottomSheetEngine, C as CloseReason, E as EngineState, P as Plugin, l as SCRIM_PRESETS, m as ScrimOverlayOptions, n as ScrimPreset, o as ScrimPresetConfig, p as ScrimStageDef, S as ScrimStagesOptions, q as ScrimUpdate, d as SheetEventMap, r as SnapId, T as TeardownScope, s as runAnchorTransition } from './BottomSheetEngine-Dhy0X_e9.js';
|
|
3
3
|
export { OVERLAY_PRESETS, Overlay, OverlayAnimation, OverlayCloseReason, OverlayEdge, Overlay as OverlayEngine, OverlayEventMap, OverlayMountTarget, OverlayOptions, OverlayPreset, OverlayState, OverlayUpdate, SwipeToCloseConfig, createOverlay } from './overlay.js';
|
|
4
4
|
import './transform-jVfAikE9.js';
|
|
5
5
|
|
package/dist/index.js
CHANGED
|
@@ -456,6 +456,10 @@ var patchedPushState = null;
|
|
|
456
456
|
var patchedReplaceState = null;
|
|
457
457
|
var hasWindow = () => typeof window !== "undefined";
|
|
458
458
|
var hasHistory = () => typeof history !== "undefined";
|
|
459
|
+
var brandMarker = (surface) => ({
|
|
460
|
+
...surface.markerState(),
|
|
461
|
+
__bs: true
|
|
462
|
+
});
|
|
459
463
|
var runInternal = (fn) => {
|
|
460
464
|
internalDepth += 1;
|
|
461
465
|
try {
|
|
@@ -557,7 +561,7 @@ function restore(entry) {
|
|
|
557
561
|
entry.live = true;
|
|
558
562
|
runInternal(() => {
|
|
559
563
|
try {
|
|
560
|
-
history.pushState(entry.surface
|
|
564
|
+
history.pushState(brandMarker(entry.surface), "", entry.surface.url);
|
|
561
565
|
} catch {
|
|
562
566
|
entry.live = false;
|
|
563
567
|
}
|
|
@@ -575,7 +579,7 @@ function pushBackMarker(surface) {
|
|
|
575
579
|
entry.priorUrl = surface.url !== void 0 ? location.href : void 0;
|
|
576
580
|
runInternal(() => {
|
|
577
581
|
try {
|
|
578
|
-
history.pushState(surface
|
|
582
|
+
history.pushState(brandMarker(surface), "", surface.url);
|
|
579
583
|
entry.live = true;
|
|
580
584
|
} catch {
|
|
581
585
|
entry.live = false;
|
|
@@ -601,7 +605,7 @@ function popBackMarker(handle) {
|
|
|
601
605
|
pendingRebrand = () => {
|
|
602
606
|
runInternal(() => {
|
|
603
607
|
history.replaceState(
|
|
604
|
-
rebrandSurface
|
|
608
|
+
brandMarker(rebrandSurface),
|
|
605
609
|
"",
|
|
606
610
|
rebrandUrl !== void 0 ? rebrandUrl : location.href
|
|
607
611
|
);
|
|
@@ -945,11 +949,15 @@ function createMaxHeightController(deps) {
|
|
|
945
949
|
|
|
946
950
|
// src/core/features/fit-measurement.ts
|
|
947
951
|
var measureSheetNatural = (element, content, vertical) => {
|
|
948
|
-
if (!content) {
|
|
949
|
-
return vertical ? element.offsetHeight : element.offsetWidth;
|
|
950
|
-
}
|
|
951
952
|
const axis = vertical ? "height" : "width";
|
|
952
953
|
const sheetStyle = element.style;
|
|
954
|
+
if (!content) {
|
|
955
|
+
const prev = sheetStyle[axis];
|
|
956
|
+
sheetStyle[axis] = "auto";
|
|
957
|
+
const poked2 = vertical ? element.offsetHeight : element.offsetWidth;
|
|
958
|
+
sheetStyle[axis] = prev;
|
|
959
|
+
return poked2;
|
|
960
|
+
}
|
|
953
961
|
const cs = content.style;
|
|
954
962
|
const prevSheet = sheetStyle[axis];
|
|
955
963
|
const prevFlex = cs.flex;
|
|
@@ -2871,12 +2879,7 @@ var BottomSheetEngine = class {
|
|
|
2871
2879
|
if (!entry.isIntersecting) continue;
|
|
2872
2880
|
if (this.destroyed) return;
|
|
2873
2881
|
this.snaps.recompute();
|
|
2874
|
-
|
|
2875
|
-
if (current) {
|
|
2876
|
-
this.size = current.size;
|
|
2877
|
-
this.applySize(this.size);
|
|
2878
|
-
this.updateAriaSlider();
|
|
2879
|
-
}
|
|
2882
|
+
this.healActiveSnap();
|
|
2880
2883
|
io.disconnect();
|
|
2881
2884
|
return;
|
|
2882
2885
|
}
|
|
@@ -3040,6 +3043,8 @@ var BottomSheetEngine = class {
|
|
|
3040
3043
|
const vt = document.startViewTransition(() => {
|
|
3041
3044
|
this.applySize(target.size);
|
|
3042
3045
|
});
|
|
3046
|
+
vt.ready?.catch(() => {
|
|
3047
|
+
});
|
|
3043
3048
|
this.currentViewTransition = vt;
|
|
3044
3049
|
try {
|
|
3045
3050
|
await vt.finished;
|
|
@@ -3291,11 +3296,16 @@ var BottomSheetEngine = class {
|
|
|
3291
3296
|
this.maxHeight.clampTo();
|
|
3292
3297
|
this.scrim.invalidateOpacityCache();
|
|
3293
3298
|
if (this.gesture?.isDragging) return;
|
|
3299
|
+
this.healActiveSnap();
|
|
3300
|
+
}
|
|
3301
|
+
healActiveSnap() {
|
|
3294
3302
|
const current = this.snaps.findById(this.activeId);
|
|
3295
|
-
if (current)
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3303
|
+
if (!current) return;
|
|
3304
|
+
this.size = current.size;
|
|
3305
|
+
this.applySize(this.size);
|
|
3306
|
+
this.updateAriaSlider();
|
|
3307
|
+
if (this.size > 0 && !this.lifecycle.isInstalled && !this.opening && !this.animation.isAnimating) {
|
|
3308
|
+
this.emitOpenSequence(this.activeId);
|
|
3299
3309
|
}
|
|
3300
3310
|
}
|
|
3301
3311
|
destroy() {
|
package/dist/overlay.cjs
CHANGED
|
@@ -537,6 +537,10 @@ var pendingRebrand = null;
|
|
|
537
537
|
var listenerInstalled = false;
|
|
538
538
|
var hasWindow = () => typeof window !== "undefined";
|
|
539
539
|
var hasHistory = () => typeof history !== "undefined";
|
|
540
|
+
var brandMarker = (surface) => ({
|
|
541
|
+
...surface.markerState(),
|
|
542
|
+
__bs: true
|
|
543
|
+
});
|
|
540
544
|
var runInternal = (fn) => {
|
|
541
545
|
try {
|
|
542
546
|
fn();
|
|
@@ -606,7 +610,7 @@ function restore(entry) {
|
|
|
606
610
|
entry.live = true;
|
|
607
611
|
runInternal(() => {
|
|
608
612
|
try {
|
|
609
|
-
history.pushState(entry.surface
|
|
613
|
+
history.pushState(brandMarker(entry.surface), "", entry.surface.url);
|
|
610
614
|
} catch {
|
|
611
615
|
entry.live = false;
|
|
612
616
|
}
|
|
@@ -624,7 +628,7 @@ function pushBackMarker(surface) {
|
|
|
624
628
|
entry.priorUrl = surface.url !== void 0 ? location.href : void 0;
|
|
625
629
|
runInternal(() => {
|
|
626
630
|
try {
|
|
627
|
-
history.pushState(surface
|
|
631
|
+
history.pushState(brandMarker(surface), "", surface.url);
|
|
628
632
|
entry.live = true;
|
|
629
633
|
} catch {
|
|
630
634
|
entry.live = false;
|
|
@@ -650,7 +654,7 @@ function popBackMarker(handle) {
|
|
|
650
654
|
pendingRebrand = () => {
|
|
651
655
|
runInternal(() => {
|
|
652
656
|
history.replaceState(
|
|
653
|
-
rebrandSurface
|
|
657
|
+
brandMarker(rebrandSurface),
|
|
654
658
|
"",
|
|
655
659
|
rebrandUrl !== void 0 ? rebrandUrl : location.href
|
|
656
660
|
);
|
package/dist/overlay.js
CHANGED
|
@@ -535,6 +535,10 @@ var pendingRebrand = null;
|
|
|
535
535
|
var listenerInstalled = false;
|
|
536
536
|
var hasWindow = () => typeof window !== "undefined";
|
|
537
537
|
var hasHistory = () => typeof history !== "undefined";
|
|
538
|
+
var brandMarker = (surface) => ({
|
|
539
|
+
...surface.markerState(),
|
|
540
|
+
__bs: true
|
|
541
|
+
});
|
|
538
542
|
var runInternal = (fn) => {
|
|
539
543
|
try {
|
|
540
544
|
fn();
|
|
@@ -604,7 +608,7 @@ function restore(entry) {
|
|
|
604
608
|
entry.live = true;
|
|
605
609
|
runInternal(() => {
|
|
606
610
|
try {
|
|
607
|
-
history.pushState(entry.surface
|
|
611
|
+
history.pushState(brandMarker(entry.surface), "", entry.surface.url);
|
|
608
612
|
} catch {
|
|
609
613
|
entry.live = false;
|
|
610
614
|
}
|
|
@@ -622,7 +626,7 @@ function pushBackMarker(surface) {
|
|
|
622
626
|
entry.priorUrl = surface.url !== void 0 ? location.href : void 0;
|
|
623
627
|
runInternal(() => {
|
|
624
628
|
try {
|
|
625
|
-
history.pushState(surface
|
|
629
|
+
history.pushState(brandMarker(surface), "", surface.url);
|
|
626
630
|
entry.live = true;
|
|
627
631
|
} catch {
|
|
628
632
|
entry.live = false;
|
|
@@ -648,7 +652,7 @@ function popBackMarker(handle) {
|
|
|
648
652
|
pendingRebrand = () => {
|
|
649
653
|
runInternal(() => {
|
|
650
654
|
history.replaceState(
|
|
651
|
-
rebrandSurface
|
|
655
|
+
brandMarker(rebrandSurface),
|
|
652
656
|
"",
|
|
653
657
|
rebrandUrl !== void 0 ? rebrandUrl : location.href
|
|
654
658
|
);
|
package/dist/preact.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
+
export { E as EngineState, b as SheetMode, e as SnapPoint, a as SnapPointDef } from './BottomSheetEngine-D6oiEfZ4.cjs';
|
|
3
3
|
export { OverlayEdge, OverlayOptions, OverlayState } from './overlay.cjs';
|
|
4
4
|
import 'react';
|
|
5
5
|
import './teleport-7uYNiEAT.cjs';
|
package/dist/preact.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
+
export { E as EngineState, b as SheetMode, e as SnapPoint, a as SnapPointDef } from './BottomSheetEngine-Dhy0X_e9.js';
|
|
3
3
|
export { OverlayEdge, OverlayOptions, OverlayState } from './overlay.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import './teleport-7uYNiEAT.js';
|
package/dist/qwik.cjs
CHANGED
|
@@ -455,6 +455,10 @@ var patchedPushState = null;
|
|
|
455
455
|
var patchedReplaceState = null;
|
|
456
456
|
var hasWindow = () => typeof window !== "undefined";
|
|
457
457
|
var hasHistory = () => typeof history !== "undefined";
|
|
458
|
+
var brandMarker = (surface) => ({
|
|
459
|
+
...surface.markerState(),
|
|
460
|
+
__bs: true
|
|
461
|
+
});
|
|
458
462
|
var runInternal = (fn) => {
|
|
459
463
|
internalDepth += 1;
|
|
460
464
|
try {
|
|
@@ -556,7 +560,7 @@ function restore(entry) {
|
|
|
556
560
|
entry.live = true;
|
|
557
561
|
runInternal(() => {
|
|
558
562
|
try {
|
|
559
|
-
history.pushState(entry.surface
|
|
563
|
+
history.pushState(brandMarker(entry.surface), "", entry.surface.url);
|
|
560
564
|
} catch {
|
|
561
565
|
entry.live = false;
|
|
562
566
|
}
|
|
@@ -574,7 +578,7 @@ function pushBackMarker(surface) {
|
|
|
574
578
|
entry.priorUrl = surface.url !== void 0 ? location.href : void 0;
|
|
575
579
|
runInternal(() => {
|
|
576
580
|
try {
|
|
577
|
-
history.pushState(surface
|
|
581
|
+
history.pushState(brandMarker(surface), "", surface.url);
|
|
578
582
|
entry.live = true;
|
|
579
583
|
} catch {
|
|
580
584
|
entry.live = false;
|
|
@@ -600,7 +604,7 @@ function popBackMarker(handle) {
|
|
|
600
604
|
pendingRebrand = () => {
|
|
601
605
|
runInternal(() => {
|
|
602
606
|
history.replaceState(
|
|
603
|
-
rebrandSurface
|
|
607
|
+
brandMarker(rebrandSurface),
|
|
604
608
|
"",
|
|
605
609
|
rebrandUrl !== void 0 ? rebrandUrl : location.href
|
|
606
610
|
);
|
|
@@ -944,11 +948,15 @@ function createMaxHeightController(deps) {
|
|
|
944
948
|
|
|
945
949
|
// src/core/features/fit-measurement.ts
|
|
946
950
|
var measureSheetNatural = (element, content, vertical) => {
|
|
947
|
-
if (!content) {
|
|
948
|
-
return vertical ? element.offsetHeight : element.offsetWidth;
|
|
949
|
-
}
|
|
950
951
|
const axis = vertical ? "height" : "width";
|
|
951
952
|
const sheetStyle = element.style;
|
|
953
|
+
if (!content) {
|
|
954
|
+
const prev = sheetStyle[axis];
|
|
955
|
+
sheetStyle[axis] = "auto";
|
|
956
|
+
const poked2 = vertical ? element.offsetHeight : element.offsetWidth;
|
|
957
|
+
sheetStyle[axis] = prev;
|
|
958
|
+
return poked2;
|
|
959
|
+
}
|
|
952
960
|
const cs = content.style;
|
|
953
961
|
const prevSheet = sheetStyle[axis];
|
|
954
962
|
const prevFlex = cs.flex;
|
|
@@ -2869,12 +2877,7 @@ var BottomSheetEngine = class {
|
|
|
2869
2877
|
if (!entry.isIntersecting) continue;
|
|
2870
2878
|
if (this.destroyed) return;
|
|
2871
2879
|
this.snaps.recompute();
|
|
2872
|
-
|
|
2873
|
-
if (current) {
|
|
2874
|
-
this.size = current.size;
|
|
2875
|
-
this.applySize(this.size);
|
|
2876
|
-
this.updateAriaSlider();
|
|
2877
|
-
}
|
|
2880
|
+
this.healActiveSnap();
|
|
2878
2881
|
io.disconnect();
|
|
2879
2882
|
return;
|
|
2880
2883
|
}
|
|
@@ -3038,6 +3041,8 @@ var BottomSheetEngine = class {
|
|
|
3038
3041
|
const vt = document.startViewTransition(() => {
|
|
3039
3042
|
this.applySize(target.size);
|
|
3040
3043
|
});
|
|
3044
|
+
vt.ready?.catch(() => {
|
|
3045
|
+
});
|
|
3041
3046
|
this.currentViewTransition = vt;
|
|
3042
3047
|
try {
|
|
3043
3048
|
await vt.finished;
|
|
@@ -3289,11 +3294,16 @@ var BottomSheetEngine = class {
|
|
|
3289
3294
|
this.maxHeight.clampTo();
|
|
3290
3295
|
this.scrim.invalidateOpacityCache();
|
|
3291
3296
|
if (this.gesture?.isDragging) return;
|
|
3297
|
+
this.healActiveSnap();
|
|
3298
|
+
}
|
|
3299
|
+
healActiveSnap() {
|
|
3292
3300
|
const current = this.snaps.findById(this.activeId);
|
|
3293
|
-
if (current)
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3301
|
+
if (!current) return;
|
|
3302
|
+
this.size = current.size;
|
|
3303
|
+
this.applySize(this.size);
|
|
3304
|
+
this.updateAriaSlider();
|
|
3305
|
+
if (this.size > 0 && !this.lifecycle.isInstalled && !this.opening && !this.animation.isAnimating) {
|
|
3306
|
+
this.emitOpenSequence(this.activeId);
|
|
3297
3307
|
}
|
|
3298
3308
|
}
|
|
3299
3309
|
destroy() {
|
package/dist/qwik.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _builder_io_qwik from '@builder.io/qwik';
|
|
2
2
|
import { QRL } from '@builder.io/qwik';
|
|
3
3
|
import { T as TeleportTarget } from './teleport-7uYNiEAT.cjs';
|
|
4
|
-
import { a as SnapPointDef, b as SheetMode, c as EngineOptions, d as SheetEventMap, E as EngineState } from './BottomSheetEngine-
|
|
5
|
-
export { e as SnapPoint } from './BottomSheetEngine-
|
|
4
|
+
import { a as SnapPointDef, b as SheetMode, c as EngineOptions, d as SheetEventMap, E as EngineState } from './BottomSheetEngine-D6oiEfZ4.cjs';
|
|
5
|
+
export { e as SnapPoint } from './BottomSheetEngine-D6oiEfZ4.cjs';
|
|
6
6
|
import './transform-jVfAikE9.cjs';
|
|
7
7
|
|
|
8
8
|
type BottomSheetProps<TId extends string = string> = {
|
package/dist/qwik.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as _builder_io_qwik from '@builder.io/qwik';
|
|
2
2
|
import { QRL } from '@builder.io/qwik';
|
|
3
3
|
import { T as TeleportTarget } from './teleport-7uYNiEAT.js';
|
|
4
|
-
import { a as SnapPointDef, b as SheetMode, c as EngineOptions, d as SheetEventMap, E as EngineState } from './BottomSheetEngine-
|
|
5
|
-
export { e as SnapPoint } from './BottomSheetEngine-
|
|
4
|
+
import { a as SnapPointDef, b as SheetMode, c as EngineOptions, d as SheetEventMap, E as EngineState } from './BottomSheetEngine-Dhy0X_e9.js';
|
|
5
|
+
export { e as SnapPoint } from './BottomSheetEngine-Dhy0X_e9.js';
|
|
6
6
|
import './transform-jVfAikE9.js';
|
|
7
7
|
|
|
8
8
|
type BottomSheetProps<TId extends string = string> = {
|
package/dist/qwik.js
CHANGED
|
@@ -453,6 +453,10 @@ var patchedPushState = null;
|
|
|
453
453
|
var patchedReplaceState = null;
|
|
454
454
|
var hasWindow = () => typeof window !== "undefined";
|
|
455
455
|
var hasHistory = () => typeof history !== "undefined";
|
|
456
|
+
var brandMarker = (surface) => ({
|
|
457
|
+
...surface.markerState(),
|
|
458
|
+
__bs: true
|
|
459
|
+
});
|
|
456
460
|
var runInternal = (fn) => {
|
|
457
461
|
internalDepth += 1;
|
|
458
462
|
try {
|
|
@@ -554,7 +558,7 @@ function restore(entry) {
|
|
|
554
558
|
entry.live = true;
|
|
555
559
|
runInternal(() => {
|
|
556
560
|
try {
|
|
557
|
-
history.pushState(entry.surface
|
|
561
|
+
history.pushState(brandMarker(entry.surface), "", entry.surface.url);
|
|
558
562
|
} catch {
|
|
559
563
|
entry.live = false;
|
|
560
564
|
}
|
|
@@ -572,7 +576,7 @@ function pushBackMarker(surface) {
|
|
|
572
576
|
entry.priorUrl = surface.url !== void 0 ? location.href : void 0;
|
|
573
577
|
runInternal(() => {
|
|
574
578
|
try {
|
|
575
|
-
history.pushState(surface
|
|
579
|
+
history.pushState(brandMarker(surface), "", surface.url);
|
|
576
580
|
entry.live = true;
|
|
577
581
|
} catch {
|
|
578
582
|
entry.live = false;
|
|
@@ -598,7 +602,7 @@ function popBackMarker(handle) {
|
|
|
598
602
|
pendingRebrand = () => {
|
|
599
603
|
runInternal(() => {
|
|
600
604
|
history.replaceState(
|
|
601
|
-
rebrandSurface
|
|
605
|
+
brandMarker(rebrandSurface),
|
|
602
606
|
"",
|
|
603
607
|
rebrandUrl !== void 0 ? rebrandUrl : location.href
|
|
604
608
|
);
|
|
@@ -942,11 +946,15 @@ function createMaxHeightController(deps) {
|
|
|
942
946
|
|
|
943
947
|
// src/core/features/fit-measurement.ts
|
|
944
948
|
var measureSheetNatural = (element, content, vertical) => {
|
|
945
|
-
if (!content) {
|
|
946
|
-
return vertical ? element.offsetHeight : element.offsetWidth;
|
|
947
|
-
}
|
|
948
949
|
const axis = vertical ? "height" : "width";
|
|
949
950
|
const sheetStyle = element.style;
|
|
951
|
+
if (!content) {
|
|
952
|
+
const prev = sheetStyle[axis];
|
|
953
|
+
sheetStyle[axis] = "auto";
|
|
954
|
+
const poked2 = vertical ? element.offsetHeight : element.offsetWidth;
|
|
955
|
+
sheetStyle[axis] = prev;
|
|
956
|
+
return poked2;
|
|
957
|
+
}
|
|
950
958
|
const cs = content.style;
|
|
951
959
|
const prevSheet = sheetStyle[axis];
|
|
952
960
|
const prevFlex = cs.flex;
|
|
@@ -2867,12 +2875,7 @@ var BottomSheetEngine = class {
|
|
|
2867
2875
|
if (!entry.isIntersecting) continue;
|
|
2868
2876
|
if (this.destroyed) return;
|
|
2869
2877
|
this.snaps.recompute();
|
|
2870
|
-
|
|
2871
|
-
if (current) {
|
|
2872
|
-
this.size = current.size;
|
|
2873
|
-
this.applySize(this.size);
|
|
2874
|
-
this.updateAriaSlider();
|
|
2875
|
-
}
|
|
2878
|
+
this.healActiveSnap();
|
|
2876
2879
|
io.disconnect();
|
|
2877
2880
|
return;
|
|
2878
2881
|
}
|
|
@@ -3036,6 +3039,8 @@ var BottomSheetEngine = class {
|
|
|
3036
3039
|
const vt = document.startViewTransition(() => {
|
|
3037
3040
|
this.applySize(target.size);
|
|
3038
3041
|
});
|
|
3042
|
+
vt.ready?.catch(() => {
|
|
3043
|
+
});
|
|
3039
3044
|
this.currentViewTransition = vt;
|
|
3040
3045
|
try {
|
|
3041
3046
|
await vt.finished;
|
|
@@ -3287,11 +3292,16 @@ var BottomSheetEngine = class {
|
|
|
3287
3292
|
this.maxHeight.clampTo();
|
|
3288
3293
|
this.scrim.invalidateOpacityCache();
|
|
3289
3294
|
if (this.gesture?.isDragging) return;
|
|
3295
|
+
this.healActiveSnap();
|
|
3296
|
+
}
|
|
3297
|
+
healActiveSnap() {
|
|
3290
3298
|
const current = this.snaps.findById(this.activeId);
|
|
3291
|
-
if (current)
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3299
|
+
if (!current) return;
|
|
3300
|
+
this.size = current.size;
|
|
3301
|
+
this.applySize(this.size);
|
|
3302
|
+
this.updateAriaSlider();
|
|
3303
|
+
if (this.size > 0 && !this.lifecycle.isInstalled && !this.opening && !this.animation.isAnimating) {
|
|
3304
|
+
this.emitOpenSequence(this.activeId);
|
|
3295
3305
|
}
|
|
3296
3306
|
}
|
|
3297
3307
|
destroy() {
|
package/dist/react.cjs
CHANGED
|
@@ -462,6 +462,10 @@ var patchedPushState = null;
|
|
|
462
462
|
var patchedReplaceState = null;
|
|
463
463
|
var hasWindow = () => typeof window !== "undefined";
|
|
464
464
|
var hasHistory = () => typeof history !== "undefined";
|
|
465
|
+
var brandMarker = (surface) => ({
|
|
466
|
+
...surface.markerState(),
|
|
467
|
+
__bs: true
|
|
468
|
+
});
|
|
465
469
|
var runInternal = (fn) => {
|
|
466
470
|
internalDepth += 1;
|
|
467
471
|
try {
|
|
@@ -563,7 +567,7 @@ function restore(entry) {
|
|
|
563
567
|
entry.live = true;
|
|
564
568
|
runInternal(() => {
|
|
565
569
|
try {
|
|
566
|
-
history.pushState(entry.surface
|
|
570
|
+
history.pushState(brandMarker(entry.surface), "", entry.surface.url);
|
|
567
571
|
} catch {
|
|
568
572
|
entry.live = false;
|
|
569
573
|
}
|
|
@@ -581,7 +585,7 @@ function pushBackMarker(surface) {
|
|
|
581
585
|
entry.priorUrl = surface.url !== void 0 ? location.href : void 0;
|
|
582
586
|
runInternal(() => {
|
|
583
587
|
try {
|
|
584
|
-
history.pushState(surface
|
|
588
|
+
history.pushState(brandMarker(surface), "", surface.url);
|
|
585
589
|
entry.live = true;
|
|
586
590
|
} catch {
|
|
587
591
|
entry.live = false;
|
|
@@ -607,7 +611,7 @@ function popBackMarker(handle) {
|
|
|
607
611
|
pendingRebrand = () => {
|
|
608
612
|
runInternal(() => {
|
|
609
613
|
history.replaceState(
|
|
610
|
-
rebrandSurface
|
|
614
|
+
brandMarker(rebrandSurface),
|
|
611
615
|
"",
|
|
612
616
|
rebrandUrl !== void 0 ? rebrandUrl : location.href
|
|
613
617
|
);
|
|
@@ -951,11 +955,15 @@ function createMaxHeightController(deps) {
|
|
|
951
955
|
|
|
952
956
|
// src/core/features/fit-measurement.ts
|
|
953
957
|
var measureSheetNatural = (element, content, vertical) => {
|
|
954
|
-
if (!content) {
|
|
955
|
-
return vertical ? element.offsetHeight : element.offsetWidth;
|
|
956
|
-
}
|
|
957
958
|
const axis = vertical ? "height" : "width";
|
|
958
959
|
const sheetStyle = element.style;
|
|
960
|
+
if (!content) {
|
|
961
|
+
const prev = sheetStyle[axis];
|
|
962
|
+
sheetStyle[axis] = "auto";
|
|
963
|
+
const poked2 = vertical ? element.offsetHeight : element.offsetWidth;
|
|
964
|
+
sheetStyle[axis] = prev;
|
|
965
|
+
return poked2;
|
|
966
|
+
}
|
|
959
967
|
const cs = content.style;
|
|
960
968
|
const prevSheet = sheetStyle[axis];
|
|
961
969
|
const prevFlex = cs.flex;
|
|
@@ -2876,12 +2884,7 @@ var BottomSheetEngine = class {
|
|
|
2876
2884
|
if (!entry.isIntersecting) continue;
|
|
2877
2885
|
if (this.destroyed) return;
|
|
2878
2886
|
this.snaps.recompute();
|
|
2879
|
-
|
|
2880
|
-
if (current) {
|
|
2881
|
-
this.size = current.size;
|
|
2882
|
-
this.applySize(this.size);
|
|
2883
|
-
this.updateAriaSlider();
|
|
2884
|
-
}
|
|
2887
|
+
this.healActiveSnap();
|
|
2885
2888
|
io.disconnect();
|
|
2886
2889
|
return;
|
|
2887
2890
|
}
|
|
@@ -3045,6 +3048,8 @@ var BottomSheetEngine = class {
|
|
|
3045
3048
|
const vt = document.startViewTransition(() => {
|
|
3046
3049
|
this.applySize(target.size);
|
|
3047
3050
|
});
|
|
3051
|
+
vt.ready?.catch(() => {
|
|
3052
|
+
});
|
|
3048
3053
|
this.currentViewTransition = vt;
|
|
3049
3054
|
try {
|
|
3050
3055
|
await vt.finished;
|
|
@@ -3296,11 +3301,16 @@ var BottomSheetEngine = class {
|
|
|
3296
3301
|
this.maxHeight.clampTo();
|
|
3297
3302
|
this.scrim.invalidateOpacityCache();
|
|
3298
3303
|
if (this.gesture?.isDragging) return;
|
|
3304
|
+
this.healActiveSnap();
|
|
3305
|
+
}
|
|
3306
|
+
healActiveSnap() {
|
|
3299
3307
|
const current = this.snaps.findById(this.activeId);
|
|
3300
|
-
if (current)
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3308
|
+
if (!current) return;
|
|
3309
|
+
this.size = current.size;
|
|
3310
|
+
this.applySize(this.size);
|
|
3311
|
+
this.updateAriaSlider();
|
|
3312
|
+
if (this.size > 0 && !this.lifecycle.isInstalled && !this.opening && !this.animation.isAnimating) {
|
|
3313
|
+
this.emitOpenSequence(this.activeId);
|
|
3304
3314
|
}
|
|
3305
3315
|
}
|
|
3306
3316
|
destroy() {
|
package/dist/react.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as EngineOptions, E as EngineState, A as AnchorOptions, S as ScrimStagesOptions, p as ScrimStageDef, d as SheetEventMap, C as CloseReason, q as ScrimUpdate, m as ScrimOverlayOptions, B as BottomSheetEngine, a as SnapPointDef, b as SheetMode } from './BottomSheetEngine-
|
|
2
|
-
export { e as SnapPoint } from './BottomSheetEngine-
|
|
1
|
+
import { c as EngineOptions, E as EngineState, A as AnchorOptions, S as ScrimStagesOptions, p as ScrimStageDef, d as SheetEventMap, C as CloseReason, q as ScrimUpdate, m as ScrimOverlayOptions, B as BottomSheetEngine, a as SnapPointDef, b as SheetMode } from './BottomSheetEngine-D6oiEfZ4.cjs';
|
|
2
|
+
export { e as SnapPoint } from './BottomSheetEngine-D6oiEfZ4.cjs';
|
|
3
3
|
import { OverlayOptions, OverlayState, Overlay as OverlayEngine } from './overlay.cjs';
|
|
4
4
|
export { OverlayEdge } from './overlay.cjs';
|
|
5
5
|
import * as react from 'react';
|