@usableapp/cardds 0.7.97 → 0.7.98

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 CHANGED
@@ -1,6 +1,16 @@
1
1
  # Changelog
2
2
 
3
- > For: a project that consumes `@usableapp/cardds` and its AI — what changed between versions, written as before → after, so a screen can be brought up to date without reading the source. Newest first. A consumer never edits cardds; if something here leaves you without a way to do what you did before, report the gap.
3
+ > For: a project that consumes `@usableapp/cardds` and its AI — what changed between versions, written as before → after, so a screen can be brought up to date without reading the source. Newest first. A consumer never edits cardds; if something here leaves you without a way to do what you did before, report the gap. Each release section after 0.7.97 carries one `Components:` line, written by `node scripts/components-changed.mjs <previous tag>`: the components the release changed, or `all` when a file changed that any component can read (a token, the build), or `none`; check only the screens that import those.
4
+
5
+ ## 0.7.98 — 2026-10-18
6
+
7
+ Components: all
8
+
9
+ ### Added
10
+ - **A release names the components it changed.** Before → after: a project taking a new version could not tell which screens it reaches, so it re-ran all of them → each section from this one on carries one `Components:` line (names, `all` when a shared file such as a token changed, or `none`), written by `node scripts/components-changed.mjs <previous tag>`; `npm run release` publishes no version without it. Check only the screens that import what it names.
11
+
12
+ ### Changed
13
+ - **A card has no edge again** (Lh 2026-10-18: "this design never used a card edge"). Before → after: 0.7.96 set `--card-border: var(--on-surface-muted)` under any `data-palette` and kept it under the `lit` and `sticker` finishes, so every card, and every `SheetStack` and `Sheet` sheet (each is a `.card`), drew a 1.5px line → `--card-border` is `transparent` in coloured mode and under every finish, as before 0.7.96; `print` and `ink` draw their own line as the finish; the wireframe keeps its black line. A card stands apart from its ground by its fill: `cardGrounds()` still measures it, and a failing row now names only the fill's tokens (`--card-N-bg` or the ground's) and its shortfall, never an edge. `tests/card-grounds.spec.js` no longer holds every stock palette to 3:1, because the light tones on a light ground do not reach it by fill; which colours carry it is the theme's call. A project that wants the line back sets `--card-border` in its own `theme.css`.
4
14
 
5
15
  ## 0.7.97 — 2026-10-18
6
16
 
package/css/finish.css CHANGED
@@ -20,10 +20,9 @@
20
20
  so a finish sits in any palette; the one plain white is the sticker's backing paper and the lit edge's light.
21
21
  ============================================================ */
22
22
 
23
- /* every finish: the finish IS the controls' edge, so the wireframe's control border steps back (as [data-palette] in palette.css). The card
24
- keeps its --card-border: lit's ring and sticker's white cut do not reach 3:1 on a light ground (palette.css, THE CARD KEEPS AN EDGE);
25
- print and ink draw their own line below */
26
- [data-finish] { --action-border: transparent; }
23
+ /* every finish: the finish IS the edge, so the wireframe's two borders step back (as [data-palette] in palette.css, A CARD HAS NO EDGE);
24
+ ink puts its own line there below */
25
+ [data-finish] { --card-border: transparent; --action-border: transparent; }
27
26
 
28
27
  /* ============================================================
29
28
  lit — the light comes from above:
package/css/palette.css CHANGED
@@ -124,17 +124,15 @@
124
124
  --dot-a: #dd9787; --dot-b: #b08a5a;
125
125
  }
126
126
 
127
- /* Colored palettes add a soft elevation under the card's edge. */
127
+ /* Colored palettes trade wireframe outlines for soft elevation. */
128
128
  [data-palette] :is(.card, .band-stack) { box-shadow: var(--shadow-card); }
