@usableapp/cardds 0.7.109 → 0.7.111

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
@@ -2,6 +2,40 @@
2
2
 
3
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
4
 
5
+ ## 0.7.111 — 2026-10-23
6
+
7
+ `StampOn under` shows on a `Card paper="bands"` (timebank, 2026-10-23: the asker's stamp lay under the head's paper band and could not be seen).
8
+
9
+ Components: CallSheet, Card, CardFeed, FeedCard, Head, Home, NumberBand, NumberBandStack, Sheet, SheetStack, StackSheet, StampOn, Walkthrough
10
+
11
+ ### Fixed
12
+ - **The under stamp is seen over a bands card's head paper.** Before → after: on `<Card paper="bands">` the head's paper background painted over the stamp lying at `--z-under`, so a `StampOn under` there was hidden whole → when the card holds an under stamp, the head's paper is drawn by the head's `::before` one step lower (`--z-under-2`): the stamp shows over the band, the head's badge, chips and words stay over the stamp. A card with no under stamp, and a card with no bands, is unchanged. Nothing to change in a consumer. Story `Card/StampUnderHeadBands` (new); test `StampOn under on a bands card: the stamp is seen over the head paper` (tests/stamp-under.spec.js).
13
+
14
+ ## 0.7.110 — 2026-10-23
15
+
16
+ A `SheetStage` whose sheet is away gives its hero the whole stage, a card in a hero is never cut short, and on a dim stage the hero is not dimmed (timebank, 2026-10-22: the request card the neighbours get, shown on the stage after the last step). A `StampOn` can lie under a card's words, a body `Text` can scroll its long rest inside itself, and a round play `IconBtn` stands at a card head's end (timebank, 2026-10-23: the ask by a range of days and hours, by text or by voice).
17
+
18
+ Components: all
19
+
20
+ ### Added
21
+ - **`StampOn under`: the stamp at the card's top right corner, below everything the card holds.** Before → after: a stamp on a card was `StampOn` at a chosen place, small (48 × 60) or `main` (96 × 120) and drawn over the card's words, so a big stamp hid the badge, the chips or the title → `<Card><Head>…</Head>…<StampOn under arrive turn={6}><Stamp …/></StampOn></Card>` lies 96 × 120 at the top right, one `--card-pad` in from the top and the right, stacked lowest (`z-index: var(--z-under)` inside a card or a face that is its own stacking context, `isolation: isolate`), so the date badge, the chips and the words are drawn over it. No shadow (`filter: none`), no drag (`at` and `onAtChange` are ignored), a press falls through to the card (`pointer-events: none`, so a turning card still turns); `turn` and `arrive` work as before, the strike lands on the corner and `onArrived` fires once. Put it as a direct child of the `Card`. A stamp without `under` is unchanged (sticky notes keep their shadow and drag). Story `Card/StampUnderHead`.
22
+ - **`Text level="body" scroll`: a long body text shows three lines and scrolls the rest inside itself.** Before → after: a long reason made its card as tall as the reason → the text stands in a plain box (no border, no ground) `--text-scroll-lines` lines tall (knob, default 3: `max-height: calc(var(--text-scroll-lines, 3) * 1lh)`), scrolling on the y axis (`overscroll-behavior: contain`, `touch-action: pan-y`); a text shorter than the box does not scroll. A scroll never turns a turning card; a tap on the text, off a control, still does. Story `Card/ReasonScrolls`.
23
+ - **A round play `IconBtn` at a card head's end needs nothing new.** `<Head><Words …/><IconBtn sm icon="play" label="…" /></Head>` is the head's end slot as for any `IconBtn`; it is a control, so a press on it never turns a `Card back`. Story `Card/ReasonScrolls`.
24
+
25
+ Tests: tests/stamp-under.spec.js (3: the stamp under the badge, chips and words with no shadow; a drag leaves it and `arrive` lands once; three lines show, scroll does not turn the card, a tap and the play button behave).
26
+
27
+ ### Fixed
28
+ - **`SheetStage hero` with the sheet away takes the room the sheet left.** Before → after: `.sheet-stage__hero` was always the band a HALF sheet leaves open (half the stage under the top line, less the screen inset at both ends), centred on that band, even when the stage's `Sheet` was `state="away"` and the whole stage was free; at 412×915 a request card and its pager got 385px → when every sheet on the stage is away (`.sheet-stage:has(> .sheet):not(:has(> .sheet:not(.sheet--away)))`), the hero runs from the top line to the bottom, the screen's inset as its padding, and stands what it holds at the middle of it (`align-content: safe center`: a card, then the pager under it); on a screen shorter than what it holds it starts at the top and scrolls (`overflow-y: auto`), so the pager is never clipped off the stage; it is its own stacking context (`isolation: isolate`, as the band's `translate` already made it), so a pager's `--z-bar` stays under the sheet sliding away. A peek, half, 3q or full sheet keeps the band as before; a stage with no sheet is unchanged. Nothing to change in a consumer: `<SheetStage hero={…}><Sheet state="away" …/></SheetStage>` now shows the hero at the middle of the screen.
29
+ - **A hero's child is never squeezed below its content.** Before → after: `.sheet-stage > .sheet-stage__hero > * { min-height: 0 }` let ANY child shrink to the band, so a card taller than it lost its middle, picture and foot with no overflow and no warning → only a `Postcard` gives way (`.sheet-stage__hero > .postcard` sets the postcard's own knob `--postcard-min-h: 0rem`): its faces lie absolute, its min-height is its only size and it fills whatever box it gets, so it still fills the band as before. Anything that flows keeps its content height; a hero shorter than it shows the overflow (under a raised sheet, or past the band) instead of cutting it unseen. Chosen over a dev warning or a `cardds check` rule: the size is known only at layout, which no source check sees, and a warning would still leave the card cut.
30
+
31
+ | before | after |
32
+ | --- | --- |
33
+ | sheet `away`: hero 385px tall at 412×915, the card squeezed to 293px (its picture and foot cut) | the hero is the stage under the top line less the inset, the card at full height at the middle, the pager under it |
34
+
35
+ - **On a dim stage the hero stands over the scrim, with the sheet.** Before → after: `.sheet-stage--dim::after` (the scrim, `--z-over`) covered everything on the stage but the `.sheet` (`--z-over-2`), so a hero on a dim stage, the card a consumer shows after lowering the sheet of a task laid over a page (`SheetStage over dim`), was darkened with the page behind it → `.sheet-stage--dim > .sheet-stage__hero` stands at `--z-over-2` too; the sheet, later in the DOM, still covers it at full. Story `SheetStage/HeroAwayDim` (new); test `SheetStage hero on a dim stage: the card stands over the scrim, not under it` (tests/sheet-stage-hero.spec.js).
36
+
37
+ Story `SheetStage/HeroAway` (new: the sheet lowered, the turning bands card with a picture and a foot in the hero, the pager under it; แก้ไข raises the sheet). Tests: tests/sheet-stage-hero.spec.js (5: the card whole at 375×812 and 412×915, the hero scrolling to the pager at 320×568, the sheet covering the pager while it slides away, the card over the scrim). Style snapshot against 0.7.109: all 509 stories identical, `Postcard` in its stage among them; only the two new stories are new.
38
+
5
39
  ## 0.7.109 — 2026-10-22
