feat(animation): implement subtle and high-performance scroll reveal animations across public pages

- Enhance Reveal component with HTMLAttributes passthrough and inline style merging
- Integrate Reveal into Home, Members, Publications, Lectures, and Standardization sections
- Apply lightweight stagger delay (max 360ms cap) without breaking grid stretch (h-full)
- Preserve ProjectPageView CSS Scroll Snap direct-child contract via as='article' in-place replacement
- Integrate Counter component for metrics and category badges
- Support prefers-reduced-motion media query and noscript fallback
- All 12 quality gates passed clean with unanimous PASS from all reviewers
This commit is contained in:
2026-08-26 00:11:24 +09:00
parent b0bce3be8e
commit f3972cac27
9 changed files with 611 additions and 492 deletions
+10 -3
View File
@@ -1,6 +1,6 @@
"use client";
import { useEffect, useRef, type ElementType, type ReactNode } from "react";
import { useEffect, useRef, type ElementType, type ReactNode, type HTMLAttributes } from "react";
type Variant = "up" | "left" | "right" | "scale";
@@ -18,7 +18,9 @@ export default function Reveal({
delay = 0,
as: Tag = "div",
className = "",
}: {
style,
...rest
}: HTMLAttributes<HTMLElement> & {
children: ReactNode;
variant?: Variant;
delay?: number;
@@ -47,12 +49,17 @@ export default function Reveal({
return () => io.disconnect();
}, []);
const combinedStyle = delay
? { ...style, transitionDelay: `${delay}ms` }
: style;
return (
<Tag
ref={ref}
data-variant={variant}
style={delay ? { transitionDelay: `${delay}ms` } : undefined}
style={combinedStyle}
className={`reveal ${className}`}
{...rest}
>
{children}
</Tag>