motion-dom 13.1.1 → 13.3.0

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.
Files changed (93) hide show
  1. package/dist/cjs/index.js +6178 -5360
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/es/animation/AsyncMotionValueAnimation.mjs +41 -38
  4. package/dist/es/animation/AsyncMotionValueAnimation.mjs.map +1 -1
  5. package/dist/es/animation/FollowAnimation.mjs +152 -0
  6. package/dist/es/animation/FollowAnimation.mjs.map +1 -0
  7. package/dist/es/animation/JSAnimation.mjs +7 -11
  8. package/dist/es/animation/JSAnimation.mjs.map +1 -1
  9. package/dist/es/animation/NativeAnimation.mjs +2 -0
  10. package/dist/es/animation/NativeAnimation.mjs.map +1 -1
  11. package/dist/es/animation/NativeAnimationWrapper.mjs +7 -0
  12. package/dist/es/animation/NativeAnimationWrapper.mjs.map +1 -1
  13. package/dist/es/animation/animate/effects.mjs +105 -0
  14. package/dist/es/animation/animate/effects.mjs.map +1 -0
  15. package/dist/es/animation/animate/element.mjs +80 -0
  16. package/dist/es/animation/animate/element.mjs.map +1 -0
  17. package/dist/es/animation/animate/single-value.mjs.map +1 -1
  18. package/dist/es/animation/generators/inertia.mjs +8 -6
  19. package/dist/es/animation/generators/inertia.mjs.map +1 -1
  20. package/dist/es/animation/generators/keyframes.mjs +25 -1
  21. package/dist/es/animation/generators/keyframes.mjs.map +1 -1
  22. package/dist/es/animation/generators/spring.mjs +119 -86
  23. package/dist/es/animation/generators/spring.mjs.map +1 -1
  24. package/dist/es/animation/generators/utils/calc-duration.mjs +5 -4
  25. package/dist/es/animation/generators/utils/calc-duration.mjs.map +1 -1
  26. package/dist/es/animation/generators/utils/velocity.mjs +13 -1
  27. package/dist/es/animation/generators/utils/velocity.mjs.map +1 -1
  28. package/dist/es/animation/interfaces/motion-value.mjs.map +1 -1
  29. package/dist/es/animation/interfaces/visual-element-target.mjs.map +1 -1
  30. package/dist/es/animation/keyframes/DOMKeyframesResolver.mjs +12 -6
  31. package/dist/es/animation/keyframes/DOMKeyframesResolver.mjs.map +1 -1
  32. package/dist/es/animation/keyframes/KeyframesResolver.mjs +38 -7
  33. package/dist/es/animation/keyframes/KeyframesResolver.mjs.map +1 -1
  34. package/dist/es/animation/keyframes/utils/make-none-animatable.mjs +8 -2
  35. package/dist/es/animation/keyframes/utils/make-none-animatable.mjs.map +1 -1
  36. package/dist/es/animation/keyframes/utils/unit-conversion.mjs +45 -19
  37. package/dist/es/animation/keyframes/utils/unit-conversion.mjs.map +1 -1
  38. package/dist/es/animation/utils/WithPromise.mjs +12 -5
  39. package/dist/es/animation/utils/WithPromise.mjs.map +1 -1
  40. package/dist/es/animation/utils/arc.mjs +2 -1
  41. package/dist/es/animation/utils/arc.mjs.map +1 -1
  42. package/dist/es/animation/utils/can-animate.mjs +3 -1
  43. package/dist/es/animation/utils/can-animate.mjs.map +1 -1
  44. package/dist/es/animation/utils/notify-inspector.mjs +56 -0
  45. package/dist/es/animation/utils/notify-inspector.mjs.map +1 -0
  46. package/dist/es/animation/waapi/supports/waapi.mjs +8 -1
  47. package/dist/es/animation/waapi/supports/waapi.mjs.map +1 -1
  48. package/dist/es/effects/MotionValueState.mjs +90 -26
  49. package/dist/es/effects/MotionValueState.mjs.map +1 -1
  50. package/dist/es/effects/attr/index.mjs +15 -9
  51. package/dist/es/effects/attr/index.mjs.map +1 -1
  52. package/dist/es/effects/prop/index.mjs +15 -2
  53. package/dist/es/effects/prop/index.mjs.map +1 -1
  54. package/dist/es/effects/style/index.mjs +52 -9
  55. package/dist/es/effects/style/index.mjs.map +1 -1
  56. package/dist/es/effects/style/transform.mjs +28 -25
  57. package/dist/es/effects/style/transform.mjs.map +1 -1
  58. package/dist/es/effects/svg/index.mjs +40 -7
  59. package/dist/es/effects/svg/index.mjs.map +1 -1
  60. package/dist/es/effects/utils/create-dom-effect.mjs +9 -1
  61. package/dist/es/effects/utils/create-dom-effect.mjs.map +1 -1
  62. package/dist/es/effects/utils/create-effect.mjs +8 -3
  63. package/dist/es/effects/utils/create-effect.mjs.map +1 -1
  64. package/dist/es/frameloop/render-step.mjs +5 -2
  65. package/dist/es/frameloop/render-step.mjs.map +1 -1
  66. package/dist/es/index.mjs +7 -3
  67. package/dist/es/index.mjs.map +1 -1
  68. package/dist/es/layout/LayoutAnimationBuilder.mjs +9 -1
  69. package/dist/es/layout/LayoutAnimationBuilder.mjs.map +1 -1
  70. package/dist/es/projection/node/create-projection-node.mjs +4 -1
  71. package/dist/es/projection/node/create-projection-node.mjs.map +1 -1
  72. package/dist/es/render/VisualElement.mjs +11 -2
  73. package/dist/es/render/VisualElement.mjs.map +1 -1
  74. package/dist/es/render/utils/is-controlling-variants.mjs +8 -2
  75. package/dist/es/render/utils/is-controlling-variants.mjs.map +1 -1
  76. package/dist/es/utils/mix/color.mjs +3 -2
  77. package/dist/es/utils/mix/color.mjs.map +1 -1
  78. package/dist/es/utils/mix/index.mjs +28 -0
  79. package/dist/es/utils/mix/index.mjs.map +1 -1
  80. package/dist/es/value/follow-value.mjs +33 -30
  81. package/dist/es/value/follow-value.mjs.map +1 -1
  82. package/dist/es/value/index.mjs +73 -29
  83. package/dist/es/value/index.mjs.map +1 -1
  84. package/dist/es/value/types/complex/index.mjs +17 -4
  85. package/dist/es/value/types/complex/index.mjs.map +1 -1
  86. package/dist/index.d.ts +307 -47
  87. package/dist/motion-dom.dev.js +6178 -5360
  88. package/dist/motion-dom.js +1 -1
  89. package/dist/size-rollup-motion-value.js +1 -1
  90. package/dist/size-rollup-motion-value.js.map +1 -1
  91. package/dist/size-rollup-style-effect.js +1 -1
  92. package/dist/size-rollup-style-effect.js.map +1 -1
  93. package/package.json +4 -4
