import { G as GsapAnimation, P as ParsedGsap, A as ArcPathConfig, a as ArcPathSegment } from './gsapSerialize-DQW1kZ2G.js'; export { n as GsapKeyframeFormat, b as GsapKeyframesData, c as GsapMethod, d as GsapPercentageKeyframe, j as getAnimationsForElementId, k as gsapAnimationsToKeyframes, l as keyframesToGsapAnimations, s as serializeGsapAnimations, v as validateCompositionGsap } from './gsapSerialize-DQW1kZ2G.js'; export { PROPERTY_GROUPS, PropertyGroupName, SUPPORTED_EASES, SUPPORTED_PROPS, classifyPropertyGroup, classifyTweenPropertyGroup } from './gsapConstants.js'; export { SPRING_PRESETS, SpringPreset, generateSpringEaseData } from './springEase.js'; import './types-ewozML_N.js'; declare function parseGsapScript(script: string): ParsedGsap; declare function updateAnimationInScript(script: string, animationId: string, updates: Partial & { easeEach?: string; resetKeyframeEases?: boolean; }): string; declare function shiftPositionsInScript(script: string, targetSelector: string, delta: number): string; declare function scalePositionsInScript(script: string, targetSelector: string, oldStart: number, oldDuration: number, newStart: number, newDuration: number): string; declare function addAnimationToScript(script: string, animation: Omit): { script: string; id: string; }; declare function addAnimationWithKeyframesToScript(script: string, targetSelector: string, position: number, duration: number, keyframes: Array<{ percentage: number; properties: Record; ease?: string; auto?: boolean; }>, ease?: string, easeEach?: string): { script: string; id: string; }; declare function removeAnimationFromScript(script: string, animationId: string): string; /** * Recast twin of {@link dedupePositionWritesInScript} (acorn). Enforce "exactly * one position write per element": keep `keepId` (or the LAST position write in * source order if stale), remove every OTHER pure-position write * (`propertyGroup === "position"` — tl.to/from/fromTo flat-or-keyframed, tl.set, * standalone gsap.set, incl. degenerate duration:0 tweens). Non-position writes * for the selector are left untouched. */ declare function dedupePositionWritesInScript(script: string, selector: string, keepId?: string): string; /** True for a `tl.set(...)` this module emitted to hold a keyframe before its tween. * The Studio filters these out so they never appear as user keyframes/diamonds. */ declare function isStudioHoldSet(anim: GsapAnimation): boolean; /** * Keep a `tl.set(selector, {x,y}, 0)` "hold" in front of every position-keyframed * tween that starts after t=0, so the element holds its first keyframe's position * BEFORE the tween plays instead of snapping to its CSS base (the universal NLE * "hold before first keyframe" behavior). The set is tagged with `data: "hf-hold"` * so this pass owns it: every call wipes the prior holds and recomputes from the * current keyframes, keeping them in sync as keyframes are added/moved/deleted. * * Idempotent. Only position props (x/y/xPercent/yPercent) are held — opacity/scale * keep their authored pre-tween behavior. A tween already starting at 0 needs no * hold (no gap before it). */ declare function syncPositionHoldsBeforeKeyframes(script: string): string; interface SplitAnimationsOptions { originalId: string; newId: string; splitTime: number; elementStart: number; elementDuration: number; } interface SplitAnimationsResult { script: string; /** Non-ID-selector animations that the engine cannot safely retarget. */ skippedSelectors: string[]; } declare function splitAnimationsInScript(script: string, opts: SplitAnimationsOptions): SplitAnimationsResult; /** * Insert a keyframe at the given percentage in an existing percentage-keyframes * object. If the percentage already exists, its value is replaced. */ declare function addKeyframeToScript(script: string, animationId: string, percentage: number, properties: Record, ease?: string, backfillDefaults?: Record): string; /** * Remove a keyframe at the given percentage. If fewer than 2 keyframes remain * after removal, collapse the keyframes object to a flat tween using the * remaining keyframe's properties. */ declare function removeKeyframeFromScript(script: string, animationId: string, percentage: number): string; /** * Retime a keyframe: move the keyframe at `fromPercentage` to `toPercentage`, * PRESERVING its properties and per-keyframe ease (the Studio "Move to Playhead" * gesture). Re-sorts keyframes by percentage. No-op when the animation/keyframe * isn't found, the tween has no object-form keyframes, the move resolves onto the * same keyframe, or the destination is occupied. Acorn twin: moveKeyframeInScript. */ declare function moveKeyframeInScript(script: string, animationId: string, fromPercentage: number, toPercentage: number): string; /** * Resize a keyframed tween's window (boundary drag-to-retime): set the tween's * `position` + `duration` and RE-KEY each existing keyframe to its new percentage * via `pctRemap` (each `{ from, to }` matches an existing keyframe by its current * tween-% and re-keys it to `to`). * * Re-keys the percentage KEY in place, leaving every value node (so `_auto` + * per-keyframe `ease` survive), the keyframes-object `easeEach`, and the OUTER * tween `ease` untouched. Acorn twin: resizeKeyframedTweenInScript. */ declare function resizeKeyframedTweenInScript(script: string, animationId: string, newPosition: number, newDuration: number, pctRemap: ReadonlyArray<{ from: number; to: number; }>): string; /** * Replace the properties (and optionally ease) at an existing keyframe percentage. */ declare function updateKeyframeInScript(script: string, animationId: string, percentage: number, properties: Record, ease?: string): string; /** * Convert a flat tween (to/from/fromTo) to percentage-keyframes format. * `resolvedFromValues` supplies the "from" state for `to()` tweens or * the "to" state for `from()` tweens (the values the DOM would resolve to). */ declare function convertToKeyframesInScript(script: string, animationId: string, resolvedFromValues?: Record, setDuration?: number): string; /** * Remove all keyframes from a tween, collapsing to a flat tween with the * last keyframe's properties. */ declare function removeAllKeyframesFromScript(script: string, animationId: string): string; /** * Replace a dynamic `keyframes: ` with a static percentage-keyframes object. * Called when the user first edits a dynamically-generated keyframe in the studio. */ declare function materializeKeyframesInScript(script: string, animationId: string, keyframes: Array<{ percentage: number; properties: Record; ease?: string; }>, easeEach?: string, resolvedSelector?: string): string; declare function setArcPathInScript(script: string, animationId: string, config: ArcPathConfig): string; declare function updateArcSegmentInScript(script: string, animationId: string, segmentIndex: number, update: Partial): string; /** * Move a single motionPath waypoint (anchor) to a new position. The waypoint * list is normalized to anchors for both straight and cubic paths, so * `pointIndex` matches the node order the studio overlay renders; cubic control * points are preserved. No-op when the animation/arc is missing or the index is * out of range. */ declare function updateMotionPathPointInScript(script: string, animationId: string, pointIndex: number, point: { x: number; y: number; }): string; /** * Insert a waypoint at `index` (between existing anchors), splitting the segment * it lands on so the new neighbor inherits its curviness. Non-cubic paths only. * No-op for missing animation/arc, out-of-range index, or cubic paths. */ declare function addMotionPathPointInScript(script: string, animationId: string, index: number, point: { x: number; y: number; }): string; /** * Remove the waypoint at `index`. Refuses to drop below two anchors (a path * can't have fewer). Non-cubic paths only. No-op for missing animation/arc, * out-of-range index, cubic paths, or a 2-point path. */ declare function removeMotionPathPointInScript(script: string, animationId: string, index: number): string; /** * Author a fresh 2-anchor motionPath tween on a target element: a straight line * from the element's home (0,0) to `point`, gentle ease, ready for waypoint * editing. Mirrors `addAnimationWithKeyframesToScript`. */ declare function addMotionPathToScript(script: string, targetSelector: string, position: number, duration: number, point: { x: number; y: number; }, ease?: string): { script: string; id: string | null; }; declare function removeArcPathFromScript(script: string, animationId: string): string; /** * Split a multi-group tween into separate per-group tweens. Each resulting * tween contains only properties belonging to one property group (position, * scale, rotation, visual, etc.). `transformOrigin` stays with the group that * has the most properties. If the tween already belongs to a single group, * returns the script unchanged with the original ID. */ declare function splitIntoPropertyGroups(script: string, animationId: string): { script: string; ids: string[]; }; /** * Replace a dynamic loop that generates multiple tween calls with individual * static `tl.to()` calls — one per element. Finds the loop containing the * animation and replaces the entire loop body with unrolled static calls. */ declare function unrollDynamicAnimations(script: string, animationId: string, elements: Array<{ selector: string; keyframes: Array<{ percentage: number; properties: Record; }>; easeEach?: string; }>): string; export { ArcPathConfig, ArcPathSegment, GsapAnimation, ParsedGsap, type SplitAnimationsOptions, type SplitAnimationsResult, addAnimationToScript, addAnimationWithKeyframesToScript, addKeyframeToScript, addMotionPathPointInScript, addMotionPathToScript, convertToKeyframesInScript, dedupePositionWritesInScript, isStudioHoldSet, materializeKeyframesInScript, moveKeyframeInScript, parseGsapScript, removeAllKeyframesFromScript, removeAnimationFromScript, removeArcPathFromScript, removeKeyframeFromScript, removeMotionPathPointInScript, resizeKeyframedTweenInScript, scalePositionsInScript, setArcPathInScript, shiftPositionsInScript, splitAnimationsInScript, splitIntoPropertyGroups, syncPositionHoldsBeforeKeyframes, unrollDynamicAnimations, updateAnimationInScript, updateArcSegmentInScript, updateKeyframeInScript, updateMotionPathPointInScript };