@usableapp/cardds 0.7.161 → 0.7.162

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.
Files changed (95) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/css/actions.css +27 -45
  3. package/css/base.css +8 -5
  4. package/css/card.css +5 -5
  5. package/css/journey.css +5 -7
  6. package/css/layover.css +0 -1
  7. package/css/lists.css +2 -2
  8. package/css/media.css +5 -0
  9. package/css/numbers.css +1 -1
  10. package/css/palette.css +1 -1
  11. package/css/parts.css +73 -55
  12. package/css/sheet.css +1 -1
  13. package/css/stack.css +13 -5
  14. package/css/stamp.css +30 -30
  15. package/css/tokens.css +37 -4
  16. package/dist/actions/Btn.d.ts +59 -28
  17. package/dist/actions/Btn.js +17 -5
  18. package/dist/actions/BtnGroup.d.ts +3 -3
  19. package/dist/actions/BtnGroup.js +2 -2
  20. package/dist/actions/BtnRow.d.ts +2 -2
  21. package/dist/actions/BtnRow.js +1 -1
  22. package/dist/actions/Chip.d.ts +1 -1
  23. package/dist/actions/Fab.d.ts +11 -7
  24. package/dist/actions/Fab.js +6 -5
  25. package/dist/actions/LinkBlock.d.ts +2 -1
  26. package/dist/actions/LinkBlock.js +2 -1
  27. package/dist/cardds.css +208 -162
  28. package/dist/cards/CardParts.d.ts +1 -1
  29. package/dist/cards/CardParts.js +1 -1
  30. package/dist/catalog.json +1 -1
  31. package/dist/choice/Calendar.js +2 -2
  32. package/dist/forms/Composer.d.ts +2 -2
  33. package/dist/forms/Field.d.ts +1 -1
  34. package/dist/forms/Field.js +1 -1
  35. package/dist/forms/FileBtn.d.ts +8 -7
  36. package/dist/forms/FileBtn.js +3 -3
  37. package/dist/forms/MessageBar.d.ts +2 -2
  38. package/dist/forms/MessageBar.js +4 -4
  39. package/dist/forms/Pin.js +2 -3
  40. package/dist/index.d.ts +0 -1
  41. package/dist/index.js +0 -1
  42. package/dist/journey/JourneyBadge.d.ts +7 -4
  43. package/dist/journey/JourneyBadge.js +3 -3
  44. package/dist/lists/Bubble.d.ts +6 -6
  45. package/dist/media/Postcard.d.ts +1 -1
  46. package/dist/media/Postcard.js +2 -2
  47. package/dist/media/Tile.d.ts +4 -6
  48. package/dist/media/Tile.js +2 -2
  49. package/dist/parts/End.d.ts +1 -1
  50. package/dist/parts/End.js +1 -1
  51. package/dist/parts/Foot.d.ts +3 -3
  52. package/dist/parts/Foot.js +1 -1
  53. package/dist/parts/Head.d.ts +3 -2
  54. package/dist/parts/Head.js +3 -2
  55. package/dist/parts/Words.d.ts +3 -2
  56. package/dist/parts/Words.js +11 -6
  57. package/dist/parts/endRoom.d.ts +6 -4
  58. package/dist/parts/endRoom.js +13 -8
  59. package/dist/post/PostDesk.js +2 -3
  60. package/dist/post/PostLetter.js +2 -2
  61. package/dist/scaffold/ActionBar.d.ts +4 -4
  62. package/dist/scaffold/ActionBar.js +3 -3
  63. package/dist/scaffold/AppBar.d.ts +1 -1
  64. package/dist/scaffold/FloatBar.d.ts +1 -1
  65. package/dist/scaffold/TopBar.d.ts +2 -2
  66. package/dist/sheets/Modal.d.ts +2 -2
  67. package/dist/sheets/Modal.js +2 -2
  68. package/dist/sheets/Sheet.d.ts +1 -1
  69. package/dist/sheets/Sheet.js +1 -1
  70. package/dist/sheets/SheetStack.js +3 -4
  71. package/dist/sheets/StackBack.d.ts +1 -1
  72. package/dist/sheets/StackBack.js +2 -3
  73. package/dist/sheets/StackSheet.d.ts +1 -1
  74. package/dist/sheets/StackSheet.js +2 -3
  75. package/dist/sheets/sheetDrag.js +2 -2
  76. package/dist/sheets/stackCard.js +5 -6
  77. package/dist/stamp/Stamp.d.ts +4 -2
  78. package/dist/stamp/Stamp.js +2 -2
  79. package/dist/state.d.ts +2 -0
  80. package/dist/state.js +9 -0
  81. package/dist/sticky/Sticky.d.ts +1 -1
  82. package/dist/sticky/StickyAnswer.d.ts +1 -1
  83. package/dist/sticky/StickyHeading.d.ts +2 -2
  84. package/dist/templates/CallSheet.js +1 -1
  85. package/dist/templates/Walkthrough.js +2 -2
  86. package/dist/type/Icon.d.ts +1 -1
  87. package/dist/type/Icon.js +1 -1
  88. package/dist/type/textScale.d.ts +4 -3
  89. package/dist/type/textScale.js +4 -3
  90. package/docs/reference.md +45 -25
  91. package/lint/rules.mjs +7 -7
  92. package/package.json +3 -1
  93. package/scripts/codemod-parts.mjs +1 -1
  94. package/dist/actions/IconBtn.d.ts +0 -326
  95. package/dist/actions/IconBtn.js +0 -19
@@ -4,7 +4,7 @@ import { cx } from '../cx.js';
4
4
  import { reducedMotion, useControlled } from '../state.js';
5
5
  import { word } from '../words.js';
6
6
  import { Icon } from '../type/Icon.js';
7
- import { IconBtn } from '../actions/IconBtn.js';
7
+ import { Btn } from '../actions/Btn.js';
8
8
  import { PostCorner } from './postCorner.js';
9
9
  const OTHER = { picture: 'back', back: 'picture' };
10
10
  /* half a turn: the sheet swings on its upright middle between flat (0) and edge-on (±90). `hold` keeps it edge-on until the other sheet is rendered */
@@ -49,5 +49,5 @@ export function PostLetter({ face, defaultFace = 'picture', onFaceChange, pictur
49
49
  }, [lying]);
50
50
  const turn = () => ask(OTHER[asked]);
51
51
  const [name, ...lines] = to;
