@sensiblestats/widget-react 0.110.0 → 0.112.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 +24 -0
- package/README.md +10 -1
- package/dist/index.cjs +1152 -1365
- 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 +946 -1159
- package/dist/index.js.map +1 -1
- package/dist/styles.css +16 -44
- package/package.json +2 -2
package/dist/styles.css
CHANGED
|
@@ -618,7 +618,7 @@
|
|
|
618
618
|
.ss-w-combo-addall .ss-w-slip-btn { min-height: 44px; padding: 10px 16px; font-size: 14px; font-weight: 650; border-radius: 22px; white-space: normal; }
|
|
619
619
|
.ss-w-combo-addall .ss-w-toast { position: static; width: auto; max-width: none; font-size: 12px; box-shadow: none; }
|
|
620
620
|
|
|
621
|
-
/* onboarding presets
|
|
621
|
+
/* onboarding presets: the combo builder (spec Stage 2 Behaviour, board 2c). A sheet
|
|
622
622
|
over the message list, inside .ss-w-chat-layer; the body scrolls and the builder's Send sits in
|
|
623
623
|
the footer, so it stays visible on a phone. Colours come from the theme tokens. */
|
|
624
624
|
.ss-w-tool-backdrop { position: absolute; inset: 0; z-index: 3; display: flex; flex-direction: column; justify-content: flex-end; background: rgba(0,0,0,.35); }
|
|
@@ -629,15 +629,6 @@
|
|
|
629
629
|
.ss-w-tool-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 12px; padding: 4px 14px 14px; }
|
|
630
630
|
.ss-w-tool-body > * { flex: none; }
|
|
631
631
|
.ss-w-tool-foot { flex: none; padding: 10px 14px 12px; border-top: 1px solid var(--ss-w-line); }
|
|
632
|
-
.ss-w-tool-row { display: flex; flex-direction: column; gap: 8px; padding: 10px 11px; border: 1px solid var(--ss-w-line); border-left: 3px solid var(--ss-w-accent); border-radius: 12px; }
|
|
633
|
-
.ss-w-tool-ask { font-size: 14px; font-weight: 650; line-height: 1.7; color: var(--ss-w-ink); overflow-wrap: anywhere; }
|
|
634
|
-
.ss-w-tool-num { position: relative; display: inline-block; vertical-align: middle; margin: 0 2px; font-variant-numeric: tabular-nums; font-weight: 800; color: var(--ss-w-accent); }
|
|
635
|
-
.ss-w-tool-num-size { display: block; font-size: max(16px, 1em); user-select: none; -webkit-user-select: none; visibility: hidden; box-sizing: border-box; min-width: 44px; min-height: 32px; padding: 6px 26px 6px 10px; line-height: 1.3; white-space: pre; }
|
|
636
|
-
.ss-w-tool-num-select { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0 22px 0 10px; font: inherit; font-size: max(16px, 1em); font-variant-numeric: tabular-nums; font-weight: 800; color: var(--ss-w-accent); background-color: color-mix(in srgb, var(--ss-w-accent) 10%, var(--ss-w-panel)); border: 1.5px solid color-mix(in srgb, var(--ss-w-accent) 65%, var(--ss-w-line)); border-radius: 8px; cursor: pointer; appearance: none; -webkit-appearance: none; }
|
|
637
|
-
.ss-w-tool-num::after { content: ""; position: absolute; right: 9px; top: 50%; width: 5px; height: 5px; margin-top: -4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); pointer-events: none; }
|
|
638
|
-
.ss-w-tool-num-select:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: 2px; }
|
|
639
|
-
.ss-w-tool-num-select option { font-weight: 600; color: var(--ss-w-ink); background: var(--ss-w-panel); }
|
|
640
|
-
.ss-w-tool-num-select option:disabled { color: var(--ss-w-faint); }
|
|
641
632
|
.ss-w-tool-picks { list-style: none; display: flex; flex-direction: column; gap: 4px; }
|
|
642
633
|
.ss-w-tool-pick { display: grid; grid-template-columns: 1fr auto; column-gap: 8px; padding: 5px 8px; font-size: 12px; line-height: 1.35; background: var(--ss-w-bubble); border-radius: 8px; }
|
|
643
634
|
.ss-w-tool-pick-match { grid-column: 1; font-weight: 650; color: var(--ss-w-ink); overflow-wrap: anywhere; }
|
|
@@ -646,13 +637,6 @@
|
|
|
646
637
|
.ss-w-tool-pick-price { grid-column: 2; grid-row: 1 / span 3; align-self: center; font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 800; color: var(--ss-w-accent); }
|
|
647
638
|
.ss-w-tool-math { padding: 6px 8px; font-family: ui-monospace, monospace; font-variant-numeric: tabular-nums; font-size: 13px; font-weight: 700; text-align: right; color: var(--ss-w-ink); background: color-mix(in srgb, var(--ss-w-accent) 9%, var(--ss-w-panel)); border-radius: 8px; overflow-wrap: anywhere; }
|
|
648
639
|
.ss-w-tool-unavailable { padding: 6px 8px; font-size: 12px; color: var(--ss-w-faint); border: 1px dashed var(--ss-w-line); border-radius: 8px; }
|
|
649
|
-
.ss-w-tool-row--ask { flex-direction: row; align-items: center; gap: 10px; border-left-width: 1px; }
|
|
650
|
-
.ss-w-tool-icon { flex: none; font-size: 20px; line-height: 1; }
|
|
651
|
-
.ss-w-tool-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
|
|
652
|
-
.ss-w-tool-ready { padding: 2px 8px; font-size: 11.5px; font-weight: 650; color: var(--ss-w-accent); background: color-mix(in srgb, var(--ss-w-accent) 12%, transparent); border-radius: 10px; }
|
|
653
|
-
.ss-w-tool-go { flex: none; width: 44px; height: 44px; display: grid; place-items: center; font-size: 17px; color: #fff; background: var(--ss-w-accent); border: none; border-radius: 50%; cursor: pointer; }
|
|
654
|
-
.ss-w-tool-go:disabled { color: var(--ss-w-faint); background: var(--ss-w-bubble); cursor: not-allowed; }
|
|
655
|
-
.ss-w-tool-go:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: 2px; }
|
|
656
640
|
.ss-w-tool-send { align-self: flex-end; min-height: 40px; padding: 8px 18px; font: inherit; font-size: 13px; font-weight: 700; color: #fff; background: var(--ss-w-accent); border: none; border-radius: 20px; cursor: pointer; }
|
|
657
641
|
.ss-w-tool-send:disabled { color: var(--ss-w-faint); background: var(--ss-w-bubble); cursor: not-allowed; }
|
|
658
642
|
.ss-w-tool-foot .ss-w-tool-send { width: 100%; }
|
|
@@ -665,35 +649,23 @@
|
|
|
665
649
|
.ss-w-tool-step { width: 40px; height: 40px; display: grid; place-items: center; font: inherit; font-size: 18px; font-weight: 700; color: var(--ss-w-accent); background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 50%; cursor: pointer; }
|
|
666
650
|
.ss-w-tool-step:disabled { opacity: .5; cursor: not-allowed; }
|
|
667
651
|
.ss-w-tool-count { min-width: 24px; text-align: center; font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
|
|
652
|
+
.ss-w-set-row { display: flex; flex-direction: column; gap: 6px; }
|
|
653
|
+
.ss-w-set-sample { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; border: 1px solid var(--ss-w-line); border-radius: 10px; font-variant-numeric: tabular-nums; }
|
|
654
|
+
.ss-w-set-sample b { font-weight: 700; }
|
|
655
|
+
.ss-w-set-seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
|
|
656
|
+
.ss-w-set-seg button { min-height: 44px; padding: 0 4px; font: inherit; font-size: 13px; font-weight: 600; white-space: nowrap; color: var(--ss-w-ink); background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 10px; cursor: pointer; }
|
|
657
|
+
.ss-w-set-seg button[aria-pressed="true"] { font-weight: 700; border-color: var(--ss-w-accent); background: color-mix(in srgb, var(--ss-w-accent) 14%, var(--ss-w-panel)); }
|
|
658
|
+
.ss-w-set-seg button:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: 2px; }
|
|
659
|
+
.ss-w-set-foot { margin: 0; font-size: 12px; color: var(--ss-w-faint); }
|
|
660
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
661
|
+
.ss-w-set-backdrop-in { animation: ss-w-scrim-in .18s ease-out; }
|
|
662
|
+
.ss-w-set-backdrop-in > .ss-w-tool { animation: ss-w-sheet-in .18s ease-out; }
|
|
663
|
+
@keyframes ss-w-scrim-in { from { background-color: rgba(0,0,0,0); } }
|
|
664
|
+
@keyframes ss-w-sheet-in { from { transform: translateY(12%); } to { transform: none; } }
|
|
665
|
+
}
|
|
668
666
|
|
|
669
|
-
/*
|
|
670
|
-
layer is the message list's positioned box (P6), so the dial sits against the list's bottom
|
|
671
|
-
right and rises with the composer: right 8px puts the 44px button's centre on Send's (12px
|
|
672
|
-
padding + 18px), bottom 10px is above the composer's top border. While the button shows the list
|
|
673
|
-
gets 54px more bottom padding so its last message can scroll clear. */
|
|
667
|
+
/* The chat layer is the message list's positioned box: a preset tool sheet sits over it. */
|
|
674
668
|
.ss-w-chat-layer { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
|
|
675
|
-
.ss-w-chat-layer[data-dial] .ss-w-list { padding-bottom: 68px; }
|
|
676
|
-
.ss-w-dial { position: absolute; left: 12px; right: 8px; bottom: 10px; z-index: 2; display: flex; flex-direction: column-reverse; align-items: flex-end; gap: 8px; pointer-events: none; }
|
|
677
|
-
.ss-w-dial-btn, .ss-w-dial-pill { pointer-events: auto; }
|
|
678
|
-
.ss-w-dial-btn { position: relative; flex: none; width: 44px; height: 44px; display: grid; place-items: center; padding: 0; font-size: 20px; color: var(--ss-w-accent); background: var(--ss-w-panel); border: 1px solid color-mix(in srgb, var(--ss-w-accent) 40%, var(--ss-w-line)); border-radius: 50%; box-shadow: 0 4px 14px rgba(0,0,0,.18); cursor: pointer; }
|
|
679
|
-
.ss-w-dial-btn[aria-expanded="true"] { color: var(--ss-w-panel); background: var(--ss-w-accent); border-color: var(--ss-w-accent); }
|
|
680
|
-
.ss-w-dial-btn:focus-visible, .ss-w-dial-pill:focus-visible { outline: 2px solid var(--ss-w-accent); outline-offset: 2px; }
|
|
681
|
-
.ss-w-dial-icon { grid-area: 1 / 1; display: grid; place-items: center; transition: transform 200ms ease, opacity 200ms ease; }
|
|
682
|
-
.ss-w-dial-icon--close { opacity: 0; transform: rotate(-90deg); }
|
|
683
|
-
.ss-w-dial-btn[aria-expanded="true"] .ss-w-dial-icon--open { opacity: 0; transform: rotate(90deg); }
|
|
684
|
-
.ss-w-dial-btn[aria-expanded="true"] .ss-w-dial-icon--close { opacity: 1; transform: none; }
|
|
685
|
-
.ss-w-dial-dot { position: absolute; top: 3px; right: 3px; width: 10px; height: 10px; background: var(--ss-w-accent); border: 2px solid var(--ss-w-panel); border-radius: 50%; }
|
|
686
|
-
.ss-w-dial-pills { max-width: 100%; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
|
|
687
|
-
.ss-w-dial-pill { max-width: 100%; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px 6px 12px; font: inherit; font-size: 12.5px; font-weight: 650; line-height: 1.25; text-align: left; white-space: normal; overflow-wrap: anywhere; color: var(--ss-w-ink); background: var(--ss-w-panel); border: 1px solid color-mix(in srgb, var(--ss-w-accent) 35%, var(--ss-w-line)); border-radius: 22px; box-shadow: 0 4px 14px rgba(0,0,0,.16); cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(14px) scale(.5); transform-origin: bottom right; transition: opacity 200ms ease, transform 200ms ease, visibility 0s linear 200ms; }
|
|
688
|
-
.ss-w-dial-pill svg { flex: none; font-size: 18px; color: var(--ss-w-accent); }
|
|
689
|
-
.ss-w-dial-pill-label { min-width: 0; }
|
|
690
|
-
.ss-w-dial-pills[data-open] .ss-w-dial-pill { opacity: 1; visibility: visible; transform: none; transition: opacity 200ms ease, transform 200ms ease, visibility 0s; }
|
|
691
|
-
@media (prefers-reduced-motion: reduce) {
|
|
692
|
-
.ss-w-dial-pill { transform: none; transition: opacity 200ms ease, visibility 0s linear 200ms; }
|
|
693
|
-
.ss-w-dial-pills[data-open] .ss-w-dial-pill { transition: opacity 200ms ease, visibility 0s; }
|
|
694
|
-
.ss-w-dial-icon { transition: opacity 200ms ease; }
|
|
695
|
-
.ss-w-dial-icon--close, .ss-w-dial-btn[aria-expanded="true"] .ss-w-dial-icon--open { transform: none; }
|
|
696
|
-
}
|
|
697
669
|
|
|
698
670
|
/* Compact price list (D16): three or more cards of one turn, one row per fixture. Team names wrap
|
|
699
671
|
to a second line and are never cut; the time sits above the match pin, with no column of its own. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sensiblestats/widget-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.112.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.79.0",
|
|
42
42
|
"react-markdown": "^9.0.1",
|
|
43
43
|
"remark-gfm": "^4.0.0"
|
|
44
44
|
},
|