@sensiblestats/widget-react 0.20.0 → 0.21.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/dist/index.js CHANGED
@@ -1350,21 +1350,27 @@ function FixtureHeroBlock({
1350
1350
  ] });
1351
1351
  }
1352
1352
 
1353
+ // src/components/club-dashboard/ResultPills.tsx
1354
+ import { Fragment as Fragment5, jsx as jsx19 } from "react/jsx-runtime";
1355
+ function ResultPills({ results }) {
1356
+ return /* @__PURE__ */ jsx19(Fragment5, { children: results.map((r, i) => /* @__PURE__ */ jsx19("span", { className: `ss-w-cdash-pill ss-w-cdash-pill--${r.toLowerCase()}`, children: r }, i)) });
1357
+ }
1358
+
1353
1359
  // src/components/club-dashboard/FormGuideBlock.tsx
1354
- import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
1360
+ import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
1355
1361
  function FormGuideBlock({ block }) {
1356
1362
  if (block.rows.length === 0) return null;
1357
- return /* @__PURE__ */ jsx19("div", { className: "ss-w-cdash-form", children: block.rows.map((row) => /* @__PURE__ */ jsxs15("div", { className: "ss-w-cdash-form-row", children: [
1363
+ return /* @__PURE__ */ jsx20("div", { className: "ss-w-cdash-form", children: block.rows.map((row) => /* @__PURE__ */ jsxs15("div", { className: "ss-w-cdash-form-row", children: [
1358
1364
  /* @__PURE__ */ jsxs15("span", { className: "ss-w-cdash-form-name", children: [
1359
1365
  row.name,
1360
1366
  row.position != null ? ` #${row.position}` : ""
1361
1367
  ] }),
1362
- /* @__PURE__ */ jsx19("span", { className: "ss-w-cdash-form-pills", children: row.last5.map((r, i) => /* @__PURE__ */ jsx19("span", { className: `ss-w-cdash-pill ss-w-cdash-pill--${r.toLowerCase()}`, children: r }, i)) })
1368
+ /* @__PURE__ */ jsx20("span", { className: "ss-w-cdash-form-pills", children: /* @__PURE__ */ jsx20(ResultPills, { results: row.last5 }) })
1363
1369
  ] }, row.name)) });
1364
1370
  }
1365
1371
 
1366
1372
  // src/components/club-dashboard/MatchPreviewBlock.tsx
1367
- import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
1373
+ import { jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
1368
1374
  function MatchPreviewBlock({
1369
1375
  block,
1370
1376
  ui,
@@ -1373,7 +1379,7 @@ function MatchPreviewBlock({
1373
1379
  if (block.facts.length === 0) return null;
1374
1380
  const heading = ui.clubMatchPreviewHeading;
1375
1381
  return /* @__PURE__ */ jsxs16("div", { className: "ss-w-cdash-lines", children: [
1376
- /* @__PURE__ */ jsx20("span", { className: "ss-w-cdash-lines-heading", children: heading }),
1382
+ /* @__PURE__ */ jsx21("span", { className: "ss-w-cdash-lines-heading", children: heading }),
1377
1383
  block.facts.map(
1378
1384
  (f, i) => f.actionRef ? /* @__PURE__ */ jsxs16(
1379
1385
  "button",
@@ -1390,13 +1396,47 @@ function MatchPreviewBlock({
1390
1396
  ]
1391
1397
  },
1392
1398
  i
1393
- ) : /* @__PURE__ */ jsx20("p", { children: f.sentence }, i)
1399
+ ) : /* @__PURE__ */ jsx21("p", { children: f.sentence }, i)
1394
1400
  )
1395
1401
  ] });
1396
1402
  }
1397
1403
 
1404
+ // src/components/club-dashboard/MatchPreviewCardBlock.tsx
1405
+ import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
1406
+ function position(p) {
1407
+ return p != null ? `#${p}` : "\u2014";
1408
+ }
1409
+ function MatchPreviewCardBlock({ block }) {
1410
+ return /* @__PURE__ */ jsxs17("div", { className: "ss-w-cdash-preview", children: [
1411
+ /* @__PURE__ */ jsxs17("div", { className: "ss-w-cdash-preview-header", children: [
1412
+ /* @__PURE__ */ jsx22("span", { className: "ss-w-cdash-team", children: block.homeName }),
1413
+ /* @__PURE__ */ jsx22("span", { className: "ss-w-cdash-vs", children: "v" }),
1414
+ /* @__PURE__ */ jsx22("span", { className: "ss-w-cdash-team", children: block.awayName })
1415
+ ] }),
1416
+ /* @__PURE__ */ jsxs17("div", { className: "ss-w-cdash-preview-row", children: [
1417
+ /* @__PURE__ */ jsx22("span", { className: "ss-w-cdash-preview-value", children: position(block.homePosition) }),
1418
+ /* @__PURE__ */ jsx22("span", { className: "ss-w-cdash-preview-label", children: block.tableLabel }),
1419
+ /* @__PURE__ */ jsx22("span", { className: "ss-w-cdash-preview-value", children: position(block.awayPosition) })
1420
+ ] }),
1421
+ /* @__PURE__ */ jsxs17("div", { className: "ss-w-cdash-preview-row", children: [
1422
+ /* @__PURE__ */ jsx22("span", { className: "ss-w-cdash-preview-pills", children: /* @__PURE__ */ jsx22(ResultPills, { results: block.homeLast5 }) }),
1423
+ /* @__PURE__ */ jsx22("span", { className: "ss-w-cdash-preview-label", children: block.last5Label }),
1424
+ /* @__PURE__ */ jsx22("span", { className: "ss-w-cdash-preview-pills", children: /* @__PURE__ */ jsx22(ResultPills, { results: block.awayLast5 }) })
1425
+ ] }),
1426
+ block.edgeTeamName ? /* @__PURE__ */ jsxs17("div", { className: "ss-w-cdash-preview-edge", children: [
1427
+ /* @__PURE__ */ jsx22("span", { "aria-hidden": "true", children: "\u25B8" }),
1428
+ /* @__PURE__ */ jsx22("strong", { children: block.edgeTeamName }),
1429
+ block.edgeReason ? /* @__PURE__ */ jsxs17("span", { children: [
1430
+ " \u2014 ",
1431
+ block.edgeReason
1432
+ ] }) : null
1433
+ ] }) : null,
1434
+ block.h2HLines.length > 0 ? /* @__PURE__ */ jsx22("div", { className: "ss-w-cdash-preview-h2h", children: block.h2HLines.map((line, i) => /* @__PURE__ */ jsx22("p", { children: line }, i)) }) : null
1435
+ ] });
1436
+ }
1437
+
1398
1438
  // src/components/club-dashboard/TeamDnaBlock.tsx
1399
- import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
1439
+ import { jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
1400
1440
  function TeamDnaBlock({
1401
1441
  block,
1402
1442
  ui,
@@ -1404,10 +1444,10 @@ function TeamDnaBlock({
1404
1444
  }) {
1405
1445
  if (block.facts.length === 0) return null;
1406
1446
  const heading = ui.clubTeamDnaHeading;
1407
- return /* @__PURE__ */ jsxs17("div", { className: "ss-w-cdash-lines", children: [
1408
- /* @__PURE__ */ jsx21("span", { className: "ss-w-cdash-lines-heading", children: heading }),
1447
+ return /* @__PURE__ */ jsxs18("div", { className: "ss-w-cdash-lines", children: [
1448
+ /* @__PURE__ */ jsx23("span", { className: "ss-w-cdash-lines-heading", children: heading }),
1409
1449
  block.facts.map(
1410
- (f, i) => f.actionRef ? /* @__PURE__ */ jsxs17(
1450
+ (f, i) => f.actionRef ? /* @__PURE__ */ jsxs18(
1411
1451
  "button",
1412
1452
  {
1413
1453
  type: "button",
@@ -1415,21 +1455,21 @@ function TeamDnaBlock({
1415
1455
  onClick: () => onAction(f.label ?? f.sentence, { actionRef: f.actionRef }),
1416
1456
  children: [
1417
1457
  f.sentence,
1418
- f.label ? /* @__PURE__ */ jsxs17("span", { className: "ss-w-cdash-fact-label", children: [
1458
+ f.label ? /* @__PURE__ */ jsxs18("span", { className: "ss-w-cdash-fact-label", children: [
1419
1459
  " ",
1420
1460
  f.label
1421
1461
  ] }) : null
1422
1462
  ]
1423
1463
  },
1424
1464
  i
1425
- ) : /* @__PURE__ */ jsx21("p", { children: f.sentence }, i)
1465
+ ) : /* @__PURE__ */ jsx23("p", { children: f.sentence }, i)
1426
1466
  )
1427
1467
  ] });
1428
1468
  }
1429
1469
 
1430
1470
  // src/components/club-dashboard/CountdownBlock.tsx
1431
1471
  import { useEffect as useEffect3, useState as useState7 } from "react";
1432
- import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
1472
+ import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
1433
1473
  var DAY_MS = 24 * 3600 * 1e3;
1434
1474
  function pad2(n) {
1435
1475
  return String(n).padStart(2, "0");
@@ -1454,30 +1494,31 @@ function CountdownBlock({ block, ui }) {
1454
1494
  if (remainingMs <= 0) return null;
1455
1495
  if (remainingMs > DAY_MS) return null;
1456
1496
  const { h, m, s } = splitRemaining(remainingMs);
1457
- return /* @__PURE__ */ jsxs18("div", { className: "ss-w-cdash-cd", "aria-label": ui.clubKickoffAria(block.kickoffUnix * 1e3), children: [
1458
- /* @__PURE__ */ jsxs18("div", { className: "ss-w-cdash-cd-clock", "aria-hidden": "true", children: [
1459
- /* @__PURE__ */ jsx22("span", { className: "ss-w-cdash-cd-h", children: h }),
1497
+ return /* @__PURE__ */ jsxs19("div", { className: "ss-w-cdash-cd", "aria-label": ui.clubKickoffAria(block.kickoffUnix * 1e3), children: [
1498
+ /* @__PURE__ */ jsxs19("div", { className: "ss-w-cdash-cd-clock", "aria-hidden": "true", children: [
1499
+ /* @__PURE__ */ jsx24("span", { className: "ss-w-cdash-cd-h", children: h }),
1460
1500
  "h",
1461
1501
  " ",
1462
- /* @__PURE__ */ jsx22("span", { className: "ss-w-cdash-cd-m", children: m }),
1502
+ /* @__PURE__ */ jsx24("span", { className: "ss-w-cdash-cd-m", children: m }),
1463
1503
  "m",
1464
1504
  " ",
1465
- /* @__PURE__ */ jsx22("span", { className: "ss-w-cdash-cd-s", children: s }),
1505
+ /* @__PURE__ */ jsx24("span", { className: "ss-w-cdash-cd-s", children: s }),
1466
1506
  "s"
1467
1507
  ] }),
1468
- /* @__PURE__ */ jsx22("div", { className: "ss-w-cdash-cd-label", children: ui.clubCountdownLabel })
1508
+ /* @__PURE__ */ jsx24("div", { className: "ss-w-cdash-cd-label", children: ui.clubCountdownLabel })
1469
1509
  ] });
1470
1510
  }
1471
1511
 
1472
1512
  // src/components/club-dashboard/ClubDashboard.tsx
1473
- import { jsx as jsx23 } from "react/jsx-runtime";
1513
+ import { jsx as jsx25 } from "react/jsx-runtime";
1474
1514
  var CLUB_BLOCK_REGISTRY = {
1475
- greetingHeader: ({ block }) => block.type === "greetingHeader" ? /* @__PURE__ */ jsx23(GreetingHeaderBlock, { block }) : null,
1476
- fixtureHero: ({ block, ui, onAction }) => block.type === "fixtureHero" ? /* @__PURE__ */ jsx23(FixtureHeroBlock, { block, ui, onAction }) : null,
1477
- formGuide: ({ block, ui }) => block.type === "formGuide" ? /* @__PURE__ */ jsx23(FormGuideBlock, { block, ui }) : null,
1478
- matchPreview: ({ block, ui, onAction }) => block.type === "matchPreview" ? /* @__PURE__ */ jsx23(MatchPreviewBlock, { block, ui, onAction }) : null,
1479
- teamDna: ({ block, ui, onAction }) => block.type === "teamDna" ? /* @__PURE__ */ jsx23(TeamDnaBlock, { block, ui, onAction }) : null,
1480
- countdown: ({ block, ui }) => block.type === "countdown" ? /* @__PURE__ */ jsx23(CountdownBlock, { block, ui }) : null
1515
+ greetingHeader: ({ block }) => block.type === "greetingHeader" ? /* @__PURE__ */ jsx25(GreetingHeaderBlock, { block }) : null,
1516
+ fixtureHero: ({ block, ui, onAction }) => block.type === "fixtureHero" ? /* @__PURE__ */ jsx25(FixtureHeroBlock, { block, ui, onAction }) : null,
1517
+ formGuide: ({ block, ui }) => block.type === "formGuide" ? /* @__PURE__ */ jsx25(FormGuideBlock, { block, ui }) : null,
1518
+ matchPreview: ({ block, ui, onAction }) => block.type === "matchPreview" ? /* @__PURE__ */ jsx25(MatchPreviewBlock, { block, ui, onAction }) : null,
1519
+ matchPreviewCard: ({ block, ui }) => block.type === "matchPreviewCard" ? /* @__PURE__ */ jsx25(MatchPreviewCardBlock, { block, ui }) : null,
1520
+ teamDna: ({ block, ui, onAction }) => block.type === "teamDna" ? /* @__PURE__ */ jsx25(TeamDnaBlock, { block, ui, onAction }) : null,
1521
+ countdown: ({ block, ui }) => block.type === "countdown" ? /* @__PURE__ */ jsx25(CountdownBlock, { block, ui }) : null
1481
1522
  };
1482
1523
  function ClubDashboard({
1483
1524
  dashboard,
@@ -1485,39 +1526,39 @@ function ClubDashboard({
1485
1526
  onAction
1486
1527
  }) {
1487
1528
  if (!dashboard.blocks.length) return null;
1488
- return /* @__PURE__ */ jsx23("div", { className: "ss-w-cdash", children: dashboard.blocks.map((block, i) => {
1529
+ return /* @__PURE__ */ jsx25("div", { className: "ss-w-cdash", children: dashboard.blocks.map((block, i) => {
1489
1530
  const Comp = Object.prototype.hasOwnProperty.call(CLUB_BLOCK_REGISTRY, block.type) ? CLUB_BLOCK_REGISTRY[block.type] : void 0;
1490
1531
  if (!Comp) {
1491
1532
  console.warn(`[club-dashboard] no renderer for block type "${block.type}"`);
1492
1533
  return null;
1493
1534
  }
1494
- return /* @__PURE__ */ jsx23("div", { className: "ss-w-cdash-block", children: /* @__PURE__ */ jsx23(Comp, { block, ui, onAction }) }, i);
1535
+ return /* @__PURE__ */ jsx25("div", { className: "ss-w-cdash-block", children: /* @__PURE__ */ jsx25(Comp, { block, ui, onAction }) }, i);
1495
1536
  }) });
1496
1537
  }
1497
1538
 
1498
1539
  // src/components/ChatMessage.tsx
1499
- import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
1540
+ import { jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
1500
1541
  function ChatMessage({ message, disabled, onAct, onTap, onClubAction, ui, slip }) {
1501
1542
  if (message.role === "user") {
1502
- return /* @__PURE__ */ jsx24("div", { className: "ss-w-msg ss-w-user", children: /* @__PURE__ */ jsx24("div", { className: "ss-w-bubble", children: message.text }) });
1543
+ return /* @__PURE__ */ jsx26("div", { className: "ss-w-msg ss-w-user", children: /* @__PURE__ */ jsx26("div", { className: "ss-w-bubble", children: message.text }) });
1503
1544
  }
1504
- return /* @__PURE__ */ jsxs19("div", { className: "ss-w-msg ss-w-bot", children: [
1505
- message.text && !message.greetingDashboard && !message.clubDashboard ? /* @__PURE__ */ jsx24(Markdown, { text: message.text }) : null,
1506
- message.greetingDashboard ? /* @__PURE__ */ jsx24(GreetingDashboard, { dashboard: message.greetingDashboard, onTap }) : null,
1507
- message.clubDashboard && ui ? /* @__PURE__ */ jsx24(ClubDashboard, { dashboard: message.clubDashboard, ui, onAction: onClubAction }) : null,
1508
- /* @__PURE__ */ jsx24(EntityCardList, { cards: message.cards, disabled, showLessLabel: ui?.showLess, showMoreLabel: ui?.showMore }),
1509
- /* @__PURE__ */ jsx24(BettingInsightList, { insights: message.insights, ui, slip }),
1510
- /* @__PURE__ */ jsx24(MarketOddsCardList, { cards: message.marketOdds, ui, slip }),
1511
- /* @__PURE__ */ jsx24(OddsMovementCardList, { cards: message.oddsMovement, ui }),
1512
- /* @__PURE__ */ jsx24(ActionButtons, { actions: message.actions, loading: false, disabled, onAct })
1545
+ return /* @__PURE__ */ jsxs20("div", { className: "ss-w-msg ss-w-bot", children: [
1546
+ message.text && !message.greetingDashboard && !message.clubDashboard ? /* @__PURE__ */ jsx26(Markdown, { text: message.text }) : null,
1547
+ message.greetingDashboard ? /* @__PURE__ */ jsx26(GreetingDashboard, { dashboard: message.greetingDashboard, onTap }) : null,
1548
+ message.clubDashboard && ui ? /* @__PURE__ */ jsx26(ClubDashboard, { dashboard: message.clubDashboard, ui, onAction: onClubAction }) : null,
1549
+ /* @__PURE__ */ jsx26(EntityCardList, { cards: message.cards, disabled, showLessLabel: ui?.showLess, showMoreLabel: ui?.showMore }),
1550
+ /* @__PURE__ */ jsx26(BettingInsightList, { insights: message.insights, ui, slip }),
1551
+ /* @__PURE__ */ jsx26(MarketOddsCardList, { cards: message.marketOdds, ui, slip }),
1552
+ /* @__PURE__ */ jsx26(OddsMovementCardList, { cards: message.oddsMovement, ui }),
1553
+ /* @__PURE__ */ jsx26(ActionButtons, { actions: message.actions, loading: false, disabled, onAct })
1513
1554
  ] });
1514
1555
  }
1515
1556
 
1516
1557
  // src/components/IntentChips.tsx
1517
- import { jsx as jsx25 } from "react/jsx-runtime";
1558
+ import { jsx as jsx27 } from "react/jsx-runtime";
1518
1559
  function IntentChips({ chips, onPick }) {
1519
1560
  if (chips.length === 0) return null;
1520
- return /* @__PURE__ */ jsx25("div", { className: "ss-w-chips", children: chips.map((c, i) => /* @__PURE__ */ jsx25("button", { type: "button", className: "ss-w-chip", onClick: () => onPick(c.text), children: c.text }, `${c.text}-${i}`)) });
1561
+ return /* @__PURE__ */ jsx27("div", { className: "ss-w-chips", children: chips.map((c, i) => /* @__PURE__ */ jsx27("button", { type: "button", className: "ss-w-chip", onClick: () => onPick(c.text), children: c.text }, `${c.text}-${i}`)) });
1521
1562
  }
1522
1563
 
1523
1564
  // src/scroll.ts
@@ -1527,7 +1568,7 @@ function isPinnedToBottom(el, threshold = PIN_THRESHOLD) {
1527
1568
  }
1528
1569
 
1529
1570
  // src/components/MessageList.tsx
1530
- import { jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
1571
+ import { jsx as jsx28, jsxs as jsxs21 } from "react/jsx-runtime";
1531
1572
  function MessageList({ controller, ui, slip, onDashboardTap }) {
1532
1573
  const { state, send } = controller;
1533
1574
  const listRef = useRef2(null);
@@ -1538,7 +1579,7 @@ function MessageList({ controller, ui, slip, onDashboardTap }) {
1538
1579
  }, [state.messages, state.status]);
1539
1580
  const hasUserMessage = state.messages.some((m) => m.role === "user");
1540
1581
  const hasDashboard = state.messages.some((m) => m.role === "assistant" && m.greetingDashboard);
1541
- return /* @__PURE__ */ jsxs20(
1582
+ return /* @__PURE__ */ jsxs21(
1542
1583
  "div",
1543
1584
  {
1544
1585
  className: "ss-w-list",
@@ -1548,7 +1589,7 @@ function MessageList({ controller, ui, slip, onDashboardTap }) {
1548
1589
  if (listRef.current) pinnedRef.current = isPinnedToBottom(listRef.current);
1549
1590
  },
1550
1591
  children: [
1551
- state.messages.map((m) => /* @__PURE__ */ jsx26(
1592
+ state.messages.map((m) => /* @__PURE__ */ jsx28(
1552
1593
  ChatMessage,
1553
1594
  {
1554
1595
  message: m,
@@ -1564,15 +1605,15 @@ function MessageList({ controller, ui, slip, onDashboardTap }) {
1564
1605
  },
1565
1606
  m.id
1566
1607
  )),
1567
- state.isStreaming && state.actionsLoading ? /* @__PURE__ */ jsx26(ActionButtons, { actions: [], loading: true, onAct: () => {
1608
+ state.isStreaming && state.actionsLoading ? /* @__PURE__ */ jsx28(ActionButtons, { actions: [], loading: true, onAct: () => {
1568
1609
  } }) : null,
1569
- state.status ? /* @__PURE__ */ jsx26("div", { className: "ss-w-status", children: state.status }) : null,
1570
- state.error ? /* @__PURE__ */ jsxs20("div", { className: "ss-w-error", role: "alert", children: [
1571
- /* @__PURE__ */ jsx26("span", { children: "message" in state.error ? state.error.message : ui.somethingWentWrong }),
1572
- /* @__PURE__ */ jsx26("button", { type: "button", className: "ss-w-retry", onClick: () => controller.retry(), children: ui.retry })
1610
+ state.status ? /* @__PURE__ */ jsx28("div", { className: "ss-w-status", children: state.status }) : null,
1611
+ state.error ? /* @__PURE__ */ jsxs21("div", { className: "ss-w-error", role: "alert", children: [
1612
+ /* @__PURE__ */ jsx28("span", { children: "message" in state.error ? state.error.message : ui.somethingWentWrong }),
1613
+ /* @__PURE__ */ jsx28("button", { type: "button", className: "ss-w-retry", onClick: () => controller.retry(), children: ui.retry })
1573
1614
  ] }) : null,
1574
- !hasUserMessage && !hasDashboard ? /* @__PURE__ */ jsx26(IntentChips, { chips: state.starters, onPick: (t) => send(t) }) : null,
1575
- /* @__PURE__ */ jsx26("div", { ref: endRef })
1615
+ !hasUserMessage && !hasDashboard ? /* @__PURE__ */ jsx28(IntentChips, { chips: state.starters, onPick: (t) => send(t) }) : null,
1616
+ /* @__PURE__ */ jsx28("div", { ref: endRef })
1576
1617
  ]
1577
1618
  }
1578
1619
  );
@@ -1580,7 +1621,7 @@ function MessageList({ controller, ui, slip, onDashboardTap }) {
1580
1621
 
1581
1622
  // src/components/ChatInput.tsx
1582
1623
  import { useState as useState8 } from "react";
1583
- import { jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
1624
+ import { jsx as jsx29, jsxs as jsxs22 } from "react/jsx-runtime";
1584
1625
  function ChatInput({ placeholder, streaming, onSend, onStop, stopLabel = "Stop response", sendLabel = "Send message" }) {
1585
1626
  const [value, setValue] = useState8("");
1586
1627
  const submit = () => {
@@ -1595,14 +1636,14 @@ function ChatInput({ placeholder, streaming, onSend, onStop, stopLabel = "Stop r
1595
1636
  submit();
1596
1637
  }
1597
1638
  };
1598
- return /* @__PURE__ */ jsxs21("div", { className: "ss-w-input", children: [
1599
- /* @__PURE__ */ jsx27("textarea", { className: "ss-w-textarea", rows: 1, placeholder, value, disabled: streaming, onChange: (e) => setValue(e.target.value), onKeyDown }),
1600
- streaming ? /* @__PURE__ */ jsx27("button", { type: "button", className: "ss-w-send ss-w-stop", "aria-label": stopLabel, onClick: onStop, children: /* @__PURE__ */ jsx27("span", { className: "ss-w-stop-glyph" }) }) : /* @__PURE__ */ jsx27("button", { type: "button", className: "ss-w-send", "aria-label": sendLabel, onClick: submit, children: /* @__PURE__ */ jsx27(SendIcon, {}) })
1639
+ return /* @__PURE__ */ jsxs22("div", { className: "ss-w-input", children: [
1640
+ /* @__PURE__ */ jsx29("textarea", { className: "ss-w-textarea", rows: 1, placeholder, value, disabled: streaming, onChange: (e) => setValue(e.target.value), onKeyDown }),
1641
+ streaming ? /* @__PURE__ */ jsx29("button", { type: "button", className: "ss-w-send ss-w-stop", "aria-label": stopLabel, onClick: onStop, children: /* @__PURE__ */ jsx29("span", { className: "ss-w-stop-glyph" }) }) : /* @__PURE__ */ jsx29("button", { type: "button", className: "ss-w-send", "aria-label": sendLabel, onClick: submit, children: /* @__PURE__ */ jsx29(SendIcon, {}) })
1601
1642
  ] });
1602
1643
  }
1603
1644
 
1604
1645
  // src/components/ChatPanel.tsx
1605
- import { jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
1646
+ import { jsx as jsx30, jsxs as jsxs23 } from "react/jsx-runtime";
1606
1647
  var FULLSCREEN_QUERY = "(max-width: 639px)";
1607
1648
  function useIsModal() {
1608
1649
  const [modal, setModal] = useState9(false);
@@ -1626,10 +1667,10 @@ function ChatPanel({ controller, ui, slip, onDashboardTap }) {
1626
1667
  window.addEventListener("keydown", onKey);
1627
1668
  return () => window.removeEventListener("keydown", onKey);
1628
1669
  }, [close]);
1629
- return /* @__PURE__ */ jsxs22("div", { className: "ss-w-panel", role: "dialog", "aria-modal": isModal, "aria-label": ui.chatDialogLabel, children: [
1630
- /* @__PURE__ */ jsx28(ChatHeader, { onClose: close, closeLabel: ui.closeChat }),
1631
- /* @__PURE__ */ jsx28(MessageList, { controller, ui, slip, onDashboardTap }),
1632
- /* @__PURE__ */ jsx28(ChatInput, { placeholder: ui.placeholder, streaming: state.isStreaming, onSend: (t) => send(t), onStop: stop, stopLabel: ui.stopResponse, sendLabel: ui.sendMessage })
1670
+ return /* @__PURE__ */ jsxs23("div", { className: "ss-w-panel", role: "dialog", "aria-modal": isModal, "aria-label": ui.chatDialogLabel, children: [
1671
+ /* @__PURE__ */ jsx30(ChatHeader, { onClose: close, closeLabel: ui.closeChat }),
1672
+ /* @__PURE__ */ jsx30(MessageList, { controller, ui, slip, onDashboardTap }),
1673
+ /* @__PURE__ */ jsx30(ChatInput, { placeholder: ui.placeholder, streaming: state.isStreaming, onSend: (t) => send(t), onStop: stop, stopLabel: ui.stopResponse, sendLabel: ui.sendMessage })
1633
1674
  ] });
1634
1675
  }
1635
1676
 
@@ -2021,10 +2062,27 @@ var WIDGET_CSS = `.ss-w-root { all: revert; }
2021
2062
  .ss-w-cdash-cd-clock { display: flex; align-items: baseline; justify-content: center; gap: 2px; font-variant-numeric: tabular-nums; font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-weight: 700; font-size: 18px; color: var(--ss-w-ink); }
2022
2063
  .ss-w-cdash-cd-h, .ss-w-cdash-cd-m, .ss-w-cdash-cd-s { color: var(--ss-w-accent); }
2023
2064
  .ss-w-cdash-cd-label { font-size: 11px; font-weight: 600; color: var(--ss-w-faint); }
2065
+
2066
+ .ss-w-cdash-preview { display: flex; flex-direction: column; gap: 8px; background: var(--ss-w-panel); border: 1px solid var(--ss-w-line); border-radius: 12px; padding: 10px 12px; }
2067
+ .ss-w-cdash-preview-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 6px; }
2068
+ .ss-w-cdash-preview-header .ss-w-cdash-team:first-child { justify-self: start; text-align: left; }
2069
+ .ss-w-cdash-preview-header .ss-w-cdash-team:last-child { justify-self: end; text-align: right; }
2070
+ .ss-w-cdash-preview-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; }
2071
+ .ss-w-cdash-preview-label { font-size: 10.5px; font-weight: 600; color: var(--ss-w-faint); text-align: center; text-transform: uppercase; letter-spacing: 0.03em; }
2072
+ .ss-w-cdash-preview-value { font-size: 12px; font-weight: 700; color: var(--ss-w-ink); text-align: center; }
2073
+ .ss-w-cdash-preview-pills { display: flex; align-items: center; justify-content: center; gap: 3px; }
2074
+ .ss-w-cdash-preview-row:first-of-type .ss-w-cdash-preview-value { justify-self: start; }
2075
+ .ss-w-cdash-preview-row:first-of-type .ss-w-cdash-preview-value:last-child { justify-self: end; }
2076
+ .ss-w-cdash-preview-row:last-of-type .ss-w-cdash-preview-pills:first-child { justify-self: start; }
2077
+ .ss-w-cdash-preview-row:last-of-type .ss-w-cdash-preview-pills:last-child { justify-self: end; }
2078
+ .ss-w-cdash-preview-edge { display: flex; align-items: baseline; gap: 4px; font-size: 12px; line-height: 1.4; color: var(--ss-w-accent); background: color-mix(in srgb, var(--ss-w-accent) 10%, transparent); border-radius: 8px; padding: 6px 8px; }
2079
+ .ss-w-cdash-preview-edge strong { color: var(--ss-w-ink); }
2080
+ .ss-w-cdash-preview-h2h { display: flex; flex-direction: column; gap: 2px; }
2081
+ .ss-w-cdash-preview-h2h p { font-size: 11.5px; line-height: 1.4; color: var(--ss-w-faint); margin: 0; }
2024
2082
  `;
2025
2083
 
2026
2084
  // src/StatsWidget.tsx
2027
- import { jsx as jsx29 } from "react/jsx-runtime";
2085
+ import { jsx as jsx31 } from "react/jsx-runtime";
2028
2086
  function buildClient(props) {
2029
2087
  try {
2030
2088
  if ("client" in props && props.client) {
@@ -2077,7 +2135,7 @@ function StatsWidget(props) {
2077
2135
  }, [built, ui.injectStyles]);
2078
2136
  if (!built) return null;
2079
2137
  const attrs = themeAttrs(ui);
2080
- return /* @__PURE__ */ jsx29("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__ */ jsx29(ChatPanel, { controller, ui, slip, onDashboardTap }) : /* @__PURE__ */ jsx29(
2138
+ return /* @__PURE__ */ jsx31("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__ */ jsx31(ChatPanel, { controller, ui, slip, onDashboardTap }) : /* @__PURE__ */ jsx31(
2081
2139
  ChatFab,
2082
2140
  {
2083
2141
  label: ui.launcherLabel,