import { editabilityForProvenance, type GsapProvenance } from "@hyperframes/core/gsap-parser-acorn"; /** * Notice shown for computed tweens: helper/loop tweens offer an "unroll to * edit" action; runtime-computed values point to the Code tab. Literal tweens * render nothing. */ export function ComputedTweenNotice({ provenance, onUnroll, }: { provenance?: GsapProvenance; onUnroll?: () => void; }) { const editability = editabilityForProvenance(provenance); if (editability === "direct") return null; if (editability === "source") { return (
Computed value — edit it in the Code tab.
); } const source = provenance?.fn ? `${provenance.fn}()` : "a loop"; return (
Generated by {source} — not directly editable. {onUnroll && ( )}
); }