6
40
 
7
41
  A flick up or down no longer moves a `SheetSteps` step (Lh 2026-10-22: not wanted).
package/css/base.css CHANGED
@@ -138,6 +138,7 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
138
138
  .t-h2 { font: var(--type-h2); letter-spacing: var(--track-h2); margin: 0; --fs-self: var(--fs-h2); }
139
139
  .t-title { font: var(--type-title); margin: 0; --fs-self: var(--fs-title); }
140
140
  .t-body { font: var(--type-body); margin: 0; }
141
+ .t-scroll { max-height: calc(var(--text-scroll-lines, 3) * 1lh); overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; } /* the box is plain: no border, no ground; lh = the body's own line */
141
142
  .t-label { font: var(--type-label); }
142
143
  .t-caption { font: var(--type-caption); color: var(--t-caption-ink, inherit); }
143
144
  .t-stat { font: var(--type-stat); letter-spacing: var(--track-display); margin: 0; font-variant-numeric: tabular-nums; }
package/css/card.css CHANGED
@@ -85,6 +85,7 @@
85
85
  position: relative;
86
86
  }
87
87
  .card__face > * { min-width: 0; }
88
+ :is(.card, .card__face):has(> .stamp-on--under, > .card__middle > .stamp-on--under) { isolation: isolate; } /* the card is the stacking context the stamp's -1 lies in: below the card's words, above its paper */
88
89
  .card__middle { flex: 1 0 auto; display: flex; flex-direction: column; gap: var(--card-gap); height: var(--card-middle-h, auto); overflow: hidden; } /* a flex column, not a grid: the middle's height is the flexed one, so one thing on a face (a QR, a code) may take the whole middle with height: 100% (a grid's auto row never stretched to it, and the thing stood at the top of an empty band) */
