@xyo-network/react-connected-accounts 2.83.0 → 2.83.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -100,7 +100,7 @@ var EnabledEthWalletConnections = class {
100
100
  // src/components/ConnectedAccountsFlexbox.tsx
101
101
  import { Typography as Typography6, useTheme as useTheme2 } from "@mui/material";
102
102
  import { FlexCol as FlexCol3 } from "@xylabs/react-flexbox";
103
- import React14, { forwardRef } from "react";
103
+ import React13, { forwardRef } from "react";
104
104
 
105
105
  // src/hooks/useDetectWallets.tsx
106
106
  import { AccountsChangedEventName, useWalletDiscovery } from "@xylabs/react-crypto";
@@ -189,48 +189,40 @@ var CheckboxFormControl = /* @__PURE__ */ __name(({ onCheckChanged, ...props })
189
189
 
190
190
  // src/components/wallet/dialogs/connect/Dialog.tsx
191
191
  import { Button, Dialog, DialogActions, DialogContent, DialogTitle } from "@mui/material";
192
- import React5 from "react";
192
+ import React4 from "react";
193
193
 
194
194
  // src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx
195
195
  import { SyncAlt } from "@mui/icons-material";
196
196
  import { Typography } from "@mui/material";
197
197
  import { ConstrainedImage } from "@xylabs/react-crypto";
198
198
  import { FlexCol, FlexRow } from "@xylabs/react-flexbox";
199
- import React3 from "react";
199
+ import React2 from "react";
200
200
 
201
- // src/img/xyo-color-logo.svg
202
- import * as React2 from "react";
203
- import { jsx, jsxs } from "react/jsx-runtime";
204
- var SvgXyoColorLogo = /* @__PURE__ */ __name((props) => /* @__PURE__ */ jsxs("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 256 238", ...props, children: [
205
- /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("style", { children: ".cls-1{fill:#8d8fc6;}.cls-2{fill:#579fd6;}.cls-3{fill:#f27046;}.cls-4{fill:#eb407a;}" }) }),
206
- /* @__PURE__ */ jsx("path", { className: "cls-1", d: "M74.5,28.33,21.29,120.5,74.5,212.67H180.94l1.76-3,51.46-89.13L180.94,28.33ZM84.65,40.54h78.83L111.65,56.93a15.85,15.85,0,0,1,2,5l59.66-18.81L185.22,101a20.12,20.12,0,0,1,5.36-.78l-10-47.91,37.87,65.53h-7.62a24.21,24.21,0,0,1,.15,2.68,23.29,23.29,0,0,1-.15,2.68h7.62l-39.1,67.75,10.92-50.13A20.57,20.57,0,0,1,185,140l-12.88,59-58.37-19.53a17.61,17.61,0,0,1-1.7,5l47.5,15.92H84.65l4-6.85A20.17,20.17,0,0,1,83.93,191L80,197.78,42.67,133.13l37,32.66a20.52,20.52,0,0,1,3.6-4L36.69,120.66,85,77.79a17.45,17.45,0,0,1-3.19-4.32l-39.46,35L80,43.22l5.56,9.69A17.51,17.51,0,0,1,90.12,50Zm28.24,31.17a16.15,16.15,0,0,1-2.68,4.64l62,35.81a19.74,19.74,0,0,1,2.83-4.54Zm-20,10.51v75.33a18,18,0,0,1,2.47-.16,17.18,17.18,0,0,1,2.89.21v-75a11.21,11.21,0,0,1-1.29,0,17.57,17.57,0,0,1-4.07-.47Zm79.34,46.63-62.08,35.81a18.45,18.45,0,0,1,2.68,4.68l62.23-36a19.68,19.68,0,0,1-2.83-4.53Z" }),
207
- /* @__PURE__ */ jsx("path", { className: "cls-2", d: "M97,48.58a17.06,17.06,0,1,0,17,17,17.08,17.08,0,0,0-17-17Zm0,5.36a11.7,11.7,0,1,1-11.7,11.69A11.65,11.65,0,0,1,97,53.94Z" }),
208
- /* @__PURE__ */ jsx("path", { className: "cls-3", d: "M95.37,157.39a18.73,18.73,0,1,0,18.7,18.7,18.74,18.74,0,0,0-18.7-18.7Zm0,5.31A13.4,13.4,0,1,1,82,176.09a13.37,13.37,0,0,1,13.4-13.39Z" }),
209
- /* @__PURE__ */ jsx("path", { className: "cls-4", d: "M190.73,100.2A20.3,20.3,0,1,0,211,120.5a20.34,20.34,0,0,0-20.3-20.3Zm0,5.36a14.94,14.94,0,1,1-14.94,14.94,14.88,14.88,0,0,1,14.94-14.94Z" })
210
- ] }), "SvgXyoColorLogo");
211
- var xyo_color_logo_default = SvgXyoColorLogo;
201
+ // src/img/index.ts
202
+ import { default as default2 } from "./xyo-color-logo-LHR2SMEM.svg";
203
+ import { default as default3 } from "./xyo-color-logo-text-only-QPAW5BSQ.svg";
212
204
 
213
205
  // src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx
