courthive-components 4.3.0 → 4.4.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.
@@ -15274,7 +15274,7 @@ function OC(e) {
15274
15274
  var kC = {
15275
15275
  name: "courthive-components",
15276
15276
  packageManager: "pnpm@12.3.4",
15277
- version: "4.3.0",
15277
+ version: "4.4.0",
15278
15278
  engines: { node: ">=22" },
15279
15279
  description: "Components for competitions projects",
15280
15280
  files: ["dist"],
@@ -29123,9 +29123,9 @@ function Zq(e, t, n, r, i) {
29123
29123
  function Qq(e) {
29124
29124
  return e === "in-progress" ? "LIVE" : e === "suspended" ? "SUSP" : e === "next" ? "NEXT" : e === "due" ? "DUE" : null;
29125
29125
  }
29126
- function $q(e, t, n, r, i) {
29127
- let a = document.createElement("div");
29128
- if (a.className = `spl-active-strip-cell state-${e.state}`, i && (a.classList.add("has-availability-block"), e.state !== "free" && e.matchUp && a.classList.add("has-block-conflict")), a.dataset.courtId = e.courtId, e.rowIndex !== void 0 && (a.dataset.rowIndex = String(e.rowIndex)), r.cellHeight && (a.style.minHeight = r.cellHeight), i) {
29126
+ function $q(e, t, n, r, i, a) {
29127
+ let o = document.createElement("div");
29128
+ if (o.className = `spl-active-strip-cell state-${e.state}`, i && (o.classList.add("has-availability-block"), e.state !== "free" && e.matchUp && o.classList.add("has-block-conflict")), o.dataset.courtId = e.courtId, e.rowIndex !== void 0 && (o.dataset.rowIndex = String(e.rowIndex)), r.cellHeight && (o.style.minHeight = r.cellHeight), i) {
29129
29129
  let e = document.createElement("div");
29130
29130
  e.className = `spl-active-strip-block-banner block-${i.type.toLowerCase()}`;
29131
29131
  let t = document.createElement("span");
@@ -29133,22 +29133,28 @@ function $q(e, t, n, r, i) {
29133
29133
  let t = document.createElement("span");
29134
29134
  t.className = "spl-active-strip-block-detail", t.textContent = i.detail, e.appendChild(t);
29135
29135
  }
29136
- a.appendChild(e);
29136
+ o.appendChild(e);
29137
29137
  }
29138
29138
  if (e.state !== "free" && e.matchUp) {
29139
29139
  let t = r.renderCell?.(e.matchUp);
29140
- if (t) a.appendChild(t);
29140
+ if (t) o.appendChild(t);
29141
29141
  else {
29142
29142
  let t = document.createElement("div");
29143
- t.className = "spl-active-strip-body", t.textContent = e.matchUp.participantIds.join(" – ") || e.matchUp.matchUpId, a.appendChild(t);
29143
+ t.className = "spl-active-strip-body", t.textContent = e.matchUp.participantIds.join(" – ") || e.matchUp.matchUpId, o.appendChild(t);
29144
29144
  }
29145
29145
  }
29146
- let o = Qq(e.state);
29147
- if (o) {
29146
+ let s = e.state !== "free" && !!e.matchUp;
29147
+ if (!s && !i && a?.upcoming) {
29148
+ let e = document.createElement("div");
29149
+ e.className = `spl-active-strip-runway block-${a.upcoming.type.toLowerCase()}`, e.textContent = a.upcoming.label, a.upcoming.title && (e.title = a.upcoming.title), o.appendChild(e);
29150
+ }
29151
+ s && a?.edge && (o.classList.add("has-block-edge", `edge-${a.edge.type.toLowerCase()}`), a.edge.title && (o.title = a.edge.title));
29152
+ let c = Qq(e.state);
29153
+ if (c) {
29148
29154
  let t = document.createElement("span");
29149
- t.className = "spl-active-strip-state-pill", t.textContent = o, e.state === "suspended" && (t.title = "Suspended"), e.state === "due" && (t.title = "Should have started — not called to court"), a.appendChild(t);
29155
+ t.className = "spl-active-strip-state-pill", t.textContent = c, e.state === "suspended" && (t.title = "Suspended"), e.state === "due" && (t.title = "Should have started — not called to court"), o.appendChild(t);
29150
29156
  }
29151
- return Zq(a, e, t, n, r.statusOptions), a;
29157
+ return Zq(o, e, t, n, r.statusOptions), o;
29152
29158
  }
29153
29159
  function eJ(e) {
29154
29160
  let t = document.createElement("div");
@@ -29175,8 +29181,11 @@ function tJ(e = {}, t = {}) {
29175
29181
  dueMatchUpIds: new Set(r.dueMatchUpIds)
29176
29182
  } : t.statusOptions, o = Hq(r.grid, a);
29177
29183
  for (let a of o) {
29178
- let o = r.courtBlocks?.[a.courtId];
29179
- n.appendChild($q(a, e, i, t, o));
29184
+ let o = r.courtBlocks?.[a.courtId], s = {
29185
+ upcoming: r.courtUpcomingBlocks?.[a.courtId],
29186
+ edge: r.courtBlockEdges?.[a.courtId]
29187
+ };
29188
+ n.appendChild($q(a, e, i, t, o, s));
29180
29189
  }
29181
29190
  }
29182
29191
  function o(e) {