aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/previews.js
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-25 16:24:39 -0400
committerCraig Jennings <c@cjennings.net>2026-06-25 16:24:39 -0400
commit7b9c178eea1637120057c6b55b69c1cfd3ed9e94 (patch)
tree528dc12ab54a0e90a3a92ccc57b584c15a6f5607 /scripts/theme-studio/previews.js
parent91c909ae60cfafc336b1d35f8e3a6b511dc5c4a5 (diff)
downloaddotemacs-7b9c178eea1637120057c6b55b69c1cfd3ed9e94.tar.gz
dotemacs-7b9c178eea1637120057c6b55b69c1cfd3ed9e94.zip
feat(theme-studio): expose EAT terminal faces with a preview
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.
Diffstat (limited to 'scripts/theme-studio/previews.js')
-rw-r--r--scripts/theme-studio/previews.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/theme-studio/previews.js b/scripts/theme-studio/previews.js
index a39a47d9..afba6b0c 100644
--- a/scripts/theme-studio/previews.js
+++ b/scripts/theme-studio/previews.js
@@ -293,6 +293,18 @@ function renderGitGutterPreview(){const a='git-gutter',L=[];
L.push(os(a,'git-gutter:deleted','_')+os(a,'git-gutter:separator','|')+' (deleted lines marker)');
L.push(os(a,'git-gutter:unchanged',' ')+os(a,'git-gutter:separator','|')+' '+os(a,'git-gutter:unchanged','unchanged line of code'));
return previewLines(L);}
+function renderEatPreview(){const a='eat',L=[];
+ L.push(os(a,'eat-shell-prompt-annotation-success','✔')+' ~/projects $ ls --color');
+ L.push(os(a,'eat-term-color-blue','build/')+' '+os(a,'eat-term-color-blue','src/')+' '+os(a,'eat-term-color-green','run.sh')+' README.md');
+ L.push('');
+ L.push('palette '+os(a,'eat-term-color-black','■')+os(a,'eat-term-color-red','■')+os(a,'eat-term-color-green','■')+os(a,'eat-term-color-yellow','■')+os(a,'eat-term-color-blue','■')+os(a,'eat-term-color-magenta','■')+os(a,'eat-term-color-cyan','■')+os(a,'eat-term-color-white','■')+' normal');
+ L.push(' '+os(a,'eat-term-color-bright-black','■')+os(a,'eat-term-color-bright-red','■')+os(a,'eat-term-color-bright-green','■')+os(a,'eat-term-color-bright-yellow','■')+os(a,'eat-term-color-bright-blue','■')+os(a,'eat-term-color-bright-magenta','■')+os(a,'eat-term-color-bright-cyan','■')+os(a,'eat-term-color-bright-white','■')+' bright');
+ L.push('');
+ L.push(os(a,'eat-term-bold','bold')+' '+os(a,'eat-term-faint','faint')+' '+os(a,'eat-term-italic','italic')+' '+os(a,'eat-term-slow-blink','slow-blink')+' '+os(a,'eat-term-fast-blink','fast-blink'));
+ L.push('');
+ L.push(os(a,'eat-shell-prompt-annotation-running','…')+' running tests');
+ L.push(os(a,'eat-shell-prompt-annotation-failure','✘')+' build failed');
+ return previewLines(L);}
function renderFlycheckPreview(){const a='flycheck',L=[];
L.push(os(a,'flycheck-fringe-error','E')+os(a,'flycheck-fringe-warning','W')+os(a,'flycheck-fringe-info','I')+' x = '+os(a,'flycheck-error','undefined_name')+'('+os(a,'flycheck-warning','unused_arg')+') '+os(a,'flycheck-info','# note'));
L.push(' '+os(a,'flycheck-error-delimiter','[')+os(a,'flycheck-delimited-error','err')+os(a,'flycheck-error-delimiter',']'));