@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.
@@ -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 s(e){return"springs"in e}function o(e){return"css"in e&&typeof e.css=="function"}function a(e){return"tick"in e&&typeof e.tick=="function"}function c(e){if(o(e)&&a(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 n=await e;return s(n)?(n.springs.forEach(l),n):(c(n),{prepare:n.prepare,wait:n.wait,onStart:n.onStart,onEnd:n.onEnd,springs:[{spring:n.spring,tick:n.tick,css:n.css}],schedule:"parallel"})}function S(e,n){const u=e.schedule??"parallel",f=e.springs.map(r=>{let t;switch(u){case"parallel":t=0;break;case"sequential":t=1;break;case"stagger":t=Math.max(0,Math.min(1,r.offset??0));break;default:t=0}const{css:i,offset:w,...g}=r,d=i?typeof i=="function"?n?{element:n,style:i}:void 0:{element:i.element,style:i.style}:void 0;return{...g,css:d,normalizedOffset:t}}),{schedule:k,...p}=e;return{...p,springs:f}}exports.isCssAnimation=o;exports.isMultiSpring=s;exports.isSingleSpring=h;exports.isTickAnimation=a;exports.normalizeMultiSpringSchedule=S;exports.normalizeToMultiSpring=m;exports.validateAnimationMode=c;exports.validateSpringItem=l;
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;
@@ -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 g(n) {
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) : (g(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
- spring: e.spring,
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 w(n, e) {
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: h, ...o } = n;
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
- w as normalizeMultiSpringSchedule,
73
+ y as normalizeMultiSpringSchedule,
74
74
  S as normalizeToMultiSpring,
75
- g as validateAnimationMode,
75
+ h as validateAnimationMode,
76
76
  d as validateSpringItem
77
77
  };
@@ -1,6 +1,6 @@
1
1
  import { Transition, TransitionKey, TransitionScope } from '@ssgoi/core';
2
2
  type TransitionOptions = Transition<undefined> & {
3
- key?: TransitionKey;
3
+ key: TransitionKey;
4
4
  scope?: TransitionScope;
5
5
  };
6
6
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ssgoi/solid",
3
- "version": "0.0.1",
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": "^3.2.2"
48
+ "@ssgoi/core": "^4.0.0"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/node": "^24.10.1",