@sensiblestats/widget-react 0.97.0 → 0.99.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 +17 -0
- package/README.md +11 -0
- package/dist/index.cjs +1527 -1328
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +1376 -1177
- package/dist/index.js.map +1 -1
- package/dist/styles.css +59 -7
- package/package.json +2 -2
package/dist/styles.css
CHANGED
|
@@ -734,7 +734,7 @@
|
|
|
734
734
|
}
|
|
735
735
|
|
|
736
736
|
/* greeting dashboard */
|
|
737
|
-
.ss-w-dash { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
|
|
737
|
+
.ss-w-dash { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; container-type: inline-size; }
|
|
738
738
|
.ss-w-dash-head { display: flex; flex-direction: column; }
|
|
739
739
|
.ss-w-dash-title { font-size: 18px; font-weight: 700; line-height: 1.25; color: var(--ss-w-ink); }
|
|
740
740
|
.ss-w-dash-subtitle { font-size: 13px; color: var(--ss-w-faint); margin-top: 4px; }
|
|
@@ -755,8 +755,8 @@
|
|
|
755
755
|
.ss-w-dash-tile-icon { flex: none; display: grid; place-items: center; width: 28px; height: 28px; font-size: 22px; }
|
|
756
756
|
.ss-w-dash-emoji { line-height: 1; }
|
|
757
757
|
.ss-w-dash-tile-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; flex: 1; }
|
|
758
|
-
.ss-w-dash-tile-title { min-width: 0; font-weight: 600; font-size: 14px; overflow-wrap:
|
|
759
|
-
.ss-w-dash-tile-subtitle { min-width: 0; font-size: 11.5px; color: var(--ss-w-faint); overflow-wrap:
|
|
758
|
+
.ss-w-dash-tile-title { min-width: 0; font-weight: 600; font-size: 14px; overflow-wrap: break-word; hyphens: manual; }
|
|
759
|
+
.ss-w-dash-tile-subtitle { min-width: 0; font-size: 11.5px; color: var(--ss-w-faint); overflow-wrap: break-word; hyphens: manual; }
|
|
760
760
|
.ss-w-dash-tile-chevron { flex: none; margin-left: auto; width: 14px; height: 14px; color: var(--ss-w-faint); }
|
|
761
761
|
|
|
762
762
|
/* Badge + crests share their own row, below the title -- NOT the icon/chevron row. A
|
|
@@ -778,6 +778,18 @@
|
|
|
778
778
|
families (.ss-w-binsight, .ss-w-mocard, .ss-w-omcard) so a market tile reads as
|
|
779
779
|
part of that visual language rather than a plain unstyled button. */
|
|
780
780
|
.ss-w-dash--market .ss-w-dash-tile { border-left: 3px solid var(--ss-w-accent); }
|
|
781
|
+
/* Market's two columns need the text column to fit a word: a half tile spends ~91px on border, padding,
|
|
782
|
+
icon and chevron, and a Turkish word such as "karşılaşma" is ~80px at 14px bold. Measured against the
|
|
783
|
+
dashboard's own width (a container query, not the viewport, since the panel is min(460px, 100vw - 40px)
|
|
784
|
+
and a host can embed it narrower still). Below 306px the half tiles are a single full-width column;
|
|
785
|
+
up to 349px the decorative chevron is dropped, as Discovery already does, to give the words ~24px back.
|
|
786
|
+
Words never break inside a tile (overflow-wrap: break-word), so the column count is what protects them. */
|
|
787
|
+
@container (max-width: 305px) {
|
|
788
|
+
.ss-w-dash--market .ss-w-dash-grid { grid-template-columns: minmax(0, 1fr); }
|
|
789
|
+
}
|
|
790
|
+
@container (min-width: 306px) and (max-width: 349px) {
|
|
791
|
+
.ss-w-dash--market .ss-w-dash-tile--half .ss-w-dash-tile-chevron { display: none; }
|
|
792
|
+
}
|
|
781
793
|
|
|
782
794
|
/* Goal: one column of compact cards, 60px tall with the badge as a price column on the right.
|
|
783
795
|
The value ink is accent mixed toward ink (as on the hero price): plain light accent on the
|
|
@@ -798,7 +810,8 @@
|
|
|
798
810
|
/* Discovery: tinted bento cards. Stacked (icon over text) so a two- or three-word title gets
|
|
799
811
|
the tile's full width instead of the ~100px left of a horizontal icon+chevron -- that narrow
|
|
800
812
|
column was wrapping "Most interesting angles" onto three lines. The chevron is dropped (the
|
|
801
|
-
whole card is the tap target)
|
|
813
|
+
whole card is the tap target). The badge + crest row wraps (the base .ss-w-dash-tile-meta rule): an
|
|
814
|
+
"8 matches" pill plus three crests is wider than a half tile at a 320px viewport. */
|
|
802
815
|
.ss-w-dash--discovery .ss-w-dash-tile { flex-direction: column; align-items: stretch; gap: 8px; }
|
|
803
816
|
.ss-w-dash--discovery .ss-w-dash-tile-icon { align-self: flex-start; width: 32px; height: 32px; font-size: 26px; }
|
|
804
817
|
.ss-w-dash--discovery .ss-w-dash-tile-chevron { display: none; }
|
|
@@ -806,7 +819,6 @@
|
|
|
806
819
|
(horizontal, centre-aligned) rather than stacking like the narrow half tiles. */
|
|
807
820
|
.ss-w-dash--discovery .ss-w-dash-tile--full { flex-direction: row; align-items: center; }
|
|
808
821
|
.ss-w-dash--discovery .ss-w-dash-tile--full .ss-w-dash-tile-icon { align-self: center; }
|
|
809
|
-
.ss-w-dash--discovery .ss-w-dash-tile-meta { flex-wrap: nowrap; }
|
|
810
822
|
.ss-w-dash--discovery .ss-w-dash-tile-crest { width: 22px; height: 22px; }
|
|
811
823
|
/* Tints mix a hue into the live panel rather than hardcoding a light pastel, so a dark
|
|
812
824
|
operator surface (e.g. --ss-w-panel set from a navy `surface` brand color) yields a
|
|
@@ -859,8 +871,8 @@
|
|
|
859
871
|
background: color-mix(in srgb, var(--ss-w-accent) 14%, var(--ss-w-panel));
|
|
860
872
|
}
|
|
861
873
|
.ss-w-dash-hero-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
|
|
862
|
-
.ss-w-dash-hero-title { font-size: 15.5px; font-weight: 700; line-height: 1.25; color: var(--ss-w-ink); overflow-wrap:
|
|
863
|
-
.ss-w-dash-hero-subtitle { font-size: 12px; color: var(--ss-w-faint); overflow-wrap:
|
|
874
|
+
.ss-w-dash-hero-title { font-size: 15.5px; font-weight: 700; line-height: 1.25; color: var(--ss-w-ink); overflow-wrap: break-word; hyphens: manual; }
|
|
875
|
+
.ss-w-dash-hero-subtitle { font-size: 12px; color: var(--ss-w-faint); overflow-wrap: break-word; hyphens: manual; }
|
|
864
876
|
.ss-w-dash-hero-price {
|
|
865
877
|
flex: none; margin-left: auto;
|
|
866
878
|
font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; font-size: 15px; font-weight: 750; line-height: 1;
|
|
@@ -869,6 +881,34 @@
|
|
|
869
881
|
border: 1px solid color-mix(in srgb, var(--ss-w-accent) 30%, var(--ss-w-panel));
|
|
870
882
|
}
|
|
871
883
|
|
|
884
|
+
/* Page-grounded additions (u591). Both only exist when the server sends `meta` / `imageCodes`, so an
|
|
885
|
+
older payload never reaches these rules. */
|
|
886
|
+
/* Hero meta ("Tip-off 02:30 · in 6 h", "Başlama 02:30 · 40 dk sonra"): takes the price's seat in the top
|
|
887
|
+
row. It is the one flexible item there -- the badge and chevron keep their width -- and it wraps
|
|
888
|
+
rather than truncates: at the narrowest panel the Turkish line (27 characters) has ~120px beside
|
|
889
|
+
the badge, and the minutes-to-tip are the part a cut-off "40..." would lose. The component keeps
|
|
890
|
+
each short " · "-separated part whole, so a wrap falls at the dot instead of inside "40 dk sonra". */
|
|
891
|
+
.ss-w-dash__keep { white-space: nowrap; }
|
|
892
|
+
.ss-w-dash__meta {
|
|
893
|
+
flex: 1 1 auto; min-width: 0; text-align: right; overflow-wrap: break-word; hyphens: manual;
|
|
894
|
+
font-size: 11.5px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums;
|
|
895
|
+
color: var(--ss-w-faint);
|
|
896
|
+
}
|
|
897
|
+
/* Text marks stand in for crests until the server has images: 22px circle / 7.5px in a tile, 40px /
|
|
898
|
+
12px in the hero (u592 D23). Ring and tint follow the crests they replace; unlike crests they do not
|
|
899
|
+
overlap, because the letters are the content and an overlap would clip the first one. */
|
|
900
|
+
.ss-w-dash__mark {
|
|
901
|
+
flex: none; display: grid; place-items: center; box-sizing: border-box;
|
|
902
|
+
width: 22px; height: 22px; border-radius: 50%; overflow: hidden;
|
|
903
|
+
font-size: 7.5px; font-weight: 700; line-height: 1; letter-spacing: .02em; white-space: nowrap;
|
|
904
|
+
color: var(--ss-w-ink);
|
|
905
|
+
background-color: color-mix(in srgb, var(--ss-w-ink) 6%, var(--ss-w-panel));
|
|
906
|
+
box-shadow: 0 0 0 2px var(--ss-w-panel), 0 0 0 3px color-mix(in srgb, var(--ss-w-ink) 10%, var(--ss-w-panel));
|
|
907
|
+
}
|
|
908
|
+
.ss-w-dash__mark + .ss-w-dash__mark { margin-left: 3px; }
|
|
909
|
+
.ss-w-dash-hero-visual .ss-w-dash__mark { width: 40px; height: 40px; font-size: 12px; }
|
|
910
|
+
.ss-w-dash-hero-visual .ss-w-dash__mark + .ss-w-dash__mark { margin-left: 6px; }
|
|
911
|
+
|
|
872
912
|
/* club fan pre-match dashboard */
|
|
873
913
|
.ss-w-fandash { display: flex; flex-direction: column; gap: 10px; padding: 4px 0; }
|
|
874
914
|
.ss-w-fandash-greeting { font-size: 14px; font-weight: 600; line-height: 1.3; color: var(--ss-w-ink); }
|
|
@@ -1199,6 +1239,18 @@
|
|
|
1199
1239
|
.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; }
|
|
1200
1240
|
.ss-w-mon-min { flex: none; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--ss-w-ink); }
|
|
1201
1241
|
.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; }
|
|
1242
|
+
/* Placeholder shapes for a pin with no data yet. Sizes match the real card's rows (24px crest,
|
|
1243
|
+
26px score line, the 22px pin that sets the top row) so the card does not jump when data lands. */
|
|
1244
|
+
.ss-w-mon-skel { cursor: progress; }
|
|
1245
|
+
.ss-w-skel { display: block; border-radius: 6px; background: linear-gradient(90deg, var(--ss-w-bubble), var(--ss-w-line), var(--ss-w-bubble)); background-size: 200% 100%; animation: ss-w-shimmer 1.2s infinite; }
|
|
1246
|
+
.ss-w-skel-pill { width: 64px; height: 18px; margin-right: auto; }
|
|
1247
|
+
.ss-w-skel-crest { flex: none; width: 24px; height: 24px; border-radius: 50%; }
|
|
1248
|
+
.ss-w-skel-name { flex: 1; height: 13px; }
|
|
1249
|
+
.ss-w-skel-score { width: 44px; height: 26px; }
|
|
1250
|
+
.ss-w-acc-load { height: 100px; border-radius: 8px; }
|
|
1251
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1252
|
+
.ss-w-skel { animation: none; background: var(--ss-w-line); }
|
|
1253
|
+
}
|
|
1202
1254
|
.ss-w-mon-main { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
|
|
1203
1255
|
.ss-w-mon-side { display: flex; align-items: center; gap: 8px; min-width: 0; }
|
|
1204
1256
|
.ss-w-mon-side--away { flex-direction: row-reverse; text-align: right; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sensiblestats/widget-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.99.0",
|
|
4
4
|
"description": "Embeddable SensibleStats chat widget for React.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"prepublishOnly": "yarn build"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@sensiblestats/widget-sdk": "^0.
|
|
41
|
+
"@sensiblestats/widget-sdk": "^0.66.0",
|
|
42
42
|
"react-markdown": "^9.0.1",
|
|
43
43
|
"remark-gfm": "^4.0.0"
|
|
44
44
|
},
|