129
129
  /* COLOURED MODE is the attribute, whatever its value: a project with colours of its own (the five
130
130
  --color-* bases, or roles, in its theme.css) writes <html data-palette="own"> — no block here matches
131
131
  "own", so only the three generic rules apply: the card's shadow, the soft outline, the field's soft
132
- edge (forms.css); and the controls' wireframe border steps back, as in every stock palette.
133
- THE CARD KEEPS AN EDGE (Lh 2026-10-18, timebank's help sheet: white cards on the white sheet, "no different from
134
- the background at all"). A card is one boundary, and WCAG 2.2 SC 1.4.11 asks 3:1 for it against what it stands
135
- on. Light cards on a light ground cannot reach 3:1 by fill (a tone-1 card in a tone-1 sheet is 1:1), so the
136
- edge carries it: the muted ink of the ground, which every palette already holds to AA on its surface.
137
- `cardGrounds()` measures each tone on each ground (tests/card-grounds.spec.js). */
138
- [data-palette] { --card-border: var(--on-surface-muted); --action-border: transparent; }
132
+ edge (forms.css); and the two wireframe borders step back, as in every stock palette.
133
+ A CARD HAS NO EDGE (Lh 2026-10-18, ruled after 0.7.96 gave every card and every sheet a line: "this design never
134
+ used a card edge"). A card stands apart from its ground by its FILL; `cardGrounds()` measures that fill and
135
+ names the tokens to move. Never answer a card that cannot be seen with a border. */
136
+ [data-palette] { --card-border: transparent; --action-border: transparent; }
139
137
  /* …but controls keep a faint edge so they still read as controls */
140
138
  [data-palette] { --outline: color-mix(in srgb, currentColor 25%, transparent); }
@@ -55,7 +55,7 @@
55
55
 
56
56
  /* ---- colour roles: only where a derivation is not what you want — a role set here wins over it ----
57
57
  --surface --card-1-bg … --card-5-bg (five card tones: fills only, their words follow their side)
58
- --card-border (a card's fill or its --card-border holds 3:1 on its ground: cardGrounds(), docs/reference.md)
58
+ --card-border (transparent in coloured mode: a card stands apart by its fill, 3:1 on its ground — cardGrounds(), docs/reference.md)
59
59
  --accent --action-bg --action-border
60
60
  --pos --neg --dot-a --dot-b
61
61
  --signal-ok-onlight --signal-warn-onlight --signal-error-onlight --signal-info-onlight (the signal set: green · yellow · red ·
package/css/tokens.css CHANGED
@@ -205,7 +205,7 @@
205
205
  --card-4-bg: #d4d4d0;
206
206
  --card-5-bg: #3d3d3d;
207
207
 
208
- --card-border: #141414; /* wireframe: visible outline; coloured mode: --on-surface-muted (palette.css). Its edge, or the fill, holds 3:1 on the ground: cardGrounds() */
208
+ --card-border: #141414; /* wireframe: visible outline; coloured mode and every finish: transparent, the card stands apart by its fill (cardGrounds()) */
209
209
 
210
210
  /* actions */
211
211
  --accent: var(--color-brand, #141414); /* primary CTA fill */
package/dist/cardds.css CHANGED
@@ -246,7 +246,7 @@
246
246
  --card-4-bg: #d4d4d0;
247
247
  --card-5-bg: #3d3d3d;
248
248
 
249
- --card-border: #141414; /* wireframe: visible outline; coloured mode: --on-surface-muted (palette.css). Its edge, or the fill, holds 3:1 on the ground: cardGrounds() */
249
+ --card-border: #141414; /* wireframe: visible outline; coloured mode and every finish: transparent, the card stands apart by its fill (cardGrounds()) */
250
250
 
251
251
  /* actions */
252
252
  --accent: var(--color-brand, #141414); /* primary CTA fill */
@@ -477,18 +477,16 @@
477
477
  --dot-a: #dd9787; --dot-b: #b08a5a;
478
478
  }
479
479
 
480
- /* Colored palettes add a soft elevation under the card's edge. */
480
+ /* Colored palettes trade wireframe outlines for soft elevation. */
481
481
  [data-palette] :is(.card, .band-stack) { box-shadow: var(--shadow-card); }
482
482
  /* COLOURED MODE is the attribute, whatever its value: a project with colours of its own (the five
483
483
  --color-* bases, or roles, in its theme.css) writes <html data-palette="own"> — no block here matches
484
484
  "own", so only the three generic rules apply: the card's shadow, the soft outline, the field's soft
485
- edge (forms.css); and the controls' wireframe border steps back, as in every stock palette.
486
- THE CARD KEEPS AN EDGE (Lh 2026-10-18, timebank's help sheet: white cards on the white sheet, "no different from
487
- the background at all"). A card is one boundary, and WCAG 2.2 SC 1.4.11 asks 3:1 for it against what it stands
488
- on. Light cards on a light ground cannot reach 3:1 by fill (a tone-1 card in a tone-1 sheet is 1:1), so the
489
- edge carries it: the muted ink of the ground, which every palette already holds to AA on its surface.
490
- `cardGrounds()` measures each tone on each ground (tests/card-grounds.spec.js). */
491
- [data-palette] { --card-border: var(--on-surface-muted); --action-border: transparent; }
485
+ edge (forms.css); and the two wireframe borders step back, as in every stock palette.
486
+ A CARD HAS NO EDGE (Lh 2026-10-18, ruled after 0.7.96 gave every card and every sheet a line: "this design never
487
+ used a card edge"). A card stands apart from its ground by its FILL; `cardGrounds()` measures that fill and
488
+ names the tokens to move. Never answer a card that cannot be seen with a border. */
489
+ [data-palette] { --card-border: transparent; --action-border: transparent; }
492
490
  /* …but controls keep a faint edge so they still read as controls */
493
491
  [data-palette] { --outline: color-mix(in srgb, currentColor 25%, transparent); }
494
492
 
@@ -5594,10 +5592,9 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
5594
5592
  so a finish sits in any palette; the one plain white is the sticker's backing paper and the lit edge's light.
5595
5593
  ============================================================ */
5596
5594
 
5597
- /* every finish: the finish IS the controls' edge, so the wireframe's control border steps back (as [data-palette] in palette.css). The card
5598
- keeps its --card-border: lit's ring and sticker's white cut do not reach 3:1 on a light ground (palette.css, THE CARD KEEPS AN EDGE);
5599
- print and ink draw their own line below */
5600
- [data-finish] { --action-border: transparent; }
5595
+ /* every finish: the finish IS the edge, so the wireframe's two borders step back (as [data-palette] in palette.css, A CARD HAS NO EDGE);
5596
+ ink puts its own line there below */
5597
+ [data-finish] { --card-border: transparent; --action-border: transparent; }
5601
5598
 
5602
5599
  /* ============================================================
5603
5600
  lit — the light comes from above:
@@ -74,7 +74,7 @@ export function cardGrounds(root = document.body) {
74
74
  const edge = Math.max(1, ...edges.map((c) => ratio(paint([...under, c]), ground)));
75
75
  const f = ratio(fill, ground), pass = f >= 3 || edge >= 3;
76
76
  const where = g.ground === 'screen' ? 'on the screen' : `in a ${g.ground}'s body`;
77
- const problem = pass ? '' : `tone ${tone} card ${where}: fill ${f}:1 (--card-${tone}-bg ${hex(fill)} on ${g.token} ${hex(ground)}), edge ${edge}:1 (--card-border); one of them needs 3:1 — the fill is short by ${Math.round((3 - f) * 100) / 100}, or give --card-border a colour of 3:1 on ${hex(ground)}`;
77
+ const problem = pass ? '' : `tone ${tone} card ${where}: fill ${f}:1 (--card-${tone}-bg ${hex(fill)} on ${g.token} ${hex(ground)}); the fill needs 3:1 and is short by ${Math.round((3 - f) * 100) / 100} — move --card-${tone}-bg or ${g.token}, never an edge`;
78
78
  return { ground: g.ground, tone, fill: f, edge, pass, problem };
79
79
  }));
80
80
  }