@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.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/cardano-wallet/index.tsx
|
|
2
|
-
import { useEffect as
|
|
2
|
+
import { useEffect as useEffect9, useState as useState12 } from "react";
|
|
3
3
|
|
|
4
4
|
// src/common/button.tsx
|
|
5
5
|
import * as React from "react";
|
|
@@ -180,9 +180,6 @@ import { useContext, useEffect as useEffect2, useState as useState2 } from "reac
|
|
|
180
180
|
// src/contexts/WalletContext.ts
|
|
181
181
|
import { createContext, useCallback, useEffect, useState } from "react";
|
|
182
182
|
import { BrowserWallet } from "@meshsdk/wallet";
|
|
183
|
-
import {
|
|
184
|
-
Web3Wallet
|
|
185
|
-
} from "@meshsdk/web3-sdk";
|
|
186
183
|
var INITIAL_STATE = {
|
|
187
184
|
walletName: void 0,
|
|
188
185
|
walletInstance: {}
|
|
@@ -265,30 +262,24 @@ var useWalletStore = () => {
|
|
|
265
262
|
load();
|
|
266
263
|
}, [connectedWalletInstance]);
|
|
267
264
|
useEffect(() => {
|
|
268
|
-
const
|
|
269
|
-
if (persistSession &&
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
setConnectedWalletName(persist2.walletName);
|
|
284
|
-
setState("CONNECTED" /* CONNECTED */);
|
|
285
|
-
});
|
|
286
|
-
setWeb3UserData(persist2.user);
|
|
287
|
-
} else {
|
|
288
|
-
connectWallet(persist2.walletName);
|
|
265
|
+
const persistData = localStorage.getItem(localstoragePersist);
|
|
266
|
+
if (persistSession && persistData) {
|
|
267
|
+
try {
|
|
268
|
+
const persist = JSON.parse(persistData);
|
|
269
|
+
if (!persist || typeof persist.walletName !== "string") {
|
|
270
|
+
throw new Error("Invalid persist data structure");
|
|
271
|
+
}
|
|
272
|
+
if (persist.walletName === "utxos") {
|
|
273
|
+
localStorage.removeItem(localstoragePersist);
|
|
274
|
+
} else {
|
|
275
|
+
connectWallet(persist.walletName);
|
|
276
|
+
}
|
|
277
|
+
} catch (error2) {
|
|
278
|
+
console.error("Failed to restore wallet session:", error2);
|
|
279
|
+
localStorage.removeItem(localstoragePersist);
|
|
289
280
|
}
|
|
290
281
|
}
|
|
291
|
-
}, [persistSession]);
|
|
282
|
+
}, [persistSession, connectWallet]);
|
|
292
283
|
return {
|
|
293
284
|
hasConnectedWallet: INITIAL_STATE.walletName !== connectedWalletName,
|
|
294
285
|
connectedWalletInstance,
|
|
@@ -330,9 +321,9 @@ var WalletContext = createContext({
|
|
|
330
321
|
|
|
331
322
|
// src/contexts/index.tsx
|
|
332
323
|
import { Fragment, jsx as jsx4 } from "react/jsx-runtime";
|
|
333
|
-
var MeshProvider = (
|
|
324
|
+
var MeshProvider = ({ children }) => {
|
|
334
325
|
const store = useWalletStore();
|
|
335
|
-
return /* @__PURE__ */ jsx4(WalletContext.Provider, { value: store, children: /* @__PURE__ */ jsx4(Fragment, { children
|
|
326
|
+
return /* @__PURE__ */ jsx4(WalletContext.Provider, { value: store, children: /* @__PURE__ */ jsx4(Fragment, { children }) });
|
|
336
327
|
};
|
|
337
328
|
|
|
338
329
|
// src/hooks/useAddress.ts
|
|
@@ -485,19 +476,21 @@ var useWalletSubmit = () => {
|
|
|
485
476
|
const submitTx = useCallback2(async (signedTx) => {
|
|
486
477
|
setSubmitting(true);
|
|
487
478
|
setError(void 0);
|
|
479
|
+
setResult(void 0);
|
|
488
480
|
try {
|
|
489
|
-
if (hasConnectedWallet) {
|
|
490
|
-
|
|
491
|
-
|
|
481
|
+
if (!hasConnectedWallet) {
|
|
482
|
+
throw new Error(
|
|
483
|
+
"Please make sure to connect a wallet before calling useWalletSubmit"
|
|
484
|
+
);
|
|
492
485
|
}
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
);
|
|
486
|
+
const txHash = await connectedWalletInstance.submitTx(signedTx);
|
|
487
|
+
setResult(txHash);
|
|
496
488
|
} catch (error2) {
|
|
497
489
|
setError(error2);
|
|
490
|
+
} finally {
|
|
491
|
+
setSubmitting(false);
|
|
498
492
|
}
|
|
499
|
-
|
|
500
|
-
}, []);
|
|
493
|
+
}, [hasConnectedWallet, connectedWalletInstance]);
|
|
501
494
|
return {
|
|
502
495
|
error,
|
|
503
496
|
result,
|
|
@@ -695,11 +688,8 @@ function ConnectedButton() {
|
|
|
695
688
|
// src/cardano-wallet/data.ts
|
|
696
689
|
var screens = {
|
|
697
690
|
main: {
|
|
698
|
-
title: "Connect Wallet"
|
|
699
|
-
|
|
700
|
-
p2p: {
|
|
701
|
-
title: "Peer Connect (CIP45)",
|
|
702
|
-
subtitle: "Use wallet that supports CIP-45, scan this QR code to connect."
|
|
691
|
+
title: "Connect Wallet",
|
|
692
|
+
subtitle: void 0
|
|
703
693
|
},
|
|
704
694
|
burner: {
|
|
705
695
|
title: "Burner Wallet",
|
|
@@ -894,45 +884,14 @@ function IconFingerprint() {
|
|
|
894
884
|
);
|
|
895
885
|
}
|
|
896
886
|
|
|
897
|
-
// src/common/icons/icon-monitor-smartphone.tsx
|
|
898
|
-
import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
899
|
-
function IconMonitorSmartphone() {
|
|
900
|
-
return /* @__PURE__ */ jsxs8(
|
|
901
|
-
"svg",
|
|
902
|
-
{
|
|
903
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
904
|
-
width: "24",
|
|
905
|
-
height: "24",
|
|
906
|
-
viewBox: "0 0 24 24",
|
|
907
|
-
fill: "none",
|
|
908
|
-
stroke: "black",
|
|
909
|
-
strokeWidth: "2",
|
|
910
|
-
strokeLinecap: "round",
|
|
911
|
-
strokeLinejoin: "round",
|
|
912
|
-
style: {
|
|
913
|
-
color: "#ffadff",
|
|
914
|
-
width: "56px",
|
|
915
|
-
height: "56px",
|
|
916
|
-
strokeWidth: "1px"
|
|
917
|
-
},
|
|
918
|
-
children: [
|
|
919
|
-
/* @__PURE__ */ jsx11("path", { d: "M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8" }),
|
|
920
|
-
/* @__PURE__ */ jsx11("path", { d: "M10 19v-3.96 3.15" }),
|
|
921
|
-
/* @__PURE__ */ jsx11("path", { d: "M7 19h5" }),
|
|
922
|
-
/* @__PURE__ */ jsx11("rect", { width: "6", height: "10", x: "16", y: "12", rx: "2" })
|
|
923
|
-
]
|
|
924
|
-
}
|
|
925
|
-
);
|
|
926
|
-
}
|
|
927
|
-
|
|
928
887
|
// src/common/tooltip.tsx
|
|
929
888
|
import * as React4 from "react";
|
|
930
889
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
931
|
-
import { jsx as
|
|
890
|
+
import { jsx as jsx11 } from "react/jsx-runtime";
|
|
932
891
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
933
892
|
var Tooltip = TooltipPrimitive.Root;
|
|
934
893
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|
|
935
|
-
var TooltipContent = React4.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */
|
|
894
|
+
var TooltipContent = React4.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx11(
|
|
936
895
|
TooltipPrimitive.Content,
|
|
937
896
|
{
|
|
938
897
|
ref,
|
|
@@ -947,7 +906,7 @@ var TooltipContent = React4.forwardRef(({ className, sideOffset = 4, ...props },
|
|
|
947
906
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
948
907
|
|
|
949
908
|
// src/cardano-wallet/wallet-icon.tsx
|
|
950
|
-
import { jsx as
|
|
909
|
+
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
951
910
|
function WalletIcon({
|
|
952
911
|
icon,
|
|
953
912
|
name,
|
|
@@ -955,34 +914,34 @@ function WalletIcon({
|
|
|
955
914
|
iconReactNode,
|
|
956
915
|
loading = false
|
|
957
916
|
}) {
|
|
958
|
-
return /* @__PURE__ */
|
|
959
|
-
/* @__PURE__ */
|
|
917
|
+
return /* @__PURE__ */ jsxs8(Tooltip, { delayDuration: 0, defaultOpen: false, children: [
|
|
918
|
+
/* @__PURE__ */ jsx12(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs8(
|
|
960
919
|
"button",
|
|
961
920
|
{
|
|
962
921
|
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",
|
|
963
922
|
onClick: action,
|
|
964
923
|
disabled: loading,
|
|
965
924
|
children: [
|
|
966
|
-
icon && !loading && /* @__PURE__ */
|
|
925
|
+
icon && !loading && /* @__PURE__ */ jsx12("img", { src: icon, alt: name, className: "mesh-w-8 mesh-h-8" }),
|
|
967
926
|
!loading && iconReactNode && iconReactNode,
|
|
968
|
-
loading && /* @__PURE__ */
|
|
927
|
+
loading && /* @__PURE__ */ jsx12("span", { className: "text-black", children: "..." })
|
|
969
928
|
]
|
|
970
929
|
}
|
|
971
930
|
) }),
|
|
972
|
-
/* @__PURE__ */
|
|
931
|
+
/* @__PURE__ */ jsx12(TooltipContent, { children: /* @__PURE__ */ jsx12("p", { children: name }) })
|
|
973
932
|
] });
|
|
974
933
|
}
|
|
975
934
|
|
|
976
935
|
// src/cardano-wallet/web3-services.tsx
|
|
977
936
|
import { useState as useState10 } from "react";
|
|
978
937
|
import {
|
|
979
|
-
Web3Wallet
|
|
980
|
-
} from "@
|
|
938
|
+
Web3Wallet
|
|
939
|
+
} from "@utxos/sdk";
|
|
981
940
|
|
|
982
941
|
// src/common/icons/icon-discord.tsx
|
|
983
|
-
import { jsx as
|
|
942
|
+
import { jsx as jsx13 } from "react/jsx-runtime";
|
|
984
943
|
function IconDiscord() {
|
|
985
|
-
return /* @__PURE__ */
|
|
944
|
+
return /* @__PURE__ */ jsx13(
|
|
986
945
|
"svg",
|
|
987
946
|
{
|
|
988
947
|
viewBox: "0 0 20 20",
|
|
@@ -991,7 +950,7 @@ function IconDiscord() {
|
|
|
991
950
|
width: "24px",
|
|
992
951
|
height: "24px"
|
|
993
952
|
},
|
|
994
|
-
children: /* @__PURE__ */
|
|
953
|
+
children: /* @__PURE__ */ jsx13(
|
|
995
954
|
"path",
|
|
996
955
|
{
|
|
997
956
|
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",
|
|
@@ -1003,9 +962,9 @@ function IconDiscord() {
|
|
|
1003
962
|
}
|
|
1004
963
|
|
|
1005
964
|
// src/common/icons/icon-google.tsx
|
|
1006
|
-
import { jsx as
|
|
965
|
+
import { jsx as jsx14, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1007
966
|
function IconGoogle() {
|
|
1008
|
-
return /* @__PURE__ */
|
|
967
|
+
return /* @__PURE__ */ jsxs9(
|
|
1009
968
|
"svg",
|
|
1010
969
|
{
|
|
1011
970
|
viewBox: "0 0 262 262",
|
|
@@ -1016,28 +975,28 @@ function IconGoogle() {
|
|
|
1016
975
|
height: "24px"
|
|
1017
976
|
},
|
|
1018
977
|
children: [
|
|
1019
|
-
/* @__PURE__ */
|
|
978
|
+
/* @__PURE__ */ jsx14(
|
|
1020
979
|
"path",
|
|
1021
980
|
{
|
|
1022
981
|
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",
|
|
1023
982
|
fill: "#4285F4"
|
|
1024
983
|
}
|
|
1025
984
|
),
|
|
1026
|
-
/* @__PURE__ */
|
|
985
|
+
/* @__PURE__ */ jsx14(
|
|
1027
986
|
"path",
|
|
1028
987
|
{
|
|
1029
988
|
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",
|
|
1030
989
|
fill: "#34A853"
|
|
1031
990
|
}
|
|
1032
991
|
),
|
|
1033
|
-
/* @__PURE__ */
|
|
992
|
+
/* @__PURE__ */ jsx14(
|
|
1034
993
|
"path",
|
|
1035
994
|
{
|
|
1036
995
|
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",
|
|
1037
996
|
fill: "#FBBC05"
|
|
1038
997
|
}
|
|
1039
998
|
),
|
|
1040
|
-
/* @__PURE__ */
|
|
999
|
+
/* @__PURE__ */ jsx14(
|
|
1041
1000
|
"path",
|
|
1042
1001
|
{
|
|
1043
1002
|
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",
|
|
@@ -1050,9 +1009,9 @@ function IconGoogle() {
|
|
|
1050
1009
|
}
|
|
1051
1010
|
|
|
1052
1011
|
// src/common/icons/icon-twitter.tsx
|
|
1053
|
-
import { jsx as
|
|
1012
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
1054
1013
|
function IconTwitter() {
|
|
1055
|
-
return /* @__PURE__ */
|
|
1014
|
+
return /* @__PURE__ */ jsx15(
|
|
1056
1015
|
"svg",
|
|
1057
1016
|
{
|
|
1058
1017
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1062,13 +1021,13 @@ function IconTwitter() {
|
|
|
1062
1021
|
width: "24px",
|
|
1063
1022
|
height: "24px"
|
|
1064
1023
|
},
|
|
1065
|
-
children: /* @__PURE__ */
|
|
1024
|
+
children: /* @__PURE__ */ jsx15("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" })
|
|
1066
1025
|
}
|
|
1067
1026
|
);
|
|
1068
1027
|
}
|
|
1069
1028
|
|
|
1070
1029
|
// src/cardano-wallet/web3-services.tsx
|
|
1071
|
-
import { Fragment as Fragment3, jsx as
|
|
1030
|
+
import { Fragment as Fragment3, jsx as jsx16, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1072
1031
|
function Web3Services({
|
|
1073
1032
|
options,
|
|
1074
1033
|
setOpen,
|
|
@@ -1086,22 +1045,22 @@ function Web3Services({
|
|
|
1086
1045
|
projectId: options.projectId,
|
|
1087
1046
|
directTo
|
|
1088
1047
|
};
|
|
1089
|
-
const wallet = await
|
|
1048
|
+
const wallet = await Web3Wallet.enable(_options);
|
|
1090
1049
|
const user = wallet.getUser();
|
|
1091
1050
|
setWeb3UserData(user);
|
|
1092
1051
|
setWallet(
|
|
1093
1052
|
wallet.cardano,
|
|
1094
1053
|
"utxos",
|
|
1095
1054
|
persist ? {
|
|
1096
|
-
walletAddress: await wallet.getChangeAddress(),
|
|
1055
|
+
walletAddress: await wallet.cardano.getChangeAddress(),
|
|
1097
1056
|
user
|
|
1098
1057
|
} : void 0
|
|
1099
1058
|
);
|
|
1100
1059
|
setLoading(false);
|
|
1101
1060
|
setOpen(false);
|
|
1102
1061
|
}
|
|
1103
|
-
return /* @__PURE__ */
|
|
1104
|
-
/* @__PURE__ */
|
|
1062
|
+
return /* @__PURE__ */ jsxs10(Fragment3, { children: [
|
|
1063
|
+
/* @__PURE__ */ jsx16(
|
|
1105
1064
|
WalletIcon,
|
|
1106
1065
|
{
|
|
1107
1066
|
iconReactNode: IconGoogle(),
|
|
@@ -1110,7 +1069,7 @@ function Web3Services({
|
|
|
1110
1069
|
loading
|
|
1111
1070
|
}
|
|
1112
1071
|
),
|
|
1113
|
-
/* @__PURE__ */
|
|
1072
|
+
/* @__PURE__ */ jsx16(
|
|
1114
1073
|
WalletIcon,
|
|
1115
1074
|
{
|
|
1116
1075
|
iconReactNode: IconDiscord(),
|
|
@@ -1119,7 +1078,7 @@ function Web3Services({
|
|
|
1119
1078
|
loading
|
|
1120
1079
|
}
|
|
1121
1080
|
),
|
|
1122
|
-
/* @__PURE__ */
|
|
1081
|
+
/* @__PURE__ */ jsx16(
|
|
1123
1082
|
WalletIcon,
|
|
1124
1083
|
{
|
|
1125
1084
|
iconReactNode: IconTwitter(),
|
|
@@ -1132,13 +1091,12 @@ function Web3Services({
|
|
|
1132
1091
|
}
|
|
1133
1092
|
|
|
1134
1093
|
// src/cardano-wallet/screen-main.tsx
|
|
1135
|
-
import { jsx as
|
|
1094
|
+
import { jsx as jsx17, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1136
1095
|
function ScreenMain({
|
|
1137
1096
|
injectFn,
|
|
1138
1097
|
setOpen,
|
|
1139
1098
|
setScreen,
|
|
1140
1099
|
persist,
|
|
1141
|
-
cardanoPeerConnect,
|
|
1142
1100
|
burnerWallet,
|
|
1143
1101
|
webauthn,
|
|
1144
1102
|
showDownload,
|
|
@@ -1146,8 +1104,8 @@ function ScreenMain({
|
|
|
1146
1104
|
}) {
|
|
1147
1105
|
const wallets = useWalletList({ injectFn });
|
|
1148
1106
|
const { connect: connect2 } = useWallet();
|
|
1149
|
-
return /* @__PURE__ */
|
|
1150
|
-
wallets.map((wallet, index) => /* @__PURE__ */
|
|
1107
|
+
return /* @__PURE__ */ jsx17(TooltipProvider, { children: /* @__PURE__ */ jsxs11("div", { className: "mesh-grid mesh-gap-4 mesh-py-4 mesh-grid-cols-5 mesh-place-items-center mesh-gap-y-8", children: [
|
|
1108
|
+
wallets.map((wallet, index) => /* @__PURE__ */ jsx17(
|
|
1151
1109
|
WalletIcon,
|
|
1152
1110
|
{
|
|
1153
1111
|
icon: wallet.icon,
|
|
@@ -1159,7 +1117,7 @@ function ScreenMain({
|
|
|
1159
1117
|
},
|
|
1160
1118
|
index
|
|
1161
1119
|
)),
|
|
1162
|
-
web3Services && /* @__PURE__ */
|
|
1120
|
+
web3Services && /* @__PURE__ */ jsx17(
|
|
1163
1121
|
Web3Services,
|
|
1164
1122
|
{
|
|
1165
1123
|
options: web3Services,
|
|
@@ -1167,7 +1125,7 @@ function ScreenMain({
|
|
|
1167
1125
|
persist
|
|
1168
1126
|
}
|
|
1169
1127
|
),
|
|
1170
|
-
webauthn && /* @__PURE__ */
|
|
1128
|
+
webauthn && /* @__PURE__ */ jsx17(
|
|
1171
1129
|
WalletIcon,
|
|
1172
1130
|
{
|
|
1173
1131
|
iconReactNode: IconFingerprint(),
|
|
@@ -1177,17 +1135,7 @@ function ScreenMain({
|
|
|
1177
1135
|
}
|
|
1178
1136
|
}
|
|
1179
1137
|
),
|
|
1180
|
-
|
|
1181
|
-
WalletIcon,
|
|
1182
|
-
{
|
|
1183
|
-
iconReactNode: IconMonitorSmartphone(),
|
|
1184
|
-
name: screens.p2p.title,
|
|
1185
|
-
action: () => {
|
|
1186
|
-
setScreen("p2p");
|
|
1187
|
-
}
|
|
1188
|
-
}
|
|
1189
|
-
),
|
|
1190
|
-
burnerWallet && /* @__PURE__ */ jsx18(
|
|
1138
|
+
burnerWallet && /* @__PURE__ */ jsx17(
|
|
1191
1139
|
WalletIcon,
|
|
1192
1140
|
{
|
|
1193
1141
|
iconReactNode: IconBookDashed(),
|
|
@@ -1197,7 +1145,7 @@ function ScreenMain({
|
|
|
1197
1145
|
}
|
|
1198
1146
|
}
|
|
1199
1147
|
),
|
|
1200
|
-
showDownload && /* @__PURE__ */
|
|
1148
|
+
showDownload && /* @__PURE__ */ jsx17(
|
|
1201
1149
|
WalletIcon,
|
|
1202
1150
|
{
|
|
1203
1151
|
iconReactNode: IconDownload(),
|
|
@@ -1213,79 +1161,16 @@ function ScreenMain({
|
|
|
1213
1161
|
] }) });
|
|
1214
1162
|
}
|
|
1215
1163
|
|
|
1216
|
-
// src/cardano-wallet/screen-p2p.tsx
|
|
1217
|
-
import { useEffect as useEffect9, useRef as useRef2, useState as useState11 } from "react";
|
|
1218
|
-
import { DAppPeerConnect } from "@fabianbormann/cardano-peer-connect";
|
|
1219
|
-
import { jsx as jsx19, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1220
|
-
function ScreenP2P({
|
|
1221
|
-
cardanoPeerConnect,
|
|
1222
|
-
setOpen
|
|
1223
|
-
}) {
|
|
1224
|
-
const dAppConnect = useRef2(null);
|
|
1225
|
-
const qrCodeField = useRef2(null);
|
|
1226
|
-
const [address, setAddress] = useState11("");
|
|
1227
|
-
const [copied, setCopied] = useState11(false);
|
|
1228
|
-
const { connect: connect2 } = useWallet();
|
|
1229
|
-
useEffect9(() => {
|
|
1230
|
-
if (cardanoPeerConnect) {
|
|
1231
|
-
if (dAppConnect.current === null) {
|
|
1232
|
-
dAppConnect.current = new DAppPeerConnect({
|
|
1233
|
-
dAppInfo: {
|
|
1234
|
-
name: cardanoPeerConnect.dAppInfo.name,
|
|
1235
|
-
url: cardanoPeerConnect.dAppInfo.url
|
|
1236
|
-
},
|
|
1237
|
-
announce: cardanoPeerConnect.announce,
|
|
1238
|
-
onApiInject: async (name, address2) => {
|
|
1239
|
-
await connect2(name);
|
|
1240
|
-
setOpen(false);
|
|
1241
|
-
},
|
|
1242
|
-
onApiEject: (name, address2) => {
|
|
1243
|
-
},
|
|
1244
|
-
onConnect: (address2, walletInfo) => {
|
|
1245
|
-
},
|
|
1246
|
-
onDisconnect: () => {
|
|
1247
|
-
},
|
|
1248
|
-
verifyConnection: (walletInfo, callback) => {
|
|
1249
|
-
callback(true, true);
|
|
1250
|
-
},
|
|
1251
|
-
useWalletDiscovery: true
|
|
1252
|
-
});
|
|
1253
|
-
if (dAppConnect.current) {
|
|
1254
|
-
const address2 = dAppConnect.current.getAddress();
|
|
1255
|
-
setAddress(address2);
|
|
1256
|
-
if (qrCodeField.current !== null) {
|
|
1257
|
-
dAppConnect.current.generateQRCode(qrCodeField.current);
|
|
1258
|
-
}
|
|
1259
|
-
}
|
|
1260
|
-
}
|
|
1261
|
-
}
|
|
1262
|
-
}, []);
|
|
1263
|
-
return /* @__PURE__ */ jsxs13("div", { className: "mesh-flex mesh-flex-col mesh-items-center mesh-justify-center", children: [
|
|
1264
|
-
/* @__PURE__ */ jsx19("div", { style: { marginTop: 16, marginBottom: 16 }, ref: qrCodeField }),
|
|
1265
|
-
/* @__PURE__ */ jsx19(
|
|
1266
|
-
Button,
|
|
1267
|
-
{
|
|
1268
|
-
variant: "outline",
|
|
1269
|
-
onClick: () => {
|
|
1270
|
-
navigator.clipboard.writeText(address);
|
|
1271
|
-
setCopied(true);
|
|
1272
|
-
},
|
|
1273
|
-
children: copied ? "Copied" : "Copy Address"
|
|
1274
|
-
}
|
|
1275
|
-
)
|
|
1276
|
-
] });
|
|
1277
|
-
}
|
|
1278
|
-
|
|
1279
1164
|
// src/cardano-wallet/screen-webauthn.tsx
|
|
1280
|
-
import { useState as
|
|
1165
|
+
import { useState as useState11 } from "react";
|
|
1281
1166
|
import { connect, MeshWallet as MeshWallet2 } from "@meshsdk/wallet";
|
|
1282
1167
|
|
|
1283
1168
|
// src/common/input.tsx
|
|
1284
1169
|
import * as React5 from "react";
|
|
1285
|
-
import { jsx as
|
|
1170
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
1286
1171
|
var Input = React5.forwardRef(
|
|
1287
1172
|
({ className, type, ...props }, ref) => {
|
|
1288
|
-
return /* @__PURE__ */
|
|
1173
|
+
return /* @__PURE__ */ jsx18(
|
|
1289
1174
|
"input",
|
|
1290
1175
|
{
|
|
1291
1176
|
type,
|
|
@@ -1305,11 +1190,11 @@ Input.displayName = "Input";
|
|
|
1305
1190
|
import * as React6 from "react";
|
|
1306
1191
|
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
1307
1192
|
import { cva as cva2 } from "class-variance-authority";
|
|
1308
|
-
import { jsx as
|
|
1193
|
+
import { jsx as jsx19 } from "react/jsx-runtime";
|
|
1309
1194
|
var labelVariants = cva2(
|
|
1310
1195
|
"mesh-text-sm mesh-font-medium mesh-leading-none peer-disabled:mesh-cursor-not-allowed peer-disabled:mesh-opacity-70"
|
|
1311
1196
|
);
|
|
1312
|
-
var Label2 = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
1197
|
+
var Label2 = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx19(
|
|
1313
1198
|
LabelPrimitive.Root,
|
|
1314
1199
|
{
|
|
1315
1200
|
ref,
|
|
@@ -1320,16 +1205,16 @@ var Label2 = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
1320
1205
|
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
1321
1206
|
|
|
1322
1207
|
// src/cardano-wallet/screen-webauthn.tsx
|
|
1323
|
-
import { Fragment as Fragment4, jsx as
|
|
1208
|
+
import { Fragment as Fragment4, jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1324
1209
|
function ScreenWebauthn({
|
|
1325
1210
|
url,
|
|
1326
1211
|
networkId,
|
|
1327
1212
|
provider,
|
|
1328
1213
|
setOpen
|
|
1329
1214
|
}) {
|
|
1330
|
-
const [loading, setLoading] =
|
|
1331
|
-
const [userName, setUserName] =
|
|
1332
|
-
const [password, setPassword] =
|
|
1215
|
+
const [loading, setLoading] = useState11(false);
|
|
1216
|
+
const [userName, setUserName] = useState11("");
|
|
1217
|
+
const [password, setPassword] = useState11("");
|
|
1333
1218
|
const { setWallet } = useWallet();
|
|
1334
1219
|
function createWallet(root) {
|
|
1335
1220
|
setTimeout(() => {
|
|
@@ -1354,10 +1239,10 @@ function ScreenWebauthn({
|
|
|
1354
1239
|
createWallet(res.wallet.bech32PrivateKey);
|
|
1355
1240
|
}
|
|
1356
1241
|
}
|
|
1357
|
-
return /* @__PURE__ */
|
|
1358
|
-
/* @__PURE__ */
|
|
1359
|
-
/* @__PURE__ */
|
|
1360
|
-
/* @__PURE__ */
|
|
1242
|
+
return /* @__PURE__ */ jsx20("div", { className: "mesh-flex mesh-flex-row mesh-flex-gap-4 mesh-items-center mesh-justify-center", children: loading ? /* @__PURE__ */ jsx20(Fragment4, { children: "Connecting wallet..." }) : /* @__PURE__ */ jsx20(Fragment4, { children: /* @__PURE__ */ jsxs12("div", { className: "mesh-flex mesh-flex-col mesh-gap-6 mesh-w-full mesh-mx-8", children: [
|
|
1243
|
+
/* @__PURE__ */ jsxs12("div", { className: "mesh-grid mesh-gap-2", children: [
|
|
1244
|
+
/* @__PURE__ */ jsx20(Label2, { htmlFor: "username", children: "Username" }),
|
|
1245
|
+
/* @__PURE__ */ jsx20(
|
|
1361
1246
|
Input,
|
|
1362
1247
|
{
|
|
1363
1248
|
id: "username",
|
|
@@ -1367,11 +1252,11 @@ function ScreenWebauthn({
|
|
|
1367
1252
|
onChange: (e) => setUserName(e.target.value)
|
|
1368
1253
|
}
|
|
1369
1254
|
),
|
|
1370
|
-
/* @__PURE__ */
|
|
1255
|
+
/* @__PURE__ */ jsx20("p", { className: "mesh-text-gray-500 mesh-text-xs", children: "Unique to the application you are connecting." })
|
|
1371
1256
|
] }),
|
|
1372
|
-
/* @__PURE__ */
|
|
1373
|
-
/* @__PURE__ */
|
|
1374
|
-
/* @__PURE__ */
|
|
1257
|
+
/* @__PURE__ */ jsxs12("div", { className: "mesh-grid mesh-gap-2", children: [
|
|
1258
|
+
/* @__PURE__ */ jsx20("div", { className: "mesh-flex mesh-items-center", children: /* @__PURE__ */ jsx20(Label2, { htmlFor: "password", children: "Unique Code" }) }),
|
|
1259
|
+
/* @__PURE__ */ jsx20(
|
|
1375
1260
|
Input,
|
|
1376
1261
|
{
|
|
1377
1262
|
id: "password",
|
|
@@ -1381,9 +1266,9 @@ function ScreenWebauthn({
|
|
|
1381
1266
|
onChange: (e) => setPassword(e.target.value)
|
|
1382
1267
|
}
|
|
1383
1268
|
),
|
|
1384
|
-
/* @__PURE__ */
|
|
1269
|
+
/* @__PURE__ */ jsx20("p", { className: "mesh-text-gray-500 mesh-text-xs", children: "Additional security to derive your wallet." })
|
|
1385
1270
|
] }),
|
|
1386
|
-
/* @__PURE__ */
|
|
1271
|
+
/* @__PURE__ */ jsx20(
|
|
1387
1272
|
Button,
|
|
1388
1273
|
{
|
|
1389
1274
|
className: "mesh-w-full",
|
|
@@ -1396,62 +1281,53 @@ function ScreenWebauthn({
|
|
|
1396
1281
|
}
|
|
1397
1282
|
|
|
1398
1283
|
// src/cardano-wallet/index.tsx
|
|
1399
|
-
import { jsx as
|
|
1284
|
+
import { jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1400
1285
|
var CardanoWallet = ({
|
|
1401
1286
|
label = "Connect Wallet",
|
|
1402
1287
|
onConnected = void 0,
|
|
1403
1288
|
isDark = false,
|
|
1404
1289
|
persist = false,
|
|
1405
1290
|
injectFn = void 0,
|
|
1406
|
-
cardanoPeerConnect = void 0,
|
|
1407
1291
|
burnerWallet = void 0,
|
|
1408
1292
|
webauthn = void 0,
|
|
1409
1293
|
showDownload = true,
|
|
1410
1294
|
web3Services = void 0
|
|
1411
1295
|
}) => {
|
|
1412
|
-
const [open, setOpen] =
|
|
1413
|
-
const [screen, setScreen] =
|
|
1296
|
+
const [open, setOpen] = useState12(false);
|
|
1297
|
+
const [screen, setScreen] = useState12("main");
|
|
1414
1298
|
const { wallet, connected, setPersist, setWeb3Services } = useWallet();
|
|
1415
|
-
|
|
1299
|
+
useEffect9(() => {
|
|
1416
1300
|
setPersist(persist);
|
|
1417
1301
|
if (web3Services) setWeb3Services(web3Services);
|
|
1418
|
-
}, []);
|
|
1419
|
-
|
|
1302
|
+
}, [persist, web3Services, setPersist, setWeb3Services]);
|
|
1303
|
+
useEffect9(() => {
|
|
1420
1304
|
if (connected) {
|
|
1421
1305
|
if (onConnected) onConnected();
|
|
1422
1306
|
}
|
|
1423
1307
|
}, [connected, wallet]);
|
|
1424
|
-
return /* @__PURE__ */
|
|
1425
|
-
/* @__PURE__ */
|
|
1426
|
-
/* @__PURE__ */
|
|
1308
|
+
return /* @__PURE__ */ jsxs13(Dialog, { open, onOpenChange: setOpen, children: [
|
|
1309
|
+
/* @__PURE__ */ jsx21("div", { className: isDark ? "mesh-dark" : "", children: !connected ? /* @__PURE__ */ jsx21(DialogTrigger, { asChild: true, children: /* @__PURE__ */ jsx21(Button, { variant: "outline", className: isDark ? "mesh-dark" : "", children: label }) }) : /* @__PURE__ */ jsx21(ConnectedButton, {}) }),
|
|
1310
|
+
/* @__PURE__ */ jsxs13(
|
|
1427
1311
|
DialogContent,
|
|
1428
1312
|
{
|
|
1429
1313
|
className: "sm:mesh-max-w-[425px] mesh-dark",
|
|
1430
1314
|
onOpenAutoFocus: (event) => event.preventDefault(),
|
|
1431
1315
|
children: [
|
|
1432
|
-
/* @__PURE__ */
|
|
1433
|
-
screen == "main" && /* @__PURE__ */
|
|
1316
|
+
/* @__PURE__ */ jsx21(Header, { screen, setScreen }),
|
|
1317
|
+
screen == "main" && /* @__PURE__ */ jsx21(
|
|
1434
1318
|
ScreenMain,
|
|
1435
1319
|
{
|
|
1436
1320
|
injectFn,
|
|
1437
1321
|
setOpen,
|
|
1438
1322
|
setScreen,
|
|
1439
1323
|
persist,
|
|
1440
|
-
cardanoPeerConnect: cardanoPeerConnect != void 0,
|
|
1441
1324
|
burnerWallet: burnerWallet != void 0,
|
|
1442
1325
|
webauthn: webauthn != void 0,
|
|
1443
1326
|
showDownload,
|
|
1444
1327
|
web3Services
|
|
1445
1328
|
}
|
|
1446
1329
|
),
|
|
1447
|
-
screen == "
|
|
1448
|
-
ScreenP2P,
|
|
1449
|
-
{
|
|
1450
|
-
cardanoPeerConnect,
|
|
1451
|
-
setOpen
|
|
1452
|
-
}
|
|
1453
|
-
),
|
|
1454
|
-
screen == "burner" && burnerWallet && /* @__PURE__ */ jsx23(
|
|
1330
|
+
screen == "burner" && burnerWallet && /* @__PURE__ */ jsx21(
|
|
1455
1331
|
ScreenBurner,
|
|
1456
1332
|
{
|
|
1457
1333
|
networkId: burnerWallet.networkId,
|
|
@@ -1459,7 +1335,7 @@ var CardanoWallet = ({
|
|
|
1459
1335
|
setOpen
|
|
1460
1336
|
}
|
|
1461
1337
|
),
|
|
1462
|
-
screen == "webauthn" && webauthn && /* @__PURE__ */
|
|
1338
|
+
screen == "webauthn" && webauthn && /* @__PURE__ */ jsx21(
|
|
1463
1339
|
ScreenWebauthn,
|
|
1464
1340
|
{
|
|
1465
1341
|
url: webauthn.url,
|
|
@@ -1468,7 +1344,7 @@ var CardanoWallet = ({
|
|
|
1468
1344
|
setOpen
|
|
1469
1345
|
}
|
|
1470
1346
|
),
|
|
1471
|
-
/* @__PURE__ */
|
|
1347
|
+
/* @__PURE__ */ jsx21(Footer, {})
|
|
1472
1348
|
]
|
|
1473
1349
|
}
|
|
1474
1350
|
)
|
|
@@ -1478,25 +1354,33 @@ function Header({
|
|
|
1478
1354
|
screen,
|
|
1479
1355
|
setScreen
|
|
1480
1356
|
}) {
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1357
|
+
const screenData = screens[screen];
|
|
1358
|
+
return /* @__PURE__ */ jsxs13(DialogHeader, { children: [
|
|
1359
|
+
/* @__PURE__ */ jsxs13(DialogTitle, { className: "mesh-flex mesh-justify-between", children: [
|
|
1360
|
+
screen !== "main" ? /* @__PURE__ */ jsx21(
|
|
1361
|
+
"button",
|
|
1362
|
+
{
|
|
1363
|
+
onClick: () => setScreen("main"),
|
|
1364
|
+
"aria-label": "Back to wallet selection",
|
|
1365
|
+
children: /* @__PURE__ */ jsx21(IconChevronRight, {})
|
|
1366
|
+
}
|
|
1367
|
+
) : /* @__PURE__ */ jsx21("span", { style: { width: "24px" } }),
|
|
1368
|
+
/* @__PURE__ */ jsx21("span", { className: "mesh-text-white", children: screenData.title }),
|
|
1369
|
+
/* @__PURE__ */ jsx21("span", { style: { width: "24px" } })
|
|
1486
1370
|
] }),
|
|
1487
|
-
/* @__PURE__ */
|
|
1371
|
+
/* @__PURE__ */ jsx21(DialogDescription, { children: screenData.subtitle && screenData.subtitle })
|
|
1488
1372
|
] });
|
|
1489
1373
|
}
|
|
1490
1374
|
function Footer() {
|
|
1491
|
-
return /* @__PURE__ */
|
|
1375
|
+
return /* @__PURE__ */ jsx21(DialogFooter, { className: "mesh-justify-center mesh-text-sm", children: /* @__PURE__ */ jsxs13(
|
|
1492
1376
|
"a",
|
|
1493
1377
|
{
|
|
1494
1378
|
href: "https://meshjs.dev/",
|
|
1495
1379
|
target: "_blank",
|
|
1496
1380
|
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",
|
|
1497
1381
|
children: [
|
|
1498
|
-
/* @__PURE__ */
|
|
1499
|
-
/* @__PURE__ */
|
|
1382
|
+
/* @__PURE__ */ jsx21("span", { className: "", children: "Powered by" }),
|
|
1383
|
+
/* @__PURE__ */ jsx21(
|
|
1500
1384
|
"svg",
|
|
1501
1385
|
{
|
|
1502
1386
|
width: 24,
|
|
@@ -1504,31 +1388,31 @@ function Footer() {
|
|
|
1504
1388
|
enableBackground: "new 0 0 300 200",
|
|
1505
1389
|
viewBox: "0 0 300 200",
|
|
1506
1390
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1507
|
-
children: /* @__PURE__ */
|
|
1391
|
+
children: /* @__PURE__ */ jsx21("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" })
|
|
1508
1392
|
}
|
|
1509
1393
|
),
|
|
1510
|
-
/* @__PURE__ */
|
|
1394
|
+
/* @__PURE__ */ jsx21("span", { className: "", children: "Mesh SDK" })
|
|
1511
1395
|
]
|
|
1512
1396
|
}
|
|
1513
1397
|
) });
|
|
1514
1398
|
}
|
|
1515
1399
|
|
|
1516
1400
|
// src/mesh-badge/mesh-logo.tsx
|
|
1517
|
-
import { jsx as
|
|
1518
|
-
var MeshLogo = () => /* @__PURE__ */
|
|
1401
|
+
import { jsx as jsx22 } from "react/jsx-runtime";
|
|
1402
|
+
var MeshLogo = () => /* @__PURE__ */ jsx22(
|
|
1519
1403
|
"svg",
|
|
1520
1404
|
{
|
|
1521
1405
|
className: "mesh-h-16 mesh-p-2",
|
|
1522
1406
|
fill: "currentColor",
|
|
1523
1407
|
viewBox: "0 0 300 200",
|
|
1524
1408
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1525
|
-
children: /* @__PURE__ */
|
|
1409
|
+
children: /* @__PURE__ */ jsx22("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" })
|
|
1526
1410
|
}
|
|
1527
1411
|
);
|
|
1528
1412
|
|
|
1529
1413
|
// src/mesh-badge/index.tsx
|
|
1530
|
-
import { jsx as
|
|
1531
|
-
var MeshBadge = ({ isDark = false }) => /* @__PURE__ */
|
|
1414
|
+
import { jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1415
|
+
var MeshBadge = ({ isDark = false }) => /* @__PURE__ */ jsxs14(
|
|
1532
1416
|
"a",
|
|
1533
1417
|
{
|
|
1534
1418
|
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`}`,
|
|
@@ -1540,7 +1424,7 @@ var MeshBadge = ({ isDark = false }) => /* @__PURE__ */ jsxs16(
|
|
|
1540
1424
|
rel: "noopener noreferrer",
|
|
1541
1425
|
target: "_blank",
|
|
1542
1426
|
children: [
|
|
1543
|
-
/* @__PURE__ */
|
|
1427
|
+
/* @__PURE__ */ jsx23(MeshLogo, {}),
|
|
1544
1428
|
"Mesh"
|
|
1545
1429
|
]
|
|
1546
1430
|
}
|