@xyo-network/react-connected-accounts 2.66.3 → 2.66.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (440) hide show
  1. package/dist/browser/classes/EnabledWallets.d.cts +39 -0
  2. package/dist/browser/classes/EnabledWallets.d.cts.map +1 -0
  3. package/dist/browser/classes/EnabledWallets.d.mts +39 -0
  4. package/dist/browser/classes/EnabledWallets.d.mts.map +1 -0
  5. package/dist/browser/classes/EnabledWallets.d.ts +39 -0
  6. package/dist/browser/classes/EnabledWallets.d.ts.map +1 -0
  7. package/dist/browser/classes/index.d.cts +2 -0
  8. package/dist/browser/classes/index.d.cts.map +1 -0
  9. package/dist/browser/classes/index.d.mts +2 -0
  10. package/dist/browser/classes/index.d.mts.map +1 -0
  11. package/dist/browser/classes/index.d.ts +2 -0
  12. package/dist/browser/classes/index.d.ts.map +1 -0
  13. package/dist/browser/components/ConnectedAccountsFlexbox.d.cts +5 -1
  14. package/dist/browser/components/ConnectedAccountsFlexbox.d.cts.map +1 -1
  15. package/dist/browser/components/ConnectedAccountsFlexbox.d.mts +5 -1
  16. package/dist/browser/components/ConnectedAccountsFlexbox.d.mts.map +1 -1
  17. package/dist/browser/components/ConnectedAccountsFlexbox.d.ts +5 -1
  18. package/dist/browser/components/ConnectedAccountsFlexbox.d.ts.map +1 -1
  19. package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.cts +7 -0
  20. package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.cts.map +1 -0
  21. package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.mts +7 -0
  22. package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.mts.map +1 -0
  23. package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.ts +7 -0
  24. package/dist/browser/components/wallet/dialogs/connect/CheckboxFormControl.d.ts.map +1 -0
  25. package/dist/browser/components/wallet/dialogs/connect/Dialog.d.cts +9 -0
  26. package/dist/browser/components/wallet/dialogs/connect/Dialog.d.cts.map +1 -0
  27. package/dist/browser/components/wallet/dialogs/connect/Dialog.d.mts +9 -0
  28. package/dist/browser/components/wallet/dialogs/connect/Dialog.d.mts.map +1 -0
  29. package/dist/browser/components/wallet/dialogs/connect/Dialog.d.ts +9 -0
  30. package/dist/browser/components/wallet/dialogs/connect/Dialog.d.ts.map +1 -0
  31. package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts +8 -0
  32. package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts.map +1 -0
  33. package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts +8 -0
  34. package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts.map +1 -0
  35. package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts +8 -0
  36. package/dist/browser/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts.map +1 -0
  37. package/dist/browser/components/wallet/dialogs/connect/Permissions.d.cts +6 -0
  38. package/dist/browser/components/wallet/dialogs/connect/Permissions.d.cts.map +1 -0
  39. package/dist/browser/components/wallet/dialogs/connect/Permissions.d.mts +6 -0
  40. package/dist/browser/components/wallet/dialogs/connect/Permissions.d.mts.map +1 -0
  41. package/dist/browser/components/wallet/dialogs/connect/Permissions.d.ts +6 -0
  42. package/dist/browser/components/wallet/dialogs/connect/Permissions.d.ts.map +1 -0
  43. package/dist/browser/components/wallet/dialogs/connect/index.d.cts +3 -0
  44. package/dist/browser/components/wallet/dialogs/connect/index.d.cts.map +1 -0
  45. package/dist/browser/components/wallet/dialogs/connect/index.d.mts +3 -0
  46. package/dist/browser/components/wallet/dialogs/connect/index.d.mts.map +1 -0
  47. package/dist/browser/components/wallet/dialogs/connect/index.d.ts +3 -0
  48. package/dist/browser/components/wallet/dialogs/connect/index.d.ts.map +1 -0
  49. package/dist/browser/components/wallet/dialogs/index.d.cts +3 -0
  50. package/dist/browser/components/wallet/dialogs/index.d.cts.map +1 -0
  51. package/dist/browser/components/wallet/dialogs/index.d.mts +3 -0
  52. package/dist/browser/components/wallet/dialogs/index.d.mts.map +1 -0
  53. package/dist/browser/components/wallet/dialogs/index.d.ts +3 -0
  54. package/dist/browser/components/wallet/dialogs/index.d.ts.map +1 -0
  55. package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.cts +8 -0
  56. package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.cts.map +1 -0
  57. package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.mts +8 -0
  58. package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.mts.map +1 -0
  59. package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.ts +8 -0
  60. package/dist/browser/components/wallet/dialogs/revoke/Dialog.d.ts.map +1 -0
  61. package/dist/browser/components/wallet/dialogs/revoke/index.d.cts +2 -0
  62. package/dist/browser/components/wallet/dialogs/revoke/index.d.cts.map +1 -0
  63. package/dist/browser/components/wallet/dialogs/revoke/index.d.mts +2 -0
  64. package/dist/browser/components/wallet/dialogs/revoke/index.d.mts.map +1 -0
  65. package/dist/browser/components/wallet/dialogs/revoke/index.d.ts +2 -0
  66. package/dist/browser/components/wallet/dialogs/revoke/index.d.ts.map +1 -0
  67. package/dist/browser/components/wallet/index.d.cts +1 -0
  68. package/dist/browser/components/wallet/index.d.cts.map +1 -1
  69. package/dist/browser/components/wallet/index.d.mts +1 -0
  70. package/dist/browser/components/wallet/index.d.mts.map +1 -1
  71. package/dist/browser/components/wallet/index.d.ts +1 -0
  72. package/dist/browser/components/wallet/index.d.ts.map +1 -1
  73. package/dist/browser/components/wallet/lib/ActiveProvider.d.cts +7 -0
  74. package/dist/browser/components/wallet/lib/ActiveProvider.d.cts.map +1 -0
  75. package/dist/browser/components/wallet/lib/ActiveProvider.d.mts +7 -0
  76. package/dist/browser/components/wallet/lib/ActiveProvider.d.mts.map +1 -0
  77. package/dist/browser/components/wallet/lib/ActiveProvider.d.ts +7 -0
  78. package/dist/browser/components/wallet/lib/ActiveProvider.d.ts.map +1 -0
  79. package/dist/browser/components/wallet/lib/TableHeadData.d.cts.map +1 -1
  80. package/dist/browser/components/wallet/lib/TableHeadData.d.mts.map +1 -1
  81. package/dist/browser/components/wallet/lib/TableHeadData.d.ts.map +1 -1
  82. package/dist/browser/components/wallet/lib/index.d.cts +1 -0
  83. package/dist/browser/components/wallet/lib/index.d.cts.map +1 -1
  84. package/dist/browser/components/wallet/lib/index.d.mts +1 -0
  85. package/dist/browser/components/wallet/lib/index.d.mts.map +1 -1
  86. package/dist/browser/components/wallet/lib/index.d.ts +1 -0
  87. package/dist/browser/components/wallet/lib/index.d.ts.map +1 -1
  88. package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.cts +2 -0
  89. package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.cts.map +1 -1
  90. package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.mts +2 -0
  91. package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.mts.map +1 -1
  92. package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.ts +2 -0
  93. package/dist/browser/components/wallet/table/ConnectedWalletsTable.d.ts.map +1 -1
  94. package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.cts +6 -10
  95. package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.cts.map +1 -1
  96. package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.mts +6 -10
  97. package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.mts.map +1 -1
  98. package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.ts +6 -10
  99. package/dist/browser/components/wallet/table/ConnectedWalletsTableRow.d.ts.map +1 -1
  100. package/dist/browser/components/wallet/table/cells/Accounts.d.cts +4 -0
  101. package/dist/browser/components/wallet/table/cells/Accounts.d.cts.map +1 -0
  102. package/dist/browser/components/wallet/table/cells/Accounts.d.mts +4 -0
  103. package/dist/browser/components/wallet/table/cells/Accounts.d.mts.map +1 -0
  104. package/dist/browser/components/wallet/table/cells/Accounts.d.ts +4 -0
  105. package/dist/browser/components/wallet/table/cells/Accounts.d.ts.map +1 -0
  106. package/dist/browser/components/wallet/table/cells/Actions.d.cts +4 -0
  107. package/dist/browser/components/wallet/table/cells/Actions.d.cts.map +1 -0
  108. package/dist/browser/components/wallet/table/cells/Actions.d.mts +4 -0
  109. package/dist/browser/components/wallet/table/cells/Actions.d.mts.map +1 -0
  110. package/dist/browser/components/wallet/table/cells/Actions.d.ts +4 -0
  111. package/dist/browser/components/wallet/table/cells/Actions.d.ts.map +1 -0
  112. package/dist/browser/components/wallet/table/cells/Cells.d.cts +4 -0
  113. package/dist/browser/components/wallet/table/cells/Cells.d.cts.map +1 -0
  114. package/dist/browser/components/wallet/table/cells/Cells.d.mts +4 -0
  115. package/dist/browser/components/wallet/table/cells/Cells.d.mts.map +1 -0
  116. package/dist/browser/components/wallet/table/cells/Cells.d.ts +4 -0
  117. package/dist/browser/components/wallet/table/cells/Cells.d.ts.map +1 -0
  118. package/dist/browser/components/wallet/table/cells/ChainName.d.cts +4 -0
  119. package/dist/browser/components/wallet/table/cells/ChainName.d.cts.map +1 -0
  120. package/dist/browser/components/wallet/table/cells/ChainName.d.mts +4 -0
  121. package/dist/browser/components/wallet/table/cells/ChainName.d.mts.map +1 -0
  122. package/dist/browser/components/wallet/table/cells/ChainName.d.ts +4 -0
  123. package/dist/browser/components/wallet/table/cells/ChainName.d.ts.map +1 -0
  124. package/dist/browser/components/wallet/table/cells/State.d.cts +4 -0
  125. package/dist/browser/components/wallet/table/cells/State.d.cts.map +1 -0
  126. package/dist/browser/components/wallet/table/cells/State.d.mts +4 -0
  127. package/dist/browser/components/wallet/table/cells/State.d.mts.map +1 -0
  128. package/dist/browser/components/wallet/table/cells/State.d.ts +4 -0
  129. package/dist/browser/components/wallet/table/cells/State.d.ts.map +1 -0
  130. package/dist/browser/components/wallet/table/cells/Wallet.d.cts +4 -0
  131. package/dist/browser/components/wallet/table/cells/Wallet.d.cts.map +1 -0
  132. package/dist/browser/components/wallet/table/cells/Wallet.d.mts +4 -0
  133. package/dist/browser/components/wallet/table/cells/Wallet.d.mts.map +1 -0
  134. package/dist/browser/components/wallet/table/cells/Wallet.d.ts +4 -0
  135. package/dist/browser/components/wallet/table/cells/Wallet.d.ts.map +1 -0
  136. package/dist/browser/components/wallet/table/cells/index.d.cts +7 -0
  137. package/dist/browser/components/wallet/table/cells/index.d.cts.map +1 -0
  138. package/dist/browser/components/wallet/table/cells/index.d.mts +7 -0
  139. package/dist/browser/components/wallet/table/cells/index.d.mts.map +1 -0
  140. package/dist/browser/components/wallet/table/cells/index.d.ts +7 -0
  141. package/dist/browser/components/wallet/table/cells/index.d.ts.map +1 -0
  142. package/dist/browser/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.cts +15 -0
  143. package/dist/browser/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.cts.map +1 -0
  144. package/dist/browser/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.mts +15 -0
  145. package/dist/browser/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.mts.map +1 -0
  146. package/dist/browser/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.ts +15 -0
  147. package/dist/browser/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.ts.map +1 -0
  148. package/dist/browser/components/wallet/table/cells/lib/index.d.cts +2 -0
  149. package/dist/browser/components/wallet/table/cells/lib/index.d.cts.map +1 -0
  150. package/dist/browser/components/wallet/table/cells/lib/index.d.mts +2 -0
  151. package/dist/browser/components/wallet/table/cells/lib/index.d.mts.map +1 -0
  152. package/dist/browser/components/wallet/table/cells/lib/index.d.ts +2 -0
  153. package/dist/browser/components/wallet/table/cells/lib/index.d.ts.map +1 -0
  154. package/dist/browser/components/wallet/table/hooks/index.d.cts +2 -0
  155. package/dist/browser/components/wallet/table/hooks/index.d.cts.map +1 -0
  156. package/dist/browser/components/wallet/table/hooks/index.d.mts +2 -0
  157. package/dist/browser/components/wallet/table/hooks/index.d.mts.map +1 -0
  158. package/dist/browser/components/wallet/table/hooks/index.d.ts +2 -0
  159. package/dist/browser/components/wallet/table/hooks/index.d.ts.map +1 -0
  160. package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.cts +4 -0
  161. package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.cts.map +1 -0
  162. package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.mts +4 -0
  163. package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.mts.map +1 -0
  164. package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.ts +4 -0
  165. package/dist/browser/components/wallet/table/hooks/useActiveProviderDialogState.d.ts.map +1 -0
  166. package/dist/browser/components/wallet/table/index.d.cts +2 -0
  167. package/dist/browser/components/wallet/table/index.d.cts.map +1 -1
  168. package/dist/browser/components/wallet/table/index.d.mts +2 -0
  169. package/dist/browser/components/wallet/table/index.d.mts.map +1 -1
  170. package/dist/browser/components/wallet/table/index.d.ts +2 -0
  171. package/dist/browser/components/wallet/table/index.d.ts.map +1 -1
  172. package/dist/browser/hooks/index.d.cts +1 -0
  173. package/dist/browser/hooks/index.d.cts.map +1 -1
  174. package/dist/browser/hooks/index.d.mts +1 -0
  175. package/dist/browser/hooks/index.d.mts.map +1 -1
  176. package/dist/browser/hooks/index.d.ts +1 -0
  177. package/dist/browser/hooks/index.d.ts.map +1 -1
  178. package/dist/browser/hooks/useEnabledWallets.d.cts +15 -0
  179. package/dist/browser/hooks/useEnabledWallets.d.cts.map +1 -0
  180. package/dist/browser/hooks/useEnabledWallets.d.mts +15 -0
  181. package/dist/browser/hooks/useEnabledWallets.d.mts.map +1 -0
  182. package/dist/browser/hooks/useEnabledWallets.d.ts +15 -0
  183. package/dist/browser/hooks/useEnabledWallets.d.ts.map +1 -0
  184. package/dist/browser/img/index.d.cts +4 -0
  185. package/dist/browser/img/index.d.cts.map +1 -0
  186. package/dist/browser/img/index.d.mts +4 -0
  187. package/dist/browser/img/index.d.mts.map +1 -0
  188. package/dist/browser/img/index.d.ts +4 -0
  189. package/dist/browser/img/index.d.ts.map +1 -0
  190. package/dist/browser/index.cjs +462 -79
  191. package/dist/browser/index.cjs.map +1 -1
  192. package/dist/browser/index.d.cts +1 -0
  193. package/dist/browser/index.d.cts.map +1 -1
  194. package/dist/browser/index.d.mts +1 -0
  195. package/dist/browser/index.d.mts.map +1 -1
  196. package/dist/browser/index.d.ts +1 -0
  197. package/dist/browser/index.d.ts.map +1 -1
  198. package/dist/browser/index.js +452 -79
  199. package/dist/browser/index.js.map +1 -1
  200. package/dist/browser/xyo-color-logo-LHR2SMEM.svg +1 -0
  201. package/dist/browser/xyo-color-logo-text-only-QPAW5BSQ.svg +1 -0
  202. package/dist/node/classes/EnabledWallets.d.cts +39 -0
  203. package/dist/node/classes/EnabledWallets.d.cts.map +1 -0
  204. package/dist/node/classes/EnabledWallets.d.mts +39 -0
  205. package/dist/node/classes/EnabledWallets.d.mts.map +1 -0
  206. package/dist/node/classes/EnabledWallets.d.ts +39 -0
  207. package/dist/node/classes/EnabledWallets.d.ts.map +1 -0
  208. package/dist/node/classes/index.d.cts +2 -0
  209. package/dist/node/classes/index.d.cts.map +1 -0
  210. package/dist/node/classes/index.d.mts +2 -0
  211. package/dist/node/classes/index.d.mts.map +1 -0
  212. package/dist/node/classes/index.d.ts +2 -0
  213. package/dist/node/classes/index.d.ts.map +1 -0
  214. package/dist/node/components/ConnectedAccountsFlexbox.d.cts +5 -1
  215. package/dist/node/components/ConnectedAccountsFlexbox.d.cts.map +1 -1
  216. package/dist/node/components/ConnectedAccountsFlexbox.d.mts +5 -1
  217. package/dist/node/components/ConnectedAccountsFlexbox.d.mts.map +1 -1
  218. package/dist/node/components/ConnectedAccountsFlexbox.d.ts +5 -1
  219. package/dist/node/components/ConnectedAccountsFlexbox.d.ts.map +1 -1
  220. package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.cts +7 -0
  221. package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.cts.map +1 -0
  222. package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.mts +7 -0
  223. package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.mts.map +1 -0
  224. package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.ts +7 -0
  225. package/dist/node/components/wallet/dialogs/connect/CheckboxFormControl.d.ts.map +1 -0
  226. package/dist/node/components/wallet/dialogs/connect/Dialog.d.cts +9 -0
  227. package/dist/node/components/wallet/dialogs/connect/Dialog.d.cts.map +1 -0
  228. package/dist/node/components/wallet/dialogs/connect/Dialog.d.mts +9 -0
  229. package/dist/node/components/wallet/dialogs/connect/Dialog.d.mts.map +1 -0
  230. package/dist/node/components/wallet/dialogs/connect/Dialog.d.ts +9 -0
  231. package/dist/node/components/wallet/dialogs/connect/Dialog.d.ts.map +1 -0
  232. package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts +8 -0
  233. package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.cts.map +1 -0
  234. package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts +8 -0
  235. package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.mts.map +1 -0
  236. package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts +8 -0
  237. package/dist/node/components/wallet/dialogs/connect/LinkedProvidersFlexbox.d.ts.map +1 -0
  238. package/dist/node/components/wallet/dialogs/connect/Permissions.d.cts +6 -0
  239. package/dist/node/components/wallet/dialogs/connect/Permissions.d.cts.map +1 -0
  240. package/dist/node/components/wallet/dialogs/connect/Permissions.d.mts +6 -0
  241. package/dist/node/components/wallet/dialogs/connect/Permissions.d.mts.map +1 -0
  242. package/dist/node/components/wallet/dialogs/connect/Permissions.d.ts +6 -0
  243. package/dist/node/components/wallet/dialogs/connect/Permissions.d.ts.map +1 -0
  244. package/dist/node/components/wallet/dialogs/connect/index.d.cts +3 -0
  245. package/dist/node/components/wallet/dialogs/connect/index.d.cts.map +1 -0
  246. package/dist/node/components/wallet/dialogs/connect/index.d.mts +3 -0
  247. package/dist/node/components/wallet/dialogs/connect/index.d.mts.map +1 -0
  248. package/dist/node/components/wallet/dialogs/connect/index.d.ts +3 -0
  249. package/dist/node/components/wallet/dialogs/connect/index.d.ts.map +1 -0
  250. package/dist/node/components/wallet/dialogs/index.d.cts +3 -0
  251. package/dist/node/components/wallet/dialogs/index.d.cts.map +1 -0
  252. package/dist/node/components/wallet/dialogs/index.d.mts +3 -0
  253. package/dist/node/components/wallet/dialogs/index.d.mts.map +1 -0
  254. package/dist/node/components/wallet/dialogs/index.d.ts +3 -0
  255. package/dist/node/components/wallet/dialogs/index.d.ts.map +1 -0
  256. package/dist/node/components/wallet/dialogs/revoke/Dialog.d.cts +8 -0
  257. package/dist/node/components/wallet/dialogs/revoke/Dialog.d.cts.map +1 -0
  258. package/dist/node/components/wallet/dialogs/revoke/Dialog.d.mts +8 -0
  259. package/dist/node/components/wallet/dialogs/revoke/Dialog.d.mts.map +1 -0
  260. package/dist/node/components/wallet/dialogs/revoke/Dialog.d.ts +8 -0
  261. package/dist/node/components/wallet/dialogs/revoke/Dialog.d.ts.map +1 -0
  262. package/dist/node/components/wallet/dialogs/revoke/index.d.cts +2 -0
  263. package/dist/node/components/wallet/dialogs/revoke/index.d.cts.map +1 -0
  264. package/dist/node/components/wallet/dialogs/revoke/index.d.mts +2 -0
  265. package/dist/node/components/wallet/dialogs/revoke/index.d.mts.map +1 -0
  266. package/dist/node/components/wallet/dialogs/revoke/index.d.ts +2 -0
  267. package/dist/node/components/wallet/dialogs/revoke/index.d.ts.map +1 -0
  268. package/dist/node/components/wallet/index.d.cts +1 -0
  269. package/dist/node/components/wallet/index.d.cts.map +1 -1
  270. package/dist/node/components/wallet/index.d.mts +1 -0
  271. package/dist/node/components/wallet/index.d.mts.map +1 -1
  272. package/dist/node/components/wallet/index.d.ts +1 -0
  273. package/dist/node/components/wallet/index.d.ts.map +1 -1
  274. package/dist/node/components/wallet/lib/ActiveProvider.d.cts +7 -0
  275. package/dist/node/components/wallet/lib/ActiveProvider.d.cts.map +1 -0
  276. package/dist/node/components/wallet/lib/ActiveProvider.d.mts +7 -0
  277. package/dist/node/components/wallet/lib/ActiveProvider.d.mts.map +1 -0
  278. package/dist/node/components/wallet/lib/ActiveProvider.d.ts +7 -0
  279. package/dist/node/components/wallet/lib/ActiveProvider.d.ts.map +1 -0
  280. package/dist/node/components/wallet/lib/TableHeadData.d.cts.map +1 -1
  281. package/dist/node/components/wallet/lib/TableHeadData.d.mts.map +1 -1
  282. package/dist/node/components/wallet/lib/TableHeadData.d.ts.map +1 -1
  283. package/dist/node/components/wallet/lib/index.d.cts +1 -0
  284. package/dist/node/components/wallet/lib/index.d.cts.map +1 -1
  285. package/dist/node/components/wallet/lib/index.d.mts +1 -0
  286. package/dist/node/components/wallet/lib/index.d.mts.map +1 -1
  287. package/dist/node/components/wallet/lib/index.d.ts +1 -0
  288. package/dist/node/components/wallet/lib/index.d.ts.map +1 -1
  289. package/dist/node/components/wallet/table/ConnectedWalletsTable.d.cts +2 -0
  290. package/dist/node/components/wallet/table/ConnectedWalletsTable.d.cts.map +1 -1
  291. package/dist/node/components/wallet/table/ConnectedWalletsTable.d.mts +2 -0
  292. package/dist/node/components/wallet/table/ConnectedWalletsTable.d.mts.map +1 -1
  293. package/dist/node/components/wallet/table/ConnectedWalletsTable.d.ts +2 -0
  294. package/dist/node/components/wallet/table/ConnectedWalletsTable.d.ts.map +1 -1
  295. package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.cts +6 -10
  296. package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.cts.map +1 -1
  297. package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.mts +6 -10
  298. package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.mts.map +1 -1
  299. package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.ts +6 -10
  300. package/dist/node/components/wallet/table/ConnectedWalletsTableRow.d.ts.map +1 -1
  301. package/dist/node/components/wallet/table/cells/Accounts.d.cts +4 -0
  302. package/dist/node/components/wallet/table/cells/Accounts.d.cts.map +1 -0
  303. package/dist/node/components/wallet/table/cells/Accounts.d.mts +4 -0
  304. package/dist/node/components/wallet/table/cells/Accounts.d.mts.map +1 -0
  305. package/dist/node/components/wallet/table/cells/Accounts.d.ts +4 -0
  306. package/dist/node/components/wallet/table/cells/Accounts.d.ts.map +1 -0
  307. package/dist/node/components/wallet/table/cells/Actions.d.cts +4 -0
  308. package/dist/node/components/wallet/table/cells/Actions.d.cts.map +1 -0
  309. package/dist/node/components/wallet/table/cells/Actions.d.mts +4 -0
  310. package/dist/node/components/wallet/table/cells/Actions.d.mts.map +1 -0
  311. package/dist/node/components/wallet/table/cells/Actions.d.ts +4 -0
  312. package/dist/node/components/wallet/table/cells/Actions.d.ts.map +1 -0
  313. package/dist/node/components/wallet/table/cells/Cells.d.cts +4 -0
  314. package/dist/node/components/wallet/table/cells/Cells.d.cts.map +1 -0
  315. package/dist/node/components/wallet/table/cells/Cells.d.mts +4 -0
  316. package/dist/node/components/wallet/table/cells/Cells.d.mts.map +1 -0
  317. package/dist/node/components/wallet/table/cells/Cells.d.ts +4 -0
  318. package/dist/node/components/wallet/table/cells/Cells.d.ts.map +1 -0
  319. package/dist/node/components/wallet/table/cells/ChainName.d.cts +4 -0
  320. package/dist/node/components/wallet/table/cells/ChainName.d.cts.map +1 -0
  321. package/dist/node/components/wallet/table/cells/ChainName.d.mts +4 -0
  322. package/dist/node/components/wallet/table/cells/ChainName.d.mts.map +1 -0
  323. package/dist/node/components/wallet/table/cells/ChainName.d.ts +4 -0
  324. package/dist/node/components/wallet/table/cells/ChainName.d.ts.map +1 -0
  325. package/dist/node/components/wallet/table/cells/State.d.cts +4 -0
  326. package/dist/node/components/wallet/table/cells/State.d.cts.map +1 -0
  327. package/dist/node/components/wallet/table/cells/State.d.mts +4 -0
  328. package/dist/node/components/wallet/table/cells/State.d.mts.map +1 -0
  329. package/dist/node/components/wallet/table/cells/State.d.ts +4 -0
  330. package/dist/node/components/wallet/table/cells/State.d.ts.map +1 -0
  331. package/dist/node/components/wallet/table/cells/Wallet.d.cts +4 -0
  332. package/dist/node/components/wallet/table/cells/Wallet.d.cts.map +1 -0
  333. package/dist/node/components/wallet/table/cells/Wallet.d.mts +4 -0
  334. package/dist/node/components/wallet/table/cells/Wallet.d.mts.map +1 -0
  335. package/dist/node/components/wallet/table/cells/Wallet.d.ts +4 -0
  336. package/dist/node/components/wallet/table/cells/Wallet.d.ts.map +1 -0
  337. package/dist/node/components/wallet/table/cells/index.d.cts +7 -0
  338. package/dist/node/components/wallet/table/cells/index.d.cts.map +1 -0
  339. package/dist/node/components/wallet/table/cells/index.d.mts +7 -0
  340. package/dist/node/components/wallet/table/cells/index.d.mts.map +1 -0
  341. package/dist/node/components/wallet/table/cells/index.d.ts +7 -0
  342. package/dist/node/components/wallet/table/cells/index.d.ts.map +1 -0
  343. package/dist/node/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.cts +15 -0
  344. package/dist/node/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.cts.map +1 -0
  345. package/dist/node/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.mts +15 -0
  346. package/dist/node/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.mts.map +1 -0
  347. package/dist/node/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.ts +15 -0
  348. package/dist/node/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.d.ts.map +1 -0
  349. package/dist/node/components/wallet/table/cells/lib/index.d.cts +2 -0
  350. package/dist/node/components/wallet/table/cells/lib/index.d.cts.map +1 -0
  351. package/dist/node/components/wallet/table/cells/lib/index.d.mts +2 -0
  352. package/dist/node/components/wallet/table/cells/lib/index.d.mts.map +1 -0
  353. package/dist/node/components/wallet/table/cells/lib/index.d.ts +2 -0
  354. package/dist/node/components/wallet/table/cells/lib/index.d.ts.map +1 -0
  355. package/dist/node/components/wallet/table/hooks/index.d.cts +2 -0
  356. package/dist/node/components/wallet/table/hooks/index.d.cts.map +1 -0
  357. package/dist/node/components/wallet/table/hooks/index.d.mts +2 -0
  358. package/dist/node/components/wallet/table/hooks/index.d.mts.map +1 -0
  359. package/dist/node/components/wallet/table/hooks/index.d.ts +2 -0
  360. package/dist/node/components/wallet/table/hooks/index.d.ts.map +1 -0
  361. package/dist/node/components/wallet/table/hooks/useActiveProviderDialogState.d.cts +4 -0
  362. package/dist/node/components/wallet/table/hooks/useActiveProviderDialogState.d.cts.map +1 -0
  363. package/dist/node/components/wallet/table/hooks/useActiveProviderDialogState.d.mts +4 -0
  364. package/dist/node/components/wallet/table/hooks/useActiveProviderDialogState.d.mts.map +1 -0
  365. package/dist/node/components/wallet/table/hooks/useActiveProviderDialogState.d.ts +4 -0
  366. package/dist/node/components/wallet/table/hooks/useActiveProviderDialogState.d.ts.map +1 -0
  367. package/dist/node/components/wallet/table/index.d.cts +2 -0
  368. package/dist/node/components/wallet/table/index.d.cts.map +1 -1
  369. package/dist/node/components/wallet/table/index.d.mts +2 -0
  370. package/dist/node/components/wallet/table/index.d.mts.map +1 -1
  371. package/dist/node/components/wallet/table/index.d.ts +2 -0
  372. package/dist/node/components/wallet/table/index.d.ts.map +1 -1
  373. package/dist/node/hooks/index.d.cts +1 -0
  374. package/dist/node/hooks/index.d.cts.map +1 -1
  375. package/dist/node/hooks/index.d.mts +1 -0
  376. package/dist/node/hooks/index.d.mts.map +1 -1
  377. package/dist/node/hooks/index.d.ts +1 -0
  378. package/dist/node/hooks/index.d.ts.map +1 -1
  379. package/dist/node/hooks/useEnabledWallets.d.cts +15 -0
  380. package/dist/node/hooks/useEnabledWallets.d.cts.map +1 -0
  381. package/dist/node/hooks/useEnabledWallets.d.mts +15 -0
  382. package/dist/node/hooks/useEnabledWallets.d.mts.map +1 -0
  383. package/dist/node/hooks/useEnabledWallets.d.ts +15 -0
  384. package/dist/node/hooks/useEnabledWallets.d.ts.map +1 -0
  385. package/dist/node/img/index.d.cts +4 -0
  386. package/dist/node/img/index.d.cts.map +1 -0
  387. package/dist/node/img/index.d.mts +4 -0
  388. package/dist/node/img/index.d.mts.map +1 -0
  389. package/dist/node/img/index.d.ts +4 -0
  390. package/dist/node/img/index.d.ts.map +1 -0
  391. package/dist/node/index.cjs +487 -84
  392. package/dist/node/index.cjs.map +1 -1
  393. package/dist/node/index.d.cts +1 -0
  394. package/dist/node/index.d.cts.map +1 -1
  395. package/dist/node/index.d.mts +1 -0
  396. package/dist/node/index.d.mts.map +1 -1
  397. package/dist/node/index.d.ts +1 -0
  398. package/dist/node/index.d.ts.map +1 -1
  399. package/dist/node/index.js +463 -82
  400. package/dist/node/index.js.map +1 -1
  401. package/dist/node/xyo-color-logo-LHR2SMEM.svg +1 -0
  402. package/dist/node/xyo-color-logo-text-only-QPAW5BSQ.svg +1 -0
  403. package/package.json +4 -4
  404. package/src/classes/EnabledWallets.ts +128 -0
  405. package/src/classes/index.ts +1 -0
  406. package/src/components/ConnectedAccountsFlexbox.stories.tsx +11 -1
  407. package/src/components/ConnectedAccountsFlexbox.tsx +28 -17
  408. package/src/components/wallet/dialogs/connect/CheckboxFormControl.tsx +16 -0
  409. package/src/components/wallet/dialogs/connect/Dialog.tsx +43 -0
  410. package/src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx +27 -0
  411. package/src/components/wallet/dialogs/connect/Permissions.tsx +30 -0
  412. package/src/components/wallet/dialogs/connect/index.ts +2 -0
  413. package/src/components/wallet/dialogs/index.ts +2 -0
  414. package/src/components/wallet/dialogs/revoke/Dialog.tsx +32 -0
  415. package/src/components/wallet/dialogs/revoke/index.ts +1 -0
  416. package/src/components/wallet/index.ts +1 -0
  417. package/src/components/wallet/lib/ActiveProvider.ts +7 -0
  418. package/src/components/wallet/lib/TableHeadData.ts +7 -0
  419. package/src/components/wallet/lib/index.ts +1 -0
  420. package/src/components/wallet/table/ConnectedWalletsTable.tsx +41 -17
  421. package/src/components/wallet/table/ConnectedWalletsTableRow.tsx +56 -82
  422. package/src/components/wallet/table/cells/Accounts.tsx +23 -0
  423. package/src/components/wallet/table/cells/Actions.tsx +29 -0
  424. package/src/components/wallet/table/cells/Cells.tsx +16 -0
  425. package/src/components/wallet/table/cells/ChainName.tsx +7 -0
  426. package/src/components/wallet/table/cells/State.tsx +23 -0
  427. package/src/components/wallet/table/cells/Wallet.tsx +18 -0
  428. package/src/components/wallet/table/cells/index.ts +6 -0
  429. package/src/components/wallet/table/cells/lib/ConnectedWalletTableCellProps.tsx +17 -0
  430. package/src/components/wallet/table/cells/lib/index.ts +1 -0
  431. package/src/components/wallet/table/hooks/index.ts +1 -0
  432. package/src/components/wallet/table/hooks/useActiveProviderDialogState.tsx +20 -0
  433. package/src/components/wallet/table/index.ts +2 -0
  434. package/src/hooks/index.ts +1 -0
  435. package/src/hooks/useEnabledWallets.tsx +45 -0
  436. package/src/img/index.ts +4 -0
  437. package/src/img/xyo-color-logo-text-only.svg +1 -0
  438. package/src/img/xyo-color-logo.svg +1 -0
  439. package/src/index.ts +1 -0
  440. package/src/types/images.d.ts +5 -0
