animejs 4.3.0-beta.0 → 4.3.0-beta.2
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/bundles/anime.esm.js +16 -27
- package/dist/bundles/anime.esm.min.js +2 -2
- package/dist/bundles/anime.umd.js +16 -27
- package/dist/bundles/anime.umd.min.js +2 -2
- package/dist/modules/animatable/animatable.cjs +1 -1
- package/dist/modules/animatable/animatable.js +1 -1
- package/dist/modules/animatable/index.cjs +1 -1
- package/dist/modules/animatable/index.js +1 -1
- package/dist/modules/animation/additive.cjs +1 -1
- package/dist/modules/animation/additive.js +1 -1
- package/dist/modules/animation/animation.cjs +1 -1
- package/dist/modules/animation/animation.js +1 -1
- package/dist/modules/animation/composition.cjs +1 -1
- package/dist/modules/animation/composition.js +1 -1
- package/dist/modules/animation/index.cjs +1 -1
- package/dist/modules/animation/index.js +1 -1
- package/dist/modules/core/clock.cjs +1 -1
- package/dist/modules/core/clock.js +1 -1
- package/dist/modules/core/colors.cjs +1 -1
- package/dist/modules/core/colors.js +1 -1
- package/dist/modules/core/consts.cjs +1 -1
- package/dist/modules/core/consts.js +1 -1
- package/dist/modules/core/globals.cjs +2 -2
- package/dist/modules/core/globals.js +2 -2
- package/dist/modules/core/helpers.cjs +1 -1
- package/dist/modules/core/helpers.js +1 -1
- package/dist/modules/core/render.cjs +1 -1
- package/dist/modules/core/render.js +1 -1
- package/dist/modules/core/styles.cjs +1 -1
- package/dist/modules/core/styles.js +1 -1
- package/dist/modules/core/targets.cjs +1 -1
- package/dist/modules/core/targets.js +1 -1
- package/dist/modules/core/transforms.cjs +1 -1
- package/dist/modules/core/transforms.js +1 -1
- package/dist/modules/core/units.cjs +1 -1
- package/dist/modules/core/units.js +1 -1
- package/dist/modules/core/values.cjs +1 -1
- package/dist/modules/core/values.js +1 -1
- package/dist/modules/draggable/draggable.cjs +1 -1
- package/dist/modules/draggable/draggable.js +1 -1
- package/dist/modules/draggable/index.cjs +1 -1
- package/dist/modules/draggable/index.js +1 -1
- package/dist/modules/easings/cubic-bezier/index.cjs +1 -1
- package/dist/modules/easings/cubic-bezier/index.js +1 -1
- package/dist/modules/easings/eases/index.cjs +1 -1
- package/dist/modules/easings/eases/index.js +1 -1
- package/dist/modules/easings/eases/parser.cjs +1 -1
- package/dist/modules/easings/eases/parser.js +1 -1
- package/dist/modules/easings/index.cjs +1 -1
- package/dist/modules/easings/index.js +1 -1
- package/dist/modules/easings/irregular/index.cjs +1 -1
- package/dist/modules/easings/irregular/index.js +1 -1
- package/dist/modules/easings/linear/index.cjs +1 -1
- package/dist/modules/easings/linear/index.js +1 -1
- package/dist/modules/easings/none.cjs +1 -1
- package/dist/modules/easings/none.js +1 -1
- package/dist/modules/easings/spring/index.cjs +1 -1
- package/dist/modules/easings/spring/index.js +1 -1
- package/dist/modules/easings/steps/index.cjs +1 -1
- package/dist/modules/easings/steps/index.js +1 -1
- package/dist/modules/engine/engine.cjs +1 -1
- package/dist/modules/engine/engine.js +1 -1
- package/dist/modules/engine/index.cjs +1 -1
- package/dist/modules/engine/index.js +1 -1
- package/dist/modules/events/index.cjs +1 -1
- package/dist/modules/events/index.js +1 -1
- package/dist/modules/events/scroll.cjs +1 -1
- package/dist/modules/events/scroll.js +1 -1
- package/dist/modules/index.cjs +1 -1
- package/dist/modules/index.js +1 -1
- package/dist/modules/layout/index.cjs +1 -1
- package/dist/modules/layout/index.js +1 -1
- package/dist/modules/layout/layout.cjs +15 -26
- package/dist/modules/layout/layout.d.ts +3 -3
- package/dist/modules/layout/layout.js +15 -26
- package/dist/modules/scope/index.cjs +1 -1
- package/dist/modules/scope/index.js +1 -1
- package/dist/modules/scope/scope.cjs +1 -1
- package/dist/modules/scope/scope.js +1 -1
- package/dist/modules/svg/drawable.cjs +1 -1
- package/dist/modules/svg/drawable.js +1 -1
- package/dist/modules/svg/helpers.cjs +1 -1
- package/dist/modules/svg/helpers.js +1 -1
- package/dist/modules/svg/index.cjs +1 -1
- package/dist/modules/svg/index.js +1 -1
- package/dist/modules/svg/morphto.cjs +1 -1
- package/dist/modules/svg/morphto.js +1 -1
- package/dist/modules/svg/motionpath.cjs +1 -1
- package/dist/modules/svg/motionpath.js +1 -1
- package/dist/modules/text/index.cjs +1 -1
- package/dist/modules/text/index.js +1 -1
- package/dist/modules/text/split.cjs +1 -1
- package/dist/modules/text/split.js +1 -1
- package/dist/modules/timeline/index.cjs +1 -1
- package/dist/modules/timeline/index.js +1 -1
- package/dist/modules/timeline/position.cjs +1 -1
- package/dist/modules/timeline/position.js +1 -1
- package/dist/modules/timeline/timeline.cjs +1 -1
- package/dist/modules/timeline/timeline.js +1 -1
- package/dist/modules/timer/index.cjs +1 -1
- package/dist/modules/timer/index.js +1 -1
- package/dist/modules/timer/timer.cjs +1 -1
- package/dist/modules/timer/timer.js +1 -1
- package/dist/modules/utils/chainable.cjs +1 -1
- package/dist/modules/utils/chainable.js +1 -1
- package/dist/modules/utils/index.cjs +1 -1
- package/dist/modules/utils/index.js +1 -1
- package/dist/modules/utils/number.cjs +1 -1
- package/dist/modules/utils/number.js +1 -1
- package/dist/modules/utils/random.cjs +1 -1
- package/dist/modules/utils/random.js +1 -1
- package/dist/modules/utils/stagger.cjs +1 -1
- package/dist/modules/utils/stagger.js +1 -1
- package/dist/modules/utils/target.cjs +1 -1
- package/dist/modules/utils/target.js +1 -1
- package/dist/modules/utils/time.cjs +1 -1
- package/dist/modules/utils/time.js +1 -1
- package/dist/modules/waapi/composition.cjs +1 -1
- package/dist/modules/waapi/composition.js +1 -1
- package/dist/modules/waapi/index.cjs +1 -1
- package/dist/modules/waapi/index.js +1 -1
- package/dist/modules/waapi/waapi.cjs +1 -1
- package/dist/modules/waapi/waapi.js +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Anime.js - ESM bundle
|
|
3
|
-
* @version v4.3.0-beta.
|
|
3
|
+
* @version v4.3.0-beta.2
|
|
4
4
|
* @license MIT
|
|
5
5
|
* @copyright 2025 - Julian Garnier
|
|
6
6
|
*/
|
|
@@ -801,7 +801,7 @@ const globals = {
|
|
|
801
801
|
|
|
802
802
|
const devTools = isBrowser && win.AnimeJSDevTools;
|
|
803
803
|
|
|
804
|
-
const globalVersions = { version: '4.3.0-beta.
|
|
804
|
+
const globalVersions = { version: '4.3.0-beta.2', engine: null };
|
|
805
805
|
|
|
806
806
|
if (isBrowser) {
|
|
807
807
|
if (!win.AnimeJS) win.AnimeJS = [];
|
|
@@ -7796,8 +7796,8 @@ const waapi = {
|
|
|
7796
7796
|
|
|
7797
7797
|
/**
|
|
7798
7798
|
* @typedef {Object} LayoutAnimationParams
|
|
7799
|
-
* @property {Number} [duration]
|
|
7800
7799
|
* @property {Number|FunctionValue} [delay]
|
|
7800
|
+
* @property {Number|FunctionValue} [duration]
|
|
7801
7801
|
* @property {EasingParam} [ease]
|
|
7802
7802
|
* @property {LayoutStateParams} [frozen]
|
|
7803
7803
|
* @property {LayoutStateParams} [added]
|
|
@@ -8600,12 +8600,12 @@ class AutoLayout {
|
|
|
8600
8600
|
this.children = params.children || '*';
|
|
8601
8601
|
/** @type {Boolean} */
|
|
8602
8602
|
this.absoluteCoords = false;
|
|
8603
|
-
/** @type {Number} */
|
|
8603
|
+
/** @type {Number|FunctionValue} */
|
|
8604
8604
|
this.duration = setValue(params.duration, 500);
|
|
8605
8605
|
/** @type {Number|FunctionValue} */
|
|
8606
8606
|
this.delay = setValue(params.delay, 0);
|
|
8607
8607
|
/** @type {EasingParam} */
|
|
8608
|
-
this.ease = setValue(params.ease, '
|
|
8608
|
+
this.ease = setValue(params.ease, 'inOut(3.5)');
|
|
8609
8609
|
/** @type {Callback<this>} */
|
|
8610
8610
|
this.onComplete = setValue(params.onComplete, /** @type {Callback<this>} */(noop));
|
|
8611
8611
|
/** @type {LayoutStateParams} */
|
|
@@ -8773,26 +8773,16 @@ class AutoLayout {
|
|
|
8773
8773
|
|
|
8774
8774
|
// Recalculate postion relative to their parent for elements that have been moved
|
|
8775
8775
|
if (!oldStateNode.measuredIsRemoved && !isRemovedNow && !hasNoOldState && (parentChanged || elementChanged)) {
|
|
8776
|
-
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
|
|
8781
|
-
|
|
8782
|
-
|
|
8783
|
-
|
|
8784
|
-
|
|
8785
|
-
|
|
8786
|
-
let oldOffsetY = 0;
|
|
8787
|
-
let oldCurrent = oldStateNode.parentNode;
|
|
8788
|
-
while (oldCurrent) {
|
|
8789
|
-
oldOffsetX += oldCurrent.properties.x || 0;
|
|
8790
|
-
oldOffsetY += oldCurrent.properties.y || 0;
|
|
8791
|
-
if (oldCurrent.parentNode === oldState.rootNode) break;
|
|
8792
|
-
oldCurrent = oldCurrent.parentNode;
|
|
8793
|
-
}
|
|
8794
|
-
oldStateNode.properties.x += oldOffsetX - offsetX;
|
|
8795
|
-
oldStateNode.properties.y += oldOffsetY - offsetY;
|
|
8776
|
+
const oldAbsoluteLeft = oldStateNode.properties.left;
|
|
8777
|
+
const oldAbsoluteTop = oldStateNode.properties.top;
|
|
8778
|
+
const newParent = parent || newState.rootNode;
|
|
8779
|
+
const oldParent = newParent.id ? oldState.nodes.get(newParent.id) : null;
|
|
8780
|
+
const parentLeft = oldParent ? oldParent.properties.left : newParent.properties.left;
|
|
8781
|
+
const parentTop = oldParent ? oldParent.properties.top : newParent.properties.top;
|
|
8782
|
+
const borderLeft = oldParent ? oldParent.properties.clientLeft : newParent.properties.clientLeft;
|
|
8783
|
+
const borderTop = oldParent ? oldParent.properties.clientTop : newParent.properties.clientTop;
|
|
8784
|
+
oldStateNode.properties.x = oldAbsoluteLeft - parentLeft - borderLeft;
|
|
8785
|
+
oldStateNode.properties.y = oldAbsoluteTop - parentTop - borderTop;
|
|
8796
8786
|
}
|
|
8797
8787
|
|
|
8798
8788
|
if (node.hasVisibilitySwap) {
|
|
@@ -8942,8 +8932,7 @@ class AutoLayout {
|
|
|
8942
8932
|
// Don't animate dimensions and positions of inlined elements
|
|
8943
8933
|
if (!newNode.isInlined) {
|
|
8944
8934
|
// Display grid can mess with the absolute positioning, so set it to block during transition
|
|
8945
|
-
|
|
8946
|
-
$el.style.display = 'block';
|
|
8935
|
+
if (oldNode.measuredDisplay === 'grid' || newNode.measuredDisplay === 'grid') $el.style.display = 'block';
|
|
8947
8936
|
// All children must be in position absolue
|
|
8948
8937
|
if ($el !== root || this.absoluteCoords) {
|
|
8949
8938
|
$el.style.position = this.absoluteCoords ? 'fixed' : 'absolute';
|