@ssgoi/vue 3.1.0 → 5.0.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/dist/core/dist/types.cjs +1 -1
- package/dist/core/dist/types.js +32 -37
- package/dist/index.cjs +1 -1
- package/dist/index.js +14 -16
- package/dist/types.cjs +1 -1
- package/dist/types.js +7 -9
- package/package.json +2 -2
package/dist/core/dist/types.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function m(n){return("tick"in n||"css"in n)&&!("items"in n)}function a(n){return"items"in n}function d(n){return"css"in n&&typeof n.css=="function"}function f(n){return"tick"in n&&typeof n.tick=="function"}async function p(n){const e=await n;return a(e)?{prepare:e.prepare,wait:e.wait,onReady:e.onReady,onStart:e.onStart,onEnd:e.onEnd,items:e.items,schedule:e.schedule}:{prepare:e.prepare,wait:e.wait,onReady:e.onReady,onStart:e.onStart,onEnd:e.onEnd,items:[{physics:e.physics,tick:e.tick,css:e.css}],schedule:"parallel"}}function y(n,e){const o=n.schedule??"parallel",c=n.items.map(s=>{let t;switch(o){case"parallel":t=0;break;case"sequential":t=1;break;case"stagger":t=Math.max(0,Math.min(1,s.offset??0));break;default:t=0}const{css:i,offset:k,...l}=s,u=i?typeof i=="function"?e?{element:e,style:i}:void 0:{element:i.element,style:i.style}:void 0;return{...l,css:u,normalizedOffset:t}}),{schedule:h,...r}=n;return{...r,items:c}}exports.isCssAnimation=d;exports.isMultiAnimation=a;exports.isSingleAnimation=m;exports.isTickAnimation=f;exports.normalizeSchedule=y;exports.normalizeToMultiAnimation=p;
|
package/dist/core/dist/types.js
CHANGED
|
@@ -1,49 +1,46 @@
|
|
|
1
|
-
function
|
|
2
|
-
return ("tick" in n || "css" in n) && !("
|
|
1
|
+
function d(n) {
|
|
2
|
+
return ("tick" in n || "css" in n) && !("items" in n);
|
|
3
3
|
}
|
|
4
|
-
function
|
|
5
|
-
return "
|
|
4
|
+
function u(n) {
|
|
5
|
+
return "items" in n;
|
|
6
6
|
}
|
|
7
7
|
function p(n) {
|
|
8
8
|
return "css" in n && typeof n.css == "function";
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function y(n) {
|
|
11
11
|
return "tick" in n && typeof n.tick == "function";
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
if (p(n) && u(n))
|
|
15
|
-
throw new Error(
|
|
16
|
-
"SingleSpringConfig cannot have both 'tick' and 'css' defined. Use one or the other."
|
|
17
|
-
);
|
|
18
|
-
}
|
|
19
|
-
function d(n) {
|
|
20
|
-
if (n.tick && n.css)
|
|
21
|
-
throw new Error(
|
|
22
|
-
"SpringItem cannot have both 'tick' and 'css' defined. Use one or the other."
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
async function S(n) {
|
|
13
|
+
async function h(n) {
|
|
26
14
|
const e = await n;
|
|
27
|
-
return
|
|
15
|
+
return u(e) ? {
|
|
28
16
|
prepare: e.prepare,
|
|
29
17
|
wait: e.wait,
|
|
18
|
+
onReady: e.onReady,
|
|
30
19
|
onStart: e.onStart,
|
|
31
20
|
onEnd: e.onEnd,
|
|
32
|
-
|
|
21
|
+
items: e.items,
|
|
22
|
+
schedule: e.schedule
|
|
23
|
+
} : {
|
|
24
|
+
prepare: e.prepare,
|
|
25
|
+
wait: e.wait,
|
|
26
|
+
onReady: e.onReady,
|
|
27
|
+
onStart: e.onStart,
|
|
28
|
+
onEnd: e.onEnd,
|
|
29
|
+
items: [
|
|
33
30
|
{
|
|
34
|
-
|
|
31
|
+
physics: e.physics,
|
|
35
32
|
tick: e.tick,
|
|
36
33
|
css: e.css
|
|
37
34
|
}
|
|
38
35
|
],
|
|
39
36
|
schedule: "parallel"
|
|
40
|
-
}
|
|
37
|
+
};
|
|
41
38
|
}
|
|
42
|
-
function
|
|
43
|
-
const
|
|
39
|
+
function k(n, e) {
|
|
40
|
+
const a = n.schedule ?? "parallel", o = n.items.map(
|
|
44
41
|
(s) => {
|
|
45
42
|
let t;
|
|
46
|
-
switch (
|
|
43
|
+
switch (a) {
|
|
47
44
|
case "parallel":
|
|
48
45
|
t = 0;
|
|
49
46
|
break;
|
|
@@ -56,22 +53,20 @@ function w(n, e) {
|
|
|
56
53
|
default:
|
|
57
54
|
t = 0;
|
|
58
55
|
}
|
|
59
|
-
const { css: i, offset:
|
|
60
|
-
return { ...
|
|
56
|
+
const { css: i, offset: f, ...r } = s, l = i ? typeof i == "function" ? e ? { element: e, style: i } : void 0 : { element: i.element, style: i.style } : void 0;
|
|
57
|
+
return { ...r, css: l, normalizedOffset: t };
|
|
61
58
|
}
|
|
62
|
-
), { schedule:
|
|
59
|
+
), { schedule: m, ...c } = n;
|
|
63
60
|
return {
|
|
64
|
-
...
|
|
65
|
-
|
|
61
|
+
...c,
|
|
62
|
+
items: o
|
|
66
63
|
};
|
|
67
64
|
}
|
|
68
65
|
export {
|
|
69
66
|
p as isCssAnimation,
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
g as validateAnimationMode,
|
|
76
|
-
d as validateSpringItem
|
|
67
|
+
u as isMultiAnimation,
|
|
68
|
+
d as isSingleAnimation,
|
|
69
|
+
y as isTickAnimation,
|
|
70
|
+
k as normalizeSchedule,
|
|
71
|
+
h as normalizeToMultiAnimation
|
|
77
72
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./vue/src/lib/transition.cjs"),i=require("./core/dist/types.cjs"),t=require("./vue/src/lib/ssgoi.vue.cjs"),e=require("./vue/src/lib/ssgoi-transition.vue.cjs"),s=require("./vue/src/lib/transition-scope.vue.cjs");exports.transition=n.transition;exports.vTransition=n.vTransition;exports.isCssAnimation=i.isCssAnimation;exports.isMultiAnimation=i.isMultiAnimation;exports.isSingleAnimation=i.isSingleAnimation;exports.isTickAnimation=i.isTickAnimation;exports.normalizeSchedule=i.normalizeSchedule;exports.normalizeToMultiAnimation=i.normalizeToMultiAnimation;exports.Ssgoi=t.default;exports.SsgoiTransition=e.default;exports.TransitionScope=s.default;
|
package/dist/index.js
CHANGED
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
import { transition as n, vTransition as t } from "./vue/src/lib/transition.js";
|
|
2
|
-
import { isCssAnimation as
|
|
3
|
-
import { default as
|
|
4
|
-
import { default as
|
|
5
|
-
import { default as
|
|
2
|
+
import { isCssAnimation as r, isMultiAnimation as s, isSingleAnimation as e, isTickAnimation as m, normalizeSchedule as l, normalizeToMultiAnimation as f } from "./core/dist/types.js";
|
|
3
|
+
import { default as u } from "./vue/src/lib/ssgoi.vue.js";
|
|
4
|
+
import { default as A } from "./vue/src/lib/ssgoi-transition.vue.js";
|
|
5
|
+
import { default as T } from "./vue/src/lib/transition-scope.vue.js";
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
7
|
+
u as Ssgoi,
|
|
8
|
+
A as SsgoiTransition,
|
|
9
|
+
T as TransitionScope,
|
|
10
|
+
r as isCssAnimation,
|
|
11
|
+
s as isMultiAnimation,
|
|
12
|
+
e as isSingleAnimation,
|
|
13
|
+
m as isTickAnimation,
|
|
14
|
+
l as normalizeSchedule,
|
|
15
|
+
f as normalizeToMultiAnimation,
|
|
16
16
|
n as transition,
|
|
17
|
-
t as vTransition
|
|
18
|
-
S as validateAnimationMode,
|
|
19
|
-
f as validateSpringItem
|
|
17
|
+
t as vTransition
|
|
20
18
|
};
|
package/dist/types.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./core/dist/types.cjs");exports.isCssAnimation=i.isCssAnimation;exports.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./core/dist/types.cjs");exports.isCssAnimation=i.isCssAnimation;exports.isMultiAnimation=i.isMultiAnimation;exports.isSingleAnimation=i.isSingleAnimation;exports.isTickAnimation=i.isTickAnimation;exports.normalizeSchedule=i.normalizeSchedule;exports.normalizeToMultiAnimation=i.normalizeToMultiAnimation;
|
package/dist/types.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { isCssAnimation as
|
|
1
|
+
import { isCssAnimation as o, isMultiAnimation as m, isSingleAnimation as t, isTickAnimation as a, normalizeSchedule as e, normalizeToMultiAnimation as l } from "./core/dist/types.js";
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
m as validateAnimationMode,
|
|
10
|
-
S as validateSpringItem
|
|
3
|
+
o as isCssAnimation,
|
|
4
|
+
m as isMultiAnimation,
|
|
5
|
+
t as isSingleAnimation,
|
|
6
|
+
a as isTickAnimation,
|
|
7
|
+
e as normalizeSchedule,
|
|
8
|
+
l as normalizeToMultiAnimation
|
|
11
9
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ssgoi/vue",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Vue bindings for SSGOI - Native app-like page transitions for Vue applications",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@ssgoi/core": "^
|
|
48
|
+
"@ssgoi/core": "^5.0.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"vue": "^3.5.0"
|