@sensiblestats/widget-react 0.23.0 → 0.23.1
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 +8 -0
- package/dist/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @sensiblestats/widget-react
|
|
2
2
|
|
|
3
|
+
## 0.23.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a1d4987: Fan-dashboard fixture and congested-week card taps now send the card's opaque `actionRef` alongside its `actionLabel`, so the server resolves the pre-issued action binding for that card instead of re-planning a prose command.
|
|
8
|
+
- Updated dependencies [a1d4987]
|
|
9
|
+
- @sensiblestats/widget-sdk@0.21.0
|
|
10
|
+
|
|
3
11
|
## 0.23.0
|
|
4
12
|
|
|
5
13
|
### Minor Changes
|
package/dist/index.cjs
CHANGED
|
@@ -359,8 +359,9 @@ function toCardVM(card) {
|
|
|
359
359
|
function toActionVM(action) {
|
|
360
360
|
const label = str(action.actionLabel) ?? str(action.label) ?? str(action.text) ?? str(action.title) ?? "Continue";
|
|
361
361
|
const actionId = str(action.actionId) ?? str(action.id);
|
|
362
|
+
const actionRef = str(action.actionRef);
|
|
362
363
|
const message = str(action.actionValue) ?? str(action.message) ?? str(action.query) ?? label;
|
|
363
|
-
return { label, actionId, message };
|
|
364
|
+
return { label, actionId, actionRef, message };
|
|
364
365
|
}
|
|
365
366
|
function toChipVM(intent) {
|
|
366
367
|
const text = str(intent.text) ?? str(intent.label) ?? str(intent.title);
|
|
@@ -1599,7 +1600,7 @@ function ChatMessage({ message, disabled, onAct, onTap, ui, slip }) {
|
|
|
1599
1600
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "ss-w-msg ss-w-user", children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("div", { className: "ss-w-bubble", children: message.text }) });
|
|
1600
1601
|
}
|
|
1601
1602
|
const onFanDashboardTap = (card) => {
|
|
1602
|
-
onAct({ message: card.
|
|
1603
|
+
onAct({ message: card.actionLabel, actionRef: card.actionRef, label: card.actionLabel || card.title || "" });
|
|
1603
1604
|
};
|
|
1604
1605
|
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)("div", { className: "ss-w-msg ss-w-bot", children: [
|
|
1605
1606
|
message.text && !message.greetingDashboard && !message.clubFanDashboard ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(Markdown, { text: message.text }) : null,
|
|
@@ -1653,7 +1654,7 @@ function MessageList({ controller, ui, slip, onDashboardTap }) {
|
|
|
1653
1654
|
{
|
|
1654
1655
|
message: m,
|
|
1655
1656
|
disabled: state.isStreaming,
|
|
1656
|
-
onAct: (a) => send(a.message, { actionId: a.actionId, displayText: a.label }),
|
|
1657
|
+
onAct: (a) => send(a.message, { actionId: a.actionId, actionRef: a.actionRef, displayText: a.label }),
|
|
1657
1658
|
onTap: (tile, index) => {
|
|
1658
1659
|
send(tile.actionValue, { displayText: tile.title });
|
|
1659
1660
|
if (m.role === "assistant" && m.greetingDashboard) onDashboardTap?.(tile, index, m.greetingDashboard.layout);
|