@@ -1,6 +1,95 @@
1
+ // src/classes/EnabledWallets.ts
2
+ var DEFAULT_LOCAL_STORAGE_KEY = "XYO|EnabledWallets";
3
+ var EnabledEthWalletConnections = class {
4
+ // control whether or not enabled/disabled preferences are persisted (i.e. in localStorage)
5
+ persistPreferences = true;
6
+ // Map of wallet names and their enabled/disabled state
7
+ enabledWallets = {};
8
+ // Map of wallet names, their enabled/disabled state, and their wallet class
9
+ ethWalletsState = {};
10
+ // list of listeners that want to be notified on wallet changes
11
+ listeners = [];
12
+ // key to use in localStorage when persisting preferences
13
+ localStorageKey = DEFAULT_LOCAL_STORAGE_KEY;
14
+ constructor(localStorageKey = DEFAULT_LOCAL_STORAGE_KEY) {
15
+ this.localStorageKey = localStorageKey;
16
+ this.reviveSettings();
17
+ }
18
+ get wallets() {
19
+ return this.ethWalletsState;
20
+ }
21
+ disableWallet(rdns) {
22
+ this.toggleEnabledWallet(rdns, false);
23
+ }
24
+ enableWallet(rdns) {
25
+ this.toggleEnabledWallet(rdns, true);
26
+ }
27
+ /**
28
+ * Given a new set of wallets, set their enabled state based off previous preferences
29
+ */
30
+ resetWallets(wallets) {
31
+ const newWallets = {};
32
+ const addWallet = ([walletName, wallet]) => {
33
+ newWallets[walletName] = {
34
+ // preserve the existing enabled state
35
+ enabled: walletName in this.enabledWallets ? this.enabledWallets[walletName] : true,
36
+ wallet
37
+ };
38
+ };
39
+ Object.entries(wallets).forEach(addWallet.bind(this));
40
+ this.ethWalletsState = newWallets;
41
+ this.emitChange();
42
+ }
43
+ subscribe(listener) {
44
+ this.listeners = [...this.listeners, listener];
45
+ return () => {
46
+ this.listeners = this.listeners.filter((existingListener) => existingListener !== listener);
47
+ };
48
+ }
49
+ toggleEnabledWallet(rdns, enabled) {
50
+ if (rdns && this.ethWalletsState[rdns]) {
51
+ this.ethWalletsState[rdns].enabled = enabled;
52
+ this.ethWalletsState = { ...this.ethWalletsState };
53
+ this.emitChange();
54
+ }
55
+ }
56
+ emitChange() {
57
+ for (const listener of this.listeners) {
58
+ listener();
59
+ }
60
+ this.persistSettings();
61
+ }
62
+ isPersistance(method) {
63
+ if (this.persistPreferences) {
64
+ method();
65
+ }
66
+ }
67
+ persistSettings() {
68
+ this.isPersistance(() => {
69
+ const enabledWallets = Object.entries(this.ethWalletsState).reduce((acc, [rdns, { enabled }]) => {
70
+ acc[rdns] = enabled;
71
+ return acc;
72
+ }, {});
73
+ localStorage.setItem(this.localStorageKey, JSON.stringify(enabledWallets));
74
+ });
75
+ }
76
+ reviveSettings() {
77
+ this.isPersistance(() => {
78
+ const existingEntries = localStorage.getItem(this.localStorageKey);
79
+ try {
80
+ const entries = existingEntries ? JSON.parse(existingEntries) : {};
81
+ this.enabledWallets = entries;
82
+ } catch (e) {
83
+ console.warn(`Error parsing saved enabled wallet entries: ${e.message}`);
84
+ }
85
+ });
86
+ }
87
+ };
88
+
1
89
  // src/components/ConnectedAccountsFlexbox.tsx
