import { memo, useState } from "react"; import type { GsapAnimation } from "@hyperframes/core/gsap-parser"; import { Film } from "../../icons/SystemIcons"; import { Section } from "./propertyPanelPrimitives"; import { ADD_METHODS, ADD_METHOD_LABELS, METHOD_TOOLTIPS } from "./gsapAnimationConstants"; import { AnimationCard } from "./AnimationCard"; import type { GsapAnimationEditCallbacks } from "./gsapAnimationCallbacks"; interface GsapAnimationSectionProps extends GsapAnimationEditCallbacks { animations: GsapAnimation[]; multipleTimelines?: boolean; unsupportedTimelinePattern?: boolean; onAddAnimation: (method: "to" | "from" | "set" | "fromTo") => void; } export const GsapAnimationSection = memo(function GsapAnimationSection({ animations, multipleTimelines, unsupportedTimelinePattern, onUpdateProperty, onUpdateMeta, onDeleteAnimation, onAddProperty, onRemoveProperty, onUpdateFromProperty, onAddFromProperty, onRemoveFromProperty, onAddAnimation, onLivePreview, onLivePreviewEnd, onSetArcPath, onUpdateArcSegment, onUpdateKeyframeEase, onUnroll, }: GsapAnimationSectionProps) { const [addMenuOpen, setAddMenuOpen] = useState(false); return (
}> {multipleTimelines && (

This file has multiple GSAP timelines. Animation editing is disabled to prevent data loss — consolidate into a single timeline to enable editing.

)} {unsupportedTimelinePattern && (

This composition uses a timeline assignment pattern (window.__timelines[...]) that the editor doesn't support. Use a variable declaration (const tl = gsap.timeline()) to enable editing.

)} {multipleTimelines || unsupportedTimelinePattern ? null : (
{animations.map((anim, index) => ( ))}
{addMenuOpen ? (
{ADD_METHODS.map((method) => ( ))}
) : ( )}
)}
); });