From 8018268821fdc40f03d46015232cc1e8ea6af3c8 Mon Sep 17 00:00:00 2001 From: mnovak Date: Mon, 23 Nov 2026 00:59:50 +0100 Subject: [PATCH] [ui] DomiUi: Rosea's buttons and town search on @domi/ui v1.0.4 (CPAL-1.0, vendored by its own tool into packages/domi-ui), the licence credit at the foot of every screen, the README's copy line and public-domain sources; before-and-after pictures by pnpm look:shots --- .agents/FEATURES.md | 1 + .agents/features/domi-ui.md | 79 + .agents/reviews/feature-domi-ui.md | 97 + .gitignore | 2 + HANDOVER.md | 16 +- README.md | 16 +- apps/rosea-tauri/src-tauri/tauri.conf.json | 1 + apps/rosea/index.html | 2 +- e2e/look.spec.ts | 90 + e2e/playwright.look.config.ts | 19 + e2e/shell.spec.ts | 3 +- eslint.config.mjs | 4 +- package.json | 1 + packages/domi-ui/CHANGELOG.md | 52 + packages/domi-ui/LICENSE | 168 + packages/domi-ui/NOTICE | 11 + packages/domi-ui/VERSION | 1 + packages/domi-ui/package.json | 37 + packages/domi-ui/src/components/Button.svelte | 151 + .../domi-ui/src/components/Checkbox.svelte | 59 + .../domi-ui/src/components/DomiCredit.svelte | 21 + packages/domi-ui/src/components/Icon.svelte | 22 + packages/domi-ui/src/components/Radio.svelte | 39 + .../domi-ui/src/components/Segmented.svelte | 62 + packages/domi-ui/src/components/Select.svelte | 44 + packages/domi-ui/src/components/Strike.svelte | 6 + packages/domi-ui/src/components/Switch.svelte | 23 + .../domi-ui/src/components/TextField.svelte | 324 ++ packages/domi-ui/src/css/base.css | 229 ++ packages/domi-ui/src/css/components.css | 1032 ++++++ packages/domi-ui/src/css/domi.css | 8 + packages/domi-ui/src/css/fonts.css | 9 + packages/domi-ui/src/css/legacy/amicitia.css | 24 + packages/domi-ui/src/css/legacy/arca.css | 48 + packages/domi-ui/src/css/legacy/atrium.css | 48 + packages/domi-ui/src/css/legacy/aula.css | 21 + packages/domi-ui/src/css/legacy/calenda.css | 22 + packages/domi-ui/src/css/legacy/culina.css | 48 + packages/domi-ui/src/css/legacy/custos.css | 48 + .../domi-ui/src/css/legacy/domi-office.css | 48 + packages/domi-ui/src/css/legacy/epistula.css | 48 + packages/domi-ui/src/css/legacy/fabrica.css | 48 + packages/domi-ui/src/css/legacy/famulus.css | 24 + packages/domi-ui/src/css/legacy/fiscus.css | 48 + .../domi-ui/src/css/legacy/fundamentum.css | 48 + packages/domi-ui/src/css/legacy/ianitor.css | 26 + packages/domi-ui/src/css/legacy/lapilli.css | 48 + packages/domi-ui/src/css/legacy/liber.css | 25 + packages/domi-ui/src/css/legacy/ludus.css | 21 + packages/domi-ui/src/css/legacy/medicus.css | 27 + packages/domi-ui/src/css/legacy/memoria.css | 20 + packages/domi-ui/src/css/legacy/pictor.css | 48 + packages/domi-ui/src/css/legacy/postea.css | 20 + packages/domi-ui/src/css/legacy/respicio.css | 23 + packages/domi-ui/src/css/legacy/tabula.css | 18 + packages/domi-ui/src/css/legacy/tectum.css | 24 + packages/domi-ui/src/css/tokens.css | 2783 +++++++++++++++++ packages/domi-ui/src/index.ts | 23 + packages/domi-ui/src/lib/credit.ts | 14 + packages/domi-ui/src/lib/icons.ts | 28 + packages/domi-ui/src/lib/keys.ts | 67 + packages/domi-ui/src/lib/strike.ts | 50 + packages/domi-ui/src/tokens/generated.ts | 1940 ++++++++++++ packages/domi-ui/src/types.ts | 15 + packages/ui/package.json | 1 + packages/ui/src/Shell.svelte | 50 +- packages/ui/src/copy/en.ts | 2 + packages/ui/src/rose/KeepSafe.svelte | 36 +- packages/ui/src/rose/Petal.svelte | 27 +- packages/ui/src/rose/Rose.svelte | 61 +- packages/ui/src/scene/GardenerChoice.svelte | 31 +- packages/ui/src/sunset/ChairSunset.svelte | 39 +- packages/ui/src/sunset/SunsetPlace.svelte | 70 +- packages/ui/src/tokens.css | 10 + packages/ui/test/Shell.test.ts | 22 +- packages/ui/test/rose.test.ts | 5 +- packages/ui/test/said.ts | 12 + packages/ui/test/sunset.test.ts | 5 +- pnpm-lock.yaml | 33 + 79 files changed, 8554 insertions(+), 222 deletions(-) create mode 100644 .agents/features/domi-ui.md create mode 100644 .agents/reviews/feature-domi-ui.md create mode 100644 e2e/look.spec.ts create mode 100644 e2e/playwright.look.config.ts create mode 100644 packages/domi-ui/CHANGELOG.md create mode 100644 packages/domi-ui/LICENSE create mode 100644 packages/domi-ui/NOTICE create mode 100644 packages/domi-ui/VERSION create mode 100644 packages/domi-ui/package.json create mode 100644 packages/domi-ui/src/components/Button.svelte create mode 100644 packages/domi-ui/src/components/Checkbox.svelte create mode 100644 packages/domi-ui/src/components/DomiCredit.svelte create mode 100644 packages/domi-ui/src/components/Icon.svelte create mode 100644 packages/domi-ui/src/components/Radio.svelte create mode 100644 packages/domi-ui/src/components/Segmented.svelte create mode 100644 packages/domi-ui/src/components/Select.svelte create mode 100644 packages/domi-ui/src/components/Strike.svelte create mode 100644 packages/domi-ui/src/components/Switch.svelte create mode 100644 packages/domi-ui/src/components/TextField.svelte create mode 100644 packages/domi-ui/src/css/base.css create mode 100644 packages/domi-ui/src/css/components.css create mode 100644 packages/domi-ui/src/css/domi.css create mode 100644 packages/domi-ui/src/css/fonts.css create mode 100644 packages/domi-ui/src/css/legacy/amicitia.css create mode 100644 packages/domi-ui/src/css/legacy/arca.css create mode 100644 packages/domi-ui/src/css/legacy/atrium.css create mode 100644 packages/domi-ui/src/css/legacy/aula.css create mode 100644 packages/domi-ui/src/css/legacy/calenda.css create mode 100644 packages/domi-ui/src/css/legacy/culina.css create mode 100644 packages/domi-ui/src/css/legacy/custos.css create mode 100644 packages/domi-ui/src/css/legacy/domi-office.css create mode 100644 packages/domi-ui/src/css/legacy/epistula.css create mode 100644 packages/domi-ui/src/css/legacy/fabrica.css create mode 100644 packages/domi-ui/src/css/legacy/famulus.css create mode 100644 packages/domi-ui/src/css/legacy/fiscus.css create mode 100644 packages/domi-ui/src/css/legacy/fundamentum.css create mode 100644 packages/domi-ui/src/css/legacy/ianitor.css create mode 100644 packages/domi-ui/src/css/legacy/lapilli.css create mode 100644 packages/domi-ui/src/css/legacy/liber.css create mode 100644 packages/domi-ui/src/css/legacy/ludus.css create mode 100644 packages/domi-ui/src/css/legacy/medicus.css create mode 100644 packages/domi-ui/src/css/legacy/memoria.css create mode 100644 packages/domi-ui/src/css/legacy/pictor.css create mode 100644 packages/domi-ui/src/css/legacy/postea.css create mode 100644 packages/domi-ui/src/css/legacy/respicio.css create mode 100644 packages/domi-ui/src/css/legacy/tabula.css create mode 100644 packages/domi-ui/src/css/legacy/tectum.css create mode 100644 packages/domi-ui/src/css/tokens.css create mode 100644 packages/domi-ui/src/index.ts create mode 100644 packages/domi-ui/src/lib/credit.ts create mode 100644 packages/domi-ui/src/lib/icons.ts create mode 100644 packages/domi-ui/src/lib/keys.ts create mode 100644 packages/domi-ui/src/lib/strike.ts create mode 100644 packages/domi-ui/src/tokens/generated.ts create mode 100644 packages/domi-ui/src/types.ts create mode 100644 packages/ui/test/said.ts diff --git a/.agents/FEATURES.md b/.agents/FEATURES.md index 57159d0..89c6474 100644 --- a/.agents/FEATURES.md +++ b/.agents/FEATURES.md @@ -6,6 +6,7 @@ One row per feature, with its analysis document (CLAUDE.md §5.1). Gaps live in | Feature | Phase | Status | Analysis | Review | |:--|:--|:--|:--|:--| | Released through Fabrica: `.fabrica/` (app, release and e2e pipelines, tests, Aula pictures), the Aula page's words, the version check, the APK signed in Custos, `domi-rosea://open` from the installer, the showcase pictures on demo data, the phone target | Platform track | Merged to `main` (9b8eb70). Not published: the first release waits for the author (G-F1, G6.1) | [fabrica-release.md](features/fabrica-release.md) | [feature-fabrica-release.md](reviews/feature-fabrica-release.md) | +| @domi/ui: the shared buttons and the town search field, vendored v1.0.4 (CPAL-1.0); the licence credit at the foot of every screen | Platform track | Built on `feature/domi-ui`; the look is Mark's to judge from the pictures | [domi-ui.md](features/domi-ui.md) | [feature-domi-ui.md](reviews/feature-domi-ui.md) | | Atrium Domi adoption: the inventory (Tauri calls, data, network, accent, icon) and the plan for steps 1–8 of Atrium's Appendix A | Platform track | Plan merged (f4efc9e); step 1 = `domi-app.toml` alone (`feature/atrium-door`), the door skipped by Mark's ruling | [atrium-adoption.md](features/atrium-adoption.md) | [docs-atrium-adoption.md](reviews/docs-atrium-adoption.md), [feature-atrium-door.md](reviews/feature-atrium-door.md) | | The APK for a release, tested on the Wave 10 through the phone queue: `reset: uninstall`, `maxMinutes`, the e2e pipeline's `phone` step, the release APK built and verified | Platform track | Merged (f5d8d2c); the phone test passed on the Wave 10 through the queue, 1 of 1 (2026-11-21). Blocked: `rosea-android` does not exist (G-F7); publication (G-F1) | [android-release-apk.md](features/android-release-apk.md) | [feature-android-release-apk.md](reviews/feature-android-release-apk.md) | | Keep her safe in the apps: true words, Android's own save screen, the page kept between the system bars | Platform track | Merged to `main` 2026-11-17; built on this machine, not distributed. Closes G-T4 and, on Android, G-T5 | [keep-her-safe-apps.md](features/keep-her-safe-apps.md) | [feature-keep-her-safe-apps.md](reviews/feature-keep-her-safe-apps.md) | diff --git a/.agents/features/domi-ui.md b/.agents/features/domi-ui.md new file mode 100644 index 0000000..7d8ab9b --- /dev/null +++ b/.agents/features/domi-ui.md @@ -0,0 +1,79 @@ +# @domi/ui in Rosea: the shared buttons and the town search + +Status: built on `feature/domi-ui`, 2026-11-23. The brief was Mark's, passed on by the Aula session: adopt `@domi/ui`, +the Domi design system (`mnovak/domi-design`), at **v1.0.4** (CPAL-1.0 from v1.0.3). He chose **(a)**: Rosea may +carry a public copy. Her buttons +and her town search take the new look, and the search field gets *search*, never *send*. Review: +[`feature-domi-ui.md`](../reviews/feature-domi-ui.md). + +## 1. Why and what, in the player's terms + +Every Domi app now shares one set of controls: +- a struck plate for an ordinary action, and a gilded leaf for the one main action of a screen; +- a glint when pressed; +- at least 48 px under a finger. + +Rosea's buttons were her own: rounded outlines, plus underlined words for the quiet ones. They now wear the shared +plate in her own colours, and her town search becomes the shared field with a search seal. Nothing else changes: +- her colours, her system fonts, her art and her layout stay; +- what each button does stays; +- what she says stays. + +## 2. Technical architecture + +```mermaid +flowchart LR + subgraph vendored["packages/domi-ui = @domi/ui v1.0.4 (vendored, never edited)"] + btn["components/Button.svelte"] + tf["components/TextField.svelte"] + css["css/tokens + base + components"] + lib["lib/strike, keys, icons"] + end + script["domi-design tools/vendor.mjs"] -->|copies a CPAL tag| vendored + tokens["packages/ui/src/tokens.css"] -->|@import| css + rose["rose/*, scene/*, sunset/*, Shell"] --> btn & tf & lib + html["apps/rosea/index.html
data-domi-room=rosea, theme auto"] --> css +``` + +### Decisions + +| # | Decision | Why | +|:--|:--|:--| +| D1 | **A vendored copy as a workspace package**, `packages/domi-ui` (`"@domi/ui": "workspace:*"`). It is made only by the design system's own `node tools/vendor.mjs /packages/domi-ui v1.0.4`, which writes `src/` (css, components, lib, index.ts, types.ts, tokens/generated.ts), a `package.json` with no scripts, `LICENSE` (CPAL-1.0), `NOTICE` (the credit), `CHANGELOG.md` and `VERSION`, and refuses a tag that is not CPAL-1.0 (INTEGRATE.md §6a). It is never edited here. ESLint skips the folder. The three `@fontsource-variable` fonts arrive as its npm dependencies (OFL); Rosea never imports them, so none is bundled. | Rosea's repository is public and the design system's is private, so a public build cannot fetch it. Mark allowed the copy, under CPAL-1.0 from v1.0.3 (v1.0.2 was MPL-2.0 and is never used). A bump reruns the tool with the next tag. | +| D2 | **Rosea's buttons never hand `Button` a Promise.** Async handlers are called as `() => void save()`. | A Promise would make the button announce "Working" and "Done", the design system's English, not Rosea's copy (CLAUDE.md §7). Rosea's own status lines already speak. Its hidden status regions stay empty. | +| D3 | **Water, Touch her and *Move the chair* are the plate written as markup** (`class="domi-btn"`, `use:strike`), as INTEGRATE.md §3 allows. | `Button` sets its own `onkeydown` and `onblur` after the ones passed to it. That dropped the pour by a held Space and its stop on blur, and the rule that a held key is one touch (thorns.md T2); the unit tests caught it. *Move the chair* needs its element, so focus can come back after the sunset. | +| D4 | **The town search is `TextField`, `action="search"`,** with Rosea's label, a new seal name *Search towns*, and `sentText=""`. The list follows the typing as before, so the seal and Enter only confirm it. | Nothing is sent anywhere, so the seal never says *send*. `sentText=""` keeps the design system's "Searched" unsaid; the line *One town* already speaks. | +| D5 | **On the dusk scene the plate is recoloured locally**: evening glass, with the sunset's gold edge that Rosea's button had. | That scene is dusk in either theme. The room's light plate would be parchment on a night sky. | +| D6 | **Her system faces stay**: `--domi-font-hand` and `--domi-font-book` point at Rosea's own stacks. No font files are copied. | INTEGRATE.md §0.4; the font is Mark's open question in PALETTE.md. | +| D7 | `` | Her room's ground equals her current colours in both themes, and she follows the device, as before. | +| D9 | **The licence's credit** (CPAL-1.0 Exhibit B, for Rosea and for the copy): `Built on Domi · https://aula.marek-novak.cz · Copyright (c) 2026 Marek Novák`, in `--ink-soft` at 0.8 rem at the foot of every screen, from the first open on (the gardener, the garden, the Letter). It is the exact text of `DOMI_ATTRIBUTION_TEXT`, as plain text, **not** `DomiCredit`'s link. | INTEGRATE.md §6a and Mark ask for it in the interface. The garden is offline: a link opening a web page would carry the player out of her, and on Android, which has no internet, into a page that never loads. The plain form is the one §6a gives for a native window. CLAUDE.md says *Domi* never appears alone in public; this phrase is the licence's and Mark's own (review finding). | +| D8 | **Not converted:** the gardener's choices stay her own picture-chips, not `Radio`. The *Bring her back* file picker stays a `