@seatlayer/core 0.11.0 → 0.12.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 +46 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.js +46 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1133,6 +1133,8 @@ var _SeatmapRenderer = class _SeatmapRenderer {
|
|
|
1133
1133
|
this.catPrice = /* @__PURE__ */ new Map();
|
|
1134
1134
|
/** Section/zone ids to render dimmed (organizer manager: held-back inventory). */
|
|
1135
1135
|
this.dimmedSections = /* @__PURE__ */ new Set();
|
|
1136
|
+
/** Organizer control-room velocity overlay; absent on buyer surfaces. */
|
|
1137
|
+
this.sectionHeat = /* @__PURE__ */ new Map();
|
|
1136
1138
|
/** Phase 2: section/zone ids in the event-level `closed` state — flat grey
|
|
1137
1139
|
* block, seats greyed + not pickable, but the section stays rendered. */
|
|
1138
1140
|
this.closedSections = /* @__PURE__ */ new Set();
|
|
@@ -1514,6 +1516,31 @@ var _SeatmapRenderer = class _SeatmapRenderer {
|
|
|
1514
1516
|
for (const id of ids) this.setSelected(id, false, true);
|
|
1515
1517
|
this.overlayLayer.batchDraw();
|
|
1516
1518
|
}
|
|
1519
|
+
/** Switch organizer interaction in place so the host preserves camera, LOD,
|
|
1520
|
+
* focus and live status state while moving between Monitor and Block. */
|
|
1521
|
+
setManageInteraction(options) {
|
|
1522
|
+
if (this.marquee) this.cancelMarquee();
|
|
1523
|
+
this.panLast = null;
|
|
1524
|
+
this.opts.manageMode = options.manageMode;
|
|
1525
|
+
this.opts.marqueeSelect = options.marqueeSelect;
|
|
1526
|
+
this.opts.selectableStatuses = [...options.selectableStatuses];
|
|
1527
|
+
if (options.maxSelection != null) this.opts.maxSelection = options.maxSelection;
|
|
1528
|
+
const invalid = [...this.selection].filter((id) => !this.isSelectable(id));
|
|
1529
|
+
if (invalid.length) this.deselect(invalid);
|
|
1530
|
+
if (!options.manageMode && this.selection.size) this.clearSelection();
|
|
1531
|
+
this.container.style.cursor = "default";
|
|
1532
|
+
this.overlayLayer.batchDraw();
|
|
1533
|
+
}
|
|
1534
|
+
/** Apply a non-destructive velocity treatment to section outlines. Seat
|
|
1535
|
+
* category/status fills remain untouched so heat never changes seat meaning. */
|
|
1536
|
+
setSectionHeat(scores) {
|
|
1537
|
+
this.sectionHeat.clear();
|
|
1538
|
+
for (const [sectionId, raw] of Object.entries(scores ?? {})) {
|
|
1539
|
+
if (Number.isFinite(raw)) this.sectionHeat.set(sectionId, Math.max(0, Math.min(1, raw)));
|
|
1540
|
+
}
|
|
1541
|
+
for (const section of this.sections) this.refreshSectionHeat(section);
|
|
1542
|
+
this.bgLayer.batchDraw();
|
|
1543
|
+
}
|
|
1517
1544
|
deselect(seatIds) {
|
|
1518
1545
|
let changed = false;
|
|
1519
1546
|
for (const id of seatIds) {
|
|
@@ -2710,6 +2737,7 @@ var _SeatmapRenderer = class _SeatmapRenderer {
|
|
|
2710
2737
|
total: memberIds.length,
|
|
2711
2738
|
free,
|
|
2712
2739
|
baseFill,
|
|
2740
|
+
outlineTint,
|
|
2713
2741
|
outlinePoly,
|
|
2714
2742
|
blockPoly,
|
|
2715
2743
|
rowLines,
|
|
@@ -2722,8 +2750,26 @@ var _SeatmapRenderer = class _SeatmapRenderer {
|
|
|
2722
2750
|
};
|
|
2723
2751
|
for (const id of memberIds) this.seatSection.set(id, sec);
|
|
2724
2752
|
this.refreshSectionFill(sec);
|
|
2753
|
+
this.refreshSectionHeat(sec);
|
|
2725
2754
|
this.sections.push(sec);
|
|
2726
2755
|
}
|
|
2756
|
+
refreshSectionHeat(sec) {
|
|
2757
|
+
const raw = this.sectionHeat.get(sec.id) ?? (sec.zone ? this.sectionHeat.get(sec.zone) : void 0);
|
|
2758
|
+
if (raw == null || raw <= 0) {
|
|
2759
|
+
sec.outlinePoly.stroke(rgba(sec.outlineTint, 0.5));
|
|
2760
|
+
sec.outlinePoly.fill(rgba(sec.outlineTint, 0.08));
|
|
2761
|
+
sec.outlinePoly.strokeWidth(1.75);
|
|
2762
|
+
sec.outlinePoly.shadowOpacity(0);
|
|
2763
|
+
return;
|
|
2764
|
+
}
|
|
2765
|
+
const color = lerpColor("#f4b740", "#ef4444", raw);
|
|
2766
|
+
sec.outlinePoly.stroke(rgba(color, 0.72 + raw * 0.25));
|
|
2767
|
+
sec.outlinePoly.fill(rgba(color, 0.08 + raw * 0.13));
|
|
2768
|
+
sec.outlinePoly.strokeWidth(2 + raw * 3.5);
|
|
2769
|
+
sec.outlinePoly.shadowColor(color);
|
|
2770
|
+
sec.outlinePoly.shadowBlur(4 + raw * 12);
|
|
2771
|
+
sec.outlinePoly.shadowOpacity(0.25 + raw * 0.45);
|
|
2772
|
+
}
|
|
2727
2773
|
/** Recompute a section's availability-tinted fill + "N LEFT" (cheap; on status change). */
|
|
2728
2774
|
refreshSectionFill(sec) {
|
|
2729
2775
|
sec.blockPoly.fill(this.sectionBlockFill(sec));
|