@sensiblestats/widget-react 0.30.0 → 0.31.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/CHANGELOG.md +17 -0
- package/dist/index.cjs +1303 -576
- 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 +1297 -570
- package/dist/index.js.map +1 -1
- package/dist/styles.css +79 -4
- package/package.json +2 -2
package/dist/styles.css
CHANGED
|
@@ -61,7 +61,10 @@
|
|
|
61
61
|
.ss-w-close { margin-left: auto; background: none; border: none; color: var(--ss-w-faint); cursor: pointer; font-size: 16px; display: grid; place-items: center; }
|
|
62
62
|
|
|
63
63
|
/* messages */
|
|
64
|
-
.ss-w-list
|
|
64
|
+
/* .ss-w-mon-list (Matches/Odds tab scrollers) shares .ss-w-list's box/scroll rules by design --
|
|
65
|
+
same visual rhythm as the chat message list -- but gets its own class so it isn't the same DOM
|
|
66
|
+
landmark as the chat list when both exist in the panel at once (Task 16 fix round, M4). */
|
|
67
|
+
.ss-w-list, .ss-w-mon-list { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; scroll-padding-top: 14px; }
|
|
65
68
|
/* Transient bottom spacer: reserves a viewport of room below a new turn so its
|
|
66
69
|
top can be scrolled into view while the reply is still streaming in. Height is
|
|
67
70
|
set imperatively and flex must not shrink it away. */
|
|
@@ -177,8 +180,6 @@
|
|
|
177
180
|
.ss-w-bi-odds b { font-size: 20px; font-family: ui-monospace, monospace; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ss-w-accent); line-height: 1.05; }
|
|
178
181
|
.ss-w-bi-book { font-size: 9.5px; color: var(--ss-w-faint); }
|
|
179
182
|
.ss-w-bi-action-row .ss-w-slip { flex: none; }
|
|
180
|
-
/* let the slip toast size to its own text and anchor to the card's right edge, not the button width */
|
|
181
|
-
.ss-w-bi-action-row .ss-w-toast { left: auto; right: 0; width: max-content; max-width: 210px; white-space: normal; }
|
|
182
183
|
|
|
183
184
|
/* row 3: bar-chart glyph + reasoning prose + stats-expander chevron, in a subtle strip */
|
|
184
185
|
.ss-w-bi-reason { display: flex; align-items: flex-start; gap: 8px; background: var(--ss-w-bubble); border-radius: 10px; padding: 8px 10px; }
|
|
@@ -285,10 +286,21 @@
|
|
|
285
286
|
.ss-w-slip { position: relative; display: flex; }
|
|
286
287
|
.ss-w-slip-btn { font-size: 11.5px; font-weight: 620; color: var(--ss-w-cta-ink); background: var(--ss-w-cta); border: 1px solid var(--ss-w-cta); border-radius: 14px; padding: 5px 12px; cursor: pointer; }
|
|
287
288
|
.ss-w-slip-btn:disabled { opacity: .6; cursor: default; background: var(--ss-w-bubble); color: var(--ss-w-faint); border-color: var(--ss-w-line); }
|
|
288
|
-
|
|
289
|
+
/* Anchored to the RIGHT of its (narrow) button wrapper and sized by content, growing leftward
|
|
290
|
+
into the card -- inheriting the wrapper's width squeezes the text to one character per line.
|
|
291
|
+
Every toast site (slip buttons, pin toggles) sits at the right edge of its row. */
|
|
292
|
+
.ss-w-toast { position: absolute; top: calc(100% + 6px); right: 0; z-index: 1; width: max-content; max-width: 210px; font-size: 11px; font-weight: 560; border-radius: 10px; padding: 5px 10px; overflow-wrap: anywhere; box-shadow: 0 4px 14px rgba(0,0,0,.14); }
|
|
289
293
|
.ss-w-toast-success { color: var(--ss-w-accent); background: color-mix(in srgb, var(--ss-w-accent) 14%, var(--ss-w-panel)); border: 1px solid color-mix(in srgb, var(--ss-w-accent) 30%, var(--ss-w-line)); }
|
|
290
294
|
.ss-w-toast-error { color: #c0392b; background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); }
|
|
291
295
|
|
|
296
|
+
/* pin affordance */
|
|
297
|
+
.ss-w-pin-wrap { position: relative; display: inline-flex; flex: none; }
|
|
298
|
+
.ss-w-pin { flex: none; display: grid; place-items: center; width: 22px; height: 22px; padding: 0; border-radius: 50%; background: none; border: 1px solid var(--ss-w-line); color: var(--ss-w-faint); cursor: pointer; }
|
|
299
|
+
.ss-w-pin svg { width: 12px; height: 12px; }
|
|
300
|
+
.ss-w-pin:hover { color: var(--ss-w-ink); border-color: var(--ss-w-faint); }
|
|
301
|
+
.ss-w-pin[data-on] { background: var(--ss-w-accent); border-color: var(--ss-w-accent); color: #fff; }
|
|
302
|
+
.ss-w-pin[data-on]:hover { background: var(--ss-w-accent); color: #fff; }
|
|
303
|
+
|
|
292
304
|
@media (prefers-reduced-motion: reduce) {
|
|
293
305
|
.ss-w-abtn-shimmer { animation: none; }
|
|
294
306
|
}
|
|
@@ -657,3 +669,66 @@
|
|
|
657
669
|
.ss-w-fandash-live-legend-swatch { width: 10px; height: 10px; border-radius: 3px; flex: none; }
|
|
658
670
|
.ss-w-fandash-live-legend-swatch--home { background: var(--ss-w-home); }
|
|
659
671
|
.ss-w-fandash-live-legend-swatch--away { background: var(--ss-w-away); }
|
|
672
|
+
|
|
673
|
+
/* live monitor tab bar: underline pattern mirrors .ss-w-ecard-scope; the unread dot uses --ss-w-neg */
|
|
674
|
+
.ss-w-tabs { display: flex; align-items: stretch; gap: 2px; border-bottom: 1px solid var(--ss-w-line); }
|
|
675
|
+
.ss-w-tab { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 620; color: var(--ss-w-faint); background: none; border: none; cursor: pointer; padding: 9px 12px; margin-bottom: -1px; border-bottom: 2px solid transparent; }
|
|
676
|
+
.ss-w-tab[data-on] { color: var(--ss-w-ink); border-bottom-color: var(--ss-w-accent); }
|
|
677
|
+
.ss-w-tab-count { font-size: 10.5px; font-weight: 700; color: var(--ss-w-faint); background: var(--ss-w-bubble); border-radius: 999px; padding: 1px 6px; }
|
|
678
|
+
.ss-w-tab[data-on] .ss-w-tab-count { color: var(--ss-w-accent); }
|
|
679
|
+
.ss-w-tab-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--ss-w-neg); flex: none; }
|
|
680
|
+
|
|
681
|
+
/* Matches tab match card (MonitorMatchCard): pill row, crest/score main row, per-stat split
|
|
682
|
+
bars (venue-oriented -- home always left/blue, away always right/red, never club-oriented,
|
|
683
|
+
the u316 bug class), a promoted-market strip for the user's pinned stat chips, and a grace
|
|
684
|
+
note once the match has gone full time. Reuses the --ss-w-home/--ss-w-away/--ss-w-track venue
|
|
685
|
+
tokens and .ss-w-fandash-live-pill for the Live pill so all live surfaces share one look. */
|
|
686
|
+
.ss-w-mon { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--ss-w-line); border-radius: 12px; background: var(--ss-w-panel); }
|
|
687
|
+
.ss-w-mon-top { display: flex; align-items: center; gap: 8px; }
|
|
688
|
+
.ss-w-mon-pill { display: inline-flex; flex: none; align-items: center; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ss-w-faint); background: var(--ss-w-bubble); border-radius: 6px; padding: 3px 8px; }
|
|
689
|
+
.ss-w-mon-min { flex: none; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ss-w-ink); }
|
|
690
|
+
.ss-w-mon-comp { margin-left: auto; font-size: 11px; font-weight: 650; color: var(--ss-w-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
691
|
+
.ss-w-mon-main { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
|
|
692
|
+
.ss-w-mon-side { display: flex; align-items: center; gap: 8px; min-width: 0; }
|
|
693
|
+
.ss-w-mon-side--away { flex-direction: row-reverse; text-align: right; }
|
|
694
|
+
/* long club names (Wolverhampton Wanderers) wrap to two lines instead of truncating mid-word */
|
|
695
|
+
.ss-w-mon-name { min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.2; font-size: 13px; font-weight: 700; color: var(--ss-w-ink); }
|
|
696
|
+
.ss-w-mon-vs { font-size: 12px; font-weight: 700; color: var(--ss-w-faint); text-transform: uppercase; }
|
|
697
|
+
.ss-w-mon-score { display: flex; align-items: baseline; justify-content: center; font-size: 26px; font-weight: 850; font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; color: var(--ss-w-ink); }
|
|
698
|
+
.ss-w-mon-score i { font-style: normal; color: var(--ss-w-faint); font-weight: 500; margin: 0 4px; }
|
|
699
|
+
.ss-w-mon-scorers { font-size: 11.5px; color: var(--ss-w-faint); overflow-wrap: anywhere; }
|
|
700
|
+
.ss-w-mon-stats { display: flex; flex-direction: column; gap: 10px; }
|
|
701
|
+
.ss-w-mon-stat { display: flex; flex-direction: column; gap: 5px; }
|
|
702
|
+
.ss-w-mon-pstrip { padding: 6px 8px; border-radius: 8px; background: color-mix(in srgb, var(--ss-w-accent) 8%, transparent); }
|
|
703
|
+
.ss-w-mon-stat-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 8px; }
|
|
704
|
+
.ss-w-mon-stat-v { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ss-w-ink); }
|
|
705
|
+
.ss-w-mon-stat-v--home { color: var(--ss-w-home); }
|
|
706
|
+
.ss-w-mon-stat-v--away { color: var(--ss-w-away); text-align: right; }
|
|
707
|
+
.ss-w-mon-stat-l { font-size: 10px; font-weight: 700; text-align: center; color: var(--ss-w-faint); text-transform: uppercase; letter-spacing: .03em; }
|
|
708
|
+
.ss-w-mon-bar { position: relative; height: 6px; border-radius: 999px; background: var(--ss-w-track); overflow: hidden; display: flex; }
|
|
709
|
+
.ss-w-mon-bar-home { height: 100%; background: var(--ss-w-home); }
|
|
710
|
+
.ss-w-mon-bar-away { height: 100%; background: var(--ss-w-away); margin-left: auto; }
|
|
711
|
+
.ss-w-mon-stat-mkt { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ss-w-faint); }
|
|
712
|
+
.ss-w-mon-mkt { background: color-mix(in srgb, var(--ss-w-accent) 10%, transparent); border-radius: 6px; padding: 3px 6px; color: var(--ss-w-ink); }
|
|
713
|
+
.ss-w-mon-stat-mkt-right { display: flex; align-items: center; gap: 6px; margin-left: auto; }
|
|
714
|
+
.ss-w-mon-price { font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 700; color: var(--ss-w-accent); }
|
|
715
|
+
.ss-w-mon-susp { font-size: 10.5px; font-weight: 700; color: var(--ss-w-faint); background: var(--ss-w-bubble); border-radius: 6px; padding: 2px 6px; }
|
|
716
|
+
.ss-w-mon-asof { display: block; font-size: 10.5px; font-weight: 600; color: var(--ss-w-cta); }
|
|
717
|
+
.ss-w-mon-grace { font-size: 11px; color: var(--ss-w-faint); border-top: 1px solid var(--ss-w-line); padding-top: 8px; }
|
|
718
|
+
|
|
719
|
+
/* Matches/Odds tab panels (MonitorTabs): the shared per-market-pin context line, the empty
|
|
720
|
+
state shown when the snapshot carries no matches/markets yet, the persistent D5 in-slip badge,
|
|
721
|
+
and the per-market-pin wrapper card (struck price on settlement is a pure CSS hook off its
|
|
722
|
+
[data-settled] attribute -- no separate class on the price element itself). */
|
|
723
|
+
.ss-w-mk-ctx { display: flex; align-items: center; gap: 6px; padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--ss-w-line); }
|
|
724
|
+
/* the score and the trailing badges/pin never shrink or wrap -- only the fixture name truncates */
|
|
725
|
+
.ss-w-mk-ctx b { flex: none; white-space: nowrap; }
|
|
726
|
+
/* the context line's fixture name stays single-line (the two-line clamp is for the match card) */
|
|
727
|
+
.ss-w-mk-ctx .ss-w-mon-name { display: block; white-space: nowrap; text-overflow: ellipsis; }
|
|
728
|
+
.ss-w-mk-ctx-right { display: flex; align-items: center; gap: 6px; margin-left: auto; flex: none; }
|
|
729
|
+
/* flex:1 keeps the composer pinned to the panel bottom when a tab is empty */
|
|
730
|
+
.ss-w-mon-empty { flex: 1; padding: 24px 16px; text-align: center; font-size: 12.5px; color: var(--ss-w-faint); }
|
|
731
|
+
.ss-w-mon-inslip { display: inline-flex; flex: none; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; color: var(--ss-w-pos); }
|
|
732
|
+
.ss-w-mon-oddspin { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--ss-w-line); border-radius: 12px; background: var(--ss-w-panel); }
|
|
733
|
+
.ss-w-mon-oddspin[data-settled] .ss-w-mo-price,
|
|
734
|
+
.ss-w-mon-oddspin[data-settled] .ss-w-mon-price { text-decoration: line-through; color: var(--ss-w-faint); }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sensiblestats/widget-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.1",
|
|
4
4
|
"description": "Embeddable SensibleStats chat widget for React.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"prepublishOnly": "yarn build"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@sensiblestats/widget-sdk": "^0.
|
|
40
|
+
"@sensiblestats/widget-sdk": "^0.27.0",
|
|
41
41
|
"react-markdown": "^9.0.1",
|
|
42
42
|
"remark-gfm": "^4.0.0"
|
|
43
43
|
},
|