feat(chart): layers panel + selection-first fib

- Adds Layers drawer (visible/lock/opacity) and effective opacity wiring.
- Implements selection-first overlay: click selects, drag moves selected, Ctrl-drag edits B, Space-drag always pans.
- Routes pointer events via capture and adds Fib opacity support.
- Updates .gitignore to keep secrets/local scratch out of git.
This commit is contained in:
u1
2026-01-06 23:26:51 +01:00
parent 6107c4e0ef
commit a12c86f1f8
9 changed files with 859 additions and 65 deletions

View File

@@ -689,6 +689,216 @@ a:hover {
white-space: nowrap;
}
.chartLayersBackdrop {
position: absolute;
inset: 0;
background: transparent;
z-index: 60;
opacity: 0;
pointer-events: none;
transition: opacity 140ms ease;
}
.chartLayersBackdrop--open {
opacity: 1;
pointer-events: auto;
}
.chartLayersPanel {
position: absolute;
top: 8px;
bottom: 8px;
left: 8px;
width: 420px;
max-width: calc(100% - 16px);
background: rgba(17, 19, 28, 0.92);
border: 1px solid rgba(255, 255, 255, 0.10);
border-radius: 14px;
box-shadow: 0 18px 60px rgba(0, 0, 0, 0.65);
backdrop-filter: blur(14px);
overflow: hidden;
z-index: 70;
display: flex;
flex-direction: column;
opacity: 0;
transform: translateX(-10px);
pointer-events: none;
transition: opacity 140ms ease, transform 140ms ease;
}
.chartLayersPanel--open {
opacity: 1;
transform: translateX(0);
pointer-events: auto;
}
.chartLayersPanel__head {
padding: 10px 12px;
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
display: flex;
align-items: center;
justify-content: space-between;
gap: 10px;
}
.chartLayersPanel__title {
font-weight: 900;
letter-spacing: 0.02em;
}
.chartLayersPanel__close {
width: 30px;
height: 30px;
border-radius: 10px;
border: 1px solid rgba(255, 255, 255, 0.10);
background: transparent;
color: rgba(230, 233, 239, 0.85);
cursor: pointer;
}
.chartLayersPanel__close:hover {
border-color: rgba(255, 255, 255, 0.18);
background: rgba(255, 255, 255, 0.04);
color: rgba(230, 233, 239, 0.92);
}
.chartLayersTable {
flex: 1;
min-height: 0;
overflow: auto;
}
.chartLayersRow {
display: grid;
grid-template-columns: 34px 34px minmax(0, 1fr) 150px 40px;
gap: 8px;
align-items: center;
padding: 8px 10px;
}
.chartLayersRow--head {
position: sticky;
top: 0;
z-index: 1;
background: rgba(17, 19, 28, 0.92);
color: rgba(230, 233, 239, 0.60);
font-size: 11px;
font-weight: 850;
letter-spacing: 0.08em;
text-transform: uppercase;
border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.chartLayersRow--layer {
background: rgba(255, 255, 255, 0.03);
border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.chartLayersRow--object {
cursor: pointer;
padding-left: 18px;
}
.chartLayersRow--object:hover {
background: rgba(255, 255, 255, 0.05);
}
.chartLayersRow--selected {
background: rgba(168, 85, 247, 0.12);
}
.chartLayersCell {
display: flex;
align-items: center;
min-width: 0;
}
.chartLayersCell--icon {
justify-content: center;
}
.chartLayersCell--name {
min-width: 0;
}
.chartLayersCell--opacity {
min-width: 0;
}
.chartLayersCell--actions {
justify-content: flex-end;
}
.layersBtn {
width: 28px;
height: 28px;
border-radius: 10px;
border: 1px solid rgba(255, 255, 255, 0.10);
background: rgba(0, 0, 0, 0.10);
color: rgba(230, 233, 239, 0.88);
display: inline-flex;
align-items: center;
justify-content: center;
cursor: pointer;
}
.layersBtn:hover {
border-color: rgba(255, 255, 255, 0.18);
background: rgba(255, 255, 255, 0.04);
}
.layersBtn--active {
background: rgba(255, 255, 255, 0.08);
border-color: rgba(255, 255, 255, 0.22);
color: var(--text);
}
.layersBtn:disabled {
cursor: not-allowed;
opacity: 0.55;
}
.layersName {
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.layersName--layer {
font-weight: 900;
}
.layersName--object {
font-weight: 800;
color: rgba(230, 233, 239, 0.92);
}
.layersName__meta {
opacity: 0.65;
font-weight: 800;
margin-left: 6px;
}
.layersOpacity {
width: 100%;
display: grid;
grid-template-columns: minmax(0, 1fr) 44px;
gap: 8px;
align-items: center;
}
.layersOpacity__range {
width: 100%;
}
.layersOpacity__pct {
font-size: 12px;
color: rgba(230, 233, 239, 0.70);
text-align: right;
font-variant-numeric: tabular-nums;
}
.chartCard__chart {
min-height: 0;
height: 100%;