package/dist/index.d.ts CHANGED
@@ -1822,16 +1822,35 @@ interface DriverControls {
1822
1822
  type Driver = (update: Update$1) => DriverControls;
1823
1823
 
1824
1824
  /**
1825
- * Temporary subset of VisualElement until VisualElement is
1826
- * moved to motion-dom
1825
+ * What the DOM keyframe resolver needs from the thing rendering a value:
1826
+ * a VisualElement, or an effect bound to a subject.
1827
1827
  */
1828
1828
  interface WithRender {
1829
+ /**
1830
+ * Write pending values to the subject so it can be measured.
1831
+ */
1829
1832
  render: () => void;
1833
+ /**
1834
+ * The subject's current value for `name`, as the origin of an
1835
+ * animation. Normalised by the resolver.
1836
+ */
1830
1837
  readValue: (name: string, keyframe: any) => any;
1831
- getValue: (name: string, defaultValue?: any) => any;
1838
+ /**
1839
+ * The motion value bound to `name`, if any.
1840
+ */
1841
+ getValue: (name: string) => MotionValue | undefined;
1832
1842
  current?: HTMLElement | SVGElement;
1833
1843
  measureViewportBox: () => Box;
1834
1844
  }
1845
+ /**
1846
+ * The owner of an animating value. Either a VisualElement or an
1847
+ * EffectSubject.
1848
+ */
1849
+ interface AnimationElement extends Omit<WithRender, "current">, Owner {
1850
+ KeyframeResolver?: typeof KeyframeResolver;
1851
+ shouldSkipAnimations?: boolean;
1852
+ shouldReduceMotion?: boolean | null;
1853
+ }
1835
1854
 
1836
1855
  type AnyResolvedKeyframe = string | number;
1837
1856
  interface ProgressTimeline {
@@ -1911,6 +1930,13 @@ interface AnimationPlaybackControls {
1911
1930
  type AnimationPlaybackControlsWithThen = AnimationPlaybackControls & {
1912
1931
  then: (onResolve: VoidFunction, onReject?: VoidFunction) => Promise<void>;
1913
1932
  };
1933
+ /**
1934
+ * The controls a `MotionValue` exposes for its current animation via
1935
+ * `value.animation`. Animations started by `animate()` implement the
1936
+ * full `AnimationPlaybackControls`; followers (`springValue`,
1937
+ * `followValue`) only implement these.
1938
+ */
1939
+ type MotionValueAnimation = Pick<AnimationPlaybackControlsWithThen, "state" | "stop" | "finished" | "then">;
1914
1940
  interface AnimationState<V> {
1915
1941
  value: V;
1916
1942
  done: boolean;
@@ -1919,6 +1945,7 @@ interface KeyframeGenerator<V> {
1919
1945
  calculatedDuration: null | number;
1920
1946
  next: (t: number) => AnimationState<V>;
1921
1947
  velocity?: (t: number) => number;
1948
+ retarget?: (keyframes: V[], velocity: number) => void;
1922
1949
  toString: () => string;
1923
1950
  }
1924
1951
  interface DOMValueAnimationOptions<V extends AnyResolvedKeyframe = number> extends ValueAnimationTransition<V> {
@@ -2470,7 +2497,13 @@ declare class MotionValue<V = any> {
2470
2497
  /**
2471
2498
  * A reference to the currently-controlling animation.
2472
2499
  */
2473
- animation?: AnimationPlaybackControlsWithThen;
2500
+ animation?: MotionValueAnimation;
2501
+ /**
2502
+ * The sole `change` subscriber. Most values have exactly one (an
2503
+ * effect or a follower), so it's stored and notified directly. A
2504
+ * SubscriptionManager is only created for a second subscriber.
2505
+ */
2506
+ private changeSubscriber?;
2474
2507
  /**
2475
2508
  * A list of MotionValues whose values are computed from this one.
2476
2509
  * This is a rough start to a proper signal-like dirtying system.
@@ -2541,6 +2574,12 @@ declare class MotionValue<V = any> {
2541
2574
  */
2542
2575
  private events;
2543
2576
  on<EventName extends keyof MotionValueEventCallbacks<V>>(eventName: EventName, callback: MotionValueEventCallbacks<V>[EventName]): VoidFunction;
2577
+ private onChangeSubscribe;
2578
+ /**
2579
+ * If we have no more change listeners by the start
2580
+ * of the next frame, stop active animations.
2581
+ */
2582
+ private stopIfUnobserved;
2544
2583
  clearListeners(): void;
2545
2584
  /**
2546
2585
  * Attaches a passive effect to the `MotionValue`.
@@ -2569,6 +2608,7 @@ declare class MotionValue<V = any> {
2569
2608
  */
2570
2609
  jump(v: V, endAnimation?: boolean): void;
2571
2610
  dirty(): void;
2611
+ private notifyChange;
2572
2612
  addDependent(dependent: MotionValue): void;
2573
2613
  removeDependent(dependent: MotionValue): void;
2574
2614
  updateAndNotify: (v: V) => void;
@@ -2640,7 +2680,7 @@ declare class KeyframeResolver<T extends AnyResolvedKeyframe = any> {
2640
2680
  finalKeyframe?: T;
2641
2681
  suspendedScrollY?: number;
2642
2682
  protected unresolvedKeyframes: UnresolvedKeyframes<AnyResolvedKeyframe>;
2643
- private motionValue?;
2683
+ protected motionValue?: MotionValue<T>;
2644
2684
  private onComplete;
2645
2685
  state: "pending" | "scheduled" | "complete";
2646
2686
  /**
@@ -2667,9 +2707,14 @@ declare class KeyframeResolver<T extends AnyResolvedKeyframe = any> {
2667
2707
  }
2668
2708
 
2669
2709
  declare class WithPromise {
2670
- protected _finished: Promise<void>;
2671
- resolve: VoidFunction;
2672
- constructor();
2710
+ /**
2711
+ * The promise and its resolver are only created when `finished` is
2712
+ * first read. Most animations are never awaited, so this saves a
2713
+ * Promise allocation per value animation.
2714
+ */
2715
+ private _finished?;
2716
+ private _resolve?;
2717
+ private isResolved;
2673
2718
  get finished(): Promise<void>;
2674
2719
  protected updateFinished(): void;
2675
2720
  protected notifyFinished(): void;
@@ -2681,7 +2726,10 @@ declare class WithPromise {
2681
2726
  then(onResolve: VoidFunction, onReject?: VoidFunction): Promise<void>;
2682
2727
  }
2683
2728
 
2684
- type OptionsWithoutKeyframes<T extends AnyResolvedKeyframe> = Omit<ValueAnimationOptions<T>, "keyframes">;
2729
+ type ResolvedOptions<T extends AnyResolvedKeyframe> = ValueAnimationOptions<T> & {
2730
+ startTime?: number;
2731
+ finalKeyframe?: T;
2732
+ };
2685
2733
  declare class AsyncMotionValueAnimation<T extends AnyResolvedKeyframe> extends WithPromise implements AnimationPlaybackControls {
2686
2734
  private createdAt;
2687
2735
  private resolvedAt;
@@ -2689,8 +2737,8 @@ declare class AsyncMotionValueAnimation<T extends AnyResolvedKeyframe> extends W
2689
2737
  private pendingTimeline;
2690
2738
  private keyframeResolver;
2691
2739
  private stopTimeline;
2692
- constructor({ autoplay, delay, type, repeat, repeatDelay, repeatType, keyframes, name, motionValue, element, ...options }: ValueAnimationOptions<T>);
2693
- onKeyframesResolved(keyframes: ResolvedKeyframes<T>, finalKeyframe: T, options: OptionsWithoutKeyframes<T>, sync: boolean): void;
2740
+ constructor(options: ValueAnimationOptions<T>);
2741
+ onKeyframesResolved(keyframes: ResolvedKeyframes<T>, finalKeyframe: T, options: ResolvedOptions<T>, sync: boolean): void;
2694
2742
  get finished(): Promise<any>;
2695
2743
  then(onResolve: VoidFunction, _onReject?: VoidFunction): Promise<void>;
2696
2744
  get animation(): AnimationPlaybackControls;
@@ -2984,7 +3032,7 @@ declare function makeAnimationInstant(options: Partial<{
2984
3032
 
2985
3033
  declare const animateMotionValue: <V extends AnyResolvedKeyframe>(name: string, value: MotionValue<V>, target: V | UnresolvedKeyframes<V>, transition?: ValueTransition & {
2986
3034
  elapsed?: number;
2987
- }, element?: VisualElement<any>, isHandoff?: boolean) => StartAnimation;
3035
+ }, element?: AnimationElement, isHandoff?: boolean) => StartAnimation;
2988
3036
 
2989
3037
  declare function animateVisualElement(visualElement: VisualElement, definition: AnimationDefinition, options?: VisualElementAnimationOptions): Promise<void>;
2990
3038
 
@@ -3062,7 +3110,7 @@ declare namespace spring {
3062
3110
  * to prevent infinite loops
3063
3111
  */
3064
3112
  declare const maxGeneratorDuration = 20000;
3065
- declare function calcGeneratorDuration(generator: KeyframeGenerator<unknown>): number;
3113
+ declare function calcGeneratorDuration<T>(generator: KeyframeGenerator<T>, timeStep?: number, maxDuration?: number, keyframes?: T[]): number;
3066
3114
 
3067
3115
  /**
3068
3116
  * Create a progress => progress easing function from a generator.
@@ -3083,6 +3131,7 @@ declare class DOMKeyframesResolver<T extends AnyResolvedKeyframe> extends Keyfra
3083
3131
  constructor(unresolvedKeyframes: UnresolvedKeyframes<AnyResolvedKeyframe>, onComplete: OnKeyframesResolved<T>, name?: string, motionValue?: MotionValue<T>, element?: WithRender);
3084
3132
  readKeyframes(): void;
3085
3133
  resolveNoneKeyframes(): void;
3134
+ private measure;
3086
3135
  measureInitialState(): void;
3087
3136
  measureEndState(): void;
3088
3137
  }
@@ -3131,25 +3180,242 @@ declare function applyGeneratorOptions({ type, ...options }: ValueTransition): V
3131
3180
  declare const generateLinearEasing: (easing: EasingFunction, duration: number, resolution?: number) => string;
3132
3181
 
3133
3182
  declare class MotionValueState {
3134
- latest: {
3135
- [name: string]: AnyResolvedKeyframe;
3136
- };
3183
+ private step;
3184
+ /**
3185
+ * Transform keys bound to this state, in `transformPropOrder`, and
3186
+ * the value bound to each. Lets the transform builder visit only
3187
+ * bound transforms, reading each value directly.
3188
+ */
3189
+ transformKeys?: string[];
3190
+ transformValues?: Record<string, MotionValue>;
3137
3191
  private values;
3138
- set(name: string, value: MotionValue, render?: VoidFunction, computed?: MotionValue, useDefaultValueType?: boolean): () => void;
3192
+ /**
3193
+ * Renders scheduled for the next flush, usually one or two (values
3194
+ * bound to the same computed render, e.g. `x` and `y` to `transform`,
3195
+ * share an entry). Tracked with a count rather than truncating the
3196
+ * array so no backing store is reallocated every frame. Kept per
3197
+ * state so pending writes can be flushed synchronously before the
3198
+ * subject is measured.
3199
+ */
3200
+ private pending;
3201
+ private numPending;
3202
+ /**
3203
+ * @param step - The frameloop step renders are scheduled in. Defaults
3204
+ * to `frame.render`. Effects that feed a render loop running in
3205
+ * `frame.render` (GPU scenes) should write in `frame.preRender`.
3206
+ */
3207
+ constructor(step?: Schedule);
3208
+ /**
3209
+ * @param render - Writes the value to the subject. Renders read the
3210
+ * motion value directly rather than a cached copy, so there is one
3211
+ * place a value lives.
3212
+ * @param computed - A value already in this state (e.g. `transform`)
3213
+ * whose render should run whenever `value` changes.
3214
+ */
3215
+ set(name: string, value: MotionValue, render?: VoidFunction, computed?: MotionValue): VoidFunction;
3139
3216
  get(name: string): MotionValue | undefined;
3217
+ /**
3218
+ * Detach every value from this state and return them, so another
3219
+ * renderer can take them over. The state stays cached by its effect,
3220
+ * so the bound transforms are reset too rather than leaking into
3221
+ * values bound later.
3222
+ */
3223
+ release(): Map<string, MotionValue<any>>;
3224
+ private schedule;
3225
+ private cancel;
3226
+ /**
3227
+ * Run the pending renders. Resetting the count first means a render
3228
+ * scheduled while flushing lands in the next frame, as with the
3229
+ * frameloop itself.
3230
+ */
3231
+ flush: () => void;
3140
3232
  }
3141
3233
 
3142
- declare const addAttrValue: (element: HTMLElement | SVGElement, state: MotionValueState, key: string, value: MotionValue) => () => void;
3143
- declare const attrEffect: (subject: ElementOrSelector, values: Record<string, MotionValue<any>>) => () => void;
3234
+ /**
3235
+ * Returns true if the effect knows how to write to `subject`.
3236
+ */
3237
+ type EffectTest<Subject extends object> = (subject: unknown) => subject is Subject;
3238
+ /**
3239
+ * Reads the current value of `key` from `subject`, used as the initial
3240
+ * keyframe when `animate()` creates a motion value for the subject.
3241
+ * Returns `undefined` when the value can't be read.
3242
+ *
3243
+ * `keyframes` is the target being animated to, so effects can match
3244
+ * the format of the initial value (for instance color vs numeric).
3245
+ */
3246
+ type EffectRead<Subject extends object> = (subject: Subject, key: string, keyframes?: UnresolvedValueKeyframe | UnresolvedValueKeyframe[]) => AnyResolvedKeyframe | undefined;
3247
+ interface EffectOptions<Subject extends object> {
3248
+ test?: EffectTest<Subject>;
3249
+ read?: EffectRead<Subject>;
3250
+ /**
3251
+ * Frameloop step writes are scheduled in. Defaults to `frame.render`.
3252
+ */
3253
+ step?: Schedule;
3254
+ }
3255
+ interface Effect<Subject extends object = object> extends EffectOptions<Subject> {
3256
+ (subject: Subject, values: Record<string, MotionValue>): VoidFunction;
3257
+ /**
3258
+ * Returns the motion value currently bound to `key` on `subject`, if any.
3259
+ */
3260
+ get(subject: Subject, key: string): MotionValue | undefined;
3261
+ /**
3262
+ * Write `subject`'s pending values now rather than in the next frame,
3263
+ * e.g. so it can be measured with a target applied.
3264
+ */
3265
+ flush(subject: Subject): void;
3266
+ /**
3267
+ * The state holding the motion values bound to `subject`, if any have
3268
+ * been, so they can be handed to another renderer.
3269
+ */
3270
+ state(subject: Subject): MotionValueState | undefined;
3271
+ }
3272
+ /**
3273
+ * An effect that can be registered with `animate.addEffect()`.
3274
+ */
3275
+ interface AnimateEffect<Subject extends object = object> extends Effect<Subject> {
3276
+ test: EffectTest<Subject>;
3277
+ read: EffectRead<Subject>;
3278
+ }
3279
+ type AddEffectValue<Subject extends object> = (subject: Subject, state: MotionValueState, key: string, value: MotionValue) => VoidFunction;
3280
+ declare function createEffect<Subject extends object>(addValue: AddEffectValue<Subject>, options: EffectOptions<Subject> & {
3281
+ test: EffectTest<Subject>;
3282
+ read: EffectRead<Subject>;
3283
+ }): AnimateEffect<Subject>;
3284
+ declare function createEffect<Subject extends object>(addValue: AddEffectValue<Subject>, options?: EffectOptions<Subject>): Effect<Subject>;
3285
+
3286
+ declare function addEffect(effect: AnimateEffect<any>): void;
3287
+ declare function removeEffect(effect: AnimateEffect<any>): void;
3288
+ declare function findEffect(subject: unknown): AnimateEffect | undefined;
3289
+ interface EffectKeyframes {
3290
+ [key: string]: UnresolvedValueKeyframe | UnresolvedValueKeyframe[] | Record<string, unknown> | undefined;
3291
+ transition?: Record<string, unknown>;
3292
+ transitionEnd?: Record<string, AnyResolvedKeyframe>;
3293
+ }
3294
+ /**
3295
+ * Effect subjects can expose any key, so per-key transition overrides
3296
+ * are keyed by arbitrary strings.
3297
+ */
3298
+ type EffectTransition = ValueTransition & {
3299
+ reduceMotion?: boolean;
3300
+ skipAnimations?: boolean;
3301
+ } & Record<string, unknown>;
3302
+ /**
3303
+ * Animate each key in `keyframes` on the motion value `getValue` returns
3304
+ * for it. `element` is what the keyframe resolver uses to read, render
3305
+ * and measure the subject when the effect defers resolution to it.
3306
+ */
3307
+ declare function animateValues(getValue: (key: string) => MotionValue, keyframes: EffectKeyframes, transition?: EffectTransition, element?: AnimationElement): AnimationPlaybackControlsWithThen[];
3308
+ /**
3309
+ * Animate the keys of `subject` via `effect`. Motion values are created on
3310
+ * first animation and bound to the subject through the effect for the
3311
+ * rest of its life.
3312
+ *
3313
+ * Without `element`, a new value is seeded synchronously from the first
3314
+ * keyframe or `effect.read()`. With it, the value starts undefined and the
3315
+ * keyframe resolver reads the subject (batched, with unit conversion by
3316
+ * measurement) via `element`.
3317
+ */
3318
+ declare function animateEffectSubject<Subject extends object>(effect: AnimateEffect<Subject>, subject: Subject, keyframes: EffectKeyframes, transition?: EffectTransition, element?: AnimationElement): AnimationPlaybackControlsWithThen[];
3144
3319
 
3145
- declare const propEffect: (subject: {
3146
- [key: string]: any;
3147
- }, values: Record<string, MotionValue<any>>) => VoidFunction;
3320
+ type ElementOrSelector = Element | Element[] | NodeListOf<Element> | string | null | undefined;
3321
+ interface WithQuerySelectorAll {
3322
+ querySelectorAll: Element["querySelectorAll"];
3323
+ }
3324
+ interface AnimationScope<T = any> {
3325
+ readonly current: T;
3326
+ animations: any[];
3327
+ }
3328
+ interface SelectorCache {
3329
+ [key: string]: NodeListOf<Element>;
3330
+ }
3331
+ declare function resolveElements(elementOrSelector: ElementOrSelector, scope?: AnimationScope, selectorCache?: SelectorCache): Element[];
3148
3332
 
3149
- declare const addStyleValue: (element: HTMLElement | SVGElement, state: MotionValueState, key: string, value: MotionValue) => () => void;
3150
- declare const styleEffect: (subject: ElementOrSelector, values: Record<string, MotionValue<any>>) => () => void;
3333
+ /**
3334
+ * The element overloads come last so generic inference sees the subject type.
3335
+ */
3336
+ interface SelectorEffect<T extends object> extends EffectOptions<T> {
3337
+ (subject: ElementOrSelector, values: Record<string, MotionValue>): VoidFunction;
3338
+ (subject: T, values: Record<string, MotionValue>): VoidFunction;
3339
+ get(subject: ElementOrSelector, key: string): MotionValue | undefined;
3340
+ get(subject: T, key: string): MotionValue | undefined;
3341
+ flush(subject: T): void;
3342
+ state(subject: T): MotionValueState | undefined;
3343
+ }
3344
+ interface SelectorAnimateEffect<T extends object> extends SelectorEffect<T> {
3345
+ test: EffectTest<T>;
3346
+ read: EffectRead<T>;
3347
+ }
3151
3348
 
3152
- declare const svgEffect: (subject: ElementOrSelector, values: Record<string, MotionValue<any>>) => () => void;
3349
+ declare const addStyleValue: (element: HTMLElement | SVGElement, state: MotionValueState, key: string, value: MotionValue) => VoidFunction;
3350
+ type StyleSubject = HTMLElement | SVGElement;
3351
+ /**
3352
+ * Reads the current value of a style from the element, as the initial
3353
+ * keyframe when `animate()` targets an element via this effect. Transforms
3354
+ * are parsed out of the computed matrix; everything else is the computed
3355
+ * style. Units aren't converted to match the target keyframes. A style
3356
+ * the browser can't report is 0, as a VisualElement reports it.
3357
+ */
3358
+ declare const readStyleValue: (element: StyleSubject, key: string) => string | number;
3359
+ /**
3360
+ * The per-element effect `animate()` binds through, so HTML values share
3361
+ * state with a direct `styleEffect()` call. The exported `styleEffect`
3362
+ * is this wrapped to also accept selectors.
3363
+ */
3364
+ declare const styleSubjectEffect: AnimateEffect<StyleSubject>;
3365
+ declare const styleEffect: SelectorAnimateEffect<StyleSubject>;
3366
+
3367
+ /**
3368
+ * Animate a DOM element's styles. HTML elements are bound through
3369
+ * styleEffect, SVG through svgEffect, and both are resolved with the DOM
3370
+ * keyframe resolver so reads are batched, units are converted by
3371
+ * measurement and eligible values run on WAAPI.
3372
+ *
3373
+ * Pass the element's VisualElement (a <motion.*> component or an
3374
+ * animateLayout() node) to animate its values instead, so the two keep
3375
+ * sharing values and a renderer.
3376
+ */
3377
+ declare function animateElement(element: StyleSubject, keyframes: EffectKeyframes, transition?: EffectTransition, visualElement?: VisualElement): AnimationPlaybackControlsWithThen[];
3378
+ /**
3379
+ * Hand the values styleEffect/svgEffect are rendering on `element`,
3380
+ * whether bound by animate() or directly, to a VisualElement that now
3381
+ * owns the element (e.g. created by animateLayout()), so a single
3382
+ * renderer drives them alongside its own values.
3383
+ */
3384
+ declare function handOffElementState(element: Element, visualElement: VisualElement): void;
3385
+
3386
+ /**
3387
+ * `name` is the attribute written when it differs from the key the value
3388
+ * is stored under, e.g. `attrX` -> `x`. Numbers take the attribute's
3389
+ * default unit (`x: 100` -> `"100px"`), as they do when key and name match.
3390
+ */
3391
+ declare const addAttrValue: (element: HTMLElement | SVGElement, state: MotionValueState, key: string, value: MotionValue, name?: string) => VoidFunction;
3392
+ declare const attrEffect: SelectorEffect<HTMLElement | SVGElement>;
3393
+
3394
+ interface PropSubject {
3395
+ [key: string]: any;
3396
+ }
3397
+ /**
3398
+ * Writes motion values to the properties of any object. This is
3399
+ * animate()'s fallback for subjects no registered effect claims.
3400
+ */
3401
+ declare const propEffect: AnimateEffect<PropSubject>;
3402
+
3403
+ declare const addSVGValue: (element: SVGElement, state: MotionValueState, key: string, value: MotionValue) => VoidFunction;
3404
+ /**
3405
+ * Reads the current value of `key` from an SVG element as the origin of
3406
+ * an animation, as the SVG VisualElement does: transforms start from
3407
+ * their defaults, the few CSS-only properties come from computed style
3408
+ * and everything else is read from the attribute, dash-cased
3409
+ * (`strokeWidth` -> `stroke-width`) or, failing that, as written
3410
+ * (`baseFrequency`).
3411
+ */
3412
+ declare const readSVGValue: (element: SVGElement, key: string) => any;
3413
+ /**
3414
+ * The per-element effect `animate()` binds through, so SVG values share
3415
+ * state with a direct `svgEffect()` call.
3416
+ */
3417
+ declare const svgSubjectEffect: AnimateEffect<SVGElement>;
3418
+ declare const svgEffect: SelectorAnimateEffect<SVGElement>;
3153
3419
 
3154
3420
  declare const frame: Batcher;
3155
3421
  declare const cancelFrame: (process: Process) => void;
@@ -3187,19 +3453,6 @@ declare function isDragActive(): boolean;
3187
3453
 
3188
3454
  declare function setDragLock(axis: boolean | "x" | "y" | "lockDirection"): (() => void) | null;
3189
3455
 
3190
- type ElementOrSelector = Element | Element[] | NodeListOf<Element> | string | null | undefined;
3191
- interface WithQuerySelectorAll {
3192
- querySelectorAll: Element["querySelectorAll"];
3193
- }
3194
- interface AnimationScope<T = any> {
3195
- readonly current: T;
3196
- animations: any[];
3197
- }
3198
- interface SelectorCache {
3199
- [key: string]: NodeListOf<Element>;
3200
- }
3201
- declare function resolveElements(elementOrSelector: ElementOrSelector, scope?: AnimationScope, selectorCache?: SelectorCache): Element[];
3202
-
3203
3456
  /**
3204
3457
  * Options for event listeners.
3205
3458
  *
@@ -3606,9 +3859,10 @@ declare function transform<T>(inputRange: number[], outputRange: T[], options?:
3606
3859
 
3607
3860
  /**
3608
3861
  * Options for useFollowValue hook, extending ValueAnimationTransition
3609
- * but excluding lifecycle callbacks that don't make sense for the hook pattern.
3862
+ * but excluding lifecycle callbacks that don't make sense for the hook pattern,
3863
+ * and repeat options, as a follower always heads for its latest value.
3610
3864
  */
3611
- type FollowValueOptions = Omit<ValueAnimationTransition, "onUpdate" | "onComplete" | "onPlay" | "onRepeat" | "onStop"> & {
3865
+ type FollowValueOptions = Omit<ValueAnimationTransition, "onUpdate" | "onComplete" | "onPlay" | "onRepeat" | "onStop" | "repeat" | "repeatType" | "repeatDelay"> & {
3612
3866
  /**
3613
3867
  * When true, the first change from a tracked `MotionValue` source
3614
3868
  * will jump to the new value instead of animating. Subsequent
@@ -3787,6 +4041,12 @@ interface ComplexValueInfo {
3787
4041
  indexes: ValueIndexes;
3788
4042
  types: Array<keyof ValueIndexes>;
3789
4043
  }
4044
+ /**
4045
+ * Whether analyseComplexValue(value) would find any values, without
4046
+ * tokenising the string. CSS variables are resolved before this is
4047
+ * used, so it's enough to look for a number or a color.
4048
+ */
4049
+ declare function hasComplexValues(value: AnyResolvedKeyframe): boolean;
3790
4050
  declare function analyseComplexValue(value: AnyResolvedKeyframe): ComplexValueInfo;
3791
4051
  declare function parseComplexValue(v: AnyResolvedKeyframe): ComplexValues;
3792
4052
  declare function createTransformer(source: AnyResolvedKeyframe): (v: (string | number | Color)[]) => string;
@@ -3801,7 +4061,7 @@ declare const complex: {
3801
4061
  /**
3802
4062
  * A list of value types commonly used for dimensions
3803
4063
  */
3804
- declare const dimensionValueTypes: ({
4064
+ declare const dimensionValueTypes: (ValueType | {
3805
4065
  test: (v: number) => boolean;
3806
4066
  parse: typeof parseFloat;
3807
4067
  transform: (v: number) => number;
@@ -3809,11 +4069,11 @@ declare const dimensionValueTypes: ({
3809
4069
  test: (v: AnyResolvedKeyframe) => boolean;
3810
4070
  parse: typeof parseFloat;
3811
4071
  transform: (v: string | number) => string;
3812
- } | ValueType)[];
4072
+ })[];
3813
4073
  /**
3814
4074
  * Tests a dimensional value against the list of dimension ValueTypes
3815
4075
  */
3816
- declare const findDimensionValueType: (v: any) => {
4076
+ declare const findDimensionValueType: (v: any) => ValueType | {
3817
4077
  test: (v: number) => boolean;
3818
4078
  parse: typeof parseFloat;
3819
4079
  transform: (v: number) => number;
@@ -3821,7 +4081,7 @@ declare const findDimensionValueType: (v: any) => {
3821
4081
  test: (v: AnyResolvedKeyframe) => boolean;
3822
4082
  parse: typeof parseFloat;
3823
4083
  transform: (v: string | number) => string;
3824
- } | ValueType | undefined;
4084
+ } | undefined;
3825
4085
 
3826
4086
  interface ValueTypeMap {
3827
4087
  [key: string]: ValueType;
@@ -3898,7 +4158,7 @@ declare function getAnimatableNone(key: string, value: string): any;
3898
4158
  /**
3899
4159
  * Tests a value against the list of ValueTypes
3900
4160
  */
3901
- declare const findValueType: (v: any) => {
4161
+ declare const findValueType: (v: any) => ValueType | {
3902
4162
  test: (v: number) => boolean;
3903
4163
  parse: typeof parseFloat;
3904
4164
  transform: (v: number) => number;
@@ -3906,7 +4166,7 @@ declare const findValueType: (v: any) => {
3906
4166
  test: (v: AnyResolvedKeyframe) => boolean;
3907
4167
  parse: typeof parseFloat;
3908
4168
  transform: (v: string | number) => string;
3909
- } | ValueType | {
4169
+ } | {
3910
4170
  test: (v: any) => boolean;
3911
4171
  parse: (v: any) => RGBA | HSLA;
3912
4172
  transform: (v: string | RGBA | HSLA) => string;
@@ -5290,4 +5550,4 @@ declare const sync: Batcher;
5290
5550
  */
5291
5551
  declare const cancelSync: Record<string, (process: Process) => void>;
5292
5552
 
5293
- export { type AccelerateConfig, type AcceptedAnimations, type ActiveStatsBuffer, type AnimationDefinition, type AnimationGeneratorName, type AnimationGeneratorType, type AnimationList, type AnimationOptions, type AnimationOrchestrationOptions, type AnimationPlaybackControls, type AnimationPlaybackControlsWithThen, type AnimationPlaybackLifecycles, type AnimationPlaybackOptions, type AnimationScope, type AnimationState$1 as AnimationState, type AnimationType, type AnimationTypeState, type AnyResolvedKeyframe, type ArcOptions, AsyncMotionValueAnimation, type Batcher, type CSSStyleDeclarationWithTransform, type CSSVariableName, type CSSVariableToken, type CancelProcess, type Color, type ComplexValueInfo, type ComplexValues, type DOMKeyframesDefinition, DOMKeyframesResolver, type DOMValueAnimationOptions, DOMVisualElement, type DOMVisualElementOptions, type DecayOptions, type DelayedFunction, DocumentProjectionNode, type DragElastic, type DragHandler, type DraggableProps, type DurationSpringOptions, type DynamicOption, type ElementOrSelector, type EventInfo, type EventOptions, Feature, type FeatureClass, FlatTree, type FollowValueOptions, type FrameData, type GeneratorFactory, type GeneratorFactoryFunction, GroupAnimation, GroupAnimationWithThen, type GroupedAnimations, type HSLA, HTMLProjectionNode, type HTMLRenderState, HTMLVisualElement, type HandoffFunction, type IProjectionNode, type InactiveStatsBuffer, type InertiaOptions, type InitialPromotionConfig, type InterpolateOptions, JSAnimation, type KeyframeGenerator, type KeyframeOptions, KeyframeResolver, LayoutAnimationBuilder, type LayoutEvents, type LayoutLifecycles, type LayoutProjectionMetrics, type LayoutProjectionStats, type LayoutUpdateData, type LayoutUpdateHandler, type LegacyAnimationControls, type MapInputRange, type Measurements, type Mixer, type MixerFactory, type MotionConfigContextProps, type MotionNodeAdvancedOptions, type MotionNodeAnimationOptions, type MotionNodeDragHandlers, type MotionNodeDraggableOptions, type MotionNodeEventOptions, type MotionNodeFocusHandlers, type MotionNodeHoverHandlers, type MotionNodeLayoutOptions, type MotionNodeOptions, type MotionNodePanHandlers, type MotionNodeTapHandlers, type MotionNodeViewportOptions, type MotionPath, type MotionStyle, MotionValue, type MotionValueEventCallbacks, type MotionValueOptions, type MultiTransformer, NativeAnimation, NativeAnimationExtended, type NativeAnimationOptions, type NativeAnimationOptionsExtended, NativeAnimationWrapper, type NodeGroup, NodeStack, type NumberMap, ObjectVisualElement, type OnHoverEndEvent, type OnHoverStartEvent, type OnKeyframesResolved, type OnPressEndEvent, type OnPressStartEvent, type Owner, type PanHandler, type PanInfo, type PassiveEffect, type PathInterpolator, type PathState, type Phase, type Point2D, type PointerEventOptions, type PresenceContextProps, type PressGestureInfo, type Process, type ProgressTimeline, type ProjectionEventName, type ProjectionNodeConfig, type ProjectionNodeOptions, type PropagateOptions, type RGBA, type ReducedMotionConfig, type RepeatType, type ResolvedConstraints, type ResolvedElastic, type ResolvedKeyframes, type ResolvedValueKeyframe, type ResolvedValues$1 as ResolvedValues, type SVGAttributes, type SVGForcedAttrKeyframesDefinition, type SVGForcedAttrProperties, type SVGForcedAttrTransitions, type SVGKeyframesDefinition, type SVGPathKeyframesDefinition, type SVGPathProperties, type SVGPathTransitions, type SVGRenderState, type SVGTransitions, SVGVisualElement, type ScaleCorrectionNode, type ScaleCorrector, type ScaleCorrectorDefinition, type ScaleCorrectorMap, type Schedule, type ScrapeMotionValuesFromProps, type ScrollMeasurements, type SelectorCache, type SingleTransformer, type Spring, type SpringOptions, type StaggerOptions, type StaggerOrigin, type StartAnimation, type StatsRecording, type Step, type StepId, type Steps, type StyleKeyframesDefinition, type StyleTransitions, type Subscriber, type TapHandlers, type TapInfo, type Target, type TargetAndTransition, type TargetResolver, type TimelineWithFallback, type TransformInputRange, type TransformOptions, type TransformOrigin, type TransformProperties, type TransformTemplate, type Transformer, type Transition, type TransitionWithValueOverrides, type Tween, type UnresolvedKeyframes, type UnresolvedValueKeyframe, type UseRenderState, type ValueAnimationOptions, type ValueAnimationOptionsWithRenderContext, type ValueAnimationTransition, type ValueAnimationWithDynamicDelay, type ValueIndexes, type ValueKeyframe, type ValueKeyframesDefinition, type ValueTransformer, type ValueTransition, type ValueType, type ValueTypeMap, type VariableKeyframesDefinition, type VariableTransitions, type Variant, type VariantLabels, type Variants, type VelocityOptions, type ViewTransitionAnimationDefinition, ViewTransitionBuilder, type ViewTransitionOptions, type ViewTransitionTarget, type ViewTransitionTargetDefinition, type ViewportEventHandler, type ViewportOptions, VisualElement, type VisualElementAnimationOptions, type VisualElementEventCallbacks, type VisualElementOptions, type VisualState, type WillChange, type WithAppearProps, type WithDepth, type WithQuerySelectorAll, acceleratedValues, addAttrValue, addDomEvent, addScaleCorrector, addStyleValue, addValueToWillChange, alpha, analyseComplexValue, animateMotionValue, animateSingleValue, animateTarget, animateValue, animateVariant, animateView, animateVisualElement, animationMapKey, applyAxisDelta, applyBoxDelta, applyGeneratorOptions, applyPointDelta, applyPxDefaults, applyTreeDeltas, arc, aspectRatio, attachFollow, attachSpring, attrEffect, axisDeltaEquals, axisEquals, axisEqualsRounded, boxEquals, boxEqualsRounded, buildHTMLStyles, buildProjectionTransform, buildSVGAttrs, buildSVGPath, buildTransform, calcAxisDelta, calcBoxDelta, calcChildStagger, calcGeneratorDuration, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, camelCaseAttributes, camelToDash, cancelFrame, cancelMicrotask, cancelSync, checkVariantsDidChange, cleanDirtyNodes, collectMotionValues, color, compareByDepth, complex, containsCSSVariable, convertBoundingBoxToBox, convertBoxToBoundingBox, convertOffsetToTimes, copyAxisDeltaInto, copyAxisInto, copyBoxInto, correctBorderRadius, correctBoxShadow, createAnimationState, createAxis, createAxisDelta, createBox, createDelta, createGeneratorEasing, createProjectionNode, createRenderBatcher, cubicBezierAsString, defaultEasing, defaultOffset, defaultTransformValue, defaultValueTypes, degrees, delay, delayInSeconds, dimensionValueTypes, eachAxis, fillOffset, fillWildcards, findDimensionValueType, findValueType, flushKeyframeResolvers, followValue, frame, frameData, frameSteps, generateLinearEasing, getAnimatableNone, getAnimationMap, getComputedStyle, getDefaultTransition, getDefaultValueType, getFeatureDefinitions, getFinalKeyframe, getMixer, getOptimisedAppearId, getOriginIndex, getValueAsType, getValueTransition, getVariableValue, getVariantContext, getViewAnimationLayerInfo, getViewAnimations, globalProjectionState, has2DTranslate, hasReducedMotionListener, hasScale, hasTransform, hex, hover, hsla, hslaToRgba, inertia, initPrefersReducedMotion, interpolate, invisibleValues, isAnimationControls, isCSSVariableName, isCSSVariableToken, isControllingVariants, isDeltaZero, isDragActive, isDragging, isElementKeyboardAccessible, isElementTextInput, isForcedMotionValue, isGenerator, isHTMLElement, isKeyframesTarget, isMotionValue, isNear, isNodeOrChild, isPrimaryPointer, isSVGElement, isSVGSVGElement, isSVGTag, isTransitionDefined, isVariantLabel, isVariantNode, isWaapiSupportedEasing, isWillChangeMotionValue, keyframes, makeAnimationInstant, mapEasingToNativeEasing, mapValue, maxGeneratorDuration, measurePageBox, measureViewportBox, microtask, mix, mixArray, mixColor, mixComplex, mixImmediate, mixLinearColor, mixNumber, mixObject, mixValues, mixVisibility, motionValue, nodeGroup, number, numberValueTypes, observeTimeline, optimizedAppearDataAttribute, optimizedAppearDataId, parseAnimateLayoutArgs, parseCSSVariable, parseValueFromTransform, percent, pixelsToPercent, positionalKeys, prefersReducedMotion, press, progressPercentage, propEffect, propagateDirtyNodes, px, readTransformValue, recordStats, removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta, renderHTML, renderSVG, resize, resolveElements, resolveMotionValue, resolveTransition, resolveVariant, resolveVariantFromProps, rgbUnit, rgba, rootProjectionNode, scale, scaleCorrectors, scalePoint, scrapeMotionValuesFromProps$1 as scrapeHTMLMotionValuesFromProps, scrapeMotionValuesFromProps as scrapeSVGMotionValuesFromProps, setDragLock, setFeatureDefinitions, setStyle, setTarget, spring, springValue, stagger, startWaapiAnimation, statsBuffer, styleEffect, supportedWaapiEasing, supportsBrowserAnimation, supportsFlags, supportsLinearEasing, supportsPartialKeyframes, supportsScrollTimeline, supportsViewTimeline, svgEffect, sync, testValueType, time, transform, transformAxis, transformBox, transformBoxPoints, transformPropOrder, transformProps, transformValue, transformValueTypes, translateAxis, updateMotionValuesFromProps, variantPriorityOrder, variantProps, vh, visualElementStore, vw };
5553
+ export { type AccelerateConfig, type AcceptedAnimations, type ActiveStatsBuffer, type AddEffectValue, type AnimateEffect, type AnimationDefinition, type AnimationGeneratorName, type AnimationGeneratorType, type AnimationList, type AnimationOptions, type AnimationOrchestrationOptions, type AnimationPlaybackControls, type AnimationPlaybackControlsWithThen, type AnimationPlaybackLifecycles, type AnimationPlaybackOptions, type AnimationScope, type AnimationState$1 as AnimationState, type AnimationType, type AnimationTypeState, type AnyResolvedKeyframe, type ArcOptions, AsyncMotionValueAnimation, type Batcher, type CSSStyleDeclarationWithTransform, type CSSVariableName, type CSSVariableToken, type CancelProcess, type Color, type ComplexValueInfo, type ComplexValues, type DOMKeyframesDefinition, DOMKeyframesResolver, type DOMValueAnimationOptions, DOMVisualElement, type DOMVisualElementOptions, type DecayOptions, type DelayedFunction, DocumentProjectionNode, type DragElastic, type DragHandler, type DraggableProps, type DurationSpringOptions, type DynamicOption, type Effect, type EffectKeyframes, type EffectOptions, type EffectRead, type EffectTest, type EffectTransition, type ElementOrSelector, type EventInfo, type EventOptions, Feature, type FeatureClass, FlatTree, type FollowValueOptions, type FrameData, type GeneratorFactory, type GeneratorFactoryFunction, GroupAnimation, GroupAnimationWithThen, type GroupedAnimations, type HSLA, HTMLProjectionNode, type HTMLRenderState, HTMLVisualElement, type HandoffFunction, type IProjectionNode, type InactiveStatsBuffer, type InertiaOptions, type InitialPromotionConfig, type InterpolateOptions, JSAnimation, type KeyframeGenerator, type KeyframeOptions, KeyframeResolver, LayoutAnimationBuilder, type LayoutEvents, type LayoutLifecycles, type LayoutProjectionMetrics, type LayoutProjectionStats, type LayoutUpdateData, type LayoutUpdateHandler, type LegacyAnimationControls, type MapInputRange, type Measurements, type Mixer, type MixerFactory, type MotionConfigContextProps, type MotionNodeAdvancedOptions, type MotionNodeAnimationOptions, type MotionNodeDragHandlers, type MotionNodeDraggableOptions, type MotionNodeEventOptions, type MotionNodeFocusHandlers, type MotionNodeHoverHandlers, type MotionNodeLayoutOptions, type MotionNodeOptions, type MotionNodePanHandlers, type MotionNodeTapHandlers, type MotionNodeViewportOptions, type MotionPath, type MotionStyle, MotionValue, type MotionValueAnimation, type MotionValueEventCallbacks, type MotionValueOptions, MotionValueState, type MultiTransformer, NativeAnimation, NativeAnimationExtended, type NativeAnimationOptions, type NativeAnimationOptionsExtended, NativeAnimationWrapper, type NodeGroup, NodeStack, type NumberMap, ObjectVisualElement, type OnHoverEndEvent, type OnHoverStartEvent, type OnKeyframesResolved, type OnPressEndEvent, type OnPressStartEvent, type Owner, type PanHandler, type PanInfo, type PassiveEffect, type PathInterpolator, type PathState, type Phase, type Point2D, type PointerEventOptions, type PresenceContextProps, type PressGestureInfo, type Process, type ProgressTimeline, type ProjectionEventName, type ProjectionNodeConfig, type ProjectionNodeOptions, type PropagateOptions, type RGBA, type ReducedMotionConfig, type RepeatType, type ResolvedConstraints, type ResolvedElastic, type ResolvedKeyframes, type ResolvedValueKeyframe, type ResolvedValues$1 as ResolvedValues, type SVGAttributes, type SVGForcedAttrKeyframesDefinition, type SVGForcedAttrProperties, type SVGForcedAttrTransitions, type SVGKeyframesDefinition, type SVGPathKeyframesDefinition, type SVGPathProperties, type SVGPathTransitions, type SVGRenderState, type SVGTransitions, SVGVisualElement, type ScaleCorrectionNode, type ScaleCorrector, type ScaleCorrectorDefinition, type ScaleCorrectorMap, type Schedule, type ScrapeMotionValuesFromProps, type ScrollMeasurements, type SelectorCache, type SingleTransformer, type Spring, type SpringOptions, type StaggerOptions, type StaggerOrigin, type StartAnimation, type StatsRecording, type Step, type StepId, type Steps, type StyleKeyframesDefinition, type StyleSubject, type StyleTransitions, type Subscriber, type TapHandlers, type TapInfo, type Target, type TargetAndTransition, type TargetResolver, type TimelineWithFallback, type TransformInputRange, type TransformOptions, type TransformOrigin, type TransformProperties, type TransformTemplate, type Transformer, type Transition, type TransitionWithValueOverrides, type Tween, type UnresolvedKeyframes, type UnresolvedValueKeyframe, type UseRenderState, type ValueAnimationOptions, type ValueAnimationOptionsWithRenderContext, type ValueAnimationTransition, type ValueAnimationWithDynamicDelay, type ValueIndexes, type ValueKeyframe, type ValueKeyframesDefinition, type ValueTransformer, type ValueTransition, type ValueType, type ValueTypeMap, type VariableKeyframesDefinition, type VariableTransitions, type Variant, type VariantLabels, type Variants, type VelocityOptions, type ViewTransitionAnimationDefinition, ViewTransitionBuilder, type ViewTransitionOptions, type ViewTransitionTarget, type ViewTransitionTargetDefinition, type ViewportEventHandler, type ViewportOptions, VisualElement, type VisualElementAnimationOptions, type VisualElementEventCallbacks, type VisualElementOptions, type VisualState, type WillChange, type WithAppearProps, type WithDepth, type WithQuerySelectorAll, acceleratedValues, addAttrValue, addDomEvent, addEffect, addSVGValue, addScaleCorrector, addStyleValue, addValueToWillChange, alpha, analyseComplexValue, animateEffectSubject, animateElement, animateMotionValue, animateSingleValue, animateTarget, animateValue, animateValues, animateVariant, animateView, animateVisualElement, animationMapKey, applyAxisDelta, applyBoxDelta, applyGeneratorOptions, applyPointDelta, applyPxDefaults, applyTreeDeltas, arc, aspectRatio, attachFollow, attachSpring, attrEffect, axisDeltaEquals, axisEquals, axisEqualsRounded, boxEquals, boxEqualsRounded, buildHTMLStyles, buildProjectionTransform, buildSVGAttrs, buildSVGPath, buildTransform, calcAxisDelta, calcBoxDelta, calcChildStagger, calcGeneratorDuration, calcLength, calcRelativeAxis, calcRelativeAxisPosition, calcRelativeBox, calcRelativePosition, camelCaseAttributes, camelToDash, cancelFrame, cancelMicrotask, cancelSync, checkVariantsDidChange, cleanDirtyNodes, collectMotionValues, color, compareByDepth, complex, containsCSSVariable, convertBoundingBoxToBox, convertBoxToBoundingBox, convertOffsetToTimes, copyAxisDeltaInto, copyAxisInto, copyBoxInto, correctBorderRadius, correctBoxShadow, createAnimationState, createAxis, createAxisDelta, createBox, createDelta, createEffect, createGeneratorEasing, createProjectionNode, createRenderBatcher, cubicBezierAsString, defaultEasing, defaultOffset, defaultTransformValue, defaultValueTypes, degrees, delay, delayInSeconds, dimensionValueTypes, eachAxis, fillOffset, fillWildcards, findDimensionValueType, findEffect, findValueType, flushKeyframeResolvers, followValue, frame, frameData, frameSteps, generateLinearEasing, getAnimatableNone, getAnimationMap, getComputedStyle, getDefaultTransition, getDefaultValueType, getFeatureDefinitions, getFinalKeyframe, getMixer, getOptimisedAppearId, getOriginIndex, getValueAsType, getValueTransition, getVariableValue, getVariantContext, getViewAnimationLayerInfo, getViewAnimations, globalProjectionState, handOffElementState, has2DTranslate, hasComplexValues, hasReducedMotionListener, hasScale, hasTransform, hex, hover, hsla, hslaToRgba, inertia, initPrefersReducedMotion, interpolate, invisibleValues, isAnimationControls, isCSSVariableName, isCSSVariableToken, isControllingVariants, isDeltaZero, isDragActive, isDragging, isElementKeyboardAccessible, isElementTextInput, isForcedMotionValue, isGenerator, isHTMLElement, isKeyframesTarget, isMotionValue, isNear, isNodeOrChild, isPrimaryPointer, isSVGElement, isSVGSVGElement, isSVGTag, isTransitionDefined, isVariantLabel, isVariantNode, isWaapiSupportedEasing, isWillChangeMotionValue, keyframes, makeAnimationInstant, mapEasingToNativeEasing, mapValue, maxGeneratorDuration, measurePageBox, measureViewportBox, microtask, mix, mixArray, mixColor, mixComplex, mixImmediate, mixLinearColor, mixNumber, mixObject, mixValues, mixVisibility, motionValue, nodeGroup, number, numberValueTypes, observeTimeline, optimizedAppearDataAttribute, optimizedAppearDataId, parseAnimateLayoutArgs, parseCSSVariable, parseValueFromTransform, percent, pixelsToPercent, positionalKeys, prefersReducedMotion, press, progressPercentage, propEffect, propagateDirtyNodes, px, readSVGValue, readStyleValue, readTransformValue, recordStats, removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removeEffect, removePointDelta, renderHTML, renderSVG, resize, resolveElements, resolveMotionValue, resolveTransition, resolveVariant, resolveVariantFromProps, rgbUnit, rgba, rootProjectionNode, scale, scaleCorrectors, scalePoint, scrapeMotionValuesFromProps$1 as scrapeHTMLMotionValuesFromProps, scrapeMotionValuesFromProps as scrapeSVGMotionValuesFromProps, setDragLock, setFeatureDefinitions, setStyle, setTarget, spring, springValue, stagger, startWaapiAnimation, statsBuffer, styleEffect, styleSubjectEffect, supportedWaapiEasing, supportsBrowserAnimation, supportsFlags, supportsLinearEasing, supportsPartialKeyframes, supportsScrollTimeline, supportsViewTimeline, svgEffect, svgSubjectEffect, sync, testValueType, time, transform, transformAxis, transformBox, transformBoxPoints, transformPropOrder, transformProps, transformValue, transformValueTypes, translateAxis, updateMotionValuesFromProps, variantPriorityOrder, variantProps, vh, visualElementStore, vw };