89
90
  .card__turn { position: absolute; inset: 0; width: var(--px); height: var(--px); padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
90
91
  .card__face:has(> .card__turn:focus-visible) { outline: var(--focus); outline-offset: calc(-1 * var(--sp-1)); }
package/css/parts.css CHANGED
@@ -144,6 +144,10 @@
144
144
  /* the seam: the heading and the words under it read as ONE paragraph that changes colour at the band's edge (Lh 2026-10-21), so the room on
145
145
  each side of the head band's lower edge is --card-band-seam, not the card's padding and gap */
146
146
  :is(.card--bands, .card--bands > .card__face) > .head + * { margin-block-start: calc(var(--card-band-seam, var(--sp-2)) - var(--card-gap)); }
147
+ /* an under stamp (`StampOn under`) lies at --z-under, below the words but above the card's paper; the head's paper background would paint over it, so the band moves
148
+ onto a pseudo-element one step lower (--z-under-2): the stamp shows on the band and the head's words stay over the stamp */
149
+ :is(.card--bands, .card--bands > .card__face):has(> .stamp-on--under, > .card__middle > .stamp-on--under) > .head { position: relative; background: none; }
150
+ :is(.card--bands, .card--bands > .card__face):has(> .stamp-on--under, > .card__middle > .stamp-on--under) > .head::before { content: ""; position: absolute; inset: 0; z-index: var(--z-under-2); background: var(--card-bg); }
147
151
 
148
152
  /* in a sheet stack */
149
153
  /* stack headers: uniform — [back?] title left, icons right, one height,
package/css/sheet.css CHANGED
@@ -235,12 +235,20 @@
235
235
  top: var(--_band-centre);
236
236
  translate: 0 -50%;
237
237
  /* as tall as the band less the screen's inset at both ends (Lh 2026-09-22: the room under the hero = the room at its sides);
238
- what it holds fills it (a postcard's min-height gives way) */
238
+ what it holds fills it */
239
239
  height: calc((100cqh - var(--_top, 0rem)) / 2 - 2 * var(--screen-pad));
240
240
  display: grid;
241
241
  }
242
- .sheet-stage > .sheet-stage__hero > * { min-height: 0; } /* outranks a component's own min-height (the postcard's) */
243
- /* no z-index on the hero: it follows the background in DOM order and the sheet, later, covers it at full */
242
+ .sheet-stage > .sheet-stage__hero > .postcard { --postcard-min-h: 0rem; }
243
+ .sheet-stage:has(> .sheet):not(:has(> .sheet:not(.sheet--away))) > .sheet-stage__hero {
244
+ inset: var(--_top, 0rem) 0 0;
245
+ padding: var(--screen-pad);
246
+ translate: none;
247
+ height: auto;
248
+ align-content: safe center;
249
+ overflow-y: auto;
250
+ isolation: isolate; /* the band's translate made one: a pager's --z-bar stays inside, under the sheet sliding away */
251
+ }
244
252
 
