@meshsdk/react 1.8.1 → 1.8.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.
- package/dist/index.cjs +23 -2
- package/dist/index.js +23 -2
- package/package.json +4 -4
package/dist/index.cjs
CHANGED
|
@@ -59,13 +59,34 @@ var React2 = __toESM(require("react"), 1);
|
|
|
59
59
|
var React = __toESM(require("react"), 1);
|
|
60
60
|
function setRef(ref, value) {
|
|
61
61
|
if (typeof ref === "function") {
|
|
62
|
-
ref(value);
|
|
62
|
+
return ref(value);
|
|
63
63
|
} else if (ref !== null && ref !== void 0) {
|
|
64
64
|
ref.current = value;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
function composeRefs(...refs) {
|
|
68
|
-
return (node) =>
|
|
68
|
+
return (node) => {
|
|
69
|
+
let hasCleanup = false;
|
|
70
|
+
const cleanups = refs.map((ref) => {
|
|
71
|
+
const cleanup = setRef(ref, node);
|
|
72
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
|
73
|
+
hasCleanup = true;
|
|
74
|
+
}
|
|
75
|
+
return cleanup;
|
|
76
|
+
});
|
|
77
|
+
if (hasCleanup) {
|
|
78
|
+
return () => {
|
|
79
|
+
for (let i = 0; i < cleanups.length; i++) {
|
|
80
|
+
const cleanup = cleanups[i];
|
|
81
|
+
if (typeof cleanup == "function") {
|
|
82
|
+
cleanup();
|
|
83
|
+
} else {
|
|
84
|
+
setRef(refs[i], null);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
};
|
|
69
90
|
}
|
|
70
91
|
|
|
71
92
|
// ../../node_modules/@radix-ui/react-slot/dist/index.mjs
|
package/dist/index.js
CHANGED
|
@@ -11,13 +11,34 @@ import * as React2 from "react";
|
|
|
11
11
|
import * as React from "react";
|
|
12
12
|
function setRef(ref, value) {
|
|
13
13
|
if (typeof ref === "function") {
|
|
14
|
-
ref(value);
|
|
14
|
+
return ref(value);
|
|
15
15
|
} else if (ref !== null && ref !== void 0) {
|
|
16
16
|
ref.current = value;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
function composeRefs(...refs) {
|
|
20
|
-
return (node) =>
|
|
20
|
+
return (node) => {
|
|
21
|
+
let hasCleanup = false;
|
|
22
|
+
const cleanups = refs.map((ref) => {
|
|
23
|
+
const cleanup = setRef(ref, node);
|
|
24
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
|
25
|
+
hasCleanup = true;
|
|
26
|
+
}
|
|
27
|
+
return cleanup;
|
|
28
|
+
});
|
|
29
|
+
if (hasCleanup) {
|
|
30
|
+
return () => {
|
|
31
|
+
for (let i = 0; i < cleanups.length; i++) {
|
|
32
|
+
const cleanup = cleanups[i];
|
|
33
|
+
if (typeof cleanup == "function") {
|
|
34
|
+
cleanup();
|
|
35
|
+
} else {
|
|
36
|
+
setRef(refs[i], null);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
};
|
|
21
42
|
}
|
|
22
43
|
|
|
23
44
|
// ../../node_modules/@radix-ui/react-slot/dist/index.mjs
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meshsdk/react",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.2",
|
|
4
4
|
"description": "React component library - https://meshjs.dev/react",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"browser": "./dist/index.js",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@fabianbormann/cardano-peer-connect": "^1.2.18",
|
|
33
|
-
"@meshsdk/common": "1.8.
|
|
34
|
-
"@meshsdk/transaction": "1.8.
|
|
35
|
-
"@meshsdk/wallet": "1.8.
|
|
33
|
+
"@meshsdk/common": "1.8.2",
|
|
34
|
+
"@meshsdk/transaction": "1.8.2",
|
|
35
|
+
"@meshsdk/wallet": "1.8.2",
|
|
36
36
|
"@radix-ui/react-dialog": "^1.1.2",
|
|
37
37
|
"@radix-ui/react-dropdown-menu": "^2.1.2",
|
|
38
38
|
"@radix-ui/react-icons": "^1.3.2",
|