@sensiblestats/widget-react 0.55.0 → 0.56.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @sensiblestats/widget-react
2
2
 
3
+ ## 0.56.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Fix the daily-games layout and clarity that made them hard to play:
8
+
9
+ - **Pinned search / input on every game.** The game screen now fills the panel with the board in an internal scroll region and the search box (or Beat the Grid's cell sheet) pinned to the bottom — no more scrolling to reach it. The typeahead menu opens upward so it is never clipped off the bottom edge.
10
+ - **Guess the XI formation.** The goalkeeper line now sits at the bottom (football convention) so the flags read as a real formation attacking upward.
11
+ - **Guess the XI hints on the pitch.** Earned reveals (from wrong guesses) are shown on the relevant flag — the revealed position or player name — instead of cryptic "row:col" codes like "1:1 G".
12
+ - **Career Path & Mystery Tiger explainers.** Each now opens with a one-line "how to play"; Mystery Tiger also shows a ✓ / ▲ / ▼ key so the tiles make sense.
13
+ - **Higher or Lower terminal.** Clearer end-of-run summary (labelled points, "correct in a row").
14
+
3
15
  ## 0.55.0
4
16
 
5
17
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -4399,43 +4399,65 @@ function MysteryTigerGame({
4399
4399
  " left"
4400
4400
  ] })
4401
4401
  ] }),
4402
- guessResults.length === 0 && !isOver && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "ss-w-gt-lead", children: "Guess any squad player \u2014 each guess reveals how close you are on position, nationality, age, shirt and apps." }),
4403
- guessResults.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "ss-w-gtrows", children: guessResults.map((gr, i) => {
4404
- const player = config.squadPlayers.find((p) => p.id === gr.playerId);
4405
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "ss-w-gtguess", children: [
4406
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "ss-w-gtguess-nm", children: [
4407
- i + 1,
4408
- " \xB7 ",
4409
- player?.name ?? `#${gr.playerId}`
4410
- ] }),
4411
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "ss-w-gtrow", children: ATTR_KEYS.map((key) => {
4412
- const v = gr[key];
4413
- const arrow = directionArrow(v);
4414
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
4415
- "div",
4416
- {
4417
- className: `ss-w-gtile ss-w-gtile--${v.verdict}`,
4418
- "data-testid": `verdict-${key}-${i}`,
4419
- "data-verdict": v.verdict,
4420
- "aria-label": `${ATTR_LABELS[key]}: ${v.value ?? v.verdict}${v.direction ? ` ${v.direction}` : ""}`,
4421
- children: [
4422
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "ss-w-gtile-lab", children: ATTR_LABELS[key] }),
4423
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: "ss-w-gtile-v", "aria-hidden": "true", children: [
4424
- tileFace(key, v),
4425
- arrow && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "ss-w-gtile-dir", children: arrow })
4426
- ] })
4427
- ]
4428
- },
4429
- key
4430
- );
4431
- }) })
4432
- ] }, gr.playerId);
4433
- }) }),
4434
- clientState?.hintLine && !isOver && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "ss-w-gt-hint", children: [
4435
- "\u{1F4A1} ",
4436
- clientState.hintLine
4402
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "ss-w-gscroll", children: [
4403
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "ss-w-gt-lead", children: [
4404
+ guessResults.length === 0 ? "Guess a squad player \u2014 each guess compares it to the mystery player on Pos, Nat, Age, Shirt & Apps: " : "Tiles: ",
4405
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: "ss-w-gt-key", children: [
4406
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("b", { className: "ss-w-gt-key-ok", children: "\u2713" }),
4407
+ " match \xB7 ",
4408
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("b", { children: "\u25B2" }),
4409
+ " higher \xB7 ",
4410
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("b", { children: "\u25BC" }),
4411
+ " lower"
4412
+ ] })
4413
+ ] }),
4414
+ guessResults.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "ss-w-gtrows", children: guessResults.map((gr, i) => {
4415
+ const player = config.squadPlayers.find((p) => p.id === gr.playerId);
4416
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "ss-w-gtguess", children: [
4417
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "ss-w-gtguess-nm", children: [
4418
+ i + 1,
4419
+ " \xB7 ",
4420
+ player?.name ?? `#${gr.playerId}`
4421
+ ] }),
4422
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "ss-w-gtrow", children: ATTR_KEYS.map((key) => {
4423
+ const v = gr[key];
4424
+ const arrow = directionArrow(v);
4425
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
4426
+ "div",
4427
+ {
4428
+ className: `ss-w-gtile ss-w-gtile--${v.verdict}`,
4429
+ "data-testid": `verdict-${key}-${i}`,
4430
+ "data-verdict": v.verdict,
4431
+ "aria-label": `${ATTR_LABELS[key]}: ${v.value ?? v.verdict}${v.direction ? ` ${v.direction}` : ""}`,
4432
+ children: [
4433
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "ss-w-gtile-lab", children: ATTR_LABELS[key] }),
4434
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: "ss-w-gtile-v", "aria-hidden": "true", children: [
4435
+ tileFace(key, v),
4436
+ arrow && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "ss-w-gtile-dir", children: arrow })
4437
+ ] })
4438
+ ]
4439
+ },
4440
+ key
4441
+ );
4442
+ }) })
4443
+ ] }, gr.playerId);
4444
+ }) }),
4445
+ clientState?.hintLine && !isOver && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "ss-w-gt-hint", children: [
4446
+ "\u{1F4A1} ",
4447
+ clientState.hintLine
4448
+ ] }),
4449
+ isOver && clientState && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: `ss-w-gt-banner ss-w-gt-banner--${clientState.solved ? "solved" : "failed"}`, children: [
4450
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "ss-w-gt-banner-label", children: clientState.solved ? "\u{1F42F} You found them!" : "\u{1F614} Out of guesses" }),
4451
+ clientState.revealedPlayerName && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "ss-w-gt-banner-name", children: clientState.revealedPlayerName }),
4452
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "ss-w-gt-banner-sub", children: [
4453
+ clientState.guessesUsed,
4454
+ " guess",
4455
+ clientState.guessesUsed === 1 ? "" : "es",
4456
+ " \xB7 come back tomorrow"
4457
+ ] })
4458
+ ] })
4437
4459
  ] }),
