[ui] DomiUi: @domi/ui v1.4.0: Water and Touch her are Button again (the handler fix from here), the credit is DomiCredit link={false}

This commit is contained in:
2026-11-23 02:31:50 +01:00
parent 7f8b6861f9
commit 87ca83cd1b
17 changed files with 213 additions and 60 deletions
+1 -1
View File
@@ -6,7 +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.2.0 (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) |
| @domi/ui: the shared buttons and the town search field, vendored v1.4.0 (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) |
+5 -5
View File
@@ -1,7 +1,7 @@
# @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.2.0** (CPAL-1.0 from v1.0.3). He chose **(a)**: Rosea may
the Domi design system (`mnovak/domi-design`), at **v1.4.0** (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).
@@ -23,7 +23,7 @@ plate in her own colours, and her town search becomes the shared field with a se
```mermaid
flowchart LR
subgraph vendored["packages/domi-ui = @domi/ui v1.2.0 (vendored, never edited)"]
subgraph vendored["packages/domi-ui = @domi/ui v1.4.0 (vendored, never edited)"]
btn["components/Button.svelte"]
tf["components/TextField.svelte"]
css["css/tokens + base + components"]
@@ -39,14 +39,14 @@ flowchart LR
| # | 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 <rosea>/packages/domi-ui v1.2.0`, 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. |
| 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 <rosea>/packages/domi-ui v1.4.0`, 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. |
| D3 | **Only *Move the chair* is the plate written as markup** (`class="domi-btn"`, `use:strike`), as INTEGRATE.md §3 allows, because focus comes back to its element after the sunset. Water and Touch her are `Button` again. | Up to 1.3.x, `Button` set its own `onkeydown` and `onblur` after the ones passed to it, dropping the pour by a held Space, its stop on blur, and *a held key is one touch* (thorns.md T2). The unit tests caught it. The fix went from here to domi-design (PR mnovak/domi-design#18) and is released in 1.4.0. |
| 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 | `<html data-domi-room="rosea" data-domi-theme="auto">` | 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). |
| D9 | **The licence's credit** (CPAL-1.0 Exhibit B, for Rosea and for the copy): `<DomiCredit link={false} />`, the exact words `Built on Domi · https://aula.marek-novak.cz · Copyright (c) 2026 Marek Novák`, with the address as plain text. One quiet line at the foot of every screen, from the first open on (the gardener, the garden, the Letter), never a splash. Mark approved it (via the Aula session). | INTEGRATE.md §6a asks 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. `link={false}` came into 1.4.0 from this request. CLAUDE.md says *Domi* never appears alone in public; this phrase is the licence's and Mark's own (review finding). |
| D10 | **On Android the town field is an editable box** (`TextField as="auto"`, v1.1.0): `contenteditable="plaintext-only"` with `role="textbox"`, the same look and keys. Elsewhere it stays the native search field. | Android's WebView asks Google's Autofill service, over the network, the moment a native text field gets focus. No attribute stops it, and Rosea's missing `INTERNET` permission does not either, because the system's Autofill service makes the request (found by Amicitia). A player typing their town would send a request they never asked for. A unit test holds it on an Android user agent, and the drill (`as="input"`) fails it. |
| D8 | **Not converted:** the gardener's choices stay her own picture-chips, not `Radio`. The *Bring her back* file picker stays a `<label>` around the browser's own input, wearing the plate's classes. | The brief was her buttons and the search. A file input cannot be a `Button`. |
+17 -12
View File
@@ -1,7 +1,7 @@
# Review: `feature/domi-ui` (2026-11-23)
Analysis: [`../features/domi-ui.md`](../features/domi-ui.md). Rosea's buttons and her town search take `@domi/ui`'s
look, from a vendored copy. The copy is **v1.2.0, CPAL-1.0**, made by the design system's `tools/vendor.mjs` into `packages/domi-ui`. Aula's
look, from a vendored copy. The copy is **v1.4.0, CPAL-1.0**, made by the design system's `tools/vendor.mjs` into `packages/domi-ui`. Aula's
hold was lifted with that tag; v1.0.1, the copy first tried here, never left this machine.
## Before and after
@@ -36,9 +36,8 @@ differ, for him to judge:
1. **`Button` drops `onkeydown` and `onblur` passed to it.** Its own handlers come after `{...rest}`.
- In Rosea that broke three things: the pour by a held Space, the stop on blur, and *a held key is one touch*.
The unit tests caught all three.
- *Fixed* by writing Water and Touch her as markup (D3).
- *For the design system:* chain the passed handlers. The Aula session asked for improvements to go back as PRs
to domi-design; this is the first.
- *Fixed upstream:* PR mnovak/domi-design#18 from here, reviewed and released in @domi/ui 1.4.0. Its two tests
fail on the old Button. Water and Touch her are `Button` again; until 1.4.0 they were markup (D3).
2. **Every `Button` carries its own `role="status"` region.** Rosea's tests that asked for "the" status found
several. *Fixed in the tests* (`test/said.ts`, and one e2e locator), not in the vendored code. Rosea never hands
a button a Promise (D2), so these regions stay empty and say nothing.
@@ -56,13 +55,13 @@ differ, for him to judge:
linted upstream, and never edited here.
7. **The licence.**
- v1.0.1 was `UNLICENSED` and v1.0.2 MPL-2.0; neither left this machine.
- The copy now is **v1.0.4**, made by the design system's own `tools/vendor.mjs`. It refuses any tag before the
- The copy now is **v1.4.0**, made by the design system's own `tools/vendor.mjs`. It refuses any tag before the
CPAL-1.0 v1.0.3, and writes `LICENSE`, `NOTICE`, `VERSION` and a `package.json` without scripts. It lives in
`packages/domi-ui` as `@domi/ui` (`workspace:*`).
- The three font packages arrive as its npm dependencies (OFL). Rosea imports none, and `dist/` has no font
file (counted: 0).
8. **The credit** (D9) is the exact `DOMI_ATTRIBUTION_TEXT`, not `DomiCredit`, whose web address is a link that
opens a new window. A tap must not carry the player out of an offline garden; on Android, with no internet,
8. **The credit** (D9) is `<DomiCredit link={false} />`, added in 1.4.0 from this request. Without it, the web
address is a link that opens a new window. A tap must not carry the player out of an offline garden; on Android, with no internet,
it would lead into a page that never loads. Mark approved the line (via the Aula session): one quiet line on
every launch, never a splash.
- It stands at the foot of every screen: the first open, the garden and the Letter.
@@ -89,14 +88,20 @@ differ, for him to judge:
- **Reachability:** none.
- **Offline:** `pnpm test:offline` 1 passed.
## Gates (this branch, v1.0.4, 2026-11-23)
## Gates (this branch, v1.4.0, 2026-11-23)
- `pnpm test`: **644 passed**. By package: cpu-guard 13, schema 19, identity 5, release 8, storage 70, content 88,
art-prep 80, tauri 92, ui 90 (88 before + the 2 credit tests), engine 179.
- `pnpm test`: **646 passed**. By package: cpu-guard 13, schema 19, identity 5, release 8, storage 70, content 88,
art-prep 80, tauri 92, ui 92 (88 before, plus 2 credit tests and 2 Android-field tests), engine 179.
- `pnpm lint`, `pnpm typecheck`: clean. `pnpm lint:copy`: 30 files, 0 problems. `pnpm validate:library`: 13 of 13
fixtures rejected.
- `pnpm test:e2e`: **26 passed** against the built app, axe included. `pnpm test:offline`: **1 passed**.
- `pnpm look:shots`: 28 pictures after, compared with the 28 before.
- `pnpm test:e2e`: **26 passed** against the built app, axe included. `pnpm test:offline`: **1 passed**. The Aula
pictures: **2 passed**; their phone has an Android user agent and types into the editable box.
- No font file in `dist/`. `pnpm look:shots`: 28 pictures after, compared with the 28 before.
- Drills, each restored after:
- without the credit on the garden, the credit test fails;
- with `DomiCredit`'s link back on, it fails;
- with a native town field on Android, the Android test fails;
- domi-design's two Button tests fail on the old Button.
## Not verified
+3 -3
View File
@@ -4,7 +4,7 @@ Rewritten at the end of each session (CLAUDE.md §5.1).
## Latest — 2026-11-23: @domi/ui, the shared look, and the credit
- **`feature/domi-ui`**: Rosea's buttons and her town search wear @domi/ui v1.2.0 (CPAL-1.0). On Android the town field is an editable box, so no Autofill request goes to Google.
- **`feature/domi-ui`**: Rosea's buttons and her town search wear @domi/ui v1.4.0 (CPAL-1.0). On Android the town field is an editable box, so no Autofill request goes to Google.
- It is vendored unchanged into `packages/domi-ui` by the design system's `tools/vendor.mjs`.
- Her colours, system fonts, art and layout stay.
- The licence credit stands at the foot of every screen, in its exact words, as plain text.
@@ -13,8 +13,8 @@ Rewritten at the end of each session (CLAUDE.md §5.1).
meets her art rules, for Mark.
- Before and after pictures: `ROSEA_LOOK=before|after pnpm look:shots`.
- **To upgrade @domi/ui:** from a domi-design clone, `node tools/vendor.mjs <rosea>/packages/domi-ui <tag>`.
- **Water, Touch her and *Move the chair*** are the plate written as markup: `Button` drops a passed
`onkeydown`/`onblur`. The fix went to domi-design as a PR; when it is tagged, they can become `Button`.
- **The Button fix** went from here to domi-design (PR mnovak/domi-design#18, released in 1.4.0): Water and Touch her
are `Button` again. Only *Move the chair* stays markup, because focus comes back to it after the sunset.
## Earlier — 2026-11-23: the licence
+26
View File
@@ -1,5 +1,31 @@
# Changelog
## 1.4.0 (2026-11-23)
- `DomiCredit link={false}`: the same credit with the URL as plain text, for an offline app (asked by Rosea). The licence
asks for the URL to be shown, not to be clickable.
- Visual tests: one retry, so an intermittent shot is reported as flaky by name.
- Fix: `Button` dropped an `onkeydown` or `onblur` passed to it, because its own handlers came after `{...rest}`. It
now runs the passed one first, then its own (Escape and blur still disarm a confirm). Found in Rosea, where a held
Space pours water and blur stops the pour.
## 1.3.1 (2026-11-23)
- **Praeco Domi's brass is now `#ab821e`** (Mark: "Move praeco apart"). A burnished, darker herald's brass: 0.101 from
Tabula's gold in OKLab distance (was 0.026), 0.136 from Ostende, at least 0.10 from every app. Text 5.0:1 or more on every dark
ground; leaf `#c89e41` → `#b88e2f` → `#ab821e` with a dark label, 5.5:1 or more. Tabula keeps its gold. Atrium's
catalogue.rs and Praeco take the new hex. A patch by Mark's request: a colour fix for a palette entry.
- Tests: screenshot comparison now uses a per-pixel colour tolerance of 0.02 (Playwright's default 0.2 let the old
Praeco brass pass against the new one). Under it, five earlier baselines turned out slightly off and were renewed:
the light-theme leaf on hover (the 1.0.1 hover fix) and switch and segmented focus. Contrast numbers were never affected.
## 1.3.0 (2026-11-23)
- **Praeco Domi** (`praeco`, label Marketing): brass `#c9a227` (Praeco-plan J1), Scaena's royal red `#9B1B30` as the
second light through its text tint `#d6565f`. All 66 of its contrast pairs pass. Its brass sits 0.026 from Tabula's gold in
OKLab distance: the two tiles read alike; Mark to decide (PALETTE.md).
## 1.2.0 (2026-11-23)
- **The seal without a script**: on a static page (Aula), `.domi-field:has(.domi-field__input:placeholder-shown)` lays
+1 -1
View File
@@ -1,4 +1,4 @@
This folder is @domi/ui v1.2.0, copied unchanged from domi-design by tools/vendor.mjs.
This folder is @domi/ui v1.4.0, copied unchanged from domi-design by tools/vendor.mjs.
Licence: Common Public Attribution License 1.0 (LICENSE). Original Code: @domi/ui. Initial Developer: Marek Novák.
Attribution Information (Exhibit B). Any app built with this code shows, prominently in its user interface when
+1 -1
View File
@@ -1 +1 @@
v1.2.0
v1.4.0
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@domi/ui",
"version": "1.2.0",
"description": "The Domi design system: tokens for every Domi app, struck buttons and fields with an integrated send button, Svelte 5 components. Vendored copy of v1.2.0: do not edit here; change domi-design and vendor the next tag.",
"version": "1.4.0",
"description": "The Domi design system: tokens for every Domi app, struck buttons and fields with an integrated send button, Svelte 5 components. Vendored copy of v1.4.0: do not edit here; change domi-design and vendor the next tag.",
"license": "CPAL-1.0",
"type": "module",
"svelte": "./src/index.ts",
+11 -2
View File
@@ -56,6 +56,9 @@
disabled = false,
type = 'button',
children,
// Taken out of rest, so the button can run them before its own (a spread before the attribute would lose them).
onkeydown: passedKeydown,
onblur: passedBlur,
...rest
}: Props = $props();
@@ -133,8 +136,14 @@
aria-label={iconOnly ? (armed ? confirm : label) : undefined}
title={iconOnly ? (armed ? confirm : label) : undefined}
onclick={press}
onkeydown={(e) => e.key === 'Escape' && armed && disarm()}
onblur={disarm}
onkeydown={(e) => {
passedKeydown?.(e);
if (e.key === 'Escape' && armed) disarm();
}}
onblur={(e) => {
passedBlur?.(e);
disarm();
}}
use:strike
>
<span class="domi-btn__label">
@@ -8,14 +8,19 @@
import { DOMI_ATTRIBUTION as A } from '../lib/credit';
interface Props {
/**
* true (default): the URL is a link. false: the URL is plain text, for an offline app (Rosea's game, an app with
* no network): the licence asks for the URL to be shown, not to be clickable.
*/
link?: boolean;
class?: string;
}
let { class: cls = '' }: Props = $props();
let { link = true, class: cls = '' }: Props = $props();
</script>
<p class={['domi-credit', cls]}>
<!-- Real spaces around the dots, so copied text reads as the licence writes it; flex ignores them in layout. -->
<span>{A.phrase}</span> <span class="domi-credit__dot" aria-hidden="true">·</span>
<a href={A.url} target="_blank" rel="noopener noreferrer">{A.url}</a>
{#if link}<a href={A.url} target="_blank" rel="noopener noreferrer">{A.url}</a>{:else}<span class="domi-credit__url">{A.url}</span>{/if}
<span class="domi-credit__dot" aria-hidden="true">·</span> <span>{A.copyright}</span>
</p>
+3
View File
@@ -1083,6 +1083,9 @@ textarea.domi-field__input {
text-decoration-color: var(--domi-edge-accent);
text-underline-offset: 3px;
}
.domi-credit__url {
color: var(--domi-fg-2);
}
.domi-credit a:hover {
color: var(--domi-accent-strong);
}
+68
View File
@@ -91,6 +91,7 @@
--domi-brand-panda: #e08a4f;
--domi-brand-pictor: #f27ab9;
--domi-brand-postea: #7fd8ab;
--domi-brand-praeco: #ab821e;
--domi-brand-respicio: #d9ac66;
--domi-brand-rosea: #e8899b;
--domi-brand-scriptum: #b9a0f2;
@@ -496,6 +497,22 @@
--domi-danger-fg-postea: #1a0a06;
--domi-ok-postea: #9fd08f;
--domi-warning-postea: #f2c66d;
--domi-accent-praeco: #ab821e;
--domi-accent-strong-praeco: #c59b3e;
--domi-leaf-hi-praeco: #c89e41;
--domi-leaf-mid-praeco: #b88e2f;
--domi-leaf-lo-praeco: #ab821e;
--domi-leaf-hover-hi-praeco: #cea854;
--domi-leaf-hover-mid-praeco: #bd963e;
--domi-leaf-hover-lo-praeco: #af8829;
--domi-leaf-edge-praeco: #e9be63;
--domi-leaf-fg-praeco: #0b0d14;
--domi-rim-praeco: #b88e2f;
--domi-second-praeco: #d6565f;
--domi-danger-praeco: #ff9d9d;
--domi-danger-fg-praeco: #1a0a06;
--domi-ok-praeco: #9fd08f;
--domi-warning-praeco: #f2c66d;
--domi-accent-respicio: #d9ac66;
--domi-accent-strong-respicio: #e8c27f;
--domi-leaf-hi-respicio: #e8c27f;
@@ -999,6 +1016,22 @@
--domi-danger-fg-postea: #ffffff;
--domi-ok-postea: #2d6a27;
--domi-warning-postea: #7a5200;
--domi-accent-praeco: #8b6700;
--domi-accent-strong-praeco: #664b01;
--domi-leaf-hi-praeco: #947014;
--domi-leaf-mid-praeco: #8b6700;
--domi-leaf-lo-praeco: #735400;
--domi-leaf-hover-hi-praeco: #93721d;
--domi-leaf-hover-mid-praeco: #937212;
--domi-leaf-hover-lo-praeco: #7a5d0d;
--domi-leaf-edge-praeco: #624700;
--domi-leaf-fg-praeco: #ffffff;
--domi-rim-praeco: #8b6700;
--domi-second-praeco: #be3f4b;
--domi-danger-praeco: #a8231b;
--domi-danger-fg-praeco: #ffffff;
--domi-ok-praeco: #2d6a27;
--domi-warning-praeco: #7a5200;
--domi-accent-respicio: #8e6518;
--domi-accent-strong-respicio: #6b4900;
--domi-leaf-hi-respicio: #976e23;
@@ -1499,6 +1532,22 @@
--domi-danger-fg-postea: #ffffff;
--domi-ok-postea: #2d6a27;
--domi-warning-postea: #7a5200;
--domi-accent-praeco: #8b6700;
--domi-accent-strong-praeco: #664b01;
--domi-leaf-hi-praeco: #947014;
--domi-leaf-mid-praeco: #8b6700;
--domi-leaf-lo-praeco: #735400;
--domi-leaf-hover-hi-praeco: #93721d;
--domi-leaf-hover-mid-praeco: #937212;
--domi-leaf-hover-lo-praeco: #7a5d0d;
--domi-leaf-edge-praeco: #624700;
--domi-leaf-fg-praeco: #ffffff;
--domi-rim-praeco: #8b6700;
--domi-second-praeco: #be3f4b;
--domi-danger-praeco: #a8231b;
--domi-danger-fg-praeco: #ffffff;
--domi-ok-praeco: #2d6a27;
--domi-warning-praeco: #7a5200;
--domi-accent-respicio: #8e6518;
--domi-accent-strong-respicio: #6b4900;
--domi-leaf-hi-respicio: #976e23;
@@ -2075,6 +2124,25 @@
--domi-ok: var(--domi-ok-postea);
--domi-warning: var(--domi-warning-postea);
}
[data-domi-app="praeco"],
[data-domi-room="praeco"] {
--domi-accent: var(--domi-accent-praeco);
--domi-accent-strong: var(--domi-accent-strong-praeco);
--domi-leaf-hi: var(--domi-leaf-hi-praeco);
--domi-leaf-mid: var(--domi-leaf-mid-praeco);
--domi-leaf-lo: var(--domi-leaf-lo-praeco);
--domi-leaf-hover-hi: var(--domi-leaf-hover-hi-praeco);
--domi-leaf-hover-mid: var(--domi-leaf-hover-mid-praeco);
--domi-leaf-hover-lo: var(--domi-leaf-hover-lo-praeco);
--domi-leaf-edge: var(--domi-leaf-edge-praeco);
--domi-leaf-fg: var(--domi-leaf-fg-praeco);
--domi-rim: var(--domi-rim-praeco);
--domi-second: var(--domi-second-praeco);
--domi-danger: var(--domi-danger-praeco);
--domi-danger-fg: var(--domi-danger-fg-praeco);
--domi-ok: var(--domi-ok-praeco);
--domi-warning: var(--domi-warning-praeco);
}
[data-domi-app="respicio"],
[data-domi-room="respicio"] {
--domi-accent: var(--domi-accent-respicio);
+45 -1
View File
@@ -2,7 +2,7 @@
/* eslint-disable */
export const tokens = {
"name": "@domi/ui",
"version": "1.2.0",
"version": "1.4.0",
"note": "GENERATED by tools/build-tokens.mjs. Colours are sRGB hex. Use roles, never the hex in a component.",
"themes": {
"dark": {
@@ -1517,6 +1517,50 @@ export const tokens = {
},
"lightRoom": null
},
"praeco": {
"name": "Praeco Domi",
"label": "Marketing",
"stack": "svelte",
"brand": "#ab821e",
"dark": {
"accent": "#ab821e",
"accentStrong": "#c59b3e",
"leafHi": "#c89e41",
"leafMid": "#b88e2f",
"leafLo": "#ab821e",
"leafEdge": "#e9be63",
"leafFg": "#0b0d14",
"rim": "#b88e2f",
"second": "#d6565f",
"danger": "#ff9d9d",
"ok": "#9fd08f",
"warning": "#f2c66d",
"dangerFg": "#1a0a06",
"leafHoverHi": "#cea854",
"leafHoverMid": "#bd963e",
"leafHoverLo": "#af8829"
},
"light": {
"accent": "#8b6700",
"accentStrong": "#664b01",
"leafHi": "#947014",
"leafMid": "#8b6700",
"leafLo": "#735400",
"leafEdge": "#624700",
"leafFg": "#ffffff",
"rim": "#8b6700",
"second": "#be3f4b",
"danger": "#a8231b",
"ok": "#2d6a27",
"warning": "#7a5200",
"dangerFg": "#ffffff",
"leafHoverHi": "#93721d",
"leafHoverMid": "#937212",
"leafHoverLo": "#7a5d0d"
},
"room": null,
"lightRoom": null
},
"respicio": {
"name": "Respicio",
"label": "Reflection",
+6 -9
View File
@@ -1,5 +1,5 @@
<script lang="ts">
import { Button, DOMI_ATTRIBUTION_TEXT, strike } from '@domi/ui';
import { Button, DomiCredit, strike } from '@domi/ui';
import { PRODUCT_NAME, type Gardener } from '@rosea/schema';
import { tick } from 'svelte';
import { en } from './copy/en.js';
@@ -244,11 +244,11 @@
<!--
The licence's credit (CPAL-1.0 Exhibit B, for Rosea and for @domi/ui): its exact words, at the foot of every screen
from the first open on (domi-ui.md D9). Plain text, not @domi/ui's DomiCredit link: the garden is offline, and a
tap must never carry the player out of it, least of all on Android, which has no internet at all.
from the first open on (domi-ui.md D9). link={false}: the address as plain text, because the garden is offline and
a tap must never carry the player out of it, least of all on Android, which has no internet at all.
-->
{#snippet credit()}
<p class="credit">{DOMI_ATTRIBUTION_TEXT}</p>
<DomiCredit link={false} class="credit" />
{/snippet}
{#if updateReady && onrefresh}
@@ -311,11 +311,8 @@
font-size: 0.9rem;
}
.credit {
margin: var(--space-4) 0 0;
font-size: 0.8rem;
color: var(--ink-soft);
text-align: center;
.shell :global(.credit) {
margin-top: var(--space-4);
}
.update {
+10 -16
View File
@@ -1,5 +1,5 @@
<script lang="ts">
import { Button, strike } from '@domi/ui';
import { Button } from '@domi/ui';
import {
careEvent, goodMoment, lightAt, localDay, newCare, newOpened, petalAt, petalsToday, pour, roseAt, ROSE, sentenceOpened, touch, TOUCH,
UNTOUCHED, weedsToday, type Mood, type PetalNow, type Place, type RoseNow, type Stage, type TouchState
@@ -266,14 +266,11 @@
if (e.key === 'Escape') void closeRing();
}}
>
<!-- Water and Touch her are @domi/ui's plate written as markup (INTEGRATE.md §3): Button sets its own
onkeydown and onblur after the ones passed to it, and the pour needs both (domi-ui.md D3). -->
<button
type="button"
class="domi-btn water"
class:pouring
<!-- Button runs a passed onkeydown and onblur before its own since @domi/ui 1.4.0 (the fix from here, domi-ui.md
D3): the pour needs both. -->
<Button
class={pouring ? 'water pouring' : 'water'}
aria-describedby="rose-water-hint"
use:strike
onpointerdown={(e) => {
e.preventDefault();
(e.currentTarget as HTMLElement).setPointerCapture?.(e.pointerId);
@@ -290,7 +287,7 @@
if (isPourKey(e)) stopPour();
}}
onblur={stopPour}
><span class="domi-btn__label">{en.rose.water}</span></button>
>{en.rose.water}</Button>
{#if rose.needs.wind}
<Button onclick={() => careBy('shade')}>{en.rose.shade}</Button>
{/if}
@@ -300,10 +297,7 @@
{#if rose.needs.petals}
<Button onclick={() => careBy('petals')}>{en.rose.petals}</Button>
{/if}
<button
type="button"
class="domi-btn"
use:strike
<Button
onclick={() => {
planet?.act('touch');
touchHer();
@@ -312,7 +306,7 @@
// A held key is one touch, not a rush (thorns.md T2).
if (e.repeat) e.preventDefault();
}}
><span class="domi-btn__label">{en.rose.touch.label}</span></button>
>{en.rose.touch.label}</Button>
<Button variant="quiet" onclick={() => void closeRing()}>{en.scene.close}</Button>
</div>
<p id="rose-water-hint" class="hint">{en.rose.waterHint}</p>
@@ -375,13 +369,13 @@
}
/* Water is held, not clicked: the page must not scroll or select under the finger (rose.md). */
.care .water {
.care :global(.water) {
touch-action: none;
user-select: none;
}
/* While she is being watered the plate stays pressed in (@domi/ui's own press, held). */
.care .water.pouring {
.care :global(.water.pouring) {
background: var(--domi-plate-press);
box-shadow: var(--domi-plate-shadow-press);
}
+6 -4
View File
@@ -23,11 +23,13 @@ const h1 = (): HTMLElement => screen.getByRole('heading', { level: 1 });
describe('the licence credit (CPAL-1.0 Exhibit B; domi-ui.md D9)', () => {
const credit = 'Built on Domi · https://aula.marek-novak.cz · Copyright (c) 2026 Marek Novák';
/** The credit line as a reader gets it: @domi/ui's DomiCredit sets its parts in spans. */
const creditLine = (): string => document.querySelector('.domi-credit')?.textContent?.replace(/\s+/g, ' ').trim() ?? '';
it('stands at the foot of the first screen in its exact words, as plain text that leads nowhere', () => {
render(Shell);
const line = screen.getByText(credit);
expect(line.textContent).toBe(credit);
expect(line.closest('a')).toBeNull();
expect(creditLine()).toBe(credit);
expect(document.querySelector('.domi-credit a')).toBeNull();
expect(document.querySelectorAll('a[href^="https://aula"]')).toHaveLength(0);
});
@@ -35,7 +37,7 @@ describe('the licence credit (CPAL-1.0 Exhibit B; domi-ui.md D9)', () => {
window.location.hash = '#letter';
render(Shell, { letter: LETTER });
await waitFor(() => expect(h1().textContent).toBe(en.letter.title));
expect(screen.getByText(credit)).toBeTruthy();
expect(creditLine()).toBe(credit);
});
});
+1 -1
View File
@@ -90,7 +90,7 @@ describe('her planet (planet-garden.md)', () => {
await tick();
const ring = screen.getByRole('group', { name: en.scene.ring });
expect(her.getAttribute('aria-expanded')).toBe('true');
expect(document.activeElement?.textContent).toBe(en.rose.water);
expect(document.activeElement?.textContent?.trim()).toBe(en.rose.water);
expect(screen.getByRole('button', { name: en.rose.touch.label })).toBeTruthy();
expect(screen.queryByRole('button', { name: en.rose.weed })).toBeNull();
await fireEvent.keyDown(ring, { key: 'Escape' });