@sensiblestats/widget-react 0.35.0 → 0.37.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 +23 -0
- package/README.md +112 -0
- package/dist/index.cjs +413 -195
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +404 -186
- package/dist/index.js.map +1 -1
- package/dist/styles.css +46 -1
- package/package.json +2 -2
package/dist/styles.css
CHANGED
|
@@ -41,8 +41,40 @@
|
|
|
41
41
|
.ss-w-fab { width: 56px; height: 56px; border: none; border-radius: 50%; background: var(--ss-w-nav); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(0,0,0,.28); }
|
|
42
42
|
.ss-w-fab-mark { width: 30px; height: 30px; display: block; object-fit: contain; }
|
|
43
43
|
.ss-w-greeting { max-width: 240px; display: flex; align-items: flex-start; background: var(--ss-w-panel); color: var(--ss-w-ink); border: 1px solid var(--ss-w-line); border-radius: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.14); }
|
|
44
|
-
.ss-w-greeting-body { flex: 1; min-width: 0; text-align: left; background: none; border: none; color: inherit; font: inherit; cursor: pointer; padding: 9px 4px 9px 12px; }
|
|
44
|
+
.ss-w-greeting-body { position: relative; flex: 1; min-width: 0; text-align: left; background: none; border: none; color: inherit; font: inherit; cursor: pointer; padding: 9px 4px 9px 12px; }
|
|
45
45
|
.ss-w-greeting-x { flex: none; background: none; border: none; color: var(--ss-w-faint); cursor: pointer; font-size: 17px; line-height: 1; padding: 7px 9px 0 2px; }
|
|
46
|
+
.ss-w-greeting-text { display: block; }
|
|
47
|
+
/* Typing indicator: overlays the text area so bubble height stays put; hidden at
|
|
48
|
+
rest, revealed only during the one-shot intro (see prefers-reduced-motion block). */
|
|
49
|
+
.ss-w-greeting-dots { position: absolute; top: 0; bottom: 0; left: 12px; display: flex; align-items: center; gap: 4px; opacity: 0; pointer-events: none; }
|
|
50
|
+
.ss-w-greeting-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--ss-w-faint); display: block; }
|
|
51
|
+
/* One-shot launcher attention intro: FAB nudges, then the greeting types in.
|
|
52
|
+
Gated behind no-preference so reduce-motion users get the greeting shown
|
|
53
|
+
statically (text visible, no nudge, no typing). ChatFab adds .ss-w-intro once
|
|
54
|
+
per page load; every animation runs a single time and settles at rest. */
|
|
55
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
56
|
+
.ss-w-intro .ss-w-fab { animation: ss-w-nudge .8s ease both; }
|
|
57
|
+
.ss-w-intro .ss-w-greeting { animation: ss-w-greet-in .45s cubic-bezier(.2,.8,.3,1.15) .8s both; }
|
|
58
|
+
.ss-w-intro .ss-w-greeting-text { animation: ss-w-greet-textin .4s ease 1.65s both; }
|
|
59
|
+
.ss-w-intro .ss-w-greeting-dots { animation: ss-w-greet-dots .95s ease .85s both; }
|
|
60
|
+
.ss-w-intro .ss-w-greeting-dots i { animation: ss-w-greet-dotbounce .5s ease .85s 2; }
|
|
61
|
+
.ss-w-intro .ss-w-greeting-dots i:nth-child(2) { animation-delay: 1s; }
|
|
62
|
+
.ss-w-intro .ss-w-greeting-dots i:nth-child(3) { animation-delay: 1.15s; }
|
|
63
|
+
}
|
|
64
|
+
@keyframes ss-w-nudge {
|
|
65
|
+
0%, 100% { transform: none; }
|
|
66
|
+
22% { transform: translateY(-9px) rotate(-9deg); }
|
|
67
|
+
44% { transform: translateY(0) rotate(7deg); }
|
|
68
|
+
64% { transform: translateY(-4px) rotate(-4deg); }
|
|
69
|
+
82% { transform: rotate(2deg); }
|
|
70
|
+
}
|
|
71
|
+
@keyframes ss-w-greet-in {
|
|
72
|
+
from { opacity: 0; transform: translateY(8px) scale(.92); }
|
|
73
|
+
to { opacity: 1; transform: none; }
|
|
74
|
+
}
|
|
75
|
+
@keyframes ss-w-greet-textin { from { opacity: 0; } to { opacity: 1; } }
|
|
76
|
+
@keyframes ss-w-greet-dots { 0% { opacity: 0; } 14% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; } }
|
|
77
|
+
@keyframes ss-w-greet-dotbounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
|
|
46
78
|
|
|
47
79
|
/* panel */
|
|
48
80
|
.ss-w-panel { position: fixed; bottom: calc(var(--ss-w-offset-y) + 72px); z-index: 2147483000; display: flex; flex-direction: column; width: min(460px, calc(100vw - 40px)); height: min(640px, calc(100vh - 120px)); background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: var(--ss-w-radius); overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.24); }
|
|
@@ -746,3 +778,16 @@
|
|
|
746
778
|
.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); }
|
|
747
779
|
.ss-w-mon-oddspin[data-settled] .ss-w-mo-price,
|
|
748
780
|
.ss-w-mon-oddspin[data-settled] .ss-w-mon-price { text-decoration: line-through; color: var(--ss-w-faint); }
|
|
781
|
+
|
|
782
|
+
/* market accordion (Task 9): one collapsed row per available market, expanding into a reused
|
|
783
|
+
MarketOddsCardList ladder (hideHeader -- the row header already carries the market label). */
|
|
784
|
+
.ss-w-acc { display: flex; flex-direction: column; gap: 6px; }
|
|
785
|
+
.ss-w-acc-row { background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 12px; border-left: 3px solid var(--ss-w-accent); overflow: hidden; }
|
|
786
|
+
.ss-w-acc-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 11px; background: none; border: none; cursor: pointer; text-align: left; font: inherit; color: var(--ss-w-ink); }
|
|
787
|
+
.ss-w-acc-chevron { color: var(--ss-w-faint); font-size: 11px; }
|
|
788
|
+
.ss-w-acc-label { font-size: 12.5px; font-weight: 600; }
|
|
789
|
+
.ss-w-acc-badge { font-size: 10.5px; font-weight: 700; color: var(--ss-w-accent); }
|
|
790
|
+
.ss-w-acc-susp { margin-left: auto; font-size: 10.5px; color: var(--ss-w-faint); }
|
|
791
|
+
.ss-w-acc-panel { padding: 0 11px 10px; display: flex; flex-direction: column; gap: 8px; }
|
|
792
|
+
.ss-w-acc-insight { font-size: 12px; color: var(--ss-w-ink); background: color-mix(in srgb, var(--ss-w-accent) 9%, var(--ss-w-panel)); border-radius: 8px; padding: 7px 9px; }
|
|
793
|
+
.ss-w-acc-retry { font-size: 12px; color: var(--ss-w-neg); cursor: pointer; padding: 6px 0; }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sensiblestats/widget-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.37.0",
|
|
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.30.0",
|
|
41
41
|
"react-markdown": "^9.0.1",
|
|
42
42
|
"remark-gfm": "^4.0.0"
|
|
43
43
|
},
|