@sensiblestats/widget-react 0.54.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 +23 -0
- package/dist/index.cjs +294 -216
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +294 -216
- package/dist/index.js.map +1 -1
- package/dist/styles.css +40 -13
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4189,6 +4189,24 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, refresh }) {
|
|
|
4189
4189
|
convRef.current = conversation;
|
|
4190
4190
|
const optsRef = (0, import_react28.useRef)({ gameId, gameDay, fixtureId, refresh });
|
|
4191
4191
|
optsRef.current = { gameId, gameDay, fixtureId, refresh };
|
|
4192
|
+
const resultRef = (0, import_react28.useRef)(null);
|
|
4193
|
+
resultRef.current = result;
|
|
4194
|
+
const refetch = (0, import_react28.useCallback)(async () => {
|
|
4195
|
+
const conv = convRef.current;
|
|
4196
|
+
if (!conv) return;
|
|
4197
|
+
const opts = optsRef.current;
|
|
4198
|
+
try {
|
|
4199
|
+
const payload = await conv.getGameResult(opts.gameId, opts.fixtureId, opts.gameDay);
|
|
4200
|
+
if (payload === null) return;
|
|
4201
|
+
if (payload.clientStateJson == null && resultRef.current?.clientStateJson != null) {
|
|
4202
|
+
setRawStatus(payload.status);
|
|
4203
|
+
return;
|
|
4204
|
+
}
|
|
4205
|
+
setResult(toSubmitResult(payload));
|
|
4206
|
+
setRawStatus(payload.status);
|
|
4207
|
+
} catch {
|
|
4208
|
+
}
|
|
4209
|
+
}, []);
|
|
4192
4210
|
const submit = (0, import_react28.useCallback)(async (answerJson) => {
|
|
4193
4211
|
const conv = convRef.current;
|
|
4194
4212
|
if (!conv || inFlightRef.current) return;
|
|
@@ -4198,7 +4216,14 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, refresh }) {
|
|
|
4198
4216
|
const opts = optsRef.current;
|
|
4199
4217
|
const playResult = await conv.postPlay(opts.gameId, answerJson, opts.gameDay, opts.fixtureId);
|
|
4200
4218
|
if (playResult !== null) {
|
|
4201
|
-
|
|
4219
|
+
const hasFreshState = playResult.clientStateJson != null;
|
|
4220
|
+
const isTerminal2 = playResult.alreadyPlayed === true;
|
|
4221
|
+
const holdsState = resultRef.current?.clientStateJson != null;
|
|
4222
|
+
if (!hasFreshState && !isTerminal2 && holdsState) {
|
|
4223
|
+
await refetch();
|
|
4224
|
+
} else {
|
|
4225
|
+
setResult(playResult);
|
|
4226
|
+
}
|
|
4202
4227
|
if (playResult.pointsDelta != null) {
|
|
4203
4228
|
opts.refresh?.();
|
|
4204
4229
|
}
|
|
@@ -4208,22 +4233,10 @@ function useGamePlay(conversation, { gameId, gameDay, fixtureId, refresh }) {
|
|
|
4208
4233
|
inFlightRef.current = false;
|
|
4209
4234
|
setSubmitting(false);
|
|
4210
4235
|
}
|
|
4211
|
-
}, []);
|
|
4236
|
+
}, [refetch]);
|
|
4212
4237
|
const hydrate = (0, import_react28.useCallback)(() => {
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
const opts = optsRef.current;
|
|
4216
|
-
void (async () => {
|
|
4217
|
-
try {
|
|
4218
|
-
const payload = await conv.getGameResult(opts.gameId, opts.fixtureId, opts.gameDay);
|
|
4219
|
-
if (payload !== null) {
|
|
4220
|
-
setResult(toSubmitResult(payload));
|
|
4221
|
-
setRawStatus(payload.status);
|
|
4222
|
-
}
|
|
4223
|
-
} catch {
|
|
4224
|
-
}
|
|
4225
|
-
})();
|
|
4226
|
-
}, []);
|
|
4238
|
+
void refetch();
|
|
4239
|
+
}, [refetch]);
|
|
4227
4240
|
return { result, submitting, submit, hydrate, rawStatus };
|
|
4228
4241
|
}
|
|
4229
4242
|
|
|
@@ -4325,7 +4338,7 @@ var ATTR_LABELS = {
|
|
|
4325
4338
|
position: "Pos",
|
|
4326
4339
|
nationality: "Nat",
|
|
4327
4340
|
age: "Age",
|
|
4328
|
-
shirtNumber: "
|
|
4341
|
+
shirtNumber: "Shirt",
|
|
4329
4342
|
apps: "Apps"
|
|
4330
4343
|
};
|
|
4331
4344
|
var ATTR_KEYS = [
|
|
@@ -4386,49 +4399,65 @@ function MysteryTigerGame({
|
|
|
4386
4399
|
" left"
|
|
4387
4400
|
] })
|
|
4388
4401
|
] }),
|
|
4389
|
-
|
|
4390
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.
|
|
4391
|
-
|
|
4392
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
"
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
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
|
+
] })
|
|
4430
4459
|
] }),
|
|
4431
|
-
!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: [
|
|
4432
4461
|
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
4433
4462
|
"input",
|
|
4434
4463
|
{
|
|
@@ -4460,16 +4489,6 @@ function MysteryTigerGame({
|
|
|
4460
4489
|
},
|
|
4461
4490
|
p.id
|
|
4462
4491
|
)) })
|
|
4463
|
-
] }),
|
|
4464
|
-
isOver && clientState && /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: `ss-w-gt-banner ss-w-gt-banner--${clientState.solved ? "solved" : "failed"}`, children: [
|
|
4465
|
-
/* @__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" }),
|
|
4466
|
-
clientState.revealedPlayerName && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "ss-w-gt-banner-name", children: clientState.revealedPlayerName }),
|
|
4467
|
-
/* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "ss-w-gt-banner-sub", children: [
|
|
4468
|
-
clientState.guessesUsed,
|
|
4469
|
-
" guess",
|
|
4470
|
-
clientState.guessesUsed === 1 ? "" : "es",
|
|
4471
|
-
" \xB7 come back tomorrow"
|
|
4472
|
-
] })
|
|
4473
4492
|
] })
|
|
4474
4493
|
] })
|
|
4475
4494
|
] });
|
|
@@ -4581,11 +4600,16 @@ function HigherOrLowerGame({
|
|
|
4581
4600
|
] })
|
|
4582
4601
|
] }),
|
|
4583
4602
|
isOver && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "ss-w-hl-over", children: [
|
|
4584
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "ss-w-hl-over-title", children: runEndedWrong ? "Run over" : "
|
|
4585
|
-
/* @__PURE__ */ (0, import_jsx_runtime56.
|
|
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
|
+
] }),
|
|
4586
4608
|
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "ss-w-hl-over-sub", children: [
|
|
4587
4609
|
correctCount,
|
|
4588
|
-
" correct
|
|
4610
|
+
" correct in a row",
|
|
4611
|
+
runEndedWrong ? " before a wrong pick" : "",
|
|
4612
|
+
" \xB7 come back tomorrow for a new run"
|
|
4589
4613
|
] })
|
|
4590
4614
|
] })
|
|
4591
4615
|
] })
|
|
@@ -4650,22 +4674,34 @@ function CareerPathGame({
|
|
|
4650
4674
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-cpath-head", children: [
|
|
4651
4675
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { children: [
|
|
4652
4676
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "ss-w-cpath-title", children: "Career Path" }),
|
|
4653
|
-
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "ss-w-cpath-sub", children: "
|
|
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." })
|
|
4654
4678
|
] }),
|
|
4655
4679
|
clientState && !isOver && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("span", { className: "ss-w-cpath-left", children: [
|
|
4656
4680
|
clientState.guessesRemaining,
|
|
4657
4681
|
" left"
|
|
4658
4682
|
] })
|
|
4659
4683
|
] }),
|
|
4660
|
-
/* @__PURE__ */ (0, import_jsx_runtime57.
|
|
4661
|
-
|
|
4662
|
-
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
"
|
|
4666
|
-
|
|
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
|
+
] })
|
|
4667
4703
|
] }),
|
|
4668
|
-
!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: [
|
|
4669
4705
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
4670
4706
|
"input",
|
|
4671
4707
|
{
|
|
@@ -4697,16 +4733,6 @@ function CareerPathGame({
|
|
|
4697
4733
|
},
|
|
4698
4734
|
p.id
|
|
4699
4735
|
)) })
|
|
4700
|
-
] }),
|
|
4701
|
-
isOver && clientState && /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: `ss-w-cpath-banner ss-w-cpath-banner--${clientState.solved ? "solved" : "failed"}`, children: [
|
|
4702
|
-
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "ss-w-cpath-banner-label", children: clientState.solved ? "\u2705 Career traced!" : "\u{1F614} Out of guesses" }),
|
|
4703
|
-
clientState.revealedPlayerName && /* @__PURE__ */ (0, import_jsx_runtime57.jsx)("div", { className: "ss-w-cpath-banner-name", children: clientState.revealedPlayerName }),
|
|
4704
|
-
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)("div", { className: "ss-w-cpath-banner-sub", children: [
|
|
4705
|
-
clientState.guessesUsed,
|
|
4706
|
-
" guess",
|
|
4707
|
-
clientState.guessesUsed === 1 ? "" : "es",
|
|
4708
|
-
" \xB7 come back tomorrow"
|
|
4709
|
-
] })
|
|
4710
4736
|
] })
|
|
4711
4737
|
] })
|
|
4712
4738
|
] });
|
|
@@ -4726,6 +4752,15 @@ function parseClientState4(json) {
|
|
|
4726
4752
|
function findCellResult(cells, row, col) {
|
|
4727
4753
|
return cells.find((c) => c.row === row && c.col === col);
|
|
4728
4754
|
}
|
|
4755
|
+
function shortName(name) {
|
|
4756
|
+
if (!name) return "";
|
|
4757
|
+
const parts = name.trim().split(/\s+/).filter(Boolean);
|
|
4758
|
+
if (parts.length === 0) return "";
|
|
4759
|
+
const first = parts[0];
|
|
4760
|
+
if (parts.length === 1) return first;
|
|
4761
|
+
const last = parts[parts.length - 1];
|
|
4762
|
+
return `${first.charAt(0)}. ${last}`;
|
|
4763
|
+
}
|
|
4729
4764
|
function SearchSheet({
|
|
4730
4765
|
row,
|
|
4731
4766
|
col,
|
|
@@ -4843,56 +4878,61 @@ function BeatTheGridGame({
|
|
|
4843
4878
|
] })
|
|
4844
4879
|
] })
|
|
4845
4880
|
] }),
|
|
4846
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
/* @__PURE__ */ (0, import_jsx_runtime58.
|
|
4875
|
-
|
|
4876
|
-
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
"
|
|
4891
|
-
|
|
4892
|
-
"
|
|
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
|
+
] })
|
|
4893
4933
|
] })
|
|
4894
4934
|
] }),
|
|
4895
|
-
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)(
|
|
4896
4936
|
SearchSheet,
|
|
4897
4937
|
{
|
|
4898
4938
|
row: activeCell.row,
|
|
@@ -4904,7 +4944,7 @@ function BeatTheGridGame({
|
|
|
4904
4944
|
onPick: handlePick,
|
|
4905
4945
|
onDismiss: () => setActiveCell(null)
|
|
4906
4946
|
}
|
|
4907
|
-
)
|
|
4947
|
+
) })
|
|
4908
4948
|
] });
|
|
4909
4949
|
}
|
|
4910
4950
|
|
|
@@ -4928,13 +4968,7 @@ function toRows(positions) {
|
|
|
4928
4968
|
bucket.push(p);
|
|
4929
4969
|
byRow.set(rowKey, bucket);
|
|
4930
4970
|
});
|
|
4931
|
-
return [...byRow.keys()].sort((a, b) =>
|
|
4932
|
-
}
|
|
4933
|
-
function RevealCard({ reveal }) {
|
|
4934
|
-
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "ss-w-gxi-reveal", "data-reveal-type": reveal.type ?? "", children: [
|
|
4935
|
-
reveal.slot && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "ss-w-gxi-reveal-slot", children: reveal.slot }),
|
|
4936
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "ss-w-gxi-reveal-val", children: reveal.value })
|
|
4937
|
-
] });
|
|
4971
|
+
return [...byRow.keys()].sort((a, b) => b - a).map((k) => byRow.get(k));
|
|
4938
4972
|
}
|
|
4939
4973
|
function GuessTheXiGame({
|
|
4940
4974
|
config,
|
|
@@ -4949,6 +4983,10 @@ function GuessTheXiGame({
|
|
|
4949
4983
|
const solved = clientState?.status === "solved";
|
|
4950
4984
|
const guessedTeamIds = new Set(clientState?.guessHistory.map((g) => g.teamId) ?? []);
|
|
4951
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
|
+
});
|
|
4952
4990
|
const filtered = config && !isOver ? config.teamPool.filter(
|
|
4953
4991
|
(t) => !guessedTeamIds.has(t.teamId) && t.teamName.toLowerCase().includes(query.toLowerCase())
|
|
4954
4992
|
) : [];
|
|
@@ -4960,6 +4998,7 @@ function GuessTheXiGame({
|
|
|
4960
4998
|
onSubmit(JSON.stringify({ guesses: newGuesses }));
|
|
4961
4999
|
}
|
|
4962
5000
|
const wrongGuesses = (clientState?.guessHistory ?? []).filter((g) => !g.wasCorrect);
|
|
5001
|
+
const revealCount = clientState?.earnedReveals.length ?? 0;
|
|
4963
5002
|
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "ss-w-gxi", "data-testid": "game-screen-guess-the-xi", children: [
|
|
4964
5003
|
!config && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }),
|
|
4965
5004
|
config && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_jsx_runtime59.Fragment, { children: [
|
|
@@ -4967,7 +5006,7 @@ function GuessTheXiGame({
|
|
|
4967
5006
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { children: [
|
|
4968
5007
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "ss-w-gxi-title", children: "Guess the XI" }),
|
|
4969
5008
|
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "ss-w-gxi-sub", children: [
|
|
4970
|
-
"
|
|
5009
|
+
"Name the team \xB7 flags are each player's nationality \xB7 ",
|
|
4971
5010
|
config.poolLabel
|
|
4972
5011
|
] })
|
|
4973
5012
|
] }),
|
|
@@ -4976,64 +5015,76 @@ function GuessTheXiGame({
|
|
|
4976
5015
|
" left"
|
|
4977
5016
|
] })
|
|
4978
5017
|
] }),
|
|
4979
|
-
|
|
4980
|
-
"div",
|
|
4981
|
-
|
|
4982
|
-
className: "ss-w-gxi-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
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) => {
|
|
4992
5042
|
const team = config.teamPool.find((t) => t.teamId === g.teamId);
|
|
4993
5043
|
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "ss-w-gxi-wrong-pill", children: team?.teamName ?? `#${g.teamId}` }, g.teamId);
|
|
4994
5044
|
}) }),
|
|
4995
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className:
|
|
4996
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
value: query,
|
|
5005
|
-
disabled: submitting || isOver,
|
|
5006
|
-
onChange: (e) => setQuery(e.target.value),
|
|
5007
|
-
autoComplete: "off",
|
|
5008
|
-
"aria-label": "Name the team",
|
|
5009
|
-
"aria-autocomplete": "list"
|
|
5010
|
-
}
|
|
5011
|
-
),
|
|
5012
|
-
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)(
|
|
5013
|
-
"div",
|
|
5014
|
-
{
|
|
5015
|
-
className: "ss-w-gtta-opt",
|
|
5016
|
-
role: "option",
|
|
5017
|
-
"aria-selected": false,
|
|
5018
|
-
onClick: () => handlePick(t.teamId),
|
|
5019
|
-
onKeyDown: (e) => {
|
|
5020
|
-
if (e.key === "Enter") handlePick(t.teamId);
|
|
5021
|
-
},
|
|
5022
|
-
tabIndex: 0,
|
|
5023
|
-
children: t.teamName
|
|
5024
|
-
},
|
|
5025
|
-
t.teamId
|
|
5026
|
-
)) })
|
|
5027
|
-
] })
|
|
5028
|
-
] }) : clientState && /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: `ss-w-gxi-banner ss-w-gxi-banner--${solved ? "solved" : "failed"}`, children: [
|
|
5029
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "ss-w-gxi-banner-label", children: solved ? "\u2705 Solved!" : "\u{1F614} Out of guesses" }),
|
|
5030
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("div", { className: "ss-w-gxi-banner-score", children: clientState.score }),
|
|
5031
|
-
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("div", { className: "ss-w-gxi-banner-sub", children: [
|
|
5032
|
-
clientState.guessesUsed,
|
|
5033
|
-
" guess",
|
|
5034
|
-
clientState.guessesUsed === 1 ? "" : "es",
|
|
5035
|
-
" \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
|
+
] })
|
|
5036
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
|
+
)) })
|
|
5037
5088
|
] })
|
|
5038
5089
|
] })
|
|
5039
5090
|
] });
|
|
@@ -5730,7 +5781,7 @@ function GamesPanel({
|
|
|
5730
5781
|
const [selected, setSelected] = (0, import_react37.useState)(null);
|
|
5731
5782
|
if (!loggedIn) return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(GamesLoginWall, { ui });
|
|
5732
5783
|
if (selected !== null) {
|
|
5733
|
-
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "ss-w-
|
|
5784
|
+
return /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("div", { className: "ss-w-gscreen-wrap", children: /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
|
|
5734
5785
|
GameScreenHost,
|
|
5735
5786
|
{
|
|
5736
5787
|
selected,
|
|
@@ -6915,7 +6966,24 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
6915
6966
|
.ss-w-tile-chip--fun { color: var(--ss-w-faint); background: var(--ss-w-bubble); border: 1px solid var(--ss-w-line); }
|
|
6916
6967
|
|
|
6917
6968
|
/* Game screen host: back-row + placeholder body */
|
|
6918
|
-
|
|
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); }
|
|
6919
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; }
|
|
6920
6988
|
.ss-w-gscreen-back-arrow { font-size: 11px; font-weight: 700; }
|
|
6921
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; }
|
|
@@ -6969,7 +7037,9 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
6969
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; }
|
|
6970
7038
|
.ss-w-gtta-i:focus { border-color: var(--ss-w-accent); }
|
|
6971
7039
|
.ss-w-gtta-i:disabled { opacity: .5; cursor: not-allowed; }
|
|
6972
|
-
|
|
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); }
|
|
6973
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); }
|
|
6974
7044
|
.ss-w-gtta-opt:last-child { border-bottom: none; }
|
|
6975
7045
|
.ss-w-gtta-opt:hover { background: var(--ss-w-bubble); }
|
|
@@ -6981,10 +7051,7 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
6981
7051
|
/* Guess rows \u2014 one labelled block per guess */
|
|
6982
7052
|
.ss-w-gtrows { display: flex; flex-direction: column; gap: 8px; }
|
|
6983
7053
|
/* First-load legend (empty state) */
|
|
6984
|
-
.ss-w-gt-
|
|
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; }
|
|
7054
|
+
.ss-w-gt-lead { font-size: 11.5px; color: var(--ss-w-faint); line-height: 1.4; }
|
|
6988
7055
|
.ss-w-gtguess { display: flex; flex-direction: column; gap: 4px; }
|
|
6989
7056
|
.ss-w-gtguess-nm { font-size: 11px; font-weight: 600; color: var(--ss-w-faint); }
|
|
6990
7057
|
.ss-w-gtrow { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; }
|
|
@@ -7103,8 +7170,10 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
7103
7170
|
.ss-w-btg-cell--correct { background: color-mix(in srgb, var(--ss-w-correct) 14%, var(--ss-w-panel)); border-color: color-mix(in srgb, var(--ss-w-correct) 35%, var(--ss-w-line)); }
|
|
7104
7171
|
.ss-w-btg-cell--wrong { background: color-mix(in srgb, var(--ss-w-wrong) 10%, var(--ss-w-panel)); }
|
|
7105
7172
|
.ss-w-btg-cell--active { border-color: var(--ss-w-accent); }
|
|
7106
|
-
.ss-w-btg-cell-
|
|
7107
|
-
.ss-w-btg-cell-
|
|
7173
|
+
.ss-w-btg-cell-nm { font-size: 8.5px; font-weight: 600; line-height: 1.05; color: var(--ss-w-ink); text-align: center; max-width: 100%; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
|
|
7174
|
+
.ss-w-btg-cell-score { font-size: 12px; font-weight: 800; color: var(--ss-w-accent); font-variant-numeric: tabular-nums; }
|
|
7175
|
+
.ss-w-btg-cell--correct .ss-w-btg-cell-score { color: var(--ss-w-correct); }
|
|
7176
|
+
.ss-w-btg-cell-check { color: var(--ss-w-correct); line-height: 1; }
|
|
7108
7177
|
.ss-w-btg-cell-empty { font-size: 16px; color: var(--ss-w-faint); }
|
|
7109
7178
|
/* Scoped search sheet: slides up over the grid */
|
|
7110
7179
|
.ss-w-btg-sheet { display: flex; flex-direction: column; gap: 10px; padding: 12px; background: var(--ss-w-panel); border: 1.5px solid var(--ss-w-line); border-radius: 14px; box-shadow: 0 4px 20px rgba(0,0,0,.1); }
|
|
@@ -7126,12 +7195,21 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
7126
7195
|
/* Pitch: a flag per slot laid out in formation rows on a green field. A real min-height plus
|
|
7127
7196
|
space-between distributes the formation lines top\u2192bottom like a pitch (GK at the back, forwards
|
|
7128
7197
|
forward); yard-line stripes reinforce the read. Without a height the lines collapse together. */
|
|
7129
|
-
|
|
7198
|
+
/* A football pitch is grass-green regardless of the operator accent, so the field uses fixed
|
|
7199
|
+
green values (not --ss-w-correct, which is a muted per-operator token that vanished on dark
|
|
7200
|
+
themes) plus visible horizontal yard-lines and a brighter halfway line. */
|
|
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);
|
|
7130
7202
|
background:
|
|
7131
|
-
linear-gradient(180deg,
|
|
7132
|
-
repeating-linear-gradient(180deg, transparent 0
|
|
7133
|
-
|
|
7134
|
-
.ss-w-gxi-
|
|
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%),
|
|
7204
|
+
repeating-linear-gradient(180deg, transparent 0 31px, rgba(255,255,255,.045) 31px 32px),
|
|
7205
|
+
linear-gradient(180deg, rgba(46, 160, 86, .28), rgba(38, 132, 71, .16)); }
|
|
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; }
|
|
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); }
|
|
7135
7213
|
/* Wrong-guess trail */
|
|
7136
7214
|
.ss-w-gxi-wrong { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
7137
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; }
|