@ssgoi/react 4.2.1 → 5.2.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 +49 -39
- package/dist/index.cjs +1 -1
- package/dist/index.js +12 -11
- package/dist/lib/ssgoi.d.ts +0 -7
- package/dist/lib/types.d.ts +0 -18
- package/dist/react/src/lib/ssgoi-transition.cjs +1 -1
- package/dist/react/src/lib/ssgoi-transition.js +19 -33
- package/dist/react/src/lib/ssgoi.cjs +1 -1
- package/dist/react/src/lib/ssgoi.js +16 -38
- package/dist/types.cjs +1 -1
- package/dist/types.js +5 -4
- package/package.json +14 -3
- package/dist/lib/utils.d.ts +0 -10
- package/dist/react/src/lib/utils.cjs +0 -1
- package/dist/react/src/lib/utils.js +0 -17
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 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
CHANGED
|
@@ -1,42 +1,47 @@
|
|
|
1
|
-
function
|
|
2
|
-
return ("tick" in
|
|
1
|
+
function k(n) {
|
|
2
|
+
return ("tick" in n || "css" in n) && !("items" in n);
|
|
3
3
|
}
|
|
4
|
-
function
|
|
5
|
-
return "items" in
|
|
4
|
+
function f(n) {
|
|
5
|
+
return "items" in n;
|
|
6
6
|
}
|
|
7
|
-
function
|
|
8
|
-
return "css" in
|
|
7
|
+
function h(n) {
|
|
8
|
+
return "css" in n && typeof n.css == "function";
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
return "tick" in
|
|
10
|
+
function w(n) {
|
|
11
|
+
return "tick" in n && typeof n.tick == "function";
|
|
12
12
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
|
22
26
|
} : {
|
|
23
|
-
prepare:
|
|
24
|
-
wait:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
+
prepare: e.prepare,
|
|
28
|
+
wait: e.wait,
|
|
29
|
+
onReady: e.onReady,
|
|
30
|
+
onStart: e.onStart,
|
|
31
|
+
onEnd: e.onEnd,
|
|
27
32
|
items: [
|
|
28
33
|
{
|
|
29
|
-
physics:
|
|
30
|
-
tick:
|
|
31
|
-
css:
|
|
34
|
+
physics: e.physics,
|
|
35
|
+
tick: e.tick,
|
|
36
|
+
css: e.css
|
|
32
37
|
}
|
|
33
38
|
],
|
|
34
39
|
schedule: "parallel"
|
|
35
40
|
};
|
|
36
41
|
}
|
|
37
|
-
function
|
|
38
|
-
const a =
|
|
39
|
-
(
|
|
42
|
+
function S(n, e) {
|
|
43
|
+
const a = n.schedule ?? "parallel", o = n.items.map(
|
|
44
|
+
(i) => {
|
|
40
45
|
let t;
|
|
41
46
|
switch (a) {
|
|
42
47
|
case "parallel":
|
|
@@ -46,25 +51,30 @@ function y(e, n) {
|
|
|
46
51
|
t = 1;
|
|
47
52
|
break;
|
|
48
53
|
case "stagger":
|
|
49
|
-
t = Math.max(0, Math.min(1,
|
|
54
|
+
t = Math.max(0, Math.min(1, i.offset ?? 0));
|
|
50
55
|
break;
|
|
51
56
|
default:
|
|
52
57
|
t = 0;
|
|
53
58
|
}
|
|
54
|
-
|
|
55
|
-
|
|
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 };
|
|
56
65
|
}
|
|
57
|
-
), { schedule:
|
|
66
|
+
), { schedule: d, ...r } = n;
|
|
58
67
|
return {
|
|
59
|
-
...
|
|
60
|
-
items:
|
|
68
|
+
...r,
|
|
69
|
+
items: o
|
|
61
70
|
};
|
|
62
71
|
}
|
|
63
72
|
export {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
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
|
|
70
80
|
};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./react/src/lib/transition.cjs"),i=require("./core/dist/types.cjs"),o=require("./react/src/lib/ssgoi.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./react/src/lib/transition.cjs"),i=require("./core/dist/types.cjs"),o=require("./react/src/lib/ssgoi.cjs"),s=require("./react/src/lib/ssgoi-transition.cjs"),t=require("./react/src/lib/transition-scope.cjs");exports.transition=n.transition;exports.isCssAnimation=i.isCssAnimation;exports.isKeyframesAnimation=i.isKeyframesAnimation;exports.isMultiAnimation=i.isMultiAnimation;exports.isSingleAnimation=i.isSingleAnimation;exports.isTickAnimation=i.isTickAnimation;exports.normalizeSchedule=i.normalizeSchedule;exports.normalizeToMultiAnimation=i.normalizeToMultiAnimation;exports.Ssgoi=o.Ssgoi;exports.SsgoiTransition=s.SsgoiTransition;exports.TransitionScope=t.TransitionScope;
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { transition as n } from "./react/src/lib/transition.js";
|
|
2
|
-
import { isCssAnimation as r,
|
|
3
|
-
import { Ssgoi as
|
|
4
|
-
import { SsgoiTransition as
|
|
5
|
-
import { TransitionScope as
|
|
2
|
+
import { isCssAnimation as r, isKeyframesAnimation as m, isMultiAnimation as e, isSingleAnimation as s, isTickAnimation as a, normalizeSchedule as f, normalizeToMultiAnimation as l } from "./core/dist/types.js";
|
|
3
|
+
import { Ssgoi as A } from "./react/src/lib/ssgoi.js";
|
|
4
|
+
import { SsgoiTransition as S } from "./react/src/lib/ssgoi-transition.js";
|
|
5
|
+
import { TransitionScope as c } from "./react/src/lib/transition-scope.js";
|
|
6
6
|
export {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
A as Ssgoi,
|
|
8
|
+
S as SsgoiTransition,
|
|
9
|
+
c as TransitionScope,
|
|
10
10
|
r as isCssAnimation,
|
|
11
|
-
m as
|
|
12
|
-
e as
|
|
13
|
-
s as
|
|
14
|
-
a as
|
|
11
|
+
m as isKeyframesAnimation,
|
|
12
|
+
e as isMultiAnimation,
|
|
13
|
+
s as isSingleAnimation,
|
|
14
|
+
a as isTickAnimation,
|
|
15
|
+
f as normalizeSchedule,
|
|
15
16
|
l as normalizeToMultiAnimation,
|
|
16
17
|
n as transition
|
|
17
18
|
};
|
package/dist/lib/ssgoi.d.ts
CHANGED
|
@@ -3,13 +3,6 @@ import { SsgoiConfig } from './types';
|
|
|
3
3
|
interface SsgoiProps {
|
|
4
4
|
config: SsgoiConfig;
|
|
5
5
|
children: ReactNode;
|
|
6
|
-
/**
|
|
7
|
-
* Hook to get current pathname (e.g., Next.js usePathname)
|
|
8
|
-
* @example
|
|
9
|
-
* import { usePathname } from 'next/navigation';
|
|
10
|
-
* <Ssgoi config={config} usePathname={usePathname}>
|
|
11
|
-
*/
|
|
12
|
-
usePathname?: () => string;
|
|
13
6
|
}
|
|
14
7
|
export declare const Ssgoi: React.FC<SsgoiProps>;
|
|
15
8
|
export {};
|
package/dist/lib/types.d.ts
CHANGED
|
@@ -1,23 +1,5 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
1
|
import { SsgoiContext } from '@ssgoi/core/types';
|
|
3
2
|
export * from '@ssgoi/core/types';
|
|
4
|
-
/**
|
|
5
|
-
* Navigation info containing from/to paths
|
|
6
|
-
*/
|
|
7
|
-
export type NavigationInfo = {
|
|
8
|
-
from: string | null;
|
|
9
|
-
to: string;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* React-specific context type with style control
|
|
13
|
-
*/
|
|
14
3
|
export type ReactSsgoiContext = {
|
|
15
|
-
/** Get transition config for a path */
|
|
16
4
|
getTransition: SsgoiContext;
|
|
17
|
-
/**
|
|
18
|
-
* Get initial style for an element
|
|
19
|
-
* Returns { visibility: "hidden" } on first call if transition is configured, {} otherwise
|
|
20
|
-
* Subsequent calls always return {} to prevent re-hiding on rerender
|
|
21
|
-
*/
|
|
22
|
-
getInitialStyle: () => CSSProperties;
|
|
23
5
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),g=require("react"),S=require("./transition.cjs"),f=require("./context.cjs"),m=({children:o,id:t,as:i,className:s,...e})=>{const{getTransition:r}=f.useSsgoi(),a=i||"div",n=r(t),c=g.useMemo(()=>S.transition(n),[n]);return u.jsx(a,{ref:c,"data-ssgoi-transition":t,className:s,...e,children:o})};exports.SsgoiTransition=m;
|
|
@@ -1,44 +1,30 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import {
|
|
4
|
-
import { transition as
|
|
5
|
-
import { useSsgoi as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
children: m,
|
|
2
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
3
|
+
import { useMemo as p } from "react";
|
|
4
|
+
import { transition as c } from "./transition.js";
|
|
5
|
+
import { useSsgoi as g } from "./context.js";
|
|
6
|
+
const T = ({
|
|
7
|
+
children: n,
|
|
9
8
|
id: o,
|
|
10
|
-
as:
|
|
11
|
-
className:
|
|
12
|
-
...
|
|
9
|
+
as: i,
|
|
10
|
+
className: r,
|
|
11
|
+
...s
|
|
13
12
|
}) => {
|
|
14
|
-
const { getTransition:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
i.current ? n = t.current : e.current && t.current && (n = E(
|
|
18
|
-
e.current,
|
|
19
|
-
t.current
|
|
20
|
-
));
|
|
21
|
-
const s = C((l) => {
|
|
22
|
-
e.current = l, l && (i.current = !1);
|
|
23
|
-
}, []), c = g(o), f = u(
|
|
24
|
-
() => k(c),
|
|
25
|
-
[c]
|
|
26
|
-
), b = u(
|
|
27
|
-
() => F(s, f),
|
|
28
|
-
[s, f]
|
|
13
|
+
const { getTransition: m } = g(), e = i || "div", t = m(o), a = p(
|
|
14
|
+
() => c(t),
|
|
15
|
+
[t]
|
|
29
16
|
);
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
|
|
17
|
+
return /* @__PURE__ */ f(
|
|
18
|
+
e,
|
|
32
19
|
{
|
|
33
|
-
ref:
|
|
20
|
+
ref: a,
|
|
34
21
|
"data-ssgoi-transition": o,
|
|
35
|
-
className:
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
children: m
|
|
22
|
+
className: r,
|
|
23
|
+
...s,
|
|
24
|
+
children: n
|
|
39
25
|
}
|
|
40
26
|
);
|
|
41
27
|
};
|
|
42
28
|
export {
|
|
43
|
-
|
|
29
|
+
T as SsgoiTransition
|
|
44
30
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),t=require("react"),i=require("./context.cjs"),n=require("@ssgoi/core"),u=t.memo(({config:e,children:o})=>{const r=t.useMemo(()=>({getTransition:n.createSggoiTransitionContext(e,{outFirst:!1})}),[e]);return s.jsx(i.SsgoiProvider,{value:r,children:o})});exports.Ssgoi=u;
|
|
@@ -1,43 +1,21 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import
|
|
4
|
-
import { SsgoiProvider as
|
|
5
|
-
import { createSggoiTransitionContext as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const { from: r, to: e } = t();
|
|
18
|
-
return !r || !e || r === e ? Promise.resolve(null) : Promise.resolve({ from: r, to: e });
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
const C = a.memo(
|
|
23
|
-
({ config: t, children: n, usePathname: r }) => {
|
|
24
|
-
const e = r?.() ?? null, o = d(e), l = m(() => {
|
|
25
|
-
const { getTransition: s, hasMatchingTransition: f } = R(t, {
|
|
26
|
-
createNavigationDetector: r ? () => p(o) : S
|
|
27
|
-
});
|
|
28
|
-
return {
|
|
29
|
-
getTransition: s,
|
|
30
|
-
getInitialStyle: () => {
|
|
31
|
-
if (!r)
|
|
32
|
-
return {};
|
|
33
|
-
const { from: i, to: u } = o();
|
|
34
|
-
return !i || i === u ? {} : f(i, u) ? { visibility: "hidden" } : {};
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
}, [t, r, o]);
|
|
38
|
-
return /* @__PURE__ */ g(y, { value: l, children: n });
|
|
2
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import i, { useMemo as m } from "react";
|
|
4
|
+
import { SsgoiProvider as s } from "./context.js";
|
|
5
|
+
import { createSggoiTransitionContext as n } from "@ssgoi/core";
|
|
6
|
+
const f = i.memo(
|
|
7
|
+
({ config: o, children: t }) => {
|
|
8
|
+
const r = m(
|
|
9
|
+
() => ({
|
|
10
|
+
getTransition: n(o, {
|
|
11
|
+
outFirst: !1
|
|
12
|
+
})
|
|
13
|
+
}),
|
|
14
|
+
[o]
|
|
15
|
+
);
|
|
16
|
+
return /* @__PURE__ */ e(s, { value: r, children: t });
|
|
39
17
|
}
|
|
40
18
|
);
|
|
41
19
|
export {
|
|
42
|
-
|
|
20
|
+
f as Ssgoi
|
|
43
21
|
};
|
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.isMultiAnimation=i.isMultiAnimation;exports.isSingleAnimation=i.isSingleAnimation;exports.isTickAnimation=i.isTickAnimation;exports.normalizeSchedule=i.normalizeSchedule;exports.normalizeToMultiAnimation=i.normalizeToMultiAnimation;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./core/dist/types.cjs");exports.isCssAnimation=i.isCssAnimation;exports.isKeyframesAnimation=i.isKeyframesAnimation;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,9 +1,10 @@
|
|
|
1
|
-
import { isCssAnimation as o,
|
|
1
|
+
import { isCssAnimation as o, isKeyframesAnimation as m, isMultiAnimation as a, isSingleAnimation as t, isTickAnimation as e, normalizeSchedule as s, normalizeToMultiAnimation as l } from "./core/dist/types.js";
|
|
2
2
|
export {
|
|
3
3
|
o as isCssAnimation,
|
|
4
|
-
m as
|
|
4
|
+
m as isKeyframesAnimation,
|
|
5
|
+
a as isMultiAnimation,
|
|
5
6
|
t as isSingleAnimation,
|
|
6
|
-
|
|
7
|
-
|
|
7
|
+
e as isTickAnimation,
|
|
8
|
+
s as normalizeSchedule,
|
|
8
9
|
l as normalizeToMultiAnimation
|
|
9
10
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ssgoi/react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.2.0",
|
|
4
4
|
"description": "React bindings for SSGOI - Native app-like page transitions for React applications",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"dependencies": {
|
|
79
79
|
"unplugin": "^2.3.2",
|
|
80
80
|
"@babel/core": "^7.26.10",
|
|
81
|
-
"@ssgoi/core": "^
|
|
81
|
+
"@ssgoi/core": "^5.2.0"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@types/babel__core": "^7.20.5",
|
|
@@ -100,9 +100,20 @@
|
|
|
100
100
|
"keywords": [
|
|
101
101
|
"react",
|
|
102
102
|
"page-transition",
|
|
103
|
+
"page-transitions",
|
|
104
|
+
"view-transitions",
|
|
105
|
+
"view-transition-api-alternative",
|
|
103
106
|
"animation",
|
|
104
107
|
"ssgoi",
|
|
105
|
-
"spring-physics"
|
|
108
|
+
"spring-physics",
|
|
109
|
+
"nextjs",
|
|
110
|
+
"next-js",
|
|
111
|
+
"cross-browser",
|
|
112
|
+
"navigation-animation",
|
|
113
|
+
"hero-transition",
|
|
114
|
+
"shared-element-transition",
|
|
115
|
+
"route-transition",
|
|
116
|
+
"drill-transition"
|
|
106
117
|
],
|
|
107
118
|
"author": "MeurSyphus <tmdeoans@snu.ac.kr>",
|
|
108
119
|
"license": "MIT",
|
package/dist/lib/utils.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Combines multiple ref callbacks into one
|
|
4
|
-
*/
|
|
5
|
-
export declare function combineRefs<T>(...refs: Array<((el: T | null) => void) | null | undefined>): (el: T | null) => void;
|
|
6
|
-
/**
|
|
7
|
-
* Forks style from element.style based on initialStyle keys
|
|
8
|
-
* Returns the current DOM style values for keys that were in initialStyle
|
|
9
|
-
*/
|
|
10
|
-
export declare function forkStyleFromElement(element: HTMLElement, initialStyle: CSSProperties): CSSProperties;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function f(...t){return o=>{t.forEach(e=>e?.(o))}}function c(t,o){const e={};for(const n of Object.keys(o)){const r=t.style[n];r&&(e[n]=r)}return e}exports.combineRefs=f;exports.forkStyleFromElement=c;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
function f(...o) {
|
|
2
|
-
return (t) => {
|
|
3
|
-
o.forEach((e) => e?.(t));
|
|
4
|
-
};
|
|
5
|
-
}
|
|
6
|
-
function c(o, t) {
|
|
7
|
-
const e = {};
|
|
8
|
-
for (const n of Object.keys(t)) {
|
|
9
|
-
const r = o.style[n];
|
|
10
|
-
r && (e[n] = r);
|
|
11
|
-
}
|
|
12
|
-
return e;
|
|
13
|
-
}
|
|
14
|
-
export {
|
|
15
|
-
f as combineRefs,
|
|
16
|
-
c as forkStyleFromElement
|
|
17
|
-
};
|