@seatlayer/js 0.47.0 → 0.47.1
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/dist/index.cjs +34 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +34 -12
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -945,7 +945,6 @@ var SeatingChart = class {
|
|
|
945
945
|
this.mount = null;
|
|
946
946
|
this.hostEl = null;
|
|
947
947
|
this.rendered = false;
|
|
948
|
-
this.retryBtn = null;
|
|
949
948
|
this.mode_ = null;
|
|
950
949
|
this.tipEl = null;
|
|
951
950
|
this.tipPos = { x: 0, y: 0 };
|
|
@@ -1320,14 +1319,12 @@ var SeatingChart = class {
|
|
|
1320
1319
|
void this.render().catch((err) => this.opts.onError?.(err));
|
|
1321
1320
|
});
|
|
1322
1321
|
box.appendChild(btn);
|
|
1323
|
-
this.retryBtn = btn;
|
|
1324
1322
|
host.appendChild(box);
|
|
1325
1323
|
}
|
|
1326
1324
|
destroy() {
|
|
1327
1325
|
this.realtime?.stop();
|
|
1328
1326
|
this.realtime = null;
|
|
1329
1327
|
this.access?.clear();
|
|
1330
|
-
this.retryBtn = null;
|
|
1331
1328
|
if (this.hostEl && this.onTipMove) this.hostEl.removeEventListener("mousemove", this.onTipMove);
|
|
1332
1329
|
this.tipEl = null;
|
|
1333
1330
|
this.onTipMove = null;
|
|
@@ -2663,7 +2660,21 @@ var CSS = (
|
|
|
2663
2660
|
/* Venue navigation inside 3D: levels (isolate a floor) and areas (fly to a zone).
|
|
2664
2661
|
Bottom-LEFT, clear of the module's own chips (Overview bottom-right, 360
|
|
2665
2662
|
bottom-centre) and of the bottom-sheeted confirm card. Horizontally scrollable
|
|
2666
|
-
so a venue with many zones never pushes the rail off a phone screen.
|
|
2663
|
+
so a venue with many zones never pushes the rail off a phone screen.
|
|
2664
|
+
|
|
2665
|
+
EVERY WIDTH HERE IS RELATIVE TO THE RAIL, NEVER TO THE WINDOW. These three
|
|
2666
|
+
rules used to size off 100vw, which contradicts the one contract this widget
|
|
2667
|
+
states about itself: it adapts to a full-screen takeover, an inline div in a
|
|
2668
|
+
content page, or a popup, and its breakpoints key off the CONTAINER, never the
|
|
2669
|
+
viewport. A 390 px picker embedded in a 1400 px page asked for
|
|
2670
|
+
calc(100vw - 180px) = 1220 inside a 390 px rail.
|
|
2671
|
+
|
|
2672
|
+
MEASURED, IT DID NOT OVERFLOW: the scroll parent is a flex container, so the
|
|
2673
|
+
over-large declaration was shrunk back to the rail and both the old and new
|
|
2674
|
+
rules resolve to 364 px in situ. So this is a latent correctness fix, not a
|
|
2675
|
+
visible bug -- the numbers were wrong and were being covered for by a
|
|
2676
|
+
flex-shrink one level up. Left as 100% because the next person to change that
|
|
2677
|
+
parent's display should not inherit a rule that only works by accident. */
|
|
2667
2678
|
.sl-view3d-nav{position:absolute;left:12px;bottom:16px;z-index:3;display:flex;flex-direction:column;gap:6px;
|
|
2668
2679
|
max-width:calc(100% - 150px);pointer-events:none}
|
|
2669
2680
|
.sl-view3d-nav > div{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;pointer-events:auto;
|
|
@@ -2675,15 +2686,15 @@ var CSS = (
|
|
|
2675
2686
|
.sl-view3d-nav button:hover,.sl-view3d-nav button:focus-visible{color:#eef1f8;border-color:rgba(190,205,240,.6)}
|
|
2676
2687
|
.sl-view3d-nav button[aria-pressed="true"]{background:var(--sl-accent);color:var(--sl-accent-ink);border-color:transparent}
|
|
2677
2688
|
.sl-view3d-nav button:disabled{opacity:.45;cursor:not-allowed}
|
|
2678
|
-
.sl-view3d-nav select{min-height:38px;max-width:
|
|
2689
|
+
.sl-view3d-nav select{min-height:38px;max-width:100%;padding:7px 34px 7px 12px;
|
|
2679
2690
|
border-radius:999px;font:700 11.5px/1 inherit;color:#eef1f8;background:rgba(12,18,32,.86);
|
|
2680
2691
|
border:1px solid rgba(150,165,205,.45);backdrop-filter:blur(6px);cursor:pointer}
|
|
2681
2692
|
.sl-view3d-nav select:focus-visible{outline:2px solid var(--sl-accent);outline-offset:2px}
|
|
2682
2693
|
.sl-view3d-nav .sl-view3d-locator{display:grid;grid-template-columns:minmax(150px,1.25fr) minmax(110px,.8fr) minmax(105px,.7fr) auto;
|
|
2683
|
-
width:min(720px,
|
|
2694
|
+
width:min(720px,100%);overflow:visible}
|
|
2684
2695
|
.sl-view3d-nav.is-seat-focused .sl-view3d-locator{display:none}
|
|
2685
2696
|
.sl-view3d-locator select{width:100%;min-width:0}
|
|
2686
|
-
.sl-picker[data-layout="narrow"] .sl-view3d-nav .sl-view3d-locator{display:flex;width:
|
|
2697
|
+
.sl-picker[data-layout="narrow"] .sl-view3d-nav .sl-view3d-locator{display:flex;width:100%;overflow-x:auto}
|
|
2687
2698
|
.sl-picker[data-layout="narrow"] .sl-view3d-locator select{flex:0 0 155px}
|
|
2688
2699
|
/* On phones the library owns the bottom edge for seat/panorama/overview actions.
|
|
2689
2700
|
Keep venue navigation in a separate top rail so those control families never
|
|
@@ -3569,10 +3580,21 @@ var SeatPicker = class _SeatPicker {
|
|
|
3569
3580
|
e.stopPropagation();
|
|
3570
3581
|
setSheet(root.dataset.sheet !== "open");
|
|
3571
3582
|
});
|
|
3583
|
+
this.els.peek?.addEventListener("click", (e) => {
|
|
3584
|
+
const go = e.target.closest(".sl-sheet-go");
|
|
3585
|
+
if (!go) return;
|
|
3586
|
+
e.stopPropagation();
|
|
3587
|
+
if (go.dataset.act === "checkout") void this.handleCta();
|
|
3588
|
+
else setSheet(true);
|
|
3589
|
+
});
|
|
3572
3590
|
let startY = 0;
|
|
3573
3591
|
let swiped = false;
|
|
3574
3592
|
let tracking = false;
|
|
3575
3593
|
head.addEventListener("pointerdown", (e) => {
|
|
3594
|
+
if (e.target.closest?.(".sl-seccard,.sl-sheet-toggle,.sl-sheet-go")) {
|
|
3595
|
+
tracking = false;
|
|
3596
|
+
return;
|
|
3597
|
+
}
|
|
3576
3598
|
tracking = true;
|
|
3577
3599
|
swiped = false;
|
|
3578
3600
|
startY = e.clientY;
|
|
@@ -3591,7 +3613,7 @@ var SeatPicker = class _SeatPicker {
|
|
|
3591
3613
|
});
|
|
3592
3614
|
head.addEventListener("pointerup", (e) => {
|
|
3593
3615
|
if (tracking && !swiped && Math.abs(e.clientY - startY) < 6) {
|
|
3594
|
-
|
|
3616
|
+
setSheet(root.dataset.sheet !== "open");
|
|
3595
3617
|
}
|
|
3596
3618
|
tracking = false;
|
|
3597
3619
|
head.releasePointerCapture?.(e.pointerId);
|
|
@@ -3785,12 +3807,11 @@ var SeatPicker = class _SeatPicker {
|
|
|
3785
3807
|
const narrow = this.root?.dataset.layout === "narrow";
|
|
3786
3808
|
const filters = this.els.filters;
|
|
3787
3809
|
if (filters) {
|
|
3810
|
+
if (this.cbEl) this.els.zoom?.appendChild(this.cbEl);
|
|
3788
3811
|
if (narrow) {
|
|
3789
3812
|
if (this.a11yChipsEl) filters.appendChild(this.a11yChipsEl);
|
|
3790
|
-
if (this.cbEl) filters.appendChild(this.cbEl);
|
|
3791
3813
|
} else {
|
|
3792
3814
|
if (this.a11yChipsEl) this.regions["top-left"]?.appendChild(this.a11yChipsEl);
|
|
3793
|
-
if (this.cbEl) this.els.zoom?.appendChild(this.cbEl);
|
|
3794
3815
|
}
|
|
3795
3816
|
const has = narrow && filters.children.length > 0;
|
|
3796
3817
|
filters.classList.toggle("has", has);
|
|
@@ -5321,10 +5342,11 @@ var SeatPicker = class _SeatPicker {
|
|
|
5321
5342
|
if (previousCount === 0 && count > 0) this.animateOnce(this.els.cta, "sl-ready", 520);
|
|
5322
5343
|
if (this.els.peek) {
|
|
5323
5344
|
if (count) {
|
|
5324
|
-
|
|
5345
|
+
const holding = !!this.hold && !pendingCount;
|
|
5346
|
+
this.els.peek.innerHTML = `<span>${count} ${count === 1 ? "ticket" : "tickets"} \xB7 ${this.money(total)}</span><button type="button" class="go sl-sheet-go" data-act="${holding ? "checkout" : "open"}">${this.hold ? pendingCount ? "Secure more" : "Continue" : "Review"}</button>`;
|
|
5325
5347
|
} else {
|
|
5326
5348
|
const prices = (this.controller.doc?.categories ?? []).map((c) => this.catPrice(c)).filter((p) => p != null);
|
|
5327
|
-
this.els.peek.innerHTML = (prices.length ? `<span>From ${this.money(Math.min(...prices))}</span>` : "<span>Pick your seats</span>") + `<
|
|
5349
|
+
this.els.peek.innerHTML = (prices.length ? `<span>From ${this.money(Math.min(...prices))}</span>` : "<span>Pick your seats</span>") + `<button type="button" class="go sl-sheet-go" data-act="open">\u2726 Best seats</button>`;
|
|
5328
5350
|
}
|
|
5329
5351
|
}
|
|
5330
5352
|
this.lastTrayCount = count;
|