214
206
  var LinkedProvidersFlexbox = /* @__PURE__ */ __name(({ icon, providerName, ...props }) => {
215
- return /* @__PURE__ */ React3.createElement(FlexRow, {
207
+ return /* @__PURE__ */ React2.createElement(FlexRow, {
216
208
  gap: 4,
217
209
  justifyContent: "space-evenly",
218
210
  ...props
219
- }, /* @__PURE__ */ React3.createElement(FlexCol, {
211
+ }, /* @__PURE__ */ React2.createElement(FlexCol, {
220
212
  gap: 0.5
221
- }, /* @__PURE__ */ React3.createElement("img", {
213
+ }, /* @__PURE__ */ React2.createElement("img", {
222
214
  alt: "XYO Logo",
223
- src: xyo_color_logo_default,
215
+ src: default2,
224
216
  style: {
225
217
  height: "48px"
226
218
  }
227
- }), /* @__PURE__ */ React3.createElement(Typography, {
219
+ }), /* @__PURE__ */ React2.createElement(Typography, {
228
220
  variant: "subtitle1"
229
- }, "XYO App")), /* @__PURE__ */ React3.createElement(SyncAlt, {
221
+ }, "XYO App")), /* @__PURE__ */ React2.createElement(SyncAlt, {
230
222
  fontSize: "large"
231
- }), /* @__PURE__ */ React3.createElement(FlexCol, {
223
+ }), /* @__PURE__ */ React2.createElement(FlexCol, {
232
224
  gap: 0.5
233
- }, /* @__PURE__ */ React3.createElement(ConstrainedImage, {
225
+ }, /* @__PURE__ */ React2.createElement(ConstrainedImage, {
234
226
  constrainedValue: "48px",
235
227
  src: icon,
236
228
  alt: providerName,
@@ -238,7 +230,7 @@ var LinkedProvidersFlexbox = /* @__PURE__ */ __name(({ icon, providerName, ...pr
238
230
  height: "48px",
239
231
  maxWidth: "48px"
240
232
  }
241
- }), /* @__PURE__ */ React3.createElement(Typography, {
233
+ }), /* @__PURE__ */ React2.createElement(Typography, {
242
234
  variant: "subtitle1"
243
235
  }, providerName)));
244
236
  }, "LinkedProvidersFlexbox");
@@ -246,22 +238,22 @@ var LinkedProvidersFlexbox = /* @__PURE__ */ __name(({ icon, providerName, ...pr
246
238
  // src/components/wallet/dialogs/connect/Permissions.tsx
247
239
  import { Link, Typography as Typography2 } from "@mui/material";
248
240
  import { FlexCol as FlexCol2 } from "@xylabs/react-flexbox";
249
- import React4 from "react";
241
+ import React3 from "react";
250
242
  var WalletPermissionsFlexbox = /* @__PURE__ */ __name((props) => {
251
- return /* @__PURE__ */ React4.createElement(FlexCol2, {
243
+ return /* @__PURE__ */ React3.createElement(FlexCol2, {
252
244
  gap: 4,
253
245
  ...props
254
- }, /* @__PURE__ */ React4.createElement(Typography2, {
246
+ }, /* @__PURE__ */ React3.createElement(Typography2, {
255
247
  fontWeight: "bold",
256
248
  sx: {
257
249
  textAlign: "center"
258
250
  }
259
- }, "This will allow XYO to:"), /* @__PURE__ */ React4.createElement("ul", null, /* @__PURE__ */ React4.createElement("li", null, "View your wallet account(s) and address(es)"), /* @__PURE__ */ React4.createElement("li", null, "Read-only access to browse the public blockchain(s) you select")), /* @__PURE__ */ React4.createElement(Typography2, {
251
+ }, "This will allow XYO to:"), /* @__PURE__ */ React3.createElement("ul", null, /* @__PURE__ */ React3.createElement("li", null, "View your wallet account(s) and address(es)"), /* @__PURE__ */ React3.createElement("li", null, "Read-only access to browse the public blockchain(s) you select")), /* @__PURE__ */ React3.createElement(Typography2, {
260
252
  variant: "subtitle1",
261
253
  sx: {
262
254
  textAlign: "center"
263
255
  }
264
- }, "You control what accounts to share and what blockchains to view. You can see or revoke access via your wallet's settings at anytime. View more on XYO's sovereign data philosophy", " ", /* @__PURE__ */ React4.createElement(Link, {
256
+ }, "You control what accounts to share and what blockchains to view. You can see or revoke access via your wallet's settings at anytime. View more on XYO's sovereign data philosophy", " ", /* @__PURE__ */ React3.createElement(Link, {
265
257
  href: "https://cointelegraph.com/innovation-circle/decentralization-and-sovereignty-debunking-our-approach-to-digital-sovereignty",
266
258
  sx: {
267
259
  fontWeight: "bold"
@@ -281,7 +273,7 @@ var ConnectWalletDialog = /* @__PURE__ */ __name(({ activeProvider, onIgnoreConn
281
273
  console.warn(`Error connecting to wallet: ${e.message}`);
282
274
  }
283
275
  }, "onConnect");
284
- return /* @__PURE__ */ React5.createElement(Dialog, {
276
+ return /* @__PURE__ */ React4.createElement(Dialog, {
285
277
  PaperProps: {
286
278
  sx: {
287
279
  display: "flex",
@@ -289,25 +281,25 @@ var ConnectWalletDialog = /* @__PURE__ */ __name(({ activeProvider, onIgnoreConn
289
281
  }
290
282
  },
291
283
  ...props
292
- }, /* @__PURE__ */ React5.createElement(DialogTitle, {
284
+ }, /* @__PURE__ */ React4.createElement(DialogTitle, {
293
285
  sx: {
294
286
  textAlign: "center"
295
287
  }
296
- }, "XYO Wants To Access The Blockchain on Your Behalf"), /* @__PURE__ */ React5.createElement(DialogContent, {
288
+ }, "XYO Wants To Access The Blockchain on Your Behalf"), /* @__PURE__ */ React4.createElement(DialogContent, {
297
289
  sx: {
298
290
  display: "flex",
299
291
  flexDirection: "column",
300
292
  gap: 4
301
293
  }
302
- }, /* @__PURE__ */ React5.createElement(LinkedProvidersFlexbox, {
294
+ }, /* @__PURE__ */ React4.createElement(LinkedProvidersFlexbox, {
303
295
  icon,
304
296
  providerName
305
- }), /* @__PURE__ */ React5.createElement(WalletPermissionsFlexbox, null), /* @__PURE__ */ React5.createElement(CheckboxFormControl, {
297
+ }), /* @__PURE__ */ React4.createElement(WalletPermissionsFlexbox, null), /* @__PURE__ */ React4.createElement(CheckboxFormControl, {
306
298
  onCheckChanged: onIgnoreConnectDialog
307
- })), /* @__PURE__ */ React5.createElement(DialogActions, null, /* @__PURE__ */ React5.createElement(Button, {
299
+ })), /* @__PURE__ */ React4.createElement(DialogActions, null, /* @__PURE__ */ React4.createElement(Button, {
308
300
  variant: "outlined",
309
301
  onClick: /* @__PURE__ */ __name(() => props.onClose?.({}, "escapeKeyDown"), "onClick")
310
- }, "Close"), /* @__PURE__ */ React5.createElement(Button, {
302
+ }, "Close"), /* @__PURE__ */ React4.createElement(Button, {
311
303
  variant: "contained",
312
304
  onClick: onConnect
313
305
  }, "Connect")));
@@ -317,20 +309,20 @@ var ConnectWalletDialog = /* @__PURE__ */ __name(({ activeProvider, onIgnoreConn
317
309
  import { Button as Button2, Dialog as Dialog2, DialogActions as DialogActions2, DialogContent as DialogContent2, DialogTitle as DialogTitle2, Typography as Typography3 } from "@mui/material";
318
310
  import { ConstrainedImage as ConstrainedImage2 } from "@xylabs/react-crypto";
319
311
  import { FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
320
- import React6 from "react";
312
+ import React5 from "react";
321
313
  var RevokeWalletConnectionDialog = /* @__PURE__ */ __name(({ activeProvider, ...props }) => {
322
- return /* @__PURE__ */ React6.createElement(Dialog2, props, /* @__PURE__ */ React6.createElement(FlexRow2, {
314
+ return /* @__PURE__ */ React5.createElement(Dialog2, props, /* @__PURE__ */ React5.createElement(FlexRow2, {
323
315
  gap: 2,
324
316
  justifyContent: "start",
325
317
  pl: 2
326
- }, /* @__PURE__ */ React6.createElement(ConstrainedImage2, {
318
+ }, /* @__PURE__ */ React5.createElement(ConstrainedImage2, {
327
319
  src: activeProvider?.icon,
328
320
  constrainedValue: "24px"
329
- }), /* @__PURE__ */ React6.createElement(DialogTitle2, {
321
+ }), /* @__PURE__ */ React5.createElement(DialogTitle2, {
330
322
  sx: {
331
323
  pl: 0
332
324
  }
333
- }, "Revoke", activeProvider?.providerName, " ", "Access")), /* @__PURE__ */ React6.createElement(DialogContent2, null, /* @__PURE__ */ React6.createElement(Typography3, null, "Revoking access to your wallet must be done from the wallet's browser extension. Wallets grant access to specific domains please consult", " ", activeProvider?.providerName, "'s documentation on how to revoke access to this website:"), /* @__PURE__ */ React6.createElement(Typography3, null, window.location.origin)), /* @__PURE__ */ React6.createElement(DialogActions2, null, /* @__PURE__ */ React6.createElement(Button2, {
325
+ }, "Revoke", activeProvider?.providerName, " ", "Access")), /* @__PURE__ */ React5.createElement(DialogContent2, null, /* @__PURE__ */ React5.createElement(Typography3, null, "Revoking access to your wallet must be done from the wallet's browser extension. Wallets grant access to specific domains please consult", " ", activeProvider?.providerName, "'s documentation on how to revoke access to this website:"), /* @__PURE__ */ React5.createElement(Typography3, null, window.location.origin)), /* @__PURE__ */ React5.createElement(DialogActions2, null, /* @__PURE__ */ React5.createElement(Button2, {
334
326
  variant: "contained",
335
327
  onClick: /* @__PURE__ */ __name(() => props.onClose?.({}, "escapeKeyDown"), "onClick")
336
328
  }, "Close")));
@@ -338,53 +330,53 @@ var RevokeWalletConnectionDialog = /* @__PURE__ */ __name(({ activeProvider, ...
338
330
 
339
331
  // src/components/wallet/table/cells/Accounts.tsx
340
332
  import { TableCell, Tooltip, Typography as Typography4 } from "@mui/material";
341
- import React7 from "react";
333
+ import React6 from "react";
342
334
  var ConnectedWalletsAccountsTableCell = /* @__PURE__ */ __name(({ additionalAccounts, currentAccount, totalAccounts, tableCellProps }) => {
343
- return /* @__PURE__ */ React7.createElement(TableCell, tableCellProps, /* @__PURE__ */ React7.createElement(Tooltip, {
335
+ return /* @__PURE__ */ React6.createElement(TableCell, tableCellProps, /* @__PURE__ */ React6.createElement(Tooltip, {
344
336
  sx: {
345
337
  cursor: totalAccounts > 0 ? "pointer" : "auto"
346
338
  },
347
339
  title: [
348
340
  ...currentAccount ?? [],
349
341
  ...additionalAccounts ?? []
350
- ].map((address, index) => /* @__PURE__ */ React7.createElement("p", {
342
+ ].map((address, index) => /* @__PURE__ */ React6.createElement("p", {
351
343
  key: index
352
344
  }, address))
353
- }, /* @__PURE__ */ React7.createElement(Typography4, null, totalAccounts)));
345
+ }, /* @__PURE__ */ React6.createElement(Typography4, null, totalAccounts)));
354
346
  }, "ConnectedWalletsAccountsTableCell");
355
347
 
356
348
  // src/components/wallet/table/cells/Actions.tsx
357
349
  import { Check, InfoOutlined } from "@mui/icons-material";
358
350
  import { Button as Button3, IconButton, TableCell as TableCell2, Typography as Typography5 } from "@mui/material";
359
351
  import { FlexRow as FlexRow3 } from "@xylabs/react-flexbox";
360
- import React8 from "react";
352
+ import React7 from "react";
361
353
  var ConnectedWalletsActionsTableCell = /* @__PURE__ */ __name(({ connected, onConnect, onRevoke, tableCellProps }) => {
362
- return /* @__PURE__ */ React8.createElement(TableCell2, tableCellProps, /* @__PURE__ */ React8.createElement(FlexRow3, {
354
+ return /* @__PURE__ */ React7.createElement(TableCell2, tableCellProps, /* @__PURE__ */ React7.createElement(FlexRow3, {
363
355
  gap: 2,
364
356
  justifyContent: "start"
365
- }, connected ? /* @__PURE__ */ React8.createElement(Typography5, {
357
+ }, connected ? /* @__PURE__ */ React7.createElement(Typography5, {
366
358
  sx: {
367
359
  display: "inline-flex",
368
360
  gap: 0.5
369
361
  }
370
- }, /* @__PURE__ */ React8.createElement(Check, null), "Connected") : /* @__PURE__ */ React8.createElement(Button3, {
362
+ }, /* @__PURE__ */ React7.createElement(Check, null), "Connected") : /* @__PURE__ */ React7.createElement(Button3, {
371
363
  variant: "contained",
372
364
  onClick: onConnect
373
- }, "Connect"), connected ? /* @__PURE__ */ React8.createElement(IconButton, {
365
+ }, "Connect"), connected ? /* @__PURE__ */ React7.createElement(IconButton, {
374
366
  onClick: onRevoke
375
- }, /* @__PURE__ */ React8.createElement(InfoOutlined, null)) : null));
367
+ }, /* @__PURE__ */ React7.createElement(InfoOutlined, null)) : null));
376
368
  }, "ConnectedWalletsActionsTableCell");
377
369
 
378
370
  // src/components/wallet/table/cells/ChainName.tsx
379
371
  import { TableCell as TableCell3 } from "@mui/material";
380
- import React9 from "react";
372
+ import React8 from "react";
381
373
  var ConnectedWalletsChainNameTableCell = /* @__PURE__ */ __name(({ chainName, tableCellProps }) => {
382
- return /* @__PURE__ */ React9.createElement(TableCell3, tableCellProps, chainName);
374
+ return /* @__PURE__ */ React8.createElement(TableCell3, tableCellProps, chainName);
383
375
  }, "ConnectedWalletsChainNameTableCell");
384
376
 
385
377
  // src/components/wallet/table/cells/State.tsx
386
378
  import { Switch, TableCell as TableCell4 } from "@mui/material";
387
- import React10, { useMemo as useMemo3 } from "react";
379
+ import React9, { useMemo as useMemo3 } from "react";
388
380
  var ConnectedWalletState = /* @__PURE__ */ __name(({ connected, walletRdns, tableCellProps }) => {
389
381
  const { disableWallet, enableWallet, wallets } = useEnabledWallets();
390
382
  const enabled = useMemo3(() => walletRdns ? wallets[walletRdns].enabled : false, [
@@ -397,7 +389,7 @@ var ConnectedWalletState = /* @__PURE__ */ __name(({ connected, walletRdns, tabl
397
389
  checked ? enableWallet?.(walletRdns) : disableWallet?.(walletRdns);
398
390
  }
399
391
  }, "handleClick");
400
- return /* @__PURE__ */ React10.createElement(TableCell4, tableCellProps, /* @__PURE__ */ React10.createElement(Switch, {
392
+ return /* @__PURE__ */ React9.createElement(TableCell4, tableCellProps, /* @__PURE__ */ React9.createElement(Switch, {
401
393
  disabled: !connected,
402
394
  checked: connected && enabled,
403
395
  onChange: handleClick
@@ -408,13 +400,13 @@ var ConnectedWalletState = /* @__PURE__ */ __name(({ connected, walletRdns, tabl
408
400
  import { TableCell as TableCell5, useTheme } from "@mui/material";
409
401
  import { ConstrainedImage as ConstrainedImage3 } from "@xylabs/react-crypto";
410
402
  import { FlexRow as FlexRow4 } from "@xylabs/react-flexbox";
411
- import React11 from "react";
403
+ import React10 from "react";
412
404
  var ConnectedWalletsWalletTableCell = /* @__PURE__ */ __name(({ icon, walletName, tableCellProps }) => {
413
405
  const theme = useTheme();
414
- return /* @__PURE__ */ React11.createElement(TableCell5, tableCellProps, /* @__PURE__ */ React11.createElement(FlexRow4, {
406
+ return /* @__PURE__ */ React10.createElement(TableCell5, tableCellProps, /* @__PURE__ */ React10.createElement(FlexRow4, {
415
407
  gap: 2,
416
408
  justifyContent: "start"
417
- }, /* @__PURE__ */ React11.createElement(ConstrainedImage3, {
409
+ }, /* @__PURE__ */ React10.createElement(ConstrainedImage3, {
418
410
  constrainedValue: theme.spacing(4),
419
411
  src: icon
420
412
  }), walletName));
@@ -431,7 +423,7 @@ var ConnectedWalletTableCells = [
431
423
 
432
424
  // src/components/wallet/table/ConnectedWalletsTable.tsx
433
425
  import { Table, TableBody, TableCell as TableCell6, TableHead, TableRow as TableRow2 } from "@mui/material";
434
- import React13, { useState as useState3 } from "react";
426
+ import React12, { useState as useState3 } from "react";
435
427
 
436
428
  // src/components/wallet/lib/TableHeadData.ts
437
429
  var WalletsTableHeadCells = [
@@ -475,7 +467,7 @@ var WalletsTableHeadCells = [
475
467
  // src/components/wallet/table/ConnectedWalletsTableRow.tsx
476
468
  import { TableRow } from "@mui/material";
477
469
  import { useEthWallet } from "@xylabs/react-crypto";
478
- import React12, { useCallback, useMemo as useMemo4 } from "react";
470
+ import React11, { useCallback, useMemo as useMemo4 } from "react";
479
471
  var WalletConnectionsTableRow = /* @__PURE__ */ __name(({ ignoreConnectDialog, onConnectClick, onRevoke, wallet, ...props }) => {
480
472
  const { currentAccount: currentAccountFromWallet, additionalAccounts, chainName, connectWallet, providerInfo } = useEthWallet(wallet);
481
473
  const currentAccount = currentAccountFromWallet?.toString() ? [
@@ -517,7 +509,7 @@ var WalletConnectionsTableRow = /* @__PURE__ */ __name(({ ignoreConnectDialog, o
517
509
  ignoreConnectDialog,
518
510
  onConnectClick
519
511
  ]);
520
- return /* @__PURE__ */ React12.createElement(TableRow, props, Object.values(ConnectedWalletTableCells).map((Cell, index) => /* @__PURE__ */ React12.createElement(Cell, {
512
+ return /* @__PURE__ */ React11.createElement(TableRow, props, Object.values(ConnectedWalletTableCells).map((Cell, index) => /* @__PURE__ */ React11.createElement(Cell, {
521
513
  key: index,
522
514
  additionalAccounts,
523
515
  chainName,
@@ -556,22 +548,22 @@ var ConnectedWalletsTable = /* @__PURE__ */ __name(({ ignoreConnectDialog, onIgn
556
548
  const [activeProvider, setActiveProvider] = useState3();
557
549
  const [showConnect, onSetActiveProviderConnect, onConnectClose] = useActiveProviderDialogState(setActiveProvider);
558
550
  const [showRevoke, onSetActiveProviderRevoke, onRevokeClose] = useActiveProviderDialogState(setActiveProvider);
559
- return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(Table, props, /* @__PURE__ */ React13.createElement(TableHead, null, /* @__PURE__ */ React13.createElement(TableRow2, null, WalletsTableHeadCells.map(({ disablePadding, id, label, align, width }) => /* @__PURE__ */ React13.createElement(TableCell6, {
551
+ return /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(Table, props, /* @__PURE__ */ React12.createElement(TableHead, null, /* @__PURE__ */ React12.createElement(TableRow2, null, WalletsTableHeadCells.map(({ disablePadding, id, label, align, width }) => /* @__PURE__ */ React12.createElement(TableCell6, {
560
552
  align,
561
553
  key: id,
562
554
  padding: disablePadding ? "none" : "normal",
563
555
  width: width ?? "auto"
564
- }, label)))), /* @__PURE__ */ React13.createElement(TableBody, null, (wallets ?? []).map((wallet) => /* @__PURE__ */ React13.createElement(WalletConnectionsTableRow, {
556
+ }, label)))), /* @__PURE__ */ React12.createElement(TableBody, null, (wallets ?? []).map((wallet) => /* @__PURE__ */ React12.createElement(WalletConnectionsTableRow, {
565
557
  ignoreConnectDialog,
566
558
  key: wallet.providerInfo?.rdns,
567
559
  onConnectClick: onSetActiveProviderConnect,
568
560
  onRevoke: onSetActiveProviderRevoke,
569
561
  wallet
570
- })))), /* @__PURE__ */ React13.createElement(RevokeWalletConnectionDialog, {
562
+ })))), /* @__PURE__ */ React12.createElement(RevokeWalletConnectionDialog, {
571
563
  open: showRevoke,
572
564
  onClose: onRevokeClose,
573
565
  activeProvider
574
- }), /* @__PURE__ */ React13.createElement(ConnectWalletDialog, {
566
+ }), /* @__PURE__ */ React12.createElement(ConnectWalletDialog, {
575
567
  activeProvider,
576
568
  onClose: onConnectClose,
577
569
  open: showConnect,
@@ -583,26 +575,26 @@ var ConnectedWalletsTable = /* @__PURE__ */ __name(({ ignoreConnectDialog, onIgn
583
575
  var ConnectedAccountsFlexbox = /* @__PURE__ */ forwardRef(({ ignoreConnectDialog, onIgnoreConnectDialog, ...props }, ref) => {
584
576
  const theme = useTheme2();
585
577
  const { totalConnectedAccounts, sortedWallets } = useDetectedWallets();
586
- return /* @__PURE__ */ React14.createElement(FlexCol3, {
578
+ return /* @__PURE__ */ React13.createElement(FlexCol3, {
587
579
  alignItems: "stretch",
588
580
  justifyContent: "start",
589
581
  gap: 2,
590
582
  ref,
591
583
  ...props
592
- }, /* @__PURE__ */ React14.createElement(FlexCol3, {
584
+ }, /* @__PURE__ */ React13.createElement(FlexCol3, {
593
585
  alignItems: "start"
594
- }, /* @__PURE__ */ React14.createElement(Typography6, {
586
+ }, /* @__PURE__ */ React13.createElement(Typography6, {
595
587
  variant: "h2",
596
588
  sx: {
597
589
  mb: 0.5
598
590
  }
599
- }, "Detected Web3 Wallets"), totalConnectedAccounts ? /* @__PURE__ */ React14.createElement(Typography6, {
591
+ }, "Detected Web3 Wallets"), totalConnectedAccounts ? /* @__PURE__ */ React13.createElement(Typography6, {
600
592
  variant: "subtitle1",
601
593
  color: theme.palette.secondary.main,
602
594
  sx: {
603
595
  opacity: 0.5
604
596
  }
605
- }, "Total Connected Accounts:", " ", totalConnectedAccounts) : null), /* @__PURE__ */ React14.createElement(ConnectedWalletsTable, {
597
+ }, "Total Connected Accounts:", " ", totalConnectedAccounts) : null), /* @__PURE__ */ React13.createElement(ConnectedWalletsTable, {
606
598
  wallets: sortedWallets,
607
599
  ignoreConnectDialog,
608
600
  onIgnoreConnectDialog
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/classes/EnabledWallets.ts","../../src/components/ConnectedAccountsFlexbox.tsx","../../src/hooks/useDetectWallets.tsx","../../src/hooks/useEnabledWallets.tsx","../../src/components/wallet/dialogs/connect/CheckboxFormControl.tsx","../../src/components/wallet/dialogs/connect/Dialog.tsx","../../src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx","../../src/img/xyo-color-logo.svg","../../src/components/wallet/dialogs/connect/Permissions.tsx","../../src/components/wallet/dialogs/revoke/Dialog.tsx","../../src/components/wallet/table/cells/Accounts.tsx","../../src/components/wallet/table/cells/Actions.tsx","../../src/components/wallet/table/cells/ChainName.tsx","../../src/components/wallet/table/cells/State.tsx","../../src/components/wallet/table/cells/Wallet.tsx","../../src/components/wallet/table/cells/Cells.tsx","../../src/components/wallet/table/ConnectedWalletsTable.tsx","../../src/components/wallet/lib/TableHeadData.ts","../../src/components/wallet/table/ConnectedWalletsTableRow.tsx","../../src/components/wallet/table/hooks/useActiveProviderDialogState.tsx"],"sourcesContent":["import { DiscoveredWallets, EIP6963Connector } from '@xylabs/react-crypto'\n\nconst DEFAULT_LOCAL_STORAGE_KEY = 'XYO|EnabledWallets'\n\n/**\n * State for storing wallets and their enabled/disabled status by name\n */\nexport interface EnabledEthWalletsState {\n [rdns: string]: {\n enabled: boolean\n wallet: EIP6963Connector\n }\n}\n\n/**\n * State for storing only enabled/disabled status of a wallet by name\n */\nexport interface EnabledWalletsSavedState {\n [rdns: string]: boolean\n}\n\nexport type WalletListener = () => void\n\nexport class EnabledEthWalletConnections {\n // control whether or not enabled/disabled preferences are persisted (i.e. in localStorage)\n persistPreferences = true\n\n // Map of wallet names and their enabled/disabled state\n private enabledWallets: EnabledWalletsSavedState = {}\n\n // Map of wallet names, their enabled/disabled state, and their wallet class\n private ethWalletsState: EnabledEthWalletsState = {}\n\n // list of listeners that want to be notified on wallet changes\n private listeners: WalletListener[] = []\n\n // key to use in localStorage when persisting preferences\n private localStorageKey = DEFAULT_LOCAL_STORAGE_KEY\n\n constructor(localStorageKey = DEFAULT_LOCAL_STORAGE_KEY) {\n this.localStorageKey = localStorageKey\n this.reviveSettings()\n }\n\n get wallets() {\n return this.ethWalletsState\n }\n\n disableWallet(rdns: string) {\n this.toggleEnabledWallet(rdns, false)\n }\n\n enableWallet(rdns: string) {\n this.toggleEnabledWallet(rdns, true)\n }\n\n /**\n * Given a new set of wallets, set their enabled state based off previous preferences\n */\n resetWallets(wallets: DiscoveredWallets) {\n const newWallets: EnabledEthWalletsState = {}\n\n const addWallet = ([walletName, wallet]: [string, EIP6963Connector]) => {\n newWallets[walletName] = {\n // preserve the existing enabled state\n enabled: walletName in this.enabledWallets ? this.enabledWallets[walletName] : true,\n wallet,\n }\n }\n\n // eslint-disable-next-line unicorn/no-array-for-each\n Object.entries(wallets).forEach(addWallet.bind(this))\n this.ethWalletsState = newWallets\n this.emitChange()\n }\n\n subscribe(listener: WalletListener) {\n this.listeners = [...this.listeners, listener]\n return () => {\n this.listeners = this.listeners.filter(existingListener => existingListener !== listener)\n }\n }\n\n toggleEnabledWallet(rdns: string, enabled: boolean) {\n if (rdns && this.ethWalletsState[rdns]) {\n this.ethWalletsState[rdns].enabled = enabled\n this.ethWalletsState = { ...this.ethWalletsState }\n this.emitChange()\n }\n }\n\n private emitChange() {\n for (const listener of this.listeners) {\n listener()\n }\n\n this.persistSettings()\n }\n\n private isPersistance(method: () => void) {\n if (this.persistPreferences) {\n method()\n }\n }\n\n private persistSettings() {\n this.isPersistance(() => {\n // convert wallet enabled selections into serializable state\n // eslint-disable-next-line unicorn/no-array-reduce\n const enabledWallets = Object.entries(this.ethWalletsState).reduce((acc, [rdns, { enabled }]) => {\n acc[rdns] = enabled\n return acc\n }, {} as EnabledWalletsSavedState)\n\n localStorage.setItem(this.localStorageKey, JSON.stringify(enabledWallets))\n })\n }\n\n private reviveSettings() {\n this.isPersistance(() => {\n const existingEntries = localStorage.getItem(this.localStorageKey)\n try {\n const entries = existingEntries ? JSON.parse(existingEntries) : {}\n this.enabledWallets = entries\n } catch (e) {\n console.warn(`Error parsing saved enabled wallet entries: ${(e as Error).message}`)\n }\n })\n }\n}\n","import { Typography, useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\nimport React, { forwardRef } from 'react'\n\nimport { useDetectedWallets } from '../hooks/index.ts'\nimport { ConnectedWalletsTable } from './wallet/index.ts'\n\nexport interface ConnectedAccountsFlexboxProps extends FlexBoxProps {\n ignoreConnectDialog?: boolean\n // A callback that is invoked when the option to ignore the dialog is checked\n onIgnoreConnectDialog?: (checked: boolean) => void\n}\n\nexport const ConnectedAccountsFlexbox = forwardRef<HTMLDivElement, ConnectedAccountsFlexboxProps>(\n ({ ignoreConnectDialog, onIgnoreConnectDialog, ...props }, ref) => {\n const theme = useTheme()\n\n const { totalConnectedAccounts, sortedWallets } = useDetectedWallets()\n\n return (\n <FlexCol alignItems=\"stretch\" justifyContent=\"start\" gap={2} ref={ref} {...props}>\n <FlexCol alignItems=\"start\">\n <Typography variant=\"h2\" sx={{ mb: 0.5 }}>\n Detected Web3 Wallets\n </Typography>\n {totalConnectedAccounts\n ? (\n <Typography variant=\"subtitle1\" color={theme.palette.secondary.main} sx={{ opacity: 0.5 }}>\n Total Connected Accounts:\n {' '}\n {totalConnectedAccounts}\n </Typography>\n )\n : null}\n </FlexCol>\n <ConnectedWalletsTable wallets={sortedWallets} ignoreConnectDialog={ignoreConnectDialog} onIgnoreConnectDialog={onIgnoreConnectDialog} />\n </FlexCol>\n )\n },\n)\n\nConnectedAccountsFlexbox.displayName = 'ConnectedAccountsFlexbox'\n","import { AccountsChangedEventName, DiscoveredWallets, EIP6963Connector, useWalletDiscovery } from '@xylabs/react-crypto'\nimport { useEffect, useMemo, useState } from 'react'\n\nconst sortWallets = (wallets: DiscoveredWallets) =>\n // eslint-disable-next-line unicorn/no-array-reduce\n Object.values(wallets).reduce((acc, wallet) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n wallet.allowedAccounts.length > 0 ? acc.unshift(wallet) : acc.push(wallet)\n return acc\n }, [] as EIP6963Connector[])\n\nexport const useDetectedWallets = () => {\n const wallets = useWalletDiscovery()\n const [refresh, setRefresh] = useState(0)\n const [sortedWallets, setSortedWallets] = useState<EIP6963Connector[]>([])\n\n useEffect(() => {\n setSortedWallets(sortWallets(wallets))\n }, [wallets, refresh])\n\n /**\n * Rely on custom events from the wallet base class to know when accounts are changed.\n * This approach prevents the need to loop through all wallets and set up individual listeners.\n */\n useEffect(() => {\n const listener: (event: CustomEventInit) => void = () => {\n setRefresh(refresh => refresh + 1)\n }\n window.addEventListener(AccountsChangedEventName, listener)\n\n return () => {\n window.removeEventListener(AccountsChangedEventName, listener)\n }\n }, [wallets])\n\n const totalConnectedAccounts = useMemo(\n () => Object.values(sortedWallets).reduce((acc, wallet) => acc + wallet.allowedAccounts.length, 0),\n [sortedWallets],\n )\n\n return { sortedWallets, totalConnectedAccounts }\n}\n","import { useWalletDiscovery } from '@xylabs/react-crypto'\nimport { useMemo, useSyncExternalStore } from 'react'\n\nimport { EnabledEthWalletConnections, EnabledEthWalletsState, EnabledWalletsSavedState } from '../classes/index.ts'\n\nlet enabledEthWallets: EnabledEthWalletConnections | undefined\n\n/**\n * Takes the discovered wallets and tracks their enabled state globally\n */\nexport const useEnabledWalletsInner = (enabledWalletsRdns?: EnabledWalletsSavedState) => {\n const discoveredWallets = useWalletDiscovery()\n\n // when we discover new wallets, build their enabled state\n const wallets = useMemo(() => {\n if (enabledEthWallets === undefined) enabledEthWallets = new EnabledEthWalletConnections()\n enabledEthWallets.resetWallets(discoveredWallets)\n for (const [rdns, enabled] of Object.entries(enabledWalletsRdns ?? {})) enabledEthWallets?.toggleEnabledWallet(rdns, enabled)\n return enabledEthWallets\n }, [discoveredWallets, enabledWalletsRdns])\n\n return useSyncExternalStore(wallets.subscribe.bind(wallets), () => wallets.wallets)\n}\n\n/**\n * Expose an interface for enabling and disabling wallets\n */\nexport const useEnabledWallets = (enabledWalletsRdns?: EnabledWalletsSavedState) => {\n const wallets = useEnabledWalletsInner(enabledWalletsRdns)\n const enabledWallets = useMemo(\n () =>\n // eslint-disable-next-line unicorn/no-array-reduce\n Object.entries(wallets).reduce((acc, [walletName, wallet]) => {\n if (wallet.enabled) acc[walletName] = wallet\n return acc\n }, {} as EnabledEthWalletsState),\n [wallets],\n )\n\n return {\n disableWallet: enabledEthWallets?.disableWallet.bind(enabledEthWallets),\n enableWallet: enabledEthWallets?.enableWallet.bind(enabledEthWallets),\n enabledWallets,\n wallets,\n }\n}\n","import { Checkbox, FormControl, FormControlProps, FormLabel } from '@mui/material'\nimport React from 'react'\n\nexport interface CheckboxFormControlProps extends FormControlProps {\n onCheckChanged?: (checked: boolean) => void\n}\n\nexport const CheckboxFormControl: React.FC<CheckboxFormControlProps> = ({ onCheckChanged, ...props }) => {\n return (\n <FormControl {...props}>\n <FormLabel>\n <Checkbox onChange={(_, checked) => onCheckChanged?.(checked)} />\n Do not show this again.\n </FormLabel>\n </FormControl>\n )\n}\n","import { Button, Dialog, DialogActions, DialogContent, DialogProps, DialogTitle } from '@mui/material'\nimport React from 'react'\n\nimport { ActiveProvider } from '../../lib/index.ts'\nimport { CheckboxFormControl } from './CheckboxFormControl.tsx'\nimport { LinkedProvidersFlexbox } from './LinkedProvidersFlexbox.tsx'\nimport { WalletPermissionsFlexbox } from './Permissions.tsx'\n\nexport interface ConnectWalletDialogProps extends DialogProps {\n activeProvider?: ActiveProvider\n onIgnoreConnectDialog?: (checked: boolean) => void\n}\n\nexport const ConnectWalletDialog: React.FC<ConnectWalletDialogProps> = ({ activeProvider, onIgnoreConnectDialog, ...props }) => {\n const { icon, providerName } = activeProvider ?? {}\n\n const onConnect = async () => {\n try {\n await activeProvider?.connectWallet?.()\n props.onClose?.({}, 'escapeKeyDown')\n } catch (e) {\n console.warn(`Error connecting to wallet: ${(e as Error).message}`)\n }\n }\n\n return (\n <Dialog PaperProps={{ sx: { display: 'flex', gap: 4 } }} {...props}>\n <DialogTitle sx={{ textAlign: 'center' }}>XYO Wants To Access The Blockchain on Your Behalf</DialogTitle>\n <DialogContent sx={{ display: 'flex', flexDirection: 'column', gap: 4 }}>\n <LinkedProvidersFlexbox icon={icon} providerName={providerName} />\n <WalletPermissionsFlexbox />\n <CheckboxFormControl onCheckChanged={onIgnoreConnectDialog} />\n </DialogContent>\n <DialogActions>\n <Button variant=\"outlined\" onClick={() => props.onClose?.({}, 'escapeKeyDown')}>\n Close\n </Button>\n <Button variant=\"contained\" onClick={onConnect}>\n Connect\n </Button>\n </DialogActions>\n </Dialog>\n )\n}\n","import { SyncAlt } from '@mui/icons-material'\nimport { Typography } from '@mui/material'\nimport { ConstrainedImage } from '@xylabs/react-crypto'\nimport { FlexBoxProps, FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nimport { xyoColorLogo } from '../../../../img/index.ts'\n\nexport interface LinkedProvidersFlexboxProps extends FlexBoxProps {\n icon?: string\n providerName?: string\n}\n\nexport const LinkedProvidersFlexbox: React.FC<LinkedProvidersFlexboxProps> = ({ icon, providerName, ...props }) => {\n return (\n <FlexRow gap={4} justifyContent=\"space-evenly\" {...props}>\n <FlexCol gap={0.5}>\n <img alt=\"XYO Logo\" src={xyoColorLogo} style={{ height: '48px' }} />\n <Typography variant=\"subtitle1\">XYO App</Typography>\n </FlexCol>\n <SyncAlt fontSize=\"large\" />\n <FlexCol gap={0.5}>\n <ConstrainedImage constrainedValue=\"48px\" src={icon} alt={providerName} style={{ height: '48px', maxWidth: '48px' }} />\n <Typography variant=\"subtitle1\">{providerName}</Typography>\n </FlexCol>\n </FlexRow>\n )\n}\n","import * as React from \"react\";\nconst SvgXyoColorLogo = props => <svg id=\"Layer_1\" data-name=\"Layer 1\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 256 238\" {...props}><defs><style>{\".cls-1{fill:#8d8fc6;}.cls-2{fill:#579fd6;}.cls-3{fill:#f27046;}.cls-4{fill:#eb407a;}\"}</style></defs><path className=\"cls-1\" d=\"M74.5,28.33,21.29,120.5,74.5,212.67H180.94l1.76-3,51.46-89.13L180.94,28.33ZM84.65,40.54h78.83L111.65,56.93a15.85,15.85,0,0,1,2,5l59.66-18.81L185.22,101a20.12,20.12,0,0,1,5.36-.78l-10-47.91,37.87,65.53h-7.62a24.21,24.21,0,0,1,.15,2.68,23.29,23.29,0,0,1-.15,2.68h7.62l-39.1,67.75,10.92-50.13A20.57,20.57,0,0,1,185,140l-12.88,59-58.37-19.53a17.61,17.61,0,0,1-1.7,5l47.5,15.92H84.65l4-6.85A20.17,20.17,0,0,1,83.93,191L80,197.78,42.67,133.13l37,32.66a20.52,20.52,0,0,1,3.6-4L36.69,120.66,85,77.79a17.45,17.45,0,0,1-3.19-4.32l-39.46,35L80,43.22l5.56,9.69A17.51,17.51,0,0,1,90.12,50Zm28.24,31.17a16.15,16.15,0,0,1-2.68,4.64l62,35.81a19.74,19.74,0,0,1,2.83-4.54Zm-20,10.51v75.33a18,18,0,0,1,2.47-.16,17.18,17.18,0,0,1,2.89.21v-75a11.21,11.21,0,0,1-1.29,0,17.57,17.57,0,0,1-4.07-.47Zm79.34,46.63-62.08,35.81a18.45,18.45,0,0,1,2.68,4.68l62.23-36a19.68,19.68,0,0,1-2.83-4.53Z\" /><path className=\"cls-2\" d=\"M97,48.58a17.06,17.06,0,1,0,17,17,17.08,17.08,0,0,0-17-17Zm0,5.36a11.7,11.7,0,1,1-11.7,11.69A11.65,11.65,0,0,1,97,53.94Z\" /><path className=\"cls-3\" d=\"M95.37,157.39a18.73,18.73,0,1,0,18.7,18.7,18.74,18.74,0,0,0-18.7-18.7Zm0,5.31A13.4,13.4,0,1,1,82,176.09a13.37,13.37,0,0,1,13.4-13.39Z\" /><path className=\"cls-4\" d=\"M190.73,100.2A20.3,20.3,0,1,0,211,120.5a20.34,20.34,0,0,0-20.3-20.3Zm0,5.36a14.94,14.94,0,1,1-14.94,14.94,14.88,14.88,0,0,1,14.94-14.94Z\" /></svg>;\nexport default SvgXyoColorLogo;","import { Link, Typography } from '@mui/material'\nimport { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nexport interface WalletPermissionsFlexBoxProps extends FlexBoxProps {}\n\nexport const WalletPermissionsFlexbox: React.FC<WalletPermissionsFlexBoxProps> = (props) => {\n return (\n <FlexCol gap={4} {...props}>\n <Typography fontWeight=\"bold\" sx={{ textAlign: 'center' }}>\n This will allow XYO to:\n </Typography>\n <ul>\n <li>View your wallet account(s) and address(es)</li>\n <li>Read-only access to browse the public blockchain(s) you select</li>\n </ul>\n <Typography variant=\"subtitle1\" sx={{ textAlign: 'center' }}>\n You control what accounts to share and what blockchains to view. You can see or revoke access via your wallet&apos;s settings at anytime. View\n more on XYO&apos;s sovereign data philosophy\n {' '}\n <Link\n href=\"https://cointelegraph.com/innovation-circle/decentralization-and-sovereignty-debunking-our-approach-to-digital-sovereignty\"\n sx={{ fontWeight: 'bold' }}\n target=\"_blank\"\n >\n here\n </Link>\n .\n </Typography>\n </FlexCol>\n )\n}\n","import { Button, Dialog, DialogActions, DialogContent, DialogProps, DialogTitle, Typography } from '@mui/material'\nimport { ConstrainedImage } from '@xylabs/react-crypto'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nimport { ActiveProvider } from '../../lib/index.ts'\n\nexport interface RevokeWalletConnectionDialogProps extends DialogProps {\n activeProvider?: ActiveProvider\n}\n\nexport const RevokeWalletConnectionDialog: React.FC<RevokeWalletConnectionDialogProps> = ({ activeProvider, ...props }) => {\n return (\n <Dialog {...props}>\n <FlexRow gap={2} justifyContent=\"start\" pl={2}>\n <ConstrainedImage src={activeProvider?.icon} constrainedValue=\"24px\" />\n <DialogTitle sx={{ pl: 0 }}>\n Revoke\n {activeProvider?.providerName}\n {' '}\n Access\n </DialogTitle>\n </FlexRow>\n <DialogContent>\n <Typography>\n Revoking access to your wallet must be done from the wallet&apos;s browser extension. Wallets grant access to specific domains please\n consult\n {' '}\n {activeProvider?.providerName}\n &apos;s documentation on how to revoke access to this website:\n </Typography>\n <Typography>{window.location.origin}</Typography>\n </DialogContent>\n <DialogActions>\n <Button variant=\"contained\" onClick={() => props.onClose?.({}, 'escapeKeyDown')}>\n Close\n </Button>\n </DialogActions>\n </Dialog>\n )\n}\n","import { TableCell, Tooltip, Typography } from '@mui/material'\nimport React from 'react'\n\nimport { ConnectedWalletTableCellProps } from './lib/index.ts'\n\nexport const ConnectedWalletsAccountsTableCell: React.FC<ConnectedWalletTableCellProps> = ({\n additionalAccounts,\n currentAccount,\n totalAccounts,\n tableCellProps,\n}) => {\n return (\n <TableCell {...tableCellProps}>\n <Tooltip\n sx={{ cursor: totalAccounts > 0 ? 'pointer' : 'auto' }}\n title={[...(currentAccount ?? []), ...(additionalAccounts ?? [])].map((address, index) => (\n <p key={index}>{address}</p>\n ))}\n >\n <Typography>{totalAccounts}</Typography>\n </Tooltip>\n </TableCell>\n )\n}\n","import { Check, InfoOutlined } from '@mui/icons-material'\nimport { Button, IconButton, TableCell, Typography } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nimport { ConnectedWalletTableCellProps } from './lib/index.ts'\n\nexport const ConnectedWalletsActionsTableCell: React.FC<ConnectedWalletTableCellProps> = ({ connected, onConnect, onRevoke, tableCellProps }) => {\n return (\n <TableCell {...tableCellProps}>\n <FlexRow gap={2} justifyContent=\"start\">\n {connected\n ? (\n <Typography sx={{ display: 'inline-flex', gap: 0.5 }}>\n <Check />\n Connected\n </Typography>\n )\n : (\n <Button variant=\"contained\" onClick={onConnect}>\n Connect\n </Button>\n )}\n {connected\n ? (\n <IconButton onClick={onRevoke}>\n <InfoOutlined />\n </IconButton>\n )\n : null}\n </FlexRow>\n </TableCell>\n )\n}\n","import { TableCell } from '@mui/material'\nimport React from 'react'\n\nimport { ConnectedWalletTableCellProps } from './lib/index.ts'\n\nexport const ConnectedWalletsChainNameTableCell: React.FC<ConnectedWalletTableCellProps> = ({ chainName, tableCellProps }) => {\n return <TableCell {...tableCellProps}>{chainName}</TableCell>\n}\n","import { Switch, TableCell } from '@mui/material'\nimport React, { ChangeEvent, useMemo } from 'react'\n\nimport { useEnabledWallets } from '../../../../hooks/index.ts'\nimport { ConnectedWalletTableCellProps } from './lib/index.ts'\n\nexport const ConnectedWalletState: React.FC<ConnectedWalletTableCellProps> = ({ connected, walletRdns, tableCellProps }) => {\n const { disableWallet, enableWallet, wallets } = useEnabledWallets()\n\n const enabled = useMemo(() => (walletRdns ? wallets[walletRdns].enabled : false), [wallets, walletRdns])\n\n const handleClick = (event: ChangeEvent<HTMLInputElement>) => {\n const checked = event.target?.checked\n if (walletRdns) {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n checked ? enableWallet?.(walletRdns) : disableWallet?.(walletRdns)\n }\n }\n return (\n <TableCell {...tableCellProps}>\n <Switch disabled={!connected} checked={connected && enabled} onChange={handleClick} />\n </TableCell>\n )\n}\n","import { TableCell, useTheme } from '@mui/material'\nimport { ConstrainedImage } from '@xylabs/react-crypto'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nimport { ConnectedWalletTableCellProps } from './lib/index.ts'\n\nexport const ConnectedWalletsWalletTableCell: React.FC<ConnectedWalletTableCellProps> = ({ icon, walletName, tableCellProps }) => {\n const theme = useTheme()\n\n return (\n <TableCell {...tableCellProps}>\n <FlexRow gap={2} justifyContent=\"start\">\n <ConstrainedImage constrainedValue={theme.spacing(4)} src={icon} />\n {walletName}\n </FlexRow>\n </TableCell>\n )\n}\n","import { ComponentType } from 'react'\n\nimport { ConnectedWalletsAccountsTableCell } from './Accounts.tsx'\nimport { ConnectedWalletsActionsTableCell } from './Actions.tsx'\nimport { ConnectedWalletsChainNameTableCell } from './ChainName.tsx'\nimport { ConnectedWalletTableCellProps } from './lib/index.ts'\nimport { ConnectedWalletState } from './State.tsx'\nimport { ConnectedWalletsWalletTableCell } from './Wallet.tsx'\n\nexport const ConnectedWalletTableCells: ComponentType<ConnectedWalletTableCellProps>[] = [\n ConnectedWalletsWalletTableCell,\n ConnectedWalletsChainNameTableCell,\n ConnectedWalletsAccountsTableCell,\n ConnectedWalletsActionsTableCell,\n ConnectedWalletState,\n]\n","import { Table, TableBody, TableCell, TableHead, TableProps, TableRow } from '@mui/material'\nimport { EIP6963Connector } from '@xylabs/react-crypto'\nimport React, { useState } from 'react'\n\nimport { ConnectWalletDialog, RevokeWalletConnectionDialog } from '../dialogs/index.ts'\nimport { ActiveProvider, WalletsTableHeadCells } from '../lib/index.ts'\nimport { WalletConnectionsTableRow } from './ConnectedWalletsTableRow.tsx'\nimport { useActiveProviderDialogState } from './hooks/index.ts'\n\nexport interface ConnectedWalletsTableProps extends TableProps {\n ignoreConnectDialog?: boolean\n onIgnoreConnectDialog?: (checked: boolean) => void\n wallets?: EIP6963Connector[]\n}\n\nexport const ConnectedWalletsTable: React.FC<ConnectedWalletsTableProps> = ({ ignoreConnectDialog, onIgnoreConnectDialog, wallets, ...props }) => {\n const [activeProvider, setActiveProvider] = useState<ActiveProvider>()\n const [showConnect, onSetActiveProviderConnect, onConnectClose] = useActiveProviderDialogState(setActiveProvider)\n const [showRevoke, onSetActiveProviderRevoke, onRevokeClose] = useActiveProviderDialogState(setActiveProvider)\n\n return (\n <>\n <Table {...props}>\n <TableHead>\n <TableRow>\n {WalletsTableHeadCells.map(({ disablePadding, id, label, align, width }) => (\n <TableCell align={align} key={id} padding={disablePadding ? 'none' : 'normal'} width={width ?? 'auto'}>\n {label}\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {(wallets ?? []).map(wallet => (\n <WalletConnectionsTableRow\n ignoreConnectDialog={ignoreConnectDialog}\n key={wallet.providerInfo?.rdns}\n onConnectClick={onSetActiveProviderConnect}\n onRevoke={onSetActiveProviderRevoke}\n wallet={wallet}\n />\n ))}\n </TableBody>\n </Table>\n <RevokeWalletConnectionDialog open={showRevoke} onClose={onRevokeClose} activeProvider={activeProvider} />\n <ConnectWalletDialog\n activeProvider={activeProvider}\n onClose={onConnectClose}\n open={showConnect}\n onIgnoreConnectDialog={onIgnoreConnectDialog}\n />\n </>\n )\n}\n","import { TableHeadCell } from '@xyo-network/react-table'\n\nexport const WalletsTableHeadCells: TableHeadCell[] = [\n {\n disablePadding: false,\n id: 'wallet',\n label: 'Wallet',\n numeric: false,\n showOnMobile: true,\n },\n {\n disablePadding: false,\n id: 'chain',\n label: 'Chain',\n numeric: false,\n showOnMobile: true,\n },\n {\n disablePadding: false,\n id: 'accounts',\n label: 'Accounts',\n numeric: true,\n showOnMobile: true,\n },\n {\n disablePadding: false,\n id: 'actions',\n label: 'Actions',\n numeric: false,\n showOnMobile: true,\n },\n {\n disablePadding: false,\n id: 'enabled',\n label: 'Enabled',\n numeric: false,\n showOnMobile: true,\n },\n]\n","import { TableRow, TableRowProps } from '@mui/material'\nimport { EthWalletConnectorBase, useEthWallet } from '@xylabs/react-crypto'\nimport React, { useCallback, useMemo } from 'react'\n\nimport { ActiveProvider } from '../lib/index.ts'\nimport { ConnectedWalletTableCells } from './cells/index.ts'\n\nexport interface WalletConnectionsTableRowProps extends TableRowProps {\n ignoreConnectDialog?: boolean\n onConnectClick?: (activeProvider: ActiveProvider) => void\n onRevoke?: (activeProvider: ActiveProvider) => void\n wallet: EthWalletConnectorBase\n}\n\nexport const WalletConnectionsTableRow: React.FC<WalletConnectionsTableRowProps> = ({\n ignoreConnectDialog,\n onConnectClick,\n onRevoke,\n wallet,\n ...props\n}) => {\n const { currentAccount: currentAccountFromWallet, additionalAccounts, chainName, connectWallet, providerInfo } = useEthWallet(wallet)\n\n const currentAccount = currentAccountFromWallet?.toString() ? [currentAccountFromWallet.toString()] : []\n const totalAccounts = (additionalAccounts?.length ?? 0) + (currentAccount?.length ?? 0)\n const connected = !!(currentAccount?.length ?? 0 > 0)\n const { icon, name, rdns } = useMemo(() => providerInfo ?? { icon: undefined, name: undefined, rdns: undefined }, [providerInfo])\n\n const activeProvider = useMemo<ActiveProvider>(\n () => ({\n connectWallet,\n icon,\n providerName: name,\n }),\n [connectWallet, icon, name],\n )\n\n const onRevokeLocal = useCallback(() => {\n onRevoke?.(activeProvider)\n }, [activeProvider, onRevoke])\n\n const onConnectLocal = useCallback(async () => {\n if (ignoreConnectDialog) {\n await connectWallet?.()\n } else {\n onConnectClick?.(activeProvider)\n }\n }, [activeProvider, connectWallet, ignoreConnectDialog, onConnectClick])\n\n return (\n <TableRow {...props}>\n {Object.values(ConnectedWalletTableCells).map((Cell, index) => (\n <Cell\n key={index}\n additionalAccounts={additionalAccounts}\n chainName={chainName}\n connected={connected}\n currentAccount={currentAccount}\n icon={icon}\n onConnect={onConnectLocal}\n onRevoke={onRevokeLocal}\n totalAccounts={totalAccounts}\n walletName={name}\n walletRdns={rdns}\n />\n ))}\n </TableRow>\n )\n}\n","import { Dispatch, SetStateAction, useState } from 'react'\n\nimport { ActiveProvider } from '../../lib/index.ts'\n\nexport const useActiveProviderDialogState = (\n setActiveProvider: Dispatch<SetStateAction<ActiveProvider | undefined>>,\n): [boolean, (activeProvider: ActiveProvider) => void, () => void] => {\n const [show, setShow] = useState(false)\n const onSetActiveProvider = (activeProvider: ActiveProvider) => {\n setShow(true)\n setActiveProvider(activeProvider)\n }\n\n const onClose = () => {\n setShow(false)\n setActiveProvider({})\n }\n\n return [show, onSetActiveProvider, onClose]\n}\n"],"mappings":";;;;AAEA,IAAMA,4BAA4B;AAqB3B,IAAMC,8BAAN,MAAMA;EArBb,OAqBaA;;;;EAEXC,qBAAqB;;EAGbC,iBAA2C,CAAC;;EAG5CC,kBAA0C,CAAC;;EAG3CC,YAA8B,CAAA;;EAG9BC,kBAAkBN;EAE1BO,YAAYD,kBAAkBN,2BAA2B;AACvD,SAAKM,kBAAkBA;AACvB,SAAKE,eAAc;EACrB;EAEA,IAAIC,UAAU;AACZ,WAAO,KAAKL;EACd;EAEAM,cAAcC,MAAc;AAC1B,SAAKC,oBAAoBD,MAAM,KAAA;EACjC;EAEAE,aAAaF,MAAc;AACzB,SAAKC,oBAAoBD,MAAM,IAAA;EACjC;;;;EAKAG,aAAaL,SAA4B;AACvC,UAAMM,aAAqC,CAAC;AAE5C,UAAMC,YAAY,wBAAC,CAACC,YAAYC,MAAAA,MAAmC;AACjEH,iBAAWE,UAAAA,IAAc;;QAEvBE,SAASF,cAAc,KAAKd,iBAAiB,KAAKA,eAAec,UAAAA,IAAc;QAC/EC;MACF;IACF,GANkB;AASlBE,WAAOC,QAAQZ,O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M,SAAS;IAAI;KAAG,6BAExF,KACAhB,sBAAAA,IAGL,IAAA,GAEN,gBAAAG,QAAA,cAACc,uBAAAA;IAAsBC,SAASjB;IAAeP;IAA0CC;;AAG/F,CAAA;AAGFH,yBAAyB2B,cAAc;","names":["DEFAULT_LOCAL_STORAGE_KEY","EnabledEthWalletConnections","persistPreferences","enabledWallets","ethWalletsState","listeners","localStorageKey","constructor","reviveSettings","wallets","disableWallet","rdns","toggleEnabledWallet","enableWallet","resetWallets","newWallets","addWallet","walletName","wallet","enabled","Object","entries","forEach","bind","emitChange","subscribe","listener","filter","existingListener","persistSettings","isPersistance","method","reduce","acc","localStorage","setItem","JSON","stringify","existingEntries","getItem","parse","e","console","warn","message","Typography","useTheme","FlexCol","React","forwardRef","AccountsChangedEventName","useWalletDiscovery","useEffect","useMemo","useState","sortWallets","wallets","Object","values","reduce","acc","wallet","allowedAccounts","length","unshift","push","useDetectedWallets","useWalletDiscovery","refresh","setRefresh","useState","sortedWallets","setSortedWallets","useEffect","listener","window","addEventListener","AccountsChangedEventName","removeEventListener","totalConnectedAccounts","useMemo","useWalletDiscovery","useMemo","useSyncExternalStore","enabledEthWallets","useEnabledWalletsInner","enabledWalletsRdns","discoveredWallets","useWalletDiscovery","wallets","useMemo","undefined","EnabledEthWalletConnections","resetWallets","rdns","enabled","Object","entries","toggleEnabledWallet","useSyncExternalStore","subscribe","bind","useEnabledWallets","enabledWallets","reduce","acc","walletName","wallet","disableWallet","enableWallet","Checkbox","FormControl","FormLabel","React","CheckboxFormControl","onCheckChanged","props","FormControl","FormLabel","Checkbox","onChange","_","checked","Button","Dialog","DialogActions","DialogContent","DialogTitle","React","SyncAlt","Typography","ConstrainedImage","FlexCol","FlexRow","React","React","LinkedProvidersFlexbox","icon","providerName","props","React","FlexRow","gap","justifyContent","FlexCol","img","alt","src","xyoColorLogo","style","height","Typography","variant","SyncAlt","fontSize","ConstrainedImage","constrainedValue","maxWidth","Link","Typography","FlexCol","React","WalletPermissionsFlexbox","props","React","FlexCol","gap","Typography","fontWeight","sx","textAlign","ul","li","variant","Link","href","target","ConnectWalletDialog","activeProvider","onIgnoreConnectDialog","props","icon","providerName","onConnect","connectWallet","onClose","e","console","warn","message","React","Dialog","PaperProps","sx","display","gap","DialogTitle","textAlign","DialogContent","flexDirection","LinkedProvidersFlexbox","WalletPermissionsFlexbox","CheckboxFormControl","onCheckChanged","DialogActions","Button","variant","onClick","Button","Dialog","DialogActions","DialogContent","DialogTitle","Typography","ConstrainedImage","FlexRow","React","RevokeWalletConnectionDialog","activeProvider","props","React","Dialog","FlexRow","gap","justifyContent","pl","ConstrainedImage","src","icon","constrainedValue","DialogTitle","sx","providerName","DialogContent","Typography","window","location","origin","DialogActions","Button","variant","onClick","onClose","TableCell","Tooltip","Typography","React","ConnectedWalletsAccountsTableCell","additionalAccounts","currentAccount","totalAccounts","tableCellProps","React","TableCell","Tooltip","sx","cursor","title","map","address","index","p","key","Typography","Check","InfoOutlined","Button","IconButton","TableCell","Typography","FlexRow","React","ConnectedWalletsActionsTableCell","connected","onConnect","onRevoke","tableCellProps","React","TableCell","FlexRow","gap","justifyContent","Typography","sx","display","Check","Button","variant","onClick","IconButton","InfoOutlined","TableCell","React","ConnectedWalletsChainNameTableCell","chainName","tableCellProps","React","TableCell","Switch","TableCell","React","useMemo","ConnectedWalletState","connected","walletRdns","tableCellProps","disableWallet","enableWallet","wallets","useEnabledWallets","enabled","useMemo","handleClick","event","checked","target","React","TableCell","Switch","disabled","onChange","TableCell","useTheme","ConstrainedImage","FlexRow","React","ConnectedWalletsWalletTableCell","icon","walletName","tableCellProps","theme","useTheme","React","TableCell","FlexRow","gap","justifyContent","ConstrainedImage","constrainedValue","spacing","src","ConnectedWalletTableCells","ConnectedWalletsWalletTableCell","ConnectedWalletsChainNameTableCell","ConnectedWalletsAccountsTableCell","ConnectedWalletsActionsTableCell","ConnectedWalletState","Table","TableBody","TableCell","TableHead","TableRow","React","useState","WalletsTableHeadCells","disablePadding","id","label","numeric","showOnMobile","TableRow","useEthWallet","React","useCallback","useMemo","WalletConnectionsTableRow","ignoreConnectDialog","onConnectClick","onRevoke","wallet","props","currentAccount","currentAccountFromWallet","additionalAccounts","chainName","connectWallet","providerInfo","useEthWallet","toString","totalAccounts","length","connected","icon","name","rdns","useMemo","undefined","activeProvider","providerName","onRevokeLocal","useCallback","onConnectLocal","React","TableRow","Object","values","ConnectedWalletTableCells","map","Cell","index","key","onConnect","walletName","walletRdns","useState","useActiveProviderDialogState","setActiveProvider","show","setShow","useState","onSetActiveProvider","activeProvider","onClose","ConnectedWalletsTable","ignoreConnectDialog","onIgnoreConnectDialog","wallets","props","activeProvider","setActiveProvider","useState","showConnect","onSetActiveProviderConnect","onConnectClose","useActiveProviderDialogState","showRevoke","onSetActiveProviderRevoke","onRevokeClose","React","Table","TableHead","TableRow","WalletsTableHeadCells","map","disablePadding","id","label","align","width","TableCell","key","padding","TableBody","wallet","WalletConnectionsTableRow","providerInfo","rdns","onConnectClick","onRevoke","RevokeWalletConnectionDialog","open","onClose","ConnectWalletDialog","ConnectedAccountsFlexbox","forwardRef","ignoreConnectDialog","onIgnoreConnectDialog","props","ref","theme","useTheme","totalConnectedAccounts","sortedWallets","useDetectedWallets","React","FlexCol","alignItems","justifyContent","gap","Typography","variant","sx","mb","color","palette","secondary","main","opacity","ConnectedWalletsTable","wallets","displayName"]}
1
+ {"version":3,"sources":["../../src/classes/EnabledWallets.ts","../../src/components/ConnectedAccountsFlexbox.tsx","../../src/hooks/useDetectWallets.tsx","../../src/hooks/useEnabledWallets.tsx","../../src/components/wallet/dialogs/connect/CheckboxFormControl.tsx","../../src/components/wallet/dialogs/connect/Dialog.tsx","../../src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx","../../src/img/index.ts","../../src/components/wallet/dialogs/connect/Permissions.tsx","../../src/components/wallet/dialogs/revoke/Dialog.tsx","../../src/components/wallet/table/cells/Accounts.tsx","../../src/components/wallet/table/cells/Actions.tsx","../../src/components/wallet/table/cells/ChainName.tsx","../../src/components/wallet/table/cells/State.tsx","../../src/components/wallet/table/cells/Wallet.tsx","../../src/components/wallet/table/cells/Cells.tsx","../../src/components/wallet/table/ConnectedWalletsTable.tsx","../../src/components/wallet/lib/TableHeadData.ts","../../src/components/wallet/table/ConnectedWalletsTableRow.tsx","../../src/components/wallet/table/hooks/useActiveProviderDialogState.tsx"],"sourcesContent":["import { DiscoveredWallets, EIP6963Connector } from '@xylabs/react-crypto'\n\nconst DEFAULT_LOCAL_STORAGE_KEY = 'XYO|EnabledWallets'\n\n/**\n * State for storing wallets and their enabled/disabled status by name\n */\nexport interface EnabledEthWalletsState {\n [rdns: string]: {\n enabled: boolean\n wallet: EIP6963Connector\n }\n}\n\n/**\n * State for storing only enabled/disabled status of a wallet by name\n */\nexport interface EnabledWalletsSavedState {\n [rdns: string]: boolean\n}\n\nexport type WalletListener = () => void\n\nexport class EnabledEthWalletConnections {\n // control whether or not enabled/disabled preferences are persisted (i.e. in localStorage)\n persistPreferences = true\n\n // Map of wallet names and their enabled/disabled state\n private enabledWallets: EnabledWalletsSavedState = {}\n\n // Map of wallet names, their enabled/disabled state, and their wallet class\n private ethWalletsState: EnabledEthWalletsState = {}\n\n // list of listeners that want to be notified on wallet changes\n private listeners: WalletListener[] = []\n\n // key to use in localStorage when persisting preferences\n private localStorageKey = DEFAULT_LOCAL_STORAGE_KEY\n\n constructor(localStorageKey = DEFAULT_LOCAL_STORAGE_KEY) {\n this.localStorageKey = localStorageKey\n this.reviveSettings()\n }\n\n get wallets() {\n return this.ethWalletsState\n }\n\n disableWallet(rdns: string) {\n this.toggleEnabledWallet(rdns, false)\n }\n\n enableWallet(rdns: string) {\n this.toggleEnabledWallet(rdns, true)\n }\n\n /**\n * Given a new set of wallets, set their enabled state based off previous preferences\n */\n resetWallets(wallets: DiscoveredWallets) {\n const newWallets: EnabledEthWalletsState = {}\n\n const addWallet = ([walletName, wallet]: [string, EIP6963Connector]) => {\n newWallets[walletName] = {\n // preserve the existing enabled state\n enabled: walletName in this.enabledWallets ? this.enabledWallets[walletName] : true,\n wallet,\n }\n }\n\n // eslint-disable-next-line unicorn/no-array-for-each\n Object.entries(wallets).forEach(addWallet.bind(this))\n this.ethWalletsState = newWallets\n this.emitChange()\n }\n\n subscribe(listener: WalletListener) {\n this.listeners = [...this.listeners, listener]\n return () => {\n this.listeners = this.listeners.filter(existingListener => existingListener !== listener)\n }\n }\n\n toggleEnabledWallet(rdns: string, enabled: boolean) {\n if (rdns && this.ethWalletsState[rdns]) {\n this.ethWalletsState[rdns].enabled = enabled\n this.ethWalletsState = { ...this.ethWalletsState }\n this.emitChange()\n }\n }\n\n private emitChange() {\n for (const listener of this.listeners) {\n listener()\n }\n\n this.persistSettings()\n }\n\n private isPersistance(method: () => void) {\n if (this.persistPreferences) {\n method()\n }\n }\n\n private persistSettings() {\n this.isPersistance(() => {\n // convert wallet enabled selections into serializable state\n // eslint-disable-next-line unicorn/no-array-reduce\n const enabledWallets = Object.entries(this.ethWalletsState).reduce((acc, [rdns, { enabled }]) => {\n acc[rdns] = enabled\n return acc\n }, {} as EnabledWalletsSavedState)\n\n localStorage.setItem(this.localStorageKey, JSON.stringify(enabledWallets))\n })\n }\n\n private reviveSettings() {\n this.isPersistance(() => {\n const existingEntries = localStorage.getItem(this.localStorageKey)\n try {\n const entries = existingEntries ? JSON.parse(existingEntries) : {}\n this.enabledWallets = entries\n } catch (e) {\n console.warn(`Error parsing saved enabled wallet entries: ${(e as Error).message}`)\n }\n })\n }\n}\n","import { Typography, useTheme } from '@mui/material'\nimport { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\nimport React, { forwardRef } from 'react'\n\nimport { useDetectedWallets } from '../hooks/index.ts'\nimport { ConnectedWalletsTable } from './wallet/index.ts'\n\nexport interface ConnectedAccountsFlexboxProps extends FlexBoxProps {\n ignoreConnectDialog?: boolean\n // A callback that is invoked when the option to ignore the dialog is checked\n onIgnoreConnectDialog?: (checked: boolean) => void\n}\n\nexport const ConnectedAccountsFlexbox = forwardRef<HTMLDivElement, ConnectedAccountsFlexboxProps>(\n ({ ignoreConnectDialog, onIgnoreConnectDialog, ...props }, ref) => {\n const theme = useTheme()\n\n const { totalConnectedAccounts, sortedWallets } = useDetectedWallets()\n\n return (\n <FlexCol alignItems=\"stretch\" justifyContent=\"start\" gap={2} ref={ref} {...props}>\n <FlexCol alignItems=\"start\">\n <Typography variant=\"h2\" sx={{ mb: 0.5 }}>\n Detected Web3 Wallets\n </Typography>\n {totalConnectedAccounts\n ? (\n <Typography variant=\"subtitle1\" color={theme.palette.secondary.main} sx={{ opacity: 0.5 }}>\n Total Connected Accounts:\n {' '}\n {totalConnectedAccounts}\n </Typography>\n )\n : null}\n </FlexCol>\n <ConnectedWalletsTable wallets={sortedWallets} ignoreConnectDialog={ignoreConnectDialog} onIgnoreConnectDialog={onIgnoreConnectDialog} />\n </FlexCol>\n )\n },\n)\n\nConnectedAccountsFlexbox.displayName = 'ConnectedAccountsFlexbox'\n","import { AccountsChangedEventName, DiscoveredWallets, EIP6963Connector, useWalletDiscovery } from '@xylabs/react-crypto'\nimport { useEffect, useMemo, useState } from 'react'\n\nconst sortWallets = (wallets: DiscoveredWallets) =>\n // eslint-disable-next-line unicorn/no-array-reduce\n Object.values(wallets).reduce((acc, wallet) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n wallet.allowedAccounts.length > 0 ? acc.unshift(wallet) : acc.push(wallet)\n return acc\n }, [] as EIP6963Connector[])\n\nexport const useDetectedWallets = () => {\n const wallets = useWalletDiscovery()\n const [refresh, setRefresh] = useState(0)\n const [sortedWallets, setSortedWallets] = useState<EIP6963Connector[]>([])\n\n useEffect(() => {\n setSortedWallets(sortWallets(wallets))\n }, [wallets, refresh])\n\n /**\n * Rely on custom events from the wallet base class to know when accounts are changed.\n * This approach prevents the need to loop through all wallets and set up individual listeners.\n */\n useEffect(() => {\n const listener: (event: CustomEventInit) => void = () => {\n setRefresh(refresh => refresh + 1)\n }\n window.addEventListener(AccountsChangedEventName, listener)\n\n return () => {\n window.removeEventListener(AccountsChangedEventName, listener)\n }\n }, [wallets])\n\n const totalConnectedAccounts = useMemo(\n () => Object.values(sortedWallets).reduce((acc, wallet) => acc + wallet.allowedAccounts.length, 0),\n [sortedWallets],\n )\n\n return { sortedWallets, totalConnectedAccounts }\n}\n","import { useWalletDiscovery } from '@xylabs/react-crypto'\nimport { useMemo, useSyncExternalStore } from 'react'\n\nimport { EnabledEthWalletConnections, EnabledEthWalletsState, EnabledWalletsSavedState } from '../classes/index.ts'\n\nlet enabledEthWallets: EnabledEthWalletConnections | undefined\n\n/**\n * Takes the discovered wallets and tracks their enabled state globally\n */\nexport const useEnabledWalletsInner = (enabledWalletsRdns?: EnabledWalletsSavedState) => {\n const discoveredWallets = useWalletDiscovery()\n\n // when we discover new wallets, build their enabled state\n const wallets = useMemo(() => {\n if (enabledEthWallets === undefined) enabledEthWallets = new EnabledEthWalletConnections()\n enabledEthWallets.resetWallets(discoveredWallets)\n for (const [rdns, enabled] of Object.entries(enabledWalletsRdns ?? {})) enabledEthWallets?.toggleEnabledWallet(rdns, enabled)\n return enabledEthWallets\n }, [discoveredWallets, enabledWalletsRdns])\n\n return useSyncExternalStore(wallets.subscribe.bind(wallets), () => wallets.wallets)\n}\n\n/**\n * Expose an interface for enabling and disabling wallets\n */\nexport const useEnabledWallets = (enabledWalletsRdns?: EnabledWalletsSavedState) => {\n const wallets = useEnabledWalletsInner(enabledWalletsRdns)\n const enabledWallets = useMemo(\n () =>\n // eslint-disable-next-line unicorn/no-array-reduce\n Object.entries(wallets).reduce((acc, [walletName, wallet]) => {\n if (wallet.enabled) acc[walletName] = wallet\n return acc\n }, {} as EnabledEthWalletsState),\n [wallets],\n )\n\n return {\n disableWallet: enabledEthWallets?.disableWallet.bind(enabledEthWallets),\n enableWallet: enabledEthWallets?.enableWallet.bind(enabledEthWallets),\n enabledWallets,\n wallets,\n }\n}\n","import { Checkbox, FormControl, FormControlProps, FormLabel } from '@mui/material'\nimport React from 'react'\n\nexport interface CheckboxFormControlProps extends FormControlProps {\n onCheckChanged?: (checked: boolean) => void\n}\n\nexport const CheckboxFormControl: React.FC<CheckboxFormControlProps> = ({ onCheckChanged, ...props }) => {\n return (\n <FormControl {...props}>\n <FormLabel>\n <Checkbox onChange={(_, checked) => onCheckChanged?.(checked)} />\n Do not show this again.\n </FormLabel>\n </FormControl>\n )\n}\n","import { Button, Dialog, DialogActions, DialogContent, DialogProps, DialogTitle } from '@mui/material'\nimport React from 'react'\n\nimport { ActiveProvider } from '../../lib/index.ts'\nimport { CheckboxFormControl } from './CheckboxFormControl.tsx'\nimport { LinkedProvidersFlexbox } from './LinkedProvidersFlexbox.tsx'\nimport { WalletPermissionsFlexbox } from './Permissions.tsx'\n\nexport interface ConnectWalletDialogProps extends DialogProps {\n activeProvider?: ActiveProvider\n onIgnoreConnectDialog?: (checked: boolean) => void\n}\n\nexport const ConnectWalletDialog: React.FC<ConnectWalletDialogProps> = ({ activeProvider, onIgnoreConnectDialog, ...props }) => {\n const { icon, providerName } = activeProvider ?? {}\n\n const onConnect = async () => {\n try {\n await activeProvider?.connectWallet?.()\n props.onClose?.({}, 'escapeKeyDown')\n } catch (e) {\n console.warn(`Error connecting to wallet: ${(e as Error).message}`)\n }\n }\n\n return (\n <Dialog PaperProps={{ sx: { display: 'flex', gap: 4 } }} {...props}>\n <DialogTitle sx={{ textAlign: 'center' }}>XYO Wants To Access The Blockchain on Your Behalf</DialogTitle>\n <DialogContent sx={{ display: 'flex', flexDirection: 'column', gap: 4 }}>\n <LinkedProvidersFlexbox icon={icon} providerName={providerName} />\n <WalletPermissionsFlexbox />\n <CheckboxFormControl onCheckChanged={onIgnoreConnectDialog} />\n </DialogContent>\n <DialogActions>\n <Button variant=\"outlined\" onClick={() => props.onClose?.({}, 'escapeKeyDown')}>\n Close\n </Button>\n <Button variant=\"contained\" onClick={onConnect}>\n Connect\n </Button>\n </DialogActions>\n </Dialog>\n )\n}\n","import { SyncAlt } from '@mui/icons-material'\nimport { Typography } from '@mui/material'\nimport { ConstrainedImage } from '@xylabs/react-crypto'\nimport { FlexBoxProps, FlexCol, FlexRow } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nimport { xyoColorLogo } from '../../../../img/index.ts'\n\nexport interface LinkedProvidersFlexboxProps extends FlexBoxProps {\n icon?: string\n providerName?: string\n}\n\nexport const LinkedProvidersFlexbox: React.FC<LinkedProvidersFlexboxProps> = ({ icon, providerName, ...props }) => {\n return (\n <FlexRow gap={4} justifyContent=\"space-evenly\" {...props}>\n <FlexCol gap={0.5}>\n <img alt=\"XYO Logo\" src={xyoColorLogo} style={{ height: '48px' }} />\n <Typography variant=\"subtitle1\">XYO App</Typography>\n </FlexCol>\n <SyncAlt fontSize=\"large\" />\n <FlexCol gap={0.5}>\n <ConstrainedImage constrainedValue=\"48px\" src={icon} alt={providerName} style={{ height: '48px', maxWidth: '48px' }} />\n <Typography variant=\"subtitle1\">{providerName}</Typography>\n </FlexCol>\n </FlexRow>\n )\n}\n","export { default as xyoColorLogo } from './xyo-color-logo.svg'\nexport { default as xyoColorLogoText } from './xyo-color-logo-text-only.svg'\n","import { Link, Typography } from '@mui/material'\nimport { FlexBoxProps, FlexCol } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nexport interface WalletPermissionsFlexBoxProps extends FlexBoxProps {}\n\nexport const WalletPermissionsFlexbox: React.FC<WalletPermissionsFlexBoxProps> = (props) => {\n return (\n <FlexCol gap={4} {...props}>\n <Typography fontWeight=\"bold\" sx={{ textAlign: 'center' }}>\n This will allow XYO to:\n </Typography>\n <ul>\n <li>View your wallet account(s) and address(es)</li>\n <li>Read-only access to browse the public blockchain(s) you select</li>\n </ul>\n <Typography variant=\"subtitle1\" sx={{ textAlign: 'center' }}>\n You control what accounts to share and what blockchains to view. You can see or revoke access via your wallet&apos;s settings at anytime. View\n more on XYO&apos;s sovereign data philosophy\n {' '}\n <Link\n href=\"https://cointelegraph.com/innovation-circle/decentralization-and-sovereignty-debunking-our-approach-to-digital-sovereignty\"\n sx={{ fontWeight: 'bold' }}\n target=\"_blank\"\n >\n here\n </Link>\n .\n </Typography>\n </FlexCol>\n )\n}\n","import { Button, Dialog, DialogActions, DialogContent, DialogProps, DialogTitle, Typography } from '@mui/material'\nimport { ConstrainedImage } from '@xylabs/react-crypto'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nimport { ActiveProvider } from '../../lib/index.ts'\n\nexport interface RevokeWalletConnectionDialogProps extends DialogProps {\n activeProvider?: ActiveProvider\n}\n\nexport const RevokeWalletConnectionDialog: React.FC<RevokeWalletConnectionDialogProps> = ({ activeProvider, ...props }) => {\n return (\n <Dialog {...props}>\n <FlexRow gap={2} justifyContent=\"start\" pl={2}>\n <ConstrainedImage src={activeProvider?.icon} constrainedValue=\"24px\" />\n <DialogTitle sx={{ pl: 0 }}>\n Revoke\n {activeProvider?.providerName}\n {' '}\n Access\n </DialogTitle>\n </FlexRow>\n <DialogContent>\n <Typography>\n Revoking access to your wallet must be done from the wallet&apos;s browser extension. Wallets grant access to specific domains please\n consult\n {' '}\n {activeProvider?.providerName}\n &apos;s documentation on how to revoke access to this website:\n </Typography>\n <Typography>{window.location.origin}</Typography>\n </DialogContent>\n <DialogActions>\n <Button variant=\"contained\" onClick={() => props.onClose?.({}, 'escapeKeyDown')}>\n Close\n </Button>\n </DialogActions>\n </Dialog>\n )\n}\n","import { TableCell, Tooltip, Typography } from '@mui/material'\nimport React from 'react'\n\nimport { ConnectedWalletTableCellProps } from './lib/index.ts'\n\nexport const ConnectedWalletsAccountsTableCell: React.FC<ConnectedWalletTableCellProps> = ({\n additionalAccounts,\n currentAccount,\n totalAccounts,\n tableCellProps,\n}) => {\n return (\n <TableCell {...tableCellProps}>\n <Tooltip\n sx={{ cursor: totalAccounts > 0 ? 'pointer' : 'auto' }}\n title={[...(currentAccount ?? []), ...(additionalAccounts ?? [])].map((address, index) => (\n <p key={index}>{address}</p>\n ))}\n >\n <Typography>{totalAccounts}</Typography>\n </Tooltip>\n </TableCell>\n )\n}\n","import { Check, InfoOutlined } from '@mui/icons-material'\nimport { Button, IconButton, TableCell, Typography } from '@mui/material'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nimport { ConnectedWalletTableCellProps } from './lib/index.ts'\n\nexport const ConnectedWalletsActionsTableCell: React.FC<ConnectedWalletTableCellProps> = ({ connected, onConnect, onRevoke, tableCellProps }) => {\n return (\n <TableCell {...tableCellProps}>\n <FlexRow gap={2} justifyContent=\"start\">\n {connected\n ? (\n <Typography sx={{ display: 'inline-flex', gap: 0.5 }}>\n <Check />\n Connected\n </Typography>\n )\n : (\n <Button variant=\"contained\" onClick={onConnect}>\n Connect\n </Button>\n )}\n {connected\n ? (\n <IconButton onClick={onRevoke}>\n <InfoOutlined />\n </IconButton>\n )\n : null}\n </FlexRow>\n </TableCell>\n )\n}\n","import { TableCell } from '@mui/material'\nimport React from 'react'\n\nimport { ConnectedWalletTableCellProps } from './lib/index.ts'\n\nexport const ConnectedWalletsChainNameTableCell: React.FC<ConnectedWalletTableCellProps> = ({ chainName, tableCellProps }) => {\n return <TableCell {...tableCellProps}>{chainName}</TableCell>\n}\n","import { Switch, TableCell } from '@mui/material'\nimport React, { ChangeEvent, useMemo } from 'react'\n\nimport { useEnabledWallets } from '../../../../hooks/index.ts'\nimport { ConnectedWalletTableCellProps } from './lib/index.ts'\n\nexport const ConnectedWalletState: React.FC<ConnectedWalletTableCellProps> = ({ connected, walletRdns, tableCellProps }) => {\n const { disableWallet, enableWallet, wallets } = useEnabledWallets()\n\n const enabled = useMemo(() => (walletRdns ? wallets[walletRdns].enabled : false), [wallets, walletRdns])\n\n const handleClick = (event: ChangeEvent<HTMLInputElement>) => {\n const checked = event.target?.checked\n if (walletRdns) {\n // eslint-disable-next-line @typescript-eslint/no-unused-expressions\n checked ? enableWallet?.(walletRdns) : disableWallet?.(walletRdns)\n }\n }\n return (\n <TableCell {...tableCellProps}>\n <Switch disabled={!connected} checked={connected && enabled} onChange={handleClick} />\n </TableCell>\n )\n}\n","import { TableCell, useTheme } from '@mui/material'\nimport { ConstrainedImage } from '@xylabs/react-crypto'\nimport { FlexRow } from '@xylabs/react-flexbox'\nimport React from 'react'\n\nimport { ConnectedWalletTableCellProps } from './lib/index.ts'\n\nexport const ConnectedWalletsWalletTableCell: React.FC<ConnectedWalletTableCellProps> = ({ icon, walletName, tableCellProps }) => {\n const theme = useTheme()\n\n return (\n <TableCell {...tableCellProps}>\n <FlexRow gap={2} justifyContent=\"start\">\n <ConstrainedImage constrainedValue={theme.spacing(4)} src={icon} />\n {walletName}\n </FlexRow>\n </TableCell>\n )\n}\n","import { ComponentType } from 'react'\n\nimport { ConnectedWalletsAccountsTableCell } from './Accounts.tsx'\nimport { ConnectedWalletsActionsTableCell } from './Actions.tsx'\nimport { ConnectedWalletsChainNameTableCell } from './ChainName.tsx'\nimport { ConnectedWalletTableCellProps } from './lib/index.ts'\nimport { ConnectedWalletState } from './State.tsx'\nimport { ConnectedWalletsWalletTableCell } from './Wallet.tsx'\n\nexport const ConnectedWalletTableCells: ComponentType<ConnectedWalletTableCellProps>[] = [\n ConnectedWalletsWalletTableCell,\n ConnectedWalletsChainNameTableCell,\n ConnectedWalletsAccountsTableCell,\n ConnectedWalletsActionsTableCell,\n ConnectedWalletState,\n]\n","import { Table, TableBody, TableCell, TableHead, TableProps, TableRow } from '@mui/material'\nimport { EIP6963Connector } from '@xylabs/react-crypto'\nimport React, { useState } from 'react'\n\nimport { ConnectWalletDialog, RevokeWalletConnectionDialog } from '../dialogs/index.ts'\nimport { ActiveProvider, WalletsTableHeadCells } from '../lib/index.ts'\nimport { WalletConnectionsTableRow } from './ConnectedWalletsTableRow.tsx'\nimport { useActiveProviderDialogState } from './hooks/index.ts'\n\nexport interface ConnectedWalletsTableProps extends TableProps {\n ignoreConnectDialog?: boolean\n onIgnoreConnectDialog?: (checked: boolean) => void\n wallets?: EIP6963Connector[]\n}\n\nexport const ConnectedWalletsTable: React.FC<ConnectedWalletsTableProps> = ({ ignoreConnectDialog, onIgnoreConnectDialog, wallets, ...props }) => {\n const [activeProvider, setActiveProvider] = useState<ActiveProvider>()\n const [showConnect, onSetActiveProviderConnect, onConnectClose] = useActiveProviderDialogState(setActiveProvider)\n const [showRevoke, onSetActiveProviderRevoke, onRevokeClose] = useActiveProviderDialogState(setActiveProvider)\n\n return (\n <>\n <Table {...props}>\n <TableHead>\n <TableRow>\n {WalletsTableHeadCells.map(({ disablePadding, id, label, align, width }) => (\n <TableCell align={align} key={id} padding={disablePadding ? 'none' : 'normal'} width={width ?? 'auto'}>\n {label}\n </TableCell>\n ))}\n </TableRow>\n </TableHead>\n <TableBody>\n {(wallets ?? []).map(wallet => (\n <WalletConnectionsTableRow\n ignoreConnectDialog={ignoreConnectDialog}\n key={wallet.providerInfo?.rdns}\n onConnectClick={onSetActiveProviderConnect}\n onRevoke={onSetActiveProviderRevoke}\n wallet={wallet}\n />\n ))}\n </TableBody>\n </Table>\n <RevokeWalletConnectionDialog open={showRevoke} onClose={onRevokeClose} activeProvider={activeProvider} />\n <ConnectWalletDialog\n activeProvider={activeProvider}\n onClose={onConnectClose}\n open={showConnect}\n onIgnoreConnectDialog={onIgnoreConnectDialog}\n />\n </>\n )\n}\n","import { TableHeadCell } from '@xyo-network/react-table'\n\nexport const WalletsTableHeadCells: TableHeadCell[] = [\n {\n disablePadding: false,\n id: 'wallet',\n label: 'Wallet',\n numeric: false,\n showOnMobile: true,\n },\n {\n disablePadding: false,\n id: 'chain',\n label: 'Chain',\n numeric: false,\n showOnMobile: true,\n },\n {\n disablePadding: false,\n id: 'accounts',\n label: 'Accounts',\n numeric: true,\n showOnMobile: true,\n },\n {\n disablePadding: false,\n id: 'actions',\n label: 'Actions',\n numeric: false,\n showOnMobile: true,\n },\n {\n disablePadding: false,\n id: 'enabled',\n label: 'Enabled',\n numeric: false,\n showOnMobile: true,\n },\n]\n","import { TableRow, TableRowProps } from '@mui/material'\nimport { EthWalletConnectorBase, useEthWallet } from '@xylabs/react-crypto'\nimport React, { useCallback, useMemo } from 'react'\n\nimport { ActiveProvider } from '../lib/index.ts'\nimport { ConnectedWalletTableCells } from './cells/index.ts'\n\nexport interface WalletConnectionsTableRowProps extends TableRowProps {\n ignoreConnectDialog?: boolean\n onConnectClick?: (activeProvider: ActiveProvider) => void\n onRevoke?: (activeProvider: ActiveProvider) => void\n wallet: EthWalletConnectorBase\n}\n\nexport const WalletConnectionsTableRow: React.FC<WalletConnectionsTableRowProps> = ({\n ignoreConnectDialog,\n onConnectClick,\n onRevoke,\n wallet,\n ...props\n}) => {\n const { currentAccount: currentAccountFromWallet, additionalAccounts, chainName, connectWallet, providerInfo } = useEthWallet(wallet)\n\n const currentAccount = currentAccountFromWallet?.toString() ? [currentAccountFromWallet.toString()] : []\n const totalAccounts = (additionalAccounts?.length ?? 0) + (currentAccount?.length ?? 0)\n const connected = !!(currentAccount?.length ?? 0 > 0)\n const { icon, name, rdns } = useMemo(() => providerInfo ?? { icon: undefined, name: undefined, rdns: undefined }, [providerInfo])\n\n const activeProvider = useMemo<ActiveProvider>(\n () => ({\n connectWallet,\n icon,\n providerName: name,\n }),\n [connectWallet, icon, name],\n )\n\n const onRevokeLocal = useCallback(() => {\n onRevoke?.(activeProvider)\n }, [activeProvider, onRevoke])\n\n const onConnectLocal = useCallback(async () => {\n if (ignoreConnectDialog) {\n await connectWallet?.()\n } else {\n onConnectClick?.(activeProvider)\n }\n }, [activeProvider, connectWallet, ignoreConnectDialog, onConnectClick])\n\n return (\n <TableRow {...props}>\n {Object.values(ConnectedWalletTableCells).map((Cell, index) => (\n <Cell\n key={index}\n additionalAccounts={additionalAccounts}\n chainName={chainName}\n connected={connected}\n currentAccount={currentAccount}\n icon={icon}\n onConnect={onConnectLocal}\n onRevoke={onRevokeLocal}\n totalAccounts={totalAccounts}\n walletName={name}\n walletRdns={rdns}\n />\n ))}\n </TableRow>\n )\n}\n","import { Dispatch, SetStateAction, useState } from 'react'\n\nimport { ActiveProvider } from '../../lib/index.ts'\n\nexport const useActiveProviderDialogState = (\n setActiveProvider: Dispatch<SetStateAction<ActiveProvider | undefined>>,\n): [boolean, (activeProvider: ActiveProvider) => void, () => void] => {\n const [show, setShow] = useState(false)\n const onSetActiveProvider = (activeProvider: ActiveProvider) => {\n setShow(true)\n setActiveProvider(activeProvider)\n }\n\n const onClose = () => {\n setShow(false)\n setActiveProvider({})\n }\n\n return [show, onSetActiveProvider, onClose]\n}\n"],"mappings":";;;;AAEA,IAAMA,4BAA4B;AAqB3B,IAAMC,8BAAN,MAAMA;EArBb,OAqBaA;;;;EAEXC,qBAAqB;;EAGbC,iBAA2C,CAAC;;EAG5CC,kBAA0C,CAAC;;EAG3CC,YAA8B,CAAA;;EAG9BC,kBAAkBN;EAE1BO,YAAYD,kBAAkBN,2BAA2B;AACvD,SAAKM,kBAAkBA;AACvB,SAAKE,eAAc;EACrB;EAEA,IAAIC,UAAU;AACZ,WAAO,KAAKL;EACd;EAEAM,cAAcC,MAAc;AAC1B,SAAKC,oBAAoBD,MAAM,KAAA;EACjC;EAEAE,aAAaF,MAAc;AACzB,SAAKC,oBAAoBD,MAAM,IAAA;EACjC;;;;EAKAG,aAAaL,SAA4B;AACvC,UAAMM,aAAqC,CAAC;AAE5C,UAAMC,YAAY,wBAAC,CAACC,YAAYC,MAAAA,MAAmC;AACjEH,iBAAWE,UAAAA,IAAc;;QAEvBE,SAASF,cAAc,KAAKd,iBAAiB,KAAKA,eAAec,UAAAA,IAAc;QAC/EC;MACF;IACF,GANkB;AASlBE,WAAOC,QAAQZ,OAAAA,EAASa,QAAQN,UAAUO,KAAK,IAAI,CAAA;AACnD,SAAKnB,kBAAkBW;AACvB,SAAKS,WAAU;EACjB;EAEAC,UAAUC,UAA0B;AAClC,SAAKrB,YAAY;SAAI,KAAKA;MAAWqB;;AACrC,WAAO,MAAA;AACL,WAAKrB,YAAY,KAAKA,UAAUsB,OAAOC,CAAAA,qBAAoBA,qBAAqBF,QAAAA;IAClF;EACF;EAEAd,oBAAoB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AS5B;IACT2B,MAAM7B;IACNN;;AAIR,GAtC2E;;;AfFpE,IAAMsC,2BAA2BC,2BACtC,CAAC,EAAEC,qBAAqBC,uBAAuB,GAAGC,MAAAA,GAASC,QAAAA;AACzD,QAAMC,QAAQC,UAAAA;AAEd,QAAM,EAAEC,wBAAwBC,cAAa,IAAKC,mBAAAA;AAElD,SACE,gBAAAC,QAAA,cAACC,UAAAA;IAAQC,YAAW;IAAUC,gBAAe;IAAQC,KAAK;IAAGV;IAAW,GAAGD;KACzE,gBAAAO,QAAA,cAACC,UAAAA;IAAQC,YAAW;KAClB,gBAAAF,QAAA,cAACK,aAAAA;IAAWC,SAAQ;IAAKC,IAAI;MAAEC,IAAI;IAAI;KAAG,uBAAA,GAGzCX,yBAEK,gBAAAG,QAAA,cAACK,aAAAA;IAAWC,SAAQ;IAAYG,OAAOd,MAAMe,QAAQC,UAAUC;IAAML,IAAI;MAAEM,SAAS;IAAI;KAAG,6BAExF,KACAhB,sBAAAA,IAGL,IAAA,GAEN,gBAAAG,QAAA,cAACc,uBAAAA;IAAsBC,SAASjB;IAAeP;IAA0CC;;AAG/F,CAAA;AAGFH,yBAAyB2B,cAAc;","names":["DEFAULT_LOCAL_STORAGE_KEY","EnabledEthWalletConnections","persistPreferences","enabledWallets","ethWalletsState","listeners","localStorageKey","constructor","reviveSettings","wallets","disableWallet","rdns","toggleEnabledWallet","enableWallet","resetWallets","newWallets","addWallet","walletName","wallet","enabled","Object","entries","forEach","bind","emitChange","subscribe","listener","filter","existingListener","persistSettings","isPersistance","method","reduce","acc","localStorage","setItem","JSON","stringify","existingEntries","getItem","parse","e","console","warn","message","Typography","useTheme","FlexCol","React","forwardRef","AccountsChangedEventName","useWalletDiscovery","useEffect","useMemo","useState","sortWallets","wallets","Object","values","reduce","acc","wallet","allowedAccounts","length","unshift","push","useDetectedWallets","useWalletDiscovery","refresh","setRefresh","useState","sortedWallets","setSortedWallets","useEffect","listener","window","addEventListener","AccountsChangedEventName","removeEventListener","totalConnectedAccounts","useMemo","useWalletDiscovery","useMemo","useSyncExternalStore","enabledEthWallets","useEnabledWalletsInner","enabledWalletsRdns","discoveredWallets","useWalletDiscovery","wallets","useMemo","undefined","EnabledEthWalletConnections","resetWallets","rdns","enabled","Object","entries","toggleEnabledWallet","useSyncExternalStore","subscribe","bind","useEnabledWallets","enabledWallets","reduce","acc","walletName","wallet","disableWallet","enableWallet","Checkbox","FormControl","FormLabel","React","CheckboxFormControl","onCheckChanged","props","FormControl","FormLabel","Checkbox","onChange","_","checked","Button","Dialog","DialogActions","DialogContent","DialogTitle","React","SyncAlt","Typography","ConstrainedImage","FlexCol","FlexRow","React","xyoColorLogo","default","xyoColorLogoText","LinkedProvidersFlexbox","icon","providerName","props","React","FlexRow","gap","justifyContent","FlexCol","img","alt","src","xyoColorLogo","style","height","Typography","variant","SyncAlt","fontSize","ConstrainedImage","constrainedValue","maxWidth","Link","Typography","FlexCol","React","WalletPermissionsFlexbox","props","React","FlexCol","gap","Typography","fontWeight","sx","textAlign","ul","li","variant","Link","href","target","ConnectWalletDialog","activeProvider","onIgnoreConnectDialog","props","icon","providerName","onConnect","connectWallet","onClose","e","console","warn","message","React","Dialog","PaperProps","sx","display","gap","DialogTitle","textAlign","DialogContent","flexDirection","LinkedProvidersFlexbox","WalletPermissionsFlexbox","CheckboxFormControl","onCheckChanged","DialogActions","Button","variant","onClick","Button","Dialog","DialogActions","DialogContent","DialogTitle","Typography","ConstrainedImage","FlexRow","React","RevokeWalletConnectionDialog","activeProvider","props","React","Dialog","FlexRow","gap","justifyContent","pl","ConstrainedImage","src","icon","constrainedValue","DialogTitle","sx","providerName","DialogContent","Typography","window","location","origin","DialogActions","Button","variant","onClick","onClose","TableCell","Tooltip","Typography","React","ConnectedWalletsAccountsTableCell","additionalAccounts","currentAccount","totalAccounts","tableCellProps","React","TableCell","Tooltip","sx","cursor","title","map","address","index","p","key","Typography","Check","InfoOutlined","Button","IconButton","TableCell","Typography","FlexRow","React","ConnectedWalletsActionsTableCell","connected","onConnect","onRevoke","tableCellProps","React","TableCell","FlexRow","gap","justifyContent","Typography","sx","display","Check","Button","variant","onClick","IconButton","InfoOutlined","TableCell","React","ConnectedWalletsChainNameTableCell","chainName","tableCellProps","React","TableCell","Switch","TableCell","React","useMemo","ConnectedWalletState","connected","walletRdns","tableCellProps","disableWallet","enableWallet","wallets","useEnabledWallets","enabled","useMemo","handleClick","event","checked","target","React","TableCell","Switch","disabled","onChange","TableCell","useTheme","ConstrainedImage","FlexRow","React","ConnectedWalletsWalletTableCell","icon","walletName","tableCellProps","theme","useTheme","React","TableCell","FlexRow","gap","justifyContent","ConstrainedImage","constrainedValue","spacing","src","ConnectedWalletTableCells","ConnectedWalletsWalletTableCell","ConnectedWalletsChainNameTableCell","ConnectedWalletsAccountsTableCell","ConnectedWalletsActionsTableCell","ConnectedWalletState","Table","TableBody","TableCell","TableHead","TableRow","React","useState","WalletsTableHeadCells","disablePadding","id","label","numeric","showOnMobile","TableRow","useEthWallet","React","useCallback","useMemo","WalletConnectionsTableRow","ignoreConnectDialog","onConnectClick","onRevoke","wallet","props","currentAccount","currentAccountFromWallet","additionalAccounts","chainName","connectWallet","providerInfo","useEthWallet","toString","totalAccounts","length","connected","icon","name","rdns","useMemo","undefined","activeProvider","providerName","onRevokeLocal","useCallback","onConnectLocal","React","TableRow","Object","values","ConnectedWalletTableCells","map","Cell","index","key","onConnect","walletName","walletRdns","useState","useActiveProviderDialogState","setActiveProvider","show","setShow","useState","onSetActiveProvider","activeProvider","onClose","ConnectedWalletsTable","ignoreConnectDialog","onIgnoreConnectDialog","wallets","props","activeProvider","setActiveProvider","useState","showConnect","onSetActiveProviderConnect","onConnectClose","useActiveProviderDialogState","showRevoke","onSetActiveProviderRevoke","onRevokeClose","React","Table","TableHead","TableRow","WalletsTableHeadCells","map","disablePadding","id","label","align","width","TableCell","key","padding","TableBody","wallet","WalletConnectionsTableRow","providerInfo","rdns","onConnectClick","onRevoke","RevokeWalletConnectionDialog","open","onClose","ConnectWalletDialog","ConnectedAccountsFlexbox","forwardRef","ignoreConnectDialog","onIgnoreConnectDialog","props","ref","theme","useTheme","totalConnectedAccounts","sortedWallets","useDetectedWallets","React","FlexCol","alignItems","justifyContent","gap","Typography","variant","sx","mb","color","palette","secondary","main","opacity","ConnectedWalletsTable","wallets","displayName"]}
@@ -0,0 +1 @@
1
+ <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 238"><defs><style>.cls-1{fill:#8d8fc6;}.cls-2{fill:#579fd6;}.cls-3{fill:#f27046;}.cls-4{fill:#eb407a;}</style></defs><path class="cls-1" d="M74.5,28.33,21.29,120.5,74.5,212.67H180.94l1.76-3,51.46-89.13L180.94,28.33ZM84.65,40.54h78.83L111.65,56.93a15.85,15.85,0,0,1,2,5l59.66-18.81L185.22,101a20.12,20.12,0,0,1,5.36-.78l-10-47.91,37.87,65.53h-7.62a24.21,24.21,0,0,1,.15,2.68,23.29,23.29,0,0,1-.15,2.68h7.62l-39.1,67.75,10.92-50.13A20.57,20.57,0,0,1,185,140l-12.88,59-58.37-19.53a17.61,17.61,0,0,1-1.7,5l47.5,15.92H84.65l4-6.85A20.17,20.17,0,0,1,83.93,191L80,197.78,42.67,133.13l37,32.66a20.52,20.52,0,0,1,3.6-4L36.69,120.66,85,77.79a17.45,17.45,0,0,1-3.19-4.32l-39.46,35L80,43.22l5.56,9.69A17.51,17.51,0,0,1,90.12,50Zm28.24,31.17a16.15,16.15,0,0,1-2.68,4.64l62,35.81a19.74,19.74,0,0,1,2.83-4.54Zm-20,10.51v75.33a18,18,0,0,1,2.47-.16,17.18,17.18,0,0,1,2.89.21v-75a11.21,11.21,0,0,1-1.29,0,17.57,17.57,0,0,1-4.07-.47Zm79.34,46.63-62.08,35.81a18.45,18.45,0,0,1,2.68,4.68l62.23-36a19.68,19.68,0,0,1-2.83-4.53Z"/><path class="cls-2" d="M97,48.58a17.06,17.06,0,1,0,17,17,17.08,17.08,0,0,0-17-17Zm0,5.36a11.7,11.7,0,1,1-11.7,11.69A11.65,11.65,0,0,1,97,53.94Z"/><path class="cls-3" d="M95.37,157.39a18.73,18.73,0,1,0,18.7,18.7,18.74,18.74,0,0,0-18.7-18.7Zm0,5.31A13.4,13.4,0,1,1,82,176.09a13.37,13.37,0,0,1,13.4-13.39Z"/><path class="cls-4" d="M190.73,100.2A20.3,20.3,0,1,0,211,120.5a20.34,20.34,0,0,0-20.3-20.3Zm0,5.36a14.94,14.94,0,1,1-14.94,14.94,14.88,14.88,0,0,1,14.94-14.94Z"/></svg>
@@ -0,0 +1 @@
1
+ <svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="250 0 451 238"><defs><style>.cls-1{fill:#8d8fc6;}.cls-2{fill:#579fd6;}.cls-3{fill:#f27046;}.cls-4{fill:#eb407a;}</style></defs><path class="cls-1" d="M570,55.35a61.13,61.13,0,1,0,61.11,61.1A61.21,61.21,0,0,0,570,55.35Zm-266.4.1-8.2,8.14,53,52.91-53,52.91,8.2,8.2,52.91-53,44.77,44.77,8.14,8.2,114-114-8.14-8.14-52.91,52.91-53-52.91-8.14,8.14-44.77,44.77ZM570,66.84a49.61,49.61,0,1,1-49.61,49.61A49.54,49.54,0,0,1,570,66.84ZM409.45,71.73l44.77,44.77-44.77,44.77L364.68,116.5Z"/></svg>
package/package.json CHANGED
@@ -12,12 +12,12 @@
12
12
  "dependencies": {
13
13
  "@xylabs/react-crypto": "^3.4.2",
14
14
  "@xylabs/react-flexbox": "^3.4.2",
15
- "@xyo-network/react-table": "^2.83.0"
15
+ "@xyo-network/react-table": "^2.83.2"
16
16
  },
17
17
  "devDependencies": {
18
- "@storybook/react": "^8.2.7",
19
- "@xylabs/ts-scripts-yarn3": "^4.0.0-rc.7",
20
- "@xylabs/tsconfig-react": "^4.0.0-rc.7",
18
+ "@storybook/react": "^8.2.8",
19
+ "@xylabs/ts-scripts-yarn3": "^4.0.0-rc.12",
20
+ "@xylabs/tsconfig-react": "^4.0.0-rc.12",
21
21
  "typescript": "^5.5.4"
22
22
  },
23
23
  "peerDependencies": {
@@ -62,6 +62,6 @@
62
62
  },
63
63
  "sideEffects": false,
64
64
  "types": "dist/browser/index.d.ts",
65
- "version": "2.83.0",
65
+ "version": "2.83.2",
66
66
  "type": "module"
67
67
  }