@ssgoi/react 3.2.0 → 3.2.2
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,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 r=require("@ssgoi/core"),e=t=>r.transition(t,"auto");exports.transition=e;
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { transition as
|
|
3
|
-
const
|
|
4
|
-
const i = a(o);
|
|
5
|
-
return (t) => {
|
|
6
|
-
if (t) {
|
|
7
|
-
const n = i(t);
|
|
8
|
-
n && r(t, n);
|
|
9
|
-
}
|
|
10
|
-
};
|
|
11
|
-
};
|
|
2
|
+
import { transition as n } from "@ssgoi/core";
|
|
3
|
+
const r = (t) => n(t, "auto");
|
|
12
4
|
export {
|
|
13
|
-
|
|
5
|
+
r as transition
|
|
14
6
|
};
|
package/dist/transition.d.ts
CHANGED
|
@@ -10,6 +10,9 @@ type TransitionOptions = Transition<undefined> & {
|
|
|
10
10
|
* OUT transition is automatically triggered by MutationObserver
|
|
11
11
|
* when the element is removed from the DOM - works with React 18+
|
|
12
12
|
*
|
|
13
|
+
* The returned ref callback has a stable reference (cached by key),
|
|
14
|
+
* so it won't cause unnecessary re-renders when used with React refs.
|
|
15
|
+
*
|
|
13
16
|
* @example
|
|
14
17
|
* ```tsx
|
|
15
18
|
* <div ref={transition({
|
|
@@ -19,5 +22,5 @@ type TransitionOptions = Transition<undefined> & {
|
|
|
19
22
|
* })} />
|
|
20
23
|
* ```
|
|
21
24
|
*/
|
|
22
|
-
export declare const transition: (options: TransitionOptions) => (
|
|
25
|
+
export declare const transition: (options: TransitionOptions) => import('@ssgoi/core').RefCallback;
|
|
23
26
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ssgoi/react",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"description": "React bindings for SSGOI - Native app-like page transitions for React applications",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -45,11 +45,7 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@ssgoi/core": "^3.2.
|
|
49
|
-
},
|
|
50
|
-
"peerDependencies": {
|
|
51
|
-
"react": "^18.0.0",
|
|
52
|
-
"react-dom": "^18.0.0"
|
|
48
|
+
"@ssgoi/core": "^3.2.2"
|
|
53
49
|
},
|
|
54
50
|
"devDependencies": {
|
|
55
51
|
"@eslint/js": "^9.30.1",
|