motion-v 0.5.0-beta.1 → 0.5.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/cjs/index.js
CHANGED
|
@@ -6970,6 +6970,7 @@ let id = 0;
|
|
|
6970
6970
|
class MotionState {
|
|
6971
6971
|
constructor(options, parent) {
|
|
6972
6972
|
this.element = null;
|
|
6973
|
+
this.isFirstAnimate = true;
|
|
6973
6974
|
this.activeStates = {
|
|
6974
6975
|
initial: true,
|
|
6975
6976
|
animate: true
|
|
@@ -7083,6 +7084,12 @@ class MotionState {
|
|
|
7083
7084
|
const animationOptions = {};
|
|
7084
7085
|
let transition;
|
|
7085
7086
|
for (const name of STATE_TYPES) {
|
|
7087
|
+
if (name === "initial") {
|
|
7088
|
+
if (!this.isFirstAnimate) {
|
|
7089
|
+
continue;
|
|
7090
|
+
}
|
|
7091
|
+
this.isFirstAnimate = false;
|
|
7092
|
+
}
|
|
7086
7093
|
if (!this.activeStates[name])
|
|
7087
7094
|
continue;
|
|
7088
7095
|
const definition = isDef(this.options[name]) ? this.options[name] : this.context[name];
|
|
@@ -16,6 +16,7 @@ let id = 0;
|
|
|
16
16
|
class MotionState {
|
|
17
17
|
constructor(options, parent) {
|
|
18
18
|
this.element = null;
|
|
19
|
+
this.isFirstAnimate = true;
|
|
19
20
|
this.activeStates = {
|
|
20
21
|
initial: true,
|
|
21
22
|
animate: true
|
|
@@ -129,6 +130,12 @@ class MotionState {
|
|
|
129
130
|
const animationOptions = {};
|
|
130
131
|
let transition;
|
|
131
132
|
for (const name of STATE_TYPES) {
|
|
133
|
+
if (name === "initial") {
|
|
134
|
+
if (!this.isFirstAnimate) {
|
|
135
|
+
continue;
|
|
136
|
+
}
|
|
137
|
+
this.isFirstAnimate = false;
|
|
138
|
+
}
|
|
132
139
|
if (!this.activeStates[name])
|
|
133
140
|
continue;
|
|
134
141
|
const definition = isDef(this.options[name]) ? this.options[name] : this.context[name];
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "motion-v",
|
|
3
|
-
"version": "0.5.0-beta.
|
|
3
|
+
"version": "0.5.0-beta.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"homepage": "https://github.com/
|
|
7
|
+
"homepage": "https://github.com/unovue/motion-vue",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
|
-
"url": "https://github.com/
|
|
10
|
+
"url": "https://github.com/unovue/motion-vue.git"
|
|
11
11
|
},
|
|
12
12
|
"keywords": [
|
|
13
13
|
"vue",
|
|
@@ -62,6 +62,7 @@
|
|
|
62
62
|
"@vue/test-utils": "^2.4.5",
|
|
63
63
|
"framer-motion": "^11.0.0",
|
|
64
64
|
"jsdom": "^24.0.0",
|
|
65
|
+
"vite": "^5.4.8",
|
|
65
66
|
"vite-plugin-dts": "^4.2.4",
|
|
66
67
|
"vitest": "^1.4.0"
|
|
67
68
|
},
|