From 7e7b871fe4f8daff724c3df37feb5572464532c1 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Mon, 15 Jun 2026 19:19:38 -0500 Subject: feat(theme-studio): flag unused palette tiles and columns I added usedPaletteHexes, a reverse lookup over the syntax, ui, and package assignments (plus the ground endpoints) that resolves each reference to a hex. renderPalette outlines a tile whose color is referenced nowhere and outlines a whole column when none of its colors are used, so dead colors stand out for pruning before a theme ships. The check is biased safe: an unresolvable reference marks nothing, so a color that is actually used is never flagged. Node tests cover the lookup. A #unusedtest gate covers the tile and column flags. --- scripts/theme-studio/styles.css | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts/theme-studio/styles.css') diff --git a/scripts/theme-studio/styles.css b/scripts/theme-studio/styles.css index 39f219843..fba40ac80 100644 --- a/scripts/theme-studio/styles.css +++ b/scripts/theme-studio/styles.css @@ -47,6 +47,8 @@ .cat{color:#b4b1a2} .ex{font-size:17px} .crerr{display:inline-block;margin-left:8px;padding:0 4px;border-radius:3px;background:#2b130e;color:#cb6b4d;border:1px solid #7b3324;font:9pt monospace;vertical-align:middle} .paltoggle{align-self:flex-start;width:22px;height:22px;padding:0;border:1px solid #3a3a3a;border-radius:4px;background:#1f1c19;color:#e8bd30;font:12px monospace;line-height:1;cursor:pointer;margin-right:6px} + .pchip.unused{outline:2px dashed #cb6b4d;outline-offset:-2px} + .fstrip.unused-col{outline:1px dashed #cb6b4d;outline-offset:2px;border-radius:8px} .sbtn{width:17px;height:15px;border:1px solid #3a3a3a;border-radius:3px;background:#eaeaea;color:#111;cursor:pointer;font-size:13px;line-height:1;margin-right:2px;padding:0} .sbtn.on{background:#0d0b0a;color:#cdced1;border-color:#8a9496} .pals{display:flex;flex-direction:row;flex-wrap:wrap;gap:10px;align-items:flex-start} -- cgit v1.2.3