@usableapp/cardds 0.7.78 → 0.7.80

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,18 @@
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.
4
4
 
5
+ ## 0.7.80 — 2026-10-10
6
+
7
+ ### Changed
8
+ - **`Btn form` keeps its own width in a card's foot** (Lh 2026-10-10, from timebank's home feed: one button filling the card's foot read too big) — before → after: any `Btn` in `CardFoot` / `Card foot` / `FeedCard foot` was stretched over the row, `form` included → a `Btn form` there is as wide as its words (with its wide sides) and centred; a plain `Btn` still fills the foot, and several still share it. The card is still pressed whole. To use it: `foot={<Btn primary form>…</Btn>}`. Which button a card wears is the project's choice. Story `CardFoot · CardFootWordsWide`.
9
+ - **The catalog knows the functions an app calls, and the MCP server serves it as it is now** (Lh 2026-10-10) — before → after: `list_components` / `get_component` / `find_components` did not know `slideScreen`, `installScreenSlide`, `setWords`, `word`, `setTextScale`, `controlsFor` (they live in `.ts` files the catalog did not read) → all six are in, with their docs. And a `cardds mcp` server loaded the catalog once and kept it for the life of its session, so a session opened before a release never learned what the release added → it now loads again whenever the sources (a live repo) or the package's catalog file changed. A session whose server was started before this change must be restarted once to get the new server.
10
+
11
+ ## 0.7.79 — 2026-10-10
12
+
13
+ ### Changed
14
+ - **A closed stack's base too short for what rests in it scrolls** (Lh 2026-10-10) — before → after: loose things in `SheetStack base` / `Home base` stood on the heads, so on a short phone a content taller than the room ran out over the room's top, cut, and nothing scrolled (two feed cards at 320×568) → nothing is squeezed, the upper thing shows whole from the room's top, the rest lies under the sheet heads, and the member scrolls the room up until the last thing stands clear of the heads by `--stack-base-gap`. A base that holds its content is unchanged, to the pixel, and still takes no scroll and no pull. One `Page` and one `Centre` in a base are unchanged. Nothing to do in an app; a base no longer needs its own short-phone layout.
15
+ - **`FeedCard foot` takes more than one button** — one button: the big card is pressed whole, as before. Two or more (a question: yes · no): only the buttons act. Small, the card hides them all. Story `CardFeed · Question`.
16
+
5
17
  ## 0.7.78 — 2026-10-10
6
18
 
7
19
  ### Added
package/README.md CHANGED
@@ -83,7 +83,7 @@ lets anyone on the same network open the dev server: use it on a network you tru
83
83
  ### In another project
84
84
 
85
85
  **React (the main way, 2026-09-16):** the package is `@usableapp/cardds` on npm
86
- (published from a `v*` tag by `.github/workflows/publish.yml`, trusted publishing).
86
+ (published from this machine: `npm run release` sends every `v*` tag the registry lacks, oldest first).
87
87
 
