@ssgoi/solid 0.0.1 → 4.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
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function h(e){return("tick"in e||"css"in e)&&!("springs"in e)}function
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function h(e){return("tick"in e||"css"in e)&&!("springs"in e)}function r(e){return"springs"in e}function o(e){return"css"in e&&typeof e.css=="function"}function c(e){return"tick"in e&&typeof e.tick=="function"}function a(e){if(o(e)&&c(e))throw new Error("SingleSpringConfig cannot have both 'tick' and 'css' defined. Use one or the other.")}function l(e){if(e.tick&&e.css)throw new Error("SpringItem cannot have both 'tick' and 'css' defined. Use one or the other.")}async function m(e){const t=await e;return r(t)?(t.springs.forEach(l),t):(a(t),{prepare:t.prepare,wait:t.wait,onStart:t.onStart,onEnd:t.onEnd,springs:[{physics:t.physics,tick:t.tick,css:t.css}],schedule:"parallel"})}function S(e,t){const u=e.schedule??"parallel",f=e.springs.map(s=>{let n;switch(u){case"parallel":n=0;break;case"sequential":n=1;break;case"stagger":n=Math.max(0,Math.min(1,s.offset??0));break;default:n=0}const{css:i,offset:y,...d}=s,g=i?typeof i=="function"?t?{element:t,style:i}:void 0:{element:i.element,style:i.style}:void 0;return{...d,css:g,normalizedOffset:n}}),{schedule:k,...p}=e;return{...p,springs:f}}exports.isCssAnimation=o;exports.isMultiSpring=r;exports.isSingleSpring=h;exports.isTickAnimation=c;exports.normalizeMultiSpringSchedule=S;exports.normalizeToMultiSpring=m;exports.validateAnimationMode=a;exports.validateSpringItem=l;
|
package/dist/core/dist/types.js
CHANGED
|
@@ -10,7 +10,7 @@ function p(n) {
|
|
|
10
10
|
function u(n) {
|
|
11
11
|
return "tick" in n && typeof n.tick == "function";
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function h(n) {
|
|
14
14
|
if (p(n) && u(n))
|
|
15
15
|
throw new Error(
|
|
16
16
|
"SingleSpringConfig cannot have both 'tick' and 'css' defined. Use one or the other."
|
|
@@ -24,14 +24,14 @@ function d(n) {
|
|
|
24
24
|
}
|
|
25
25
|
async function S(n) {
|
|
26
26
|
const e = await n;
|
|
27
|
-
return f(e) ? (e.springs.forEach(d), e) : (
|
|
27
|
+
return f(e) ? (e.springs.forEach(d), e) : (h(e), {
|
|
28
28
|
prepare: e.prepare,
|
|
29
29
|
wait: e.wait,
|
|
30
30
|
onStart: e.onStart,
|
|
31
31
|
onEnd: e.onEnd,
|
|
32
32
|
springs: [
|
|
33
33
|
{
|
|
34
|
-
|
|
34
|
+
physics: e.physics,
|
|
35
35
|
tick: e.tick,
|
|
36
36
|
css: e.css
|
|
37
37
|
}
|
|
@@ -39,7 +39,7 @@ async function S(n) {
|
|
|
39
39
|
schedule: "parallel"
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function y(n, e) {
|
|
43
43
|
const r = n.schedule ?? "parallel", a = n.springs.map(
|
|
44
44
|
(s) => {
|
|
45
45
|
let t;
|
|
@@ -59,7 +59,7 @@ function w(n, e) {
|
|
|
59
59
|
const { css: i, offset: m, ...c } = s, l = i ? typeof i == "function" ? e ? { element: e, style: i } : void 0 : { element: i.element, style: i.style } : void 0;
|
|
60
60
|
return { ...c, css: l, normalizedOffset: t };
|
|
61
61
|
}
|
|
62
|
-
), { schedule:
|
|
62
|
+
), { schedule: g, ...o } = n;
|
|
63
63
|
return {
|
|
64
64
|
...o,
|
|
65
65
|
springs: a
|
|
@@ -70,8 +70,8 @@ export {
|
|
|
70
70
|
f as isMultiSpring,
|
|
71
71
|
k as isSingleSpring,
|
|
72
72
|
u as isTickAnimation,
|
|
73
|
-
|
|
73
|
+
y as normalizeMultiSpringSchedule,
|
|
74
74
|
S as normalizeToMultiSpring,
|
|
75
|
-
|
|
75
|
+
h as validateAnimationMode,
|
|
76
76
|
d as validateSpringItem
|
|
77
77
|
};
|
package/dist/transition.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ssgoi/solid",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "4.0.0",
|
|
4
4
|
"description": "Solid.js bindings for SSGOI - Native app-like page transitions for Solid 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": "^4.0.0"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@types/node": "^24.10.1",
|