diff options
| author | Craig Jennings <c@cjennings.net> | 2026-06-09 05:11:51 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-06-09 05:11:51 -0500 |
| commit | 57a97c9798ddd81b416ee7da4576a81bfe2ad330 (patch) | |
| tree | b0230aa5ea0e3e681dee487e2ba1f0259ff743a4 /scripts/theme-studio/package-inventory.json | |
| parent | b57c63ef22b264694f04953f15ac312848eaf3c7 (diff) | |
| download | dotemacs-57a97c9798ddd81b416ee7da4576a81bfe2ad330.tar.gz dotemacs-57a97c9798ddd81b416ee7da4576a81bfe2ad330.zip | |
refactor(theme-studio): extract crHtml and mkStyleButtons table helpers
Three tables repeated two scaffolds. The contrast-cell readout (a WCAG ratio colored by its AA/AAA rating, plus the rating word) was copy-pasted at five sites; pulled the shared formatting into crHtml(r) and called it from the syntax, UI, and package cells (the picker readout renders differently and stays as is). The B/I/U/S style-button loop was duplicated near-verbatim in the UI and package tables; pulled it into mkStyleButtons(isOn, onToggle), which returns the button list so the caller still hands them to mkLockCell.
Left the syntax table's bold/italic buttons alone — two buttons, a different state model (the BOLD/ITALIC dicts), and an in-place refresh closure make it a poor fit for the same helper. Didn't introduce a shared row scaffold either; the three tables differ enough in columns and order that one would leak.
Behavior-preserving: the runtime-rendered tables are byte-identical to before (a DOM dump diff shows only the inline-script source changing, never a built tr/td/button/span). All hash gates, the node suite, and #locktest stay green.
Diffstat (limited to 'scripts/theme-studio/package-inventory.json')
0 files changed, 0 insertions, 0 deletions
