@meshsdk/react 1.9.0-beta.17 → 1.9.0-beta.18

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 CHANGED
@@ -23457,7 +23457,7 @@ __export(index_exports, {
23457
23457
  module.exports = __toCommonJS(index_exports);
23458
23458
 
23459
23459
  // src/cardano-wallet/index.tsx
23460
- var import_react13 = require("react");
23460
+ var import_react14 = require("react");
23461
23461
 
23462
23462
  // src/common/button.tsx
23463
23463
  var React = __toESM(require("react"), 1);
@@ -24241,7 +24241,6 @@ function IconDownload() {
24241
24241
  height: "24px",
24242
24242
  strokeWidth: "1px"
24243
24243
  },
24244
- className: "hover:mesh-fill-white",
24245
24244
  children: [
24246
24245
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
24247
24246
  /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("polyline", { points: "7 10 12 15 17 10" }),
@@ -24364,8 +24363,64 @@ function WalletIcon({
24364
24363
  ] });
24365
24364
  }
24366
24365
 
24367
- // src/cardano-wallet/screen-main.tsx
24366
+ // src/cardano-wallet/web3-services.tsx
24367
+ var import_react11 = require("react");
24368
+ var import_web3_sdk = require("@meshsdk/web3-sdk");
24369
+
24370
+ // src/common/icons/icon-discord.tsx
24368
24371
  var import_jsx_runtime14 = require("react/jsx-runtime");
24372
+ function IconDiscord() {
24373
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
24374
+ "svg",
24375
+ {
24376
+ viewBox: "0 0 20 20",
24377
+ "aria-hidden": "true",
24378
+ style: {
24379
+ color: "#ffadff",
24380
+ width: "24px",
24381
+ height: "24px",
24382
+ strokeWidth: "1px",
24383
+ fill: "#5865F2"
24384
+ },
24385
+ children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("path", { 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" })
24386
+ }
24387
+ );
24388
+ }
24389
+
24390
+ // src/cardano-wallet/web3-services.tsx
24391
+ var import_jsx_runtime15 = require("react/jsx-runtime");
24392
+ function Web3Services({
24393
+ options,
24394
+ setOpen
24395
+ }) {
24396
+ const { setWallet } = useWallet();
24397
+ const [loading, setLoading] = (0, import_react11.useState)(false);
24398
+ async function loadWallet() {
24399
+ setLoading(true);
24400
+ const _options = {
24401
+ networkId: 0,
24402
+ fetcher: options.fetcher,
24403
+ submitter: options.submitter,
24404
+ appUrl: options.appUrl,
24405
+ projectId: options.projectId
24406
+ };
24407
+ const wallet = await import_web3_sdk.Web3Wallet.enable(_options);
24408
+ setWallet(wallet, "Mesh Web3 Services");
24409
+ setLoading(false);
24410
+ setOpen(false);
24411
+ }
24412
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
24413
+ WalletIcon,
24414
+ {
24415
+ iconReactNode: IconDiscord(),
24416
+ name: `Discord`,
24417
+ action: () => loadWallet()
24418
+ }
24419
+ );
24420
+ }
24421
+
24422
+ // src/cardano-wallet/screen-main.tsx
24423
+ var import_jsx_runtime16 = require("react/jsx-runtime");
24369
24424
  function ScreenMain({
24370
24425
  injectFn,
24371
24426
  extensions,
@@ -24375,12 +24430,14 @@ function ScreenMain({
24375
24430
  cardanoPeerConnect,
24376
24431
  burnerWallet,
24377
24432
  webauthn,
24378
- showDownload
24433
+ showDownload,
24434
+ web3Services
24379
24435
  }) {
24380
24436
  const wallets = useWalletList({ injectFn });
24381
24437
  const { connect: connect2 } = useWallet();
24382
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)("div", { className: "mesh-grid mesh-gap-4 mesh-py-4 mesh-grid-cols-5 mesh-place-items-center mesh-gap-y-8", children: [
24383
- wallets.map((wallet, index) => /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
24438
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(TooltipProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className: "mesh-grid mesh-gap-4 mesh-py-4 mesh-grid-cols-5 mesh-place-items-center mesh-gap-y-8", children: [
24439
+ web3Services && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Web3Services, { options: web3Services, setOpen }),
24440
+ wallets.map((wallet, index) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
24384
24441
  WalletIcon,
24385
24442
  {
24386
24443
  icon: wallet.icon,
@@ -24392,7 +24449,7 @@ function ScreenMain({
24392
24449
  },
24393
24450
  index
24394
24451
  )),
24395
- webauthn && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
24452
+ webauthn && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
24396
24453
  WalletIcon,
24397
24454
  {
24398
24455
  iconReactNode: IconFingerprint(),
@@ -24402,7 +24459,7 @@ function ScreenMain({
24402
24459
  }
24403
24460
  }
24404
24461
  ),
24405
- cardanoPeerConnect && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
24462
+ cardanoPeerConnect && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
24406
24463
  WalletIcon,
24407
24464
  {
24408
24465
  iconReactNode: IconMonitorSmartphone(),
@@ -24412,7 +24469,7 @@ function ScreenMain({
24412
24469
  }
24413
24470
  }
24414
24471
  ),
24415
- burnerWallet && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
24472
+ burnerWallet && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
24416
24473
  WalletIcon,
24417
24474
  {
24418
24475
  iconReactNode: IconBookDashed(),
@@ -24422,7 +24479,7 @@ function ScreenMain({
24422
24479
  }
24423
24480
  }
24424
24481
  ),
24425
- showDownload && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
24482
+ showDownload && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
24426
24483
  WalletIcon,
24427
24484
  {
24428
24485
  iconReactNode: IconDownload(),
@@ -24439,19 +24496,19 @@ function ScreenMain({
24439
24496
  }
24440
24497
 
24441
24498
  // src/cardano-wallet/screen-p2p.tsx
24442
- var import_react11 = require("react");
24499
+ var import_react12 = require("react");
24443
24500
  var import_cardano_peer_connect = __toESM(require_dist(), 1);
24444
- var import_jsx_runtime15 = require("react/jsx-runtime");
24501
+ var import_jsx_runtime17 = require("react/jsx-runtime");
24445
24502
  function ScreenP2P({
24446
24503
  cardanoPeerConnect,
24447
24504
  setOpen
24448
24505
  }) {
24449
- const dAppConnect = (0, import_react11.useRef)(null);
24450
- const qrCodeField = (0, import_react11.useRef)(null);
24451
- const [address, setAddress] = (0, import_react11.useState)("");
24452
- const [copied, setCopied] = (0, import_react11.useState)(false);
24506
+ const dAppConnect = (0, import_react12.useRef)(null);
24507
+ const qrCodeField = (0, import_react12.useRef)(null);
24508
+ const [address, setAddress] = (0, import_react12.useState)("");
24509
+ const [copied, setCopied] = (0, import_react12.useState)(false);
24453
24510
  const { connect: connect2 } = useWallet();
24454
- (0, import_react11.useEffect)(() => {
24511
+ (0, import_react12.useEffect)(() => {
24455
24512
  if (cardanoPeerConnect) {
24456
24513
  if (dAppConnect.current === null) {
24457
24514
  dAppConnect.current = new import_cardano_peer_connect.DAppPeerConnect({
@@ -24485,9 +24542,9 @@ function ScreenP2P({
24485
24542
  }
24486
24543
  }
24487
24544
  }, []);
24488
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("div", { className: "mesh-flex mesh-flex-col mesh-items-center mesh-justify-center", children: [
24489
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { style: { marginTop: 16, marginBottom: 16 }, ref: qrCodeField }),
24490
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
24545
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)("div", { className: "mesh-flex mesh-flex-col mesh-items-center mesh-justify-center", children: [
24546
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)("div", { style: { marginTop: 16, marginBottom: 16 }, ref: qrCodeField }),
24547
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
24491
24548
  Button,
24492
24549
  {
24493
24550
  variant: "outline",
@@ -24502,15 +24559,15 @@ function ScreenP2P({
24502
24559
  }
24503
24560
 
24504
24561
  // src/cardano-wallet/screen-webauthn.tsx
24505
- var import_react12 = require("react");
24562
+ var import_react13 = require("react");
24506
24563
  var import_wallet4 = require("@meshsdk/wallet");
24507
24564
 
24508
24565
  // src/common/input.tsx
24509
24566
  var React5 = __toESM(require("react"), 1);
24510
- var import_jsx_runtime16 = require("react/jsx-runtime");
24567
+ var import_jsx_runtime18 = require("react/jsx-runtime");
24511
24568
  var Input = React5.forwardRef(
24512
24569
  ({ className, type, ...props }, ref) => {
24513
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
24570
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
24514
24571
  "input",
24515
24572
  {
24516
24573
  type,
@@ -24530,11 +24587,11 @@ Input.displayName = "Input";
24530
24587
  var React6 = __toESM(require("react"), 1);
24531
24588
  var LabelPrimitive = __toESM(require("@radix-ui/react-label"), 1);
24532
24589
  var import_class_variance_authority2 = require("class-variance-authority");
24533
- var import_jsx_runtime17 = require("react/jsx-runtime");
24590
+ var import_jsx_runtime19 = require("react/jsx-runtime");
24534
24591
  var labelVariants = (0, import_class_variance_authority2.cva)(
24535
24592
  "mesh-text-sm mesh-font-medium mesh-leading-none peer-disabled:mesh-cursor-not-allowed peer-disabled:mesh-opacity-70"
24536
24593
  );
24537
- var Label2 = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
24594
+ var Label2 = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
24538
24595
  LabelPrimitive.Root,
24539
24596
  {
24540
24597
  ref,
@@ -24545,16 +24602,16 @@ var Label2 = React6.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
24545
24602
  Label2.displayName = LabelPrimitive.Root.displayName;
24546
24603
 
24547
24604
  // src/cardano-wallet/screen-webauthn.tsx
24548
- var import_jsx_runtime18 = require("react/jsx-runtime");
24605
+ var import_jsx_runtime20 = require("react/jsx-runtime");
24549
24606
  function ScreenWebauthn({
24550
24607
  url,
24551
24608
  networkId,
24552
24609
  provider,
24553
24610
  setOpen
24554
24611
  }) {
24555
- const [loading, setLoading] = (0, import_react12.useState)(false);
24556
- const [userName, setUserName] = (0, import_react12.useState)("");
24557
- const [password, setPassword] = (0, import_react12.useState)("");
24612
+ const [loading, setLoading] = (0, import_react13.useState)(false);
24613
+ const [userName, setUserName] = (0, import_react13.useState)("");
24614
+ const [password, setPassword] = (0, import_react13.useState)("");
24558
24615
  const { setWallet } = useWallet();
24559
24616
  function createWallet(root) {
24560
24617
  setTimeout(() => {
@@ -24579,10 +24636,10 @@ function ScreenWebauthn({
24579
24636
  createWallet(res.wallet.bech32PrivateKey);
24580
24637
  }
24581
24638
  }
24582
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "mesh-flex mesh-flex-row mesh-flex-gap-4 mesh-items-center mesh-justify-center", children: loading ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: "Connecting wallet..." }) : /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_jsx_runtime18.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "mesh-flex mesh-flex-col mesh-gap-6 mesh-w-full mesh-mx-8", children: [
24583
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "mesh-grid mesh-gap-2", children: [
24584
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Label2, { htmlFor: "username", children: "Username" }),
24585
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
24639
+ 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: [
24640
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "mesh-grid mesh-gap-2", children: [
24641
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(Label2, { htmlFor: "username", children: "Username" }),
24642
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
24586
24643
  Input,
24587
24644
  {
24588
24645
  id: "username",
@@ -24592,11 +24649,11 @@ function ScreenWebauthn({
24592
24649
  onChange: (e2) => setUserName(e2.target.value)
24593
24650
  }
24594
24651
  ),
24595
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "mesh-text-gray-500 mesh-text-xs", children: "Unique to the application you are connecting." })
24652
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "mesh-text-gray-500 mesh-text-xs", children: "Unique to the application you are connecting." })
24596
24653
  ] }),
24597
- /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "mesh-grid mesh-gap-2", children: [
24598
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("div", { className: "mesh-flex mesh-items-center", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Label2, { htmlFor: "password", children: "Unique Code" }) }),
24599
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
24654
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)("div", { className: "mesh-grid mesh-gap-2", children: [
24655
+ /* @__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" }) }),
24656
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
24600
24657
  Input,
24601
24658
  {
24602
24659
  id: "password",
@@ -24606,9 +24663,9 @@ function ScreenWebauthn({
24606
24663
  onChange: (e2) => setPassword(e2.target.value)
24607
24664
  }
24608
24665
  ),
24609
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("p", { className: "mesh-text-gray-500 mesh-text-xs", children: "Additional security to derive your wallet." })
24666
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)("p", { className: "mesh-text-gray-500 mesh-text-xs", children: "Additional security to derive your wallet." })
24610
24667
  ] }),
24611
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
24668
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
24612
24669
  Button,
24613
24670
  {
24614
24671
  className: "mesh-w-full",
@@ -24621,7 +24678,7 @@ function ScreenWebauthn({
24621
24678
  }
24622
24679
 
24623
24680
  // src/cardano-wallet/index.tsx
24624
- var import_jsx_runtime19 = require("react/jsx-runtime");
24681
+ var import_jsx_runtime21 = require("react/jsx-runtime");
24625
24682
  var CardanoWallet = ({
24626
24683
  label = "Connect Wallet",
24627
24684
  onConnected = void 0,
@@ -24632,29 +24689,30 @@ var CardanoWallet = ({
24632
24689
  cardanoPeerConnect = void 0,
24633
24690
  burnerWallet = void 0,
24634
24691
  webauthn = void 0,
24635
- showDownload = true
24692
+ showDownload = true,
24693
+ web3Services = void 0
24636
24694
  }) => {
24637
- const [open, setOpen] = (0, import_react13.useState)(false);
24638
- const [screen, setScreen] = (0, import_react13.useState)("main");
24695
+ const [open, setOpen] = (0, import_react14.useState)(false);
24696
+ const [screen, setScreen] = (0, import_react14.useState)("main");
24639
24697
  const { wallet, connected, setPersist } = useWallet();
24640
- (0, import_react13.useEffect)(() => {
24698
+ (0, import_react14.useEffect)(() => {
24641
24699
  setPersist(persist);
24642
24700
  }, [persist]);
24643
- (0, import_react13.useEffect)(() => {
24701
+ (0, import_react14.useEffect)(() => {
24644
24702
  if (connected) {
24645
24703
  if (onConnected) onConnected();
24646
24704
  }
24647
24705
  }, [connected, wallet]);
24648
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(Dialog, { open, onOpenChange: setOpen, children: [
24649
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("div", { className: isDark ? "mesh-dark" : "", children: !connected ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DialogTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Button, { variant: "outline", className: isDark ? "mesh-dark" : "", children: label }) }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ConnectedButton, {}) }),
24650
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
24706
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Dialog, { open, onOpenChange: setOpen, children: [
24707
+ /* @__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, {}) }),
24708
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
24651
24709
  DialogContent,
24652
24710
  {
24653
24711
  className: "sm:mesh-max-w-[425px] mesh-dark",
24654
24712
  onOpenAutoFocus: (event) => event.preventDefault(),
24655
24713
  children: [
24656
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Header, { screen, setScreen }),
24657
- screen == "main" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
24714
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Header, { screen, setScreen }),
24715
+ screen == "main" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
24658
24716
  ScreenMain,
24659
24717
  {
24660
24718
  injectFn,
@@ -24665,17 +24723,18 @@ var CardanoWallet = ({
24665
24723
  cardanoPeerConnect: cardanoPeerConnect != void 0,
24666
24724
  burnerWallet: burnerWallet != void 0,
24667
24725
  webauthn: webauthn != void 0,
24668
- showDownload
24726
+ showDownload,
24727
+ web3Services
24669
24728
  }
24670
24729
  ),
24671
- screen == "p2p" && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
24730
+ screen == "p2p" && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
24672
24731
  ScreenP2P,
24673
24732
  {
24674
24733
  cardanoPeerConnect,
24675
24734
  setOpen
24676
24735
  }
24677
24736
  ),
24678
- screen == "burner" && burnerWallet && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
24737
+ screen == "burner" && burnerWallet && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
24679
24738
  ScreenBurner,
24680
24739
  {
24681
24740
  networkId: burnerWallet.networkId,
@@ -24683,7 +24742,7 @@ var CardanoWallet = ({
24683
24742
  setOpen
24684
24743
  }
24685
24744
  ),
24686
- screen == "webauthn" && webauthn && /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
24745
+ screen == "webauthn" && webauthn && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
24687
24746
  ScreenWebauthn,
24688
24747
  {
24689
24748
  url: webauthn.url,
@@ -24692,7 +24751,7 @@ var CardanoWallet = ({
24692
24751
  setOpen
24693
24752
  }
24694
24753
  ),
24695
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Footer, {})
24754
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Footer, {})
24696
24755
  ]
24697
24756
  }
24698
24757
  )
@@ -24702,25 +24761,25 @@ function Header({
24702
24761
  screen,
24703
24762
  setScreen
24704
24763
  }) {
24705
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(DialogHeader, { children: [
24706
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(DialogTitle, { className: "mesh-flex mesh-justify-between", children: [
24707
- screen != "main" ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("button", { onClick: () => setScreen("main"), children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(IconChevronRight, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { style: { width: "24px" } }),
24708
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { children: screens[screen].title }),
24709
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { style: { width: "24px" } })
24764
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(DialogHeader, { children: [
24765
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(DialogTitle, { className: "mesh-flex mesh-justify-between", children: [
24766
+ screen != "main" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("button", { onClick: () => setScreen("main"), children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(IconChevronRight, {}) }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { style: { width: "24px" } }),
24767
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { children: screens[screen].title }),
24768
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { style: { width: "24px" } })
24710
24769
  ] }),
24711
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DialogDescription, { children: screens[screen].subtitle && screens[screen].subtitle })
24770
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogDescription, { children: screens[screen].subtitle && screens[screen].subtitle })
24712
24771
  ] });
24713
24772
  }
24714
24773
  function Footer() {
24715
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(DialogFooter, { className: "mesh-justify-center mesh-text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
24774
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(DialogFooter, { className: "mesh-justify-center mesh-text-sm", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
24716
24775
  "a",
24717
24776
  {
24718
24777
  href: "https://meshjs.dev/",
24719
24778
  target: "_blank",
24720
24779
  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",
24721
24780
  children: [
24722
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "", children: "Powered by" }),
24723
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
24781
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "", children: "Powered by" }),
24782
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
24724
24783
  "svg",
24725
24784
  {
24726
24785
  width: 24,
@@ -24728,31 +24787,31 @@ function Footer() {
24728
24787
  enableBackground: "new 0 0 300 200",
24729
24788
  viewBox: "0 0 300 200",
24730
24789
  xmlns: "http://www.w3.org/2000/svg",
24731
- children: /* @__PURE__ */ (0, import_jsx_runtime19.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" })
24790
+ 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" })
24732
24791
  }
24733
24792
  ),
24734
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "", children: "Mesh SDK" })
24793
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "", children: "Mesh SDK" })
24735
24794
  ]
24736
24795
  }
24737
24796
  ) });
24738
24797
  }
24739
24798
 
24740
24799
  // src/mesh-badge/mesh-logo.tsx
24741
- var import_jsx_runtime20 = require("react/jsx-runtime");
24742
- var MeshLogo = () => /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
24800
+ var import_jsx_runtime22 = require("react/jsx-runtime");
24801
+ var MeshLogo = () => /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24743
24802
  "svg",
24744
24803
  {
24745
24804
  className: "mesh-h-16 mesh-p-2",
24746
24805
  fill: "currentColor",
24747
24806
  viewBox: "0 0 300 200",
24748
24807
  xmlns: "http://www.w3.org/2000/svg",
24749
- children: /* @__PURE__ */ (0, import_jsx_runtime20.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" })
24808
+ 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" })
24750
24809
  }
24751
24810
  );
24752
24811
 
24753
24812
  // src/mesh-badge/index.tsx
24754
- var import_jsx_runtime21 = require("react/jsx-runtime");
24755
- var MeshBadge = ({ isDark = false }) => /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(
24813
+ var import_jsx_runtime23 = require("react/jsx-runtime");
24814
+ var MeshBadge = ({ isDark = false }) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
24756
24815
  "a",
24757
24816
  {
24758
24817
  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`}`,
@@ -24764,21 +24823,21 @@ var MeshBadge = ({ isDark = false }) => /* @__PURE__ */ (0, import_jsx_runtime21
24764
24823
  rel: "noopener noreferrer",
24765
24824
  target: "_blank",
24766
24825
  children: [
24767
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(MeshLogo, {}),
24826
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(MeshLogo, {}),
24768
24827
  "Mesh"
24769
24828
  ]
24770
24829
  }
24771
24830
  );
24772
24831
 
24773
24832
  // src/stake-button/index.tsx
24774
- var import_react15 = require("react");
24833
+ var import_react16 = require("react");
24775
24834
  var import_transaction = require("@meshsdk/transaction");
24776
24835
 
24777
24836
  // src/cardano-wallet-dropdown/index.tsx
24778
- var import_react14 = require("react");
24837
+ var import_react15 = require("react");
24779
24838
 
24780
24839
  // src/common/button-dropdown.tsx
24781
- var import_jsx_runtime22 = require("react/jsx-runtime");
24840
+ var import_jsx_runtime24 = require("react/jsx-runtime");
24782
24841
  function ButtonDropdown({
24783
24842
  children,
24784
24843
  isDarkMode = false,
@@ -24787,7 +24846,7 @@ function ButtonDropdown({
24787
24846
  onMouseEnter,
24788
24847
  onMouseLeave
24789
24848
  }) {
24790
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
24849
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
24791
24850
  "button",
24792
24851
  {
24793
24852
  className: `mesh-mr-menu-list mesh-flex mesh-w-60 mesh-items-center mesh-justify-center mesh-rounded-t-md mesh-border mesh-px-4 mesh-py-2 mesh-text-lg mesh-font-normal mesh-shadow-sm ${isDarkMode ? `mesh-bg-neutral-950 mesh-text-neutral-50` : `mesh-bg-neutral-50 mesh-text-neutral-950`}`,
@@ -24800,21 +24859,21 @@ function ButtonDropdown({
24800
24859
  }
24801
24860
 
24802
24861
  // src/cardano-wallet-dropdown/menu-item.tsx
24803
- var import_jsx_runtime23 = require("react/jsx-runtime");
24862
+ var import_jsx_runtime25 = require("react/jsx-runtime");
24804
24863
  function MenuItem({
24805
24864
  icon,
24806
24865
  label,
24807
24866
  action,
24808
24867
  active
24809
24868
  }) {
24810
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(
24869
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(
24811
24870
  "div",
24812
24871
  {
24813
24872
  className: "mesh-flex mesh-cursor-pointer mesh-items-center mesh-px-4 mesh-py-2 mesh-opacity-80 hover:mesh-opacity-100 mesh-h-16",
24814
24873
  onClick: action,
24815
24874
  children: [
24816
- icon && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("img", { className: "mesh-pr-2 mesh-m-1 mesh-h-8", src: icon }),
24817
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)("span", { className: "mesh-mr-menu-item mesh-text-xl mesh-font-normal mesh-text-neutral-700 hover:mesh-text-black", children: label.split(" ").map((word) => {
24875
+ icon && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("img", { className: "mesh-pr-2 mesh-m-1 mesh-h-8", src: icon }),
24876
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "mesh-mr-menu-item mesh-text-xl mesh-font-normal mesh-text-neutral-700 hover:mesh-text-black", children: label.split(" ").map((word) => {
24818
24877
  return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase();
24819
24878
  }).join(" ") })
24820
24879
  ]
@@ -24823,8 +24882,8 @@ function MenuItem({
24823
24882
  }
24824
24883
 
24825
24884
  // src/cardano-wallet-dropdown/chevron-down.tsx
24826
- var import_jsx_runtime24 = require("react/jsx-runtime");
24827
- var ChevronDown = () => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
24885
+ var import_jsx_runtime26 = require("react/jsx-runtime");
24886
+ var ChevronDown = () => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
24828
24887
  "svg",
24829
24888
  {
24830
24889
  className: "mesh-m-2 mesh-h-6",
@@ -24833,7 +24892,7 @@ var ChevronDown = () => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
24833
24892
  viewBox: "0 0 24 24",
24834
24893
  stroke: "currentColor",
24835
24894
  xmlns: "http://www.w3.org/2000/svg",
24836
- children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
24895
+ children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
24837
24896
  "path",
24838
24897
  {
24839
24898
  strokeLinecap: "round",
@@ -24846,7 +24905,7 @@ var ChevronDown = () => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
24846
24905
  );
24847
24906
 
24848
24907
  // src/cardano-wallet-dropdown/wallet-balance.tsx
24849
- var import_jsx_runtime25 = require("react/jsx-runtime");
24908
+ var import_jsx_runtime27 = require("react/jsx-runtime");
24850
24909
  var WalletBalance = ({
24851
24910
  connected,
24852
24911
  connecting,
@@ -24854,22 +24913,22 @@ var WalletBalance = ({
24854
24913
  wallet
24855
24914
  }) => {
24856
24915
  const lovelace = useLovelace();
24857
- return connected && lovelace && wallet?.icon ? /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
24858
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("img", { className: "mesh-m-2 mesh-h-6", src: wallet.icon }),
24916
+ return connected && lovelace && wallet?.icon ? /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
24917
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("img", { className: "mesh-m-2 mesh-h-6", src: wallet.icon }),
24859
24918
  "\u20B3",
24860
24919
  " ",
24861
24920
  parseInt((parseInt(lovelace, 10) / 1e6).toString(), 10),
24862
24921
  ".",
24863
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("span", { className: "mesh-text-xs", children: lovelace.substring(lovelace.length - 6) })
24864
- ] }) : connected && wallet?.icon ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("img", { className: "mesh-m-2 mesh-h-6", src: wallet.icon }) }) : connecting ? /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_jsx_runtime25.Fragment, { children: "Connecting..." }) : /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_jsx_runtime25.Fragment, { children: [
24922
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: "mesh-text-xs", children: lovelace.substring(lovelace.length - 6) })
24923
+ ] }) : connected && wallet?.icon ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_jsx_runtime27.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("img", { className: "mesh-m-2 mesh-h-6", src: wallet.icon }) }) : connecting ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_jsx_runtime27.Fragment, { children: "Connecting..." }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
24865
24924
  label,
24866
24925
  " ",
24867
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(ChevronDown, {})
24926
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ChevronDown, {})
24868
24927
  ] });
24869
24928
  };
24870
24929
 
24871
24930
  // src/cardano-wallet-dropdown/index.tsx
24872
- var import_jsx_runtime26 = require("react/jsx-runtime");
24931
+ var import_jsx_runtime28 = require("react/jsx-runtime");
24873
24932
  var CardanoWallet2 = ({
24874
24933
  label = "Connect Wallet",
24875
24934
  onConnected = void 0,
@@ -24877,32 +24936,32 @@ var CardanoWallet2 = ({
24877
24936
  extensions = [],
24878
24937
  cardanoPeerConnect = void 0
24879
24938
  }) => {
24880
- const [isDarkMode, setIsDarkMode] = (0, import_react14.useState)(false);
24881
- const [hideMenuList, setHideMenuList] = (0, import_react14.useState)(true);
24939
+ const [isDarkMode, setIsDarkMode] = (0, import_react15.useState)(false);
24940
+ const [hideMenuList, setHideMenuList] = (0, import_react15.useState)(true);
24882
24941
  const { connect: connect2, connecting, connected, disconnect, name } = useWallet();
24883
24942
  const wallets = useWalletList();
24884
- (0, import_react14.useEffect)(() => {
24943
+ (0, import_react15.useEffect)(() => {
24885
24944
  if (connected && onConnected) {
24886
24945
  onConnected();
24887
24946
  }
24888
24947
  }, [connected]);
24889
- (0, import_react14.useEffect)(() => {
24948
+ (0, import_react15.useEffect)(() => {
24890
24949
  setIsDarkMode(isDark);
24891
24950
  }, [isDark]);
24892
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(
24951
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(
24893
24952
  "div",
24894
24953
  {
24895
24954
  onMouseEnter: () => setHideMenuList(false),
24896
24955
  onMouseLeave: () => setHideMenuList(true),
24897
24956
  style: { width: "min-content", zIndex: 50 },
24898
24957
  children: [
24899
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
24958
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
24900
24959
  ButtonDropdown,
24901
24960
  {
24902
24961
  isDarkMode,
24903
24962
  hideMenuList,
24904
24963
  setHideMenuList,
24905
- children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
24964
+ children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
24906
24965
  WalletBalance,
24907
24966
  {
24908
24967
  connected,
@@ -24913,12 +24972,12 @@ var CardanoWallet2 = ({
24913
24972
  )
24914
24973
  }
24915
24974
  ),
24916
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
24975
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
24917
24976
  "div",
24918
24977
  {
24919
24978
  className: `mesh-mr-menu-list mesh-absolute mesh-w-60 mesh-rounded-b-md mesh-border mesh-text-center mesh-shadow-sm mesh-backdrop-blur ${hideMenuList && "mesh-hidden"} ${isDarkMode ? `mesh-bg-neutral-950 mesh-text-neutral-50` : `mesh-bg-neutral-50 mesh-text-neutral-950`}`,
24920
24979
  style: { zIndex: 50 },
24921
- children: !connected && wallets.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: wallets.map((wallet, index) => /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
24980
+ children: !connected && wallets.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_jsx_runtime28.Fragment, { children: wallets.map((wallet, index) => /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
24922
24981
  MenuItem,
24923
24982
  {
24924
24983
  icon: wallet.icon,
@@ -24930,7 +24989,7 @@ var CardanoWallet2 = ({
24930
24989
  active: name === wallet.id
24931
24990
  },
24932
24991
  index
24933
- )) }) : wallets.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime26.jsx)("span", { children: "No Wallet Found" }) : /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_jsx_runtime26.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
24992
+ )) }) : wallets.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)("span", { children: "No Wallet Found" }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_jsx_runtime28.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
24934
24993
  MenuItem,
24935
24994
  {
24936
24995
  active: false,
@@ -24947,7 +25006,7 @@ var CardanoWallet2 = ({
24947
25006
  };
24948
25007
 
24949
25008
  // src/stake-button/index.tsx
24950
- var import_jsx_runtime27 = require("react/jsx-runtime");
25009
+ var import_jsx_runtime29 = require("react/jsx-runtime");
24951
25010
  var StakeButton = ({
24952
25011
  label = "Stake your ADA",
24953
25012
  isDark = false,
@@ -24955,19 +25014,19 @@ var StakeButton = ({
24955
25014
  onCheck,
24956
25015
  onDelegated = void 0
24957
25016
  }) => {
24958
- const [isDarkMode, setIsDarkMode] = (0, import_react15.useState)(false);
25017
+ const [isDarkMode, setIsDarkMode] = (0, import_react16.useState)(false);
24959
25018
  const { connected } = useWallet();
24960
- (0, import_react15.useEffect)(() => {
25019
+ (0, import_react16.useEffect)(() => {
24961
25020
  setIsDarkMode(isDark);
24962
25021
  }, [isDark]);
24963
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_jsx_runtime27.Fragment, { children: connected ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(ButtonDropdown, { isDarkMode, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
25022
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_jsx_runtime29.Fragment, { children: connected ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(ButtonDropdown, { isDarkMode, children: /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
24964
25023
  Delegate,
24965
25024
  {
24966
25025
  poolId,
24967
25026
  onCheck,
24968
25027
  onDelegated
24969
25028
  }
24970
- ) }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CardanoWallet2, { label, isDark }) });
25029
+ ) }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(CardanoWallet2, { label, isDark }) });
24971
25030
  };
24972
25031
  var Delegate = ({
24973
25032
  poolId,
@@ -24976,11 +25035,11 @@ var Delegate = ({
24976
25035
  }) => {
24977
25036
  const { wallet } = useWallet();
24978
25037
  const rewardAddress = useRewardAddress();
24979
- const [_, setError] = (0, import_react15.useState)();
24980
- const [checking, setChecking] = (0, import_react15.useState)(false);
24981
- const [accountInfo, setAccountInfo] = (0, import_react15.useState)();
24982
- const [processing, setProcessing] = (0, import_react15.useState)(false);
24983
- const [done, setDone] = (0, import_react15.useState)(false);
25038
+ const [_, setError] = (0, import_react16.useState)();
25039
+ const [checking, setChecking] = (0, import_react16.useState)(false);
25040
+ const [accountInfo, setAccountInfo] = (0, import_react16.useState)();
25041
+ const [processing, setProcessing] = (0, import_react16.useState)(false);
25042
+ const [done, setDone] = (0, import_react16.useState)(false);
24984
25043
  const checkAccountStatus = async () => {
24985
25044
  try {
24986
25045
  setChecking(true);
@@ -25031,22 +25090,22 @@ var Delegate = ({
25031
25090
  }
25032
25091
  setProcessing(false);
25033
25092
  };
25034
- (0, import_react15.useEffect)(() => {
25093
+ (0, import_react16.useEffect)(() => {
25035
25094
  checkAccountStatus();
25036
25095
  }, [rewardAddress]);
25037
25096
  if (checking) {
25038
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: "Checking..." });
25097
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: "Checking..." });
25039
25098
  }
25040
25099
  if (processing) {
25041
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: "Loading..." });
25100
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: "Loading..." });
25042
25101
  }
25043
25102
  if (done) {
25044
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: "Stake Delegated" });
25103
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: "Stake Delegated" });
25045
25104
  }
25046
25105
  if (accountInfo?.active) {
25047
- return accountInfo.poolId === poolId ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { children: "Stake Delegated" }) : /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { onClick: delegateStake, children: "Begin Staking" });
25106
+ return accountInfo.poolId === poolId ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { children: "Stake Delegated" }) : /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { onClick: delegateStake, children: "Begin Staking" });
25048
25107
  }
25049
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { onClick: registerAddress, children: "Begin Staking" });
25108
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)("span", { onClick: registerAddress, children: "Begin Staking" });
25050
25109
  };
25051
25110
  // Annotate the CommonJS export names for ESM import in node:
25052
25111
  0 && (module.exports = {