import type { GsapPercentageKeyframe } from "@hyperframes/core/gsap-parser"; import { EASE_LABELS } from "./gsapAnimationConstants"; import { EaseCurveSection } from "./EaseCurveSection"; export function KeyframeEaseList({ keyframes, globalEase, expandedPct, onToggle, onEaseCommit, }: { keyframes: GsapPercentageKeyframe[]; globalEase: string; expandedPct: number | null; onToggle: (pct: number | null) => void; onEaseCommit: (pct: number, ease: string) => void; }) { return (

Per-keyframe easing

{keyframes.map((kf, i) => { if (i === 0) return null; const segEase = kf.ease ?? globalEase; const isExpanded = expandedPct === kf.percentage; const label = `${keyframes[i - 1].percentage}% → ${kf.percentage}%`; const easeLabel = segEase.startsWith("custom(") ? "Custom" : (EASE_LABELS[segEase] ?? segEase); return (
{isExpanded && (
onEaseCommit(kf.percentage, ease)} />
)}
); })}
); }