@xyo-network/react-wallet 2.70.0-rc.1 → 2.70.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/browser/components/SeedPhrase/dialog/SeedPhraseDialog.d.cts.map +1 -1
  2. package/dist/browser/components/SeedPhrase/dialog/SeedPhraseDialog.d.mts.map +1 -1
  3. package/dist/browser/components/SeedPhrase/dialog/SeedPhraseDialog.d.ts.map +1 -1
  4. package/dist/browser/components/SeedPhrase/dialog/components/fields/NewPhraseTextField.d.cts +6 -2
  5. package/dist/browser/components/SeedPhrase/dialog/components/fields/NewPhraseTextField.d.cts.map +1 -1
  6. package/dist/browser/components/SeedPhrase/dialog/components/fields/NewPhraseTextField.d.mts +6 -2
  7. package/dist/browser/components/SeedPhrase/dialog/components/fields/NewPhraseTextField.d.mts.map +1 -1
  8. package/dist/browser/components/SeedPhrase/dialog/components/fields/NewPhraseTextField.d.ts +6 -2
  9. package/dist/browser/components/SeedPhrase/dialog/components/fields/NewPhraseTextField.d.ts.map +1 -1
  10. package/dist/browser/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.d.cts +2 -0
  11. package/dist/browser/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.d.cts.map +1 -0
  12. package/dist/browser/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.d.mts +2 -0
  13. package/dist/browser/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.d.mts.map +1 -0
  14. package/dist/browser/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.d.ts +2 -0
  15. package/dist/browser/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.d.ts.map +1 -0
  16. package/dist/browser/components/SeedPhrase/dialog/components/fields/index.d.cts +2 -0
  17. package/dist/browser/components/SeedPhrase/dialog/components/fields/index.d.cts.map +1 -1
  18. package/dist/browser/components/SeedPhrase/dialog/components/fields/index.d.mts +2 -0
  19. package/dist/browser/components/SeedPhrase/dialog/components/fields/index.d.mts.map +1 -1
  20. package/dist/browser/components/SeedPhrase/dialog/components/fields/index.d.ts +2 -0
  21. package/dist/browser/components/SeedPhrase/dialog/components/fields/index.d.ts.map +1 -1
  22. package/dist/browser/components/SeedPhrase/dialog/index.d.cts +1 -0
  23. package/dist/browser/components/SeedPhrase/dialog/index.d.cts.map +1 -1
  24. package/dist/browser/components/SeedPhrase/dialog/index.d.mts +1 -0
  25. package/dist/browser/components/SeedPhrase/dialog/index.d.mts.map +1 -1
  26. package/dist/browser/components/SeedPhrase/dialog/index.d.ts +1 -0
  27. package/dist/browser/components/SeedPhrase/dialog/index.d.ts.map +1 -1
  28. package/dist/browser/index.cjs +110 -96
  29. package/dist/browser/index.cjs.map +1 -1
  30. package/dist/browser/index.js +107 -93
  31. package/dist/browser/index.js.map +1 -1
  32. package/dist/node/components/SeedPhrase/dialog/SeedPhraseDialog.d.cts.map +1 -1
  33. package/dist/node/components/SeedPhrase/dialog/SeedPhraseDialog.d.mts.map +1 -1
  34. package/dist/node/components/SeedPhrase/dialog/SeedPhraseDialog.d.ts.map +1 -1
  35. package/dist/node/components/SeedPhrase/dialog/components/fields/NewPhraseTextField.d.cts +6 -2
  36. package/dist/node/components/SeedPhrase/dialog/components/fields/NewPhraseTextField.d.cts.map +1 -1
  37. package/dist/node/components/SeedPhrase/dialog/components/fields/NewPhraseTextField.d.mts +6 -2
  38. package/dist/node/components/SeedPhrase/dialog/components/fields/NewPhraseTextField.d.mts.map +1 -1
  39. package/dist/node/components/SeedPhrase/dialog/components/fields/NewPhraseTextField.d.ts +6 -2
  40. package/dist/node/components/SeedPhrase/dialog/components/fields/NewPhraseTextField.d.ts.map +1 -1
  41. package/dist/node/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.d.cts +2 -0
  42. package/dist/node/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.d.cts.map +1 -0
  43. package/dist/node/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.d.mts +2 -0
  44. package/dist/node/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.d.mts.map +1 -0
  45. package/dist/node/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.d.ts +2 -0
  46. package/dist/node/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.d.ts.map +1 -0
  47. package/dist/node/components/SeedPhrase/dialog/components/fields/index.d.cts +2 -0
  48. package/dist/node/components/SeedPhrase/dialog/components/fields/index.d.cts.map +1 -1
  49. package/dist/node/components/SeedPhrase/dialog/components/fields/index.d.mts +2 -0
  50. package/dist/node/components/SeedPhrase/dialog/components/fields/index.d.mts.map +1 -1
  51. package/dist/node/components/SeedPhrase/dialog/components/fields/index.d.ts +2 -0
  52. package/dist/node/components/SeedPhrase/dialog/components/fields/index.d.ts.map +1 -1
  53. package/dist/node/components/SeedPhrase/dialog/index.d.cts +1 -0
  54. package/dist/node/components/SeedPhrase/dialog/index.d.cts.map +1 -1
  55. package/dist/node/components/SeedPhrase/dialog/index.d.mts +1 -0
  56. package/dist/node/components/SeedPhrase/dialog/index.d.mts.map +1 -1
  57. package/dist/node/components/SeedPhrase/dialog/index.d.ts +1 -0
  58. package/dist/node/components/SeedPhrase/dialog/index.d.ts.map +1 -1
  59. package/dist/node/index.cjs +118 -96
  60. package/dist/node/index.cjs.map +1 -1
  61. package/dist/node/index.js +107 -93
  62. package/dist/node/index.js.map +1 -1
  63. package/package.json +21 -22
  64. package/src/components/SeedPhrase/dialog/SeedPhraseDialog.tsx +9 -4
  65. package/src/components/SeedPhrase/dialog/components/fields/NewPhraseTextField.tsx +12 -16
  66. package/src/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.tsx +17 -0
  67. package/src/components/SeedPhrase/dialog/components/fields/index.ts +2 -0
  68. package/src/components/SeedPhrase/dialog/index.ts +1 -0
  69. package/src/contexts/SeedPhrase/Provider.tsx +15 -15