2
- import { Typography as Typography2, useTheme as useTheme2 } from "@mui/material";
3
- import { FlexCol } from "@xylabs/react-flexbox";
90
+ import { Typography as Typography6, useTheme as useTheme2 } from "@mui/material";
91
+ import { FlexCol as FlexCol3 } from "@xylabs/react-flexbox";
92
+ import { forwardRef } from "react";
4
93
 
5
94
  // src/hooks/useDetectWallets.tsx
6
95
  import { AccountsChangedEventName, useWalletDiscovery } from "@xylabs/react-crypto";
@@ -32,8 +121,241 @@ var useDetectedWallets = () => {
32
121
  return { sortedWallets, totalConnectedAccounts };
33
122
  };
34
123
 
124
+ // src/hooks/useEnabledWallets.tsx
125
+ import { useWalletDiscovery as useWalletDiscovery2 } from "@xylabs/react-crypto";
126
+ import { useMemo as useMemo2, useSyncExternalStore } from "react";
127
+ var enabledEthWallets;
128
+ var useEnabledWalletsInner = (enabledWalletsRdns) => {
129
+ const discoveredWallets = useWalletDiscovery2();
130
+ const wallets = useMemo2(() => {
131
+ if (enabledEthWallets === void 0)
132
+ enabledEthWallets = new EnabledEthWalletConnections();
133
+ enabledEthWallets.resetWallets(discoveredWallets);
134
+ Object.entries(enabledWalletsRdns ?? {}).forEach(([rdns, enabled]) => enabledEthWallets?.toggleEnabledWallet(rdns, enabled));
135
+ return enabledEthWallets;
136
+ }, [discoveredWallets, enabledWalletsRdns]);
137
+ return useSyncExternalStore(wallets.subscribe.bind(wallets), () => wallets.wallets);
138
+ };
139
+ var useEnabledWallets = (enabledWalletsRdns) => {
140
+ const wallets = useEnabledWalletsInner(enabledWalletsRdns);
141
+ const enabledWallets = useMemo2(
142
+ () => Object.entries(wallets).reduce((acc, [walletName, wallet]) => {
143
+ if (wallet.enabled)
144
+ acc[walletName] = wallet;
145
+ return acc;
146
+ }, {}),
147
+ [wallets]
148
+ );
149
+ return {
150
+ disableWallet: enabledEthWallets?.disableWallet.bind(enabledEthWallets),
151
+ enableWallet: enabledEthWallets?.enableWallet.bind(enabledEthWallets),
152
+ enabledWallets,
153
+ wallets
154
+ };
155
+ };
156
+
157
+ // src/components/wallet/dialogs/connect/CheckboxFormControl.tsx
158
+ import { Checkbox, FormControl, FormLabel } from "@mui/material";
159
+ import { jsx, jsxs } from "react/jsx-runtime";
160
+ var CheckboxFormControl = ({ onCheckChanged, ...props }) => {
161
+ return /* @__PURE__ */ jsx(FormControl, { ...props, children: /* @__PURE__ */ jsxs(FormLabel, { children: [
162
+ /* @__PURE__ */ jsx(Checkbox, { onChange: (_, checked) => onCheckChanged?.(checked) }),
163
+ "Do not show this again."
164
+ ] }) });
165
+ };
166
+
167
+ // src/components/wallet/dialogs/connect/Dialog.tsx
168
+ import { Button, Dialog, DialogActions, DialogContent, DialogTitle } from "@mui/material";
169
+
170
+ // src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx
171
+ import { SyncAlt } from "@mui/icons-material";
172
+ import { Typography } from "@mui/material";
173
+ import { ConstrainedImage } from "@xylabs/react-crypto";
174
+ import { FlexCol, FlexRow } from "@xylabs/react-flexbox";
175
+
176
+ // src/img/index.ts
177
+ import xyoColorLogo from "./xyo-color-logo-LHR2SMEM.svg";
178
+ import xyoColorLogoText from "./xyo-color-logo-text-only-QPAW5BSQ.svg";
179
+
180
+ // src/components/wallet/dialogs/connect/LinkedProvidersFlexbox.tsx
181
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
182
+ var LinkedProvidersFlexbox = ({ icon, providerName, ...props }) => {
183
+ return /* @__PURE__ */ jsxs2(FlexRow, { gap: 4, justifyContent: "space-evenly", ...props, children: [
184
+ /* @__PURE__ */ jsxs2(FlexCol, { gap: 0.5, children: [
185
+ /* @__PURE__ */ jsx2("img", { alt: "XYO Logo", src: xyoColorLogo, style: { height: "48px" } }),
186
+ /* @__PURE__ */ jsx2(Typography, { variant: "subtitle1", children: "XYO App" })
187
+ ] }),
188
+ /* @__PURE__ */ jsx2(SyncAlt, { fontSize: "large" }),
189
+ /* @__PURE__ */ jsxs2(FlexCol, { gap: 0.5, children: [
190
+ /* @__PURE__ */ jsx2(ConstrainedImage, { constrainedValue: "48px", src: icon, alt: providerName, style: { height: "48px", maxWidth: "48px" } }),
191
+ /* @__PURE__ */ jsx2(Typography, { variant: "subtitle1", children: providerName })
192
+ ] })
193
+ ] });
194
+ };
195
+
196
+ // src/components/wallet/dialogs/connect/Permissions.tsx
197
+ import { Link, Typography as Typography2 } from "@mui/material";
198
+ import { FlexCol as FlexCol2 } from "@xylabs/react-flexbox";
199
+ import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
200
+ var WalletPermissionsFlexbox = (props) => {
201
+ return /* @__PURE__ */ jsxs3(FlexCol2, { gap: 4, ...props, children: [
202
+ /* @__PURE__ */ jsx3(Typography2, { fontWeight: "bold", sx: { textAlign: "center" }, children: "This will allow XYO to:" }),
203
+ /* @__PURE__ */ jsxs3("ul", { children: [
204
+ /* @__PURE__ */ jsx3("li", { children: "View your wallet account(s) and address(es)" }),
205
+ /* @__PURE__ */ jsx3("li", { children: "Read-only access to browse the public blockchain(s) you select" })
206
+ ] }),
207
+ /* @__PURE__ */ jsxs3(Typography2, { variant: "subtitle1", sx: { textAlign: "center" }, children: [
208
+ "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",
209
+ " ",
210
+ /* @__PURE__ */ jsx3(
211
+ Link,
212
+ {
213
+ href: "https://cointelegraph.com/innovation-circle/decentralization-and-sovereignty-debunking-our-approach-to-digital-sovereignty",
214
+ sx: { fontWeight: "bold" },
215
+ target: "_blank",
216
+ children: "here"
217
+ }
218
+ ),
219
+ "."
220
+ ] })
221
+ ] });
222
+ };
223
+
224
+ // src/components/wallet/dialogs/connect/Dialog.tsx
225
+ import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
226
+ var ConnectWalletDialog = ({ activeProvider, onIgnoreConnectDialog, ...props }) => {
227
+ const { icon, providerName } = activeProvider ?? {};
228
+ const onConnect = async () => {
229
+ try {
230
+ await activeProvider?.connectWallet?.();
231
+ props.onClose?.({}, "escapeKeyDown");
232
+ } catch (e) {
233
+ console.warn(`Error connecting to wallet: ${e.message}`);
234
+ }
235
+ };
236
+ return /* @__PURE__ */ jsxs4(Dialog, { PaperProps: { sx: { display: "flex", gap: 4 } }, ...props, children: [
237
+ /* @__PURE__ */ jsx4(DialogTitle, { sx: { textAlign: "center" }, children: "XYO Wants To Access The Blockchain on Your Behalf" }),
238
+ /* @__PURE__ */ jsxs4(DialogContent, { sx: { display: "flex", flexDirection: "column", gap: 4 }, children: [
239
+ /* @__PURE__ */ jsx4(LinkedProvidersFlexbox, { icon, providerName }),
240
+ /* @__PURE__ */ jsx4(WalletPermissionsFlexbox, {}),
241
+ /* @__PURE__ */ jsx4(CheckboxFormControl, { onCheckChanged: onIgnoreConnectDialog })
242
+ ] }),
243
+ /* @__PURE__ */ jsxs4(DialogActions, { children: [
244
+ /* @__PURE__ */ jsx4(Button, { variant: "outlined", onClick: () => props.onClose?.({}, "escapeKeyDown"), children: "Close" }),
245
+ /* @__PURE__ */ jsx4(Button, { variant: "contained", onClick: onConnect, children: "Connect" })
246
+ ] })
247
+ ] });
248
+ };
249
+
250
+ // src/components/wallet/dialogs/revoke/Dialog.tsx
251
+ import { Button as Button2, Dialog as Dialog2, DialogActions as DialogActions2, DialogContent as DialogContent2, DialogTitle as DialogTitle2, Typography as Typography3 } from "@mui/material";
252
+ import { ConstrainedImage as ConstrainedImage2 } from "@xylabs/react-crypto";
253
+ import { FlexRow as FlexRow2 } from "@xylabs/react-flexbox";
254
+ import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
255
+ var RevokeWalletConnectionDialog = ({ activeProvider, ...props }) => {
256
+ return /* @__PURE__ */ jsxs5(Dialog2, { ...props, children: [
257
+ /* @__PURE__ */ jsxs5(FlexRow2, { gap: 2, justifyContent: "start", pl: 2, children: [
258
+ /* @__PURE__ */ jsx5(ConstrainedImage2, { src: activeProvider?.icon, constrainedValue: "24px" }),
259
+ /* @__PURE__ */ jsxs5(DialogTitle2, { sx: { pl: 0 }, children: [
260
+ "Revoke ",
261
+ activeProvider?.providerName,
262
+ " Access"
263
+ ] })
264
+ ] }),
265
+ /* @__PURE__ */ jsxs5(DialogContent2, { children: [
266
+ /* @__PURE__ */ jsxs5(Typography3, { children: [
267
+ "Revoking access to your wallet must be done from the wallet's browser extension. Wallets grant access to specific domains please consult ",
268
+ activeProvider?.providerName,
269
+ "'s documentation on how to revoke access to this website:"
270
+ ] }),
271
+ /* @__PURE__ */ jsx5(Typography3, { children: window.location.origin })
272
+ ] }),
273
+ /* @__PURE__ */ jsx5(DialogActions2, { children: /* @__PURE__ */ jsx5(Button2, { variant: "contained", onClick: () => props.onClose?.({}, "escapeKeyDown"), children: "Close" }) })
274
+ ] });
275
+ };
276
+
277
+ // src/components/wallet/table/cells/Accounts.tsx
278
+ import { TableCell, Tooltip, Typography as Typography4 } from "@mui/material";
279
+ import { jsx as jsx6 } from "react/jsx-runtime";
280
+ var ConnectedWalletsAccountsTableCell = ({
281
+ additionalAccounts,
282
+ currentAccount,
283
+ totalAccounts,
284
+ tableCellProps
285
+ }) => {
286
+ return /* @__PURE__ */ jsx6(TableCell, { ...tableCellProps, children: /* @__PURE__ */ jsx6(
287
+ Tooltip,
288
+ {
289
+ sx: { cursor: totalAccounts > 0 ? "pointer" : "auto" },
290
+ title: [...currentAccount ?? [], ...additionalAccounts ?? []].map((address, index) => /* @__PURE__ */ jsx6("p", { children: address }, index)),
291
+ children: /* @__PURE__ */ jsx6(Typography4, { children: totalAccounts })
292
+ }
293
+ ) });
294
+ };
295
+
296
+ // src/components/wallet/table/cells/Actions.tsx
297
+ import { Check, InfoOutlined } from "@mui/icons-material";
298
+ import { Button as Button3, IconButton, TableCell as TableCell2, Typography as Typography5 } from "@mui/material";
299
+ import { FlexRow as FlexRow3 } from "@xylabs/react-flexbox";
300
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
301
+ var ConnectedWalletsActionsTableCell = ({ connected, onConnect, onRevoke, tableCellProps }) => {
302
+ return /* @__PURE__ */ jsx7(TableCell2, { ...tableCellProps, children: /* @__PURE__ */ jsxs6(FlexRow3, { gap: 2, justifyContent: "start", children: [
303
+ connected ? /* @__PURE__ */ jsxs6(Typography5, { sx: { display: "inline-flex", gap: 0.5 }, children: [
304
+ /* @__PURE__ */ jsx7(Check, {}),
305
+ "Connected"
306
+ ] }) : /* @__PURE__ */ jsx7(Button3, { variant: "contained", onClick: onConnect, children: "Connect" }),
307
+ connected ? /* @__PURE__ */ jsx7(IconButton, { onClick: onRevoke, children: /* @__PURE__ */ jsx7(InfoOutlined, {}) }) : null
308
+ ] }) });
309
+ };
310
+
311
+ // src/components/wallet/table/cells/ChainName.tsx
312
+ import { TableCell as TableCell3 } from "@mui/material";
313
+ import { jsx as jsx8 } from "react/jsx-runtime";
314
+ var ConnectedWalletsChainNameTableCell = ({ chainName, tableCellProps }) => {
315
+ return /* @__PURE__ */ jsx8(TableCell3, { ...tableCellProps, children: chainName });
316
+ };
317
+
318
+ // src/components/wallet/table/cells/State.tsx
319
+ import { Switch, TableCell as TableCell4 } from "@mui/material";
320
+ import { useMemo as useMemo3 } from "react";
321
+ import { jsx as jsx9 } from "react/jsx-runtime";
322
+ var ConnectedWalletState = ({ connected, walletRdns, tableCellProps }) => {
323
+ const { disableWallet, enableWallet, wallets } = useEnabledWallets();
324
+ const enabled = useMemo3(() => walletRdns ? wallets[walletRdns].enabled : false, [wallets, walletRdns]);
325
+ const handleClick = (event) => {
326
+ const checked = event.target?.checked;
327
+ if (walletRdns) {
328
+ checked ? enableWallet?.(walletRdns) : disableWallet?.(walletRdns);
329
+ }
330
+ };
331
+ return /* @__PURE__ */ jsx9(TableCell4, { ...tableCellProps, children: /* @__PURE__ */ jsx9(Switch, { disabled: !connected, checked: connected && enabled, onChange: handleClick }) });
332
+ };
333
+
334
+ // src/components/wallet/table/cells/Wallet.tsx
335
+ import { TableCell as TableCell5, useTheme } from "@mui/material";
336
+ import { ConstrainedImage as ConstrainedImage3 } from "@xylabs/react-crypto";
337
+ import { FlexRow as FlexRow4 } from "@xylabs/react-flexbox";
338
+ import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
339
+ var ConnectedWalletsWalletTableCell = ({ icon, walletName, tableCellProps }) => {
340
+ const theme = useTheme();
341
+ return /* @__PURE__ */ jsx10(TableCell5, { ...tableCellProps, children: /* @__PURE__ */ jsxs7(FlexRow4, { gap: 2, justifyContent: "start", children: [
342
+ /* @__PURE__ */ jsx10(ConstrainedImage3, { constrainedValue: theme.spacing(4), src: icon }),
343
+ walletName
344
+ ] }) });
345
+ };
346
+
347
+ // src/components/wallet/table/cells/Cells.tsx
348
+ var ConnectedWalletTableCells = [
349
+ ConnectedWalletsWalletTableCell,
350
+ ConnectedWalletsChainNameTableCell,
351
+ ConnectedWalletsAccountsTableCell,
352
+ ConnectedWalletsActionsTableCell,
353
+ ConnectedWalletState
354
+ ];
355
+
35
356
  // src/components/wallet/table/ConnectedWalletsTable.tsx
