Add per-layer LED preview for composite color strip sources

When a target uses a composite CSS source, the LED preview now shows
individual layer strips below the blended composite result. Backend
stores per-layer color snapshots and sends an extended binary wire
format; frontend renders separate canvases with hover labels.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-11 17:51:35 +03:00
parent f6f428515a
commit 2a73b92d4a
4 changed files with 140 additions and 17 deletions

View File

@@ -935,3 +935,47 @@ ul.section-tip li {
.led-preview-zones:hover .led-preview-zone-label {
opacity: 1;
}
/* Per-layer LED preview (composite sources) */
.led-preview-layers {
display: flex;
flex-direction: column;
gap: 2px;
}
.led-preview-layer {
position: relative;
}
.led-preview-layer-canvas {
display: block;
width: 100%;
height: 14px;
border-radius: 2px;
image-rendering: pixelated;
background: #111;
}
.led-preview-layer-composite .led-preview-layer-canvas {
height: 24px;
border-radius: 3px;
}
.led-preview-layer-label {
position: absolute;
left: 4px;
top: 50%;
transform: translateY(-50%);
font-size: 0.6rem;
font-family: var(--font-mono, monospace);
color: #fff;
text-shadow: 0 0 3px rgba(0,0,0,0.9), 0 0 6px rgba(0,0,0,0.6);
pointer-events: none;
opacity: 0;
transition: opacity 0.15s;
white-space: nowrap;
}
.led-preview-layers:hover .led-preview-layer-label {
opacity: 1;
}