@motion.page/sdk 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -56,6 +56,7 @@ export declare class Animation {
56
56
  private _startCaptured;
57
57
  private _fitSetupFn;
58
58
  private _pendingFitSetup;
59
+ private _fitCleanupFn;
59
60
  private _unregisterCallback;
60
61
  /**
61
62
  * Initialize the animation
@@ -154,6 +155,11 @@ export declare class Animation {
154
155
  * copy (_pendingFitSetup) that is consumed by captureStartValues().
155
156
  */
156
157
  setPendingFitSetup(fn: (pool: typeof PropTweenPool) => void): void;
158
+ /**
159
+ * Register a cleanup function that resets inline styles written by a Fit animation.
160
+ * Called during resetForReplay() so chained fits start from a clean slate on replay.
161
+ */
162
+ setFitCleanup(fn: () => void): void;
157
163
  /**
158
164
  * Reset for timeline replay
159
165
  * Resets callback state for clean replay but KEEPS captured start values
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import type { HoverConfig, ClickConfig, ScrollConfig, MouseMoveConfig, GestureConfig, CursorConfig, PageExitConfig, TargetInput, AnimationConfig, TimelineConfig, RepeatConfig } from '../types';
13
13
  import { Animation } from './Animation';
14
+ import { AnimationBuilder } from './AnimationBuilder';
14
15
  export declare class Timeline {
15
16
  /** Monotonic counter for generating unique each-mode instance names */
16
17
  private static _eachCounter;
@@ -72,6 +73,7 @@ export declare class Timeline {
72
73
  private _transitionsDisabled;
73
74
  private _savedWillChange;
74
75
  private _willChangeApplied;
76
+ private _splitParentOverrides;
75
77
  constructor(name?: string, config?: TimelineConfig);
76
78
  /**
77
79
  * Get timeline duration (single cycle)
@@ -135,7 +137,10 @@ export declare class Timeline {
135
137
  */
136
138
  call(callback: (...args: unknown[]) => void, params?: unknown[], position?: string | number): this;
137
139
  /**
138
- * Get the first animation's target element for trigger inference
140
+ * Get the first animation's target element for trigger inference.
141
+ * When text splitting is active, returns the original pre-split container
142
+ * element instead of the split char/word fragments, so the scroll trigger
143
+ * is anchored to the full element rather than a tiny character span.
139
144
  * Note: Returns only DOM Elements, not plain objects
140
145
  */
141
146
  private _getFirstAnimationTarget;
@@ -352,4 +357,10 @@ export declare class Timeline {
352
357
  * @internal
353
358
  */
354
359
  getFirstChildAnimation(): Animation | null;
360
+ /**
361
+ * Get first child builder (for split-aware trigger target resolution).
362
+ * When text splitting is active, the builder holds original pre-split targets.
363
+ * @internal
364
+ */
365
+ getFirstChildBuilder(): AnimationBuilder | null;
355
366
  }
@@ -102,6 +102,7 @@ export declare const steps: {
102
102
  };
103
103
  /**
104
104
  * Get an easing function by string name
105
+ * Supports both simple names ("back.out") and parameterized ("back.out(1.4)")
105
106
  * @param name Easing name (case insensitive)
106
107
  * @returns Easing function, or power1.out if not found
107
108
  */