commit 4d99f594c87706720310f7bfc314871bbb32f161
parent dc679890aee00a5c58ecf4f11f0c66622535c1a8
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 14 Oct 2026 00:41:21 -0400
umtool: the desk and the reader — role tokens in light and dark, the vendored faces, the theme cookie
globals.css carries the signed-off canvas's role tokens (ground, panel,
seam, text, muted, the reader set, signal, meter, the three verdicts and
their text steps, the meter ramp): dark as the base, light under
prefers-color-scheme unless dark is pinned, and both explicit choices as
data-theme on <html>. They are Tailwind colours (bg-panel, text-muted …)
through @theme inline, and the old palette's names (dim, line, sel,
good/dirty/bad, ink) are aliases of the roles they always meant, so every
page draws the new desk in both themes.
Faces via next/font/local, no network: Archivo, Plex Sans and Plex Mono
Regular/Bold referenced from report-to-video/fonts; Source Serif 4
(variable, opsz) and Plex Mono Medium added under umtool/fonts with their
OFL.txt. The root layout reads the theme cookie and stamps data-theme
server-side: no inline script, no flash.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Diffstat:
9 files changed, 952 insertions(+), 105 deletions(-)
diff --git a/umtool/app/fonts.ts b/umtool/app/fonts.ts
@@ -0,0 +1,67 @@
+import localFont from "next/font/local";
+
+// ---------------------------------------------------------------------------
+// The four faces, vendored. NO NETWORK at build or at run time: the brand slice
+// hit fonts.gstatic failures, and this is a tool on a machine that is often
+// offline from the services it talks to.
+//
+// Archivo, Plex Sans and Plex Mono Regular/Bold are REFERENCED from
+// report-to-video/fonts/ rather than copied: that directory is already the
+// brand's vendored set (unmodified from google/fonts, OFL.txt beside them), the
+// renderer draws the same videos with them, and one copy cannot drift from the
+// other. Nothing new goes INTO that directory, though: its fonts.conf hands the
+// whole directory to the renderer's own children, so a face added there would
+// change what a video can render with. The two faces only the app needs --
+// Source Serif 4 (the reader) and Plex Mono Medium -- live in umtool/fonts/,
+// each with its OFL.txt, from the families' own releases (adobe-fonts/
+// source-serif 4.005R, IBM/plex @ibm/plex-mono@2.5.0).
+//
+// TTF, not woff2: Plex carries a Reserved Font Name and ships unmodified here
+// (report-to-video/fonts/gen-face-metrics.py says why), and on a local tool the
+// transfer size is not worth a conversion step to reason about.
+//
+// Each sets a CSS variable on <html>; app/globals.css builds --f-ui, --f-mono,
+// --f-reader and --f-display on them, and Tailwind's font-sans / font-mono /
+// font-serif / font-display read those.
+// ---------------------------------------------------------------------------
+
+export const archivo = localFont({
+ src: [{ path: "../report-to-video/fonts/Archivo[wdth,wght].ttf", weight: "100 900", style: "normal" }],
+ variable: "--font-archivo",
+ display: "swap",
+ // Only titles use it, and only at expanded width.
+ preload: false,
+ declarations: [{ prop: "font-stretch", value: "62% 125%" }],
+});
+
+export const plexSans = localFont({
+ src: [{ path: "../report-to-video/fonts/IBMPlexSans[wdth,wght].ttf", weight: "100 700", style: "normal" }],
+ variable: "--font-plex-sans",
+ display: "swap",
+ declarations: [{ prop: "font-stretch", value: "75% 100%" }],
+});
+
+export const plexMono = localFont({
+ src: [
+ { path: "../report-to-video/fonts/IBMPlexMono-Regular.ttf", weight: "400", style: "normal" },
+ { path: "../fonts/ibm-plex-mono/IBMPlexMono-Medium.ttf", weight: "500", style: "normal" },
+ { path: "../report-to-video/fonts/IBMPlexMono-Bold.ttf", weight: "700", style: "normal" },
+ ],
+ variable: "--font-plex-mono",
+ display: "swap",
+});
+
+export const sourceSerif = localFont({
+ src: [
+ { path: "../fonts/source-serif-4/SourceSerif4Variable-Roman.ttf", weight: "200 900", style: "normal" },
+ { path: "../fonts/source-serif-4/SourceSerif4Variable-Italic.ttf", weight: "200 900", style: "italic" },
+ ],
+ variable: "--font-source-serif",
+ display: "swap",
+ // The reader appears on a minority of pages; do not make every page fetch it.
+ preload: false,
+ adjustFontFallback: "Times New Roman",
+});
+
+/** Every face's variable, for <html className>. */
+export const fontVariables = [archivo, plexSans, plexMono, sourceSerif].map((f) => f.variable).join(" ");
diff --git a/umtool/app/globals.css b/umtool/app/globals.css
@@ -20,130 +20,347 @@
Named, not detected, as above. */
@source "../../common/components/report";
-/* A dark, dense, keyboard-first bench. Nothing here is deployed; the only user
- is someone judging thousands of clips, or auditioning one transition, in a
- long sitting -- so contrast and hit-size beat decoration.
-
- COLOUR MEANS SOMETHING, OR IT IS NEUTRAL. Three hues are reserved for
- VERDICTS (good/dirty/bad), `sel` is the only INTERACTION colour, and `meter`
- is the only MEASUREMENT colour. The old `--color-accent` (a second green)
- broke that rule: it marked the active nav link while competing with
- `--color-good` two inches away, so a navigation state wore a verdict's
- clothes. It is gone rather than retuned.
-
- `meter` teal is the one colour risk here, and it is deliberate: it sits far
- from all three verdict hues, so a READING can never be mistaken for a
- JUDGEMENT. */
-@theme {
- --color-ink: #0b0e12;
- --color-panel: #161c24;
- /* Wells -- video, waveform. The ramp is wider than it was: the old
- panel/panel-2 pair differed by so little that a well and the card it sat in
- read as one surface. */
- --color-panel-2: #1e2732;
- --color-line: #2c3743;
- --color-text: #e7edf4;
- --color-dim: #8496a8;
-
- /* verdicts ONLY */
- --color-good: #3fb950;
- --color-dirty: #d29922;
- --color-bad: #f85149;
-
- /* interaction ONLY */
- --color-sel: #58a6ff;
-
- /* measurement ONLY -- the pitch rail, and every number that is a reading */
- --color-meter: #56d4c4;
-
- /* ---------------------------------------------------------------------
- shadcn/ui's token names, MAPPED ONTO THE PALETTE ABOVE. Not imported.
-
- Its default theme ships `primary`, `accent` and `destructive` as their own
- hues. Adopting those would walk straight back into the rule this file
- opens with: a second green marked the active nav link while competing with
- --color-good two inches away, so a navigation state wore a verdict's
- clothes, and --color-accent was DELETED rather than retuned.
-
- So every shadcn name is an alias for a colour that already means something
- here, and `accent` is mapped to a SURFACE rather than to a hue -- shadcn
- uses it for hover backgrounds, which is a surface change, not a statement.
- No new colour enters the app, and `cn()` + cva give us the variants and the
- class-merging without the theme.
- --------------------------------------------------------------------- */
- --color-background: var(--color-ink);
- --color-foreground: var(--color-text);
- --color-card: var(--color-panel);
- --color-card-foreground: var(--color-text);
- --color-popover: var(--color-panel);
- --color-popover-foreground: var(--color-text);
- --color-muted: var(--color-panel-2);
- --color-muted-foreground: var(--color-dim);
- /* A surface, never a hue. */
- --color-accent: var(--color-panel-2);
- --color-accent-foreground: var(--color-text);
- --color-secondary: var(--color-panel-2);
- --color-secondary-foreground: var(--color-text);
- --color-border: var(--color-line);
- --color-input: var(--color-line);
- --color-primary: var(--color-sel);
- --color-primary-foreground: var(--color-ink);
- --color-ring: var(--color-sel);
- --color-destructive: var(--color-bad);
- --color-destructive-foreground: var(--color-ink);
-
- --radius: 4px;
+/* ===========================================================================
+ THE DESK AND THE READER (plans/umtool-redesign.md, "Design direction"; the
+ signed-off canvas is ~/reports/umtool-redesign/canvas.html, version 2).
+
+ Tool chrome is the DESK -- warm ink in dark, warm grey in light. Anything a
+ SOURCE said (a transcript, a quote, a post) sits on the READER: a pale
+ green-grey microfilm surface. Paper is the record; ink is our work. A quote
+ can never be mistaken for our claim about it.
+
+ COLOUR MEANS SOMETHING, OR IT IS NEUTRAL. Every token is named by ROLE, not
+ by hue, so one set of components draws both themes:
+ - SIGNAL is the ONE interaction colour: focus, the lit line, and the one
+ primary action per screen. Every other button is an outline.
+ - METER is the ONE measurement colour: counts, coverage, spend. A number
+ you cannot click does not wear the click colour.
+ - KEPT / DOUBT / REJECT are VERDICTS only, always with their glyph and
+ word (✓ ? ✕). The glyph carries the colour; the word takes the *-text
+ step, which in light is darker than the glyph (no green/ochre/red set
+ clears 4.5:1 text and colour-blind separation together on a light
+ ground -- 52,272 sets searched).
+ - Verdict colours NEVER land on the reader. The record carries no
+ judgement, and on the pale surface ochre and brick collapse under
+ deuteranopia at any legible lightness.
+ - MARK is the brand teal, on the logo only: too grey to carry focus.
+ The old palette's rule survives in its aliases below: `sel` is Signal,
+ `meter` is Meter, good/dirty/bad are the three verdicts.
+
+ Dark is the base. Light applies when the system asks for it and nobody
+ pinned dark, or when somebody pinned light; `data-theme` is stamped on
+ <html> by the root layout from the theme cookie (lib/theme.ts), so an
+ explicit choice wins BOTH ways and paints on the first frame.
+ =========================================================================== */
+
+:root {
+ color-scheme: dark;
+ /* desk -- dark */
+ --ground: #0c0a08;
+ --panel: #17140f;
+ --panel-2: #201b15;
+ --seam: #2b251d;
+ --seam-2: #3d3429;
+ --text: #ece4d6;
+ --text-2: #c9bfae;
+ --muted: #9a8f7e;
+ --muted-2: #8a8070;
+ /* reader */
+ --reader: #dfe5e1;
+ --reader-ink: #141210;
+ --reader-2: #3f4742;
+ --reader-dim: #5a625d;
+ --reader-seam: #c2cac5;
+ --reader-edge: transparent;
+ --reader-signal: #0b6b5f;
+ /* roles: the colour is the graphic; *-text is the colour as small text */
+ --signal: #3fc1b0;
+ --signal-text: #3fc1b0;
+ --on-signal: #0c0a08;
+ --mark: #5fa8a0;
+ --mark-dim: #6b5d47;
+ --meter: #b9a2ec;
+ --kept: #c6e283;
+ --kept-text: #c6e283;
+ --doubt: #ef9a2a;
+ --doubt-text: #ef9a2a;
+ --reject: #de4c3c;
+ --reject-text: #de4c3c;
+ /* meter ramp (sequential, light end clears the ground) + its cell text */
+ --m1: #4e4279;
+ --m2: #66559f;
+ --m3: #8a74c8;
+ --m4: #ad98e5;
+ --m5: #d4c6fa;
+ --m1-ink: #ece4d6;
+ --m2-ink: #ece4d6;
+ --m3-ink: #0c0a08;
+ --m4-ink: #0c0a08;
+ --m5-ink: #0c0a08;
+ --player-text: #c9bfae;
+ /* type -- the faces are vendored and loaded by app/fonts.ts (next/font/local),
+ which sets the --font-* variables on <html> */
+ --f-display: var(--font-archivo), "Arial Narrow", system-ui, sans-serif;
+ --f-ui: var(--font-plex-sans), system-ui, -apple-system, "Segoe UI", sans-serif;
+ --f-reader: var(--font-source-serif), "Source Serif Pro", Georgia, serif;
+ --f-mono: var(--font-plex-mono), ui-monospace, "SFMono-Regular", Menlo, monospace;
+ /* the app's only motion: the lit line's head */
+ --glide: 120ms cubic-bezier(0.2, 0.7, 0.2, 1);
+ /* the rail */
+ --rail-w: 212px;
+}
+
+/* Light, when the system asks and nobody pinned dark. The block is repeated for
+ an explicit light below; CSS has no way to share it between a media query and
+ an attribute selector, and the canvas this was signed off on does the same. */
+@media (prefers-color-scheme: light) {
+ :root:not([data-theme="dark"]) {
+ color-scheme: light;
+ --ground: #f1efec;
+ --panel: #e8e4de;
+ --panel-2: #dfd9d1;
+ --seam: #d4cdc3;
+ --seam-2: #bdb4a7;
+ --text: #17130f;
+ --text-2: #3d362e;
+ --muted: #675e52;
+ --muted-2: #5f564b;
+ --reader: #d5ded8;
+ --reader-ink: #141210;
+ --reader-2: #333b36;
+ --reader-dim: #535b56;
+ --reader-seam: #b9c4bd;
+ --reader-edge: #b9c4bd;
+ --reader-signal: #0a5f54;
+ --signal: #107c8b;
+ --signal-text: #0b6372;
+ --on-signal: #ffffff;
+ --mark: #2e7b73;
+ --mark-dim: #b5aa97;
+ --meter: #5d33bd;
+ --kept: #566609;
+ --kept-text: #566609;
+ --doubt: #b0730f;
+ --doubt-text: #8a5a0b;
+ --reject: #6e1b08;
+ --reject-text: #6e1b08;
+ --m1: #ad9ae7;
+ --m2: #9c84df;
+ --m3: #7f63cf;
+ --m4: #6145b8;
+ --m5: #432690;
+ --m1-ink: #17130f;
+ --m2-ink: #17130f;
+ --m3-ink: #ffffff;
+ --m4-ink: #ffffff;
+ --m5-ink: #ffffff;
+ }
+}
+
+:root[data-theme="light"] {
+ color-scheme: light;
+ --ground: #f1efec;
+ --panel: #e8e4de;
+ --panel-2: #dfd9d1;
+ --seam: #d4cdc3;
+ --seam-2: #bdb4a7;
+ --text: #17130f;
+ --text-2: #3d362e;
+ --muted: #675e52;
+ --muted-2: #5f564b;
+ --reader: #d5ded8;
+ --reader-ink: #141210;
+ --reader-2: #333b36;
+ --reader-dim: #535b56;
+ --reader-seam: #b9c4bd;
+ --reader-edge: #b9c4bd;
+ --reader-signal: #0a5f54;
+ --signal: #107c8b;
+ --signal-text: #0b6372;
+ --on-signal: #ffffff;
+ --mark: #2e7b73;
+ --mark-dim: #b5aa97;
+ --meter: #5d33bd;
+ --kept: #566609;
+ --kept-text: #566609;
+ --doubt: #b0730f;
+ --doubt-text: #8a5a0b;
+ --reject: #6e1b08;
+ --reject-text: #6e1b08;
+ --m1: #ad9ae7;
+ --m2: #9c84df;
+ --m3: #7f63cf;
+ --m4: #6145b8;
+ --m5: #432690;
+ --m1-ink: #17130f;
+ --m2-ink: #17130f;
+ --m3-ink: #ffffff;
+ --m4-ink: #ffffff;
+ --m5-ink: #ffffff;
+}
+
+/* An explicit dark. The base already is dark and the light media block skips
+ `[data-theme="dark"]`; this states the scheme, so a pinned dark on a light
+ system gets dark form controls and scrollbars too. */
+:root[data-theme="dark"] {
+ color-scheme: dark;
+}
+
+@media (prefers-reduced-motion: reduce) {
+ :root {
+ --glide: 0ms linear;
+ }
+}
+
+/* The roles as Tailwind colours (`bg-panel`, `text-muted`, `border-seam`,
+ `text-signal-text`, …). INLINE, so a utility reads the role variable itself
+ and follows the theme at run time. */
+@theme inline {
+ --color-ground: var(--ground);
+ --color-panel: var(--panel);
+ --color-panel-2: var(--panel-2);
+ --color-seam: var(--seam);
+ --color-seam-2: var(--seam-2);
+ --color-text: var(--text);
+ --color-text-2: var(--text-2);
+ --color-muted: var(--muted);
+ --color-muted-2: var(--muted-2);
+ --color-reader: var(--reader);
+ --color-reader-ink: var(--reader-ink);
+ --color-reader-2: var(--reader-2);
+ --color-reader-dim: var(--reader-dim);
+ --color-reader-seam: var(--reader-seam);
+ --color-reader-signal: var(--reader-signal);
+ --color-signal: var(--signal);
+ --color-signal-text: var(--signal-text);
+ --color-on-signal: var(--on-signal);
+ --color-mark: var(--mark);
+ --color-mark-dim: var(--mark-dim);
+ --color-meter: var(--meter);
+ --color-kept: var(--kept);
+ --color-kept-text: var(--kept-text);
+ --color-doubt: var(--doubt);
+ --color-doubt-text: var(--doubt-text);
+ --color-reject: var(--reject);
+ --color-reject-text: var(--reject-text);
+ --color-m1: var(--m1);
+ --color-m2: var(--m2);
+ --color-m3: var(--m3);
+ --color-m4: var(--m4);
+ --color-m5: var(--m5);
+ --color-player-text: var(--player-text);
+
+ /* The OLD palette's names, kept as aliases of the roles so the ~1,800 places
+ that still say `var(--color-dim)` draw the new desk in both themes. Each
+ maps to the role it always meant: `sel` (interaction, almost always text
+ or an outline) is Signal's text step; the verdicts are their word step;
+ `line` is the hairline. `fg`/`bg` were never defined -- ClaimBench and
+ DeliverActions used them -- and now resolve. New code says the role. */
+ --color-ink: var(--ground);
+ --color-line: var(--seam);
+ --color-dim: var(--muted);
+ --color-sel: var(--signal-text);
+ --color-good: var(--kept-text);
+ --color-dirty: var(--doubt-text);
+ --color-bad: var(--reject-text);
+ --color-fg: var(--text);
+ --color-bg: var(--ground);
+
+ /* shadcn/ui's names, MAPPED ONTO THE ROLES. Not imported: its default theme
+ ships `primary`, `accent` and `destructive` as their own hues, which would
+ walk straight back into the rule above (a second green once marked the
+ active nav link two inches from a verdict). `accent` is a SURFACE (shadcn
+ uses it for hover backgrounds), `primary` is Signal, `destructive` is the
+ reject word. shadcn's `muted` surface is NOT here: `muted` is the role (a
+ text colour), and `muted-foreground` says the same thing in shadcn's words. */
+ --color-background: var(--ground);
+ --color-foreground: var(--text);
+ --color-card: var(--panel);
+ --color-card-foreground: var(--text);
+ --color-popover: var(--panel);
+ --color-popover-foreground: var(--text);
+ --color-muted-foreground: var(--muted);
+ --color-accent: var(--panel-2);
+ --color-accent-foreground: var(--text);
+ --color-secondary: var(--panel-2);
+ --color-secondary-foreground: var(--text);
+ --color-border: var(--seam-2);
+ --color-input: var(--seam-2);
+ --color-primary: var(--signal);
+ --color-primary-foreground: var(--on-signal);
+ --color-ring: var(--signal);
+ --color-destructive: var(--reject-text);
+ --color-destructive-foreground: var(--ground);
+
+ --font-sans: var(--f-ui);
+ --font-mono: var(--f-mono);
+ --font-serif: var(--f-reader);
+ --font-display: var(--f-display);
+
+ --radius: 3px;
}
html,
body {
height: 100%;
+ background: var(--ground);
+ color: var(--text);
}
body {
- background: var(--color-ink);
- color: var(--color-text);
- font: 14px/1.45 ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
+ font: 14px/1.45 var(--f-ui);
-webkit-font-smoothing: antialiased;
}
+:focus-visible {
+ outline: 2px solid var(--signal);
+ outline-offset: 2px;
+}
+
/* EVERY NUMBER IS TABULAR. f0, times and durations change while you stare at
them; proportional digits make the row jitter on every update, which in a
tool you sit with for hours reads as instability rather than as data. */
.num,
+.font-mono,
input[type="number"],
kbd {
font-variant-numeric: tabular-nums;
}
-/* Micro-labels: only on the rail and the evidence panel, never on controls. */
+/* Micro-labels: section heads, the rail, the evidence panel; never on controls. */
.micro {
- font-size: 10px;
- line-height: 1.2;
- letter-spacing: 0.08em;
+ font: 600 10.5px/1.2 var(--f-ui);
+ letter-spacing: 0.09em;
text-transform: uppercase;
- color: var(--color-dim);
+ color: var(--muted);
+}
+
+/* Archivo at 125% width is spent on three things only: place titles, piece
+ titles, and the Inbox's one big count. */
+.display {
+ font-family: var(--f-display);
+ font-variation-settings: "wdth" 125;
+ font-weight: 800;
+ letter-spacing: -0.01em;
}
/* The word under judgement is the display element -- what is being decided is a
word, so it is set as a specimen rather than as a caption. */
.specimen {
- font: 500 34px/1 ui-monospace, "SF Mono", Menlo, monospace;
+ font: 500 34px/1 var(--f-mono);
letter-spacing: 0.14em;
text-transform: lowercase;
}
kbd {
display: inline-block;
- padding: 1px 5px;
- border: 1px solid var(--color-line);
+ padding: 0 4px;
+ border: 1px solid var(--seam-2);
border-bottom-width: 2px;
- border-radius: 4px;
- background: var(--color-panel-2);
- font-family: ui-monospace, monospace;
- font-size: 11px;
- line-height: 1.4;
- color: var(--color-dim);
+ border-radius: 3px;
+ background: var(--ground);
+ font: 500 10.5px/1.5 var(--f-mono);
+ color: var(--muted-2);
}
/* The overflow fix, and it is a fix rather than a workaround.
@@ -165,18 +382,355 @@ canvas.grabbable {
touch-action: none;
}
-/* The slides and the overview (common/styles/slides.css) in this bench's
- palette: its ink and panels, `sel` as the accent (it is the interaction
- colour, and every mark on a slide that is not a verdict is a way to act). */
+/* The slides and the overview (common/styles/slides.css) on the desk: its ink
+ and panels, Signal as the accent (it is the interaction colour, and every
+ mark on a slide that is not a verdict is a way to act). */
.rs-root {
- --rs-ground: var(--color-ink);
- --rs-paper: var(--color-panel);
- --rs-ink: var(--color-text);
- --rs-muted: var(--color-dim);
- --rs-faint: var(--color-dim);
- --rs-line: var(--color-line);
- --rs-line-strong: color-mix(in srgb, var(--color-line) 55%, var(--color-dim));
- --rs-accent: var(--color-sel);
- --rs-accent-soft: color-mix(in srgb, var(--color-sel) 16%, transparent);
- --rs-focus: var(--color-sel);
+ --rs-ground: var(--ground);
+ --rs-paper: var(--panel);
+ --rs-ink: var(--text);
+ --rs-muted: var(--muted);
+ --rs-faint: var(--muted-2);
+ --rs-line: var(--seam);
+ --rs-line-strong: var(--seam-2);
+ --rs-accent: var(--signal-text);
+ --rs-accent-soft: color-mix(in srgb, var(--signal) 16%, transparent);
+ --rs-focus: var(--signal);
+ --rs-display: var(--f-display);
+ --rs-sans: var(--f-ui);
+ --rs-mono: var(--f-mono);
+}
+
+/* ===========================================================================
+ The shell (components/shell/). The rail is FIXED and the page pads for it,
+ so BrowseHeader -- rendered as the first child of each page's own flex
+ column, 22 call sites, some of them release 28's -- could become the shell
+ without any page changing shape. A page with no rail (a bench) pads nothing.
+ =========================================================================== */
+
+@layer components {
+ body:has(.app-rail) {
+ padding-left: var(--rail-w);
+ }
+
+ .app-rail {
+ position: fixed;
+ inset-block: 0;
+ left: 0;
+ z-index: 30;
+ width: var(--rail-w);
+ display: flex;
+ flex-direction: column;
+ min-height: 0;
+ overflow-y: auto;
+ background: var(--panel);
+ border-right: 1px solid var(--seam);
+ }
+
+ /* Below a laptop the rail stops being a column and becomes the top strip, so
+ a narrow window keeps every place without a horizontal scroll. */
+ @media (max-width: 760px) {
+ body:has(.app-rail) {
+ padding-left: 0;
+ }
+ .app-rail {
+ position: static;
+ width: auto;
+ flex-direction: row;
+ flex-wrap: wrap;
+ align-items: center;
+ overflow: visible;
+ border-right: 0;
+ border-bottom: 1px solid var(--seam);
+ }
+ .app-rail [data-rail-section="pins"],
+ .app-rail [data-rail-section="running"],
+ .app-rail [data-rail-section="jump"] {
+ display: none;
+ }
+ }
+
+ .app-places > a,
+ .app-places > [data-nav-group] > button {
+ position: relative;
+ display: flex;
+ width: 100%;
+ align-items: center;
+ gap: 10px;
+ padding: 6px 10px 6px 12px;
+ border-radius: 3px;
+ color: var(--muted-2);
+ text-decoration: none;
+ text-align: left;
+ }
+ .app-places > a:hover,
+ .app-places > [data-nav-group] > button:hover {
+ color: var(--text);
+ background: var(--panel-2);
+ }
+ .app-places > a[aria-current="page"],
+ .app-places > [data-nav-group] > button[aria-current="page"] {
+ color: var(--text);
+ background: var(--panel-2);
+ }
+ /* The Signal edge on the place you are in: the lit line, at rest. */
+ .app-places > a[aria-current="page"]::before,
+ .app-places > [data-nav-group] > button[aria-current="page"]::before {
+ content: "";
+ position: absolute;
+ left: 0;
+ top: 6px;
+ bottom: 6px;
+ width: 2px;
+ background: var(--signal);
+ }
+
+ /* ── the lit line (components/ui/lit-list.tsx; canvas .lines/.ln/.head) ── */
+ .lit-list {
+ position: relative;
+ outline: none;
+ }
+ .lit-head {
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 3px;
+ height: 0;
+ z-index: 2;
+ pointer-events: none;
+ background: var(--signal);
+ transition:
+ top var(--glide),
+ height var(--glide);
+ }
+ .lit-head[data-off] {
+ display: none;
+ }
+ .lit-head:not([data-placed]) {
+ transition: none;
+ }
+ /* The play-head notch. */
+ .lit-head::after {
+ content: "";
+ position: absolute;
+ left: 3px;
+ top: 50%;
+ margin-top: -6px;
+ border-left: 7px solid var(--signal);
+ border-top: 6px solid transparent;
+ border-bottom: 6px solid transparent;
+ }
+ .lit-line {
+ position: relative;
+ padding: 8px 12px 8px 20px;
+ color: var(--muted);
+ border-bottom: 1px solid var(--seam);
+ transition:
+ color var(--glide),
+ background-color var(--glide);
+ }
+ .lit-line:last-child {
+ border-bottom: 0;
+ }
+ .lit-line:focus-visible {
+ outline: 2px solid var(--signal);
+ outline-offset: -2px;
+ }
+ .lit-line[data-lit] {
+ color: var(--text);
+ background: var(--panel);
+ }
+ /* A line's actions show on the lit line (and on hover or keyboard focus, so
+ a pointer or Tab never finds an invisible button). */
+ .lit-line [data-lit-act] {
+ opacity: 0;
+ transition: opacity var(--glide);
+ }
+ .lit-line[data-lit] [data-lit-act],
+ .lit-line:focus-within [data-lit-act],
+ .lit-line:hover [data-lit-act] {
+ opacity: 1;
+ }
+ /* The cite thread shows on the lit line only: on every row it was a barcode. */
+ .lit-line [data-lit-only] {
+ display: none;
+ }
+ .lit-line[data-lit] [data-lit-only] {
+ display: block;
+ }
+ .lit-group + .lit-group {
+ margin-top: 18px;
+ }
+ .lit-group-head {
+ display: flex;
+ align-items: baseline;
+ gap: 10px;
+ padding: 0 0 6px;
+ border-bottom: 1px solid var(--seam-2);
+ }
+
+ /* ── the reader (components/ui/reader-pane.tsx; canvas .paper/.cue) ── */
+ .reader {
+ display: flex;
+ min-height: 0;
+ flex-direction: column;
+ background: var(--reader);
+ color: var(--reader-ink);
+ box-shadow: inset 0 0 0 1px var(--reader-edge);
+ }
+ .reader .micro {
+ color: var(--reader-dim);
+ }
+ .reader :focus-visible {
+ outline-color: var(--reader-signal);
+ }
+ .reader .lit-head {
+ background: var(--reader-signal);
+ }
+ .reader .lit-head::after {
+ border-left-color: var(--reader-signal);
+ }
+ .reader .lit-line {
+ color: var(--reader-2);
+ border-bottom: 0;
+ padding: 5px 16px 5px 22px;
+ }
+ .reader .lit-line[data-lit] {
+ color: var(--reader-ink);
+ background: color-mix(in srgb, var(--reader-signal) 9%, transparent);
+ }
+ .reader-cue {
+ display: grid;
+ grid-template-columns: 58px minmax(0, 1fr);
+ column-gap: 14px;
+ align-items: baseline;
+ }
+ .reader-t {
+ font: 11px var(--f-mono);
+ font-variant-numeric: tabular-nums;
+ color: var(--reader-dim);
+ }
+ .lit-line[data-lit] .reader-t {
+ color: var(--reader-signal);
+ font-weight: 600;
+ }
+ .reader-cue p,
+ .reader-text {
+ margin: 0;
+ font: 16px/1.5 var(--f-reader);
+ font-optical-sizing: auto;
+ }
+ .reader-cue[data-turn] p::before {
+ content: "»";
+ font-family: var(--f-mono);
+ font-size: 11px;
+ color: var(--reader-dim);
+ margin-right: 6px;
+ vertical-align: 1px;
+ }
+
+ /* ── the cite thread (components/ui/cite-thread.tsx; canvas .cthread/.pthread) ── */
+ .cite-thread {
+ position: relative;
+ height: 14px;
+ }
+ .cite-thread::before {
+ content: "";
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 7px;
+ height: 1px;
+ background: var(--seam-2);
+ }
+ .cite-thread > i {
+ position: absolute;
+ top: 2px;
+ width: 2px;
+ height: 11px;
+ background: var(--signal);
+ }
+ .cite-thread > span {
+ position: absolute;
+ top: -1px;
+ right: 0;
+ padding-left: 6px;
+ font: 10px var(--f-mono);
+ color: var(--muted-2);
+ background: var(--panel);
+ }
+ .reader .cite-thread {
+ height: 22px;
+ }
+ .reader .cite-thread::before {
+ top: 6px;
+ background: var(--reader-2);
+ opacity: 0.45;
+ }
+ .reader .cite-thread > i {
+ top: 0;
+ height: 13px;
+ background: var(--reader-signal);
+ }
+ .reader .cite-thread > span {
+ top: 12px;
+ right: auto;
+ padding: 0;
+ font-size: 10.5px;
+ color: var(--reader-dim);
+ background: none;
+ }
+
+ /* ── a verdict: glyph + word, never colour alone (canvas .v) ── */
+ .verdict {
+ font: 600 11.5px var(--f-ui);
+ white-space: nowrap;
+ }
+ .verdict::before {
+ font-family: var(--f-mono);
+ margin-right: 4px;
+ }
+ .verdict[data-verdict="kept"] {
+ color: var(--kept-text);
+ }
+ .verdict[data-verdict="kept"]::before {
+ content: "✓";
+ color: var(--kept);
+ }
+ .verdict[data-verdict="doubt"] {
+ color: var(--doubt-text);
+ }
+ .verdict[data-verdict="doubt"]::before {
+ content: "?";
+ color: var(--doubt);
+ }
+ .verdict[data-verdict="reject"] {
+ color: var(--reject-text);
+ }
+ .verdict[data-verdict="reject"]::before {
+ content: "✕";
+ color: var(--reject);
+ }
+
+ /* ── the stage stepper (canvas .stepper) ── */
+ .stepper-dot {
+ width: 9px;
+ height: 9px;
+ border-radius: 50%;
+ border: 1.5px solid var(--seam-2);
+ }
+ [data-step="done"] .stepper-dot {
+ background: var(--text-2);
+ border-color: var(--text-2);
+ }
+ [data-step="current"] .stepper-dot {
+ background: var(--signal);
+ border-color: var(--signal);
+ box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 20%, transparent);
+ }
+
+ /* ── the native dialog (components/ui/dialog.tsx) ── */
+ dialog.ui-dialog::backdrop {
+ background: color-mix(in srgb, var(--ground) 70%, transparent);
+ }
}
diff --git a/umtool/app/layout.tsx b/umtool/app/layout.tsx
@@ -1,6 +1,9 @@
import type { Metadata } from "next";
+import { cookies } from "next/headers";
import "./globals.css";
+import { fontVariables } from "./fonts";
import { LastPageRecorder } from "@/components/LastPage";
+import { THEME_COOKIE, parseTheme, themeAttr } from "@/lib/theme";
export const metadata: Metadata = {
title: "umtool",
@@ -10,9 +13,15 @@ export const metadata: Metadata = {
// Deliberately no loading.tsx anywhere in this app. In this Next it turns
// notFound() 404s into 200s and never shows on a client sibling navigation --
// see the note in editor/next.config.ts.
-export default function RootLayout({ children }: { children: React.ReactNode }) {
+//
+// The theme is read HERE, from its cookie, and stamped on <html> server-side:
+// an explicit light or dark is on the first frame with no inline script and
+// nothing for hydration to change (lib/theme.ts). Reading a cookie makes every
+// route dynamic; every page here reads the disk per request anyway.
+export default async function RootLayout({ children }: { children: React.ReactNode }) {
+ const theme = parseTheme((await cookies()).get(THEME_COOKIE)?.value);
return (
- <html lang="en">
+ <html lang="en" data-theme={themeAttr(theme)} className={fontVariables}>
<body className="h-full">
{/* Writes down where you are, so / can bring you back. Renders nothing,
and needs no Suspense boundary -- see components/LastPage.tsx. */}
diff --git a/umtool/fonts/ibm-plex-mono/IBMPlexMono-Medium.ttf b/umtool/fonts/ibm-plex-mono/IBMPlexMono-Medium.ttf
Binary files differ.
diff --git a/umtool/fonts/ibm-plex-mono/OFL.txt b/umtool/fonts/ibm-plex-mono/OFL.txt
@@ -0,0 +1,93 @@
+Copyright © 2017 IBM Corp. with Reserved Font Name "Plex"
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+
+This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/umtool/fonts/source-serif-4/OFL.txt b/umtool/fonts/source-serif-4/OFL.txt
@@ -0,0 +1,93 @@
+Copyright 2014 - 2023 Adobe (http://www.adobe.com/), with Reserved Font Name ‘Source’. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries.
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+
+This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
+
+
+-----------------------------------------------------------
+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
+-----------------------------------------------------------
+
+PREAMBLE
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+
+DEFINITIONS
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting -- in part or in whole -- any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+
+PERMISSION & CONDITIONS
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+
+TERMINATION
+This license becomes null and void if any of the above conditions are
+not met.
+
+DISCLAIMER
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/umtool/fonts/source-serif-4/SourceSerif4Variable-Italic.ttf b/umtool/fonts/source-serif-4/SourceSerif4Variable-Italic.ttf
Binary files differ.
diff --git a/umtool/fonts/source-serif-4/SourceSerif4Variable-Roman.ttf b/umtool/fonts/source-serif-4/SourceSerif4Variable-Roman.ttf
Binary files differ.
diff --git a/umtool/lib/theme.ts b/umtool/lib/theme.ts
@@ -0,0 +1,31 @@
+// The theme choice: the system's (no cookie), or an explicit light or dark.
+//
+// Stored in a cookie rather than localStorage because the ROOT LAYOUT reads it:
+// the server stamps `data-theme` on <html> before a byte of CSS is applied, so an
+// explicit choice paints right on the first frame -- no inline script, no flash,
+// nothing for hydration to correct. "auto" is the absence of the cookie, which is
+// also what a cleared or refused cookie reads as.
+//
+// Pure, so the client control and the server layout share it.
+
+export const THEME_COOKIE = "umtool-theme";
+
+export const THEMES = ["auto", "light", "dark"] as const;
+export type Theme = (typeof THEMES)[number];
+
+/** A cookie value read back is untrusted: anything but light/dark is auto. */
+export function parseTheme(v: string | undefined | null): Theme {
+ return v === "light" || v === "dark" ? v : "auto";
+}
+
+/** The `data-theme` attribute for a choice; auto leaves the system in charge. */
+export function themeAttr(t: Theme): "light" | "dark" | undefined {
+ return t === "auto" ? undefined : t;
+}
+
+/** One year, path-wide; Lax because nothing cross-site ever needs it. */
+export function themeCookie(t: Theme): string {
+ return t === "auto"
+ ? `${THEME_COOKIE}=; Path=/; Max-Age=0; SameSite=Lax`
+ : `${THEME_COOKIE}=${t}; Path=/; Max-Age=31536000; SameSite=Lax`;
+}