36
- import { Table, TableBody, TableCell as TableCell2, TableHead, TableRow as TableRow2 } from "@mui/material";
357
+ import { Table, TableBody, TableCell as TableCell6, TableHead, TableRow as TableRow2 } from "@mui/material";
358
+ import { useState as useState3 } from "react";
37
359
 
38
360
  // src/components/wallet/lib/TableHeadData.ts
39
361
  var WalletsTableHeadCells = [
@@ -64,102 +386,153 @@ var WalletsTableHeadCells = [
64
386
  label: "Actions",
65
387
  numeric: false,
66
388
  showOnMobile: true
389
+ },
390
+ {
391
+ disablePadding: false,
392
+ id: "enabled",
393
+ label: "Enabled",
394
+ numeric: false,
395
+ showOnMobile: true
67
396
  }
68
397
  ];
69
398
 
70
399
  // src/components/wallet/table/ConnectedWalletsTableRow.tsx
71
- import { Check } from "@mui/icons-material";
72
- import { Button, TableCell, TableRow, Tooltip, Typography, useTheme } from "@mui/material";
73
- import { ConstrainedImage, useEthWallet } from "@xylabs/react-crypto";
74
- import { FlexRow } from "@xylabs/react-flexbox";
75
- import { useMemo as useMemo2 } from "react";
76
- import { jsx, jsxs } from "react/jsx-runtime";
77
- var WalletConnectionsTableRowInner = ({
78
- additionalAccounts,
79
- currentAccount,
80
- chainName,
81
- icon,
82
- name,
400
+ import { TableRow } from "@mui/material";
401
+ import { useEthWallet } from "@xylabs/react-crypto";
402
+ import { useCallback, useMemo as useMemo4 } from "react";
403
+ import { jsx as jsx11 } from "react/jsx-runtime";
404
+ var WalletConnectionsTableRow = ({
405
+ ignoreConnectDialog,
406
+ onConnectClick,
407
+ onRevoke,
408
+ wallet,
83
409
  ...props
84
410
  }) => {
85
- const theme = useTheme();
411
+ const { currentAccount: currentAccountFromWallet, additionalAccounts, chainName, connectWallet, providerInfo } = useEthWallet(wallet);
412
+ const currentAccount = currentAccountFromWallet?.toString() ? [currentAccountFromWallet.toString()] : [];
86
413
  const totalAccounts = (additionalAccounts?.length ?? 0) + (currentAccount?.length ?? 0);
87
- const connected = currentAccount?.length ?? 0 > 0;
88
- const Cells = useMemo2(() => {
89
- const TableCells = {
90
- wallet: /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsxs(FlexRow, { gap: 2, justifyContent: "start", children: [
91
- /* @__PURE__ */ jsx(ConstrainedImage, { constrainedValue: theme.spacing(4), src: icon }),
92
- name
93
- ] }) }, 1),
94
- // eslint-disable-next-line sort-keys-fix/sort-keys-fix
95
- chain: /* @__PURE__ */ jsx(TableCell, { children: chainName }, 2),
96
- // eslint-disable-next-line sort-keys-fix/sort-keys-fix
97
- accounts: /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsx(
98
- Tooltip,
99
- {
100
- sx: { cursor: totalAccounts > 0 ? "pointer" : "auto" },
101
- title: [...currentAccount ?? [], ...additionalAccounts ?? []].map((address, index) => /* @__PURE__ */ jsx("p", { children: address }, index)),
102
- children: /* @__PURE__ */ jsx(Typography, { children: totalAccounts })
103
- }
104
- ) }, 3),
105
- actions: /* @__PURE__ */ jsx(TableCell, { children: /* @__PURE__ */ jsxs(FlexRow, { gap: 2, justifyContent: "start", children: [
106
- connected ? /* @__PURE__ */ jsxs(Typography, { sx: { display: "inline-flex", gap: 0.5 }, children: [
107
- /* @__PURE__ */ jsx(Check, {}),
108
- "Connected"
109
- ] }) : /* @__PURE__ */ jsx(Button, { variant: "contained", children: "Connect" }),
110
- connected ? /* @__PURE__ */ jsx(Button, { variant: "outlined", color: "error", children: "Revoke" }) : null
111
- ] }) }, 4)
112
- };
113
- return TableCells;
114
- }, [additionalAccounts, chainName, connected, currentAccount, icon, name, theme, totalAccounts]);
115
- return /* @__PURE__ */ jsx(TableRow, { ...props, children: Object.values(Cells).map((cell) => cell) });
116
- };
117
- var WalletConnectionsTableRow = ({ wallet, ...props }) => {
118
- const { currentAccount, additionalAccounts, chainName, providerInfo, providerName } = useEthWallet(wallet);
119
- const currentAccountString = currentAccount?.toString();
120
- return /* @__PURE__ */ jsx(
121
- WalletConnectionsTableRowInner,
414
+ const connected = !!(currentAccount?.length ?? 0 > 0);
415
+ const { icon, name, rdns } = useMemo4(() => providerInfo ?? { icon: void 0, name: void 0, rdns: void 0 }, [providerInfo]);
416
+ const activeProvider = useMemo4(
417
+ () => ({
418
+ connectWallet,
419
+ icon,
420
+ providerName: name
421
+ }),
422
+ [connectWallet, icon, name]
423
+ );
424
+ const onRevokeLocal = useCallback(() => {
425
+ onRevoke?.(activeProvider);
426
+ }, [activeProvider, onRevoke]);
427
+ const onConnectLocal = useCallback(async () => {
428
+ if (ignoreConnectDialog) {
429
+ await connectWallet?.();
430
+ } else {
431
+ onConnectClick?.(activeProvider);
432
+ }
433
+ }, [activeProvider, connectWallet, ignoreConnectDialog, onConnectClick]);
434
+ return /* @__PURE__ */ jsx11(TableRow, { ...props, children: Object.values(ConnectedWalletTableCells).map((Cell, index) => /* @__PURE__ */ jsx11(
435
+ Cell,
122
436
  {
123
437
  additionalAccounts,
124
- currentAccount: currentAccountString ? [currentAccountString] : [],
125
438
  chainName,
126
- icon: providerInfo?.icon,
127
- name: providerName,
128
- ...props
129
- }
130
- );
439
+ connected,
440
+ currentAccount,
441
+ icon,
442
+ onConnect: onConnectLocal,
443
+ onRevoke: onRevokeLocal,
444
+ totalAccounts,
445
+ walletName: name,
446
+ walletRdns: rdns
447
+ },
448
+ index
449
+ )) });
131
450
  };