@@ -160,8 +160,8 @@ var DefaultSeedPhrase = ({ changeSeedPhrase, children, hideDefaultSeedPhraseMess
160
160
  ] });
161
161
  };
162
162
 
163
- // src/components/SeedPhrase/dialog/SeedPhraseDialog.tsx
164
- import { Dialog as Dialog2, DialogContent as DialogContent2, DialogTitle as DialogTitle2 } from "@mui/material";
163
+ // src/components/SeedPhrase/dialog/components/DialogActionButtons.tsx
164
+ import { Button as Button2, DialogActions as DialogActions2 } from "@mui/material";
165
165
 
166
166
  // src/contexts/SeedPhrase/Context.ts
167
167
  import { createContextEx } from "@xyo-network/react-shared";
@@ -170,7 +170,7 @@ var SeedPhraseContext = createContextEx();
170
170
  // src/contexts/SeedPhrase/Provider.tsx
171
171
  import { generateMnemonic as generateMnemonic2, validateMnemonic } from "@scure/bip39";
172
172
  import { wordlist as wordlist2 } from "@scure/bip39/wordlists/english";
173
- import { useEffect as useEffect2, useMemo, useState as useState4 } from "react";
173
+ import { useCallback, useEffect as useEffect2, useMemo, useState as useState4 } from "react";
174
174
  import { jsx as jsx5 } from "react/jsx-runtime";
