framer-motion 10.2.3 → 10.2.4
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.
- package/dist/cjs/dom-entry.js +1 -1
- package/dist/cjs/index.js +18 -20
- package/dist/cjs/{wrap-27fda06a.js → wrap-62da7859.js} +456 -437
- package/dist/dom-entry.d.ts +485 -37
- package/dist/es/animation/GroupPlaybackControls.mjs +25 -0
- package/dist/es/animation/animate.mjs +2 -3
- package/dist/es/animation/create-instant-animation.mjs +13 -3
- package/dist/es/animation/generators/inertia.mjs +87 -0
- package/dist/es/animation/{legacy-popmotion → generators}/keyframes.mjs +8 -15
- package/dist/es/animation/{legacy-popmotion/find-spring.mjs → generators/spring/find.mjs} +6 -5
- package/dist/es/animation/generators/spring/index.mjs +129 -0
- package/dist/es/animation/generators/utils/velocity.mjs +9 -0
- package/dist/es/animation/index.mjs +2 -10
- package/dist/es/animation/js/driver-frameloop.mjs +12 -0
- package/dist/es/animation/js/index.mjs +206 -0
- package/dist/es/animation/optimized-appear/handoff.mjs +3 -1
- package/dist/es/animation/waapi/create-accelerated-animation.mjs +16 -10
- package/dist/es/frameloop/index.mjs +3 -4
- package/dist/es/gestures/pan/PanSession.mjs +2 -2
- package/dist/es/index.mjs +2 -3
- package/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/utils/time-conversion.mjs +2 -1
- package/dist/es/value/index.mjs +3 -3
- package/dist/es/value/use-spring.mjs +1 -1
- package/dist/es/value/use-velocity.mjs +4 -6
- package/dist/framer-motion.dev.js +475 -458
- package/dist/framer-motion.js +1 -1
- package/dist/index.d.ts +175 -218
- package/dist/projection.dev.js +5849 -5830
- package/dist/three-entry.d.ts +62 -63
- package/package.json +7 -11
- package/dist/es/animation/legacy-popmotion/decay.mjs +0 -34
- package/dist/es/animation/legacy-popmotion/index.mjs +0 -163
- package/dist/es/animation/legacy-popmotion/inertia.mjs +0 -90
- package/dist/es/animation/legacy-popmotion/spring.mjs +0 -143
- package/dist/es/frameloop/on-next-frame.mjs +0 -12
package/dist/index.d.ts
CHANGED
|
@@ -878,57 +878,139 @@ interface CustomValueType {
|
|
|
878
878
|
}
|
|
879
879
|
|
|
880
880
|
/**
|
|
881
|
-
*
|
|
881
|
+
* An update function. It accepts a timestamp used to advance the animation.
|
|
882
882
|
*/
|
|
883
|
-
|
|
884
|
-
|
|
883
|
+
declare type Update = (timestamp: number) => void;
|
|
884
|
+
/**
|
|
885
|
+
* Drivers accept a update function and call it at an interval. This interval
|
|
886
|
+
* could be a synchronous loop, a setInterval, or tied to the device's framerate.
|
|
887
|
+
*/
|
|
888
|
+
interface DriverControls {
|
|
889
|
+
start: () => void;
|
|
885
890
|
stop: () => void;
|
|
891
|
+
now: () => number;
|
|
886
892
|
}
|
|
893
|
+
declare type Driver = (update: Update) => DriverControls;
|
|
894
|
+
|
|
887
895
|
/**
|
|
888
896
|
* @public
|
|
889
897
|
*/
|
|
890
|
-
interface
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
898
|
+
interface AnimationPlaybackControls {
|
|
899
|
+
currentTime: number;
|
|
900
|
+
stop: () => void;
|
|
901
|
+
}
|
|
902
|
+
interface VelocityOptions {
|
|
903
|
+
velocity?: number;
|
|
904
|
+
restSpeed?: number;
|
|
905
|
+
restDelta?: number;
|
|
906
|
+
}
|
|
907
|
+
interface AnimationLifecycleOptions<V> {
|
|
908
|
+
onUpdate?: (v: V) => void;
|
|
909
|
+
onComplete?: VoidFunction;
|
|
910
|
+
onPlay?: VoidFunction;
|
|
911
|
+
onRepeat?: VoidFunction;
|
|
912
|
+
onStop?: VoidFunction;
|
|
913
|
+
}
|
|
914
|
+
interface AnimationPlaybackOptions {
|
|
915
|
+
repeat?: number;
|
|
916
|
+
repeatType?: "loop" | "reverse" | "mirror";
|
|
917
|
+
repeatDelay?: number;
|
|
918
|
+
}
|
|
919
|
+
interface DurationSpringOptions {
|
|
920
|
+
duration?: number;
|
|
921
|
+
bounce?: number;
|
|
922
|
+
}
|
|
923
|
+
interface SpringOptions extends DurationSpringOptions, VelocityOptions {
|
|
924
|
+
stiffness?: number;
|
|
925
|
+
damping?: number;
|
|
926
|
+
mass?: number;
|
|
927
|
+
}
|
|
928
|
+
interface DecayOptions extends VelocityOptions {
|
|
929
|
+
keyframes?: number[];
|
|
930
|
+
power?: number;
|
|
931
|
+
timeConstant?: number;
|
|
932
|
+
modifyTarget?: (v: number) => number;
|
|
933
|
+
}
|
|
934
|
+
interface InertiaOptions$1 extends DecayOptions {
|
|
935
|
+
bounceStiffness?: number;
|
|
936
|
+
bounceDamping?: number;
|
|
937
|
+
min?: number;
|
|
938
|
+
max?: number;
|
|
939
|
+
}
|
|
940
|
+
interface KeyframeOptions {
|
|
941
|
+
ease?: Easing | Easing[];
|
|
942
|
+
times?: number[];
|
|
943
|
+
}
|
|
944
|
+
interface AnimationOptions$1<V = any> extends AnimationLifecycleOptions<V>, AnimationPlaybackOptions, Omit<SpringOptions, "keyframes">, Omit<InertiaOptions$1, "keyframes">, KeyframeOptions {
|
|
945
|
+
delay?: number;
|
|
946
|
+
keyframes: V[];
|
|
947
|
+
elapsed?: number;
|
|
948
|
+
driver?: Driver;
|
|
949
|
+
type?: "decay" | "spring" | "keyframes" | "tween" | "inertia";
|
|
950
|
+
duration?: number;
|
|
951
|
+
autoplay?: boolean;
|
|
896
952
|
}
|
|
897
953
|
/**
|
|
898
954
|
* @public
|
|
899
955
|
*/
|
|
900
|
-
declare type
|
|
901
|
-
delay?: number;
|
|
902
|
-
type?: "tween" | "spring";
|
|
903
|
-
};
|
|
956
|
+
declare type ControlsAnimationDefinition = string | string[] | TargetAndTransition | TargetResolver;
|
|
904
957
|
/**
|
|
905
|
-
* Animate a single value or a `MotionValue`.
|
|
906
|
-
*
|
|
907
|
-
* The first argument is either a `MotionValue` to animate, or an initial animation value.
|
|
908
|
-
*
|
|
909
|
-
* The second is either a value to animate to, or an array of keyframes to animate through.
|
|
910
|
-
*
|
|
911
|
-
* The third argument can be either tween or spring options, and optional lifecycle methods: `onUpdate`, `onPlay`, `onComplete`, `onRepeat` and `onStop`.
|
|
912
|
-
*
|
|
913
|
-
* Returns `AnimationPlaybackControls`, currently just a `stop` method.
|
|
914
|
-
*
|
|
915
|
-
* ```javascript
|
|
916
|
-
* const x = useMotionValue(0)
|
|
917
|
-
*
|
|
918
|
-
* useEffect(() => {
|
|
919
|
-
* const controls = animate(x, 100, {
|
|
920
|
-
* type: "spring",
|
|
921
|
-
* stiffness: 2000,
|
|
922
|
-
* onComplete: v => {}
|
|
923
|
-
* })
|
|
924
|
-
*
|
|
925
|
-
* return controls.stop
|
|
926
|
-
* })
|
|
927
|
-
* ```
|
|
928
|
-
*
|
|
929
958
|
* @public
|
|
930
959
|
*/
|
|
931
|
-
|
|
960
|
+
interface AnimationControls {
|
|
961
|
+
/**
|
|
962
|
+
* Starts an animation on all linked components.
|
|
963
|
+
*
|
|
964
|
+
* @remarks
|
|
965
|
+
*
|
|
966
|
+
* ```jsx
|
|
967
|
+
* controls.start("variantLabel")
|
|
968
|
+
* controls.start({
|
|
969
|
+
* x: 0,
|
|
970
|
+
* transition: { duration: 1 }
|
|
971
|
+
* })
|
|
972
|
+
* ```
|
|
973
|
+
*
|
|
974
|
+
* @param definition - Properties or variant label to animate to
|
|
975
|
+
* @param transition - Optional `transtion` to apply to a variant
|
|
976
|
+
* @returns - A `Promise` that resolves when all animations have completed.
|
|
977
|
+
*
|
|
978
|
+
* @public
|
|
979
|
+
*/
|
|
980
|
+
start(definition: ControlsAnimationDefinition, transitionOverride?: Transition): Promise<any>;
|
|
981
|
+
/**
|
|
982
|
+
* Instantly set to a set of properties or a variant.
|
|
983
|
+
*
|
|
984
|
+
* ```jsx
|
|
985
|
+
* // With properties
|
|
986
|
+
* controls.set({ opacity: 0 })
|
|
987
|
+
*
|
|
988
|
+
* // With variants
|
|
989
|
+
* controls.set("hidden")
|
|
990
|
+
* ```
|
|
991
|
+
*
|
|
992
|
+
* @privateRemarks
|
|
993
|
+
* We could perform a similar trick to `.start` where this can be called before mount
|
|
994
|
+
* and we maintain a list of of pending actions that get applied on mount. But the
|
|
995
|
+
* expectation of `set` is that it happens synchronously and this would be difficult
|
|
996
|
+
* to do before any children have even attached themselves. It's also poor practise
|
|
997
|
+
* and we should discourage render-synchronous `.start` calls rather than lean into this.
|
|
998
|
+
*
|
|
999
|
+
* @public
|
|
1000
|
+
*/
|
|
1001
|
+
set(definition: ControlsAnimationDefinition): void;
|
|
1002
|
+
/**
|
|
1003
|
+
* Stops animations on all linked components.
|
|
1004
|
+
*
|
|
1005
|
+
* ```jsx
|
|
1006
|
+
* controls.stop()
|
|
1007
|
+
* ```
|
|
1008
|
+
*
|
|
1009
|
+
* @public
|
|
1010
|
+
*/
|
|
1011
|
+
stop(): void;
|
|
1012
|
+
mount(): () => void;
|
|
1013
|
+
}
|
|
932
1014
|
|
|
933
1015
|
/**
|
|
934
1016
|
* @public
|
|
@@ -1092,139 +1174,6 @@ declare class MotionValue<V = any> {
|
|
|
1092
1174
|
}
|
|
1093
1175
|
declare function motionValue<V>(init: V, options?: MotionValueOptions): MotionValue<V>;
|
|
1094
1176
|
|
|
1095
|
-
interface Animation$1<V> {
|
|
1096
|
-
next: (t: number) => {
|
|
1097
|
-
value: V;
|
|
1098
|
-
done: boolean;
|
|
1099
|
-
};
|
|
1100
|
-
flipTarget: () => void;
|
|
1101
|
-
}
|
|
1102
|
-
/**
|
|
1103
|
-
* An update function. It accepts a timestamp used to advance the animation.
|
|
1104
|
-
*/
|
|
1105
|
-
declare type Update = (timestamp: number) => void;
|
|
1106
|
-
/**
|
|
1107
|
-
* Drivers accept a update function and call it at an interval. This interval
|
|
1108
|
-
* could be a synchronous loop, a setInterval, or tied to the device's framerate.
|
|
1109
|
-
*/
|
|
1110
|
-
interface DriverControls {
|
|
1111
|
-
start: () => void;
|
|
1112
|
-
stop: () => void;
|
|
1113
|
-
}
|
|
1114
|
-
declare type Driver = (update: Update) => DriverControls;
|
|
1115
|
-
|
|
1116
|
-
interface VelocityOptions {
|
|
1117
|
-
velocity?: number;
|
|
1118
|
-
restSpeed?: number;
|
|
1119
|
-
restDelta?: number;
|
|
1120
|
-
}
|
|
1121
|
-
interface AnimationLifecycleOptions<V> {
|
|
1122
|
-
onUpdate?: (v: V) => void;
|
|
1123
|
-
onComplete?: VoidFunction;
|
|
1124
|
-
onPlay?: VoidFunction;
|
|
1125
|
-
onRepeat?: VoidFunction;
|
|
1126
|
-
onStop?: VoidFunction;
|
|
1127
|
-
}
|
|
1128
|
-
interface AnimationPlaybackOptions {
|
|
1129
|
-
repeat?: number;
|
|
1130
|
-
repeatType?: "loop" | "reverse" | "mirror";
|
|
1131
|
-
repeatDelay?: number;
|
|
1132
|
-
}
|
|
1133
|
-
interface DurationSpringOptions {
|
|
1134
|
-
duration?: number;
|
|
1135
|
-
bounce?: number;
|
|
1136
|
-
}
|
|
1137
|
-
interface SpringOptions extends DurationSpringOptions, VelocityOptions {
|
|
1138
|
-
stiffness?: number;
|
|
1139
|
-
damping?: number;
|
|
1140
|
-
mass?: number;
|
|
1141
|
-
}
|
|
1142
|
-
interface DecayOptions extends VelocityOptions {
|
|
1143
|
-
keyframes?: number[];
|
|
1144
|
-
power?: number;
|
|
1145
|
-
timeConstant?: number;
|
|
1146
|
-
modifyTarget?: (v: number) => number;
|
|
1147
|
-
}
|
|
1148
|
-
interface InertiaOptions$1 extends DecayOptions {
|
|
1149
|
-
bounceStiffness?: number;
|
|
1150
|
-
bounceDamping?: number;
|
|
1151
|
-
min?: number;
|
|
1152
|
-
max?: number;
|
|
1153
|
-
}
|
|
1154
|
-
interface KeyframeOptions {
|
|
1155
|
-
ease?: Easing | Easing[];
|
|
1156
|
-
times?: number[];
|
|
1157
|
-
}
|
|
1158
|
-
interface AnimationOptions$1<V = any> extends AnimationLifecycleOptions<V>, AnimationPlaybackOptions, Omit<SpringOptions, "keyframes">, Omit<InertiaOptions$1, "keyframes">, KeyframeOptions {
|
|
1159
|
-
keyframes: V[];
|
|
1160
|
-
elapsed?: number;
|
|
1161
|
-
driver?: Driver;
|
|
1162
|
-
type?: "decay" | "spring" | "keyframes" | "tween";
|
|
1163
|
-
duration?: number;
|
|
1164
|
-
autoplay?: boolean;
|
|
1165
|
-
}
|
|
1166
|
-
/**
|
|
1167
|
-
* @public
|
|
1168
|
-
*/
|
|
1169
|
-
declare type ControlsAnimationDefinition = string | string[] | TargetAndTransition | TargetResolver;
|
|
1170
|
-
/**
|
|
1171
|
-
* @public
|
|
1172
|
-
*/
|
|
1173
|
-
interface AnimationControls {
|
|
1174
|
-
/**
|
|
1175
|
-
* Starts an animation on all linked components.
|
|
1176
|
-
*
|
|
1177
|
-
* @remarks
|
|
1178
|
-
*
|
|
1179
|
-
* ```jsx
|
|
1180
|
-
* controls.start("variantLabel")
|
|
1181
|
-
* controls.start({
|
|
1182
|
-
* x: 0,
|
|
1183
|
-
* transition: { duration: 1 }
|
|
1184
|
-
* })
|
|
1185
|
-
* ```
|
|
1186
|
-
*
|
|
1187
|
-
* @param definition - Properties or variant label to animate to
|
|
1188
|
-
* @param transition - Optional `transtion` to apply to a variant
|
|
1189
|
-
* @returns - A `Promise` that resolves when all animations have completed.
|
|
1190
|
-
*
|
|
1191
|
-
* @public
|
|
1192
|
-
*/
|
|
1193
|
-
start(definition: ControlsAnimationDefinition, transitionOverride?: Transition): Promise<any>;
|
|
1194
|
-
/**
|
|
1195
|
-
* Instantly set to a set of properties or a variant.
|
|
1196
|
-
*
|
|
1197
|
-
* ```jsx
|
|
1198
|
-
* // With properties
|
|
1199
|
-
* controls.set({ opacity: 0 })
|
|
1200
|
-
*
|
|
1201
|
-
* // With variants
|
|
1202
|
-
* controls.set("hidden")
|
|
1203
|
-
* ```
|
|
1204
|
-
*
|
|
1205
|
-
* @privateRemarks
|
|
1206
|
-
* We could perform a similar trick to `.start` where this can be called before mount
|
|
1207
|
-
* and we maintain a list of of pending actions that get applied on mount. But the
|
|
1208
|
-
* expectation of `set` is that it happens synchronously and this would be difficult
|
|
1209
|
-
* to do before any children have even attached themselves. It's also poor practise
|
|
1210
|
-
* and we should discourage render-synchronous `.start` calls rather than lean into this.
|
|
1211
|
-
*
|
|
1212
|
-
* @public
|
|
1213
|
-
*/
|
|
1214
|
-
set(definition: ControlsAnimationDefinition): void;
|
|
1215
|
-
/**
|
|
1216
|
-
* Stops animations on all linked components.
|
|
1217
|
-
*
|
|
1218
|
-
* ```jsx
|
|
1219
|
-
* controls.stop()
|
|
1220
|
-
* ```
|
|
1221
|
-
*
|
|
1222
|
-
* @public
|
|
1223
|
-
*/
|
|
1224
|
-
stop(): void;
|
|
1225
|
-
mount(): () => void;
|
|
1226
|
-
}
|
|
1227
|
-
|
|
1228
1177
|
interface RefObject<T> {
|
|
1229
1178
|
current: T | null;
|
|
1230
1179
|
}
|
|
@@ -1622,7 +1571,7 @@ declare type AnimationOptions = {
|
|
|
1622
1571
|
};
|
|
1623
1572
|
declare function animateVisualElement(visualElement: VisualElement, definition: AnimationDefinition, options?: AnimationOptions): Promise<void>;
|
|
1624
1573
|
|
|
1625
|
-
interface AnimationState {
|
|
1574
|
+
interface AnimationState$1 {
|
|
1626
1575
|
animateChanges: (options?: AnimationOptions, type?: AnimationType) => Promise<any>;
|
|
1627
1576
|
setActive: (type: AnimationType, isActive: boolean, options?: AnimationOptions) => Promise<any>;
|
|
1628
1577
|
setAnimateFunction: (fn: any) => void;
|
|
@@ -1801,7 +1750,7 @@ declare abstract class VisualElement<Instance = unknown, RenderState = unknown,
|
|
|
1801
1750
|
/**
|
|
1802
1751
|
* The AnimationState, this is hydrated by the animation Feature.
|
|
1803
1752
|
*/
|
|
1804
|
-
animationState?: AnimationState;
|
|
1753
|
+
animationState?: AnimationState$1;
|
|
1805
1754
|
/**
|
|
1806
1755
|
* The options used to create this VisualElement. The Options type is defined
|
|
1807
1756
|
* by the inheriting VisualElement and is passed straight through to the render functions.
|
|
@@ -3715,6 +3664,45 @@ declare const Reorder: {
|
|
|
3715
3664
|
} & React$1.RefAttributes<any>>;
|
|
3716
3665
|
};
|
|
3717
3666
|
|
|
3667
|
+
/**
|
|
3668
|
+
* @public
|
|
3669
|
+
*/
|
|
3670
|
+
interface AnimationPlaybackLifecycles<V> {
|
|
3671
|
+
onUpdate?: (latest: V) => void;
|
|
3672
|
+
onPlay?: () => void;
|
|
3673
|
+
onComplete?: () => void;
|
|
3674
|
+
onRepeat?: () => void;
|
|
3675
|
+
onStop?: () => void;
|
|
3676
|
+
}
|
|
3677
|
+
/**
|
|
3678
|
+
* Animate a single value or a `MotionValue`.
|
|
3679
|
+
*
|
|
3680
|
+
* The first argument is either a `MotionValue` to animate, or an initial animation value.
|
|
3681
|
+
*
|
|
3682
|
+
* The second is either a value to animate to, or an array of keyframes to animate through.
|
|
3683
|
+
*
|
|
3684
|
+
* The third argument can be either tween or spring options, and optional lifecycle methods: `onUpdate`, `onPlay`, `onComplete`, `onRepeat` and `onStop`.
|
|
3685
|
+
*
|
|
3686
|
+
* Returns `AnimationPlaybackControls`, currently just a `stop` method.
|
|
3687
|
+
*
|
|
3688
|
+
* ```javascript
|
|
3689
|
+
* const x = useMotionValue(0)
|
|
3690
|
+
*
|
|
3691
|
+
* useEffect(() => {
|
|
3692
|
+
* const controls = animate(x, 100, {
|
|
3693
|
+
* type: "spring",
|
|
3694
|
+
* stiffness: 2000,
|
|
3695
|
+
* onComplete: v => {}
|
|
3696
|
+
* })
|
|
3697
|
+
*
|
|
3698
|
+
* return controls.stop
|
|
3699
|
+
* })
|
|
3700
|
+
* ```
|
|
3701
|
+
*
|
|
3702
|
+
* @public
|
|
3703
|
+
*/
|
|
3704
|
+
declare function animate<V>(from: MotionValue<V> | V, to: V | V[], transition?: Transition & AnimationPlaybackLifecycles<V>): AnimationPlaybackControls;
|
|
3705
|
+
|
|
3718
3706
|
interface AxisScrollInfo {
|
|
3719
3707
|
current: number;
|
|
3720
3708
|
offset: number[];
|
|
@@ -4417,44 +4405,19 @@ declare function useResetProjection(): () => void;
|
|
|
4417
4405
|
*/
|
|
4418
4406
|
declare function buildTransform(transform: HTMLRenderState["transform"], { enableHardwareAcceleration, allowTransformNone, }: DOMVisualElementOptions, transformIsDefault: boolean, transformTemplate?: MotionProps["transformTemplate"]): string;
|
|
4419
4407
|
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
*
|
|
4429
|
-
* WARNING: This is not safe to use for most animations. We currently
|
|
4430
|
-
* only use it for handoff from WAAPI within Framer.
|
|
4431
|
-
*
|
|
4432
|
-
* This animation function consumes time every frame rather than being sampled for time.
|
|
4433
|
-
* So the sample() method performs some headless frames to ensure
|
|
4434
|
-
* repeats are handled correctly. Ideally in the future we will replace
|
|
4435
|
-
* that method with this, once repeat calculations are pure.
|
|
4436
|
-
*/
|
|
4437
|
-
currentTime: number;
|
|
4438
|
-
/**
|
|
4439
|
-
* animate() can't yet be sampled for time, instead it
|
|
4440
|
-
* consumes time. So to sample it we have to run a low
|
|
4441
|
-
* temporal-resolution version.
|
|
4442
|
-
*
|
|
4443
|
-
* isControlled should be set to true if sample is being run within
|
|
4444
|
-
* a loop. This indicates that we're not arbitrarily sampling
|
|
4445
|
-
* the animation but running it one step after another. Therefore
|
|
4446
|
-
* we don't need to run a low-res version here. This is a stop-gap
|
|
4447
|
-
* until a rewrite can sample for time.
|
|
4448
|
-
*/
|
|
4449
|
-
sample: (t: number, isControlled?: boolean) => {
|
|
4450
|
-
done: boolean;
|
|
4451
|
-
value: V;
|
|
4452
|
-
};
|
|
4453
|
-
};
|
|
4408
|
+
interface AnimationState<V> {
|
|
4409
|
+
value: V;
|
|
4410
|
+
done: boolean;
|
|
4411
|
+
}
|
|
4412
|
+
interface KeyframeGenerator<V> {
|
|
4413
|
+
calculatedDuration: null | number;
|
|
4414
|
+
next: (t: number) => AnimationState<V>;
|
|
4415
|
+
}
|
|
4454
4416
|
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
}
|
|
4417
|
+
interface MainThreadAnimationControls<V> extends AnimationPlaybackControls {
|
|
4418
|
+
sample: (t: number) => AnimationState<V>;
|
|
4419
|
+
}
|
|
4420
|
+
declare function animateValue<V = number>({ autoplay, delay, driver, keyframes, type, repeat, repeatDelay, repeatType, onPlay, onStop, onComplete, onUpdate, ...options }: AnimationOptions$1<V>): MainThreadAnimationControls<V>;
|
|
4458
4421
|
|
|
4459
4422
|
declare type Transformer = (v: any) => any;
|
|
4460
4423
|
declare type ValueType = {
|
|
@@ -4515,13 +4478,7 @@ declare function startOptimizedAppearAnimation(element: HTMLElement, name: strin
|
|
|
4515
4478
|
|
|
4516
4479
|
declare const optimizedAppearDataAttribute: string;
|
|
4517
4480
|
|
|
4518
|
-
|
|
4519
|
-
* This is based on the spring implementation of Wobble https://github.com/skevy/wobble
|
|
4520
|
-
*/
|
|
4521
|
-
declare function spring({ keyframes, restDelta, restSpeed, ...options }: AnimationOptions$1<number>): Animation$1<number>;
|
|
4522
|
-
declare namespace spring {
|
|
4523
|
-
var needsInterpolation: (a: any, b: any) => boolean;
|
|
4524
|
-
}
|
|
4481
|
+
declare function spring({ keyframes, restDelta, restSpeed, ...options }: AnimationOptions$1<number>): KeyframeGenerator<number>;
|
|
4525
4482
|
|
|
4526
4483
|
interface NodeGroup {
|
|
4527
4484
|
add: (node: IProjectionNode) => void;
|
|
@@ -4586,4 +4543,4 @@ declare function useInvertedScale(scale?: Partial<ScaleMotionValues>): ScaleMoti
|
|
|
4586
4543
|
|
|
4587
4544
|
declare const AnimateSharedLayout: React$1.FunctionComponent<React$1.PropsWithChildren<unknown>>;
|
|
4588
4545
|
|
|
4589
|
-
export { AnimatePresence, AnimatePresenceProps, AnimateSharedLayout, AnimationControls, AnimationLifecycleOptions, AnimationLifecycles, AnimationOptions$
|
|
4546
|
+
export { AnimatePresence, AnimatePresenceProps, AnimateSharedLayout, AnimationControls, AnimationLifecycleOptions, AnimationLifecycles, AnimationOptions$1 as AnimationOptions, AnimationPlaybackControls, AnimationPlaybackOptions, AnimationProps, AnimationType, Axis, AxisDelta, BezierDefinition, BoundingBox, Box, ControlsAnimationDefinition, CreateVisualElement, CustomDomComponent, CustomValueType, Cycle, CycleState, DecayOptions, DelayedFunction, Delta, DeprecatedLayoutGroupContext, DevMessage, DragControls, DragElastic, DragHandlers, DraggableProps, DurationSpringOptions, Easing, EasingDefinition, EasingFunction, EasingModifier, EventInfo, FeatureBundle, FeatureDefinition, FeatureDefinitions, FeaturePackage, FeaturePackages, FlatTree, FocusHandlers, ForwardRefComponent, HTMLMotionProps, HoverHandlers, HydratedFeatureDefinition, HydratedFeatureDefinitions, IProjectionNode, Inertia, InertiaOptions$1 as InertiaOptions, InterpolateOptions, KeyframeOptions, Keyframes, KeyframesTarget, LayoutGroup, LayoutGroupContext, LayoutProps, LazyFeatureBundle$1 as LazyFeatureBundle, LazyMotion, LazyProps, MixerFactory, MotionAdvancedProps, MotionConfig, MotionConfigContext, MotionConfigProps, MotionContext, MotionProps, MotionStyle, MotionTransform, MotionValue, None, Orchestration, PanHandlers, PanInfo, PassiveEffect, Point, PresenceContext, RelayoutInfo, RenderComponent, Reorder, Repeat, ResolveLayoutTransition, ResolvedKeyframesTarget, ResolvedSingleTarget, ResolvedValueTarget, ResolvedValues, SVGAttributesAsMotionValues, SVGMotionProps, ScrapeMotionValuesFromProps, ScrollMotionValues, SingleTarget, Spring, SpringOptions, Subscriber, SwitchLayoutGroupContext, TapHandlers, TapInfo, Target, TargetAndTransition, TransformPoint, Transition, Tween, ValueTarget, ValueType, Variant, VariantLabels, Variants, VelocityOptions, VisualElement, VisualState, addPointerEvent, addPointerInfo, addScaleCorrector, animate, animateValue, animateVisualElement, animationControls, animations, anticipate, backIn, backInOut, backOut, buildTransform, calcLength, checkTargetForNewValues, circIn, circInOut, circOut, clamp, color, complex, createBox, createDomMotionComponent, createMotionComponent, cubicBezier, delay, distance, distance2D, domAnimation, domMax, easeIn, easeInOut, easeOut, filterProps, frameData, inView, interpolate, invariant, isBrowser, isDragActive, isMotionComponent, isMotionValue, isValidMotionProp, m, makeUseVisualState, mix, motion, motionValue, optimizedAppearDataAttribute, pipe, progress, px, resolveMotionValue, scroll, spring, startOptimizedAppearAnimation, sync, transform, unwrapMotionComponent, useAnimation, useAnimationControls, useAnimationFrame, useCycle, useAnimatedState as useDeprecatedAnimatedState, useInvertedScale as useDeprecatedInvertedScale, useDomEvent, useDragControls, useElementScroll, useForceUpdate, useInView, useInstantLayoutTransition, useInstantTransition, useIsPresent, useIsomorphicLayoutEffect, useMotionTemplate, useMotionValue, useMotionValueEvent, usePresence, useReducedMotion, useReducedMotionConfig, useResetProjection, useScroll, useSpring, useTime, useTransform, useUnmountEffect, useVelocity, useViewportScroll, useWillChange, warning, wrap };
|