@usableapp/cardds 0.7.108 → 0.7.110
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 +34 -0
- package/css/base.css +1 -0
- package/css/card.css +1 -0
- package/css/sheet.css +12 -3
- package/css/stamp.css +2 -0
- package/dist/cardds.css +16 -3
- package/dist/catalog.json +1 -1
- package/dist/sheets/SheetSteps.d.ts +6 -6
- package/dist/sheets/SheetSteps.js +3 -28
- package/dist/stamp/StampOn.d.ts +3 -1
- package/dist/stamp/StampOn.js +5 -5
- package/dist/type/Text.d.ts +3 -1
- package/dist/type/Text.js +2 -2
- package/package.json +1 -1
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.110 — 2026-10-23
|
|
6
|
+
|
|
7
|
+
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).
|
|
8
|
+
|
|
9
|
+
Components: all
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- **`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`.
|
|
13
|
+
- **`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`.
|
|
14
|
+
- **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`.
|
|
15
|
+
|
|
16
|
+
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).
|
|
17
|
+
|
|
18
|
+
### Fixed
|
|
19
|
+
- **`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.
|
|
20
|
+
- **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.
|
|
21
|
+
|
|
22
|
+
| before | after |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| 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 |
|
|
25
|
+
|
|
26
|
+
- **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).
|
|
27
|
+
|
|
28
|
+
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.
|
|
29
|
+
|
|
30
|
+
## 0.7.109 — 2026-10-22
|
|
31
|
+
|
|
32
|
+
A flick up or down no longer moves a `SheetSteps` step (Lh 2026-10-22: not wanted).
|
|
33
|
+
|
|
34
|
+
Components: SheetStep, SheetSteps
|
|
35
|
+
|
|
36
|
+
### Removed
|
|
37
|
+
- **`SheetSteps`: the up/down swipe.** Before → after: on a `reversible` walk a flick up opened the next step and a flick down the one before, and on a forward walk a flick up passed a `skippable` step → a flick moves nothing; the body only scrolls. A step moves by a tap on another step (`reversible`), the step's skip link, or the app setting `at`. `SheetStepsReason` is `'tap' | 'skip'`; a consumer that matched `'swipe'` in `onAtChange` drops that branch (TypeScript names it). Test: tests/gallery-sheet.spec.js (a flick up and down on `SheetSteps · Numbered` leaves the step where it was).
|
|
38
|
+
|
|
5
39
|
## 0.7.108 — 2026-10-22
|
|
6
40
|
|
|
7
41
|
`KvGrid centre` (Lh 2026-10-21, the code on timebank's request card): the one number at the centre of the room it stands in, a turning card's back. A `JourneyBadge corner` on a `CardMedia` is the card's paper, its corner concentric with the media's; a theme's two badge knobs still win. From when to when (timebank, Lh 2026-10-21): the asker says which days and which hours they need, the helper answers within them.
|
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/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
|
|
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 >
|
|
243
|
-
|
|
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
|
|
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 >
|
|
2082
|
-
|
|
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
|
|
@@ -5103,6 +5114,8 @@ button.calendar__label:focus-visible { outline: var(--focus); outline-offset: va
|
|
|
5103
5114
|
/* --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
5115
|
After the rule above, at the same weight: `main` is the one place a stuck stamp reads --stamp-size. */
|
|
5105
5116
|
.stamp-on--main > .stamp { width: var(--stamp-size, calc(var(--tap) * 2)); }
|
|
5117
|
+
.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 */
|
|
5118
|
+
.stamp-on--under > .stamp { width: var(--stamp-size, calc(var(--tap) * 2)); filter: none; }
|
|
5106
5119
|
.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
5120
|
.stamp-on--move { cursor: grab; touch-action: none; -webkit-user-select: none; user-select: none; transition: scale var(--motion-press) var(--ease-out); }
|
|
5108
5121
|
.stamp-on--move:focus-visible { outline: var(--focus); outline-offset: var(--sp-1); }
|