4438
- !isOver && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "ss-w-gtta", children: [
4460
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "ss-w-gpin ss-w-gtta", children: [
4439
4461
  /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
4440
4462
  "input",
4441
4463
  {
@@ -4467,16 +4489,6 @@ function MysteryTigerGame({
4467
4489
  },
4468
4490
  p.id
4469
4491
  )) })
4470
- ] }),
4471
- isOver && clientState && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: `ss-w-gt-banner ss-w-gt-banner--${clientState.solved ? "solved" : "failed"}`, children: [
4472
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "ss-w-gt-banner-label", children: clientState.solved ? "\u{1F42F} You found them!" : "\u{1F614} Out of guesses" }),
4473
- clientState.revealedPlayerName && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "ss-w-gt-banner-name", children: clientState.revealedPlayerName }),
4474
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "ss-w-gt-banner-sub", children: [
4475
- clientState.guessesUsed,
4476
- " guess",
4477
- clientState.guessesUsed === 1 ? "" : "es",
4478
- " \xB7 come back tomorrow"
4479
- ] })
4480
4492
  ] })
4481
4493
  ] })
4482
4494
  ] });
@@ -4588,11 +4600,16 @@ function HigherOrLowerGame({
4588
4600
  ] })
4589
4601
  ] }),
4590
4602
  isOver && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "ss-w-hl-over", children: [
4591
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "ss-w-hl-over-title", children: runEndedWrong ? "Run over" : "Nice run!" }),
4592
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "ss-w-hl-over-score", children: score }),
4603
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "ss-w-hl-over-title", children: runEndedWrong ? "\u{1F6AB} Run over" : "\u{1F389} Perfect run!" }),
4604
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "ss-w-hl-over-score", children: [
4605
+ score,
4606
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "ss-w-hl-over-unit", children: " pts" })
4607
+ ] }),
4593
4608
  /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "ss-w-hl-over-sub", children: [
4594
4609
  correctCount,
4595
- " correct \xB7 come back tomorrow for a new run"
4610
+ " correct in a row",
4611
+ runEndedWrong ? " before a wrong pick" : "",
4612
+ " \xB7 come back tomorrow for a new run"
4596
4613
  ] })
4597
4614
  ] })
4598
4615
  ] })
@@ -4657,22 +4674,34 @@ function CareerPathGame({
4657
4674
  /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-cpath-head", children: [
4658
4675
  /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { children: [
4659
4676
  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "ss-w-cpath-title", children: "Career Path" }),
4660
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "ss-w-cpath-sub", children: "Which player had this career?" })
4677
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "ss-w-cpath-sub", children: "Guess the mystery player from the clubs they've played for, oldest first." })
4661
4678
  ] }),
4662
4679
  clientState && !isOver && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "ss-w-cpath-left", children: [
4663
4680
  clientState.guessesRemaining,
4664
4681
  " left"
4665
4682
  ] })
4666
4683
  ] }),
4667
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "ss-w-cpath-seq", children: visiblePath.map((spell, i) => /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_react30.Fragment, { children: [
4668
- i > 0 && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-w-cpath-arrow", "aria-hidden": "true", children: "\u203A" }),
4669
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ClubSpellCard, { spell })
4670
- ] }, `${spell.clubName}-${i}`)) }),
4671
- clientState?.hintLine && !isOver && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-cpath-hint", children: [
4672
- "\u{1F4A1} ",
4673
- clientState.hintLine
4684
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-gscroll", children: [
4685
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "ss-w-cpath-seq", children: visiblePath.map((spell, i) => /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_react30.Fragment, { children: [
4686
+ i > 0 && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-w-cpath-arrow", "aria-hidden": "true", children: "\u203A" }),
4687
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ClubSpellCard, { spell })
4688
+ ] }, `${spell.clubName}-${i}`)) }),
4689
+ clientState?.hintLine && !isOver && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-cpath-hint", children: [
4690
+ "\u{1F4A1} ",
4691
+ clientState.hintLine
4692
+ ] }),
4693
+ isOver && clientState && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: `ss-w-cpath-banner ss-w-cpath-banner--${clientState.solved ? "solved" : "failed"}`, children: [
4694
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "ss-w-cpath-banner-label", children: clientState.solved ? "\u2705 Career traced!" : "\u{1F614} Out of guesses" }),
4695
+ clientState.revealedPlayerName && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "ss-w-cpath-banner-name", children: clientState.revealedPlayerName }),
4696
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-cpath-banner-sub", children: [
4697
+ clientState.guessesUsed,
4698
+ " guess",
4699
+ clientState.guessesUsed === 1 ? "" : "es",
4700
+ " \xB7 come back tomorrow"
4701
+ ] })
4702
+ ] })
4674
4703
  ] }),
4675
- !isOver && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-gtta", children: [
4704
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-gpin ss-w-gtta", children: [
4676
4705
  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
4677
4706
  "input",
4678
4707
  {
@@ -4704,16 +4733,6 @@ function CareerPathGame({
4704
4733
  },
4705
4734
  p.id
4706
4735
  )) })
4707
- ] }),
4708
- isOver && clientState && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: `ss-w-cpath-banner ss-w-cpath-banner--${clientState.solved ? "solved" : "failed"}`, children: [
4709
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "ss-w-cpath-banner-label", children: clientState.solved ? "\u2705 Career traced!" : "\u{1F614} Out of guesses" }),
4710
- clientState.revealedPlayerName && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "ss-w-cpath-banner-name", children: clientState.revealedPlayerName }),
4711
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-cpath-banner-sub", children: [
4712
- clientState.guessesUsed,
4713
- " guess",
4714
- clientState.guessesUsed === 1 ? "" : "es",
4715
- " \xB7 come back tomorrow"
4716
- ] })
4717
4736
  ] })
4718
4737
  ] })
4719
4738
  ] });
@@ -4859,59 +4878,61 @@ function BeatTheGridGame({
4859
4878
  ] })
4860
4879
  ] })
4861
4880
  ] }),
4862
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
4863
- "div",
4864
- {
4865
- className: "ss-w-btg-grid",
4866
- style: { gridTemplateColumns: `auto repeat(${cols.length}, 1fr)` },
4867
- role: "grid",
4868
- children: [
4869
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "ss-w-btg-gc ss-w-btg-gc--corner" }),
4870
- cols.map((col) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "ss-w-btg-gc ss-w-btg-gc--colhdr", children: col }, col)),
4871
- rows.map((rowLabel, rowIdx) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_react31.default.Fragment, { children: [
4872
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "ss-w-btg-gc ss-w-btg-gc--rowhdr", children: rowLabel }),
4873
- cols.map((colLabel, colIdx) => {
4874
- const filled = findCellResult(filledCells, rowIdx, colIdx);
4875
- const isActive = activeCell?.row === rowIdx && activeCell?.col === colIdx;
4876
- return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4877
- "button",
4878
- {
4879
- type: "button",
4880
- "data-testid": `btg-cell-${rowIdx}-${colIdx}`,
4881
- "aria-label": `${rowLabel} ${colLabel}`,
4882
- className: [
4883
- "ss-w-btg-gc ss-w-btg-cell",
4884
- filled ? filled.isCorrect ? "ss-w-btg-cell--correct" : "ss-w-btg-cell--wrong" : "",
4885
- isActive ? "ss-w-btg-cell--active" : ""
4886
- ].filter(Boolean).join(" "),
4887
- disabled: isLocked2 || submitting,
4888
- onClick: () => handleCellClick(rowIdx, colIdx),
4889
- children: filled ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
4890
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "ss-w-btg-cell-nm", children: shortName(playerPool.find((p) => p.id === filled.playerId)?.name) }),
4891
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className: "ss-w-btg-cell-score", children: [
4892
- filled.rarityScore,
4893
- filled.isCorrect && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "ss-w-btg-cell-check", "aria-hidden": "true", children: " \u2713" })
4894
- ] })
4895
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "ss-w-btg-cell-empty", "aria-hidden": "true", children: "+" })
4896
- },
4897
- `cell-${rowIdx}-${colIdx}`
4898
- );
4899
- })
4900
- ] }, rowIdx))
4901
- ]
4902
- }
4903
- ),
4904
- isLocked2 && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "ss-w-btg-done", children: [
4905
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "ss-w-btg-done-label", children: "\u{1F532} Grid complete" }),
4906
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "ss-w-btg-done-score", children: clientState?.totalScore ?? 0 }),
4907
- /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "ss-w-btg-done-sub", children: [
4908
- filledCells.filter((c) => c.isCorrect).length,
4909
- "/",
4910
- filledCells.length,
4911
- " correct \xB7 come back tomorrow"
4881
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "ss-w-gscroll", children: [
4882
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
4883
+ "div",
4884
+ {
4885
+ className: "ss-w-btg-grid",
4886
+ style: { gridTemplateColumns: `auto repeat(${cols.length}, 1fr)` },
4887
+ role: "grid",
4888
+ children: [
4889
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "ss-w-btg-gc ss-w-btg-gc--corner" }),
4890
+ cols.map((col) => /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "ss-w-btg-gc ss-w-btg-gc--colhdr", children: col }, col)),
4891
+ rows.map((rowLabel, rowIdx) => /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_react31.default.Fragment, { children: [
4892
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "ss-w-btg-gc ss-w-btg-gc--rowhdr", children: rowLabel }),
4893
+ cols.map((colLabel, colIdx) => {
4894
+ const filled = findCellResult(filledCells, rowIdx, colIdx);
4895
+ const isActive = activeCell?.row === rowIdx && activeCell?.col === colIdx;
4896
+ return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4897
+ "button",
4898
+ {
4899
+ type: "button",
4900
+ "data-testid": `btg-cell-${rowIdx}-${colIdx}`,
4901
+ "aria-label": `${rowLabel} ${colLabel}`,
4902
+ className: [
4903
+ "ss-w-btg-gc ss-w-btg-cell",
4904
+ filled ? filled.isCorrect ? "ss-w-btg-cell--correct" : "ss-w-btg-cell--wrong" : "",
4905
+ isActive ? "ss-w-btg-cell--active" : ""
4906
+ ].filter(Boolean).join(" "),
4907
+ disabled: isLocked2 || submitting,
4908
+ onClick: () => handleCellClick(rowIdx, colIdx),
4909
+ children: filled ? /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
4910
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "ss-w-btg-cell-nm", children: shortName(playerPool.find((p) => p.id === filled.playerId)?.name) }),
4911
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("span", { className: "ss-w-btg-cell-score", children: [
4912
+ filled.rarityScore,
4913
+ filled.isCorrect && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "ss-w-btg-cell-check", "aria-hidden": "true", children: " \u2713" })
4914
+ ] })
4915
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "ss-w-btg-cell-empty", "aria-hidden": "true", children: "+" })
4916
+ },
4917
+ `cell-${rowIdx}-${colIdx}`
4918
+ );
4919
+ })
4920
+ ] }, rowIdx))
4921
+ ]
4922
+ }
4923
+ ),
4924
+ isLocked2 && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "ss-w-btg-done", children: [
4925
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "ss-w-btg-done-label", children: "\u{1F532} Grid complete" }),
4926
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "ss-w-btg-done-score", children: clientState?.totalScore ?? 0 }),
4927
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "ss-w-btg-done-sub", children: [
4928
+ filledCells.filter((c) => c.isCorrect).length,
4929
+ "/",
4930
+ filledCells.length,
4931
+ " correct \xB7 come back tomorrow"
4932
+ ] })
4912
4933
  ] })
4913
4934
  ] }),
4914
- activeCell !== null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4935
+ activeCell !== null && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "ss-w-gpin", children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
4915
4936
  SearchSheet,
4916
4937
  {
4917
4938
  row: activeCell.row,
@@ -4923,7 +4944,7 @@ function BeatTheGridGame({
4923
4944
  onPick: handlePick,
4924
4945
  onDismiss: () => setActiveCell(null)
4925
4946
  }
4926
- )
4947
+ ) })
4927
4948
  ] });
4928
4949
  }
4929
4950
 
@@ -4947,13 +4968,7 @@ function toRows(positions) {
4947
4968
  bucket.push(p);
4948
4969
  byRow.set(rowKey, bucket);
4949
4970
  });
4950
- return [...byRow.keys()].sort((a, b) => a - b).map((k) => byRow.get(k));
4951
- }
4952
- function RevealCard({ reveal }) {
4953
- return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "ss-w-gxi-reveal", "data-reveal-type": reveal.type ?? "", children: [
4954
- reveal.slot && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "ss-w-gxi-reveal-slot", children: reveal.slot }),
4955
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "ss-w-gxi-reveal-val", children: reveal.value })
4956
- ] });
4971
+ return [...byRow.keys()].sort((a, b) => b - a).map((k) => byRow.get(k));
4957
4972
  }
4958
4973
  function GuessTheXiGame({
4959
4974
  config,
@@ -4968,6 +4983,10 @@ function GuessTheXiGame({
4968
4983
  const solved = clientState?.status === "solved";
4969
4984
  const guessedTeamIds = new Set(clientState?.guessHistory.map((g) => g.teamId) ?? []);
4970
4985
  const rows = config ? toRows(config.positions) : [];
4986
+ const revealBySlot = /* @__PURE__ */ new Map();
4987
+ (clientState?.earnedReveals ?? []).forEach((r) => {
4988
+ if (r.slot) revealBySlot.set(r.slot, r);
4989
+ });
4971
4990
  const filtered = config && !isOver ? config.teamPool.filter(
4972
4991
  (t) => !guessedTeamIds.has(t.teamId) && t.teamName.toLowerCase().includes(query.toLowerCase())
4973
4992
  ) : [];
@@ -4979,6 +4998,7 @@ function GuessTheXiGame({
4979
4998
  onSubmit(JSON.stringify({ guesses: newGuesses }));
4980
4999
  }
4981
5000
  const wrongGuesses = (clientState?.guessHistory ?? []).filter((g) => !g.wasCorrect);
5001
+ const revealCount = clientState?.earnedReveals.length ?? 0;
4982
5002
  return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "ss-w-gxi", "data-testid": "game-screen-guess-the-xi", children: [
4983
5003
  !config && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }),
4984
5004
  config && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
@@ -4986,7 +5006,7 @@ function GuessTheXiGame({
4986
5006
  /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { children: [
4987
5007
  /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "ss-w-gxi-title", children: "Guess the XI" }),
4988
5008
  /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "ss-w-gxi-sub", children: [
4989
- "Which team? \xB7 flags only \xB7 ",
5009
+ "Name the team \xB7 flags are each player's nationality \xB7 ",
4990
5010
  config.poolLabel
4991
5011
  ] })
4992
5012
  ] }),
@@ -4995,64 +5015,76 @@ function GuessTheXiGame({
4995
5015
  " left"
4996
5016
  ] })
4997
5017
  ] }),
4998
- rows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "ss-w-gxi-pitch", children: rows.map((row, r) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "ss-w-gxi-prow", children: row.map((pos, c) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
4999
- "div",
5000
- {
5001
- className: "ss-w-gxi-flag",
5002
- title: pos.nationality,
5003
- "aria-label": pos.nationality,
5004
- children: nationalityFlag(pos.nationality)
5005
- },
5006
- `${pos.slot}-${c}`
5007
- )) }, r)) }),
5008
- clientState && clientState.earnedReveals.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "ss-w-gxi-reveals", children: clientState.earnedReveals.map((r, i) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(RevealCard, { reveal: r }, i)) }),
5009
- !isOver ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
5010
- wrongGuesses.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "ss-w-gxi-wrong", children: wrongGuesses.map((g) => {
5018
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "ss-w-gscroll", children: [
5019
+ rows.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "ss-w-gxi-pitch", children: rows.map((row, r) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "ss-w-gxi-prow", children: row.map((pos, c) => {
5020
+ const rev = pos.slot ? revealBySlot.get(pos.slot) : void 0;
5021
+ return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "ss-w-gxi-slot", children: [
5022
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5023
+ "div",
5024
+ {
5025
+ className: `ss-w-gxi-flag${rev ? " ss-w-gxi-flag--revealed" : ""}`,
5026
+ title: pos.nationality,
5027
+ "aria-label": rev ? `${pos.nationality} \u2014 revealed: ${rev.value}` : pos.nationality,
5028
+ children: nationalityFlag(pos.nationality)
5029
+ }
5030
+ ),
5031
+ rev && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "ss-w-gxi-flag-lab", children: rev.value })
5032
+ ] }, `${pos.slot}-${c}`);
5033
+ }) }, r)) }),
5034
+ revealCount > 0 && !isOver && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "ss-w-gxi-revnote", children: [
5035
+ "\u{1F50E} ",
5036
+ revealCount,
5037
+ " player",
5038
+ revealCount === 1 ? "" : "s",
5039
+ " revealed \u2014 highlighted on the pitch"
5040
+ ] }),
5041
+ !isOver && wrongGuesses.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "ss-w-gxi-wrong", children: wrongGuesses.map((g) => {
5011
5042
  const team = config.teamPool.find((t) => t.teamId === g.teamId);
5012
5043
  return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "ss-w-gxi-wrong-pill", children: team?.teamName ?? `#${g.teamId}` }, g.teamId);
5013
5044
  }) }),
5014
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "ss-w-gtta", children: [
5015
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5016
- "input",
5017
- {
5018
- id: inputId,
5019
- type: "text",
5020
- role: "textbox",
5021
- className: "ss-w-gtta-i",
5022
- placeholder: "Name the team\u2026",
5023
- value: query,
5024
- disabled: submitting || isOver,
5025
- onChange: (e) => setQuery(e.target.value),
5026
- autoComplete: "off",
5027
- "aria-label": "Name the team",
5028
- "aria-autocomplete": "list"
5029
- }
5030
- ),
5031
- query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "ss-w-gtta-drop", role: "listbox", children: filtered.map((t) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5032
- "div",
5033
- {
5034
- className: "ss-w-gtta-opt",
5035
- role: "option",
5036
- "aria-selected": false,
5037
- onClick: () => handlePick(t.teamId),
5038
- onKeyDown: (e) => {
5039
- if (e.key === "Enter") handlePick(t.teamId);
5040
- },
5041
- tabIndex: 0,
5042
- children: t.teamName
5043
- },
5044
- t.teamId
5045
- )) })
5046
- ] })
5047
- ] }) : clientState && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: `ss-w-gxi-banner ss-w-gxi-banner--${solved ? "solved" : "failed"}`, children: [
5048
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "ss-w-gxi-banner-label", children: solved ? "\u2705 Solved!" : "\u{1F614} Out of guesses" }),
5049
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "ss-w-gxi-banner-score", children: clientState.score }),
5050
- /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "ss-w-gxi-banner-sub", children: [
5051
- clientState.guessesUsed,
5052
- " guess",
5053
- clientState.guessesUsed === 1 ? "" : "es",
5054
- " \xB7 come back tomorrow"
5045
+ isOver && clientState && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: `ss-w-gxi-banner ss-w-gxi-banner--${solved ? "solved" : "failed"}`, children: [
5046
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "ss-w-gxi-banner-label", children: solved ? "\u2705 Solved!" : "\u{1F614} Out of guesses" }),
5047
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "ss-w-gxi-banner-score", children: clientState.score }),
5048
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "ss-w-gxi-banner-sub", children: [
5049
+ clientState.guessesUsed,
5050
+ " guess",
5051
+ clientState.guessesUsed === 1 ? "" : "es",
5052
+ " \xB7 come back tomorrow"
5053
+ ] })
5055
5054
  ] })
5055
+ ] }),
5056
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "ss-w-gpin ss-w-gtta", children: [
5057
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5058
+ "input",
5059
+ {
5060
+ id: inputId,
5061
+ type: "text",
5062
+ role: "textbox",
5063
+ className: "ss-w-gtta-i",
5064
+ placeholder: "Name the team\u2026",
5065
+ value: query,
5066
+ disabled: submitting || isOver,
5067
+ onChange: (e) => setQuery(e.target.value),
5068
+ autoComplete: "off",
5069
+ "aria-label": "Name the team",
5070
+ "aria-autocomplete": "list"
5071
+ }
5072
+ ),
5073
+ query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "ss-w-gtta-drop", role: "listbox", children: filtered.map((t) => /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
5074
+ "div",
5075
+ {
5076
+ className: "ss-w-gtta-opt",
5077
+ role: "option",
5078
+ "aria-selected": false,
5079
+ onClick: () => handlePick(t.teamId),
5080
+ onKeyDown: (e) => {
5081
+ if (e.key === "Enter") handlePick(t.teamId);
5082
+ },
5083
+ tabIndex: 0,
5084
+ children: t.teamName
5085
+ },
5086
+ t.teamId
5087
+ )) })
5056
5088
  ] })
5057
5089
  ] })
5058
5090
  ] });
@@ -5749,7 +5781,7 @@ function GamesPanel({
5749
5781
  const [selected, setSelected] = (0, import_react37.useState)(null);
5750
5782
  if (!loggedIn) return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(GamesLoginWall, { ui });
5751
5783
  if (selected !== null) {
5752
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "ss-w-mon-list", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5784
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "ss-w-gscreen-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
5753
5785
  GameScreenHost,
5754
5786
  {
5755
5787
  selected,
@@ -6934,7 +6966,24 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
6934
6966
  .ss-w-tile-chip--fun { color: var(--ss-w-faint); background: var(--ss-w-bubble); border: 1px solid var(--ss-w-line); }
6935
6967
 
6936
6968
  /* Game screen host: back-row + placeholder body */
6937
- .ss-w-gscreen { display: flex; flex-direction: column; gap: 0; }
6969
+ /* Game screen fills the panel; the board scrolls internally and the search/input bar stays
6970
+ pinned at the bottom so the fan never has to scroll to reach it. */
6971
+ .ss-w-gscreen-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 14px; overflow: hidden; }
6972
+ .ss-w-gscreen { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 0; }
6973
+ .ss-w-gscreen > .ss-w-gxi, .ss-w-gscreen > .ss-w-gt, .ss-w-gscreen > .ss-w-cpath,
6974
+ .ss-w-gscreen > .ss-w-btg, .ss-w-gscreen > .ss-w-hl { flex: 1; min-height: 0; }
6975
+ /* Scrollable board + guess-history region. */
6976
+ .ss-w-gscroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; padding-bottom: 2px; }
6977
+ /* Bottom-pinned bar (search input / action). */
6978
+ .ss-w-gpin { flex-shrink: 0; padding-top: 10px; }
6979
+ /* Heads stay put above the scroll region. */
6980
+ .ss-w-gxi-head, .ss-w-gt-head, .ss-w-cpath-head, .ss-w-btg-head { flex-shrink: 0; }
6981
+ /* Mystery Tiger explainer key (\u2713 / \u25B2 / \u25BC). */
6982
+ .ss-w-gt-key { white-space: nowrap; }
6983
+ .ss-w-gt-key b { font-weight: 800; color: var(--ss-w-ink); }
6984
+ .ss-w-gt-key-ok { color: var(--ss-w-correct) !important; }
6985
+ /* Higher or Lower terminal score unit. */
6986
+ .ss-w-hl-over-unit { font-size: 14px; font-weight: 700; color: var(--ss-w-faint); }
6938
6987
  .ss-w-gscreen-back { display: inline-flex; align-items: center; gap: 5px; background: none; border: none; color: var(--ss-w-accent); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 0 10px; align-self: flex-start; }
6939
6988
  .ss-w-gscreen-back-arrow { font-size: 11px; font-weight: 700; }
6940
6989
  .ss-w-gscreen-body { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px 16px; color: var(--ss-w-faint); font-size: 13px; text-align: center; }
@@ -6988,7 +7037,9 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
6988
7037
  .ss-w-gtta-i { width: 100%; box-sizing: border-box; padding: 9px 12px; border-radius: 10px; border: 1.5px solid var(--ss-w-line); background: var(--ss-w-panel); color: var(--ss-w-ink); font: inherit; font-size: 13px; outline: none; transition: border-color .12s; }
6989
7038
  .ss-w-gtta-i:focus { border-color: var(--ss-w-accent); }
6990
7039
  .ss-w-gtta-i:disabled { opacity: .5; cursor: not-allowed; }
6991
- .ss-w-gtta-drop { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 10; background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 10px; max-height: 180px; overflow-y: auto; box-shadow: 0 4px 16px rgba(0,0,0,.12); }
7040
+ /* Opens UPWARD (bottom-anchored) because the input is pinned to the panel's bottom edge \u2014 a
7041
+ downward menu would be clipped off-screen. */
7042
+ .ss-w-gtta-drop { position: absolute; left: 0; right: 0; bottom: calc(100% + 4px); top: auto; z-index: 10; background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 10px; max-height: 200px; overflow-y: auto; box-shadow: 0 -4px 16px rgba(0,0,0,.16); }
6992
7043
  .ss-w-gtta-opt { padding: 9px 12px; font-size: 13px; cursor: pointer; color: var(--ss-w-ink); border-bottom: 1px solid var(--ss-w-line); }
6993
7044
  .ss-w-gtta-opt:last-child { border-bottom: none; }
6994
7045
  .ss-w-gtta-opt:hover { background: var(--ss-w-bubble); }
@@ -7147,13 +7198,18 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
7147
7198
  /* A football pitch is grass-green regardless of the operator accent, so the field uses fixed
7148
7199
  green values (not --ss-w-correct, which is a muted per-operator token that vanished on dark
7149
7200
  themes) plus visible horizontal yard-lines and a brighter halfway line. */
7150
- .ss-w-gxi-pitch { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 300px; padding: 18px 10px; border-radius: 14px; border: 1px solid rgba(46, 160, 86, .38);
7201
+ .ss-w-gxi-pitch { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; min-height: 210px; padding: 14px 10px; border-radius: 14px; border: 1px solid rgba(46, 160, 86, .38);
7151
7202
  background:
7152
7203
  linear-gradient(180deg, rgba(46, 160, 86, .015) 0, rgba(46, 160, 86, .015) 49.5%, rgba(255,255,255,.14) 49.5%, rgba(255,255,255,.14) 50.5%, rgba(46, 160, 86, .015) 50.5%),
7153
7204
  repeating-linear-gradient(180deg, transparent 0 31px, rgba(255,255,255,.045) 31px 32px),
7154
7205
  linear-gradient(180deg, rgba(46, 160, 86, .28), rgba(38, 132, 71, .16)); }
7155
- .ss-w-gxi-prow { display: flex; justify-content: center; align-items: center; gap: 12px; }
7206
+ .ss-w-gxi-prow { display: flex; justify-content: center; align-items: flex-start; gap: 12px; }
7207
+ .ss-w-gxi-slot { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 46px; }
7156
7208
  .ss-w-gxi-flag { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 17px; line-height: 1; background: rgba(9, 12, 10, .55); border: 1px solid rgba(255,255,255,.16); box-shadow: 0 1px 3px rgba(0,0,0,.3); overflow: hidden; }
7209
+ /* A slot whose player has been revealed by a wrong guess. */
7210
+ .ss-w-gxi-flag--revealed { border-color: var(--ss-w-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ss-w-accent) 45%, transparent); }
7211
+ .ss-w-gxi-flag-lab { font-size: 8px; line-height: 1.05; font-weight: 700; text-align: center; color: var(--ss-w-accent); max-width: 46px; word-break: break-word; }
7212
+ .ss-w-gxi-revnote { font-size: 11px; color: var(--ss-w-faint); }
7157
7213
  /* Wrong-guess trail */
7158
7214
  .ss-w-gxi-wrong { display: flex; flex-wrap: wrap; gap: 6px; }
7159
7215
  .ss-w-gxi-wrong-pill { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: color-mix(in srgb, var(--ss-w-wrong) 10%, var(--ss-w-panel)); border: 1px solid var(--ss-w-line); color: var(--ss-w-faint); text-decoration: line-through; }