52
- return (_jsxs("div", { className: cx('post-letter', `post-letter--${lying}`, className), ...rest, children: [_jsxs("div", { className: "post-letter__sheet post-letter__sheet--picture post-paper", ref: (el) => { sheets.current.picture = el; }, inert: lying !== 'picture', onClick: turn, children: [_jsx("div", { className: "post-letter__pic", children: picture }), _jsx("p", { className: "post-letter__caption", children: caption }), voice != null && (_jsxs("div", { className: "post-letter__voice", onClick: (e) => e.stopPropagation(), children: [_jsx(IconBtn, { invert: true, icon: sound ? 'pause' : 'play', label: sound ? pauseLabel ?? word('pause') : playLabel ?? word('play'), "aria-pressed": sound, onClick: () => askSound(!sound) }), _jsx("span", { className: "post-letter__time", children: voice })] }))] }), _jsxs("article", { className: "post-letter__sheet post-letter__sheet--back post-paper", ref: (el) => { sheets.current.back = el; }, inert: lying !== 'back', onClick: turn, children: [_jsxs("header", { className: "post-letter__head", children: [_jsxs("div", { className: "post-letter__to", children: [_jsx("span", { className: "post-letter__kicker", children: kicker }), _jsxs("span", { className: "post-letter__lines", children: [name != null && _jsxs("span", { className: "post-letter__line post-letter__line--name", children: [_jsx("small", { children: toLabel ?? word('to') }), name] }), lines.map((line, i) => _jsx("span", { className: "post-letter__line", children: line }, i))] })] }), _jsx(PostCorner, { stamp: stamp, postmark: postmark })] }), _jsxs("div", { className: "post-letter__message", children: [children, sign != null && _jsx("p", { className: "post-letter__sign", children: sign })] })] }), _jsxs("button", { className: "post-letter__turn", type: "button", onClick: turn, children: [_jsx(Icon, { name: lying === 'back' ? 'image' : 'file-text', size: "xs" }), _jsx("span", { children: lying === 'back' ? pictureLabel ?? word('turnToPicture') : backLabel ?? word('turnToBack') })] }), journey != null && _jsx("p", { className: "post-letter__journey", children: journey })] }));
52
+ return (_jsxs("div", { className: cx('post-letter', `post-letter--${lying}`, className), ...rest, children: [_jsxs("div", { className: "post-letter__sheet post-letter__sheet--picture post-paper", ref: (el) => { sheets.current.picture = el; }, inert: lying !== 'picture', onClick: turn, children: [_jsx("div", { className: "post-letter__pic", children: picture }), _jsx("p", { className: "post-letter__caption", children: caption }), voice != null && (_jsxs("div", { className: "post-letter__voice", onClick: (e) => e.stopPropagation(), children: [_jsx(Btn, { shape: "round", tone: "primary", icon: sound ? 'pause' : 'play', label: sound ? pauseLabel ?? word('pause') : playLabel ?? word('play'), "aria-pressed": sound, onClick: () => askSound(!sound) }), _jsx("span", { className: "post-letter__time", children: voice })] }))] }), _jsxs("article", { className: "post-letter__sheet post-letter__sheet--back post-paper", ref: (el) => { sheets.current.back = el; }, inert: lying !== 'back', onClick: turn, children: [_jsxs("header", { className: "post-letter__head", children: [_jsxs("div", { className: "post-letter__to", children: [_jsx("span", { className: "post-letter__kicker", children: kicker }), _jsxs("span", { className: "post-letter__lines", children: [name != null && _jsxs("span", { className: "post-letter__line post-letter__line--name", children: [_jsx("small", { children: toLabel ?? word('to') }), name] }), lines.map((line, i) => _jsx("span", { className: "post-letter__line", children: line }, i))] })] }), _jsx(PostCorner, { stamp: stamp, postmark: postmark })] }), _jsxs("div", { className: "post-letter__message", children: [children, sign != null && _jsx("p", { className: "post-letter__sign", children: sign })] })] }), _jsxs("button", { className: "post-letter__turn", type: "button", onClick: turn, children: [_jsx(Icon, { name: lying === 'back' ? 'image' : 'file-text', size: "xs" }), _jsx("span", { children: lying === 'back' ? pictureLabel ?? word('turnToPicture') : backLabel ?? word('turnToBack') })] }), journey != null && _jsx("p", { className: "post-letter__journey", children: journey })] }));
53
53
  }
@@ -1,6 +1,6 @@
1
1
  import type { ComponentProps } from 'react';
2
2
  export interface ActionBarProps extends ComponentProps<'div'> {
3
- /** `pager`: previous / next as two equal buttons at the edges — two round IconBtns, or two Btns that name the step they lead to, each at its own size (a Link may sit between them) · `tiers`: rows stacked — a control tier above the buttons */
3
+ /** `pager`: previous / next as two equal buttons at the edges — two round Btns, or two Btns that name the step they lead to, each at its own size (a Link may sit between them) · `tiers`: rows stacked — a control tier above the buttons */
4
4
  variant?: 'pager' | 'tiers';
5
5
  /** a bare bar for a preview: no position, full width, no side padding (a real bar is a Screen's `bottom`) */
6
6
  inline?: boolean;
@@ -9,9 +9,9 @@ export interface ActionBarProps extends ComponentProps<'div'> {
9
9
  * ActionBar — the screen's ONE move: the Screen's `bottom` (`<Screen fill bottom={<ActionBar…>}>`), the last part of its flex
10
10
  * column, as tall as its rows. Never after `</Screen>`, never positioned by hand.
11
11
  * Plain: one wide primary Btn (the step that commits).
12
- * `pager`: the pager bar — Back + Next as peers, buttons only: two round `IconBtn`s (`arrow-left` · `invert arrow-right`) at the
12
+ * `pager`: the pager bar — Back + Next as peers, buttons only: two round `Btn`s (`arrow-left` · `arrow-right` `tone="primary"`) at the
13
13
  * edges, or two `Btn`s that SAY the step each leads to, the arrow at the round pager's size (`<Btn><Icon name="arrow-left" /> คำขอ</Btn>` ·
14
- * `<Btn primary>วันเวลา <Icon name="arrow-right" /></Btn>`): each hugs its edge at its own size, open ground between — left and
14
+ * `<Btn tone="primary">วันเวลา <Icon name="arrow-right" /></Btn>`): each hugs its edge at its own size, open ground between — left and
15
15
  * right, never two halves (Lh 2026-10-17). A Link between stays in the middle.
16
16
  * A word that commits ("Done") is not a pager button: that step is the plain bar's one wide Btn. The `Pager` (the dots that say where the walk is) is a different thing: it may be the bar's first row (a Walkthrough).
17
17
  * `tiers`: an ActionBarTier with a control (a Slider) above the button tier.
@@ -19,7 +19,7 @@ export interface ActionBarProps extends ComponentProps<'div'> {
19
19
  */
20
20
  export declare function ActionBar({ variant, inline, className, style, ...rest }: ActionBarProps): import("react").JSX.Element;
21
21
  export interface ActionBarTierProps extends ComponentProps<'div'> {
22
- /** the tier that holds the pager (two IconBtns at the edges, or two worded Btns, each at its edge at its own size) */
22
+ /** the tier that holds the pager (two round Btns at the edges, or two worded Btns, each at its edge at its own size) */
23
23
  pager?: boolean;
24
24
  }
25
25
  /** ActionBarTier — one row inside an `ActionBar variant="tiers"`: a control row, or the pager row. */
@@ -4,16 +4,16 @@ import { cx } from '../cx.js';
4
4
  * ActionBar — the screen's ONE move: the Screen's `bottom` (`<Screen fill bottom={<ActionBar…>}>`), the last part of its flex
5
5
  * column, as tall as its rows. Never after `</Screen>`, never positioned by hand.
6
6
  * Plain: one wide primary Btn (the step that commits).
7
- * `pager`: the pager bar — Back + Next as peers, buttons only: two round `IconBtn`s (`arrow-left` · `invert arrow-right`) at the
7
+ * `pager`: the pager bar — Back + Next as peers, buttons only: two round `Btn`s (`arrow-left` · `arrow-right` `tone="primary"`) at the
8
8
  * edges, or two `Btn`s that SAY the step each leads to, the arrow at the round pager's size (`<Btn><Icon name="arrow-left" /> คำขอ</Btn>` ·
9
- * `<Btn primary>วันเวลา <Icon name="arrow-right" /></Btn>`): each hugs its edge at its own size, open ground between — left and
9
+ * `<Btn tone="primary">วันเวลา <Icon name="arrow-right" /></Btn>`): each hugs its edge at its own size, open ground between — left and
10
10
  * right, never two halves (Lh 2026-10-17). A Link between stays in the middle.
