AI media harness for planning, generating, and editing locally
TypeScript
Drop unused tokens
Bitti982814bef73f
diff --git a/src/lib/theme.test.ts b/src/lib/theme.test.tsindex 6fc182b..8627760 100644--- a/src/lib/theme.test.ts+++ b/src/lib/theme.test.ts@@ -374,8 +374,8 @@ const NAMED_COLOURS = new Set(`are not even ours to reason about. They went through untouched.These are also the reason `--custom-property` names are blanked out of a- value below: `var(--field-bg)` is a token this repo really uses, and `Field`- is a system colour, so scanning the raw value would fire on the palette+ value below: `var(--field-bg)` is a perfectly good token name (this repo+ had one), and `Field` is a system colour, so scanning the raw value would fire on the paletteitself. A property NAME is never a colour value; only what follows it is. */const SYSTEM_COLOURS = new Set(`accentcolor accentcolortext activetext buttonborder buttonface buttontext canvas canvastext@@ -557,8 +557,8 @@ describe("no stylesheet outside tokens.css names a colour", () => {guard that fires on the palette's own idioms is a guard that getsdeleted. These are those neighbours. */- /* `Field` is a system colour; `--field-bg` is a token this repo paints- with. Blanking property NAMES out of a value is what separates them. */+ /* `Field` is a system colour; `--field-bg` is a token name (the palette+ had one until the Fluent pass). Blanking property NAMES out of a value is what separates them. */expect(colourLiterals("a { background: var(--field-bg); color: var(--text-primary); }")).toEqual([]);expect(colourLiterals("a { box-shadow: inset 0 1px var(--hairline-hi); }")).toEqual([]);diff --git a/src/styles/tokens.css b/src/styles/tokens.cssindex 9f525a2..a878d4c 100644--- a/src/styles/tokens.css+++ b/src/styles/tokens.css@@ -112,13 +112,6 @@--weight-semibold: 600;--weight-bold: 700;- /* --- Letter spacing ------------------------------------------------------- Segoe UI Variable is spaced for its optical size already. All three are- 0 and kept only so older rules resolve; do not add new uses. */- --tracking-tight: 0;- --tracking-hero: 0;- --tracking-label: 0;-/* --- Spacing (8px rhythm, 4px half-steps) ------------------------------- */--space-1: 4px;--space-2: 8px;@@ -153,10 +146,6 @@--check-size: 20px; /* checkbox and radio box */--slider-thumb: 20px; /* range thumb, outer disc */- /* --- Layout ------------------------------------------------------------- */- --topbar-height: 56px;- --content-max: 1180px;-/* --- Motion -------------------------------------------------------------Fluent timings. Control state (hover, pressed) is a colour change over--motion-fast, linear. Things that open or slide use --motion-normal or@@ -185,7 +174,6 @@--panel: #0d1016; /* cards, dialogs, the topbar */--panel-2: #12151d; /* a surface sitting on a panel */--panel-3: #171b24; /* chips, menus, skeletons, placeholders */- --field-bg: #0b0e14; /* recessed: text inputs, search field *//* --- Fluent layers --------------------------------------------------------The WinUI surface stack, named the way the Fluent spec names it so the@@ -219,12 +207,10 @@--tooltip-stroke: rgba(0, 0, 0, 0.2);/* --- Lines --------------------------------------------------------------- --line / --line-strong are translucent so they work over any surface.+ --line is translucent so it works over any surface.--line-solid is the opaque equivalent for a border between two knownsurfaces (topbar bottom, dock top) where a wash would double up. */--line: rgba(255, 255, 255, 0.085);- --line-strong: rgba(255, 255, 255, 0.14);- --line-hover: rgba(255, 255, 255, 0.25);--line-solid: #232630;/* --- Neutral washes ------------------------------------------------------@@ -233,10 +219,6 @@converted stylesheet looks broken in the other theme. */--wash-1: rgba(255, 255, 255, 0.025); /* resting fill on a segmented control */--wash-2: rgba(255, 255, 255, 0.045); /* hover */- --wash-3: rgba(255, 255, 255, 0.06); /* hover on an already-tinted row */- --hairline-hi: rgba(255, 255, 255, 0.025); /* 1px top sheen on raised chrome */- --hatch: rgba(255, 255, 255, 0.03); /* diagonal placeholder hatching */- --hatch-strong: rgba(255, 255, 255, 0.09); /* the "cannot drop here" hatch */--grid-line: rgba(255, 255, 255, 0.14); /* beat grid + empty-stage dots, on --bg *//* --- Floating chrome -----------------------------------------------------@@ -244,8 +226,6 @@blur; blur is reserved for menus and flyouts (rule 11), so a floatingcontrol is simply a layer. */--glass: var(--panel); /* floating control / overlay panel */- --glass-hover: var(--panel-2);- --topbar-glass: var(--bg); /* the topbar sits on the ground, like a title bar */--scrim: rgba(0, 0, 0, 0.5); /* behind a modal: flat, never blurred *//* --- Text (contrast-checked against --panel / --panel-3) ---------------- */@@ -288,7 +268,6 @@--on-stage: #c9cfdb; /* 12.9:1 on --stage-bg, both themes */--stage-alert-bg: rgba(12, 8, 10, 0.9);--stage-alert-ink: #f19aa1; /* 9.3:1 on --stage-alert-bg over the stage */- --stage-alert-line: rgba(236, 125, 134, 0.45);/* --- Accent button (Fluent AccentButtonStyle) ----------------------------One flat fill with the faint Fluent elevation edge. No gradient, no@@ -300,16 +279,6 @@--button-primary-off-ink: var(--on-accent-disabled);--button-primary-stroke: rgba(255, 255, 255, 0.08);--button-primary-stroke-bottom: rgba(0, 0, 0, 0.14);- /* The dock's send button keeps a visible edge of its own. */- --dock-send-border: #5578ed;-- /* --- Segmented control ---------------------------------------------------- The selected view tab is a chip raised off the track, not a blue plate.- --segment-active-bg is a SURFACE step, so the 4.5:1 text rule does not- apply to it; what has to clear is the label on it, which is- --text-primary at 14.2:1 dark / 18.4:1 light. */- --segment-active-bg: #1b2130;- --segment-active-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);/* --- Filled neutral -------------------------------------------------------A row's own verb: louder than a subtle control, quieter than the one@@ -325,11 +294,9 @@Each hue has a text/dot value, a border tint and a surface tint. Statusdots are flat: no glow. */--success: #6ecf95;- --success-line: rgba(110, 207, 149, 0.3);--success-soft: rgba(110, 207, 149, 0.07);--warning: #e3a862;- --warning-line: rgba(227, 168, 98, 0.32);--warning-soft: rgba(227, 168, 98, 0.1);--danger: #ec7d86;@@ -337,36 +304,18 @@--danger-line-strong: rgba(236, 125, 134, 0.5);--danger-soft: #26171b; /* opaque: destructive button, error toast */--danger-soft-strong: #2e1b20;- --danger-text-soft: #c0a4ab; /* body copy inside a danger surface *//* --- Audio ---------------------------------------------------------------The second hue in the app. Audio is teal everywhere it appears: the trackbadge, the clip, the waveform. */--audio: #7cc3bc;- --audio-soft: rgba(124, 195, 188, 0.16);/* --- Timeline clips ---------------------------------------------------------clip-color comes from the MEDIA, not the palette, so a clip stays a- saturated block in both themes. What is mixed INTO it must still flip:- dark shades a clip down, light shades it up, or every clip on a white- timeline reads as a hole punched through the lane. */+ saturated block in both themes; these are the colours a clip falls back+ to when its media gives none. */--clip-video-default: #516fba;--clip-audio-default: #3d817c;- --clip-shade-top: #27303f;- --clip-shade-bottom: #11151d;- --clip-audio-shade-top: #1d3032;- --clip-audio-shade-bottom: #10191b;- --clip-edge: #ffffff; /* mixed into --clip-color for the border */- --clip-selected-edge: #bdcaff;- --clip-sheen: rgba(255, 255, 255, 0.08);- --clip-sheen-strong: rgba(255, 255, 255, 0.17);- --clip-stripe: rgba(255, 255, 255, 0.04);-- /* --- Composer / dock surfaces --------------------------------------------- Solid layers. The composer used to be a 135° blue gradient; a native app- puts its input on a plain layer and lets the accent button carry colour. */- --composer-bg: var(--layer);- --dock-bg: #12151d;/* --- Elevation ------------------------------------------------------------Fluent's two shadows, and nothing else. Cards have none (rule 8). */@@ -410,7 +359,7 @@take the WinUI light values (white control fills over a grey ground, blacksubtle fills). The accent darkens rather than brightens, because "morecontrast" points the other way here. Aliases (--layer, --glass, the focus- ring colour, --composer-bg) are not restated: they follow the names they+ ring colour) are not restated: they follow the names theypoint at.========================================================================== */@@ -422,7 +371,6 @@--panel: #ffffff;--panel-2: #f5f7fa;--panel-3: #e9ecf3;- --field-bg: #ffffff;--card: rgba(255, 255, 255, 0.7);--card-hover: rgba(249, 249, 249, 0.5);@@ -448,16 +396,10 @@--tooltip-stroke: rgba(0, 0, 0, 0.0578);--line: rgba(15, 23, 42, 0.1);- --line-strong: rgba(15, 23, 42, 0.18);- --line-hover: rgba(15, 23, 42, 0.32);--line-solid: #dde1ea;--wash-1: rgba(15, 23, 42, 0.035);--wash-2: rgba(15, 23, 42, 0.055);- --wash-3: rgba(15, 23, 42, 0.075);- --hairline-hi: rgba(255, 255, 255, 0.9);- --hatch: rgba(15, 23, 42, 0.045);- --hatch-strong: rgba(15, 23, 42, 0.1);--grid-line: rgba(15, 23, 42, 0.16);--scrim: rgba(0, 0, 0, 0.3); /* lighter than dark's: a white dialog needs less */@@ -486,10 +428,6 @@--button-primary-active: #1e40af; /* 8.7:1 */--button-primary-stroke: rgba(255, 255, 255, 0.08);--button-primary-stroke-bottom: rgba(0, 0, 0, 0.4);- --dock-send-border: #2d5bd7;-- --segment-active-bg: #ffffff;- --segment-active-shadow: 0 1px 2px rgba(15, 23, 42, 0.10);--button-fill-bg: #e2e6ee; /* --text-primary on it is 14.7:1 */--button-fill-hover: #d6dbe6;@@ -498,11 +436,9 @@--progress-fill: #4a5365; /* 6.0:1 on --track */--success: #0f7a45; /* 5.4:1 */- --success-line: rgba(15, 122, 69, 0.35);--success-soft: rgba(15, 122, 69, 0.08);--warning: #8a5a09; /* 5.9:1 */- --warning-line: rgba(138, 90, 9, 0.35);--warning-soft: rgba(138, 90, 9, 0.08);--danger: #c02c3a; /* 5.7:1 */@@ -510,24 +446,11 @@--danger-line-strong: rgba(192, 44, 58, 0.55);--danger-soft: #fdf1f2;--danger-soft-strong: #fbe4e6;- --danger-text-soft: #7a4a52; /* 6.3:1 on --danger-soft */- --audio: #10706a; /* 5.9:1 on --panel, 4.8:1 on --audio-soft */- --audio-soft: rgba(16, 112, 106, 0.14);+ --audio: #10706a; /* 5.9:1 on --panel */--clip-video-default: #516fba; /* the media's own hue: unchanged */--clip-audio-default: #3d817c;- --clip-shade-top: #ffffff;- --clip-shade-bottom: #d7deea;- --clip-audio-shade-top: #ffffff;- --clip-audio-shade-bottom: #d2e2df;- --clip-edge: #0f172a;- --clip-selected-edge: #16307d;- --clip-sheen: rgba(255, 255, 255, 0.55);- --clip-sheen-strong: rgba(255, 255, 255, 0.85);- --clip-stripe: rgba(15, 23, 42, 0.05);-- --dock-bg: #f5f7fa;--shadow: 0 32px 64px rgba(0, 0, 0, 0.1876), 0 2px 21px rgba(0, 0, 0, 0.1474);--shadow-sm: 0 8px 16px rgba(0, 0, 0, 0.14);@@ -550,7 +473,6 @@--panel: #ffffff;--panel-2: #f5f7fa;--panel-3: #e9ecf3;- --field-bg: #ffffff;--card: rgba(255, 255, 255, 0.7);--card-hover: rgba(249, 249, 249, 0.5);@@ -576,16 +498,10 @@--tooltip-stroke: rgba(0, 0, 0, 0.0578);--line: rgba(15, 23, 42, 0.1);- --line-strong: rgba(15, 23, 42, 0.18);- --line-hover: rgba(15, 23, 42, 0.32);--line-solid: #dde1ea;--wash-1: rgba(15, 23, 42, 0.035);--wash-2: rgba(15, 23, 42, 0.055);- --wash-3: rgba(15, 23, 42, 0.075);- --hairline-hi: rgba(255, 255, 255, 0.9);- --hatch: rgba(15, 23, 42, 0.045);- --hatch-strong: rgba(15, 23, 42, 0.1);--grid-line: rgba(15, 23, 42, 0.16);--scrim: rgba(0, 0, 0, 0.3); /* lighter than dark's: a white dialog needs less */@@ -614,10 +530,6 @@--button-primary-active: #1e40af; /* 8.7:1 */--button-primary-stroke: rgba(255, 255, 255, 0.08);--button-primary-stroke-bottom: rgba(0, 0, 0, 0.4);- --dock-send-border: #2d5bd7;-- --segment-active-bg: #ffffff;- --segment-active-shadow: 0 1px 2px rgba(15, 23, 42, 0.10);--button-fill-bg: #e2e6ee; /* --text-primary on it is 14.7:1 */--button-fill-hover: #d6dbe6;@@ -626,11 +538,9 @@--progress-fill: #4a5365; /* 6.0:1 on --track */--success: #0f7a45; /* 5.4:1 */- --success-line: rgba(15, 122, 69, 0.35);--success-soft: rgba(15, 122, 69, 0.08);--warning: #8a5a09; /* 5.9:1 */- --warning-line: rgba(138, 90, 9, 0.35);--warning-soft: rgba(138, 90, 9, 0.08);--danger: #c02c3a; /* 5.7:1 */@@ -638,24 +548,11 @@--danger-line-strong: rgba(192, 44, 58, 0.55);--danger-soft: #fdf1f2;--danger-soft-strong: #fbe4e6;- --danger-text-soft: #7a4a52; /* 6.3:1 on --danger-soft */- --audio: #10706a; /* 5.9:1 on --panel, 4.8:1 on --audio-soft */- --audio-soft: rgba(16, 112, 106, 0.14);+ --audio: #10706a; /* 5.9:1 on --panel */--clip-video-default: #516fba; /* the media's own hue: unchanged */--clip-audio-default: #3d817c;- --clip-shade-top: #ffffff;- --clip-shade-bottom: #d7deea;- --clip-audio-shade-top: #ffffff;- --clip-audio-shade-bottom: #d2e2df;- --clip-edge: #0f172a;- --clip-selected-edge: #16307d;- --clip-sheen: rgba(255, 255, 255, 0.55);- --clip-sheen-strong: rgba(255, 255, 255, 0.85);- --clip-stripe: rgba(15, 23, 42, 0.05);-- --dock-bg: #f5f7fa;--shadow: 0 32px 64px rgba(0, 0, 0, 0.1876), 0 2px 21px rgba(0, 0, 0, 0.1474);--shadow-sm: 0 8px 16px rgba(0, 0, 0, 0.14);