@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 CHANGED
@@ -4865,7 +4865,6 @@ var SeatingChart = class {
4865
4865
  this.mount = null;
4866
4866
  this.hostEl = null;
4867
4867
  this.rendered = false;
4868
- this.retryBtn = null;
4869
4868
  this.mode_ = null;
4870
4869
  this.tipEl = null;
4871
4870
  this.tipPos = { x: 0, y: 0 };
@@ -5240,14 +5239,12 @@ var SeatingChart = class {
5240
5239
  void this.render().catch((err) => this.opts.onError?.(err));
5241
5240
  });
5242
5241
  box.appendChild(btn);
5243
- this.retryBtn = btn;
5244
5242
  host.appendChild(box);
5245
5243
  }
5246
5244
  destroy() {
5247
5245
  this.realtime?.stop();
5248
5246
  this.realtime = null;
5249
5247
  this.access?.clear();
5250
- this.retryBtn = null;
5251
5248
  if (this.hostEl && this.onTipMove) this.hostEl.removeEventListener("mousemove", this.onTipMove);
5252
5249
  this.tipEl = null;
5253
5250
  this.onTipMove = null;
@@ -6570,7 +6567,21 @@ var CSS2 = (
6570
6567
  /* Venue navigation inside 3D: levels (isolate a floor) and areas (fly to a zone).
6571
6568
  Bottom-LEFT, clear of the module's own chips (Overview bottom-right, 360
6572
6569
  bottom-centre) and of the bottom-sheeted confirm card. Horizontally scrollable
6573
- so a venue with many zones never pushes the rail off a phone screen. */
6570
+ so a venue with many zones never pushes the rail off a phone screen.
6571
+
6572
+ EVERY WIDTH HERE IS RELATIVE TO THE RAIL, NEVER TO THE WINDOW. These three
6573
+ rules used to size off 100vw, which contradicts the one contract this widget
6574
+ states about itself: it adapts to a full-screen takeover, an inline div in a
6575
+ content page, or a popup, and its breakpoints key off the CONTAINER, never the
6576
+ viewport. A 390 px picker embedded in a 1400 px page asked for
6577
+ calc(100vw - 180px) = 1220 inside a 390 px rail.
6578
+
6579
+ MEASURED, IT DID NOT OVERFLOW: the scroll parent is a flex container, so the
6580
+ over-large declaration was shrunk back to the rail and both the old and new
6581
+ rules resolve to 364 px in situ. So this is a latent correctness fix, not a
6582
+ visible bug -- the numbers were wrong and were being covered for by a
6583
+ flex-shrink one level up. Left as 100% because the next person to change that
6584
+ parent's display should not inherit a rule that only works by accident. */
6574
6585
  .sl-view3d-nav{position:absolute;left:12px;bottom:16px;z-index:3;display:flex;flex-direction:column;gap:6px;
6575
6586
  max-width:calc(100% - 150px);pointer-events:none}
6576
6587
  .sl-view3d-nav > div{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;pointer-events:auto;
@@ -6582,15 +6593,15 @@ var CSS2 = (
6582
6593
  .sl-view3d-nav button:hover,.sl-view3d-nav button:focus-visible{color:#eef1f8;border-color:rgba(190,205,240,.6)}
6583
6594
  .sl-view3d-nav button[aria-pressed="true"]{background:var(--sl-accent);color:var(--sl-accent-ink);border-color:transparent}
6584
6595
  .sl-view3d-nav button:disabled{opacity:.45;cursor:not-allowed}
6585
- .sl-view3d-nav select{min-height:38px;max-width:min(280px,calc(100vw - 40px));padding:7px 34px 7px 12px;
6596
+ .sl-view3d-nav select{min-height:38px;max-width:100%;padding:7px 34px 7px 12px;
6586
6597
  border-radius:999px;font:700 11.5px/1 inherit;color:#eef1f8;background:rgba(12,18,32,.86);
6587
6598
  border:1px solid rgba(150,165,205,.45);backdrop-filter:blur(6px);cursor:pointer}
6588
6599
  .sl-view3d-nav select:focus-visible{outline:2px solid var(--sl-accent);outline-offset:2px}
6589
6600
  .sl-view3d-nav .sl-view3d-locator{display:grid;grid-template-columns:minmax(150px,1.25fr) minmax(110px,.8fr) minmax(105px,.7fr) auto;
6590
- width:min(720px,calc(100vw - 180px));overflow:visible}
6601
+ width:min(720px,100%);overflow:visible}
6591
6602
  .sl-view3d-nav.is-seat-focused .sl-view3d-locator{display:none}
6592
6603
  .sl-view3d-locator select{width:100%;min-width:0}
6593
- .sl-picker[data-layout="narrow"] .sl-view3d-nav .sl-view3d-locator{display:flex;width:calc(100vw - 24px);overflow-x:auto}
6604
+ .sl-picker[data-layout="narrow"] .sl-view3d-nav .sl-view3d-locator{display:flex;width:100%;overflow-x:auto}
6594
6605
  .sl-picker[data-layout="narrow"] .sl-view3d-locator select{flex:0 0 155px}
6595
6606
  /* On phones the library owns the bottom edge for seat/panorama/overview actions.
6596
6607
  Keep venue navigation in a separate top rail so those control families never
@@ -7476,10 +7487,21 @@ var SeatPicker = class _SeatPicker {
7476
7487
  e.stopPropagation();
7477
7488
  setSheet(root.dataset.sheet !== "open");
7478
7489
  });
7490
+ this.els.peek?.addEventListener("click", (e) => {
7491
+ const go = e.target.closest(".sl-sheet-go");
7492
+ if (!go) return;
7493
+ e.stopPropagation();
7494
+ if (go.dataset.act === "checkout") void this.handleCta();
7495
+ else setSheet(true);
7496
+ });
7479
7497
  let startY = 0;
7480
7498
  let swiped = false;
7481
7499
  let tracking = false;
7482
7500
  head.addEventListener("pointerdown", (e) => {
7501
+ if (e.target.closest?.(".sl-seccard,.sl-sheet-toggle,.sl-sheet-go")) {
7502
+ tracking = false;
7503
+ return;
7504
+ }
7483
7505
  tracking = true;
7484
7506
  swiped = false;
7485
7507
  startY = e.clientY;
@@ -7498,7 +7520,7 @@ var SeatPicker = class _SeatPicker {
7498
7520
  });
7499
7521
  head.addEventListener("pointerup", (e) => {
7500
7522
  if (tracking && !swiped && Math.abs(e.clientY - startY) < 6) {
7501
- if (!e.target.closest(".sl-seccard,.sl-sheet-toggle")) setSheet(root.dataset.sheet !== "open");
7523
+ setSheet(root.dataset.sheet !== "open");
7502
7524
  }
7503
7525
  tracking = false;
7504
7526
  head.releasePointerCapture?.(e.pointerId);
@@ -7692,12 +7714,11 @@ var SeatPicker = class _SeatPicker {
7692
7714
  const narrow = this.root?.dataset.layout === "narrow";
7693
7715
  const filters = this.els.filters;
7694
7716
  if (filters) {
7717
+ if (this.cbEl) this.els.zoom?.appendChild(this.cbEl);
7695
7718
  if (narrow) {
7696
7719
  if (this.a11yChipsEl) filters.appendChild(this.a11yChipsEl);
7697
- if (this.cbEl) filters.appendChild(this.cbEl);
7698
7720
  } else {
7699
7721
  if (this.a11yChipsEl) this.regions["top-left"]?.appendChild(this.a11yChipsEl);
7700
- if (this.cbEl) this.els.zoom?.appendChild(this.cbEl);
7701
7722
  }
7702
7723
  const has = narrow && filters.children.length > 0;
7703
7724
  filters.classList.toggle("has", has);
@@ -9228,10 +9249,11 @@ var SeatPicker = class _SeatPicker {
9228
9249
  if (previousCount === 0 && count > 0) this.animateOnce(this.els.cta, "sl-ready", 520);
9229
9250
  if (this.els.peek) {
9230
9251
  if (count) {
9231
- this.els.peek.innerHTML = `<span>${count} ${count === 1 ? "ticket" : "tickets"} \xB7 ${this.money(total)}</span><span class="go">${this.hold ? pendingCount ? "Secure more" : "Continue" : "Review"}</span>`;
9252
+ const holding = !!this.hold && !pendingCount;
9253
+ 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>`;
9232
9254
  } else {
9233
9255
  const prices = (this.controller.doc?.categories ?? []).map((c) => this.catPrice(c)).filter((p) => p != null);
9234
- this.els.peek.innerHTML = (prices.length ? `<span>From ${this.money(Math.min(...prices))}</span>` : "<span>Pick your seats</span>") + `<span class="go">\u2726 Best seats</span>`;
9256
+ 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>`;
9235
9257
  }
9236
9258
  }
9237
9259
  this.lastTrayCount = count;