aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/dupre.json
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-06-09 05:19:58 -0500
committerCraig Jennings <c@cjennings.net>2026-06-09 05:19:58 -0500
commitfcd55ee3fb3ab41059eeddd4d1eeabffc26502f2 (patch)
treea119d3f8a1bc1d88810bd79a6b31fb7087109130 /scripts/theme-studio/dupre.json
parent5d64b6b1ef04b54fc855c4a494def82c939671c1 (diff)
downloaddotemacs-fcd55ee3fb3ab41059eeddd4d1eeabffc26502f2.tar.gz
dotemacs-fcd55ee3fb3ab41059eeddd4d1eeabffc26502f2.zip
refactor(theme-studio): parameterize clear-unlocked, add effFg/effBg helpers
The three clear-unlocked functions (syntax, UI, package) repeated the same loop: walk the tier's rows, skip the locked ones, reset the rest. Pulled that into clearUnlockedRows(items, keyFn, resetFn) — keyFn returns a row's lock key or null to skip it outright (syntax bg and the default fg), resetFn does the tier-specific clearing. #locktest already pins clear-unlocked-skips-locked across all three tiers, so it guards this directly. The "unset foreground reads as the default fg, unset background as the ground" fallback was written inline at nine sites as ||MAP['p'] / ||MAP['bg']. Replaced them with effFg(v) and effBg(v). The syntax, UI, and package render paths now resolve their raw value through the same two helpers. Behavior-preserving: the rendered DOM (script stripped) is byte-identical to before, and every gate stays green.
Diffstat (limited to 'scripts/theme-studio/dupre.json')
0 files changed, 0 insertions, 0 deletions