245
253
  /* ---- map: the box a map engine draws in, behind a stage sheet ----
246
254
  <div class="sheet-stage__bg"><div class="map"><div>…the engine's canvas…</div>
@@ -429,6 +437,7 @@
429
437
  z-index: var(--z-over);
430
438
  }
431
439
  .sheet-stage--dim .sheet { z-index: var(--z-over-2); }
440
+ .sheet-stage--dim > .sheet-stage__hero { z-index: var(--z-over-2); }
432
441
 
433
442
  /* ---- sheet steps: one task in steps inside one sheet (Lh 2026-09-24) ----
434
443
  <div class="sheet-steps"> › <ol class="sheet-steps__track"> of <li class="sheet-step sheet-step--done|now|next">. The done steps
package/css/stamp.css CHANGED
@@ -227,6 +227,8 @@
227
227
  /* --main: the same stuck stamp at the stamp's MAIN size, 96 × 120 (--stamp-size), to cover what it lies on (the owner's call, 2026-10-11: the home's note).
228
228
  After the rule above, at the same weight: `main` is the one place a stuck stamp reads --stamp-size. */
229
229
  .stamp-on--main > .stamp { width: var(--stamp-size, calc(var(--tap) * 2)); }
230
+ .stamp-on--under { top: var(--card-pad, 0); right: var(--card-pad, 0); left: auto; translate: none; z-index: var(--z-under); pointer-events: none; } /* the card's top right corner, below everything the card holds */
231
+ .stamp-on--under > .stamp { width: var(--stamp-size, calc(var(--tap) * 2)); filter: none; }
230
232
  .stamp-on--move { will-change: transform; } /* its own layer: Safari left the stamp's shadow behind as a trail along the drag when it was painted with the note (seen on the simulator, 2026-10-07) */
231
233
  .stamp-on--move { cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; transition: scale var(--motion-press) var(--ease-out); }
232
234
  .stamp-on--move:focus-visible { outline: var(--focus); outline-offset: var(--sp-1); }
package/dist/cardds.css CHANGED
@@ -707,6 +707,7 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
707
707
  .t-h2 { font: var(--type-h2); letter-spacing: var(--track-h2); margin: 0; --fs-self: var(--fs-h2); }
708
708
  .t-title { font: var(--type-title); margin: 0; --fs-self: var(--fs-title); }
709
709
  .t-body { font: var(--type-body); margin: 0; }
710
+ .t-scroll { max-height: calc(var(--text-scroll-lines, 3) * 1lh); overflow-y: auto; overscroll-behavior: contain; touch-action: pan-y; } /* the box is plain: no border, no ground; lh = the body's own line */
710
711
  .t-label { font: var(--type-label); }
711
712
  .t-caption { font: var(--type-caption); color: var(--t-caption-ink, inherit); }
712
713
  .t-stat { font: var(--type-stat); letter-spacing: var(--track-display); margin: 0; font-variant-numeric: tabular-nums; }
@@ -1008,6 +1009,7 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
1008
1009
  position: relative;
1009
1010
  }
1010
1011
  .card__face > * { min-width: 0; }
1012
+ :is(.card, .card__face):has(> .stamp-on--under, > .card__middle > .stamp-on--under) { isolation: isolate; } /* the card is the stacking context the stamp's -1 lies in: below the card's words, above its paper */
1011
1013
  .card__middle { flex: 1 0 auto; display: flex; flex-direction: column; gap: var(--card-gap); height: var(--card-middle-h, auto); overflow: hidden; } /* a flex column, not a grid: the middle's height is the flexed one, so one thing on a face (a QR, a code) may take the whole middle with height: 100% (a grid's auto row never stretched to it, and the thing stood at the top of an empty band) */
1012
1014
  .card__turn { position: absolute; inset: 0; width: var(--px); height: var(--px); padding: 0; border: 0; overflow: hidden; clip-path: inset(50%); }
1013
1015
  .card__face:has(> .card__turn:focus-visible) { outline: var(--focus); outline-offset: calc(-1 * var(--sp-1)); }
@@ -2074,12 +2076,20 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
2074
2076
  top: var(--_band-centre);
2075
2077
  translate: 0 -50%;
2076
2078
  /* as tall as the band less the screen's inset at both ends (Lh 2026-09-22: the room under the hero = the room at its sides);
2077
- what it holds fills it (a postcard's min-height gives way) */
2079
+ what it holds fills it */
2078
2080
  height: calc((100cqh - var(--_top, 0rem)) / 2 - 2 * var(--screen-pad));
2079
2081
  display: grid;
2080
2082
  }