175
175
  var validate = (passedPhrase) => {
176
176
  if (!passedPhrase) {
@@ -191,36 +191,36 @@ var SeedPhraseProvider = ({
191
191
  useEffect2(() => {
192
192
  setPhrase(defaultPhrase);
193
193
  }, [defaultPhrase]);
194
- useEffect2(() => {
195
- if (!open) {
196
- handleCancelOverwrite();
197
- }
198
- }, [open]);
199
194
  useEffect2(() => {
200
195
  if (seedPhrase || open) {
201
196
  setPhrase == null ? void 0 : setPhrase(seedPhrase ?? "");
202
197
  }
203
198
  }, [seedPhrase, open, setPhrase]);
204
- const handleGenerate = () => {
199
+ const handleGenerate = useCallback(() => {
205
200
  const mnemonic = generateMnemonic2(wordlist2, 256);
206
201
  setPhrase == null ? void 0 : setPhrase(mnemonic);
207
202
  setOverwriteWarning == null ? void 0 : setOverwriteWarning(false);
208
- };
209
- const handleCancelOverwrite = () => {
203
+ }, []);
204
+ const handleCancelOverwrite = useCallback(() => {
210
205
  setOverwriteWarning == null ? void 0 : setOverwriteWarning(false);
211
- };
212
- const handleClear = () => {
206
+ }, []);
207
+ const handleClear = useCallback(() => {
213
208
  setPhrase == null ? void 0 : setPhrase("");
214
209
  setOverwriteWarning == null ? void 0 : setOverwriteWarning(false);
215
- };
216
- const handleSave = () => {
210
+ }, []);
211
+ const handleSave = useCallback(() => {
217
212
  if (!overwriteWarning && seedPhrase && seedPhrase !== phrase) {
218
213
  setOverwriteWarning == null ? void 0 : setOverwriteWarning(true);
219
214
  } else {
220
215
  handleChangeSeedPhrase == null ? void 0 : handleChangeSeedPhrase(phrase ?? "");
221
216
  saveCallback == null ? void 0 : saveCallback();
222
217
  }
223
- };
218
+ }, [handleChangeSeedPhrase, overwriteWarning, phrase, saveCallback, seedPhrase]);
219
+ useEffect2(() => {
220
+ if (!open) {
221
+ handleCancelOverwrite();
222
+ }
223
+ }, [handleCancelOverwrite, open]);
224
224
  const validSeedPhrase = useMemo(() => validate == null ? void 0 : validate(seedPhrase), [seedPhrase]);
225
225
  const validPhrase = useMemo(() => validate == null ? void 0 : validate(phrase), [phrase]);
226
226
  return /* @__PURE__ */ jsx5(
@@ -355,7 +355,6 @@ var useSelectedWalletAccount = (required = true) => {
355
355
  };
356
356
 
357
357
  // src/components/SeedPhrase/dialog/components/DialogActionButtons.tsx
358
- import { Button as Button2, DialogActions as DialogActions2 } from "@mui/material";
359
358
  import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
360
359
  var DialogActionButtons = ({ onClose, ...props }) => {
361
360
  const { handleSave, setPhrase } = useSeedPhrase();
@@ -370,7 +369,7 @@ var DialogActionButtons = ({ onClose, ...props }) => {
370
369
  };
371
370
 
372
371
  // src/components/SeedPhrase/dialog/components/fields/NewPhraseTextField.tsx
373
- import { Button as Button3, DialogActions as DialogActions3, FormControl, FormLabel, TextField } from "@mui/material";
372
+ import { FormControl, TextField } from "@mui/material";
374
373
 
375
374
  // src/components/SeedPhrase/dialog/components/fields/validation-messages/colorParser.ts
376
375
  var colorParser = (conditional) => {
@@ -436,52 +435,57 @@ var PhraseHeaderBox = ({ children, conditional, ...props }) => {
436
435
 
437
436
  // src/components/SeedPhrase/dialog/components/fields/NewPhraseTextField.tsx
438
437
  import { Fragment as Fragment3, jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
439
- var NewPhraseTextField = (props) => {
440
- const { handleClear, handleGenerate, overwriteWarning, phrase, setPhrase, validPhrase } = useSeedPhrase();
441
- return /* @__PURE__ */ jsxs8(Fragment3, { children: [
442
- /* @__PURE__ */ jsxs8(FormControl, { fullWidth: true, size: "small", sx: { display: "flex", flexDirection: "column", rowGap: 1 }, children: [
443
- /* @__PURE__ */ jsx10(FormLabel, { children: /* @__PURE__ */ jsx10(PhraseHeaderBox, { conditional: validPhrase, children: "New Seed Phrase" }) }),
444
- /* @__PURE__ */ jsx10(
445
- TextField,
446
- {
447
- focused: true,
448
- color: colorParser(validPhrase),
449
- error: validPhrase === false,
450
- helperText: validPhrase === false ? /* @__PURE__ */ jsx10(InvalidPhraseTypography, {}) : null,
451
- fullWidth: true,
452
- maxRows: Number.POSITIVE_INFINITY,
453
- multiline: true,
454
- onChange: (e) => setPhrase == null ? void 0 : setPhrase(e.target.value),
455
- value: phrase,
456
- ...props
457
- }
458
- )
459
- ] }),
460
- /* @__PURE__ */ jsxs8(DialogActions3, { sx: { justifyContent: "center" }, children: [
461
- /* @__PURE__ */ jsx10(Button3, { disabled: overwriteWarning, variant: "outlined", onClick: handleGenerate, children: "Generate" }),
462
- /* @__PURE__ */ jsx10(Button3, { variant: "outlined", onClick: handleClear, children: "Clear" })
463
- ] })
438
+ var NewPhraseTextField = ({ children, disableColor, ...props }) => {
439
+ const { phrase, setPhrase, validPhrase } = useSeedPhrase();
440
+ return /* @__PURE__ */ jsx10(Fragment3, { children: /* @__PURE__ */ jsxs8(FormControl, { fullWidth: true, size: "small", sx: { display: "flex", flexDirection: "column", rowGap: 1 }, children: [
441
+ children,
442
+ /* @__PURE__ */ jsx10(
443
+ TextField,
444
+ {
445
+ focused: true,
446
+ color: disableColor ? void 0 : colorParser(validPhrase),
447
+ error: validPhrase === false,
448
+ helperText: validPhrase === false ? /* @__PURE__ */ jsx10(InvalidPhraseTypography, {}) : null,
449
+ fullWidth: true,
450
+ maxRows: Number.POSITIVE_INFINITY,
451
+ multiline: true,
452
+ onChange: (e) => setPhrase == null ? void 0 : setPhrase(e.target.value),
453
+ value: phrase,
454
+ ...props
455
+ }
456
+ )
457
+ ] }) });
458
+ };
459
+
460
+ // src/components/SeedPhrase/dialog/components/fields/PhraseDialogActions.tsx
461
+ import { Button as Button3, DialogActions as DialogActions3 } from "@mui/material";
462
+ import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
463
+ var PhraseDialogActions = () => {
464
+ const { handleClear, handleGenerate, overwriteWarning } = useSeedPhrase();
465
+ return /* @__PURE__ */ jsxs9(DialogActions3, { sx: { justifyContent: "center" }, children: [
466
+ /* @__PURE__ */ jsx11(Button3, { disabled: overwriteWarning, variant: "outlined", onClick: handleGenerate, children: "Generate" }),
467
+ /* @__PURE__ */ jsx11(Button3, { variant: "outlined", onClick: handleClear, children: "Clear" })
464
468
  ] });
465
469
  };
466
470
 
467
471
  // src/components/SeedPhrase/dialog/components/fields/SavedPhraseTextField.tsx
468
- import { Chip, FormControl as FormControl2, FormLabel as FormLabel2, TextField as TextField2 } from "@mui/material";
472
+ import { Chip, FormControl as FormControl2, FormLabel, TextField as TextField2 } from "@mui/material";
469
473
  import { useState as useState6 } from "react";
470
- import { Fragment as Fragment4, jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
474
+ import { Fragment as Fragment4, jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
471
475
  var SavedPhraseTextField = (props) => {
472
476
  const { validSeedPhrase, seedPhrase } = useSeedPhrase();
473
477
  const [visible, setVisible] = useState6(false);
474
- return /* @__PURE__ */ jsxs9(FormControl2, { fullWidth: true, size: "small", sx: { display: "flex", flexDirection: "column", rowGap: 1 }, children: [
475
- /* @__PURE__ */ jsx11(Chip, { label: visible ? "Hide Saved Seed Phrase" : "Reveal Saved Seed Phrase", onClick: () => setVisible(!visible) }),
476
- visible ? /* @__PURE__ */ jsxs9(Fragment4, { children: [
477
- /* @__PURE__ */ jsx11(FormLabel2, { children: /* @__PURE__ */ jsx11(PhraseHeaderBox, { conditional: validSeedPhrase, children: "Saved Seed Phrase" }) }),
478
- /* @__PURE__ */ jsx11(
478
+ return /* @__PURE__ */ jsxs10(FormControl2, { fullWidth: true, size: "small", sx: { display: "flex", flexDirection: "column", rowGap: 1 }, children: [
479
+ /* @__PURE__ */ jsx12(Chip, { label: visible ? "Hide Saved Seed Phrase" : "Reveal Saved Seed Phrase", onClick: () => setVisible(!visible) }),
480
+ visible ? /* @__PURE__ */ jsxs10(Fragment4, { children: [
481
+ /* @__PURE__ */ jsx12(FormLabel, { children: /* @__PURE__ */ jsx12(PhraseHeaderBox, { conditional: validSeedPhrase, children: "Saved Seed Phrase" }) }),
482
+ /* @__PURE__ */ jsx12(
479
483
  TextField2,
480
484
  {
481
485
  defaultValue: seedPhrase,
482
486
  disabled: true,
483
487
  error: validSeedPhrase === false,
484
- helperText: validSeedPhrase === false ? /* @__PURE__ */ jsx11(InvalidPhraseTypography, {}) : null,
488
+ helperText: validSeedPhrase === false ? /* @__PURE__ */ jsx12(InvalidPhraseTypography, {}) : null,
485
489
  fullWidth: true,
486
490
  maxRows: Number.POSITIVE_INFINITY,
487
491
  multiline: true,
@@ -495,17 +499,17 @@ var SavedPhraseTextField = (props) => {
495
499
  // src/components/SeedPhrase/dialog/components/OverwriteWarning.tsx
496
500
  import { Alert as Alert3, Button as Button4 } from "@mui/material";
497
501
  import { FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
498
- import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
502
+ import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
499
503
  var OverwriteWarning = () => {
500
504
  const { handleCancelOverwrite, handleSave } = useSeedPhrase();
501
- return /* @__PURE__ */ jsx12(
505
+ return /* @__PURE__ */ jsx13(
502
506
  Alert3,
503
507
  {
504
508
  variant: "outlined",
505
509
  severity: "warning",
506
- action: /* @__PURE__ */ jsxs10(FlexRow2, { sx: { columnGap: 1 }, children: [
507
- /* @__PURE__ */ jsx12(Button4, { variant: "outlined", color: "inherit", size: "small", onClick: handleSave, children: "Overwrite" }),
508
- /* @__PURE__ */ jsx12(Button4, { variant: "outlined", color: "inherit", size: "small", onClick: handleCancelOverwrite, children: "Cancel" })
510
+ action: /* @__PURE__ */ jsxs11(FlexRow2, { sx: { columnGap: 1 }, children: [
511
+ /* @__PURE__ */ jsx13(Button4, { variant: "outlined", color: "inherit", size: "small", onClick: handleSave, children: "Overwrite" }),
512
+ /* @__PURE__ */ jsx13(Button4, { variant: "outlined", color: "inherit", size: "small", onClick: handleCancelOverwrite, children: "Cancel" })
509
513
  ] }),
510
514
  children: "Are you sure you want to overwrite existing seed phrase? This action cannot be undone."
511
515
  }
@@ -513,9 +517,10 @@ var OverwriteWarning = () => {
513
517
  };
514
518
 
515
519
  // src/components/SeedPhrase/dialog/SeedPhraseDialog.tsx
516
- import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
520
+ import { Dialog as Dialog2, DialogContent as DialogContent2, DialogTitle as DialogTitle2, FormLabel as FormLabel2 } from "@mui/material";
521
+ import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
517
522
  var SeedPhraseDialog = ({ changeSeedPhrase, seedPhrase, ...props }) => {
518
- return /* @__PURE__ */ jsx13(
523
+ return /* @__PURE__ */ jsx14(
519
524
  SeedPhraseProvider,
520
525
  {
521
526
  seedPhrase,
@@ -525,23 +530,24 @@ var SeedPhraseDialog = ({ changeSeedPhrase, seedPhrase, ...props }) => {
525
530
  var _a;
526
531
  return (_a = props.onClose) == null ? void 0 : _a.call(props, {}, "escapeKeyDown");
527
532
  },
528
- children: /* @__PURE__ */ jsx13(SeedPhraseDialogInner, { ...props })
533
+ children: /* @__PURE__ */ jsx14(SeedPhraseDialogInner, { ...props })
529
534
  }
530
535
  );
531
536
  };
532
537
  var SeedPhraseDialogInner = (props) => {
533
- const { overwriteWarning, seedPhrase } = useSeedPhrase();
534
- return /* @__PURE__ */ jsxs11(Dialog2, { "aria-labelledby": "alert-dialog-title", "aria-describedby": "alert-dialog-description", fullWidth: true, maxWidth: "sm", ...props, children: [
535
- /* @__PURE__ */ jsxs11(DialogTitle2, { id: "alert-dialog-title", children: [
538
+ const { overwriteWarning, seedPhrase, validPhrase } = useSeedPhrase();
539
+ return /* @__PURE__ */ jsxs12(Dialog2, { "aria-labelledby": "alert-dialog-title", "aria-describedby": "alert-dialog-description", fullWidth: true, maxWidth: "sm", ...props, children: [
540
+ /* @__PURE__ */ jsxs12(DialogTitle2, { id: "alert-dialog-title", children: [
536
541
  "Update Your Seed Phrase ",
537
- /* @__PURE__ */ jsx13(SeedPhraseIconButton, {})
542
+ /* @__PURE__ */ jsx14(SeedPhraseIconButton, {})
538
543
  ] }),
539
- /* @__PURE__ */ jsxs11(DialogContent2, { sx: { display: "flex", flexDirection: "column", rowGap: 2 }, children: [
540
- /* @__PURE__ */ jsx13(NewPhraseTextField, {}),
541
- seedPhrase ? /* @__PURE__ */ jsx13(SavedPhraseTextField, {}) : null,
542
- overwriteWarning ? /* @__PURE__ */ jsx13(OverwriteWarning, {}) : null
544
+ /* @__PURE__ */ jsxs12(DialogContent2, { sx: { display: "flex", flexDirection: "column", rowGap: 2 }, children: [
545
+ /* @__PURE__ */ jsx14(NewPhraseTextField, { children: /* @__PURE__ */ jsx14(FormLabel2, { children: /* @__PURE__ */ jsx14(PhraseHeaderBox, { conditional: validPhrase, children: "New Seed Phrase" }) }) }),
546
+ /* @__PURE__ */ jsx14(PhraseDialogActions, {}),
547
+ seedPhrase ? /* @__PURE__ */ jsx14(SavedPhraseTextField, {}) : null,
548
+ overwriteWarning ? /* @__PURE__ */ jsx14(OverwriteWarning, {}) : null
543
549
  ] }),
544
- /* @__PURE__ */ jsx13(DialogActionButtons, { onClose: props.onClose })
550
+ /* @__PURE__ */ jsx14(DialogActionButtons, { onClose: props.onClose })
545
551
  ] });
546
552
  };
547
553
 
@@ -549,21 +555,21 @@ var SeedPhraseDialogInner = (props) => {
549
555
  import { Cancel as CancelIcon, RadioButtonChecked as RadioButtonCheckedIcon } from "@mui/icons-material";
550
556
  import { Button as Button5, ButtonGroup as ButtonGroup2, TableCell as TableCell2, TableRow as TableRow2 } from "@mui/material";
551
557
  import { useState as useState7 } from "react";
552
- import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
558
+ import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
553
559
  var SeedPhraseTableRow = ({ changeSeedPhrase, seedPhrase, ...props }) => {
554
560
  const [open, setOpen] = useState7(false);
555
561
  const handleOpen = () => {
556
562
  setOpen(true);
557
563
  };
558
- return /* @__PURE__ */ jsxs12(TableRow2, { ...props, children: [
559
- /* @__PURE__ */ jsxs12(TableCell2, { children: [
564
+ return /* @__PURE__ */ jsxs13(TableRow2, { ...props, children: [
565
+ /* @__PURE__ */ jsxs13(TableCell2, { children: [
560
566
  "Seed Phrase ",
561
- /* @__PURE__ */ jsx14(SeedPhraseIconButton, {})
567
+ /* @__PURE__ */ jsx15(SeedPhraseIconButton, {})
562
568
  ] }),
563
- /* @__PURE__ */ jsx14(TableCell2, { align: "center", children: seedPhrase ? /* @__PURE__ */ jsx14(RadioButtonCheckedIcon, { color: "success" }) : /* @__PURE__ */ jsx14(CancelIcon, { color: "error" }) }),
564
- /* @__PURE__ */ jsxs12(TableCell2, { children: [
565
- /* @__PURE__ */ jsx14(SeedPhraseDialog, { changeSeedPhrase, open, onClose: () => setOpen(false), seedPhrase }),
566
- /* @__PURE__ */ jsx14(ButtonGroup2, { fullWidth: true, children: /* @__PURE__ */ jsx14(Button5, { variant: "contained", size: "small", onClick: handleOpen, children: "Update" }) })
569
+ /* @__PURE__ */ jsx15(TableCell2, { align: "center", children: seedPhrase ? /* @__PURE__ */ jsx15(RadioButtonCheckedIcon, { color: "success" }) : /* @__PURE__ */ jsx15(CancelIcon, { color: "error" }) }),
570
+ /* @__PURE__ */ jsxs13(TableCell2, { children: [
571
+ /* @__PURE__ */ jsx15(SeedPhraseDialog, { changeSeedPhrase, open, onClose: () => setOpen(false), seedPhrase }),
572
+ /* @__PURE__ */ jsx15(ButtonGroup2, { fullWidth: true, children: /* @__PURE__ */ jsx15(Button5, { variant: "contained", size: "small", onClick: handleOpen, children: "Update" }) })
567
573
  ] })
568
574
  ] });
569
575
  };
@@ -685,18 +691,18 @@ var useWrapperAccount = (account) => {
685
691
  };
686
692
 
687
693
  // src/components/WalletAccountDetails/WalletAccountDetails.tsx
688
- import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
694
+ import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
689
695
  var WalletAccountDetails = ({ exploreUrl = "https://explore.xyo.network", account, ...props }) => {
690
696
  const [accountToUse] = useAccount({ account });
691
697
  const { network } = useNetwork();
692
698
  const exploreAddressUrl = `${exploreUrl}/recent?account=${accountToUse == null ? void 0 : accountToUse.address}&network=${(network == null ? void 0 : network.name) ?? "main"}`;
693
- return /* @__PURE__ */ jsxs13(FlexCol, { ...props, children: [
694
- /* @__PURE__ */ jsx15(EthAccountButton, { address: EthAddress.fromString(accountToUse == null ? void 0 : accountToUse.address) }),
695
- /* @__PURE__ */ jsxs13(FlexRow3, { gap: 1, children: [
696
- /* @__PURE__ */ jsx15(NumberStatus, { rounded: true, title: "Tokens", value: 0, to: `${exploreAddressUrl}&schema=network.xyo.account.tokens`, target: "_blank" }),
697
- /* @__PURE__ */ jsx15(NumberStatus, { rounded: true, title: "NFTs", value: 0, to: `${exploreAddressUrl}&schema=network.xyo.account.nfts`, target: "_blank" }),
698
- /* @__PURE__ */ jsx15(NumberStatus, { rounded: true, title: "Signatures", value: 0, to: `${exploreAddressUrl}&schema=network.xyo.account.signatures`, target: "_blank" }),
699
- /* @__PURE__ */ jsx15(NumberStatus, { rounded: true, title: "Signins", value: 0, to: `${exploreAddressUrl}&schema=network.xyo.account.signins`, target: "_blank" })
699
+ return /* @__PURE__ */ jsxs14(FlexCol, { ...props, children: [
700
+ /* @__PURE__ */ jsx16(EthAccountButton, { address: EthAddress.fromString(accountToUse == null ? void 0 : accountToUse.address) }),
701
+ /* @__PURE__ */ jsxs14(FlexRow3, { gap: 1, children: [
702
+ /* @__PURE__ */ jsx16(NumberStatus, { rounded: true, title: "Tokens", value: 0, to: `${exploreAddressUrl}&schema=network.xyo.account.tokens`, target: "_blank" }),
703
+ /* @__PURE__ */ jsx16(NumberStatus, { rounded: true, title: "NFTs", value: 0, to: `${exploreAddressUrl}&schema=network.xyo.account.nfts`, target: "_blank" }),
704
+ /* @__PURE__ */ jsx16(NumberStatus, { rounded: true, title: "Signatures", value: 0, to: `${exploreAddressUrl}&schema=network.xyo.account.signatures`, target: "_blank" }),
705
+ /* @__PURE__ */ jsx16(NumberStatus, { rounded: true, title: "Signins", value: 0, to: `${exploreAddressUrl}&schema=network.xyo.account.signins`, target: "_blank" })
700
706
  ] })
701
707
  ] });
702
708
  };
@@ -705,7 +711,7 @@ var WalletAccountDetails = ({ exploreUrl = "https://explore.xyo.network", accoun
705
711
  import { CircularProgress, MenuItem } from "@mui/material";
706
712
  import { SelectEx } from "@xylabs/react-select";
707
713
  import { AddressRenderRowBox } from "@xyo-network/react-address-render";
708
- import { Fragment as Fragment5, jsx as jsx16 } from "react/jsx-runtime";
714
+ import { Fragment as Fragment5, jsx as jsx17 } from "react/jsx-runtime";
709
715
  var arrayRange = (length, start = 0) => {
710
716
  return [...Array.from({ length }).keys()].map((x) => x + start);
711
717
  };
@@ -722,7 +728,7 @@ var WalletAccountSelect = ({
722
728
  }) => {
723
729
  const { activeAccountIndex = 0, setActiveAccountIndex, coinTypeWallet } = useWalletContext();
724
730
  const disabled = !coinTypeWallet || activeAccountIndex === void 0;
725
- return /* @__PURE__ */ jsx16(Fragment5, { children: coinTypeWallet ? /* @__PURE__ */ jsx16(
731
+ return /* @__PURE__ */ jsx17(Fragment5, { children: coinTypeWallet ? /* @__PURE__ */ jsx17(
726
732
  SelectEx,
727
733
  {
728
734
  margin: "dense",
@@ -732,7 +738,7 @@ var WalletAccountSelect = ({
732
738
  const [selectedAccount] = useWallet({ path: selectedAccountIndex.toString(), wallet: coinTypeWallet });
733
739
  const customName = selectedAccount ? addressNames[selectedAccount.address] : void 0;
734
740
  const favorite = !!selectedAccount && selectedAccount.address in addressNames;
735
- return /* @__PURE__ */ jsx16(MenuItem, { value: selectedAccountIndex, sx: { minHeight: 0, paddingBottom: 0, paddingTop: 0 }, children: /* @__PURE__ */ jsx16(
741
+ return /* @__PURE__ */ jsx17(MenuItem, { value: selectedAccountIndex, sx: { minHeight: 0, paddingBottom: 0, paddingTop: 0 }, children: /* @__PURE__ */ jsx17(
736
742
  AddressRenderRowBox,
737
743
  {
738
744
  disableSharedRef: true,
@@ -747,7 +753,7 @@ var WalletAccountSelect = ({
747
753
  }
748
754
  ) });
749
755
  };
750
- return /* @__PURE__ */ jsx16(Item, {});
756
+ return /* @__PURE__ */ jsx17(Item, {});
751
757
  },
752
758
  value: activeAccountIndex,
753
759
  onChange: (event) => setActiveAccountIndex == null ? void 0 : setActiveAccountIndex(Number.parseInt(`${event.target.value}`)),
@@ -759,7 +765,7 @@ var WalletAccountSelect = ({
759
765
  const [account] = useWallet({ path: index.toString(), wallet: coinTypeWallet });
760
766
  const customName = account ? addressNames[account.address] : void 0;
761
767
  const favorite = !!account && account.address in addressNames;
762
- return /* @__PURE__ */ jsx16(MenuItem, { value: index, sx: { minHeight: 0, paddingBottom: 0, paddingTop: 0 }, children: /* @__PURE__ */ jsx16(
768
+ return /* @__PURE__ */ jsx17(MenuItem, { value: index, sx: { minHeight: 0, paddingBottom: 0, paddingTop: 0 }, children: /* @__PURE__ */ jsx17(
763
769
  AddressRenderRowBox,
764
770
  {
765
771
  disableSharedRef: true,
@@ -774,15 +780,15 @@ var WalletAccountSelect = ({
774
780
  }
775
781
  ) }, account == null ? void 0 : account.address);
776
782
  };
777
- return /* @__PURE__ */ jsx16(Item, {}, index);
783
+ return /* @__PURE__ */ jsx17(Item, {}, index);
778
784
  })
779
785
  }
780
- ) : /* @__PURE__ */ jsx16(CircularProgress, { size: 24 }) });
786
+ ) : /* @__PURE__ */ jsx17(CircularProgress, { size: 24 }) });
781
787
  };
782
788
 
783
789
  // src/components/WalletAccountSelect/SelectBar.tsx
784
790
  import { FlexCol as FlexCol2 } from "@xylabs/react-flexbox";
785
- import { jsx as jsx17 } from "react/jsx-runtime";
791
+ import { jsx as jsx18 } from "react/jsx-runtime";
786
792
  var WalletAccountSelectBar = ({
787
793
  addressNames = {},
788
794
  iconOnly,
@@ -793,7 +799,7 @@ var WalletAccountSelectBar = ({
793
799
  size = "small",
794
800
  ...props
795
801
  }) => {
796
- return /* @__PURE__ */ jsx17(FlexCol2, { alignItems: "stretch", ...props, children: /* @__PURE__ */ jsx17(
802
+ return /* @__PURE__ */ jsx18(FlexCol2, { alignItems: "stretch", ...props, children: /* @__PURE__ */ jsx18(
797
803
  WalletAccountSelect,
798
804
  {
799
805
  addressNames,
@@ -811,7 +817,14 @@ var WalletAccountSelectBar = ({
811
817
  export {
812
818
  Bip44,
813
819
  DefaultSeedPhrase,
820
+ DialogActionButtons,
821
+ InvalidPhraseTypography,
814
822
  MaxAccountsTableRow,
823
+ NewPhraseTextField,
824
+ OverwriteWarning,
825
+ PhraseDialogActions,
826
+ PhraseHeaderBox,
827
+ SavedPhraseTextField,
815
828
  SeedPhraseContext,
816
829
  SeedPhraseDialog,
817
830
  SeedPhraseDialogInner,
@@ -824,6 +837,7 @@ export {
824
837
  WalletContext,
825
838
  WalletProvider,
826
839
  WalletRootPath,
840
+ colorParser,
827
841
  ethereumAccountPath,
828
842
  useAccount,
829
843
  useCoinTypeWallet,