feat(panel): add sub-hour trend bucketing and smooth range switches

- Enforce strict window bounds on usage trends without 6-hour out-of-window padding, subdividing sub-2h intraday spans into 1m, 5m, and 15m slots with stepMs cache invalidation and minute export labels
- Morph SVG trend curves and areas continuously across varying slot counts via De Casteljau cubic Bezier knot subdivision, synchronized with peak pill glides, axis fades, and heatmap stage transitions
- Coordinate consumption range, tab, and sort switches with opacity crossfades and @starting-style progress bar width transitions while respecting prefers-reduced-motion
This commit is contained in:
fish
2026-11-24 04:41:26 +09:00
parent 49fe0b3457
commit 7e6d11d7aa
12 changed files with 1591 additions and 199 deletions
+108 -1
View File
@@ -387,6 +387,111 @@
z-index: 2;
}
.cons-view-stage .progress-seg {
flex: 0 0 auto;
transition:
background-color 80ms ease,
width 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
.cons-view-stage .progress-fill {
transition: width 240ms cubic-bezier(0.22, 1, 0.36, 1);
}
@starting-style {
.cons-view-stage.is-ready .progress-seg,
.cons-view-stage.is-ready .progress-fill {
width: 0%;
}
}
.trend-peak-pill.is-ready {
transition:
left 240ms cubic-bezier(0.22, 1, 0.36, 1),
opacity 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes anim-cons-axis-fade {
from {
opacity: 0.3;
}
to {
opacity: 1;
}
}
@keyframes anim-cons-stage-in {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
@keyframes anim-cons-content-switch {
from {
opacity: 0.52;
}
to {
opacity: 1;
}
}
@keyframes anim-cons-bar-grow {
from {
transform: scaleX(0);
}
to {
transform: scaleX(1);
}
}
.trend-x-axis.is-switching,
.trend-v-grid.is-switching {
animation: anim-cons-axis-fade 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.trend-plot-stage.is-stage-entering,
.trend-heatmap-stage.is-stage-entering,
.cons-item-list.is-tab-entering,
.cons-ranking-empty.is-tab-entering {
animation: anim-cons-stage-in 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.cons-unified-matrix.is-range-switching,
.cons-item-list.is-range-switching,
.cons-ranking-empty.is-range-switching {
animation: anim-cons-content-switch 220ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.cons-item-list.is-tab-entering .progress-track,
.cons-item-list.is-bars-revealing .progress-track {
transform-origin: left center;
animation: anim-cons-bar-grow 240ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
@media (prefers-reduced-motion: reduce) {
.cons-view-stage .progress-seg,
.cons-view-stage .progress-fill,
.trend-peak-pill.is-ready,
.trend-hm-cell {
transition: none !important;
}
.trend-x-axis.is-switching,
.trend-v-grid.is-switching,
.trend-plot-stage.is-stage-entering,
.trend-heatmap-stage.is-stage-entering,
.cons-item-list.is-tab-entering,
.cons-ranking-empty.is-tab-entering,
.cons-unified-matrix.is-range-switching,
.cons-item-list.is-range-switching,
.cons-ranking-empty.is-range-switching,
.cons-item-list.is-bars-revealing .progress-track {
animation: none !important;
}
}
.trend-tooltip {
position: absolute;
top: 2px;
@@ -664,7 +769,9 @@
border-radius: 2px;
box-sizing: border-box;
cursor: pointer;
transition: transform var(--dur-instant) var(--ease-fast);
transition:
background-color 180ms ease-out,
transform var(--dur-instant) var(--ease-fast);
}
.trend-hm-cell.is-pad {