@ssgoi/solid 5.2.0 → 6.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/index.cjs +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +6 -16
- package/dist/ssgoi-transition.cjs +1 -0
- package/dist/ssgoi-transition.js +26 -0
- package/dist/ssgoi.cjs +1 -0
- package/dist/ssgoi.d.ts +2 -0
- package/dist/ssgoi.js +20 -0
- package/dist/types.cjs +1 -1
- package/dist/types.js +1 -10
- package/dist/view-transitions.cjs +1 -0
- package/dist/view-transitions.d.ts +1 -0
- package/dist/view-transitions.js +1 -0
- package/package.json +11 -19
- package/dist/core/dist/types.cjs +0 -1
- package/dist/core/dist/types.js +0 -80
- package/dist/presets/index.cjs +0 -1
- package/dist/presets/index.d.ts +0 -1
- package/dist/presets/index.js +0 -1
- package/dist/solid/src/lib/ssgoi-transition.cjs +0 -1
- package/dist/solid/src/lib/ssgoi-transition.js +0 -27
- package/dist/solid/src/lib/ssgoi.cjs +0 -1
- package/dist/solid/src/lib/ssgoi.js +0 -22
- package/dist/solid/src/lib/transition-scope.cjs +0 -1
- package/dist/solid/src/lib/transition-scope.js +0 -16
- package/dist/solid/src/lib/transition.cjs +0 -1
- package/dist/solid/src/lib/transition.js +0 -5
- package/dist/transition-scope.d.ts +0 -28
- package/dist/transition.d.ts +0 -22
- package/dist/transitions/index.cjs +0 -1
- package/dist/transitions/index.d.ts +0 -1
- package/dist/transitions/index.js +0 -1
- package/dist/view-transitions/index.cjs +0 -1
- package/dist/view-transitions/index.d.ts +0 -1
- package/dist/view-transitions/index.js +0 -1
- /package/dist/{solid/src/lib/context.cjs → context.cjs} +0 -0
- /package/dist/{solid/src/lib/context.js → context.js} +0 -0
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 t=require("@ssgoi/core/types"),o=require("./ssgoi.cjs"),i=require("./ssgoi-transition.cjs"),r=require("@ssgoi/core");exports.Ssgoi=o.Ssgoi;exports.SsgoiTransition=i.SsgoiTransition;Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});Object.keys(r).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>r[e]})});
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,18 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
import { TransitionScope as c } from "./solid/src/lib/transition-scope.js";
|
|
1
|
+
export * from "@ssgoi/core/types";
|
|
2
|
+
import { Ssgoi as e } from "./ssgoi.js";
|
|
3
|
+
import { SsgoiTransition as i } from "./ssgoi-transition.js";
|
|
4
|
+
export * from "@ssgoi/core";
|
|
6
5
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
c as TransitionScope,
|
|
10
|
-
r as isCssAnimation,
|
|
11
|
-
m as isKeyframesAnimation,
|
|
12
|
-
e as isMultiAnimation,
|
|
13
|
-
s as isSingleAnimation,
|
|
14
|
-
a as isTickAnimation,
|
|
15
|
-
f as normalizeSchedule,
|
|
16
|
-
l as normalizeToMultiAnimation,
|
|
17
|
-
n as transition
|
|
6
|
+
e as Ssgoi,
|
|
7
|
+
i as SsgoiTransition
|
|
18
8
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("solid-js/web"),a=require("solid-js"),l=require("./context.cjs"),u=t=>{const[e,o]=a.splitProps(t,["children","id","as","class"]),n=l.useSsgoi(),i=e.as||"div";return r.createComponent(r.Dynamic,r.mergeProps({component:i,ref(c){var s=n.refFor(e.id);typeof s=="function"&&s(c)},get"data-ssgoi-transition"(){return e.id},get class(){return e.class}},o,{get children(){return e.children}}))};exports.SsgoiTransition=u;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { createComponent as c, Dynamic as a, mergeProps as m } from "solid-js/web";
|
|
2
|
+
import { splitProps as p } from "solid-js";
|
|
3
|
+
import { useSsgoi as l } from "./context.js";
|
|
4
|
+
const u = (t) => {
|
|
5
|
+
const [r, s] = p(t, ["children", "id", "as", "class"]), e = l(), n = r.as || "div";
|
|
6
|
+
return c(a, m({
|
|
7
|
+
component: n,
|
|
8
|
+
ref(i) {
|
|
9
|
+
var o = e.refFor(r.id);
|
|
10
|
+
typeof o == "function" && o(i);
|
|
11
|
+
},
|
|
12
|
+
get "data-ssgoi-transition"() {
|
|
13
|
+
return r.id;
|
|
14
|
+
},
|
|
15
|
+
get class() {
|
|
16
|
+
return r.class;
|
|
17
|
+
}
|
|
18
|
+
}, s, {
|
|
19
|
+
get children() {
|
|
20
|
+
return r.children;
|
|
21
|
+
}
|
|
22
|
+
}));
|
|
23
|
+
};
|
|
24
|
+
export {
|
|
25
|
+
u as SsgoiTransition
|
|
26
|
+
};
|
package/dist/ssgoi.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("solid-js/web"),o=require("solid-js"),n=require("./context.cjs"),i=require("@ssgoi/core/internal"),c=e=>{const t=o.createMemo(()=>i.createSggoiTransitionContext(e.config,{host:e.host}));return r.createComponent(n.SsgoiProvider,{get value(){return t()},get children(){return e.children}})};exports.Ssgoi=c;
|
package/dist/ssgoi.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { JSX } from 'solid-js';
|
|
2
2
|
import { SsgoiConfig } from './types';
|
|
3
|
+
import { HostAnimation } from '@ssgoi/core/internal';
|
|
3
4
|
interface SsgoiProps {
|
|
4
5
|
config: SsgoiConfig;
|
|
6
|
+
host?: HostAnimation;
|
|
5
7
|
children: JSX.Element;
|
|
6
8
|
}
|
|
7
9
|
export declare const Ssgoi: (props: SsgoiProps) => JSX.Element;
|
package/dist/ssgoi.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createComponent as e } from "solid-js/web";
|
|
2
|
+
import { createMemo as r } from "solid-js";
|
|
3
|
+
import { SsgoiProvider as n } from "./context.js";
|
|
4
|
+
import { createSggoiTransitionContext as i } from "@ssgoi/core/internal";
|
|
5
|
+
const f = (t) => {
|
|
6
|
+
const o = r(() => i(t.config, {
|
|
7
|
+
host: t.host
|
|
8
|
+
}));
|
|
9
|
+
return e(n, {
|
|
10
|
+
get value() {
|
|
11
|
+
return o();
|
|
12
|
+
},
|
|
13
|
+
get children() {
|
|
14
|
+
return t.children;
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
};
|
|
18
|
+
export {
|
|
19
|
+
f as Ssgoi
|
|
20
|
+
};
|
package/dist/types.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 t=require("@ssgoi/core/types");Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});
|
package/dist/types.js
CHANGED
|
@@ -1,10 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
o as isCssAnimation,
|
|
4
|
-
m as isKeyframesAnimation,
|
|
5
|
-
a as isMultiAnimation,
|
|
6
|
-
t as isSingleAnimation,
|
|
7
|
-
e as isTickAnimation,
|
|
8
|
-
s as normalizeSchedule,
|
|
9
|
-
l as normalizeToMultiAnimation
|
|
10
|
-
};
|
|
1
|
+
export * from "@ssgoi/core/types";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@ssgoi/core");Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '@ssgoi/core';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@ssgoi/core";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ssgoi/solid",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.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",
|
|
@@ -19,39 +19,31 @@
|
|
|
19
19
|
"require": "./dist/index.cjs",
|
|
20
20
|
"default": "./dist/index.js"
|
|
21
21
|
},
|
|
22
|
-
"./transitions": {
|
|
23
|
-
"types": "./dist/transitions/index.d.ts",
|
|
24
|
-
"import": "./dist/transitions/index.js",
|
|
25
|
-
"require": "./dist/transitions/index.cjs",
|
|
26
|
-
"default": "./dist/transitions/index.js"
|
|
27
|
-
},
|
|
28
|
-
"./view-transitions": {
|
|
29
|
-
"types": "./dist/view-transitions/index.d.ts",
|
|
30
|
-
"import": "./dist/view-transitions/index.js",
|
|
31
|
-
"require": "./dist/view-transitions/index.cjs",
|
|
32
|
-
"default": "./dist/view-transitions/index.js"
|
|
33
|
-
},
|
|
34
22
|
"./types": {
|
|
35
23
|
"types": "./dist/types.d.ts",
|
|
36
24
|
"import": "./dist/types.js",
|
|
37
25
|
"require": "./dist/types.cjs",
|
|
38
26
|
"default": "./dist/types.js"
|
|
39
27
|
},
|
|
40
|
-
"./
|
|
41
|
-
"types": "./dist/
|
|
42
|
-
"import": "./dist/
|
|
43
|
-
"require": "./dist/
|
|
44
|
-
"default": "./dist/
|
|
28
|
+
"./view-transitions": {
|
|
29
|
+
"types": "./dist/view-transitions.d.ts",
|
|
30
|
+
"import": "./dist/view-transitions.js",
|
|
31
|
+
"require": "./dist/view-transitions.cjs",
|
|
32
|
+
"default": "./dist/view-transitions.js"
|
|
45
33
|
}
|
|
46
34
|
},
|
|
47
35
|
"dependencies": {
|
|
48
|
-
"@ssgoi/core": "^
|
|
36
|
+
"@ssgoi/core": "^6.0.0"
|
|
49
37
|
},
|
|
50
38
|
"devDependencies": {
|
|
39
|
+
"@eslint/js": "^9.30.1",
|
|
51
40
|
"@types/node": "^24.10.1",
|
|
41
|
+
"eslint": "^9.30.1",
|
|
42
|
+
"globals": "^16.3.0",
|
|
52
43
|
"rollup-plugin-preserve-directives": "^0.4.0",
|
|
53
44
|
"solid-js": "^1.9.10",
|
|
54
45
|
"typescript": "~5.9.3",
|
|
46
|
+
"typescript-eslint": "^8.35.1",
|
|
55
47
|
"vite": "^7.2.4",
|
|
56
48
|
"vite-plugin-dts": "^4.5.4",
|
|
57
49
|
"vite-plugin-solid": "^2.11.10"
|
package/dist/core/dist/types.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function d(e){return("tick"in e||"css"in e)&&!("items"in e)}function a(e){return"items"in e}function y(e){return"css"in e&&typeof e.css=="function"}function p(e){return"tick"in e&&typeof e.tick=="function"}function o(e){return"keyframes"in e&&e.keyframes!==void 0&&e.keyframes!==null}async function k(e){const n=await e;return a(n)?{prepare:n.prepare,wait:n.wait,onReady:n.onReady,onStart:n.onStart,onEnd:n.onEnd,items:n.items,schedule:n.schedule}:{prepare:n.prepare,wait:n.wait,onReady:n.onReady,onStart:n.onStart,onEnd:n.onEnd,items:[{physics:n.physics,tick:n.tick,css:n.css}],schedule:"parallel"}}function h(e,n){const r=e.schedule??"parallel",c=e.items.map(s=>{let t;switch(r){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}if(o(s)){const{offset:A,...m}=s;return{...m,normalizedOffset:t}}const{css:i,offset:w,...u}=s,f=i?typeof i=="function"?n?{element:n,style:i}:void 0:{element:i.element,style:i.style}:void 0;return{...u,css:f,normalizedOffset:t}}),{schedule:S,...l}=e;return{...l,items:c}}exports.isCssAnimation=y;exports.isKeyframesAnimation=o;exports.isMultiAnimation=a;exports.isSingleAnimation=d;exports.isTickAnimation=p;exports.normalizeSchedule=h;exports.normalizeToMultiAnimation=k;
|
package/dist/core/dist/types.js
DELETED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
function k(n) {
|
|
2
|
-
return ("tick" in n || "css" in n) && !("items" in n);
|
|
3
|
-
}
|
|
4
|
-
function f(n) {
|
|
5
|
-
return "items" in n;
|
|
6
|
-
}
|
|
7
|
-
function h(n) {
|
|
8
|
-
return "css" in n && typeof n.css == "function";
|
|
9
|
-
}
|
|
10
|
-
function w(n) {
|
|
11
|
-
return "tick" in n && typeof n.tick == "function";
|
|
12
|
-
}
|
|
13
|
-
function m(n) {
|
|
14
|
-
return "keyframes" in n && n.keyframes !== void 0 && n.keyframes !== null;
|
|
15
|
-
}
|
|
16
|
-
async function A(n) {
|
|
17
|
-
const e = await n;
|
|
18
|
-
return f(e) ? {
|
|
19
|
-
prepare: e.prepare,
|
|
20
|
-
wait: e.wait,
|
|
21
|
-
onReady: e.onReady,
|
|
22
|
-
onStart: e.onStart,
|
|
23
|
-
onEnd: e.onEnd,
|
|
24
|
-
items: e.items,
|
|
25
|
-
schedule: e.schedule
|
|
26
|
-
} : {
|
|
27
|
-
prepare: e.prepare,
|
|
28
|
-
wait: e.wait,
|
|
29
|
-
onReady: e.onReady,
|
|
30
|
-
onStart: e.onStart,
|
|
31
|
-
onEnd: e.onEnd,
|
|
32
|
-
items: [
|
|
33
|
-
{
|
|
34
|
-
physics: e.physics,
|
|
35
|
-
tick: e.tick,
|
|
36
|
-
css: e.css
|
|
37
|
-
}
|
|
38
|
-
],
|
|
39
|
-
schedule: "parallel"
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
function S(n, e) {
|
|
43
|
-
const a = n.schedule ?? "parallel", o = n.items.map(
|
|
44
|
-
(i) => {
|
|
45
|
-
let t;
|
|
46
|
-
switch (a) {
|
|
47
|
-
case "parallel":
|
|
48
|
-
t = 0;
|
|
49
|
-
break;
|
|
50
|
-
case "sequential":
|
|
51
|
-
t = 1;
|
|
52
|
-
break;
|
|
53
|
-
case "stagger":
|
|
54
|
-
t = Math.max(0, Math.min(1, i.offset ?? 0));
|
|
55
|
-
break;
|
|
56
|
-
default:
|
|
57
|
-
t = 0;
|
|
58
|
-
}
|
|
59
|
-
if (m(i)) {
|
|
60
|
-
const { offset: y, ...u } = i;
|
|
61
|
-
return { ...u, normalizedOffset: t };
|
|
62
|
-
}
|
|
63
|
-
const { css: s, offset: p, ...c } = i, l = s ? typeof s == "function" ? e ? { element: e, style: s } : void 0 : { element: s.element, style: s.style } : void 0;
|
|
64
|
-
return { ...c, css: l, normalizedOffset: t };
|
|
65
|
-
}
|
|
66
|
-
), { schedule: d, ...r } = n;
|
|
67
|
-
return {
|
|
68
|
-
...r,
|
|
69
|
-
items: o
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
export {
|
|
73
|
-
h as isCssAnimation,
|
|
74
|
-
m as isKeyframesAnimation,
|
|
75
|
-
f as isMultiAnimation,
|
|
76
|
-
k as isSingleAnimation,
|
|
77
|
-
w as isTickAnimation,
|
|
78
|
-
S as normalizeSchedule,
|
|
79
|
-
A as normalizeToMultiAnimation
|
|
80
|
-
};
|
package/dist/presets/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@ssgoi/core/presets");Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});
|
package/dist/presets/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@ssgoi/core/presets';
|
package/dist/presets/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@ssgoi/core/presets";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("solid-js/web"),a=require("solid-js"),l=require("./transition.cjs"),u=require("./context.cjs"),d=r=>{const[t,s]=a.splitProps(r,["children","id","as","class"]),i=u.useSsgoi(),o=t.as||"div";return e.createComponent(e.Dynamic,e.mergeProps({component:o,ref(c){var n=l.transition(i(t.id));typeof n=="function"&&n(c)},get"data-ssgoi-transition"(){return t.id},get class(){return t.class}},s,{get children(){return t.children}}))};exports.SsgoiTransition=d;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { createComponent as a, Dynamic as c, mergeProps as m } from "solid-js/web";
|
|
2
|
-
import { splitProps as p } from "solid-js";
|
|
3
|
-
import { transition as l } from "./transition.js";
|
|
4
|
-
import { useSsgoi as d } from "./context.js";
|
|
5
|
-
const v = (o) => {
|
|
6
|
-
const [r, n] = p(o, ["children", "id", "as", "class"]), i = d(), s = r.as || "div";
|
|
7
|
-
return a(c, m({
|
|
8
|
-
component: s,
|
|
9
|
-
ref(e) {
|
|
10
|
-
var t = l(i(r.id));
|
|
11
|
-
typeof t == "function" && t(e);
|
|
12
|
-
},
|
|
13
|
-
get "data-ssgoi-transition"() {
|
|
14
|
-
return r.id;
|
|
15
|
-
},
|
|
16
|
-
get class() {
|
|
17
|
-
return r.class;
|
|
18
|
-
}
|
|
19
|
-
}, n, {
|
|
20
|
-
get children() {
|
|
21
|
-
return r.children;
|
|
22
|
-
}
|
|
23
|
-
}));
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
v as SsgoiTransition
|
|
27
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("solid-js/web"),o=require("solid-js"),n=require("./context.cjs"),i=require("@ssgoi/core"),c=e=>{const t=o.createMemo(()=>i.createSggoiTransitionContext(e.config,{outFirst:!1}));return r.createComponent(n.SsgoiProvider,{get value(){return t()},get children(){return e.children}})};exports.Ssgoi=c;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { createComponent as e } from "solid-js/web";
|
|
2
|
-
import { createMemo as o } from "solid-js";
|
|
3
|
-
import { SsgoiProvider as i } from "./context.js";
|
|
4
|
-
import { createSggoiTransitionContext as n } from "@ssgoi/core";
|
|
5
|
-
const f = (r) => {
|
|
6
|
-
const t = o(() => n(r.config, {
|
|
7
|
-
// Solid uses MutationObserver for unmount detection,
|
|
8
|
-
// so OUT and IN can arrive in any order
|
|
9
|
-
outFirst: !1
|
|
10
|
-
}));
|
|
11
|
-
return e(i, {
|
|
12
|
-
get value() {
|
|
13
|
-
return t();
|
|
14
|
-
},
|
|
15
|
-
get children() {
|
|
16
|
-
return r.children;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
};
|
|
20
|
-
export {
|
|
21
|
-
f as Ssgoi
|
|
22
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("solid-js/web"),i=require("solid-js"),c=require("@ssgoi/core");var s=r.template("<div style=display:contents>");function a(o){let t;return i.onMount(()=>{c.createTransitionScope()(t)}),(()=>{var e=s(),n=t;return typeof n=="function"?r.use(n,e):t=e,r.insert(e,()=>o.children),e})()}exports.TransitionScope=a;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { template as o, use as i, insert as p } from "solid-js/web";
|
|
2
|
-
import { onMount as a } from "solid-js";
|
|
3
|
-
import { createTransitionScope as c } from "@ssgoi/core";
|
|
4
|
-
var m = /* @__PURE__ */ o("<div style=display:contents>");
|
|
5
|
-
function u(n) {
|
|
6
|
-
let r;
|
|
7
|
-
return a(() => {
|
|
8
|
-
c()(r);
|
|
9
|
-
}), (() => {
|
|
10
|
-
var t = m(), e = r;
|
|
11
|
-
return typeof e == "function" ? i(e, t) : r = t, p(t, () => n.children), t;
|
|
12
|
-
})();
|
|
13
|
-
}
|
|
14
|
-
export {
|
|
15
|
-
u as TransitionScope
|
|
16
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("@ssgoi/core"),e=t=>r.transition(t,"auto");exports.transition=e;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { JSX } from 'solid-js';
|
|
2
|
-
type TransitionScopeProps = {
|
|
3
|
-
children: JSX.Element;
|
|
4
|
-
};
|
|
5
|
-
/**
|
|
6
|
-
* TransitionScope creates a boundary for local-scoped transitions.
|
|
7
|
-
*
|
|
8
|
-
* Child elements with `scope: 'local'` will:
|
|
9
|
-
* - Skip IN animation when mounted simultaneously with the scope
|
|
10
|
-
* - Skip OUT animation when unmounted simultaneously with the scope
|
|
11
|
-
*
|
|
12
|
-
* This is useful for:
|
|
13
|
-
* - Page transitions where child elements shouldn't animate individually
|
|
14
|
-
* - Modal/dialog content that appears/disappears with the container
|
|
15
|
-
* - List items that shouldn't animate when the entire list mounts/unmounts
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* ```tsx
|
|
19
|
-
* <TransitionScope>
|
|
20
|
-
* <div ref={transition(fadeIn(), { scope: 'local' })}>
|
|
21
|
-
* This will only animate when added/removed independently,
|
|
22
|
-
* not when the entire scope mounts/unmounts.
|
|
23
|
-
* </div>
|
|
24
|
-
* </TransitionScope>
|
|
25
|
-
* ```
|
|
26
|
-
*/
|
|
27
|
-
export declare function TransitionScope(props: TransitionScopeProps): JSX.Element;
|
|
28
|
-
export {};
|
package/dist/transition.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { Transition, TransitionKey, TransitionScope } from '@ssgoi/core';
|
|
2
|
-
type TransitionOptions = Transition<undefined> & {
|
|
3
|
-
key: TransitionKey;
|
|
4
|
-
scope?: TransitionScope;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Solid ref callback for element transitions
|
|
8
|
-
*
|
|
9
|
-
* OUT transition is automatically triggered by MutationObserver
|
|
10
|
-
* when the element is removed from the DOM
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```tsx
|
|
14
|
-
* <div ref={transition({
|
|
15
|
-
* key: 'fade',
|
|
16
|
-
* in: (el) => ({ tick: (p) => el.style.opacity = String(p) }),
|
|
17
|
-
* out: (el) => ({ tick: (p) => el.style.opacity = String(p) }),
|
|
18
|
-
* })} />
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
export declare const transition: (options: TransitionOptions) => import('@ssgoi/core').RefCallback;
|
|
22
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@ssgoi/core/transitions");Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@ssgoi/core/transitions';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@ssgoi/core/transitions";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@ssgoi/core/view-transitions");Object.keys(t).forEach(e=>{e!=="default"&&!Object.prototype.hasOwnProperty.call(exports,e)&&Object.defineProperty(exports,e,{enumerable:!0,get:()=>t[e]})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from '@ssgoi/core/view-transitions';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "@ssgoi/core/view-transitions";
|
|
File without changes
|
|
File without changes
|