11
11
  * A word that commits ("Done") is not a pager button: that step is the plain bar's one wide Btn. The `Pager` (the dots that say where the walk is) is a different thing: it may be the bar's first row (a Walkthrough).
12
12
  * `tiers`: an ActionBarTier with a control (a Slider) above the button tier.
13
13
  * In a `Screen fill` it is a layer over the content's foot; on a scrolling Screen a sticky last row.
14
14
  */
15
15
  export function ActionBar({ variant, inline, className, style, ...rest }) {
16
- return (_jsx("div", { className: cx('action-bar', variant && `action-bar--${variant}`, className), style: inline ? { position: 'static', width: '100%', maxWidth: 'none', paddingInline: 0, ...style } : style, ...rest }));
16
+ return (_jsx("div", { className: cx('action-bar', variant && `action-bar--${variant}`, inline && 'action-bar--inline', className), style: style, ...rest }));
17
17
  }
18
18
  /** ActionBarTier — one row inside an `ActionBar variant="tiers"`: a control row, or the pager row. */
19
19
  export function ActionBarTier({ pager, className, ...rest }) {
@@ -6,7 +6,7 @@ export interface AppBarProps extends Omit<ComponentProps<'header'>, 'title'> {
6
6
  title: ReactNode;
7
7
  /** the second line under the title */
8
8
  sub?: ReactNode;
9
- /** the trailing control(s) — an IconBtn with a chevron-down to switch context; on the home bar a labelled
9
+ /** the trailing control(s) — a round Btn with a chevron-down to switch context; on the home bar a labelled
10
10
  * switch chip (ChipPick sign, --tap tall here) and the wallet Btn, side by side (Lh 2026-09-13) */
11
11
  action?: ReactNode;
12
12
  /** makes the mark + the words ONE button (the member's own name → their menu): its props — `popoverTarget` to open a `Menu`
@@ -1,6 +1,6 @@
1
1
  import { type ComponentProps, type ReactNode } from 'react';
2
2
  export interface FloatBarProps extends ComponentProps<'nav'> {
3
- /** the detached round button beside the pill (an IconBtn — search, add) */
3
+ /** the detached round button beside the pill (a round Btn — search, add) */
4
4
  action?: ReactNode;
5
5
  }
6
6
  /**
@@ -2,10 +2,10 @@ import type { ComponentProps, ReactNode } from 'react';
2
2
  export interface TopBarProps extends Omit<ComponentProps<'header'>, 'title'> {
3
3
  /** the screen title (uppercase, ellipsised on one line) */
4
4
  title: ReactNode;
5
- /** a leading control — usually `<IconBtn sm icon="arrow-left" label="Back" />` */
5
+ /** a leading control — usually `<Btn shape="round" size="sm" icon="arrow-left" label="Back" />` */
6
6
  back?: ReactNode;
7
7
  /** trailing controls, right-aligned, AT MOST TWO (Lh 2026-09-22 — a third is not drawn and warns once): chips,
8
- * small icon buttons, a Dropdown — or the screen's one big move as a `Btn primary` (home's ขอความช่วยเหลือ,
8
+ * small icon buttons, a Dropdown — or the screen's one big move as a `Btn tone="primary"` (home's ขอความช่วยเหลือ,
9
9
  * --tap-lg tall there; Lh 2026-09-09: no bottom bar on home). More moves go in a Menu behind one button. */
10
10
  actions?: ReactNode;
11
11
  }
@@ -13,7 +13,7 @@ export interface ModalProps extends ComponentProps<'article'> {
13
13
  * Modal — the ask: ONE card at the centre of a `SheetStage dim`, two parts — a `Body` (the thing being asked about, light, scrolls
14
14
  * when tall) and a `ModalAsk` (the dark end that asks). No border. Two beats on appearing: drops in from above, then the ModalAsk comes
15
15
  * out below while the Body moves up.
16
- * A COMPONENT, not a wiring: it does not know its buttons. They are plain `IconBtn`s / `Btn`s with the app's `onClick` — the app
16
+ * A COMPONENT, not a wiring: it does not know its buttons. They are plain round `Btn`s / `Btn`s with the app's `onClick` — the app
17
17
  * records the answer and sets `open={false}`; the modal's one behaviour is how it leaves. `onDismiss` asks to leave unanswered (a tap on
18
18
  * the scrim, Esc). When it has arrived, cardds puts the cursor in the field marked `data-autofocus`, else the first field, else the question — write no focus code.
19
19
  * MOUNT IT ONLY WHEN IT IS TO SHOW. First mounted with `open={false}` it is drawn in place, then leaves, and calls `onClosed` after about 700ms
@@ -29,7 +29,7 @@ export interface ModalAskProps extends Omit<ComponentProps<'div'>, 'title'> {
29
29
  /** a LIGHT ModalAsk: the card's paper and dark words instead of the dark end (Lh 2026-09-29) — same layout, same trio; the one solid button turns dark */
30
30
  light?: boolean;
31
31
  }
32
- /** ModalAsk — the dark end of a `Modal` (`light` = paper and dark words): the question, its fine print, and the answers: a `BtnRow round joined` of round icon buttons, or a `BtnRow` of word `Btn`s (it fills the card, each button's words on one line; a `Btn quiet` there is edged in the ask's own ink) — plain buttons
32
+ /** ModalAsk — the dark end of a `Modal` (`light` = paper and dark words): the question, its fine print, and the answers: a `BtnRow round joined` of round icon buttons, or a `BtnRow` of word `Btn`s (it fills the card, each button's words on one line; a `Btn tone="quiet"` there is edged in the ask's own ink) — plain buttons
33
33
  * with the app's `onClick`; the ModalAsk does nothing with them. A `Modal` holding ONLY a ModalAsk (no `Body`) is the CONFIRM: a question with nothing
34
34
  * to show above it — the ModalAsk is the whole card and comes in with it in one beat. */
35
35
  export declare function ModalAsk({ title, caption, light, className, children, ...rest }: ModalAskProps): import("react").JSX.Element;
@@ -6,7 +6,7 @@ import { cx } from '../cx.js';
6
6
  * Modal — the ask: ONE card at the centre of a `SheetStage dim`, two parts — a `Body` (the thing being asked about, light, scrolls
7
7
  * when tall) and a `ModalAsk` (the dark end that asks). No border. Two beats on appearing: drops in from above, then the ModalAsk comes
8
8
  * out below while the Body moves up.
9
- * A COMPONENT, not a wiring: it does not know its buttons. They are plain `IconBtn`s / `Btn`s with the app's `onClick` — the app
9
+ * A COMPONENT, not a wiring: it does not know its buttons. They are plain round `Btn`s / `Btn`s with the app's `onClick` — the app
10
10
  * records the answer and sets `open={false}`; the modal's one behaviour is how it leaves. `onDismiss` asks to leave unanswered (a tap on
