Compare commits
8 Commits
feature/cpal
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 3bf4a4f4d2 | |||
| 5ea0bc1581 | |||
| d6d1f8d36d | |||
| 97e5db3c08 | |||
| 525596a56c | |||
| 43230be026 | |||
| c9aa55ec99 | |||
| 0934bb3419 |
@@ -10,7 +10,8 @@ crates/core config model, schema, compilers (Pingora runtime + Caddy JSON),
|
|||||||
crates/edge Pingora data plane. Reads compiled config, serves traffic. Never decides policy.
|
crates/edge Pingora data plane. Reads compiled config, serves traffic. Never decides policy.
|
||||||
crates/control API, git routes repo, apply/rollback, share links, PKI flows. Loopback only. Never serves public traffic.
|
crates/control API, git routes repo, apply/rollback, share links, PKI flows. Loopback only. Never serves public traffic.
|
||||||
apps/web Svelte 5 (runes, TypeScript strict). A client of the API; no logic.
|
apps/web Svelte 5 (runes, TypeScript strict). A client of the API; no logic.
|
||||||
packages/ui shared dark Domi theme, murex palette.
|
packages/ui Ianitor's own components on @domi/ui (docs/domi-ui.md).
|
||||||
|
packages/domi-ui @domi/ui, the shared Domi design system, vendored at a tag by its tools/vendor.mjs. Never edit it here.
|
||||||
tests/diff same requests against Ianitor and Caddy, responses compared.
|
tests/diff same requests against Ianitor and Caddy, responses compared.
|
||||||
tests/support shared test fixtures (test CA, upstreams, mock Authelia, clients); test-only.
|
tests/support shared test fixtures (test CA, upstreams, mock Authelia, clients); test-only.
|
||||||
tests/fuzz cargo-fuzz targets.
|
tests/fuzz cargo-fuzz targets.
|
||||||
|
|||||||
Generated
+2
-2
@@ -861,8 +861,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "domi-pki"
|
name = "domi-pki"
|
||||||
version = "1.0.0"
|
version = "1.0.1"
|
||||||
source = "git+https://gitea.marek-novak.cz/mnovak/domi-pki?tag=v1.0.0#b1ec5b3196fc22355270f381e5a7748c50e3380d"
|
source = "git+https://gitea.marek-novak.cz/mnovak/domi-pki?tag=v1.0.1#801dfbdc75cff8ea545422b9ada2fa4a3b6693f8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
"rcgen",
|
"rcgen",
|
||||||
|
|||||||
+1
-1
@@ -23,7 +23,7 @@ ianitor-core = { path = "crates/core" }
|
|||||||
ianitor-edge = { path = "crates/edge" }
|
ianitor-edge = { path = "crates/edge" }
|
||||||
ianitor-testkit = { path = "tests/support" }
|
ianitor-testkit = { path = "tests/support" }
|
||||||
# The Domi CA, shared with Fabrica (docs/32_coherence.md T3a); pinned by tag.
|
# The Domi CA, shared with Fabrica (docs/32_coherence.md T3a); pinned by tag.
|
||||||
domi-pki = { git = "https://gitea.marek-novak.cz/mnovak/domi-pki", tag = "v1.0.0" }
|
domi-pki = { git = "https://gitea.marek-novak.cz/mnovak/domi-pki", tag = "v1.0.1" }
|
||||||
serde = { version = "1.0.228", features = ["derive"] }
|
serde = { version = "1.0.228", features = ["derive"] }
|
||||||
serde_json = "1.0.145"
|
serde_json = "1.0.145"
|
||||||
toml = "1.2.1"
|
toml = "1.2.1"
|
||||||
|
|||||||
@@ -98,7 +98,11 @@ available under MPL-2.0 to those who received them; from this change on, the cod
|
|||||||
CPAL-1.0 is MPL 1.1 with an attribution clause and a network clause. Whoever runs Ianitor, or a work built on it,
|
CPAL-1.0 is MPL 1.1 with an attribution clause and a network clause. Whoever runs Ianitor, or a work built on it,
|
||||||
for users (over a network too) shows the credit of LICENSE Exhibit B where those users reach it:
|
for users (over a network too) shows the credit of LICENSE Exhibit B where those users reach it:
|
||||||
|
|
||||||
> **Built on Domi** · Copyright (c) 2026 Marek Novák · https://aula.marek-novak.cz
|
> **Built on Domi** · https://aula.marek-novak.cz · Copyright (c) 2026 Marek Novák
|
||||||
|
|
||||||
Ianitor's web UI shows it on every screen (in the sidebar, or at the foot of the page on a phone) and in Settings,
|
Ianitor's web UI shows it on every screen (in the sidebar, or at the foot of the page on a phone) and in Settings,
|
||||||
About. Pingora is Apache-2.0; Caddy, used only as a separate fallback process, Apache-2.0.
|
About. Using Ianitor over a network counts as distribution (CPAL §15): whoever runs a changed Ianitor for others
|
||||||
|
makes that source available. This repository is the source of Ianitor itself, linked from Settings, About.
|
||||||
|
|
||||||
|
Contains @domi/ui (CPAL-1.0, Copyright (c) 2026 Marek Novák), in `packages/domi-ui`; the rest of this repo is under its
|
||||||
|
own licence. Pingora is Apache-2.0; Caddy, used only as a separate fallback process, Apache-2.0.
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ test("Add a host: + Host → fill → Apply = 2 clicks, kept", { annotation: { t
|
|||||||
await page.getByLabel("Hostname").pressSequentially("notes.home.test");
|
await page.getByLabel("Hostname").pressSequentially("notes.home.test");
|
||||||
await page.getByLabel("Send traffic to").fill("http://192.0.2.60:8080");
|
await page.getByLabel("Send traffic to").fill("http://192.0.2.60:8080");
|
||||||
await beat(page);
|
await beat(page);
|
||||||
await c.click(page.getByRole("button", { name: "Apply" }));
|
await c.click(page.getByRole("button", { name: "Apply", exact: true }));
|
||||||
await expect(page.locator("dialog.ia-panel")).toHaveCount(0, { timeout: 10_000 });
|
await expect(page.locator("dialog.ia-panel")).toHaveCount(0, { timeout: 10_000 });
|
||||||
await expect(page.getByRole("button", { name: "More for notes.home.test" })).toBeVisible();
|
await expect(page.getByRole("button", { name: "More for notes.home.test" })).toBeVisible();
|
||||||
await beat(page);
|
await beat(page);
|
||||||
|
|||||||
+1
-1
@@ -2,7 +2,7 @@
|
|||||||
<!-- SPDX-License-Identifier: CPAL-1.0
|
<!-- SPDX-License-Identifier: CPAL-1.0
|
||||||
- Copyright (c) 2026 Marek Novák. Part of Ianitor, under the Common Public Attribution
|
- Copyright (c) 2026 Marek Novák. Part of Ianitor, under the Common Public Attribution
|
||||||
- License 1.0: see LICENSE (its Exhibit A is this file's notice). -->
|
- License 1.0: see LICENSE (its Exhibit A is this file's notice). -->
|
||||||
<html lang="en">
|
<html lang="en" data-domi-room="ianitor">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
"aula:shots": "playwright test --project=aula"
|
"aula:shots": "playwright test --project=aula"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@domi/ui": "workspace:*",
|
||||||
"@ianitor/ui": "workspace:*"
|
"@ianitor/ui": "workspace:*"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
+19
-18
@@ -5,6 +5,7 @@
|
|||||||
// The shell (handoff §2.16): sidebar on desktop, top and bottom bars on phone, the routes,
|
// The shell (handoff §2.16): sidebar on desktop, top and bottom bars on phone, the routes,
|
||||||
// the banners every screen starts with, toasts and the signed-out dialog (§10).
|
// the banners every screen starts with, toasts and the signed-out dialog (§10).
|
||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
|
import { DomiCredit } from "@domi/ui";
|
||||||
import { Button, Dialog, Icon } from "@ianitor/ui";
|
import { Button, Dialog, Icon } from "@ianitor/ui";
|
||||||
import type { IconName } from "@ianitor/ui";
|
import type { IconName } from "@ianitor/ui";
|
||||||
import EngineChip from "./components/EngineChip.svelte";
|
import EngineChip from "./components/EngineChip.svelte";
|
||||||
@@ -12,7 +13,6 @@
|
|||||||
import TopBanners from "./components/TopBanners.svelte";
|
import TopBanners from "./components/TopBanners.svelte";
|
||||||
import { app, navigate, refresh, startPolling } from "./lib/app.svelte";
|
import { app, navigate, refresh, startPolling } from "./lib/app.svelte";
|
||||||
import { remembered } from "./lib/applies";
|
import { remembered } from "./lib/applies";
|
||||||
import { CREDIT } from "./lib/credit";
|
|
||||||
import Certificates from "./views/Certificates.svelte";
|
import Certificates from "./views/Certificates.svelte";
|
||||||
import History from "./views/History.svelte";
|
import History from "./views/History.svelte";
|
||||||
import Hosts from "./views/Hosts.svelte";
|
import Hosts from "./views/Hosts.svelte";
|
||||||
@@ -94,7 +94,7 @@
|
|||||||
{#if route.view === "signed-in"}
|
{#if route.view === "signed-in"}
|
||||||
<SignedIn />
|
<SignedIn />
|
||||||
{:else}
|
{:else}
|
||||||
<a class="skip domi-btn" href="#main">Skip to content</a>
|
<a class="skip ia-link" href="#main">Skip to content</a>
|
||||||
<div class="shell">
|
<div class="shell">
|
||||||
<nav class="sidebar" aria-label="Main">
|
<nav class="sidebar" aria-label="Main">
|
||||||
<div class="ia-wordmark brand">IANITOR DOMI</div>
|
<div class="ia-wordmark brand">IANITOR DOMI</div>
|
||||||
@@ -104,8 +104,8 @@
|
|||||||
<div class="foot ia-muted">
|
<div class="foot ia-muted">
|
||||||
<p>{viewer?.via === "authelia" ? `Signed in as ${viewer.name} through Authelia` : viewer ? `Using the API token "${viewer.name}"` : "Signed in through Authelia"}</p>
|
<p>{viewer?.via === "authelia" ? `Signed in as ${viewer.name} through Authelia` : viewer ? `Using the API token "${viewer.name}"` : "Signed in through Authelia"}</p>
|
||||||
<p>Control on 127.0.0.1 only</p>
|
<p>Control on 127.0.0.1 only</p>
|
||||||
{#if app.overview?.site?.auth_logout_url}<a class="domi-btn link" href={app.overview.site.auth_logout_url}>Sign out</a>{/if}
|
{#if app.overview?.site?.auth_logout_url}<a class="ia-link" href={app.overview.site.auth_logout_url}>Sign out</a>{/if}
|
||||||
<p class="credit"><a href={CREDIT.url} rel="noreferrer">{CREDIT.phrase}</a> · {CREDIT.notice}</p>
|
<div class="credit"><DomiCredit /></div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<header class="topbar"><span class="ia-wordmark">IANITOR DOMI</span>{#if app.phone}<EngineChip />{/if}</header>
|
<header class="topbar"><span class="ia-wordmark">IANITOR DOMI</span>{#if app.phone}<EngineChip />{/if}</header>
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
{:else if route.view === "settings"}
|
{:else if route.view === "settings"}
|
||||||
<Settings tab={route.tab} />
|
<Settings tab={route.tab} />
|
||||||
{/if}
|
{/if}
|
||||||
<p class="credit phone-credit ia-muted"><a href={CREDIT.url} rel="noreferrer">{CREDIT.phrase}</a> · {CREDIT.notice}</p>
|
<div class="credit phone-credit"><DomiCredit /></div>
|
||||||
</main>
|
</main>
|
||||||
<nav class="bottombar" aria-label="Main">
|
<nav class="bottombar" aria-label="Main">
|
||||||
{#each NAV as n (n.href)}
|
{#each NAV as n (n.href)}
|
||||||
@@ -155,28 +155,29 @@
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100dvh; }
|
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100dvh; }
|
||||||
.sidebar { background: var(--colonnade); border-right: 1px solid var(--hairline); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; }
|
.sidebar { background: var(--domi-chrome); border-right: 1px solid var(--domi-line); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; }
|
||||||
.brand { padding: 4px 10px 18px; }
|
.brand { padding: 4px 10px 18px; }
|
||||||
.nav { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--text-2); font-weight: 600; font-size: var(--fs-nav); text-decoration: none; border: 1px solid transparent; }
|
.nav { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: var(--radius-sm); color: var(--domi-fg-2); font-weight: 600; font-size: var(--fs-nav); text-decoration: none; border: 1px solid transparent; }
|
||||||
.nav:hover { background: var(--surface); color: var(--text); }
|
.nav:hover { background: var(--domi-panel); color: var(--domi-fg); }
|
||||||
.nav[aria-current="page"] { background: var(--surface-2); color: var(--text); box-shadow: var(--inset-lit); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
|
.nav[aria-current="page"] { background: var(--domi-hover); color: var(--domi-fg); box-shadow: var(--inset-lit); border-color: color-mix(in srgb, var(--domi-accent) 30%, transparent); }
|
||||||
.nav[aria-current="page"] :global(svg) { color: var(--accent); }
|
.nav[aria-current="page"] :global(svg) { color: var(--domi-accent); }
|
||||||
.foot { margin-top: auto; font-size: 0.82rem; display: flex; flex-direction: column; gap: 4px; padding: 0 10px; }
|
.foot { margin-top: auto; font-size: 0.82rem; display: flex; flex-direction: column; gap: 4px; padding: 0 10px; }
|
||||||
main { padding: var(--main-pad); display: flex; flex-direction: column; gap: 18px; min-width: 0; outline: none; }
|
main { padding: var(--main-pad); display: flex; flex-direction: column; gap: 18px; min-width: 0; outline: none; }
|
||||||
.topbar, .bottombar, .phone-credit { display: none; }
|
.topbar, .bottombar, .phone-credit { display: none; }
|
||||||
/* LICENSE, Exhibit B (CPAL §14): on every screen, in the sidebar or, on a phone, at the foot of the page. */
|
/* LICENSE Exhibit B, Ianitor's and @domi/ui's (the same words; CPAL §14): on every screen, in the sidebar or, on a
|
||||||
|
phone, at the foot of the page. <DomiCredit /> renders it exactly. */
|
||||||
.credit { margin-top: 6px; font-size: 0.78rem; }
|
.credit { margin-top: 6px; font-size: 0.78rem; }
|
||||||
.credit a { color: var(--accent); }
|
.sidebar .credit :global(.domi-credit) { justify-content: flex-start; }
|
||||||
@media (max-width: 719.98px) {
|
@media (max-width: 719.98px) {
|
||||||
.shell { grid-template-columns: minmax(0, 1fr); }
|
.shell { grid-template-columns: minmax(0, 1fr); }
|
||||||
.sidebar { display: none; }
|
.sidebar { display: none; }
|
||||||
.phone-credit { display: block; margin-top: auto; text-align: center; }
|
.phone-credit { display: block; margin-top: auto; }
|
||||||
.topbar { display: flex; align-items: center; justify-content: space-between; background: var(--colonnade); border-bottom: 1px solid var(--hairline); padding: 10px 16px; }
|
.topbar { display: flex; align-items: center; justify-content: space-between; background: var(--domi-chrome); border-bottom: 1px solid var(--domi-line); padding: 10px 16px; }
|
||||||
.topbar .ia-wordmark { font-size: 12px; letter-spacing: 0.26em; }
|
.topbar .ia-wordmark { font-size: 12px; letter-spacing: 0.26em; }
|
||||||
main { padding: 18px 16px calc(90px + env(safe-area-inset-bottom)); gap: 14px; }
|
main { padding: 18px 16px calc(90px + env(safe-area-inset-bottom)); gap: 14px; }
|
||||||
.bottombar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: var(--colonnade); border-top: 1px solid var(--hairline); padding: 6px 8px calc(10px + env(safe-area-inset-bottom)); z-index: 40; }
|
.bottombar { display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: var(--domi-chrome); border-top: 1px solid var(--domi-line); padding: 6px 8px calc(10px + env(safe-area-inset-bottom)); z-index: 40; }
|
||||||
.bottombar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--phone-bar-h); border-radius: var(--radius-sm); color: var(--text-2); font-weight: 600; font-size: var(--fs-tab-phone); text-decoration: none; }
|
.bottombar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: var(--phone-bar-h); border-radius: var(--radius-sm); color: var(--domi-fg-2); font-weight: 600; font-size: var(--fs-tab-phone); text-decoration: none; }
|
||||||
.bottombar a[aria-current="page"] { background: var(--surface-2); color: var(--text); }
|
.bottombar a[aria-current="page"] { background: var(--domi-hover); color: var(--domi-fg); }
|
||||||
.bottombar a[aria-current="page"] :global(svg) { color: var(--accent); }
|
.bottombar a[aria-current="page"] :global(svg) { color: var(--domi-accent); }
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -69,12 +69,12 @@
|
|||||||
<style>
|
<style>
|
||||||
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
|
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
|
||||||
.steps li { display: flex; gap: 10px; align-items: center; }
|
.steps li { display: flex; gap: 10px; align-items: center; }
|
||||||
.steps li.pending { color: var(--muted); }
|
.steps li.pending { color: var(--domi-muted); }
|
||||||
.steps li.running { color: var(--text); }
|
.steps li.running { color: var(--domi-fg); }
|
||||||
.steps li.running :global(svg) { color: var(--accent); }
|
.steps li.running :global(svg) { color: var(--domi-accent); }
|
||||||
.steps li.done { color: var(--text-2); }
|
.steps li.done { color: var(--domi-fg-2); }
|
||||||
.steps li.done :global(svg) { color: var(--kept); }
|
.steps li.done :global(svg) { color: var(--kept); }
|
||||||
.steps li.failed :global(svg) { color: var(--down); }
|
.steps li.failed :global(svg) { color: var(--down); }
|
||||||
.steps li.skipped { color: var(--muted); }
|
.steps li.skipped { color: var(--domi-muted); }
|
||||||
.hollow { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--muted); margin: 2px; }
|
.hollow { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--domi-muted); margin: 2px; }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -136,7 +136,7 @@
|
|||||||
<Progress label="Health watch" max={total} now={total - watchLeft} text="{watchLeft} seconds left" />
|
<Progress label="Health watch" max={total} now={total - watchLeft} text="{watchLeft} seconds left" />
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if active.state === "queued"}<Button onclick={() => cancel(active.id)}>Cancel</Button>{:else}<button type="button" class="domi-btn link" onclick={() => onshowsteps(active.id)}>Show steps</button>{/if}
|
{#if active.state === "queued"}<Button onclick={() => cancel(active.id)}>Cancel</Button>{:else}<button type="button" class="ia-link" onclick={() => onshowsteps(active.id)}>Show steps</button>{/if}
|
||||||
{:else if last}
|
{:else if last}
|
||||||
<div class="grow">
|
<div class="grow">
|
||||||
{#if last.state === "kept"}
|
{#if last.state === "kept"}
|
||||||
@@ -161,5 +161,5 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.warn { color: var(--degraded); }
|
.warn { color: var(--domi-warning); }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -117,5 +117,5 @@
|
|||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
ul { margin: 6px 0 0; padding-left: 1.1rem; color: var(--text-2); }
|
ul { margin: 6px 0 0; padding-left: 1.1rem; color: var(--domi-fg-2); }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
{#if h.certificate.state === "pending"}<span class="ia-sub" style="display:block">Waiting for Let's Encrypt to issue the certificate.</span>{/if}
|
{#if h.certificate.state === "pending"}<span class="ia-sub" style="display:block">Waiting for Let's Encrypt to issue the certificate.</span>{/if}
|
||||||
{#if h.certificate.state === "failed"}
|
{#if h.certificate.state === "failed"}
|
||||||
<span class="ia-sub" style="display:block;color:var(--down)">Let's Encrypt could not confirm <strong>{h.hostname}</strong>. The name must point to this server, and port 80 must be open from the internet.
|
<span class="ia-sub" style="display:block;color:var(--down)">Let's Encrypt could not confirm <strong>{h.hostname}</strong>. The name must point to this server, and port 80 must be open from the internet.
|
||||||
<button type="button" class="domi-btn link" onclick={() => onretry(h.hostname)}>Try again</button></span>
|
<button type="button" class="ia-link" onclick={() => onretry(h.hostname)}>Try again</button></span>
|
||||||
{/if}
|
{/if}
|
||||||
</span>
|
</span>
|
||||||
<span role="cell">
|
<span role="cell">
|
||||||
@@ -133,7 +133,7 @@
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.phone, .phone-dot { display: none; }
|
.phone, .phone-dot { display: none; }
|
||||||
.problem { color: var(--text-2) !important; }
|
.problem { color: var(--domi-fg-2) !important; }
|
||||||
@media (max-width: 719.98px) {
|
@media (max-width: 719.98px) {
|
||||||
.desktop { display: none !important; }
|
.desktop { display: none !important; }
|
||||||
.phone { display: block; padding-left: 22px; }
|
.phone { display: block; padding-left: 22px; }
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
// Handoff §6 and §7: the add/edit panel, its validation on blur, Apply, and the progress and
|
// Handoff §6 and §7: the add/edit panel, its validation on blur, Apply, and the progress and
|
||||||
// outcome of the apply it starts. Every decision comes from control; the form only carries it.
|
// outcome of the apply it starts. Every decision comes from control; the form only carries it.
|
||||||
import { onDestroy, onMount } from "svelte";
|
import { onDestroy, onMount } from "svelte";
|
||||||
|
import { Checkbox, Select, TextField } from "@domi/ui";
|
||||||
import { Banner, Button, Details, Dialog, Icon, Segmented } from "@ianitor/ui";
|
import { Banner, Button, Details, Dialog, Icon, Segmented } from "@ianitor/ui";
|
||||||
import ApplyProgress from "./ApplyProgress.svelte";
|
import ApplyProgress from "./ApplyProgress.svelte";
|
||||||
import { ApiError, call, del, get, newKey, sentence } from "../lib/api";
|
import { ApiError, call, del, get, newKey, sentence } from "../lib/api";
|
||||||
@@ -60,6 +61,24 @@
|
|||||||
let idem = newKey();
|
let idem = newKey();
|
||||||
let lastBody = "";
|
let lastBody = "";
|
||||||
|
|
||||||
|
// Every text field carries its seal (domi-design TextField): `next` moves to the next field, and the last text
|
||||||
|
// field of the form applies it, as the Apply button does. The last one depends on what is shown.
|
||||||
|
const lastField = $derived.by(() => {
|
||||||
|
const keys = ["hostname", ...host.upstreams.map((_, i) => `upstreams[${i}]`)];
|
||||||
|
if (more) {
|
||||||
|
if (host.hc) keys.push("health_check.path");
|
||||||
|
for (const [list, rules, secrets] of [["request_headers", host.req, true], ["response_headers", host.resp, false]] as const) {
|
||||||
|
rules.forEach((r, i) => {
|
||||||
|
keys.push(`${list}[${i}].name`);
|
||||||
|
if (r.action === "set" && !(secrets && r.kind === "secret")) keys.push(`${list}[${i}].value`);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return keys.at(-1);
|
||||||
|
});
|
||||||
|
const seal = (key: string) =>
|
||||||
|
key === lastField ? { action: "save" as const, actionLabel: "Apply this host" } : { action: "next" as const, actionLabel: undefined };
|
||||||
|
|
||||||
// ---- the apply
|
// ---- the apply
|
||||||
let apply = $state<ApplyView | null>(null);
|
let apply = $state<ApplyView | null>(null);
|
||||||
let restoring = $state(false);
|
let restoring = $state(false);
|
||||||
@@ -392,43 +411,36 @@
|
|||||||
{#if topError.body.detail}<Details detail={topError.body.detail} reference={topError.requestId} />{/if}
|
{#if topError.body.detail}<Details detail={topError.body.detail} reference={topError.requestId} />{/if}
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<div class="domi-field">
|
<div class="ia-field" onfocusout={() => blur("hostname")}>
|
||||||
<label class="domi-field-label" for={fieldId("hostname")}>Hostname</label>
|
<TextField id={fieldId("hostname")} label="Hostname" bind:value={host.hostname} readonly={!!hostname}
|
||||||
<input id={fieldId("hostname")} class="domi-input" bind:value={host.hostname} readonly={!!hostname}
|
spellcheck={false} inputmode="url" autocomplete="off" {...seal("hostname")}
|
||||||
autocapitalize="none" spellcheck="false" inputmode="url" autocomplete="off"
|
error={errAt("hostname") && touched["hostname"] ? errAt("hostname").message : undefined}
|
||||||
aria-invalid={errAt("hostname") && touched["hostname"] ? "true" : undefined}
|
hint={hostname ? "To use another address, add a new host and remove this one." : undefined} />
|
||||||
aria-describedby="{fieldId('hostname')}-e {fieldId('hostname')}-h" onblur={() => blur("hostname")} />
|
{#if errAt("hostname") && touched["hostname"] && errAt("hostname").params?.suggestion}
|
||||||
{#if errAt("hostname") && touched["hostname"]}
|
<div><button type="button" class="ia-link" onclick={() => { host.hostname = errAt("hostname").params.suggestion; blur("hostname"); }}>Use {errAt("hostname").params.suggestion}</button></div>
|
||||||
<p class="domi-error" id="{fieldId('hostname')}-e"><Icon name="ring" />{errAt("hostname").message}
|
|
||||||
{#if errAt("hostname").params?.suggestion}
|
|
||||||
<button type="button" class="domi-btn link" onclick={() => { host.hostname = errAt("hostname").params.suggestion; blur("hostname"); }}>Use {errAt("hostname").params.suggestion}</button>
|
|
||||||
{/if}
|
|
||||||
</p>
|
|
||||||
{/if}
|
{/if}
|
||||||
{#if hostname}<p class="ia-hint" id="{fieldId('hostname')}-h">To use another address, add a new host and remove this one.</p>{/if}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#each host.upstreams as _, i (i)}
|
{#each host.upstreams as _, i (i)}
|
||||||
{@const f = `upstreams[${i}]`}
|
{@const f = `upstreams[${i}]`}
|
||||||
{@const err = errAt(f) ?? (i === 0 ? errAt("upstreams") : undefined)}
|
{@const err = errAt(f) ?? (i === 0 ? errAt("upstreams") : undefined)}
|
||||||
<div class="domi-field">
|
{@const shown = err && (touched[f] || touched["upstreams"])}
|
||||||
{#if i === 0}<label class="domi-field-label" for={fieldId(f)}>Send traffic to</label>{/if}
|
<div class="ia-field" onfocusout={() => blur(f)}>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<input id={fieldId(f)} class="domi-input" bind:value={host.upstreams[i]} autocapitalize="none" spellcheck="false" inputmode="url" autocomplete="off"
|
<div class="grow">
|
||||||
aria-label={i === 0 ? undefined : `Also send traffic to, address ${i + 1}`}
|
<TextField id={fieldId(f)} label={i === 0 ? "Send traffic to" : `Also send traffic to, address ${i + 1}`} hideLabel={i > 0}
|
||||||
aria-invalid={err && (touched[f] || touched["upstreams"]) ? "true" : undefined}
|
bind:value={host.upstreams[i]} spellcheck={false} inputmode="url" autocomplete="off" {...seal(f)}
|
||||||
aria-describedby="{fieldId(f)}-e" onblur={() => blur(f)} />
|
error={shown ? err.message : undefined}
|
||||||
|
hint={i === 0 && host.upstreams.length === 1 ? "Add another address later for a second server." : undefined} />
|
||||||
|
</div>
|
||||||
{#if i > 0}<button type="button" class="ia-icon-btn" aria-label="Remove this address" onclick={() => host.upstreams.splice(i, 1)}><Icon name="trash" /></button>{/if}
|
{#if i > 0}<button type="button" class="ia-icon-btn" aria-label="Remove this address" onclick={() => host.upstreams.splice(i, 1)}><Icon name="trash" /></button>{/if}
|
||||||
</div>
|
</div>
|
||||||
{#if err && (touched[f] || touched["upstreams"])}
|
{#if shown && err.params?.suggestion}
|
||||||
<p class="domi-error" id="{fieldId(f)}-e"><Icon name="ring" />{err.message}
|
<div><button type="button" class="ia-link" onclick={() => { host.upstreams[i] = err.params.suggestion; blur(f); }}>Use {err.params.suggestion}</button></div>
|
||||||
{#if err.params?.suggestion}<button type="button" class="domi-btn link" onclick={() => { host.upstreams[i] = err.params.suggestion; blur(f); }}>Use {err.params.suggestion}</button>{/if}
|
|
||||||
</p>
|
|
||||||
{/if}
|
{/if}
|
||||||
{#if i === 0 && host.upstreams.length === 1}<p class="ia-hint">Add another address later for a second server.</p>{/if}
|
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
<div><button type="button" class="domi-btn link" onclick={() => host.upstreams.push("")}>Add another address</button></div>
|
<div><button type="button" class="ia-link" onclick={() => host.upstreams.push("")}>Add another address</button></div>
|
||||||
|
|
||||||
<Segmented legend="Certificate" name="tls" bind:value={host.tls}
|
<Segmented legend="Certificate" name="tls" bind:value={host.tls}
|
||||||
options={[{ value: "domi", label: "Domi certificate" }, { value: "letsencrypt", label: "Let's Encrypt" }]} />
|
options={[{ value: "domi", label: "Domi certificate" }, { value: "letsencrypt", label: "Let's Encrypt" }]} />
|
||||||
@@ -437,77 +449,77 @@
|
|||||||
<Segmented legend="Who can open it" name="auth" bind:value={host.auth} disabled={signinOk ? [] : ["forward-auth"]}
|
<Segmented legend="Who can open it" name="auth" bind:value={host.auth} disabled={signinOk ? [] : ["forward-auth"]}
|
||||||
options={[{ value: "forward-auth", label: "Sign in first" }, { value: "none", label: "Anyone" }]} />
|
options={[{ value: "forward-auth", label: "Sign in first" }, { value: "none", label: "Anyone" }]} />
|
||||||
{#if !signinOk}<p class="ia-hint">Sign-in is not set up on this server yet, so choose Anyone for now. To set it up, add the Authelia address to ianitor.toml in the routes repository.</p>{/if}
|
{#if !signinOk}<p class="ia-hint">Sign-in is not set up on this server yet, so choose Anyone for now. To set it up, add the Authelia address to ianitor.toml in the routes repository.</p>{/if}
|
||||||
{#if errAt("auth")}<p class="domi-error"><Icon name="ring" />{errAt("auth").message}</p>{/if}
|
{#if errAt("auth")}<p class="ia-error"><Icon name="ring" />{errAt("auth").message}</p>{/if}
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<button type="button" class="domi-btn link" aria-expanded={more} aria-controls="more-options" onclick={() => (more = !more)}>
|
<button type="button" class="ia-link" aria-expanded={more} aria-controls="more-options" onclick={() => (more = !more)}>
|
||||||
More options: headers, websockets, health check, share links, visit log
|
More options: headers, websockets, health check, share links, visit log
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
{#if more}
|
{#if more}
|
||||||
<div id="more-options" class="more">
|
<div id="more-options" class="more">
|
||||||
<div class="domi-field">
|
<div class="ia-field">
|
||||||
<span class="domi-field-label">Health check</span>
|
<span class="ia-field-label">Health check</span>
|
||||||
<label class="ia-check"><input type="checkbox" bind:checked={host.hc} /> Check that it answers</label>
|
<Checkbox bind:checked={host.hc} label="Check that it answers" />
|
||||||
<p class="ia-hint">Ianitor asks this address regularly and shows the result on the main screen.</p>
|
<p class="ia-hint">Ianitor asks this address regularly and shows the result on the main screen.</p>
|
||||||
</div>
|
</div>
|
||||||
{#if host.hc}
|
{#if host.hc}
|
||||||
<div class="domi-field">
|
<div class="ia-field" onfocusout={() => blur("health_check.path")}>
|
||||||
<label class="domi-field-label" for={fieldId("health_check.path")}>Health check address</label>
|
<TextField id={fieldId("health_check.path")} label="Health check address" bind:value={host.hcPath} spellcheck={false}
|
||||||
<input id={fieldId("health_check.path")} class="domi-input" bind:value={host.hcPath} aria-invalid={errAt("health_check.path") ? "true" : undefined} onblur={() => blur("health_check.path")} />
|
autocomplete="off" {...seal("health_check.path")} error={errAt("health_check.path")?.message}
|
||||||
{#if errAt("health_check.path")}<p class="domi-error"><Icon name="ring" />{errAt("health_check.path").message}</p>{/if}
|
hint="Use an address that answers without signing in, like /health." />
|
||||||
<p class="ia-hint">Use an address that answers without signing in, like /health.</p>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="domi-field">
|
<div class="ia-field">
|
||||||
<label class="domi-field-label" for={fieldId("health_check.interval_secs")}>Checks every</label>
|
<label class="ia-field-label" for={fieldId("health_check.interval_secs")}>Checks every</label>
|
||||||
<div class="row"><input id={fieldId("health_check.interval_secs")} class="domi-input narrow" type="number" min="1" max="3600" bind:value={host.hcEvery} onblur={() => blur("health_check.interval_secs")} /> <span class="ia-text2">seconds</span></div>
|
<div class="row"><input id={fieldId("health_check.interval_secs")} class="ia-input narrow" type="number" min="1" max="3600" bind:value={host.hcEvery} onblur={() => blur("health_check.interval_secs")} /> <span class="ia-text2">seconds</span></div>
|
||||||
{#if errAt("health_check.interval_secs")}<p class="domi-error"><Icon name="ring" />{errAt("health_check.interval_secs").message}</p>{/if}
|
{#if errAt("health_check.interval_secs")}<p class="ia-error"><Icon name="ring" />{errAt("health_check.interval_secs").message}</p>{/if}
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<div class="domi-field">
|
<div class="ia-field">
|
||||||
<span class="domi-field-label">Websockets</span>
|
<span class="ia-field-label">Websockets</span>
|
||||||
<label class="ia-check"><input type="checkbox" bind:checked={host.websockets} /> Allow websockets</label>
|
<Checkbox bind:checked={host.websockets} label="Allow websockets" />
|
||||||
<p class="ia-hint">Live updates for apps like Home Assistant. Leave on unless you know the app does not need them.</p>
|
<p class="ia-hint">Live updates for apps like Home Assistant. Leave on unless you know the app does not need them.</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="domi-field">
|
<div class="ia-field">
|
||||||
<span class="domi-field-label">Share links</span>
|
<span class="ia-field-label">Share links</span>
|
||||||
<label class="ia-check"><input type="checkbox" bind:checked={host.share_links} /> Allow share links</label>
|
<Checkbox bind:checked={host.share_links} label="Allow share links" />
|
||||||
<p class="ia-hint">Lets you make links that open this host without signing in, until they expire.</p>
|
<p class="ia-hint">Lets you make links that open this host without signing in, until they expire.</p>
|
||||||
{#if shareWarning}<p class="ia-hint">Anyone can already open {name}, so a share link changes nothing.</p>{/if}
|
{#if shareWarning}<p class="ia-hint">Anyone can already open {name}, so a share link changes nothing.</p>{/if}
|
||||||
</div>
|
</div>
|
||||||
<div class="domi-field">
|
<div class="ia-field">
|
||||||
<span class="domi-field-label">Device certificates</span>
|
<span class="ia-field-label">Device certificates</span>
|
||||||
<label class="ia-check"><input type="checkbox" bind:checked={host.device_certs} /> Only devices with a Domi device certificate</label>
|
<Checkbox bind:checked={host.device_certs} label="Only devices with a Domi device certificate" />
|
||||||
<p class="ia-hint">Phones, computers and apps need a certificate from Certificates before they can open it.</p>
|
<p class="ia-hint">Phones, computers and apps need a certificate from Certificates before they can open it.</p>
|
||||||
</div>
|
</div>
|
||||||
<Segmented legend="Visit log" name="access_log" bind:value={host.access_log} options={[{ value: "off", label: "Off" }, { value: "truncated", label: "On" }]} />
|
<Segmented legend="Visit log" name="access_log" bind:value={host.access_log} options={[{ value: "off", label: "Off" }, { value: "truncated", label: "On" }]} />
|
||||||
<p class="ia-hint">On keeps a log on this server, with visitor addresses shortened.</p>
|
<p class="ia-hint">On keeps a log on this server, with visitor addresses shortened.</p>
|
||||||
{#each [{ list: "request_headers", rules: host.req, title: "Header rules sent to your service", secrets: true }, { list: "response_headers", rules: host.resp, title: "Header rules sent back to visitors", secrets: false }] as group (group.list)}
|
{#each [{ list: "request_headers", rules: host.req, title: "Header rules sent to your service", secrets: true }, { list: "response_headers", rules: host.resp, title: "Header rules sent back to visitors", secrets: false }] as group (group.list)}
|
||||||
<div class="domi-field">
|
<div class="ia-field">
|
||||||
<span class="domi-field-label">{group.title}</span>
|
<span class="ia-field-label">{group.title}</span>
|
||||||
{#each group.rules as r, i (i)}
|
{#each group.rules as r, i (i)}
|
||||||
{@const p = `${group.list}[${i}]`}
|
{@const p = `${group.list}[${i}]`}
|
||||||
<div class="rule ia-card">
|
<div class="rule ia-card">
|
||||||
<Segmented legend="Rule {i + 1}" name="{p}-action" bind:value={r.action} options={[{ value: "set", label: "Set" }, { value: "remove", label: "Remove" }]} />
|
<Segmented legend="Rule {i + 1}" name="{p}-action" bind:value={r.action} options={[{ value: "set", label: "Set" }, { value: "remove", label: "Remove" }]} />
|
||||||
<label class="domi-field-label" for={fieldId(p + ".name")}>Header name</label>
|
<div onfocusout={() => blur(p + ".name")}>
|
||||||
<input id={fieldId(p + ".name")} class="domi-input" bind:value={r.name} onblur={() => blur(p + ".name")} />
|
<TextField id={fieldId(p + ".name")} label="Header name" bind:value={r.name} spellcheck={false} autocomplete="off" {...seal(p + ".name")} />
|
||||||
|
</div>
|
||||||
{#if r.action === "set"}
|
{#if r.action === "set"}
|
||||||
{#if group.secrets}
|
{#if group.secrets}
|
||||||
<Segmented legend="Value" name="{p}-kind" bind:value={r.kind} disabled={(site?.secrets.length ?? 0) === 0 ? ["secret"] : []} options={[{ value: "value", label: "Fixed value" }, { value: "secret", label: "Secret" }]} />
|
<Segmented legend="Value" name="{p}-kind" bind:value={r.kind} disabled={(site?.secrets.length ?? 0) === 0 ? ["secret"] : []} options={[{ value: "value", label: "Fixed value" }, { value: "secret", label: "Secret" }]} />
|
||||||
{/if}
|
{/if}
|
||||||
{#if r.kind === "secret" && group.secrets}
|
{#if r.kind === "secret" && group.secrets}
|
||||||
<select class="domi-input" bind:value={r.secret} aria-label="Secret">
|
<Select label="Secret" bind:value={r.secret} options={(site?.secrets ?? []).map((s) => ({ value: s, label: s }))} />
|
||||||
{#each site?.secrets ?? [] as s (s)}<option value={s}>{s}</option>{/each}
|
|
||||||
</select>
|
|
||||||
{:else}
|
{:else}
|
||||||
<input class="domi-input" bind:value={r.value} aria-label="Value" onblur={() => blur(p + ".value")} />
|
<div onfocusout={() => blur(p + ".value")}>
|
||||||
|
<TextField label="Value" hideLabel bind:value={r.value} spellcheck={false} autocomplete="off" {...seal(p + ".value")} />
|
||||||
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
{#each Object.entries(errors).filter(([k]) => k.startsWith(p)) as [, e] (e.code + e.field)}<p class="domi-error"><Icon name="ring" />{e.message}</p>{/each}
|
{#each Object.entries(errors).filter(([k]) => k.startsWith(p)) as [, e] (e.code + e.field)}<p class="ia-error"><Icon name="ring" />{e.message}</p>{/each}
|
||||||
<button type="button" class="ia-icon-btn" aria-label="Remove this rule" onclick={() => group.rules.splice(i, 1)}><Icon name="trash" /></button>
|
<button type="button" class="ia-icon-btn" aria-label="Remove this rule" onclick={() => group.rules.splice(i, 1)}><Icon name="trash" /></button>
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
<div><button type="button" class="domi-btn link" onclick={() => group.rules.push({ action: "set", name: "", kind: "value", value: "", secret: site?.secrets[0] ?? "" })}>Add a rule</button></div>
|
<div><button type="button" class="ia-link" onclick={() => group.rules.push({ action: "set", name: "", kind: "value", value: "", secret: site?.secrets[0] ?? "" })}>Add a rule</button></div>
|
||||||
{#if group.secrets && (site?.secrets.length ?? 0) === 0}<p class="ia-hint">No secrets are listed in ianitor.toml.</p>{/if}
|
{#if group.secrets && (site?.secrets.length ?? 0) === 0}<p class="ia-hint">No secrets are listed in ianitor.toml.</p>{/if}
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
@@ -531,6 +543,7 @@
|
|||||||
<style>
|
<style>
|
||||||
form { display: flex; flex-direction: column; gap: 16px; }
|
form { display: flex; flex-direction: column; gap: 16px; }
|
||||||
.row { display: flex; gap: 8px; align-items: center; }
|
.row { display: flex; gap: 8px; align-items: center; }
|
||||||
|
.grow { flex: 1 1 auto; min-width: 0; }
|
||||||
.more { display: flex; flex-direction: column; gap: 16px; }
|
.more { display: flex; flex-direction: column; gap: 16px; }
|
||||||
.rule { display: flex; flex-direction: column; gap: 8px; }
|
.rule { display: flex; flex-direction: column; gap: 8px; }
|
||||||
.narrow { max-width: 8rem; }
|
.narrow { max-width: 8rem; }
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
// Links off: "Turn on share links" applies the change, then Copy link (4 clicks: open
|
// Links off: "Turn on share links" applies the change, then Copy link (4 clicks: open
|
||||||
// question Q1 is not decided, so this is the fallback path the design allows).
|
// question Q1 is not decided, so this is the fallback path the design allows).
|
||||||
import { onDestroy, onMount } from "svelte";
|
import { onDestroy, onMount } from "svelte";
|
||||||
|
import { DomiError, TextField } from "@domi/ui";
|
||||||
import { Banner, Button, Dialog, Icon, Segmented } from "@ianitor/ui";
|
import { Banner, Button, Dialog, Icon, Segmented } from "@ianitor/ui";
|
||||||
import ApplyProgress from "./ApplyProgress.svelte";
|
import ApplyProgress from "./ApplyProgress.svelte";
|
||||||
import { ApiError, call, del, newKey, patch, sentence } from "../lib/api";
|
import { ApiError, call, del, newKey, patch, sentence } from "../lib/api";
|
||||||
@@ -64,6 +65,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The seals of the two fields (domi-design TextField): a new link with this prefix or password, or the reason not.
|
||||||
|
async function remint(field: "path_prefix" | "password") {
|
||||||
|
await mint();
|
||||||
|
if (fieldErr?.field === field) throw new DomiError(fieldErr.message);
|
||||||
|
}
|
||||||
|
|
||||||
async function copy() {
|
async function copy() {
|
||||||
if (!link) return;
|
if (!link) return;
|
||||||
try {
|
try {
|
||||||
@@ -111,7 +118,7 @@
|
|||||||
{:else}
|
{:else}
|
||||||
<p><strong>Share links are off for {hostname}.</strong></p>
|
<p><strong>Share links are off for {hostname}.</strong></p>
|
||||||
<p class="ia-text2">Turning them on is a change to the host, checked like any other.</p>
|
<p class="ia-text2">Turning them on is a change to the host, checked like any other.</p>
|
||||||
{#if problem}<p class="domi-error" role="alert"><Icon name="ring" />{problem}</p>{/if}
|
{#if problem}<p class="ia-error" role="alert"><Icon name="ring" />{problem}</p>{/if}
|
||||||
<div><Button variant="outline" onclick={turnOn} disabled={!!app.overview?.paused}>Turn on share links</Button></div>
|
<div><Button variant="outline" onclick={turnOn} disabled={!!app.overview?.paused}>Turn on share links</Button></div>
|
||||||
{/if}
|
{/if}
|
||||||
{:else}
|
{:else}
|
||||||
@@ -130,34 +137,32 @@
|
|||||||
<p class="ia-status" data-s="kept" role="status"><Icon name="check" /><span>Copied</span></p>
|
<p class="ia-status" data-s="kept" role="status"><Icon name="check" /><span>Copied</span></p>
|
||||||
<p class="ia-hint">Expires on {longDate(link?.expires_at)}. To stop it sooner: Settings, Share links, Stop this link.</p>
|
<p class="ia-hint">Expires on {longDate(link?.expires_at)}. To stop it sooner: Settings, Share links, Stop this link.</p>
|
||||||
{:else}
|
{:else}
|
||||||
<Button variant="primary" full icon="copy" onclick={copy} disabled={!link || minting} data-autofocus>Copy link</Button>
|
<Button variant="primary" full icon="copy" onclick={copy} pending={minting || (!link && !problem && !fieldErr)} disabled={!link && !minting && !!(problem || fieldErr)} data-autofocus>Copy link</Button>
|
||||||
{/if}
|
{/if}
|
||||||
{#if refused}<p class="ia-hint" role="alert">Your browser did not allow copying. Press Ctrl+C to copy the selected link.</p>{/if}
|
{#if refused}<p class="ia-hint" role="alert">Your browser did not allow copying. Press Ctrl+C to copy the selected link.</p>{/if}
|
||||||
{#if copiedBefore && !copied}<p class="ia-hint">The link you copied before is stopped. Copy this one.</p>{/if}
|
{#if copiedBefore && !copied}<p class="ia-hint">The link you copied before is stopped. Copy this one.</p>{/if}
|
||||||
|
|
||||||
<Segmented legend="Expires after" name="expiry" bind:value={days} onchange={() => mint()}
|
<Segmented legend="Expires after" name="expiry" bind:value={days} onchange={() => mint()}
|
||||||
options={[{ value: "1", label: "1 day" }, { value: "7", label: "7 days" }, { value: "30", label: "30 days" }]} />
|
options={[{ value: "1", label: "1 day" }, { value: "7", label: "7 days" }, { value: "30", label: "30 days" }]} />
|
||||||
<div class="domi-field">
|
<div class="ia-field" onfocusout={(e) => { if (!e.currentTarget.contains(e.relatedTarget as Node | null)) void mint(); }}>
|
||||||
<label class="domi-field-label" for="share-prefix">Only addresses starting with</label>
|
<TextField id="share-prefix" label="Only addresses starting with" bind:value={prefix} spellcheck={false} autocomplete="off"
|
||||||
<input id="share-prefix" class="domi-input" bind:value={prefix} onblur={() => mint()} onkeydown={(e) => { if (e.key === "Enter") { e.preventDefault(); void mint(); } }}
|
action="save" actionLabel="Make the link for these addresses" onsend={() => remint("path_prefix")}
|
||||||
aria-invalid={fieldErr?.field === "path_prefix" ? "true" : undefined} />
|
error={fieldErr?.field === "path_prefix" ? fieldErr.message : undefined}
|
||||||
{#if fieldErr?.field === "path_prefix"}<p class="domi-error"><Icon name="ring" />{fieldErr.message}</p>{/if}
|
hint="/ shares the whole site. Try /share/summer-2026 for one album." />
|
||||||
<p class="ia-hint">/ shares the whole site. Try /share/summer-2026 for one album.</p>
|
|
||||||
</div>
|
</div>
|
||||||
{#if usingPassword}
|
{#if usingPassword}
|
||||||
<p class="ia-hint">This link asks for the password.</p>
|
<p class="ia-hint">This link asks for the password.</p>
|
||||||
<div><button type="button" class="domi-btn link" onclick={() => { usingPassword = false; password = ""; void mint(); }}>Remove the password</button></div>
|
<div><button type="button" class="ia-link" onclick={() => { usingPassword = false; password = ""; void mint(); }}>Remove the password</button></div>
|
||||||
{:else if showPassword}
|
{:else if showPassword}
|
||||||
<div class="domi-field">
|
<div class="ia-field">
|
||||||
<label class="domi-field-label" for="share-password">Password</label>
|
<TextField id="share-password" label="Password" type="password" autocomplete="new-password" bind:value={password}
|
||||||
<input id="share-password" class="domi-input" type="password" autocomplete="new-password" bind:value={password}
|
action="save" actionLabel="Ask for this password on the link" onsend={() => { usingPassword = true; return remint("password"); }}
|
||||||
aria-invalid={fieldErr?.field === "password" ? "true" : undefined} />
|
error={fieldErr?.field === "password" ? fieldErr.message : undefined}
|
||||||
{#if fieldErr?.field === "password"}<p class="domi-error"><Icon name="ring" />{fieldErr.message}</p>{/if}
|
hint="At least 8 characters. Send it to them separately." />
|
||||||
<p class="ia-hint">At least 8 characters. Send it to them separately.</p>
|
|
||||||
<div><Button onclick={() => { usingPassword = true; void mint(); }}>Use this password</Button></div>
|
<div><Button onclick={() => { usingPassword = true; void mint(); }}>Use this password</Button></div>
|
||||||
</div>
|
</div>
|
||||||
{:else}
|
{:else}
|
||||||
<div><button type="button" class="domi-btn link" onclick={() => (showPassword = true)}>Add a password</button></div>
|
<div><button type="button" class="ia-link" onclick={() => (showPassword = true)}>Add a password</button></div>
|
||||||
{/if}
|
{/if}
|
||||||
{/if}
|
{/if}
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|||||||
@@ -3,9 +3,10 @@
|
|||||||
// License 1.0: see LICENSE (its Exhibit A is this file's notice).
|
// License 1.0: see LICENSE (its Exhibit A is this file's notice).
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The attribution of LICENSE, Exhibit B. CPAL §14 asks for it on the interface a user reaches the code through,
|
* The Attribution Information of LICENSE, Exhibit B: Ianitor's credit, word for word the same as @domi/ui's
|
||||||
* and §15 counts use over a network: every screen of the web UI shows it (the sidebar, or the page foot on a phone),
|
* (DOMI_ATTRIBUTION; tests/demo.test.ts checks they match). The web UI shows it through <DomiCredit /> on every
|
||||||
* and Settings, About shows it in full.
|
* screen (CPAL §14; §15 counts use over a network). Kept here as plain data for the e2e real-data check, which
|
||||||
|
* runs in Node and leaves out exactly these words.
|
||||||
*/
|
*/
|
||||||
export const CREDIT = {
|
export const CREDIT = {
|
||||||
phrase: "Built on Domi",
|
phrase: "Built on Domi",
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
// Copyright (c) 2026 Marek Novák. Part of Ianitor, under the Common Public Attribution
|
// Copyright (c) 2026 Marek Novák. Part of Ianitor, under the Common Public Attribution
|
||||||
// License 1.0: see LICENSE (its Exhibit A is this file's notice).
|
// License 1.0: see LICENSE (its Exhibit A is this file's notice).
|
||||||
|
|
||||||
|
// The styles, once: @domi/ui (the Domi faces, the roles with Ianitor's values from data-domi-room="ianitor" on
|
||||||
|
// <html>, the controls), then Ianitor's own tokens and components on top.
|
||||||
|
import "@domi/ui/domi.css";
|
||||||
import "@ianitor/ui/tokens.css";
|
import "@ianitor/ui/tokens.css";
|
||||||
import "@ianitor/ui/components.css";
|
import "@ianitor/ui/components.css";
|
||||||
import { mount } from "svelte";
|
import { mount } from "svelte";
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
// the install (the accepted 4th click). Until Custos can approve, approval is the server
|
// the install (the accepted 4th click). Until Custos can approve, approval is the server
|
||||||
// command control names (docs/pki.md).
|
// command control names (docs/pki.md).
|
||||||
import { onDestroy, onMount } from "svelte";
|
import { onDestroy, onMount } from "svelte";
|
||||||
|
import { TextField } from "@domi/ui";
|
||||||
import { Banner, Button, Dialog, Icon, Segmented, Status } from "@ianitor/ui";
|
import { Banner, Button, Dialog, Icon, Segmented, Status } from "@ianitor/ui";
|
||||||
import HostMenu from "../components/HostMenu.svelte";
|
import HostMenu from "../components/HostMenu.svelte";
|
||||||
import IntermediateBanner from "../components/IntermediateBanner.svelte";
|
import IntermediateBanner from "../components/IntermediateBanner.svelte";
|
||||||
@@ -184,12 +185,9 @@
|
|||||||
<Dialog title="New device certificate" kind="panel" onclose={closeForm}>
|
<Dialog title="New device certificate" kind="panel" onclose={closeForm}>
|
||||||
{#if !request}
|
{#if !request}
|
||||||
<form id="device-form" onsubmit={issue} class="form">
|
<form id="device-form" onsubmit={issue} class="form">
|
||||||
<div class="domi-field">
|
<TextField id="device-name" label="Device name" bind:value={name} autocomplete="off" action="send"
|
||||||
<label class="domi-field-label" for="device-name">Device name</label>
|
actionLabel="Request the certificate" clearOnSend={false} error={nameErr ?? undefined}
|
||||||
<input id="device-name" class="domi-input" bind:value={name} autocomplete="off" aria-invalid={nameErr ? "true" : undefined} aria-describedby="device-name-h" />
|
hint="Shown in this list and inside the certificate." />
|
||||||
{#if nameErr}<p class="domi-error"><Icon name="ring" />{nameErr}</p>{/if}
|
|
||||||
<p class="ia-hint" id="device-name-h">Shown in this list and inside the certificate.</p>
|
|
||||||
</div>
|
|
||||||
<Segmented legend="What is it" name="kind" bind:value={kind} options={[{ value: "phone", label: "Phone or tablet" }, { value: "computer", label: "Computer" }, { value: "app", label: "Domi app" }]} />
|
<Segmented legend="What is it" name="kind" bind:value={kind} options={[{ value: "phone", label: "Phone or tablet" }, { value: "computer", label: "Computer" }, { value: "app", label: "Domi app" }]} />
|
||||||
<p class="ia-hint">{#if capped}Valid until {until}, when the Domi intermediate certificate ends (renew it to issue for a full year).{:else}Valid for {lifetime} days, until {until}.{/if} It lets this device into hosts that ask for a Domi device certificate.</p>
|
<p class="ia-hint">{#if capped}Valid until {until}, when the Domi intermediate certificate ends (renew it to issue for a full year).{:else}Valid for {lifetime} days, until {until}.{/if} It lets this device into hosts that ask for a Domi device certificate.</p>
|
||||||
</form>
|
</form>
|
||||||
@@ -245,8 +243,8 @@
|
|||||||
|
|
||||||
<style>
|
<style>
|
||||||
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
|
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
|
||||||
.devices { list-style: none; margin: 0; padding: 0; border: 1px solid var(--hairline); border-radius: var(--radius-lg); }
|
.devices { list-style: none; margin: 0; padding: 0; border: 1px solid var(--domi-line); border-radius: var(--radius-lg); }
|
||||||
.devices li { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; min-height: 56px; padding: 6px 10px 6px 16px; border-top: 1px solid var(--hairline); }
|
.devices li { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; min-height: 56px; padding: 6px 10px 6px 16px; border-top: 1px solid var(--domi-line); }
|
||||||
.devices li:first-child { border-top: 0; }
|
.devices li:first-child { border-top: 0; }
|
||||||
.dname { font-weight: 600; flex: 1 1 140px; }
|
.dname { font-weight: 600; flex: 1 1 140px; }
|
||||||
.confirm { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex-basis: 100%; }
|
.confirm { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; flex-basis: 100%; }
|
||||||
|
|||||||
@@ -98,7 +98,7 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<h1 class="ia-display">{host ? `History of ${host}` : "History"}</h1>
|
<h1 class="ia-display">{host ? `History of ${host}` : "History"}</h1>
|
||||||
{#if host}<div><button type="button" class="domi-btn link" onclick={() => navigate("/history")}>Show all changes</button></div>{/if}
|
{#if host}<div><button type="button" class="ia-link" onclick={() => navigate("/history")}>Show all changes</button></div>{/if}
|
||||||
{#if problem}<Banner tone="notice" live="status">{#snippet title()}{problem}{/snippet}</Banner>{/if}
|
{#if problem}<Banner tone="notice" live="status">{#snippet title()}{problem}{/snippet}</Banner>{/if}
|
||||||
|
|
||||||
<div class="cols">
|
<div class="cols">
|
||||||
@@ -168,11 +168,11 @@
|
|||||||
.cols { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
|
.cols { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
|
||||||
.list { flex: 1 1 360px; max-width: 520px; display: flex; flex-direction: column; gap: 8px; }
|
.list { flex: 1 1 360px; max-width: 520px; display: flex; flex-direction: column; gap: 8px; }
|
||||||
.entries { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
|
.entries { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
|
||||||
.entry { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid transparent; background: none; color: var(--text); text-align: left; cursor: pointer; }
|
.entry { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; width: 100%; min-height: 44px; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid transparent; background: none; color: var(--domi-fg); text-align: left; cursor: pointer; }
|
||||||
.entry:hover { background: var(--surface); }
|
.entry:hover { background: var(--domi-panel); }
|
||||||
.entry[aria-current="true"] { background: var(--surface-2); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
|
.entry[aria-current="true"] { background: var(--domi-hover); border-color: color-mix(in srgb, var(--domi-accent) 55%, transparent); }
|
||||||
.sum { font-weight: 600; }
|
.sum { font-weight: 600; }
|
||||||
.detail { flex: 2 1 360px; background: var(--colonnade); border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
|
.detail { flex: 2 1 360px; background: var(--domi-chrome); border: 1px solid var(--domi-line); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
|
||||||
.detail ul { margin: 0; padding-left: 1.1rem; }
|
.detail ul { margin: 0; padding-left: 1.1rem; }
|
||||||
.buttons { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
|
.buttons { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -112,7 +112,7 @@
|
|||||||
Routes live in the {o.repo.name} repository, one file per host.
|
Routes live in the {o.repo.name} repository, one file per host.
|
||||||
{#if o.repo.last_push_at}Last pushed to Gitea {atTime(o.repo.last_push_at, app.now)}.{/if}
|
{#if o.repo.last_push_at}Last pushed to Gitea {atTime(o.repo.last_push_at, app.now)}.{/if}
|
||||||
{#if o.repo.unpushed}{o.repo.unpushed} changes not yet pushed.{/if}
|
{#if o.repo.unpushed}{o.repo.unpushed} changes not yet pushed.{/if}
|
||||||
<button type="button" class="domi-btn link" onclick={() => navigate("/history")}>See history</button>
|
<button type="button" class="ia-link" onclick={() => navigate("/history")}>See history</button>
|
||||||
</p>
|
</p>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
// Handoff §13.6: signing the intermediate by hand on the offline computer (the temporary step
|
// Handoff §13.6: signing the intermediate by hand on the offline computer (the temporary step
|
||||||
// until Custos can sign, docs/pki.md). The root key never comes to this server.
|
// until Custos can sign, docs/pki.md). The root key never comes to this server.
|
||||||
|
import { TextField } from "@domi/ui";
|
||||||
import { Banner, Button, Icon } from "@ianitor/ui";
|
import { Banner, Button, Icon } from "@ianitor/ui";
|
||||||
import { ApiError, post, put, sentence } from "../lib/api";
|
import { ApiError, post, put, sentence } from "../lib/api";
|
||||||
import { app, navigate, refresh } from "../lib/app.svelte";
|
import { app, navigate, refresh } from "../lib/app.svelte";
|
||||||
@@ -120,24 +121,22 @@
|
|||||||
<p class="ia-label">Step 3</p>
|
<p class="ia-label">Step 3</p>
|
||||||
<h2 class="ia-h3">Upload the signed certificate</h2>
|
<h2 class="ia-h3">Upload the signed certificate</h2>
|
||||||
{#if paste}
|
{#if paste}
|
||||||
<div class="domi-field">
|
<TextField id="cert-paste" label="Signed certificate" multiline rows={8} enterSends="never" spellcheck={false} bind:value={pem}
|
||||||
<label class="domi-field-label" for="cert-paste">Signed certificate</label>
|
action="send" actionLabel="Use the pasted certificate" clearOnSend={false} onsend={() => { void use(); }} />
|
||||||
<textarea id="cert-paste" class="domi-input" rows="8" bind:value={pem} aria-invalid={err ? "true" : undefined}></textarea>
|
|
||||||
</div>
|
|
||||||
{:else}
|
{:else}
|
||||||
<div class="domi-field">
|
<div class="ia-field">
|
||||||
<label class="domi-field-label" for="cert-file">Signed certificate (.crt)</label>
|
<label class="ia-field-label" for="cert-file">Signed certificate (.crt)</label>
|
||||||
<input id="cert-file" class="domi-input" type="file" accept=".crt,.pem" onchange={file} aria-invalid={err ? "true" : undefined} />
|
<input id="cert-file" class="ia-input" type="file" accept=".crt,.pem" onchange={file} aria-invalid={err ? "true" : undefined} />
|
||||||
<div><button type="button" class="domi-btn link" onclick={() => (paste = true)}>Paste it instead</button></div>
|
<div><button type="button" class="ia-link" onclick={() => (paste = true)}>Paste it instead</button></div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{#if err}<p class="domi-error" role="alert"><Icon name="ring" />{err}</p>{/if}
|
{#if err}<p class="ia-error" role="alert"><Icon name="ring" />{err}</p>{/if}
|
||||||
<div><Button variant="primary" onclick={use} {pending} disabled={!pem.includes("BEGIN CERTIFICATE")}>Use this certificate</Button></div>
|
<div><Button variant="primary" onclick={use} {pending} disabled={!pem.includes("BEGIN CERTIFICATE")}>Use this certificate</Button></div>
|
||||||
</section>
|
</section>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.row { display: flex; gap: 8px; flex-wrap: wrap; }
|
.row { display: flex; gap: 8px; flex-wrap: wrap; }
|
||||||
.step { border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
|
.step { border: 1px solid var(--domi-line); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 10px; }
|
||||||
.fp { word-break: break-all; color: var(--accent-strong); }
|
.fp { word-break: break-all; color: var(--domi-accent-strong); }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -5,11 +5,11 @@
|
|||||||
// Handoff §8.3: Settings with General, API (⚙ → API → New token = 3 clicks, Copy token the
|
// Handoff §8.3: Settings with General, API (⚙ → API → New token = 3 clicks, Copy token the
|
||||||
// accepted 4th), Share links and About.
|
// accepted 4th), Share links and About.
|
||||||
import { onMount } from "svelte";
|
import { onMount } from "svelte";
|
||||||
|
import { DomiCredit, DomiError, TextField } from "@domi/ui";
|
||||||
import { Banner, Button, Dialog, Segmented } from "@ianitor/ui";
|
import { Banner, Button, Dialog, Segmented } from "@ianitor/ui";
|
||||||
import { ApiError, call, del, get, newKey, patch, post, sentence } from "../lib/api";
|
import { ApiError, call, del, get, newKey, patch, post, sentence } from "../lib/api";
|
||||||
import { app, navigate, toast } from "../lib/app.svelte";
|
import { app, navigate, toast } from "../lib/app.svelte";
|
||||||
import { longDate, shortDate, whenInline } from "../lib/format";
|
import { longDate, shortDate, whenInline } from "../lib/format";
|
||||||
import { CREDIT } from "../lib/credit";
|
|
||||||
import type { CreatedToken, ShareLink, TokenRow } from "../lib/types";
|
import type { CreatedToken, ShareLink, TokenRow } from "../lib/types";
|
||||||
|
|
||||||
let { tab }: { tab: string } = $props();
|
let { tab }: { tab: string } = $props();
|
||||||
@@ -93,23 +93,30 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Renames the new token now (its field's seal) or when the dialog closes. False when the name was refused.
|
||||||
|
async function rename(): Promise<boolean> {
|
||||||
|
if (!made || !tokenName.trim() || tokenName.trim() === made.name) return true;
|
||||||
|
nameErr = null;
|
||||||
|
try {
|
||||||
|
await patch(`/tokens/${encodeURIComponent(made.id)}`, { name: tokenName.trim() });
|
||||||
|
made.name = tokenName.trim();
|
||||||
|
toast("Renamed.");
|
||||||
|
} catch (e) {
|
||||||
|
if (e instanceof ApiError && e.code === "token.name") {
|
||||||
|
nameErr = e.body.message;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
async function closeToken(force = false) {
|
async function closeToken(force = false) {
|
||||||
if (!made) return;
|
if (!made) return;
|
||||||
if (!tokenCopied && !force) {
|
if (!tokenCopied && !force) {
|
||||||
askClose = true;
|
askClose = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (tokenName.trim() && tokenName !== made.name) {
|
if (!(await rename())) return;
|
||||||
try {
|
|
||||||
await patch(`/tokens/${encodeURIComponent(made.id)}`, { name: tokenName.trim() });
|
|
||||||
toast("Renamed.");
|
|
||||||
} catch (e) {
|
|
||||||
if (e instanceof ApiError && e.code === "token.name") {
|
|
||||||
nameErr = e.body.message;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// The token leaves memory with the dialog.
|
// The token leaves memory with the dialog.
|
||||||
made = null;
|
made = null;
|
||||||
tokenName = "";
|
tokenName = "";
|
||||||
@@ -170,7 +177,7 @@
|
|||||||
<p>{settings?.watch_seconds ?? app.overview?.site?.watch_seconds ?? 60} seconds</p>
|
<p>{settings?.watch_seconds ?? app.overview?.site?.watch_seconds ?? 60} seconds</p>
|
||||||
<p class="ia-label">Signed in</p>
|
<p class="ia-label">Signed in</p>
|
||||||
<p>{viewer ? (viewer.via === "authelia" ? `${viewer.name} through Authelia` : `API token "${viewer.name}"`) : "Through Authelia"}</p>
|
<p>{viewer ? (viewer.via === "authelia" ? `${viewer.name} through Authelia` : `API token "${viewer.name}"`) : "Through Authelia"}</p>
|
||||||
{#if app.overview?.site?.auth_logout_url}<p><a class="domi-btn link" href={app.overview.site.auth_logout_url}>Sign out</a></p>{/if}
|
{#if app.overview?.site?.auth_logout_url}<p><a class="ia-link" href={app.overview.site.auth_logout_url}>Sign out</a></p>{/if}
|
||||||
{:else if tab === "api"}
|
{:else if tab === "api"}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<h2 class="ia-h3">API tokens</h2>
|
<h2 class="ia-h3">API tokens</h2>
|
||||||
@@ -236,9 +243,10 @@
|
|||||||
{:else}
|
{:else}
|
||||||
<p>Ianitor Domi 0.1.0</p>
|
<p>Ianitor Domi 0.1.0</p>
|
||||||
<p>CPAL-1.0 (Common Public Attribution License 1.0). Ianitor 0.2.0 and earlier stay MPL-2.0.</p>
|
<p>CPAL-1.0 (Common Public Attribution License 1.0). Ianitor 0.2.0 and earlier stay MPL-2.0.</p>
|
||||||
<p><a class="domi-btn link" href={CREDIT.url} rel="noreferrer">{CREDIT.phrase}</a> · {CREDIT.notice}</p>
|
<div class="about-credit"><DomiCredit /></div>
|
||||||
<p>Built, tested and signed by Fabrica Domi</p>
|
<p>Built, tested and signed by Fabrica Domi</p>
|
||||||
<p><a class="domi-btn link" href="https://gitea.marek-novak.cz/mnovak/Ianitor" rel="noreferrer">Source on Gitea</a></p>
|
<p>Using Ianitor over a network counts as distribution under CPAL-1.0 (§15), so its source, with any changes, stays
|
||||||
|
available: <a class="ia-link" href="https://gitea.marek-novak.cz/mnovak/Ianitor" rel="noreferrer">Source on Gitea</a></p>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -248,12 +256,9 @@
|
|||||||
<p class="ia-text2">Ianitor cannot show it again; if it is lost, make a new one and revoke this one.</p>
|
<p class="ia-text2">Ianitor cannot show it again; if it is lost, make a new one and revoke this one.</p>
|
||||||
<input class="ia-secret" readonly value={made.token} aria-label="New API token" onfocus={(e) => (e.currentTarget as HTMLInputElement).select()} />
|
<input class="ia-secret" readonly value={made.token} aria-label="New API token" onfocus={(e) => (e.currentTarget as HTMLInputElement).select()} />
|
||||||
<div class="grid">
|
<div class="grid">
|
||||||
<div class="domi-field">
|
<TextField id="token-name" label="Name" bind:value={tokenName} autocomplete="off" action="save" actionLabel="Rename the token"
|
||||||
<label class="domi-field-label" for="token-name">Name</label>
|
onsend={async () => { if (!(await rename())) throw new DomiError(nameErr ?? "That name was not accepted."); }}
|
||||||
<input id="token-name" class="domi-input" bind:value={tokenName} aria-invalid={nameErr ? "true" : undefined} />
|
error={nameErr ?? undefined} hint="Rename it now or later, so you know what uses it." />
|
||||||
{#if nameErr}<p class="domi-error">{nameErr}</p>{/if}
|
|
||||||
<p class="ia-hint">Rename it now or later, so you know what uses it.</p>
|
|
||||||
</div>
|
|
||||||
<Button variant={tokenCopied ? "quiet" : "primary"} icon="copy" onclick={copyToken} data-autofocus>{tokenCopied ? "Copy again" : "Copy token"}</Button>
|
<Button variant={tokenCopied ? "quiet" : "primary"} icon="copy" onclick={copyToken} data-autofocus>{tokenCopied ? "Copy again" : "Copy token"}</Button>
|
||||||
</div>
|
</div>
|
||||||
{#if tokenCopied}<p role="status">Copied. Paste it into Custos now. Ianitor cannot show it again.</p>{/if}
|
{#if tokenCopied}<p role="status">Copied. Paste it into Custos now. Ianitor cannot show it again.</p>{/if}
|
||||||
@@ -267,16 +272,17 @@
|
|||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
|
.about-credit :global(.domi-credit) { justify-content: flex-start; }
|
||||||
.tabs { display: flex; gap: 4px; overflow-x: auto; }
|
.tabs { display: flex; gap: 4px; overflow-x: auto; }
|
||||||
.tabs [role="tab"] { min-height: 44px; padding: 0 1rem; border-radius: var(--radius-sm); border: 0; background: none; color: var(--text-2); font-weight: 600; cursor: pointer; }
|
.tabs [role="tab"] { min-height: 44px; padding: 0 1rem; border-radius: var(--radius-sm); border: 0; background: none; color: var(--domi-fg-2); font-weight: 600; cursor: pointer; }
|
||||||
.tabs [role="tab"][aria-selected="true"] { background: var(--surface-2); color: var(--text); }
|
.tabs [role="tab"][aria-selected="true"] { background: var(--domi-hover); color: var(--domi-fg); }
|
||||||
.panel { display: flex; flex-direction: column; gap: 10px; }
|
.panel { display: flex; flex-direction: column; gap: 10px; }
|
||||||
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
|
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
|
||||||
.rows { list-style: none; margin: 0; padding: 0; }
|
.rows { list-style: none; margin: 0; padding: 0; }
|
||||||
.rows li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-height: 44px; padding: 8px 0; border-top: 1px solid var(--hairline); }
|
.rows li { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; min-height: 44px; padding: 8px 0; border-top: 1px solid var(--domi-line); }
|
||||||
.grow { flex: 1 1 200px; min-width: 0; }
|
.grow { flex: 1 1 200px; min-width: 0; }
|
||||||
.tname { font-weight: 600; }
|
.tname { font-weight: 600; }
|
||||||
.struck { text-decoration: line-through; color: var(--muted); }
|
.struck { text-decoration: line-through; color: var(--domi-muted); }
|
||||||
.grid { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
|
.grid { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
|
||||||
@media (max-width: 719.98px) { .grid { grid-template-columns: 1fr; } }
|
@media (max-width: 719.98px) { .grid { grid-template-columns: 1fr; } }
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ import { cleanup, render, waitFor } from "@testing-library/svelte";
|
|||||||
import { afterEach, describe, expect, it } from "vitest";
|
import { afterEach, describe, expect, it } from "vitest";
|
||||||
import App from "../src/App.svelte";
|
import App from "../src/App.svelte";
|
||||||
import { app } from "../src/lib/app.svelte";
|
import { app } from "../src/lib/app.svelte";
|
||||||
|
import { DOMI_ATTRIBUTION } from "@domi/ui";
|
||||||
|
import { CREDIT } from "../src/lib/credit";
|
||||||
import { SHOTS, demoApi, realLooking } from "./demo";
|
import { SHOTS, demoApi, realLooking } from "./demo";
|
||||||
|
|
||||||
let served: { status: number; path: string; text: string | null }[] = [];
|
let served: { status: number; path: string; text: string | null }[] = [];
|
||||||
@@ -55,6 +57,10 @@ describe("realLooking", () => {
|
|||||||
expect(realLooking("flowers.stage")).toEqual(["flowers.stage", "flowers"]);
|
expect(realLooking("flowers.stage")).toEqual(["flowers.stage", "flowers"]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("is the same credit as @domi/ui's, word for word", () => {
|
||||||
|
expect([CREDIT.phrase, CREDIT.url, CREDIT.notice]).toEqual([DOMI_ATTRIBUTION.phrase, DOMI_ATTRIBUTION.url, DOMI_ATTRIBUTION.copyright]);
|
||||||
|
});
|
||||||
|
|
||||||
it("leaves out only the licence's credit, exactly as written", () => {
|
it("leaves out only the licence's credit, exactly as written", () => {
|
||||||
expect(realLooking("Built on Domi · Copyright (c) 2026 Marek Novák https://aula.marek-novak.cz")).toEqual([]);
|
expect(realLooking("Built on Domi · Copyright (c) 2026 Marek Novák https://aula.marek-novak.cz")).toEqual([]);
|
||||||
expect(realLooking("Marek's server at https://aula.marek-novak.cz/hosts")).toContain("marek");
|
expect(realLooking("Marek's server at https://aula.marek-novak.cz/hosts")).toContain("marek");
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ rustPlatform.buildRustPackage {
|
|||||||
|
|
||||||
cargoLock = {
|
cargoLock = {
|
||||||
lockFile = ../../Cargo.lock;
|
lockFile = ../../Cargo.lock;
|
||||||
# domi-pki, the shared Domi CA (Cargo.toml pins tag v1.0.0): the NAR hash of its tree at that tag.
|
# domi-pki, the shared Domi CA (Cargo.toml pins tag v1.0.1, CPAL-1.0): the NAR hash of its tree at that tag.
|
||||||
outputHashes."domi-pki-1.0.0" = "sha256-JdknFJ5cxsI1/MtWmvsItoE6f7znJjUr4C/rwUEz9i4=";
|
outputHashes."domi-pki-1.0.1" = "sha256-C3l3Iqo1pFn/k977Y6TMGdh4aRDU76+W4/kyxv+1mXw=";
|
||||||
};
|
};
|
||||||
# libz-ng-sys (Pingora's compression) builds zlib-ng with CMake.
|
# libz-ng-sys (Pingora's compression) builds zlib-ng with CMake.
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
../../pnpm-lock.yaml
|
../../pnpm-lock.yaml
|
||||||
../../apps/web
|
../../apps/web
|
||||||
../../packages/ui
|
../../packages/ui
|
||||||
|
# @domi/ui, vendored from domi-design at a tag (docs/domi-ui.md): nothing is fetched from Gitea.
|
||||||
|
../../packages/domi-ui
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -27,7 +29,7 @@ stdenv.mkDerivation (finalAttrs: {
|
|||||||
inherit (finalAttrs) pname version src;
|
inherit (finalAttrs) pname version src;
|
||||||
pnpm = pnpm_11;
|
pnpm = pnpm_11;
|
||||||
fetcherVersion = 4;
|
fetcherVersion = 4;
|
||||||
hash = "sha256-Hq6LE6Bwb1AeMSMDF0RUbCSX+mMAl8uLt9rPwV6tKBs=";
|
hash = "sha256-OqQxC6gewmnTxYD5jjDA6l8Lcm/JXxGmLQoyZcXpIh8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
|||||||
+14
-1
@@ -170,7 +170,7 @@ Identity gate, tunnel, Domi templates, ACME server, HTTP/3, migrating public sit
|
|||||||
## 10. Handover
|
## 10. Handover
|
||||||
(Rewritten at the end of every session: what changed, what was not verified, which build is deployed, the next step.)
|
(Rewritten at the end of every session: what changed, what was not verified, which build is deployed, the next step.)
|
||||||
|
|
||||||
**2026-11-23: Ianitor is CPAL-1.0 (Mark's decision for every public Domi repo; F:Akcedomi-licence).**
|
**2026-11-23: Ianitor is CPAL-1.0 (Mark's decision for every public Domi repo; F:\Akce\domi-licence).**
|
||||||
- **Changed:** LICENSE is the kit's template with only `{ORIGINAL_CODE}` = Ianitor. Every header (166 files) is an
|
- **Changed:** LICENSE is the kit's template with only `{ORIGINAL_CODE}` = Ianitor. Every header (166 files) is an
|
||||||
`SPDX-License-Identifier: CPAL-1.0` notice; Cargo.toml, the fuzz crate, the three package.json, the Nix package
|
`SPDX-License-Identifier: CPAL-1.0` notice; Cargo.toml, the fuzz crate, the three package.json, the Nix package
|
||||||
meta (`lib.licenses.cpal10`), the OpenAPI document, README, CLAUDE.md, decision 9 and the docs say CPAL-1.0.
|
meta (`lib.licenses.cpal10`), the OpenAPI document, README, CLAUDE.md, decision 9 and the docs say CPAL-1.0.
|
||||||
@@ -181,6 +181,19 @@ Identity gate, tunnel, Domi templates, ACME server, HTTP/3, migrating public sit
|
|||||||
and control's API tests 5/5 in WSL. The rest of the Rust suites were not rerun (headers only).
|
and control's API tests 5/5 in WSL. The rest of the Rust suites were not rerun (headers only).
|
||||||
- **Deployed:** nothing. **Not verified:** the phone layout of the credit by eye; the Nix build (`cpal10`).
|
- **Deployed:** nothing. **Not verified:** the phone layout of the credit by eye; the Nix build (`cpal10`).
|
||||||
|
|
||||||
|
**2026-11-23: the web UI on @domi/ui, the shared Domi design system (docs/domi-ui.md); PR 14, squash-merged.**
|
||||||
|
- **Changed:** `@domi/ui` v1.0.4 (then v1.1.0) vendored in packages/domi-ui (domi-design tools/vendor.mjs; CPAL-1.0, unedited) and used as `workspace:*`; `<DomiCredit />` is the credit on every screen; its fonts, roles (`data-domi-room="ianitor"`,
|
||||||
|
the same hex) and controls replace Ianitor's copies. Buttons are its Button through Ianitor's adapter (desktop sizes
|
||||||
|
kept); every text field is its TextField with a seal; checkboxes, the secret picker and segmented controls are its
|
||||||
|
components. Ianitor's 22 role names are renamed to `--domi-*`; its own tokens and components stay in packages/ui.
|
||||||
|
Disabled buttons are natively disabled now (their reasons are visible text).
|
||||||
|
- **Tests:** vitest 23; svelte-check clean; Playwright web 6/6 (the Apply lookup is exact now), aula 5/5; 13 screens
|
||||||
|
compared before and after (in the PR). No Rust change.
|
||||||
|
- **Deployed:** nothing.
|
||||||
|
- **Nix:** `fetchPnpmDeps`'s hash is the one the NixOS runner reported (no Gitea login needed any more).
|
||||||
|
- **Not verified:** the full Nix build of .#ianitor; a phone (the 48 px touch sizes).
|
||||||
|
|
||||||
|
|
||||||
**2026-11-22: Phase 4, hardening and release.**
|
**2026-11-22: Phase 4, hardening and release.**
|
||||||
- **Changed:**
|
- **Changed:**
|
||||||
- Edge: a 60 s header deadline (slowloris), lookups on its own bounded resolver threads with one lookup per name, pipelining on both listeners, a proxy socket (`/run/ianitor-proxy/edge.sock`, sticky 3770) on which edge trusts Caddy's X-Forwarded-For, and `unix:` upstreams with a strict charset.
|
- Edge: a 60 s header deadline (slowloris), lookups on its own bounded resolver threads with one lookup per name, pipelining on both listeners, a proxy socket (`/run/ianitor-proxy/edge.sock`, sticky 3770) on which edge trusts Caddy's X-Forwarded-For, and `unix:` upstreams with a strict charset.
|
||||||
|
|||||||
@@ -0,0 +1,97 @@
|
|||||||
|
# Ianitor on @domi/ui
|
||||||
|
|
||||||
|
The web UI's controls and roles come from **@domi/ui**, the shared Domi design system (Gitea `mnovak/domi-design`,
|
||||||
|
its `docs/INTEGRATE.md` §6a and `docs/MIGRATION.md`). It is **vendored** at a tag in `packages/domi-ui` (CPAL-1.0,
|
||||||
|
like Ianitor; `VERSION` names the tag, v1.1.0; `LICENSE`, `NOTICE` and `VERSION` there stay unchanged) and used as a
|
||||||
|
workspace package by `apps/web` and `packages/ui`:
|
||||||
|
|
||||||
|
```json
|
||||||
|
"@domi/ui": "workspace:*"
|
||||||
|
```
|
||||||
|
|
||||||
|
Why vendored: domi-design is private on Gitea, and the Nix build (`deploy/nixos/web.nix`) fetches the pnpm
|
||||||
|
dependencies in a sandbox without credentials. A token there would land in the world-readable Nix store and be needed
|
||||||
|
on every builder. The vendored copy is offline, reproducible and secret-free; the lockfile names no Gitea repository.
|
||||||
|
|
||||||
|
**Do not edit `packages/domi-ui`.** Changes go to domi-design as a PR. To upgrade, read the next tag's CHANGELOG.md,
|
||||||
|
then from a clone of domi-design run `node tools/vendor.mjs <this repo>/packages/domi-ui vX.Y.Z`, `pnpm install`, and
|
||||||
|
update `fetchPnpmDeps`'s hash in `deploy/nixos/web.nix` (`lib.fakeHash`, build, paste the hash Nix reports).
|
||||||
|
|
||||||
|
## What comes from where
|
||||||
|
|
||||||
|
| Part | From | Notes |
|
||||||
|
| :-- | :-- | :-- |
|
||||||
|
| Fonts (Cinzel, Cormorant Garamond, Manrope; latin and latin-ext) | @domi/ui `domi.css` | bundled from npm, nothing fetched at run time. The `@fontsource` packages are gone |
|
||||||
|
| Roles: ground, text, accent, leaf, ok, warning, danger | @domi/ui, `data-domi-room="ianitor"` on `<html>` | the same hex as before (domi-design PALETTE.md). Ianitor's old names are renamed to `--domi-*` (MIGRATION.md, ianitor table); no legacy alias file |
|
||||||
|
| Buttons | @domi/ui `Button`, through Ianitor's `Button.svelte` | see the mapping below |
|
||||||
|
| Text fields | @domi/ui `TextField`, every one with its seal | see the actions below |
|
||||||
|
| Checkboxes, the secret picker, segmented controls | @domi/ui `Checkbox`, `Select`, `Segmented` | Ianitor's `Segmented.svelte` keeps the visible name above the choices |
|
||||||
|
| Banners, dialogs, status, chips, lists, menus, toasts, the number and file inputs | Ianitor (`packages/ui`, `ia-*`) | Ianitor's own tokens (status names, washes, type sizes, spacing, radii) stay in `packages/ui/src/tokens.css` |
|
||||||
|
|
||||||
|
`packages/ui` is now Ianitor's own components on top of @domi/ui. Its old `.domi-btn`, `.domi-field` and
|
||||||
|
`.domi-input` rules are gone (they had the same class names as @domi/ui's); the link-style button is `.ia-link`.
|
||||||
|
|
||||||
|
## Buttons
|
||||||
|
|
||||||
|
| Ianitor | @domi/ui | Desktop height |
|
||||||
|
| :-- | :-- | :-- |
|
||||||
|
| default (`quiet`), `outline` | `plate`, size `lg` | 44 px, as before |
|
||||||
|
| `primary` | `primary` (the leaf), size `xl` | 50 px, as before |
|
||||||
|
| `danger` | `danger`, size `lg` | 44 px |
|
||||||
|
| `small` | size `md` | 34 px (was 36) |
|
||||||
|
| `full` | `block` | |
|
||||||
|
| `pending` | `status="loading"` (the interpuncts) | |
|
||||||
|
| `label` | the accessible name, through `aria-labelledby` | "+ Host" is still "Add a host" |
|
||||||
|
|
||||||
|
On a touch screen every button is at least 48 px (@domi/ui). An `onclick` that returns a Promise shows loading,
|
||||||
|
then a check or a refusal, by itself.
|
||||||
|
|
||||||
|
**A change in behaviour:** a disabled button is now natively disabled, so it is skipped by Tab. Before, it was
|
||||||
|
`aria-disabled` and stayed focusable so its reason could be read. Every disabled button with a reason (Apply,
|
||||||
|
Restore this version, + Host while changes are blocked) shows that reason as visible text beside it, which is
|
||||||
|
@domi/ui's rule ("say elsewhere why"). Copy link is *working*, not disabled, while the link is being made, so the
|
||||||
|
share dialog still opens with the focus on it.
|
||||||
|
|
||||||
|
## Text fields and their seals
|
||||||
|
|
||||||
|
| Field | Seal | Enter |
|
||||||
|
| :-- | :-- | :-- |
|
||||||
|
| Host form: every text field but the last | `next` | goes to the next field |
|
||||||
|
| Host form: the last text field shown | `save`, "Apply this host" | applies the form, as Apply does |
|
||||||
|
| Share link: only addresses starting with | `save`, "Make the link for these addresses" | makes a new link (as leaving the field did) |
|
||||||
|
| Share link: password | `save`, "Ask for this password on the link" | as Use this password |
|
||||||
|
| Device name | `send`, "Request the certificate" | as Issue |
|
||||||
|
| New token's name | `save`, "Rename the token" | renames it now (before, only when the dialog closed) |
|
||||||
|
| Signed certificate (pasted) | `send`, "Use the pasted certificate" | a new line (`enterSends="never"`); Ctrl+Enter or the seal uses it |
|
||||||
|
|
||||||
|
The host form still checks a field when the focus leaves it, now when it leaves the field and its seal.
|
||||||
|
|
||||||
|
## The credit
|
||||||
|
|
||||||
|
@domi/ui and Ianitor are both CPAL-1.0 with the same Exhibit B, so one credit covers both: `<DomiCredit />` renders
|
||||||
|
"Built on Domi · https://aula.marek-novak.cz · Copyright (c) 2026 Marek Novák" in the sidebar (every desktop screen),
|
||||||
|
at the foot of every page on a phone, and in Settings, About. `apps/web/src/lib/credit.ts` holds the same words as
|
||||||
|
plain data for the e2e real-data check, and a unit test keeps them equal to @domi/ui's. The README says the repo
|
||||||
|
contains @domi/ui in `packages/domi-ui` (INTEGRATE.md §6a).
|
||||||
|
|
||||||
|
History: the first pins were v1.0.0 and v1.0.1 (a git dependency), then v1.0.2 was vendored (MPL-2.0). That copy
|
||||||
|
stays in this PR's branch history by Mark's choice; PR 14 was squash-merged with v1.0.4 (c9aa55e), so main never held it. v1.1.0 followed (2026-11-23).
|
||||||
|
|
||||||
|
v1.1.0 adds TextField `as="editable" | "auto"`, a contenteditable field, because an Android **WebView** sends an
|
||||||
|
Autofill request to Google whenever a native text field gets focus. Ianitor keeps the default native fields
|
||||||
|
(`as="input"`): it runs in a browser, not a WebView, and native fields keep the browser's own password and form
|
||||||
|
handling.
|
||||||
|
|
||||||
|
## Risks
|
||||||
|
|
||||||
|
- **The Nix hash** in `deploy/nixos/web.nix` is the one Fabrica's NixOS runner reported for this lockfile (run
|
||||||
|
`rp8rw56wvg5k2`, 2026-11-23); v1.0.3, v1.0.4 and v1.1.0 left the lockfile byte-identical. A verify-nix run on the branch confirms it.
|
||||||
|
- A visual change Mark has not seen beyond the asked-for controls: the field labels are @domi/ui's (13 px, 600),
|
||||||
|
and Ianitor's group labels (Certificate, Visit log, What is it) follow them so a form reads as one; the
|
||||||
|
segmented controls are as wide as their choices, not the panel.
|
||||||
|
|
||||||
|
## Atrium Domi
|
||||||
|
|
||||||
|
Ianitor runs on the home server; Atrium Domi lists programs on Mark's PC (Atrium `docs/APP_CONTRACT.md`), so
|
||||||
|
Ianitor has no room there and no `domi-app.toml`. If it ever gets one: `free = true` (Mark's pricing: Ianitor is
|
||||||
|
free).
|
||||||
@@ -119,6 +119,9 @@ That is a remote API with its own authentication (control's API tokens, docs/api
|
|||||||
So Ianitor stops before Part A. If a Domi app ever needs to ask Ianitor for something, the answer is a scoped API
|
So Ianitor stops before Part A. If a Domi app ever needs to ask Ianitor for something, the answer is a scoped API
|
||||||
token and a documented call, written in its own design doc.
|
token and a documented call, written in its own design doc.
|
||||||
|
|
||||||
|
For the same reason Ianitor has no room in Atrium Domi, which lists programs on Mark's PC. Mark's pricing, should it
|
||||||
|
ever get one: Ianitor is free (`free = true`; docs/domi-ui.md).
|
||||||
|
|
||||||
## 5. Showcase: the e2e suite, screenshots and videos
|
## 5. Showcase: the e2e suite, screenshots and videos
|
||||||
|
|
||||||
`apps/web/playwright.config.ts`, `apps/web/e2e/`:
|
`apps/web/playwright.config.ts`, `apps/web/e2e/`:
|
||||||
|
|||||||
@@ -39,6 +39,10 @@ Conventions in this file:
|
|||||||
|
|
||||||
## 1. Design tokens (packages/ui)
|
## 1. Design tokens (packages/ui)
|
||||||
|
|
||||||
|
> Since 2026-11-22 the roles, fonts and controls come from @domi/ui (docs/domi-ui.md): the colours below are its
|
||||||
|
> `--domi-*` roles with Ianitor's values, and the buttons and fields are its components. The rest of this section
|
||||||
|
> still describes what Ianitor keeps.
|
||||||
|
|
||||||
### 1.1 The block to paste
|
### 1.1 The block to paste
|
||||||
|
|
||||||
`packages/ui/src/tokens.css`. Apply the class `ia` to `<body>` (the artifact puts the tokens on `.ia`;
|
`packages/ui/src/tokens.css`. Apply the class `ia` to `<body>` (the artifact puts the tokens on `.ia`;
|
||||||
|
|||||||
@@ -0,0 +1,62 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## 1.1.0 (2026-11-23)
|
||||||
|
|
||||||
|
- **TextField `as="editable" | "auto"`**: the field drawn with a contenteditable `role="textbox"` instead of a native
|
||||||
|
`<input>`/`<textarea>`, because on Android the WebView sends an Autofill request to Google whenever a native text
|
||||||
|
field gets focus (found by Amicitia). Same look, seal, keys and states; plain-text paste; label by
|
||||||
|
`aria-labelledby`; `inputmode` from the type; a hidden input for `name`. `auto` = editable on Android only.
|
||||||
|
Passwords always stay native. New `editor` binding; `input` keeps its type. `isAndroid()` exported.
|
||||||
|
- Docs: the credit goes by repo visibility (Mark): apps whose own repo is public, and public repos carrying a copy,
|
||||||
|
show it; apps built from a private repo show none, paid or free.
|
||||||
|
|
||||||
|
## 1.0.4 (2026-11-23)
|
||||||
|
|
||||||
|
- Fix: `Strike.svelte` had no `<script>` block, so a consumer whose tsconfig has `allowJs` off (Ludus) got "Could not
|
||||||
|
find a declaration file" from svelte-check for it and for Button, TextField and index.ts. It now has
|
||||||
|
`<script lang="ts">`. `pnpm check` also runs svelte-check the way a consumer does (`tsconfig.consumer.json`).
|
||||||
|
- Docs: the credit is for free and public apps and public repos carrying a copy; paid apps show none (Mark).
|
||||||
|
pnpm 9 and the `#` in a git dependency's store folder: `virtual-store-dir-max-length=60` (INTEGRATE.md §1).
|
||||||
|
|
||||||
|
## 1.0.3 (2026-11-23)
|
||||||
|
|
||||||
|
- **Licence: CPAL-1.0** (Common Public Attribution License), Mark's licence for @domi/ui and every public Domi repo.
|
||||||
|
`LICENSE` is the Domi template with only the Original Code named (@domi/ui). Redistribution, and any app built
|
||||||
|
with it, must show the Exhibit B credit: "Built on Domi · https://aula.marek-novak.cz · Copyright (c) 2026 Marek
|
||||||
|
Novák". v1.0.2 stays MPL-2.0 for those who received it. Fonts stay OFL.
|
||||||
|
- `DomiCredit` component and `DOMI_ATTRIBUTION` / `DOMI_ATTRIBUTION_TEXT`: the credit, exactly.
|
||||||
|
- `tools/vendor.mjs`: copies a tag into an app as a workspace package (INTEGRATE.md §6a), for Nix and offline builds;
|
||||||
|
refuses tags before 1.0.3 and writes the credit into the copy (`NOTICE`).
|
||||||
|
|
||||||
|
## 1.0.2 (2026-11-22)
|
||||||
|
|
||||||
|
- Licensed under the Mozilla Public License 2.0 (was unlicensed), so a public Domi app may carry a copy (Mark allowed
|
||||||
|
it for Rosea). `LICENSE` and `CHANGELOG.md` ship with the package; INTEGRATE.md gains "Vendoring". No code or
|
||||||
|
visual change.
|
||||||
|
|
||||||
|
## 1.0.1 (2026-11-22)
|
||||||
|
|
||||||
|
- Fix: the primary leaf's hover gradient lightened every stop by mixing in white, which dropped a white label below
|
||||||
|
4.5:1 on the top stop (Arena Domi 3.94:1; also Atrium Domi, Liber, Calenda and other white-label leaves). The hover
|
||||||
|
stops are now computed per app and theme in the token build (`--domi-leaf-hover-hi|mid|lo-<app>`), keep the
|
||||||
|
1.0.0 mix where the label still reads, and are checked to 4.5:1 like the resting stops. Leaves with a dark label
|
||||||
|
look exactly as before. Reported by the Arena Domi session.
|
||||||
|
|
||||||
|
## 1.0.0 (2026-11-22)
|
||||||
|
|
||||||
|
First release.
|
||||||
|
|
||||||
|
- Audit of every Domi app's styles (docs/AUDIT.md, audit/raw.json).
|
||||||
|
- Palette of 29 apps by role, from their code (Arena Domi: a proposed teal, it has no code yet); shared dark theme (ink) and a new light theme (parchment) with every
|
||||||
|
accent derived to WCAG AA; rooms keep each app's own dark ground. CSS, JSON, WPF XAML; PALETTE.md with contrast.
|
||||||
|
- Foundation tokens: type (Cinzel, Cormorant Garamond, Manrope from npm), space, radius, sizes with a 48 dp touch
|
||||||
|
floor, motion with reduced motion.
|
||||||
|
- Components (Svelte 5 and plain CSS): Button (plate, primary leaf, quiet, danger, armed confirm; loading, success,
|
||||||
|
error; glint, press sink, seal impression; keyboard press), TextField with the integrated send seal (send, search,
|
||||||
|
save, next; single and multi-line; sending, sent, error; Enter and Shift+Enter; soft keyboard rule), Checkbox,
|
||||||
|
Radio, Switch, Select, Segmented, Icon.
|
||||||
|
- Legacy aliases per app (`@domi/ui/legacy/<app>.css`) and MIGRATION.md.
|
||||||
|
- Showcase; unit tests; screenshot tests per component and state (baselines attached to the release).
|
||||||
|
|
||||||
|
Not in 1.0: the desktop window frame (`.win`, `WindowFrame.svelte`), dialogs, menus, non-text inputs (number
|
||||||
|
stepper, date, colour).
|
||||||
@@ -0,0 +1,168 @@
|
|||||||
|
Common Public Attribution License Version 1.0 (CPAL)
|
||||||
|
|
||||||
|
1. “Definitions”
|
||||||
|
|
||||||
|
1.0.1 “Commercial Use” means distribution or otherwise making the Covered Code available to a third party.
|
||||||
|
|
||||||
|
1.1 “Contributor” means each entity that creates or contributes to the creation of Modifications.
|
||||||
|
|
||||||
|
1.2 “Contributor Version” means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor.
|
||||||
|
|
||||||
|
1.3 “Covered Code” means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof.
|
||||||
|
|
||||||
|
1.4 “Electronic Distribution Mechanism” means a mechanism generally accepted in the software development community for the electronic transfer of data.
|
||||||
|
|
||||||
|
1.5 “Executable” means Covered Code in any form other than Source Code.
|
||||||
|
|
||||||
|
1.6 “Initial Developer” means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A.
|
||||||
|
|
||||||
|
1.7 “Larger Work” means a work which combines Covered Code or portions thereof with code not governed by the terms of this License.
|
||||||
|
|
||||||
|
1.8 “License” means this document.
|
||||||
|
|
||||||
|
1.8.1 “Licensable” means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.
|
||||||
|
|
||||||
|
1.9 “Modifications” means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is:
|
||||||
|
|
||||||
|
A. Any addition to or deletion from the contents of a file containing Original Code or previous Modifications.
|
||||||
|
|
||||||
|
B. Any new file that contains any part of the Original Code or previous Modifications.
|
||||||
|
|
||||||
|
1.10 “Original Code” means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License.
|
||||||
|
|
||||||
|
1.10.1 “Patent Claims” means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.
|
||||||
|
|
||||||
|
1.11 “Source Code” means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor’s choice. The Source Code can be in a compressed or archival form, provided the appropriate decompression or de-archiving software is widely available for no charge.
|
||||||
|
|
||||||
|
1.12 “You” (or “Your”) means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, “You” includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, “control” means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (b) ownership of more than fifty percent (50%) of the outstanding shares or beneficial ownership of such entity.
|
||||||
|
|
||||||
|
2. Source Code License.
|
||||||
|
|
||||||
|
2.1 The Initial Developer Grant.
|
||||||
|
The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims:
|
||||||
|
|
||||||
|
(a) under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and
|
||||||
|
|
||||||
|
(b) under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof).
|
||||||
|
|
||||||
|
(c) the licenses granted in this Section 2.1(a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License.
|
||||||
|
|
||||||
|
(d) Notwithstanding Section 2.1(b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices.
|
||||||
|
|
||||||
|
2.2 Contributor Grant.
|
||||||
|
Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license
|
||||||
|
|
||||||
|
(a) under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and
|
||||||
|
|
||||||
|
(b) under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combination).
|
||||||
|
|
||||||
|
(c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective on the date Contributor first makes Commercial Use of the Covered Code.
|
||||||
|
|
||||||
|
(d) Notwithstanding Section 2.2(b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Code in the absence of Modifications made by that Contributor.
|
||||||
|
|
||||||
|
3. Distribution Obligations.
|
||||||
|
|
||||||
|
3.1 Application of License.
|
||||||
|
The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version that alters or restricts the applicable version of this License or the recipients’ rights hereunder. However, You may include an additional document offering the additional rights described in Section 3.5.
|
||||||
|
|
||||||
|
3.2 Availability of Source Code.
|
||||||
|
Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at least six (6) months after a subsequent version of that particular Modification has been made available to such recipients. You are responsible for ensuring that the Source Code version remains available even if the Electronic Distribution Mechanism is maintained by a third party.
|
||||||
|
|
||||||
|
3.3 Description of Modifications.
|
||||||
|
You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which You describe the origin or ownership of the Covered Code.
|
||||||
|
|
||||||
|
3.4 Intellectual Property Matters
|
||||||
|
|
||||||
|
(a) Third Party Claims. If Contributor has knowledge that a license under a third party’s intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled “LEGAL” which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made available as described in Section 3.2, Contributor shall promptly modify the LEGAL file in all copies Contributor makes available thereafter and shall take other steps (such as notifying appropriate mailing lists or newsgroups) reasonably calculated to inform those who received the Covered Code that new knowledge has been obtained.
|
||||||
|
|
||||||
|
(b) Contributor APIs. If Contributor’s Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file.
|
||||||
|
|
||||||
|
(c) Representations. Contributor represents that, except as disclosed pursuant to Section 3.4(a) above, Contributor believes that Contributor’s Modifications are Contributor’s original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License.
|
||||||
|
|
||||||
|
3.5 Required Notices.
|
||||||
|
You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in any documentation for the Source Code where You describe recipients’ rights or ownership rights relating to Covered Code. You may choose to offer, and to charge a fee for, warranty, support, indemnity or liability obligations to one or more recipients of Covered Code. However, You may do so only on Your own behalf, and not on behalf of the Initial Developer or any Contributor. You must make it absolutely clear than any such warranty, support, indemnity or liability obligation is offered by You alone, and You hereby agree to indemnify the Initial Developer and every Contributor for any liability incurred by the Initial Developer or such Contributor as a result of warranty, support, indemnity or liability terms You offer.
|
||||||
|
|
||||||
|
3.6 Distribution of Executable Versions.
|
||||||
|
You may distribute Covered Code in Executable form only if the requirements of Section 3.1-3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related documentation or collateral in which You describe recipients’ rights relating to the Covered Code. You may distribute the Executable version of Covered Code or ownership rights under a license of Your choice, which may contain terms different from this License, provided that You are in compliance with the terms of this License and that the license for the Executable version does not attempt to limit or alter the recipient’s rights in the Source Code version from the rights set forth in this License. If You distribute the Executable version under a different license You must make it absolutely clear that any terms which differ from this License are offered by You alone, not by the Initial Developer, Original Developer or any Contributor. You hereby agree to indemnify the Initial Developer, Original Developer and every Contributor for any liability incurred by the Initial Developer, Original Developer or such Contributor as a result of any such terms You offer.
|
||||||
|
|
||||||
|
3.7 Larger Works.
|
||||||
|
You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code.
|
||||||
|
|
||||||
|
4. Inability to Comply Due to Statute or Regulation.
|
||||||
|
If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except to the extent prohibited by statute or regulation, such description must be sufficiently detailed for a recipient of ordinary skill to be able to understand it.
|
||||||
|
|
||||||
|
5. Application of this License.
|
||||||
|
This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code.
|
||||||
|
|
||||||
|
6. Versions of the License.
|
||||||
|
|
||||||
|
6.1 New Versions.
|
||||||
|
Socialtext, Inc. (“Socialtext”) may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number.
|
||||||
|
|
||||||
|
6.2 Effect of New Versions.
|
||||||
|
Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Socialtext. No one other than Socialtext has the right to modify the terms applicable to Covered Code created under this License.
|
||||||
|
|
||||||
|
6.3 Derivative Works.
|
||||||
|
If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases “Socialtext”, “CPAL” or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version of the license contains terms which differ from the CPAL. (Filling in the name of the Initial Developer, Original Developer, Original Code or Contributor in the notice described in Exhibit A shall not of themselves be deemed to be modifications of this License.)
|
||||||
|
|
||||||
|
7. DISCLAIMER OF WARRANTY.
|
||||||
|
COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN “AS IS” BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER, ORIGINAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
|
||||||
|
|
||||||
|
8. TERMINATION.
|
||||||
|
|
||||||
|
8.1 This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.
|
||||||
|
|
||||||
|
8.2 If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer, Original Developer or a Contributor (the Initial Developer, Original Developer or Contributor against whom You file such action is referred to as “Participant”) alleging that:
|
||||||
|
|
||||||
|
(a) such Participant’s Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Participant, or (ii) withdraw Your litigation claim with respect to the Contributor Version against such Participant. If within 60 days of notice, a reasonable royalty and payment arrangement are not mutually agreed upon in writing by the parties or the litigation claim is not withdrawn, the rights granted by Participant to You under Sections 2.1 and/or 2.2 automatically terminate at the expiration of the 60 day notice period specified above.
|
||||||
|
|
||||||
|
(b) any software, hardware, or device, other than such Participant’s Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant.
|
||||||
|
|
||||||
|
8.3 If You assert a patent infringement claim against Participant alleging that such Participant’s Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or license.
|
||||||
|
|
||||||
|
8.4 In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination.
|
||||||
|
|
||||||
|
9. LIMITATION OF LIABILITY.
|
||||||
|
UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ORIGINAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY’S NEGLIGENCE TO THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
|
||||||
|
|
||||||
|
10. U.S. GOVERNMENT END USERS.
|
||||||
|
The Covered Code is a “commercial item,” as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of “commercial computer software” and “commercial computer software documentation,” as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein.
|
||||||
|
|
||||||
|
11. MISCELLANEOUS.
|
||||||
|
This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of, or an entity chartered or registered to do business in the United States of America, any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California, with venue lying in Santa Clara County, California, with the losing party responsible for costs, including without limitation, court costs and reasonable attorneys’ fees and expenses. The application of the United Nations Convention on Contracts for the International Sale of Goods is expressly excluded. Any law or regulation which provides that the language of a contract shall be construed against the drafter shall not apply to this License.
|
||||||
|
|
||||||
|
12. RESPONSIBILITY FOR CLAIMS.
|
||||||
|
As between Initial Developer, Original Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer, Original Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.
|
||||||
|
|
||||||
|
13. MULTIPLE-LICENSED CODE.
|
||||||
|
Initial Developer may designate portions of the Covered Code as Multiple-Licensed. Multiple-Licensed means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the CPAL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A.
|
||||||
|
|
||||||
|
14. ADDITIONAL TERM: ATTRIBUTION
|
||||||
|
|
||||||
|
(a) As a modest attribution to the organizer of the development of the Original Code (“Original Developer”), in the hope that its promotional value may help justify the time, money and effort invested in writing the Original Code, the Original Developer may include in Exhibit B (“Attribution Information”) a requirement that each time an Executable and Source Code or a Larger Work is launched or initially run (which includes initiating a session), a prominent display of the Original Developer’s Attribution Information (as defined below) must occur on the graphic user interface employed by the end user to access such Covered Code (which may include display on a splash screen), if any. The size of the graphic image should be consistent with the size of the other elements of the Attribution Information. If the access by the end user to the Executable and Source Code does not create a graphic user interface for access to the Covered Code, this obligation shall not apply. If the Original Code displays such Attribution Information in a particular form (such as in the form of a splash screen, notice at login, an “about” display, or dedicated attribution area on user interface screens), continued use of such form for that Attribution Information is one way of meeting this requirement for notice.
|
||||||
|
|
||||||
|
(b) Attribution information may only include a copyright notice, a brief phrase, graphic image and a URL (“Attribution Information”) and is subject to the Attribution Limits as defined below. For these purposes, prominent shall mean display for sufficient duration to give reasonable notice to the user of the identity of the Original Developer and that if You include Attribution Information or similar information for other parties, You must ensure that the Attribution Information for the Original Developer shall be no less prominent than such Attribution Information or similar information for the other party. For greater certainty, the Original Developer may choose to specify in Exhibit B below that the above attribution requirement only applies to an Executable and Source Code resulting from the Original Code or any Modification, but not a Larger Work. The intent is to provide for reasonably modest attribution, therefore the Original Developer cannot require that You display, at any time, more than the following information as Attribution Information: (a) a copyright notice including the name of the Original Developer; (b) a word or one phrase (not exceeding 10 words); (c) one graphic image provided by the Original Developer; and (d) a URL (collectively, the “Attribution Limits”).
|
||||||
|
|
||||||
|
(c) If Exhibit B does not include any Attribution Information, then there are no requirements for You to display any Attribution Information of the Original Developer.
|
||||||
|
|
||||||
|
(d) You acknowledge that all trademarks, service marks and/or trade names contained within the Attribution Information distributed with the Covered Code are the exclusive property of their owners and may only be used with the permission of their owners, or under circumstances otherwise permitted by law or as expressly set out in this License.
|
||||||
|
|
||||||
|
15. ADDITIONAL TERM: NETWORK USE.
|
||||||
|
The term “External Deployment” means the use, distribution, or communication of the Original Code or Modifications in any way such that the Original Code or Modifications may be used by anyone other than You, whether those works are distributed or communicated to those persons or made available as an application intended for use over a network. As an express condition for the grants of license hereunder, You must treat any External Deployment by You of the Original Code or Modifications as a distribution under section 3.1 and make Source Code available under Section 3.2.
|
||||||
|
|
||||||
|
EXHIBIT A. Common Public Attribution License Version 1.0.
|
||||||
|
|
||||||
|
"The contents of this file are subject to the Common Public Attribution License Version 1.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://opensource.org/license/cpal_1-0. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
|
||||||
|
Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
|
||||||
|
The Original Code is @domi/ui.
|
||||||
|
The Original Developer is the Initial Developer.
|
||||||
|
The Initial Developer of the Original Code is Marek Novák. All portions of the code written by Marek Novák are Copyright (c) 2026. All Rights Reserved.
|
||||||
|
Contributor: none."
|
||||||
|
|
||||||
|
EXHIBIT B. Attribution Information
|
||||||
|
|
||||||
|
Attribution Copyright Notice: Copyright (c) 2026 Marek Novák
|
||||||
|
Attribution Phrase (not exceeding 10 words): Built on Domi
|
||||||
|
Attribution URL: https://aula.marek-novak.cz
|
||||||
|
Graphic Image as provided in the Covered Code, if any: none.
|
||||||
|
Display of Attribution Information is required in Larger Works which are defined in the CPAL as a work which combines Covered Code or portions thereof with code not governed by the terms of the CPAL.
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
This folder is @domi/ui v1.1.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
|
||||||
|
it starts or a session begins, exactly:
|
||||||
|
|
||||||
|
Built on Domi · https://aula.marek-novak.cz · Copyright (c) 2026 Marek Novák
|
||||||
|
|
||||||
|
<DomiCredit /> renders it. Fonts are not covered: @fontsource-variable/* under the SIL OFL 1.1.
|
||||||
|
Do not edit these files here: change domi-design and vendor the next tag. A change made here must be described
|
||||||
|
in a file in this folder (CPAL §3.3).
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
v1.1.0
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
"name": "@domi/ui",
|
||||||
|
"version": "1.1.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.1.0: do not edit here; change domi-design and vendor the next tag.",
|
||||||
|
"license": "CPAL-1.0",
|
||||||
|
"type": "module",
|
||||||
|
"svelte": "./src/index.ts",
|
||||||
|
"types": "./src/index.ts",
|
||||||
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"types": "./src/index.ts",
|
||||||
|
"svelte": "./src/index.ts",
|
||||||
|
"default": "./src/index.ts"
|
||||||
|
},
|
||||||
|
"./tokens": {
|
||||||
|
"types": "./src/tokens/generated.ts",
|
||||||
|
"default": "./src/tokens/generated.ts"
|
||||||
|
},
|
||||||
|
"./domi.css": "./src/css/domi.css",
|
||||||
|
"./tokens.css": "./src/css/tokens.css",
|
||||||
|
"./base.css": "./src/css/base.css",
|
||||||
|
"./components.css": "./src/css/components.css",
|
||||||
|
"./fonts.css": "./src/css/fonts.css",
|
||||||
|
"./legacy/*": "./src/css/legacy/*"
|
||||||
|
},
|
||||||
|
"sideEffects": [
|
||||||
|
"**/*.css"
|
||||||
|
],
|
||||||
|
"peerDependencies": {
|
||||||
|
"svelte": "^5.20.0"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"@fontsource-variable/cinzel": "5.3.0",
|
||||||
|
"@fontsource-variable/cormorant-garamond": "5.3.0",
|
||||||
|
"@fontsource-variable/manrope": "5.3.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,151 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import type { Snippet } from 'svelte';
|
||||||
|
import type { HTMLButtonAttributes } from 'svelte/elements';
|
||||||
|
import Icon from './Icon.svelte';
|
||||||
|
import Strike from './Strike.svelte';
|
||||||
|
import { strike } from '../lib/strike';
|
||||||
|
import { failureText, type ButtonState } from '../lib/keys';
|
||||||
|
import type { IconName } from '../lib/icons';
|
||||||
|
|
||||||
|
interface Props extends Omit<HTMLButtonAttributes, 'onclick' | 'class' | 'children'> {
|
||||||
|
/** plate: every ordinary action. primary: the one leaf per screen. quiet: toolbars and third actions. danger: deletes. */
|
||||||
|
variant?: 'plate' | 'primary' | 'quiet' | 'danger';
|
||||||
|
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
||||||
|
icon?: IconName;
|
||||||
|
/** Icon only: the label becomes the accessible name and the tooltip. */
|
||||||
|
iconOnly?: boolean;
|
||||||
|
/** The words on the button. Required for iconOnly (it is the accessible name), else use children. */
|
||||||
|
label?: string;
|
||||||
|
block?: boolean;
|
||||||
|
/** Set to drive the state yourself. Left unset, a Promise returned by onclick drives it. */
|
||||||
|
status?: ButtonState;
|
||||||
|
/** May return a Promise: the button shows loading, then success (briefly) or error. */
|
||||||
|
onclick?: (event: MouseEvent) => unknown;
|
||||||
|
/**
|
||||||
|
* Two-step confirmation for danger: the first press arms the button and shows this text ("Press again to
|
||||||
|
* delete"); a second press within confirmFor ms runs onclick. Escape, blur or the timeout disarms it.
|
||||||
|
*/
|
||||||
|
confirm?: string;
|
||||||
|
confirmFor?: number;
|
||||||
|
/** Announced while working, when done, and when it failed (unless the error is a DomiError with its own text). */
|
||||||
|
busyText?: string;
|
||||||
|
doneText?: string;
|
||||||
|
failText?: string;
|
||||||
|
/** Showcase and tests only: show hover, press or focus without the pointer. */
|
||||||
|
force?: string;
|
||||||
|
class?: string;
|
||||||
|
children?: Snippet;
|
||||||
|
}
|
||||||
|
|
||||||
|
let {
|
||||||
|
variant = 'plate',
|
||||||
|
size = 'md',
|
||||||
|
icon,
|
||||||
|
iconOnly = false,
|
||||||
|
label,
|
||||||
|
block = false,
|
||||||
|
status,
|
||||||
|
onclick,
|
||||||
|
confirm,
|
||||||
|
confirmFor = 4000,
|
||||||
|
busyText = 'Working',
|
||||||
|
doneText = 'Done',
|
||||||
|
failText = 'That did not work. Try again.',
|
||||||
|
force,
|
||||||
|
class: cls = '',
|
||||||
|
disabled = false,
|
||||||
|
type = 'button',
|
||||||
|
children,
|
||||||
|
...rest
|
||||||
|
}: Props = $props();
|
||||||
|
|
||||||
|
let auto = $state<ButtonState>('idle');
|
||||||
|
let armed = $state(false);
|
||||||
|
let said = $state('');
|
||||||
|
let timer: ReturnType<typeof setTimeout> | undefined;
|
||||||
|
let armTimer: ReturnType<typeof setTimeout> | undefined;
|
||||||
|
const shown = $derived<ButtonState>(status ?? auto);
|
||||||
|
const busy = $derived(shown === 'loading');
|
||||||
|
|
||||||
|
function hold(): number {
|
||||||
|
const v = getComputedStyle(document.documentElement).getPropertyValue('--domi-dur-hold');
|
||||||
|
return Math.max(900, parseFloat(v) || 1400);
|
||||||
|
}
|
||||||
|
|
||||||
|
function disarm() {
|
||||||
|
armed = false;
|
||||||
|
clearTimeout(armTimer);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function press(event: MouseEvent) {
|
||||||
|
if (disabled || busy) {
|
||||||
|
event.preventDefault();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (confirm && !armed) {
|
||||||
|
armed = true;
|
||||||
|
said = confirm;
|
||||||
|
clearTimeout(armTimer);
|
||||||
|
armTimer = setTimeout(disarm, confirmFor);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
disarm();
|
||||||
|
const result = onclick?.(event);
|
||||||
|
const thenable = result != null && typeof (result as PromiseLike<unknown>).then === 'function';
|
||||||
|
if (!thenable || status !== undefined) return;
|
||||||
|
clearTimeout(timer);
|
||||||
|
auto = 'loading';
|
||||||
|
said = busyText;
|
||||||
|
try {
|
||||||
|
await result;
|
||||||
|
auto = 'success';
|
||||||
|
said = doneText;
|
||||||
|
timer = setTimeout(() => (auto = 'idle'), hold());
|
||||||
|
} catch (err) {
|
||||||
|
auto = 'error';
|
||||||
|
said = failureText(err, failText);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$effect(() => () => {
|
||||||
|
clearTimeout(timer);
|
||||||
|
clearTimeout(armTimer);
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<button
|
||||||
|
{...rest}
|
||||||
|
{type}
|
||||||
|
{disabled}
|
||||||
|
class={[
|
||||||
|
'domi-btn',
|
||||||
|
variant !== 'plate' && `domi-btn--${variant}`,
|
||||||
|
size !== 'md' && `domi-btn--${size}`,
|
||||||
|
iconOnly && 'domi-btn--icon',
|
||||||
|
block && 'domi-btn--block',
|
||||||
|
cls,
|
||||||
|
]}
|
||||||
|
data-state={shown === 'idle' ? undefined : shown}
|
||||||
|
data-armed={armed ? '' : undefined}
|
||||||
|
data-force={force}
|
||||||
|
aria-busy={busy ? 'true' : undefined}
|
||||||
|
aria-disabled={busy ? 'true' : undefined}
|
||||||
|
aria-label={iconOnly ? (armed ? confirm : label) : undefined}
|
||||||
|
title={iconOnly ? (armed ? confirm : label) : undefined}
|
||||||
|
onclick={press}
|
||||||
|
onkeydown={(e) => e.key === 'Escape' && armed && disarm()}
|
||||||
|
onblur={disarm}
|
||||||
|
use:strike
|
||||||
|
>
|
||||||
|
<span class="domi-btn__label">
|
||||||
|
{#if shown === 'error'}<Icon name="alert" />{:else if icon}<Icon name={icon} />{/if}
|
||||||
|
{#if !iconOnly}
|
||||||
|
{#if armed}{confirm}{:else if children}{@render children()}{:else}{label}{/if}
|
||||||
|
{/if}
|
||||||
|
</span>
|
||||||
|
<span class="domi-btn__state domi-btn__state--loading"><Strike /></span>
|
||||||
|
<span class="domi-btn__state domi-btn__state--success">
|
||||||
|
{#if shown === 'success'}<Icon name="check" draw />{/if}
|
||||||
|
</span>
|
||||||
|
</button>
|
||||||
|
<span class="domi-sr" role="status">{said}</span>
|
||||||
@@ -0,0 +1,59 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import type { Snippet } from 'svelte';
|
||||||
|
import { icons } from '../lib/icons';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
checked?: boolean;
|
||||||
|
/** Part of a group is chosen: shows a bar and reads as "mixed". */
|
||||||
|
indeterminate?: boolean;
|
||||||
|
label?: string;
|
||||||
|
hint?: string;
|
||||||
|
name?: string;
|
||||||
|
value?: string;
|
||||||
|
disabled?: boolean;
|
||||||
|
required?: boolean;
|
||||||
|
onchange?: (checked: boolean) => void;
|
||||||
|
force?: string;
|
||||||
|
class?: string;
|
||||||
|
children?: Snippet;
|
||||||
|
}
|
||||||
|
let {
|
||||||
|
checked = $bindable(false),
|
||||||
|
indeterminate = $bindable(false),
|
||||||
|
label,
|
||||||
|
hint,
|
||||||
|
name,
|
||||||
|
value,
|
||||||
|
disabled = false,
|
||||||
|
required = false,
|
||||||
|
onchange,
|
||||||
|
force,
|
||||||
|
class: cls = '',
|
||||||
|
children,
|
||||||
|
}: Props = $props();
|
||||||
|
const uid = $props.id();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<label class={['domi-choice', cls]} data-force={force}>
|
||||||
|
<span class="domi-choice__control">
|
||||||
|
<input
|
||||||
|
class="domi-choice__input"
|
||||||
|
type="checkbox"
|
||||||
|
bind:checked
|
||||||
|
bind:indeterminate
|
||||||
|
{name}
|
||||||
|
{value}
|
||||||
|
{disabled}
|
||||||
|
{required}
|
||||||
|
aria-describedby={hint ? `domi-hint-${uid}` : undefined}
|
||||||
|
onchange={() => onchange?.(checked)}
|
||||||
|
/>
|
||||||
|
<svg class="domi-choice__mark" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
|
||||||
|
<path d={indeterminate ? icons.minus : icons.check} />
|
||||||
|
</svg>
|
||||||
|
</span>
|
||||||
|
<span class="domi-choice__text">
|
||||||
|
<span>{#if children}{@render children()}{:else}{label}{/if}</span>
|
||||||
|
{#if hint}<span class="domi-choice__hint" id={`domi-hint-${uid}`}>{hint}</span>{/if}
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
<!-- SPDX-License-Identifier: CPAL-1.0 -->
|
||||||
|
<!--
|
||||||
|
The licence credit (CPAL-1.0 Exhibit B): "Built on Domi", the URL and the copyright notice, exactly. Place it where
|
||||||
|
it is seen when the app starts or a session begins (the first screen's foot, the sign-in screen, a splash), no less
|
||||||
|
prominent than any other credit there. The words are fixed by the licence: do not translate or shorten them.
|
||||||
|
-->
|
||||||
|
<script lang="ts">
|
||||||
|
import { DOMI_ATTRIBUTION as A } from '../lib/credit';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
class?: string;
|
||||||
|
}
|
||||||
|
let { 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>
|
||||||
|
<span class="domi-credit__dot" aria-hidden="true">·</span> <span>{A.copyright}</span>
|
||||||
|
</p>
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import { icons, type IconName } from '../lib/icons';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
name: IconName;
|
||||||
|
/** Draws the path in one stroke when it appears (the check of a finished action). */
|
||||||
|
draw?: boolean;
|
||||||
|
class?: string;
|
||||||
|
}
|
||||||
|
let { name, draw = false, class: cls = '' }: Props = $props();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<svg
|
||||||
|
class={['domi-icon', draw && 'domi-check-draw', cls]}
|
||||||
|
viewBox="0 0 24 24"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="1.8"
|
||||||
|
stroke-linecap="round"
|
||||||
|
stroke-linejoin="round"
|
||||||
|
aria-hidden="true"
|
||||||
|
focusable="false"><path d={icons[name]} /></svg>
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import type { Snippet } from 'svelte';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
/** The group's chosen value. Bind the same variable on every radio of the group: bind:group. */
|
||||||
|
group?: string;
|
||||||
|
value: string;
|
||||||
|
name: string;
|
||||||
|
label?: string;
|
||||||
|
hint?: string;
|
||||||
|
disabled?: boolean;
|
||||||
|
onchange?: (value: string) => void;
|
||||||
|
force?: string;
|
||||||
|
class?: string;
|
||||||
|
children?: Snippet;
|
||||||
|
}
|
||||||
|
let { group = $bindable(''), value, name, label, hint, disabled = false, onchange, force, class: cls = '', children }: Props = $props();
|
||||||
|
const uid = $props.id();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<label class={['domi-choice', 'domi-choice--radio', cls]} data-force={force}>
|
||||||
|
<span class="domi-choice__control">
|
||||||
|
<input
|
||||||
|
class="domi-choice__input"
|
||||||
|
type="radio"
|
||||||
|
bind:group
|
||||||
|
{value}
|
||||||
|
{name}
|
||||||
|
{disabled}
|
||||||
|
aria-describedby={hint ? `domi-hint-${uid}` : undefined}
|
||||||
|
onchange={() => onchange?.(value)}
|
||||||
|
/>
|
||||||
|
<span class="domi-choice__mark" aria-hidden="true"></span>
|
||||||
|
</span>
|
||||||
|
<span class="domi-choice__text">
|
||||||
|
<span>{#if children}{@render children()}{:else}{label}{/if}</span>
|
||||||
|
{#if hint}<span class="domi-choice__hint" id={`domi-hint-${uid}`}>{hint}</span>{/if}
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
@@ -0,0 +1,62 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import Icon from './Icon.svelte';
|
||||||
|
import { strike } from '../lib/strike';
|
||||||
|
import type { DomiOption } from '../types';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
value?: string;
|
||||||
|
/** Names the group for a screen reader: "View". */
|
||||||
|
label: string;
|
||||||
|
options: DomiOption[];
|
||||||
|
disabled?: boolean;
|
||||||
|
onchange?: (value: string) => void;
|
||||||
|
/** Showcase only: value → forced state for that segment. */
|
||||||
|
force?: Record<string, string>;
|
||||||
|
class?: string;
|
||||||
|
}
|
||||||
|
let { value = $bindable(''), label, options, disabled = false, onchange, force = {}, class: cls = '' }: Props = $props();
|
||||||
|
let group: HTMLDivElement | undefined = $state();
|
||||||
|
|
||||||
|
const enabled = $derived(options.filter((o) => !o.disabled && !disabled));
|
||||||
|
|
||||||
|
function choose(v: string) {
|
||||||
|
if (v === value) return;
|
||||||
|
value = v;
|
||||||
|
onchange?.(v);
|
||||||
|
}
|
||||||
|
|
||||||
|
// A radio group: one tab stop; arrows move the choice and the focus, Home and End jump.
|
||||||
|
function keydown(e: KeyboardEvent) {
|
||||||
|
const i = enabled.findIndex((o) => o.value === value);
|
||||||
|
let j = i;
|
||||||
|
if (e.key === 'ArrowRight' || e.key === 'ArrowDown') j = (i + 1) % enabled.length;
|
||||||
|
else if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') j = (i - 1 + enabled.length) % enabled.length;
|
||||||
|
else if (e.key === 'Home') j = 0;
|
||||||
|
else if (e.key === 'End') j = enabled.length - 1;
|
||||||
|
else return;
|
||||||
|
e.preventDefault();
|
||||||
|
const next = enabled[j];
|
||||||
|
if (!next) return;
|
||||||
|
choose(next.value);
|
||||||
|
group?.querySelector<HTMLButtonElement>(`[data-value="${CSS.escape(next.value)}"]`)?.focus();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div bind:this={group} class={['domi-segmented', cls]} role="radiogroup" aria-label={label} tabindex="-1" onkeydown={keydown}>
|
||||||
|
{#each options as o (o.value)}
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
role="radio"
|
||||||
|
class="domi-segmented__item"
|
||||||
|
data-value={o.value}
|
||||||
|
data-force={force[o.value]}
|
||||||
|
aria-checked={o.value === value}
|
||||||
|
tabindex={o.value === value || (!value && o === enabled[0]) ? 0 : -1}
|
||||||
|
disabled={disabled || o.disabled}
|
||||||
|
onclick={() => choose(o.value)}
|
||||||
|
use:strike
|
||||||
|
>
|
||||||
|
{#if o.icon}<Icon name={o.icon} />{/if}{o.label}
|
||||||
|
</button>
|
||||||
|
{/each}
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import Icon from './Icon.svelte';
|
||||||
|
import type { DomiOption } from '../types';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
/** Left unset, the first option is chosen. */
|
||||||
|
value?: string;
|
||||||
|
label: string;
|
||||||
|
hideLabel?: boolean;
|
||||||
|
options: DomiOption[];
|
||||||
|
hint?: string;
|
||||||
|
name?: string;
|
||||||
|
disabled?: boolean;
|
||||||
|
required?: boolean;
|
||||||
|
onchange?: (value: string) => void;
|
||||||
|
force?: string;
|
||||||
|
class?: string;
|
||||||
|
}
|
||||||
|
let { value = $bindable(), label, hideLabel = false, options, hint, name, disabled = false, required = false, onchange, force, class: cls = '' }: Props = $props();
|
||||||
|
const uid = $props.id();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- A native select: on Android and iOS it opens the system picker, which is the right control for a thumb. -->
|
||||||
|
<div class={['domi-field', cls]}>
|
||||||
|
<label class={['domi-field__label', hideLabel && 'domi-sr']} for={`domi-select-${uid}`}>{label}</label>
|
||||||
|
<div class="domi-select" data-force={force}>
|
||||||
|
<select
|
||||||
|
class="domi-select__input"
|
||||||
|
id={`domi-select-${uid}`}
|
||||||
|
bind:value
|
||||||
|
{name}
|
||||||
|
{disabled}
|
||||||
|
{required}
|
||||||
|
aria-describedby={hint ? `domi-hint-${uid}` : undefined}
|
||||||
|
onchange={() => onchange?.(value ?? '')}
|
||||||
|
>
|
||||||
|
{#each options as o (o.value)}
|
||||||
|
<option value={o.value} disabled={o.disabled}>{o.label}</option>
|
||||||
|
{/each}
|
||||||
|
</select>
|
||||||
|
<Icon name="chevron-down" />
|
||||||
|
</div>
|
||||||
|
{#if hint}<p class="domi-field__hint" id={`domi-hint-${uid}`}>{hint}</p>{/if}
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
// No props. The script block makes this a typed component for consumers whose tsconfig has allowJs off.
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<!-- The loading mark: three Roman interpuncts struck in turn. Decorative; the state is announced in words. -->
|
||||||
|
<span class="domi-strike" aria-hidden="true"><i></i><i></i><i></i></span>
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
interface Props {
|
||||||
|
checked?: boolean;
|
||||||
|
/** Says what is on: "Sync over mobile data". The switch reads as on or off after it. */
|
||||||
|
label: string;
|
||||||
|
disabled?: boolean;
|
||||||
|
onchange?: (checked: boolean) => void;
|
||||||
|
force?: string;
|
||||||
|
class?: string;
|
||||||
|
}
|
||||||
|
let { checked = $bindable(false), label, disabled = false, onchange, force, class: cls = '' }: Props = $props();
|
||||||
|
|
||||||
|
function toggle() {
|
||||||
|
if (disabled) return;
|
||||||
|
checked = !checked;
|
||||||
|
onchange?.(checked);
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<button type="button" role="switch" class={['domi-switch', cls]} aria-checked={checked} {disabled} data-force={force} onclick={toggle}>
|
||||||
|
<span class="domi-switch__track" aria-hidden="true"><span class="domi-switch__knob"></span></span>
|
||||||
|
<span>{label}</span>
|
||||||
|
</button>
|
||||||
@@ -0,0 +1,429 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import type { HTMLInputAttributes } from 'svelte/elements';
|
||||||
|
import Icon from './Icon.svelte';
|
||||||
|
import Strike from './Strike.svelte';
|
||||||
|
import { strike } from '../lib/strike';
|
||||||
|
import { canSend, enterAction, failureText, isSoftKeyboard, type FieldState } from '../lib/keys';
|
||||||
|
import type { IconName } from '../lib/icons';
|
||||||
|
import { caretToEnd, inputmodeFor, insertPlainText, isAndroid, readText, writeText } from '../lib/editable';
|
||||||
|
|
||||||
|
type Action = 'send' | 'search' | 'next' | 'save';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
/** The text. Bind it: bind:value. */
|
||||||
|
value?: string;
|
||||||
|
/** The visible label. Every field has one; hideLabel keeps it for screen readers only (a chat composer). */
|
||||||
|
label: string;
|
||||||
|
hideLabel?: boolean;
|
||||||
|
hint?: string;
|
||||||
|
/** An error you show (validation). The field also shows its own when onsend fails. */
|
||||||
|
error?: string;
|
||||||
|
placeholder?: string;
|
||||||
|
type?: 'text' | 'email' | 'url' | 'password' | 'search' | 'tel' | 'number';
|
||||||
|
/** A multi-line field that grows with its text up to `rows` lines. */
|
||||||
|
multiline?: boolean;
|
||||||
|
rows?: number;
|
||||||
|
/**
|
||||||
|
* What the seal does. send (arrow): sends and clears. search (glass): searches. save (check): saves and keeps
|
||||||
|
* the text. next (chevron): in a form, goes to the next field; the last field of a form uses send or save.
|
||||||
|
*/
|
||||||
|
action?: Action;
|
||||||
|
/** The seal's accessible name, the words a screen reader says: "Send message", "Search books". */
|
||||||
|
actionLabel?: string;
|
||||||
|
/** Runs on Enter or the seal. Return a Promise to show sending, then sent or the error. */
|
||||||
|
onsend?: (value: string) => unknown;
|
||||||
|
/** Empty the field after a successful send. Default: true for send, false otherwise. */
|
||||||
|
clearOnSend?: boolean;
|
||||||
|
enterSends?: 'auto' | 'always' | 'never';
|
||||||
|
/** Set to drive the state yourself. */
|
||||||
|
status?: FieldState;
|
||||||
|
sendingText?: string;
|
||||||
|
sentText?: string;
|
||||||
|
failText?: string;
|
||||||
|
size?: 'md' | 'lg';
|
||||||
|
optional?: boolean;
|
||||||
|
disabled?: boolean;
|
||||||
|
readonly?: boolean;
|
||||||
|
required?: boolean;
|
||||||
|
name?: string;
|
||||||
|
id?: string;
|
||||||
|
autocomplete?: HTMLInputAttributes['autocomplete'];
|
||||||
|
inputmode?: HTMLInputAttributes['inputmode'];
|
||||||
|
maxlength?: number;
|
||||||
|
spellcheck?: boolean;
|
||||||
|
autofocus?: boolean;
|
||||||
|
/** Showcase and tests only: 'hover', 'focus' on the field, 'press'/'hover'/'focus' on the seal via sendForce. */
|
||||||
|
force?: string;
|
||||||
|
sendForce?: string;
|
||||||
|
class?: string;
|
||||||
|
/** The input element, for focusing it from outside (null in editable mode: see editor). */
|
||||||
|
input?: HTMLInputElement | HTMLTextAreaElement | null;
|
||||||
|
/**
|
||||||
|
* input (default): a native <input>/<textarea>. editable: a contenteditable box with role="textbox": on Android
|
||||||
|
* the WebView sends an Autofill request to Google whenever a native text field gets focus; an editable box does
|
||||||
|
* not. auto: editable on Android, native elsewhere. Passwords are always native (masking, password managers).
|
||||||
|
*/
|
||||||
|
as?: 'input' | 'editable' | 'auto';
|
||||||
|
/** The editable box in editable mode, for focusing it from outside. */
|
||||||
|
editor?: HTMLElement | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
let {
|
||||||
|
value = $bindable(''),
|
||||||
|
label,
|
||||||
|
hideLabel = false,
|
||||||
|
hint,
|
||||||
|
error,
|
||||||
|
placeholder,
|
||||||
|
type = 'text',
|
||||||
|
multiline = false,
|
||||||
|
rows = 6,
|
||||||
|
action = 'send',
|
||||||
|
actionLabel,
|
||||||
|
onsend,
|
||||||
|
clearOnSend,
|
||||||
|
enterSends = 'auto',
|
||||||
|
status,
|
||||||
|
sendingText,
|
||||||
|
sentText,
|
||||||
|
failText,
|
||||||
|
size = 'md',
|
||||||
|
optional = false,
|
||||||
|
disabled = false,
|
||||||
|
readonly = false,
|
||||||
|
required = false,
|
||||||
|
name,
|
||||||
|
id,
|
||||||
|
autocomplete,
|
||||||
|
inputmode,
|
||||||
|
maxlength,
|
||||||
|
spellcheck,
|
||||||
|
autofocus = false,
|
||||||
|
force,
|
||||||
|
sendForce,
|
||||||
|
class: cls = '',
|
||||||
|
input = $bindable(null),
|
||||||
|
as = 'input',
|
||||||
|
editor = $bindable(null),
|
||||||
|
}: Props = $props();
|
||||||
|
|
||||||
|
const uid = $props.id();
|
||||||
|
const fieldId = $derived(id ?? `domi-field-${uid}`);
|
||||||
|
const hintId = `domi-hint-${uid}`;
|
||||||
|
const errorId = `domi-error-${uid}`;
|
||||||
|
const labelId = `domi-label-${uid}`;
|
||||||
|
const android = isAndroid();
|
||||||
|
|
||||||
|
const words: Record<Action, { label: string; icon: IconName; key: 'send' | 'search' | 'next' | 'done'; busy: string; done: string; fail: string }> = {
|
||||||
|
send: { label: 'Send', icon: 'send', key: 'send', busy: 'Sending', done: 'Sent', fail: 'Could not send. Try again.' },
|
||||||
|
search: { label: 'Search', icon: 'search', key: 'search', busy: 'Searching', done: 'Searched', fail: 'Could not search. Try again.' },
|
||||||
|
save: { label: 'Save', icon: 'save', key: 'done', busy: 'Saving', done: 'Saved', fail: 'Could not save. Try again.' },
|
||||||
|
next: { label: 'Next field', icon: 'next', key: 'next', busy: 'Checking', done: '', fail: 'Check this field.' },
|
||||||
|
};
|
||||||
|
const w = $derived(words[action]);
|
||||||
|
|
||||||
|
let auto = $state<FieldState>('idle');
|
||||||
|
let failure = $state('');
|
||||||
|
let said = $state('');
|
||||||
|
let revealed = $state(false);
|
||||||
|
let timer: ReturnType<typeof setTimeout> | undefined;
|
||||||
|
|
||||||
|
const shown = $derived<FieldState>(status ?? auto);
|
||||||
|
const empty = $derived(value.trim().length === 0);
|
||||||
|
const sendable = $derived(canSend(value, shown, disabled || readonly));
|
||||||
|
// While sending and just after, the seal stays lit (with the interpuncts, then the check) though it cannot be pressed.
|
||||||
|
const lit = $derived(sendable || shown === 'sending' || shown === 'sent');
|
||||||
|
const message = $derived(error ?? (shown === 'error' ? failure : ''));
|
||||||
|
const described = $derived([hint && hintId, message && errorId].filter(Boolean).join(' ') || undefined);
|
||||||
|
const inputType = $derived(type === 'password' && revealed ? 'text' : type);
|
||||||
|
const clears = $derived(clearOnSend ?? action === 'send');
|
||||||
|
const editable = $derived(type !== 'password' && (as === 'editable' || (as === 'auto' && android)));
|
||||||
|
/** The element that takes the text, whichever kind it is. */
|
||||||
|
const box = $derived<HTMLElement | null>(editable ? editor : input);
|
||||||
|
const locked = $derived(disabled || readonly || shown === 'sending');
|
||||||
|
|
||||||
|
function hold(): number {
|
||||||
|
const v = getComputedStyle(document.documentElement).getPropertyValue('--domi-dur-hold');
|
||||||
|
return Math.max(900, parseFloat(v) || 1400);
|
||||||
|
}
|
||||||
|
|
||||||
|
function nextField(from: HTMLElement) {
|
||||||
|
const scope = from.closest('form') ?? document;
|
||||||
|
const all = [...scope.querySelectorAll<HTMLElement>('.domi-field__input, input, textarea, select')].filter(
|
||||||
|
(el) => !el.hasAttribute('disabled') && el.getAttribute('aria-disabled') !== 'true' && el.getAttribute('type') !== 'hidden',
|
||||||
|
);
|
||||||
|
const i = all.indexOf(from);
|
||||||
|
all[i + 1]?.focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function submit() {
|
||||||
|
if (!sendable || !box) return;
|
||||||
|
const el = box;
|
||||||
|
const text = value;
|
||||||
|
clearTimeout(timer);
|
||||||
|
failure = '';
|
||||||
|
if (!onsend) {
|
||||||
|
// No handler: behave like the form's own submit (or, for next, move on).
|
||||||
|
if (action === 'next') nextField(el);
|
||||||
|
else el.closest('form')?.requestSubmit();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const result = onsend(text);
|
||||||
|
const thenable = result != null && typeof (result as PromiseLike<unknown>).then === 'function';
|
||||||
|
if (status !== undefined) return;
|
||||||
|
if (!thenable) return done(el);
|
||||||
|
auto = 'sending';
|
||||||
|
said = sendingText ?? w.busy;
|
||||||
|
try {
|
||||||
|
await result;
|
||||||
|
done(el);
|
||||||
|
} catch (err) {
|
||||||
|
auto = 'error';
|
||||||
|
failure = failureText(err, failText ?? w.fail);
|
||||||
|
said = failure;
|
||||||
|
el.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function done(el: HTMLElement) {
|
||||||
|
if (clears) value = '';
|
||||||
|
if (action === 'next') {
|
||||||
|
auto = 'idle';
|
||||||
|
nextField(el);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
auto = 'sent';
|
||||||
|
said = sentText ?? w.done;
|
||||||
|
timer = setTimeout(() => (auto = 'idle'), hold());
|
||||||
|
if (document.activeElement !== el && el.isConnected) el.focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
function keydown(e: KeyboardEvent) {
|
||||||
|
if (e.key === 'Escape' && shown === 'error' && status === undefined) {
|
||||||
|
auto = 'idle';
|
||||||
|
failure = '';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const r = enterAction(e, { multiline, enterSends, softKeyboard: isSoftKeyboard() });
|
||||||
|
if (r === 'send') {
|
||||||
|
e.preventDefault();
|
||||||
|
if (shown !== 'sending') void submit();
|
||||||
|
} else if (r === 'ignore' && e.key === 'Enter' && e.altKey && !multiline) {
|
||||||
|
// Alt+Enter must not submit the form. An Enter that ends an input method's composition is left alone.
|
||||||
|
e.preventDefault();
|
||||||
|
} else if (editable && !multiline && e.key === 'Enter' && !e.isComposing && e.keyCode !== 229) {
|
||||||
|
// A single-line editable box never takes a line break.
|
||||||
|
e.preventDefault();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function typed() {
|
||||||
|
if (shown === 'error' && status === undefined) {
|
||||||
|
auto = 'idle';
|
||||||
|
failure = '';
|
||||||
|
}
|
||||||
|
if (shown === 'sent' && status === undefined) auto = 'idle';
|
||||||
|
grow();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Editable mode: the box's text is the value. Typing, paste and drop bring plain text only.
|
||||||
|
function edited() {
|
||||||
|
if (!editor) return;
|
||||||
|
let t = readText(editor);
|
||||||
|
let rewrite = false;
|
||||||
|
if (!multiline && /\n/.test(t)) {
|
||||||
|
t = t.replace(/\r?\n/g, ' ');
|
||||||
|
rewrite = true;
|
||||||
|
}
|
||||||
|
if (maxlength !== undefined && t.length > maxlength) {
|
||||||
|
t = t.slice(0, maxlength);
|
||||||
|
rewrite = true;
|
||||||
|
}
|
||||||
|
if (t === '' && editor.childNodes.length > 0) rewrite = true; // a stray <br> would hide the placeholder
|
||||||
|
if (rewrite) {
|
||||||
|
writeText(editor, t);
|
||||||
|
if (t) caretToEnd(editor);
|
||||||
|
}
|
||||||
|
value = t;
|
||||||
|
typed();
|
||||||
|
}
|
||||||
|
function pasted(e: ClipboardEvent) {
|
||||||
|
if (!editor) return;
|
||||||
|
e.preventDefault();
|
||||||
|
if (locked) return;
|
||||||
|
let t = e.clipboardData?.getData('text/plain') ?? '';
|
||||||
|
if (!multiline) t = t.replace(/\r?\n/g, ' ');
|
||||||
|
insertPlainText(editor, t);
|
||||||
|
edited();
|
||||||
|
}
|
||||||
|
function dropped(e: DragEvent) {
|
||||||
|
if (!editor) return;
|
||||||
|
e.preventDefault();
|
||||||
|
const t = e.dataTransfer?.getData('text/plain') ?? '';
|
||||||
|
if (!t || locked) return;
|
||||||
|
editor.focus();
|
||||||
|
insertPlainText(editor, multiline ? t : t.replace(/\r?\n/g, ' '));
|
||||||
|
edited();
|
||||||
|
}
|
||||||
|
// A value set from outside (bind:value, a field cleared after sending) is written into the box.
|
||||||
|
$effect(() => {
|
||||||
|
const v = value;
|
||||||
|
if (editable && editor && readText(editor) !== v) writeText(editor, v);
|
||||||
|
});
|
||||||
|
|
||||||
|
// field-sizing: content grows the textarea in Chromium (WebView2, Android WebView); elsewhere, grow it here.
|
||||||
|
const sizesItself = typeof CSS !== 'undefined' && CSS.supports?.('field-sizing', 'content');
|
||||||
|
function grow() {
|
||||||
|
if (!multiline || sizesItself || !(input instanceof HTMLTextAreaElement)) return;
|
||||||
|
input.style.height = 'auto';
|
||||||
|
input.style.height = `${input.scrollHeight}px`;
|
||||||
|
}
|
||||||
|
$effect(() => {
|
||||||
|
void value;
|
||||||
|
grow();
|
||||||
|
});
|
||||||
|
$effect(() => () => clearTimeout(timer));
|
||||||
|
$effect(() => {
|
||||||
|
if (autofocus) box?.focus();
|
||||||
|
});
|
||||||
|
|
||||||
|
function focusBox() {
|
||||||
|
if (!box) return;
|
||||||
|
box.focus();
|
||||||
|
if (editable) caretToEnd(box);
|
||||||
|
}
|
||||||
|
function focusInput(e: MouseEvent) {
|
||||||
|
if (e.target === e.currentTarget) focusBox();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class={['domi-field', multiline && 'domi-field--multiline', size === 'lg' && 'domi-field--lg', cls]}
|
||||||
|
data-state={shown === 'idle' ? undefined : shown}
|
||||||
|
data-empty={empty ? '' : undefined}
|
||||||
|
data-disabled={disabled ? '' : undefined}
|
||||||
|
>
|
||||||
|
{#if editable}
|
||||||
|
<!-- An editable box is not a labelable element: the label names it through aria-labelledby; a click focuses it. -->
|
||||||
|
<!-- svelte-ignore a11y_click_events_have_key_events a11y_no_static_element_interactions -->
|
||||||
|
<span class={['domi-field__label', hideLabel && 'domi-sr']} id={labelId} role="presentation" onclick={focusBox}>
|
||||||
|
{label}{#if optional}<span class="domi-field__optional">{" (optional)"}</span>{/if}
|
||||||
|
</span>
|
||||||
|
{:else}
|
||||||
|
<label class={['domi-field__label', hideLabel && 'domi-sr']} for={fieldId} id={labelId}>
|
||||||
|
{label}{#if optional}<span class="domi-field__optional">{" (optional)"}</span>{/if}
|
||||||
|
</label>
|
||||||
|
{/if}
|
||||||
|
<!-- svelte-ignore a11y_click_events_have_key_events a11y_no_static_element_interactions -->
|
||||||
|
<div class="domi-field__well" role="presentation" data-force={force} onclick={focusInput}>
|
||||||
|
{#if editable}
|
||||||
|
<div
|
||||||
|
bind:this={editor}
|
||||||
|
class={['domi-field__input', 'domi-field__input--editable', multiline && 'domi-field__input--lines']}
|
||||||
|
id={fieldId}
|
||||||
|
role="textbox"
|
||||||
|
tabindex={disabled ? -1 : 0}
|
||||||
|
contenteditable={locked ? 'false' : 'plaintext-only'}
|
||||||
|
aria-labelledby={labelId}
|
||||||
|
aria-multiline={multiline ? 'true' : 'false'}
|
||||||
|
aria-describedby={described}
|
||||||
|
aria-invalid={message ? 'true' : undefined}
|
||||||
|
aria-required={required ? 'true' : undefined}
|
||||||
|
aria-readonly={readonly || shown === 'sending' ? 'true' : undefined}
|
||||||
|
aria-disabled={disabled ? 'true' : undefined}
|
||||||
|
aria-placeholder={placeholder}
|
||||||
|
data-placeholder={placeholder}
|
||||||
|
inputmode={inputmode ?? inputmodeFor(type)}
|
||||||
|
enterkeyhint={multiline ? (w.key === 'done' ? 'done' : 'enter') : w.key === 'done' ? 'done' : w.key}
|
||||||
|
spellcheck={spellcheck ?? true}
|
||||||
|
style:--_rows-max={rows}
|
||||||
|
onkeydown={keydown}
|
||||||
|
oninput={edited}
|
||||||
|
onpaste={pasted}
|
||||||
|
ondrop={dropped}
|
||||||
|
></div>
|
||||||
|
{#if name}<input type="hidden" {name} {value} />{/if}
|
||||||
|
{:else if multiline}
|
||||||
|
<textarea
|
||||||
|
bind:this={input}
|
||||||
|
bind:value
|
||||||
|
class="domi-field__input"
|
||||||
|
id={fieldId}
|
||||||
|
{name}
|
||||||
|
{placeholder}
|
||||||
|
{disabled}
|
||||||
|
readonly={readonly || shown === 'sending'}
|
||||||
|
{required}
|
||||||
|
{maxlength}
|
||||||
|
{spellcheck}
|
||||||
|
rows="1"
|
||||||
|
style:--_rows-max={rows}
|
||||||
|
enterkeyhint={w.key === 'done' ? 'done' : 'enter'}
|
||||||
|
aria-invalid={message ? 'true' : undefined}
|
||||||
|
aria-describedby={described}
|
||||||
|
onkeydown={keydown}
|
||||||
|
oninput={typed}
|
||||||
|
></textarea>
|
||||||
|
{:else}
|
||||||
|
<input
|
||||||
|
bind:this={input}
|
||||||
|
bind:value
|
||||||
|
class="domi-field__input"
|
||||||
|
id={fieldId}
|
||||||
|
type={inputType}
|
||||||
|
{name}
|
||||||
|
{placeholder}
|
||||||
|
{disabled}
|
||||||
|
readonly={readonly || shown === 'sending'}
|
||||||
|
{required}
|
||||||
|
{maxlength}
|
||||||
|
{spellcheck}
|
||||||
|
{autocomplete}
|
||||||
|
{inputmode}
|
||||||
|
enterkeyhint={w.key === 'done' ? 'done' : w.key}
|
||||||
|
aria-invalid={message ? 'true' : undefined}
|
||||||
|
aria-describedby={described}
|
||||||
|
onkeydown={keydown}
|
||||||
|
oninput={typed}
|
||||||
|
/>
|
||||||
|
{/if}
|
||||||
|
{#if type === 'password'}
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="domi-field__tool"
|
||||||
|
aria-label={revealed ? 'Hide password' : 'Show password'}
|
||||||
|
aria-pressed={revealed}
|
||||||
|
aria-controls={fieldId}
|
||||||
|
{disabled}
|
||||||
|
onclick={() => (revealed = !revealed)}
|
||||||
|
>
|
||||||
|
<Icon name={revealed ? 'eye-off' : 'eye'} />
|
||||||
|
</button>
|
||||||
|
{/if}
|
||||||
|
<button
|
||||||
|
type="button"
|
||||||
|
class="domi-send"
|
||||||
|
aria-label={actionLabel ?? w.label}
|
||||||
|
aria-disabled={lit ? undefined : 'true'}
|
||||||
|
aria-busy={shown === 'sending' ? 'true' : undefined}
|
||||||
|
aria-controls={fieldId}
|
||||||
|
tabindex={lit ? undefined : -1}
|
||||||
|
title={actionLabel ?? w.label}
|
||||||
|
data-state={shown === 'sending' ? 'sending' : undefined}
|
||||||
|
data-force={sendForce}
|
||||||
|
onclick={() => void submit()}
|
||||||
|
use:strike
|
||||||
|
>
|
||||||
|
{#if shown === 'sending'}
|
||||||
|
<Strike />
|
||||||
|
{:else if shown === 'sent'}
|
||||||
|
<Icon name="check" draw />
|
||||||
|
{:else}
|
||||||
|
<Icon name={w.icon} />
|
||||||
|
{/if}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
{#if hint}<p class="domi-field__hint" id={hintId}>{hint}</p>{/if}
|
||||||
|
{#if message}<p class="domi-field__error" id={errorId}><Icon name="alert" />{message}</p>{/if}
|
||||||
|
<span class="domi-sr" role="status">{said}</span>
|
||||||
|
</div>
|
||||||
@@ -0,0 +1,229 @@
|
|||||||
|
/*
|
||||||
|
* @domi/ui base: the tokens derived from the roles, the touch floor, focus, and the motion every component shares.
|
||||||
|
* Load after tokens.css. Hand-written; the roles come from tokens.css.
|
||||||
|
*
|
||||||
|
* Derived tokens are declared on every element that can change roles (the root, data-domi-app, data-domi-room),
|
||||||
|
* because a custom property holding var() is resolved where it is declared: declared on :root only, a tile with
|
||||||
|
* data-domi-app="culina" would keep the root's tint.
|
||||||
|
*/
|
||||||
|
:root,
|
||||||
|
[data-domi-app],
|
||||||
|
[data-domi-room] {
|
||||||
|
--domi-tint: color-mix(in srgb, var(--domi-accent) 13%, transparent);
|
||||||
|
--domi-tint-strong: color-mix(in srgb, var(--domi-accent) 22%, transparent);
|
||||||
|
--domi-edge-accent: color-mix(in srgb, var(--domi-accent) 55%, transparent);
|
||||||
|
--domi-edge-danger: color-mix(in srgb, var(--domi-danger) 60%, transparent);
|
||||||
|
--domi-edge-ok: color-mix(in srgb, var(--domi-ok) 60%, transparent);
|
||||||
|
--domi-tint-danger: color-mix(in srgb, var(--domi-danger) 9%, transparent);
|
||||||
|
--domi-halo: 0 0 0 4px color-mix(in srgb, var(--domi-accent) 22%, transparent);
|
||||||
|
|
||||||
|
/* The leaf: the app's metal beaten thin over the one primary action of a screen. */
|
||||||
|
--domi-leaf: linear-gradient(180deg, var(--domi-leaf-hi) 0%, var(--domi-leaf-mid) 52%, var(--domi-leaf-lo) 100%);
|
||||||
|
/* Hover stops come from the token build, checked so the label keeps 4.5:1 (v1.0.1). */
|
||||||
|
--domi-leaf-hover: linear-gradient(180deg, var(--domi-leaf-hover-hi) 0%, var(--domi-leaf-hover-mid) 52%, var(--domi-leaf-hover-lo) 100%);
|
||||||
|
--domi-leaf-press: linear-gradient(180deg, var(--domi-leaf-lo) 0%, var(--domi-leaf-mid) 60%, var(--domi-leaf-hi) 100%);
|
||||||
|
--domi-leaf-bevel: 0 0 0 1px color-mix(in srgb, var(--domi-leaf-edge) 24%, transparent),
|
||||||
|
0 14px 34px -14px color-mix(in srgb, var(--domi-leaf-mid) 70%, transparent),
|
||||||
|
inset 0 1px 0 color-mix(in srgb, var(--domi-leaf-hi) 40%, white), inset 0 -2px 0 color-mix(in srgb, var(--domi-leaf-lo) 62%, black);
|
||||||
|
--domi-leaf-bevel-press: 0 0 0 1px color-mix(in srgb, var(--domi-leaf-edge) 24%, transparent),
|
||||||
|
0 6px 16px -10px color-mix(in srgb, var(--domi-leaf-mid) 55%, transparent),
|
||||||
|
inset 0 2px 4px color-mix(in srgb, var(--domi-leaf-lo) 50%, black);
|
||||||
|
|
||||||
|
/* The plate: every other button, struck from the ground's own stone. */
|
||||||
|
--domi-plate: linear-gradient(180deg, var(--domi-plate-top), var(--domi-plate-bottom));
|
||||||
|
--domi-plate-hover: linear-gradient(180deg, var(--domi-plate-top-hover), var(--domi-plate-bottom-hover));
|
||||||
|
--domi-plate-press: linear-gradient(180deg, var(--domi-plate-bottom), var(--domi-plate-top));
|
||||||
|
--domi-sheen: color-mix(in srgb, var(--domi-fg) 10%, transparent);
|
||||||
|
--domi-sheen-strong: color-mix(in srgb, var(--domi-fg) 18%, transparent);
|
||||||
|
--domi-glint: color-mix(in srgb, white 22%, transparent);
|
||||||
|
--domi-glint-leaf: color-mix(in srgb, white 42%, transparent);
|
||||||
|
--domi-impression: color-mix(in srgb, var(--domi-fg) 22%, transparent);
|
||||||
|
--domi-impression-leaf: color-mix(in srgb, var(--domi-leaf-lo) 55%, black);
|
||||||
|
--domi-plate-shadow: inset 0 1px 0 var(--domi-sheen), inset 0 -1px 0 rgb(0 0 0 / 0.45), 0 1px 0 rgb(0 0 0 / 0.55),
|
||||||
|
0 8px 18px -12px rgb(0 0 0 / 0.9);
|
||||||
|
--domi-plate-shadow-hover: inset 0 1px 0 var(--domi-sheen-strong), inset 0 -1px 0 rgb(0 0 0 / 0.45), 0 1px 0 rgb(0 0 0 / 0.55),
|
||||||
|
0 10px 22px -12px rgb(0 0 0 / 0.95);
|
||||||
|
--domi-plate-shadow-press: inset 0 2px 5px rgb(0 0 0 / 0.65), inset 0 -1px 0 var(--domi-sheen);
|
||||||
|
|
||||||
|
/* A field is cut into the stone. */
|
||||||
|
--domi-carved: inset 0 2px 6px rgb(0 0 0 / 0.55), inset 0 -1px 0 var(--domi-sheen);
|
||||||
|
--domi-dialog-shadow: 0 40px 100px -40px rgb(0 0 0 / 0.95);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* On parchment the light falls the same way, but the shade is umber and softer. */
|
||||||
|
:root[data-domi-theme='light'],
|
||||||
|
:root[data-domi-theme='light'] [data-domi-app],
|
||||||
|
:root[data-domi-theme='light'] [data-domi-room] {
|
||||||
|
--domi-sheen: rgb(255 255 255 / 0.85);
|
||||||
|
--domi-sheen-strong: rgb(255 255 255 / 1);
|
||||||
|
--domi-glint: rgb(255 255 255 / 0.7);
|
||||||
|
--domi-impression: color-mix(in srgb, var(--domi-fg) 14%, transparent);
|
||||||
|
--domi-plate-shadow: inset 0 1px 0 var(--domi-sheen), inset 0 -1px 0 rgb(90 66 30 / 0.16), 0 1px 0 rgb(90 66 30 / 0.12),
|
||||||
|
0 8px 16px -12px rgb(90 66 30 / 0.45);
|
||||||
|
--domi-plate-shadow-hover: inset 0 1px 0 var(--domi-sheen-strong), inset 0 -1px 0 rgb(90 66 30 / 0.18), 0 1px 0 rgb(90 66 30 / 0.14),
|
||||||
|
0 10px 20px -12px rgb(90 66 30 / 0.5);
|
||||||
|
--domi-plate-shadow-press: inset 0 2px 5px rgb(90 66 30 / 0.28), inset 0 -1px 0 var(--domi-sheen);
|
||||||
|
--domi-carved: inset 0 2px 5px rgb(90 66 30 / 0.16), inset 0 -1px 0 var(--domi-sheen);
|
||||||
|
--domi-dialog-shadow: 0 30px 80px -36px rgb(90 66 30 / 0.55);
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: light) {
|
||||||
|
:root[data-domi-theme='auto'],
|
||||||
|
:root[data-domi-theme='auto'] [data-domi-app],
|
||||||
|
:root[data-domi-theme='auto'] [data-domi-room] {
|
||||||
|
--domi-sheen: rgb(255 255 255 / 0.85);
|
||||||
|
--domi-sheen-strong: rgb(255 255 255 / 1);
|
||||||
|
--domi-glint: rgb(255 255 255 / 0.7);
|
||||||
|
--domi-impression: color-mix(in srgb, var(--domi-fg) 14%, transparent);
|
||||||
|
--domi-plate-shadow: inset 0 1px 0 var(--domi-sheen), inset 0 -1px 0 rgb(90 66 30 / 0.16), 0 1px 0 rgb(90 66 30 / 0.12),
|
||||||
|
0 8px 16px -12px rgb(90 66 30 / 0.45);
|
||||||
|
--domi-plate-shadow-hover: inset 0 1px 0 var(--domi-sheen-strong), inset 0 -1px 0 rgb(90 66 30 / 0.18),
|
||||||
|
0 1px 0 rgb(90 66 30 / 0.14), 0 10px 20px -12px rgb(90 66 30 / 0.5);
|
||||||
|
--domi-plate-shadow-press: inset 0 2px 5px rgb(90 66 30 / 0.28), inset 0 -1px 0 var(--domi-sheen);
|
||||||
|
--domi-carved: inset 0 2px 5px rgb(90 66 30 / 0.16), inset 0 -1px 0 var(--domi-sheen);
|
||||||
|
--domi-dialog-shadow: 0 30px 80px -36px rgb(90 66 30 / 0.55);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The touch floor. On a coarse pointer (Android, a touch screen) every control is at least 48 px and every field
|
||||||
|
* 56 px; on a mouse and keyboard the desktop sizes hold. data-domi-density forces one or the other.
|
||||||
|
*/
|
||||||
|
:root {
|
||||||
|
--domi-target: 0px;
|
||||||
|
--domi-field-target: 0px;
|
||||||
|
--domi-send-target: 0px;
|
||||||
|
}
|
||||||
|
@media (pointer: coarse) {
|
||||||
|
:root {
|
||||||
|
--domi-target: var(--domi-size-touch);
|
||||||
|
--domi-field-target: var(--domi-size-field-touch);
|
||||||
|
--domi-send-target: var(--domi-size-send-touch);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
:root[data-domi-density='touch'] {
|
||||||
|
--domi-target: var(--domi-size-touch);
|
||||||
|
--domi-field-target: var(--domi-size-field-touch);
|
||||||
|
--domi-send-target: var(--domi-size-send-touch);
|
||||||
|
}
|
||||||
|
:root[data-domi-density='pointer'] {
|
||||||
|
--domi-target: 0px;
|
||||||
|
--domi-field-target: 0px;
|
||||||
|
--domi-send-target: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* A page that opts in to the Domi ground. */
|
||||||
|
.domi-page {
|
||||||
|
min-height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
background: var(--domi-bg);
|
||||||
|
color: var(--domi-fg);
|
||||||
|
font: 400 var(--domi-text-md) / var(--domi-leading-md) var(--domi-font-hand);
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
}
|
||||||
|
.domi-wordmark {
|
||||||
|
font-family: var(--domi-font-inscription);
|
||||||
|
font-weight: 500;
|
||||||
|
letter-spacing: var(--domi-tracking-inscription);
|
||||||
|
color: var(--domi-accent-strong);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Hidden from sight, read by a screen reader: state announcements. */
|
||||||
|
.domi-sr {
|
||||||
|
position: absolute;
|
||||||
|
width: 1px;
|
||||||
|
height: 1px;
|
||||||
|
margin: -1px;
|
||||||
|
padding: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
clip-path: inset(50%);
|
||||||
|
white-space: nowrap;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Shared motion. Every keyframe moves something (transform, or the chisel line's position) or fades a decorative
|
||||||
|
layer; none animates a colour. */
|
||||||
|
@keyframes domi-glint {
|
||||||
|
from {
|
||||||
|
transform: translateX(-130%) skewX(-18deg);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
transform: translateX(130%) skewX(-18deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes domi-impress {
|
||||||
|
from {
|
||||||
|
transform: scale(0.2);
|
||||||
|
opacity: 0.9;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
transform: scale(1);
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes domi-strike {
|
||||||
|
0%,
|
||||||
|
60%,
|
||||||
|
100% {
|
||||||
|
transform: translateY(0) scale(0.7);
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
transform: translateY(2px) scale(1.15);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes domi-shake {
|
||||||
|
0%,
|
||||||
|
100% {
|
||||||
|
transform: translateX(0);
|
||||||
|
}
|
||||||
|
20%,
|
||||||
|
60% {
|
||||||
|
transform: translateX(-4px);
|
||||||
|
}
|
||||||
|
40%,
|
||||||
|
80% {
|
||||||
|
transform: translateX(4px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* The chisel line runs inside the field (background-position, so nothing leaves the field). */
|
||||||
|
@keyframes domi-carve {
|
||||||
|
from {
|
||||||
|
background-position: -70% 0;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
background-position: 170% 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes domi-draw {
|
||||||
|
from {
|
||||||
|
stroke-dashoffset: 24;
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
stroke-dashoffset: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@keyframes domi-rise {
|
||||||
|
from {
|
||||||
|
transform: translateY(3px) scale(0.86);
|
||||||
|
}
|
||||||
|
to {
|
||||||
|
transform: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Reduced motion: nothing moves, nothing is hidden for it; every state is still shown, at once. */
|
||||||
|
@media (prefers-reduced-motion: reduce) {
|
||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
|
animation-duration: 0ms !important;
|
||||||
|
animation-iteration-count: 1 !important;
|
||||||
|
transition-duration: 0ms !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
:root[data-domi-motion='reduce'] *,
|
||||||
|
:root[data-domi-motion='reduce'] *::before,
|
||||||
|
:root[data-domi-motion='reduce'] *::after {
|
||||||
|
animation-duration: 0ms !important;
|
||||||
|
animation-iteration-count: 1 !important;
|
||||||
|
transition-duration: 0ms !important;
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,8 @@
|
|||||||
|
/* @domi/ui, everything: fonts, tokens, base, components. Import once at the app root.
|
||||||
|
SPDX-License-Identifier: CPAL-1.0. The contents of this file are subject to the Common Public Attribution License
|
||||||
|
Version 1.0 (LICENSE). The Original Code is @domi/ui; the Initial Developer is Marek Novák, Copyright (c) 2026.
|
||||||
|
Redistribution requires the credit of Exhibit B: Built on Domi · https://aula.marek-novak.cz · Copyright (c) 2026 Marek Novák. */
|
||||||
|
@import './fonts.css';
|
||||||
|
@import './tokens.css';
|
||||||
|
@import './base.css';
|
||||||
|
@import './components.css';
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
/*
|
||||||
|
* The three Domi faces, bundled from npm (@fontsource-variable, SIL Open Font License 1.1). Nothing is fetched at
|
||||||
|
* run time. A bundler (Vite) resolves these imports; for a stack without one, copy the woff2 files named in
|
||||||
|
* docs/INTEGRATE.md and point @font-face at them. Families: 'Cinzel Variable', 'Cormorant Garamond Variable',
|
||||||
|
* 'Manrope Variable'; the token stacks fall back to the plain names the apps used before.
|
||||||
|
*/
|
||||||
|
@import '@fontsource-variable/cinzel/wght.css';
|
||||||
|
@import '@fontsource-variable/cormorant-garamond/wght.css';
|
||||||
|
@import '@fontsource-variable/manrope/wght.css';
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
/* amicitia's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--ground: var(--domi-bg);
|
||||||
|
--colonnade: var(--domi-chrome);
|
||||||
|
--surface: var(--domi-panel);
|
||||||
|
--surface-2: var(--domi-hover);
|
||||||
|
--hairline: var(--domi-line);
|
||||||
|
--control-edge: var(--domi-edge);
|
||||||
|
--text: var(--domi-fg);
|
||||||
|
--text-2: var(--domi-fg-2);
|
||||||
|
--muted: var(--domi-muted);
|
||||||
|
--disabled: var(--domi-disabled);
|
||||||
|
--accent: var(--domi-accent);
|
||||||
|
--accent-strong: var(--domi-accent-strong);
|
||||||
|
--primary-high: var(--domi-leaf-hi);
|
||||||
|
--primary-mid: var(--domi-leaf-mid);
|
||||||
|
--primary-low: var(--domi-leaf-lo);
|
||||||
|
--primary-edge: var(--domi-leaf-edge);
|
||||||
|
--on-primary: var(--domi-leaf-fg);
|
||||||
|
--second: var(--domi-second);
|
||||||
|
--danger: var(--domi-danger);
|
||||||
|
--ok: var(--domi-ok);
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/* arca's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--bg: var(--domi-bg);
|
||||||
|
--chrome: var(--domi-chrome);
|
||||||
|
--chrome-top: var(--domi-chrome-top);
|
||||||
|
--panel: var(--domi-panel);
|
||||||
|
--hover: var(--domi-hover);
|
||||||
|
--line: var(--domi-line);
|
||||||
|
--edge: var(--domi-edge);
|
||||||
|
--field: var(--domi-field);
|
||||||
|
--fg: var(--domi-fg);
|
||||||
|
--fg-2: var(--domi-fg-2);
|
||||||
|
--muted: var(--domi-muted);
|
||||||
|
--disabled: var(--domi-disabled);
|
||||||
|
--plate-top: var(--domi-plate-top);
|
||||||
|
--plate-bottom: var(--domi-plate-bottom);
|
||||||
|
--plate-top-hover: var(--domi-plate-top-hover);
|
||||||
|
--plate-bottom-hover: var(--domi-plate-bottom-hover);
|
||||||
|
--accent: var(--domi-accent);
|
||||||
|
--accent-strong: var(--domi-accent-strong);
|
||||||
|
--accent-fg: var(--domi-leaf-fg);
|
||||||
|
--leaf: var(--domi-leaf);
|
||||||
|
--leaf-edge: var(--domi-leaf-edge);
|
||||||
|
--rim-top: var(--domi-rim);
|
||||||
|
--second: var(--domi-second);
|
||||||
|
--danger: var(--domi-danger);
|
||||||
|
--danger-fg: var(--domi-danger-fg);
|
||||||
|
--ok: var(--domi-ok);
|
||||||
|
--warning: var(--domi-warning);
|
||||||
|
--tint: var(--domi-tint);
|
||||||
|
--halo: var(--domi-halo);
|
||||||
|
--sheen: var(--domi-sheen);
|
||||||
|
--sheen-strong: var(--domi-sheen-strong);
|
||||||
|
--leaf-hover: var(--domi-leaf-hover);
|
||||||
|
--leaf-press: var(--domi-leaf-press);
|
||||||
|
--leaf-bevel: var(--domi-leaf-bevel);
|
||||||
|
--leaf-bevel-press: var(--domi-leaf-bevel-press);
|
||||||
|
--edge-accent: var(--domi-edge-accent);
|
||||||
|
--edge-danger: var(--domi-edge-danger);
|
||||||
|
--tint-danger: var(--domi-tint-danger);
|
||||||
|
--primary-fill: var(--domi-leaf);
|
||||||
|
--primary-edge: var(--domi-leaf-edge);
|
||||||
|
--inscription: var(--domi-font-inscription);
|
||||||
|
--book: var(--domi-font-book);
|
||||||
|
--hand: var(--domi-font-hand);
|
||||||
|
--code: var(--domi-font-code);
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/* atrium's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--bg: var(--domi-bg);
|
||||||
|
--chrome: var(--domi-chrome);
|
||||||
|
--chrome-top: var(--domi-chrome-top);
|
||||||
|
--panel: var(--domi-panel);
|
||||||
|
--hover: var(--domi-hover);
|
||||||
|
--line: var(--domi-line);
|
||||||
|
--edge: var(--domi-edge);
|
||||||
|
--field: var(--domi-field);
|
||||||
|
--fg: var(--domi-fg);
|
||||||
|
--fg-2: var(--domi-fg-2);
|
||||||
|
--muted: var(--domi-muted);
|
||||||
|
--disabled: var(--domi-disabled);
|
||||||
|
--plate-top: var(--domi-plate-top);
|
||||||
|
--plate-bottom: var(--domi-plate-bottom);
|
||||||
|
--plate-top-hover: var(--domi-plate-top-hover);
|
||||||
|
--plate-bottom-hover: var(--domi-plate-bottom-hover);
|
||||||
|
--accent: var(--domi-accent);
|
||||||
|
--accent-strong: var(--domi-accent-strong);
|
||||||
|
--accent-fg: var(--domi-leaf-fg);
|
||||||
|
--leaf: var(--domi-leaf);
|
||||||
|
--leaf-edge: var(--domi-leaf-edge);
|
||||||
|
--rim-top: var(--domi-rim);
|
||||||
|
--second: var(--domi-second);
|
||||||
|
--danger: var(--domi-danger);
|
||||||
|
--danger-fg: var(--domi-danger-fg);
|
||||||
|
--ok: var(--domi-ok);
|
||||||
|
--warning: var(--domi-warning);
|
||||||
|
--tint: var(--domi-tint);
|
||||||
|
--halo: var(--domi-halo);
|
||||||
|
--sheen: var(--domi-sheen);
|
||||||
|
--sheen-strong: var(--domi-sheen-strong);
|
||||||
|
--leaf-hover: var(--domi-leaf-hover);
|
||||||
|
--leaf-press: var(--domi-leaf-press);
|
||||||
|
--leaf-bevel: var(--domi-leaf-bevel);
|
||||||
|
--leaf-bevel-press: var(--domi-leaf-bevel-press);
|
||||||
|
--edge-accent: var(--domi-edge-accent);
|
||||||
|
--edge-danger: var(--domi-edge-danger);
|
||||||
|
--tint-danger: var(--domi-tint-danger);
|
||||||
|
--primary-fill: var(--domi-leaf);
|
||||||
|
--primary-edge: var(--domi-leaf-edge);
|
||||||
|
--inscription: var(--domi-font-inscription);
|
||||||
|
--book: var(--domi-font-book);
|
||||||
|
--hand: var(--domi-font-hand);
|
||||||
|
--code: var(--domi-font-code);
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
/* aula's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--bg: var(--domi-bg);
|
||||||
|
--chrome: var(--domi-chrome);
|
||||||
|
--panel: var(--domi-panel);
|
||||||
|
--line: var(--domi-line);
|
||||||
|
--edge: var(--domi-edge);
|
||||||
|
--field: var(--domi-field);
|
||||||
|
--fg: var(--domi-fg);
|
||||||
|
--fg-2: var(--domi-fg-2);
|
||||||
|
--muted: var(--domi-muted);
|
||||||
|
--accent: var(--domi-accent);
|
||||||
|
--accent-strong: var(--domi-accent-strong);
|
||||||
|
--p-leaf1: var(--domi-leaf-hi);
|
||||||
|
--p-leaf2: var(--domi-leaf-mid);
|
||||||
|
--p-leaf3: var(--domi-leaf-lo);
|
||||||
|
--p-leaf-edge: var(--domi-leaf-edge);
|
||||||
|
--p-on-leaf: var(--domi-leaf-fg);
|
||||||
|
--second: var(--domi-second);
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
/* calenda's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--bg: var(--domi-bg);
|
||||||
|
--sidebar: var(--domi-chrome);
|
||||||
|
--surface: var(--domi-panel);
|
||||||
|
--surface-2: var(--domi-hover);
|
||||||
|
--line: var(--domi-line);
|
||||||
|
--line-control: var(--domi-edge);
|
||||||
|
--text: var(--domi-fg);
|
||||||
|
--muted: var(--domi-muted);
|
||||||
|
--accent-strong: var(--domi-accent);
|
||||||
|
--accent-edge: var(--domi-leaf-hi);
|
||||||
|
--accent: var(--domi-leaf-mid);
|
||||||
|
--lacquer-deep: var(--domi-leaf-lo);
|
||||||
|
--bronze: var(--domi-leaf-edge);
|
||||||
|
--on-accent: var(--domi-leaf-fg);
|
||||||
|
--person-text: var(--domi-second);
|
||||||
|
--danger: var(--domi-danger);
|
||||||
|
--on-danger: var(--domi-danger-fg);
|
||||||
|
--warning: var(--domi-warning);
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/* culina's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--bg: var(--domi-bg);
|
||||||
|
--chrome: var(--domi-chrome);
|
||||||
|
--chrome-top: var(--domi-chrome-top);
|
||||||
|
--panel: var(--domi-panel);
|
||||||
|
--hover: var(--domi-hover);
|
||||||
|
--line: var(--domi-line);
|
||||||
|
--edge: var(--domi-edge);
|
||||||
|
--field: var(--domi-field);
|
||||||
|
--fg: var(--domi-fg);
|
||||||
|
--fg-2: var(--domi-fg-2);
|
||||||
|
--muted: var(--domi-muted);
|
||||||
|
--disabled: var(--domi-disabled);
|
||||||
|
--plate-top: var(--domi-plate-top);
|
||||||
|
--plate-bottom: var(--domi-plate-bottom);
|
||||||
|
--plate-top-hover: var(--domi-plate-top-hover);
|
||||||
|
--plate-bottom-hover: var(--domi-plate-bottom-hover);
|
||||||
|
--accent: var(--domi-accent);
|
||||||
|
--accent-strong: var(--domi-accent-strong);
|
||||||
|
--accent-fg: var(--domi-leaf-fg);
|
||||||
|
--leaf: var(--domi-leaf);
|
||||||
|
--leaf-edge: var(--domi-leaf-edge);
|
||||||
|
--rim-top: var(--domi-rim);
|
||||||
|
--second: var(--domi-second);
|
||||||
|
--danger: var(--domi-danger);
|
||||||
|
--danger-fg: var(--domi-danger-fg);
|
||||||
|
--ok: var(--domi-ok);
|
||||||
|
--warning: var(--domi-warning);
|
||||||
|
--tint: var(--domi-tint);
|
||||||
|
--halo: var(--domi-halo);
|
||||||
|
--sheen: var(--domi-sheen);
|
||||||
|
--sheen-strong: var(--domi-sheen-strong);
|
||||||
|
--leaf-hover: var(--domi-leaf-hover);
|
||||||
|
--leaf-press: var(--domi-leaf-press);
|
||||||
|
--leaf-bevel: var(--domi-leaf-bevel);
|
||||||
|
--leaf-bevel-press: var(--domi-leaf-bevel-press);
|
||||||
|
--edge-accent: var(--domi-edge-accent);
|
||||||
|
--edge-danger: var(--domi-edge-danger);
|
||||||
|
--tint-danger: var(--domi-tint-danger);
|
||||||
|
--primary-fill: var(--domi-leaf);
|
||||||
|
--primary-edge: var(--domi-leaf-edge);
|
||||||
|
--inscription: var(--domi-font-inscription);
|
||||||
|
--book: var(--domi-font-book);
|
||||||
|
--hand: var(--domi-font-hand);
|
||||||
|
--code: var(--domi-font-code);
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/* custos's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--bg: var(--domi-bg);
|
||||||
|
--chrome: var(--domi-chrome);
|
||||||
|
--chrome-top: var(--domi-chrome-top);
|
||||||
|
--panel: var(--domi-panel);
|
||||||
|
--hover: var(--domi-hover);
|
||||||
|
--line: var(--domi-line);
|
||||||
|
--edge: var(--domi-edge);
|
||||||
|
--field: var(--domi-field);
|
||||||
|
--fg: var(--domi-fg);
|
||||||
|
--fg-2: var(--domi-fg-2);
|
||||||
|
--muted: var(--domi-muted);
|
||||||
|
--disabled: var(--domi-disabled);
|
||||||
|
--plate-top: var(--domi-plate-top);
|
||||||
|
--plate-bottom: var(--domi-plate-bottom);
|
||||||
|
--plate-top-hover: var(--domi-plate-top-hover);
|
||||||
|
--plate-bottom-hover: var(--domi-plate-bottom-hover);
|
||||||
|
--accent: var(--domi-accent);
|
||||||
|
--accent-strong: var(--domi-accent-strong);
|
||||||
|
--accent-fg: var(--domi-leaf-fg);
|
||||||
|
--leaf: var(--domi-leaf);
|
||||||
|
--leaf-edge: var(--domi-leaf-edge);
|
||||||
|
--rim-top: var(--domi-rim);
|
||||||
|
--second: var(--domi-second);
|
||||||
|
--danger: var(--domi-danger);
|
||||||
|
--danger-fg: var(--domi-danger-fg);
|
||||||
|
--ok: var(--domi-ok);
|
||||||
|
--warning: var(--domi-warning);
|
||||||
|
--tint: var(--domi-tint);
|
||||||
|
--halo: var(--domi-halo);
|
||||||
|
--sheen: var(--domi-sheen);
|
||||||
|
--sheen-strong: var(--domi-sheen-strong);
|
||||||
|
--leaf-hover: var(--domi-leaf-hover);
|
||||||
|
--leaf-press: var(--domi-leaf-press);
|
||||||
|
--leaf-bevel: var(--domi-leaf-bevel);
|
||||||
|
--leaf-bevel-press: var(--domi-leaf-bevel-press);
|
||||||
|
--edge-accent: var(--domi-edge-accent);
|
||||||
|
--edge-danger: var(--domi-edge-danger);
|
||||||
|
--tint-danger: var(--domi-tint-danger);
|
||||||
|
--primary-fill: var(--domi-leaf);
|
||||||
|
--primary-edge: var(--domi-leaf-edge);
|
||||||
|
--inscription: var(--domi-font-inscription);
|
||||||
|
--book: var(--domi-font-book);
|
||||||
|
--hand: var(--domi-font-hand);
|
||||||
|
--code: var(--domi-font-code);
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/* domi-office's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--bg: var(--domi-bg);
|
||||||
|
--chrome: var(--domi-chrome);
|
||||||
|
--chrome-top: var(--domi-chrome-top);
|
||||||
|
--panel: var(--domi-panel);
|
||||||
|
--hover: var(--domi-hover);
|
||||||
|
--line: var(--domi-line);
|
||||||
|
--edge: var(--domi-edge);
|
||||||
|
--field: var(--domi-field);
|
||||||
|
--fg: var(--domi-fg);
|
||||||
|
--fg-2: var(--domi-fg-2);
|
||||||
|
--muted: var(--domi-muted);
|
||||||
|
--disabled: var(--domi-disabled);
|
||||||
|
--plate-top: var(--domi-plate-top);
|
||||||
|
--plate-bottom: var(--domi-plate-bottom);
|
||||||
|
--plate-top-hover: var(--domi-plate-top-hover);
|
||||||
|
--plate-bottom-hover: var(--domi-plate-bottom-hover);
|
||||||
|
--accent: var(--domi-accent);
|
||||||
|
--accent-strong: var(--domi-accent-strong);
|
||||||
|
--accent-fg: var(--domi-leaf-fg);
|
||||||
|
--leaf: var(--domi-leaf);
|
||||||
|
--leaf-edge: var(--domi-leaf-edge);
|
||||||
|
--rim-top: var(--domi-rim);
|
||||||
|
--second: var(--domi-second);
|
||||||
|
--danger: var(--domi-danger);
|
||||||
|
--danger-fg: var(--domi-danger-fg);
|
||||||
|
--ok: var(--domi-ok);
|
||||||
|
--warning: var(--domi-warning);
|
||||||
|
--tint: var(--domi-tint);
|
||||||
|
--halo: var(--domi-halo);
|
||||||
|
--sheen: var(--domi-sheen);
|
||||||
|
--sheen-strong: var(--domi-sheen-strong);
|
||||||
|
--leaf-hover: var(--domi-leaf-hover);
|
||||||
|
--leaf-press: var(--domi-leaf-press);
|
||||||
|
--leaf-bevel: var(--domi-leaf-bevel);
|
||||||
|
--leaf-bevel-press: var(--domi-leaf-bevel-press);
|
||||||
|
--edge-accent: var(--domi-edge-accent);
|
||||||
|
--edge-danger: var(--domi-edge-danger);
|
||||||
|
--tint-danger: var(--domi-tint-danger);
|
||||||
|
--primary-fill: var(--domi-leaf);
|
||||||
|
--primary-edge: var(--domi-leaf-edge);
|
||||||
|
--inscription: var(--domi-font-inscription);
|
||||||
|
--book: var(--domi-font-book);
|
||||||
|
--hand: var(--domi-font-hand);
|
||||||
|
--code: var(--domi-font-code);
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/* epistula's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--bg: var(--domi-bg);
|
||||||
|
--chrome: var(--domi-chrome);
|
||||||
|
--chrome-top: var(--domi-chrome-top);
|
||||||
|
--panel: var(--domi-panel);
|
||||||
|
--hover: var(--domi-hover);
|
||||||
|
--line: var(--domi-line);
|
||||||
|
--edge: var(--domi-edge);
|
||||||
|
--field: var(--domi-field);
|
||||||
|
--fg: var(--domi-fg);
|
||||||
|
--fg-2: var(--domi-fg-2);
|
||||||
|
--muted: var(--domi-muted);
|
||||||
|
--disabled: var(--domi-disabled);
|
||||||
|
--plate-top: var(--domi-plate-top);
|
||||||
|
--plate-bottom: var(--domi-plate-bottom);
|
||||||
|
--plate-top-hover: var(--domi-plate-top-hover);
|
||||||
|
--plate-bottom-hover: var(--domi-plate-bottom-hover);
|
||||||
|
--accent: var(--domi-accent);
|
||||||
|
--accent-strong: var(--domi-accent-strong);
|
||||||
|
--accent-fg: var(--domi-leaf-fg);
|
||||||
|
--leaf: var(--domi-leaf);
|
||||||
|
--leaf-edge: var(--domi-leaf-edge);
|
||||||
|
--rim-top: var(--domi-rim);
|
||||||
|
--second: var(--domi-second);
|
||||||
|
--danger: var(--domi-danger);
|
||||||
|
--danger-fg: var(--domi-danger-fg);
|
||||||
|
--ok: var(--domi-ok);
|
||||||
|
--warning: var(--domi-warning);
|
||||||
|
--tint: var(--domi-tint);
|
||||||
|
--halo: var(--domi-halo);
|
||||||
|
--sheen: var(--domi-sheen);
|
||||||
|
--sheen-strong: var(--domi-sheen-strong);
|
||||||
|
--leaf-hover: var(--domi-leaf-hover);
|
||||||
|
--leaf-press: var(--domi-leaf-press);
|
||||||
|
--leaf-bevel: var(--domi-leaf-bevel);
|
||||||
|
--leaf-bevel-press: var(--domi-leaf-bevel-press);
|
||||||
|
--edge-accent: var(--domi-edge-accent);
|
||||||
|
--edge-danger: var(--domi-edge-danger);
|
||||||
|
--tint-danger: var(--domi-tint-danger);
|
||||||
|
--primary-fill: var(--domi-leaf);
|
||||||
|
--primary-edge: var(--domi-leaf-edge);
|
||||||
|
--inscription: var(--domi-font-inscription);
|
||||||
|
--book: var(--domi-font-book);
|
||||||
|
--hand: var(--domi-font-hand);
|
||||||
|
--code: var(--domi-font-code);
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/* fabrica's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--bg: var(--domi-bg);
|
||||||
|
--chrome: var(--domi-chrome);
|
||||||
|
--chrome-top: var(--domi-chrome-top);
|
||||||
|
--panel: var(--domi-panel);
|
||||||
|
--hover: var(--domi-hover);
|
||||||
|
--line: var(--domi-line);
|
||||||
|
--edge: var(--domi-edge);
|
||||||
|
--field: var(--domi-field);
|
||||||
|
--fg: var(--domi-fg);
|
||||||
|
--fg-2: var(--domi-fg-2);
|
||||||
|
--muted: var(--domi-muted);
|
||||||
|
--disabled: var(--domi-disabled);
|
||||||
|
--plate-top: var(--domi-plate-top);
|
||||||
|
--plate-bottom: var(--domi-plate-bottom);
|
||||||
|
--plate-top-hover: var(--domi-plate-top-hover);
|
||||||
|
--plate-bottom-hover: var(--domi-plate-bottom-hover);
|
||||||
|
--accent: var(--domi-accent);
|
||||||
|
--accent-strong: var(--domi-accent-strong);
|
||||||
|
--accent-fg: var(--domi-leaf-fg);
|
||||||
|
--leaf: var(--domi-leaf);
|
||||||
|
--leaf-edge: var(--domi-leaf-edge);
|
||||||
|
--rim-top: var(--domi-rim);
|
||||||
|
--second: var(--domi-second);
|
||||||
|
--danger: var(--domi-danger);
|
||||||
|
--danger-fg: var(--domi-danger-fg);
|
||||||
|
--ok: var(--domi-ok);
|
||||||
|
--warning: var(--domi-warning);
|
||||||
|
--tint: var(--domi-tint);
|
||||||
|
--halo: var(--domi-halo);
|
||||||
|
--sheen: var(--domi-sheen);
|
||||||
|
--sheen-strong: var(--domi-sheen-strong);
|
||||||
|
--leaf-hover: var(--domi-leaf-hover);
|
||||||
|
--leaf-press: var(--domi-leaf-press);
|
||||||
|
--leaf-bevel: var(--domi-leaf-bevel);
|
||||||
|
--leaf-bevel-press: var(--domi-leaf-bevel-press);
|
||||||
|
--edge-accent: var(--domi-edge-accent);
|
||||||
|
--edge-danger: var(--domi-edge-danger);
|
||||||
|
--tint-danger: var(--domi-tint-danger);
|
||||||
|
--primary-fill: var(--domi-leaf);
|
||||||
|
--primary-edge: var(--domi-leaf-edge);
|
||||||
|
--inscription: var(--domi-font-inscription);
|
||||||
|
--book: var(--domi-font-book);
|
||||||
|
--hand: var(--domi-font-hand);
|
||||||
|
--code: var(--domi-font-code);
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
/* famulus's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--famulus-ground: var(--domi-bg);
|
||||||
|
--famulus-night-high: var(--domi-chrome);
|
||||||
|
--famulus-surface: var(--domi-panel);
|
||||||
|
--famulus-row-hover: var(--domi-hover);
|
||||||
|
--famulus-line: var(--domi-line);
|
||||||
|
--famulus-field: var(--domi-field);
|
||||||
|
--famulus-text: var(--domi-fg);
|
||||||
|
--famulus-soft: var(--domi-fg-2);
|
||||||
|
--famulus-quiet: var(--domi-muted);
|
||||||
|
--famulus-quieter: var(--domi-disabled);
|
||||||
|
--famulus-gold: var(--domi-accent);
|
||||||
|
--famulus-gold-bright: var(--domi-accent-strong);
|
||||||
|
--famulus-leaf-light: var(--domi-leaf-hi);
|
||||||
|
--famulus-leaf-mid: var(--domi-leaf-mid);
|
||||||
|
--famulus-leaf-shadow: var(--domi-leaf-lo);
|
||||||
|
--famulus-glint: var(--domi-leaf-edge);
|
||||||
|
--famulus-on-gold: var(--domi-leaf-fg);
|
||||||
|
--famulus-gold-deep: var(--domi-rim);
|
||||||
|
--famulus-moonlight: var(--domi-second);
|
||||||
|
--famulus-sage: var(--domi-ok);
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/* fiscus's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--bg: var(--domi-bg);
|
||||||
|
--chrome: var(--domi-chrome);
|
||||||
|
--chrome-top: var(--domi-chrome-top);
|
||||||
|
--panel: var(--domi-panel);
|
||||||
|
--hover: var(--domi-hover);
|
||||||
|
--line: var(--domi-line);
|
||||||
|
--edge: var(--domi-edge);
|
||||||
|
--field: var(--domi-field);
|
||||||
|
--fg: var(--domi-fg);
|
||||||
|
--fg-2: var(--domi-fg-2);
|
||||||
|
--muted: var(--domi-muted);
|
||||||
|
--disabled: var(--domi-disabled);
|
||||||
|
--plate-top: var(--domi-plate-top);
|
||||||
|
--plate-bottom: var(--domi-plate-bottom);
|
||||||
|
--plate-top-hover: var(--domi-plate-top-hover);
|
||||||
|
--plate-bottom-hover: var(--domi-plate-bottom-hover);
|
||||||
|
--accent: var(--domi-accent);
|
||||||
|
--accent-strong: var(--domi-accent-strong);
|
||||||
|
--accent-fg: var(--domi-leaf-fg);
|
||||||
|
--leaf: var(--domi-leaf);
|
||||||
|
--leaf-edge: var(--domi-leaf-edge);
|
||||||
|
--rim-top: var(--domi-rim);
|
||||||
|
--second: var(--domi-second);
|
||||||
|
--danger: var(--domi-danger);
|
||||||
|
--danger-fg: var(--domi-danger-fg);
|
||||||
|
--ok: var(--domi-ok);
|
||||||
|
--warning: var(--domi-warning);
|
||||||
|
--tint: var(--domi-tint);
|
||||||
|
--halo: var(--domi-halo);
|
||||||
|
--sheen: var(--domi-sheen);
|
||||||
|
--sheen-strong: var(--domi-sheen-strong);
|
||||||
|
--leaf-hover: var(--domi-leaf-hover);
|
||||||
|
--leaf-press: var(--domi-leaf-press);
|
||||||
|
--leaf-bevel: var(--domi-leaf-bevel);
|
||||||
|
--leaf-bevel-press: var(--domi-leaf-bevel-press);
|
||||||
|
--edge-accent: var(--domi-edge-accent);
|
||||||
|
--edge-danger: var(--domi-edge-danger);
|
||||||
|
--tint-danger: var(--domi-tint-danger);
|
||||||
|
--primary-fill: var(--domi-leaf);
|
||||||
|
--primary-edge: var(--domi-leaf-edge);
|
||||||
|
--inscription: var(--domi-font-inscription);
|
||||||
|
--book: var(--domi-font-book);
|
||||||
|
--hand: var(--domi-font-hand);
|
||||||
|
--code: var(--domi-font-code);
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/* fundamentum's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
.theme-fundamentum {
|
||||||
|
--bg: var(--domi-bg);
|
||||||
|
--chrome: var(--domi-chrome);
|
||||||
|
--chrome-top: var(--domi-chrome-top);
|
||||||
|
--panel: var(--domi-panel);
|
||||||
|
--hover: var(--domi-hover);
|
||||||
|
--line: var(--domi-line);
|
||||||
|
--edge: var(--domi-edge);
|
||||||
|
--field: var(--domi-field);
|
||||||
|
--fg: var(--domi-fg);
|
||||||
|
--fg-2: var(--domi-fg-2);
|
||||||
|
--muted: var(--domi-muted);
|
||||||
|
--disabled: var(--domi-disabled);
|
||||||
|
--plate-top: var(--domi-plate-top);
|
||||||
|
--plate-bottom: var(--domi-plate-bottom);
|
||||||
|
--plate-top-hover: var(--domi-plate-top-hover);
|
||||||
|
--plate-bottom-hover: var(--domi-plate-bottom-hover);
|
||||||
|
--accent: var(--domi-accent);
|
||||||
|
--accent-strong: var(--domi-accent-strong);
|
||||||
|
--accent-fg: var(--domi-leaf-fg);
|
||||||
|
--leaf: var(--domi-leaf);
|
||||||
|
--leaf-edge: var(--domi-leaf-edge);
|
||||||
|
--rim-top: var(--domi-rim);
|
||||||
|
--second: var(--domi-second);
|
||||||
|
--danger: var(--domi-danger);
|
||||||
|
--danger-fg: var(--domi-danger-fg);
|
||||||
|
--ok: var(--domi-ok);
|
||||||
|
--warning: var(--domi-warning);
|
||||||
|
--tint: var(--domi-tint);
|
||||||
|
--halo: var(--domi-halo);
|
||||||
|
--sheen: var(--domi-sheen);
|
||||||
|
--sheen-strong: var(--domi-sheen-strong);
|
||||||
|
--leaf-hover: var(--domi-leaf-hover);
|
||||||
|
--leaf-press: var(--domi-leaf-press);
|
||||||
|
--leaf-bevel: var(--domi-leaf-bevel);
|
||||||
|
--leaf-bevel-press: var(--domi-leaf-bevel-press);
|
||||||
|
--edge-accent: var(--domi-edge-accent);
|
||||||
|
--edge-danger: var(--domi-edge-danger);
|
||||||
|
--tint-danger: var(--domi-tint-danger);
|
||||||
|
--primary-fill: var(--domi-leaf);
|
||||||
|
--primary-edge: var(--domi-leaf-edge);
|
||||||
|
--inscription: var(--domi-font-inscription);
|
||||||
|
--book: var(--domi-font-book);
|
||||||
|
--hand: var(--domi-font-hand);
|
||||||
|
--code: var(--domi-font-code);
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
/* ianitor's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
.ia {
|
||||||
|
--ground: var(--domi-bg);
|
||||||
|
--colonnade: var(--domi-chrome);
|
||||||
|
--surface: var(--domi-panel);
|
||||||
|
--surface-2: var(--domi-hover);
|
||||||
|
--hairline: var(--domi-line);
|
||||||
|
--control-edge: var(--domi-edge);
|
||||||
|
--text: var(--domi-fg);
|
||||||
|
--text-2: var(--domi-fg-2);
|
||||||
|
--muted: var(--domi-muted);
|
||||||
|
--disabled: var(--domi-disabled);
|
||||||
|
--accent: var(--domi-accent);
|
||||||
|
--accent-strong: var(--domi-accent-strong);
|
||||||
|
--primary-high: var(--domi-leaf-hi);
|
||||||
|
--primary-mid: var(--domi-leaf-mid);
|
||||||
|
--primary-low: var(--domi-leaf-lo);
|
||||||
|
--primary-edge: var(--domi-leaf-edge);
|
||||||
|
--on-primary: var(--domi-leaf-fg);
|
||||||
|
--second: var(--domi-second);
|
||||||
|
--danger: var(--domi-danger);
|
||||||
|
--on-danger: var(--domi-danger-fg);
|
||||||
|
--healthy: var(--domi-ok);
|
||||||
|
--degraded: var(--domi-warning);
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/* lapilli's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--bg: var(--domi-bg);
|
||||||
|
--chrome: var(--domi-chrome);
|
||||||
|
--chrome-top: var(--domi-chrome-top);
|
||||||
|
--panel: var(--domi-panel);
|
||||||
|
--hover: var(--domi-hover);
|
||||||
|
--line: var(--domi-line);
|
||||||
|
--edge: var(--domi-edge);
|
||||||
|
--field: var(--domi-field);
|
||||||
|
--fg: var(--domi-fg);
|
||||||
|
--fg-2: var(--domi-fg-2);
|
||||||
|
--muted: var(--domi-muted);
|
||||||
|
--disabled: var(--domi-disabled);
|
||||||
|
--plate-top: var(--domi-plate-top);
|
||||||
|
--plate-bottom: var(--domi-plate-bottom);
|
||||||
|
--plate-top-hover: var(--domi-plate-top-hover);
|
||||||
|
--plate-bottom-hover: var(--domi-plate-bottom-hover);
|
||||||
|
--accent: var(--domi-accent);
|
||||||
|
--accent-strong: var(--domi-accent-strong);
|
||||||
|
--accent-fg: var(--domi-leaf-fg);
|
||||||
|
--leaf: var(--domi-leaf);
|
||||||
|
--leaf-edge: var(--domi-leaf-edge);
|
||||||
|
--rim-top: var(--domi-rim);
|
||||||
|
--second: var(--domi-second);
|
||||||
|
--danger: var(--domi-danger);
|
||||||
|
--danger-fg: var(--domi-danger-fg);
|
||||||
|
--ok: var(--domi-ok);
|
||||||
|
--warning: var(--domi-warning);
|
||||||
|
--tint: var(--domi-tint);
|
||||||
|
--halo: var(--domi-halo);
|
||||||
|
--sheen: var(--domi-sheen);
|
||||||
|
--sheen-strong: var(--domi-sheen-strong);
|
||||||
|
--leaf-hover: var(--domi-leaf-hover);
|
||||||
|
--leaf-press: var(--domi-leaf-press);
|
||||||
|
--leaf-bevel: var(--domi-leaf-bevel);
|
||||||
|
--leaf-bevel-press: var(--domi-leaf-bevel-press);
|
||||||
|
--edge-accent: var(--domi-edge-accent);
|
||||||
|
--edge-danger: var(--domi-edge-danger);
|
||||||
|
--tint-danger: var(--domi-tint-danger);
|
||||||
|
--primary-fill: var(--domi-leaf);
|
||||||
|
--primary-edge: var(--domi-leaf-edge);
|
||||||
|
--inscription: var(--domi-font-inscription);
|
||||||
|
--book: var(--domi-font-book);
|
||||||
|
--hand: var(--domi-font-hand);
|
||||||
|
--code: var(--domi-font-code);
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
/* liber's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--lb-ground: var(--domi-bg);
|
||||||
|
--lb-colonnade: var(--domi-chrome);
|
||||||
|
--lb-surface: var(--domi-panel);
|
||||||
|
--lb-surface-2: var(--domi-hover);
|
||||||
|
--lb-hairline: var(--domi-line);
|
||||||
|
--lb-control-edge: var(--domi-edge);
|
||||||
|
--lb-text: var(--domi-fg);
|
||||||
|
--lb-text-2: var(--domi-fg-2);
|
||||||
|
--lb-muted: var(--domi-muted);
|
||||||
|
--lb-disabled: var(--domi-disabled);
|
||||||
|
--lb-accent: var(--domi-accent);
|
||||||
|
--lb-accent-strong: var(--domi-accent-strong);
|
||||||
|
--lb-primary-high: var(--domi-leaf-hi);
|
||||||
|
--lb-primary-mid: var(--domi-leaf-mid);
|
||||||
|
--lb-primary-low: var(--domi-leaf-lo);
|
||||||
|
--lb-primary-edge: var(--domi-leaf-edge);
|
||||||
|
--lb-on-primary: var(--domi-leaf-fg);
|
||||||
|
--lb-copper: var(--domi-second);
|
||||||
|
--lb-danger: var(--domi-danger);
|
||||||
|
--lb-success: var(--domi-ok);
|
||||||
|
--lb-warning: var(--domi-warning);
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
/* ludus's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--lu-ground-app: var(--domi-bg);
|
||||||
|
--lu-ground-sunken: var(--domi-chrome);
|
||||||
|
--lu-ground-card: var(--domi-panel);
|
||||||
|
--lu-surface: var(--domi-hover);
|
||||||
|
--lu-hairline: var(--domi-line);
|
||||||
|
--lu-blue-border: var(--domi-edge);
|
||||||
|
--lu-ground-deepest: var(--domi-field);
|
||||||
|
--lu-text-primary: var(--domi-fg);
|
||||||
|
--lu-text-body: var(--domi-fg-2);
|
||||||
|
--lu-text-secondary: var(--domi-muted);
|
||||||
|
--lu-text-tertiary: var(--domi-disabled);
|
||||||
|
--lu-primary-accent: var(--domi-accent);
|
||||||
|
--lu-primary-bright: var(--domi-leaf-hi);
|
||||||
|
--lu-primary: var(--domi-leaf-mid);
|
||||||
|
--lu-primary-mid: var(--domi-leaf-lo);
|
||||||
|
--lu-gold: var(--domi-leaf-edge);
|
||||||
|
--lu-text-on-primary: var(--domi-leaf-fg);
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
/* medicus's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--md-bg: var(--domi-bg);
|
||||||
|
--md-sidebar: var(--domi-chrome);
|
||||||
|
--md-surface: var(--domi-panel);
|
||||||
|
--md-surface-2: var(--domi-hover);
|
||||||
|
--md-border: var(--domi-line);
|
||||||
|
--md-control-edge: var(--domi-edge);
|
||||||
|
--md-text: var(--domi-fg);
|
||||||
|
--md-text-2: var(--domi-fg-2);
|
||||||
|
--md-text-muted: var(--domi-muted);
|
||||||
|
--md-text-disabled: var(--domi-disabled);
|
||||||
|
--md-accent: var(--domi-accent);
|
||||||
|
--md-accent-strong: var(--domi-accent-strong);
|
||||||
|
--md-primary-high: var(--domi-leaf-hi);
|
||||||
|
--md-primary-mid: var(--domi-leaf-mid);
|
||||||
|
--md-primary-low: var(--domi-leaf-lo);
|
||||||
|
--md-primary-edge: var(--domi-leaf-edge);
|
||||||
|
--md-on-primary: var(--domi-leaf-fg);
|
||||||
|
--md-red-fill-edge: var(--domi-rim);
|
||||||
|
--md-secondary-text: var(--domi-second);
|
||||||
|
--md-danger: var(--domi-danger);
|
||||||
|
--md-on-danger: var(--domi-danger-fg);
|
||||||
|
--md-success: var(--domi-ok);
|
||||||
|
--md-warning: var(--domi-warning);
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
/* memoria's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--memoria-bg: var(--domi-bg);
|
||||||
|
--memoria-colonnade: var(--domi-chrome);
|
||||||
|
--memoria-surface: var(--domi-panel);
|
||||||
|
--memoria-raised: var(--domi-hover);
|
||||||
|
--memoria-line: var(--domi-line);
|
||||||
|
--memoria-edge: var(--domi-edge);
|
||||||
|
--memoria-ink: var(--domi-fg);
|
||||||
|
--memoria-ink-quiet: var(--domi-fg-2);
|
||||||
|
--memoria-muted: var(--domi-muted);
|
||||||
|
--memoria-accent: var(--domi-accent);
|
||||||
|
--memoria-aerugo-strong: var(--domi-accent-strong);
|
||||||
|
--memoria-leaf: var(--domi-leaf);
|
||||||
|
--memoria-aerugo-ink: var(--domi-leaf-fg);
|
||||||
|
--memoria-aerugo-deep: var(--domi-rim);
|
||||||
|
--memoria-purpura: var(--domi-second);
|
||||||
|
--memoria-danger: var(--domi-danger);
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/* pictor's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--bg: var(--domi-bg);
|
||||||
|
--chrome: var(--domi-chrome);
|
||||||
|
--chrome-top: var(--domi-chrome-top);
|
||||||
|
--panel: var(--domi-panel);
|
||||||
|
--hover: var(--domi-hover);
|
||||||
|
--line: var(--domi-line);
|
||||||
|
--edge: var(--domi-edge);
|
||||||
|
--field: var(--domi-field);
|
||||||
|
--fg: var(--domi-fg);
|
||||||
|
--fg-2: var(--domi-fg-2);
|
||||||
|
--muted: var(--domi-muted);
|
||||||
|
--disabled: var(--domi-disabled);
|
||||||
|
--plate-top: var(--domi-plate-top);
|
||||||
|
--plate-bottom: var(--domi-plate-bottom);
|
||||||
|
--plate-top-hover: var(--domi-plate-top-hover);
|
||||||
|
--plate-bottom-hover: var(--domi-plate-bottom-hover);
|
||||||
|
--accent: var(--domi-accent);
|
||||||
|
--accent-strong: var(--domi-accent-strong);
|
||||||
|
--accent-fg: var(--domi-leaf-fg);
|
||||||
|
--leaf: var(--domi-leaf);
|
||||||
|
--leaf-edge: var(--domi-leaf-edge);
|
||||||
|
--rim-top: var(--domi-rim);
|
||||||
|
--second: var(--domi-second);
|
||||||
|
--danger: var(--domi-danger);
|
||||||
|
--danger-fg: var(--domi-danger-fg);
|
||||||
|
--ok: var(--domi-ok);
|
||||||
|
--warning: var(--domi-warning);
|
||||||
|
--tint: var(--domi-tint);
|
||||||
|
--halo: var(--domi-halo);
|
||||||
|
--sheen: var(--domi-sheen);
|
||||||
|
--sheen-strong: var(--domi-sheen-strong);
|
||||||
|
--leaf-hover: var(--domi-leaf-hover);
|
||||||
|
--leaf-press: var(--domi-leaf-press);
|
||||||
|
--leaf-bevel: var(--domi-leaf-bevel);
|
||||||
|
--leaf-bevel-press: var(--domi-leaf-bevel-press);
|
||||||
|
--edge-accent: var(--domi-edge-accent);
|
||||||
|
--edge-danger: var(--domi-edge-danger);
|
||||||
|
--tint-danger: var(--domi-tint-danger);
|
||||||
|
--primary-fill: var(--domi-leaf);
|
||||||
|
--primary-edge: var(--domi-leaf-edge);
|
||||||
|
--inscription: var(--domi-font-inscription);
|
||||||
|
--book: var(--domi-font-book);
|
||||||
|
--hand: var(--domi-font-hand);
|
||||||
|
--code: var(--domi-font-code);
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
/* postea's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--postea-color-bg-app: var(--domi-bg);
|
||||||
|
--postea-color-bg-panel: var(--domi-chrome);
|
||||||
|
--postea-color-bg-surface: var(--domi-panel);
|
||||||
|
--postea-color-rule-base: var(--domi-line);
|
||||||
|
--postea-color-accent-dim: var(--domi-edge);
|
||||||
|
--postea-color-text-heading: var(--domi-fg);
|
||||||
|
--postea-color-text-soft: var(--domi-fg-2);
|
||||||
|
--postea-color-text-muted: var(--domi-muted);
|
||||||
|
--postea-color-text-faint: var(--domi-disabled);
|
||||||
|
--postea-color-accent-base: var(--domi-accent);
|
||||||
|
--postea-color-accent-bright: var(--domi-accent-strong);
|
||||||
|
--postea-color-primary-base: var(--domi-leaf-mid);
|
||||||
|
--postea-color-primary-deep: var(--domi-leaf-lo);
|
||||||
|
--postea-color-accent-mid: var(--domi-leaf-edge);
|
||||||
|
--postea-color-gold-base: var(--domi-second);
|
||||||
|
--postea-color-risk-onDark: var(--domi-danger);
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
/* respicio's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--bg: var(--domi-bg);
|
||||||
|
--colonnade: var(--domi-chrome);
|
||||||
|
--surface: var(--domi-panel);
|
||||||
|
--surface-2: var(--domi-hover);
|
||||||
|
--border: var(--domi-line);
|
||||||
|
--field-edge: var(--domi-edge);
|
||||||
|
--text: var(--domi-fg);
|
||||||
|
--text-2: var(--domi-fg-2);
|
||||||
|
--muted: var(--domi-muted);
|
||||||
|
--disabled: var(--domi-disabled);
|
||||||
|
--accent: var(--domi-accent);
|
||||||
|
--accent-strong: var(--domi-accent-strong);
|
||||||
|
--leaf-mid: var(--domi-leaf-mid);
|
||||||
|
--leaf-low: var(--domi-leaf-lo);
|
||||||
|
--leaf-edge: var(--domi-leaf-edge);
|
||||||
|
--ink: var(--domi-leaf-fg);
|
||||||
|
--info: var(--domi-second);
|
||||||
|
--danger: var(--domi-danger);
|
||||||
|
--ok: var(--domi-ok);
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
/* tabula's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--tbl-window: var(--domi-bg);
|
||||||
|
--tbl-panel: var(--domi-chrome);
|
||||||
|
--tbl-card: var(--domi-panel);
|
||||||
|
--tbl-rule: var(--domi-line);
|
||||||
|
--tbl-gold-dim: var(--domi-edge);
|
||||||
|
--tbl-field: var(--domi-field);
|
||||||
|
--tbl-ink: var(--domi-fg);
|
||||||
|
--tbl-ink-dim: var(--domi-fg-2);
|
||||||
|
--tbl-ink-muted: var(--domi-muted);
|
||||||
|
--tbl-ink-faint: var(--domi-disabled);
|
||||||
|
--tbl-gold: var(--domi-accent);
|
||||||
|
--tbl-gold-light: var(--domi-accent-strong);
|
||||||
|
--tbl-gold-deep: var(--domi-leaf-lo);
|
||||||
|
--tbl-gold-pale: var(--domi-leaf-edge);
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
/* tectum's token names before @domi/ui, as aliases. GENERATED by tools/build-legacy.mjs: do not edit. */
|
||||||
|
/* Load after @domi/ui/domi.css. Temporary: rename usages to --domi-* and drop this file. */
|
||||||
|
:root {
|
||||||
|
--td-bg: var(--domi-bg);
|
||||||
|
--td-sidebar: var(--domi-chrome);
|
||||||
|
--td-surface: var(--domi-panel);
|
||||||
|
--td-surface-2: var(--domi-hover);
|
||||||
|
--td-border: var(--domi-line);
|
||||||
|
--td-control-edge: var(--domi-edge);
|
||||||
|
--td-text: var(--domi-fg);
|
||||||
|
--td-text-2: var(--domi-fg-2);
|
||||||
|
--td-text-muted: var(--domi-muted);
|
||||||
|
--td-accent: var(--domi-accent);
|
||||||
|
--td-accent-hover: var(--domi-accent-strong);
|
||||||
|
--td-leaf-high: var(--domi-leaf-hi);
|
||||||
|
--td-leaf-mid: var(--domi-leaf-mid);
|
||||||
|
--td-leaf-low: var(--domi-leaf-lo);
|
||||||
|
--td-leaf-edge: var(--domi-leaf-edge);
|
||||||
|
--td-on-accent: var(--domi-leaf-fg);
|
||||||
|
--td-legal: var(--domi-second);
|
||||||
|
--td-danger: var(--domi-danger);
|
||||||
|
--td-success: var(--domi-ok);
|
||||||
|
--td-warning: var(--domi-warning);
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,24 @@
|
|||||||
|
// SPDX-License-Identifier: CPAL-1.0
|
||||||
|
// The Original Code is @domi/ui; Initial Developer Marek Novák, Copyright (c) 2026. See LICENSE (Exhibit B: the credit).
|
||||||
|
// @domi/ui: import the components here and the styles once, at the app root:
|
||||||
|
// import '@domi/ui/domi.css';
|
||||||
|
// import { Button, TextField } from '@domi/ui';
|
||||||
|
export { default as Button } from './components/Button.svelte';
|
||||||
|
export { default as TextField } from './components/TextField.svelte';
|
||||||
|
export { default as Checkbox } from './components/Checkbox.svelte';
|
||||||
|
export { default as Radio } from './components/Radio.svelte';
|
||||||
|
export { default as Switch } from './components/Switch.svelte';
|
||||||
|
export { default as Select } from './components/Select.svelte';
|
||||||
|
export { default as Segmented } from './components/Segmented.svelte';
|
||||||
|
export { default as Icon } from './components/Icon.svelte';
|
||||||
|
export { default as Strike } from './components/Strike.svelte';
|
||||||
|
export { default as DomiCredit } from './components/DomiCredit.svelte';
|
||||||
|
export { DOMI_ATTRIBUTION, DOMI_ATTRIBUTION_TEXT } from './lib/credit';
|
||||||
|
export { isAndroid } from './lib/editable';
|
||||||
|
|
||||||
|
export { strike } from './lib/strike';
|
||||||
|
export { icons, type IconName } from './lib/icons';
|
||||||
|
export { enterAction, canSend, isSoftKeyboard, failureText, DomiError } from './lib/keys';
|
||||||
|
export type { EnterKey, EnterContext, EnterResult, FieldState, ButtonState } from './lib/keys';
|
||||||
|
export type { DomiOption, ButtonVariant, ControlSize, FieldAction, DomiTheme, DomiDensity } from './types';
|
||||||
|
export { tokens, appIds, type DomiAppId } from './tokens/generated';
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
// SPDX-License-Identifier: CPAL-1.0
|
||||||
|
/**
|
||||||
|
* The Attribution Information of Exhibit B of the licence (CPAL-1.0, LICENSE). Anyone who distributes @domi/ui or a
|
||||||
|
* Larger Work made with it shows this where CPAL §14 asks: prominently in the user interface when the work is
|
||||||
|
* launched or a session starts. `DomiCredit` renders it.
|
||||||
|
*/
|
||||||
|
export const DOMI_ATTRIBUTION = {
|
||||||
|
phrase: 'Built on Domi',
|
||||||
|
url: 'https://aula.marek-novak.cz',
|
||||||
|
copyright: 'Copyright (c) 2026 Marek Novák',
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
/** The credit as one line of plain text, for a log, a terminal or a native About box. */
|
||||||
|
export const DOMI_ATTRIBUTION_TEXT = `${DOMI_ATTRIBUTION.phrase} · ${DOMI_ATTRIBUTION.url} · ${DOMI_ATTRIBUTION.copyright}`;
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
// SPDX-License-Identifier: CPAL-1.0
|
||||||
|
/**
|
||||||
|
* Helpers for TextField's editable mode: a contenteditable box with role="textbox" in place of <input>/<textarea>.
|
||||||
|
* Why: on Android the WebView asks Google's Autofill service (a network request) as soon as a text <input> or
|
||||||
|
* <textarea> gets focus, and no attribute stops it (found by Amicitia). A contenteditable box is not an autofill
|
||||||
|
* target. Plain text only: paste and drop never bring markup.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/** True in an Android WebView or browser, where editable mode avoids the Autofill request. Safe during SSR. */
|
||||||
|
export function isAndroid(): boolean {
|
||||||
|
return typeof navigator !== 'undefined' && /Android/i.test(navigator.userAgent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** The box's text, with line breaks as \n. An emptied box that only holds a stray line break reads as ''. */
|
||||||
|
export function readText(el: HTMLElement): string {
|
||||||
|
const raw = typeof el.innerText === 'string' ? el.innerText : (el.textContent ?? '');
|
||||||
|
return raw === '\n' ? '' : raw;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Replaces the box's content with plain text (no markup can enter). */
|
||||||
|
export function writeText(el: HTMLElement, text: string): void {
|
||||||
|
el.textContent = text;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Puts the caret after the last character. */
|
||||||
|
export function caretToEnd(el: HTMLElement): void {
|
||||||
|
const sel = typeof getSelection === 'function' ? getSelection() : null;
|
||||||
|
if (!sel || typeof document.createRange !== 'function') return;
|
||||||
|
const range = document.createRange();
|
||||||
|
range.selectNodeContents(el);
|
||||||
|
range.collapse(false);
|
||||||
|
sel.removeAllRanges();
|
||||||
|
sel.addRange(range);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inserts plain text at the caret. Uses the browser's own insertion where it exists, so undo keeps working;
|
||||||
|
* otherwise inserts a text node at the selection.
|
||||||
|
*/
|
||||||
|
export function insertPlainText(el: HTMLElement, text: string): void {
|
||||||
|
try {
|
||||||
|
if (typeof document.execCommand === 'function' && document.execCommand('insertText', false, text)) return;
|
||||||
|
} catch {
|
||||||
|
// Fall through to the Range insertion.
|
||||||
|
}
|
||||||
|
const sel = typeof getSelection === 'function' ? getSelection() : null;
|
||||||
|
const node = document.createTextNode(text);
|
||||||
|
if (!sel || sel.rangeCount === 0 || !el.contains(sel.getRangeAt(0).commonAncestorContainer)) {
|
||||||
|
el.append(node);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const range = sel.getRangeAt(0);
|
||||||
|
range.deleteContents();
|
||||||
|
range.insertNode(node);
|
||||||
|
range.setStartAfter(node);
|
||||||
|
range.collapse(true);
|
||||||
|
sel.removeAllRanges();
|
||||||
|
sel.addRange(range);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** The soft keyboard a type asks for, as inputmode (an editable box has no type attribute). */
|
||||||
|
export function inputmodeFor(type: string): 'text' | 'email' | 'url' | 'tel' | 'decimal' | 'search' {
|
||||||
|
const map: Record<string, 'email' | 'url' | 'tel' | 'decimal' | 'search'> = {
|
||||||
|
email: 'email',
|
||||||
|
url: 'url',
|
||||||
|
tel: 'tel',
|
||||||
|
number: 'decimal',
|
||||||
|
search: 'search',
|
||||||
|
};
|
||||||
|
return map[type] ?? 'text';
|
||||||
|
}
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
/**
|
||||||
|
* The Domi icon set: 24-unit stroke paths, drawn with stroke="currentColor", 1.8 wide, round caps and joins.
|
||||||
|
* Icons sit beside words; an icon alone always comes with an accessible name on its button.
|
||||||
|
*/
|
||||||
|
export const icons = {
|
||||||
|
send: 'M4.5 12h13M12.5 6.5 18 12l-5.5 5.5',
|
||||||
|
search: 'M10.5 17a6.5 6.5 0 1 0 0-13 6.5 6.5 0 0 0 0 13ZM15.5 15.5 20 20',
|
||||||
|
next: 'M6 9.5 12 15l6-5.5',
|
||||||
|
save: 'M5 12.5 10 17.5 19 7',
|
||||||
|
check: 'M5 12.5 10 17.5 19 7',
|
||||||
|
close: 'M6.5 6.5 17.5 17.5M17.5 6.5 6.5 17.5',
|
||||||
|
plus: 'M12 5v14M5 12h14',
|
||||||
|
minus: 'M5 12h14',
|
||||||
|
trash: 'M5 7h14M10 7V5h4v2M7 7l1 12h8l1-12M10.5 10.5v5.5M13.5 10.5v5.5',
|
||||||
|
alert: 'M12 4 21 19.5H3L12 4ZM12 10v4.5M12 17.2v.1',
|
||||||
|
info: 'M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18ZM12 11v5.5M12 7.8v.1',
|
||||||
|
eye: 'M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12ZM12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z',
|
||||||
|
'eye-off': 'M4 4l16 16M9.9 5.8A8.8 8.8 0 0 1 12 5.5c6 0 9.5 6.5 9.5 6.5a16 16 0 0 1-3 3.8M6.5 7.3A15.6 15.6 0 0 0 2.5 12S6 18.5 12 18.5c1.7 0 3.2-.5 4.4-1.2M10 10a3 3 0 0 0 4 4',
|
||||||
|
'chevron-down': 'M6 9.5 12 15l6-5.5',
|
||||||
|
'chevron-right': 'M9.5 6 15 12l-5.5 6',
|
||||||
|
'arrow-left': 'M19.5 12h-13M11.5 6.5 6 12l5.5 5.5',
|
||||||
|
retry: 'M4.5 12a7.5 7.5 0 1 0 2.2-5.3M4.5 4.5v4h4',
|
||||||
|
edit: 'M4.5 19.5 5.5 15 15.5 5a2.1 2.1 0 0 1 3 3l-10 10-4 1.5ZM13.5 7l3 3',
|
||||||
|
copy: 'M9 9h10.5v10.5H9zM15 9V4.5H4.5V15H9',
|
||||||
|
lock: 'M6 11h12v9H6zM8.5 11V8a3.5 3.5 0 1 1 7 0v3',
|
||||||
|
} as const;
|
||||||
|
|
||||||
|
export type IconName = keyof typeof icons;
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
/** What Enter does in a field with a send button. Pure, so the flow is tested without a browser. */
|
||||||
|
export type EnterResult = 'send' | 'newline' | 'ignore';
|
||||||
|
|
||||||
|
export interface EnterKey {
|
||||||
|
key: string;
|
||||||
|
shiftKey?: boolean;
|
||||||
|
ctrlKey?: boolean;
|
||||||
|
metaKey?: boolean;
|
||||||
|
altKey?: boolean;
|
||||||
|
/** True while an input method (Chinese, Japanese, a phone keyboard's suggestion) is composing. */
|
||||||
|
isComposing?: boolean;
|
||||||
|
keyCode?: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface EnterContext {
|
||||||
|
multiline: boolean;
|
||||||
|
/**
|
||||||
|
* 'auto' (default): Enter sends, except in a multi-line field on a touch-only device, where a soft keyboard has
|
||||||
|
* no Shift: there Enter makes a new line and the seal sends. 'always': Enter always sends (Shift+Enter is a new
|
||||||
|
* line). 'never': Enter never sends (a multi-line field for long writing; Ctrl/Cmd+Enter still sends).
|
||||||
|
*/
|
||||||
|
enterSends?: 'auto' | 'always' | 'never';
|
||||||
|
/** True on a device whose only pointer is coarse (a phone). */
|
||||||
|
softKeyboard?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function enterAction(e: EnterKey, ctx: EnterContext): EnterResult {
|
||||||
|
if (e.key !== 'Enter') return 'ignore';
|
||||||
|
// keyCode 229 is the IME's own Enter on some Android keyboards and Safari.
|
||||||
|
if (e.isComposing || e.keyCode === 229) return 'ignore';
|
||||||
|
if (e.ctrlKey || e.metaKey) return 'send';
|
||||||
|
if (!ctx.multiline) return e.altKey ? 'ignore' : 'send';
|
||||||
|
if (e.shiftKey || e.altKey) return 'newline';
|
||||||
|
const mode = ctx.enterSends ?? 'auto';
|
||||||
|
if (mode === 'never') return 'newline';
|
||||||
|
if (mode === 'auto' && ctx.softKeyboard) return 'newline';
|
||||||
|
return 'send';
|
||||||
|
}
|
||||||
|
|
||||||
|
/** A field can send when it holds more than white space and is not already busy. */
|
||||||
|
export function canSend(value: string, state: FieldState, disabled = false): boolean {
|
||||||
|
return !disabled && state !== 'sending' && value.trim().length > 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type FieldState = 'idle' | 'sending' | 'sent' | 'error';
|
||||||
|
export type ButtonState = 'idle' | 'loading' | 'success' | 'error';
|
||||||
|
|
||||||
|
/** Only a phone-like device: no fine pointer anywhere. Safe to call during SSR. */
|
||||||
|
export function isSoftKeyboard(): boolean {
|
||||||
|
if (typeof matchMedia !== 'function') return false;
|
||||||
|
return matchMedia('(pointer: coarse)').matches && !matchMedia('(any-pointer: fine)').matches;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** The plain message for a failed send: the error's own text when it is meant for people, else a default. */
|
||||||
|
export function failureText(err: unknown, fallback: string): string {
|
||||||
|
if (err instanceof DomiError) return err.message;
|
||||||
|
if (typeof err === 'string' && err.trim()) return err;
|
||||||
|
return fallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Throw this from onsend / onclick to show its message to the person. Any other error shows the default. */
|
||||||
|
export class DomiError extends Error {
|
||||||
|
constructor(message: string) {
|
||||||
|
super(message);
|
||||||
|
this.name = 'DomiError';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
import type { Action } from 'svelte/action';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The press flow of every Domi button: on pointer down it places the seal impression where the press landed
|
||||||
|
* (--_px, --_py) and replays it (data-struck); Enter and Space show the sunk plate while held (data-pressed), so a
|
||||||
|
* keyboard press looks like a pointer press. Reduced motion is handled in CSS (no impression, no movement).
|
||||||
|
*/
|
||||||
|
export const strike: Action<HTMLElement> = (node) => {
|
||||||
|
const replay = (x: string, y: string) => {
|
||||||
|
node.style.setProperty('--_px', x);
|
||||||
|
node.style.setProperty('--_py', y);
|
||||||
|
node.removeAttribute('data-struck');
|
||||||
|
// Force a style flush so the animation restarts on a quick second press.
|
||||||
|
void node.offsetWidth;
|
||||||
|
node.setAttribute('data-struck', '');
|
||||||
|
};
|
||||||
|
const down = (e: PointerEvent) => {
|
||||||
|
if (e.button !== 0 || isInert(node)) return;
|
||||||
|
const r = node.getBoundingClientRect();
|
||||||
|
replay(`${e.clientX - r.left}px`, `${e.clientY - r.top}px`);
|
||||||
|
};
|
||||||
|
const keydown = (e: KeyboardEvent) => {
|
||||||
|
if ((e.key === 'Enter' || e.key === ' ') && !e.repeat && !isInert(node)) {
|
||||||
|
node.setAttribute('data-pressed', '');
|
||||||
|
replay('50%', '50%');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const release = () => node.removeAttribute('data-pressed');
|
||||||
|
const end = (e: AnimationEvent) => {
|
||||||
|
if (e.target === node && e.pseudoElement === '::after') node.removeAttribute('data-struck');
|
||||||
|
};
|
||||||
|
node.addEventListener('pointerdown', down);
|
||||||
|
node.addEventListener('keydown', keydown);
|
||||||
|
node.addEventListener('keyup', release);
|
||||||
|
node.addEventListener('blur', release);
|
||||||
|
node.addEventListener('animationend', end);
|
||||||
|
return {
|
||||||
|
destroy() {
|
||||||
|
node.removeEventListener('pointerdown', down);
|
||||||
|
node.removeEventListener('keydown', keydown);
|
||||||
|
node.removeEventListener('keyup', release);
|
||||||
|
node.removeEventListener('blur', release);
|
||||||
|
node.removeEventListener('animationend', end);
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
function isInert(node: HTMLElement): boolean {
|
||||||
|
return (node as HTMLButtonElement).disabled === true || node.getAttribute('aria-disabled') === 'true';
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,15 @@
|
|||||||
|
import type { IconName } from './lib/icons';
|
||||||
|
|
||||||
|
/** One choice of a Select or a Segmented control. */
|
||||||
|
export interface DomiOption {
|
||||||
|
value: string;
|
||||||
|
label: string;
|
||||||
|
icon?: IconName;
|
||||||
|
disabled?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ButtonVariant = 'plate' | 'primary' | 'quiet' | 'danger';
|
||||||
|
export type ControlSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
||||||
|
export type FieldAction = 'send' | 'search' | 'next' | 'save';
|
||||||
|
export type DomiTheme = 'dark' | 'light' | 'auto';
|
||||||
|
export type DomiDensity = 'pointer' | 'touch';
|
||||||
@@ -3,18 +3,19 @@
|
|||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"license": "CPAL-1.0",
|
"license": "CPAL-1.0",
|
||||||
"description": "The shared dark Domi theme (murex palette) and its Svelte components.",
|
"description": "Ianitor's own components on top of @domi/ui (the shared Domi design system): banners, dialogs, status, and adapters for Button and Segmented.",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"svelte": "./src/index.ts",
|
"svelte": "./src/index.ts",
|
||||||
"exports": {
|
"exports": {
|
||||||
".": { "svelte": "./src/index.ts", "default": "./src/index.ts" },
|
".": {
|
||||||
|
"svelte": "./src/index.ts",
|
||||||
|
"default": "./src/index.ts"
|
||||||
|
},
|
||||||
"./tokens.css": "./src/tokens.css",
|
"./tokens.css": "./src/tokens.css",
|
||||||
"./components.css": "./src/components.css"
|
"./components.css": "./src/components.css"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/cinzel": "^5.1.0",
|
"@domi/ui": "workspace:*"
|
||||||
"@fontsource/cormorant-garamond": "^5.1.0",
|
|
||||||
"@fontsource/manrope": "^5.1.0"
|
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"svelte": "^5.20.0"
|
"svelte": "^5.20.0"
|
||||||
|
|||||||
@@ -3,11 +3,17 @@
|
|||||||
- License 1.0: see LICENSE (its Exhibit A is this file's notice). -->
|
- License 1.0: see LICENSE (its Exhibit A is this file's notice). -->
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { Snippet } from "svelte";
|
import type { Snippet } from "svelte";
|
||||||
|
import { Button as DomiButton } from "@domi/ui";
|
||||||
import Icon from "./Icon.svelte";
|
import Icon from "./Icon.svelte";
|
||||||
import type { IconName } from "./icons";
|
import type { IconName } from "./icons";
|
||||||
|
|
||||||
// Handoff §2.1: disabled is aria-disabled (it stays focusable and its reason is read through
|
// Ianitor's buttons are @domi/ui's Button (struck plate, leaf, states, 48 px on touch). This maps Ianitor's props
|
||||||
// aria-describedby); pending keeps the label, adds a spinner and ignores clicks.
|
// onto it, so the sizes on a desktop stay as they were: an ordinary button 44 px (lg), the primary 50 px (xl),
|
||||||
|
// a small one 34 px (md). quiet and outline were both bordered buttons here; they are the plate now.
|
||||||
|
// pending the button shows its work (status loading); a second press does nothing
|
||||||
|
// disabled not pressable; say elsewhere why (describedby points at that text)
|
||||||
|
// label the accessible name when it says more than the words ("+ Host" is "Add a host")
|
||||||
|
// icon one of Ianitor's icons, before the words
|
||||||
let {
|
let {
|
||||||
variant = "quiet",
|
variant = "quiet",
|
||||||
icon,
|
icon,
|
||||||
@@ -22,7 +28,7 @@
|
|||||||
children,
|
children,
|
||||||
...rest
|
...rest
|
||||||
}: {
|
}: {
|
||||||
variant?: "primary" | "quiet" | "outline" | "danger" | "link";
|
variant?: "primary" | "quiet" | "outline" | "danger";
|
||||||
icon?: IconName;
|
icon?: IconName;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
pending?: boolean;
|
pending?: boolean;
|
||||||
@@ -31,32 +37,28 @@
|
|||||||
small?: boolean;
|
small?: boolean;
|
||||||
full?: boolean;
|
full?: boolean;
|
||||||
type?: "button" | "submit";
|
type?: "button" | "submit";
|
||||||
onclick?: (e: MouseEvent) => void;
|
onclick?: (e: MouseEvent) => unknown;
|
||||||
children?: Snippet;
|
children?: Snippet;
|
||||||
[key: string]: unknown;
|
[key: string]: unknown;
|
||||||
} = $props();
|
} = $props();
|
||||||
|
|
||||||
function click(e: MouseEvent) {
|
const uid = $props.id();
|
||||||
if (disabled || pending) {
|
const nameId = `ia-btn-name-${uid}`;
|
||||||
e.preventDefault();
|
const domiVariant = $derived(variant === "primary" ? "primary" : variant === "danger" ? "danger" : "plate");
|
||||||
return;
|
const size = $derived(small ? "md" : variant === "primary" ? "xl" : "lg");
|
||||||
}
|
|
||||||
onclick?.(e);
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<button
|
<DomiButton
|
||||||
{type}
|
|
||||||
class="domi-btn {variant === 'quiet' ? '' : variant}"
|
|
||||||
class:small
|
|
||||||
class:full
|
|
||||||
aria-disabled={disabled || pending ? "true" : undefined}
|
|
||||||
aria-busy={pending ? "true" : undefined}
|
|
||||||
aria-describedby={describedby}
|
|
||||||
aria-label={label}
|
|
||||||
onclick={click}
|
|
||||||
{...rest}
|
{...rest}
|
||||||
|
variant={domiVariant}
|
||||||
|
{size}
|
||||||
|
{type}
|
||||||
|
block={full}
|
||||||
|
{disabled}
|
||||||
|
status={pending ? "loading" : undefined}
|
||||||
|
aria-describedby={describedby}
|
||||||
|
aria-labelledby={label ? nameId : undefined}
|
||||||
|
{onclick}
|
||||||
>
|
>
|
||||||
{#if pending}<span class="spin" aria-hidden="true"></span>{:else if icon}<Icon name={icon} />{/if}
|
{#if icon}<Icon name={icon} />{/if}{@render children?.()}{#if label}<span id={nameId} hidden>{label}</span>{/if}
|
||||||
{@render children?.()}
|
</DomiButton>
|
||||||
</button>
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
<div class="ia-details">
|
<div class="ia-details">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="domi-btn link"
|
class="ia-link"
|
||||||
aria-expanded={open}
|
aria-expanded={open}
|
||||||
aria-controls={id}
|
aria-controls={id}
|
||||||
onclick={() => (open = !open)}
|
onclick={() => (open = !open)}
|
||||||
|
|||||||
@@ -2,10 +2,14 @@
|
|||||||
- Copyright (c) 2026 Marek Novák. Part of Ianitor, under the Common Public Attribution
|
- Copyright (c) 2026 Marek Novák. Part of Ianitor, under the Common Public Attribution
|
||||||
- License 1.0: see LICENSE (its Exhibit A is this file's notice). -->
|
- License 1.0: see LICENSE (its Exhibit A is this file's notice). -->
|
||||||
<script lang="ts" generics="T extends string">
|
<script lang="ts" generics="T extends string">
|
||||||
// Handoff §2.10: a radio group in a fieldset; arrows move and select (native radios).
|
import { Segmented as DomiSegmented } from "@domi/ui";
|
||||||
|
|
||||||
|
// Handoff §2.10: a few choices of one thing, with its name shown above them. The control is @domi/ui's Segmented
|
||||||
|
// (a radio group with one Tab stop; arrows, Home and End move the choice); Ianitor keeps the visible name.
|
||||||
|
// `name` is kept for the call sites; @domi/ui's group needs none.
|
||||||
let {
|
let {
|
||||||
legend,
|
legend,
|
||||||
name,
|
name: _name,
|
||||||
options,
|
options,
|
||||||
value = $bindable(),
|
value = $bindable(),
|
||||||
disabled = [],
|
disabled = [],
|
||||||
@@ -20,26 +24,19 @@
|
|||||||
describedby?: string;
|
describedby?: string;
|
||||||
onchange?: (v: T) => void;
|
onchange?: (v: T) => void;
|
||||||
} = $props();
|
} = $props();
|
||||||
|
|
||||||
|
const uid = $props.id();
|
||||||
|
const choices = $derived(options.map((o) => ({ value: o.value, label: o.label, disabled: disabled.includes(o.value) })));
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<fieldset class="domi-field" aria-describedby={describedby}>
|
<div class="ia-field" role="group" aria-labelledby="ia-seg-{uid}" aria-describedby={describedby}>
|
||||||
<legend class="domi-field-label">{legend}</legend>
|
<span class="ia-field-label" id="ia-seg-{uid}">{legend}</span>
|
||||||
<div class="ia-seg">
|
<div>
|
||||||
{#each options as o (o.value)}
|
<DomiSegmented
|
||||||
<label>
|
label={legend}
|
||||||
<input
|
options={choices}
|
||||||
type="radio"
|
bind:value={() => value, (v) => (value = v as T)}
|
||||||
{name}
|
onchange={(v) => onchange?.(v as T)}
|
||||||
value={o.value}
|
/>
|
||||||
checked={value === o.value}
|
|
||||||
disabled={disabled.includes(o.value)}
|
|
||||||
onchange={() => {
|
|
||||||
value = o.value;
|
|
||||||
onchange?.(o.value);
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
{o.label}
|
|
||||||
</label>
|
|
||||||
{/each}
|
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</div>
|
||||||
|
|||||||
+59
-103
@@ -2,23 +2,8 @@
|
|||||||
* Copyright (c) 2026 Marek Novák. Part of Ianitor, under the Common Public Attribution
|
* Copyright (c) 2026 Marek Novák. Part of Ianitor, under the Common Public Attribution
|
||||||
* License 1.0: see LICENSE (its Exhibit A is this file's notice). */
|
* License 1.0: see LICENSE (its Exhibit A is this file's notice). */
|
||||||
|
|
||||||
/* The shared Domi components as drawn (docs/ui-handoff.md §2). Class names follow the
|
/* Ianitor's own components as drawn (docs/ui-handoff.md §2), on top of @domi/ui. The controls (buttons, fields,
|
||||||
artifact: domi-* from the Domi system, ia-* for Ianitor. */
|
segmented controls, checkboxes, selects) and the fonts are @domi/ui's (domi-*); everything here is ia-*. */
|
||||||
|
|
||||||
/* ── Fonts (self-hosted, OFL; §1.3) ─────────────────────────────────────── */
|
|
||||||
@import "@fontsource/cinzel/latin-500.css";
|
|
||||||
@import "@fontsource/cormorant-garamond/latin-500.css";
|
|
||||||
@import "@fontsource/cormorant-garamond/latin-600.css";
|
|
||||||
@import "@fontsource/manrope/latin-400.css";
|
|
||||||
@import "@fontsource/manrope/latin-600.css";
|
|
||||||
@import "@fontsource/manrope/latin-700.css";
|
|
||||||
/* latin-ext: Czech names and places (č, ř, ů) in host names, device names and messages. */
|
|
||||||
@import "@fontsource/cinzel/latin-ext-500.css";
|
|
||||||
@import "@fontsource/cormorant-garamond/latin-ext-500.css";
|
|
||||||
@import "@fontsource/cormorant-garamond/latin-ext-600.css";
|
|
||||||
@import "@fontsource/manrope/latin-ext-400.css";
|
|
||||||
@import "@fontsource/manrope/latin-ext-600.css";
|
|
||||||
@import "@fontsource/manrope/latin-ext-700.css";
|
|
||||||
|
|
||||||
html, body { margin: 0; }
|
html, body { margin: 0; }
|
||||||
|
|
||||||
@@ -33,89 +18,65 @@ html, body { margin: 0; }
|
|||||||
.ia .ia-display { font-family: var(--font-book); font-weight: 500; font-size: var(--fs-display); line-height: var(--lh-display); }
|
.ia .ia-display { font-family: var(--font-book); font-weight: 500; font-size: var(--fs-display); line-height: var(--lh-display); }
|
||||||
.ia .ia-h2 { font-family: var(--font-book); font-weight: 500; font-size: var(--fs-h2); line-height: var(--lh-h2); }
|
.ia .ia-h2 { font-family: var(--font-book); font-weight: 500; font-size: var(--fs-h2); line-height: var(--lh-h2); }
|
||||||
.ia .ia-h3 { font-family: var(--font-book); font-weight: 600; font-size: var(--fs-h3); line-height: var(--lh-h3); }
|
.ia .ia-h3 { font-family: var(--font-book); font-weight: 600; font-size: var(--fs-h3); line-height: var(--lh-h3); }
|
||||||
.ia .ia-label { font-weight: 700; font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--muted); }
|
.ia .ia-label { font-weight: 700; font-size: var(--fs-label); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--domi-muted); }
|
||||||
.ia .ia-muted { color: var(--muted); }
|
.ia .ia-muted { color: var(--domi-muted); }
|
||||||
.ia .ia-text2 { color: var(--text-2); }
|
.ia .ia-text2 { color: var(--domi-fg-2); }
|
||||||
.ia .ia-hint { color: var(--muted); font-size: var(--fs-hint); line-height: var(--lh-hint); }
|
.ia .ia-hint { color: var(--domi-muted); font-size: var(--fs-hint); line-height: var(--lh-hint); }
|
||||||
.ia .ia-sub { color: var(--muted); font-size: var(--fs-sub); }
|
.ia .ia-sub { color: var(--domi-muted); font-size: var(--fs-sub); }
|
||||||
.ia .ia-wordmark { font-family: var(--font-inscription); font-weight: 500; font-size: var(--fs-wordmark); letter-spacing: var(--tracking-wordmark); color: var(--gilt); }
|
.ia .ia-wordmark { font-family: var(--font-inscription); font-weight: 500; font-size: var(--fs-wordmark); letter-spacing: var(--tracking-wordmark); color: var(--gilt); }
|
||||||
.ia .ia-code { font-family: var(--font-inscription); font-weight: 500; font-size: var(--fs-code); letter-spacing: 0.16em; color: var(--accent-strong); }
|
.ia .ia-code { font-family: var(--font-inscription); font-weight: 500; font-size: var(--fs-code); letter-spacing: 0.16em; color: var(--domi-accent-strong); }
|
||||||
.ia b, .ia strong { font-weight: 700; color: var(--text); }
|
.ia b, .ia strong { font-weight: 700; color: var(--domi-fg); }
|
||||||
|
|
||||||
/* ── Buttons (§2.1) ─────────────────────────────────────────────────────── */
|
/* ── Buttons (§2.1) ─────────────────────────────────────────────────────── */
|
||||||
.ia .domi-btn {
|
/* A button that reads as a link: an action inside a sentence or under a field ("Use wiki.home.test", "Add a rule"). */
|
||||||
display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
|
.ia .ia-link {
|
||||||
min-height: var(--target); padding: 0 1.1rem; border-radius: var(--radius-sm);
|
display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; border: 0; padding: 0.6rem 0; min-height: var(--target);
|
||||||
border: 1px solid var(--control-edge); background: transparent; color: var(--text-2);
|
background: none; color: var(--domi-accent); font: inherit; font-weight: 600; font-size: var(--fs-button);
|
||||||
font-weight: 600; font-size: var(--fs-button); cursor: pointer; text-decoration: none;
|
text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer;
|
||||||
transition: border-color var(--dur-color) var(--ease), background var(--dur-color) var(--ease),
|
|
||||||
color var(--dur-color) var(--ease), box-shadow var(--dur-lift) var(--ease), transform var(--dur-lift) var(--ease);
|
|
||||||
}
|
}
|
||||||
.ia .domi-btn:hover:not([aria-disabled="true"]) { border-color: var(--accent); background: var(--hover-wash); color: var(--text); }
|
|
||||||
.ia .domi-btn.primary {
|
|
||||||
min-height: 50px; padding: 0 1.6rem; border-radius: var(--radius); border-color: var(--primary-edge);
|
|
||||||
background: linear-gradient(180deg, var(--primary-high) 0%, var(--primary-mid) 55%, var(--primary-low) 100%);
|
|
||||||
color: var(--on-primary); font-weight: 700; box-shadow: var(--leaf-bevel);
|
|
||||||
}
|
|
||||||
.ia .domi-btn.primary:hover:not([aria-disabled="true"]) { transform: translateY(-1px); color: var(--on-primary);
|
|
||||||
background: linear-gradient(180deg, var(--primary-high) 0%, var(--primary-mid) 55%, var(--primary-low) 100%); }
|
|
||||||
.ia .domi-btn.primary:focus-visible { outline: var(--focus-ring-primary); }
|
|
||||||
.ia .domi-btn.outline { border-color: var(--edge-outline); color: var(--accent); }
|
|
||||||
.ia .domi-btn.danger { border-color: var(--edge-down); color: var(--danger); }
|
|
||||||
.ia .domi-btn.danger:hover:not([aria-disabled="true"]) { background: var(--danger-hover); border-color: var(--danger); color: var(--danger); }
|
|
||||||
.ia .domi-btn.link {
|
|
||||||
border: 0; padding: 0.6rem 0; min-height: var(--target); background: none; color: var(--accent);
|
|
||||||
text-decoration: underline; text-underline-offset: 0.2em; font-weight: 600;
|
|
||||||
}
|
|
||||||
.ia .domi-btn.small { min-height: 36px; padding: 0 0.8rem; }
|
|
||||||
.ia .domi-btn.full { width: 100%; }
|
|
||||||
.ia .domi-btn[aria-disabled="true"] { color: var(--disabled); border-color: var(--hairline); cursor: not-allowed; box-shadow: none; background: transparent; }
|
|
||||||
.ia .domi-btn.primary[aria-disabled="true"] { background: var(--surface-2); color: var(--disabled); }
|
|
||||||
.ia .spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: ia-spin 0.8s linear infinite; }
|
|
||||||
@keyframes ia-spin { to { transform: rotate(360deg); } }
|
|
||||||
.ia .ia-icon-btn {
|
.ia .ia-icon-btn {
|
||||||
display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
|
display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px;
|
||||||
border-radius: var(--radius-sm); border: 1px solid transparent; background: none; color: var(--text-2); cursor: pointer;
|
border-radius: var(--radius-sm); border: 1px solid transparent; background: none; color: var(--domi-fg-2); cursor: pointer;
|
||||||
}
|
}
|
||||||
.ia .ia-icon-btn:hover { border-color: var(--control-edge); color: var(--text); }
|
.ia .ia-icon-btn:hover { border-color: var(--domi-edge); color: var(--domi-fg); }
|
||||||
.ia svg.ia-icon { width: 18px; height: 18px; flex: none; }
|
.ia svg.ia-icon { width: 18px; height: 18px; flex: none; }
|
||||||
|
|
||||||
/* ── Status (§2.2) ──────────────────────────────────────────────────────── */
|
/* ── Status (§2.2) ──────────────────────────────────────────────────────── */
|
||||||
.ia .ia-status { display: inline-flex; align-items: center; gap: 8px; }
|
.ia .ia-status { display: inline-flex; align-items: center; gap: 8px; }
|
||||||
.ia .ia-status .word { font-weight: 700; font-size: var(--fs-state); font-variant-caps: all-small-caps; letter-spacing: var(--tracking-state); }
|
.ia .ia-status .word { font-weight: 700; font-size: var(--fs-state); font-variant-caps: all-small-caps; letter-spacing: var(--tracking-state); }
|
||||||
.ia .ia-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; }
|
.ia .ia-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; display: inline-block; }
|
||||||
.ia [data-s="healthy"] .ia-dot { background: var(--healthy); }
|
.ia [data-s="healthy"] .ia-dot { background: var(--domi-ok); }
|
||||||
.ia [data-s="healthy"] .word, .ia [data-s="kept"] .word, .ia [data-s="kept"] svg { color: var(--healthy); }
|
.ia [data-s="healthy"] .word, .ia [data-s="kept"] .word, .ia [data-s="kept"] svg { color: var(--domi-ok); }
|
||||||
.ia [data-s="degraded"] .ia-dot { border: 2px solid var(--degraded); background: linear-gradient(90deg, var(--degraded) 50%, transparent 50%); }
|
.ia [data-s="degraded"] .ia-dot { border: 2px solid var(--domi-warning); background: linear-gradient(90deg, var(--domi-warning) 50%, transparent 50%); }
|
||||||
.ia [data-s="degraded"] .word, .ia [data-s="reverted"] .word, .ia [data-s="reverted"] svg { color: var(--degraded); }
|
.ia [data-s="degraded"] .word, .ia [data-s="reverted"] .word, .ia [data-s="reverted"] svg { color: var(--domi-warning); }
|
||||||
.ia [data-s="down"] .ia-dot { border: 3px solid var(--down); }
|
.ia [data-s="down"] .ia-dot { border: 3px solid var(--down); }
|
||||||
.ia [data-s="down"] .word { color: var(--down); }
|
.ia [data-s="down"] .word { color: var(--down); }
|
||||||
.ia [data-s="unknown"] .ia-dot { border: 2px dashed var(--unknown); }
|
.ia [data-s="unknown"] .ia-dot { border: 2px dashed var(--unknown); }
|
||||||
.ia [data-s="unknown"] .word { color: var(--muted); }
|
.ia [data-s="unknown"] .word { color: var(--domi-muted); }
|
||||||
.ia [data-s="running"] .word, .ia [data-s="running"] svg { color: var(--running); }
|
.ia [data-s="running"] .word, .ia [data-s="running"] svg { color: var(--running); }
|
||||||
|
|
||||||
/* ── Chips (§2.3) ───────────────────────────────────────────────────────── */
|
/* ── Chips (§2.3) ───────────────────────────────────────────────────────── */
|
||||||
.ia .ia-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
|
.ia .ia-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
|
||||||
.ia .ia-chip { border: 1px solid var(--hairline-strong); border-radius: var(--radius-pill); color: var(--text-2); font-size: var(--fs-chip); padding: 1px 10px; white-space: nowrap; }
|
.ia .ia-chip { border: 1px solid var(--hairline-strong); border-radius: var(--radius-pill); color: var(--domi-fg-2); font-size: var(--fs-chip); padding: 1px 10px; white-space: nowrap; }
|
||||||
|
|
||||||
/* ── Engine chip (§2.4) ─────────────────────────────────────────────────── */
|
/* ── Engine chip (§2.4) ─────────────────────────────────────────────────── */
|
||||||
.ia .ia-engine {
|
.ia .ia-engine {
|
||||||
display: inline-flex; align-items: center; gap: 8px; min-height: var(--target); padding: 0 16px 0 14px;
|
display: inline-flex; align-items: center; gap: 8px; min-height: var(--target); padding: 0 16px 0 14px;
|
||||||
border: 1px solid var(--control-edge); border-radius: var(--radius-pill); background: var(--surface);
|
border: 1px solid var(--domi-edge); border-radius: var(--radius-pill); background: var(--domi-panel);
|
||||||
color: var(--text); font-weight: 600; font-size: 0.92rem; cursor: pointer;
|
color: var(--domi-fg); font-weight: 600; font-size: 0.92rem; cursor: pointer;
|
||||||
}
|
}
|
||||||
.ia .ia-engine small { color: var(--muted); font-weight: 400; font-size: 0.86rem; }
|
.ia .ia-engine small { color: var(--domi-muted); font-weight: 400; font-size: 0.86rem; }
|
||||||
|
|
||||||
/* ── Lists and rows (§2.5) ──────────────────────────────────────────────── */
|
/* ── Lists and rows (§2.5) ──────────────────────────────────────────────── */
|
||||||
.ia .ia-list { border: 1px solid var(--hairline); border-radius: var(--radius-lg); }
|
.ia .ia-list { border: 1px solid var(--domi-line); border-radius: var(--radius-lg); }
|
||||||
/* No overflow clipping on the list: a row's menu must reach past it. The end rows carry the corners. */
|
/* No overflow clipping on the list: a row's menu must reach past it. The end rows carry the corners. */
|
||||||
.ia .ia-list > :first-child { border-top-left-radius: calc(var(--radius-lg) - 1px); border-top-right-radius: calc(var(--radius-lg) - 1px); }
|
.ia .ia-list > :first-child { border-top-left-radius: calc(var(--radius-lg) - 1px); border-top-right-radius: calc(var(--radius-lg) - 1px); }
|
||||||
.ia .ia-list > :last-child { border-bottom-left-radius: calc(var(--radius-lg) - 1px); border-bottom-right-radius: calc(var(--radius-lg) - 1px); }
|
.ia .ia-list > :last-child { border-bottom-left-radius: calc(var(--radius-lg) - 1px); border-bottom-right-radius: calc(var(--radius-lg) - 1px); }
|
||||||
.ia .ia-row { display: grid; grid-template-columns: 128px minmax(0, 1.4fr) minmax(0, 1.6fr) 44px; gap: 16px; padding: 12px 10px 12px 18px; align-items: start; border-top: 1px solid var(--hairline); }
|
.ia .ia-row { display: grid; grid-template-columns: 128px minmax(0, 1.4fr) minmax(0, 1.6fr) 44px; gap: 16px; padding: 12px 10px 12px 18px; align-items: start; border-top: 1px solid var(--domi-line); }
|
||||||
.ia .ia-row:first-child { border-top: 0; }
|
.ia .ia-row:first-child { border-top: 0; }
|
||||||
.ia .ia-row.head { background: var(--colonnade); padding-top: 10px; padding-bottom: 10px; align-items: center; }
|
.ia .ia-row.head { background: var(--domi-chrome); padding-top: 10px; padding-bottom: 10px; align-items: center; }
|
||||||
.ia .ia-host { font-weight: 600; font-size: var(--fs-host); overflow-wrap: anywhere; }
|
.ia .ia-host { font-weight: 600; font-size: var(--fs-host); overflow-wrap: anywhere; }
|
||||||
.ia .ia-row .problem { color: var(--text-2); }
|
.ia .ia-row .problem { color: var(--domi-fg-2); }
|
||||||
@media (max-width: 719.98px) {
|
@media (max-width: 719.98px) {
|
||||||
.ia .ia-row { grid-template-columns: minmax(0, 1fr) 44px; padding: 12px 6px 12px 14px; gap: 8px; }
|
.ia .ia-row { grid-template-columns: minmax(0, 1fr) 44px; padding: 12px 6px 12px 14px; gap: 8px; }
|
||||||
.ia .ia-row.head { display: none; }
|
.ia .ia-row.head { display: none; }
|
||||||
@@ -126,36 +87,36 @@ html, body { margin: 0; }
|
|||||||
.ia .ia-menu-wrap { position: relative; }
|
.ia .ia-menu-wrap { position: relative; }
|
||||||
.ia .ia-menu {
|
.ia .ia-menu {
|
||||||
position: absolute; right: 0; top: 46px; z-index: 20; min-width: 250px; margin: 0; padding: 6px; list-style: none;
|
position: absolute; right: 0; top: 46px; z-index: 20; min-width: 250px; margin: 0; padding: 6px; list-style: none;
|
||||||
background: var(--colonnade); border: 1px solid var(--hairline-strong); border-radius: var(--radius); box-shadow: var(--shadow-dialog);
|
background: var(--domi-chrome); border: 1px solid var(--hairline-strong); border-radius: var(--radius); box-shadow: var(--shadow-dialog);
|
||||||
}
|
}
|
||||||
.ia .ia-menu [role="menuitem"] {
|
.ia .ia-menu [role="menuitem"] {
|
||||||
display: flex; gap: 10px; align-items: center; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--radius-sm);
|
display: flex; gap: 10px; align-items: center; width: 100%; min-height: 44px; padding: 0 12px; border: 0; border-radius: var(--radius-sm);
|
||||||
background: none; color: var(--text-2); font-weight: 600; font-size: 0.92rem; text-align: left; cursor: pointer;
|
background: none; color: var(--domi-fg-2); font-weight: 600; font-size: 0.92rem; text-align: left; cursor: pointer;
|
||||||
}
|
}
|
||||||
.ia .ia-menu [role="menuitem"]:hover, .ia .ia-menu [role="menuitem"]:focus { background: var(--surface-2); color: var(--text); outline: none; }
|
.ia .ia-menu [role="menuitem"]:hover, .ia .ia-menu [role="menuitem"]:focus { background: var(--domi-hover); color: var(--domi-fg); outline: none; }
|
||||||
.ia .ia-menu [role="menuitem"]:focus-visible { outline: var(--focus-ring); outline-offset: -2px; }
|
.ia .ia-menu [role="menuitem"]:focus-visible { outline: var(--focus-ring); outline-offset: -2px; }
|
||||||
.ia .ia-menu [role="menuitem"].danger { color: var(--danger); }
|
.ia .ia-menu [role="menuitem"].danger { color: var(--domi-danger); }
|
||||||
.ia .ia-menu [role="menuitem"][aria-disabled="true"] { color: var(--disabled); cursor: not-allowed; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
|
.ia .ia-menu [role="menuitem"][aria-disabled="true"] { color: var(--domi-disabled); cursor: not-allowed; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
|
||||||
.ia .ia-menu .reason { flex-basis: 100%; padding-left: 28px; font-weight: 400; font-size: var(--fs-sub); color: var(--muted); }
|
.ia .ia-menu .reason { flex-basis: 100%; padding-left: 28px; font-weight: 400; font-size: var(--fs-sub); color: var(--domi-muted); }
|
||||||
.ia .ia-menu hr { border: 0; border-top: 1px solid var(--hairline); margin: 4px 0; }
|
.ia .ia-menu hr { border: 0; border-top: 1px solid var(--domi-line); margin: 4px 0; }
|
||||||
|
|
||||||
/* ── Bar, banners (§2.7, §2.8) ──────────────────────────────────────────── */
|
/* ── Bar, banners (§2.7, §2.8) ──────────────────────────────────────────── */
|
||||||
.ia .ia-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 12px 10px 18px; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); }
|
.ia .ia-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 12px 10px 18px; background: var(--domi-panel); border: 1px solid var(--domi-line); border-radius: var(--radius-lg); }
|
||||||
.ia .ia-bar .grow { flex: 1 1 260px; min-width: 0; }
|
.ia .ia-bar .grow { flex: 1 1 260px; min-width: 0; }
|
||||||
.ia .ia-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 14px 18px; border-radius: var(--radius-lg); border: 1px solid var(--edge-degraded); background: var(--wash-degraded); }
|
.ia .ia-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 14px 18px; border-radius: var(--radius-lg); border: 1px solid var(--edge-degraded); background: var(--wash-degraded); }
|
||||||
.ia .ia-banner.kept { border-color: var(--edge-kept); background: var(--wash-kept); }
|
.ia .ia-banner.kept { border-color: var(--edge-kept); background: var(--wash-kept); }
|
||||||
.ia .ia-banner.down { border-color: var(--edge-down); background: var(--wash-down); }
|
.ia .ia-banner.down { border-color: var(--edge-down); background: var(--wash-down); }
|
||||||
.ia .ia-banner .ia-banner-icon { width: 22px; height: 22px; color: var(--degraded); }
|
.ia .ia-banner .ia-banner-icon { width: 22px; height: 22px; color: var(--domi-warning); }
|
||||||
.ia .ia-banner.kept .ia-banner-icon { color: var(--kept); }
|
.ia .ia-banner.kept .ia-banner-icon { color: var(--kept); }
|
||||||
.ia .ia-banner.down .ia-banner-icon { color: var(--down); }
|
.ia .ia-banner.down .ia-banner-icon { color: var(--down); }
|
||||||
.ia .ia-banner .body { flex: 1 1 280px; min-width: 0; }
|
.ia .ia-banner .body { flex: 1 1 280px; min-width: 0; }
|
||||||
.ia .ia-banner .line2 { color: var(--text-2); font-size: 0.9rem; }
|
.ia .ia-banner .line2 { color: var(--domi-fg-2); font-size: 0.9rem; }
|
||||||
.ia .ia-banner .actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
|
.ia .ia-banner .actions { display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: center; }
|
||||||
@media (max-width: 719.98px) { .ia .ia-banner { padding: 12px 14px; } }
|
@media (max-width: 719.98px) { .ia .ia-banner { padding: 12px 14px; } }
|
||||||
|
|
||||||
/* ── Dialogs, panel, popover, sheets (§2.9) ─────────────────────────────── */
|
/* ── Dialogs, panel, popover, sheets (§2.9) ─────────────────────────────── */
|
||||||
.ia dialog.ia-dialog {
|
.ia dialog.ia-dialog {
|
||||||
background: var(--colonnade); color: var(--text); border: 1px solid var(--hairline-strong); border-radius: var(--radius-lg);
|
background: var(--domi-chrome); color: var(--domi-fg); border: 1px solid var(--hairline-strong); border-radius: var(--radius-lg);
|
||||||
box-shadow: var(--shadow-dialog); padding: 22px 24px; width: min(var(--dialog-w), calc(100vw - 32px)); max-height: 90dvh;
|
box-shadow: var(--shadow-dialog); padding: 22px 24px; width: min(var(--dialog-w), calc(100vw - 32px)); max-height: 90dvh;
|
||||||
}
|
}
|
||||||
.ia dialog.ia-dialog::backdrop { background: var(--scrim); }
|
.ia dialog.ia-dialog::backdrop { background: var(--scrim); }
|
||||||
@@ -172,38 +133,33 @@ html, body { margin: 0; }
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ── Fields (§2.10) ─────────────────────────────────────────────────────── */
|
/* ── Fields (§2.10) ─────────────────────────────────────────────────────── */
|
||||||
.ia .domi-field { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
|
/* Text fields, checkboxes, selects and segmented controls are @domi/ui's. Here: a group of controls with its label,
|
||||||
.ia .domi-field-label, .ia legend.domi-field-label { color: var(--text-2); font-size: var(--fs-field-label); padding: 0; }
|
an error under a field, and the inputs @domi/ui 1.0 leaves to the app (a number, a file). */
|
||||||
.ia .domi-input, .ia select.domi-input, .ia textarea.domi-input {
|
.ia .ia-field { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
|
||||||
min-height: var(--target); background: var(--surface); color: var(--text); border: 1px solid var(--control-edge);
|
/* The same words as @domi/ui's field label (.domi-field__label), so a form's labels read as one. */
|
||||||
|
.ia .ia-field-label { color: var(--domi-fg-2); font: 600 13px/18px var(--domi-font-hand); padding: 0; }
|
||||||
|
.ia .ia-input {
|
||||||
|
min-height: var(--target); background: var(--domi-panel); color: var(--domi-fg); border: 1px solid var(--domi-edge);
|
||||||
border-radius: var(--radius-sm); box-shadow: var(--carved); padding: 0.55rem 0.8rem; font: inherit; width: 100%;
|
border-radius: var(--radius-sm); box-shadow: var(--carved); padding: 0.55rem 0.8rem; font: inherit; width: 100%;
|
||||||
}
|
}
|
||||||
.ia .domi-input:hover { border-color: var(--muted); }
|
.ia .ia-input:hover { border-color: var(--domi-muted); }
|
||||||
.ia .domi-input:focus, .ia .domi-input:focus-visible { outline: none; border-color: var(--accent); box-shadow: var(--carved), var(--focus-halo); }
|
.ia .ia-input:focus, .ia .ia-input:focus-visible { outline: none; border-color: var(--domi-accent); box-shadow: var(--carved), var(--focus-halo); }
|
||||||
.ia .domi-input[aria-invalid="true"] { border-color: var(--danger); }
|
.ia .ia-input[aria-invalid="true"] { border-color: var(--domi-danger); }
|
||||||
.ia .domi-error { color: var(--danger); font-size: var(--fs-hint); display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
|
.ia .ia-error { color: var(--domi-danger); font-size: var(--fs-hint); display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
|
||||||
.ia fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
|
.ia fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
|
||||||
.ia .ia-seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border: 1px solid var(--control-edge); border-radius: var(--radius-sm); background: var(--surface); }
|
|
||||||
.ia .ia-seg label { display: inline-flex; align-items: center; min-height: 38px; padding: 0 0.9rem; border-radius: 8px; color: var(--text-2); font-weight: 600; font-size: 0.9rem; cursor: pointer; }
|
|
||||||
.ia .ia-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
|
|
||||||
.ia .ia-seg label:has(input:checked) { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); }
|
|
||||||
.ia .ia-seg label:has(input:focus-visible) { outline: var(--focus-ring); outline-offset: 2px; }
|
|
||||||
.ia .ia-seg label:has(input:disabled) { color: var(--disabled); cursor: not-allowed; }
|
|
||||||
.ia .ia-check { display: flex; align-items: center; gap: 10px; min-height: var(--target); }
|
|
||||||
.ia .ia-check input { width: 20px; height: 20px; accent-color: var(--accent); }
|
|
||||||
|
|
||||||
/* ── Toasts, progress, secret, details (§2.11–2.14) ─────────────────────── */
|
/* ── Toasts, progress, secret, details (§2.11–2.14) ─────────────────────── */
|
||||||
.ia .ia-toasts { position: fixed; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: min(420px, calc(100vw - 32px)); }
|
.ia .ia-toasts { position: fixed; right: 24px; bottom: 24px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: min(420px, calc(100vw - 32px)); }
|
||||||
.ia .ia-toast { display: flex; gap: 10px; align-items: center; background: var(--colonnade); border: 1px solid var(--hairline-strong); border-radius: var(--radius); box-shadow: var(--shadow-dialog); padding: 12px 16px; }
|
.ia .ia-toast { display: flex; gap: 10px; align-items: center; background: var(--domi-chrome); border: 1px solid var(--hairline-strong); border-radius: var(--radius); box-shadow: var(--shadow-dialog); padding: 12px 16px; }
|
||||||
@media (max-width: 719.98px) { .ia .ia-toasts { right: 16px; left: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); } }
|
@media (max-width: 719.98px) { .ia .ia-toasts { right: 16px; left: 16px; bottom: calc(80px + env(safe-area-inset-bottom)); } }
|
||||||
.ia .ia-progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
|
.ia .ia-progress { height: 6px; border-radius: 3px; background: var(--domi-hover); overflow: hidden; }
|
||||||
.ia .ia-progress > span { display: block; height: 100%; background: var(--accent); transition: width var(--dur-tick) linear; }
|
.ia .ia-progress > span { display: block; height: 100%; background: var(--domi-accent); transition: width var(--dur-tick) linear; }
|
||||||
.ia .ia-secret { display: block; width: 100%; background: var(--surface); border: 1px solid var(--control-edge); border-radius: var(--radius-sm); box-shadow: var(--carved); padding: 12px 14px; font: inherit; font-weight: 600; letter-spacing: 0.02em; word-break: break-all; overflow-wrap: anywhere; white-space: pre-wrap; color: var(--text); resize: none; }
|
.ia .ia-secret { display: block; width: 100%; background: var(--domi-panel); border: 1px solid var(--domi-edge); border-radius: var(--radius-sm); box-shadow: var(--carved); padding: 12px 14px; font: inherit; font-weight: 600; letter-spacing: 0.02em; word-break: break-all; overflow-wrap: anywhere; white-space: pre-wrap; color: var(--domi-fg); resize: none; }
|
||||||
.ia .ia-details pre { background: var(--surface); border-radius: var(--radius-sm); color: var(--muted); font-size: var(--fs-sub); white-space: pre-wrap; padding: 10px 12px; margin: 6px 0; }
|
.ia .ia-details pre { background: var(--domi-panel); border-radius: var(--radius-sm); color: var(--domi-muted); font-size: var(--fs-sub); white-space: pre-wrap; padding: 10px 12px; margin: 6px 0; }
|
||||||
.ia .ia-frame { border: 1px solid var(--hairline); border-radius: var(--radius-lg); padding: 32px; text-align: center; }
|
.ia .ia-frame { border: 1px solid var(--domi-line); border-radius: var(--radius-lg); padding: 32px; text-align: center; }
|
||||||
.ia .ia-card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius); padding: 12px 14px; }
|
.ia .ia-card { background: var(--domi-panel); border: 1px solid var(--domi-line); border-radius: var(--radius); padding: 12px 14px; }
|
||||||
.ia .ia-ornament { max-width: 360px; margin: 8px auto; border: 0; border-top: 1px dotted var(--bronze); opacity: 0.6; }
|
.ia .ia-ornament { max-width: 360px; margin: 8px auto; border: 0; border-top: 1px dotted var(--bronze); opacity: 0.6; }
|
||||||
.ia .ia-placeholder { background: var(--surface-2); border-radius: 6px; height: 14px; }
|
.ia .ia-placeholder { background: var(--domi-hover); border-radius: 6px; height: 14px; }
|
||||||
.ia .ia-qr { background: #fff; padding: 16px; border-radius: var(--radius); width: max-content; }
|
.ia .ia-qr { background: #fff; padding: 16px; border-radius: var(--radius); width: max-content; }
|
||||||
.ia .ia-qr svg { width: 240px; height: 240px; display: block; }
|
.ia .ia-qr svg { width: 240px; height: 240px; display: block; }
|
||||||
.ia .ia-cmd { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.86rem; }
|
.ia .ia-cmd { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 0.86rem; }
|
||||||
|
|||||||
+30
-60
@@ -2,68 +2,40 @@
|
|||||||
* Copyright (c) 2026 Marek Novák. Part of Ianitor, under the Common Public Attribution
|
* Copyright (c) 2026 Marek Novák. Part of Ianitor, under the Common Public Attribution
|
||||||
* License 1.0: see LICENSE (its Exhibit A is this file's notice). */
|
* License 1.0: see LICENSE (its Exhibit A is this file's notice). */
|
||||||
|
|
||||||
/* Design tokens of the dark Domi theme, murex palette (docs/ui-handoff.md §1.1, verbatim). */
|
/* Ianitor's own tokens, on top of @domi/ui (docs/ui-handoff.md §1.1). The roles (ground, text, the murex
|
||||||
|
accent and leaf, ok, warning, danger) come from @domi/ui: data-domi-room="ianitor" on <html> gives them Ianitor's
|
||||||
|
values, the same hex as before (domi-design docs/PALETTE.md). What is here is Ianitor's alone: status names,
|
||||||
|
washes, type sizes, spacing, radii and layout. */
|
||||||
.ia {
|
.ia {
|
||||||
/* ── Ground and structure: violet-tinted iron black ───────────────────── */
|
/* ── Structure and metal Ianitor adds to the roles ───────────────────── */
|
||||||
--ground: #0c0b0f; /* page ground; every ratio is measured on it */
|
|
||||||
--colonnade: #121016; /* sidebar, phone bars, menus, dialogs, side panel */
|
|
||||||
--surface: #18151d; /* fields, the last-change bar, cards */
|
|
||||||
--surface-2: #221d28; /* hover, the current place, a chosen option */
|
|
||||||
--hairline: #2c2633; /* dividers only, never a control edge */
|
|
||||||
--hairline-strong: #3c3445; /* chip and frame edges (facts, not controls) */
|
--hairline-strong: #3c3445; /* chip and frame edges (facts, not controls) */
|
||||||
--control-edge: #7d7189; /* edge of every field, button, segmented control, engine chip */
|
|
||||||
|
|
||||||
/* ── Text ──────────────────────────────────────────────────────────────── */
|
|
||||||
--text: #f1edf3; /* body text, hostnames */
|
|
||||||
--text-2: #cfc6d4; /* secondary text, field labels */
|
|
||||||
--muted: #a99eb1; /* hints, section labels, times */
|
|
||||||
--disabled: #7a7183; /* disabled controls only, never content */
|
|
||||||
|
|
||||||
/* ── The lead: murex (Tyrian purple) ───────────────────────────────────── */
|
|
||||||
--accent: #e0a3dc; /* links, focus ring, the current place, running state */
|
|
||||||
--accent-strong: #f2c9ee; /* focus ring on the primary button; match codes */
|
|
||||||
--primary-high: #8d3b89; /* primary fill, top */
|
|
||||||
--primary-mid: #76306f; /* primary fill, 55 % */
|
|
||||||
--primary-low: #5c2257; /* primary fill, foot */
|
|
||||||
--primary-edge: #c77cc1; /* primary button edge */
|
|
||||||
--on-primary: #ffffff; /* label on the primary fill */
|
|
||||||
|
|
||||||
/* ── Metal ─────────────────────────────────────────────────────────────── */
|
|
||||||
--bronze: #b6adbe; /* ornaments: the interpunct rule (iron, not bronze) */
|
--bronze: #b6adbe; /* ornaments: the interpunct rule (iron, not bronze) */
|
||||||
--gilt: #f6f0f7; /* the wordmark only */
|
--gilt: #f6f0f7; /* the wordmark only */
|
||||||
|
|
||||||
/* ── Second light: quiet iron (Domi's .domi-pill and .domi-status use these) */
|
/* ── Second light: quiet iron ───────────────────────────────────────────── */
|
||||||
--second: #cfc6d4;
|
--second-strong: var(--domi-fg);
|
||||||
--second-strong: #f1edf3;
|
--second-edge: var(--domi-edge);
|
||||||
--second-edge: #7d7189;
|
|
||||||
|
|
||||||
/* ── Status: blue / amber / vermilion, stepped in lightness (L* 84 / 68 / 58) */
|
/* ── Status: blue / amber / vermilion, stepped in lightness (L* 84 / 68 / 58) */
|
||||||
--healthy: #a6d6fa; /* host answers; a change was kept. Filled dot. */
|
--kept: var(--domi-ok); /* host answers; a change was kept. Filled dot. */
|
||||||
--kept: #a6d6fa;
|
--reverted: var(--domi-warning); /* partly failing; a change was reverted or not applied. Half dot. */
|
||||||
--degraded: #d99a35; /* partly failing; a change was reverted or not applied. Half dot. */
|
--down: var(--domi-danger); /* not reachable; needs attention; paused; danger actions. Hollow ring. */
|
||||||
--reverted: #d99a35;
|
--unknown: var(--domi-muted); /* no health check set; waiting for first check. Dashed ring. */
|
||||||
--down: #e2683a; /* not reachable; needs attention; paused; danger actions. Hollow ring. */
|
--running: var(--domi-accent); /* queued, applying, watching, switching, waiting for Custos */
|
||||||
--danger: #e2683a;
|
|
||||||
--on-danger: #170804; /* text on a filled danger button (none is planned) */
|
|
||||||
--unknown: #a99eb1; /* no health check set; waiting for first check. Dashed ring. */
|
|
||||||
--running: #e0a3dc; /* queued, applying, watching, switching, waiting for Custos (= accent) */
|
|
||||||
|
|
||||||
/* Status washes (banner backgrounds) and edges. color-mix() is what the artifact uses;
|
/* Status washes (banner backgrounds) and edges. */
|
||||||
the resolved hex is in the comment, for tools that need a literal. */
|
--wash-degraded: color-mix(in srgb, var(--domi-warning) 10%, var(--domi-bg)); /* #201913 */
|
||||||
--wash-degraded: color-mix(in srgb, var(--degraded) 10%, var(--ground)); /* #201913 */
|
--wash-kept: color-mix(in srgb, var(--kept) 10%, var(--domi-bg)); /* #1b1f26 */
|
||||||
--wash-kept: color-mix(in srgb, var(--kept) 10%, var(--ground)); /* #1b1f26 */
|
--wash-down: color-mix(in srgb, var(--down) 10%, var(--domi-bg)); /* #211413 */
|
||||||
--wash-down: color-mix(in srgb, var(--down) 10%, var(--ground)); /* #211413 */
|
--edge-degraded: color-mix(in srgb, var(--domi-warning) 65%, var(--domi-bg)); /* #916828 */
|
||||||
--edge-degraded: color-mix(in srgb, var(--degraded) 65%, var(--ground)); /* #916828 */
|
--edge-kept: color-mix(in srgb, var(--kept) 65%, var(--domi-bg)); /* #708fa8 */
|
||||||
--edge-kept: color-mix(in srgb, var(--kept) 65%, var(--ground)); /* #708fa8 */
|
--edge-down: color-mix(in srgb, var(--down) 80%, var(--domi-bg)); /* #b75531 */
|
||||||
--edge-down: color-mix(in srgb, var(--down) 80%, var(--ground)); /* #b75531 */
|
--hover-wash: color-mix(in srgb, var(--domi-accent) 8%, transparent); /* menu and nav hover */
|
||||||
--edge-outline: color-mix(in srgb, var(--accent) 60%, var(--ground)); /* #8b668a, outline button */
|
|
||||||
--hover-wash: color-mix(in srgb, var(--accent) 8%, transparent); /* quiet button hover */
|
|
||||||
--danger-hover: color-mix(in srgb, var(--danger) 7%, transparent);
|
|
||||||
|
|
||||||
/* ── Type ──────────────────────────────────────────────────────────────── */
|
/* ── Type: the three Domi faces come from @domi/ui (bundled, nothing fetched) */
|
||||||
--font-inscription: Cinzel, "Trajan Pro", "Cormorant Garamond", Georgia, "Times New Roman", serif;
|
--font-inscription: var(--domi-font-inscription);
|
||||||
--font-book: "Cormorant Garamond", Cormorant, "EB Garamond", Garamond, Georgia, "Times New Roman", serif;
|
--font-book: var(--domi-font-book);
|
||||||
--font-hand: Manrope, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
|
--font-hand: var(--domi-font-hand);
|
||||||
|
|
||||||
--fs-display: 2.6rem; --lh-display: 1.1; /* book 500: a view title ("Hosts") */
|
--fs-display: 2.6rem; --lh-display: 1.1; /* book 500: a view title ("Hosts") */
|
||||||
--fs-h2: 1.9rem; --lh-h2: 1.15; /* book 500: panel title; phone view title uses 2.1rem */
|
--fs-h2: 1.9rem; --lh-h2: 1.15; /* book 500: panel title; phone view title uses 2.1rem */
|
||||||
@@ -110,8 +82,8 @@
|
|||||||
--scrim: rgba(12,11,15,0.82); /* behind modals */
|
--scrim: rgba(12,11,15,0.82); /* behind modals */
|
||||||
|
|
||||||
/* ── Focus ─────────────────────────────────────────────────────────────── */
|
/* ── Focus ─────────────────────────────────────────────────────────────── */
|
||||||
--focus-ring: 2px solid var(--accent); /* outline, offset 3px, on every :focus-visible */
|
--focus-ring: 2px solid var(--domi-accent); /* outline, offset 3px, on every :focus-visible */
|
||||||
--focus-ring-primary: 2px solid var(--accent-strong);
|
--focus-ring-primary: 2px solid var(--domi-accent-strong);
|
||||||
--focus-offset: 3px;
|
--focus-offset: 3px;
|
||||||
--focus-halo: 0 0 0 4px rgba(224,163,220,0.16); /* fields: border goes accent, plus this halo */
|
--focus-halo: 0 0 0 4px rgba(224,163,220,0.16); /* fields: border goes accent, plus this halo */
|
||||||
|
|
||||||
@@ -134,8 +106,8 @@
|
|||||||
--bp-phone: 720px; /* below: phone layout (header + bottom bar) */
|
--bp-phone: 720px; /* below: phone layout (header + bottom bar) */
|
||||||
|
|
||||||
color-scheme: dark;
|
color-scheme: dark;
|
||||||
background: var(--ground);
|
background: var(--domi-bg);
|
||||||
color: var(--text);
|
color: var(--domi-fg);
|
||||||
font-family: var(--font-hand);
|
font-family: var(--font-hand);
|
||||||
font-size: var(--fs-body);
|
font-size: var(--fs-body);
|
||||||
line-height: var(--lh-body);
|
line-height: var(--lh-body);
|
||||||
@@ -145,6 +117,4 @@
|
|||||||
.ia :focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }
|
.ia :focus-visible { outline: var(--focus-ring); outline-offset: var(--focus-offset); }
|
||||||
.ia h1, .ia h2, .ia h3, .ia p { margin: 0; }
|
.ia h1, .ia h2, .ia h3, .ia p { margin: 0; }
|
||||||
.ia button { font: inherit; }
|
.ia button { font: inherit; }
|
||||||
@media (prefers-reduced-motion: reduce) {
|
/* Reduced motion: @domi/ui base.css (every duration 0; every state still shown). */
|
||||||
.ia *, .ia *::before, .ia *::after { animation: none !important; transition: none !important; }
|
|
||||||
}
|
|
||||||
|
|||||||
Generated
+30
-18
@@ -10,6 +10,9 @@ importers:
|
|||||||
|
|
||||||
apps/web:
|
apps/web:
|
||||||
dependencies:
|
dependencies:
|
||||||
|
'@domi/ui':
|
||||||
|
specifier: workspace:*
|
||||||
|
version: link:../../packages/domi-ui
|
||||||
'@ianitor/ui':
|
'@ianitor/ui':
|
||||||
specifier: workspace:*
|
specifier: workspace:*
|
||||||
version: link:../../packages/ui
|
version: link:../../packages/ui
|
||||||
@@ -51,17 +54,26 @@ importers:
|
|||||||
specifier: ^3.0.5
|
specifier: ^3.0.5
|
||||||
version: 3.2.7(@types/node@22.20.5)(jsdom@26.1.0)
|
version: 3.2.7(@types/node@22.20.5)(jsdom@26.1.0)
|
||||||
|
|
||||||
|
packages/domi-ui:
|
||||||
|
dependencies:
|
||||||
|
'@fontsource-variable/cinzel':
|
||||||
|
specifier: 5.3.0
|
||||||
|
version: 5.3.0
|
||||||
|
'@fontsource-variable/cormorant-garamond':
|
||||||
|
specifier: 5.3.0
|
||||||
|
version: 5.3.0
|
||||||
|
'@fontsource-variable/manrope':
|
||||||
|
specifier: 5.3.0
|
||||||
|
version: 5.3.0
|
||||||
|
svelte:
|
||||||
|
specifier: ^5.20.0
|
||||||
|
version: 5.57.3
|
||||||
|
|
||||||
packages/ui:
|
packages/ui:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@fontsource/cinzel':
|
'@domi/ui':
|
||||||
specifier: ^5.1.0
|
specifier: workspace:*
|
||||||
version: 5.3.0
|
version: link:../domi-ui
|
||||||
'@fontsource/cormorant-garamond':
|
|
||||||
specifier: ^5.1.0
|
|
||||||
version: 5.3.0
|
|
||||||
'@fontsource/manrope':
|
|
||||||
specifier: ^5.1.0
|
|
||||||
version: 5.3.0
|
|
||||||
svelte:
|
svelte:
|
||||||
specifier: ^5.20.0
|
specifier: ^5.20.0
|
||||||
version: 5.57.3
|
version: 5.57.3
|
||||||
@@ -267,14 +279,14 @@ packages:
|
|||||||
cpu: [x64]
|
cpu: [x64]
|
||||||
os: [win32]
|
os: [win32]
|
||||||
|
|
||||||
'@fontsource/cinzel@5.3.0':
|
'@fontsource-variable/cinzel@5.3.0':
|
||||||
resolution: {integrity: sha512-KEOYTsrRppW0uRIPWBDPrQgunCS6f8u4nzZxYRBfo9SCknKojLYjK7B0ZoVmJhyVLefz271ZQRF9EOpHZlfhRw==}
|
resolution: {integrity: sha512-eFcU0TwaAP5QESF2pV8VoOPJJXJ6sSGm/6mXMwqTdMBPAJMaLhfa6oISHuOtFeddsoHP9RYm4Io0j1j3mNEz2Q==}
|
||||||
|
|
||||||
'@fontsource/cormorant-garamond@5.3.0':
|
'@fontsource-variable/cormorant-garamond@5.3.0':
|
||||||
resolution: {integrity: sha512-weuGsCirGVWBWqpt6YUp0yLThTe4G8YO45noq8wxeJCRvEpq5lFrxNMFSTxcyOyV5k5otzJ8guDzYegdYlcLMQ==}
|
resolution: {integrity: sha512-rgZJ/5w3hi60swAPnrOXpZf5wEH6NTrvm4H8D9Y4b1QIFUqlX14eM3QTMU/eAznjfh0eXpO1QUqsFhiy58aoMg==}
|
||||||
|
|
||||||
'@fontsource/manrope@5.3.0':
|
'@fontsource-variable/manrope@5.3.0':
|
||||||
resolution: {integrity: sha512-obJ1Dv3+uCA6HlHgW8u4BGYxJR9In2HW7gjJhlflEvkrj1X1iSEwu0fToL+JYGC/FEKFfIz1sBuPduvcL2gIAA==}
|
resolution: {integrity: sha512-6D5dgokHsWDDMtmXHznKa0hK229NN+1a4BLPmUCLqcO1Pw5EEhWY5RFt0AcXnVRAljFFPfRtLkJePQj6LSsV6g==}
|
||||||
|
|
||||||
'@jridgewell/gen-mapping@0.3.13':
|
'@jridgewell/gen-mapping@0.3.13':
|
||||||
resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==}
|
resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==}
|
||||||
@@ -1126,11 +1138,11 @@ snapshots:
|
|||||||
'@esbuild/win32-x64@0.25.12':
|
'@esbuild/win32-x64@0.25.12':
|
||||||
optional: true
|
optional: true
|
||||||
|
|
||||||
'@fontsource/cinzel@5.3.0': {}
|
'@fontsource-variable/cinzel@5.3.0': {}
|
||||||
|
|
||||||
'@fontsource/cormorant-garamond@5.3.0': {}
|
'@fontsource-variable/cormorant-garamond@5.3.0': {}
|
||||||
|
|
||||||
'@fontsource/manrope@5.3.0': {}
|
'@fontsource-variable/manrope@5.3.0': {}
|
||||||
|
|
||||||
'@jridgewell/gen-mapping@0.3.13':
|
'@jridgewell/gen-mapping@0.3.13':
|
||||||
dependencies:
|
dependencies:
|
||||||
|
|||||||
Reference in New Issue
Block a user