88
88
  ```bash
89
89
  npm i @usableapp/cardds
@@ -209,6 +209,13 @@ the card is the material, the sheet is what it is in the stack.
209
209
  last one as between two of them (`--stack-base-gap`); one `Page` reads from
210
210
  the top, one `Centre` stands in the middle. A card standing there is flat:
211
211
  the base clips at its edges, so a shadow would end in a straight line.
212
+ A room too short for the loose things in it squeezes nothing: the upper
213
+ thing shows whole from the room's top, the rest lies under the heads, and
214
+ the room scrolls up until the last thing stands clear of the heads by
215
+ `--stack-base-gap`. `SheetStack` measures this and renders `is-long` on the
216
+ base; only then does the base scroll and run under the first sheet's round
217
+ corners. A room that holds its content does not scroll, and a finger on it
218
+ moves nothing.
212
219
  A tap, or a pull up, opens any sheet over it. The open title or its back
213
220
  button, tapped or pulled down, drops it home. A pull down in the open
214
221
  content, already at the top, asks `onRefresh` — omit it and that pull only
@@ -511,7 +518,8 @@ between at 40% down the screen (see *Anatomy*, "Where the centre is"):
511
518
  rendering it. Which card is big is controlled like an input: `big` (a
512
519
  card's `id`) + `onBigChange(id, 'tap' | 'queue')`, or `defaultBig`. A
513
520
  `FeedCard` is `id` · `heading` · `caption` · `icon` (its thumb, in both
514
- sizes) · `tone` · `foot` (one `Btn`) · children (the content); its size is
521
+ sizes) · `tone` · `foot` (one `Btn`: the big card is pressed whole; two
522
+ or more: only the buttons act) · children (the content); its size is
515
523
  the feed's, never a prop. Knobs `--card-feed-gap`, `--feed-card-head-h`.
516
524
  Reduced motion: nothing slides or fades. Stories `CardFeed · Default`,
517
525
  `Home · Feed`.
package/bin/cardds.mjs CHANGED
@@ -72,8 +72,9 @@ import them, never copy their markup: the behaviour lives in the component. Gall
72
72
  return 0;
73
73
  }
74
74
 
75
- // the exports beside the components that are not components (docs/roles.md rows `a function, not a component`…): shape `—` and nothing to tell them from a structural part, so they are named
76
- const HELPERS = new Set(['applyMask', 'slideTo', 'useLayer', 'useLayers', 'useOptionalLayer', 'registerIcons', 'LayerHistory']);
75
+ // the exports beside the components that are not components (docs/roles.md rows `a function, not a component`…): shape `—` and nothing to tell them from a structural part, so they are named.
76
+ // A new one joins here and in the list test of tests/catalog.spec.js, or it is listed as structure
77
+ const HELPERS = new Set(['applyMask', 'slideTo', 'slideScreen', 'installScreenSlide', 'useLayer', 'useLayers', 'useOptionalLayer', 'registerIcons', 'LayerHistory', 'setWords', 'word', 'setTextScale', 'controlsFor']);
77
78
  const one = (text) => text.replace(/\s+/g, ' ').trim();
78
79
  const indent = (text, by = ' ') => text.replace(/^(?=.)/gm, by);
79
80
 
package/css/base.css CHANGED
@@ -70,8 +70,8 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
70
70
 
71
71
  /* scrollbar hidden, scroll kept: the track scrolls by touch/drag, never by a visible bar —
72
72
  .bleed (card.css) is the one exception, its bar is designed, not hidden */
73
- :where(html, .sheet-stack--tap > .card, .step > .pages, .picker__rail, .avatar-pick) { scrollbar-width: none; }
74
- :where(html, .sheet-stack--tap > .card, .step > .pages, .picker__rail, .avatar-pick)::-webkit-scrollbar { display: none; }
73
+ :where(html, .sheet-stack--tap > .card, .sheet-stack__base, .step > .pages, .picker__rail, .avatar-pick) { scrollbar-width: none; }
74
+ :where(html, .sheet-stack--tap > .card, .sheet-stack__base, .step > .pages, .picker__rail, .avatar-pick)::-webkit-scrollbar { display: none; }
75
75
 
76
76
  /* icon from icons.svg sprite: <svg class="icon"><use href="icons.svg#bell"/></svg> */
77
77
  .icon { width: var(--icon-size, var(--icon)); height: var(--icon-size, var(--icon)); flex: none; }
package/css/card.css CHANGED
@@ -136,6 +136,9 @@
136
136
  three on they drop their side padding so the labels keep the room. */
137
137
  .card__foot { display: flex; gap: var(--card-foot-gap, var(--sp-2)); align-items: center; }
138
138
  .card__foot > .btn { flex: 1 1 0; min-width: 0; }
139
+ /* …unless the button says its own size: `Btn form` is as wide as its words in a foot too, centred (Lh 2026-10-10: one button filling
140
+ a card's foot read too big — which button a card wears is the project's choice, so the foot must not undo it) */
141
+ .card__foot > .btn--form { flex: 0 1 auto; }
139
142
  .card__foot:has(> :nth-child(3)) > .btn { padding-inline: var(--sp-2); }
140
143
  /* a small link under the buttons (CardFoot link — Lh 2026-09-23, as the ActionBar's ctaLink): the row wraps, the link takes a
141
144
  whole short row of its own, centred — it never shares the buttons' line */
package/css/stack.css CHANGED
@@ -278,7 +278,8 @@
278
278
  grid-area: 1 / 1;
279
279
  align-self: start;
280
280
  z-index: 0;
281
- height: var(--_headroom, 0px);
281
+ --_under: 0px;
282
+ height: calc(var(--_headroom, 0px) + var(--_under));
282
283
  padding-inline: var(--screen-pad);
283
284
  --_gap: var(--card-gap, var(--sp-5));
284
285
  display: grid;
@@ -298,7 +299,26 @@
298
299
  .sheet-stack__base > .screen__centre { padding-inline: 0; }
299
300
  /* loose things rest against the peeks, so the room under the last one is the room between two of them (Lh 2026-10-09: a card's
300
301
  bottom edge lay on the first sheet's top edge). A lone Page reads from the top and a lone Centre stands in the middle: neither rests there. */
301
- .sheet-stack__base:not(:has(> .page:only-child, > .screen__centre:only-child)) { padding-bottom: var(--stack-base-gap, var(--_gap)); }
302
+ .sheet-stack__base:not(:has(> .page:only-child, > .screen__centre:only-child)) {
303
+ padding-bottom: calc(var(--stack-base-gap, var(--_gap)) + var(--_under));
304
+ /* the first row takes the free room and its thing stands at that row's end: on the peeks while there is room, from the room's TOP when
305
+ there is none. `align-content: end` ran a long content out over the top, where no scroll reaches; the `safe` keyword is not relied
306
+ on, the floor is Safari 16.4. */
307
+ grid-template-rows: 1fr;
308
+ align-content: start;
309
+ align-items: end;
310
+ }
311
+ /* a room too short for what rests in it (Lh 2026-10-10; `is-long`, measured and rendered by SheetStack): nothing is squeezed, the upper
312
+ thing shows whole, the rest lies under the sheets and the room scrolls up to it. Only then: a room that holds its content keeps
313
+ touch-action: none, so a finger there pulls nothing. The box runs under the first sheet by its corner's radius, or a straight cut at
314
+ the sheet's top edge would show ground in the two round corners; the padding grows by the same, so the last thing still scrolls
315
+ clear of the heads by the gap, and the content box (cqh) is the one it was. */
316
+ .sheet-stack__base.is-long:not(:has(> .page:only-child, > .screen__centre:only-child)) {
317
+ --_under: var(--card-radius, var(--r-card));
318
+ overflow-y: auto;
319
+ overscroll-behavior: contain;
320
+ touch-action: pan-y;
321
+ }
302
322
  /* a card standing in this room is FLAT (Lh 2026-10-09): the room clips at its own edges, and a card's shadow cut there drew a straight
303
323
  line under the bar and along the first sheet. Its ground and its radius are what say "card" here. */
304
324
  :is([data-palette], [data-finish="lit"]) .sheet-stack__base .card { box-shadow: none; }
@@ -333,7 +353,7 @@
333
353
  .sheet-stack--flood { --_bar: calc(var(--top-h, var(--header-h)) + var(--_bar-gap)); }
334
354
  .sheet-stack--flood > .sheet-stack__base {
335
355
  margin-top: var(--_bar);
336
- height: calc(var(--_headroom, 0px) - var(--_bar));
356
+ height: calc(var(--_headroom, 0px) - var(--_bar) + var(--_under));
337
357
  }
338
358
  .screen--fill:has(> .sheet-stack--flood > .stack-card.is-open, > .sheet-stack--flood > :not(.stack-card) > .stack-card.is-open) > :is(.appbar, .topbar):first-child {
339
359
  visibility: hidden;
@@ -7,7 +7,8 @@ export interface BtnProps extends Omit<ComponentProps<'button'>, 'form'> {
7
7
  /** full width */
8
8
  block?: boolean;
9
9
  /** a form's button: sized to its words with wide side padding, centred on its own row — it reads as part of the form above it,
10
- * not a page CTA (Lh 2026-09-25). Replaces the native `form` attribute (a button outside its <form> — not a cardds pattern). */
10
+ * not a page CTA (Lh 2026-09-25). In a card's foot (`CardFoot`, `Card foot`, `FeedCard foot`) it keeps that size instead of
11
+ * filling the row. Replaces the native `form` attribute (a button outside its <form> — not a cardds pattern). */
11
12
  form?: boolean;
12
13
  /** the one giant call to action in a tinted card ("Taxi!") */
13
14
  xl?: boolean;
package/dist/cardds.css CHANGED
@@ -540,8 +540,8 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
540
540
 
541
541
  /* scrollbar hidden, scroll kept: the track scrolls by touch/drag, never by a visible bar —
542
542
  .bleed (card.css) is the one exception, its bar is designed, not hidden */
543
- :where(html, .sheet-stack--tap > .card, .step > .pages, .picker__rail, .avatar-pick) { scrollbar-width: none; }
544
- :where(html, .sheet-stack--tap > .card, .step > .pages, .picker__rail, .avatar-pick)::-webkit-scrollbar { display: none; }
543
+ :where(html, .sheet-stack--tap > .card, .sheet-stack__base, .step > .pages, .picker__rail, .avatar-pick) { scrollbar-width: none; }
544
+ :where(html, .sheet-stack--tap > .card, .sheet-stack__base, .step > .pages, .picker__rail, .avatar-pick)::-webkit-scrollbar { display: none; }
545
545
 
546
546
  /* icon from icons.svg sprite: <svg class="icon"><use href="icons.svg#bell"/></svg> */
547
547
  .icon { width: var(--icon-size, var(--icon)); height: var(--icon-size, var(--icon)); flex: none; }
@@ -822,6 +822,9 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
822
822
  three on they drop their side padding so the labels keep the room. */
823
823
  .card__foot { display: flex; gap: var(--card-foot-gap, var(--sp-2)); align-items: center; }
824
824
  .card__foot > .btn { flex: 1 1 0; min-width: 0; }
825
+ /* …unless the button says its own size: `Btn form` is as wide as its words in a foot too, centred (Lh 2026-10-10: one button filling
826
+ a card's foot read too big — which button a card wears is the project's choice, so the foot must not undo it) */
827
+ .card__foot > .btn--form { flex: 0 1 auto; }
825
828
  .card__foot:has(> :nth-child(3)) > .btn { padding-inline: var(--sp-2); }
826
829
  /* a small link under the buttons (CardFoot link — Lh 2026-09-23, as the ActionBar's ctaLink): the row wraps, the link takes a
827
830
  whole short row of its own, centred — it never shares the buttons' line */
@@ -1341,7 +1344,8 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
1341
1344
  grid-area: 1 / 1;
1342
1345
  align-self: start;
1343
1346
  z-index: 0;
1344
- height: var(--_headroom, 0px);
1347
+ --_under: 0px;
1348
+ height: calc(var(--_headroom, 0px) + var(--_under));
1345
1349
  padding-inline: var(--screen-pad);
1346
1350
  --_gap: var(--card-gap, var(--sp-5));
1347
1351
  display: grid;
@@ -1361,7 +1365,26 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
1361
1365
  .sheet-stack__base > .screen__centre { padding-inline: 0; }
1362
1366
  /* loose things rest against the peeks, so the room under the last one is the room between two of them (Lh 2026-10-09: a card's
1363
1367
  bottom edge lay on the first sheet's top edge). A lone Page reads from the top and a lone Centre stands in the middle: neither rests there. */
1364
- .sheet-stack__base:not(:has(> .page:only-child, > .screen__centre:only-child)) { padding-bottom: var(--stack-base-gap, var(--_gap)); }
1368
+ .sheet-stack__base:not(:has(> .page:only-child, > .screen__centre:only-child)) {
1369
+ padding-bottom: calc(var(--stack-base-gap, var(--_gap)) + var(--_under));
1370
+ /* the first row takes the free room and its thing stands at that row's end: on the peeks while there is room, from the room's TOP when
1371
+ there is none. `align-content: end` ran a long content out over the top, where no scroll reaches; the `safe` keyword is not relied
1372
+ on, the floor is Safari 16.4. */
1373
+ grid-template-rows: 1fr;
1374
+ align-content: start;
1375
+ align-items: end;
1376
+ }
1377
+ /* a room too short for what rests in it (Lh 2026-10-10; `is-long`, measured and rendered by SheetStack): nothing is squeezed, the upper
1378
+ thing shows whole, the rest lies under the sheets and the room scrolls up to it. Only then: a room that holds its content keeps
1379
+ touch-action: none, so a finger there pulls nothing. The box runs under the first sheet by its corner's radius, or a straight cut at
1380
+ the sheet's top edge would show ground in the two round corners; the padding grows by the same, so the last thing still scrolls
1381
+ clear of the heads by the gap, and the content box (cqh) is the one it was. */
1382
+ .sheet-stack__base.is-long:not(:has(> .page:only-child, > .screen__centre:only-child)) {
1383
+ --_under: var(--card-radius, var(--r-card));
1384
+ overflow-y: auto;
1385
+ overscroll-behavior: contain;
1386
+ touch-action: pan-y;
1387
+ }
1365
1388
  /* a card standing in this room is FLAT (Lh 2026-10-09): the room clips at its own edges, and a card's shadow cut there drew a straight
1366
1389
  line under the bar and along the first sheet. Its ground and its radius are what say "card" here. */
1367
1390
  :is([data-palette], [data-finish="lit"]) .sheet-stack__base .card { box-shadow: none; }
@@ -1396,7 +1419,7 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
1396
1419
  .sheet-stack--flood { --_bar: calc(var(--top-h, var(--header-h)) + var(--_bar-gap)); }
1397
1420
  .sheet-stack--flood > .sheet-stack__base {
1398
1421
  margin-top: var(--_bar);
1399
- height: calc(var(--_headroom, 0px) - var(--_bar));
1422
+ height: calc(var(--_headroom, 0px) - var(--_bar) + var(--_under));
1400
1423
  }
1401
1424
  .screen--fill:has(> .sheet-stack--flood > .stack-card.is-open, > .sheet-stack--flood > :not(.stack-card) > .stack-card.is-open) > :is(.appbar, .topbar):first-child {
1402
1425
  visibility: hidden;
@@ -32,7 +32,7 @@ export interface FeedCardProps extends Omit<ComponentProps<'article'>, 'id' | 'r
32
32
  icon?: IconName;
33
33
  /** the tone slot — see `Tone` */
34
34
  tone?: Tone;
35
- /** the card's button (one `Btn`) — shown only while the card is big, and then the card is pressed whole: a touch anywhere on it runs this button */
35
+ /** the card's button, or its buttons — shown only while the card is big. ONE `Btn`: the big card is pressed whole, a touch anywhere on it runs that button. Two or more (a question: yes · no): only the buttons act, a touch elsewhere on the card does nothing */
36
36
  foot?: ReactNode;
37
37
  /** the content — words, a picture, a Stamp. Shown only while the card is big */
38
38
  children?: ReactNode;
@@ -41,6 +41,6 @@ export interface FeedCardProps extends Omit<ComponentProps<'article'>, 'id' | 'r
41
41
  * FeedCard — ONE card of a `CardFeed`'s queue, the same markup in both sizes: its head (thumb · heading · caption) always shows, its
42
42
  * content and its button are one part that opens while the card is big. The SIZE IS THE FEED'S, never a prop. Small, the card itself
43
43
  * is the control (a button named by its heading; Enter and Space) and its closed part cannot be pressed, focused or read. Big, it is a
44
- * plain card: its one control is its foot's button, so it is pressed whole.
44
+ * plain card: with one button in its foot it is pressed whole; with two or more only the buttons act.
45
45
  */
46
46
  export declare function FeedCard({ id, heading, caption, icon, tone, foot, className, children, onClick, onKeyDown, ref, ...rest }: FeedCardProps): import("react").JSX.Element;
@@ -74,7 +74,7 @@ const onSmallKey = (e) => {
74
74
  * FeedCard — ONE card of a `CardFeed`'s queue, the same markup in both sizes: its head (thumb · heading · caption) always shows, its
75
75
  * content and its button are one part that opens while the card is big. The SIZE IS THE FEED'S, never a prop. Small, the card itself
76
76
  * is the control (a button named by its heading; Enter and Space) and its closed part cannot be pressed, focused or read. Big, it is a
77
- * plain card: its one control is its foot's button, so it is pressed whole.
77
+ * plain card: with one button in its foot it is pressed whole; with two or more only the buttons act.
78
78
  */
79
79
  export function FeedCard({ id, heading, caption, icon, tone, foot, className, children, onClick, onKeyDown, ref, ...rest }) {
80
80
  const feed = useContext(FeedCtx);
@@ -5,5 +5,6 @@ export interface CardFootProps extends ComponentProps<'div'> {
5
5
  link?: ReactNode;
6
6
  }
7
7
  /** CardFoot — the card's action buttons on one line: one takes the width, up to four share it evenly. Btns only in the row; a small
8
- * link goes in `link`, under it. */
8
+ * link goes in `link`, under it. A `Btn form` keeps its own size here: as wide as its words, centred — for a foot whose one button
9
+ * should not fill the card. */
9
10
  export declare function CardFoot({ link, className, children, ...rest }: CardFootProps): import("react").JSX.Element;
@@ -1,7 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cx } from '../cx.js';
3
3
  /** CardFoot — the card's action buttons on one line: one takes the width, up to four share it evenly. Btns only in the row; a small
4
- * link goes in `link`, under it. */
4
+ * link goes in `link`, under it. A `Btn form` keeps its own size here: as wide as its words, centred — for a foot whose one button
5
+ * should not fill the card. */
5
6
  export function CardFoot({ link, className, children, ...rest }) {
6
7
  return (_jsxs("div", { className: cx('card__foot', link != null && 'card__foot--link', className), ...rest, children: [children, link != null && _jsx("div", { className: "card__foot-link", children: link })] }));
7
8
  }