@soffits/dsh-card-board 0.13.0 → 0.14.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 +4 -0
- package/README.md +1 -1
- package/client.js +1 -1
- package/package.json +1 -1
- package/src/schema.js +3 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.14.0
|
|
4
|
+
|
|
5
|
+
A countdown can carry up to 24 steps (was 8), enough for a whole travel day from waking up to landing. The next step is still marked and the passed ones dimmed.
|
|
6
|
+
|
|
3
7
|
## 0.13.0
|
|
4
8
|
|
|
5
9
|
A stat item can carry an `icon`: a big tinted tile beside its label and number, like a Home Assistant tile, coloured with `iconTone`, the item's `tone` or the card's. A stat block with icons lays its numbers out in an even grid, and on a phone, where two numbers share a row, each tile sits above its words so the numbers keep their width. A countdown's `data.icon` sits the same way before the big number. The tile is 48 px (44 above a chart or rows, 40–42 on a phone). Needs dsh-ui-kit 0.5.0 for `trophy`, `medal`, `weight` and the high and low thermometers.
|
package/README.md
CHANGED
|
@@ -143,7 +143,7 @@ A chip with `to` (an ISO time) gets a ticking "in 1d 19h" after its text.
|
|
|
143
143
|
|
|
144
144
|
### countdown
|
|
145
145
|
|
|
146
|
-
A big ticking number until `to`, and the stops on the way with the next one marked. After `to` it says "now"; after `expiresAt` the card hides itself, so whoever writes it needn't remove it on time.
|
|
146
|
+
A big ticking number until `to`, and the stops on the way (up to 24) with the next one marked and the passed ones dimmed. After `to` it says "now"; after `expiresAt` the card hides itself, so whoever writes it needn't remove it on time.
|
|
147
147
|
|
|
148
148
|
```json
|
|
149
149
|
{ "to": "2026-03-04T07:40:00+01:00", "label": "until the train leaves", "sub": "3 h 10 m, one change", "icon": "luggage",
|
package/client.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* @soffits/dsh-card-board 0.
|
|
1
|
+
/* @soffits/dsh-card-board 0.14.0: 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) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soffits/dsh-card-board",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.14.0",
|
|
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",
|
package/src/schema.js
CHANGED
|
@@ -24,6 +24,8 @@ export const INVERSE_KINDS = Object.freeze(['done', 'snooze', 'event'])
|
|
|
24
24
|
export const UNDO_KIND = 'undo'
|
|
25
25
|
/** Suggested steps per card or row: a few clear next moves, not a menu. */
|
|
26
26
|
export const MAX_STEPS = 3
|
|
27
|
+
/** Stops on a countdown's track: a whole travel day is more than eight. */
|
|
28
|
+
export const MAX_COUNTDOWN_STEPS = 24
|
|
27
29
|
export const ACTION_ID_PATTERN = /^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$/
|
|
28
30
|
/** Row keys: stable ids, so the page can tell which row changed. The same shape as action ids. */
|
|
29
31
|
export const KEY_PATTERN = ACTION_ID_PATTERN
|
|
@@ -533,7 +535,7 @@ function countdownData(c, data, path) {
|
|
|
533
535
|
if (c.dateTime(v, join(path, 'expiresAt')) && toOk && Date.parse(v) < Date.parse(data.to)) c.fail(join(path, 'expiresAt'), 'must not be before to')
|
|
534
536
|
})
|
|
535
537
|
c.optional(data, 'steps', steps => {
|
|
536
|
-
if (!c.array(steps, join(path, 'steps'), { min: 1, max:
|
|
538
|
+
if (!c.array(steps, join(path, 'steps'), { min: 1, max: MAX_COUNTDOWN_STEPS })) return
|
|
537
539
|
steps.forEach((step, i) => {
|
|
538
540
|
const p = join(join(path, 'steps'), i)
|
|
539
541
|
if (!c.object(step, p, ['at', 'label'], ['sub', 'zone'])) return
|