@usableapp/cardds 0.7.166 → 0.7.168
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 +38 -0
- package/bin/cardds.mjs +4 -3
- package/cardds.css +1 -1
- package/css/choice.css +1 -1
- package/css/fonts.css +53 -24
- package/css/lists.css +14 -7
- package/css/parts.css +8 -5
- package/css/stack.css +1 -1
- package/css/theme.template.css +2 -2
- package/css/tokens.css +5 -4
- package/dist/cardds.css +83 -43
- package/dist/cards/Card.js +2 -1
- package/dist/cards/CardFeed.js +1 -2
- package/dist/catalog.json +1 -1
- package/dist/lists/Bubble.d.ts +29 -5
- package/dist/lists/Bubble.js +70 -9
- package/dist/parts/Head.d.ts +57 -13
- package/dist/parts/Head.js +72 -31
- package/dist/parts/Words.d.ts +2 -2
- package/dist/parts/Words.js +2 -2
- package/dist/parts/endRoom.d.ts +2 -0
- package/dist/parts/endRoom.js +1 -1
- package/dist/parts/headCtx.d.ts +3 -0
- package/dist/parts/headCtx.js +3 -0
- package/dist/sheets/Modal.d.ts +1 -1
- package/dist/sheets/Modal.js +4 -2
- package/dist/sheets/Sheet.d.ts +3 -2
- package/dist/sheets/Sheet.js +4 -1
- package/dist/sheets/StackBack.d.ts +1 -1
- package/dist/sheets/StackBack.js +1 -1
- package/dist/sheets/StackSheet.js +4 -6
- package/dist/sheets/sheetMeasure.js +1 -1
- package/dist/templates/CallSheet.js +2 -3
- package/dist/templates/Walkthrough.js +1 -2
- package/dist/type/icons.d.ts +1 -1
- package/dist/type/icons.js +2 -2
- package/dist/words.d.ts +1 -1
- package/dist/words.js +2 -2
- package/docs/reference.md +56 -33
- package/fonts/LICENSES.md +94 -32
- package/fonts/noto-sans/cyrillic.woff2 +0 -0
- package/fonts/noto-sans/greek.woff2 +0 -0
- package/fonts/noto-sans/latin-ext.woff2 +0 -0
- package/fonts/noto-sans/latin.woff2 +0 -0
- package/fonts/noto-sans/vietnamese.woff2 +0 -0
- package/fonts/noto-sans-thai-looped/thai.woff2 +0 -0
- package/icons.svg +2 -1
- package/lib/guide.mjs +6 -5
- package/lint/headSlots.d.mts +2 -0
- package/lint/headSlots.mjs +15 -0
- package/lint/rules.mjs +42 -1
- package/package.json +2 -1
- package/scripts/codemod-head.mjs +306 -0
- package/scripts/codemod-parts.mjs +2 -1
- package/fonts/fc-pride-medium.otf +0 -0
- package/fonts/pk-nonthaburi-demo.ttf +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,44 @@
|
|
|
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.168 — 2026-10-29
|
|
6
|
+
|
|
7
|
+
One font family with real weights: Noto Sans, Thai and Latin. Nothing is faux bold any more.
|
|
8
|
+
|
|
9
|
+
Components: all
|
|
10
|
+
|
|
11
|
+
### Changed
|
|
12
|
+
- **The shipped fonts** (Lh, 2026-10-29): PK Nonthaburi (body, only 400 and 500) and FC Pride (display, one medium file) were asked for 600, 650, 700, 800 and 900 that they did not have, so the browser faked the bold. Before → after: `--font-ui` is `"Noto Sans", "Noto Sans Thai Looped", var(--font-fallback)` and `--font-display` is `var(--font-ui)`, one variable axis 100–900, so 400 · 500 · 600 · 650 · 700 · 800 · 900 are all real. Thai comes from Noto Sans Thai Looped; Latin, Latin-ext, Vietnamese, Cyrillic and Greek from Noto Sans, each a file joined by `unicode-range` (a page loads only the scripts it draws). No weight token changed. The faces' own vertical metrics are standard, so every `ascent-override`, `descent-override` and `line-gap-override` is gone; the `--lh-*` and size tokens are unchanged. A line that mixes Thai and Latin is about 0.06em taller than a Thai-only line (two files, two boxes).
|
|
13
|
+
- **Wider text**: both new faces are about 10–15% wider than the old ones, so some lines break earlier and a tight row can wrap (a dark route card's gate badge drops under its chip). No size token was touched; an app that needs it tunes its theme. In a theme that named the old fonts, replace `"PK Nonthaburi"` and `"FC Pride"` in `--font-ui` / `--font-display` with the new stacks (see `css/theme.template.css`).
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- **`--font-fallback`**: a per-script list of system faces for scripts cardds does not ship (Lao, Khmer, Myanmar, Devanagari, Hebrew, Arabic, CJK). No CJK file ships.
|
|
17
|
+
- **Story `Text/Languages`**: one sample line per language in each real weight, with the languages drawn by a system font marked.
|
|
18
|
+
|
|
19
|
+
### Removed
|
|
20
|
+
- `fonts/fc-pride-medium.otf` and `fonts/pk-nonthaburi-demo.ttf`, with their licence notes. Package size is about +170 KB net (`latin-ext`, 168 KB, loads only when a Latin-ext letter appears). Licences: SIL OFL 1.1 (`fonts/LICENSES.md`).
|
|
21
|
+
|
|
22
|
+
## 0.7.167 — 2026-10-29
|
|
23
|
+
|
|
24
|
+
`Head` is ONE part with a `variant` and named slots; the sheet head draws and wires its own close. A head written with children is gone.
|
|
25
|
+
|
|
26
|
+
Components: Head, Words, Card, CardFeed, Sheet, Modal, StackSheet, StackBack, CallSheet, Walkthrough, Bubble, Thread
|
|
27
|
+
|
|
28
|
+
### Changed (breaking)
|
|
29
|
+
- **`Head` takes no children** (timebank, Lh 2026-10-29: "cardds should make the head a component with variants"). A head is one of a closed set, `variant` = `plain` (default) · `lead` · `date` · `status` · `centre` · `sheet` · `stack`, filled through named slots (`title` `meta` `over` `level` `lead` `tag` `chips` `end` `actions` `onClose` `closeLabel` `back` `backLabel`); the variant lays them out, never the order they are written in. A slot the variant does not take is left out with a warning. Before → after:
|
|
30
|
+
- `<Head><Words title meta/><End caption="5 min"/></Head>` → `<Head title meta end={<End caption="5 min"/>} />`
|
|
31
|
+
- `<Head><Avatar/><Words title meta/><End/><Btn shape="round" size="sm" icon="check" label="…"/><Btn shape="round" size="sm" icon="x" label="…"/></Head>` (a feed card's head) → `<Head variant="lead" lead={<Avatar/>} title meta end={<><End/><Btn …/><Btn …/></>} />`
|
|
32
|
+
- `<Head><Words title meta/><Btn shape="round" size="sm" icon="x" label="ปิด" onClick={onClose}/></Head>` in a sheet → `<Head variant="sheet" title meta onClose={onClose} />` (no `onClose` inside a `Sheet`: the close asks the sheet, `onStateChange('away', 'close')`)
|
|
33
|
+
- a sheet head with a stamp and a flag → `<Head variant="sheet" lead={<AvatarStack><Stamp bare …/></AvatarStack>} title meta actions={<Btn shape="round" icon="flag" label="…"/>} onClose={onClose} />` (up to two `actions`, drawn at the close's size)
|
|
34
|
+
- `<Head centre>` → `<Head variant="centre" lead={<Btn …/>} end={<Btn …/>} title meta />` (no alias)
|
|
35
|
+
- a stack sheet's head → `variant="stack"` (`StackSheet` builds it itself).
|
|
36
|
+
Run `npx cardds codemod-head <files or folders>` on your screens: it rewrites each head written with children through the TypeScript AST and names every head it cannot decide. `cardds check` reports `head-slot` (error) and `head-close-by-hand` (warn). Stories `Head · Plain`, `WithLead`, `WithDate`, `Status`, `Centre`, `SheetClose`, `SheetControlled`, `StackControlled`.
|
|
37
|
+
|
|
38
|
+
### Added
|
|
39
|
+
- **`Head variant="sheet"`**: the close is drawn (a round ✕ named in the page's language, `closeLabel` for other words) and wired: `onClose`, else the `Sheet` round it goes `away`; with neither (a modal, a card) none is drawn.
|
|
40
|
+
- **`Head variant="status"`**: a `tag` chip and an `end` badge on the first row, the status words (`meta`, never a heading) under them. Knobs `--head-status-font`, `--head-status-ink`.
|
|
41
|
+
- **`Thread`** follows the end of a chat (keyboard up included), with a jump-to-latest button and room at the end; **`Bubble`** shows the author per `Thread authors` and the day only where it changes (`day`, `days`, `showDay`).
|
|
42
|
+
|
|
5
43
|
## 0.7.166 — 2026-10-29
|
|
6
44
|
|
|
7
45
|
`FeedEnd art` is 30% of the feed's width.
|
package/bin/cardds.mjs
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// `npx cardds check [dir…]` — the rules of lint/rules.mjs over the project's source; exit 1 on an error. A person's tool, never a session's step.
|
|
4
4
|
// `npx cardds guide` — the few rules no checker sees, as text (the MCP server hands the same text over as its instructions).
|
|
5
5
|
// `npx cardds codemod-parts [--check] <files…>` — rewrite a screen from the retired parts (CardHead, SheetBody, CardFoot…) to Head · Body · Foot · Lead · Words · End.
|
|
6
|
+
// `npx cardds codemod-head [--check] <files or folders…>` — rewrite every Head written with children to its variant and slots (scripts/codemod-head.mjs).
|
|
6
7
|
// `npx cardds list | get <Name> | find [words…] [--represents a,b] [--shape s] [--interact k|none] | scaffold [id]` — the component catalog (lib/catalog.mjs) for an AI session; `npx cardds mcp` serves the same over MCP.
|
|
7
8
|
import { existsSync, readFileSync, readdirSync, statSync, mkdirSync, copyFileSync } from 'node:fs';
|
|
8
9
|
import { dirname, join, relative, resolve } from 'node:path';
|
|
@@ -153,7 +154,7 @@ function ask(cmd, argv) {
|
|
|
153
154
|
return 0;
|
|
154
155
|
}
|
|
155
156
|
|
|
156
|
-
const codemod = (a) => import(
|
|
157
|
-
const code = cmd === 'check' ? check(args) : cmd === 'codemod-parts' ? await codemod(args) : cmd === 'init' ? init() : cmd === 'guide' ? (process.stdout.write(GUIDE), 0) : ['list', 'get', 'find', 'scaffold', 'mcp'].includes(cmd) ? await ask(cmd, args)
|
|
158
|
-
: (console.log('usage: cardds init | guide | check [dir…] | codemod-parts [--check] <files…> | list | get <Name> [--html] | find [words…] [--represents a,b] [--shape s] [--interact k|none] | scaffold [id] [--html [--css <href>]] | mcp (list get find scaffold mcp: --root <path> --json)'), cmd ? 2 : 0);
|
|
157
|
+
const codemod = (which, a) => import(`../scripts/${which}.mjs`).then((m) => m.main(a), (e) => { console.error(`cardds ${which}: ${e.code === 'ERR_MODULE_NOT_FOUND' ? 'it reads the TypeScript compiler: install `typescript` in the project' : e.message}`); return 2; });
|
|
158
|
+
const code = cmd === 'check' ? check(args) : cmd === 'codemod-parts' || cmd === 'codemod-head' ? await codemod(cmd, args) : cmd === 'init' ? init() : cmd === 'guide' ? (process.stdout.write(GUIDE), 0) : ['list', 'get', 'find', 'scaffold', 'mcp'].includes(cmd) ? await ask(cmd, args)
|
|
159
|
+
: (console.log('usage: cardds init | guide | check [dir…] | codemod-parts [--check] <files…> | codemod-head [--check] <files or folders…> | list | get <Name> [--html] | find [words…] [--represents a,b] [--shape s] [--interact k|none] | scaffold [id] [--html [--css <href>]] | mcp (list get find scaffold mcp: --root <path> --json)'), cmd ? 2 : 0);
|
|
159
160
|
process.exitCode = code; // not process.exit: a big answer piped to a reader is cut off by an exit before it is flushed
|
package/cardds.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* cardds — card-first mobile design system. One import. */
|
|
2
|
-
@import url("css/fonts.css"); /* the
|
|
2
|
+
@import url("css/fonts.css"); /* the Noto Sans family: Thai Looped + Latin, Latin-ext, Vietnamese, Cyrillic, Greek */
|
|
3
3
|
@import url("css/tokens.css"); /* structure + wireframe defaults */
|
|
4
4
|
@import url("css/palette.css"); /* color settings — the file you tune */
|
|
5
5
|
@import url("css/base.css"); /* reset, surface, type levels, page */
|
package/css/choice.css
CHANGED
|
@@ -323,7 +323,7 @@ button.calendar__label:focus-visible { outline: var(--focus); outline-offset: va
|
|
|
323
323
|
/* the eye centres the INK, not the line box: a letter that stands on the
|
|
324
324
|
baseline (ก) has no descender, while the face's box keeps 0.30em under it
|
|
325
325
|
(fonts.css) — so the ink lands low when the box is centred; lifted 0.15em
|
|
326
|
-
(set by eye with Lh on
|
|
326
|
+
(set by eye with Lh on the display face at h2, 2026-09-12) */
|
|
327
327
|
translate: -50% -0.15em;
|
|
328
328
|
display: grid;
|
|
329
329
|
place-items: center;
|
package/css/fonts.css
CHANGED
|
@@ -1,37 +1,66 @@
|
|
|
1
1
|
/* ============================================================
|
|
2
|
-
cardds/fonts.css —
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
cardds/fonts.css — ONE family, the Noto Sans family (Lh, 2026-10-29): the
|
|
3
|
+
industry-standard face with the widest script coverage, drawn as one design,
|
|
4
|
+
SIL OFL 1.1. Every weight the scale asks for (400 · 500 · 600 · 650 · 700 ·
|
|
5
|
+
800 · 900) is a real master of a variable 100–900 axis, never a browser-made
|
|
6
|
+
bold; the display role is the same family at its heavy weights, so a line of
|
|
7
|
+
Thai, Vietnamese, Latin, Cyrillic or Greek speaks with one voice.
|
|
8
|
+
Shipped scripts: Thai (Noto Sans Thai Looped), Latin, Latin-ext, Vietnamese,
|
|
9
|
+
Cyrillic, Greek (Noto Sans) — each its own woff2, joined by unicode-range, so a page
|
|
10
|
+
downloads only the scripts it draws. Every other script (Lao, Khmer, Myanmar,
|
|
11
|
+
Chinese, Japanese, Korean, Arabic, Hebrew, Devanagari...) falls to the system
|
|
12
|
+
face named in --font-fallback (tokens.css); no CJK file ships. Licences: fonts/LICENSES.md.
|
|
13
|
+
Vertical metrics are the files' own, no ascent / descent / line-gap override: Noto Sans Thai Looped
|
|
14
|
+
1.25 up / 0.35 down (its stacked marks reach 1.11 up, lower vowels 0.31 down), Noto Sans 1.069 / 0.293
|
|
15
|
+
(Vietnamese marks 1.05 up), line gap 0 in both, USE_TYPO_METRICS set, so every platform reads the same box.
|
|
8
16
|
tokens.css points --font-ui and --font-display at these; a consumer who
|
|
9
17
|
vendors the CSS copies fonts/ beside it (the url()s are ../fonts/).
|
|
10
18
|
============================================================ */
|
|
11
19
|
@font-face {
|
|
12
|
-
font-family: "
|
|
13
|
-
src: url("../fonts/
|
|
14
|
-
font-weight:
|
|
20
|
+
font-family: "Noto Sans Thai Looped";
|
|
21
|
+
src: url("../fonts/noto-sans-thai-looped/thai.woff2") format("woff2");
|
|
22
|
+
font-weight: 100 900;
|
|
23
|
+
font-style: normal;
|
|
24
|
+
font-display: swap;
|
|
25
|
+
unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC, U+02D7, U+0303, U+0331;
|
|
26
|
+
}
|
|
27
|
+
@font-face {
|
|
28
|
+
font-family: "Noto Sans";
|
|
29
|
+
src: url("../fonts/noto-sans/latin.woff2") format("woff2");
|
|
30
|
+
font-weight: 100 900;
|
|
31
|
+
font-style: normal;
|
|
32
|
+
font-display: swap;
|
|
33
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
34
|
+
}
|
|
35
|
+
@font-face {
|
|
36
|
+
font-family: "Noto Sans";
|
|
37
|
+
src: url("../fonts/noto-sans/latin-ext.woff2") format("woff2");
|
|
38
|
+
font-weight: 100 900;
|
|
39
|
+
font-style: normal;
|
|
40
|
+
font-display: swap;
|
|
41
|
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
42
|
+
}
|
|
43
|
+
@font-face {
|
|
44
|
+
font-family: "Noto Sans";
|
|
45
|
+
src: url("../fonts/noto-sans/vietnamese.woff2") format("woff2");
|
|
46
|
+
font-weight: 100 900;
|
|
47
|
+
font-style: normal;
|
|
48
|
+
font-display: swap;
|
|
49
|
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
|
50
|
+
}
|
|
51
|
+
@font-face {
|
|
52
|
+
font-family: "Noto Sans";
|
|
53
|
+
src: url("../fonts/noto-sans/cyrillic.woff2") format("woff2");
|
|
54
|
+
font-weight: 100 900;
|
|
15
55
|
font-style: normal;
|
|
16
56
|
font-display: swap;
|
|
17
|
-
|
|
18
|
-
lower vowels 0.30em down (measured; the face declares 0.92 / 0.30 + gap) */
|
|
19
|
-
ascent-override: 102%;
|
|
20
|
-
descent-override: 30%;
|
|
21
|
-
line-gap-override: 0%;
|
|
57
|
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
|
22
58
|
}
|
|
23
59
|
@font-face {
|
|
24
|
-
font-family: "
|
|
25
|
-
src: url("../fonts/
|
|
60
|
+
font-family: "Noto Sans";
|
|
61
|
+
src: url("../fonts/noto-sans/greek.woff2") format("woff2");
|
|
26
62
|
font-weight: 100 900;
|
|
27
63
|
font-style: normal;
|
|
28
64
|
font-display: swap;
|
|
29
|
-
|
|
30
|
-
reaches 1.10em and สระอู 0.29em — override so the line box centres the
|
|
31
|
-
ink and a clipped heading loses the same hair top and bottom, not the
|
|
32
|
-
whole lower vowel. With the leading in tokens.css this is 0.075em a side
|
|
33
|
-
at h2; the clipped containers pad that back (card.css, actions.css) */
|
|
34
|
-
ascent-override: 110%;
|
|
35
|
-
descent-override: 30%;
|
|
36
|
-
line-gap-override: 0%;
|
|
65
|
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
|
37
66
|
}
|
package/css/lists.css
CHANGED
|
@@ -91,7 +91,14 @@
|
|
|
91
91
|
<div class="bubble"><p class="bubble__body">…</p><span class="bubble__meta">Dec 4 · 8:15</span></div>
|
|
92
92
|
<div class="bubble bubble--right">…</div>
|
|
93
93
|
</div> */
|
|
94
|
-
.thread { display: grid; gap: var(--thread-gap, var(--sp-4)); }
|
|
94
|
+
.thread { display: grid; gap: var(--thread-gap, var(--sp-4)); padding-bottom: var(--thread-end-size, var(--sp-4)); }
|
|
95
|
+
/* the jump to the last words (Thread, Lh 2026-10-29): a row of no height at the thread's end, stuck to the scroller's bottom edge;
|
|
96
|
+
the round Btn hangs up from it at the end corner while the reader is away from the end */
|
|
97
|
+
.thread__end { position: sticky; bottom: 0; height: 0; margin-top: calc(-1 * var(--thread-gap, var(--sp-4))); display: grid; justify-items: end; z-index: 1; }
|
|
98
|
+
.thread__jump { translate: 0 calc(-100% - var(--thread-jump-at, var(--sp-3))); }
|
|
99
|
+
.bubble__author + *::before { content: "·"; margin-inline-end: var(--bubble-meta-gap, var(--sp-1)); }
|
|
100
|
+
.bubble__author:has(+ *) { margin-inline-end: var(--bubble-meta-gap, var(--sp-1)); }
|
|
101
|
+
.bubble__day:has(+ *) { margin-inline-end: var(--bubble-meta-gap, var(--sp-1)); } /* the day, then the time: "Dec 4 8:15" */
|
|
95
102
|
/* one column: the message (max-content, but it gives way — minmax(0) — so a long one shrinks and wraps); the meta under it */
|
|
96
103
|
.bubble {
|
|
97
104
|
display: grid;
|
|
@@ -193,16 +200,16 @@ a.bubble { color: inherit; text-decoration: none; }
|
|
|
193
200
|
.link:disabled { color: var(--link-disabled-ink, var(--card-muted)); cursor: default; } /* inactive = muted (a Countdown) */
|
|
194
201
|
.link--wait { font-variant-numeric: tabular-nums; } /* the countdown's digits keep their width: the words do not jiggle each second */
|
|
195
202
|
/* an icon in a link FILLS the line of the link's words, judged by the X (Lh 2026-10-25), centred on the words' body band, whatever `size`
|
|
196
|
-
the app gave it, through the Icon's own knobs. The numbers,
|
|
197
|
-
|
|
198
|
-
centre 0.
|
|
199
|
-
the pencil about 22. The box is 0.8em: the X then draws 0.8 × 14/24 = 0.47em,
|
|
203
|
+
the app gave it, through the Icon's own knobs. The numbers, measured on the face the link sets (--type-label → --font-ui, Noto Sans Thai
|
|
204
|
+
Looped, 1000 units/em): a Thai consonant body (ก ข น ด ค า) tops at 566 units = 0.566em, so the band runs from the baseline to 0.566em, its
|
|
205
|
+
centre 0.28em up; Thai upper vowels reach 0.83–0.93em (ำ ไ). In its 24-unit box the `x` draws only 14 (6–18 and its stroke),
|
|
206
|
+
the pencil about 22. The box is 0.8em: the X then draws 0.8 × 14/24 = 0.47em, 83% of the body; the pencil 0.73em, its tip 0.63em up,
|
|
200
207
|
still under the upper vowels' line (a larger box puts the X closer to the body but stands the pencil over the words). Never `ex` (it
|
|
201
208
|
follows whichever face answered) nor `cap` (not on iOS 16.4). Baseline alignment puts the box's bottom (an svg's baseline) on the words'
|
|
202
|
-
baseline; `translate` lowers it by half the box less 0.
|
|
209
|
+
baseline; `translate` lowers it by half the box less 0.28em, so the box's centre — where a stock icon is drawn about — is the band's
|
|
203
210
|
centre: translate, because it moves only the drawing and leaves the line's box and its centring alone. Baseline-aligned items sit at
|
|
204
211
|
the top of their line, so the link wraps (one line still) and centres that line in its min-height box with align-content; the gap kept */
|
|
205
|
-
.link > .icon { --icon-size: var(--link-icon-size, 0.8em); --icon-xs-size: var(--icon-size); --icon-sm-size: var(--icon-size); --icon-lg-size: var(--icon-size); translate: 0 calc(var(--icon-size) / 2 - 0.
|
|
212
|
+
.link > .icon { --icon-size: var(--link-icon-size, 0.8em); --icon-xs-size: var(--icon-size); --icon-sm-size: var(--icon-size); --icon-lg-size: var(--icon-size); translate: 0 calc(var(--icon-size) / 2 - 0.28em); }
|
|
206
213
|
.link:has(> .icon) { flex-wrap: wrap; align-items: baseline; align-content: center; }
|
|
207
214
|
|
|
208
215
|
/* ---- bullets: a list, each item led by a small square picture as tall as a line of its words (Lh 2026-09-28, timebank #153) ----
|
package/css/parts.css
CHANGED
|
@@ -79,6 +79,9 @@
|
|
|
79
79
|
min-height: var(--head-min-h, auto);
|
|
80
80
|
}
|
|
81
81
|
.head--top { align-items: flex-start; }
|
|
82
|
+
/* `Head variant="status"`: the tag at the left and the end at the far right on the first row, the status words (the meta, a plain line, never a heading)
|
|
83
|
+
under both in the caption's weight and muted ink. The UI face ships weights 400 and 500 only: a heavier one is the browser's fake bold, so no bolder look */
|
|
84
|
+
.head--status > .words__meta { font: var(--head-status-font, var(--type-caption)); color: var(--head-status-ink, var(--card-muted)); }
|
|
82
85
|
|
|
83
86
|
/* ---- the card skeleton: head · content · foot ----
|
|
84
87
|
Every card is a head (the heading left, hints / actions / a more-menu at
|
|
@@ -89,8 +92,9 @@
|
|
|
89
92
|
heading (or the div that wraps it) is that leading child: a control that
|
|
90
93
|
leads a custom head — a chip, an avatar, a tile badge — keeps its own
|
|
91
94
|
width, else the rule stretched a chip into a bar and an avatar into an
|
|
92
|
-
ellipse (two agents and the wallet demo caught it, 2026-09-10).
|
|
93
|
-
|
|
95
|
+
ellipse (two agents and the wallet demo caught it, 2026-09-10). The title takes the room wherever its variant stands it (after a date
|
|
96
|
+
with no chips, after a stack sheet's back), never only as the first child (2026-10-29, the head's variants). */
|
|
97
|
+
.head > :is(h1, h2, h3, div, p):first-child, .head > :is(.words__title, .words__over-title) { flex: 1; min-width: 0; }
|
|
94
98
|
|
|
95
99
|
/* Skeleton head — the heading in a card's OWN head, and only there.
|
|
96
100
|
The heading wraps, no squeeze, up to three lines and cut there with an
|
|
@@ -160,8 +164,7 @@
|
|
|
160
164
|
/* a head that LEADS with a date (Lh 2026-10-21, timebank's request card): a `Head` whose first child is a JourneyBadge and whose second is a
|
|
161
165
|
ChipRow. The date stands at the left and the chips beside it, the two as tall as each other; the heading and its caption take the whole
|
|
162
166
|
width under them, so the heading sits right over the words of the middle. The date is always as tall as the chips. The gap under the date row is --head-lead-gap; the date and the chips place themselves (journey.css, actions.css).
|
|
163
|
-
Everything after the chips stands on rows of its own under them, in the order given
|
|
164
|
-
pinned at the right beside both lines (stamp.css) and so lay over the date (Lh 2026-10-23).
|
|
167
|
+
Everything after the chips stands on rows of its own under them, in the order given.
|
|
165
168
|
<div class="head"><span class="tile-badge tile-badge--stretch">…</span><div class="chip-row">…</div><div><h2 class="words__title t-h1">…</h2>…</div></div> */
|
|
166
169
|
.head:has(> .tile-badge:first-child + .chip-row) {
|
|
167
170
|
display: grid;
|
|
@@ -334,7 +337,7 @@
|
|
|
334
337
|
waits, and starts again from the first letter — like a song title. The head's line clamp (above) already cuts it, so no overflow is set here */
|
|
335
338
|
.stack-sheet > .head > .words__title {
|
|
336
339
|
flex: 1; min-width: 0; white-space: nowrap; overflow-wrap: normal;
|
|
337
|
-
translate: 0 var(--stack-sheet-title-shift, -0.1em); /*
|
|
340
|
+
translate: 0 var(--stack-sheet-title-shift, -0.1em); /* The display face's line box carries more room above its letters than below: the
|
|
338
341
|
letters sat ~0.1em under the middle of the back disc and the tabs — lifted onto it (Lh 2026-09-24) */
|
|
339
342
|
}
|
|
340
343
|
@media (prefers-reduced-motion: reduce) {
|
package/css/stack.css
CHANGED
|
@@ -330,7 +330,7 @@
|
|
|
330
330
|
|
|
331
331
|
/* AT THE END (Lh 2026-09-29, the home): after the tabs, chevron down — the open sheet folds down. The head's end gives it its room
|
|
332
332
|
while open; the last tab then sits on the inset (no reach into the padding) */
|
|
333
|
-
.sheet-stack--tap .sheet-stack__back--end { left: auto; right: 0; }
|
|
333
|
+
:is(.sheet-stack--tap > .card, .sheet-stack--tap > :not(.card, .sheet-stack__base) > .card) > .head > .sheet-stack__back--end { left: auto; right: 0; } /* as specific as the rule that sets it at the start (above), so it wins: a shorter selector lost, and the back stood over the title */
|
|
334
334
|
.sheet-stack--tap > .card.is-open > .head:has(> .sheet-stack__back--end) > .stack-sheet__tabs { margin-right: 0; }
|
|
335
335
|
.sheet-stack--tap .sheet-stack__back > .icon { --icon-size: var(--stack-back-icon, calc(var(--tap-base) * 13 / 24)); } /* 26: the chevron fills the small disc (Lh 2026-09-23) */
|
|
336
336
|
.sheet-stack--tap .sheet-stack__back::after { content: ""; position: absolute; inset: calc((var(--_back-size) - var(--tap-sm)) / 2); }
|
package/css/theme.template.css
CHANGED
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
/* a member's text-size setting is this same --fs-base, written on <html> by the app at run time (1.375rem = 100%, 2.2rem = 160%) — the words and the form controls grow, the other things half as much */
|
|
31
31
|
|
|
32
32
|
/* ---- faces ---- */
|
|
33
|
-
--font-ui: "
|
|
34
|
-
--font-display:
|
|
33
|
+
--font-ui: "Noto Sans", "Noto Sans Thai Looped", var(--font-fallback);
|
|
34
|
+
--font-display: var(--font-ui);
|
|
35
35
|
|
|
36
36
|
/* ---- colour: five bases, the roles derive (tone 2, the muted inks, the tints) ----
|
|
37
37
|
No default — unset = the wireframe. With colours of your own, put the page in coloured mode:
|
package/css/tokens.css
CHANGED
|
@@ -200,8 +200,9 @@
|
|
|
200
200
|
--_cover-min-h: 22.5rem; /* .card--cover's min-height; --postcard-min-h falls back to it (media.css) */
|
|
201
201
|
|
|
202
202
|
/* ---- typography: one scale, rem so it follows the root ---- */
|
|
203
|
-
--font-
|
|
204
|
-
--font-
|
|
203
|
+
--font-fallback: "Noto Sans Lao Looped", "Lao Sangam MN", "Noto Sans Khmer", "Khmer Sangam MN", "Noto Sans Myanmar", "Myanmar Sangam MN", "Noto Sans Devanagari", "Kohinoor Devanagari", "Noto Sans Hebrew", "Arial Hebrew", "Noto Sans Arabic", "Geeza Pro", "PingFang SC", "Hiragino Sans", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", "Yu Gothic", "Apple SD Gothic Neo", "Malgun Gothic", -apple-system, system-ui, sans-serif; /* scripts cardds does not ship (fonts.css ships Thai, Latin, Latin-ext, Vietnamese, Cyrillic, Greek): the system face that draws them, per script, then the system default */
|
|
204
|
+
--font-ui: "Noto Sans", "Noto Sans Thai Looped", var(--font-fallback); /* fonts.css ships it, variable weight 100–900 */
|
|
205
|
+
--font-display: var(--font-ui); /* the same family: headings and big numbers are its heavy weights (700 · 800 · 900) */
|
|
205
206
|
--font-mono: "SF Mono", "JetBrains Mono", ui-monospace, monospace;
|
|
206
207
|
|
|
207
208
|
/* THE SCALE (Lh 2026-09-22): 7 sizes for 16 jobs — a size is a job's fit, not a rung; jobs share sizes.
|
|
@@ -226,7 +227,7 @@
|
|
|
226
227
|
|
|
227
228
|
/* TYPE (Lh 2026-10-20: every kind and every size has its tokens; a component writes no type value of its own).
|
|
228
229
|
THE SCALES: weight and leading, each step named once. A kind below picks a step of each; a piece that needs a step alone reads it. */
|
|
229
|
-
--fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-strong: 650; --fw-bold: 700; --fw-heavy: 800; --fw-black: 900;
|
|
230
|
+
--fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-strong: 650; --fw-bold: 700; --fw-heavy: 800; --fw-black: 900; /* every step is a real weight of the shipped faces (fonts.css): the body face is variable 100–900, the display face has 500 · 700 · 800 · 900 — a step the faces lack would be faked by the browser */
|
|
230
231
|
--lh-mark: 0.55; /* a quotation mark three lines tall, set into the first line */
|
|
231
232
|
--lh-band: 0.9; /* a data band's giant number */
|
|
232
233
|
--lh-badge: 0.95; /* a date box's two lines (JourneyBadge) */
|
|
@@ -244,7 +245,7 @@
|
|
|
244
245
|
--glyph-rise: 0.2em;
|
|
245
246
|
--glyph-drop: 0.15em;
|
|
246
247
|
/* THE EIGHT KINDS: each has its face, weight, size (--fs-* above), leading and tracking, and its style --type-<kind> is made of them */
|
|
247
|
-
--fw-display: var(--fw-heavy); --lh-display: 1.15; --track-display: -0.02em; /* leading: Thai marks stack to 1.1em up and 0.3em down
|
|
248
|
+
--fw-display: var(--fw-heavy); --lh-display: 1.15; --track-display: -0.02em; /* leading: Thai marks stack to 1.1em up and 0.3em down — 1.02 clipped them (2026-09-10) */
|
|
248
249
|
--fw-h1: var(--fw-black); --lh-h1: 1.15; --track-h1: -0.015em; /* tight, the display's floor: a stacked mark (1.13em up) clears the line above (Lh 2026-10-25: 1.2 read loose) */
|
|
249
250
|
--fw-h2: var(--fw-bold); --lh-h2: 1.25; --track-h2: -0.01em;
|
|
250
251
|
--fw-title: var(--fw-strong); --lh-title: 1.3; --track-title: normal;
|
package/dist/cardds.css
CHANGED
|
@@ -1,41 +1,70 @@
|
|
|
1
1
|
/* cardds — card-first mobile design system. One import. */
|
|
2
|
-
/* ---- css/fonts.css — the
|
|
2
|
+
/* ---- css/fonts.css — the Noto Sans family: Thai Looped + Latin, Latin-ext, Vietnamese, Cyrillic, Greek ---- */
|
|
3
3
|
/* ============================================================
|
|
4
|
-
cardds/fonts.css —
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
cardds/fonts.css — ONE family, the Noto Sans family (Lh, 2026-10-29): the
|
|
5
|
+
industry-standard face with the widest script coverage, drawn as one design,
|
|
6
|
+
SIL OFL 1.1. Every weight the scale asks for (400 · 500 · 600 · 650 · 700 ·
|
|
7
|
+
800 · 900) is a real master of a variable 100–900 axis, never a browser-made
|
|
8
|
+
bold; the display role is the same family at its heavy weights, so a line of
|
|
9
|
+
Thai, Vietnamese, Latin, Cyrillic or Greek speaks with one voice.
|
|
10
|
+
Shipped scripts: Thai (Noto Sans Thai Looped), Latin, Latin-ext, Vietnamese,
|
|
11
|
+
Cyrillic, Greek (Noto Sans) — each its own woff2, joined by unicode-range, so a page
|
|
12
|
+
downloads only the scripts it draws. Every other script (Lao, Khmer, Myanmar,
|
|
13
|
+
Chinese, Japanese, Korean, Arabic, Hebrew, Devanagari...) falls to the system
|
|
14
|
+
face named in --font-fallback (tokens.css); no CJK file ships. Licences: fonts/LICENSES.md.
|
|
15
|
+
Vertical metrics are the files' own, no ascent / descent / line-gap override: Noto Sans Thai Looped
|
|
16
|
+
1.25 up / 0.35 down (its stacked marks reach 1.11 up, lower vowels 0.31 down), Noto Sans 1.069 / 0.293
|
|
17
|
+
(Vietnamese marks 1.05 up), line gap 0 in both, USE_TYPO_METRICS set, so every platform reads the same box.
|
|
10
18
|
tokens.css points --font-ui and --font-display at these; a consumer who
|
|
11
19
|
vendors the CSS copies fonts/ beside it (the url()s are ../fonts/).
|
|
12
20
|
============================================================ */
|
|
13
21
|
@font-face {
|
|
14
|
-
font-family: "
|
|
15
|
-
src: url("../fonts/
|
|
16
|
-
font-weight:
|
|
22
|
+
font-family: "Noto Sans Thai Looped";
|
|
23
|
+
src: url("../fonts/noto-sans-thai-looped/thai.woff2") format("woff2");
|
|
24
|
+
font-weight: 100 900;
|
|
25
|
+
font-style: normal;
|
|
26
|
+
font-display: swap;
|
|
27
|
+
unicode-range: U+0E01-0E5B, U+200C-200D, U+25CC, U+02D7, U+0303, U+0331;
|
|
28
|
+
}
|
|
29
|
+
@font-face {
|
|
30
|
+
font-family: "Noto Sans";
|
|
31
|
+
src: url("../fonts/noto-sans/latin.woff2") format("woff2");
|
|
32
|
+
font-weight: 100 900;
|
|
33
|
+
font-style: normal;
|
|
34
|
+
font-display: swap;
|
|
35
|
+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
36
|
+
}
|
|
37
|
+
@font-face {
|
|
38
|
+
font-family: "Noto Sans";
|
|
39
|
+
src: url("../fonts/noto-sans/latin-ext.woff2") format("woff2");
|
|
40
|
+
font-weight: 100 900;
|
|
41
|
+
font-style: normal;
|
|
42
|
+
font-display: swap;
|
|
43
|
+
unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
|
|
44
|
+
}
|
|
45
|
+
@font-face {
|
|
46
|
+
font-family: "Noto Sans";
|
|
47
|
+
src: url("../fonts/noto-sans/vietnamese.woff2") format("woff2");
|
|
48
|
+
font-weight: 100 900;
|
|
49
|
+
font-style: normal;
|
|
50
|
+
font-display: swap;
|
|
51
|
+
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB;
|
|
52
|
+
}
|
|
53
|
+
@font-face {
|
|
54
|
+
font-family: "Noto Sans";
|
|
55
|
+
src: url("../fonts/noto-sans/cyrillic.woff2") format("woff2");
|
|
56
|
+
font-weight: 100 900;
|
|
17
57
|
font-style: normal;
|
|
18
58
|
font-display: swap;
|
|
19
|
-
|
|
20
|
-
lower vowels 0.30em down (measured; the face declares 0.92 / 0.30 + gap) */
|
|
21
|
-
ascent-override: 102%;
|
|
22
|
-
descent-override: 30%;
|
|
23
|
-
line-gap-override: 0%;
|
|
59
|
+
unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
|
|
24
60
|
}
|
|
25
61
|
@font-face {
|
|
26
|
-
font-family: "
|
|
27
|
-
src: url("../fonts/
|
|
62
|
+
font-family: "Noto Sans";
|
|
63
|
+
src: url("../fonts/noto-sans/greek.woff2") format("woff2");
|
|
28
64
|
font-weight: 100 900;
|
|
29
65
|
font-style: normal;
|
|
30
66
|
font-display: swap;
|
|
31
|
-
|
|
32
|
-
reaches 1.10em and สระอู 0.29em — override so the line box centres the
|
|
33
|
-
ink and a clipped heading loses the same hair top and bottom, not the
|
|
34
|
-
whole lower vowel. With the leading in tokens.css this is 0.075em a side
|
|
35
|
-
at h2; the clipped containers pad that back (card.css, actions.css) */
|
|
36
|
-
ascent-override: 110%;
|
|
37
|
-
descent-override: 30%;
|
|
38
|
-
line-gap-override: 0%;
|
|
67
|
+
unicode-range: U+0370-0377, U+037A-037F, U+0384-038A, U+038C, U+038E-03A1, U+03A3-03FF;
|
|
39
68
|
}
|
|
40
69
|
|
|
41
70
|
/* ---- css/tokens.css — structure + wireframe defaults ---- */
|
|
@@ -241,8 +270,9 @@
|
|
|
241
270
|
--_cover-min-h: 22.5rem; /* .card--cover's min-height; --postcard-min-h falls back to it (media.css) */
|
|
242
271
|
|
|
243
272
|
/* ---- typography: one scale, rem so it follows the root ---- */
|
|
244
|
-
--font-
|
|
245
|
-
--font-
|
|
273
|
+
--font-fallback: "Noto Sans Lao Looped", "Lao Sangam MN", "Noto Sans Khmer", "Khmer Sangam MN", "Noto Sans Myanmar", "Myanmar Sangam MN", "Noto Sans Devanagari", "Kohinoor Devanagari", "Noto Sans Hebrew", "Arial Hebrew", "Noto Sans Arabic", "Geeza Pro", "PingFang SC", "Hiragino Sans", "Hiragino Sans GB", "Noto Sans CJK SC", "Microsoft YaHei", "Yu Gothic", "Apple SD Gothic Neo", "Malgun Gothic", -apple-system, system-ui, sans-serif; /* scripts cardds does not ship (fonts.css ships Thai, Latin, Latin-ext, Vietnamese, Cyrillic, Greek): the system face that draws them, per script, then the system default */
|
|
274
|
+
--font-ui: "Noto Sans", "Noto Sans Thai Looped", var(--font-fallback); /* fonts.css ships it, variable weight 100–900 */
|
|
275
|
+
--font-display: var(--font-ui); /* the same family: headings and big numbers are its heavy weights (700 · 800 · 900) */
|
|
246
276
|
--font-mono: "SF Mono", "JetBrains Mono", ui-monospace, monospace;
|
|
247
277
|
|
|
248
278
|
/* THE SCALE (Lh 2026-09-22): 7 sizes for 16 jobs — a size is a job's fit, not a rung; jobs share sizes.
|
|
@@ -267,7 +297,7 @@
|
|
|
267
297
|
|
|
268
298
|
/* TYPE (Lh 2026-10-20: every kind and every size has its tokens; a component writes no type value of its own).
|
|
269
299
|
THE SCALES: weight and leading, each step named once. A kind below picks a step of each; a piece that needs a step alone reads it. */
|
|
270
|
-
--fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-strong: 650; --fw-bold: 700; --fw-heavy: 800; --fw-black: 900;
|
|
300
|
+
--fw-regular: 400; --fw-medium: 500; --fw-semibold: 600; --fw-strong: 650; --fw-bold: 700; --fw-heavy: 800; --fw-black: 900; /* every step is a real weight of the shipped faces (fonts.css): the body face is variable 100–900, the display face has 500 · 700 · 800 · 900 — a step the faces lack would be faked by the browser */
|
|
271
301
|
--lh-mark: 0.55; /* a quotation mark three lines tall, set into the first line */
|
|
272
302
|
--lh-band: 0.9; /* a data band's giant number */
|
|
273
303
|
--lh-badge: 0.95; /* a date box's two lines (JourneyBadge) */
|
|
@@ -285,7 +315,7 @@
|
|
|
285
315
|
--glyph-rise: 0.2em;
|
|
286
316
|
--glyph-drop: 0.15em;
|
|
287
317
|
/* THE EIGHT KINDS: each has its face, weight, size (--fs-* above), leading and tracking, and its style --type-<kind> is made of them */
|
|
288
|
-
--fw-display: var(--fw-heavy); --lh-display: 1.15; --track-display: -0.02em; /* leading: Thai marks stack to 1.1em up and 0.3em down
|
|
318
|
+
--fw-display: var(--fw-heavy); --lh-display: 1.15; --track-display: -0.02em; /* leading: Thai marks stack to 1.1em up and 0.3em down — 1.02 clipped them (2026-09-10) */
|
|
289
319
|
--fw-h1: var(--fw-black); --lh-h1: 1.15; --track-h1: -0.015em; /* tight, the display's floor: a stacked mark (1.13em up) clears the line above (Lh 2026-10-25: 1.2 read loose) */
|
|
290
320
|
--fw-h2: var(--fw-bold); --lh-h2: 1.25; --track-h2: -0.01em;
|
|
291
321
|
--fw-title: var(--fw-strong); --lh-title: 1.3; --track-title: normal;
|
|
@@ -1970,7 +2000,7 @@ button:enabled { cursor: pointer; } /* a disabled one keeps the arrow */
|
|
|
1970
2000
|
|
|
1971
2001
|
/* AT THE END (Lh 2026-09-29, the home): after the tabs, chevron down — the open sheet folds down. The head's end gives it its room
|
|
1972
2002
|
while open; the last tab then sits on the inset (no reach into the padding) */
|
|
1973
|
-
.sheet-stack--tap .sheet-stack__back--end { left: auto; right: 0; }
|
|
2003
|
+
:is(.sheet-stack--tap > .card, .sheet-stack--tap > :not(.card, .sheet-stack__base) > .card) > .head > .sheet-stack__back--end { left: auto; right: 0; } /* as specific as the rule that sets it at the start (above), so it wins: a shorter selector lost, and the back stood over the title */
|
|
1974
2004
|
.sheet-stack--tap > .card.is-open > .head:has(> .sheet-stack__back--end) > .stack-sheet__tabs { margin-right: 0; }
|
|
1975
2005
|
.sheet-stack--tap .sheet-stack__back > .icon { --icon-size: var(--stack-back-icon, calc(var(--tap-base) * 13 / 24)); } /* 26: the chevron fills the small disc (Lh 2026-09-23) */
|
|
1976
2006
|
.sheet-stack--tap .sheet-stack__back::after { content: ""; position: absolute; inset: calc((var(--_back-size) - var(--tap-sm)) / 2); }
|
|
@@ -4246,7 +4276,7 @@ button.calendar__label:focus-visible { outline: var(--focus); outline-offset: va
|
|
|
4246
4276
|
/* the eye centres the INK, not the line box: a letter that stands on the
|
|
4247
4277
|
baseline (ก) has no descender, while the face's box keeps 0.30em under it
|
|
4248
4278
|
(fonts.css) — so the ink lands low when the box is centred; lifted 0.15em
|
|
4249
|
-
(set by eye with Lh on
|
|
4279
|
+
(set by eye with Lh on the display face at h2, 2026-09-12) */
|
|
4250
4280
|
translate: -50% -0.15em;
|
|
4251
4281
|
display: grid;
|
|
4252
4282
|
place-items: center;
|
|
@@ -4399,7 +4429,14 @@ button.calendar__label:focus-visible { outline: var(--focus); outline-offset: va
|
|
|
4399
4429
|
<div class="bubble"><p class="bubble__body">…</p><span class="bubble__meta">Dec 4 · 8:15</span></div>
|
|
4400
4430
|
<div class="bubble bubble--right">…</div>
|
|
4401
4431
|
</div> */
|
|
4402
|
-
.thread { display: grid; gap: var(--thread-gap, var(--sp-4)); }
|
|
4432
|
+
.thread { display: grid; gap: var(--thread-gap, var(--sp-4)); padding-bottom: var(--thread-end-size, var(--sp-4)); }
|
|
4433
|
+
/* the jump to the last words (Thread, Lh 2026-10-29): a row of no height at the thread's end, stuck to the scroller's bottom edge;
|
|
4434
|
+
the round Btn hangs up from it at the end corner while the reader is away from the end */
|
|
4435
|
+
.thread__end { position: sticky; bottom: 0; height: 0; margin-top: calc(-1 * var(--thread-gap, var(--sp-4))); display: grid; justify-items: end; z-index: 1; }
|
|
4436
|
+
.thread__jump { translate: 0 calc(-100% - var(--thread-jump-at, var(--sp-3))); }
|
|
4437
|
+
.bubble__author + *::before { content: "·"; margin-inline-end: var(--bubble-meta-gap, var(--sp-1)); }
|
|
4438
|
+
.bubble__author:has(+ *) { margin-inline-end: var(--bubble-meta-gap, var(--sp-1)); }
|
|
4439
|
+
.bubble__day:has(+ *) { margin-inline-end: var(--bubble-meta-gap, var(--sp-1)); } /* the day, then the time: "Dec 4 8:15" */
|
|
4403
4440
|
/* one column: the message (max-content, but it gives way — minmax(0) — so a long one shrinks and wraps); the meta under it */
|
|
4404
4441
|
.bubble {
|
|
4405
4442
|
display: grid;
|
|
@@ -4501,16 +4538,16 @@ a.bubble { color: inherit; text-decoration: none; }
|
|
|
4501
4538
|
.link:disabled { color: var(--link-disabled-ink, var(--card-muted)); cursor: default; } /* inactive = muted (a Countdown) */
|
|
4502
4539
|
.link--wait { font-variant-numeric: tabular-nums; } /* the countdown's digits keep their width: the words do not jiggle each second */
|
|
4503
4540
|
/* an icon in a link FILLS the line of the link's words, judged by the X (Lh 2026-10-25), centred on the words' body band, whatever `size`
|
|
4504
|
-
the app gave it, through the Icon's own knobs. The numbers,
|
|
4505
|
-
|
|
4506
|
-
centre 0.
|
|
4507
|
-
the pencil about 22. The box is 0.8em: the X then draws 0.8 × 14/24 = 0.47em,
|
|
4541
|
+
the app gave it, through the Icon's own knobs. The numbers, measured on the face the link sets (--type-label → --font-ui, Noto Sans Thai
|
|
4542
|
+
Looped, 1000 units/em): a Thai consonant body (ก ข น ด ค า) tops at 566 units = 0.566em, so the band runs from the baseline to 0.566em, its
|
|
4543
|
+
centre 0.28em up; Thai upper vowels reach 0.83–0.93em (ำ ไ). In its 24-unit box the `x` draws only 14 (6–18 and its stroke),
|
|
4544
|
+
the pencil about 22. The box is 0.8em: the X then draws 0.8 × 14/24 = 0.47em, 83% of the body; the pencil 0.73em, its tip 0.63em up,
|
|
4508
4545
|
still under the upper vowels' line (a larger box puts the X closer to the body but stands the pencil over the words). Never `ex` (it
|
|
4509
4546
|
follows whichever face answered) nor `cap` (not on iOS 16.4). Baseline alignment puts the box's bottom (an svg's baseline) on the words'
|
|
4510
|
-
baseline; `translate` lowers it by half the box less 0.
|
|
4547
|
+
baseline; `translate` lowers it by half the box less 0.28em, so the box's centre — where a stock icon is drawn about — is the band's
|
|
4511
4548
|
centre: translate, because it moves only the drawing and leaves the line's box and its centring alone. Baseline-aligned items sit at
|
|
4512
4549
|
the top of their line, so the link wraps (one line still) and centres that line in its min-height box with align-content; the gap kept */
|
|
4513
|
-
.link > .icon { --icon-size: var(--link-icon-size, 0.8em); --icon-xs-size: var(--icon-size); --icon-sm-size: var(--icon-size); --icon-lg-size: var(--icon-size); translate: 0 calc(var(--icon-size) / 2 - 0.
|
|
4550
|
+
.link > .icon { --icon-size: var(--link-icon-size, 0.8em); --icon-xs-size: var(--icon-size); --icon-sm-size: var(--icon-size); --icon-lg-size: var(--icon-size); translate: 0 calc(var(--icon-size) / 2 - 0.28em); }
|
|
4514
4551
|
.link:has(> .icon) { flex-wrap: wrap; align-items: baseline; align-content: center; }
|
|
4515
4552
|
|
|
4516
4553
|
/* ---- bullets: a list, each item led by a small square picture as tall as a line of its words (Lh 2026-09-28, timebank #153) ----
|
|
@@ -4607,6 +4644,9 @@ a.bubble { color: inherit; text-decoration: none; }
|
|
|
4607
4644
|
min-height: var(--head-min-h, auto);
|
|
4608
4645
|
}
|
|
4609
4646
|
.head--top { align-items: flex-start; }
|
|
4647
|
+
/* `Head variant="status"`: the tag at the left and the end at the far right on the first row, the status words (the meta, a plain line, never a heading)
|
|
4648
|
+
under both in the caption's weight and muted ink. The UI face ships weights 400 and 500 only: a heavier one is the browser's fake bold, so no bolder look */
|
|
4649
|
+
.head--status > .words__meta { font: var(--head-status-font, var(--type-caption)); color: var(--head-status-ink, var(--card-muted)); }
|
|
4610
4650
|
|
|
4611
4651
|
/* ---- the card skeleton: head · content · foot ----
|
|
4612
4652
|
Every card is a head (the heading left, hints / actions / a more-menu at
|
|
@@ -4617,8 +4657,9 @@ a.bubble { color: inherit; text-decoration: none; }
|
|
|
4617
4657
|
heading (or the div that wraps it) is that leading child: a control that
|
|
4618
4658
|
leads a custom head — a chip, an avatar, a tile badge — keeps its own
|
|
4619
4659
|
width, else the rule stretched a chip into a bar and an avatar into an
|
|
4620
|
-
ellipse (two agents and the wallet demo caught it, 2026-09-10).
|
|
4621
|
-
|
|
4660
|
+
ellipse (two agents and the wallet demo caught it, 2026-09-10). The title takes the room wherever its variant stands it (after a date
|
|
4661
|
+
with no chips, after a stack sheet's back), never only as the first child (2026-10-29, the head's variants). */
|
|
4662
|
+
.head > :is(h1, h2, h3, div, p):first-child, .head > :is(.words__title, .words__over-title) { flex: 1; min-width: 0; }
|
|
4622
4663
|
|
|
4623
4664
|
/* Skeleton head — the heading in a card's OWN head, and only there.
|
|
4624
4665
|
The heading wraps, no squeeze, up to three lines and cut there with an
|
|
@@ -4688,8 +4729,7 @@ a.bubble { color: inherit; text-decoration: none; }
|
|
|
4688
4729
|
/* a head that LEADS with a date (Lh 2026-10-21, timebank's request card): a `Head` whose first child is a JourneyBadge and whose second is a
|
|
4689
4730
|
ChipRow. The date stands at the left and the chips beside it, the two as tall as each other; the heading and its caption take the whole
|
|
4690
4731
|
width under them, so the heading sits right over the words of the middle. The date is always as tall as the chips. The gap under the date row is --head-lead-gap; the date and the chips place themselves (journey.css, actions.css).
|
|
4691
|
-
Everything after the chips stands on rows of its own under them, in the order given
|
|
4692
|
-
pinned at the right beside both lines (stamp.css) and so lay over the date (Lh 2026-10-23).
|
|
4732
|
+
Everything after the chips stands on rows of its own under them, in the order given.
|
|
4693
4733
|
<div class="head"><span class="tile-badge tile-badge--stretch">…</span><div class="chip-row">…</div><div><h2 class="words__title t-h1">…</h2>…</div></div> */
|
|
4694
4734
|
.head:has(> .tile-badge:first-child + .chip-row) {
|
|
4695
4735
|
display: grid;
|
|
@@ -4862,7 +4902,7 @@ a.bubble { color: inherit; text-decoration: none; }
|
|
|
4862
4902
|
waits, and starts again from the first letter — like a song title. The head's line clamp (above) already cuts it, so no overflow is set here */
|
|
4863
4903
|
.stack-sheet > .head > .words__title {
|
|
4864
4904
|
flex: 1; min-width: 0; white-space: nowrap; overflow-wrap: normal;
|
|
4865
|
-
translate: 0 var(--stack-sheet-title-shift, -0.1em); /*
|
|
4905
|
+
translate: 0 var(--stack-sheet-title-shift, -0.1em); /* The display face's line box carries more room above its letters than below: the
|
|
4866
4906
|
letters sat ~0.1em under the middle of the back disc and the tabs — lifted onto it (Lh 2026-09-24) */
|
|
4867
4907
|
}
|
|
4868
4908
|
@media (prefers-reduced-motion: reduce) {
|
package/dist/cards/Card.js
CHANGED
|
@@ -3,6 +3,7 @@ import { Children, createElement, isValidElement, useEffect, useLayoutEffect, us
|
|
|
3
3
|
import { cx } from '../cx.js';
|
|
4
4
|
import { useControlled, useLatest, warnOnce } from '../state.js';
|
|
5
5
|
import { Head } from '../parts/Head.js';
|
|
6
|
+
import { HeadCloseCtx } from '../parts/headCtx.js';
|
|
6
7
|
import { Foot } from '../parts/Foot.js';
|
|
7
8
|
import { goControl, onControl } from './cardGo.js';
|
|
8
9
|
import { Icon } from '../type/Icon.js';
|
|
@@ -121,7 +122,7 @@ export function Card({ tone, paper, sm, row, cover, fold, centre, wide, band, as
|
|
|
121
122
|
if (!stack.open && !stack.before && !stack.after)
|
|
122
123
|
stack.onOpen();
|
|
123
124
|
};
|
|
124
|
-
const inner = (body) => (_jsx(StackHeadCtx.Provider, { value: stack ? (stack.before || stack.after ? -1 : 0) : null, children: _jsx(StackPullCtx.Provider, { value: pulling, children: body }) }));
|
|
125
|
+
const inner = (body) => (_jsx(StackHeadCtx.Provider, { value: stack ? (stack.before || stack.after ? -1 : 0) : null, children: _jsx(StackPullCtx.Provider, { value: pulling, children: _jsx(HeadCloseCtx.Provider, { value: null, children: body }) }) }));
|
|
125
126
|
const props = {
|
|
126
127
|
...rest,
|
|
127
128
|
ref: setRef,
|
package/dist/cards/CardFeed.js
CHANGED
|
@@ -3,7 +3,6 @@ import { Children, createContext, isValidElement, useContext, useEffect, useId,
|
|
|
3
3
|
import { cx } from '../cx.js';
|
|
4
4
|
import { glide, reducedMotion, setRefs, sheetMs, stopMoves, useControlled, warnOnce } from '../state.js';
|
|
5
5
|
import { Card } from './Card.js';
|
|
6
|
-
import { Head } from '../parts/Head.js';
|
|
7
6
|
import { Foot } from '../parts/Foot.js';
|
|
8
7
|
import { Lead } from '../parts/Lead.js';
|
|
9
8
|
import { Icon } from '../type/Icon.js';
|
|
@@ -120,5 +119,5 @@ export function FeedCard({ id, heading, caption, icon, lead, tone, foot, classNa
|
|
|
120
119
|
byKey.current = e.detail === 0;
|
|
121
120
|
feed.grow(id);
|
|
122
121
|
} }, onKeyDown: (e) => { onKeyDown?.(e); if (small && !e.defaultPrevented)
|
|
123
|
-
onSmallKey(e); }, children: [_jsxs(
|
|
122
|
+
onSmallKey(e); }, children: [_jsxs("div", { className: "head", children: [lead != null ? _jsx("span", { className: "feed-card__lead", children: lead }) : icon && _jsx(Lead, { children: _jsx(Icon, { name: icon, size: "sm" }) }), _jsx(Text, { level: "h2", id: name, children: heading }), caption != null && _jsx(Text, { level: "caption", muted: true, children: caption })] }), _jsx("div", { className: "feed-card__more", inert: small, children: _jsxs("div", { className: "feed-card__rest", children: [children, foot != null && _jsx(Foot, { children: foot })] }) })] }));
|
|
124
123
|
}
|