@soffits/dsh-card-board 0.17.0 → 0.17.2
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/client.js +8 -6
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.17.2
|
|
4
|
+
|
|
5
|
+
An opened row's detail buttons show their labels (a chat button said nothing but its icon).
|
|
6
|
+
|
|
7
|
+
## 0.17.1
|
|
8
|
+
|
|
9
|
+
Tapping a row that has a `detail` opens it again. The row is itself a button (`role=button`), and the check that keeps a tap on one of a row's own buttons from opening it counted the row too, so no row ever opened.
|
|
10
|
+
|
|
3
11
|
## 0.17.0
|
|
4
12
|
|
|
5
13
|
A `detail` can carry `actions`: buttons shown only when its card or row is opened, below the detail, and pressed like any other (the server finds them by id on that card or row). They let a row stay short on the board, a chip and a snooze, while its answers sit under the note that asks the question. View-only viewers get none of them, as with the row's own buttons. Why: `docs/decisions/detail-actions.md`.
|
package/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @soffits/dsh-card-board 0.17.
|
|
1
|
+
/* @soffits/dsh-card-board 0.17.2: built by scripts/build.mjs from src/client/. Do not edit. */
|
|
2
2
|
window.__ModuleLoader__.load({
|
|
3
3
|
id: "@soffits/dsh-card-board",
|
|
4
4
|
factory: (require) => {
|
|
@@ -907,7 +907,8 @@ function openLink(link) {
|
|
|
907
907
|
window.dispatchEvent(new PopStateEvent("popstate"));
|
|
908
908
|
}
|
|
909
909
|
function onControl(event) {
|
|
910
|
-
|
|
910
|
+
const control = event.target?.closest?.("button,a,input,select,textarea,label,[role=button],[role=link],[role=checkbox],[role=menuitem]");
|
|
911
|
+
return Boolean(control) && control !== event.currentTarget;
|
|
911
912
|
}
|
|
912
913
|
|
|
913
914
|
// src/client/steps.js
|
|
@@ -1515,11 +1516,11 @@ function Card({ entry, live, boardId, assistant, tracks, active, locale, t, pres
|
|
|
1515
1516
|
const askName = assistant ? t("action.chatNamed", { name: assistant }) : void 0;
|
|
1516
1517
|
const named = (list) => assistant ? list?.map((action) => action.kind === "chat" && action.label === void 0 ? { ...action, label: askName } : action) : list;
|
|
1517
1518
|
const onPress = (target) => (action, extra) => press(action, extra, { card: entry.id, ...target }, target.row === void 0 ? void 0 : card.data.rows?.[target.row]);
|
|
1518
|
-
const rowActions = actions && ((row, list, part2) => (0, import_react10.createElement)(actions.ActionBar, {
|
|
1519
|
+
const rowActions = actions && ((row, list, part2, compact = true) => (0, import_react10.createElement)(actions.ActionBar, {
|
|
1519
1520
|
actions: named(list),
|
|
1520
1521
|
part: part2,
|
|
1521
1522
|
states: statesOf(entry.presses, row),
|
|
1522
|
-
compact
|
|
1523
|
+
compact,
|
|
1523
1524
|
about: about(row, rowLine(row)),
|
|
1524
1525
|
onPress: onPress({ row })
|
|
1525
1526
|
}));
|
|
@@ -1575,11 +1576,12 @@ function Card({ entry, live, boardId, assistant, tracks, active, locale, t, pres
|
|
|
1575
1576
|
rowControls: { ...rowControls, kept: [], press: (_, action) => rowControls.press(index, action), state: (_, id) => rowControls.state(index, id), latest: (_, id) => rowControls.latest(index, id) }
|
|
1576
1577
|
}),
|
|
1577
1578
|
(0, import_react10.createElement)(DetailParts, { detail: target.detail, locale, t }),
|
|
1579
|
+
// The opened row has room, so its detail's buttons say what they do.
|
|
1578
1580
|
rowActions && opened2.length > 0 && (0, import_react10.createElement)(
|
|
1579
1581
|
"footer",
|
|
1580
1582
|
{ className: "cb-cardActions" },
|
|
1581
|
-
opened2.some((action) => action.kind === "step") && rowActions(index, opened2, "steps"),
|
|
1582
|
-
rowActions(index, opened2, "buttons")
|
|
1583
|
+
opened2.some((action) => action.kind === "step") && rowActions(index, opened2, "steps", false),
|
|
1584
|
+
rowActions(index, opened2, "buttons", false)
|
|
1583
1585
|
)
|
|
1584
1586
|
);
|
|
1585
1587
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soffits/dsh-card-board",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.2",
|
|
4
4
|
"description": "A data-driven card board for DeepSeek Harness: scripts write small JSON cards, the Web UI shows each person the boards they may see.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|