11
11
  * the scrim, Esc). When it has arrived, cardds puts the cursor in the field marked `data-autofocus`, else the first field, else the question — write no focus code.
12
12
  * MOUNT IT ONLY WHEN IT IS TO SHOW. First mounted with `open={false}` it is drawn in place, then leaves, and calls `onClosed` after about 700ms
@@ -57,7 +57,7 @@ export function Modal({ open = true, onClosed, onDismiss, className, ...rest })
57
57
  }, [has, open]);
58
58
  return _jsx("article", { ref: ref, className: cx('card modal', className), ...rest });
59
59
  }
60
- /** ModalAsk — the dark end of a `Modal` (`light` = paper and dark words): the question, its fine print, and the answers: a `BtnRow round joined` of round icon buttons, or a `BtnRow` of word `Btn`s (it fills the card, each button's words on one line; a `Btn quiet` there is edged in the ask's own ink) — plain buttons
60
+ /** ModalAsk — the dark end of a `Modal` (`light` = paper and dark words): the question, its fine print, and the answers: a `BtnRow round joined` of round icon buttons, or a `BtnRow` of word `Btn`s (it fills the card, each button's words on one line; a `Btn tone="quiet"` there is edged in the ask's own ink) — plain buttons
61
61
  * with the app's `onClick`; the ModalAsk does nothing with them. A `Modal` holding ONLY a ModalAsk (no `Body`) is the CONFIRM: a question with nothing
62
62
  * to show above it — the ModalAsk is the whole card and comes in with it in one beat. */
