@sensiblestats/widget-react 0.23.1 → 0.24.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 +11 -0
- package/dist/index.cjs +156 -46
- 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 +156 -46
- package/dist/index.js.map +1 -1
- package/dist/styles.css +30 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1521,67 +1521,147 @@ function LinksCard({ card }) {
|
|
|
1521
1521
|
] });
|
|
1522
1522
|
}
|
|
1523
1523
|
|
|
1524
|
-
// src/components/dashboard/
|
|
1524
|
+
// src/components/dashboard/PostMatchResultCard.tsx
|
|
1525
1525
|
import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
1526
|
+
function PostMatchResultCard({ card }) {
|
|
1527
|
+
const { data } = card;
|
|
1528
|
+
return /* @__PURE__ */ jsxs21("div", { className: "ss-w-fandash-card ss-w-fandash-postmatch-result", children: [
|
|
1529
|
+
card.title ? /* @__PURE__ */ jsx25("span", { className: "ss-w-fandash-eyebrow", children: card.title }) : null,
|
|
1530
|
+
/* @__PURE__ */ jsxs21("div", { className: "ss-w-fandash-postmatch-scoreboard", children: [
|
|
1531
|
+
/* @__PURE__ */ jsx25("span", { className: "ss-w-fandash-postmatch-team", children: data.homeName }),
|
|
1532
|
+
/* @__PURE__ */ jsx25("span", { className: "ss-w-fandash-postmatch-score", children: data.homeScore }),
|
|
1533
|
+
/* @__PURE__ */ jsx25("span", { className: "ss-w-fandash-postmatch-sep", children: "\u2013" }),
|
|
1534
|
+
/* @__PURE__ */ jsx25("span", { className: "ss-w-fandash-postmatch-score", children: data.awayScore }),
|
|
1535
|
+
/* @__PURE__ */ jsx25("span", { className: "ss-w-fandash-postmatch-team ss-w-fandash-postmatch-team--away", children: data.awayName })
|
|
1536
|
+
] }),
|
|
1537
|
+
/* @__PURE__ */ jsxs21("div", { className: "ss-w-fandash-postmatch-meta", children: [
|
|
1538
|
+
data.resultLabel,
|
|
1539
|
+
" \xB7 ",
|
|
1540
|
+
data.kickoffLabel,
|
|
1541
|
+
data.competition ? ` \xB7 ${data.competition}` : ""
|
|
1542
|
+
] })
|
|
1543
|
+
] });
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
// src/components/dashboard/PostMatchGoalsCard.tsx
|
|
1547
|
+
import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
1548
|
+
function PostMatchGoalsCard({ card, onTap }) {
|
|
1549
|
+
return /* @__PURE__ */ jsxs22("button", { type: "button", className: "ss-w-fandash-card ss-w-fandash-card--tap ss-w-fandash-postmatch-goals", onClick: () => onTap(card), children: [
|
|
1550
|
+
card.title ? /* @__PURE__ */ jsx26("span", { className: "ss-w-fandash-eyebrow", children: card.title }) : null,
|
|
1551
|
+
/* @__PURE__ */ jsx26("ul", { className: "ss-w-fandash-postmatch-goal-list", children: card.data.goals.map((g, i) => /* @__PURE__ */ jsx26("li", { className: g.scoredByClub ? "ss-w-fandash-postmatch-goal ss-w-fandash-postmatch-goal--club" : "ss-w-fandash-postmatch-goal", children: g.text }, `${g.text}-${i}`)) }),
|
|
1552
|
+
/* @__PURE__ */ jsx26("span", { className: "ss-w-fandash-card-cta", children: card.actionLabel })
|
|
1553
|
+
] });
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
// src/components/dashboard/PostMatchStatsCard.tsx
|
|
1557
|
+
import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
1558
|
+
function PostMatchStatsCard({ card, onTap }) {
|
|
1559
|
+
return /* @__PURE__ */ jsxs23("button", { type: "button", className: "ss-w-fandash-card ss-w-fandash-card--tap ss-w-fandash-postmatch-stats", onClick: () => onTap(card), children: [
|
|
1560
|
+
card.title ? /* @__PURE__ */ jsx27("span", { className: "ss-w-fandash-eyebrow", children: card.title }) : null,
|
|
1561
|
+
/* @__PURE__ */ jsx27("div", { className: "ss-w-fandash-postmatch-stat-rows", children: card.data.rows.map((r, i) => /* @__PURE__ */ jsxs23("div", { className: "ss-w-fandash-postmatch-stat-row", children: [
|
|
1562
|
+
/* @__PURE__ */ jsx27("span", { className: "ss-w-fandash-postmatch-stat-value", children: r.clubValue }),
|
|
1563
|
+
/* @__PURE__ */ jsx27("span", { className: "ss-w-fandash-postmatch-stat-label", children: r.label }),
|
|
1564
|
+
/* @__PURE__ */ jsx27("span", { className: "ss-w-fandash-postmatch-stat-value", children: r.oppValue })
|
|
1565
|
+
] }, `${r.label}-${i}`)) }),
|
|
1566
|
+
/* @__PURE__ */ jsx27("span", { className: "ss-w-fandash-card-cta", children: card.actionLabel })
|
|
1567
|
+
] });
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
// src/components/dashboard/PostMatchTopPerformerCard.tsx
|
|
1571
|
+
import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
1572
|
+
function PostMatchTopPerformerCard({ card, onTap }) {
|
|
1573
|
+
const { data } = card;
|
|
1574
|
+
return /* @__PURE__ */ jsxs24("button", { type: "button", className: "ss-w-fandash-card ss-w-fandash-card--tap ss-w-fandash-postmatch-performer", onClick: () => onTap(card), children: [
|
|
1575
|
+
card.title ? /* @__PURE__ */ jsx28("span", { className: "ss-w-fandash-eyebrow", children: card.title }) : null,
|
|
1576
|
+
/* @__PURE__ */ jsxs24("div", { className: "ss-w-fandash-postmatch-performer-row", children: [
|
|
1577
|
+
/* @__PURE__ */ jsx28("span", { className: "ss-w-fandash-postmatch-performer-name", children: data.playerName }),
|
|
1578
|
+
/* @__PURE__ */ jsx28("span", { className: "ss-w-fandash-postmatch-performer-rating", children: data.ratingLabel })
|
|
1579
|
+
] }),
|
|
1580
|
+
/* @__PURE__ */ jsx28("span", { className: "ss-w-fandash-card-cta", children: card.actionLabel })
|
|
1581
|
+
] });
|
|
1582
|
+
}
|
|
1583
|
+
|
|
1584
|
+
// src/components/dashboard/PostMatchNextCard.tsx
|
|
1585
|
+
import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
1586
|
+
function PostMatchNextCard({ card }) {
|
|
1587
|
+
const { data } = card;
|
|
1588
|
+
return /* @__PURE__ */ jsxs25("div", { className: "ss-w-fandash-card ss-w-fandash-postmatch-next", children: [
|
|
1589
|
+
card.title ? /* @__PURE__ */ jsx29("span", { className: "ss-w-fandash-eyebrow", children: card.title }) : null,
|
|
1590
|
+
/* @__PURE__ */ jsx29("div", { className: "ss-w-fandash-postmatch-next-row", children: /* @__PURE__ */ jsx29("span", { className: "ss-w-fandash-postmatch-next-when", children: data.whenLabel }) })
|
|
1591
|
+
] });
|
|
1592
|
+
}
|
|
1593
|
+
|
|
1594
|
+
// src/components/dashboard/ClubFanDashboard.tsx
|
|
1595
|
+
import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
1526
1596
|
function ClubFanDashboard({ dashboard, onTap, ui }) {
|
|
1527
1597
|
const orderedCards = [
|
|
1528
1598
|
...dashboard.cards.filter((c) => c.cardType === "countdown"),
|
|
1529
1599
|
...dashboard.cards.filter((c) => c.cardType !== "countdown")
|
|
1530
1600
|
];
|
|
1531
|
-
return /* @__PURE__ */
|
|
1532
|
-
dashboard.greeting ? /* @__PURE__ */
|
|
1533
|
-
/* @__PURE__ */
|
|
1601
|
+
return /* @__PURE__ */ jsxs26("div", { className: "ss-w-fandash", children: [
|
|
1602
|
+
dashboard.greeting ? /* @__PURE__ */ jsx30("span", { className: "ss-w-fandash-greeting", children: dashboard.greeting }) : null,
|
|
1603
|
+
/* @__PURE__ */ jsx30("div", { className: "ss-w-fandash-cards", children: orderedCards.map((card, i) => /* @__PURE__ */ jsx30(FanDashboardCard, { card, onTap, ui }, `${card.cardType}-${i}`)) })
|
|
1534
1604
|
] });
|
|
1535
1605
|
}
|
|
1536
1606
|
function FanDashboardCard({ card, onTap, ui }) {
|
|
1537
1607
|
switch (card.cardType) {
|
|
1538
1608
|
case "fixture":
|
|
1539
|
-
return /* @__PURE__ */
|
|
1609
|
+
return /* @__PURE__ */ jsx30(FixtureCard, { card, onTap });
|
|
1540
1610
|
case "countdown":
|
|
1541
|
-
return /* @__PURE__ */
|
|
1611
|
+
return /* @__PURE__ */ jsx30(CountdownCard, { card });
|
|
1542
1612
|
case "injuries":
|
|
1543
|
-
return /* @__PURE__ */
|
|
1613
|
+
return /* @__PURE__ */ jsx30(InjuriesCard, { card });
|
|
1544
1614
|
case "reasonToBet":
|
|
1545
|
-
return /* @__PURE__ */
|
|
1615
|
+
return /* @__PURE__ */ jsx30(ReasonToBetCard, { card });
|
|
1546
1616
|
case "whereToWatch":
|
|
1547
|
-
return /* @__PURE__ */
|
|
1617
|
+
return /* @__PURE__ */ jsx30(WhereToWatchCard, { card });
|
|
1548
1618
|
case "congestedWeek":
|
|
1549
|
-
return /* @__PURE__ */
|
|
1619
|
+
return /* @__PURE__ */ jsx30(CongestedWeekCard, { card, onTap });
|
|
1550
1620
|
case "transfers":
|
|
1551
|
-
return /* @__PURE__ */
|
|
1621
|
+
return /* @__PURE__ */ jsx30(TransfersCard, { card });
|
|
1552
1622
|
case "links":
|
|
1553
|
-
return /* @__PURE__ */
|
|
1623
|
+
return /* @__PURE__ */ jsx30(LinksCard, { card });
|
|
1624
|
+
case "postMatchResult":
|
|
1625
|
+
return /* @__PURE__ */ jsx30(PostMatchResultCard, { card });
|
|
1626
|
+
case "postMatchGoals":
|
|
1627
|
+
return /* @__PURE__ */ jsx30(PostMatchGoalsCard, { card, onTap });
|
|
1628
|
+
case "postMatchStats":
|
|
1629
|
+
return /* @__PURE__ */ jsx30(PostMatchStatsCard, { card, onTap });
|
|
1630
|
+
case "postMatchTopPerformer":
|
|
1631
|
+
return /* @__PURE__ */ jsx30(PostMatchTopPerformerCard, { card, onTap });
|
|
1632
|
+
case "postMatchNext":
|
|
1633
|
+
return /* @__PURE__ */ jsx30(PostMatchNextCard, { card });
|
|
1554
1634
|
default:
|
|
1555
1635
|
return null;
|
|
1556
1636
|
}
|
|
1557
1637
|
}
|
|
1558
1638
|
|
|
1559
1639
|
// src/components/ChatMessage.tsx
|
|
1560
|
-
import { jsx as
|
|
1640
|
+
import { jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
1561
1641
|
function ChatMessage({ message, disabled, onAct, onTap, ui, slip }) {
|
|
1562
1642
|
if (message.role === "user") {
|
|
1563
|
-
return /* @__PURE__ */
|
|
1643
|
+
return /* @__PURE__ */ jsx31("div", { className: "ss-w-msg ss-w-user", children: /* @__PURE__ */ jsx31("div", { className: "ss-w-bubble", children: message.text }) });
|
|
1564
1644
|
}
|
|
1565
1645
|
const onFanDashboardTap = (card) => {
|
|
1566
1646
|
onAct({ message: card.actionLabel, actionRef: card.actionRef, label: card.actionLabel || card.title || "" });
|
|
1567
1647
|
};
|
|
1568
|
-
return /* @__PURE__ */
|
|
1569
|
-
message.text && !message.greetingDashboard && !message.clubFanDashboard ? /* @__PURE__ */
|
|
1570
|
-
message.greetingDashboard && !message.clubFanDashboard ? /* @__PURE__ */
|
|
1571
|
-
message.clubFanDashboard ? /* @__PURE__ */
|
|
1572
|
-
/* @__PURE__ */
|
|
1573
|
-
/* @__PURE__ */
|
|
1574
|
-
/* @__PURE__ */
|
|
1575
|
-
/* @__PURE__ */
|
|
1576
|
-
/* @__PURE__ */
|
|
1648
|
+
return /* @__PURE__ */ jsxs27("div", { className: "ss-w-msg ss-w-bot", children: [
|
|
1649
|
+
message.text && !message.greetingDashboard && !message.clubFanDashboard ? /* @__PURE__ */ jsx31(Markdown, { text: message.text }) : null,
|
|
1650
|
+
message.greetingDashboard && !message.clubFanDashboard ? /* @__PURE__ */ jsx31(GreetingDashboard, { dashboard: message.greetingDashboard, onTap }) : null,
|
|
1651
|
+
message.clubFanDashboard ? /* @__PURE__ */ jsx31(ClubFanDashboard, { dashboard: message.clubFanDashboard, onTap: onFanDashboardTap, ui }) : null,
|
|
1652
|
+
/* @__PURE__ */ jsx31(EntityCardList, { cards: message.cards, disabled, showLessLabel: ui?.showLess, showMoreLabel: ui?.showMore }),
|
|
1653
|
+
/* @__PURE__ */ jsx31(BettingInsightList, { insights: message.insights, ui, slip }),
|
|
1654
|
+
/* @__PURE__ */ jsx31(MarketOddsCardList, { cards: message.marketOdds, ui, slip }),
|
|
1655
|
+
/* @__PURE__ */ jsx31(OddsMovementCardList, { cards: message.oddsMovement, ui }),
|
|
1656
|
+
/* @__PURE__ */ jsx31(ActionButtons, { actions: message.actions, loading: false, disabled, onAct })
|
|
1577
1657
|
] });
|
|
1578
1658
|
}
|
|
1579
1659
|
|
|
1580
1660
|
// src/components/IntentChips.tsx
|
|
1581
|
-
import { jsx as
|
|
1661
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1582
1662
|
function IntentChips({ chips, onPick }) {
|
|
1583
1663
|
if (chips.length === 0) return null;
|
|
1584
|
-
return /* @__PURE__ */
|
|
1664
|
+
return /* @__PURE__ */ jsx32("div", { className: "ss-w-chips", children: chips.map((c, i) => /* @__PURE__ */ jsx32("button", { type: "button", className: "ss-w-chip", onClick: () => onPick(c.text), children: c.text }, `${c.text}-${i}`)) });
|
|
1585
1665
|
}
|
|
1586
1666
|
|
|
1587
1667
|
// src/scroll.ts
|
|
@@ -1591,7 +1671,7 @@ function isPinnedToBottom(el, threshold = PIN_THRESHOLD) {
|
|
|
1591
1671
|
}
|
|
1592
1672
|
|
|
1593
1673
|
// src/components/MessageList.tsx
|
|
1594
|
-
import { jsx as
|
|
1674
|
+
import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
1595
1675
|
function MessageList({ controller, ui, slip, onDashboardTap }) {
|
|
1596
1676
|
const { state, send } = controller;
|
|
1597
1677
|
const listRef = useRef2(null);
|
|
@@ -1602,7 +1682,7 @@ function MessageList({ controller, ui, slip, onDashboardTap }) {
|
|
|
1602
1682
|
}, [state.messages, state.status]);
|
|
1603
1683
|
const hasUserMessage = state.messages.some((m) => m.role === "user");
|
|
1604
1684
|
const hasDashboard = state.messages.some((m) => m.role === "assistant" && (m.greetingDashboard || m.clubFanDashboard));
|
|
1605
|
-
return /* @__PURE__ */
|
|
1685
|
+
return /* @__PURE__ */ jsxs28(
|
|
1606
1686
|
"div",
|
|
1607
1687
|
{
|
|
1608
1688
|
className: "ss-w-list",
|
|
@@ -1612,7 +1692,7 @@ function MessageList({ controller, ui, slip, onDashboardTap }) {
|
|
|
1612
1692
|
if (listRef.current) pinnedRef.current = isPinnedToBottom(listRef.current);
|
|
1613
1693
|
},
|
|
1614
1694
|
children: [
|
|
1615
|
-
state.messages.map((m) => /* @__PURE__ */
|
|
1695
|
+
state.messages.map((m) => /* @__PURE__ */ jsx33(
|
|
1616
1696
|
ChatMessage,
|
|
1617
1697
|
{
|
|
1618
1698
|
message: m,
|
|
@@ -1627,15 +1707,15 @@ function MessageList({ controller, ui, slip, onDashboardTap }) {
|
|
|
1627
1707
|
},
|
|
1628
1708
|
m.id
|
|
1629
1709
|
)),
|
|
1630
|
-
state.isStreaming && state.actionsLoading ? /* @__PURE__ */
|
|
1710
|
+
state.isStreaming && state.actionsLoading ? /* @__PURE__ */ jsx33(ActionButtons, { actions: [], loading: true, onAct: () => {
|
|
1631
1711
|
} }) : null,
|
|
1632
|
-
state.status ? /* @__PURE__ */
|
|
1633
|
-
state.error ? /* @__PURE__ */
|
|
1634
|
-
/* @__PURE__ */
|
|
1635
|
-
/* @__PURE__ */
|
|
1712
|
+
state.status ? /* @__PURE__ */ jsx33("div", { className: "ss-w-status", children: state.status }) : null,
|
|
1713
|
+
state.error ? /* @__PURE__ */ jsxs28("div", { className: "ss-w-error", role: "alert", children: [
|
|
1714
|
+
/* @__PURE__ */ jsx33("span", { children: "message" in state.error ? state.error.message : ui.somethingWentWrong }),
|
|
1715
|
+
/* @__PURE__ */ jsx33("button", { type: "button", className: "ss-w-retry", onClick: () => controller.retry(), children: ui.retry })
|
|
1636
1716
|
] }) : null,
|
|
1637
|
-
!hasUserMessage && !hasDashboard ? /* @__PURE__ */
|
|
1638
|
-
/* @__PURE__ */
|
|
1717
|
+
!hasUserMessage && !hasDashboard ? /* @__PURE__ */ jsx33(IntentChips, { chips: state.starters, onPick: (t) => send(t) }) : null,
|
|
1718
|
+
/* @__PURE__ */ jsx33("div", { ref: endRef })
|
|
1639
1719
|
]
|
|
1640
1720
|
}
|
|
1641
1721
|
);
|
|
@@ -1643,7 +1723,7 @@ function MessageList({ controller, ui, slip, onDashboardTap }) {
|
|
|
1643
1723
|
|
|
1644
1724
|
// src/components/ChatInput.tsx
|
|
1645
1725
|
import { useState as useState7 } from "react";
|
|
1646
|
-
import { jsx as
|
|
1726
|
+
import { jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
1647
1727
|
function ChatInput({ placeholder, streaming, onSend, onStop, stopLabel = "Stop response", sendLabel = "Send message" }) {
|
|
1648
1728
|
const [value, setValue] = useState7("");
|
|
1649
1729
|
const submit = () => {
|
|
@@ -1658,14 +1738,14 @@ function ChatInput({ placeholder, streaming, onSend, onStop, stopLabel = "Stop r
|
|
|
1658
1738
|
submit();
|
|
1659
1739
|
}
|
|
1660
1740
|
};
|
|
1661
|
-
return /* @__PURE__ */
|
|
1662
|
-
/* @__PURE__ */
|
|
1663
|
-
streaming ? /* @__PURE__ */
|
|
1741
|
+
return /* @__PURE__ */ jsxs29("div", { className: "ss-w-input", children: [
|
|
1742
|
+
/* @__PURE__ */ jsx34("textarea", { className: "ss-w-textarea", rows: 1, placeholder, value, disabled: streaming, onChange: (e) => setValue(e.target.value), onKeyDown }),
|
|
1743
|
+
streaming ? /* @__PURE__ */ jsx34("button", { type: "button", className: "ss-w-send ss-w-stop", "aria-label": stopLabel, onClick: onStop, children: /* @__PURE__ */ jsx34("span", { className: "ss-w-stop-glyph" }) }) : /* @__PURE__ */ jsx34("button", { type: "button", className: "ss-w-send", "aria-label": sendLabel, onClick: submit, children: /* @__PURE__ */ jsx34(SendIcon, {}) })
|
|
1664
1744
|
] });
|
|
1665
1745
|
}
|
|
1666
1746
|
|
|
1667
1747
|
// src/components/ChatPanel.tsx
|
|
1668
|
-
import { jsx as
|
|
1748
|
+
import { jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
1669
1749
|
var FULLSCREEN_QUERY = "(max-width: 639px)";
|
|
1670
1750
|
function useIsModal() {
|
|
1671
1751
|
const [modal, setModal] = useState8(false);
|
|
@@ -1689,10 +1769,10 @@ function ChatPanel({ controller, ui, slip, onDashboardTap }) {
|
|
|
1689
1769
|
window.addEventListener("keydown", onKey);
|
|
1690
1770
|
return () => window.removeEventListener("keydown", onKey);
|
|
1691
1771
|
}, [close]);
|
|
1692
|
-
return /* @__PURE__ */
|
|
1693
|
-
/* @__PURE__ */
|
|
1694
|
-
/* @__PURE__ */
|
|
1695
|
-
/* @__PURE__ */
|
|
1772
|
+
return /* @__PURE__ */ jsxs30("div", { className: "ss-w-panel", role: "dialog", "aria-modal": isModal, "aria-label": ui.chatDialogLabel, children: [
|
|
1773
|
+
/* @__PURE__ */ jsx35(ChatHeader, { onClose: close, closeLabel: ui.closeChat }),
|
|
1774
|
+
/* @__PURE__ */ jsx35(MessageList, { controller, ui, slip, onDashboardTap }),
|
|
1775
|
+
/* @__PURE__ */ jsx35(ChatInput, { placeholder: ui.placeholder, streaming: state.isStreaming, onSend: (t) => send(t), onStop: stop, stopLabel: ui.stopResponse, sendLabel: ui.sendMessage })
|
|
1696
1776
|
] });
|
|
1697
1777
|
}
|
|
1698
1778
|
|
|
@@ -2157,10 +2237,40 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
|
|
|
2157
2237
|
.ss-w-fandash-link-tile:hover { background: color-mix(in srgb, var(--ss-w-accent) 16%, var(--ss-w-panel)); }
|
|
2158
2238
|
.ss-w-fandash-link-label { font-size: 12.5px; font-weight: 650; overflow-wrap: anywhere; }
|
|
2159
2239
|
.ss-w-fandash-link-chevron { flex: none; width: 12px; height: 12px; color: var(--ss-w-accent); }
|
|
2240
|
+
|
|
2241
|
+
/* post-match result: full-time scoreboard -- team names flank the score, meta line underneath */
|
|
2242
|
+
.ss-w-fandash-postmatch-scoreboard { display: flex; align-items: center; gap: 8px; }
|
|
2243
|
+
.ss-w-fandash-postmatch-team { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 650; }
|
|
2244
|
+
.ss-w-fandash-postmatch-team--away { text-align: right; }
|
|
2245
|
+
.ss-w-fandash-postmatch-score { flex: none; font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; color: var(--ss-w-ink); }
|
|
2246
|
+
.ss-w-fandash-postmatch-sep { flex: none; font-size: 14px; font-weight: 700; color: var(--ss-w-faint); }
|
|
2247
|
+
.ss-w-fandash-postmatch-meta { font-size: 11.5px; color: var(--ss-w-faint); }
|
|
2248
|
+
|
|
2249
|
+
/* post-match goals: a plain list, the club's own goals picked out in the accent color */
|
|
2250
|
+
.ss-w-fandash-postmatch-goal-list { list-style: none; display: flex; flex-direction: column; gap: 4px; }
|
|
2251
|
+
.ss-w-fandash-postmatch-goal { font-size: 12.5px; color: var(--ss-w-faint); }
|
|
2252
|
+
.ss-w-fandash-postmatch-goal--club { color: var(--ss-w-ink); font-weight: 650; }
|
|
2253
|
+
|
|
2254
|
+
/* post-match stats: club value / stat label / opponent value, three columns per row */
|
|
2255
|
+
.ss-w-fandash-postmatch-stat-rows { display: flex; flex-direction: column; gap: 5px; }
|
|
2256
|
+
.ss-w-fandash-postmatch-stat-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
|
|
2257
|
+
.ss-w-fandash-postmatch-stat-value { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ss-w-ink); }
|
|
2258
|
+
.ss-w-fandash-postmatch-stat-row .ss-w-fandash-postmatch-stat-value:last-child { text-align: right; }
|
|
2259
|
+
.ss-w-fandash-postmatch-stat-label { font-size: 10.5px; text-align: center; color: var(--ss-w-faint); text-transform: uppercase; letter-spacing: .03em; }
|
|
2260
|
+
|
|
2261
|
+
/* post-match top performer: player name left, rating pill right */
|
|
2262
|
+
.ss-w-fandash-postmatch-performer-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
|
|
2263
|
+
.ss-w-fandash-postmatch-performer-name { font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
|
|
2264
|
+
.ss-w-fandash-postmatch-performer-rating { flex: none; font-size: 12px; font-weight: 700; color: var(--ss-w-accent); background: color-mix(in srgb, var(--ss-w-accent) 13%, var(--ss-w-panel)); border-radius: 999px; padding: 2px 9px; }
|
|
2265
|
+
|
|
2266
|
+
/* post-match next: the upcoming fixture teaser -- opponent left, when-label right */
|
|
2267
|
+
.ss-w-fandash-postmatch-next-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
|
|
2268
|
+
.ss-w-fandash-postmatch-next-opponent { font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
|
|
2269
|
+
.ss-w-fandash-postmatch-next-when { flex: none; font-size: 11.5px; color: var(--ss-w-faint); }
|
|
2160
2270
|
`;
|
|
2161
2271
|
|
|
2162
2272
|
// src/StatsWidget.tsx
|
|
2163
|
-
import { jsx as
|
|
2273
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
2164
2274
|
function buildClient(props) {
|
|
2165
2275
|
try {
|
|
2166
2276
|
if ("client" in props && props.client) {
|
|
@@ -2213,7 +2323,7 @@ function StatsWidget(props) {
|
|
|
2213
2323
|
}, [built, ui.injectStyles]);
|
|
2214
2324
|
if (!built) return null;
|
|
2215
2325
|
const attrs = themeAttrs(ui);
|
|
2216
|
-
return /* @__PURE__ */
|
|
2326
|
+
return /* @__PURE__ */ jsx36("div", { ref: rootRef, className: "ss-w-root", "data-ss-w-theme": attrs["data-ss-w-theme"], "data-ss-w-pos": attrs["data-ss-w-pos"], style: attrs.style, children: controller.state.isOpen ? /* @__PURE__ */ jsx36(ChatPanel, { controller, ui, slip, onDashboardTap }) : /* @__PURE__ */ jsx36(
|
|
2217
2327
|
ChatFab,
|
|
2218
2328
|
{
|
|
2219
2329
|
label: ui.launcherLabel,
|