@sensiblestats/widget-react 0.58.0 → 0.59.1

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/dist/styles.css CHANGED
@@ -934,6 +934,11 @@
934
934
  .ss-w-gt-key { white-space: nowrap; }
935
935
  .ss-w-gt-key b { font-weight: 800; color: var(--ss-w-ink); }
936
936
  .ss-w-gt-key-ok { color: var(--ss-w-correct) !important; }
937
+ /* Legend colour swatches — green = exact match, amber = close (same broad line / confederation
938
+ / within tolerance). Mirrors .ss-w-gtile--exact / --near tile fills. */
939
+ .ss-w-gt-sw { display: inline-block; width: 9px; height: 9px; border-radius: 3px; vertical-align: middle; }
940
+ .ss-w-gt-sw--exact { background: var(--ss-w-correct); }
941
+ .ss-w-gt-sw--near { background: var(--ss-w-accent); }
937
942
  /* Higher or Lower terminal score unit. */
938
943
  .ss-w-hl-over-unit { font-size: 14px; font-weight: 700; color: var(--ss-w-faint); }
939
944
  .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; }
@@ -1000,6 +1005,22 @@
1000
1005
  .ss-w-gt-title { font-size: 18px; font-weight: 800; text-transform: uppercase; letter-spacing: .02em; color: var(--ss-w-ink); line-height: 1; }
1001
1006
  .ss-w-gt-sub { font-size: 11px; color: var(--ss-w-faint); margin-top: 4px; }
1002
1007
  .ss-w-gt-left { margin-left: auto; flex: none; font-size: 11px; font-weight: 700; color: var(--ss-w-accent); background: color-mix(in srgb, var(--ss-w-accent) 11%, var(--ss-w-panel)); border: 1px solid color-mix(in srgb, var(--ss-w-accent) 22%, var(--ss-w-line)); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
1008
+ /* Hero card — portrait + the masked profile the fan is hunting on. On reveal the silhouette
1009
+ becomes the real photo (or initials) and the profile rows drop away. Fully token-driven. */
1010
+ .ss-w-gt-card { display: grid; grid-template-columns: 96px 1fr; gap: 12px; background: var(--ss-w-bubble); border: 1px solid var(--ss-w-line); border-radius: 14px; padding: 12px; }
1011
+ .ss-w-gt-card--reveal { grid-template-columns: 1fr; justify-items: center; }
1012
+ .ss-w-gt-sil { width: 96px; height: 118px; border-radius: 11px; overflow: hidden; background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); display: grid; place-items: center; }
1013
+ .ss-w-gt-sil svg, .ss-w-gt-sil img { display: block; width: 100%; height: 100%; }
1014
+ .ss-w-gt-sil img { object-fit: cover; }
1015
+ .ss-w-gt-attrs { display: flex; flex-direction: column; justify-content: center; }
1016
+ .ss-w-gt-attr { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 2px; }
1017
+ .ss-w-gt-attr + .ss-w-gt-attr { border-top: 1px solid var(--ss-w-line); }
1018
+ .ss-w-gt-attr-k { color: var(--ss-w-faint); font-size: 12px; font-weight: 600; }
1019
+ .ss-w-gt-attr-v { color: var(--ss-w-faint); font-size: 13px; font-weight: 800; letter-spacing: .12em; }
1020
+ /* Progress dots — one per guess allowance; used guesses filled with the accent. */
1021
+ .ss-w-gt-dots { display: flex; gap: 7px; justify-content: center; }
1022
+ .ss-w-gt-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ss-w-wrong); }
1023
+ .ss-w-gt-dot--on { background: var(--ss-w-accent); }
1003
1024
  /* Guess rows — one labelled block per guess */
1004
1025
  .ss-w-gtrows { display: flex; flex-direction: column; gap: 8px; }
1005
1026
  /* First-load legend (empty state) */
@@ -1037,13 +1058,19 @@
1037
1058
  /* Pair: player A | Higher/Lower | player B */
1038
1059
  .ss-w-hlpair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: stretch; }
1039
1060
  .ss-w-hlpc { background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px 6px; text-align: center; min-width: 0; }
1040
- .ss-w-hlpc-av { width: 42px; height: 42px; border-radius: 50%; background: var(--ss-w-bubble); border: 1px solid var(--ss-w-line); display: grid; place-items: center; font-size: 20px; flex: none; }
1061
+ /* Player photo (was a 42px ball emoji): fixed 60px circle on both cards so they stay identical
1062
+ regardless of name length. Falls back to initials when no photo URL is present. */
1063
+ .ss-w-hlpc-av { width: 60px; height: 60px; border-radius: 50%; overflow: hidden; background: var(--ss-w-bubble); border: 1px solid var(--ss-w-line); display: grid; place-items: center; flex: none; }
1064
+ .ss-w-hlpc-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
1065
+ .ss-w-av-initials { font-size: 18px; font-weight: 800; color: var(--ss-w-faint); text-transform: uppercase; letter-spacing: .02em; }
1041
1066
  .ss-w-hlpc-name { font-size: 12.5px; font-weight: 700; color: var(--ss-w-ink); line-height: 1.15; }
1042
1067
  .ss-w-hlpc-stat { font-size: 8.5px; color: var(--ss-w-faint); text-transform: uppercase; letter-spacing: .04em; }
1043
1068
  .ss-w-hlpc-val { font-size: 30px; font-weight: 800; color: var(--ss-w-accent); font-variant-numeric: tabular-nums; line-height: 1; }
1044
1069
  .ss-w-hlpc-val--hidden { color: var(--ss-w-faint); }
1045
- /* Higher / Lower — middle column */
1046
- .ss-w-hlbtns { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
1070
+ /* Higher / Lower — middle column. The pair grid stretches this column to the cards' height, so
1071
+ space-between pins Higher to the top and Lower to the bottom, with "or" centered between the
1072
+ two players. */
1073
+ .ss-w-hlbtns { display: flex; flex-direction: column; gap: 6px; justify-content: space-between; }
1047
1074
  .ss-w-hl-or { text-align: center; font-size: 11px; font-weight: 700; color: var(--ss-w-faint); }
1048
1075
  .ss-w-hlbtn { font: inherit; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; border-radius: 9px; padding: 10px 12px; cursor: pointer; border: 1px solid var(--ss-w-line); white-space: nowrap; transition: border-color .1s, background .1s; }
1049
1076
  /* Both options are neutral until picked — an amber default read as "already selected". */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sensiblestats/widget-react",
3
- "version": "0.58.0",
3
+ "version": "0.59.1",
4
4
  "description": "Embeddable SensibleStats chat widget for React.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",