@meshsdk/react 1.9.0-beta.96 → 1.9.0-beta.98
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 +124 -238
- package/dist/index.d.cts +7 -14
- package/dist/index.d.ts +7 -14
- package/dist/index.js +125 -241
- package/package.json +5 -6
package/dist/index.cjs
CHANGED
|
@@ -46,7 +46,7 @@ __export(index_exports, {
|
|
|
46
46
|
module.exports = __toCommonJS(index_exports);
|
|
47
47
|
|
|
48
48
|
// src/cardano-wallet/index.tsx
|
|
49
|
-
var
|
|
49
|
+
var import_react13 = require("react");
|
|
50
50
|
|
|
51
51
|
// src/common/button.tsx
|
|
52
52
|
var React = __toESM(require("react"), 1);
|
|
@@ -227,7 +227,6 @@ var import_react2 = require("react");
|
|
|
227
227
|
// src/contexts/WalletContext.ts
|
|
228
228
|
var import_react = require("react");
|
|
229
229
|
var import_wallet = require("@meshsdk/wallet");
|
|
230
|
-
var import_web3_sdk = require("@meshsdk/web3-sdk");
|
|
231
230
|
var INITIAL_STATE = {
|
|
232
231
|
walletName: void 0,
|
|
233
232
|
walletInstance: {}
|
|
@@ -310,30 +309,24 @@ var useWalletStore = () => {
|
|
|
310
309
|
load();
|
|
311
310
|
}, [connectedWalletInstance]);
|
|
312
311
|
(0, import_react.useEffect)(() => {
|
|
313
|
-
const
|
|
314
|
-
if (persistSession &&
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
setConnectedWalletName(persist2.walletName);
|
|
329
|
-
setState("CONNECTED" /* CONNECTED */);
|
|
330
|
-
});
|
|
331
|
-
setWeb3UserData(persist2.user);
|
|
332
|
-
} else {
|
|
333
|
-
connectWallet(persist2.walletName);
|
|
312
|
+
const persistData = localStorage.getItem(localstoragePersist);
|
|
313
|
+
if (persistSession && persistData) {
|
|
314
|
+
try {
|
|
315
|
+
const persist = JSON.parse(persistData);
|
|
316
|
+
if (!persist || typeof persist.walletName !== "string") {
|
|
317
|
+
throw new Error("Invalid persist data structure");
|
|
318
|
+
}
|
|
319
|
+
if (persist.walletName === "utxos") {
|
|
320
|
+
localStorage.removeItem(localstoragePersist);
|
|
321
|
+
} else {
|
|
322
|
+
connectWallet(persist.walletName);
|
|
323
|
+
}
|
|
324
|
+
} catch (error2) {
|
|
325
|
+
console.error("Failed to restore wallet session:", error2);
|
|
326
|
+
localStorage.removeItem(localstoragePersist);
|
|
334
327
|
}
|
|
335
328
|
}
|
|
336
|
-
}, [persistSession]);
|
|
329
|
+
}, [persistSession, connectWallet]);
|
|
337
330
|
return {
|
|
338
331
|
hasConnectedWallet: INITIAL_STATE.walletName !== connectedWalletName,
|
|
339
332
|
connectedWalletInstance,
|
|
@@ -375,9 +368,9 @@ var WalletContext = (0, import_react.createContext)({
|
|
|
375
368
|
|
|
376
369
|
// src/contexts/index.tsx
|
|
377
370
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
378
|
-
var MeshProvider = (
|
|
371
|
+
var MeshProvider = ({ children }) => {
|
|
379
372
|
const store = useWalletStore();
|
|
380
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(WalletContext.Provider, { value: store, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children
|
|
373
|
+
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(WalletContext.Provider, { value: store, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_jsx_runtime4.Fragment, { children }) });
|
|
381
374
|
};
|
|
382
375
|
|
|
383
376
|
// src/hooks/useAddress.ts
|
|
@@ -530,19 +523,21 @@ var useWalletSubmit = () => {
|
|
|
530
523
|
const submitTx = (0, import_react9.useCallback)(async (signedTx) => {
|
|
531
524
|
setSubmitting(true);
|
|
532
525
|
setError(void 0);
|
|
526
|
+
setResult(void 0);
|
|
533
527
|
try {
|
|
534
|
-
if (hasConnectedWallet) {
|
|
535
|
-
|
|
536
|
-
|
|
528
|
+
if (!hasConnectedWallet) {
|
|
529
|
+
throw new Error(
|
|
530
|
+
"Please make sure to connect a wallet before calling useWalletSubmit"
|
|
531
|
+
);
|
|
537
532
|
}
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
);
|
|
533
|
+
const txHash = await connectedWalletInstance.submitTx(signedTx);
|
|
534
|
+
setResult(txHash);
|
|
541
535
|
} catch (error2) {
|
|
542
536
|
setError(error2);
|
|
537
|
+
} finally {
|
|
538
|
+
setSubmitting(false);
|
|
543
539
|
}
|
|
544
|
-
|
|
545
|
-
}, []);
|
|
540
|
+
}, [hasConnectedWallet, connectedWalletInstance]);
|
|
546
541
|
return {
|
|
547
542
|
error,
|
|
548
543
|
result,
|
|
@@ -736,11 +731,8 @@ function ConnectedButton() {
|
|
|
736
731
|
// src/cardano-wallet/data.ts
|
|
737
732
|
var screens = {
|
|
738
733
|
main: {
|
|
739
|
-
title: "Connect Wallet"
|
|
740
|
-
|
|
741
|
-
p2p: {
|
|
742
|
-
title: "Peer Connect (CIP45)",
|
|
743
|
-
subtitle: "Use wallet that supports CIP-45, scan this QR code to connect."
|
|
734
|
+
title: "Connect Wallet",
|
|
735
|
+
subtitle: void 0
|
|
744
736
|
},
|
|
745
737
|
burner: {
|
|
746
738
|
title: "Burner Wallet",
|
|
@@ -935,45 +927,14 @@ function IconFingerprint() {
|
|
|
935
927
|
);
|
|
936
928
|
}
|
|
937
929
|
|
|
938
|
-
// src/common/icons/icon-monitor-smartphone.tsx
|
|
939
|
-
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
940
|
-
function IconMonitorSmartphone() {
|
|
941
|
-
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
942
|
-
"svg",
|
|
943
|
-
{
|
|
944
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
945
|
-
width: "24",
|
|
946
|
-
height: "24",
|
|
947
|
-
viewBox: "0 0 24 24",
|
|
948
|
-
fill: "none",
|
|
949
|
-
stroke: "black",
|
|
950
|
-
strokeWidth: "2",
|
|
951
|
-
strokeLinecap: "round",
|
|
952
|
-
strokeLinejoin: "round",
|
|
953
|
-
style: {
|
|
954
|
-
color: "#ffadff",
|
|
955
|
-
width: "56px",
|
|
956
|
-
height: "56px",
|
|
957
|
-
strokeWidth: "1px"
|
|
958
|
-
},
|
|
959
|
-
children: [
|
|
960
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8" }),
|
|
961
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M10 19v-3.96 3.15" }),
|
|
962
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("path", { d: "M7 19h5" }),
|
|
963
|
-
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("rect", { width: "6", height: "10", x: "16", y: "12", rx: "2" })
|
|
964
|
-
]
|
|
965
|
-
}
|
|
966
|
-
);
|
|
967
|
-
}
|
|
968
|
-
|
|
969
930
|
// src/common/tooltip.tsx
|
|
970
931
|
var React4 = __toESM(require("react"), 1);
|
|
971
932
|
var TooltipPrimitive = __toESM(require("@radix-ui/react-tooltip"), 1);
|
|
972
|
-
var
|
|
933
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
973
934
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
974
935
|
var Tooltip = TooltipPrimitive.Root;
|
|
975
936
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
976
|
-
var TooltipContent = React4.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0,
|
|
937
|
+
var TooltipContent = React4.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
977
938
|
TooltipPrimitive.Content,
|
|
978
939
|
{
|
|
979
940
|
ref,
|
|
@@ -988,7 +949,7 @@ var TooltipContent = React4.forwardRef(({ className, sideOffset = 4, ...props },
|
|
|
988
949
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
989
950
|
|
|
990
951
|
// src/cardano-wallet/wallet-icon.tsx
|
|
991
|
-
var
|
|
952
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
992
953
|
function WalletIcon({
|
|
993
954
|
icon,
|
|
994
955
|
name,
|
|
@@ -996,32 +957,32 @@ function WalletIcon({
|
|
|
996
957
|
iconReactNode,
|
|
997
958
|
loading = false
|
|
998
959
|
}) {
|
|
999
|
-
return /* @__PURE__ */ (0,
|
|
1000
|
-
/* @__PURE__ */ (0,
|
|
960
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(Tooltip, { delayDuration: 0, defaultOpen: false, children: [
|
|
961
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
|
|
1001
962
|
"button",
|
|
1002
963
|
{
|
|
1003
964
|
className: "mesh-flex mesh-items-center mesh-justify-center mesh-rounded-lg mesh-w-10 mesh-h-10 mesh-bg-neutral-50 mesh-border mesh-border-zinc-700 hover:mesh-border-zinc-200 mesh-cursor-pointer",
|
|
1004
965
|
onClick: action,
|
|
1005
966
|
disabled: loading,
|
|
1006
967
|
children: [
|
|
1007
|
-
icon && !loading && /* @__PURE__ */ (0,
|
|
968
|
+
icon && !loading && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("img", { src: icon, alt: name, className: "mesh-w-8 mesh-h-8" }),
|
|
1008
969
|
!loading && iconReactNode && iconReactNode,
|
|
1009
|
-
loading && /* @__PURE__ */ (0,
|
|
970
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "text-black", children: "..." })
|
|
1010
971
|
]
|
|
1011
972
|
}
|
|
1012
973
|
) }),
|
|
1013
|
-
/* @__PURE__ */ (0,
|
|
974
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(TooltipContent, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("p", { children: name }) })
|
|
1014
975
|
] });
|
|
1015
976
|
}
|
|
1016
977
|
|
|
1017
978
|
// src/cardano-wallet/web3-services.tsx
|
|
1018
979
|
var import_react11 = require("react");
|
|
1019
|
-
var
|
|
980
|
+
var import_sdk = require("@utxos/sdk");
|
|
1020
981
|
|
|
1021
982
|
// src/common/icons/icon-discord.tsx
|
|
1022
|
-
var
|
|
983
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1023
984
|
function IconDiscord() {
|
|
1024
|
-
return /* @__PURE__ */ (0,
|
|
985
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1025
986
|
"svg",
|
|
1026
987
|
{
|
|
1027
988
|
viewBox: "0 0 20 20",
|
|
@@ -1030,7 +991,7 @@ function IconDiscord() {
|
|
|
1030
991
|
width: "24px",
|
|
1031
992
|
height: "24px"
|
|
1032
993
|
},
|
|
1033
|
-
children: /* @__PURE__ */ (0,
|
|
994
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1034
995
|
"path",
|
|
1035
996
|
{
|
|
1036
997
|
d: "M16.238 4.515a14.842 14.842 0 0 0-3.664-1.136.055.055 0 0 0-.059.027 10.35 10.35 0 0 0-.456.938 13.702 13.702 0 0 0-4.115 0 9.479 9.479 0 0 0-.464-.938.058.058 0 0 0-.058-.027c-1.266.218-2.497.6-3.664 1.136a.052.052 0 0 0-.024.02C1.4 8.023.76 11.424 1.074 14.782a.062.062 0 0 0 .024.042 14.923 14.923 0 0 0 4.494 2.272.058.058 0 0 0 .064-.02c.346-.473.654-.972.92-1.496a.057.057 0 0 0-.032-.08 9.83 9.83 0 0 1-1.404-.669.058.058 0 0 1-.029-.046.058.058 0 0 1 .023-.05c.094-.07.189-.144.279-.218a.056.056 0 0 1 .058-.008c2.946 1.345 6.135 1.345 9.046 0a.056.056 0 0 1 .059.007c.09.074.184.149.28.22a.058.058 0 0 1 .023.049.059.059 0 0 1-.028.046 9.224 9.224 0 0 1-1.405.669.058.058 0 0 0-.033.033.056.056 0 0 0 .002.047c.27.523.58 1.022.92 1.495a.056.056 0 0 0 .062.021 14.878 14.878 0 0 0 4.502-2.272.055.055 0 0 0 .016-.018.056.056 0 0 0 .008-.023c.375-3.883-.63-7.256-2.662-10.246a.046.046 0 0 0-.023-.021Zm-9.223 8.221c-.887 0-1.618-.814-1.618-1.814s.717-1.814 1.618-1.814c.908 0 1.632.821 1.618 1.814 0 1-.717 1.814-1.618 1.814Zm5.981 0c-.887 0-1.618-.814-1.618-1.814s.717-1.814 1.618-1.814c.908 0 1.632.821 1.618 1.814 0 1-.71 1.814-1.618 1.814Z",
|
|
@@ -1042,9 +1003,9 @@ function IconDiscord() {
|
|
|
1042
1003
|
}
|
|
1043
1004
|
|
|
1044
1005
|
// src/common/icons/icon-google.tsx
|
|
1045
|
-
var
|
|
1006
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1046
1007
|
function IconGoogle() {
|
|
1047
|
-
return /* @__PURE__ */ (0,
|
|
1008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
1048
1009
|
"svg",
|
|
1049
1010
|
{
|
|
1050
1011
|
viewBox: "0 0 262 262",
|
|
@@ -1055,28 +1016,28 @@ function IconGoogle() {
|
|
|
1055
1016
|
height: "24px"
|
|
1056
1017
|
},
|
|
1057
1018
|
children: [
|
|
1058
|
-
/* @__PURE__ */ (0,
|
|
1019
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1059
1020
|
"path",
|
|
1060
1021
|
{
|
|
1061
1022
|
d: "M255.878 133.451c0-10.734-.871-18.567-2.756-26.69H130.55v48.448h71.947c-1.45 12.04-9.283 30.172-26.69 42.356l-.244 1.622 38.755 30.023 2.685.268c24.659-22.774 38.875-56.282 38.875-96.027",
|
|
1062
1023
|
fill: "#4285F4"
|
|
1063
1024
|
}
|
|
1064
1025
|
),
|
|
1065
|
-
/* @__PURE__ */ (0,
|
|
1026
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1066
1027
|
"path",
|
|
1067
1028
|
{
|
|
1068
1029
|
d: "M130.55 261.1c35.248 0 64.839-11.605 86.453-31.622l-41.196-31.913c-11.024 7.688-25.82 13.055-45.257 13.055-34.523 0-63.824-22.773-74.269-54.25l-1.531.13-40.298 31.187-.527 1.465C35.393 231.798 79.49 261.1 130.55 261.1",
|
|
1069
1030
|
fill: "#34A853"
|
|
1070
1031
|
}
|
|
1071
1032
|
),
|
|
1072
|
-
/* @__PURE__ */ (0,
|
|
1033
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1073
1034
|
"path",
|
|
1074
1035
|
{
|
|
1075
1036
|
d: "M56.281 156.37c-2.756-8.123-4.351-16.827-4.351-25.82 0-8.994 1.595-17.697 4.206-25.82l-.073-1.73L15.26 71.312l-1.335.635C5.077 89.644 0 109.517 0 130.55s5.077 40.905 13.925 58.602l42.356-32.782",
|
|
1076
1037
|
fill: "#FBBC05"
|
|
1077
1038
|
}
|
|
1078
1039
|
),
|
|
1079
|
-
/* @__PURE__ */ (0,
|
|
1040
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1080
1041
|
"path",
|
|
1081
1042
|
{
|
|
1082
1043
|
d: "M130.55 50.479c24.514 0 41.05 10.589 50.479 19.438l36.844-35.974C195.245 12.91 165.798 0 130.55 0 79.49 0 35.393 29.301 13.925 71.947l42.211 32.783c10.59-31.477 39.891-54.251 74.414-54.251",
|
|
@@ -1089,9 +1050,9 @@ function IconGoogle() {
|
|
|
1089
1050
|
}
|
|
1090
1051
|
|
|
1091
1052
|
// src/common/icons/icon-twitter.tsx
|
|
1092
|
-
var
|
|
1053
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
1093
1054
|
function IconTwitter() {
|
|
1094
|
-
return /* @__PURE__ */ (0,
|
|
1055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
1095
1056
|
"svg",
|
|
1096
1057
|
{
|
|
1097
1058
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1101,13 +1062,13 @@ function IconTwitter() {
|
|
|
1101
1062
|
width: "24px",
|
|
1102
1063
|
height: "24px"
|
|
1103
1064
|
},
|
|
1104
|
-
children: /* @__PURE__ */ (0,
|
|
1065
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("path", { d: "M14.095479,10.316482L22.286354,1h-1.940718l-7.115352,8.087682L7.551414,1H1l8.589488,12.231093L1,23h1.940717 l7.509372-8.542861L16.448587,23H23L14.095479,10.316482z M11.436522,13.338465l-0.871624-1.218704l-6.924311-9.68815h2.981339 l5.58978,7.82155l0.867949,1.218704l7.26506,10.166271h-2.981339L11.436522,13.338465z" })
|
|
1105
1066
|
}
|
|
1106
1067
|
);
|
|
1107
1068
|
}
|
|
1108
1069
|
|
|
1109
1070
|
// src/cardano-wallet/web3-services.tsx
|
|
1110
|
-
var
|
|
1071
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1111
1072
|
function Web3Services({
|
|
1112
1073
|
options,
|
|
1113
1074
|
setOpen,
|
|
@@ -1125,22 +1086,22 @@ function Web3Services({
|
|
|
1125
1086
|
projectId: options.projectId,
|
|
1126
1087
|
directTo
|
|
1127
1088
|
};
|
|
1128
|
-
const wallet = await
|
|
1089
|
+
const wallet = await import_sdk.Web3Wallet.enable(_options);
|
|
1129
1090
|
const user = wallet.getUser();
|
|
1130
1091
|
setWeb3UserData(user);
|
|
1131
1092
|
setWallet(
|
|
1132
1093
|
wallet.cardano,
|
|
1133
1094
|
"utxos",
|
|
1134
1095
|
persist ? {
|
|
1135
|
-
walletAddress: await wallet.getChangeAddress(),
|
|
1096
|
+
walletAddress: await wallet.cardano.getChangeAddress(),
|
|
1136
1097
|
user
|
|
1137
1098
|
} : void 0
|
|
1138
1099
|
);
|
|
1139
1100
|
setLoading(false);
|
|
1140
1101
|
setOpen(false);
|
|
1141
1102
|
}
|
|
1142
|
-
return /* @__PURE__ */ (0,
|
|
1143
|
-
/* @__PURE__ */ (0,
|
|
1103
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
1104
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1144
1105
|
WalletIcon,
|
|
1145
1106
|
{
|
|
1146
1107
|
iconReactNode: IconGoogle(),
|
|
@@ -1149,7 +1110,7 @@ function Web3Services({
|
|
|
1149
1110
|
loading
|
|
1150
1111
|
}
|
|
1151
1112
|
),
|
|
1152
|
-
/* @__PURE__ */ (0,
|
|
1113
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1153
1114
|
WalletIcon,
|
|
1154
1115
|
{
|
|
1155
1116
|
iconReactNode: IconDiscord(),
|
|
@@ -1158,7 +1119,7 @@ function Web3Services({
|
|
|
1158
1119
|
loading
|
|
1159
1120
|
}
|
|
1160
1121
|
),
|
|
1161
|
-
/* @__PURE__ */ (0,
|
|
1122
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1162
1123
|
WalletIcon,
|
|
1163
1124
|
{
|
|
1164
1125
|
iconReactNode: IconTwitter(),
|
|
@@ -1171,13 +1132,12 @@ function Web3Services({
|
|
|
1171
1132
|
}
|
|
1172
1133
|
|
|
1173
1134
|
// src/cardano-wallet/screen-main.tsx
|
|
1174
|
-
var
|
|
1135
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
1175
1136
|
function ScreenMain({
|
|
1176
1137
|
injectFn,
|
|
1177
1138
|
setOpen,
|
|
1178
1139
|
setScreen,
|
|
1179
1140
|
persist,
|
|
1180
|
-
cardanoPeerConnect,
|
|
1181
1141
|
burnerWallet,
|
|
1182
1142
|
webauthn,
|
|
1183
1143
|
showDownload,
|
|
@@ -1185,8 +1145,8 @@ function ScreenMain({
|
|
|
1185
1145
|
}) {
|
|
1186
1146
|
const wallets = useWalletList({ injectFn });
|
|
1187
1147
|
const { connect: connect2 } = useWallet();
|
|
1188
|
-
return /* @__PURE__ */ (0,
|
|
1189
|
-
wallets.map((wallet, index) => /* @__PURE__ */ (0,
|
|
1148
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "mesh-grid mesh-gap-4 mesh-py-4 mesh-grid-cols-5 mesh-place-items-center mesh-gap-y-8", children: [
|
|
1149
|
+
wallets.map((wallet, index) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1190
1150
|
WalletIcon,
|
|
1191
1151
|
{
|
|
1192
1152
|
icon: wallet.icon,
|
|
@@ -1198,7 +1158,7 @@ function ScreenMain({
|
|
|
1198
1158
|
},
|
|
1199
1159
|
index
|
|
1200
1160
|
)),
|
|
1201
|
-
web3Services && /* @__PURE__ */ (0,
|
|
1161
|
+
web3Services && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1202
1162
|
Web3Services,
|
|
1203
1163
|
{
|
|
1204
1164
|
options: web3Services,
|
|
@@ -1206,7 +1166,7 @@ function ScreenMain({
|
|
|
1206
1166
|
persist
|
|
1207
1167
|
}
|
|
1208
1168
|
),
|
|
1209
|
-
webauthn && /* @__PURE__ */ (0,
|
|
1169
|
+
webauthn && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1210
1170
|
WalletIcon,
|
|
1211
1171
|
{
|
|
1212
1172
|
iconReactNode: IconFingerprint(),
|
|
@@ -1216,17 +1176,7 @@ function ScreenMain({
|
|
|
1216
1176
|
}
|
|
1217
1177
|
}
|
|
1218
1178
|
),
|
|
1219
|
-
|
|
1220
|
-
WalletIcon,
|
|
1221
|
-
{
|
|
1222
|
-
iconReactNode: IconMonitorSmartphone(),
|
|
1223
|
-
name: screens.p2p.title,
|
|
1224
|
-
action: () => {
|
|
1225
|
-
setScreen("p2p");
|
|
1226
|
-
}
|
|
1227
|
-
}
|
|
1228
|
-
),
|
|
1229
|
-
burnerWallet && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1179
|
+
burnerWallet && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1230
1180
|
WalletIcon,
|
|
1231
1181
|
{
|
|
1232
1182
|
iconReactNode: IconBookDashed(),
|
|
@@ -1236,7 +1186,7 @@ function ScreenMain({
|
|
|
1236
1186
|
}
|
|
1237
1187
|
}
|
|
1238
1188
|
),
|
|
1239
|
-
showDownload && /* @__PURE__ */ (0,
|
|
1189
|
+
showDownload && /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
1240
1190
|
WalletIcon,
|
|
1241
1191
|
{
|
|
1242
1192
|
iconReactNode: IconDownload(),
|
|
@@ -1252,79 +1202,16 @@ function ScreenMain({
|
|
|
1252
1202
|
] }) });
|
|
1253
1203
|
}
|
|
1254
1204
|
|
|
1255
|
-
// src/cardano-wallet/screen-p2p.tsx
|
|
1256
|
-
var import_react12 = require("react");
|
|
1257
|
-
var import_cardano_peer_connect = require("@fabianbormann/cardano-peer-connect");
|
|
1258
|
-
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1259
|
-
function ScreenP2P({
|
|
1260
|
-
cardanoPeerConnect,
|
|
1261
|
-
setOpen
|
|
1262
|
-
}) {
|
|
1263
|
-
const dAppConnect = (0, import_react12.useRef)(null);
|
|
1264
|
-
const qrCodeField = (0, import_react12.useRef)(null);
|
|
1265
|
-
const [address, setAddress] = (0, import_react12.useState)("");
|
|
1266
|
-
const [copied, setCopied] = (0, import_react12.useState)(false);
|
|
1267
|
-
const { connect: connect2 } = useWallet();
|
|
1268
|
-
(0, import_react12.useEffect)(() => {
|
|
1269
|
-
if (cardanoPeerConnect) {
|
|
1270
|
-
if (dAppConnect.current === null) {
|
|
1271
|
-
dAppConnect.current = new import_cardano_peer_connect.DAppPeerConnect({
|
|
1272
|
-
dAppInfo: {
|
|
1273
|
-
name: cardanoPeerConnect.dAppInfo.name,
|
|
1274
|
-
url: cardanoPeerConnect.dAppInfo.url
|
|
1275
|
-
},
|
|
1276
|
-
announce: cardanoPeerConnect.announce,
|
|
1277
|
-
onApiInject: async (name, address2) => {
|
|
1278
|
-
await connect2(name);
|
|
1279
|
-
setOpen(false);
|
|
1280
|
-
},
|
|
1281
|
-
onApiEject: (name, address2) => {
|
|
1282
|
-
},
|
|
1283
|
-
onConnect: (address2, walletInfo) => {
|
|
1284
|
-
},
|
|
1285
|
-
onDisconnect: () => {
|
|
1286
|
-
},
|
|
1287
|
-
verifyConnection: (walletInfo, callback) => {
|
|
1288
|
-
callback(true, true);
|
|
1289
|
-
},
|
|
1290
|
-
useWalletDiscovery: true
|
|
1291
|
-
});
|
|
1292
|
-
if (dAppConnect.current) {
|
|
1293
|
-
const address2 = dAppConnect.current.getAddress();
|
|
1294
|
-
setAddress(address2);
|
|
1295
|
-
if (qrCodeField.current !== null) {
|
|
1296
|
-
dAppConnect.current.generateQRCode(qrCodeField.current);
|
|
1297
|
-
}
|
|
1298
|
-
}
|
|
1299
|
-
}
|
|
1300
|
-
}
|
|
1301
|
-
}, []);
|
|
1302
|
-
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)("div", { className: "mesh-flex mesh-flex-col mesh-items-center mesh-justify-center", children: [
|
|
1303
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { style: { marginTop: 16, marginBottom: 16 }, ref: qrCodeField }),
|
|
1304
|
-
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1305
|
-
Button,
|
|
1306
|
-
{
|
|
1307
|
-
variant: "outline",
|
|
1308
|
-
onClick: () => {
|
|
1309
|
-
navigator.clipboard.writeText(address);
|
|
1310
|
-
setCopied(true);
|
|
1311
|
-
},
|
|
1312
|
-
children: copied ? "Copied" : "Copy Address"
|
|
1313
|
-
}
|
|
1314
|
-
)
|
|
1315
|
-
] });
|
|
1316
|
-
}
|
|
1317
|
-
|
|
1318
1205
|
// src/cardano-wallet/screen-webauthn.tsx
|
|
1319
|
-
var
|
|
1206
|
+
var import_react12 = require("react");
|
|
1320
1207
|
var import_wallet4 = require("@meshsdk/wallet");
|
|
1321
1208
|
|
|
1322
1209
|
// src/common/input.tsx
|
|
1323
1210
|
var React5 = __toESM(require("react"), 1);
|
|
1324
|
-
var
|
|
1211
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
1325
1212
|
var Input = React5.forwardRef(
|
|
1326
1213
|
({ className, type, ...props }, ref) => {
|
|
1327
|
-
return /* @__PURE__ */ (0,
|
|
1214
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
1328
1215
|
"input",
|
|
1329
1216
|
{
|
|
1330
1217
|
type,
|
|
@@ -1344,11 +1231,11 @@ Input.displayName = "Input";
|
|
|
1344
1231
|
var React6 = __toESM(require("react"), 1);
|
|
1345
1232
|
var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
|
|
1346
1233
|
var import_class_variance_authority2 = require("class-variance-authority");
|
|
1347
|
-
var
|
|
1234
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
1348
1235
|
var labelVariants = (0, import_class_variance_authority2.cva)(
|
|
1349
1236
|
"mesh-text-sm mesh-font-medium mesh-leading-none peer-disabled:mesh-cursor-not-allowed peer-disabled:mesh-opacity-70"
|
|
1350
1237
|
);
|
|
1351
|
-
var Label2 = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0,
|
|
1238
|
+
var Label2 = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
1352
1239
|
LabelPrimitive.Root,
|
|
1353
1240
|
{
|
|
1354
1241
|
ref,
|
|
@@ -1359,16 +1246,16 @@ var Label2 = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
1359
1246
|
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
1360
1247
|
|
|
1361
1248
|
// src/cardano-wallet/screen-webauthn.tsx
|
|
1362
|
-
var
|
|
1249
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
1363
1250
|
function ScreenWebauthn({
|
|
1364
1251
|
url,
|
|
1365
1252
|
networkId,
|
|
1366
1253
|
provider,
|
|
1367
1254
|
setOpen
|
|
1368
1255
|
}) {
|
|
1369
|
-
const [loading, setLoading] = (0,
|
|
1370
|
-
const [userName, setUserName] = (0,
|
|
1371
|
-
const [password, setPassword] = (0,
|
|
1256
|
+
const [loading, setLoading] = (0, import_react12.useState)(false);
|
|
1257
|
+
const [userName, setUserName] = (0, import_react12.useState)("");
|
|
1258
|
+
const [password, setPassword] = (0, import_react12.useState)("");
|
|
1372
1259
|
const { setWallet } = useWallet();
|
|
1373
1260
|
function createWallet(root) {
|
|
1374
1261
|
setTimeout(() => {
|
|
@@ -1393,10 +1280,10 @@ function ScreenWebauthn({
|
|
|
1393
1280
|
createWallet(res.wallet.bech32PrivateKey);
|
|
1394
1281
|
}
|
|
1395
1282
|
}
|
|
1396
|
-
return /* @__PURE__ */ (0,
|
|
1397
|
-
/* @__PURE__ */ (0,
|
|
1398
|
-
/* @__PURE__ */ (0,
|
|
1399
|
-
/* @__PURE__ */ (0,
|
|
1283
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "mesh-flex mesh-flex-row mesh-flex-gap-4 mesh-items-center mesh-justify-center", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_jsx_runtime20.Fragment, { children: "Connecting wallet..." }) : /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_jsx_runtime20.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "mesh-flex mesh-flex-col mesh-gap-6 mesh-w-full mesh-mx-8", children: [
|
|
1284
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "mesh-grid mesh-gap-2", children: [
|
|
1285
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Label2, { htmlFor: "username", children: "Username" }),
|
|
1286
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1400
1287
|
Input,
|
|
1401
1288
|
{
|
|
1402
1289
|
id: "username",
|
|
@@ -1406,11 +1293,11 @@ function ScreenWebauthn({
|
|
|
1406
1293
|
onChange: (e) => setUserName(e.target.value)
|
|
1407
1294
|
}
|
|
1408
1295
|
),
|
|
1409
|
-
/* @__PURE__ */ (0,
|
|
1296
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "mesh-text-gray-500 mesh-text-xs", children: "Unique to the application you are connecting." })
|
|
1410
1297
|
] }),
|
|
1411
|
-
/* @__PURE__ */ (0,
|
|
1412
|
-
/* @__PURE__ */ (0,
|
|
1413
|
-
/* @__PURE__ */ (0,
|
|
1298
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "mesh-grid mesh-gap-2", children: [
|
|
1299
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("div", { className: "mesh-flex mesh-items-center", children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Label2, { htmlFor: "password", children: "Unique Code" }) }),
|
|
1300
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1414
1301
|
Input,
|
|
1415
1302
|
{
|
|
1416
1303
|
id: "password",
|
|
@@ -1420,9 +1307,9 @@ function ScreenWebauthn({
|
|
|
1420
1307
|
onChange: (e) => setPassword(e.target.value)
|
|
1421
1308
|
}
|
|
1422
1309
|
),
|
|
1423
|
-
/* @__PURE__ */ (0,
|
|
1310
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "mesh-text-gray-500 mesh-text-xs", children: "Additional security to derive your wallet." })
|
|
1424
1311
|
] }),
|
|
1425
|
-
/* @__PURE__ */ (0,
|
|
1312
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
1426
1313
|
Button,
|
|
1427
1314
|
{
|
|
1428
1315
|
className: "mesh-w-full",
|
|
@@ -1435,62 +1322,53 @@ function ScreenWebauthn({
|
|
|
1435
1322
|
}
|
|
1436
1323
|
|
|
1437
1324
|
// src/cardano-wallet/index.tsx
|
|
1438
|
-
var
|
|
1325
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1439
1326
|
var CardanoWallet = ({
|
|
1440
1327
|
label = "Connect Wallet",
|
|
1441
1328
|
onConnected = void 0,
|
|
1442
1329
|
isDark = false,
|
|
1443
1330
|
persist = false,
|
|
1444
1331
|
injectFn = void 0,
|
|
1445
|
-
cardanoPeerConnect = void 0,
|
|
1446
1332
|
burnerWallet = void 0,
|
|
1447
1333
|
webauthn = void 0,
|
|
1448
1334
|
showDownload = true,
|
|
1449
1335
|
web3Services = void 0
|
|
1450
1336
|
}) => {
|
|
1451
|
-
const [open, setOpen] = (0,
|
|
1452
|
-
const [screen, setScreen] = (0,
|
|
1337
|
+
const [open, setOpen] = (0, import_react13.useState)(false);
|
|
1338
|
+
const [screen, setScreen] = (0, import_react13.useState)("main");
|
|
1453
1339
|
const { wallet, connected, setPersist, setWeb3Services } = useWallet();
|
|
1454
|
-
(0,
|
|
1340
|
+
(0, import_react13.useEffect)(() => {
|
|
1455
1341
|
setPersist(persist);
|
|
1456
1342
|
if (web3Services) setWeb3Services(web3Services);
|
|
1457
|
-
}, []);
|
|
1458
|
-
(0,
|
|
1343
|
+
}, [persist, web3Services, setPersist, setWeb3Services]);
|
|
1344
|
+
(0, import_react13.useEffect)(() => {
|
|
1459
1345
|
if (connected) {
|
|
1460
1346
|
if (onConnected) onConnected();
|
|
1461
1347
|
}
|
|
1462
1348
|
}, [connected, wallet]);
|
|
1463
|
-
return /* @__PURE__ */ (0,
|
|
1464
|
-
/* @__PURE__ */ (0,
|
|
1465
|
-
/* @__PURE__ */ (0,
|
|
1349
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Dialog, { open, onOpenChange: setOpen, children: [
|
|
1350
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("div", { className: isDark ? "mesh-dark" : "", children: !connected ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Button, { variant: "outline", className: isDark ? "mesh-dark" : "", children: label }) }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ConnectedButton, {}) }),
|
|
1351
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1466
1352
|
DialogContent,
|
|
1467
1353
|
{
|
|
1468
1354
|
className: "sm:mesh-max-w-[425px] mesh-dark",
|
|
1469
1355
|
onOpenAutoFocus: (event) => event.preventDefault(),
|
|
1470
1356
|
children: [
|
|
1471
|
-
/* @__PURE__ */ (0,
|
|
1472
|
-
screen == "main" && /* @__PURE__ */ (0,
|
|
1357
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Header, { screen, setScreen }),
|
|
1358
|
+
screen == "main" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1473
1359
|
ScreenMain,
|
|
1474
1360
|
{
|
|
1475
1361
|
injectFn,
|
|
1476
1362
|
setOpen,
|
|
1477
1363
|
setScreen,
|
|
1478
1364
|
persist,
|
|
1479
|
-
cardanoPeerConnect: cardanoPeerConnect != void 0,
|
|
1480
1365
|
burnerWallet: burnerWallet != void 0,
|
|
1481
1366
|
webauthn: webauthn != void 0,
|
|
1482
1367
|
showDownload,
|
|
1483
1368
|
web3Services
|
|
1484
1369
|
}
|
|
1485
1370
|
),
|
|
1486
|
-
screen == "
|
|
1487
|
-
ScreenP2P,
|
|
1488
|
-
{
|
|
1489
|
-
cardanoPeerConnect,
|
|
1490
|
-
setOpen
|
|
1491
|
-
}
|
|
1492
|
-
),
|
|
1493
|
-
screen == "burner" && burnerWallet && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
|
1371
|
+
screen == "burner" && burnerWallet && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1494
1372
|
ScreenBurner,
|
|
1495
1373
|
{
|
|
1496
1374
|
networkId: burnerWallet.networkId,
|
|
@@ -1498,7 +1376,7 @@ var CardanoWallet = ({
|
|
|
1498
1376
|
setOpen
|
|
1499
1377
|
}
|
|
1500
1378
|
),
|
|
1501
|
-
screen == "webauthn" && webauthn && /* @__PURE__ */ (0,
|
|
1379
|
+
screen == "webauthn" && webauthn && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1502
1380
|
ScreenWebauthn,
|
|
1503
1381
|
{
|
|
1504
1382
|
url: webauthn.url,
|
|
@@ -1507,7 +1385,7 @@ var CardanoWallet = ({
|
|
|
1507
1385
|
setOpen
|
|
1508
1386
|
}
|
|
1509
1387
|
),
|
|
1510
|
-
/* @__PURE__ */ (0,
|
|
1388
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Footer, {})
|
|
1511
1389
|
]
|
|
1512
1390
|
}
|
|
1513
1391
|
)
|
|
@@ -1517,25 +1395,33 @@ function Header({
|
|
|
1517
1395
|
screen,
|
|
1518
1396
|
setScreen
|
|
1519
1397
|
}) {
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
/* @__PURE__ */ (0,
|
|
1524
|
-
|
|
1398
|
+
const screenData = screens[screen];
|
|
1399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(DialogHeader, { children: [
|
|
1400
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(DialogTitle, { className: "mesh-flex mesh-justify-between", children: [
|
|
1401
|
+
screen !== "main" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1402
|
+
"button",
|
|
1403
|
+
{
|
|
1404
|
+
onClick: () => setScreen("main"),
|
|
1405
|
+
"aria-label": "Back to wallet selection",
|
|
1406
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(IconChevronRight, {})
|
|
1407
|
+
}
|
|
1408
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { style: { width: "24px" } }),
|
|
1409
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "mesh-text-white", children: screenData.title }),
|
|
1410
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { style: { width: "24px" } })
|
|
1525
1411
|
] }),
|
|
1526
|
-
/* @__PURE__ */ (0,
|
|
1412
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogDescription, { children: screenData.subtitle && screenData.subtitle })
|
|
1527
1413
|
] });
|
|
1528
1414
|
}
|
|
1529
1415
|
function Footer() {
|
|
1530
|
-
return /* @__PURE__ */ (0,
|
|
1416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogFooter, { className: "mesh-justify-center mesh-text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
|
|
1531
1417
|
"a",
|
|
1532
1418
|
{
|
|
1533
1419
|
href: "https://meshjs.dev/",
|
|
1534
1420
|
target: "_blank",
|
|
1535
1421
|
className: "mesh-grow mesh-flex mesh-gap-1 mesh-items-center mesh-justify-center mesh-text-zinc-500 hover:mesh-text-white mesh-fill-zinc-500 hover:mesh-fill-white",
|
|
1536
1422
|
children: [
|
|
1537
|
-
/* @__PURE__ */ (0,
|
|
1538
|
-
/* @__PURE__ */ (0,
|
|
1423
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "", children: "Powered by" }),
|
|
1424
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1539
1425
|
"svg",
|
|
1540
1426
|
{
|
|
1541
1427
|
width: 24,
|
|
@@ -1543,31 +1429,31 @@ function Footer() {
|
|
|
1543
1429
|
enableBackground: "new 0 0 300 200",
|
|
1544
1430
|
viewBox: "0 0 300 200",
|
|
1545
1431
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1546
|
-
children: /* @__PURE__ */ (0,
|
|
1432
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("path", { d: "m289 127-45-60-45-60c-.9-1.3-2.4-2-4-2s-3.1.7-4 2l-37 49.3c-2 2.7-6 2.7-8 0l-37-49.3c-.9-1.3-2.4-2-4-2s-3.1.7-4 2l-45 60-45 60c-1.3 1.8-1.3 4.2 0 6l45 60c.9 1.3 2.4 2 4 2s3.1-.7 4-2l37-49.3c2-2.7 6-2.7 8 0l37 49.3c.9 1.3 2.4 2 4 2s3.1-.7 4-2l37-49.3c2-2.7 6-2.7 8 0l37 49.3c.9 1.3 2.4 2 4 2s3.1-.7 4-2l45-60c1.3-1.8 1.3-4.2 0-6zm-90-103.3 32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0l-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0zm-90 0 32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0l-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0zm-53 152.6-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0zm90 0-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0zm90 0-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0z" })
|
|
1547
1433
|
}
|
|
1548
1434
|
),
|
|
1549
|
-
/* @__PURE__ */ (0,
|
|
1435
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "", children: "Mesh SDK" })
|
|
1550
1436
|
]
|
|
1551
1437
|
}
|
|
1552
1438
|
) });
|
|
1553
1439
|
}
|
|
1554
1440
|
|
|
1555
1441
|
// src/mesh-badge/mesh-logo.tsx
|
|
1556
|
-
var
|
|
1557
|
-
var MeshLogo = () => /* @__PURE__ */ (0,
|
|
1442
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
1443
|
+
var MeshLogo = () => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
|
1558
1444
|
"svg",
|
|
1559
1445
|
{
|
|
1560
1446
|
className: "mesh-h-16 mesh-p-2",
|
|
1561
1447
|
fill: "currentColor",
|
|
1562
1448
|
viewBox: "0 0 300 200",
|
|
1563
1449
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1564
|
-
children: /* @__PURE__ */ (0,
|
|
1450
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)("path", { d: "m289 127-45-60-45-60c-.9-1.3-2.4-2-4-2s-3.1.7-4 2l-37 49.3c-2 2.7-6 2.7-8 0l-37-49.3c-.9-1.3-2.4-2-4-2s-3.1.7-4 2l-45 60-45 60c-1.3 1.8-1.3 4.2 0 6l45 60c.9 1.3 2.4 2 4 2s3.1-.7 4-2l37-49.3c2-2.7 6-2.7 8 0l37 49.3c.9 1.3 2.4 2 4 2s3.1-.7 4-2l37-49.3c2-2.7 6-2.7 8 0l37 49.3c.9 1.3 2.4 2 4 2s3.1-.7 4-2l45-60c1.3-1.8 1.3-4.2 0-6zm-90-103.3 32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0l-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0zm-90 0 32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0l-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0zm-53 152.6-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0zm90 0-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0zm90 0-32.5-43.3c-1.3-1.8-1.3-4.2 0-6l32.5-43.3c2-2.7 6-2.7 8 0l32.5 43.3c1.3 1.8 1.3 4.2 0 6l-32.5 43.3c-2 2.7-6 2.7-8 0z" })
|
|
1565
1451
|
}
|
|
1566
1452
|
);
|
|
1567
1453
|
|
|
1568
1454
|
// src/mesh-badge/index.tsx
|
|
1569
|
-
var
|
|
1570
|
-
var MeshBadge = ({ isDark = false }) => /* @__PURE__ */ (0,
|
|
1455
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
|
1456
|
+
var MeshBadge = ({ isDark = false }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
|
|
1571
1457
|
"a",
|
|
1572
1458
|
{
|
|
1573
1459
|
className: `mesh-flex mesh-max-w-fit mesh-flex-col mesh-items-center mesh-rounded-md mesh-border mesh-border-solid mesh-border-current mesh-p-1 mesh-text-xl mesh-font-semibold mesh-no-underline ${isDark ? `mesh-bg-neutral-950 mesh-text-neutral-50` : `mesh-bg-neutral-50 mesh-text-neutral-950`}`,
|
|
@@ -1579,7 +1465,7 @@ var MeshBadge = ({ isDark = false }) => /* @__PURE__ */ (0, import_jsx_runtime25
|
|
|
1579
1465
|
rel: "noopener noreferrer",
|
|
1580
1466
|
target: "_blank",
|
|
1581
1467
|
children: [
|
|
1582
|
-
/* @__PURE__ */ (0,
|
|
1468
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(MeshLogo, {}),
|
|
1583
1469
|
"Mesh"
|
|
1584
1470
|
]
|
|
1585
1471
|
}
|