@sensiblestats/widget-react 0.61.2 → 0.61.3

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.js CHANGED
@@ -5524,7 +5524,7 @@ function CareerPathGame({
5524
5524
  /* @__PURE__ */ jsx70(GameHeader, { title, eyebrow: s.eyebrow, right, onBack, backLabel: ui.back }),
5525
5525
  /* @__PURE__ */ jsxs58("div", { className: "ss-g-body", children: [
5526
5526
  /* @__PURE__ */ jsxs58("div", { className: "ss-g-cp-card", children: [
5527
- /* @__PURE__ */ jsx70(Silhouette, { size: 64, variant: isOver ? "default" : "mystery" }),
5527
+ isOver && clientState?.revealedPlayerName ? /* @__PURE__ */ jsx70(PlayerAvatar, { className: "ss-g-cp-photo", name: clientState.revealedPlayerName, imagePath: clientState.revealedPlayerImagePath }) : /* @__PURE__ */ jsx70(Silhouette, { size: 64, variant: isOver ? "default" : "mystery" }),
5528
5528
  /* @__PURE__ */ jsxs58("div", { className: "ss-g-cp-card-text", children: [
5529
5529
  /* @__PURE__ */ jsx70("span", { className: "ss-g-cp-card-title", children: isOver && clientState?.revealedPlayerName ? clientState.revealedPlayerName : s.mysteryPlayer }),
5530
5530
  clientState?.hintLine ? /* @__PURE__ */ jsx70("span", { className: "ss-g-cp-hint", children: clientState.hintLine }) : !isOver ? /* @__PURE__ */ jsxs58("span", { className: "ss-g-cp-locks", children: [
@@ -5940,7 +5940,8 @@ function toRows(positions) {
5940
5940
  bucket.push(p);
5941
5941
  byRow.set(rowKey, bucket);
5942
5942
  });
5943
- return [...byRow.keys()].sort((a, b) => b - a).map((k) => byRow.get(k));
5943
+ const col = (p) => Number(p.slot?.split(":")[1]) || 0;
5944
+ return [...byRow.keys()].sort((a, b) => b - a).map((k) => [...byRow.get(k)].sort((a, b) => col(b) - col(a)));
5944
5945
  }
5945
5946
  function formationLabel(rowsAttackFirst) {
5946
5947
  if (rowsAttackFirst.length < 2) return "";
@@ -8496,6 +8497,8 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
8496
8497
  .ss-g-mt-portrait .ss-g-sil { font-size: 46px; }
8497
8498
  .ss-g-mt-photo { width: 132px; height: 132px; margin-bottom: 30px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--ss-g-accent-tint); color: var(--ss-w-accent); font: 800 40px var(--ss-g-font-display); }
8498
8499
  .ss-g-mt-photo img { width: 100%; height: 100%; object-fit: cover; }
8500
+ .ss-g-cp-photo { width: 64px; height: 64px; flex: none; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--ss-g-accent-tint); color: var(--ss-w-accent); font: 800 22px var(--ss-g-font-display); }
8501
+ .ss-g-cp-photo img { width: 100%; height: 100%; object-fit: cover; }
8499
8502
  .ss-g-mt-reveal-name { position: absolute; bottom: 6px; left: 12px; right: 12px; text-align: center; font: 800 20px var(--ss-g-font-display); text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
8500
8503
  .ss-g-mt-known { display: grid; gap: 6px; padding: 12px; }
8501
8504
  .ss-g-mt-known-cell { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }