@sensiblestats/widget-react 0.52.0 → 0.54.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,25 @@
1
1
  # @sensiblestats/widget-react
2
2
 
3
+ ## 0.54.0
4
+
5
+ ### Minor Changes
6
+
7
+ - c013151: Rebuild the daily game screens to match the design artifact:
8
+
9
+ - Guess the XI now renders a real formation on the pitch (GK line at the back → forwards forward), so each flag's position is legible instead of a scatter; cut to 3 guesses.
10
+ - Career Path wraps the club-crest sequence instead of scrolling/truncating with "+N more"; loans read as "(loan)" and years are compact.
11
+ - Higher or Lower drops the answered-history list for the artifact's clean pair + footer chips.
12
+ - Mystery Tiger's first load shows the five-attribute legend instead of a bare search box.
13
+
14
+ ## 0.53.0
15
+
16
+ ### Minor Changes
17
+
18
+ - Games data batch 2 (client surfaces):
19
+
20
+ - Beat the Grid: the cell search now uses the club player pool carried in ConfigJson (`playerPool`), threaded through `GameScreenHost` instead of an empty list — the search box was previously always empty.
21
+ - Mystery Tiger: each guess tile now shows the guessed player's own attribute value (e.g. "ST", a nationality flag, "22 ▲") instead of a bare glyph, falling back to the verdict glyph when no value is present.
22
+
3
23
  ## 0.52.0
4
24
 
5
25
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -4229,6 +4229,89 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, refresh }) {
4229
4229
 
4230
4230
  // src/components/games/MysteryTigerGame.tsx
4231
4231
  var import_react29 = require("react");
4232
+
4233
+ // src/components/games/nationFlags.ts
4234
+ var FLAGS = {
4235
+ england: "\u{1F3F4}\u{E0067}\u{E0062}\u{E0065}\u{E006E}\u{E0067}\u{E007F}",
4236
+ scotland: "\u{1F3F4}\u{E0067}\u{E0062}\u{E0073}\u{E0063}\u{E0074}\u{E007F}",
4237
+ wales: "\u{1F3F4}\u{E0067}\u{E0062}\u{E0077}\u{E006C}\u{E0073}\u{E007F}",
4238
+ "northern ireland": "\u{1F1EC}\u{1F1E7}",
4239
+ "republic of ireland": "\u{1F1EE}\u{1F1EA}",
4240
+ ireland: "\u{1F1EE}\u{1F1EA}",
4241
+ "united kingdom": "\u{1F1EC}\u{1F1E7}",
4242
+ france: "\u{1F1EB}\u{1F1F7}",
4243
+ spain: "\u{1F1EA}\u{1F1F8}",
4244
+ portugal: "\u{1F1F5}\u{1F1F9}",
4245
+ germany: "\u{1F1E9}\u{1F1EA}",
4246
+ italy: "\u{1F1EE}\u{1F1F9}",
4247
+ netherlands: "\u{1F1F3}\u{1F1F1}",
4248
+ belgium: "\u{1F1E7}\u{1F1EA}",
4249
+ switzerland: "\u{1F1E8}\u{1F1ED}",
4250
+ austria: "\u{1F1E6}\u{1F1F9}",
4251
+ denmark: "\u{1F1E9}\u{1F1F0}",
4252
+ sweden: "\u{1F1F8}\u{1F1EA}",
4253
+ norway: "\u{1F1F3}\u{1F1F4}",
4254
+ finland: "\u{1F1EB}\u{1F1EE}",
4255
+ iceland: "\u{1F1EE}\u{1F1F8}",
4256
+ poland: "\u{1F1F5}\u{1F1F1}",
4257
+ czechia: "\u{1F1E8}\u{1F1FF}",
4258
+ "czech republic": "\u{1F1E8}\u{1F1FF}",
4259
+ croatia: "\u{1F1ED}\u{1F1F7}",
4260
+ serbia: "\u{1F1F7}\u{1F1F8}",
4261
+ "bosnia and herzegovina": "\u{1F1E7}\u{1F1E6}",
4262
+ greece: "\u{1F1EC}\u{1F1F7}",
4263
+ romania: "\u{1F1F7}\u{1F1F4}",
4264
+ ukraine: "\u{1F1FA}\u{1F1E6}",
4265
+ russia: "\u{1F1F7}\u{1F1FA}",
4266
+ hungary: "\u{1F1ED}\u{1F1FA}",
4267
+ slovakia: "\u{1F1F8}\u{1F1F0}",
4268
+ slovenia: "\u{1F1F8}\u{1F1EE}",
4269
+ turkey: "\u{1F1F9}\u{1F1F7}",
4270
+ t\u00FCrkiye: "\u{1F1F9}\u{1F1F7}",
4271
+ albania: "\u{1F1E6}\u{1F1F1}",
4272
+ "north macedonia": "\u{1F1F2}\u{1F1F0}",
4273
+ brazil: "\u{1F1E7}\u{1F1F7}",
4274
+ argentina: "\u{1F1E6}\u{1F1F7}",
4275
+ uruguay: "\u{1F1FA}\u{1F1FE}",
4276
+ colombia: "\u{1F1E8}\u{1F1F4}",
4277
+ chile: "\u{1F1E8}\u{1F1F1}",
4278
+ peru: "\u{1F1F5}\u{1F1EA}",
4279
+ ecuador: "\u{1F1EA}\u{1F1E8}",
4280
+ paraguay: "\u{1F1F5}\u{1F1FE}",
4281
+ mexico: "\u{1F1F2}\u{1F1FD}",
4282
+ "united states": "\u{1F1FA}\u{1F1F8}",
4283
+ usa: "\u{1F1FA}\u{1F1F8}",
4284
+ canada: "\u{1F1E8}\u{1F1E6}",
4285
+ jamaica: "\u{1F1EF}\u{1F1F2}",
4286
+ nigeria: "\u{1F1F3}\u{1F1EC}",
4287
+ ghana: "\u{1F1EC}\u{1F1ED}",
4288
+ senegal: "\u{1F1F8}\u{1F1F3}",
4289
+ ivorycoast: "\u{1F1E8}\u{1F1EE}",
4290
+ "cote d'ivoire": "\u{1F1E8}\u{1F1EE}",
4291
+ "ivory coast": "\u{1F1E8}\u{1F1EE}",
4292
+ cameroon: "\u{1F1E8}\u{1F1F2}",
4293
+ egypt: "\u{1F1EA}\u{1F1EC}",
4294
+ morocco: "\u{1F1F2}\u{1F1E6}",
4295
+ algeria: "\u{1F1E9}\u{1F1FF}",
4296
+ tunisia: "\u{1F1F9}\u{1F1F3}",
4297
+ mali: "\u{1F1F2}\u{1F1F1}",
4298
+ "south africa": "\u{1F1FF}\u{1F1E6}",
4299
+ "dr congo": "\u{1F1E8}\u{1F1E9}",
4300
+ japan: "\u{1F1EF}\u{1F1F5}",
4301
+ "south korea": "\u{1F1F0}\u{1F1F7}",
4302
+ korea: "\u{1F1F0}\u{1F1F7}",
4303
+ australia: "\u{1F1E6}\u{1F1FA}",
4304
+ "saudi arabia": "\u{1F1F8}\u{1F1E6}",
4305
+ iran: "\u{1F1EE}\u{1F1F7}",
4306
+ "new zealand": "\u{1F1F3}\u{1F1FF}"
4307
+ };
4308
+ function nationalityFlag(nationality) {
4309
+ if (!nationality) return "\u{1F3F3}\uFE0F";
4310
+ const key = nationality.trim().toLowerCase();
4311
+ return FLAGS[key] ?? nationality.slice(0, 3).toUpperCase();
4312
+ }
4313
+
4314
+ // src/components/games/MysteryTigerGame.tsx
4232
4315
  var import_jsx_runtime55 = require("react/jsx-runtime");
4233
4316
  function parseClientState(json) {
4234
4317
  if (!json) return null;
@@ -4259,6 +4342,15 @@ function verdictGlyph(v) {
4259
4342
  if (v.direction === "down") return "\u2193";
4260
4343
  return "\u2248";
4261
4344
  }
4345
+ function directionArrow(v) {
4346
+ if (v.direction === "up") return "\u25B2";
4347
+ if (v.direction === "down") return "\u25BC";
4348
+ return "";
4349
+ }
4350
+ function tileFace(key, v) {
4351
+ if (!v.value) return verdictGlyph(v);
4352
+ return key === "nationality" ? nationalityFlag(v.value) : v.value;
4353
+ }
4262
4354
  function MysteryTigerGame({
4263
4355
  config,
4264
4356
  result,
@@ -4294,6 +4386,13 @@ function MysteryTigerGame({
4294
4386
  " left"
4295
4387
  ] })
4296
4388
  ] }),
4389
+ guessResults.length === 0 && !isOver && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "ss-w-gt-legend", children: [
4390
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "ss-w-gt-legend-lead", children: "Guess any squad player \u2014 each guess reveals how close you are:" }),
4391
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "ss-w-gtrow", children: ATTR_KEYS.map((key) => /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "ss-w-gtile ss-w-gtile--legend", children: [
4392
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "ss-w-gtile-lab", children: ATTR_LABELS[key] }),
4393
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "ss-w-gtile-v", "aria-hidden": "true", children: "\xB7" })
4394
+ ] }, key)) })
4395
+ ] }),
4297
4396
  guessResults.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "ss-w-gtrows", children: guessResults.map((gr, i) => {
4298
4397
  const player = config.squadPlayers.find((p) => p.id === gr.playerId);
4299
4398
  return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "ss-w-gtguess", children: [
@@ -4304,16 +4403,20 @@ function MysteryTigerGame({
4304
4403
  ] }),
4305
4404
  /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "ss-w-gtrow", children: ATTR_KEYS.map((key) => {
4306
4405
  const v = gr[key];
4406
+ const arrow = directionArrow(v);
4307
4407
  return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
4308
4408
  "div",
4309
4409
  {
4310
4410
  className: `ss-w-gtile ss-w-gtile--${v.verdict}`,
4311
4411
  "data-testid": `verdict-${key}-${i}`,
4312
4412
  "data-verdict": v.verdict,
4313
- "aria-label": `${ATTR_LABELS[key]}: ${v.verdict}${v.direction ? ` ${v.direction}` : ""}`,
4413
+ "aria-label": `${ATTR_LABELS[key]}: ${v.value ?? v.verdict}${v.direction ? ` ${v.direction}` : ""}`,
4314
4414
  children: [
4315
4415
  /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "ss-w-gtile-lab", children: ATTR_LABELS[key] }),
4316
- /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "ss-w-gtile-v", "aria-hidden": "true", children: verdictGlyph(v) })
4416
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("span", { className: "ss-w-gtile-v", "aria-hidden": "true", children: [
4417
+ tileFace(key, v),
4418
+ arrow && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "ss-w-gtile-dir", children: arrow })
4419
+ ] })
4317
4420
  ]
4318
4421
  },
4319
4422
  key
@@ -4374,6 +4477,7 @@ function MysteryTigerGame({
4374
4477
 
4375
4478
  // src/components/games/HigherOrLowerGame.tsx
4376
4479
  var import_jsx_runtime56 = require("react/jsx-runtime");
4480
+ var POINTS_PER_CORRECT = 10;
4377
4481
  function parseClientState2(json) {
4378
4482
  if (!json) return null;
4379
4483
  try {
@@ -4465,39 +4569,25 @@ function HigherOrLowerGame({
4465
4569
  ] })
4466
4570
  ] })
4467
4571
  ] }),
4572
+ !isOver && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "ss-w-hl-foot", children: [
4573
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "ss-w-hl-chip", children: [
4574
+ score,
4575
+ " pts"
4576
+ ] }),
4577
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "ss-w-hl-chip ss-w-hl-chip--green", children: [
4578
+ "+",
4579
+ POINTS_PER_CORRECT,
4580
+ " / correct"
4581
+ ] })
4582
+ ] }),
4468
4583
  isOver && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "ss-w-hl-over", children: [
4469
4584
  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "ss-w-hl-over-title", children: runEndedWrong ? "Run over" : "Nice run!" }),
4470
4585
  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "ss-w-hl-over-score", children: score }),
4471
4586
  /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "ss-w-hl-over-sub", children: [
4472
4587
  correctCount,
4473
- " correct",
4474
- correctCount === 1 ? "" : "",
4475
- " \xB7 come back tomorrow for a new run"
4588
+ " correct \xB7 come back tomorrow for a new run"
4476
4589
  ] })
4477
- ] }),
4478
- answeredPairs.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "ss-w-hlresults", children: answeredPairs.map((answered) => {
4479
- const pair = config.pairs.find((p) => p.pairIndex === answered.pairIndex);
4480
- return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
4481
- "div",
4482
- {
4483
- className: `ss-w-hlrrow ss-w-hlrrow--${answered.wasCorrect ? "correct" : "wrong"}`,
4484
- children: [
4485
- /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("span", { className: "ss-w-hlrrow-names", children: [
4486
- pair?.playerAName ?? "?",
4487
- " ",
4488
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("b", { className: "ss-w-hlrrow-val", children: pair?.playerAValue }),
4489
- " vs ",
4490
- pair?.playerBName ?? "?",
4491
- " ",
4492
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("b", { className: "ss-w-hlrrow-val", children: answered.playerBValue })
4493
- ] }),
4494
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "ss-w-hlrrow-pick", children: answered.pick }),
4495
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "ss-w-hlrrow-icon", children: answered.wasCorrect ? "\u2713" : "\u2717" })
4496
- ]
4497
- },
4498
- answered.pairIndex
4499
- );
4500
- }) })
4590
+ ] })
4501
4591
  ] })
4502
4592
  ] });
4503
4593
  }
@@ -4514,18 +4604,22 @@ function parseClientState3(json) {
4514
4604
  }
4515
4605
  }
4516
4606
  function spellYears(spell) {
4517
- const parts = [];
4518
- if (spell.startYear) parts.push(String(spell.startYear));
4519
- if (spell.endYear) parts.push(String(spell.endYear));
4520
- return parts.join("\u2013");
4607
+ if (!spell.startYear) return "";
4608
+ const yy = (y) => `'${String(y % 100).padStart(2, "0")}`;
4609
+ if (spell.endYear && spell.endYear !== spell.startYear) {
4610
+ return `${yy(spell.startYear)}\u2013${String(spell.endYear % 100).padStart(2, "0")}`;
4611
+ }
4612
+ return yy(spell.startYear);
4521
4613
  }
4522
4614
  function ClubSpellCard({ spell }) {
4523
4615
  const years = spellYears(spell);
4524
4616
  return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: `ss-w-cpath-club${spell.isLoan ? " ss-w-cpath-club--loan" : ""}`, children: [
4525
4617
  spell.crestUrl ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("img", { src: spell.crestUrl, alt: "", className: "ss-w-cpath-crest", loading: "lazy" }) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "ss-w-cpath-crest ss-w-cpath-crest--fallback", "aria-hidden": "true", children: spell.clubName.slice(0, 3).toUpperCase() }),
4526
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-w-cpath-club-name", children: spell.clubName }),
4527
- years && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-w-cpath-spell-yr", children: years }),
4528
- spell.isLoan && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-w-cpath-loan-badge", children: "Loan" })
4618
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "ss-w-cpath-club-name", children: [
4619
+ spell.clubName,
4620
+ spell.isLoan && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-w-cpath-loan-note", children: " (loan)" })
4621
+ ] }),
4622
+ years && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-w-cpath-spell-yr", children: years })
4529
4623
  ] });
4530
4624
  }
4531
4625
  function CareerPathGame({
@@ -4540,8 +4634,6 @@ function CareerPathGame({
4540
4634
  const alreadyGuessedIds = new Set(clientState?.guessResults.map((g) => g.playerId) ?? []);
4541
4635
  const isOver = result?.alreadyPlayed === true || clientState?.solved === true || clientState?.failed === true;
4542
4636
  const visiblePath = clientState?.visiblePath ?? config?.initialPath ?? [];
4543
- const totalClubs = clientState?.totalClubs ?? config?.totalClubs ?? visiblePath.length;
4544
- const hiddenCount = Math.max(0, totalClubs - visiblePath.length);
4545
4637
  const filtered = config && !isOver ? config.typeaheadPool.filter(
4546
4638
  (p) => !alreadyGuessedIds.has(p.id) && p.name.toLowerCase().includes(query.toLowerCase())
4547
4639
  ) : [];
@@ -4565,20 +4657,10 @@ function CareerPathGame({
4565
4657
  " left"
4566
4658
  ] })
4567
4659
  ] }),
4568
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-cpath-seq", children: [
4569
- visiblePath.map((spell, i) => /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_react30.Fragment, { children: [
4570
- i > 0 && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-w-cpath-arrow", "aria-hidden": "true", children: "\u2192" }),
4571
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ClubSpellCard, { spell })
4572
- ] }, `${spell.clubName}-${i}`)),
4573
- hiddenCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_jsx_runtime57.Fragment, { children: [
4574
- /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-w-cpath-arrow", "aria-hidden": "true", children: "\u2192" }),
4575
- /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-cpath-hidden", children: [
4576
- "+",
4577
- hiddenCount,
4578
- " more"
4579
- ] })
4580
- ] })
4581
- ] }),
4660
+ /* @__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: [
4661
+ i > 0 && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("span", { className: "ss-w-cpath-arrow", "aria-hidden": "true", children: "\u203A" }),
4662
+ /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(ClubSpellCard, { spell })
4663
+ ] }, `${spell.clubName}-${i}`)) }),
4582
4664
  clientState?.hintLine && !isOver && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-cpath-hint", children: [
4583
4665
  "\u{1F4A1} ",
4584
4666
  clientState.hintLine
@@ -4828,90 +4910,8 @@ function BeatTheGridGame({
4828
4910
 
4829
4911
  // src/components/games/GuessTheXiGame.tsx
4830
4912
  var import_react32 = require("react");
4831
-
4832
- // src/components/games/nationFlags.ts
4833
- var FLAGS = {
4834
- england: "\u{1F3F4}\u{E0067}\u{E0062}\u{E0065}\u{E006E}\u{E0067}\u{E007F}",
4835
- scotland: "\u{1F3F4}\u{E0067}\u{E0062}\u{E0073}\u{E0063}\u{E0074}\u{E007F}",
4836
- wales: "\u{1F3F4}\u{E0067}\u{E0062}\u{E0077}\u{E006C}\u{E0073}\u{E007F}",
4837
- "northern ireland": "\u{1F1EC}\u{1F1E7}",
4838
- "republic of ireland": "\u{1F1EE}\u{1F1EA}",
4839
- ireland: "\u{1F1EE}\u{1F1EA}",
4840
- "united kingdom": "\u{1F1EC}\u{1F1E7}",
4841
- france: "\u{1F1EB}\u{1F1F7}",
4842
- spain: "\u{1F1EA}\u{1F1F8}",
4843
- portugal: "\u{1F1F5}\u{1F1F9}",
4844
- germany: "\u{1F1E9}\u{1F1EA}",
4845
- italy: "\u{1F1EE}\u{1F1F9}",
4846
- netherlands: "\u{1F1F3}\u{1F1F1}",
4847
- belgium: "\u{1F1E7}\u{1F1EA}",
4848
- switzerland: "\u{1F1E8}\u{1F1ED}",
4849
- austria: "\u{1F1E6}\u{1F1F9}",
4850
- denmark: "\u{1F1E9}\u{1F1F0}",
4851
- sweden: "\u{1F1F8}\u{1F1EA}",
4852
- norway: "\u{1F1F3}\u{1F1F4}",
4853
- finland: "\u{1F1EB}\u{1F1EE}",
4854
- iceland: "\u{1F1EE}\u{1F1F8}",
4855
- poland: "\u{1F1F5}\u{1F1F1}",
4856
- czechia: "\u{1F1E8}\u{1F1FF}",
4857
- "czech republic": "\u{1F1E8}\u{1F1FF}",
4858
- croatia: "\u{1F1ED}\u{1F1F7}",
4859
- serbia: "\u{1F1F7}\u{1F1F8}",
4860
- "bosnia and herzegovina": "\u{1F1E7}\u{1F1E6}",
4861
- greece: "\u{1F1EC}\u{1F1F7}",
4862
- romania: "\u{1F1F7}\u{1F1F4}",
4863
- ukraine: "\u{1F1FA}\u{1F1E6}",
4864
- russia: "\u{1F1F7}\u{1F1FA}",
4865
- hungary: "\u{1F1ED}\u{1F1FA}",
4866
- slovakia: "\u{1F1F8}\u{1F1F0}",
4867
- slovenia: "\u{1F1F8}\u{1F1EE}",
4868
- turkey: "\u{1F1F9}\u{1F1F7}",
4869
- t\u00FCrkiye: "\u{1F1F9}\u{1F1F7}",
4870
- albania: "\u{1F1E6}\u{1F1F1}",
4871
- "north macedonia": "\u{1F1F2}\u{1F1F0}",
4872
- brazil: "\u{1F1E7}\u{1F1F7}",
4873
- argentina: "\u{1F1E6}\u{1F1F7}",
4874
- uruguay: "\u{1F1FA}\u{1F1FE}",
4875
- colombia: "\u{1F1E8}\u{1F1F4}",
4876
- chile: "\u{1F1E8}\u{1F1F1}",
4877
- peru: "\u{1F1F5}\u{1F1EA}",
4878
- ecuador: "\u{1F1EA}\u{1F1E8}",
4879
- paraguay: "\u{1F1F5}\u{1F1FE}",
4880
- mexico: "\u{1F1F2}\u{1F1FD}",
4881
- "united states": "\u{1F1FA}\u{1F1F8}",
4882
- usa: "\u{1F1FA}\u{1F1F8}",
4883
- canada: "\u{1F1E8}\u{1F1E6}",
4884
- jamaica: "\u{1F1EF}\u{1F1F2}",
4885
- nigeria: "\u{1F1F3}\u{1F1EC}",
4886
- ghana: "\u{1F1EC}\u{1F1ED}",
4887
- senegal: "\u{1F1F8}\u{1F1F3}",
4888
- ivorycoast: "\u{1F1E8}\u{1F1EE}",
4889
- "cote d'ivoire": "\u{1F1E8}\u{1F1EE}",
4890
- "ivory coast": "\u{1F1E8}\u{1F1EE}",
4891
- cameroon: "\u{1F1E8}\u{1F1F2}",
4892
- egypt: "\u{1F1EA}\u{1F1EC}",
4893
- morocco: "\u{1F1F2}\u{1F1E6}",
4894
- algeria: "\u{1F1E9}\u{1F1FF}",
4895
- tunisia: "\u{1F1F9}\u{1F1F3}",
4896
- mali: "\u{1F1F2}\u{1F1F1}",
4897
- "south africa": "\u{1F1FF}\u{1F1E6}",
4898
- "dr congo": "\u{1F1E8}\u{1F1E9}",
4899
- japan: "\u{1F1EF}\u{1F1F5}",
4900
- "south korea": "\u{1F1F0}\u{1F1F7}",
4901
- korea: "\u{1F1F0}\u{1F1F7}",
4902
- australia: "\u{1F1E6}\u{1F1FA}",
4903
- "saudi arabia": "\u{1F1F8}\u{1F1E6}",
4904
- iran: "\u{1F1EE}\u{1F1F7}",
4905
- "new zealand": "\u{1F1F3}\u{1F1FF}"
4906
- };
4907
- function nationalityFlag(nationality) {
4908
- if (!nationality) return "\u{1F3F3}\uFE0F";
4909
- const key = nationality.trim().toLowerCase();
4910
- return FLAGS[key] ?? nationality.slice(0, 3).toUpperCase();
4911
- }
4912
-
4913
- // src/components/games/GuessTheXiGame.tsx
4914
4913
  var import_jsx_runtime59 = require("react/jsx-runtime");
4914
+ var MAX_GUESSES = 3;
4915
4915
  function parseClientState5(json) {
4916
4916
  if (!json) return null;
4917
4917
  try {
@@ -4967,12 +4967,12 @@ function GuessTheXiGame({
4967
4967
  /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { children: [
4968
4968
  /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "ss-w-gxi-title", children: "Guess the XI" }),
4969
4969
  /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "ss-w-gxi-sub", children: [
4970
- "Which team? \xB7 ",
4970
+ "Which team? \xB7 flags only \xB7 ",
4971
4971
  config.poolLabel
4972
4972
  ] })
4973
4973
  ] }),
4974
4974
  clientState && !isOver && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className: "ss-w-gxi-left", children: [
4975
- Math.max(0, 6 - clientState.guessesUsed),
4975
+ Math.max(0, MAX_GUESSES - clientState.guessesUsed),
4976
4976
  " left"
4977
4977
  ] })
4978
4978
  ] }),
@@ -5647,15 +5647,17 @@ function GameScreenHost({
5647
5647
  config: safeParseConfig(configJson)
5648
5648
  }
5649
5649
  );
5650
- case "beat-the-grid":
5650
+ case "beat-the-grid": {
5651
+ const btgConfig = safeParseConfig(configJson);
5651
5652
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5652
5653
  BeatTheGridGame,
5653
5654
  {
5654
5655
  ...sharedProps,
5655
- config: safeParseConfig(configJson),
5656
- playerPool: []
5656
+ config: btgConfig,
5657
+ playerPool: btgConfig?.playerPool ?? []
5657
5658
  }
5658
5659
  );
5660
+ }
5659
5661
  case "guess-the-xi":
5660
5662
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
5661
5663
  GuessTheXiGame,
@@ -6978,13 +6980,19 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
6978
6980
  .ss-w-gt-left { margin-left: auto; flex: none; font-size: 11px; font-weight: 700; color: var(--ss-w-accent); background: color-mix(in srgb, var(--ss-w-accent) 11%, var(--ss-w-panel)); border: 1px solid color-mix(in srgb, var(--ss-w-accent) 22%, var(--ss-w-line)); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
6979
6981
  /* Guess rows \u2014 one labelled block per guess */
6980
6982
  .ss-w-gtrows { display: flex; flex-direction: column; gap: 8px; }
6983
+ /* First-load legend (empty state) */
6984
+ .ss-w-gt-legend { display: flex; flex-direction: column; gap: 8px; }
6985
+ .ss-w-gt-legend-lead { font-size: 11.5px; color: var(--ss-w-faint); line-height: 1.35; }
6986
+ .ss-w-gtile--legend { background: var(--ss-w-bubble); border: 1px dashed var(--ss-w-line); color: var(--ss-w-faint); }
6987
+ .ss-w-gtile--legend .ss-w-gtile-lab { opacity: .9; }
6981
6988
  .ss-w-gtguess { display: flex; flex-direction: column; gap: 4px; }
6982
6989
  .ss-w-gtguess-nm { font-size: 11px; font-weight: 600; color: var(--ss-w-faint); }
6983
6990
  .ss-w-gtrow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
6984
6991
  /* Verdict tiles: label on top, verdict glyph below */
6985
6992
  .ss-w-gtile { display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1; border-radius: 8px; gap: 2px; min-width: 0; }
6986
6993
  .ss-w-gtile-lab { font-size: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; opacity: .75; }
6987
- .ss-w-gtile-v { font-size: 15px; font-weight: 800; line-height: 1; }
6994
+ .ss-w-gtile-v { display: inline-flex; align-items: center; gap: 1px; font-size: 13px; font-weight: 800; line-height: 1; max-width: 100%; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
6995
+ .ss-w-gtile-dir { font-size: 9px; line-height: 1; }
6988
6996
  .ss-w-gtile--exact { background: var(--ss-w-correct); color: #062611; }
6989
6997
  .ss-w-gtile--near { background: var(--ss-w-accent); color: #241700; }
6990
6998
  .ss-w-gtile--miss { background: var(--ss-w-bubble); color: var(--ss-w-faint); border: 1px solid var(--ss-w-line); }
@@ -7029,16 +7037,10 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
7029
7037
  .ss-w-hl-over-score { font-size: 34px; font-weight: 800; color: var(--ss-w-accent); line-height: 1; font-variant-numeric: tabular-nums; }
7030
7038
  .ss-w-hl-over-sub { font-size: 11px; color: var(--ss-w-faint); }
7031
7039
  /* Answered history \u2014 clean single-line rows with the revealed value */
7032
- .ss-w-hlresults { display: flex; flex-direction: column; gap: 5px; }
7033
- .ss-w-hlrrow { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 10px; font-size: 12px; background: var(--ss-w-bubble); border: 1px solid var(--ss-w-line); }
7034
- .ss-w-hlrrow--correct { background: color-mix(in srgb, var(--ss-w-correct) 10%, var(--ss-w-panel)); border-color: color-mix(in srgb, var(--ss-w-correct) 30%, var(--ss-w-line)); }
7035
- .ss-w-hlrrow--wrong { background: color-mix(in srgb, var(--ss-w-cta) 8%, var(--ss-w-panel)); }
7036
- .ss-w-hlrrow-names { flex: 1; min-width: 0; font-weight: 600; color: var(--ss-w-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
7037
- .ss-w-hlrrow-val { font-weight: 800; color: var(--ss-w-accent); font-variant-numeric: tabular-nums; }
7038
- .ss-w-hlrrow-pick { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--ss-w-faint); flex: none; }
7039
- .ss-w-hlrrow-icon { font-size: 14px; flex: none; }
7040
- .ss-w-hlrrow--correct .ss-w-hlrrow-icon { color: var(--ss-w-correct); }
7041
- .ss-w-hlrrow--wrong .ss-w-hlrrow-icon { color: var(--ss-w-cta); }
7040
+ /* In-progress footer chips (artifact) */
7041
+ .ss-w-hl-foot { display: flex; align-items: center; gap: 8px; }
7042
+ .ss-w-hl-chip { font-size: 11px; font-weight: 600; color: var(--ss-w-faint); background: var(--ss-w-bubble); border: 1px solid var(--ss-w-line); border-radius: 999px; padding: 4px 10px; }
7043
+ .ss-w-hl-chip--green { margin-left: auto; color: var(--ss-w-correct); background: color-mix(in srgb, var(--ss-w-correct) 10%, var(--ss-w-panel)); border-color: color-mix(in srgb, var(--ss-w-correct) 26%, var(--ss-w-line)); }
7042
7044
 
7043
7045
  /* ---- Career Path game screen (D3) \u2014 artifact cpath/club/cto layout ---- */
7044
7046
  .ss-w-cpath { display: flex; flex-direction: column; gap: 12px; }
@@ -7048,18 +7050,16 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
7048
7050
  .ss-w-cpath-sub { font-size: 11px; color: var(--ss-w-faint); margin-top: 4px; }
7049
7051
  .ss-w-cpath-left { margin-left: auto; flex: none; font-size: 11px; font-weight: 700; color: var(--ss-w-accent); background: color-mix(in srgb, var(--ss-w-accent) 11%, var(--ss-w-panel)); border: 1px solid color-mix(in srgb, var(--ss-w-accent) 22%, var(--ss-w-line)); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
7050
7052
  /* Career sequence \u2014 horizontal crests with arrows */
7051
- .ss-w-cpath-seq { display: flex; flex-wrap: nowrap; align-items: flex-start; gap: 4px; background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 14px; padding: 13px 11px; overflow-x: auto; overscroll-behavior-x: contain; }
7052
- .ss-w-cpath-arrow { align-self: center; flex: none; color: var(--ss-w-faint); font-size: 13px; padding-top: 10px; }
7053
+ .ss-w-cpath-seq { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 6px 4px; background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 14px; padding: 13px 11px; }
7054
+ .ss-w-cpath-arrow { align-self: flex-start; flex: none; color: var(--ss-w-faint); font-size: 13px; padding-top: 9px; }
7053
7055
  /* Single club \u2014 small vertical card */
7054
7056
  .ss-w-cpath-club { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 56px; flex: none; }
7055
7057
  .ss-w-cpath-crest { width: 34px; height: 34px; object-fit: contain; flex: none; border-radius: 8px; }
7056
7058
  .ss-w-cpath-crest--fallback { background: var(--ss-w-bubble); border: 1px solid var(--ss-w-line); display: grid; place-items: center; font-size: 9px; font-weight: 800; letter-spacing: .02em; color: var(--ss-w-faint); }
7057
- .ss-w-cpath-club-name { font-size: 9px; font-weight: 600; color: var(--ss-w-ink); text-align: center; line-height: 1.15; max-width: 56px; display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
7059
+ .ss-w-cpath-club-name { font-size: 9px; font-weight: 600; color: var(--ss-w-ink); text-align: center; line-height: 1.15; max-width: 56px; overflow-wrap: anywhere; }
7058
7060
  .ss-w-cpath-spell-yr { font-size: 8px; color: var(--ss-w-faint); font-weight: 500; white-space: nowrap; }
7059
- .ss-w-cpath-loan-badge { font-size: 7.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 0 5px; border-radius: 999px; background: color-mix(in srgb, var(--ss-w-accent) 15%, var(--ss-w-panel)); color: var(--ss-w-accent); border: 1px solid color-mix(in srgb, var(--ss-w-accent) 30%, var(--ss-w-line)); }
7061
+ .ss-w-cpath-loan-note { display: block; color: var(--ss-w-faint); font-weight: 500; }
7060
7062
  .ss-w-cpath-club--loan .ss-w-cpath-crest { border: 1px dashed color-mix(in srgb, var(--ss-w-accent) 40%, var(--ss-w-line)); }
7061
- /* Hidden clubs chip */
7062
- .ss-w-cpath-hidden { align-self: center; flex: none; white-space: nowrap; font-size: 9px; font-weight: 700; color: var(--ss-w-faint); background: var(--ss-w-bubble); border: 1px dashed var(--ss-w-line); border-radius: 8px; padding: 6px 8px; }
7063
7063
  /* Hint line */
7064
7064
  .ss-w-cpath-hint { font-size: 11.5px; color: var(--ss-w-faint); text-align: center; padding: 6px 10px; border-radius: 10px; background: color-mix(in srgb, var(--ss-w-accent) 8%, var(--ss-w-panel)); border: 1px dashed color-mix(in srgb, var(--ss-w-accent) 30%, var(--ss-w-line)); }
7065
7065
  /* Terminal outcome */
@@ -7123,10 +7123,15 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
7123
7123
  .ss-w-gxi-title { font-size: 18px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; color: var(--ss-w-ink); line-height: 1; }
7124
7124
  .ss-w-gxi-sub { font-size: 11px; color: var(--ss-w-faint); margin-top: 4px; }
7125
7125
  .ss-w-gxi-left { margin-left: auto; flex: none; font-size: 11px; font-weight: 700; color: var(--ss-w-accent); background: color-mix(in srgb, var(--ss-w-accent) 11%, var(--ss-w-panel)); border: 1px solid color-mix(in srgb, var(--ss-w-accent) 22%, var(--ss-w-line)); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
7126
- /* Pitch: a flag per slot laid out in formation rows on a green field */
7127
- .ss-w-gxi-pitch { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; padding: 16px 10px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--ss-w-correct) 22%, var(--ss-w-line)); background: linear-gradient(180deg, color-mix(in srgb, var(--ss-w-correct) 10%, var(--ss-w-panel)), color-mix(in srgb, var(--ss-w-correct) 4%, var(--ss-w-panel))); }
7128
- .ss-w-gxi-prow { display: flex; justify-content: space-around; align-items: center; gap: 8px; }
7129
- .ss-w-gxi-flag { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 19px; line-height: 1; background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); box-shadow: 0 1px 3px rgba(0,0,0,.14); overflow: hidden; }
7126
+ /* Pitch: a flag per slot laid out in formation rows on a green field. A real min-height plus
7127
+ space-between distributes the formation lines top\u2192bottom like a pitch (GK at the back, forwards
7128
+ forward); yard-line stripes reinforce the read. Without a height the lines collapse together. */
7129
+ .ss-w-gxi-pitch { display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 300px; padding: 18px 10px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--ss-w-correct) 22%, var(--ss-w-line));
7130
+ background:
7131
+ linear-gradient(180deg, color-mix(in srgb, var(--ss-w-correct) 12%, var(--ss-w-panel)), color-mix(in srgb, var(--ss-w-correct) 4%, var(--ss-w-panel))),
7132
+ repeating-linear-gradient(180deg, transparent 0 40px, color-mix(in srgb, var(--ss-w-ink) 4%, transparent) 40px 80px); }
7133
+ .ss-w-gxi-prow { display: flex; justify-content: center; align-items: center; gap: 14px; }
7134
+ .ss-w-gxi-flag { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 20px; line-height: 1; background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); box-shadow: 0 1px 3px rgba(0,0,0,.14); overflow: hidden; }
7130
7135
  /* Wrong-guess trail */
7131
7136
  .ss-w-gxi-wrong { display: flex; flex-wrap: wrap; gap: 6px; }
7132
7137
  .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; }