@sensiblestats/widget-react 0.60.6 → 0.61.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 +6 -0
- package/dist/index.cjs +253 -36
- 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 +253 -36
- package/dist/index.js.map +1 -1
- package/dist/styles.css +27 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @sensiblestats/widget-react
|
|
2
2
|
|
|
3
|
+
## 0.61.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Games: answer reveal with team crest, player photos in XI discs and quiz options, Beat the Grid header meta rendering (club crest, coach photo, country flag, full position label), comprehensive flag map additions including Congo, Kosovo, and 60+ more nationalities.
|
|
8
|
+
|
|
3
9
|
## 0.60.6
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.cjs
CHANGED
|
@@ -236,7 +236,8 @@ var STRINGS = {
|
|
|
236
236
|
optionsLabel: "Clubs",
|
|
237
237
|
solved: "Solved!",
|
|
238
238
|
failed: "Out of guesses",
|
|
239
|
-
detail: (n) => `${n} ${n === 1 ? "guess" : "guesses"} \xB7 back tomorrow
|
|
239
|
+
detail: (n) => `${n} ${n === 1 ? "guess" : "guesses"} \xB7 back tomorrow`,
|
|
240
|
+
theAnswer: "The answer"
|
|
240
241
|
},
|
|
241
242
|
dailyQuiz: {
|
|
242
243
|
questionOf: (i, n) => `Question ${i} of ${n}`,
|
|
@@ -531,7 +532,8 @@ var STRINGS = {
|
|
|
531
532
|
optionsLabel: "Kul\xFCpler",
|
|
532
533
|
solved: "Bildin!",
|
|
533
534
|
failed: "Tahmin hakk\u0131n bitti",
|
|
534
|
-
detail: (n) => `${n} tahmin \xB7 yar\u0131n yine gel
|
|
535
|
+
detail: (n) => `${n} tahmin \xB7 yar\u0131n yine gel`,
|
|
536
|
+
theAnswer: "Do\u011Fru cevap"
|
|
535
537
|
},
|
|
536
538
|
dailyQuiz: {
|
|
537
539
|
questionOf: (i, n) => `Soru ${i} / ${n}`,
|
|
@@ -4769,6 +4771,7 @@ var import_react31 = require("react");
|
|
|
4769
4771
|
|
|
4770
4772
|
// src/components/games/nationFlags.ts
|
|
4771
4773
|
var FLAGS = {
|
|
4774
|
+
// UK home nations (subdivision flags)
|
|
4772
4775
|
england: "\u{1F3F4}\u{E0067}\u{E0062}\u{E0065}\u{E006E}\u{E0067}\u{E007F}",
|
|
4773
4776
|
scotland: "\u{1F3F4}\u{E0067}\u{E0062}\u{E0073}\u{E0063}\u{E0074}\u{E007F}",
|
|
4774
4777
|
wales: "\u{1F3F4}\u{E0067}\u{E0062}\u{E0077}\u{E006C}\u{E0073}\u{E007F}",
|
|
@@ -4776,6 +4779,7 @@ var FLAGS = {
|
|
|
4776
4779
|
"republic of ireland": "\u{1F1EE}\u{1F1EA}",
|
|
4777
4780
|
ireland: "\u{1F1EE}\u{1F1EA}",
|
|
4778
4781
|
"united kingdom": "\u{1F1EC}\u{1F1E7}",
|
|
4782
|
+
// Western & Southern Europe
|
|
4779
4783
|
france: "\u{1F1EB}\u{1F1F7}",
|
|
4780
4784
|
spain: "\u{1F1EA}\u{1F1F8}",
|
|
4781
4785
|
portugal: "\u{1F1F5}\u{1F1F9}",
|
|
@@ -4785,17 +4789,27 @@ var FLAGS = {
|
|
|
4785
4789
|
belgium: "\u{1F1E7}\u{1F1EA}",
|
|
4786
4790
|
switzerland: "\u{1F1E8}\u{1F1ED}",
|
|
4787
4791
|
austria: "\u{1F1E6}\u{1F1F9}",
|
|
4792
|
+
luxembourg: "\u{1F1F1}\u{1F1FA}",
|
|
4793
|
+
malta: "\u{1F1F2}\u{1F1F9}",
|
|
4794
|
+
cyprus: "\u{1F1E8}\u{1F1FE}",
|
|
4795
|
+
andorra: "\u{1F1E6}\u{1F1E9}",
|
|
4796
|
+
liechtenstein: "\u{1F1F1}\u{1F1EE}",
|
|
4797
|
+
"san marino": "\u{1F1F8}\u{1F1F2}",
|
|
4798
|
+
monaco: "\u{1F1F2}\u{1F1E8}",
|
|
4799
|
+
// Northern Europe
|
|
4788
4800
|
denmark: "\u{1F1E9}\u{1F1F0}",
|
|
4789
4801
|
sweden: "\u{1F1F8}\u{1F1EA}",
|
|
4790
4802
|
norway: "\u{1F1F3}\u{1F1F4}",
|
|
4791
4803
|
finland: "\u{1F1EB}\u{1F1EE}",
|
|
4792
4804
|
iceland: "\u{1F1EE}\u{1F1F8}",
|
|
4805
|
+
// Central & Eastern Europe
|
|
4793
4806
|
poland: "\u{1F1F5}\u{1F1F1}",
|
|
4794
4807
|
czechia: "\u{1F1E8}\u{1F1FF}",
|
|
4795
4808
|
"czech republic": "\u{1F1E8}\u{1F1FF}",
|
|
4796
4809
|
croatia: "\u{1F1ED}\u{1F1F7}",
|
|
4797
4810
|
serbia: "\u{1F1F7}\u{1F1F8}",
|
|
4798
4811
|
"bosnia and herzegovina": "\u{1F1E7}\u{1F1E6}",
|
|
4812
|
+
bosnia: "\u{1F1E7}\u{1F1E6}",
|
|
4799
4813
|
greece: "\u{1F1EC}\u{1F1F7}",
|
|
4800
4814
|
romania: "\u{1F1F7}\u{1F1F4}",
|
|
4801
4815
|
ukraine: "\u{1F1FA}\u{1F1E6}",
|
|
@@ -4803,10 +4817,29 @@ var FLAGS = {
|
|
|
4803
4817
|
hungary: "\u{1F1ED}\u{1F1FA}",
|
|
4804
4818
|
slovakia: "\u{1F1F8}\u{1F1F0}",
|
|
4805
4819
|
slovenia: "\u{1F1F8}\u{1F1EE}",
|
|
4820
|
+
bulgaria: "\u{1F1E7}\u{1F1EC}",
|
|
4821
|
+
lithuania: "\u{1F1F1}\u{1F1F9}",
|
|
4822
|
+
latvia: "\u{1F1F1}\u{1F1FB}",
|
|
4823
|
+
estonia: "\u{1F1EA}\u{1F1EA}",
|
|
4824
|
+
moldova: "\u{1F1F2}\u{1F1E9}",
|
|
4825
|
+
belarus: "\u{1F1E7}\u{1F1FE}",
|
|
4826
|
+
// South-East Europe / Balkans
|
|
4806
4827
|
turkey: "\u{1F1F9}\u{1F1F7}",
|
|
4807
4828
|
t\u00FCrkiye: "\u{1F1F9}\u{1F1F7}",
|
|
4808
4829
|
albania: "\u{1F1E6}\u{1F1F1}",
|
|
4809
4830
|
"north macedonia": "\u{1F1F2}\u{1F1F0}",
|
|
4831
|
+
kosovo: "\u{1F1FD}\u{1F1F0}",
|
|
4832
|
+
montenegro: "\u{1F1F2}\u{1F1EA}",
|
|
4833
|
+
// Caucasus & Central Asia
|
|
4834
|
+
armenia: "\u{1F1E6}\u{1F1F2}",
|
|
4835
|
+
georgia: "\u{1F1EC}\u{1F1EA}",
|
|
4836
|
+
azerbaijan: "\u{1F1E6}\u{1F1FF}",
|
|
4837
|
+
kazakhstan: "\u{1F1F0}\u{1F1FF}",
|
|
4838
|
+
uzbekistan: "\u{1F1FA}\u{1F1FF}",
|
|
4839
|
+
kyrgyzstan: "\u{1F1F0}\u{1F1EC}",
|
|
4840
|
+
tajikistan: "\u{1F1F9}\u{1F1EF}",
|
|
4841
|
+
turkmenistan: "\u{1F1F9}\u{1F1F2}",
|
|
4842
|
+
// South America
|
|
4810
4843
|
brazil: "\u{1F1E7}\u{1F1F7}",
|
|
4811
4844
|
argentina: "\u{1F1E6}\u{1F1F7}",
|
|
4812
4845
|
uruguay: "\u{1F1FA}\u{1F1FE}",
|
|
@@ -4815,32 +4848,125 @@ var FLAGS = {
|
|
|
4815
4848
|
peru: "\u{1F1F5}\u{1F1EA}",
|
|
4816
4849
|
ecuador: "\u{1F1EA}\u{1F1E8}",
|
|
4817
4850
|
paraguay: "\u{1F1F5}\u{1F1FE}",
|
|
4851
|
+
venezuela: "\u{1F1FB}\u{1F1EA}",
|
|
4852
|
+
bolivia: "\u{1F1E7}\u{1F1F4}",
|
|
4853
|
+
guyana: "\u{1F1EC}\u{1F1FE}",
|
|
4854
|
+
suriname: "\u{1F1F8}\u{1F1F7}",
|
|
4855
|
+
// North & Central America
|
|
4818
4856
|
mexico: "\u{1F1F2}\u{1F1FD}",
|
|
4819
4857
|
"united states": "\u{1F1FA}\u{1F1F8}",
|
|
4820
4858
|
usa: "\u{1F1FA}\u{1F1F8}",
|
|
4821
4859
|
canada: "\u{1F1E8}\u{1F1E6}",
|
|
4860
|
+
"costa rica": "\u{1F1E8}\u{1F1F7}",
|
|
4861
|
+
panama: "\u{1F1F5}\u{1F1E6}",
|
|
4862
|
+
honduras: "\u{1F1ED}\u{1F1F3}",
|
|
4863
|
+
"el salvador": "\u{1F1F8}\u{1F1FB}",
|
|
4864
|
+
guatemala: "\u{1F1EC}\u{1F1F9}",
|
|
4865
|
+
nicaragua: "\u{1F1F3}\u{1F1EE}",
|
|
4866
|
+
// Caribbean
|
|
4822
4867
|
jamaica: "\u{1F1EF}\u{1F1F2}",
|
|
4868
|
+
cuba: "\u{1F1E8}\u{1F1FA}",
|
|
4869
|
+
haiti: "\u{1F1ED}\u{1F1F9}",
|
|
4870
|
+
"dominican republic": "\u{1F1E9}\u{1F1F4}",
|
|
4871
|
+
"trinidad and tobago": "\u{1F1F9}\u{1F1F9}",
|
|
4872
|
+
trinidad: "\u{1F1F9}\u{1F1F9}",
|
|
4873
|
+
"cura\xE7ao": "\u{1F1E8}\u{1F1FC}",
|
|
4874
|
+
curacao: "\u{1F1E8}\u{1F1FC}",
|
|
4875
|
+
barbados: "\u{1F1E7}\u{1F1E7}",
|
|
4876
|
+
// West Africa
|
|
4823
4877
|
nigeria: "\u{1F1F3}\u{1F1EC}",
|
|
4824
4878
|
ghana: "\u{1F1EC}\u{1F1ED}",
|
|
4825
4879
|
senegal: "\u{1F1F8}\u{1F1F3}",
|
|
4826
4880
|
ivorycoast: "\u{1F1E8}\u{1F1EE}",
|
|
4827
4881
|
"cote d'ivoire": "\u{1F1E8}\u{1F1EE}",
|
|
4882
|
+
"c\xF4te d'ivoire": "\u{1F1E8}\u{1F1EE}",
|
|
4828
4883
|
"ivory coast": "\u{1F1E8}\u{1F1EE}",
|
|
4829
4884
|
cameroon: "\u{1F1E8}\u{1F1F2}",
|
|
4885
|
+
mali: "\u{1F1F2}\u{1F1F1}",
|
|
4886
|
+
guinea: "\u{1F1EC}\u{1F1F3}",
|
|
4887
|
+
"guinea-bissau": "\u{1F1EC}\u{1F1FC}",
|
|
4888
|
+
"sierra leone": "\u{1F1F8}\u{1F1F1}",
|
|
4889
|
+
liberia: "\u{1F1F1}\u{1F1F7}",
|
|
4890
|
+
"cape verde": "\u{1F1E8}\u{1F1FB}",
|
|
4891
|
+
"gambia": "\u{1F1EC}\u{1F1F2}",
|
|
4892
|
+
mauritania: "\u{1F1F2}\u{1F1F7}",
|
|
4893
|
+
togo: "\u{1F1F9}\u{1F1EC}",
|
|
4894
|
+
benin: "\u{1F1E7}\u{1F1EF}",
|
|
4895
|
+
"burkina faso": "\u{1F1E7}\u{1F1EB}",
|
|
4896
|
+
niger: "\u{1F1F3}\u{1F1EA}",
|
|
4897
|
+
// Central & East Africa
|
|
4898
|
+
"dr congo": "\u{1F1E8}\u{1F1E9}",
|
|
4899
|
+
"democratic republic of the congo": "\u{1F1E8}\u{1F1E9}",
|
|
4900
|
+
"congo dr": "\u{1F1E8}\u{1F1E9}",
|
|
4901
|
+
"republic of the congo": "\u{1F1E8}\u{1F1EC}",
|
|
4902
|
+
congo: "\u{1F1E8}\u{1F1EC}",
|
|
4903
|
+
"congo republic": "\u{1F1E8}\u{1F1EC}",
|
|
4904
|
+
"congo-brazzaville": "\u{1F1E8}\u{1F1EC}",
|
|
4905
|
+
"central african republic": "\u{1F1E8}\u{1F1EB}",
|
|
4906
|
+
gabon: "\u{1F1EC}\u{1F1E6}",
|
|
4907
|
+
"equatorial guinea": "\u{1F1EC}\u{1F1F6}",
|
|
4908
|
+
"south africa": "\u{1F1FF}\u{1F1E6}",
|
|
4909
|
+
angola: "\u{1F1E6}\u{1F1F4}",
|
|
4910
|
+
namibia: "\u{1F1F3}\u{1F1E6}",
|
|
4911
|
+
botswana: "\u{1F1E7}\u{1F1FC}",
|
|
4912
|
+
zimbabwe: "\u{1F1FF}\u{1F1FC}",
|
|
4913
|
+
zambia: "\u{1F1FF}\u{1F1F2}",
|
|
4914
|
+
malawi: "\u{1F1F2}\u{1F1FC}",
|
|
4915
|
+
mozambique: "\u{1F1F2}\u{1F1FF}",
|
|
4916
|
+
tanzania: "\u{1F1F9}\u{1F1FF}",
|
|
4917
|
+
kenya: "\u{1F1F0}\u{1F1EA}",
|
|
4918
|
+
uganda: "\u{1F1FA}\u{1F1EC}",
|
|
4919
|
+
rwanda: "\u{1F1F7}\u{1F1FC}",
|
|
4920
|
+
ethiopia: "\u{1F1EA}\u{1F1F9}",
|
|
4921
|
+
eritrea: "\u{1F1EA}\u{1F1F7}",
|
|
4922
|
+
djibouti: "\u{1F1E9}\u{1F1EF}",
|
|
4923
|
+
somalia: "\u{1F1F8}\u{1F1F4}",
|
|
4924
|
+
sudan: "\u{1F1F8}\u{1F1E9}",
|
|
4925
|
+
"south sudan": "\u{1F1F8}\u{1F1F8}",
|
|
4926
|
+
chad: "\u{1F1F9}\u{1F1E9}",
|
|
4927
|
+
lesotho: "\u{1F1F1}\u{1F1F8}",
|
|
4928
|
+
eswatini: "\u{1F1F8}\u{1F1FF}",
|
|
4929
|
+
swaziland: "\u{1F1F8}\u{1F1FF}",
|
|
4930
|
+
madagascar: "\u{1F1F2}\u{1F1EC}",
|
|
4931
|
+
mauritius: "\u{1F1F2}\u{1F1FA}",
|
|
4932
|
+
comoros: "\u{1F1F0}\u{1F1F2}",
|
|
4933
|
+
seychelles: "\u{1F1F8}\u{1F1E8}",
|
|
4934
|
+
// North Africa
|
|
4830
4935
|
egypt: "\u{1F1EA}\u{1F1EC}",
|
|
4831
4936
|
morocco: "\u{1F1F2}\u{1F1E6}",
|
|
4832
4937
|
algeria: "\u{1F1E9}\u{1F1FF}",
|
|
4833
4938
|
tunisia: "\u{1F1F9}\u{1F1F3}",
|
|
4834
|
-
|
|
4835
|
-
"
|
|
4836
|
-
|
|
4939
|
+
// Middle East
|
|
4940
|
+
"saudi arabia": "\u{1F1F8}\u{1F1E6}",
|
|
4941
|
+
iran: "\u{1F1EE}\u{1F1F7}",
|
|
4942
|
+
iraq: "\u{1F1EE}\u{1F1F6}",
|
|
4943
|
+
lebanon: "\u{1F1F1}\u{1F1E7}",
|
|
4944
|
+
syria: "\u{1F1F8}\u{1F1FE}",
|
|
4945
|
+
jordan: "\u{1F1EF}\u{1F1F4}",
|
|
4946
|
+
qatar: "\u{1F1F6}\u{1F1E6}",
|
|
4947
|
+
"united arab emirates": "\u{1F1E6}\u{1F1EA}",
|
|
4948
|
+
uae: "\u{1F1E6}\u{1F1EA}",
|
|
4949
|
+
kuwait: "\u{1F1F0}\u{1F1FC}",
|
|
4950
|
+
bahrain: "\u{1F1E7}\u{1F1ED}",
|
|
4951
|
+
oman: "\u{1F1F4}\u{1F1F2}",
|
|
4952
|
+
yemen: "\u{1F1FE}\u{1F1EA}",
|
|
4953
|
+
israel: "\u{1F1EE}\u{1F1F1}",
|
|
4954
|
+
palestine: "\u{1F1F5}\u{1F1F8}",
|
|
4955
|
+
// East & South-East Asia
|
|
4837
4956
|
japan: "\u{1F1EF}\u{1F1F5}",
|
|
4838
4957
|
"south korea": "\u{1F1F0}\u{1F1F7}",
|
|
4839
4958
|
korea: "\u{1F1F0}\u{1F1F7}",
|
|
4959
|
+
china: "\u{1F1E8}\u{1F1F3}",
|
|
4960
|
+
india: "\u{1F1EE}\u{1F1F3}",
|
|
4961
|
+
thailand: "\u{1F1F9}\u{1F1ED}",
|
|
4962
|
+
indonesia: "\u{1F1EE}\u{1F1E9}",
|
|
4963
|
+
malaysia: "\u{1F1F2}\u{1F1FE}",
|
|
4964
|
+
philippines: "\u{1F1F5}\u{1F1ED}",
|
|
4965
|
+
vietnam: "\u{1F1FB}\u{1F1F3}",
|
|
4966
|
+
// Oceania
|
|
4840
4967
|
australia: "\u{1F1E6}\u{1F1FA}",
|
|
4841
|
-
"
|
|
4842
|
-
|
|
4843
|
-
"new zealand": "\u{1F1F3}\u{1F1FF}"
|
|
4968
|
+
"new zealand": "\u{1F1F3}\u{1F1FF}",
|
|
4969
|
+
fiji: "\u{1F1EB}\u{1F1EF}"
|
|
4844
4970
|
};
|
|
4845
4971
|
function nationalityFlag(nationality) {
|
|
4846
4972
|
if (!nationality) return "\u{1F3F3}\uFE0F";
|
|
@@ -5548,6 +5674,23 @@ function CriterionIcon({ kind }) {
|
|
|
5548
5674
|
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(IconFlag, {});
|
|
5549
5675
|
}
|
|
5550
5676
|
}
|
|
5677
|
+
function HeaderVisual({ label, key: iKey, meta }) {
|
|
5678
|
+
if (!meta) {
|
|
5679
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(CriterionIcon, { kind: criterionIconKind(label, iKey) });
|
|
5680
|
+
}
|
|
5681
|
+
switch (meta.kind) {
|
|
5682
|
+
case "club":
|
|
5683
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(CrestShield, { src: meta.imageUrl, name: label, size: 24 });
|
|
5684
|
+
case "coach":
|
|
5685
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(PlayerAvatar, { name: label, imagePath: meta.imageUrl, className: "ss-g-btg-coach-av" });
|
|
5686
|
+
case "country":
|
|
5687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-btg-hdr-flag", "aria-hidden": "true", children: nationalityFlag(meta.country ?? label) });
|
|
5688
|
+
case "position":
|
|
5689
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_jsx_runtime71.Fragment, {});
|
|
5690
|
+
default:
|
|
5691
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(CriterionIcon, { kind: criterionIconKind(label, iKey) });
|
|
5692
|
+
}
|
|
5693
|
+
}
|
|
5551
5694
|
function parseClientState4(json) {
|
|
5552
5695
|
if (!json) return null;
|
|
5553
5696
|
try {
|
|
@@ -5626,7 +5769,7 @@ function SearchSheet({
|
|
|
5626
5769
|
options: filtered.map((p) => ({
|
|
5627
5770
|
key: p.id,
|
|
5628
5771
|
content: /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
|
|
5629
|
-
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(PlayerAvatar, { name: p.name, className: "ss-g-opt-av" }),
|
|
5772
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(PlayerAvatar, { name: p.name, imagePath: p.imagePath, className: "ss-g-opt-av" }),
|
|
5630
5773
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-btg-result-name", children: p.name }),
|
|
5631
5774
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-btg-result-plus", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(IconPlus, { size: 18 }) })
|
|
5632
5775
|
] })
|
|
@@ -5705,17 +5848,25 @@ function BeatTheGridGame({
|
|
|
5705
5848
|
role: "grid",
|
|
5706
5849
|
children: [
|
|
5707
5850
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "ss-g-btg-corner" }),
|
|
5708
|
-
cols.map((col, colIdx) =>
|
|
5709
|
-
|
|
5710
|
-
/* @__PURE__ */ (0, import_jsx_runtime71.
|
|
5711
|
-
|
|
5851
|
+
cols.map((col, colIdx) => {
|
|
5852
|
+
const colMeta = config.colsMeta?.[colIdx];
|
|
5853
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)("div", { className: "ss-g-btg-colhdr", "data-meta": colMeta ? "true" : void 0, children: [
|
|
5854
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(HeaderVisual, { label: col, meta: colMeta }, config.colsI18n?.[colIdx]?.key),
|
|
5855
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { children: col })
|
|
5856
|
+
] }, col);
|
|
5857
|
+
}),
|
|
5712
5858
|
rows.map((rowLabel, rowIdx) => {
|
|
5859
|
+
const rowMeta = config.rowsMeta?.[rowIdx];
|
|
5713
5860
|
const abbr = rowAbbrev(rowLabel, s.rowAbbrev, config.rowsI18n?.[rowIdx]?.key);
|
|
5861
|
+
const rowHeaderContent = rowMeta ? /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
|
|
5862
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)(HeaderVisual, { label: rowLabel, meta: rowMeta }, config.rowsI18n?.[rowIdx]?.key),
|
|
5863
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { children: rowLabel })
|
|
5864
|
+
] }) : abbr === rowLabel ? /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { children: rowLabel }) : /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_jsx_runtime71.Fragment, { children: [
|
|
5865
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { "aria-hidden": "true", children: abbr }),
|
|
5866
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-sr", children: rowLabel })
|
|
5867
|
+
] });
|
|
5714
5868
|
return /* @__PURE__ */ (0, import_jsx_runtime71.jsxs)(import_react34.default.Fragment, { children: [
|
|
5715
|
-
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "ss-g-btg-rowhdr",
|
|
5716
|
-
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { "aria-hidden": "true", children: abbr }),
|
|
5717
|
-
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-sr", children: rowLabel })
|
|
5718
|
-
] }) }),
|
|
5869
|
+
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("div", { className: "ss-g-btg-rowhdr", "data-meta": rowMeta ? "true" : void 0, children: rowHeaderContent }),
|
|
5719
5870
|
cols.map((colLabel, colIdx) => {
|
|
5720
5871
|
const filled = findCellResult(filledCells, rowIdx, colIdx);
|
|
5721
5872
|
const isActive = activeCell?.row === rowIdx && activeCell?.col === colIdx;
|
|
@@ -5742,7 +5893,17 @@ function BeatTheGridGame({
|
|
|
5742
5893
|
}
|
|
5743
5894
|
),
|
|
5744
5895
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-btg-rarity", children: filled.rarityScore }),
|
|
5745
|
-
|
|
5896
|
+
(() => {
|
|
5897
|
+
const entry = playerPool.find((p) => p.id === filled.playerId);
|
|
5898
|
+
return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
|
|
5899
|
+
PlayerAvatar,
|
|
5900
|
+
{
|
|
5901
|
+
name: entry?.name ?? "",
|
|
5902
|
+
imagePath: entry?.imagePath,
|
|
5903
|
+
className: "ss-g-btg-av"
|
|
5904
|
+
}
|
|
5905
|
+
);
|
|
5906
|
+
})(),
|
|
5746
5907
|
/* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-btg-name", children: shortName(playerPool.find((p) => p.id === filled.playerId)?.name) })
|
|
5747
5908
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime71.jsx)("span", { className: "ss-g-btg-plus", "aria-hidden": "true", children: /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(IconPlus, { size: 22 }) })
|
|
5748
5909
|
},
|
|
@@ -5887,6 +6048,10 @@ function GuessTheXiGame({
|
|
|
5887
6048
|
(clientState?.earnedReveals ?? []).forEach((r) => {
|
|
5888
6049
|
if (r.slot && r.type !== "position") nameBySlot.set(r.slot, r.value);
|
|
5889
6050
|
});
|
|
6051
|
+
const lineupBySlot = /* @__PURE__ */ new Map();
|
|
6052
|
+
(clientState?.lineup ?? []).forEach((e) => {
|
|
6053
|
+
lineupBySlot.set(e.slot, { name: e.name, imagePath: e.imagePath });
|
|
6054
|
+
});
|
|
5890
6055
|
const filtered = config && !isOver ? config.teamPool.filter(
|
|
5891
6056
|
(tm) => !guessedTeamIds.has(tm.teamId) && tm.teamName.toLowerCase().includes(query.toLowerCase())
|
|
5892
6057
|
) : [];
|
|
@@ -5919,7 +6084,21 @@ function GuessTheXiGame({
|
|
|
5919
6084
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "ss-g-gxi-rows", children: rows.map((row, r) => /* @__PURE__ */ (0, import_jsx_runtime73.jsx)("div", { className: "ss-g-gxi-row", children: row.map((pos, c) => {
|
|
5920
6085
|
const posLabel = pos.slot ? posBySlot.get(pos.slot) ?? "" : "";
|
|
5921
6086
|
const name = pos.slot ? nameBySlot.get(pos.slot) : void 0;
|
|
6087
|
+
const lineupEntry = pos.slot ? lineupBySlot.get(pos.slot) : void 0;
|
|
5922
6088
|
const flag = nationalityFlag(pos.nationality);
|
|
6089
|
+
if (lineupEntry) {
|
|
6090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "ss-g-gxi-node", "data-revealed": "true", children: [
|
|
6091
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6092
|
+
PlayerAvatar,
|
|
6093
|
+
{
|
|
6094
|
+
name: lineupEntry.name,
|
|
6095
|
+
imagePath: lineupEntry.imagePath,
|
|
6096
|
+
className: "ss-g-gxi-disc ss-g-gxi-disc--photo"
|
|
6097
|
+
}
|
|
6098
|
+
),
|
|
6099
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "ss-g-gxi-pos ss-g-gxi-pos--name", children: splitName(lineupEntry.name).last })
|
|
6100
|
+
] }, `${pos.slot}-${c}`);
|
|
6101
|
+
}
|
|
5923
6102
|
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "ss-g-gxi-node", "data-revealed": name ? "true" : void 0, children: [
|
|
5924
6103
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
5925
6104
|
"span",
|
|
@@ -5938,22 +6117,32 @@ function GuessTheXiGame({
|
|
|
5938
6117
|
] }),
|
|
5939
6118
|
!isOver && wrongGuesses.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "ss-g-gxi-wrong", children: [
|
|
5940
6119
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "ss-g-gxi-wrong-l", children: t.notThem }),
|
|
5941
|
-
wrongGuesses.map((g) =>
|
|
5942
|
-
|
|
5943
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.
|
|
5944
|
-
|
|
6120
|
+
wrongGuesses.map((g) => {
|
|
6121
|
+
const crestUrl = config?.teamPool.find((tm) => tm.teamId === g.teamId)?.crestUrl;
|
|
6122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("span", { className: "ss-g-gxi-wrong-chip", children: [
|
|
6123
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(CrestShield, { src: crestUrl, name: teamName(g.teamId), size: 18 }),
|
|
6124
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("s", { children: teamName(g.teamId) })
|
|
6125
|
+
] }, g.teamId);
|
|
6126
|
+
})
|
|
5945
6127
|
] }),
|
|
5946
|
-
isOver && /* @__PURE__ */ (0, import_jsx_runtime73.
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
6128
|
+
isOver && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
|
|
6129
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
6130
|
+
ResultCard,
|
|
6131
|
+
{
|
|
6132
|
+
tone: solved ? "win" : failed ? "lose" : "neutral",
|
|
6133
|
+
title: solved ? t.solved : failed ? t.failed : ui.games.alreadyPlayedTitle,
|
|
6134
|
+
score: clientState?.score ?? result?.score ?? 0,
|
|
6135
|
+
detail: clientState ? t.detail(clientState.guessesUsed) : void 0,
|
|
6136
|
+
onBack,
|
|
6137
|
+
ui
|
|
6138
|
+
}
|
|
6139
|
+
),
|
|
6140
|
+
(solved || failed) && clientState?.answer && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)("div", { className: "ss-g-gxi-answer", "data-testid": "gxi-answer-reveal", children: [
|
|
6141
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "ss-g-gxi-answer-label", children: t.theAnswer }),
|
|
6142
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(CrestShield, { src: clientState.answer.crestUrl, name: clientState.answer.teamName, size: 32 }),
|
|
6143
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { className: "ss-g-gxi-answer-name", children: clientState.answer.teamName })
|
|
6144
|
+
] })
|
|
6145
|
+
] })
|
|
5957
6146
|
] }),
|
|
5958
6147
|
!isOver && /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(FooterBar, { children: [
|
|
5959
6148
|
query.length > 0 && filtered.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime73.jsx)(
|
|
@@ -5963,7 +6152,7 @@ function GuessTheXiGame({
|
|
|
5963
6152
|
options: filtered.map((tm) => ({
|
|
5964
6153
|
key: tm.teamId,
|
|
5965
6154
|
content: /* @__PURE__ */ (0, import_jsx_runtime73.jsxs)(import_jsx_runtime73.Fragment, { children: [
|
|
5966
|
-
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(CrestShield, { name: tm.teamName, size: 28 }),
|
|
6155
|
+
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)(CrestShield, { src: tm.crestUrl, name: tm.teamName, size: 28 }),
|
|
5967
6156
|
/* @__PURE__ */ (0, import_jsx_runtime73.jsx)("span", { children: tm.teamName })
|
|
5968
6157
|
] })
|
|
5969
6158
|
})),
|
|
@@ -6111,6 +6300,8 @@ function DailyQuizGame({
|
|
|
6111
6300
|
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("h3", { className: "ss-g-dq-stem", children: current.stem }),
|
|
6112
6301
|
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("div", { className: "ss-g-dq-opts", children: current.options.map((opt, optIdx) => {
|
|
6113
6302
|
const selected = optIdx === selectedIdx;
|
|
6303
|
+
const imagePath = current.optionImagePaths?.[optIdx] ?? void 0;
|
|
6304
|
+
const playerName = opt;
|
|
6114
6305
|
return /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)(
|
|
6115
6306
|
"button",
|
|
6116
6307
|
{
|
|
@@ -6120,6 +6311,7 @@ function DailyQuizGame({
|
|
|
6120
6311
|
disabled: submitting,
|
|
6121
6312
|
onClick: () => handleSelect(current.index, optIdx),
|
|
6122
6313
|
children: [
|
|
6314
|
+
current.optionImagePaths && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(PlayerAvatar, { name: playerName, imagePath, className: "ss-g-dq-opt-av" }),
|
|
6123
6315
|
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "ss-g-dq-badge", "aria-hidden": "true", children: selected ? /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(IconCheck, {}) : String.fromCharCode(65 + optIdx) }),
|
|
6124
6316
|
/* @__PURE__ */ (0, import_jsx_runtime74.jsx)(OptionName, { text: opt })
|
|
6125
6317
|
]
|
|
@@ -8443,6 +8635,14 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
8443
8635
|
.ss-g-gxi-wrong { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
|
|
8444
8636
|
.ss-g-gxi-wrong-l { font-size: 12px; color: var(--ss-g-muted); }
|
|
8445
8637
|
.ss-g-gxi-wrong-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 999px; background: var(--ss-g-surface); border: 1px solid var(--ss-g-line); font-size: 13px; color: var(--ss-g-muted); }
|
|
8638
|
+
/* u407: lineup photo \u2014 fills the 44px disc like the flag does */
|
|
8639
|
+
.ss-g-gxi-disc--photo { overflow: hidden; border: 2px solid var(--ss-w-accent); }
|
|
8640
|
+
.ss-g-gxi-disc--photo img { width: 100%; height: 100%; object-fit: cover; }
|
|
8641
|
+
.ss-g-gxi-disc--photo .ss-w-av-initials { font-family: var(--ss-g-font-body); font-size: 11px; font-weight: 800; color: var(--ss-g-pitch-ink); }
|
|
8642
|
+
/* u407: answer reveal \u2014 prominent row using theme tokens, works on dark/navy/light surfaces */
|
|
8643
|
+
.ss-g-gxi-answer { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 12px 16px; border-radius: 14px; background: var(--ss-g-warm); border: 1.5px solid var(--ss-g-line-warm); }
|
|
8644
|
+
.ss-g-gxi-answer-label { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ss-g-muted); flex: none; }
|
|
8645
|
+
.ss-g-gxi-answer-name { font-family: var(--ss-g-font-display); font-weight: 800; font-size: 20px; text-transform: uppercase; color: var(--ss-g-ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
8446
8646
|
|
|
8447
8647
|
/* ---- Daily Quiz (u393) ---- */
|
|
8448
8648
|
.ss-g-dq-stem { font-family: var(--ss-g-font-display); font-weight: 700; font-size: 30px; line-height: 1.05; overflow-wrap: anywhere; }
|
|
@@ -8467,6 +8667,10 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
8467
8667
|
.ss-g-dq-rq-opt--correct { background: var(--ss-g-correct); color: var(--ss-g-on-correct); }
|
|
8468
8668
|
.ss-g-dq-rq-opt--wrong { background: var(--ss-g-wrong); color: var(--ss-g-on-correct); }
|
|
8469
8669
|
.ss-g-dq-why { font-size: 13px; color: var(--ss-g-ink-2); }
|
|
8670
|
+
/* u407: player avatar in quiz option \u2014 centered in top half, badge at top-left unaffected */
|
|
8671
|
+
.ss-g-dq-opt-av { position: absolute; top: 7px; right: 10px; width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--ss-g-raised); display: grid; place-items: center; color: var(--ss-g-muted); font-size: 13px; font-weight: 700; flex: none; }
|
|
8672
|
+
.ss-g-dq-opt-av img { width: 100%; height: 100%; object-fit: cover; }
|
|
8673
|
+
.ss-g-dq-opt-av .ss-w-av-initials { font-size: 11px; }
|
|
8470
8674
|
|
|
8471
8675
|
/* ---- Career Path (u393) ---- */
|
|
8472
8676
|
.ss-g-cp-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; background: var(--ss-g-warm); border: 1px solid var(--ss-g-line-warm); }
|
|
@@ -8543,9 +8747,11 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
8543
8747
|
/* While the search sheet is pinned below, the grid shrinks its rows to share the body with it
|
|
8544
8748
|
instead of pushing the bottom row under the sheet. */
|
|
8545
8749
|
.ss-g-btg-grid--fit { flex: 0 1 auto; min-height: 0; }
|
|
8546
|
-
.ss-g-btg-colhdr { min-height: 0; border-radius: 12px; background: var(--ss-g-surface); border: 1px solid var(--ss-g-line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 0 4px; font-size: 12px; font-weight: 700; line-height: 1.1; min-width: 0; overflow-wrap: anywhere; }
|
|
8750
|
+
.ss-g-btg-colhdr { min-height: 0; border-radius: 12px; background: var(--ss-g-surface); border: 1px solid var(--ss-g-line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 0 4px; font-size: 12px; font-weight: 700; line-height: 1.1; min-width: 0; overflow-wrap: anywhere; overflow: hidden; }
|
|
8751
|
+
.ss-g-btg-colhdr[data-meta] { overflow-wrap: normal; word-break: normal; hyphens: none; font-size: 11px; letter-spacing: 0; }
|
|
8547
8752
|
.ss-g-btg-colhdr svg { color: var(--ss-w-accent); flex: none; }
|
|
8548
|
-
.ss-g-btg-rowhdr { border-radius: 12px; background: var(--ss-g-surface); border: 1px solid var(--ss-g-line); display: grid; place-items: center; font-family: var(--ss-g-font-display); font-weight: 800; font-size: 18px; letter-spacing: .04em; text-transform: uppercase; overflow-wrap: anywhere; text-align: center; }
|
|
8753
|
+
.ss-g-btg-rowhdr { border-radius: 12px; background: var(--ss-g-surface); border: 1px solid var(--ss-g-line); display: grid; place-items: center; font-family: var(--ss-g-font-display); font-weight: 800; font-size: 18px; letter-spacing: .04em; text-transform: uppercase; overflow-wrap: anywhere; text-align: center; overflow: hidden; }
|
|
8754
|
+
.ss-g-btg-rowhdr[data-meta] { font-size: 10px; font-family: var(--ss-g-font-body); font-weight: 700; letter-spacing: -0.01em; text-transform: none; word-break: normal; overflow-wrap: normal; hyphens: none; line-height: 1.25; padding: 0 2px; }
|
|
8549
8755
|
.ss-g-btg-cell { position: relative; min-height: 0; min-width: 0; border-radius: 12px; border: 1.5px dashed var(--ss-g-strong-line); background: transparent; color: var(--ss-g-muted); display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; font: inherit; padding: 0; }
|
|
8550
8756
|
.ss-g-btg-cell:disabled { cursor: default; }
|
|
8551
8757
|
.ss-g-btg-cell[data-state="active"] { border: 2px solid var(--ss-w-accent); background: var(--ss-g-warm); color: var(--ss-w-accent); }
|
|
@@ -8573,6 +8779,17 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
8573
8779
|
.ss-g-btg-sheet .ss-g-opts { max-height: 160px; }
|
|
8574
8780
|
.ss-g-btg-result-name { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
8575
8781
|
.ss-g-btg-result-plus { color: var(--ss-w-accent); display: flex; }
|
|
8782
|
+
/* u407: cell avatar replaces Silhouette */
|
|
8783
|
+
.ss-g-btg-av { width: 38px; height: 38px; flex: none; border-radius: 50%; overflow: hidden; background: var(--ss-g-raised); display: grid; place-items: center; color: var(--ss-g-muted); font-size: 12px; font-weight: 700; }
|
|
8784
|
+
.ss-g-btg-av img { width: 100%; height: 100%; object-fit: cover; }
|
|
8785
|
+
.ss-g-btg-av .ss-w-av-initials { font-size: 12px; }
|
|
8786
|
+
/* u407: coach photo in row/col header */
|
|
8787
|
+
.ss-g-btg-coach-av { width: 28px; height: 28px; flex: none; border-radius: 50%; overflow: hidden; background: var(--ss-g-raised); display: grid; place-items: center; color: var(--ss-g-muted); font-size: 10px; font-weight: 700; }
|
|
8788
|
+
.ss-g-btg-coach-av img { width: 100%; height: 100%; object-fit: cover; }
|
|
8789
|
+
/* u407: country flag emoji in header \u2014 sized to match other header icons */
|
|
8790
|
+
.ss-g-btg-hdr-flag { font-size: 20px; line-height: 1; flex: none; }
|
|
8791
|
+
/* u407: club crest in col/row header */
|
|
8792
|
+
.ss-g-btg-colhdr .ss-g-crest, .ss-g-btg-rowhdr .ss-g-crest { width: 28px; height: 28px; flex: none; }
|
|
8576
8793
|
|
|
8577
8794
|
/* \u2500\u2500 Starting XI (u393) \u2500\u2500 */
|
|
8578
8795
|
.ss-g-xi-pitch { position: relative; flex: none; height: 400px; border-radius: 18px; overflow: hidden; background: repeating-linear-gradient(180deg, var(--ss-g-pitch) 0 40px, color-mix(in srgb, var(--ss-g-pitch) 88%, var(--ss-g-pitch-mark)) 40px 80px); border: 1px solid var(--ss-g-pitch-line); }
|