aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-selector/theme-selector.html
Commit message (Collapse)AuthorAgeFilesLines
* feat(theme-selector): show every ui face in the mock frameCraig Jennings31 hours1-10/+18
| | | | The live buffer preview was incomplete. It skipped highlight, isearch-fail, show-paren-mismatch, and vertical-border, and the fringe was painted its ground-colored default so it read as absent. The mock now renders all twenty ui faces: a highlighted line, a failing isearch in the echo area, a mismatched paren, and a vertical-border strip down the buffer's right edge. The fringe column is wider with a hairline edge so the gutter is locatable even at ground color, and the buffer runs a dozen lines to fit everything.
* feat(theme-selector): add package-face state and schema (tier-3 phase 1)Craig Jennings31 hours1-2/+23
| | | | | | I laid the tier-3 foundation: an APPS registry (org starter for now) and a PKGMAP holding {fg,bg,bold,italic,inherit,source} per face. Pure helpers seed PKGMAP from APPS defaults, build the export per the state policy, and merge an import back in. Export gains a packages key when any package face is present, and import reads it while old JSON with no packages key still loads cleanly onto the seeded defaults. No UI yet — that's phase 3. A #selftest harness, guarded by the URL hash so it never shows in normal use, runs seed to export to import and checks the round-trip, old-JSON merge, and inherit/source survival. Headless Chrome reports PASS, which is how I verified the schema end-to-end against the real emitted code rather than a copy.
* fix(theme-selector): stop accidental duplicate colors when editing a valueCraig Jennings37 hours1-8/+16
| | | | Editing a color's value could create a new color instead of updating it. Enter in the hex or name field now applies to the selected color rather than adding, and Add color refuses a name that already exists with a noticeable inline notice, so re-saving an existing color can't silently spawn a duplicate. Picking from the native swatch focuses the hex field so Enter applies right after, and both add and update report what happened in the same notice line.
* feat(theme-selector): click a preview token to flash its assignment rowCraig Jennings38 hours1-15/+24
| | | | | | I added the reverse lookup. Clicking a token in the code sample flashes the matching code/color assignment row and scrolls it into view; clicking an element in the mock frame flashes its ui-faces row, or the assignment row when it's a code token. Each token carries its category and each mock element its face as a data attribute, so the lookup survives sorting, reassignment, and palette edits. Going color-first can't tell you which category owns a shared color, since operator, function, and punctuation all read as silver. Clicking the token answers it directly.
* feat(theme-selector): edit palette colors in place, taller mock frameCraig Jennings38 hours1-15/+29
| | | | | | I made palette colors editable. Click a chip and its hex and name load into the editor and the chip is selected. "Update selected" rewrites that entry and remaps every syntax and ui assignment from the old hex to the new, so nudging a color no longer means redoing the assignments that used it. "Add color" still appends a fresh one. The ui-faces mock frame now stretches to the height of its face table, with the buffer filling and the mode-line pinned to the bottom like a real window. I also renamed "interface faces" to "ui faces."
* feat(theme-selector): add a live mock Emacs frame for the interface facesCraig Jennings38 hours1-2/+50
| | | | | | I split the interface-faces row into the face table on the left and a mock Emacs buffer on the right. The mock paints the faces in context: line numbers and fringe, a current line with hl-line and the current-line number, a region selection, an isearch match, a lazy-highlight, a show-paren match, a block cursor, active and inactive mode-lines, and a minibuffer prompt with an echo line for link, error, warning, and success. It rebuilds whenever a syntax or interface color changes, so it always reflects the current theme. The face table told you each color. The mock shows what they look like together in a real buffer.
* feat(theme-selector): two-column layout, contrast ratings, taller samplesCraig Jennings38 hours1-36/+59
| | | | | | | | I restructured the page into ordered rows. The top row splits palette on the left and save / load theme on the right. The next row, "code/color assignments," puts the assignment table on the left and a single code sample on the right, picked by a language dropdown and recolored live from the assignments. The last row is the interface faces. I added a contrast column to the assignment table: each color's WCAG ratio on the current background plus an AAA / AA / FAIL rating, recomputed live and re-rated when the background changes. I also replaced the six-language scroll with the one-language picker, lengthened every sample to roughly the height of the assignment table, and renamed the title suffix to "theme."
* feat(theme-selector): add browser-based theme design toolCraig Jennings39 hours1-0/+160
A self-contained tool for building Emacs color themes by eye. generate.py emits one HTML page with six languages of tree-sitter-tokenized code, a category-to-color assignment table, a UI-faces table, and an editable palette. Reassign colors from the palette, toggle weight and slant per category, set foreground and background per UI face, then export a theme.json a later build step turns into theme files. The export carries the name, palette, syntax assignments, bold and italic sets, and a ui object of per-face foreground and background. The theme name is both the json name field and the download filename. samples.py holds the language samples and the default color map. theme-selector.html is the generated output. The json-to-theme converter is the next piece, and the part worth TDD.