Vervangt rood/paars door tokens per variant en modus, voegt ModeToggle en icoon-knop VariantToggle toe, VariantRenderer met lazy E-chunk, dither-overgang (uit bij minder beweging), theme-init.js tegen themaflits en tests. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
25 lines
669 B
TypeScript
25 lines
669 B
TypeScript
import { usePrefersReducedMotion } from '../../shared/hooks/usePrefersReducedMotion';
|
|
import { useTheme } from '../../theme/ThemeProvider';
|
|
|
|
/**
|
|
* Pixel-dither overlay of the time-travel transition (BR-U1-6). Renders nothing while idle and
|
|
* nothing at all under prefers-reduced-motion (BR-U1-9).
|
|
*/
|
|
export function TransitionOverlay() {
|
|
const { transition } = useTheme();
|
|
const reducedMotion = usePrefersReducedMotion();
|
|
|
|
if (reducedMotion || transition.phase === 'idle') {
|
|
return null;
|
|
}
|
|
|
|
return (
|
|
<div
|
|
className="tt-overlay"
|
|
data-phase={transition.phase}
|
|
data-testid="transition-overlay"
|
|
aria-hidden="true"
|
|
/>
|
|
);
|
|
}
|