@seatlayer/js 0.12.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/README.md +1 -1
- package/dist/index.cjs +26 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +26 -2
- 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
|
@@ -2368,6 +2368,10 @@ var CSS2 = `
|
|
|
2368
2368
|
.slm-sectionhead{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-top:18px}
|
|
2369
2369
|
.slm-windows{display:flex;gap:3px;padding:2px;border:1px solid var(--slm-line);border-radius:8px;background:var(--slm-surface)}
|
|
2370
2370
|
.slm-window{padding:4px 6px;border-radius:6px;font-size:10px;font-weight:800;color:var(--slm-muted)}.slm-window.on{background:var(--slm-accent);color:var(--slm-accent-ink)}
|
|
2371
|
+
.slm-momentumhelp{margin:10px 0 14px;padding:10px;border:1px solid rgba(244,183,64,.28);border-radius:10px;background:rgba(244,183,64,.07)}
|
|
2372
|
+
.slm-momentumhelp[hidden]{display:none}.slm-momentumscale{display:flex;align-items:center;gap:7px;color:var(--slm-muted);font-size:10px;font-weight:750;text-transform:uppercase;letter-spacing:.07em}
|
|
2373
|
+
.slm-momentumgradient{height:6px;min-width:64px;flex:1;border-radius:999px;background:linear-gradient(90deg,#f4b740,#ef4444)}
|
|
2374
|
+
.slm-momentumcopy{margin-top:7px;color:var(--slm-muted);font-size:11px;line-height:1.45}
|
|
2371
2375
|
.slm-inspect-card{padding:12px;border:1px solid var(--slm-line);border-radius:12px;background:var(--slm-surface)}
|
|
2372
2376
|
.slm-inspect-label{font-size:24px;font-weight:850;letter-spacing:-.02em}.slm-inspect-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:14px}
|
|
2373
2377
|
.slm-inspect-grid span{display:block;color:var(--slm-muted);font-size:10px;text-transform:uppercase;letter-spacing:.08em}.slm-inspect-grid b{display:block;margin-top:3px;font-size:12.5px}
|
|
@@ -3071,7 +3075,9 @@ var SeatManager = class {
|
|
|
3071
3075
|
</div>
|
|
3072
3076
|
<span class="slm-live"><span class="slm-live-dot"></span><span data-ref="livetext">CONNECTING</span></span>
|
|
3073
3077
|
<div class="slm-bar-actions">
|
|
3074
|
-
<button class="slm-barbtn" data-ref="heat" aria-pressed="false"
|
|
3078
|
+
<button class="slm-barbtn" data-ref="heat" aria-pressed="false"
|
|
3079
|
+
aria-label="Sales momentum overlay off"
|
|
3080
|
+
title="Highlight sections selling fastest in the selected time window">Sales momentum</button>
|
|
3075
3081
|
<button class="slm-barbtn" data-ref="fullscreen" title="Full screen (F)" aria-keyshortcuts="F">Full screen</button>
|
|
3076
3082
|
</div>
|
|
3077
3083
|
<div class="slm-kpis" data-ref="kpis"></div>
|
|
@@ -3150,7 +3156,19 @@ var SeatManager = class {
|
|
|
3150
3156
|
if (!button) return;
|
|
3151
3157
|
button.classList.toggle("on", this.heatEnabled);
|
|
3152
3158
|
button.setAttribute("aria-pressed", String(this.heatEnabled));
|
|
3153
|
-
button.
|
|
3159
|
+
button.setAttribute("aria-label", `Sales momentum overlay ${this.heatEnabled ? "on" : "off"}`);
|
|
3160
|
+
button.setAttribute("title", `${this.heatEnabled ? "Hide" : "Highlight"} sections selling fastest in the selected time window`);
|
|
3161
|
+
button.textContent = "Sales momentum";
|
|
3162
|
+
this.paintMomentumHelp();
|
|
3163
|
+
}
|
|
3164
|
+
paintMomentumHelp() {
|
|
3165
|
+
const help = this.els.rail?.querySelector('[data-ref="momentumhelp"]');
|
|
3166
|
+
if (!help) return;
|
|
3167
|
+
help.hidden = !this.heatEnabled;
|
|
3168
|
+
const copy = help.querySelector('[data-ref="momentumcopy"]');
|
|
3169
|
+
if (!copy) return;
|
|
3170
|
+
const hasRecentSales = this.controlRoomSnapshot?.velocity.bySection.some((row) => row.netBooked > 0);
|
|
3171
|
+
copy.textContent = hasRecentSales ? "Warmer sections have more completed bookings, adjusted for section size. Holds and viewers are not counted." : `No completed bookings in the last ${this.trendWindowMinutes} minutes.`;
|
|
3154
3172
|
}
|
|
3155
3173
|
paintFullscreenButton() {
|
|
3156
3174
|
if (!this.els.fullscreen) return;
|
|
@@ -3207,6 +3225,10 @@ var SeatManager = class {
|
|
|
3207
3225
|
${[5, 15, 30, 60].map((window2) => `<button class="slm-window" data-window="${window2}">${window2}m</button>`).join("")}
|
|
3208
3226
|
</div>
|
|
3209
3227
|
</div>
|
|
3228
|
+
<div class="slm-momentumhelp" data-ref="momentumhelp" ${this.heatEnabled ? "" : "hidden"}>
|
|
3229
|
+
<div class="slm-momentumscale"><span>Warm</span><span class="slm-momentumgradient"></span><span>Hot</span></div>
|
|
3230
|
+
<p class="slm-momentumcopy" data-ref="momentumcopy"></p>
|
|
3231
|
+
</div>
|
|
3210
3232
|
<div class="slm-sectionlist" data-ref="sections"></div>
|
|
3211
3233
|
<p class="slm-eyebrow">Activity</p>
|
|
3212
3234
|
<div class="slm-feed" data-ref="feed"></div>
|
|
@@ -3222,6 +3244,7 @@ var SeatManager = class {
|
|
|
3222
3244
|
this.recomputeTallies();
|
|
3223
3245
|
this.paintMonitorInsights();
|
|
3224
3246
|
this.paintTrendWindow();
|
|
3247
|
+
this.paintMomentumHelp();
|
|
3225
3248
|
this.paintFeed();
|
|
3226
3249
|
}
|
|
3227
3250
|
paintMonitorInsights() {
|
|
@@ -3258,6 +3281,7 @@ var SeatManager = class {
|
|
|
3258
3281
|
</div>`;
|
|
3259
3282
|
}).join("") : '<div class="slm-empty">No section metrics are available for this chart.</div>';
|
|
3260
3283
|
this.paintTrendWindow();
|
|
3284
|
+
this.paintMomentumHelp();
|
|
3261
3285
|
}
|
|
3262
3286
|
applyHeatOverlay() {
|
|
3263
3287
|
const snapshot = this.controlRoomSnapshot;
|