@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 +12 -0
- package/dist/index.cjs +243 -187
- 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 +243 -187
- package/dist/index.js.map +1 -1
- package/dist/styles.css +28 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4362,43 +4362,65 @@ function MysteryTigerGame({
|
|
|
4362
4362
|
" left"
|
|
4363
4363
|
] })
|
|
4364
4364
|
] }),
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
" \
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4365
|
+
/* @__PURE__ */ jsxs49("div", { className: "ss-w-gscroll", children: [
|
|
4366
|
+
!isOver && /* @__PURE__ */ jsxs49("div", { className: "ss-w-gt-lead", children: [
|
|
4367
|
+
guessResults.length === 0 ? "Guess a squad player \u2014 each guess compares it to the mystery player on Pos, Nat, Age, Shirt & Apps: " : "Tiles: ",
|
|
4368
|
+
/* @__PURE__ */ jsxs49("span", { className: "ss-w-gt-key", children: [
|
|
4369
|
+
/* @__PURE__ */ jsx55("b", { className: "ss-w-gt-key-ok", children: "\u2713" }),
|
|
4370
|
+
" match \xB7 ",
|
|
4371
|
+
/* @__PURE__ */ jsx55("b", { children: "\u25B2" }),
|
|
4372
|
+
" higher \xB7 ",
|
|
4373
|
+
/* @__PURE__ */ jsx55("b", { children: "\u25BC" }),
|
|
4374
|
+
" lower"
|
|
4375
|
+
] })
|
|
4376
|
+
] }),
|
|
4377
|
+
guessResults.length > 0 && /* @__PURE__ */ jsx55("div", { className: "ss-w-gtrows", children: guessResults.map((gr, i) => {
|
|
4378
|
+
const player = config.squadPlayers.find((p) => p.id === gr.playerId);
|
|
4379
|
+
return /* @__PURE__ */ jsxs49("div", { className: "ss-w-gtguess", children: [
|
|
4380
|
+
/* @__PURE__ */ jsxs49("div", { className: "ss-w-gtguess-nm", children: [
|
|
4381
|
+
i + 1,
|
|
4382
|
+
" \xB7 ",
|
|
4383
|
+
player?.name ?? `#${gr.playerId}`
|
|
4384
|
+
] }),
|
|
4385
|
+
/* @__PURE__ */ jsx55("div", { className: "ss-w-gtrow", children: ATTR_KEYS.map((key) => {
|
|
4386
|
+
const v = gr[key];
|
|
4387
|
+
const arrow = directionArrow(v);
|
|
4388
|
+
return /* @__PURE__ */ jsxs49(
|
|
4389
|
+
"div",
|
|
4390
|
+
{
|
|
4391
|
+
className: `ss-w-gtile ss-w-gtile--${v.verdict}`,
|
|
4392
|
+
"data-testid": `verdict-${key}-${i}`,
|
|
4393
|
+
"data-verdict": v.verdict,
|
|
4394
|
+
"aria-label": `${ATTR_LABELS[key]}: ${v.value ?? v.verdict}${v.direction ? ` ${v.direction}` : ""}`,
|
|
4395
|
+
children: [
|
|
4396
|
+
/* @__PURE__ */ jsx55("span", { className: "ss-w-gtile-lab", children: ATTR_LABELS[key] }),
|
|
4397
|
+
/* @__PURE__ */ jsxs49("span", { className: "ss-w-gtile-v", "aria-hidden": "true", children: [
|
|
4398
|
+
tileFace(key, v),
|
|
4399
|
+
arrow && /* @__PURE__ */ jsx55("span", { className: "ss-w-gtile-dir", children: arrow })
|
|
4400
|
+
] })
|
|
4401
|
+
]
|
|
4402
|
+
},
|
|
4403
|
+
key
|
|
4404
|
+
);
|
|
4405
|
+
}) })
|
|
4406
|
+
] }, gr.playerId);
|
|
4407
|
+
}) }),
|
|
4408
|
+
clientState?.hintLine && !isOver && /* @__PURE__ */ jsxs49("div", { className: "ss-w-gt-hint", children: [
|
|
4409
|
+
"\u{1F4A1} ",
|
|
4410
|
+
clientState.hintLine
|
|
4411
|
+
] }),
|
|
4412
|
+
isOver && clientState && /* @__PURE__ */ jsxs49("div", { className: `ss-w-gt-banner ss-w-gt-banner--${clientState.solved ? "solved" : "failed"}`, children: [
|
|
4413
|
+
/* @__PURE__ */ jsx55("div", { className: "ss-w-gt-banner-label", children: clientState.solved ? "\u{1F42F} You found them!" : "\u{1F614} Out of guesses" }),
|
|
4414
|
+
clientState.revealedPlayerName && /* @__PURE__ */ jsx55("div", { className: "ss-w-gt-banner-name", children: clientState.revealedPlayerName }),
|
|
4415
|
+
/* @__PURE__ */ jsxs49("div", { className: "ss-w-gt-banner-sub", children: [
|
|
4416
|
+
clientState.guessesUsed,
|
|
4417
|
+
" guess",
|
|
4418
|
+
clientState.guessesUsed === 1 ? "" : "es",
|
|
4419
|
+
" \xB7 come back tomorrow"
|
|
4420
|
+
] })
|
|
4421
|
+
] })
|
|
4400
4422
|
] }),
|
|
4401
|
-
!isOver && /* @__PURE__ */ jsxs49("div", { className: "ss-w-gtta", children: [
|
|
4423
|
+
!isOver && /* @__PURE__ */ jsxs49("div", { className: "ss-w-gpin ss-w-gtta", children: [
|
|
4402
4424
|
/* @__PURE__ */ jsx55(
|
|
4403
4425
|
"input",
|
|
4404
4426
|
{
|
|
@@ -4430,16 +4452,6 @@ function MysteryTigerGame({
|
|
|
4430
4452
|
},
|
|
4431
4453
|
p.id
|
|
4432
4454
|
)) })
|
|
4433
|
-
] }),
|
|
4434
|
-
isOver && clientState && /* @__PURE__ */ jsxs49("div", { className: `ss-w-gt-banner ss-w-gt-banner--${clientState.solved ? "solved" : "failed"}`, children: [
|
|
4435
|
-
/* @__PURE__ */ jsx55("div", { className: "ss-w-gt-banner-label", children: clientState.solved ? "\u{1F42F} You found them!" : "\u{1F614} Out of guesses" }),
|
|
4436
|
-
clientState.revealedPlayerName && /* @__PURE__ */ jsx55("div", { className: "ss-w-gt-banner-name", children: clientState.revealedPlayerName }),
|
|
4437
|
-
/* @__PURE__ */ jsxs49("div", { className: "ss-w-gt-banner-sub", children: [
|
|
4438
|
-
clientState.guessesUsed,
|
|
4439
|
-
" guess",
|
|
4440
|
-
clientState.guessesUsed === 1 ? "" : "es",
|
|
4441
|
-
" \xB7 come back tomorrow"
|
|
4442
|
-
] })
|
|
4443
4455
|
] })
|
|
4444
4456
|
] })
|
|
4445
4457
|
] });
|
|
@@ -4551,11 +4563,16 @@ function HigherOrLowerGame({
|
|
|
4551
4563
|
] })
|
|
4552
4564
|
] }),
|
|
4553
4565
|
isOver && /* @__PURE__ */ jsxs50("div", { className: "ss-w-hl-over", children: [
|
|
4554
|
-
/* @__PURE__ */ jsx56("div", { className: "ss-w-hl-over-title", children: runEndedWrong ? "Run over" : "
|
|
4555
|
-
/* @__PURE__ */
|
|
4566
|
+
/* @__PURE__ */ jsx56("div", { className: "ss-w-hl-over-title", children: runEndedWrong ? "\u{1F6AB} Run over" : "\u{1F389} Perfect run!" }),
|
|
4567
|
+
/* @__PURE__ */ jsxs50("div", { className: "ss-w-hl-over-score", children: [
|
|
4568
|
+
score,
|
|
4569
|
+
/* @__PURE__ */ jsx56("span", { className: "ss-w-hl-over-unit", children: " pts" })
|
|
4570
|
+
] }),
|
|
4556
4571
|
/* @__PURE__ */ jsxs50("div", { className: "ss-w-hl-over-sub", children: [
|
|
4557
4572
|
correctCount,
|
|
4558
|
-
" correct
|
|
4573
|
+
" correct in a row",
|
|
4574
|
+
runEndedWrong ? " before a wrong pick" : "",
|
|
4575
|
+
" \xB7 come back tomorrow for a new run"
|
|
4559
4576
|
] })
|
|
4560
4577
|
] })
|
|
4561
4578
|
] })
|
|
@@ -4620,22 +4637,34 @@ function CareerPathGame({
|
|
|
4620
4637
|
/* @__PURE__ */ jsxs51("div", { className: "ss-w-cpath-head", children: [
|
|
4621
4638
|
/* @__PURE__ */ jsxs51("div", { children: [
|
|
4622
4639
|
/* @__PURE__ */ jsx57("div", { className: "ss-w-cpath-title", children: "Career Path" }),
|
|
4623
|
-
/* @__PURE__ */ jsx57("div", { className: "ss-w-cpath-sub", children: "
|
|
4640
|
+
/* @__PURE__ */ jsx57("div", { className: "ss-w-cpath-sub", children: "Guess the mystery player from the clubs they've played for, oldest first." })
|
|
4624
4641
|
] }),
|
|
4625
4642
|
clientState && !isOver && /* @__PURE__ */ jsxs51("span", { className: "ss-w-cpath-left", children: [
|
|
4626
4643
|
clientState.guessesRemaining,
|
|
4627
4644
|
" left"
|
|
4628
4645
|
] })
|
|
4629
4646
|
] }),
|
|
4630
|
-
/* @__PURE__ */
|
|
4631
|
-
|
|
4632
|
-
|
|
4633
|
-
|
|
4634
|
-
|
|
4635
|
-
"
|
|
4636
|
-
|
|
4647
|
+
/* @__PURE__ */ jsxs51("div", { className: "ss-w-gscroll", children: [
|
|
4648
|
+
/* @__PURE__ */ jsx57("div", { className: "ss-w-cpath-seq", children: visiblePath.map((spell, i) => /* @__PURE__ */ jsxs51(Fragment11, { children: [
|
|
4649
|
+
i > 0 && /* @__PURE__ */ jsx57("span", { className: "ss-w-cpath-arrow", "aria-hidden": "true", children: "\u203A" }),
|
|
4650
|
+
/* @__PURE__ */ jsx57(ClubSpellCard, { spell })
|
|
4651
|
+
] }, `${spell.clubName}-${i}`)) }),
|
|
4652
|
+
clientState?.hintLine && !isOver && /* @__PURE__ */ jsxs51("div", { className: "ss-w-cpath-hint", children: [
|
|
4653
|
+
"\u{1F4A1} ",
|
|
4654
|
+
clientState.hintLine
|
|
4655
|
+
] }),
|
|
4656
|
+
isOver && clientState && /* @__PURE__ */ jsxs51("div", { className: `ss-w-cpath-banner ss-w-cpath-banner--${clientState.solved ? "solved" : "failed"}`, children: [
|
|
4657
|
+
/* @__PURE__ */ jsx57("div", { className: "ss-w-cpath-banner-label", children: clientState.solved ? "\u2705 Career traced!" : "\u{1F614} Out of guesses" }),
|
|
4658
|
+
clientState.revealedPlayerName && /* @__PURE__ */ jsx57("div", { className: "ss-w-cpath-banner-name", children: clientState.revealedPlayerName }),
|
|
4659
|
+
/* @__PURE__ */ jsxs51("div", { className: "ss-w-cpath-banner-sub", children: [
|
|
4660
|
+
clientState.guessesUsed,
|
|
4661
|
+
" guess",
|
|
4662
|
+
clientState.guessesUsed === 1 ? "" : "es",
|
|
4663
|
+
" \xB7 come back tomorrow"
|
|
4664
|
+
] })
|
|
4665
|
+
] })
|
|
4637
4666
|
] }),
|
|
4638
|
-
!isOver && /* @__PURE__ */ jsxs51("div", { className: "ss-w-gtta", children: [
|
|
4667
|
+
!isOver && /* @__PURE__ */ jsxs51("div", { className: "ss-w-gpin ss-w-gtta", children: [
|
|
4639
4668
|
/* @__PURE__ */ jsx57(
|
|
4640
4669
|
"input",
|
|
4641
4670
|
{
|
|
@@ -4667,16 +4696,6 @@ function CareerPathGame({
|
|
|
4667
4696
|
},
|
|
4668
4697
|
p.id
|
|
4669
4698
|
)) })
|
|
4670
|
-
] }),
|
|
4671
|
-
isOver && clientState && /* @__PURE__ */ jsxs51("div", { className: `ss-w-cpath-banner ss-w-cpath-banner--${clientState.solved ? "solved" : "failed"}`, children: [
|
|
4672
|
-
/* @__PURE__ */ jsx57("div", { className: "ss-w-cpath-banner-label", children: clientState.solved ? "\u2705 Career traced!" : "\u{1F614} Out of guesses" }),
|
|
4673
|
-
clientState.revealedPlayerName && /* @__PURE__ */ jsx57("div", { className: "ss-w-cpath-banner-name", children: clientState.revealedPlayerName }),
|
|
4674
|
-
/* @__PURE__ */ jsxs51("div", { className: "ss-w-cpath-banner-sub", children: [
|
|
4675
|
-
clientState.guessesUsed,
|
|
4676
|
-
" guess",
|
|
4677
|
-
clientState.guessesUsed === 1 ? "" : "es",
|
|
4678
|
-
" \xB7 come back tomorrow"
|
|
4679
|
-
] })
|
|
4680
4699
|
] })
|
|
4681
4700
|
] })
|
|
4682
4701
|
] });
|
|
@@ -4822,59 +4841,61 @@ function BeatTheGridGame({
|
|
|
4822
4841
|
] })
|
|
4823
4842
|
] })
|
|
4824
4843
|
] }),
|
|
4825
|
-
/* @__PURE__ */ jsxs52(
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
/* @__PURE__ */
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
/* @__PURE__ */
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
/* @__PURE__ */
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4844
|
+
/* @__PURE__ */ jsxs52("div", { className: "ss-w-gscroll", children: [
|
|
4845
|
+
/* @__PURE__ */ jsxs52(
|
|
4846
|
+
"div",
|
|
4847
|
+
{
|
|
4848
|
+
className: "ss-w-btg-grid",
|
|
4849
|
+
style: { gridTemplateColumns: `auto repeat(${cols.length}, 1fr)` },
|
|
4850
|
+
role: "grid",
|
|
4851
|
+
children: [
|
|
4852
|
+
/* @__PURE__ */ jsx58("div", { className: "ss-w-btg-gc ss-w-btg-gc--corner" }),
|
|
4853
|
+
cols.map((col) => /* @__PURE__ */ jsx58("div", { className: "ss-w-btg-gc ss-w-btg-gc--colhdr", children: col }, col)),
|
|
4854
|
+
rows.map((rowLabel, rowIdx) => /* @__PURE__ */ jsxs52(React.Fragment, { children: [
|
|
4855
|
+
/* @__PURE__ */ jsx58("div", { className: "ss-w-btg-gc ss-w-btg-gc--rowhdr", children: rowLabel }),
|
|
4856
|
+
cols.map((colLabel, colIdx) => {
|
|
4857
|
+
const filled = findCellResult(filledCells, rowIdx, colIdx);
|
|
4858
|
+
const isActive = activeCell?.row === rowIdx && activeCell?.col === colIdx;
|
|
4859
|
+
return /* @__PURE__ */ jsx58(
|
|
4860
|
+
"button",
|
|
4861
|
+
{
|
|
4862
|
+
type: "button",
|
|
4863
|
+
"data-testid": `btg-cell-${rowIdx}-${colIdx}`,
|
|
4864
|
+
"aria-label": `${rowLabel} ${colLabel}`,
|
|
4865
|
+
className: [
|
|
4866
|
+
"ss-w-btg-gc ss-w-btg-cell",
|
|
4867
|
+
filled ? filled.isCorrect ? "ss-w-btg-cell--correct" : "ss-w-btg-cell--wrong" : "",
|
|
4868
|
+
isActive ? "ss-w-btg-cell--active" : ""
|
|
4869
|
+
].filter(Boolean).join(" "),
|
|
4870
|
+
disabled: isLocked2 || submitting,
|
|
4871
|
+
onClick: () => handleCellClick(rowIdx, colIdx),
|
|
4872
|
+
children: filled ? /* @__PURE__ */ jsxs52(Fragment13, { children: [
|
|
4873
|
+
/* @__PURE__ */ jsx58("span", { className: "ss-w-btg-cell-nm", children: shortName(playerPool.find((p) => p.id === filled.playerId)?.name) }),
|
|
4874
|
+
/* @__PURE__ */ jsxs52("span", { className: "ss-w-btg-cell-score", children: [
|
|
4875
|
+
filled.rarityScore,
|
|
4876
|
+
filled.isCorrect && /* @__PURE__ */ jsx58("span", { className: "ss-w-btg-cell-check", "aria-hidden": "true", children: " \u2713" })
|
|
4877
|
+
] })
|
|
4878
|
+
] }) : /* @__PURE__ */ jsx58("span", { className: "ss-w-btg-cell-empty", "aria-hidden": "true", children: "+" })
|
|
4879
|
+
},
|
|
4880
|
+
`cell-${rowIdx}-${colIdx}`
|
|
4881
|
+
);
|
|
4882
|
+
})
|
|
4883
|
+
] }, rowIdx))
|
|
4884
|
+
]
|
|
4885
|
+
}
|
|
4886
|
+
),
|
|
4887
|
+
isLocked2 && /* @__PURE__ */ jsxs52("div", { className: "ss-w-btg-done", children: [
|
|
4888
|
+
/* @__PURE__ */ jsx58("div", { className: "ss-w-btg-done-label", children: "\u{1F532} Grid complete" }),
|
|
4889
|
+
/* @__PURE__ */ jsx58("div", { className: "ss-w-btg-done-score", children: clientState?.totalScore ?? 0 }),
|
|
4890
|
+
/* @__PURE__ */ jsxs52("div", { className: "ss-w-btg-done-sub", children: [
|
|
4891
|
+
filledCells.filter((c) => c.isCorrect).length,
|
|
4892
|
+
"/",
|
|
4893
|
+
filledCells.length,
|
|
4894
|
+
" correct \xB7 come back tomorrow"
|
|
4895
|
+
] })
|
|
4875
4896
|
] })
|
|
4876
4897
|
] }),
|
|
4877
|
-
activeCell !== null && /* @__PURE__ */ jsx58(
|
|
4898
|
+
activeCell !== null && /* @__PURE__ */ jsx58("div", { className: "ss-w-gpin", children: /* @__PURE__ */ jsx58(
|
|
4878
4899
|
SearchSheet,
|
|
4879
4900
|
{
|
|
4880
4901
|
row: activeCell.row,
|
|
@@ -4886,7 +4907,7 @@ function BeatTheGridGame({
|
|
|
4886
4907
|
onPick: handlePick,
|
|
4887
4908
|
onDismiss: () => setActiveCell(null)
|
|
4888
4909
|
}
|
|
4889
|
-
)
|
|
4910
|
+
) })
|
|
4890
4911
|
] });
|
|
4891
4912
|
}
|
|
4892
4913
|
|
|
@@ -4910,13 +4931,7 @@ function toRows(positions) {
|
|
|
4910
4931
|
bucket.push(p);
|
|
4911
4932
|
byRow.set(rowKey, bucket);
|
|
4912
4933
|
});
|
|
4913
|
-
return [...byRow.keys()].sort((a, b) =>
|
|
4914
|
-
}
|
|
4915
|
-
function RevealCard({ reveal }) {
|
|
4916
|
-
return /* @__PURE__ */ jsxs53("div", { className: "ss-w-gxi-reveal", "data-reveal-type": reveal.type ?? "", children: [
|
|
4917
|
-
reveal.slot && /* @__PURE__ */ jsx59("span", { className: "ss-w-gxi-reveal-slot", children: reveal.slot }),
|
|
4918
|
-
/* @__PURE__ */ jsx59("span", { className: "ss-w-gxi-reveal-val", children: reveal.value })
|
|
4919
|
-
] });
|
|
4934
|
+
return [...byRow.keys()].sort((a, b) => b - a).map((k) => byRow.get(k));
|
|
4920
4935
|
}
|
|
4921
4936
|
function GuessTheXiGame({
|
|
4922
4937
|
config,
|
|
@@ -4931,6 +4946,10 @@ function GuessTheXiGame({
|
|
|
4931
4946
|
const solved = clientState?.status === "solved";
|
|
4932
4947
|
const guessedTeamIds = new Set(clientState?.guessHistory.map((g) => g.teamId) ?? []);
|
|
4933
4948
|
const rows = config ? toRows(config.positions) : [];
|
|
4949
|
+
const revealBySlot = /* @__PURE__ */ new Map();
|
|
4950
|
+
(clientState?.earnedReveals ?? []).forEach((r) => {
|
|
4951
|
+
if (r.slot) revealBySlot.set(r.slot, r);
|
|
4952
|
+
});
|
|
4934
4953
|
const filtered = config && !isOver ? config.teamPool.filter(
|
|
4935
4954
|
(t) => !guessedTeamIds.has(t.teamId) && t.teamName.toLowerCase().includes(query.toLowerCase())
|
|
4936
4955
|
) : [];
|
|
@@ -4942,6 +4961,7 @@ function GuessTheXiGame({
|
|
|
4942
4961
|
onSubmit(JSON.stringify({ guesses: newGuesses }));
|
|
4943
4962
|
}
|
|
4944
4963
|
const wrongGuesses = (clientState?.guessHistory ?? []).filter((g) => !g.wasCorrect);
|
|
4964
|
+
const revealCount = clientState?.earnedReveals.length ?? 0;
|
|
4945
4965
|
return /* @__PURE__ */ jsxs53("div", { className: "ss-w-gxi", "data-testid": "game-screen-guess-the-xi", children: [
|
|
4946
4966
|
!config && /* @__PURE__ */ jsx59("div", { className: "ss-w-gscreen-body", children: "Loading\u2026" }),
|
|
4947
4967
|
config && /* @__PURE__ */ jsxs53(Fragment14, { children: [
|
|
@@ -4949,7 +4969,7 @@ function GuessTheXiGame({
|
|
|
4949
4969
|
/* @__PURE__ */ jsxs53("div", { children: [
|
|
4950
4970
|
/* @__PURE__ */ jsx59("div", { className: "ss-w-gxi-title", children: "Guess the XI" }),
|
|
4951
4971
|
/* @__PURE__ */ jsxs53("div", { className: "ss-w-gxi-sub", children: [
|
|
4952
|
-
"
|
|
4972
|
+
"Name the team \xB7 flags are each player's nationality \xB7 ",
|
|
4953
4973
|
config.poolLabel
|
|
4954
4974
|
] })
|
|
4955
4975
|
] }),
|
|
@@ -4958,64 +4978,76 @@ function GuessTheXiGame({
|
|
|
4958
4978
|
" left"
|
|
4959
4979
|
] })
|
|
4960
4980
|
] }),
|
|
4961
|
-
|
|
4962
|
-
"div",
|
|
4963
|
-
|
|
4964
|
-
className: "ss-w-gxi-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4981
|
+
/* @__PURE__ */ jsxs53("div", { className: "ss-w-gscroll", children: [
|
|
4982
|
+
rows.length > 0 && /* @__PURE__ */ jsx59("div", { className: "ss-w-gxi-pitch", children: rows.map((row, r) => /* @__PURE__ */ jsx59("div", { className: "ss-w-gxi-prow", children: row.map((pos, c) => {
|
|
4983
|
+
const rev = pos.slot ? revealBySlot.get(pos.slot) : void 0;
|
|
4984
|
+
return /* @__PURE__ */ jsxs53("div", { className: "ss-w-gxi-slot", children: [
|
|
4985
|
+
/* @__PURE__ */ jsx59(
|
|
4986
|
+
"div",
|
|
4987
|
+
{
|
|
4988
|
+
className: `ss-w-gxi-flag${rev ? " ss-w-gxi-flag--revealed" : ""}`,
|
|
4989
|
+
title: pos.nationality,
|
|
4990
|
+
"aria-label": rev ? `${pos.nationality} \u2014 revealed: ${rev.value}` : pos.nationality,
|
|
4991
|
+
children: nationalityFlag(pos.nationality)
|
|
4992
|
+
}
|
|
4993
|
+
),
|
|
4994
|
+
rev && /* @__PURE__ */ jsx59("span", { className: "ss-w-gxi-flag-lab", children: rev.value })
|
|
4995
|
+
] }, `${pos.slot}-${c}`);
|
|
4996
|
+
}) }, r)) }),
|
|
4997
|
+
revealCount > 0 && !isOver && /* @__PURE__ */ jsxs53("div", { className: "ss-w-gxi-revnote", children: [
|
|
4998
|
+
"\u{1F50E} ",
|
|
4999
|
+
revealCount,
|
|
5000
|
+
" player",
|
|
5001
|
+
revealCount === 1 ? "" : "s",
|
|
5002
|
+
" revealed \u2014 highlighted on the pitch"
|
|
5003
|
+
] }),
|
|
5004
|
+
!isOver && wrongGuesses.length > 0 && /* @__PURE__ */ jsx59("div", { className: "ss-w-gxi-wrong", children: wrongGuesses.map((g) => {
|
|
4974
5005
|
const team = config.teamPool.find((t) => t.teamId === g.teamId);
|
|
4975
5006
|
return /* @__PURE__ */ jsx59("span", { className: "ss-w-gxi-wrong-pill", children: team?.teamName ?? `#${g.teamId}` }, g.teamId);
|
|
4976
5007
|
}) }),
|
|
4977
|
-
/* @__PURE__ */ jsxs53("div", { className:
|
|
4978
|
-
/* @__PURE__ */ jsx59(
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
value: query,
|
|
4987
|
-
disabled: submitting || isOver,
|
|
4988
|
-
onChange: (e) => setQuery(e.target.value),
|
|
4989
|
-
autoComplete: "off",
|
|
4990
|
-
"aria-label": "Name the team",
|
|
4991
|
-
"aria-autocomplete": "list"
|
|
4992
|
-
}
|
|
4993
|
-
),
|
|
4994
|
-
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ jsx59("div", { className: "ss-w-gtta-drop", role: "listbox", children: filtered.map((t) => /* @__PURE__ */ jsx59(
|
|
4995
|
-
"div",
|
|
4996
|
-
{
|
|
4997
|
-
className: "ss-w-gtta-opt",
|
|
4998
|
-
role: "option",
|
|
4999
|
-
"aria-selected": false,
|
|
5000
|
-
onClick: () => handlePick(t.teamId),
|
|
5001
|
-
onKeyDown: (e) => {
|
|
5002
|
-
if (e.key === "Enter") handlePick(t.teamId);
|
|
5003
|
-
},
|
|
5004
|
-
tabIndex: 0,
|
|
5005
|
-
children: t.teamName
|
|
5006
|
-
},
|
|
5007
|
-
t.teamId
|
|
5008
|
-
)) })
|
|
5009
|
-
] })
|
|
5010
|
-
] }) : clientState && /* @__PURE__ */ jsxs53("div", { className: `ss-w-gxi-banner ss-w-gxi-banner--${solved ? "solved" : "failed"}`, children: [
|
|
5011
|
-
/* @__PURE__ */ jsx59("div", { className: "ss-w-gxi-banner-label", children: solved ? "\u2705 Solved!" : "\u{1F614} Out of guesses" }),
|
|
5012
|
-
/* @__PURE__ */ jsx59("div", { className: "ss-w-gxi-banner-score", children: clientState.score }),
|
|
5013
|
-
/* @__PURE__ */ jsxs53("div", { className: "ss-w-gxi-banner-sub", children: [
|
|
5014
|
-
clientState.guessesUsed,
|
|
5015
|
-
" guess",
|
|
5016
|
-
clientState.guessesUsed === 1 ? "" : "es",
|
|
5017
|
-
" \xB7 come back tomorrow"
|
|
5008
|
+
isOver && clientState && /* @__PURE__ */ jsxs53("div", { className: `ss-w-gxi-banner ss-w-gxi-banner--${solved ? "solved" : "failed"}`, children: [
|
|
5009
|
+
/* @__PURE__ */ jsx59("div", { className: "ss-w-gxi-banner-label", children: solved ? "\u2705 Solved!" : "\u{1F614} Out of guesses" }),
|
|
5010
|
+
/* @__PURE__ */ jsx59("div", { className: "ss-w-gxi-banner-score", children: clientState.score }),
|
|
5011
|
+
/* @__PURE__ */ jsxs53("div", { className: "ss-w-gxi-banner-sub", children: [
|
|
5012
|
+
clientState.guessesUsed,
|
|
5013
|
+
" guess",
|
|
5014
|
+
clientState.guessesUsed === 1 ? "" : "es",
|
|
5015
|
+
" \xB7 come back tomorrow"
|
|
5016
|
+
] })
|
|
5018
5017
|
] })
|
|
5018
|
+
] }),
|
|
5019
|
+
!isOver && /* @__PURE__ */ jsxs53("div", { className: "ss-w-gpin ss-w-gtta", children: [
|
|
5020
|
+
/* @__PURE__ */ jsx59(
|
|
5021
|
+
"input",
|
|
5022
|
+
{
|
|
5023
|
+
id: inputId,
|
|
5024
|
+
type: "text",
|
|
5025
|
+
role: "textbox",
|
|
5026
|
+
className: "ss-w-gtta-i",
|
|
5027
|
+
placeholder: "Name the team\u2026",
|
|
5028
|
+
value: query,
|
|
5029
|
+
disabled: submitting || isOver,
|
|
5030
|
+
onChange: (e) => setQuery(e.target.value),
|
|
5031
|
+
autoComplete: "off",
|
|
5032
|
+
"aria-label": "Name the team",
|
|
5033
|
+
"aria-autocomplete": "list"
|
|
5034
|
+
}
|
|
5035
|
+
),
|
|
5036
|
+
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ jsx59("div", { className: "ss-w-gtta-drop", role: "listbox", children: filtered.map((t) => /* @__PURE__ */ jsx59(
|
|
5037
|
+
"div",
|
|
5038
|
+
{
|
|
5039
|
+
className: "ss-w-gtta-opt",
|
|
5040
|
+
role: "option",
|
|
5041
|
+
"aria-selected": false,
|
|
5042
|
+
onClick: () => handlePick(t.teamId),
|
|
5043
|
+
onKeyDown: (e) => {
|
|
5044
|
+
if (e.key === "Enter") handlePick(t.teamId);
|
|
5045
|
+
},
|
|
5046
|
+
tabIndex: 0,
|
|
5047
|
+
children: t.teamName
|
|
5048
|
+
},
|
|
5049
|
+
t.teamId
|
|
5050
|
+
)) })
|
|
5019
5051
|
] })
|
|
5020
5052
|
] })
|
|
5021
5053
|
] });
|
|
@@ -5712,7 +5744,7 @@ function GamesPanel({
|
|
|
5712
5744
|
const [selected, setSelected] = useState31(null);
|
|
5713
5745
|
if (!loggedIn) return /* @__PURE__ */ jsx66(GamesLoginWall, { ui });
|
|
5714
5746
|
if (selected !== null) {
|
|
5715
|
-
return /* @__PURE__ */ jsx66("div", { className: "ss-w-
|
|
5747
|
+
return /* @__PURE__ */ jsx66("div", { className: "ss-w-gscreen-wrap", children: /* @__PURE__ */ jsx66(
|
|
5716
5748
|
GameScreenHost,
|
|
5717
5749
|
{
|
|
5718
5750
|
selected,
|
|
@@ -6897,7 +6929,24 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
6897
6929
|
.ss-w-tile-chip--fun { color: var(--ss-w-faint); background: var(--ss-w-bubble); border: 1px solid var(--ss-w-line); }
|
|
6898
6930
|
|
|
6899
6931
|
/* Game screen host: back-row + placeholder body */
|
|
6900
|
-
|
|
6932
|
+
/* Game screen fills the panel; the board scrolls internally and the search/input bar stays
|
|
6933
|
+
pinned at the bottom so the fan never has to scroll to reach it. */
|
|
6934
|
+
.ss-w-gscreen-wrap { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 14px; overflow: hidden; }
|
|
6935
|
+
.ss-w-gscreen { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 0; }
|
|
6936
|
+
.ss-w-gscreen > .ss-w-gxi, .ss-w-gscreen > .ss-w-gt, .ss-w-gscreen > .ss-w-cpath,
|
|
6937
|
+
.ss-w-gscreen > .ss-w-btg, .ss-w-gscreen > .ss-w-hl { flex: 1; min-height: 0; }
|
|
6938
|
+
/* Scrollable board + guess-history region. */
|
|
6939
|
+
.ss-w-gscroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; padding-bottom: 2px; }
|
|
6940
|
+
/* Bottom-pinned bar (search input / action). */
|
|
6941
|
+
.ss-w-gpin { flex-shrink: 0; padding-top: 10px; }
|
|
6942
|
+
/* Heads stay put above the scroll region. */
|
|
6943
|
+
.ss-w-gxi-head, .ss-w-gt-head, .ss-w-cpath-head, .ss-w-btg-head { flex-shrink: 0; }
|
|
6944
|
+
/* Mystery Tiger explainer key (\u2713 / \u25B2 / \u25BC). */
|
|
6945
|
+
.ss-w-gt-key { white-space: nowrap; }
|
|
6946
|
+
.ss-w-gt-key b { font-weight: 800; color: var(--ss-w-ink); }
|
|
6947
|
+
.ss-w-gt-key-ok { color: var(--ss-w-correct) !important; }
|
|
6948
|
+
/* Higher or Lower terminal score unit. */
|
|
6949
|
+
.ss-w-hl-over-unit { font-size: 14px; font-weight: 700; color: var(--ss-w-faint); }
|
|
6901
6950
|
.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; }
|
|
6902
6951
|
.ss-w-gscreen-back-arrow { font-size: 11px; font-weight: 700; }
|
|
6903
6952
|
.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; }
|
|
@@ -6951,7 +7000,9 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
6951
7000
|
.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; }
|
|
6952
7001
|
.ss-w-gtta-i:focus { border-color: var(--ss-w-accent); }
|
|
6953
7002
|
.ss-w-gtta-i:disabled { opacity: .5; cursor: not-allowed; }
|
|
6954
|
-
|
|
7003
|
+
/* Opens UPWARD (bottom-anchored) because the input is pinned to the panel's bottom edge \u2014 a
|
|
7004
|
+
downward menu would be clipped off-screen. */
|
|
7005
|
+
.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); }
|
|
6955
7006
|
.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); }
|
|
6956
7007
|
.ss-w-gtta-opt:last-child { border-bottom: none; }
|
|
6957
7008
|
.ss-w-gtta-opt:hover { background: var(--ss-w-bubble); }
|
|
@@ -7110,13 +7161,18 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
7110
7161
|
/* A football pitch is grass-green regardless of the operator accent, so the field uses fixed
|
|
7111
7162
|
green values (not --ss-w-correct, which is a muted per-operator token that vanished on dark
|
|
7112
7163
|
themes) plus visible horizontal yard-lines and a brighter halfway line. */
|
|
7113
|
-
.ss-w-gxi-pitch { position: relative; display: flex; flex-direction: column; justify-content: space-between; gap:
|
|
7164
|
+
.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);
|
|
7114
7165
|
background:
|
|
7115
7166
|
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%),
|
|
7116
7167
|
repeating-linear-gradient(180deg, transparent 0 31px, rgba(255,255,255,.045) 31px 32px),
|
|
7117
7168
|
linear-gradient(180deg, rgba(46, 160, 86, .28), rgba(38, 132, 71, .16)); }
|
|
7118
|
-
.ss-w-gxi-prow { display: flex; justify-content: center; align-items:
|
|
7169
|
+
.ss-w-gxi-prow { display: flex; justify-content: center; align-items: flex-start; gap: 12px; }
|
|
7170
|
+
.ss-w-gxi-slot { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 46px; }
|
|
7119
7171
|
.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; }
|
|
7172
|
+
/* A slot whose player has been revealed by a wrong guess. */
|
|
7173
|
+
.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); }
|
|
7174
|
+
.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; }
|
|
7175
|
+
.ss-w-gxi-revnote { font-size: 11px; color: var(--ss-w-faint); }
|
|
7120
7176
|
/* Wrong-guess trail */
|
|
7121
7177
|
.ss-w-gxi-wrong { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
7122
7178
|
.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; }
|