63
63
  export function ModalAsk({ title, caption, light, className, children, ...rest }) {
@@ -43,7 +43,7 @@ export interface SheetProps extends Omit<ComponentProps<'article'>, 'onChange'>
43
43
  * box — a Step or a SheetStage — a state is only how far it slid (translate; the material never changes size).
44
44
  * ONE SHAPE, written top-down: handle · head (a Head — pinned, never scrolls) · `topRow` (optional, pinned under it) · Body (scrolls, as far as
45
45
  * it needs) · Foot (the button that finishes the sheet — or a chat's `MessageBar` — at the bottom, above the keyboard; gone at peek).
46
- * A CHAT as a sheet: `<SheetStage over dim><Sheet state="full" states="full" handle={false}>` · Head (the name, a ✕ IconBtn) · Body (a `Thread`
46
+ * A CHAT as a sheet: `<SheetStage over dim><Sheet state="full" states="full" handle={false}>` · Head (the name, a ✕ round Btn) · Body (a `Thread`
47
47
  * or a `StickyThread lapped`) · `<Foot><MessageBar …/></Foot>` — or, for notes, a `StickyAnswer` as the sheet's last child instead of the Foot.
48
48
  *
49
49
  * It is a COMPONENT, not a wiring: it knows nothing of what opens it. The app owns `state` and sets it from whatever it
@@ -28,7 +28,7 @@ function withTopRow(parts, topRow) {
28
28
  * box — a Step or a SheetStage — a state is only how far it slid (translate; the material never changes size).
29
29
  * ONE SHAPE, written top-down: handle · head (a Head — pinned, never scrolls) · `topRow` (optional, pinned under it) · Body (scrolls, as far as
30
30
  * it needs) · Foot (the button that finishes the sheet — or a chat's `MessageBar` — at the bottom, above the keyboard; gone at peek).
31
- * A CHAT as a sheet: `<SheetStage over dim><Sheet state="full" states="full" handle={false}>` · Head (the name, a ✕ IconBtn) · Body (a `Thread`
31
+ * A CHAT as a sheet: `<SheetStage over dim><Sheet state="full" states="full" handle={false}>` · Head (the name, a ✕ round Btn) · Body (a `Thread`
32
32
  * or a `StickyThread lapped`) · `<Foot><MessageBar …/></Foot>` — or, for notes, a `StickyAnswer` as the sheet's last child instead of the Foot.
33
33
  *
34
34
  * It is a COMPONENT, not a wiring: it knows nothing of what opens it. The app owns `state` and sets it from whatever it
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Children, cloneElement, isValidElement, useEffect, useLayoutEffect, useRef, useState } from 'react';
3
- import { useControlled, warnOnce, watchSize } from '../state.js';
3
+ import { tokenPx, useControlled, warnOnce, watchSize } from '../state.js';
4
4
  import { cx } from '../cx.js';
5
5
  import { Card } from '../cards/Card.js';
6
6
  import { StackSheet } from './StackSheet.js';
@@ -24,7 +24,6 @@ function measureRests(stack) {
24
24
  }),
25
25
  };
26
26
  }
27
- const SLOP = 8; // px a pointer may travel and still be a tap
28
27
  /* the base's room either holds what stands in it or is too short for it (`is-long`). The CSS lays both out the same way, from the
29
28
  room's top once there is no room to spare, so the measure does not feed back; the class only says there is something to scroll. */
30
29
  function StackBase({ children }) {
@@ -136,8 +135,8 @@ export function SheetStack({ mode = 'tap', open, defaultOpen = null, onOpenChang
136
135
  const from = down.current;
137
136
  if (!settling || !stack || !at || e.detail === 0)
138
137
  return; // detail 0: the keyboard's click has no place
139
- if (from && Math.hypot(e.clientX - from.x, e.clientY - from.y) > SLOP)
140
- return; // a pull that sprang back, not a tap
138
+ if (from && Math.hypot(e.clientX - from.x, e.clientY - from.y) > tokenPx('--sp-2'))
139
+ return; // past --sp-2: a pull that sprang back, not a tap
141
140
  const box = stack.getBoundingClientRect();
142
141
  if (Math.abs(box.height - at.height) > 1)
143
142
  return; // the stack changed size since it was still: the places are stale
@@ -1,5 +1,5 @@
1
1
  import type { ComponentProps } from 'react';
2
- export interface StackBackProps extends ComponentProps<'button'> {
2
+ export interface StackBackProps extends Omit<ComponentProps<'button'>, 'form' | 'children'> {
3
3
  /** accessible name */
4
4
  label?: string;
5
5
  /** at the head's END (after its tabs / icons), chevron DOWN — the open sheet folds down (Lh 2026-09-29, the home);
@@ -1,10 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { cx } from '../cx.js';
3
- import { Icon } from '../type/Icon.js';
4
- import { IconBtn } from '../actions/IconBtn.js';
3
+ import { Btn } from '../actions/Btn.js';
5
4
  import { word } from '../words.js';
6
5
  /** StackBack — the back button a tapped stack sheet reveals in its head; first child of that sheet's Head. Hidden until the sheet is open.
7
6
  * A SMALL disc (Lh 2026-09-23): 32px with a chevron — the head keeps its room for the title and the tabs; the 44px tap target stays. */
8
7
  export function StackBack({ label = word('back'), end, className, ...rest }) {
9
- return _jsx(IconBtn, { sm: true, label: label, className: cx('sheet-stack__back', end && 'sheet-stack__back--end', className), ...rest, children: _jsx(Icon, { name: end ? 'chevron-down' : 'chevron-left' }) });
8
+ return _jsx(Btn, { shape: "round", size: "sm", icon: end ? 'chevron-down' : 'chevron-left', label: label, className: cx('sheet-stack__back', end && 'sheet-stack__back--end', className), ...rest });
10
9
  }
@@ -1,6 +1,6 @@
1
1
  import { type ComponentProps, type ReactNode } from 'react';
2
2
  import { type Tone } from '../cards/Card.js';
3
- import { type IconName } from '../type/Icon.js';
3
+ import type { IconName } from '../type/Icon.js';
4
4
  import type { StackPlace } from './stackCard.js';
5
5
  export interface StackSheetTab {
6
6
  id: string;
@@ -3,13 +3,12 @@ import { useEffect, useRef, useState } from 'react';
3
3
  import { useControlled, watchSize } from '../state.js';
4
4
  import { cx } from '../cx.js';
5
5
  import { Card } from '../cards/Card.js';
6
- import { IconBtn } from '../actions/IconBtn.js';
6
+ import { Btn } from '../actions/Btn.js';
7
7
  import { Head } from '../parts/Head.js';
8
8
  import { Words } from '../parts/Words.js';
9
9
  import { Foot } from '../parts/Foot.js';
10
10
  import { Body } from '../parts/Body.js';
11
11
  import { StackBack } from './StackBack.js';
12
- import { Icon } from '../type/Icon.js';
13
12
  import { Badge } from '../numbers/Badge.js';
14
13
  import { word } from '../words.js';
15
14
  import { runOver } from './sheetMeasure.js';
@@ -36,6 +35,6 @@ export function StackSheet({ title, tone, paper, icon, tabs, tab: tabProp, defau
36
35
  }, [title]);
37
36
  return (_jsxs(Card, { stack: stack, tone: tone, paper: paper, className: cx('stack-sheet', className), ...rest, children: [_jsxs(Head, { ref: headRef, long: long, children: [backAt === 'start' && _jsx(StackBack, { label: backLabel }), _jsx(Words, { title: _jsx("span", { className: "stack-sheet__run", children: title }) }), tabs?.length ? (_jsx("span", { className: "stack-sheet__tabs", role: "tablist", children: tabs.map((t) => {
38
37
  const count = t.count ? `${t.countPrefix ?? ''}${t.count > 99 ? '99+' : t.count}` : '';
39
- return (_jsxs(IconBtn, { sm: true, invert: t.id === tab, role: "tab", "aria-selected": t.id === tab, label: count ? `${t.label} ${count}` : t.label, className: "stack-sheet__tab", onClick: () => pick(t.id), children: [_jsx(Icon, { name: t.icon }), count ? _jsx(Badge, { className: "stack-sheet__count", children: count }) : null] }, t.id));
38
+ return (_jsx(Btn, { shape: "round", size: "sm", icon: t.icon, tone: t.id === tab ? 'primary' : undefined, role: "tab", "aria-selected": t.id === tab, label: count ? `${t.label} ${count}` : t.label, className: "stack-sheet__tab", onClick: () => pick(t.id), children: count ? _jsx(Badge, { className: "stack-sheet__count", children: count }) : null }, t.id));
40
39
  }) })) : icon, backAt === 'end' && _jsx(StackBack, { end: true, label: backLabel })] }), top != null && _jsx("div", { className: "stack-sheet__top", children: top }), _jsx(Body, { role: tabs?.length ? 'tabpanel' : undefined, children: children }), foot != null && _jsx(Foot, { children: foot })] }));
41
40
  }
@@ -2,7 +2,7 @@
2
2
  and on release asks for the nearest of its states. A move shorter than a tap is left to the click. */
3
3
  import { useRef } from 'react';
4
4
  import { slid, stopsOf } from './sheetMeasure.js';
5
- const TAP_REM = 0.5; // = --sp-2: a move shorter than this is a tap, not a drag
5
+ import { tokenPx } from '../state.js';
6
6
  /** the handle's pointer handlers, and `afterDrag()` — true once for the click that follows a drag (it is not a tap) */
7
7
  export function useSheetDrag(ref, allowed, snap) {
8
8
  const skipClick = useRef(false);
@@ -14,7 +14,7 @@ export function useSheetDrag(ref, allowed, snap) {
14
14
  const list = allowed(), stops = stopsOf(el), y = slid(el); // where it is now — mid-slide too, so a grab never jumps
15
15
  drag.current = { startY: e.clientY, y0: y, y, stops, allowed: list, moved: false,
16
16
  min: Math.min(...list.map((s) => stops[s])), max: Math.max(...list.map((s) => stops[s])),
17
- tap: TAP_REM * parseFloat(getComputedStyle(document.documentElement).fontSize) };
17
+ tap: tokenPx('--sp-2') }; // a move shorter than --sp-2 is a tap, not a drag
18
18
  e.currentTarget.setPointerCapture(e.pointerId);
19
19
  };
20
20
  const move = (e) => {
@@ -3,9 +3,8 @@
3
3
  This card renders what those two mean: the place classes, the grip, the pull. Nothing stamps them on afterwards. */
4
4
  import { createContext, useEffect, useLayoutEffect, useRef, useState } from 'react';
5
5
  import { flushSync } from 'react-dom';
6
- import { focusWhenActive, ownsGestures } from '../state.js';
7
- const SLOP_REM = 0.5;
8
- const COMMIT_REM = 4.5;
6
+ import { focusWhenActive, ownsGestures, tokenPx } from '../state.js';
7
+ const COMMIT_REM = 4.5; // no token says it; the slop is --sp-2, read at each gesture
9
8
  /** the head's title is a tab stop while this sheet is the one Enter acts on: every title when none is open, only the open one otherwise */
10
9
  export const StackHeadCtx = createContext(null);
11
10
  /** a finger is pulling this card's content. The body renders `is-refreshing` from it */
@@ -81,7 +80,7 @@ const releaseCard = (card, live, prop) => {
81
80
  /* a finger on a head, the open sheet's (down, `--_pull`, folds it) or a peeked one's (up, `--_lift`, opens it): the card follows it up to
82
81
  `cap`; let go past the commit, `settle` asks the app, and a card the app left where it was (`unmoved`) eases back */
83
82
  function pullHead(e, { card, head, doc, held, live, swallow, way, prop, cap, settle, unmoved }) {
84
- const slop = pxFromRem(SLOP_REM);
83
+ const slop = tokenPx('--sp-2');
85
84
  const commit = pxFromRem(COMMIT_REM);
86
85
  const pull = { pointerId: e.pointerId, startY: e.clientY, last: 0, cap: Math.max(cap, commit), commit, slop, moved: false };
87
86
  held.current = pull;
@@ -191,7 +190,7 @@ export function useStackCard(ref, place, swallow) {
191
190
  return;
192
191
  if (e.target instanceof Element && ownHead(card, e.target))
193
192
  return;
194
- const slop = pxFromRem(SLOP_REM);
193
+ const slop = tokenPx('--sp-2');
195
194
  const commit = pxFromRem(COMMIT_REM);
196
195
  const pull = { pointerId: e.pointerId, startX: e.clientX, startY: e.clientY, lastDy: 0, commit, slop, moved: false, drop: false };
197
196
  bodyPull.current = pull;
@@ -310,7 +309,7 @@ export function useStackCard(ref, place, swallow) {
310
309
  return;
311
310
  const startY = e.clientY;
312
311
  const id = e.pointerId;
313
- const slop = pxFromRem(SLOP_REM);
312
+ const slop = tokenPx('--sp-2');
314
313
  const move = (ev) => {
315
314
  if (ev.pointerId !== id)
316
315
  return;
@@ -7,8 +7,10 @@ export interface StampProps extends Omit<ComponentProps<'span'>, 'onClick'> {
7
7
  tone?: StickyTone;
8
8
  /** the big line at the foot, on the picture — whose stamp it is */
9
9
  name?: ReactNode;
10
- /** a small line above the name (the pictures' words). It shows only on a stamp WIDER than the standard size (`--stamp-size` set above 6rem): at 96 it would be under 5px, so it is not drawn and the name is larger */
10
+ /** a small line above the name (the pictures' words). It shows only on an `lg` stamp (or one a `StampBook fill` sizes): at the standard 96 it would be under 5px, so it is not drawn and the name is larger */
11
11
  words?: ReactNode;
12
+ /** a stamp the app made wider than the standard size (its own `--stamp-size` above 96): the small line of `words` shows above the name, the name at its own size. The stamp never guesses this from its width */
13
+ lg?: boolean;
12
14
  /** the pictures alone: `name` and `words` are not drawn. For a stamp stuck on something (a postcard's corner); in a `StampOn` every stamp is bare already. The words are for the album */
13
15
  bare?: boolean;
14
16
  /** the inline size: a stamp beside a status line's words (a card's `Foot`: the stamp, "X took it", a round button), one `Chip xs` tall (`--stamp-xs-size`). Always bare and flat: only the thin contact shadow every stamp has. Several, lapped with a "+8": `AvatarStack more` */
@@ -39,7 +41,7 @@ export interface StampProps extends Omit<ComponentProps<'span'>, 'onClick'> {
39
41
  * the app it has landed, so it sends. The strike scales it down from twice its size, so it never moves the layout (it may cover its neighbours for a moment);
40
42
  * a `tilt` is kept, the stamp ends at its turn. Afterwards the same stamp stands in the same place with no strike: drop `arrive` or keep it, nothing is struck twice.
41
43
  */
42
- export declare function Stamp({ pictures, tone, name, words, bare, xs, frame, held, under, tilt, onClick, arrive, onArrived, className, onAnimationEnd, ...rest }: StampProps): import("react").JSX.Element;
44
+ export declare function Stamp({ pictures, tone, name, words, lg, bare, xs, frame, held, under, tilt, onClick, arrive, onArrived, className, onAnimationEnd, ...rest }: StampProps): import("react").JSX.Element;
43
45
  export interface StampPlaceProps extends Omit<ComponentProps<'span'>, 'onClick'> {
44
46
  /** a gap nobody is asked to fill: a paler edge (an album's free places) */
45
47
  faint?: boolean;
@@ -13,11 +13,11 @@ import { useStrike } from './useStrike.js';
13
13
  * the app it has landed, so it sends. The strike scales it down from twice its size, so it never moves the layout (it may cover its neighbours for a moment);
14
14
  * a `tilt` is kept, the stamp ends at its turn. Afterwards the same stamp stands in the same place with no strike: drop `arrive` or keep it, nothing is struck twice.
15
15
  */
16
- export function Stamp({ pictures, tone = 'custard', name, words, bare, xs, frame = true, held, under, tilt, onClick, arrive, onArrived, className, onAnimationEnd, ...rest }) {
16
+ export function Stamp({ pictures, tone = 'custard', name, words, lg, bare, xs, frame = true, held, under, tilt, onClick, arrive, onArrived, className, onAnimationEnd, ...rest }) {
17
17
  const shown = pictures.slice(0, 4);
18
18
  const { struck } = useStrike(arrive, onArrived, onAnimationEnd);
19
19
  const { tap, Box, boxProps } = pressable(onClick, 'span', rest);
20
- return (_jsxs(Box, { className: cx('stamp', `stamp--${shown.length}`, bare && 'stamp--bare', xs && 'stamp--xs', !frame && 'stamp--frameless', held && 'stamp--held', under && 'stamp--under', tilt && `stamp--tilt-${tilt}`, tap && 'stamp--tap', arrive && 'stamp--arrive', className), onAnimationEnd: struck, "aria-hidden": held || undefined, ...boxProps, children: [!frame && _jsx("span", { className: "stamp__shade", "aria-hidden": "true", children: _jsx("span", { className: cx('stamp__paper', `sticky--${tone}`) }) }), _jsx("span", { className: cx('stamp__paper', !frame && `sticky--${tone}`), children: _jsxs("span", { className: cx('stamp__pic', `sticky--${tone}`), children: [shown.map((picture, i) => _jsx("span", { className: "stamp__art", "aria-hidden": "true", children: picture }, i)), (name != null || words != null) && (_jsxs("span", { className: "stamp__cap", children: [words != null && _jsx("span", { className: "stamp__words", children: words }), name != null && _jsx("span", { className: "stamp__name", children: name })] }))] }) })] }));
20
+ return (_jsxs(Box, { className: cx('stamp', `stamp--${shown.length}`, lg && 'stamp--lg', bare && 'stamp--bare', xs && 'stamp--xs', !frame && 'stamp--frameless', held && 'stamp--held', under && 'stamp--under', tilt && `stamp--tilt-${tilt}`, tap && 'stamp--tap', arrive && 'stamp--arrive', className), onAnimationEnd: struck, "aria-hidden": held || undefined, ...boxProps, children: [!frame && _jsx("span", { className: "stamp__shade", "aria-hidden": "true", children: _jsx("span", { className: cx('stamp__paper', `sticky--${tone}`) }) }), _jsx("span", { className: cx('stamp__paper', !frame && `sticky--${tone}`), children: _jsxs("span", { className: cx('stamp__pic', `sticky--${tone}`), children: [shown.map((picture, i) => _jsx("span", { className: "stamp__art", "aria-hidden": "true", children: picture }, i)), (name != null || words != null) && (_jsxs("span", { className: "stamp__cap", children: [words != null && _jsx("span", { className: "stamp__words", children: words }), name != null && _jsx("span", { className: "stamp__name", children: name })] }))] }) })] }));
21
21
  }
22
22
  /**
23
23
  * StampPlace — an empty place for a stamp: a 4:5 frame of round dots the size a Stamp is (`--stamp-size`), a word or an Icon inside.
package/dist/state.d.ts CHANGED
@@ -34,6 +34,8 @@ export declare function watchSize(targets: Array<Element | null | undefined>, fn
34
34
  export declare const warnOnce: (key: string, text: string) => void;
35
35
  /** the member asked for less motion (false where there is no window, e.g. a server render) */
36
36
  export declare const reducedMotion: () => boolean;
37
+ /** a length token (`--sp-2`, `--tap`) resolved to px now, as the bases stand — read it at the gesture, never once at load */
38
+ export declare function tokenPx(name: string): number;
37
39
  /** `--motion-sheet` in ms, read from `cs` (the document's by default); 350 where it reads as none */
38
40
  export declare const sheetMs: (cs?: CSSStyleDeclaration) => number;
39
41
  /** cancel the moves tagged `id` on `els`, so what is read next is where they rest */
package/dist/state.js CHANGED
@@ -80,6 +80,15 @@ export const warnOnce = (key, text) => { if (!warned.has(key)) {
80
80
  } };
81
81
  /** the member asked for less motion (false where there is no window, e.g. a server render) */
82
82
  export const reducedMotion = () => typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;
83
+ /** a length token (`--sp-2`, `--tap`) resolved to px now, as the bases stand — read it at the gesture, never once at load */
84
+ export function tokenPx(name) {
85
+ const probe = document.createElement('div');
86
+ probe.style.cssText = `position:absolute;visibility:hidden;width:var(${name})`;
87
+ document.body.appendChild(probe);
88
+ const px = probe.getBoundingClientRect().width;
89
+ probe.remove();
90
+ return px;
91
+ }
83
92
  /** `--motion-sheet` in ms, read from `cs` (the document's by default); 350 where it reads as none */
84
93
  export const sheetMs = (cs = getComputedStyle(document.documentElement)) => (parseFloat(cs.getPropertyValue('--motion-sheet')) || 0.35) * 1000;
85
94
  /** cancel the moves tagged `id` on `els`, so what is read next is where they rest */
@@ -19,7 +19,7 @@ export interface StickyProps extends Omit<ComponentProps<'div'>, 'onClick'> {
19
19
  tilt?: 'left' | 'right';
20
20
  /** a small muted line at the bottom ("From …") */
21
21
  foot?: ReactNode;
22
- /** a control (an IconBtn) standing on the bottom-right corner, half outside the note; the note then has no fold */
22
+ /** a control (a round Btn) standing on the bottom-right corner, half outside the note; the note then has no fold */
23
23
  corner?: ReactNode;
24
24
  /** things stuck ON the note, each placing itself over the paper (a `StampOn`: the small stamp, or `main` for the main size) — a layer the size of the note, in front of the words */
25
25
  stuck?: ReactNode;
@@ -7,7 +7,7 @@ export interface StickyAnswerProps extends ComponentProps<'div'> {
7
7
  defaultWriting?: boolean;
8
8
  /** it asks: to write — the cursor went into the note (`focus`); to stop — a touch outside (`outside`) or Escape (`escape`). The phone's back and sending are the app's: it sets `writing` */
9
9
  onWritingChange?: (writing: boolean, reason: StickyAnswerReason) => void;
10
- /** the row under the note while it is written on: the paper chooser at the start (a `StickyPick`), the send button at the end (an `IconBtn`) */
10
+ /** the row under the note while it is written on: the paper chooser at the start (a `StickyPick`), the send button at the end (a round `Btn`) */
11
11
  tools?: ReactNode;
12
12
  /** what stands under that row — the stamp the writer may stick on the note (a `StampCell on` button), a line of words */
13
13
  tray?: ReactNode;
@@ -27,10 +27,10 @@ export interface StickyHeadingProps extends Omit<HTMLAttributes<HTMLElement>, 't
27
27
  export declare function StickyHeading({ title, caption, as, className, ...rest }: StickyHeadingProps): import("react").DetailedReactHTMLElement<{
28
28
  /** the element it renders (React 19 passes `ref` as a prop) */
29
29
  ref?: Ref<HTMLElement>;
30
- translate?: "yes" | "no" | undefined | undefined;
31
- onChange?: import("react").ChangeEventHandler<HTMLElement, Element> | undefined;
32
30
  slot?: string | undefined | undefined;
33
31
  style?: import("react").CSSProperties | undefined;
32
+ translate?: "yes" | "no" | undefined | undefined;
33
+ onChange?: import("react").ChangeEventHandler<HTMLElement, Element> | undefined;
34
34
  dir?: string | undefined | undefined;
35
35
  children?: ReactNode;
36
36
  suppressHydrationWarning?: boolean | undefined | undefined;
@@ -30,7 +30,7 @@ export function CallSheet({ media, heading, body, action, sheet, ways, open: ope
30
30
  if (was !== null)
31
31
  setLeaving(was);
32
32
  }
33
- return (_jsxs(Screen, { fill: true, ...rest, children: [_jsxs(Step, { children: [_jsxs(Page, { children: [media, _jsx(Head, { children: _jsx(Words, { title: heading, level: "h1" }) }), typeof body === 'string' ? _jsx(Text, { level: "body", children: body }) : body, _jsx(CtaPack, { children: list.map((w, i) => w.action == null ? null : (_jsx(Btn, { primary: i === first, quiet: i !== first, "aria-expanded": on === i, onClick: () => { setAt('full'); set(i); }, children: w.action }, i))) })] }), list.map(({ sheet: sh }, i) => (_jsxs(Sheet, { state: on === i ? at : 'away', onStateChange: (s) => { if (s === 'away')
33
+ return (_jsxs(Screen, { fill: true, ...rest, children: [_jsxs(Step, { children: [_jsxs(Page, { children: [media, _jsx(Head, { children: _jsx(Words, { title: heading, level: "h1" }) }), typeof body === 'string' ? _jsx(Text, { level: "body", children: body }) : body, _jsx(CtaPack, { children: list.map((w, i) => w.action == null ? null : (_jsx(Btn, { tone: i === first ? 'primary' : 'quiet', "aria-expanded": on === i, onClick: () => { setAt('full'); set(i); }, children: w.action }, i))) })] }), list.map(({ sheet: sh }, i) => (_jsxs(Sheet, { state: on === i ? at : 'away', onStateChange: (s) => { if (s === 'away')
34
34
  set(null);
35
35
  else
36
36
  setAt(s); }, onSettled: (s) => { if (s === 'away' && leaving === i)
@@ -10,7 +10,7 @@ import { ActionBar, ActionBarTier } from '../scaffold/ActionBar.js';
10
10
  import { Head } from '../parts/Head.js';
11
11
  import { Words } from '../parts/Words.js';
12
12
  import { Text } from '../type/Text.js';
13
- import { IconBtn } from '../actions/IconBtn.js';
13
+ import { Btn } from '../actions/Btn.js';
14
14
  import { word } from '../words.js';
15
15
  /**
16
16
  * Walkthrough — TEMPLATE, a `Screen` with its three parts filled — no top · content: `Pages` (down to the screen's foot; each Page padded by the lead above and below, the whole run scrolls) · bottom: a LAYER over it — the dots, then the `ActionBar` rows.
@@ -49,7 +49,7 @@ export function Walkthrough({ pages, at: atProp, defaultAt = 0, onAtChange, cta,
49
49
  };
50
50
  const row = typeof cta === 'function' ? cta({ at, count, go }) : cta;
51
51
  const custom = row !== undefined && row !== null;
52
- const pager = (_jsxs(_Fragment, { children: [_jsx(IconBtn, { icon: "arrow-left", label: backLabel, disabled: at === 0, onClick: () => go(at - 1) }), _jsx(IconBtn, { invert: true, icon: "arrow-right", label: nextLabel, disabled: at === count - 1, onClick: () => go(at + 1) })] }));
52
+ const pager = (_jsxs(_Fragment, { children: [_jsx(Btn, { shape: "round", icon: "arrow-left", label: backLabel, disabled: at === 0, onClick: () => go(at - 1) }), _jsx(Btn, { shape: "round", tone: "primary", icon: "arrow-right", label: nextLabel, disabled: at === count - 1, onClick: () => go(at + 1) })] }));
53
53
  const dots = count > 1 ? _jsx(Pager, { at: at + 1, of: count }) : null;
54
54
  const bottom = dots || controls.length || ctaLink != null ? (_jsxs(ActionBar, { variant: "tiers", children: [dots, controls.map((c, i) => _jsx(ActionBarTier, { children: c }, i)), _jsx(ActionBarTier, { pager: true, children: custom ? row : pager }), ctaLink != null && _jsx(ActionBarTier, { className: "action-bar__tier--link", children: ctaLink })] })) : (_jsx(ActionBar, { variant: "pager", children: custom ? row : pager }));
55
55
  return (_jsxs(Screen, { fill: true, bottom: bottom, ...rest, children: [_jsx(Step, { ref: step, children: _jsx(Pages, { ...swipe, children: pages.map((p, i) => (_jsxs(Page, { "aria-current": i === at ? 'step' : undefined, inert: i !== at || undefined, children: [p.media, _jsx(Head, { children: _jsx(Words, { title: p.heading, level: "h1" }) }), typeof p.body === 'string' ? _jsx(Text, { level: "body", children: p.body }) : p.body] }, i))) }) }), children] }));
@@ -3,7 +3,7 @@ import { type IconName as StockIconName } from './icons.js';
3
3
  /** an icon's name: one of the stock symbols (autocompleted) — or any name a project registered with `registerIcons` */
4
4
  export type IconName = StockIconName | (string & {});
5
5
  /**
6
- * registerIcons — a project's OWN icons, by name: after this, `icon="map-pin"` works on every component that takes an icon (Icon, IconBtn,
6
+ * registerIcons — a project's OWN icons, by name: after this, `icon="map-pin"` works on every component that takes an icon (Icon, Btn,
7
7
  * Field, MenuItem, Tile…), exactly like a stock one. Call it once at startup. A drawing is the INSIDE of the `<svg>` as a string (paths on a
8
8
  * 24×24 box, drawn with the shared stroke), or `{ body, attrs }` to bring its own viewBox / fill. A registered name wins over a stock one —
9
9
  * that is how a project swaps a symbol for its own. Returns nothing; safe to call again (later drawings replace earlier ones).
package/dist/type/Icon.js CHANGED
@@ -6,7 +6,7 @@ import { ICONS } from './icons.js';
6
6
  const STROKE = { viewBox: '0 0 24 24', fill: 'none', stroke: 'currentColor', strokeWidth: '2', strokeLinecap: 'round', strokeLinejoin: 'round' };
7
7
  const OWN = new Map();
8
8
  /**
9
- * registerIcons — a project's OWN icons, by name: after this, `icon="map-pin"` works on every component that takes an icon (Icon, IconBtn,
9
+ * registerIcons — a project's OWN icons, by name: after this, `icon="map-pin"` works on every component that takes an icon (Icon, Btn,
10
10
  * Field, MenuItem, Tile…), exactly like a stock one. Call it once at startup. A drawing is the INSIDE of the `<svg>` as a string (paths on a
11
11
  * 24×24 box, drawn with the shared stroke), or `{ body, attrs }` to bring its own viewBox / fill. A registered name wins over a stock one —
12
12
  * that is how a project swaps a symbol for its own. Returns nothing; safe to call again (later drawings replace earlier ones).
@@ -3,14 +3,15 @@
3
3
  * a fixed size (a round with a number, a button, the top bar) is drawn for the theme's text — at a larger text the words outgrew
4
4
  * it; growing the things at the same rate would zoom the whole UI and leave no room for content (Lh 2026-10-03, pairs set by
5
5
  * measuring the gallery: 115 → 107.5 · 130 → 115 · 145 → 122.5 · 160 → 130). A smaller text never shrinks a control.
6
- * The FORM controls are not on this rate: a field, a button, a chip, a Pin cell, a switch, a check, a segmented choice follow the
7
- * words in full (Lh 2026-10-26 — tokens.css `--form-tap`, `--btn-h`: the larger of their `--tap-base` and the same share of `--fs-base`).
6
+ * The FORM controls are not on this rate: a field, a chip, a Pin cell, a switch, a check, a segmented choice follow the
7
+ * words in full (Lh 2026-10-26 — tokens.css `--form-tap`: the larger of its `--tap-base` and the same share of `--fs-base`). A button is on
8
+ * the tap ladder (`--btn-h` = `--tap`, Lh 2026-10-29): it grows as the things do, not as the words; only words that outgrow it make a pill taller.
8
9
  */
9
10
  export declare const controlsFor: (percent: number) => number;
10
11
  /**
11
12
  * The member's text size: `--fs-base` on <html> as a share of the theme's own base (100 = as the theme set it), and with it
12
13
  * `--tap-base` — the things grow half as much as the words (`controlsFor`), so a larger text still fits what holds it; the form
13
- * controls (fields, buttons, chips, Pin, switches) grow as much as the words, being sized on `--fs-base` too.
14
+ * controls (fields, chips, Pin, switches) grow as much as the words, being sized on `--fs-base` too.
14
15
  * The bases are read from the CSS (cardds's default or the project's theme.css) — never copied into app code. Keeping the choice
15
16
  * (localStorage, an account) is the app's.
16
17
  */
@@ -3,14 +3,15 @@
3
3
  * a fixed size (a round with a number, a button, the top bar) is drawn for the theme's text — at a larger text the words outgrew
4
4
  * it; growing the things at the same rate would zoom the whole UI and leave no room for content (Lh 2026-10-03, pairs set by
5
5
  * measuring the gallery: 115 → 107.5 · 130 → 115 · 145 → 122.5 · 160 → 130). A smaller text never shrinks a control.
6
- * The FORM controls are not on this rate: a field, a button, a chip, a Pin cell, a switch, a check, a segmented choice follow the
7
- * words in full (Lh 2026-10-26 — tokens.css `--form-tap`, `--btn-h`: the larger of their `--tap-base` and the same share of `--fs-base`).
6
+ * The FORM controls are not on this rate: a field, a chip, a Pin cell, a switch, a check, a segmented choice follow the
7
+ * words in full (Lh 2026-10-26 — tokens.css `--form-tap`: the larger of its `--tap-base` and the same share of `--fs-base`). A button is on
8
+ * the tap ladder (`--btn-h` = `--tap`, Lh 2026-10-29): it grows as the things do, not as the words; only words that outgrow it make a pill taller.
8
9
  */
9
10
  export const controlsFor = (percent) => 100 + Math.max(0, percent - 100) / 2;
10
11
  /**
11
12
  * The member's text size: `--fs-base` on <html> as a share of the theme's own base (100 = as the theme set it), and with it
12
13
  * `--tap-base` — the things grow half as much as the words (`controlsFor`), so a larger text still fits what holds it; the form
13
- * controls (fields, buttons, chips, Pin, switches) grow as much as the words, being sized on `--fs-base` too.
14
+ * controls (fields, chips, Pin, switches) grow as much as the words, being sized on `--fs-base` too.
14
15
  * The bases are read from the CSS (cardds's default or the project's theme.css) — never copied into app code. Keeping the choice
15
16
  * (localStorage, an account) is the app's.
16
17
  */