aboutsummaryrefslogtreecommitdiff
path: root/scripts/theme-studio/palette-actions.js
Commit message (Collapse)AuthorAgeFilesLines
* refactor(theme-studio): drop the too-similar-colors warning boxCraig Jennings8 days1-13/+3
| | | | The warning box under the palette wasn't useful there; the same ΔE info is reachable per-chip via the nearest-ΔE tooltip and inline contrast. Remove renderPaletteWarnings, the #palwarn element, its CSS, and the #deltatest gate. paletteWarnings still runs for the per-chip nearest distance.
* refactor(theme-studio): extract a groundPair() helperCraig Jennings8 days1-17/+17
| | | | The literal {bg:MAP['bg'],fg:MAP['p']} repeated 32 times across app.js, palette-actions.js, and the browser gates. Replace it with a groundPair() helper. Named groundPair, not ground, to avoid colliding with the local ground bindings destructured from columnsFromPalette. No behavior change; node tests and browser gates are the safety net.
* feat(theme-studio): show view-area > element usages on palette tile hoverCraig Jennings8 days1-3/+11
| | | | I added paletteUsages, which enumerates every place a color is assigned, grouped by view area (the view dropdown's names: color/code assignments, ui faces, each package app) and the element within it. renderPalette builds the per-area scopes once and appends the list to each used tile's hover title, under the existing name/hex/nearest-deltaE line. Node tests and a #usagetest gate cover it.
* feat(theme-studio): flag unused palette tiles and columnsCraig Jennings8 days1-3/+6
| | | | | | I added usedPaletteHexes, a reverse lookup over the syntax, ui, and package assignments (plus the ground endpoints) that resolves each reference to a hex. renderPalette outlines a tile whose color is referenced nowhere and outlines a whole column when none of its colors are used, so dead colors stand out for pruning before a theme ships. The check is biased safe: an unresolvable reference marks nothing, so a color that is actually used is never flagged. Node tests cover the lookup. A #unusedtest gate covers the tile and column flags.
* feat(theme-studio): add a palette display toggle for base colors vs full spansCraig Jennings8 days1-2/+10
| | | | I added an arrow control to the palette that collapses every column to its base color (right arrow) or expands to the full spans (down arrow), to conserve vertical space. Ground steps collapse too, leaving bg and fg. A #paltoggletest gate covers the collapse and the expand.
* fix(theme-studio): clamp generated palette spans to the bg/fg boundsCraig Jennings8 days1-1/+1
| | | | | | Spanning a color generated steps toward pure black and white, so a column could produce colors darker than bg or lighter than fg. I changed regenColumn to ramp the dark side toward the darker ground endpoint and the light side toward the lighter one, bounded by bg and fg. Pure black/white duplicates are still skipped, and callers that pass no ground fall back to the old black/white ramp. Node tests cover the bounded span and the no-ground fallback. The #counttest gate asserts the regenerated column stays within the bg/fg bounds.
* Update theme studio palette workflowCraig Jennings10 days1-10/+15
|
* Preview selected theme studio chip while pickingCraig Jennings10 days1-0/+8
|
* Change theme studio spans to endpoint divisionsCraig Jennings10 days1-6/+5
|
* Fix theme studio span endpoint tilesCraig Jennings10 days1-2/+5
|
* Fix theme studio fg endpoint selectionCraig Jennings10 days1-1/+6
|
* Refine theme studio tile name editingCraig Jennings10 days1-3/+9
|
* Make theme studio column delete saferCraig Jennings10 days1-2/+4
|
* Add theme studio column deleteCraig Jennings10 days1-3/+14
|
* Refactor theme studio palette testsCraig Jennings10 days1-0/+204