From 368aae437890a5148b63479ab2af9756df02aa3a Mon Sep 17 00:00:00 2001 From: YuZh98 <105947169+YuZh98@users.noreply.github.com> Date: Sat, 25 Jul 2026 01:24:43 -0400 Subject: [PATCH 001/154] Add spacing, type, radius and motion tokens to the v2 theme block The :root block carried only color/surface tokens, so every dimension, font size and duration in the components was a literal. Introduce a 2px spacing scale, five type roles, three fixed inner-chrome radii and named motion presets derived from the values the UI already renders, and route the existing app.css transitions through the motion tokens. --- v2/src/app.css | 40 +++++++++++++++++++++++++++++++++------- 1 file changed, 33 insertions(+), 7 deletions(-) diff --git a/v2/src/app.css b/v2/src/app.css index 2d45482..19602fb 100644 --- a/v2/src/app.css +++ b/v2/src/app.css @@ -15,6 +15,32 @@ --mono: ui-monospace, SFMono-Regular, Menlo, monospace; --font: system-ui, -apple-system, Segoe UI, Roboto, sans-serif; --glow: 0 0 0 1px rgba(110, 168, 254, 0); + + /* spacing scale (2px step — the grid the ported v1 chrome is actually built on) */ + --space-1: 2px; + --space-2: 4px; + --space-3: 6px; + --space-4: 8px; + --space-5: 10px; + --space-6: 12px; + + /* type roles */ + --fs-2xs: 10px; + --fs-xs: 11px; + --fs-sm: 12px; + --fs-md: 13px; + --fs-lg: 16px; + + /* inner-chrome radii — unlike --radius these are fixed, themes do NOT swap them */ + --radius-sm: 4px; + --radius-md: 6px; + --radius-lg: 10px; + + /* motion */ + --t-quick: 0.12s; + --t-base: 0.15s; + --t-slow: 0.35s; + --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1); } body[data-theme="plain"] { --bg: #f6f7f9; @@ -158,7 +184,7 @@ body[data-theme="mono"] .furn::before { background: var(--accent); transform: scaleY(0); transform-origin: top; - transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); + transition: transform var(--t-slow) var(--ease-out); } body[data-theme="mono"] .furn:hover::before { transform: scaleY(1); @@ -1260,7 +1286,7 @@ body.side-collapsed #main { box-shadow: inset 3px 0 0 var(--cardc), var(--glow); - transition: flex-basis 0.12s ease; + transition: flex-basis var(--t-quick) ease; } .furn.dragging { transition: none; @@ -1310,7 +1336,7 @@ body[data-theme] .room.edit .furn.bare { font-size: 13px; user-select: none; opacity: 0; - transition: 0.15s; + transition: var(--t-base); } .furn:hover .grip { opacity: 0.8; @@ -1445,7 +1471,7 @@ body[data-theme] .room.edit .furn.bare { /* hidden row still hit-tests (opacity<1 stacks above the positioned .grip) and would swallow the grip's pointerdown, killing card drag — dead to the pointer until revealed */ pointer-events: none; - transition: 0.15s; + transition: var(--t-base); } .furn:hover .cardtools, .cardtools:focus-within { @@ -1652,7 +1678,7 @@ body[data-theme] .room.edit .furn.bare { position: relative; min-height: 46px; cursor: pointer; - transition: flex-basis 0.12s ease; + transition: flex-basis var(--t-quick) ease; } .benchslot.dragging { transition: none; @@ -1817,8 +1843,8 @@ body[data-theme] .room.edit .furn.bare { overflow: hidden; text-overflow: ellipsis; transition: - background 0.12s, - color 0.12s, + background var(--t-quick), + color var(--t-quick), transform 0.08s; } .mtx-c:hover { From c738e34acef06dd16474a108486574c9ba351bfd Mon Sep 17 00:00:00 2001 From: YuZh98 <105947169+YuZh98@users.noreply.github.com> Date: Sat, 25 Jul 2026 01:25:43 -0400 Subject: [PATCH 002/154] Use design tokens for spacing, type and radius in the note, tag and seal panels CardNotes, CardPanel, TagsPanel and SealModal held literal px values for every gap, pad, font size and corner. Point them at the app.css tokens and mark the two off-scale survivors token-exempt. --- v2/src/lib/components/CardNotes.svelte | 34 +++++++++++++------------- v2/src/lib/components/CardPanel.svelte | 12 ++++----- v2/src/lib/components/SealModal.svelte | 24 +++++++++--------- v2/src/lib/components/TagsPanel.svelte | 18 +++++++------- 4 files changed, 44 insertions(+), 44 deletions(-) diff --git a/v2/src/lib/components/CardNotes.svelte b/v2/src/lib/components/CardNotes.svelte index c209177..9ca98f4 100644 --- a/v2/src/lib/components/CardNotes.svelte +++ b/v2/src/lib/components/CardNotes.svelte @@ -45,19 +45,19 @@ diff --git a/v2/src/lib/components/SealModal.svelte b/v2/src/lib/components/SealModal.svelte index bd5d551..5c35267 100644 --- a/v2/src/lib/components/SealModal.svelte +++ b/v2/src/lib/components/SealModal.svelte @@ -104,9 +104,9 @@