aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/previews.js
Commit message (Collapse)AuthorAgeFilesLines
* feat(theme-studio): previews render the chosen face heightCraig Jennings36 hours1-1/+1
| | | | | | heightCssValue maps a face's height to CSS from its stored kind: a relative multiplier renders as em, an absolute 1/10pt value as true pt, with legacy objects falling back to integer/fractional inference. uiCss feeds it to the mock editor, so the mode-line, mode-line-inactive, and line-number bars visibly thicken with an absolute height while the buffer text stays put; paintUI scales the UI row's sample text; the package-preview span builder swaps its em-only sizing for the same kind-aware value. faceCss now accepts a unit-carrying string for fontSize alongside the existing em number.
* feat(theme-studio): wire the ansi-color scene, closing its dangling preview keyCraig Jennings45 hours1-0/+29
| | | | ansi-color carried a bespoke spec and a full seed palette but its renderer was never written, so it silently fell back to the generic face list. Added renderAnsiColorPreview — a compilation/shell buffer exercising all 16 SGR palette faces, the faces eat and vterm color faces inherit from — and registered it. Last generic app in the ecosystem-coverage scope.
* feat(theme-studio): scenes for pinned ghostel and all-the-iconsCraig Jennings45 hours1-0/+66
| | | | ghostel (the terminal behind the agent buffers) gets an eat-style scene through its own 16 ANSI color faces plus the default surface and the two fake-cursor faces; all-the-icons a dired listing where each file's leading marker carries its color face across the 8 hues, their light/dark variants, and the -alt accents. Both are pinned not-loaded apps whose only visibility is the studio preview, so they carry the highest realism bar. Face names are literal, not constructed, to satisfy the coverage gate.
* feat(theme-studio): scenes for tmr, wttrin, alert, org-superstar, ↵Craig Jennings45 hours1-0/+51
| | | | | | nerd-icons-completion tmr shows the list view and tmr-tabulated-view with every column face; wttrin the weather buffer with staleness header, key hints, and the stale modeline lighter; alert one line per severity; org-superstar the bullet swap across levels plus list items; nerd-icons-completion folder icons in the dir face. Phase 4 of the preview run — all 13 small-scene apps now sit in the face-coverage gate.
* feat(theme-studio): scenes for indent-guides, yasnippet, prescient, ↵Craig Jennings45 hours1-0/+46
| | | | | | flyspell-correct highlight-indent-guides shows both methods (character glyphs, column bands) plus the responsive top/stack variants at a marked point; yasnippet a mid-expansion snippet with the active field and the debug overlay; prescient primary/secondary match highlights; flyspell-correct the word under correction with its menu. All four join the face-coverage gate.
* feat(theme-studio): scenes for emms, org-roam, hl-todo, symbol-overlayCraig Jennings46 hours1-0/+63
| | | | emms shows its three UIs (browser tree, playlist, metaplaylist); org-roam the backlinks buffer plus the dailies calendar mark; hl-todo comment keywords and the flymake diagnostic; symbol-overlay all eight pin faces on one defun plus the at-point default. All four join the face-coverage gate.
* feat(theme-studio): minibuffer-stack scenes on one shared sessionCraig Jennings46 hours1-0/+101
| | | | One C-x b consult-buffer scene drawn jointly by vertico, marginalia, consult, embark, and orderless; each app's preview shows the shared session with its own faces at work, then extends it with the states only it owns (vertico multiline, marginalia's full annotation catalog, consult line/grep/async, embark act + collect, orderless component cycling). All five join the face-coverage gate, so every one of their 72 faces appears verbatim in the renderers.
* feat(theme-studio): web-mode scene covering all 81 faces + HTML sampleCraig Jennings46 hours1-0/+47
| | | | The web-mode preview is one mixed document: markup with every tag/attr variant, an inline CSS part, a generic template block (engine-agnostic on purpose), and a script part carrying a JSON island, JSX depths, nested template literals, SQL-in-a-string, a PHP preprocessor island, and JSDoc annotations. The realism gate now covers it, so all 81 faces are exercised. SAMPLES gains an HTML language, which also enriches the syntax and auto-dim previews.
* feat(theme-studio): realistic scenes for company, transient, and friendsCraig Jennings46 hours1-0/+92
| | | | Five daily-driver apps leave the generic face-name list: company (a completion popup with every row variant, inline ghost preview, tooltip search, and the echo frontend), company-box (the icons variant), transient (a magit-commit-style panel exercising every key class), magit-section (status-buffer headings with child counts and the highlighted section), and rainbow-delimiters (buffer-honest nesting depths 1-9 plus the cycle past 9 and both error faces). A new test gates realism: every face of each covered app must appear verbatim in its renderer, so a scene can't silently skip faces.
* feat(theme-studio): register the ai-term agent-color facesCraig Jennings2 days1-0/+13
| | | | The nine ai-term faces (the bypass-banner accent plus one per Claude Code /color name) join the studio as a bespoke app, seeded with their dupre hues. The preview mirrors what they paint: the banner line and a mock input box per session color. Tuning one here recolors live agents on their next redraw.
* feat(theme-studio): register nov-reading structural faces and color the previewCraig Jennings4 days1-3/+12
| | | | The nov reading view app gains six faces: a heading and link accent for each of the sepia, dark, and light palettes, seeded to match the module defaults. The book-page preview now draws each page's title in its palette's heading face and an inline phrase in its link face, iterating only the base palette faces so the structural faces color a page rather than getting blank pages of their own.
* feat(theme-studio): render nov-reading preview as a book pageCraig Jennings5 days1-0/+23
| | | | The nov-reading app fell back to the generic preview (face names in their own colors), which doesn't show what a palette looks like. I added a renderer that draws a real book page per palette: a mock page of Hawthorne's "Dr. Heidegger's Experiment" in sepia, dark, and light, with a small-caps byline, a drop cap, and justified serif prose. Each page takes its background and foreground from its palette face, so tuning a palette repaints its page.
* feat(theme-studio): rebuild the dirvish preview as a realistic two-paneCraig Jennings7 days1-12/+53
| | | | The preview was a flat catalog dumping every face on labeled lines. It's now a believable two-pane dirvish: an active directory listing (the real nerd-icon glyph and color per file type, dir-entry counts, file sizes, the hl-line on the selected row, a dimmed backup) beside an ls-l preview of the selected dir. Faces that don't fit a calm listing (vc, git, subtree, media, proc, narrow, emerge) moved to a labeled extras strip below, so all 38 dirvish faces stay covered. Glyphs and colors mirror what nerd-icons actually emits per type.
* refactor(term): finish ghostel retirement (phase 5)Craig Jennings8 days1-9/+1
| | | | Remove the dead ghostel app from theme-studio: the GHOSTEL_FACES/SEED data, the registry row, the renderGhostelPreview previewer, and the package_seed test, then regenerate the tool. ansi-color stays since eat inherits it. Rename testutil-ghostel-buffers to testutil-terminal-buffers and drop make-fake-ghostel-buffer; the toggle-filter test now uses the eat fixture, since agents are eat. Fix the comments that still called the agent buffers ghostel (they're eat now) in eat-config and the ai-term and auto-dim test docstrings. I also package-deleted the unused ghostel ELPA package. Full suite green; the remaining ghostel mentions are accurate migration history.
* feat(theme-studio): make the EAT preview blocks representativeCraig Jennings9 days1-17/+41
| | | | Expand each command's output to realistic length. The eza listing now shows a full directory of nine entries, git status shows staged, unstaged, deleted, and untracked files, git log shows nine commits with a merge graph, and make test shows seven results plus a failure detail and a totals line. One-line results read as toy output; this looks like a real terminal.
* feat(theme-studio): richer EAT preview with realistic terminal activityCraig Jennings9 days1-11/+30
| | | | Replace the thin EAT preview with four realistic blocks above a reference key: an eza --color listing (the widest dircolors palette), git status, git log --oneline --decorate, and a make test run. Together they exercise all 16 ANSI colors in context plus the bold, faint, and prompt-annotation faces. The palette swatch, attribute, and annotation rows sit below as a key. All 24 exposed EAT faces now appear in the preview.
* feat(theme-studio): expose EAT terminal faces with a previewCraig Jennings9 days1-0/+12
| | | | Add EAT as a theme-studio app so its faces become editable in the studio: the 16 named ANSI palette faces, the SGR attribute faces (bold, faint, italic, slow/fast blink), and the three shell-prompt annotation faces. renderEatPreview draws a sample terminal with the palette rows, colored ls output, and the prompt annotations, so editing a face updates the preview live. No seed colors are set, so the faces sit at their own defaults until themed, consistent with the vanilla pass. Mirrors the existing ghostel terminal app.
* feat(theme-studio): bind dashboard preview list items to dashboard-items-faceCraig Jennings9 days1-11/+11
| | | | The dashboard preview rendered the project/bookmark/recent rows as plain text, so editing dashboard-items-face didn't recolor them. Wrap those rows in dashboard-items-face so the preview reflects the face. It inherits widget-button (unspecified) while unset, so the rows stay bare until the face is themed -- this only makes the preview responsive. Completes the dashboard preview's face coverage.
* feat(theme-studio): nerd-icons gallery as a hue-ordered icon gridCraig Jennings10 days1-11/+28
| | | | | | | | | | The nerd-icons pane is now a grid: one row per color face, the rows ordered by hue so families cluster, distinct icons (deduped within a color) drawn in their color with the icon's nerd-font name beneath. A "preview:" dropdown above the grid picks the glyph size in points, with Left/Right arrows to step it. Single-pane apps show it disabled, naming the preview. This replaces the v1 legend in the pane, whose data is still captured for round-trip. build-nerd-icons-legend.el is now a library. A cj/nerd-icons-write-legend entry point requires nerd-icons only at write time, so the capture logic loads and unit-tests without it. It dedupes icons by name within a face, computes each face's native hue, and orders the groups by hue. Writing the test surfaced a latent bug: face-hsl used (cadr (assoc t spec)), which grabs the first keyword instead of the plist. It only worked because the real faces fall through to the face-foreground branch. I fixed it to a correct t-clause parse. Coverage: 7 ERT capture tests (dedupe, hue order, lightness tiebreak, name sort, skip rules), 4 Python validator edges, and browser gates for the grid and the size dropdown. Locate stays color-level: clicking a color flashes its icons, and clicking an icon flashes its color row. Icons aren't individually editable, so there's nothing per-icon to select.
* fix(theme-studio): render nerd-icon glyphs in previews instead of tofuCraig Jennings10 days1-5/+22
| | | | | | | | The legend, dashboard, and package previews drew nerd-icon glyphs as empty boxes. The font-family never reached them: PREVIEW_FONT was spliced into inline style="..." attributes with a double-quoted family name, so the inner quote closed the attribute early and the font was silently dropped. Dropping the quotes fixes it. A no-space family name needs none. I embedded the glyph font directly: Symbols Nerd Font Mono, encoded with fontTools (woff2_compress output is rejected by headed Chrome and Firefox), inlined as a data: URI under the unique family name ThemeStudioNerd so it resolves to the embed rather than a system-installed copy of the same name. The page is self-contained and renders on any clone. I added a #fonttest gate that parses previewLines output and asserts the resolved font-family plus glyph coverage, plus a make font target that re-encodes the woff2 with fontTools.
* feat(theme-studio): bespoke nerd-icons filetype-legend preview (phase 2)Craig Jennings10 days1-0/+11
| | | | | | Register nerd-icons as a bespoke app whenever its captured legend is valid: the 34 color faces stay editable rows, and the legend rides APPS['nerd-icons'].legend. A new renderNerdIconsPreview draws each curated filetype's glyph in its mapped face's effective color, read through the same registry the other previews use, so recoloring a face repaints every row mapped to it. When the legend is absent the generic inventory app stands in. The #nerdiconstest browser gate covers the wiring, the dir-row owner, and the recolor-repaint. Claude-Session: https://claude.ai/code/session_01BqrdWUo9GcznYX2pZr76gZ
* feat(theme-studio): locate preview elements by hover and clickCraig Jennings11 days1-1/+21
| | | | | | | | Hovering a data-face preview element shows its section, face, and effective value in the preview-label info line, and the element's title carries the full record: effective fg/bg plus a per-attribute source note (direct, inherited-from-X, default, or cleared-rendering-as-default). Clicking an on-pane element scrolls to and flashes its assignment row. Off-pane and cross-surface elements stay hover-only. A single owner-qualified registry keyed by {owner, face} backs both data-face surfaces, package and UI, so the same face name under two owners never collides. The pure helpers in app-core.js take all state as arguments and return data. The one stateful adapter, previewSpan, lives in previews.js and emits the escaped markup. os() stays a package-owner wrapper over previewSpan, and a unified locateClick dispatcher replaces the per-surface click branches. Covered by test-locate.mjs and four new browser gates. Full harness green.
* refactor(theme-studio): extract per-package previews into previews.jsCraig Jennings2026-06-191-0/+463
The ~28 renderXxxPreview functions plus ofs/os/previewLines were ~460 lines of bespoke sample content sitting in the middle of the controller. I moved them to a new previews.js, spliced into the page through a PREVIEWS_J token the same way the other inlined libs are, and left the PACKAGE_PREVIEWS registry and dispatcher in app.js. app.js drops from 1233 to 759 lines, and the sample data now lives apart from the table/control machinery.