2081
- .sheet-stage > .sheet-stage__hero > * { min-height: 0; } /* outranks a component's own min-height (the postcard's) */
2082
- /* no z-index on the hero: it follows the background in DOM order and the sheet, later, covers it at full */
2083
+ .sheet-stage > .sheet-stage__hero > .postcard { --postcard-min-h: 0rem; }
2084
+ .sheet-stage:has(> .sheet):not(:has(> .sheet:not(.sheet--away))) > .sheet-stage__hero {
2085
+ inset: var(--_top, 0rem) 0 0;
2086
+ padding: var(--screen-pad);
2087
+ translate: none;
2088
+ height: auto;
2089
+ align-content: safe center;
2090
+ overflow-y: auto;
2091
+ isolation: isolate; /* the band's translate made one: a pager's --z-bar stays inside, under the sheet sliding away */
2092
+ }
2083
2093
 
2084
2094
  /* ---- map: the box a map engine draws in, behind a stage sheet ----
2085
2095
  <div class="sheet-stage__bg"><div class="map"><div>…the engine's canvas…</div>
@@ -2268,6 +2278,7 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
2268
2278
  z-index: var(--z-over);
2269
2279
  }
2270
2280
  .sheet-stage--dim .sheet { z-index: var(--z-over-2); }
2281
+ .sheet-stage--dim > .sheet-stage__hero { z-index: var(--z-over-2); }
2271
2282
 
2272
2283
  /* ---- sheet steps: one task in steps inside one sheet (Lh 2026-09-24) ----
2273
2284
  <div class="sheet-steps"> › <ol class="sheet-steps__track"> of <li class="sheet-step sheet-step--done|now|next">. The done steps
@@ -4228,6 +4239,10 @@ button.calendar__label:focus-visible { outline: var(--focus); outline-offset: va
4228
4239
  /* the seam: the heading and the words under it read as ONE paragraph that changes colour at the band's edge (Lh 2026-10-21), so the room on
4229
4240
  each side of the head band's lower edge is --card-band-seam, not the card's padding and gap */
4230
4241
  :is(.card--bands, .card--bands > .card__face) > .head + * { margin-block-start: calc(var(--card-band-seam, var(--sp-2)) - var(--card-gap)); }
4242
+ /* an under stamp (`StampOn under`) lies at --z-under, below the words but above the card's paper; the head's paper background would paint over it, so the band moves
4243
+ onto a pseudo-element one step lower (--z-under-2): the stamp shows on the band and the head's words stay over the stamp */
4244
+ :is(.card--bands, .card--bands > .card__face):has(> .stamp-on--under, > .card__middle > .stamp-on--under) > .head { position: relative; background: none; }
4245
+ :is(.card--bands, .card--bands > .card__face):has(> .stamp-on--under, > .card__middle > .stamp-on--under) > .head::before { content: ""; position: absolute; inset: 0; z-index: var(--z-under-2); background: var(--card-bg); }
4231
4246
 
4232
4247
  /* in a sheet stack */
4233
4248
  /* stack headers: uniform — [back?] title left, icons right, one height,
@@ -5103,6 +5118,8 @@ button.calendar__label:focus-visible { outline: var(--focus); outline-offset: va
5103
5118
  /* --main: the same stuck stamp at the stamp's MAIN size, 96 × 120 (--stamp-size), to cover what it lies on (the owner's call, 2026-10-11: the home's note).
5104
5119
  After the rule above, at the same weight: `main` is the one place a stuck stamp reads --stamp-size. */
5105
5120
  .stamp-on--main > .stamp { width: var(--stamp-size, calc(var(--tap) * 2)); }
5121
+ .stamp-on--under { top: var(--card-pad, 0); right: var(--card-pad, 0); left: auto; translate: none; z-index: var(--z-under); pointer-events: none; } /* the card's top right corner, below everything the card holds */
5122
+ .stamp-on--under > .stamp { width: var(--stamp-size, calc(var(--tap) * 2)); filter: none; }
5106
5123
  .stamp-on--move { will-change: transform; } /* its own layer: Safari left the stamp's shadow behind as a trail along the drag when it was painted with the note (seen on the simulator, 2026-10-07) */
5107
5124
  .stamp-on--move { cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; transition: scale var(--motion-press) var(--ease-out); }
5108
5125
  .stamp-on--move:focus-visible { outline: var(--focus); outline-offset: var(--sp-1); }