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

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?.(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?.(mnemonic);
207
202
  setOverwriteWarning?.(false);
208
- };
209
- const handleCancelOverwrite = () => {
203
+ }, []);
204
+ const handleCancelOverwrite = useCallback(() => {
210
205
  setOverwriteWarning?.(false);
211
- };
212
- const handleClear = () => {
206
+ }, []);
207
+ const handleClear = useCallback(() => {
213
208
  setPhrase?.("");
214
209
  setOverwriteWarning?.(false);
215
- };
216
- const handleSave = () => {
210
+ }, []);
211
+ const handleSave = useCallback(() => {
217
212
  if (!overwriteWarning && seedPhrase && seedPhrase !== phrase) {
218
213
  setOverwriteWarning?.(true);
219
214
  } else {
220
215
  handleChangeSeedPhrase?.(phrase ?? "");
221
216
  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?.(seedPhrase), [seedPhrase]);
225
225
  const validPhrase = useMemo(() => 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?.(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?.(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,32 +517,34 @@ 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,
522
527
  handleChangeSeedPhrase: changeSeedPhrase,
523
528
  open: props.open,
524
529
  saveCallback: () => props.onClose?.({}, "escapeKeyDown"),
525
- children: /* @__PURE__ */ jsx13(SeedPhraseDialogInner, { ...props })
530
+ children: /* @__PURE__ */ jsx14(SeedPhraseDialogInner, { ...props })
526
531
  }
527
532
  );
528
533
  };
529
534
  var SeedPhraseDialogInner = (props) => {
530
- const { overwriteWarning, seedPhrase } = useSeedPhrase();
531
- return /* @__PURE__ */ jsxs11(Dialog2, { "aria-labelledby": "alert-dialog-title", "aria-describedby": "alert-dialog-description", fullWidth: true, maxWidth: "sm", ...props, children: [
532
- /* @__PURE__ */ jsxs11(DialogTitle2, { id: "alert-dialog-title", children: [
535
+ const { overwriteWarning, seedPhrase, validPhrase } = useSeedPhrase();
536
+ return /* @__PURE__ */ jsxs12(Dialog2, { "aria-labelledby": "alert-dialog-title", "aria-describedby": "alert-dialog-description", fullWidth: true, maxWidth: "sm", ...props, children: [
537
+ /* @__PURE__ */ jsxs12(DialogTitle2, { id: "alert-dialog-title", children: [
533
538
  "Update Your Seed Phrase ",
534
- /* @__PURE__ */ jsx13(SeedPhraseIconButton, {})
539
+ /* @__PURE__ */ jsx14(SeedPhraseIconButton, {})
535
540
  ] }),
536
- /* @__PURE__ */ jsxs11(DialogContent2, { sx: { display: "flex", flexDirection: "column", rowGap: 2 }, children: [
537
- /* @__PURE__ */ jsx13(NewPhraseTextField, {}),
538
- seedPhrase ? /* @__PURE__ */ jsx13(SavedPhraseTextField, {}) : null,
539
- overwriteWarning ? /* @__PURE__ */ jsx13(OverwriteWarning, {}) : null
541
+ /* @__PURE__ */ jsxs12(DialogContent2, { sx: { display: "flex", flexDirection: "column", rowGap: 2 }, children: [
542
+ /* @__PURE__ */ jsx14(NewPhraseTextField, { children: /* @__PURE__ */ jsx14(FormLabel2, { children: /* @__PURE__ */ jsx14(PhraseHeaderBox, { conditional: validPhrase, children: "New Seed Phrase" }) }) }),
543
+ /* @__PURE__ */ jsx14(PhraseDialogActions, {}),
544
+ seedPhrase ? /* @__PURE__ */ jsx14(SavedPhraseTextField, {}) : null,
545
+ overwriteWarning ? /* @__PURE__ */ jsx14(OverwriteWarning, {}) : null
540
546
  ] }),
541
- /* @__PURE__ */ jsx13(DialogActionButtons, { onClose: props.onClose })
547
+ /* @__PURE__ */ jsx14(DialogActionButtons, { onClose: props.onClose })
542
548
  ] });
543
549
  };
544
550
 
@@ -546,21 +552,21 @@ var SeedPhraseDialogInner = (props) => {
546
552
  import { Cancel as CancelIcon, RadioButtonChecked as RadioButtonCheckedIcon } from "@mui/icons-material";
547
553
  import { Button as Button5, ButtonGroup as ButtonGroup2, TableCell as TableCell2, TableRow as TableRow2 } from "@mui/material";
548
554
  import { useState as useState7 } from "react";
549
- import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
555
+ import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
550
556
  var SeedPhraseTableRow = ({ changeSeedPhrase, seedPhrase, ...props }) => {
551
557
  const [open, setOpen] = useState7(false);
552
558
  const handleOpen = () => {
553
559
  setOpen(true);
554
560
  };
555
- return /* @__PURE__ */ jsxs12(TableRow2, { ...props, children: [
556
- /* @__PURE__ */ jsxs12(TableCell2, { children: [
561
+ return /* @__PURE__ */ jsxs13(TableRow2, { ...props, children: [
562
+ /* @__PURE__ */ jsxs13(TableCell2, { children: [
557
563
  "Seed Phrase ",
558
- /* @__PURE__ */ jsx14(SeedPhraseIconButton, {})
564
+ /* @__PURE__ */ jsx15(SeedPhraseIconButton, {})
559
565
  ] }),
560
- /* @__PURE__ */ jsx14(TableCell2, { align: "center", children: seedPhrase ? /* @__PURE__ */ jsx14(RadioButtonCheckedIcon, { color: "success" }) : /* @__PURE__ */ jsx14(CancelIcon, { color: "error" }) }),
561
- /* @__PURE__ */ jsxs12(TableCell2, { children: [
562
- /* @__PURE__ */ jsx14(SeedPhraseDialog, { changeSeedPhrase, open, onClose: () => setOpen(false), seedPhrase }),
563
- /* @__PURE__ */ jsx14(ButtonGroup2, { fullWidth: true, children: /* @__PURE__ */ jsx14(Button5, { variant: "contained", size: "small", onClick: handleOpen, children: "Update" }) })
566
+ /* @__PURE__ */ jsx15(TableCell2, { align: "center", children: seedPhrase ? /* @__PURE__ */ jsx15(RadioButtonCheckedIcon, { color: "success" }) : /* @__PURE__ */ jsx15(CancelIcon, { color: "error" }) }),
567
+ /* @__PURE__ */ jsxs13(TableCell2, { children: [
568
+ /* @__PURE__ */ jsx15(SeedPhraseDialog, { changeSeedPhrase, open, onClose: () => setOpen(false), seedPhrase }),
569
+ /* @__PURE__ */ jsx15(ButtonGroup2, { fullWidth: true, children: /* @__PURE__ */ jsx15(Button5, { variant: "contained", size: "small", onClick: handleOpen, children: "Update" }) })
564
570
  ] })
565
571
  ] });
566
572
  };
@@ -680,18 +686,18 @@ var useWrapperAccount = (account) => {
680
686
  };
681
687
 
682
688
  // src/components/WalletAccountDetails/WalletAccountDetails.tsx
683
- import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
689
+ import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
684
690
  var WalletAccountDetails = ({ exploreUrl = "https://explore.xyo.network", account, ...props }) => {
685
691
  const [accountToUse] = useAccount({ account });
686
692
  const { network } = useNetwork();
687
693
  const exploreAddressUrl = `${exploreUrl}/recent?account=${accountToUse?.address}&network=${network?.name ?? "main"}`;
688
- return /* @__PURE__ */ jsxs13(FlexCol, { ...props, children: [
689
- /* @__PURE__ */ jsx15(EthAccountButton, { address: EthAddress.fromString(accountToUse?.address) }),
690
- /* @__PURE__ */ jsxs13(FlexRow3, { gap: 1, children: [
691
- /* @__PURE__ */ jsx15(NumberStatus, { rounded: true, title: "Tokens", value: 0, to: `${exploreAddressUrl}&schema=network.xyo.account.tokens`, target: "_blank" }),
692
- /* @__PURE__ */ jsx15(NumberStatus, { rounded: true, title: "NFTs", value: 0, to: `${exploreAddressUrl}&schema=network.xyo.account.nfts`, target: "_blank" }),
693
- /* @__PURE__ */ jsx15(NumberStatus, { rounded: true, title: "Signatures", value: 0, to: `${exploreAddressUrl}&schema=network.xyo.account.signatures`, target: "_blank" }),
694
- /* @__PURE__ */ jsx15(NumberStatus, { rounded: true, title: "Signins", value: 0, to: `${exploreAddressUrl}&schema=network.xyo.account.signins`, target: "_blank" })
694
+ return /* @__PURE__ */ jsxs14(FlexCol, { ...props, children: [
695
+ /* @__PURE__ */ jsx16(EthAccountButton, { address: EthAddress.fromString(accountToUse?.address) }),
696
+ /* @__PURE__ */ jsxs14(FlexRow3, { gap: 1, children: [
697
+ /* @__PURE__ */ jsx16(NumberStatus, { rounded: true, title: "Tokens", value: 0, to: `${exploreAddressUrl}&schema=network.xyo.account.tokens`, target: "_blank" }),
698
+ /* @__PURE__ */ jsx16(NumberStatus, { rounded: true, title: "NFTs", value: 0, to: `${exploreAddressUrl}&schema=network.xyo.account.nfts`, target: "_blank" }),
699
+ /* @__PURE__ */ jsx16(NumberStatus, { rounded: true, title: "Signatures", value: 0, to: `${exploreAddressUrl}&schema=network.xyo.account.signatures`, target: "_blank" }),
700
+ /* @__PURE__ */ jsx16(NumberStatus, { rounded: true, title: "Signins", value: 0, to: `${exploreAddressUrl}&schema=network.xyo.account.signins`, target: "_blank" })
695
701
  ] })
696
702
  ] });
697
703
  };
@@ -700,7 +706,7 @@ var WalletAccountDetails = ({ exploreUrl = "https://explore.xyo.network", accoun
700
706
  import { CircularProgress, MenuItem } from "@mui/material";
701
707
  import { SelectEx } from "@xylabs/react-select";
702
708
  import { AddressRenderRowBox } from "@xyo-network/react-address-render";
703
- import { Fragment as Fragment5, jsx as jsx16 } from "react/jsx-runtime";
709
+ import { Fragment as Fragment5, jsx as jsx17 } from "react/jsx-runtime";
704
710
  var arrayRange = (length, start = 0) => {
705
711
  return [...Array.from({ length }).keys()].map((x) => x + start);
706
712
  };
@@ -717,7 +723,7 @@ var WalletAccountSelect = ({
717
723
  }) => {
718
724
  const { activeAccountIndex = 0, setActiveAccountIndex, coinTypeWallet } = useWalletContext();
719
725
  const disabled = !coinTypeWallet || activeAccountIndex === void 0;
720
- return /* @__PURE__ */ jsx16(Fragment5, { children: coinTypeWallet ? /* @__PURE__ */ jsx16(
726
+ return /* @__PURE__ */ jsx17(Fragment5, { children: coinTypeWallet ? /* @__PURE__ */ jsx17(
721
727
  SelectEx,
722
728
  {
723
729
  margin: "dense",
@@ -727,7 +733,7 @@ var WalletAccountSelect = ({
727
733
  const [selectedAccount] = useWallet({ path: selectedAccountIndex.toString(), wallet: coinTypeWallet });
728
734
  const customName = selectedAccount ? addressNames[selectedAccount.address] : void 0;
729
735
  const favorite = !!selectedAccount && selectedAccount.address in addressNames;
730
- return /* @__PURE__ */ jsx16(MenuItem, { value: selectedAccountIndex, sx: { minHeight: 0, paddingBottom: 0, paddingTop: 0 }, children: /* @__PURE__ */ jsx16(
736
+ return /* @__PURE__ */ jsx17(MenuItem, { value: selectedAccountIndex, sx: { minHeight: 0, paddingBottom: 0, paddingTop: 0 }, children: /* @__PURE__ */ jsx17(
731
737
  AddressRenderRowBox,
732
738
  {
733
739
  disableSharedRef: true,
@@ -742,7 +748,7 @@ var WalletAccountSelect = ({
742
748
  }
743
749
  ) });
744
750
  };
745
- return /* @__PURE__ */ jsx16(Item, {});
751
+ return /* @__PURE__ */ jsx17(Item, {});
746
752
  },
747
753
  value: activeAccountIndex,
748
754
  onChange: (event) => setActiveAccountIndex?.(Number.parseInt(`${event.target.value}`)),
@@ -754,7 +760,7 @@ var WalletAccountSelect = ({
754
760
  const [account] = useWallet({ path: index.toString(), wallet: coinTypeWallet });
755
761
  const customName = account ? addressNames[account.address] : void 0;
756
762
  const favorite = !!account && account.address in addressNames;
757
- return /* @__PURE__ */ jsx16(MenuItem, { value: index, sx: { minHeight: 0, paddingBottom: 0, paddingTop: 0 }, children: /* @__PURE__ */ jsx16(
763
+ return /* @__PURE__ */ jsx17(MenuItem, { value: index, sx: { minHeight: 0, paddingBottom: 0, paddingTop: 0 }, children: /* @__PURE__ */ jsx17(
758
764
  AddressRenderRowBox,
759
765
  {
760
766
  disableSharedRef: true,
@@ -769,15 +775,15 @@ var WalletAccountSelect = ({
769
775
  }
770
776
  ) }, account?.address);
771
777
  };
772
- return /* @__PURE__ */ jsx16(Item, {}, index);
778
+ return /* @__PURE__ */ jsx17(Item, {}, index);
773
779
  })
774
780
  }
775
- ) : /* @__PURE__ */ jsx16(CircularProgress, { size: 24 }) });
781
+ ) : /* @__PURE__ */ jsx17(CircularProgress, { size: 24 }) });
776
782
  };
777
783
 
778
784
  // src/components/WalletAccountSelect/SelectBar.tsx
779
785
  import { FlexCol as FlexCol2 } from "@xylabs/react-flexbox";
780
- import { jsx as jsx17 } from "react/jsx-runtime";
786
+ import { jsx as jsx18 } from "react/jsx-runtime";
781
787
  var WalletAccountSelectBar = ({
782
788
  addressNames = {},
783
789
  iconOnly,
@@ -788,7 +794,7 @@ var WalletAccountSelectBar = ({
788
794
  size = "small",
789
795
  ...props
790
796
  }) => {
791
- return /* @__PURE__ */ jsx17(FlexCol2, { alignItems: "stretch", ...props, children: /* @__PURE__ */ jsx17(
797
+ return /* @__PURE__ */ jsx18(FlexCol2, { alignItems: "stretch", ...props, children: /* @__PURE__ */ jsx18(
792
798
  WalletAccountSelect,
793
799
  {
794
800
  addressNames,
@@ -806,7 +812,14 @@ var WalletAccountSelectBar = ({
806
812
  export {
807
813
  Bip44,
808
814
  DefaultSeedPhrase,
815
+ DialogActionButtons,
816
+ InvalidPhraseTypography,
809
817
  MaxAccountsTableRow,
818
+ NewPhraseTextField,
819
+ OverwriteWarning,
820
+ PhraseDialogActions,
821
+ PhraseHeaderBox,
822
+ SavedPhraseTextField,
810
823
  SeedPhraseContext,
811
824
  SeedPhraseDialog,
812
825
  SeedPhraseDialogInner,
@@ -819,6 +832,7 @@ export {
819
832
  WalletContext,
820
833
  WalletProvider,
821
834
  WalletRootPath,
835
+ colorParser,
822
836
  ethereumAccountPath,
823
837
  useAccount,
824
838
  useCoinTypeWallet,