animejs 4.3.0-beta.2 → 4.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.
- package/README.md +16 -17
- package/dist/bundles/anime.esm.js +446 -245
- package/dist/bundles/anime.esm.min.js +3 -3
- package/dist/bundles/anime.umd.js +446 -245
- package/dist/bundles/anime.umd.min.js +3 -3
- package/dist/modules/animatable/animatable.cjs +2 -2
- package/dist/modules/animatable/animatable.js +2 -2
- package/dist/modules/animatable/index.cjs +2 -2
- package/dist/modules/animatable/index.js +2 -2
- package/dist/modules/animation/additive.cjs +2 -2
- package/dist/modules/animation/additive.js +2 -2
- package/dist/modules/animation/animation.cjs +8 -5
- package/dist/modules/animation/animation.js +9 -6
- package/dist/modules/animation/composition.cjs +2 -2
- package/dist/modules/animation/composition.js +2 -2
- package/dist/modules/animation/index.cjs +2 -2
- package/dist/modules/animation/index.js +2 -2
- package/dist/modules/core/clock.cjs +2 -2
- package/dist/modules/core/clock.js +2 -2
- package/dist/modules/core/colors.cjs +2 -2
- package/dist/modules/core/colors.js +2 -2
- package/dist/modules/core/consts.cjs +2 -2
- package/dist/modules/core/consts.js +2 -2
- package/dist/modules/core/globals.cjs +3 -3
- package/dist/modules/core/globals.js +3 -3
- package/dist/modules/core/helpers.cjs +4 -4
- package/dist/modules/core/helpers.js +4 -4
- package/dist/modules/core/render.cjs +2 -2
- package/dist/modules/core/render.js +2 -2
- package/dist/modules/core/styles.cjs +2 -2
- package/dist/modules/core/styles.js +2 -2
- package/dist/modules/core/targets.cjs +2 -2
- package/dist/modules/core/targets.js +2 -2
- package/dist/modules/core/transforms.cjs +2 -2
- package/dist/modules/core/transforms.js +2 -2
- package/dist/modules/core/units.cjs +2 -2
- package/dist/modules/core/units.js +2 -2
- package/dist/modules/core/values.cjs +2 -2
- package/dist/modules/core/values.js +2 -2
- package/dist/modules/draggable/draggable.cjs +2 -2
- package/dist/modules/draggable/draggable.js +2 -2
- package/dist/modules/draggable/index.cjs +2 -2
- package/dist/modules/draggable/index.js +2 -2
- package/dist/modules/easings/cubic-bezier/index.cjs +2 -2
- package/dist/modules/easings/cubic-bezier/index.js +2 -2
- package/dist/modules/easings/eases/index.cjs +2 -2
- package/dist/modules/easings/eases/index.js +2 -2
- package/dist/modules/easings/eases/parser.cjs +2 -2
- package/dist/modules/easings/eases/parser.js +2 -2
- package/dist/modules/easings/index.cjs +2 -2
- package/dist/modules/easings/index.js +2 -2
- package/dist/modules/easings/irregular/index.cjs +2 -2
- package/dist/modules/easings/irregular/index.js +2 -2
- package/dist/modules/easings/linear/index.cjs +2 -2
- package/dist/modules/easings/linear/index.js +2 -2
- package/dist/modules/easings/none.cjs +2 -2
- package/dist/modules/easings/none.js +2 -2
- package/dist/modules/easings/spring/index.cjs +2 -2
- package/dist/modules/easings/spring/index.js +2 -2
- package/dist/modules/easings/steps/index.cjs +2 -2
- package/dist/modules/easings/steps/index.js +2 -2
- package/dist/modules/engine/engine.cjs +2 -2
- package/dist/modules/engine/engine.js +2 -2
- package/dist/modules/engine/index.cjs +2 -2
- package/dist/modules/engine/index.js +2 -2
- package/dist/modules/events/index.cjs +2 -2
- package/dist/modules/events/index.js +2 -2
- package/dist/modules/events/scroll.cjs +2 -2
- package/dist/modules/events/scroll.js +2 -2
- package/dist/modules/index.cjs +2 -2
- package/dist/modules/index.js +2 -2
- package/dist/modules/layout/index.cjs +2 -2
- package/dist/modules/layout/index.js +2 -2
- package/dist/modules/layout/layout.cjs +427 -228
- package/dist/modules/layout/layout.d.ts +44 -38
- package/dist/modules/layout/layout.js +429 -230
- package/dist/modules/scope/index.cjs +2 -2
- package/dist/modules/scope/index.js +2 -2
- package/dist/modules/scope/scope.cjs +2 -2
- package/dist/modules/scope/scope.js +2 -2
- package/dist/modules/svg/drawable.cjs +2 -2
- package/dist/modules/svg/drawable.js +2 -2
- package/dist/modules/svg/helpers.cjs +2 -2
- package/dist/modules/svg/helpers.js +2 -2
- package/dist/modules/svg/index.cjs +2 -2
- package/dist/modules/svg/index.js +2 -2
- package/dist/modules/svg/morphto.cjs +2 -2
- package/dist/modules/svg/morphto.js +2 -2
- package/dist/modules/svg/motionpath.cjs +2 -2
- package/dist/modules/svg/motionpath.js +2 -2
- package/dist/modules/text/index.cjs +2 -2
- package/dist/modules/text/index.js +2 -2
- package/dist/modules/text/split.cjs +2 -2
- package/dist/modules/text/split.js +2 -2
- package/dist/modules/timeline/index.cjs +2 -2
- package/dist/modules/timeline/index.js +2 -2
- package/dist/modules/timeline/position.cjs +2 -2
- package/dist/modules/timeline/position.js +2 -2
- package/dist/modules/timeline/timeline.cjs +2 -2
- package/dist/modules/timeline/timeline.js +2 -2
- package/dist/modules/timer/index.cjs +2 -2
- package/dist/modules/timer/index.js +2 -2
- package/dist/modules/timer/timer.cjs +5 -4
- package/dist/modules/timer/timer.d.ts +2 -1
- package/dist/modules/timer/timer.js +5 -4
- package/dist/modules/types/index.d.ts +6 -6
- package/dist/modules/utils/chainable.cjs +2 -2
- package/dist/modules/utils/chainable.js +2 -2
- package/dist/modules/utils/index.cjs +2 -2
- package/dist/modules/utils/index.js +2 -2
- package/dist/modules/utils/number.cjs +2 -2
- package/dist/modules/utils/number.js +2 -2
- package/dist/modules/utils/random.cjs +2 -2
- package/dist/modules/utils/random.js +2 -2
- package/dist/modules/utils/stagger.cjs +2 -2
- package/dist/modules/utils/stagger.js +2 -2
- package/dist/modules/utils/target.cjs +2 -2
- package/dist/modules/utils/target.js +2 -2
- package/dist/modules/utils/time.cjs +2 -2
- package/dist/modules/utils/time.js +2 -2
- package/dist/modules/waapi/composition.cjs +2 -2
- package/dist/modules/waapi/composition.js +2 -2
- package/dist/modules/waapi/index.cjs +2 -2
- package/dist/modules/waapi/index.js +2 -2
- package/dist/modules/waapi/waapi.cjs +12 -7
- package/dist/modules/waapi/waapi.js +12 -7
- package/package.json +1 -1
|
@@ -14,42 +14,36 @@ export class AutoLayout {
|
|
|
14
14
|
children: LayoutChildrenParam;
|
|
15
15
|
/** @type {Boolean} */
|
|
16
16
|
absoluteCoords: boolean;
|
|
17
|
-
/** @type {Number|FunctionValue} */
|
|
18
|
-
duration: number | FunctionValue;
|
|
19
|
-
/** @type {Number|FunctionValue} */
|
|
20
|
-
delay: number | FunctionValue;
|
|
21
|
-
/** @type {EasingParam} */
|
|
22
|
-
ease: EasingParam;
|
|
23
|
-
/** @type {Callback<this>} */
|
|
24
|
-
onComplete: Callback<this>;
|
|
25
17
|
/** @type {LayoutStateParams} */
|
|
26
|
-
|
|
18
|
+
swapAtParams: LayoutStateParams;
|
|
27
19
|
/** @type {LayoutStateParams} */
|
|
28
|
-
|
|
20
|
+
enterFromParams: LayoutStateParams;
|
|
29
21
|
/** @type {LayoutStateParams} */
|
|
30
|
-
|
|
22
|
+
leaveToParams: LayoutStateParams;
|
|
31
23
|
/** @type {Set<String>} */
|
|
32
24
|
properties: Set<string>;
|
|
33
25
|
/** @type {Set<String>} */
|
|
34
26
|
recordedProperties: Set<string>;
|
|
35
27
|
/** @type {WeakSet<DOMTarget>} */
|
|
36
|
-
|
|
28
|
+
pendingRemoval: WeakSet<DOMTarget>;
|
|
37
29
|
/** @type {Map<DOMTarget, String|null>} */
|
|
38
30
|
transitionMuteStore: Map<DOMTarget, string | null>;
|
|
39
31
|
/** @type {LayoutSnapshot} */
|
|
40
32
|
oldState: LayoutSnapshot;
|
|
41
33
|
/** @type {LayoutSnapshot} */
|
|
42
34
|
newState: LayoutSnapshot;
|
|
43
|
-
/** @type {Timeline
|
|
44
|
-
timeline: Timeline
|
|
45
|
-
/** @type {WAAPIAnimation
|
|
46
|
-
transformAnimation: WAAPIAnimation
|
|
35
|
+
/** @type {Timeline} */
|
|
36
|
+
timeline: Timeline;
|
|
37
|
+
/** @type {WAAPIAnimation} */
|
|
38
|
+
transformAnimation: WAAPIAnimation;
|
|
39
|
+
/** @type {Array<DOMTarget>} */
|
|
40
|
+
animating: Array<DOMTarget>;
|
|
47
41
|
/** @type {Array<DOMTarget>} */
|
|
48
|
-
|
|
42
|
+
swapping: Array<DOMTarget>;
|
|
49
43
|
/** @type {Array<DOMTarget>} */
|
|
50
|
-
|
|
44
|
+
leaving: Array<DOMTarget>;
|
|
51
45
|
/** @type {Array<DOMTarget>} */
|
|
52
|
-
|
|
46
|
+
entering: Array<DOMTarget>;
|
|
53
47
|
/**
|
|
54
48
|
* @return {this}
|
|
55
49
|
*/
|
|
@@ -66,27 +60,35 @@ export class AutoLayout {
|
|
|
66
60
|
/**
|
|
67
61
|
* @param {(layout: this) => void} callback
|
|
68
62
|
* @param {LayoutAnimationParams} [params]
|
|
69
|
-
* @return {
|
|
63
|
+
* @return {Timeline}
|
|
70
64
|
*/
|
|
71
|
-
update(callback: (layout: this) => void, params?: LayoutAnimationParams):
|
|
65
|
+
update(callback: (layout: this) => void, params?: LayoutAnimationParams): Timeline;
|
|
72
66
|
}
|
|
73
67
|
export function createLayout(root: DOMTargetSelector, params?: AutoLayoutParams): AutoLayout;
|
|
74
68
|
export type LayoutChildrenParam = DOMTargetSelector | Array<DOMTargetSelector>;
|
|
75
|
-
export type
|
|
76
|
-
|
|
69
|
+
export type LayoutAnimationTimingsParams = {
|
|
70
|
+
delay?: number | FunctionValue;
|
|
71
|
+
duration?: number | FunctionValue;
|
|
72
|
+
ease?: EasingParam | FunctionValue;
|
|
73
|
+
};
|
|
74
|
+
export type LayoutStateAnimationProperties = Record<string, number | string | FunctionValue>;
|
|
75
|
+
export type LayoutStateParams = LayoutStateAnimationProperties & LayoutAnimationTimingsParams;
|
|
76
|
+
export type LayoutSpecificAnimationParams = {
|
|
77
77
|
delay?: number | FunctionValue;
|
|
78
78
|
duration?: number | FunctionValue;
|
|
79
|
-
ease?: EasingParam;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
79
|
+
ease?: EasingParam | FunctionValue;
|
|
80
|
+
playbackEase?: EasingParam;
|
|
81
|
+
swapAt?: LayoutStateParams;
|
|
82
|
+
enterFrom?: LayoutStateParams;
|
|
83
|
+
leaveTo?: LayoutStateParams;
|
|
84
84
|
};
|
|
85
|
-
export type
|
|
85
|
+
export type LayoutAnimationParams = LayoutSpecificAnimationParams & TimerParams & TickableCallbacks<Timeline> & RenderableCallbacks<Timeline>;
|
|
86
|
+
export type LayoutOptions = {
|
|
86
87
|
children?: LayoutChildrenParam;
|
|
87
88
|
properties?: Array<string>;
|
|
88
89
|
};
|
|
89
|
-
export type
|
|
90
|
+
export type AutoLayoutParams = LayoutAnimationParams & LayoutOptions;
|
|
91
|
+
export type LayoutNodeProperties = Record<string, number | string | FunctionValue> & {
|
|
90
92
|
transform: string;
|
|
91
93
|
x: number;
|
|
92
94
|
y: number;
|
|
@@ -104,13 +106,15 @@ export type LayoutNode = {
|
|
|
104
106
|
total: number;
|
|
105
107
|
delay: number;
|
|
106
108
|
duration: number;
|
|
109
|
+
ease: EasingParam;
|
|
107
110
|
$measure: DOMTarget;
|
|
108
111
|
state: LayoutSnapshot;
|
|
109
112
|
layout: AutoLayout;
|
|
110
113
|
parentNode: LayoutNode | null;
|
|
111
114
|
isTarget: boolean;
|
|
115
|
+
isEntering: boolean;
|
|
116
|
+
isLeaving: boolean;
|
|
112
117
|
hasTransform: boolean;
|
|
113
|
-
isAnimated: boolean;
|
|
114
118
|
inlineStyles: Array<string>;
|
|
115
119
|
inlineTransforms: string | null;
|
|
116
120
|
inlineTransition: string | null;
|
|
@@ -140,9 +144,6 @@ export type LayoutNode = {
|
|
|
140
144
|
};
|
|
141
145
|
export type LayoutNodeIterator = (node: LayoutNode, index: number) => void;
|
|
142
146
|
import type { DOMTarget } from '../types/index.js';
|
|
143
|
-
import type { FunctionValue } from '../types/index.js';
|
|
144
|
-
import type { EasingParam } from '../types/index.js';
|
|
145
|
-
import type { Callback } from '../types/index.js';
|
|
146
147
|
declare class LayoutSnapshot {
|
|
147
148
|
/**
|
|
148
149
|
* @param {AutoLayout} layout
|
|
@@ -166,15 +167,15 @@ declare class LayoutSnapshot {
|
|
|
166
167
|
revert(): this;
|
|
167
168
|
/**
|
|
168
169
|
* @param {DOMTarget} $el
|
|
169
|
-
* @return {
|
|
170
|
+
* @return {LayoutNode}
|
|
170
171
|
*/
|
|
171
|
-
|
|
172
|
+
getNode($el: DOMTarget): LayoutNode;
|
|
172
173
|
/**
|
|
173
174
|
* @param {DOMTarget} $el
|
|
174
175
|
* @param {String} prop
|
|
175
|
-
* @return {Number|String
|
|
176
|
+
* @return {Number|String}
|
|
176
177
|
*/
|
|
177
|
-
|
|
178
|
+
getComputedValue($el: DOMTarget, prop: string): number | string;
|
|
178
179
|
/**
|
|
179
180
|
* @param {LayoutNode|null} rootNode
|
|
180
181
|
* @param {LayoutNodeIterator} cb
|
|
@@ -208,4 +209,9 @@ declare class LayoutSnapshot {
|
|
|
208
209
|
import type { Timeline } from '../timeline/timeline.js';
|
|
209
210
|
import type { WAAPIAnimation } from '../waapi/waapi.js';
|
|
210
211
|
import type { DOMTargetSelector } from '../types/index.js';
|
|
212
|
+
import type { FunctionValue } from '../types/index.js';
|
|
213
|
+
import type { EasingParam } from '../types/index.js';
|
|
214
|
+
import type { TimerParams } from '../types/index.js';
|
|
215
|
+
import type { TickableCallbacks } from '../types/index.js';
|
|
216
|
+
import type { RenderableCallbacks } from '../types/index.js';
|
|
211
217
|
export {};
|