132
451
 
133
- // src/components/wallet/table/ConnectedWalletsTable.tsx
134
- import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
135
- var ConnectedWalletsTable = ({ wallets, ...props }) => {
136
- return /* @__PURE__ */ jsxs2(Table, { ...props, children: [
137
- /* @__PURE__ */ jsx2(TableHead, { children: /* @__PURE__ */ jsx2(TableRow2, { children: WalletsTableHeadCells.map(({ disablePadding, id, label, align, width }) => /* @__PURE__ */ jsx2(TableCell2, { align, padding: disablePadding ? "none" : "normal", width: width ?? "auto", children: label }, id)) }) }),
138
- /* @__PURE__ */ jsx2(TableBody, { children: (wallets ?? []).map((wallet) => /* @__PURE__ */ jsx2(WalletConnectionsTableRow, { wallet }, wallet.providerInfo?.rdns)) })
139
- ] });
452
+ // src/components/wallet/table/hooks/useActiveProviderDialogState.tsx
453
+ import { useState as useState2 } from "react";
454
+ var useActiveProviderDialogState = (setActiveProvider) => {
455
+ const [show, setShow] = useState2(false);
456
+ const onSetActiveProvider = (activeProvider) => {
457
+ setShow(true);
458
+ setActiveProvider(activeProvider);
459
+ };
460
+ const onClose = () => {
461
+ setShow(false);
462
+ setActiveProvider({});
463
+ };
464
+ return [show, onSetActiveProvider, onClose];
140
465
  };
141
466
 
142
- // src/components/ConnectedAccountsFlexbox.tsx
143
- import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
144
- var ConnectedAccountsFlexbox = (props) => {
145
- const theme = useTheme2();
146
- const { totalConnectedAccounts, sortedWallets } = useDetectedWallets();
147
- return /* @__PURE__ */ jsxs3(FlexCol, { alignItems: "stretch", justifyContent: "start", gap: 2, ...props, children: [
148
- /* @__PURE__ */ jsxs3(FlexCol, { alignItems: "start", children: [
149
- /* @__PURE__ */ jsx3(Typography2, { variant: "h2", sx: { mb: 0.5 }, children: "Detected Web3 Wallets" }),
150
- totalConnectedAccounts ? /* @__PURE__ */ jsxs3(Typography2, { variant: "subtitle1", color: theme.palette.secondary.main, sx: { opacity: 0.5 }, children: [
151
- "Total Connected Accounts: ",
152
- totalConnectedAccounts
153
- ] }) : null
467
+ // src/components/wallet/table/ConnectedWalletsTable.tsx
468
+ import { Fragment, jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
469
+ var ConnectedWalletsTable = ({ ignoreConnectDialog, onIgnoreConnectDialog, wallets, ...props }) => {
470
+ const [activeProvider, setActiveProvider] = useState3();
471
+ const [showConnect, onSetActiveProviderConnect, onConnectClose] = useActiveProviderDialogState(setActiveProvider);
472
+ const [showRevoke, onSetActiveProviderRevoke, onRevokeClose] = useActiveProviderDialogState(setActiveProvider);
473
+ return /* @__PURE__ */ jsxs8(Fragment, { children: [
474
+ /* @__PURE__ */ jsxs8(Table, { ...props, children: [
475
+ /* @__PURE__ */ jsx12(TableHead, { children: /* @__PURE__ */ jsx12(TableRow2, { children: WalletsTableHeadCells.map(({ disablePadding, id, label, align, width }) => /* @__PURE__ */ jsx12(TableCell6, { align, padding: disablePadding ? "none" : "normal", width: width ?? "auto", children: label }, id)) }) }),
476
+ /* @__PURE__ */ jsx12(TableBody, { children: (wallets ?? []).map((wallet) => /* @__PURE__ */ jsx12(
477
+ WalletConnectionsTableRow,
478
+ {
479
+ ignoreConnectDialog,
480
+ onConnectClick: onSetActiveProviderConnect,
481
+ onRevoke: onSetActiveProviderRevoke,
482
+ wallet
483
+ },
484
+ wallet.providerInfo?.rdns
485
+ )) })
154
486
  ] }),
155
- /* @__PURE__ */ jsx3(ConnectedWalletsTable, { wallets: sortedWallets })
487
+ /* @__PURE__ */ jsx12(RevokeWalletConnectionDialog, { open: showRevoke, onClose: onRevokeClose, activeProvider }),
488
+ /* @__PURE__ */ jsx12(
489
+ ConnectWalletDialog,
490
+ {
491
+ activeProvider,
492
+ onClose: onConnectClose,
493
+ open: showConnect,
494
+ onIgnoreConnectDialog
495
+ }
496
+ )
156
497
  ] });
157
498
  };
499
+
500
+ // src/components/ConnectedAccountsFlexbox.tsx
501
+ import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
502
+ var ConnectedAccountsFlexbox = forwardRef(
503
+ ({ ignoreConnectDialog, onIgnoreConnectDialog, ...props }, ref) => {
504
+ const theme = useTheme2();
505
+ const { totalConnectedAccounts, sortedWallets } = useDetectedWallets();
506
+ return /* @__PURE__ */ jsxs9(FlexCol3, { alignItems: "stretch", justifyContent: "start", gap: 2, ref, ...props, children: [
507
+ /* @__PURE__ */ jsxs9(FlexCol3, { alignItems: "start", children: [
508
+ /* @__PURE__ */ jsx13(Typography6, { variant: "h2", sx: { mb: 0.5 }, children: "Detected Web3 Wallets" }),
509
+ totalConnectedAccounts ? /* @__PURE__ */ jsxs9(Typography6, { variant: "subtitle1", color: theme.palette.secondary.main, sx: { opacity: 0.5 }, children: [
510
+ "Total Connected Accounts: ",
511
+ totalConnectedAccounts
512
+ ] }) : null
513
+ ] }),
514
+ /* @__PURE__ */ jsx13(ConnectedWalletsTable, { wallets: sortedWallets, ignoreConnectDialog, onIgnoreConnectDialog })
515
+ ] });
516
+ }
517
+ );
518
+ ConnectedAccountsFlexbox.displayName = "ConnectedAccountsFlexbox";
158
519
  export {
520
+ CheckboxFormControl,
521
+ ConnectWalletDialog,
159
522
  ConnectedAccountsFlexbox,
523
+ ConnectedWalletState,
524
+ ConnectedWalletTableCells,
525
+ ConnectedWalletsAccountsTableCell,
526
+ ConnectedWalletsActionsTableCell,
527
+ ConnectedWalletsChainNameTableCell,
160
528
  ConnectedWalletsTable,
529
+ ConnectedWalletsWalletTableCell,
530
+ EnabledEthWalletConnections,
531
+ RevokeWalletConnectionDialog,
161
532
  WalletConnectionsTableRow,
162
- WalletConnectionsTableRowInner,
163
- useDetectedWallets
533
+ useActiveProviderDialogState,
534
+ useDetectedWallets,
535
+ useEnabledWallets,
536
+ useEnabledWalletsInner
164
537
  };
165
538
  //# sourceMappingURL=index.js.map