feat(site-builder): token-aware colour controls and Try a palette

Colour controls offer the site palette first, show the resolved colour for
var(--wsb-*) values with a token chip, and keep the stored reference.
autoTextColor resolves tokens. Site Design gains six one-click palettes.

Refs #44
This commit is contained in:
shadowdao committed 2026-10-07 11:38:17 -07:00
1 parent ce3db23506
commit dd7a50cf3d
11 files changed
+488 -101

No files matched your search

+55
View File
@@ -2232,3 +2232,58 @@ body {
color: var(--color-text-muted);
text-align: center;
}
/* #44 palettes */
.token-chip {
flex: none;
padding: 1px 6px;
font-size: 10px;
font-weight: 600;
line-height: 16px;
color: var(--color-accent);
background: var(--color-accent-subtle);
border: 1px solid var(--color-accent);
border-radius: 999px;
white-space: nowrap;
}
.palette-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 6px;
}
.palette-preview {
display: flex;
flex-direction: column;
align-items: center;
gap: 4px;
padding: 6px 4px;
background: var(--color-bg-elevated);
border: 1px solid var(--color-border);
border-radius: var(--radius-sm);
cursor: pointer;
color: var(--color-text-muted);
font-size: 10px;
transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.palette-preview:hover { border-color: var(--color-text-muted); }
.palette-preview.active {
border-color: var(--color-accent);
box-shadow: 0 0 0 2px var(--color-accent-subtle);
color: var(--color-text);
}
.palette-dots { display: flex; }
.palette-dot {
width: 14px;
height: 14px;
border-radius: 50%;
border: 1px solid var(--color-border);
margin-left: -3px;
}
.palette-dot:first-child { margin-left: 0; }