@xyo-network/os-react-runtime 2.3.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 (665) hide show
  1. package/LICENSE +165 -0
  2. package/README.md +13 -0
  3. package/dist/browser/DappPage.d.ts +16 -0
  4. package/dist/browser/DappPage.d.ts.map +1 -0
  5. package/dist/browser/DappPathSwitcher.d.ts +12 -0
  6. package/dist/browser/DappPathSwitcher.d.ts.map +1 -0
  7. package/dist/browser/StyledBuilder.d.ts +8 -0
  8. package/dist/browser/StyledBuilder.d.ts.map +1 -0
  9. package/dist/browser/candy-dark@3x-N2S7K4QB.webp +0 -0
  10. package/dist/browser/candy-light@3x-WKECMFRP.webp +0 -0
  11. package/dist/browser/candyApple-dark@3x-HGSPETPR.webp +0 -0
  12. package/dist/browser/candyApple-light@3x-OWA5XNTF.webp +0 -0
  13. package/dist/browser/components/RenderHtml.d.ts +4 -0
  14. package/dist/browser/components/RenderHtml.d.ts.map +1 -0
  15. package/dist/browser/components/Widgets/StackOfWidgets.d.ts +3 -0
  16. package/dist/browser/components/Widgets/StackOfWidgets.d.ts.map +1 -0
  17. package/dist/browser/components/Widgets/Types/BarGraph/HorizontalBarGraph.d.ts +11 -0
  18. package/dist/browser/components/Widgets/Types/BarGraph/HorizontalBarGraph.d.ts.map +1 -0
  19. package/dist/browser/components/Widgets/Types/BarGraph/StyledLinearProgress.d.ts +2 -0
  20. package/dist/browser/components/Widgets/Types/BarGraph/StyledLinearProgress.d.ts.map +1 -0
  21. package/dist/browser/components/Widgets/Types/BarGraph/index.d.ts +3 -0
  22. package/dist/browser/components/Widgets/Types/BarGraph/index.d.ts.map +1 -0
  23. package/dist/browser/components/Widgets/Types/DataColumns/TwoColFourStat.d.ts +10 -0
  24. package/dist/browser/components/Widgets/Types/DataColumns/TwoColFourStat.d.ts.map +1 -0
  25. package/dist/browser/components/Widgets/Types/DataColumns/TwoColTwoStat.d.ts +8 -0
  26. package/dist/browser/components/Widgets/Types/DataColumns/TwoColTwoStat.d.ts.map +1 -0
  27. package/dist/browser/components/Widgets/Types/DataColumns/index.d.ts +2 -0
  28. package/dist/browser/components/Widgets/Types/DataColumns/index.d.ts.map +1 -0
  29. package/dist/browser/components/Widgets/Types/Examples/BarGraph.d.ts +3 -0
  30. package/dist/browser/components/Widgets/Types/Examples/BarGraph.d.ts.map +1 -0
  31. package/dist/browser/components/Widgets/Types/Examples/BooleanTable.d.ts +3 -0
  32. package/dist/browser/components/Widgets/Types/Examples/BooleanTable.d.ts.map +1 -0
  33. package/dist/browser/components/Widgets/Types/Examples/TwoColTwoStat.d.ts +3 -0
  34. package/dist/browser/components/Widgets/Types/Examples/TwoColTwoStat.d.ts.map +1 -0
  35. package/dist/browser/components/Widgets/Types/Examples/index.d.ts +4 -0
  36. package/dist/browser/components/Widgets/Types/Examples/index.d.ts.map +1 -0
  37. package/dist/browser/components/Widgets/Types/Stat/Insight.d.ts +6 -0
  38. package/dist/browser/components/Widgets/Types/Stat/Insight.d.ts.map +1 -0
  39. package/dist/browser/components/Widgets/Types/Stat/InsightStatProps.d.ts +7 -0
  40. package/dist/browser/components/Widgets/Types/Stat/InsightStatProps.d.ts.map +1 -0
  41. package/dist/browser/components/Widgets/Types/Stat/Stat.d.ts +7 -0
  42. package/dist/browser/components/Widgets/Types/Stat/Stat.d.ts.map +1 -0
  43. package/dist/browser/components/Widgets/Types/Stat/Subtitle.d.ts +4 -0
  44. package/dist/browser/components/Widgets/Types/Stat/Subtitle.d.ts.map +1 -0
  45. package/dist/browser/components/Widgets/Types/Stat/Unit.d.ts +4 -0
  46. package/dist/browser/components/Widgets/Types/Stat/Unit.d.ts.map +1 -0
  47. package/dist/browser/components/Widgets/Types/Stat/Value.d.ts +4 -0
  48. package/dist/browser/components/Widgets/Types/Stat/Value.d.ts.map +1 -0
  49. package/dist/browser/components/Widgets/Types/Stat/index.d.ts +4 -0
  50. package/dist/browser/components/Widgets/Types/Stat/index.d.ts.map +1 -0
  51. package/dist/browser/components/Widgets/Types/Tables/BooleanTable.d.ts +27 -0
  52. package/dist/browser/components/Widgets/Types/Tables/BooleanTable.d.ts.map +1 -0
  53. package/dist/browser/components/Widgets/Types/Tables/index.d.ts +2 -0
  54. package/dist/browser/components/Widgets/Types/Tables/index.d.ts.map +1 -0
  55. package/dist/browser/components/Widgets/Types/index.d.ts +5 -0
  56. package/dist/browser/components/Widgets/Types/index.d.ts.map +1 -0
  57. package/dist/browser/components/Widgets/WidgetCard.d.ts +11 -0
  58. package/dist/browser/components/Widgets/WidgetCard.d.ts.map +1 -0
  59. package/dist/browser/components/Widgets/WidgetCardExamples.d.ts +4 -0
  60. package/dist/browser/components/Widgets/WidgetCardExamples.d.ts.map +1 -0
  61. package/dist/browser/components/Widgets/index.d.ts +3 -0
  62. package/dist/browser/components/Widgets/index.d.ts.map +1 -0
  63. package/dist/browser/components/alerts/errors/RenderErrorWithSupportLink.d.ts +10 -0
  64. package/dist/browser/components/alerts/errors/RenderErrorWithSupportLink.d.ts.map +1 -0
  65. package/dist/browser/components/alerts/errors/index.d.ts +2 -0
  66. package/dist/browser/components/alerts/errors/index.d.ts.map +1 -0
  67. package/dist/browser/components/alerts/index.d.ts +2 -0
  68. package/dist/browser/components/alerts/index.d.ts.map +1 -0
  69. package/dist/browser/components/index.d.ts +4 -0
  70. package/dist/browser/components/index.d.ts.map +1 -0
  71. package/dist/browser/dapps/index.d.ts +2 -0
  72. package/dist/browser/dapps/index.d.ts.map +1 -0
  73. package/dist/browser/dapps/shared/accounts/components/AccountCard.d.ts +14 -0
  74. package/dist/browser/dapps/shared/accounts/components/AccountCard.d.ts.map +1 -0
  75. package/dist/browser/dapps/shared/accounts/components/AnimatedComponents/GenericAnimations/ShiftAnimation.d.ts +10 -0
  76. package/dist/browser/dapps/shared/accounts/components/AnimatedComponents/GenericAnimations/ShiftAnimation.d.ts.map +1 -0
  77. package/dist/browser/dapps/shared/accounts/components/AnimatedComponents/GenericAnimations/index.d.ts +2 -0
  78. package/dist/browser/dapps/shared/accounts/components/AnimatedComponents/GenericAnimations/index.d.ts.map +1 -0
  79. package/dist/browser/dapps/shared/accounts/components/AnimatedComponents/IconAnimations/TwoToneBulletPoint.d.ts +4 -0
  80. package/dist/browser/dapps/shared/accounts/components/AnimatedComponents/IconAnimations/TwoToneBulletPoint.d.ts.map +1 -0
  81. package/dist/browser/dapps/shared/accounts/components/AnimatedComponents/IconAnimations/TwoToneBulletPointList.d.ts +7 -0
  82. package/dist/browser/dapps/shared/accounts/components/AnimatedComponents/IconAnimations/TwoToneBulletPointList.d.ts.map +1 -0
  83. package/dist/browser/dapps/shared/accounts/components/AnimatedComponents/IconAnimations/index.d.ts +3 -0
  84. package/dist/browser/dapps/shared/accounts/components/AnimatedComponents/IconAnimations/index.d.ts.map +1 -0
  85. package/dist/browser/dapps/shared/accounts/components/AnimatedComponents/index.d.ts +3 -0
  86. package/dist/browser/dapps/shared/accounts/components/AnimatedComponents/index.d.ts.map +1 -0
  87. package/dist/browser/dapps/shared/accounts/components/InputFields/CoinbaseEmail.d.ts +7 -0
  88. package/dist/browser/dapps/shared/accounts/components/InputFields/CoinbaseEmail.d.ts.map +1 -0
  89. package/dist/browser/dapps/shared/accounts/components/InputFields/PrimaryCryptowallet.d.ts +7 -0
  90. package/dist/browser/dapps/shared/accounts/components/InputFields/PrimaryCryptowallet.d.ts.map +1 -0
  91. package/dist/browser/dapps/shared/accounts/components/InputFields/SecondaryCryptowallet.d.ts +7 -0
  92. package/dist/browser/dapps/shared/accounts/components/InputFields/SecondaryCryptowallet.d.ts.map +1 -0
  93. package/dist/browser/dapps/shared/accounts/components/InputFields/index.d.ts +4 -0
  94. package/dist/browser/dapps/shared/accounts/components/InputFields/index.d.ts.map +1 -0
  95. package/dist/browser/dapps/shared/accounts/components/PaymentMethods.d.ts +4 -0
  96. package/dist/browser/dapps/shared/accounts/components/PaymentMethods.d.ts.map +1 -0
  97. package/dist/browser/dapps/shared/accounts/components/index.d.ts +4 -0
  98. package/dist/browser/dapps/shared/accounts/components/index.d.ts.map +1 -0
  99. package/dist/browser/dapps/shared/accounts/icon/Icon.d.ts +4 -0
  100. package/dist/browser/dapps/shared/accounts/icon/Icon.d.ts.map +1 -0
  101. package/dist/browser/dapps/shared/accounts/icon/index.d.ts +2 -0
  102. package/dist/browser/dapps/shared/accounts/icon/index.d.ts.map +1 -0
  103. package/dist/browser/dapps/shared/accounts/index.d.ts +3 -0
  104. package/dist/browser/dapps/shared/accounts/index.d.ts.map +1 -0
  105. package/dist/browser/dapps/shared/accounts/models/CreditCardInput.d.ts +18 -0
  106. package/dist/browser/dapps/shared/accounts/models/CreditCardInput.d.ts.map +1 -0
  107. package/dist/browser/dapps/shared/accounts/models/index.d.ts +2 -0
  108. package/dist/browser/dapps/shared/accounts/models/index.d.ts.map +1 -0
  109. package/dist/browser/dapps/shared/index.d.ts +4 -0
  110. package/dist/browser/dapps/shared/index.d.ts.map +1 -0
  111. package/dist/browser/dapps/shared/name-service/DomainIcon.d.ts +4 -0
  112. package/dist/browser/dapps/shared/name-service/DomainIcon.d.ts.map +1 -0
  113. package/dist/browser/dapps/shared/name-service/index.d.ts +2 -0
  114. package/dist/browser/dapps/shared/name-service/index.d.ts.map +1 -0
  115. package/dist/browser/dapps/shared/table/NextIteratorFlexbox.d.ts +9 -0
  116. package/dist/browser/dapps/shared/table/NextIteratorFlexbox.d.ts.map +1 -0
  117. package/dist/browser/dapps/shared/table/head/Payload.d.ts +12 -0
  118. package/dist/browser/dapps/shared/table/head/Payload.d.ts.map +1 -0
  119. package/dist/browser/dapps/shared/table/head/Schema.d.ts +3 -0
  120. package/dist/browser/dapps/shared/table/head/Schema.d.ts.map +1 -0
  121. package/dist/browser/dapps/shared/table/head/components/Head.d.ts +9 -0
  122. package/dist/browser/dapps/shared/table/head/components/Head.d.ts.map +1 -0
  123. package/dist/browser/dapps/shared/table/head/components/StyledTableRowHeader.d.ts +4 -0
  124. package/dist/browser/dapps/shared/table/head/components/StyledTableRowHeader.d.ts.map +1 -0
  125. package/dist/browser/dapps/shared/table/head/components/index.d.ts +2 -0
  126. package/dist/browser/dapps/shared/table/head/components/index.d.ts.map +1 -0
  127. package/dist/browser/dapps/shared/table/head/hooks/index.d.ts +2 -0
  128. package/dist/browser/dapps/shared/table/head/hooks/index.d.ts.map +1 -0
  129. package/dist/browser/dapps/shared/table/head/hooks/useVisibleColumns.d.ts +3 -0
  130. package/dist/browser/dapps/shared/table/head/hooks/useVisibleColumns.d.ts.map +1 -0
  131. package/dist/browser/dapps/shared/table/head/index.d.ts +5 -0
  132. package/dist/browser/dapps/shared/table/head/index.d.ts.map +1 -0
  133. package/dist/browser/dapps/shared/table/index.d.ts +3 -0
  134. package/dist/browser/dapps/shared/table/index.d.ts.map +1 -0
  135. package/dist/browser/dapps/shared/utils/countries.d.ts +18 -0
  136. package/dist/browser/dapps/shared/utils/countries.d.ts.map +1 -0
  137. package/dist/browser/helpers/BridgeActivityHelper.d.ts +59 -0
  138. package/dist/browser/helpers/BridgeActivityHelper.d.ts.map +1 -0
  139. package/dist/browser/helpers/BrowserLocator.d.ts +6 -0
  140. package/dist/browser/helpers/BrowserLocator.d.ts.map +1 -0
  141. package/dist/browser/helpers/NodePalettes.d.ts +4 -0
  142. package/dist/browser/helpers/NodePalettes.d.ts.map +1 -0
  143. package/dist/browser/helpers/index.d.ts +7 -0
  144. package/dist/browser/helpers/index.d.ts.map +1 -0
  145. package/dist/browser/helpers/monitor/XyOsBrowserMonitor.d.ts +6 -0
  146. package/dist/browser/helpers/monitor/XyOsBrowserMonitor.d.ts.map +1 -0
  147. package/dist/browser/helpers/monitor/index.d.ts +2 -0
  148. package/dist/browser/helpers/monitor/index.d.ts.map +1 -0
  149. package/dist/browser/helpers/widget/Caller.d.ts +21 -0
  150. package/dist/browser/helpers/widget/Caller.d.ts.map +1 -0
  151. package/dist/browser/helpers/widget/index.d.ts +2 -0
  152. package/dist/browser/helpers/widget/index.d.ts.map +1 -0
  153. package/dist/browser/helpers/widgets/UpperWidgetTrayLayout.d.ts +3 -0
  154. package/dist/browser/helpers/widgets/UpperWidgetTrayLayout.d.ts.map +1 -0
  155. package/dist/browser/helpers/widgets/index.d.ts +2 -0
  156. package/dist/browser/helpers/widgets/index.d.ts.map +1 -0
  157. package/dist/browser/hooks/DappIntentResourceHooks.d.ts +32 -0
  158. package/dist/browser/hooks/DappIntentResourceHooks.d.ts.map +1 -0
  159. package/dist/browser/hooks/NameServiceRegistrationHooks.d.ts +10 -0
  160. package/dist/browser/hooks/NameServiceRegistrationHooks.d.ts.map +1 -0
  161. package/dist/browser/hooks/ResourceHooks.d.ts +20 -0
  162. package/dist/browser/hooks/ResourceHooks.d.ts.map +1 -0
  163. package/dist/browser/hooks/access-requests/index.d.ts +2 -0
  164. package/dist/browser/hooks/access-requests/index.d.ts.map +1 -0
  165. package/dist/browser/hooks/access-requests/useBuildDappAccessRequestResource.d.ts +16 -0
  166. package/dist/browser/hooks/access-requests/useBuildDappAccessRequestResource.d.ts.map +1 -0
  167. package/dist/browser/hooks/bios/index.d.ts +3 -0
  168. package/dist/browser/hooks/bios/index.d.ts.map +1 -0
  169. package/dist/browser/hooks/bios/useBios.d.ts +3 -0
  170. package/dist/browser/hooks/bios/useBios.d.ts.map +1 -0
  171. package/dist/browser/hooks/bios/useKernel.d.ts +4 -0
  172. package/dist/browser/hooks/bios/useKernel.d.ts.map +1 -0
  173. package/dist/browser/hooks/index.d.ts +21 -0
  174. package/dist/browser/hooks/index.d.ts.map +1 -0
  175. package/dist/browser/hooks/intent/index.d.ts +6 -0
  176. package/dist/browser/hooks/intent/index.d.ts.map +1 -0
  177. package/dist/browser/hooks/intent/useClearIntents.d.ts +2 -0
  178. package/dist/browser/hooks/intent/useClearIntents.d.ts.map +1 -0
  179. package/dist/browser/hooks/intent/useDappIntentListener.d.ts +16 -0
  180. package/dist/browser/hooks/intent/useDappIntentListener.d.ts.map +1 -0
  181. package/dist/browser/hooks/intent/useDappIntentListener2.d.ts +3 -0
  182. package/dist/browser/hooks/intent/useDappIntentListener2.d.ts.map +1 -0
  183. package/dist/browser/hooks/intent/useNavigateIntent.d.ts +6 -0
  184. package/dist/browser/hooks/intent/useNavigateIntent.d.ts.map +1 -0
  185. package/dist/browser/hooks/intent/useSendDappIntent.d.ts +4 -0
  186. package/dist/browser/hooks/intent/useSendDappIntent.d.ts.map +1 -0
  187. package/dist/browser/hooks/menu/index.d.ts +4 -0
  188. package/dist/browser/hooks/menu/index.d.ts.map +1 -0
  189. package/dist/browser/hooks/menu/useAddDappMenuItems.d.ts +8 -0
  190. package/dist/browser/hooks/menu/useAddDappMenuItems.d.ts.map +1 -0
  191. package/dist/browser/hooks/menu/useBuildDappMenuResource.d.ts +14 -0
  192. package/dist/browser/hooks/menu/useBuildDappMenuResource.d.ts.map +1 -0
  193. package/dist/browser/hooks/menu/useDappMenuCaller.d.ts +8 -0
  194. package/dist/browser/hooks/menu/useDappMenuCaller.d.ts.map +1 -0
  195. package/dist/browser/hooks/os/index.d.ts +6 -0
  196. package/dist/browser/hooks/os/index.d.ts.map +1 -0
  197. package/dist/browser/hooks/os/useDappContextCreator.d.ts +5 -0
  198. package/dist/browser/hooks/os/useDappContextCreator.d.ts.map +1 -0
  199. package/dist/browser/hooks/os/useDappRegistrationResults.d.ts +3 -0
  200. package/dist/browser/hooks/os/useDappRegistrationResults.d.ts.map +1 -0
  201. package/dist/browser/hooks/os/useDappRegistry.d.ts +3 -0
  202. package/dist/browser/hooks/os/useDappRegistry.d.ts.map +1 -0
  203. package/dist/browser/hooks/os/useDappSeedPhraseRepository.d.ts +3 -0
  204. package/dist/browser/hooks/os/useDappSeedPhraseRepository.d.ts.map +1 -0
  205. package/dist/browser/hooks/os/useWidgetDapps.d.ts +8 -0
  206. package/dist/browser/hooks/os/useWidgetDapps.d.ts.map +1 -0
  207. package/dist/browser/hooks/useAccountArchivist.d.ts +22 -0
  208. package/dist/browser/hooks/useAccountArchivist.d.ts.map +1 -0
  209. package/dist/browser/hooks/useCleanup.d.ts +3 -0
  210. package/dist/browser/hooks/useCleanup.d.ts.map +1 -0
  211. package/dist/browser/hooks/useDappCaller.d.ts +4 -0
  212. package/dist/browser/hooks/useDappCaller.d.ts.map +1 -0
  213. package/dist/browser/hooks/useDappIntentCaller.d.ts +4 -0
  214. package/dist/browser/hooks/useDappIntentCaller.d.ts.map +1 -0
  215. package/dist/browser/hooks/useDebugClick.d.ts +6 -0
  216. package/dist/browser/hooks/useDebugClick.d.ts.map +1 -0
  217. package/dist/browser/hooks/useDetectCustomer.d.ts +19 -0
  218. package/dist/browser/hooks/useDetectCustomer.d.ts.map +1 -0
  219. package/dist/browser/hooks/useExposedNode.d.ts +16 -0
  220. package/dist/browser/hooks/useExposedNode.d.ts.map +1 -0
  221. package/dist/browser/hooks/useOsSettingsCaller.d.ts +4 -0
  222. package/dist/browser/hooks/useOsSettingsCaller.d.ts.map +1 -0
  223. package/dist/browser/hooks/usePhraseFile.d.ts +13 -0
  224. package/dist/browser/hooks/usePhraseFile.d.ts.map +1 -0
  225. package/dist/browser/hooks/useStackReady.d.ts +8 -0
  226. package/dist/browser/hooks/useStackReady.d.ts.map +1 -0
  227. package/dist/browser/hooks/useSyncExternalPayloadStore.d.ts +3 -0
  228. package/dist/browser/hooks/useSyncExternalPayloadStore.d.ts.map +1 -0
  229. package/dist/browser/hooks/useTabs.d.ts +3 -0
  230. package/dist/browser/hooks/useTabs.d.ts.map +1 -0
  231. package/dist/browser/img/backgrounds/index.d.ts +19 -0
  232. package/dist/browser/img/backgrounds/index.d.ts.map +1 -0
  233. package/dist/browser/img/index.d.ts +2 -0
  234. package/dist/browser/img/index.d.ts.map +1 -0
  235. package/dist/browser/index.d.ts +11 -0
  236. package/dist/browser/index.d.ts.map +1 -0
  237. package/dist/browser/index.mjs +4584 -0
  238. package/dist/browser/index.mjs.map +1 -0
  239. package/dist/browser/modules/Dapp/Button/IconEx.d.ts +10 -0
  240. package/dist/browser/modules/Dapp/Button/IconEx.d.ts.map +1 -0
  241. package/dist/browser/modules/Dapp/Button/LaunchFrame.d.ts +11 -0
  242. package/dist/browser/modules/Dapp/Button/LaunchFrame.d.ts.map +1 -0
  243. package/dist/browser/modules/Dapp/Button/StyledComponents.d.ts +8 -0
  244. package/dist/browser/modules/Dapp/Button/StyledComponents.d.ts.map +1 -0
  245. package/dist/browser/modules/Dapp/Button/hooks/index.d.ts +2 -0
  246. package/dist/browser/modules/Dapp/Button/hooks/index.d.ts.map +1 -0
  247. package/dist/browser/modules/Dapp/Button/hooks/useLaunchPoint.d.ts +6 -0
  248. package/dist/browser/modules/Dapp/Button/hooks/useLaunchPoint.d.ts.map +1 -0
  249. package/dist/browser/modules/Dapp/Button/index.d.ts +4 -0
  250. package/dist/browser/modules/Dapp/Button/index.d.ts.map +1 -0
  251. package/dist/browser/modules/Dapp/Button/lib/decomposeProps.d.ts +356 -0
  252. package/dist/browser/modules/Dapp/Button/lib/decomposeProps.d.ts.map +1 -0
  253. package/dist/browser/modules/Dapp/Button/lib/index.d.ts +2 -0
  254. package/dist/browser/modules/Dapp/Button/lib/index.d.ts.map +1 -0
  255. package/dist/browser/modules/Dapp/Container.d.ts +9 -0
  256. package/dist/browser/modules/Dapp/Container.d.ts.map +1 -0
  257. package/dist/browser/modules/Dapp/ContainerFlexbox.d.ts +10 -0
  258. package/dist/browser/modules/Dapp/ContainerFlexbox.d.ts.map +1 -0
  259. package/dist/browser/modules/Dapp/Debug/Dialog.d.ts +14 -0
  260. package/dist/browser/modules/Dapp/Debug/Dialog.d.ts.map +1 -0
  261. package/dist/browser/modules/Dapp/Debug/index.d.ts +2 -0
  262. package/dist/browser/modules/Dapp/Debug/index.d.ts.map +1 -0
  263. package/dist/browser/modules/Dapp/EnterAnimation.d.ts +7 -0
  264. package/dist/browser/modules/Dapp/EnterAnimation.d.ts.map +1 -0
  265. package/dist/browser/modules/Dapp/Page/DividerChip.d.ts +8 -0
  266. package/dist/browser/modules/Dapp/Page/DividerChip.d.ts.map +1 -0
  267. package/dist/browser/modules/Dapp/Page/Row.d.ts +13 -0
  268. package/dist/browser/modules/Dapp/Page/Row.d.ts.map +1 -0
  269. package/dist/browser/modules/Dapp/Page/index.d.ts +2 -0
  270. package/dist/browser/modules/Dapp/Page/index.d.ts.map +1 -0
  271. package/dist/browser/modules/Dapp/index.d.ts +6 -0
  272. package/dist/browser/modules/Dapp/index.d.ts.map +1 -0
  273. package/dist/browser/modules/Dapp/lib/DefaultIconSize.d.ts +2 -0
  274. package/dist/browser/modules/Dapp/lib/DefaultIconSize.d.ts.map +1 -0
  275. package/dist/browser/modules/Dapp/lib/index.d.ts +2 -0
  276. package/dist/browser/modules/Dapp/lib/index.d.ts.map +1 -0
  277. package/dist/browser/modules/Dapp/modules/Window/AppBar.d.ts +12 -0
  278. package/dist/browser/modules/Dapp/modules/Window/AppBar.d.ts.map +1 -0
  279. package/dist/browser/modules/Dapp/modules/Window/Chrome.d.ts +16 -0
  280. package/dist/browser/modules/Dapp/modules/Window/Chrome.d.ts.map +1 -0
  281. package/dist/browser/modules/Dapp/modules/Window/DappWindow.d.ts +9 -0
  282. package/dist/browser/modules/Dapp/modules/Window/DappWindow.d.ts.map +1 -0
  283. package/dist/browser/modules/Dapp/modules/Window/LoadingFlexbox.d.ts +10 -0
  284. package/dist/browser/modules/Dapp/modules/Window/LoadingFlexbox.d.ts.map +1 -0
  285. package/dist/browser/modules/Dapp/modules/Window/NodeManifest.d.ts +2 -0
  286. package/dist/browser/modules/Dapp/modules/Window/NodeManifest.d.ts.map +1 -0
  287. package/dist/browser/modules/Dapp/modules/Window/Trail.d.ts +8 -0
  288. package/dist/browser/modules/Dapp/modules/Window/Trail.d.ts.map +1 -0
  289. package/dist/browser/modules/Dapp/modules/Window/components/DefaultComingSoon/DefaultComingSoon.d.ts +13 -0
  290. package/dist/browser/modules/Dapp/modules/Window/components/DefaultComingSoon/DefaultComingSoon.d.ts.map +1 -0
  291. package/dist/browser/modules/Dapp/modules/Window/components/DefaultComingSoon/DeveloperLinkSection.d.ts +7 -0
  292. package/dist/browser/modules/Dapp/modules/Window/components/DefaultComingSoon/DeveloperLinkSection.d.ts.map +1 -0
  293. package/dist/browser/modules/Dapp/modules/Window/components/DefaultComingSoon/InstallButtonSection.d.ts +8 -0
  294. package/dist/browser/modules/Dapp/modules/Window/components/DefaultComingSoon/InstallButtonSection.d.ts.map +1 -0
  295. package/dist/browser/modules/Dapp/modules/Window/components/DefaultComingSoon/SummarySection.d.ts +10 -0
  296. package/dist/browser/modules/Dapp/modules/Window/components/DefaultComingSoon/SummarySection.d.ts.map +1 -0
  297. package/dist/browser/modules/Dapp/modules/Window/components/DefaultComingSoon/index.d.ts +2 -0
  298. package/dist/browser/modules/Dapp/modules/Window/components/DefaultComingSoon/index.d.ts.map +1 -0
  299. package/dist/browser/modules/Dapp/modules/Window/components/index.d.ts +2 -0
  300. package/dist/browser/modules/Dapp/modules/Window/components/index.d.ts.map +1 -0
  301. package/dist/browser/modules/Dapp/modules/Window/hooks/index.d.ts +7 -0
  302. package/dist/browser/modules/Dapp/modules/Window/hooks/index.d.ts.map +1 -0
  303. package/dist/browser/modules/Dapp/modules/Window/hooks/lib/DappPathHelpers.d.ts +6 -0
  304. package/dist/browser/modules/Dapp/modules/Window/hooks/lib/DappPathHelpers.d.ts.map +1 -0
  305. package/dist/browser/modules/Dapp/modules/Window/hooks/lib/index.d.ts +2 -0
  306. package/dist/browser/modules/Dapp/modules/Window/hooks/lib/index.d.ts.map +1 -0
  307. package/dist/browser/modules/Dapp/modules/Window/hooks/menu/index.d.ts +2 -0
  308. package/dist/browser/modules/Dapp/modules/Window/hooks/menu/index.d.ts.map +1 -0
  309. package/dist/browser/modules/Dapp/modules/Window/hooks/menu/useDappMenu.d.ts +9 -0
  310. package/dist/browser/modules/Dapp/modules/Window/hooks/menu/useDappMenu.d.ts.map +1 -0
  311. package/dist/browser/modules/Dapp/modules/Window/hooks/route/helpers/index.d.ts +5 -0
  312. package/dist/browser/modules/Dapp/modules/Window/hooks/route/helpers/index.d.ts.map +1 -0
  313. package/dist/browser/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappInjectableParamsFromRoute.d.ts +3 -0
  314. package/dist/browser/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappInjectableParamsFromRoute.d.ts.map +1 -0
  315. package/dist/browser/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappIntentRequest.d.ts +3 -0
  316. package/dist/browser/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappIntentRequest.d.ts.map +1 -0
  317. package/dist/browser/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappPathFromRoute.d.ts +3 -0
  318. package/dist/browser/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappPathFromRoute.d.ts.map +1 -0
  319. package/dist/browser/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappStateFromRoute.d.ts +3 -0
  320. package/dist/browser/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappStateFromRoute.d.ts.map +1 -0
  321. package/dist/browser/modules/Dapp/modules/Window/hooks/route/index.d.ts +3 -0
  322. package/dist/browser/modules/Dapp/modules/Window/hooks/route/index.d.ts.map +1 -0
  323. package/dist/browser/modules/Dapp/modules/Window/hooks/route/useManageDappBasedOffRoute.d.ts +3 -0
  324. package/dist/browser/modules/Dapp/modules/Window/hooks/route/useManageDappBasedOffRoute.d.ts.map +1 -0
  325. package/dist/browser/modules/Dapp/modules/Window/hooks/useDappMenuResourceValues.d.ts +9 -0
  326. package/dist/browser/modules/Dapp/modules/Window/hooks/useDappMenuResourceValues.d.ts.map +1 -0
  327. package/dist/browser/modules/Dapp/modules/Window/hooks/useDappState.d.ts +8 -0
  328. package/dist/browser/modules/Dapp/modules/Window/hooks/useDappState.d.ts.map +1 -0
  329. package/dist/browser/modules/Dapp/modules/Window/hooks/useDecomposeDappSet.d.ts +9 -0
  330. package/dist/browser/modules/Dapp/modules/Window/hooks/useDecomposeDappSet.d.ts.map +1 -0
  331. package/dist/browser/modules/Dapp/modules/Window/hooks/useSkipLoadingScreen.d.ts +2 -0
  332. package/dist/browser/modules/Dapp/modules/Window/hooks/useSkipLoadingScreen.d.ts.map +1 -0
  333. package/dist/browser/modules/Dapp/modules/Window/hooks/useSyncOsRegisteredAccessInterfaces.d.ts +3 -0
  334. package/dist/browser/modules/Dapp/modules/Window/hooks/useSyncOsRegisteredAccessInterfaces.d.ts.map +1 -0
  335. package/dist/browser/modules/Dapp/modules/Window/index.d.ts +7 -0
  336. package/dist/browser/modules/Dapp/modules/Window/index.d.ts.map +1 -0
  337. package/dist/browser/modules/Dapp/modules/Window/menu/BottomNavigation.d.ts +11 -0
  338. package/dist/browser/modules/Dapp/modules/Window/menu/BottomNavigation.d.ts.map +1 -0
  339. package/dist/browser/modules/Dapp/modules/Window/menu/Drawer.d.ts +16 -0
  340. package/dist/browser/modules/Dapp/modules/Window/menu/Drawer.d.ts.map +1 -0
  341. package/dist/browser/modules/Dapp/modules/Window/menu/SocialData.d.ts +8 -0
  342. package/dist/browser/modules/Dapp/modules/Window/menu/SocialData.d.ts.map +1 -0
  343. package/dist/browser/modules/Dapp/modules/Window/menu/index.d.ts +3 -0
  344. package/dist/browser/modules/Dapp/modules/Window/menu/index.d.ts.map +1 -0
  345. package/dist/browser/modules/Dapp/modules/access-interface/components/Dialog.d.ts +10 -0
  346. package/dist/browser/modules/Dapp/modules/access-interface/components/Dialog.d.ts.map +1 -0
  347. package/dist/browser/modules/Dapp/modules/access-interface/components/Flexbox.d.ts +7 -0
  348. package/dist/browser/modules/Dapp/modules/access-interface/components/Flexbox.d.ts.map +1 -0
  349. package/dist/browser/modules/Dapp/modules/access-interface/components/index.d.ts +3 -0
  350. package/dist/browser/modules/Dapp/modules/access-interface/components/index.d.ts.map +1 -0
  351. package/dist/browser/modules/Dapp/modules/access-interface/hooks/index.d.ts +2 -0
  352. package/dist/browser/modules/Dapp/modules/access-interface/hooks/index.d.ts.map +1 -0
  353. package/dist/browser/modules/Dapp/modules/access-interface/hooks/useDialogState.d.ts +14 -0
  354. package/dist/browser/modules/Dapp/modules/access-interface/hooks/useDialogState.d.ts.map +1 -0
  355. package/dist/browser/modules/Dapp/modules/access-interface/index.d.ts +3 -0
  356. package/dist/browser/modules/Dapp/modules/access-interface/index.d.ts.map +1 -0
  357. package/dist/browser/modules/Dapp/modules/index.d.ts +3 -0
  358. package/dist/browser/modules/Dapp/modules/index.d.ts.map +1 -0
  359. package/dist/browser/modules/LoadingOsLogo/LoadingOsLogo.d.ts +9 -0
  360. package/dist/browser/modules/LoadingOsLogo/LoadingOsLogo.d.ts.map +1 -0
  361. package/dist/browser/modules/LoadingOsLogo/img/index.d.ts +2 -0
  362. package/dist/browser/modules/LoadingOsLogo/img/index.d.ts.map +1 -0
  363. package/dist/browser/modules/LoadingOsLogo/index.d.ts +2 -0
  364. package/dist/browser/modules/LoadingOsLogo/index.d.ts.map +1 -0
  365. package/dist/browser/modules/XyOsUi/contexts/XyOsUiContext.d.ts +5 -0
  366. package/dist/browser/modules/XyOsUi/contexts/XyOsUiContext.d.ts.map +1 -0
  367. package/dist/browser/modules/XyOsUi/contexts/index.d.ts +2 -0
  368. package/dist/browser/modules/XyOsUi/contexts/index.d.ts.map +1 -0
  369. package/dist/browser/modules/XyOsUi/index.d.ts +3 -0
  370. package/dist/browser/modules/XyOsUi/index.d.ts.map +1 -0
  371. package/dist/browser/modules/XyOsUi/lib/XyOsUi.d.ts +17 -0
  372. package/dist/browser/modules/XyOsUi/lib/XyOsUi.d.ts.map +1 -0
  373. package/dist/browser/modules/XyOsUi/lib/index.d.ts +2 -0
  374. package/dist/browser/modules/XyOsUi/lib/index.d.ts.map +1 -0
  375. package/dist/browser/modules/index.d.ts +5 -0
  376. package/dist/browser/modules/index.d.ts.map +1 -0
  377. package/dist/browser/modules/network/components/LoadingIndicator.d.ts +6 -0
  378. package/dist/browser/modules/network/components/LoadingIndicator.d.ts.map +1 -0
  379. package/dist/browser/modules/network/components/NetworkButton.d.ts +4 -0
  380. package/dist/browser/modules/network/components/NetworkButton.d.ts.map +1 -0
  381. package/dist/browser/modules/network/components/NetworkReady.d.ts +8 -0
  382. package/dist/browser/modules/network/components/NetworkReady.d.ts.map +1 -0
  383. package/dist/browser/modules/network/components/StyledLoadingIndicator.d.ts +2 -0
  384. package/dist/browser/modules/network/components/StyledLoadingIndicator.d.ts.map +1 -0
  385. package/dist/browser/modules/network/components/index.d.ts +4 -0
  386. package/dist/browser/modules/network/components/index.d.ts.map +1 -0
  387. package/dist/browser/modules/network/hooks/index.d.ts +3 -0
  388. package/dist/browser/modules/network/hooks/index.d.ts.map +1 -0
  389. package/dist/browser/modules/network/hooks/lib/NetworkState.d.ts +8 -0
  390. package/dist/browser/modules/network/hooks/lib/NetworkState.d.ts.map +1 -0
  391. package/dist/browser/modules/network/hooks/lib/createNetworkState.d.ts +4 -0
  392. package/dist/browser/modules/network/hooks/lib/createNetworkState.d.ts.map +1 -0
  393. package/dist/browser/modules/network/hooks/lib/index.d.ts +3 -0
  394. package/dist/browser/modules/network/hooks/lib/index.d.ts.map +1 -0
  395. package/dist/browser/modules/network/hooks/useOsNetwork.d.ts +3 -0
  396. package/dist/browser/modules/network/hooks/useOsNetwork.d.ts.map +1 -0
  397. package/dist/browser/modules/network/hooks/useXyoPublicNetwork.d.ts +3 -0
  398. package/dist/browser/modules/network/hooks/useXyoPublicNetwork.d.ts.map +1 -0
  399. package/dist/browser/modules/network/index.d.ts +3 -0
  400. package/dist/browser/modules/network/index.d.ts.map +1 -0
  401. package/dist/browser/moss-dark@3x-HV35CF34.webp +0 -0
  402. package/dist/browser/moss-light@3x-UH4AJQR5.webp +0 -0
  403. package/dist/browser/ocean-dark@3x-LDW7E4ZL.webp +0 -0
  404. package/dist/browser/ocean-light@3x-FP7M2MO7.webp +0 -0
  405. package/dist/browser/peachYogurt-dark@3x-UWHJTY5O.webp +0 -0
  406. package/dist/browser/peachYogurt-light@3x-X7Y7NU2Y.webp +0 -0
  407. package/dist/browser/settings/Theme/ThemeCssVars.d.ts +18 -0
  408. package/dist/browser/settings/Theme/ThemeCssVars.d.ts.map +1 -0
  409. package/dist/browser/settings/Theme/ThemeProvider.d.ts +4 -0
  410. package/dist/browser/settings/Theme/ThemeProvider.d.ts.map +1 -0
  411. package/dist/browser/settings/Theme/index.d.ts +2 -0
  412. package/dist/browser/settings/Theme/index.d.ts.map +1 -0
  413. package/dist/browser/settings/index.d.ts +2 -0
  414. package/dist/browser/settings/index.d.ts.map +1 -0
  415. package/dist/browser/sherbet-dark@3x-UAIXX4RP.webp +0 -0
  416. package/dist/browser/sherbet-light@3x-2Q2EFFWE.webp +0 -0
  417. package/dist/browser/spring-dark@3x-XU3GBWBF.webp +0 -0
  418. package/dist/browser/spring-light@3x-EFV3QMVY.webp +0 -0
  419. package/dist/browser/sunset-dark@3x-F25FUK74.webp +0 -0
  420. package/dist/browser/sunset-light@3x-B5T3EVGS.webp +0 -0
  421. package/dist/browser/utils/DappInstallTypeFilters.d.ts +3 -0
  422. package/dist/browser/utils/DappInstallTypeFilters.d.ts.map +1 -0
  423. package/dist/browser/utils/getApiDomain.d.ts +3 -0
  424. package/dist/browser/utils/getApiDomain.d.ts.map +1 -0
  425. package/dist/browser/utils/index.d.ts +4 -0
  426. package/dist/browser/utils/index.d.ts.map +1 -0
  427. package/dist/browser/utils/useOnWindowResize.d.ts +2 -0
  428. package/dist/browser/utils/useOnWindowResize.d.ts.map +1 -0
  429. package/dist/browser/xyo-dark@3x-N62LIF7V.webp +0 -0
  430. package/dist/browser/xyo-light@3x-5S6CF5P4.webp +0 -0
  431. package/dist/browser/xyoOS-Icon-2Q4XCUPP.svg +1 -0
  432. package/dist/browser/xyoOS-Icon-Black-ACSS4SEQ.svg +1 -0
  433. package/dist/browser/xyoOS-Icon-White-47MP66MD.svg +1 -0
  434. package/package.json +115 -0
  435. package/src/DappPage.tsx +110 -0
  436. package/src/DappPathSwitcher.tsx +57 -0
  437. package/src/StyledBuilder.tsx +17 -0
  438. package/src/components/RenderHtml.tsx +12 -0
  439. package/src/components/Widgets/StackOfWidgets.tsx +151 -0
  440. package/src/components/Widgets/Types/BarGraph/HorizontalBarGraph.tsx +58 -0
  441. package/src/components/Widgets/Types/BarGraph/StyledLinearProgress.tsx +13 -0
  442. package/src/components/Widgets/Types/BarGraph/index.ts +2 -0
  443. package/src/components/Widgets/Types/DataColumns/TwoColFourStat.tsx +34 -0
  444. package/src/components/Widgets/Types/DataColumns/TwoColTwoStat.tsx +39 -0
  445. package/src/components/Widgets/Types/DataColumns/index.ts +1 -0
  446. package/src/components/Widgets/Types/Examples/BarGraph.tsx +10 -0
  447. package/src/components/Widgets/Types/Examples/BooleanTable.tsx +27 -0
  448. package/src/components/Widgets/Types/Examples/TwoColTwoStat.tsx +27 -0
  449. package/src/components/Widgets/Types/Examples/index.ts +3 -0
  450. package/src/components/Widgets/Types/Stat/Insight.ts +9 -0
  451. package/src/components/Widgets/Types/Stat/InsightStatProps.ts +7 -0
  452. package/src/components/Widgets/Types/Stat/Stat.tsx +43 -0
  453. package/src/components/Widgets/Types/Stat/Subtitle.tsx +14 -0
  454. package/src/components/Widgets/Types/Stat/Unit.tsx +13 -0
  455. package/src/components/Widgets/Types/Stat/Value.tsx +16 -0
  456. package/src/components/Widgets/Types/Stat/index.ts +3 -0
  457. package/src/components/Widgets/Types/Tables/BooleanTable.tsx +87 -0
  458. package/src/components/Widgets/Types/Tables/index.ts +1 -0
  459. package/src/components/Widgets/Types/index.ts +4 -0
  460. package/src/components/Widgets/WidgetCard.tsx +110 -0
  461. package/src/components/Widgets/WidgetCardExamples.tsx +31 -0
  462. package/src/components/Widgets/index.ts +2 -0
  463. package/src/components/alerts/errors/RenderErrorWithSupportLink.tsx +45 -0
  464. package/src/components/alerts/errors/index.ts +1 -0
  465. package/src/components/alerts/index.ts +1 -0
  466. package/src/components/index.ts +3 -0
  467. package/src/dapps/index.ts +1 -0
  468. package/src/dapps/shared/accounts/components/AccountCard.tsx +58 -0
  469. package/src/dapps/shared/accounts/components/AnimatedComponents/GenericAnimations/ShiftAnimation.tsx +116 -0
  470. package/src/dapps/shared/accounts/components/AnimatedComponents/GenericAnimations/index.ts +1 -0
  471. package/src/dapps/shared/accounts/components/AnimatedComponents/IconAnimations/TwoToneBulletPoint.tsx +24 -0
  472. package/src/dapps/shared/accounts/components/AnimatedComponents/IconAnimations/TwoToneBulletPointList.tsx +24 -0
  473. package/src/dapps/shared/accounts/components/AnimatedComponents/IconAnimations/index.ts +2 -0
  474. package/src/dapps/shared/accounts/components/AnimatedComponents/index.ts +2 -0
  475. package/src/dapps/shared/accounts/components/InputFields/CoinbaseEmail.tsx +41 -0
  476. package/src/dapps/shared/accounts/components/InputFields/PrimaryCryptowallet.tsx +42 -0
  477. package/src/dapps/shared/accounts/components/InputFields/SecondaryCryptowallet.tsx +42 -0
  478. package/src/dapps/shared/accounts/components/InputFields/index.ts +3 -0
  479. package/src/dapps/shared/accounts/components/PaymentMethods.tsx +51 -0
  480. package/src/dapps/shared/accounts/components/index.ts +3 -0
  481. package/src/dapps/shared/accounts/icon/Icon.tsx +49 -0
  482. package/src/dapps/shared/accounts/icon/custom-accounts-icon.svg +1 -0
  483. package/src/dapps/shared/accounts/icon/index.ts +1 -0
  484. package/src/dapps/shared/accounts/index.ts +2 -0
  485. package/src/dapps/shared/accounts/models/CreditCardInput.ts +20 -0
  486. package/src/dapps/shared/accounts/models/index.ts +1 -0
  487. package/src/dapps/shared/index.ts +3 -0
  488. package/src/dapps/shared/name-service/DomainIcon.tsx +13 -0
  489. package/src/dapps/shared/name-service/index.ts +1 -0
  490. package/src/dapps/shared/table/NextIteratorFlexbox.tsx +32 -0
  491. package/src/dapps/shared/table/head/Payload.ts +11 -0
  492. package/src/dapps/shared/table/head/Schema.ts +2 -0
  493. package/src/dapps/shared/table/head/components/Head.tsx +47 -0
  494. package/src/dapps/shared/table/head/components/StyledTableRowHeader.tsx +6 -0
  495. package/src/dapps/shared/table/head/components/index.ts +1 -0
  496. package/src/dapps/shared/table/head/hooks/index.ts +1 -0
  497. package/src/dapps/shared/table/head/hooks/useVisibleColumns.tsx +15 -0
  498. package/src/dapps/shared/table/head/index.ts +4 -0
  499. package/src/dapps/shared/table/index.ts +2 -0
  500. package/src/dapps/shared/utils/countries.ts +54 -0
  501. package/src/helpers/BridgeActivityHelper.ts +39 -0
  502. package/src/helpers/BrowserLocator.ts +18 -0
  503. package/src/helpers/NodePalettes.ts +84 -0
  504. package/src/helpers/index.ts +6 -0
  505. package/src/helpers/monitor/XyOsBrowserMonitor.ts +14 -0
  506. package/src/helpers/monitor/index.ts +1 -0
  507. package/src/helpers/widget/Caller.tsx +121 -0
  508. package/src/helpers/widget/index.ts +1 -0
  509. package/src/helpers/widgets/UpperWidgetTrayLayout.ts +20 -0
  510. package/src/helpers/widgets/index.ts +1 -0
  511. package/src/hooks/DappIntentResourceHooks.ts +35 -0
  512. package/src/hooks/NameServiceRegistrationHooks.ts +36 -0
  513. package/src/hooks/ResourceHooks.ts +39 -0
  514. package/src/hooks/access-requests/index.ts +1 -0
  515. package/src/hooks/access-requests/useBuildDappAccessRequestResource.ts +38 -0
  516. package/src/hooks/bios/index.ts +2 -0
  517. package/src/hooks/bios/useBios.ts +26 -0
  518. package/src/hooks/bios/useKernel.ts +36 -0
  519. package/src/hooks/index.ts +20 -0
  520. package/src/hooks/intent/index.ts +5 -0
  521. package/src/hooks/intent/useClearIntents.tsx +14 -0
  522. package/src/hooks/intent/useDappIntentListener.tsx +49 -0
  523. package/src/hooks/intent/useDappIntentListener2.tsx +48 -0
  524. package/src/hooks/intent/useNavigateIntent.tsx +51 -0
  525. package/src/hooks/intent/useSendDappIntent.tsx +38 -0
  526. package/src/hooks/menu/index.ts +3 -0
  527. package/src/hooks/menu/useAddDappMenuItems.tsx +25 -0
  528. package/src/hooks/menu/useBuildDappMenuResource.ts +39 -0
  529. package/src/hooks/menu/useDappMenuCaller.tsx +22 -0
  530. package/src/hooks/os/index.ts +5 -0
  531. package/src/hooks/os/useDappContextCreator.tsx +84 -0
  532. package/src/hooks/os/useDappRegistrationResults.tsx +30 -0
  533. package/src/hooks/os/useDappRegistry.tsx +19 -0
  534. package/src/hooks/os/useDappSeedPhraseRepository.tsx +19 -0
  535. package/src/hooks/os/useWidgetDapps.tsx +23 -0
  536. package/src/hooks/useAccountArchivist.ts +5 -0
  537. package/src/hooks/useCleanup.tsx +10 -0
  538. package/src/hooks/useDappCaller.tsx +16 -0
  539. package/src/hooks/useDappIntentCaller.tsx +17 -0
  540. package/src/hooks/useDebugClick.tsx +61 -0
  541. package/src/hooks/useDetectCustomer.tsx +21 -0
  542. package/src/hooks/useExposedNode.ts +6 -0
  543. package/src/hooks/useOsSettingsCaller.tsx +19 -0
  544. package/src/hooks/usePhraseFile.tsx +33 -0
  545. package/src/hooks/useStackReady.tsx +53 -0
  546. package/src/hooks/useSyncExternalPayloadStore.tsx +37 -0
  547. package/src/hooks/useTabs.ts +14 -0
  548. package/src/img/backgrounds/candy-dark@3x.webp +0 -0
  549. package/src/img/backgrounds/candy-light@3x.webp +0 -0
  550. package/src/img/backgrounds/candyApple-dark@3x.webp +0 -0
  551. package/src/img/backgrounds/candyApple-light@3x.webp +0 -0
  552. package/src/img/backgrounds/images.d.ts +5 -0
  553. package/src/img/backgrounds/index.ts +18 -0
  554. package/src/img/backgrounds/moss-dark@3x.webp +0 -0
  555. package/src/img/backgrounds/moss-light@3x.webp +0 -0
  556. package/src/img/backgrounds/ocean-dark@3x.webp +0 -0
  557. package/src/img/backgrounds/ocean-light@3x.webp +0 -0
  558. package/src/img/backgrounds/peachYogurt-dark@3x.webp +0 -0
  559. package/src/img/backgrounds/peachYogurt-light@3x.webp +0 -0
  560. package/src/img/backgrounds/sherbet-dark@3x.webp +0 -0
  561. package/src/img/backgrounds/sherbet-light@3x.webp +0 -0
  562. package/src/img/backgrounds/spring-dark@3x.webp +0 -0
  563. package/src/img/backgrounds/spring-light@3x.webp +0 -0
  564. package/src/img/backgrounds/sunset-dark@3x.webp +0 -0
  565. package/src/img/backgrounds/sunset-light@3x.webp +0 -0
  566. package/src/img/backgrounds/xyo-dark@3x.webp +0 -0
  567. package/src/img/backgrounds/xyo-light@3x.webp +0 -0
  568. package/src/img/index.ts +1 -0
  569. package/src/index.ts +10 -0
  570. package/src/modules/Dapp/Button/IconEx.tsx +92 -0
  571. package/src/modules/Dapp/Button/LaunchFrame.tsx +78 -0
  572. package/src/modules/Dapp/Button/StyledComponents.tsx +68 -0
  573. package/src/modules/Dapp/Button/hooks/index.ts +1 -0
  574. package/src/modules/Dapp/Button/hooks/useLaunchPoint.tsx +31 -0
  575. package/src/modules/Dapp/Button/index.ts +3 -0
  576. package/src/modules/Dapp/Button/lib/decomposeProps.tsx +15 -0
  577. package/src/modules/Dapp/Button/lib/index.ts +1 -0
  578. package/src/modules/Dapp/Container.tsx +22 -0
  579. package/src/modules/Dapp/ContainerFlexbox.tsx +30 -0
  580. package/src/modules/Dapp/Debug/Dialog.tsx +54 -0
  581. package/src/modules/Dapp/Debug/index.ts +1 -0
  582. package/src/modules/Dapp/EnterAnimation.tsx +54 -0
  583. package/src/modules/Dapp/Page/DividerChip.tsx +31 -0
  584. package/src/modules/Dapp/Page/Row.tsx +59 -0
  585. package/src/modules/Dapp/Page/index.ts +1 -0
  586. package/src/modules/Dapp/index.ts +5 -0
  587. package/src/modules/Dapp/lib/DefaultIconSize.ts +1 -0
  588. package/src/modules/Dapp/lib/index.ts +1 -0
  589. package/src/modules/Dapp/modules/Window/AppBar.tsx +111 -0
  590. package/src/modules/Dapp/modules/Window/Chrome.tsx +79 -0
  591. package/src/modules/Dapp/modules/Window/DappWindow.tsx +150 -0
  592. package/src/modules/Dapp/modules/Window/LoadingFlexbox.tsx +99 -0
  593. package/src/modules/Dapp/modules/Window/NodeManifest.tsx +16 -0
  594. package/src/modules/Dapp/modules/Window/Trail.tsx +33 -0
  595. package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/DefaultComingSoon.tsx +81 -0
  596. package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/DeveloperLinkSection.tsx +27 -0
  597. package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/InstallButtonSection.tsx +34 -0
  598. package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/SummarySection.tsx +73 -0
  599. package/src/modules/Dapp/modules/Window/components/DefaultComingSoon/index.ts +1 -0
  600. package/src/modules/Dapp/modules/Window/components/index.ts +1 -0
  601. package/src/modules/Dapp/modules/Window/hooks/index.ts +6 -0
  602. package/src/modules/Dapp/modules/Window/hooks/lib/DappPathHelpers.ts +34 -0
  603. package/src/modules/Dapp/modules/Window/hooks/lib/index.ts +1 -0
  604. package/src/modules/Dapp/modules/Window/hooks/menu/index.ts +1 -0
  605. package/src/modules/Dapp/modules/Window/hooks/menu/useDappMenu.tsx +70 -0
  606. package/src/modules/Dapp/modules/Window/hooks/route/helpers/index.ts +4 -0
  607. package/src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappInjectableParamsFromRoute.tsx +59 -0
  608. package/src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappIntentRequest.tsx +67 -0
  609. package/src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappPathFromRoute.tsx +72 -0
  610. package/src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappStateFromRoute.tsx +45 -0
  611. package/src/modules/Dapp/modules/Window/hooks/route/index.ts +2 -0
  612. package/src/modules/Dapp/modules/Window/hooks/route/useManageDappBasedOffRoute.tsx +33 -0
  613. package/src/modules/Dapp/modules/Window/hooks/useDappMenuResourceValues.tsx +16 -0
  614. package/src/modules/Dapp/modules/Window/hooks/useDappState.tsx +14 -0
  615. package/src/modules/Dapp/modules/Window/hooks/useDecomposeDappSet.tsx +19 -0
  616. package/src/modules/Dapp/modules/Window/hooks/useSkipLoadingScreen.tsx +17 -0
  617. package/src/modules/Dapp/modules/Window/hooks/useSyncOsRegisteredAccessInterfaces.tsx +36 -0
  618. package/src/modules/Dapp/modules/Window/index.ts +6 -0
  619. package/src/modules/Dapp/modules/Window/menu/BottomNavigation.tsx +66 -0
  620. package/src/modules/Dapp/modules/Window/menu/Drawer.tsx +220 -0
  621. package/src/modules/Dapp/modules/Window/menu/SocialData.tsx +71 -0
  622. package/src/modules/Dapp/modules/Window/menu/img/xyoOS-Icon-Black.svg +1 -0
  623. package/src/modules/Dapp/modules/Window/menu/img/xyoOS-Icon-White.svg +1 -0
  624. package/src/modules/Dapp/modules/Window/menu/index.ts +2 -0
  625. package/src/modules/Dapp/modules/access-interface/components/Dialog.tsx +129 -0
  626. package/src/modules/Dapp/modules/access-interface/components/Flexbox.tsx +29 -0
  627. package/src/modules/Dapp/modules/access-interface/components/index.ts +2 -0
  628. package/src/modules/Dapp/modules/access-interface/hooks/index.ts +1 -0
  629. package/src/modules/Dapp/modules/access-interface/hooks/useDialogState.tsx +28 -0
  630. package/src/modules/Dapp/modules/access-interface/index.ts +2 -0
  631. package/src/modules/Dapp/modules/index.ts +2 -0
  632. package/src/modules/LoadingOsLogo/LoadingOsLogo.tsx +54 -0
  633. package/src/modules/LoadingOsLogo/img/index.ts +1 -0
  634. package/src/modules/LoadingOsLogo/img/xyoOS-Icon.svg +1 -0
  635. package/src/modules/LoadingOsLogo/index.ts +1 -0
  636. package/src/modules/XyOsUi/contexts/XyOsUiContext.ts +10 -0
  637. package/src/modules/XyOsUi/contexts/index.ts +1 -0
  638. package/src/modules/XyOsUi/index.ts +2 -0
  639. package/src/modules/XyOsUi/lib/XyOsUi.ts +50 -0
  640. package/src/modules/XyOsUi/lib/index.ts +1 -0
  641. package/src/modules/index.ts +4 -0
  642. package/src/modules/network/components/LoadingIndicator.tsx +51 -0
  643. package/src/modules/network/components/NetworkButton.tsx +27 -0
  644. package/src/modules/network/components/NetworkReady.tsx +31 -0
  645. package/src/modules/network/components/StyledLoadingIndicator.tsx +49 -0
  646. package/src/modules/network/components/index.ts +3 -0
  647. package/src/modules/network/hooks/index.ts +2 -0
  648. package/src/modules/network/hooks/lib/NetworkState.ts +8 -0
  649. package/src/modules/network/hooks/lib/createNetworkState.ts +20 -0
  650. package/src/modules/network/hooks/lib/index.ts +2 -0
  651. package/src/modules/network/hooks/useOsNetwork.tsx +17 -0
  652. package/src/modules/network/hooks/useXyoPublicNetwork.tsx +17 -0
  653. package/src/modules/network/index.ts +2 -0
  654. package/src/settings/Theme/ThemeCssVars.ts +200 -0
  655. package/src/settings/Theme/ThemeProvider.tsx +22 -0
  656. package/src/settings/Theme/index.ts +1 -0
  657. package/src/settings/index.ts +1 -0
  658. package/src/types/global.d.ts +8 -0
  659. package/src/types/images.d.ts +13 -0
  660. package/src/utils/DappInstallTypeFilters.ts +27 -0
  661. package/src/utils/getApiDomain.ts +14 -0
  662. package/src/utils/index.ts +3 -0
  663. package/src/utils/useOnWindowResize.tsx +18 -0
  664. package/typedoc.json +5 -0
  665. package/xy.config.ts +10 -0
@@ -0,0 +1,4584 @@
1
+ // src/components/alerts/errors/RenderErrorWithSupportLink.tsx
2
+ import { ButtonEx } from "@xylabs/react-button";
3
+ import { ErrorAlert } from "@xyo-network/react-error";
4
+ import { useEffect } from "react";
5
+ import { useLocation } from "react-router-dom";
6
+ import { jsx } from "react/jsx-runtime";
7
+ var ErrorRenderWithSupport = ({
8
+ supportHref = "",
9
+ supportTo,
10
+ supportLinkText = "Support",
11
+ error,
12
+ errorContext,
13
+ onCancel,
14
+ ...props
15
+ }) => {
16
+ const location2 = useLocation();
17
+ useEffect(() => {
18
+ location2.state = { from: { pathname: window.location.pathname } };
19
+ }, [location2]);
20
+ return /* @__PURE__ */ jsx(
21
+ ErrorAlert,
22
+ {
23
+ action: /* @__PURE__ */ jsx(ButtonEx, { target: "_blank", href: supportHref, to: supportTo, color: "inherit", size: "small", children: supportLinkText }),
24
+ error,
25
+ errorContext,
26
+ onCancel,
27
+ ...props
28
+ }
29
+ );
30
+ };
31
+ var ErrorRenderWithSupportDefault = (props) => {
32
+ return /* @__PURE__ */ jsx(ErrorRenderWithSupport, { supportHref: "https://discord.com/channels/935586624392298547/1228436997375393885", ...props });
33
+ };
34
+
35
+ // src/components/RenderHtml.tsx
36
+ import { jsx as jsx2 } from "react/jsx-runtime";
37
+ var RenderHtml = ({ htmlString }) => {
38
+ return /* @__PURE__ */ jsx2(
39
+ "div",
40
+ {
41
+ style: { height: 64, width: 64 },
42
+ dangerouslySetInnerHTML: { __html: htmlString }
43
+ }
44
+ );
45
+ };
46
+
47
+ // src/components/Widgets/WidgetCard.tsx
48
+ import {
49
+ ArrowForwardRounded,
50
+ HistoryRounded,
51
+ RefreshRounded
52
+ } from "@mui/icons-material";
53
+ import {
54
+ alpha,
55
+ Box,
56
+ CardContent,
57
+ IconButton,
58
+ Tooltip,
59
+ Typography,
60
+ useTheme
61
+ } from "@mui/material";
62
+ import { ButtonEx as ButtonEx2 } from "@xylabs/react-button";
63
+ import {
64
+ FlexCol,
65
+ FlexGrowRow,
66
+ FlexRow
67
+ } from "@xylabs/react-flexbox";
68
+ import { CardEx } from "@xyo-network/react-card";
69
+ import { DateTime } from "luxon";
70
+ import { jsx as jsx3, jsxs } from "react/jsx-runtime";
71
+ var WidgetCard = ({
72
+ widgetName,
73
+ widgetContent,
74
+ widgetPath,
75
+ timeOfData = 1715875087,
76
+ ...props
77
+ }) => {
78
+ const theme = useTheme();
79
+ const formatTimeOfData = () => {
80
+ const timeNow = DateTime.now().toSeconds();
81
+ const secondsSinceDataRefreshed = timeNow - timeOfData;
82
+ const getYearsAndMonths = () => {
83
+ const years = Math.floor(secondsSinceDataRefreshed / 31536e3);
84
+ const months = Math.ceil((secondsSinceDataRefreshed - years * 31536e3) / 2628288);
85
+ if (months === 12) {
86
+ return `${years + 1} Years Ago`;
87
+ } else if (years > 1 && months > 1) {
88
+ return `${years} Years, ${months} Months Ago`;
89
+ } else if (years === 1 && months > 1) {
90
+ return `${years} Year, ${months} Months Ago`;
91
+ } else if (years > 1 && months === 1) {
92
+ return `${years} Years, ${months} Month Ago`;
93
+ } else if (years === 1 && months === 1) {
94
+ return `${years} Year, ${months} Month Ago`;
95
+ } else {
96
+ return `About ${years} Years Ago`;
97
+ }
98
+ };
99
+ if (secondsSinceDataRefreshed < 60) {
100
+ return "Less than 1 Minute Ago";
101
+ } else if (secondsSinceDataRefreshed < 3600) {
102
+ return `${DateTime.fromSeconds(secondsSinceDataRefreshed).toFormat("m")} Minutes Ago`;
103
+ } else if (secondsSinceDataRefreshed < 86400) {
104
+ return `${Math.ceil(secondsSinceDataRefreshed / 3600)} Hours Ago`;
105
+ } else if (secondsSinceDataRefreshed < 2628288) {
106
+ return `${Math.ceil(secondsSinceDataRefreshed / 86400)} Days Ago`;
107
+ } else if (secondsSinceDataRefreshed < 31536e3) {
108
+ return `${Math.ceil(secondsSinceDataRefreshed / 2628288)} Months Ago`;
109
+ } else {
110
+ return getYearsAndMonths();
111
+ }
112
+ };
113
+ return /* @__PURE__ */ jsx3(
114
+ CardEx,
115
+ {
116
+ ...props,
117
+ sx: {
118
+ backgroundColor: alpha(theme.palette.background.paper, 0.4),
119
+ display: "flex",
120
+ height: "300px",
121
+ width: "300px"
122
+ },
123
+ children: /* @__PURE__ */ jsx3(CardContent, { sx: { height: "100%", padding: 1 }, children: /* @__PURE__ */ jsxs(
124
+ FlexCol,
125
+ {
126
+ sx: {
127
+ alignItems: "stretch",
128
+ height: "100%",
129
+ justifyContent: "space-between"
130
+ },
131
+ children: [
132
+ /* @__PURE__ */ jsxs(FlexCol, { alignItems: "stretch", children: [
133
+ /* @__PURE__ */ jsxs(FlexGrowRow, { justifyContent: "space-between", alignItems: "center", children: [
134
+ /* @__PURE__ */ jsx3(Typography, { color: theme.palette.text.primary, fontWeight: theme.typography.fontWeightMedium, variant: "h6", children: widgetName }),
135
+ /* @__PURE__ */ jsx3(IconButton, { children: /* @__PURE__ */ jsx3(RefreshRounded, {}) })
136
+ ] }),
137
+ /* @__PURE__ */ jsx3(Box, { paddingY: 2, children: widgetContent })
138
+ ] }),
139
+ /* @__PURE__ */ jsxs(FlexRow, { justifyContent: "space-between", alignItems: "center", children: [
140
+ /* @__PURE__ */ jsx3(Tooltip, { title: DateTime.fromSeconds(timeOfData).toFormat("DD ttt"), children: /* @__PURE__ */ jsxs(
141
+ FlexRow,
142
+ {
143
+ gap: 0.5,
144
+ sx: { opacity: 0.5 },
145
+ children: [
146
+ /* @__PURE__ */ jsx3(HistoryRounded, { fontSize: "small", color: "inherit" }),
147
+ /* @__PURE__ */ jsx3(Typography, { variant: "body2", children: formatTimeOfData() })
148
+ ]
149
+ }
150
+ ) }),
151
+ /* @__PURE__ */ jsx3(ButtonEx2, { size: "small", to: widgetPath, children: /* @__PURE__ */ jsx3(ArrowForwardRounded, { fontSize: "small" }) })
152
+ ] })
153
+ ]
154
+ }
155
+ ) })
156
+ }
157
+ );
158
+ };
159
+
160
+ // src/components/Widgets/WidgetCardExamples.tsx
161
+ import { Stack as Stack2 } from "@mui/material";
162
+ import { useColorSchemeEx as useColorSchemeEx4 } from "@xylabs/react-invertible-theme";
163
+
164
+ // src/DappPage.tsx
165
+ import { Container as Container3, Typography as Typography9 } from "@mui/material";
166
+ import { FlexCol as FlexCol12 } from "@xylabs/react-flexbox";
167
+ import { ThrownErrorBoundary } from "@xyo-network/react-error";
168
+
169
+ // src/modules/Dapp/Button/hooks/useLaunchPoint.tsx
170
+ import { useLayoutEffect, useState as useState2 } from "react";
171
+
172
+ // src/utils/DappInstallTypeFilters.ts
173
+ import {
174
+ isInstalledDappSet,
175
+ isPreInstalledDappSet,
176
+ isUnInstalledDappSet
177
+ } from "@xyo-network/os-model";
178
+ var DappInstallTypeFilters = {
179
+ installed(registeredDappSets) {
180
+ return registeredDappSets && registeredDappSets?.length > 0 ? registeredDappSets?.filter(isInstalledDappSet).sort((a2, b) => a2.dapp.config.name.toUpperCase() < b.dapp.config.name.toUpperCase() ? -1 : 1) : void 0;
181
+ },
182
+ preInstalled(registeredDappSets) {
183
+ return registeredDappSets && registeredDappSets?.length > 0 ? registeredDappSets?.filter(isPreInstalledDappSet).sort((a2, b) => a2.dapp.config.name.toUpperCase() < b.dapp.config.name.toUpperCase() ? -1 : 1) : void 0;
184
+ },
185
+ uninstalled(registeredDappSets) {
186
+ return registeredDappSets && registeredDappSets?.length > 0 ? registeredDappSets.filter(isUnInstalledDappSet).sort((a2, b) => a2.dapp.config.name.toUpperCase() < b.dapp.config.name.toUpperCase() ? -1 : 1) : void 0;
187
+ }
188
+ };
189
+
190
+ // src/utils/getApiDomain.ts
191
+ var getApiDomain = (localHost, apiDomain) => {
192
+ if (apiDomain !== void 0) {
193
+ return apiDomain;
194
+ }
195
+ if (localHost) {
196
+ return "http://localhost:8080";
197
+ }
198
+ if (location.hostname.startsWith("beta")) {
199
+ return "https://beta.archivist.xyo.network";
200
+ }
201
+ return "https://archivist.xyo.network";
202
+ };
203
+
204
+ // src/utils/useOnWindowResize.tsx
205
+ import { useEffect as useEffect2, useState } from "react";
206
+ var useOnWindowResize = () => {
207
+ const [resized, setResized] = useState();
208
+ useEffect2(() => {
209
+ const onResize = (event) => {
210
+ setResized(event);
211
+ };
212
+ window.addEventListener("resize", onResize, false);
213
+ return () => {
214
+ window.removeEventListener("resize", onResize);
215
+ };
216
+ }, []);
217
+ return resized;
218
+ };
219
+
220
+ // src/modules/Dapp/Button/hooks/useLaunchPoint.tsx
221
+ var useLaunchPoint = (spanRef) => {
222
+ const [coordinates, setCoordinates] = useState2({ left: 0, top: 0 });
223
+ const resized = useOnWindowResize();
224
+ useLayoutEffect(() => {
225
+ const rect = spanRef.current?.getBoundingClientRect() ?? null;
226
+ if (rect) {
227
+ const {
228
+ width,
229
+ height,
230
+ left,
231
+ top
232
+ } = rect;
233
+ setCoordinates({
234
+ left: left + width / 2,
235
+ top: top + height / 2
236
+ });
237
+ }
238
+ }, [spanRef, resized]);
239
+ return coordinates;
240
+ };
241
+
242
+ // src/modules/Dapp/Button/IconEx.tsx
243
+ import { Circle } from "@mui/icons-material";
244
+ import { FlexCol as FlexCol2 } from "@xylabs/react-flexbox";
245
+ import { DappIntentTypes as DappIntentTypes5 } from "@xyo-network/os-model";
246
+ import { DappIntentCaller as DappIntentCaller2, XyOsMonitor as XyOsMonitor2 } from "@xyo-network/os-runtime";
247
+ import { useRef as useRef3 } from "react";
248
+
249
+ // src/hooks/access-requests/useBuildDappAccessRequestResource.ts
250
+ import { usePromise } from "@xylabs/react-promise";
251
+ import { DappAccessRequestResource } from "@xyo-network/os-runtime";
252
+
253
+ // src/hooks/ResourceHooks.ts
254
+ var ResourceHooks = class {
255
+ constructor(buildResource, buildViews) {
256
+ this.buildResource = buildResource;
257
+ this.buildViews = buildViews;
258
+ }
259
+ useBuildResourceFromProvidedNode = (pathPrefix) => {
260
+ const xyOs = useXyOsUiContext();
261
+ return this.buildResource(xyOs, pathPrefix);
262
+ };
263
+ useResourceViewsFromContext = (context, pathPrefix) => {
264
+ const [resource, resourceError] = this.buildResource(context, pathPrefix);
265
+ const views = this.buildViews(resource);
266
+ return {
267
+ ...views,
268
+ resource,
269
+ resourceError
270
+ };
271
+ };
272
+ useResourceViewsFromProvidedNode = (pathPrefix) => {
273
+ const [resource, resourceError] = this.useBuildResourceFromProvidedNode(pathPrefix);
274
+ const views = this.buildViews(resource);
275
+ return {
276
+ ...views,
277
+ resource,
278
+ resourceError
279
+ };
280
+ };
281
+ };
282
+
283
+ // src/hooks/useCleanup.tsx
284
+ import { useEffect as useEffect3 } from "react";
285
+ var useCleanUpResource = (resource) => {
286
+ useEffect3(() => {
287
+ return () => {
288
+ resource?.cleanupListeners();
289
+ };
290
+ }, [resource]);
291
+ };
292
+
293
+ // src/hooks/useSyncExternalPayloadStore.tsx
294
+ import { useMemo, useSyncExternalStore } from "react";
295
+ var useSyncExternalPayloadStore = (viewName, repository) => {
296
+ const { getSnapShot, subscribe } = useMemo(() => {
297
+ const subscriber = repository?.subscriptions[viewName];
298
+ const snapshot = repository?.views[viewName];
299
+ if (snapshot && subscriber) {
300
+ return {
301
+ // since useExternalStore calls its methods in it's own lambda function, we lose the `this` context of the calling class.
302
+ // bind each method to its appropriate object so the `this` calls work as expected.
303
+ getSnapShot: snapshot,
304
+ subscribe: subscriber.bind(repository)
305
+ };
306
+ }
307
+ return {
308
+ // eslint-disable-next-line unicorn/no-useless-undefined
309
+ getSnapShot: () => void 0,
310
+ subscribe: () => () => {
311
+ }
312
+ };
313
+ }, [repository, viewName]);
314
+ return useSyncExternalStore(subscribe, getSnapShot);
315
+ };
316
+
317
+ // src/hooks/access-requests/useBuildDappAccessRequestResource.ts
318
+ var useBuildDappAccessRequestResource = (context) => {
319
+ const resource = usePromise(async () => {
320
+ if (context) {
321
+ const resource2 = new DappAccessRequestResource(context);
322
+ await resource2.start();
323
+ return resource2;
324
+ }
325
+ }, [context]);
326
+ useCleanUpResource(resource[0]);
327
+ return resource;
328
+ };
329
+ var useDappAccessRequestResourceViews = (resource) => {
330
+ const accessRequests = useSyncExternalPayloadStore("accessRequests", resource);
331
+ const registeredInterfaces = useSyncExternalPayloadStore("registeredInterfaces", resource);
332
+ return {
333
+ accessRequests,
334
+ registeredInterfaces,
335
+ resource
336
+ };
337
+ };
338
+ var DappAccessRequestResourceHooks = new ResourceHooks(
339
+ useBuildDappAccessRequestResource,
340
+ useDappAccessRequestResourceViews
341
+ );
342
+
343
+ // src/hooks/bios/useBios.ts
344
+ import { usePromise as usePromise2 } from "@xylabs/react-promise";
345
+ import { boot } from "@xyo-network/bios-browser";
346
+ import { useEffect as useEffect4 } from "react";
347
+ var biosBoot;
348
+ var useBios = () => {
349
+ const [biosExternalInterface, biosError] = usePromise2(async () => {
350
+ if (biosBoot) return await biosBoot;
351
+ biosBoot = boot();
352
+ return await biosBoot;
353
+ }, []);
354
+ useEffect4(() => {
355
+ if (biosError) throw biosError;
356
+ }, [biosError]);
357
+ return biosExternalInterface;
358
+ };
359
+
360
+ // src/hooks/bios/useKernel.ts
361
+ import { usePromise as usePromise3 } from "@xylabs/react-promise";
362
+ import { Kernel } from "@xyo-network/kernel";
363
+ import { useEffect as useEffect5 } from "react";
364
+ var kernelBoot;
365
+ var useKernel = (locator, params) => {
366
+ const bios = useBios();
367
+ const [kernelExternalInterface, kernelError] = usePromise3(async () => {
368
+ if (kernelBoot) return await kernelBoot;
369
+ if (bios) {
370
+ kernelBoot = async function() {
371
+ const kernel = new Kernel();
372
+ await kernel.boot(bios, { locator, ...params });
373
+ return kernel;
374
+ }();
375
+ return await kernelBoot;
376
+ }
377
+ }, [bios]);
378
+ useEffect5(() => {
379
+ if (kernelError) throw kernelError;
380
+ }, [kernelError]);
381
+ return kernelExternalInterface;
382
+ };
383
+
384
+ // src/hooks/DappIntentResourceHooks.ts
385
+ import { usePromise as usePromise4 } from "@xylabs/react-promise";
386
+ import { DappIntentResource } from "@xyo-network/os-runtime";
387
+ var useBuildIntentResource = (context) => {
388
+ const resource = usePromise4(async () => {
389
+ if (context) {
390
+ const resource2 = new DappIntentResource(context);
391
+ await resource2.start();
392
+ return resource2;
393
+ }
394
+ }, [context]);
395
+ useCleanUpResource(resource[0]);
396
+ return resource;
397
+ };
398
+ var useIntentResourceViews = (resource) => {
399
+ const allDappIntents = useSyncExternalPayloadStore("allDappIntents", resource);
400
+ const latestDappIntent = useSyncExternalPayloadStore("latestDappIntent", resource);
401
+ return {
402
+ allDappIntents,
403
+ latestDappIntent,
404
+ resource
405
+ };
406
+ };
407
+ var DappIntentResourceHooks = new ResourceHooks(useBuildIntentResource, useIntentResourceViews);
408
+
409
+ // src/hooks/intent/useClearIntents.tsx
410
+ import { useAsyncEffect } from "@xylabs/react-async-effect";
411
+ import { useWeakArchivistFromNode } from "@xyo-network/react-archivist";
412
+ var useClearIntents = () => {
413
+ const [intentArchivist] = useWeakArchivistFromNode("IntentArchivist");
414
+ useAsyncEffect(
415
+ async () => {
416
+ const intentArchivistInstance = intentArchivist?.deref();
417
+ if (intentArchivistInstance) await intentArchivistInstance.clear?.();
418
+ },
419
+ [intentArchivist]
420
+ );
421
+ };
422
+
423
+ // src/hooks/intent/useDappIntentListener.tsx
424
+ import {
425
+ DappIntentTypes,
426
+ DappMode,
427
+ isDappIntentWithMeta
428
+ } from "@xyo-network/os-model";
429
+ import { useWeakArchivistFromNode as useWeakArchivistFromNode2 } from "@xyo-network/react-archivist";
430
+ import { useEffect as useEffect6, useState as useState3 } from "react";
431
+ var useDappIntentListener = (dappName, targetMode = DappMode.Window) => {
432
+ const [dappIntentType, setDappIntentType] = useState3(DappIntentTypes.Close);
433
+ const [intentPayload, setIntentPayload] = useState3();
434
+ const [intentArchivist] = useWeakArchivistFromNode2("IntentArchivist");
435
+ useEffect6(() => {
436
+ const listener = ({ payloads }) => {
437
+ const filteredPayloads = payloads.filter(isDappIntentWithMeta);
438
+ for (const payload of filteredPayloads) {
439
+ if (payload.targetDappId === dappName && payload.targetMode === targetMode) {
440
+ setIntentPayload(payload);
441
+ switch (payload.intent) {
442
+ case DappIntentTypes.Close: {
443
+ setDappIntentType(DappIntentTypes.Close);
444
+ break;
445
+ }
446
+ case DappIntentTypes.Launch: {
447
+ setDappIntentType(DappIntentTypes.Launch);
448
+ break;
449
+ }
450
+ case DappIntentTypes.Minimize: {
451
+ setDappIntentType(DappIntentTypes.Minimize);
452
+ break;
453
+ }
454
+ default: {
455
+ console.warn("Unrecognized DappIntentType:", payload);
456
+ }
457
+ }
458
+ }
459
+ }
460
+ };
461
+ intentArchivist?.deref()?.on("inserted", listener);
462
+ return () => {
463
+ intentArchivist?.deref()?.off("inserted", listener);
464
+ };
465
+ }, [dappName, intentArchivist, targetMode]);
466
+ return { dappIntentType, intentPayload };
467
+ };
468
+
469
+ // src/hooks/intent/useDappIntentListener2.tsx
470
+ import { DappIntentTypes as DappIntentTypes2, DappMode as DappMode2 } from "@xyo-network/os-model";
471
+ import { useEffect as useEffect7, useState as useState4 } from "react";
472
+ var useDappIntentListener2 = (dappName, sourceMode = DappMode2.Window) => {
473
+ const { latestDappIntent } = DappIntentResourceHooks.useResourceViewsFromProvidedNode();
474
+ const [dappIntentType, setDappIntentType] = useState4(DappIntentTypes2.Close);
475
+ useEffect7(() => {
476
+ if (sourceMode === DappMode2.Window) {
477
+ for (const payload of latestDappIntent ?? []) {
478
+ if (payload.targetDappId === dappName) {
479
+ switch (payload.intent) {
480
+ case DappIntentTypes2.Close: {
481
+ setDappIntentType(DappIntentTypes2.Close);
482
+ break;
483
+ }
484
+ case DappIntentTypes2.Launch: {
485
+ setDappIntentType(DappIntentTypes2.Launch);
486
+ break;
487
+ }
488
+ case DappIntentTypes2.Minimize: {
489
+ setDappIntentType(DappIntentTypes2.Minimize);
490
+ break;
491
+ }
492
+ default: {
493
+ console.warn("Unrecognized DappIntentType:", payload);
494
+ }
495
+ }
496
+ }
497
+ }
498
+ } else {
499
+ console.warn("Intent sent from unrecognized mode", sourceMode);
500
+ }
501
+ }, [dappName, latestDappIntent, sourceMode]);
502
+ return dappIntentType;
503
+ };
504
+
505
+ // src/hooks/intent/useNavigateIntent.tsx
506
+ import { DappIntentTypes as DappIntentTypes3 } from "@xyo-network/os-model";
507
+ import { NameTransforms } from "@xyo-network/os-runtime";
508
+ import { useCallback } from "react";
509
+ import { useNavigate, useParams } from "react-router-dom";
510
+ var rootRoute = "/";
511
+ var useNavigateIntent = () => {
512
+ const navigate = useNavigate();
513
+ const { dappName: dappNameParam } = useParams();
514
+ const updateRouteParam = useCallback(
515
+ (dappIntent, { skipNavigate } = {}) => {
516
+ if (dappIntent && dappIntent.targetDappId) {
517
+ const {
518
+ targetDappId: dappName,
519
+ intent: intentType,
520
+ params: intentParams
521
+ } = dappIntent;
522
+ const slug = new NameTransforms(dappName).slug();
523
+ switch (intentType) {
524
+ case DappIntentTypes3.Launch: {
525
+ const dappNameDeSlugged = dappNameParam ? new NameTransforms(dappNameParam).deSlug() : null;
526
+ if (dappNameDeSlugged !== dappName) {
527
+ const slugFromRoot = `${rootRoute}${slug}${intentParams ? `/${intentParams}` : ""}`;
528
+ if (!skipNavigate) navigate(slugFromRoot);
529
+ }
530
+ break;
531
+ }
532
+ case DappIntentTypes3.Minimize: {
533
+ if (!skipNavigate) navigate(rootRoute);
534
+ break;
535
+ }
536
+ case DappIntentTypes3.Close: {
537
+ if (!skipNavigate) navigate(rootRoute);
538
+ break;
539
+ }
540
+ }
541
+ }
542
+ },
543
+ [dappNameParam, navigate]
544
+ );
545
+ return updateRouteParam;
546
+ };
547
+
548
+ // src/hooks/intent/useSendDappIntent.tsx
549
+ import { useWeakArchivistFromNode as useWeakArchivistFromNode3 } from "@xyo-network/react-archivist";
550
+ import { useCallback as useCallback2 } from "react";
551
+ var useSendDappIntent = () => {
552
+ const [intentArchivist] = useWeakArchivistFromNode3("IntentArchivist");
553
+ const navigate = useNavigateIntent();
554
+ const sendIntent = useCallback2(
555
+ async (dappIntent, options = {}) => {
556
+ const intentArchivistInstance = intentArchivist?.deref();
557
+ if (!intentArchivistInstance) {
558
+ console.error("unable to find IntentArchivist");
559
+ return;
560
+ }
561
+ if (dappIntent) {
562
+ try {
563
+ await intentArchivistInstance.insert([dappIntent]);
564
+ } catch (e) {
565
+ console.error("error sending intent to archivist", e);
566
+ }
567
+ navigate(dappIntent, options);
568
+ } else {
569
+ console.warn("tried to send intent but intent payload");
570
+ }
571
+ },
572
+ // Disabling because navigate changes references and causes additional renders
573
+ [intentArchivist]
574
+ );
575
+ return intentArchivist ? sendIntent : null;
576
+ };
577
+
578
+ // src/hooks/menu/useAddDappMenuItems.tsx
579
+ import { usePromise as usePromise6 } from "@xylabs/react-promise";
580
+
581
+ // src/hooks/menu/useBuildDappMenuResource.ts
582
+ import { usePromise as usePromise5 } from "@xylabs/react-promise";
583
+ import { DappMenuResource } from "@xyo-network/os-runtime";
584
+ var useBuildDappMenuResource = (xyOsContext) => {
585
+ const resource = usePromise5(async () => {
586
+ if (xyOsContext) {
587
+ const resource2 = new DappMenuResource(xyOsContext);
588
+ await resource2.start();
589
+ return resource2;
590
+ }
591
+ }, [xyOsContext]);
592
+ useCleanUpResource(resource[0]);
593
+ return resource;
594
+ };
595
+ var useMenuResourceViews = (resource) => {
596
+ const menuItemSelections = useSyncExternalPayloadStore("menuItemSelections", resource);
597
+ const menuConfigs = useSyncExternalPayloadStore("menuConfigs", resource);
598
+ const menuItems = useSyncExternalPayloadStore("menuItems", resource);
599
+ const menuItemsVisible = useSyncExternalPayloadStore("menuItemsVisible", resource);
600
+ return {
601
+ menuConfigs,
602
+ menuItemSelections,
603
+ menuItems,
604
+ menuItemsVisible,
605
+ resource
606
+ };
607
+ };
608
+ var DappMenuResourceHooks = new ResourceHooks(useBuildDappMenuResource, useMenuResourceViews);
609
+
610
+ // src/hooks/menu/useDappMenuCaller.tsx
611
+ import { assertEx } from "@xylabs/assert";
612
+ import { DappMenuCaller } from "@xyo-network/os-runtime";
613
+ import { useMemo as useMemo2 } from "react";
614
+ var useDappMenuCaller = (context, { ignoreProvidedNode } = {}) => {
615
+ const xyOs = useXyOsUiContext();
616
+ return useMemo2(() => {
617
+ const resolvedProvidedNode = ignoreProvidedNode ? null : xyOs;
618
+ if (context || resolvedProvidedNode) {
619
+ const finalContext = assertEx(context ?? xyOs, () => "no node was found in context or passed as argument");
620
+ return new DappMenuCaller(finalContext);
621
+ }
622
+ }, [ignoreProvidedNode, context, xyOs]);
623
+ };
624
+
625
+ // src/hooks/menu/useAddDappMenuItems.tsx
626
+ var useAddDappMenuItems = (payloads) => {
627
+ const xyOs = useXyOsUiContext();
628
+ const {
629
+ menuItemSelections,
630
+ menuConfigs,
631
+ resourceError
632
+ } = DappMenuResourceHooks.useResourceViewsFromContext(xyOs);
633
+ const dappMenuCaller = useDappMenuCaller();
634
+ const [, addMenuItemsError] = usePromise6(async () => {
635
+ await dappMenuCaller?.add(payloads);
636
+ }, [payloads, dappMenuCaller]);
637
+ return {
638
+ addMenuItemsError,
639
+ menuConfig: menuConfigs?.[0],
640
+ path: menuItemSelections?.[0],
641
+ error: resourceError
642
+ };
643
+ };
644
+
645
+ // src/hooks/NameServiceRegistrationHooks.ts
646
+ import { usePromise as usePromise7 } from "@xylabs/react-promise";
647
+ import { XnsRegistrationsResource } from "@xyo-network/os-runtime";
648
+ var useBuildNameServiceRegistrationsResource = (context, pathPrefix) => {
649
+ const result = usePromise7(async () => {
650
+ if (context) {
651
+ const xnsRegistrationsResource = new XnsRegistrationsResource(context, pathPrefix);
652
+ await xnsRegistrationsResource.start();
653
+ return xnsRegistrationsResource;
654
+ }
655
+ }, [context, pathPrefix]);
656
+ useCleanUpResource(result[0]);
657
+ return result;
658
+ };
659
+ var useBuildNameServiceRegistrationsResourceViews = (resource) => {
660
+ const allRegistrations = useSyncExternalPayloadStore("allRegistrations", resource);
661
+ return {
662
+ allRegistrations,
663
+ resource
664
+ };
665
+ };
666
+ var NameServiceRegistrationHooks = new ResourceHooks(
667
+ useBuildNameServiceRegistrationsResource,
668
+ useBuildNameServiceRegistrationsResourceViews
669
+ );
670
+
671
+ // src/hooks/os/useDappContextCreator.tsx
672
+ import { useAsyncEffect as useAsyncEffect2 } from "@xylabs/react-async-effect";
673
+ import { DappIntentTypes as DappIntentTypes4 } from "@xyo-network/os-model";
674
+ import { DappContextCreator, RunningDappCache } from "@xyo-network/os-runtime";
675
+ import {
676
+ useCallback as useCallback3,
677
+ useEffect as useEffect8,
678
+ useRef,
679
+ useState as useState5
680
+ } from "react";
681
+ var useDappContextCreator = (xnsNodeUrl, xnsNetwork, dapp, allowedNames, createOnMount = false) => {
682
+ const context = useXyOsUiContext();
683
+ const [windowDappNodeSet, setWindowDappNodeSet] = useState5({ context: void 0, dappWallet: void 0 });
684
+ const [dappWindowNodeError, setDappWindowNodeError] = useState5();
685
+ const { dappIntentType: intentType } = useDappIntentListener(dapp?.config.name);
686
+ const windowDappNodeSetRef = useRef(windowDappNodeSet);
687
+ useEffect8(() => {
688
+ windowDappNodeSetRef.current = windowDappNodeSet;
689
+ }, [windowDappNodeSet]);
690
+ const createNode = useCallback3(async () => {
691
+ if (dapp && context) {
692
+ try {
693
+ const windowDappNodeSet2 = await RunningDappCache.findOrCreate(dapp, context, allowedNames ?? [], xnsNodeUrl, xnsNetwork);
694
+ setWindowDappNodeSet(windowDappNodeSet2);
695
+ } catch (e) {
696
+ setDappWindowNodeError(e);
697
+ }
698
+ }
699
+ }, [dapp, context, allowedNames]);
700
+ useEffect8(() => {
701
+ if (createOnMount) {
702
+ void (async () => {
703
+ await createNode();
704
+ })();
705
+ }
706
+ }, [createOnMount, createNode]);
707
+ useAsyncEffect2(
708
+ async () => {
709
+ switch (intentType) {
710
+ case DappIntentTypes4.Launch: {
711
+ await createNode();
712
+ break;
713
+ }
714
+ case DappIntentTypes4.Close: {
715
+ if (windowDappNodeSetRef.current.context) {
716
+ await DappContextCreator.resetDappArchivist(windowDappNodeSetRef.current.context);
717
+ setWindowDappNodeSet({ context: null, dappWallet: void 0 });
718
+ }
719
+ break;
720
+ }
721
+ case DappIntentTypes4.Minimize:
722
+ }
723
+ },
724
+ [createNode, intentType]
725
+ );
726
+ return {
727
+ ...windowDappNodeSet,
728
+ nodeCreateError: dappWindowNodeError
729
+ };
730
+ };
731
+
732
+ // src/hooks/os/useDappRegistrationResults.tsx
733
+ import { EventBusPubSubConnection } from "@xyo-network/os-runtime";
734
+ import { useEffect as useEffect9, useState as useState6 } from "react";
735
+ var useDappRegistrationResults = () => {
736
+ const context = useXyOsUiContext();
737
+ const [registeredDappSetResults, setRegisteredDappSetResults] = useState6();
738
+ useEffect9(() => {
739
+ const listener = () => {
740
+ setRegisteredDappSetResults(context?.dappRegistrationResults);
741
+ };
742
+ const dappsReadyConnectionRequest = {
743
+ subscribableEvents: /* @__PURE__ */ new Map([["dappsReady", listener]]),
744
+ type: "PubSub"
745
+ };
746
+ const dappsReadyConnection2 = new EventBusPubSubConnection(dappsReadyConnectionRequest);
747
+ if (context) {
748
+ context.eventBus.addConnection(dappsReadyConnection2);
749
+ setRegisteredDappSetResults(context.dappRegistrationResults);
750
+ }
751
+ return () => context && dappsReadyConnection2.id ? context.eventBus.removeConnection(dappsReadyConnection2.id) : void 0;
752
+ }, [context]);
753
+ return registeredDappSetResults;
754
+ };
755
+
756
+ // src/hooks/os/useDappRegistry.tsx
757
+ import { DappRegistry } from "@xyo-network/os-runtime";
758
+ import { useMemo as useMemo4 } from "react";
759
+
760
+ // src/hooks/os/useDappSeedPhraseRepository.tsx
761
+ import { DappSeedPhraseRepository } from "@xyo-network/os-runtime";
762
+ import { useMemo as useMemo3 } from "react";
763
+ var _dappWalletRepository;
764
+ var useDappSeedPhraseRepository = (allowedNames) => {
765
+ const context = useXyOsUiContext();
766
+ const dappWalletRepository = useMemo3(() => {
767
+ if (_dappWalletRepository === void 0 && context) {
768
+ _dappWalletRepository = new DappSeedPhraseRepository(context, allowedNames);
769
+ }
770
+ return _dappWalletRepository;
771
+ }, [context, allowedNames]);
772
+ return dappWalletRepository;
773
+ };
774
+
775
+ // src/hooks/os/useDappRegistry.tsx
776
+ var _dappRegistry;
777
+ var useDappRegistry = (allowedNames) => {
778
+ const dappSeedPhraseRepository = useDappSeedPhraseRepository(allowedNames);
779
+ return useMemo4(() => {
780
+ if (dappSeedPhraseRepository) {
781
+ if (!_dappRegistry) {
782
+ _dappRegistry = new DappRegistry(dappSeedPhraseRepository);
783
+ }
784
+ return _dappRegistry;
785
+ }
786
+ }, [dappSeedPhraseRepository]);
787
+ };
788
+
789
+ // src/hooks/os/useWidgetDapps.tsx
790
+ import { usePromise as usePromise8 } from "@xylabs/react-promise";
791
+
792
+ // src/helpers/BridgeActivityHelper.ts
793
+ import { assertEx as assertEx2 } from "@xylabs/assert";
794
+ import { GenericPayloadDivinerConfigSchema } from "@xyo-network/diviner-payload-generic";
795
+ import { PayloadDivinerQuerySchema } from "@xyo-network/diviner-payload-model";
796
+ import { BaseEmitter } from "@xyo-network/module-abstract";
797
+ var BridgeActivityHelper = class extends BaseEmitter {
798
+ get archivist() {
799
+ return assertEx2(this.params.archivist.deref(), () => "Archivist is missing");
800
+ }
801
+ get diviner() {
802
+ const result = assertEx2(this.params.diviner.deref(), () => "Diviner is missing");
803
+ assertEx2(result.config.schema === GenericPayloadDivinerConfigSchema, () => "Diviner is not a generic payload diviner");
804
+ return result;
805
+ }
806
+ next(options) {
807
+ return this.archivist.next(options);
808
+ }
809
+ nextByAddress(address, options) {
810
+ const query = {
811
+ address,
812
+ ...options,
813
+ schema: PayloadDivinerQuerySchema
814
+ };
815
+ return this.diviner.divine([query]);
816
+ }
817
+ };
818
+
819
+ // src/helpers/BrowserLocator.ts
820
+ import { IndexedDbArchivist } from "@xyo-network/archivist-indexeddb";
821
+ import { IndexedDbBoundWitnessDiviner } from "@xyo-network/diviner-boundwitness-indexeddb";
822
+ import { GenericPayloadDiviner } from "@xyo-network/diviner-payload-generic";
823
+ import { IndexedDbPayloadDiviner } from "@xyo-network/diviner-payload-indexeddb";
824
+ import { ModuleFactoryLocator } from "@xyo-network/module-factory-locator";
825
+ var GenericPayloadDivinerTags = { "network.xyo.generic.payload.diviner": "GenericPayloadDiviner" };
826
+ var BrowserLocator = new ModuleFactoryLocator();
827
+ BrowserLocator.register(GenericPayloadDiviner, GenericPayloadDivinerTags);
828
+ BrowserLocator.register(IndexedDbArchivist, { "network.xyo.archivist.persistence.scope": "device" }, "network.xyo.archivist.config");
829
+ BrowserLocator.register(IndexedDbPayloadDiviner, { "network.xyo.archivist.persistence.scope": "device" }, "network.xyo.diviner.payload.config");
830
+ BrowserLocator.register(
831
+ IndexedDbBoundWitnessDiviner,
832
+ { "network.xyo.archivist.persistence.scope": "device" },
833
+ "network.xyo.diviner.boundwitness.config"
834
+ );
835
+ BrowserLocator.freeze();
836
+
837
+ // src/helpers/monitor/XyOsBrowserMonitor.ts
838
+ import { XyOsMonitor } from "@xyo-network/os-runtime";
839
+ var XyOsBrowserMonitor = class extends XyOsMonitor {
840
+ connection() {
841
+ try {
842
+ if (window !== void 0) {
843
+ return "connection" in window.navigator ? window.navigator.connection : void 0;
844
+ }
845
+ } catch {
846
+ return;
847
+ }
848
+ }
849
+ };
850
+
851
+ // src/img/backgrounds/index.ts
852
+ import { default as default2 } from "./candy-dark@3x-N2S7K4QB.webp";
853
+ import { default as default3 } from "./candy-light@3x-WKECMFRP.webp";
854
+ import { default as default4 } from "./candyApple-dark@3x-HGSPETPR.webp";
855
+ import { default as default5 } from "./candyApple-light@3x-OWA5XNTF.webp";
856
+ import { default as default6 } from "./moss-dark@3x-HV35CF34.webp";
857
+ import { default as default7 } from "./moss-light@3x-UH4AJQR5.webp";
858
+ import { default as default8 } from "./ocean-dark@3x-LDW7E4ZL.webp";
859
+ import { default as default9 } from "./ocean-light@3x-FP7M2MO7.webp";
860
+ import { default as default10 } from "./peachYogurt-dark@3x-UWHJTY5O.webp";
861
+ import { default as default11 } from "./peachYogurt-light@3x-X7Y7NU2Y.webp";
862
+ import { default as default12 } from "./sherbet-dark@3x-UAIXX4RP.webp";
863
+ import { default as default13 } from "./sherbet-light@3x-2Q2EFFWE.webp";
864
+ import { default as default14 } from "./spring-dark@3x-XU3GBWBF.webp";
865
+ import { default as default15 } from "./spring-light@3x-EFV3QMVY.webp";
866
+ import { default as default16 } from "./sunset-dark@3x-F25FUK74.webp";
867
+ import { default as default17 } from "./sunset-light@3x-B5T3EVGS.webp";
868
+ import { default as default18 } from "./xyo-dark@3x-N62LIF7V.webp";
869
+ import { default as default19 } from "./xyo-light@3x-5S6CF5P4.webp";
870
+
871
+ // src/helpers/NodePalettes.ts
872
+ var OsPalettes = {
873
+ candy: {
874
+ darkModeWallpaper: default2,
875
+ lightModeWallpaper: default3,
876
+ nameCode: "candy",
877
+ readableName: "Candy"
878
+ },
879
+ candyApple: {
880
+ darkModeWallpaper: default4,
881
+ lightModeWallpaper: default5,
882
+ nameCode: "candyApple",
883
+ readableName: "Candy Apple"
884
+ },
885
+ moss: {
886
+ darkModeWallpaper: default6,
887
+ lightModeWallpaper: default7,
888
+ nameCode: "moss",
889
+ readableName: "Moss"
890
+ },
891
+ ocean: {
892
+ darkModeWallpaper: default8,
893
+ lightModeWallpaper: default9,
894
+ nameCode: "ocean",
895
+ readableName: "Ocean"
896
+ },
897
+ peachYogurt: {
898
+ darkModeWallpaper: default10,
899
+ lightModeWallpaper: default11,
900
+ nameCode: "peachYogurt",
901
+ readableName: "Peach Yogurt"
902
+ },
903
+ sherbet: {
904
+ darkModeWallpaper: default12,
905
+ lightModeWallpaper: default13,
906
+ nameCode: "sherbet",
907
+ readableName: "Sherbet"
908
+ },
909
+ spring: {
910
+ darkModeWallpaper: default14,
911
+ lightModeWallpaper: default15,
912
+ nameCode: "spring",
913
+ readableName: "Spring"
914
+ },
915
+ sunset: {
916
+ darkModeWallpaper: default16,
917
+ lightModeWallpaper: default17,
918
+ nameCode: "sunset",
919
+ readableName: "Sunset"
920
+ },
921
+ xyo: {
922
+ darkModeWallpaper: default18,
923
+ lightModeWallpaper: default19,
924
+ nameCode: "xyo",
925
+ readableName: "XYO"
926
+ }
927
+ };
928
+ var getNodePaletteByNameCode = (nameCode) => {
929
+ const castNameCode = nameCode;
930
+ return OsPalettes[castNameCode];
931
+ };
932
+
933
+ // src/helpers/widget/Caller.tsx
934
+ import { assertEx as assertEx3 } from "@xylabs/assert";
935
+ import { cloneDeep } from "@xylabs/lodash";
936
+ import { fulfilled, rejected } from "@xylabs/promise";
937
+ import { WidgetTraySchema } from "@xyo-network/os-model";
938
+ import { OsCallerBase } from "@xyo-network/os-runtime";
939
+ import { jsx as jsx4 } from "react/jsx-runtime";
940
+ var WidgetCaller = class extends OsCallerBase {
941
+ constructor(context, _registeredDappSets, _widgetTrayLayout) {
942
+ super(context);
943
+ this._registeredDappSets = _registeredDappSets;
944
+ this._widgetTrayLayout = _widgetTrayLayout;
945
+ }
946
+ get dappsAsObject() {
947
+ const acc = {};
948
+ for (const dapp of this.registeredDappSets) {
949
+ acc[dapp.dapp.config.name] = dapp;
950
+ }
951
+ return acc;
952
+ }
953
+ get registeredDappSets() {
954
+ return assertEx3(this._registeredDappSets, () => "Registered Dapp Sets not available");
955
+ }
956
+ get widgetTrayLayout() {
957
+ return assertEx3(this._widgetTrayLayout, () => "Widget Tray Layout not available");
958
+ }
959
+ async buildWidgetComponents() {
960
+ const widgetTray = this.widgetTrayFromLayout(this.widgetTrayLayout);
961
+ const results = await Promise.allSettled(
962
+ widgetTray.widgetConfigs.map(async (config2) => {
963
+ const Param = this.dappsAsObject[config2.dappId].dapp.params.modes[config2.mode ?? config2.dappId]?.component;
964
+ let payload;
965
+ if (config2.configHash) {
966
+ const archivist = await this.getDappsArchivist();
967
+ const foundConfig = assertEx3((await archivist.get([config2.configHash]))?.[0], () => `Config - ${config2.configHash} not found`);
968
+ payload = foundConfig;
969
+ }
970
+ return Param ? /* @__PURE__ */ jsx4(Param, { payload }) : void 0;
971
+ })
972
+ );
973
+ const successfulResults = results.filter(fulfilled).map((result) => result.value);
974
+ const failedResults = results.filter(rejected).map((result) => new Error(result.reason));
975
+ return [successfulResults, failedResults];
976
+ }
977
+ // build a new widget config from the base provided by the dapp
978
+ // and pass the config hash from the widgetLayout to the new widgetConfig
979
+ buildWidgetConfig(widgetConfigToBuild, configHash) {
980
+ const clonedWidgetConfig = this.cloneWidgetConfig(widgetConfigToBuild);
981
+ return {
982
+ ...clonedWidgetConfig,
983
+ configHash
984
+ };
985
+ }
986
+ cloneWidgetConfig(widgetConfig) {
987
+ return cloneDeep(widgetConfig);
988
+ }
989
+ widgetTrayFromLayout(widgetLayout) {
990
+ const targetWidgetConfigs = [];
991
+ const { layout, label: trayLabel } = widgetLayout;
992
+ for (const dappWidgetLayout of layout) {
993
+ const {
994
+ dappId,
995
+ mode,
996
+ configHash
997
+ } = dappWidgetLayout;
998
+ const dappSet = this.registeredDappSets.find((dappSet2) => dappSet2.dapp.config.name === dappId);
999
+ if (!dappSet) {
1000
+ console.error("unable to find registered dapp set for", dappId);
1001
+ continue;
1002
+ }
1003
+ const widgetConfigToBuild = dappSet.dapp.widgetConfigs.find((config3) => config3.mode ? config3.mode === mode : mode === config3.dappId);
1004
+ if (!widgetConfigToBuild) {
1005
+ console.error("unable to find widget config for", mode);
1006
+ continue;
1007
+ }
1008
+ const config2 = this.buildWidgetConfig(widgetConfigToBuild, configHash);
1009
+ targetWidgetConfigs.push(config2);
1010
+ }
1011
+ return {
1012
+ label: trayLabel ?? "Widget Tray",
1013
+ position: "bottom",
1014
+ schema: WidgetTraySchema,
1015
+ widgetConfigs: targetWidgetConfigs
1016
+ };
1017
+ }
1018
+ };
1019
+
1020
+ // src/helpers/widgets/UpperWidgetTrayLayout.ts
1021
+ import { WidgetTrayLayoutSchema } from "@xyo-network/os-model";
1022
+ var UpperWidgetTrayLayout = {
1023
+ label: "Lower Widget Tray Layout",
1024
+ layout: [
1025
+ { dappId: "TimeClock", mode: "FlatClock" },
1026
+ {
1027
+ configHash: "bb0ea5701c20e86d77b1a369f77d17658df62572d54f1f1aafdf15e3c29e3b3b",
1028
+ dappId: "Markets",
1029
+ mode: "PriceWidget"
1030
+ },
1031
+ {
1032
+ configHash: "ea8afca9d4a9b0843035e3722d9f6400058a1eab71996b8e4e20e2449662e2bf",
1033
+ dappId: "Markets",
1034
+ mode: "PriceWidget"
1035
+ }
1036
+ ],
1037
+ schema: WidgetTrayLayoutSchema
1038
+ };
1039
+
1040
+ // src/hooks/os/useWidgetDapps.tsx
1041
+ var useWidgetDapps = (registeredDapps, widgetTrayLayout) => {
1042
+ const context = useXyOsUiContext();
1043
+ return usePromise8(async () => {
1044
+ if (registeredDapps && context && widgetTrayLayout) {
1045
+ const caller = new WidgetCaller(context, registeredDapps, widgetTrayLayout);
1046
+ return await caller.buildWidgetComponents();
1047
+ }
1048
+ }, [context, registeredDapps, widgetTrayLayout]);
1049
+ };
1050
+
1051
+ // src/hooks/useAccountArchivist.ts
1052
+ import { useWeakArchivistFromNode as useWeakArchivistFromNode4 } from "@xyo-network/react-archivist";
1053
+ var useAccountArchivist = () => {
1054
+ return useWeakArchivistFromNode4("AccountArchivist");
1055
+ };
1056
+
1057
+ // src/hooks/useDappCaller.tsx
1058
+ import { DappCaller } from "@xyo-network/os-runtime";
1059
+ import { useMemo as useMemo5 } from "react";
1060
+ var useDappCaller = (context) => {
1061
+ const xyOs = useXyOsUiContext();
1062
+ return useMemo5(() => {
1063
+ const resolvedContext = context ?? xyOs;
1064
+ if (resolvedContext) {
1065
+ return new DappCaller(resolvedContext);
1066
+ }
1067
+ }, [context, xyOs]);
1068
+ };
1069
+
1070
+ // src/hooks/useDappIntentCaller.tsx
1071
+ import { assertEx as assertEx4 } from "@xylabs/assert";
1072
+ import { DappIntentCaller } from "@xyo-network/os-runtime";
1073
+ import { useMemo as useMemo6 } from "react";
1074
+ var useDappIntentCaller = (xyOsContext) => {
1075
+ const xyOs = useXyOsUiContext();
1076
+ return useMemo6(() => {
1077
+ if (xyOsContext || xyOs) {
1078
+ const context = assertEx4(xyOsContext ?? xyOs, () => "no node was found in context or passed as argument");
1079
+ return new DappIntentCaller(context);
1080
+ }
1081
+ }, [xyOsContext, xyOs]);
1082
+ };
1083
+
1084
+ // src/hooks/useDebugClick.tsx
1085
+ import {
1086
+ useCallback as useCallback4,
1087
+ useEffect as useEffect10,
1088
+ useRef as useRef2,
1089
+ useState as useState7
1090
+ } from "react";
1091
+ import { useNavigate as useNavigate2, useSearchParams } from "react-router-dom";
1092
+ var useDebugClick = () => {
1093
+ const [params, setParams] = useSearchParams();
1094
+ const [debugOpen, setDebugOpen] = useState7(false);
1095
+ const openFromClick = useRef2(false);
1096
+ const closeFromClick = useRef2(false);
1097
+ const initialized = useRef2(false);
1098
+ const navigate = useNavigate2();
1099
+ const openDebug = useCallback4(() => {
1100
+ openFromClick.current = true;
1101
+ closeFromClick.current = false;
1102
+ setParams((params2) => {
1103
+ params2.set("debug", "true");
1104
+ return new URLSearchParams(params2);
1105
+ });
1106
+ setDebugOpen(true);
1107
+ }, [setParams]);
1108
+ const closeDebug = useCallback4(() => {
1109
+ openFromClick.current = false;
1110
+ closeFromClick.current = true;
1111
+ initialized.current = false;
1112
+ navigate(-1);
1113
+ setDebugOpen(false);
1114
+ }, [navigate]);
1115
+ useEffect10(() => {
1116
+ const initialOpen = openFromClick.current && !closeFromClick.current && params.has("debug");
1117
+ const backButtonClicked = openFromClick.current && !closeFromClick.current && !params.has("debug");
1118
+ if (initialOpen) {
1119
+ if (initialized.current === false) {
1120
+ initialized.current = true;
1121
+ }
1122
+ } else if (backButtonClicked) {
1123
+ initialized.current = false;
1124
+ closeDebug();
1125
+ }
1126
+ }, [params, closeDebug]);
1127
+ return {
1128
+ closeDebug,
1129
+ debugOpen,
1130
+ openDebug
1131
+ };
1132
+ };
1133
+
1134
+ // src/hooks/useDetectCustomer.tsx
1135
+ var CustomerParams = [
1136
+ { key: "utm_source", value: "coin" },
1137
+ {
1138
+ key: "receipt",
1139
+ matches: "*",
1140
+ value: "receiptHash"
1141
+ }
1142
+ ];
1143
+ var useDetectCustomer = () => {
1144
+ return CustomerParams.find((customerParamSet) => {
1145
+ const searchParams = new URLSearchParams(window.location.search);
1146
+ const searchParamValue = searchParams.get(customerParamSet.key);
1147
+ if (searchParams.has(customerParamSet.key) && customerParamSet.matches === "*") {
1148
+ return true;
1149
+ }
1150
+ return searchParamValue && searchParamValue === customerParamSet.value;
1151
+ });
1152
+ };
1153
+
1154
+ // src/hooks/useExposedNode.ts
1155
+ var useExposedNode = () => {
1156
+ const xyOS = useXyOsUiContext();
1157
+ return xyOS?.exposedNode;
1158
+ };
1159
+
1160
+ // src/hooks/useOsSettingsCaller.tsx
1161
+ import { assertEx as assertEx6 } from "@xylabs/assert";
1162
+ import { OsSettingsCaller, OsSettingsReadyEvent } from "@xyo-network/os-runtime";
1163
+ import { useMemo as useMemo7 } from "react";
1164
+
1165
+ // src/hooks/useStackReady.tsx
1166
+ import { assertEx as assertEx5 } from "@xylabs/assert";
1167
+ import { EventBusPubSubConnection as EventBusPubSubConnection2 } from "@xyo-network/os-runtime";
1168
+ import { useEffect as useEffect11, useState as useState8 } from "react";
1169
+ var useStackReady = (stackReadyEvent, stackName, context) => {
1170
+ const providedContext = useXyOsUiContext();
1171
+ const [stackReady, setStackReady] = useState8({ ready: false });
1172
+ useEffect11(() => {
1173
+ const derivedContext = context ?? providedContext;
1174
+ const listener = () => {
1175
+ if (!derivedContext) throw new Error("no context found");
1176
+ const stack = assertEx5(derivedContext.getStack(stackName).stack, () => `${stackName} missing stack`);
1177
+ setStackReady({ ready: true, stack });
1178
+ };
1179
+ const stackReadyReadyConnectionRequest = {
1180
+ subscribableEvents: /* @__PURE__ */ new Map([[stackReadyEvent, listener]]),
1181
+ type: "PubSub"
1182
+ };
1183
+ const stackReadyReadyConnection = new EventBusPubSubConnection2(stackReadyReadyConnectionRequest);
1184
+ if (derivedContext) {
1185
+ derivedContext.eventBus.addConnection(stackReadyReadyConnection);
1186
+ const stack = derivedContext.getStack(stackName);
1187
+ if (stack.initialized) setStackReady({ ready: true, stack: stack.stack });
1188
+ }
1189
+ return () => {
1190
+ const derivedContext2 = context ?? providedContext;
1191
+ if (derivedContext2 && stackReadyReadyConnection._id) {
1192
+ derivedContext2.eventBus.removeConnection(stackReadyReadyConnection.id);
1193
+ }
1194
+ };
1195
+ }, [context, providedContext]);
1196
+ return stackReady;
1197
+ };
1198
+
1199
+ // src/hooks/useOsSettingsCaller.tsx
1200
+ var useOsSettingsCaller = (context) => {
1201
+ const providedContext = useXyOsUiContext();
1202
+ const { ready } = useStackReady(OsSettingsReadyEvent, "osSettingsStack", providedContext);
1203
+ return useMemo7(() => {
1204
+ if (providedContext || context || ready) {
1205
+ const derivedNode = assertEx6(context ?? providedContext, () => "no node was found in context or passed as argument");
1206
+ return new OsSettingsCaller(derivedNode);
1207
+ }
1208
+ }, [context, providedContext]);
1209
+ };
1210
+
1211
+ // src/hooks/usePhraseFile.tsx
1212
+ import { usePromise as usePromise9 } from "@xylabs/react-promise";
1213
+ import { buildUserWalletSeedPhrasePayload } from "@xyo-network/os-runtime";
1214
+ import { useMemo as useMemo8 } from "react";
1215
+ var usePhraseFile = (phrase) => {
1216
+ const [payloadAndRootHash] = usePromise9(async () => phrase ? await buildUserWalletSeedPhrasePayload(phrase) : void 0, [phrase]);
1217
+ const filename = useMemo8(() => `xyo-phrase-${payloadAndRootHash?.rootHash}.json`, [payloadAndRootHash?.rootHash]);
1218
+ const { phraseFile, phraseFileError } = useMemo8(() => {
1219
+ const payload = payloadAndRootHash?.payload;
1220
+ if (payload) {
1221
+ try {
1222
+ const data = new Blob([JSON.stringify(payload, null, 2)], { type: "text/plain" });
1223
+ return { phraseFile: window.URL.createObjectURL(data) };
1224
+ } catch (e) {
1225
+ return { phraseFileError: e };
1226
+ }
1227
+ } else {
1228
+ return {};
1229
+ }
1230
+ }, [payloadAndRootHash]);
1231
+ return {
1232
+ filename,
1233
+ payload: payloadAndRootHash?.payload,
1234
+ phraseFile,
1235
+ phraseFileError
1236
+ };
1237
+ };
1238
+
1239
+ // src/hooks/useTabs.ts
1240
+ import { useLocation as useLocation2, useNavigate as useNavigate3 } from "react-router-dom";
1241
+ var useTabs = () => {
1242
+ const location2 = useLocation2();
1243
+ const navigate = useNavigate3();
1244
+ const rootFolder = location2.pathname.split("/")[1];
1245
+ const tab = rootFolder?.length > 0 ? rootFolder : "node";
1246
+ const setTab = (tab2) => {
1247
+ navigate(`/${tab2}`);
1248
+ };
1249
+ return [tab, setTab];
1250
+ };
1251
+
1252
+ // src/modules/Dapp/lib/DefaultIconSize.ts
1253
+ var DEFAULT_ICON_SIZE = 84;
1254
+
1255
+ // src/modules/Dapp/Button/LaunchFrame.tsx
1256
+ import { useTheme as useTheme2 } from "@mui/material";
1257
+ import {
1258
+ animated,
1259
+ config,
1260
+ useSpring
1261
+ } from "@react-spring/web";
1262
+ import { forwardRef, useMemo as useMemo9 } from "react";
1263
+ import { jsx as jsx5 } from "react/jsx-runtime";
1264
+ var DappLaunchFrame = forwardRef(({
1265
+ bgColor,
1266
+ children,
1267
+ id,
1268
+ launchLeft,
1269
+ open,
1270
+ launchTop
1271
+ }, ref) => {
1272
+ const theme = useTheme2();
1273
+ const frameOpenSpringConfig = useMemo9(
1274
+ () => ({
1275
+ config: config.stiff,
1276
+ from: { height: "0%", width: "0%" },
1277
+ to: {
1278
+ height: open ? "100dvh" : "0%",
1279
+ left: open ? 0 : launchLeft,
1280
+ top: open ? 0 : launchTop,
1281
+ width: open ? "100vw" : "0%"
1282
+ }
1283
+ }),
1284
+ [launchLeft, launchTop, open]
1285
+ );
1286
+ const {
1287
+ height,
1288
+ width,
1289
+ ...frameProps
1290
+ } = useSpring(frameOpenSpringConfig);
1291
+ const { transform, ...scaleProps } = useSpring({
1292
+ config: config.stiff,
1293
+ from: { transform: "scale(0)" },
1294
+ to: { transform: open ? "scale(1)" : "scale(0)" }
1295
+ });
1296
+ return /* @__PURE__ */ jsx5("div", { id, ref, children: /* @__PURE__ */ jsx5(
1297
+ animated.div,
1298
+ {
1299
+ id: "dapp-launch-frame-transition-width-height",
1300
+ style: {
1301
+ ...frameProps,
1302
+ height,
1303
+ overflow: "hidden",
1304
+ position: "fixed",
1305
+ width,
1306
+ // Set to one above the mui app bar
1307
+ zIndex: 1101
1308
+ },
1309
+ children: /* @__PURE__ */ jsx5(
1310
+ animated.div,
1311
+ {
1312
+ id: "dapp-launch-frame-transition-scale",
1313
+ style: {
1314
+ ...scaleProps,
1315
+ alignItems: "start",
1316
+ background: bgColor ?? theme.palette.background.default,
1317
+ display: "flex",
1318
+ height: "100%",
1319
+ justifyContent: "start",
1320
+ transform,
1321
+ width: "100%"
1322
+ },
1323
+ children
1324
+ }
1325
+ )
1326
+ }
1327
+ ) });
1328
+ });
1329
+ DappLaunchFrame.displayName = "DappLaunchFrame";
1330
+
1331
+ // src/modules/Dapp/Button/lib/decomposeProps.tsx
1332
+ var decomposeProps = (dappIcon, props) => {
1333
+ const { color, windowId: id } = dappIcon ?? {};
1334
+ const DappIconSize = DEFAULT_ICON_SIZE * 0.8;
1335
+ const { sx, ...nonSxProps } = props ?? {};
1336
+ return {
1337
+ DappIconSize,
1338
+ color,
1339
+ id,
1340
+ nonSxProps,
1341
+ sx
1342
+ };
1343
+ };
1344
+
1345
+ // src/modules/Dapp/Button/StyledComponents.tsx
1346
+ import { alpha as alpha2, styled } from "@mui/material";
1347
+ import { ButtonEx as ButtonEx3 } from "@xylabs/react-button";
1348
+ import { TypographyEx } from "@xyo-network/react-shared";
1349
+ import { forwardRef as forwardRef2 } from "react";
1350
+ import { jsx as jsx6 } from "react/jsx-runtime";
1351
+ var ForwardedRefButtonEx = forwardRef2((props, ref) => {
1352
+ return /* @__PURE__ */ jsx6("span", { ref, children: /* @__PURE__ */ jsx6(ButtonEx3, { ...props }) });
1353
+ });
1354
+ ForwardedRefButtonEx.displayName = "ForwardedRefButtonEx";
1355
+ var borderRadiusFactor = 1.5;
1356
+ var StyledDappIconButtonEx = styled(ForwardedRefButtonEx, {
1357
+ name: "DappIconButton",
1358
+ shouldForwardProp: (prop) => !["iconBgBaseColor"].includes(prop)
1359
+ })(({ theme }) => {
1360
+ return {
1361
+ // :before hack in place since css transitions not supported in css
1362
+ "&:before": {
1363
+ WebkitBackdropFilter: "blur(20px)",
1364
+ backdropFilter: "blur(20px)",
1365
+ backgroundColor: alpha2(theme.palette.background.paper, 0.5),
1366
+ borderRadius: theme.spacing(borderRadiusFactor),
1367
+ content: "''",
1368
+ inset: 0,
1369
+ opacity: 0,
1370
+ position: "absolute",
1371
+ transition: "transform 0.15s linear, opacity 0.15s linear",
1372
+ zIndex: "-1"
1373
+ },
1374
+ "&:hover": { transform: "translateY(-2px)" },
1375
+ "&:hover:before": { opacity: 1 },
1376
+ "WebkitBackdropFilter": "blur(20px)",
1377
+ "backdropFilter": "blur(20px)",
1378
+ "backgroundColor": alpha2(theme.palette.background.paper, 0.5),
1379
+ "borderRadius": theme.spacing(borderRadiusFactor),
1380
+ "color": theme.palette.text.primary,
1381
+ "position": "relative",
1382
+ "transition": "transform 0.15s linear"
1383
+ };
1384
+ });
1385
+ var StyledDappName = styled(TypographyEx, { name: "StyledDappName" })(({ theme }) => ({
1386
+ // WebkitBoxOrient: 'vertical',
1387
+ WebkitLineClamp: 2,
1388
+ color: theme.palette.text.primary,
1389
+ flexWrap: "wrap",
1390
+ fontWeight: 700,
1391
+ letterSpacing: "-0.5px",
1392
+ lineClamp: 2,
1393
+ textAlign: "center",
1394
+ textOverflow: "ellipsis",
1395
+ textShadow: `1px 1px 3px ${alpha2(theme.palette.common.black, 0.3)}`,
1396
+ whiteSpace: "initial",
1397
+ wordWrap: "break-word"
1398
+ }));
1399
+ var StyledDefaultDappIcon = styled(TypographyEx, { name: "StyledDappName" })(() => ({ lineHeight: 1 }));
1400
+
1401
+ // src/modules/Dapp/Button/IconEx.tsx
1402
+ import { jsx as jsx7, jsxs as jsxs2 } from "react/jsx-runtime";
1403
+ var DappIconButton = ({
1404
+ children,
1405
+ dappIcon,
1406
+ dappIconSvg,
1407
+ dappName,
1408
+ ...props
1409
+ }) => {
1410
+ const {
1411
+ DappIconSize,
1412
+ color,
1413
+ nonSxProps,
1414
+ sx
1415
+ } = decomposeProps(dappIcon, props);
1416
+ const iconSize = DEFAULT_ICON_SIZE;
1417
+ const sendIntent = useSendDappIntent();
1418
+ const { dappIntentType: intentType } = useDappIntentListener(dappName);
1419
+ const iconButtonRef = useRef3(null);
1420
+ const { left: launchLeft, top: launchTop } = useLaunchPoint(iconButtonRef);
1421
+ const minimized = intentType === DappIntentTypes5.Minimize;
1422
+ const MiddleEllipsisFunction = (str) => {
1423
+ if (str && str.length > 25) {
1424
+ console.log(str);
1425
+ console.log(str.slice(0, 15));
1426
+ console.log(str.slice(-10, str.length - 10 + str.length));
1427
+ return str.slice(0, 15) + "..." + str.slice(-7, str.length - 7 + str.length);
1428
+ }
1429
+ return str;
1430
+ };
1431
+ const onClickIcon = () => {
1432
+ XyOsMonitor2.trackEvent("Launch dApp", { "Dapp Name": `${dappName}` });
1433
+ sendIntent?.(DappIntentCaller2.buildIntent(DappIntentCaller2.OsDappName, DappIntentTypes5.Launch, dappName)).catch(console.error);
1434
+ };
1435
+ return /* @__PURE__ */ jsxs2(FlexCol2, { alignItems: "stretch", justifyContent: "stretch", children: [
1436
+ /* @__PURE__ */ jsx7(DappLaunchFrame, { id: "dapp-launch-frame", open: intentType === DappIntentTypes5.Launch, launchLeft, launchTop, children }),
1437
+ /* @__PURE__ */ jsxs2(
1438
+ "span",
1439
+ {
1440
+ style: { cursor: "pointer" },
1441
+ onClick: onClickIcon,
1442
+ children: [
1443
+ /* @__PURE__ */ jsx7(
1444
+ StyledDappIconButtonEx,
1445
+ {
1446
+ iconBgBaseColor: color,
1447
+ ref: iconButtonRef,
1448
+ sx: {
1449
+ height: iconSize,
1450
+ mb: 0.75,
1451
+ width: iconSize,
1452
+ ...sx
1453
+ },
1454
+ ...nonSxProps,
1455
+ children: dappIconSvg ? /* @__PURE__ */ jsx7(RenderHtml, { htmlString: dappIconSvg }) : /* @__PURE__ */ jsx7(StyledDefaultDappIcon, { fontSize: DappIconSize, children: dappIcon?.name.at(0) })
1456
+ }
1457
+ ),
1458
+ /* @__PURE__ */ jsxs2(FlexCol2, { gap: 0.25, children: [
1459
+ /* @__PURE__ */ jsx7(StyledDappName, { variant: "body2", maxWidth: iconSize, children: MiddleEllipsisFunction(dappIcon?.name) }),
1460
+ /* @__PURE__ */ jsx7(
1461
+ Circle,
1462
+ {
1463
+ sx: {
1464
+ height: 8,
1465
+ opacity: minimized ? 1 : 0,
1466
+ transition: "opacity .5s"
1467
+ }
1468
+ }
1469
+ )
1470
+ ] })
1471
+ ]
1472
+ }
1473
+ )
1474
+ ] });
1475
+ };
1476
+
1477
+ // src/modules/Dapp/modules/Window/AppBar.tsx
1478
+ import {
1479
+ ArrowDropDownCircleOutlined,
1480
+ BugReport,
1481
+ CancelOutlined
1482
+ } from "@mui/icons-material";
1483
+ import {
1484
+ AppBar,
1485
+ Box as Box2,
1486
+ Divider,
1487
+ IconButton as IconButton2,
1488
+ Toolbar,
1489
+ Tooltip as Tooltip2,
1490
+ Typography as Typography2
1491
+ } from "@mui/material";
1492
+ import { FlexGrowRow as FlexGrowRow2 } from "@xylabs/react-flexbox";
1493
+ import { DarkModeIconButtonForColorScheme } from "@xylabs/react-invertible-theme";
1494
+ import { DappIntentTypes as DappIntentTypes6 } from "@xyo-network/os-model";
1495
+ import { DappIntentCaller as DappIntentCaller3 } from "@xyo-network/os-runtime";
1496
+
1497
+ // src/modules/Dapp/Debug/Dialog.tsx
1498
+ import {
1499
+ Dialog,
1500
+ DialogActions,
1501
+ DialogContent
1502
+ } from "@mui/material";
1503
+ import { ButtonEx as ButtonEx4 } from "@xylabs/react-button";
1504
+ import { FlexCol as FlexCol3 } from "@xylabs/react-flexbox";
1505
+ import { NodeProvider } from "@xyo-network/react-node";
1506
+ import { lazy, Suspense } from "react";
1507
+ import { jsx as jsx8, jsxs as jsxs3 } from "react/jsx-runtime";
1508
+ var Debug = lazy(() => import(
1509
+ /* webpackChunkName: "Debug" */
1510
+ "@xyo-network/os-react-debug"
1511
+ ));
1512
+ var LazyDebug = () => /* @__PURE__ */ jsxs3(Suspense, { fallback: /* @__PURE__ */ jsx8(FlexCol3, {}), children: [
1513
+ /* @__PURE__ */ jsx8(FlexCol3, {}),
1514
+ /* @__PURE__ */ jsx8(Debug, { height: "100%" })
1515
+ ] });
1516
+ var DebugDialog = ({
1517
+ closeDebug,
1518
+ debugOpen,
1519
+ ...props
1520
+ }) => {
1521
+ return /* @__PURE__ */ jsxs3(Dialog, { open: debugOpen, onClose: closeDebug, fullScreen: true, ...props, children: [
1522
+ /* @__PURE__ */ jsx8(DialogContent, { children: /* @__PURE__ */ jsx8(LazyDebug, {}) }),
1523
+ /* @__PURE__ */ jsx8(DialogActions, { children: /* @__PURE__ */ jsx8(ButtonEx4, { variant: "outlined", onClick: closeDebug, children: "Close" }) })
1524
+ ] });
1525
+ };
1526
+ var DebugDialogWithNode = ({
1527
+ closeDebug,
1528
+ debugOpen,
1529
+ context,
1530
+ ...props
1531
+ }) => {
1532
+ return /* @__PURE__ */ jsx8(NodeProvider, { node: context?.root, children: /* @__PURE__ */ jsx8(DebugDialog, { closeDebug, debugOpen, ...props }) });
1533
+ };
1534
+
1535
+ // src/modules/Dapp/modules/Window/AppBar.tsx
1536
+ import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
1537
+ var EmptyDappBarForPadding = (props) => {
1538
+ return /* @__PURE__ */ jsx9(
1539
+ AppBar,
1540
+ {
1541
+ color: "primary",
1542
+ sx: { flexDirection: "row" },
1543
+ component: "div",
1544
+ position: "fixed",
1545
+ ...props
1546
+ }
1547
+ );
1548
+ };
1549
+ var DappBar = ({
1550
+ title,
1551
+ context,
1552
+ name,
1553
+ ...props
1554
+ }) => {
1555
+ const sendIntent = useSendDappIntent();
1556
+ const {
1557
+ closeDebug,
1558
+ debugOpen,
1559
+ openDebug
1560
+ } = useDebugClick();
1561
+ return /* @__PURE__ */ jsxs4(
1562
+ AppBar,
1563
+ {
1564
+ elevation: 0,
1565
+ color: "transparent",
1566
+ sx: { backgroundColor: "transparent", flexDirection: "row" },
1567
+ component: "div",
1568
+ position: "sticky",
1569
+ ...props,
1570
+ children: [
1571
+ /* @__PURE__ */ jsx9(
1572
+ Toolbar,
1573
+ {
1574
+ disableGutters: true,
1575
+ sx: { paddingX: 2 },
1576
+ children: /* @__PURE__ */ jsx9(Typography2, { noWrap: true, variant: "h5", letterSpacing: "-1px", fontWeight: "300", children: title })
1577
+ }
1578
+ ),
1579
+ /* @__PURE__ */ jsx9(FlexGrowRow2, {}),
1580
+ /* @__PURE__ */ jsxs4(
1581
+ Toolbar,
1582
+ {
1583
+ disableGutters: true,
1584
+ sx: { paddingX: 2 },
1585
+ children: [
1586
+ /* @__PURE__ */ jsx9(
1587
+ IconButton2,
1588
+ {
1589
+ onClick: openDebug,
1590
+ sx: { display: { md: "none", xs: "flex" } },
1591
+ children: /* @__PURE__ */ jsx9(BugReport, {})
1592
+ }
1593
+ ),
1594
+ /* @__PURE__ */ jsx9(
1595
+ Tooltip2,
1596
+ {
1597
+ title: "Toggle Light/Dark Mode",
1598
+ sx: { display: { md: "none", xs: "flex" } },
1599
+ children: /* @__PURE__ */ jsx9(Box2, { children: /* @__PURE__ */ jsx9(DarkModeIconButtonForColorScheme, { defaultLightModeColor: "warning" }) })
1600
+ }
1601
+ ),
1602
+ /* @__PURE__ */ jsx9(
1603
+ Divider,
1604
+ {
1605
+ orientation: "vertical",
1606
+ flexItem: true,
1607
+ sx: {
1608
+ display: { md: "none", xs: "flex" },
1609
+ m: 1
1610
+ }
1611
+ }
1612
+ ),
1613
+ /* @__PURE__ */ jsx9(Tooltip2, { title: "Minimize", children: /* @__PURE__ */ jsx9(
1614
+ IconButton2,
1615
+ {
1616
+ onClick: () => {
1617
+ sendIntent?.(DappIntentCaller3.buildIntent(DappIntentCaller3.OsDappName, DappIntentTypes6.Minimize, name))?.catch(console.error);
1618
+ },
1619
+ children: /* @__PURE__ */ jsx9(ArrowDropDownCircleOutlined, { htmlColor: "inherit" })
1620
+ }
1621
+ ) }),
1622
+ /* @__PURE__ */ jsx9(Tooltip2, { title: "Close", children: /* @__PURE__ */ jsx9(
1623
+ IconButton2,
1624
+ {
1625
+ onClick: () => {
1626
+ sendIntent?.(DappIntentCaller3.buildIntent(DappIntentCaller3.OsDappName, DappIntentTypes6.Close, name))?.catch(console.error);
1627
+ },
1628
+ children: /* @__PURE__ */ jsx9(CancelOutlined, { htmlColor: "inherit" })
1629
+ }
1630
+ ) })
1631
+ ]
1632
+ }
1633
+ ),
1634
+ /* @__PURE__ */ jsx9(DebugDialogWithNode, { closeDebug, debugOpen, context })
1635
+ ]
1636
+ }
1637
+ );
1638
+ };
1639
+
1640
+ // src/modules/Dapp/modules/Window/Chrome.tsx
1641
+ import { useMediaQuery } from "@mui/material";
1642
+ import {
1643
+ FlexCol as FlexCol4,
1644
+ FlexGrowCol,
1645
+ FlexRow as FlexRow2
1646
+ } from "@xylabs/react-flexbox";
1647
+ import { jsx as jsx10, jsxs as jsxs5 } from "react/jsx-runtime";
1648
+ var DappChromeSmall = ({
1649
+ appBar,
1650
+ children,
1651
+ screenMenu,
1652
+ splashScreen,
1653
+ ...props
1654
+ }) => {
1655
+ return /* @__PURE__ */ jsxs5(FlexCol4, { alignItems: "stretch", id: "dapp-chrome-container-small", ...props, children: [
1656
+ splashScreen,
1657
+ /* @__PURE__ */ jsxs5(
1658
+ FlexGrowCol,
1659
+ {
1660
+ alignItems: "stretch",
1661
+ id: "dapp-chrome-small",
1662
+ justifyContent: "start",
1663
+ sx: { background: (theme) => theme.palette.background.default },
1664
+ children: [
1665
+ appBar,
1666
+ /* @__PURE__ */ jsx10(
1667
+ FlexGrowCol,
1668
+ {
1669
+ sx: { overflowY: "auto" },
1670
+ alignItems: "stretch",
1671
+ children
1672
+ }
1673
+ ),
1674
+ screenMenu
1675
+ ]
1676
+ }
1677
+ )
1678
+ ] });
1679
+ };
1680
+ var DappChromeLarge = ({
1681
+ appBar,
1682
+ children,
1683
+ screenMenu,
1684
+ splashScreen,
1685
+ ...props
1686
+ }) => {
1687
+ return /* @__PURE__ */ jsxs5(FlexRow2, { alignItems: "stretch", id: "dapp-chrome-container-large", ...props, children: [
1688
+ splashScreen,
1689
+ screenMenu,
1690
+ /* @__PURE__ */ jsxs5(
1691
+ FlexGrowCol,
1692
+ {
1693
+ alignItems: "stretch",
1694
+ id: "dapp-chrome-large",
1695
+ justifyContent: "start",
1696
+ sx: { background: (theme) => theme.palette.background.default },
1697
+ children: [
1698
+ appBar,
1699
+ /* @__PURE__ */ jsx10(
1700
+ FlexGrowCol,
1701
+ {
1702
+ sx: { overflowY: "auto" },
1703
+ alignItems: "stretch",
1704
+ justifyContent: "flex-start",
1705
+ children
1706
+ }
1707
+ )
1708
+ ]
1709
+ }
1710
+ )
1711
+ ] });
1712
+ };
1713
+ var DappChrome = ({
1714
+ largeScreenMenu,
1715
+ smallScreenMenu,
1716
+ ...props
1717
+ }) => {
1718
+ const isMedium = useMediaQuery((theme) => theme.breakpoints.up("md"));
1719
+ return isMedium ? /* @__PURE__ */ jsx10(DappChromeLarge, { screenMenu: largeScreenMenu, ...props }) : /* @__PURE__ */ jsx10(DappChromeSmall, { screenMenu: smallScreenMenu, ...props });
1720
+ };
1721
+
1722
+ // src/modules/Dapp/modules/Window/components/DefaultComingSoon/DefaultComingSoon.tsx
1723
+ import {
1724
+ alpha as alpha3,
1725
+ Card as Card2,
1726
+ CardContent as CardContent3,
1727
+ Chip,
1728
+ Container,
1729
+ Divider as Divider2,
1730
+ Typography as Typography4,
1731
+ useTheme as useTheme5
1732
+ } from "@mui/material";
1733
+ import { FlexGrowCol as FlexGrowCol3, FlexRow as FlexRow5 } from "@xylabs/react-flexbox";
1734
+
1735
+ // src/modules/Dapp/modules/Window/components/DefaultComingSoon/InstallButtonSection.tsx
1736
+ import { ButtonEx as ButtonEx5 } from "@xylabs/react-button";
1737
+ import { FlexRow as FlexRow3 } from "@xylabs/react-flexbox";
1738
+ import { jsx as jsx11, jsxs as jsxs6 } from "react/jsx-runtime";
1739
+ var InstallButtonSection = ({
1740
+ installLink = "",
1741
+ notificationLink = "https://xyo.network/newsletter",
1742
+ ...props
1743
+ }) => {
1744
+ return /* @__PURE__ */ jsxs6(
1745
+ FlexRow3,
1746
+ {
1747
+ width: "100%",
1748
+ gap: 1,
1749
+ sx: {
1750
+ alignItems: "flex-start",
1751
+ flexDirection: { md: "row", xs: "column" }
1752
+ },
1753
+ ...props,
1754
+ children: [
1755
+ /* @__PURE__ */ jsx11(ButtonEx5, { fullWidth: true, variant: "contained", disabled: true, href: installLink, children: "Install" }),
1756
+ /* @__PURE__ */ jsx11(ButtonEx5, { fullWidth: true, variant: "outlined", href: notificationLink, target: "_blank", children: "Get Notified When Available" })
1757
+ ]
1758
+ }
1759
+ );
1760
+ };
1761
+
1762
+ // src/modules/Dapp/modules/Window/components/DefaultComingSoon/SummarySection.tsx
1763
+ import { VerifiedRounded } from "@mui/icons-material";
1764
+ import {
1765
+ Card,
1766
+ CardContent as CardContent2,
1767
+ Typography as Typography3,
1768
+ useTheme as useTheme4
1769
+ } from "@mui/material";
1770
+ import {
1771
+ FlexGrowCol as FlexGrowCol2,
1772
+ FlexGrowRow as FlexGrowRow4,
1773
+ FlexRow as FlexRow4
1774
+ } from "@xylabs/react-flexbox";
1775
+
1776
+ // src/modules/Dapp/modules/Window/components/DefaultComingSoon/DeveloperLinkSection.tsx
1777
+ import { useTheme as useTheme3 } from "@mui/material";
1778
+ import { FlexGrowRow as FlexGrowRow3 } from "@xylabs/react-flexbox";
1779
+ import { LinkEx } from "@xylabs/react-link";
1780
+ import { jsx as jsx12 } from "react/jsx-runtime";
1781
+ var DeveloperLinkSection = ({ developerLink = "https://xylabs.com", ...props }) => {
1782
+ const theme = useTheme3();
1783
+ return /* @__PURE__ */ jsx12(
1784
+ FlexGrowRow3,
1785
+ {
1786
+ gap: 1,
1787
+ sx: {
1788
+ alignItems: "flex-start",
1789
+ flexDirection: { md: "row", xs: "column" }
1790
+ },
1791
+ ...props,
1792
+ children: /* @__PURE__ */ jsx12(LinkEx, { color: theme.palette.info.main, href: developerLink, target: "_blank", children: developerLink })
1793
+ }
1794
+ );
1795
+ };
1796
+
1797
+ // src/modules/Dapp/modules/Window/components/DefaultComingSoon/SummarySection.tsx
1798
+ import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
1799
+ var SummarySection = ({
1800
+ name,
1801
+ dappIconSvg,
1802
+ version = "1.0",
1803
+ developerLink = "https://xylabs.com"
1804
+ }) => {
1805
+ const theme = useTheme4();
1806
+ return /* @__PURE__ */ jsx13(Card, { sx: { width: "100%" }, children: /* @__PURE__ */ jsx13(CardContent2, { children: /* @__PURE__ */ jsx13(
1807
+ FlexRow4,
1808
+ {
1809
+ gap: 3,
1810
+ alignItems: "flex-start",
1811
+ sx: { flexDirection: "column", width: "100%" },
1812
+ children: /* @__PURE__ */ jsxs7(
1813
+ FlexGrowRow4,
1814
+ {
1815
+ sx: { gap: { md: 2, xs: 1 } },
1816
+ alignItems: "flex-start",
1817
+ children: [
1818
+ /* @__PURE__ */ jsx13(Card, { elevation: 0, variant: "outlined", children: /* @__PURE__ */ jsx13(CardContent2, { children: dappIconSvg ? /* @__PURE__ */ jsx13(RenderHtml, { htmlString: dappIconSvg }) : null }) }),
1819
+ /* @__PURE__ */ jsxs7(FlexGrowCol2, { alignItems: "flex-start", children: [
1820
+ /* @__PURE__ */ jsxs7(FlexGrowCol2, { alignItems: "flex-start", children: [
1821
+ /* @__PURE__ */ jsx13(
1822
+ Typography3,
1823
+ {
1824
+ sx: { fontSize: { md: theme.typography.h1.fontSize, xs: theme.typography.h5.fontSize } },
1825
+ fontWeight: theme.typography.fontWeightBold,
1826
+ children: name
1827
+ }
1828
+ ),
1829
+ /* @__PURE__ */ jsxs7(Typography3, { gutterBottom: true, variant: "subtitle2", children: [
1830
+ "Version:",
1831
+ " ",
1832
+ version
1833
+ ] })
1834
+ ] }),
1835
+ /* @__PURE__ */ jsxs7(FlexGrowRow4, { gap: 0.5, alignItems: "center", justifyContent: "center", children: [
1836
+ /* @__PURE__ */ jsx13(VerifiedRounded, { color: "success", fontSize: "small" }),
1837
+ /* @__PURE__ */ jsx13(Typography3, { variant: "body1", color: theme.palette.success.main, children: "XY Labs" })
1838
+ ] }),
1839
+ developerLink ? /* @__PURE__ */ jsx13(DeveloperLinkSection, { developerLink }) : null
1840
+ ] })
1841
+ ]
1842
+ }
1843
+ )
1844
+ }
1845
+ ) }) });
1846
+ };
1847
+
1848
+ // src/modules/Dapp/modules/Window/components/DefaultComingSoon/DefaultComingSoon.tsx
1849
+ import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
1850
+ var defaultDescription = ["Description coming soon!"];
1851
+ var DefaultComingSoon = ({
1852
+ children,
1853
+ desc = defaultDescription,
1854
+ developerLink = "https://xylabs.com",
1855
+ name,
1856
+ dappIconSvg,
1857
+ version
1858
+ }) => {
1859
+ const theme = useTheme5();
1860
+ return /* @__PURE__ */ jsxs8(
1861
+ Container,
1862
+ {
1863
+ maxWidth: "md",
1864
+ sx: {
1865
+ minHeight: "100%",
1866
+ overflow: "auto",
1867
+ paddingTop: 2,
1868
+ width: "100%"
1869
+ },
1870
+ children: [
1871
+ version ? null : /* @__PURE__ */ jsx14(FlexRow5, { width: "100%", paddingBottom: 2, children: /* @__PURE__ */ jsx14(
1872
+ Chip,
1873
+ {
1874
+ label: "This app is not yet publicly available on xyOS",
1875
+ sx: {
1876
+ backgroundColor: alpha3(theme.palette.info.main, 0.2),
1877
+ color: theme.palette.info.main,
1878
+ width: "100%"
1879
+ }
1880
+ }
1881
+ ) }),
1882
+ /* @__PURE__ */ jsx14(FlexGrowCol3, { width: "100%", alignItems: "flex-start", minHeight: "100%", children: /* @__PURE__ */ jsxs8(FlexGrowCol3, { width: "100%", alignItems: "stretch", justifyContent: "flex-start", gap: 2, children: [
1883
+ /* @__PURE__ */ jsx14(SummarySection, { dappIconSvg, name, version, developerLink }),
1884
+ /* @__PURE__ */ jsx14(InstallButtonSection, {}),
1885
+ /* @__PURE__ */ jsx14(Divider2, { flexItem: true }),
1886
+ /* @__PURE__ */ jsx14(Card2, { children: /* @__PURE__ */ jsx14(CardContent3, { children: /* @__PURE__ */ jsxs8(FlexGrowCol3, { justifyContent: "flex-start", alignItems: "flex-start", children: [
1887
+ /* @__PURE__ */ jsxs8(Typography4, { variant: "h6", gutterBottom: true, children: [
1888
+ "Learn more about",
1889
+ " ",
1890
+ name
1891
+ ] }),
1892
+ desc?.map((paragraph, index) => {
1893
+ return /* @__PURE__ */ jsx14(Typography4, { gutterBottom: true, paddingBottom: 1, variant: "body1", children: paragraph }, index);
1894
+ })
1895
+ ] }) }) }),
1896
+ children
1897
+ ] }) })
1898
+ ]
1899
+ }
1900
+ );
1901
+ };
1902
+
1903
+ // src/modules/Dapp/modules/Window/DappWindow.tsx
1904
+ import { FlexCol as FlexCol9 } from "@xylabs/react-flexbox";
1905
+ import { NameTransforms as NameTransforms4 } from "@xyo-network/os-runtime";
1906
+ import { ErrorBoundary, ErrorRender as ErrorRender3 } from "@xyo-network/react-error";
1907
+ import { NodeProvider as NodeProvider2 } from "@xyo-network/react-node";
1908
+ import { WalletProvider } from "@xyo-network/react-wallet";
1909
+ import { useMemo as useMemo12 } from "react";
1910
+ import { Helmet } from "react-helmet";
1911
+
1912
+ // src/modules/XyOsUi/contexts/XyOsUiContext.ts
1913
+ import { createContext, useContext } from "react";
1914
+ var XyOsUiContext = createContext(void 0);
1915
+ var useXyOsUiContext = () => {
1916
+ return useContext(XyOsUiContext);
1917
+ };
1918
+ var XyOsUiContextProvider = XyOsUiContext.Provider;
1919
+
1920
+ // src/modules/XyOsUi/lib/XyOsUi.ts
1921
+ import { forget } from "@xylabs/forget";
1922
+ import { ModuleFactoryLocator as ModuleFactoryLocator2 } from "@xyo-network/module-factory-locator";
1923
+ import { dappsReadyConnection, XyOs } from "@xyo-network/os-runtime";
1924
+ var XyOsUi = class extends XyOs {
1925
+ dappRegistrationResults = { failed: [], succeeded: [] };
1926
+ dappsReadyConnection = dappsReadyConnection();
1927
+ constructor(params) {
1928
+ super(params);
1929
+ this.eventBus.addConnection(this.dappsReadyConnection);
1930
+ }
1931
+ static get monitoring() {
1932
+ return new XyOsBrowserMonitor();
1933
+ }
1934
+ static get xyOsUiGlobal() {
1935
+ return XyOs.xyOsGlobal;
1936
+ }
1937
+ static hideSplash() {
1938
+ this.xyOsUiGlobal.splashScreen.hideSplash();
1939
+ this.xyOsUiGlobal.splashScreen.onComplete();
1940
+ this.setSplashStatus("complete");
1941
+ }
1942
+ static setSplashStatus(status) {
1943
+ const statusText = this.xyOsUiGlobal.splashScreen._LOADING_MESSAGES[status];
1944
+ this.xyOsUiGlobal.splashScreen.setStatusText(statusText);
1945
+ }
1946
+ async boot(wallet, locator = new ModuleFactoryLocator2()) {
1947
+ await super.boot(wallet, locator);
1948
+ const registerLazy = async () => {
1949
+ this.dappRegistrationResults = await this.dappRegistrationService.start();
1950
+ await this.dappsReadyConnection.emit("dappsReady", {});
1951
+ };
1952
+ forget(registerLazy());
1953
+ return this;
1954
+ }
1955
+ };
1956
+
1957
+ // src/modules/Dapp/modules/access-interface/components/Dialog.tsx
1958
+ import { ArrowForward } from "@mui/icons-material";
1959
+ import {
1960
+ Alert,
1961
+ Button,
1962
+ Dialog as Dialog2,
1963
+ DialogActions as DialogActions2,
1964
+ DialogContent as DialogContent2,
1965
+ DialogTitle,
1966
+ Typography as Typography5
1967
+ } from "@mui/material";
1968
+ import { FlexCol as FlexCol5, FlexRow as FlexRow6 } from "@xylabs/react-flexbox";
1969
+ import { RegisteredNames } from "@xyo-network/os-model";
1970
+ import { AccessNodeQueries } from "@xyo-network/os-runtime";
1971
+ import { ErrorRender } from "@xyo-network/react-error";
1972
+ import { useState as useState9 } from "react";
1973
+ import { jsx as jsx15, jsxs as jsxs9 } from "react/jsx-runtime";
1974
+ var DappAccessDialog = ({
1975
+ accessRequest,
1976
+ children,
1977
+ dappNode,
1978
+ registeredDappAccess,
1979
+ ...props
1980
+ }) => {
1981
+ const [error, setError] = useState9();
1982
+ const [noPayloadsInserted, setNoPayloadsInserted] = useState9(false);
1983
+ const onClose = () => {
1984
+ setNoPayloadsInserted(false);
1985
+ props.onClose?.({}, "escapeKeyDown");
1986
+ };
1987
+ const handleAllow = async () => {
1988
+ if (accessRequest && registeredDappAccess && dappNode) {
1989
+ try {
1990
+ switch (registeredDappAccess.name) {
1991
+ case RegisteredNames: {
1992
+ const accessNodeQueries = new AccessNodeQueries(dappNode, accessRequest, registeredDappAccess);
1993
+ const payloads = await accessNodeQueries.run();
1994
+ if (payloads.length === 0) {
1995
+ setNoPayloadsInserted(true);
1996
+ } else {
1997
+ onClose();
1998
+ }
1999
+ return;
2000
+ }
2001
+ default: {
2002
+ const message = `no helper for interface ${registeredDappAccess.name} found`;
2003
+ console.error(message);
2004
+ setError(new Error(message));
2005
+ }
2006
+ }
2007
+ } catch (e) {
2008
+ console.error(e);
2009
+ setError(e);
2010
+ }
2011
+ } else {
2012
+ setError(new Error("No registered dapp access or dappNode found"));
2013
+ }
2014
+ };
2015
+ return /* @__PURE__ */ jsxs9(Dialog2, { ...props, children: [
2016
+ /* @__PURE__ */ jsx15(DialogTitle, { children: "Message from XYO OS" }),
2017
+ /* @__PURE__ */ jsxs9(
2018
+ DialogContent2,
2019
+ {
2020
+ dividers: true,
2021
+ sx: {
2022
+ display: "flex",
2023
+ flexDirection: "column",
2024
+ gap: 3
2025
+ },
2026
+ children: [
2027
+ /* @__PURE__ */ jsx15(ErrorRender, { error, scope: "DappAccessDialog" }),
2028
+ /* @__PURE__ */ jsxs9(FlexCol5, { gap: 1, children: [
2029
+ /* @__PURE__ */ jsx15(Typography5, { variant: "subtitle2", children: "dApp to dApp Access Request" }),
2030
+ /* @__PURE__ */ jsxs9(FlexRow6, { gap: 1, children: [
2031
+ /* @__PURE__ */ jsxs9(Typography5, { fontSize: 16, children: [
2032
+ /* @__PURE__ */ jsx15("strong", { children: accessRequest?.requestingDappId }),
2033
+ "\xA0"
2034
+ ] }),
2035
+ /* @__PURE__ */ jsx15(ArrowForward, {}),
2036
+ /* @__PURE__ */ jsx15(Typography5, { fontSize: 16, children: /* @__PURE__ */ jsx15("strong", { children: registeredDappAccess?.registeringDappId }) })
2037
+ ] })
2038
+ ] })
2039
+ ]
2040
+ }
2041
+ ),
2042
+ /* @__PURE__ */ jsxs9(
2043
+ DialogContent2,
2044
+ {
2045
+ dividers: true,
2046
+ sx: {
2047
+ display: "flex",
2048
+ flexDirection: "column",
2049
+ gap: 3
2050
+ },
2051
+ children: [
2052
+ /* @__PURE__ */ jsx15(FlexCol5, { gap: 1, children: /* @__PURE__ */ jsxs9(Typography5, { children: [
2053
+ /* @__PURE__ */ jsx15("strong", { children: accessRequest?.requestingDappId }),
2054
+ " ",
2055
+ "dApp would like to access your",
2056
+ /* @__PURE__ */ jsx15("strong", { children: registeredDappAccess?.name }),
2057
+ " ",
2058
+ "from",
2059
+ " ",
2060
+ /* @__PURE__ */ jsx15("strong", { children: registeredDappAccess?.registeringDappId }),
2061
+ " ",
2062
+ "dApp"
2063
+ ] }) }),
2064
+ noPayloadsInserted ? /* @__PURE__ */ jsxs9(Alert, { severity: "warning", children: [
2065
+ registeredDappAccess?.name,
2066
+ " ",
2067
+ "Access Request did not find payloads to insert"
2068
+ ] }) : null
2069
+ ]
2070
+ }
2071
+ ),
2072
+ children ? /* @__PURE__ */ jsx15(DialogContent2, { dividers: true, children }) : null,
2073
+ /* @__PURE__ */ jsxs9(DialogActions2, { children: [
2074
+ /* @__PURE__ */ jsx15(Button, { variant: "outlined", onClick: onClose, children: "Cancel" }),
2075
+ /* @__PURE__ */ jsx15(Button, { variant: "contained", onClick: () => {
2076
+ handleAllow().catch(console.error);
2077
+ }, children: "Allow" })
2078
+ ] })
2079
+ ] });
2080
+ };
2081
+
2082
+ // src/modules/Dapp/modules/access-interface/components/Flexbox.tsx
2083
+ import { ErrorRender as ErrorRender2 } from "@xyo-network/react-error";
2084
+
2085
+ // src/modules/Dapp/modules/access-interface/hooks/useDialogState.tsx
2086
+ import { usePromise as usePromise10 } from "@xylabs/react-promise";
2087
+ import { isRegisteredDappAccess, RegisteredNames as RegisteredNames2 } from "@xyo-network/os-model";
2088
+ import { useState as useState10 } from "react";
2089
+ var useDialogState = (context) => {
2090
+ const dappCaller = useDappCaller();
2091
+ const { accessRequests } = DappAccessRequestResourceHooks.useResourceViewsFromContext(context);
2092
+ const [openAccessDialog, setOpenAccessDialog] = useState10(false);
2093
+ const [registeredInterface, setRegisteredInterface] = useState10();
2094
+ const [, allowAccessDialogError] = usePromise10(async () => {
2095
+ const accessRequest = accessRequests?.[0];
2096
+ if (accessRequest && context && dappCaller) {
2097
+ setOpenAccessDialog(true);
2098
+ const payload = await dappCaller.getRegisteredDappAccessByName(RegisteredNames2);
2099
+ setRegisteredInterface(isRegisteredDappAccess(payload) ? payload : void 0);
2100
+ }
2101
+ }, [accessRequests, dappCaller, context]);
2102
+ return {
2103
+ accessRequests,
2104
+ allowAccessDialogError,
2105
+ openAccessDialog,
2106
+ registeredInterface,
2107
+ setOpenAccessDialog
2108
+ };
2109
+ };
2110
+
2111
+ // src/modules/Dapp/modules/access-interface/components/Flexbox.tsx
2112
+ import { jsx as jsx16 } from "react/jsx-runtime";
2113
+ var DappAccessFlexbox = ({ context }) => {
2114
+ const {
2115
+ accessRequests,
2116
+ allowAccessDialogError,
2117
+ openAccessDialog,
2118
+ registeredInterface,
2119
+ setOpenAccessDialog
2120
+ } = useDialogState(context);
2121
+ return /* @__PURE__ */ jsx16(
2122
+ DappAccessDialog,
2123
+ {
2124
+ accessRequest: accessRequests?.[0],
2125
+ dappNode: context,
2126
+ open: openAccessDialog,
2127
+ onClose: () => setOpenAccessDialog(false),
2128
+ registeredDappAccess: registeredInterface,
2129
+ children: allowAccessDialogError ? /* @__PURE__ */ jsx16(ErrorRender2, { error: allowAccessDialogError, scope: "DappAccessFlexbox" }) : null
2130
+ }
2131
+ );
2132
+ };
2133
+
2134
+ // src/modules/Dapp/modules/Window/hooks/menu/useDappMenu.tsx
2135
+ import {
2136
+ useEffect as useEffect12,
2137
+ useRef as useRef4,
2138
+ useState as useState11
2139
+ } from "react";
2140
+ import { useNavigate as useNavigate4, useParams as useParams2 } from "react-router-dom";
2141
+
2142
+ // src/modules/Dapp/modules/Window/hooks/lib/DappPathHelpers.ts
2143
+ import { NameTransforms as NameTransforms2 } from "@xyo-network/os-runtime";
2144
+ var DappPathHelpers = {
2145
+ // update the url based off the path
2146
+ deriveDestinationPath(path, defaultPath, dappName) {
2147
+ const rootPath = `/${new NameTransforms2(dappName ?? "").slug()}`;
2148
+ const nestedPath = `${rootPath}/${path}`;
2149
+ return path === defaultPath ? rootPath : nestedPath;
2150
+ },
2151
+ // derive the path for the nav selection
2152
+ derivePathForNavSelection(newPath, currentPath, defaultPath) {
2153
+ let derivedPath;
2154
+ if (newPath === void 0 && defaultPath) {
2155
+ derivedPath = defaultPath;
2156
+ }
2157
+ if (newPath && currentPath !== newPath) {
2158
+ derivedPath = newPath;
2159
+ }
2160
+ return derivedPath;
2161
+ },
2162
+ // detect duplicate nav selections
2163
+ detectDuplicateSelections(lastSavedPath, path, defaultPath) {
2164
+ const selectedDefaultPathAgain = path === defaultPath && lastSavedPath === "";
2165
+ const pathIsUnchanged = lastSavedPath === path;
2166
+ return selectedDefaultPathAgain || pathIsUnchanged;
2167
+ }
2168
+ };
2169
+
2170
+ // src/modules/Dapp/modules/Window/hooks/useDappMenuResourceValues.tsx
2171
+ import { useMemo as useMemo10 } from "react";
2172
+ var useDappMenuDependencies = (context) => {
2173
+ const {
2174
+ menuConfigs,
2175
+ menuItemSelections,
2176
+ menuItemsVisible,
2177
+ resourceError
2178
+ } = DappMenuResourceHooks.useResourceViewsFromContext(context);
2179
+ const defaultPath = useMemo10(() => menuConfigs?.[0]?.defaultPath, [menuConfigs]);
2180
+ const menuSelection = menuItemSelections?.[0]?.path;
2181
+ return {
2182
+ defaultPath,
2183
+ menuConfigs,
2184
+ menuItemsVisible,
2185
+ menuSelection,
2186
+ resourceError
2187
+ };
2188
+ };
2189
+
2190
+ // src/modules/Dapp/modules/Window/hooks/menu/useDappMenu.tsx
2191
+ var useDappMenu = (context, dappName) => {
2192
+ const [error, setError] = useState11();
2193
+ const params = useParams2();
2194
+ const navigate = useNavigate4();
2195
+ const {
2196
+ defaultPath,
2197
+ menuConfigs,
2198
+ menuItemsVisible,
2199
+ menuSelection,
2200
+ resourceError
2201
+ } = useDappMenuDependencies(context);
2202
+ const activePath = menuSelection ?? defaultPath;
2203
+ const currentPathRef = useRef4();
2204
+ useEffect12(() => {
2205
+ if (params && currentPathRef.current === void 0) {
2206
+ currentPathRef.current = params.path ?? "";
2207
+ }
2208
+ }, []);
2209
+ useEffect12(() => {
2210
+ if (context === null) {
2211
+ currentPathRef.current = void 0;
2212
+ }
2213
+ }, [context]);
2214
+ useEffect12(() => {
2215
+ if (menuSelection) {
2216
+ currentPathRef.current = menuSelection;
2217
+ }
2218
+ }, [menuSelection]);
2219
+ useEffect12(() => {
2220
+ if (resourceError) setError(resourceError);
2221
+ }, [resourceError]);
2222
+ const onPathChange = (path) => {
2223
+ const pathIsInUnchanged = DappPathHelpers.detectDuplicateSelections(currentPathRef.current, path, defaultPath);
2224
+ if (pathIsInUnchanged) return;
2225
+ const destinationPath = DappPathHelpers.deriveDestinationPath(path, defaultPath, dappName);
2226
+ navigate(destinationPath);
2227
+ currentPathRef.current = path;
2228
+ };
2229
+ return {
2230
+ activePath,
2231
+ error,
2232
+ menuConfig: menuConfigs?.[0],
2233
+ menuItemsVisible,
2234
+ onPathChange
2235
+ };
2236
+ };
2237
+
2238
+ // src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappInjectableParamsFromRoute.tsx
2239
+ import { assertEx as assertEx7 } from "@xylabs/assert";
2240
+ import { usePromise as usePromise11 } from "@xylabs/react-promise";
2241
+ import { asArchivistInstance } from "@xyo-network/archivist-model";
2242
+ import { isDappInjectableParams } from "@xyo-network/os-model";
2243
+ import { DappCaller as DappCaller2 } from "@xyo-network/os-runtime";
2244
+ import {
2245
+ useNavigate as useNavigate5,
2246
+ useParams as useParams3,
2247
+ useSearchParams as useSearchParams2
2248
+ } from "react-router-dom";
2249
+ var useManageDappInjectableParamsFromRoute = (context) => {
2250
+ const [queryParams] = useSearchParams2();
2251
+ const params = useParams3();
2252
+ const navigate = useNavigate5();
2253
+ const [, callerError] = usePromise11(async () => {
2254
+ if (context && (params || queryParams)) {
2255
+ const dappCaller = new DappCaller2(context);
2256
+ const pathname = window.location.pathname;
2257
+ await dappCaller.setDappInjectableRouteParams(queryParams, pathname);
2258
+ }
2259
+ }, [context, queryParams, params]);
2260
+ const [, listenerError] = usePromise11(async () => {
2261
+ let archivist;
2262
+ const listener = ({ payloads }) => {
2263
+ const injectableParams = payloads.find(isDappInjectableParams);
2264
+ if (injectableParams && context) {
2265
+ const pathname = window.location.pathname;
2266
+ if (pathname !== injectableParams.path) {
2267
+ navigate(injectableParams.path);
2268
+ }
2269
+ }
2270
+ };
2271
+ try {
2272
+ if (context) {
2273
+ const mod = assertEx7(await context?.root.resolve("DappArchivist"), () => "DappArchivist not found");
2274
+ archivist = asArchivistInstance(mod, () => "DappArchivist not is not an Archivist");
2275
+ archivist.on("inserted", listener);
2276
+ }
2277
+ } catch (e) {
2278
+ console.error(e);
2279
+ throw e;
2280
+ }
2281
+ return () => {
2282
+ archivist?.off("inserted", listener);
2283
+ };
2284
+ }, [context]);
2285
+ return [callerError, listenerError];
2286
+ };
2287
+
2288
+ // src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappIntentRequest.tsx
2289
+ import { useAtomicPromise, usePromise as usePromise12 } from "@xylabs/react-promise";
2290
+ import { DappIntentTypes as DappIntentTypes7, isDappIntent } from "@xyo-network/os-model";
2291
+ import { DappIntentCaller as DappIntentCaller4 } from "@xyo-network/os-runtime";
2292
+ import { useEffect as useEffect13, useState as useState12 } from "react";
2293
+ var useManageDappIntentRequest = (context, dappId) => {
2294
+ const dappCaller = useDappCaller(context);
2295
+ const sendIntent = useSendDappIntent();
2296
+ const [intentPayload, setIntentPayload] = useState12();
2297
+ const [handleIntentError, setHandleIntentError] = useState12();
2298
+ const [dappArchivist, setDappArchivist] = useState12();
2299
+ usePromise12(async () => {
2300
+ if (context && dappCaller) {
2301
+ const archivist = await dappCaller.getDappArchivist();
2302
+ if (archivist) setDappArchivist(archivist);
2303
+ }
2304
+ }, [context, dappCaller]);
2305
+ useAtomicPromise(
2306
+ "manageDappIntent",
2307
+ async () => {
2308
+ if (context && intentPayload?.targetDappId && dappId && sendIntent) {
2309
+ try {
2310
+ const minimizeIntent = DappIntentCaller4.buildIntent(DappIntentCaller4.OsDappName, DappIntentTypes7.Minimize, dappId);
2311
+ await sendIntent(minimizeIntent);
2312
+ await sendIntent(intentPayload);
2313
+ } catch (e) {
2314
+ console.error(e);
2315
+ setHandleIntentError(e);
2316
+ }
2317
+ setIntentPayload(void 0);
2318
+ }
2319
+ },
2320
+ [context, dappId, intentPayload, sendIntent]
2321
+ );
2322
+ useEffect13(() => {
2323
+ const listener = ({ payloads }) => {
2324
+ if (context) {
2325
+ const intentPayload2 = payloads.find(isDappIntent);
2326
+ if (intentPayload2) {
2327
+ setIntentPayload(intentPayload2);
2328
+ }
2329
+ }
2330
+ };
2331
+ dappArchivist?.off("inserted", listener);
2332
+ if (dappArchivist && context) {
2333
+ dappArchivist.on("inserted", listener);
2334
+ }
2335
+ return () => {
2336
+ dappArchivist?.off("inserted", listener);
2337
+ };
2338
+ }, [context, dappArchivist]);
2339
+ return handleIntentError;
2340
+ };
2341
+
2342
+ // src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappPathFromRoute.tsx
2343
+ import { usePromise as usePromise13 } from "@xylabs/react-promise";
2344
+ import {
2345
+ useCallback as useCallback5,
2346
+ useEffect as useEffect14,
2347
+ useRef as useRef5
2348
+ } from "react";
2349
+ import { useNavigate as useNavigate6, useParams as useParams4 } from "react-router-dom";
2350
+ var useManageDappPathFromRoute = (context, dappName) => {
2351
+ const params = useParams4();
2352
+ const { path: pathParam } = params;
2353
+ const dappMenuCaller = useDappMenuCaller(context, { ignoreProvidedNode: true });
2354
+ const { menuSelection, defaultPath } = useDappMenuDependencies(context);
2355
+ const navigate = useNavigate6();
2356
+ const currentPathRef = useRef5();
2357
+ const updateMenuArchivist = useCallback5(
2358
+ async (pathParam2) => {
2359
+ currentPathRef.current = pathParam2;
2360
+ if (context && dappMenuCaller) {
2361
+ const currentPath = await dappMenuCaller?.currentNavSelection();
2362
+ const updatedPath = DappPathHelpers.derivePathForNavSelection(pathParam2, currentPath?.[0]?.path, defaultPath);
2363
+ if (updatedPath) {
2364
+ await dappMenuCaller.makeNavItemSelection(updatedPath);
2365
+ }
2366
+ }
2367
+ },
2368
+ [dappMenuCaller, context, defaultPath]
2369
+ );
2370
+ useEffect14(() => {
2371
+ if (context && menuSelection) {
2372
+ const pathIsInUnchanged = DappPathHelpers.detectDuplicateSelections(currentPathRef.current ?? "", menuSelection, defaultPath);
2373
+ if (pathIsInUnchanged) return;
2374
+ const destinationPath = DappPathHelpers.deriveDestinationPath(menuSelection, defaultPath, dappName);
2375
+ navigate(destinationPath);
2376
+ currentPathRef.current = menuSelection === defaultPath ? void 0 : menuSelection;
2377
+ }
2378
+ }, [dappName, context, defaultPath, menuSelection]);
2379
+ usePromise13(async () => {
2380
+ if (context && pathParam !== currentPathRef.current) {
2381
+ await updateMenuArchivist(pathParam);
2382
+ currentPathRef.current = pathParam;
2383
+ }
2384
+ }, [context, pathParam, updateMenuArchivist]);
2385
+ };
2386
+
2387
+ // src/modules/Dapp/modules/Window/hooks/route/helpers/useManageDappStateFromRoute.tsx
2388
+ import { usePromise as usePromise14 } from "@xylabs/react-promise";
2389
+ import { DappIntentTypes as DappIntentTypes8 } from "@xyo-network/os-model";
2390
+ import { DappIntentCaller as DappIntentCaller5, NameTransforms as NameTransforms3 } from "@xyo-network/os-runtime";
2391
+ import { useNavigationType, useParams as useParams5 } from "react-router-dom";
2392
+ var useManageDappStateFromRoute = (intentPayload, dappName) => {
2393
+ const params = useParams5();
2394
+ const { dappName: dappNameParam } = params;
2395
+ const sendIntent = useSendDappIntent();
2396
+ const navigationType = useNavigationType();
2397
+ const intentCaller = useDappIntentCaller();
2398
+ usePromise14(async () => {
2399
+ const launched = intentPayload?.intent === DappIntentTypes8.Launch;
2400
+ if (launched && dappNameParam === void 0 && sendIntent && navigationType === "POP") {
2401
+ const closeIntent = DappIntentCaller5.buildIntent(DappIntentCaller5.OsDappName, DappIntentTypes8.Close, dappName);
2402
+ await sendIntent(closeIntent);
2403
+ }
2404
+ }, [dappName, dappNameParam, intentPayload, navigationType, sendIntent]);
2405
+ usePromise14(async () => {
2406
+ if (dappNameParam && dappName && sendIntent && intentCaller) {
2407
+ const dappNameParamDeSlugged = new NameTransforms3(dappNameParam).deSlug();
2408
+ const notLaunched = intentPayload?.intent !== DappIntentTypes8.Launch;
2409
+ const paramMatchesDappName = dappNameParamDeSlugged === dappName;
2410
+ if (notLaunched && paramMatchesDappName) {
2411
+ const latestIntent = await intentCaller.latestIntent();
2412
+ const existing = latestIntent && latestIntent.targetDappId === dappNameParamDeSlugged;
2413
+ if (!existing) {
2414
+ const launchIntent = DappIntentCaller5.buildIntent(DappIntentCaller5.OsDappName, DappIntentTypes8.Launch, dappNameParamDeSlugged);
2415
+ await sendIntent(launchIntent);
2416
+ return;
2417
+ }
2418
+ }
2419
+ }
2420
+ }, [dappNameParam, dappName, sendIntent, intentCaller, intentPayload?.intent]);
2421
+ };
2422
+
2423
+ // src/modules/Dapp/modules/Window/hooks/route/useManageDappBasedOffRoute.tsx
2424
+ var useManageDappBasedOffRoute = (intentPayload, dappName, context) => {
2425
+ const handleIntentError = useManageDappIntentRequest(context, dappName);
2426
+ useManageDappStateFromRoute(intentPayload, dappName);
2427
+ useManageDappPathFromRoute(context, dappName);
2428
+ const injectableErrors = useManageDappInjectableParamsFromRoute(context);
2429
+ return [...injectableErrors, handleIntentError];
2430
+ };
2431
+
2432
+ // src/modules/Dapp/modules/Window/hooks/useDappState.tsx
2433
+ import { DappIntentTypes as DappIntentTypes9 } from "@xyo-network/os-model";
2434
+ var useDappState = (intentType, context) => {
2435
+ const minimized = intentType === DappIntentTypes9.Minimize;
2436
+ const open = intentType === DappIntentTypes9.Launch;
2437
+ const active = context && open;
2438
+ return {
2439
+ active,
2440
+ minimized,
2441
+ open
2442
+ };
2443
+ };
2444
+
2445
+ // src/modules/Dapp/modules/Window/NodeManifest.tsx
2446
+ import { usePromise as usePromise15 } from "@xylabs/react-promise";
2447
+ import { useProvidedNode } from "@xyo-network/react-node";
2448
+ import { Fragment, jsx as jsx17 } from "react/jsx-runtime";
2449
+ var NodeManifest = () => {
2450
+ const [node] = useProvidedNode();
2451
+ const [nodeManifest] = usePromise15(async () => await node?.manifest(3), [node]);
2452
+ return /* @__PURE__ */ jsx17(Fragment, { children: node ? /* @__PURE__ */ jsx17("pre", { children: JSON.stringify(nodeManifest, null, 2) }) : null });
2453
+ };
2454
+
2455
+ // src/modules/Dapp/modules/Window/hooks/useDecomposeDappSet.tsx
2456
+ var useDecomposeDappSet = (dappSet) => {
2457
+ const { dapp } = dappSet ?? {};
2458
+ const DappComponent = dapp?.params.modes?.window?.component ?? NodeManifest;
2459
+ const name = dapp?.config.name;
2460
+ const version = dapp?.config.version;
2461
+ const scrollable = dapp?.params.modes?.window?.scrollable ?? true;
2462
+ return {
2463
+ DappComponent,
2464
+ dapp,
2465
+ name,
2466
+ scrollable,
2467
+ version
2468
+ };
2469
+ };
2470
+
2471
+ // src/modules/Dapp/modules/Window/hooks/useSkipLoadingScreen.tsx
2472
+ import { useMemo as useMemo11 } from "react";
2473
+ import { useSearchParams as useSearchParams3 } from "react-router-dom";
2474
+ var PARAMS_TO_TARGET = ["username", "utm_source"];
2475
+ var useSkipLoadingScreen = () => {
2476
+ const [params] = useSearchParams3();
2477
+ const customer = useDetectCustomer();
2478
+ return useMemo11(() => {
2479
+ const hasTargetParams = PARAMS_TO_TARGET.some((param) => params.has(param));
2480
+ const isCustomer = !!customer;
2481
+ return hasTargetParams || isCustomer;
2482
+ }, [customer, params]);
2483
+ };
2484
+
2485
+ // src/modules/Dapp/modules/Window/hooks/useSyncOsRegisteredAccessInterfaces.tsx
2486
+ import { usePromise as usePromise16 } from "@xylabs/react-promise";
2487
+ import { useWeakArchivistFromNode as useWeakArchivistFromNode5 } from "@xyo-network/react-archivist";
2488
+ var useSyncOsRegisteredAccessInterfaces = (context) => {
2489
+ const [registeredInterfacesArchivist] = useWeakArchivistFromNode5("RegisteredDappInterfacesArchivist");
2490
+ const dappCaller = useDappCaller(context);
2491
+ usePromise16(async () => {
2492
+ const listener = async ({ payloads }) => {
2493
+ if (context && dappCaller) {
2494
+ await dappCaller.addPayloadsToDappArchivist(payloads);
2495
+ }
2496
+ };
2497
+ if (context && dappCaller) {
2498
+ const registeredInterfaces = await registeredInterfacesArchivist?.deref()?.all();
2499
+ if (registeredInterfaces) {
2500
+ await dappCaller.addPayloadsToDappArchivist(registeredInterfaces);
2501
+ }
2502
+ registeredInterfacesArchivist?.deref()?.on("inserted", listener);
2503
+ }
2504
+ return () => {
2505
+ registeredInterfacesArchivist?.deref()?.off("inserted", listener);
2506
+ };
2507
+ }, [dappCaller, context, registeredInterfacesArchivist]);
2508
+ };
2509
+
2510
+ // src/modules/Dapp/modules/Window/LoadingFlexbox.tsx
2511
+ import {
2512
+ Fade,
2513
+ styled as styled2,
2514
+ Typography as Typography6
2515
+ } from "@mui/material";
2516
+ import { FlexCol as FlexCol7 } from "@xylabs/react-flexbox";
2517
+ import { useEffect as useEffect15, useState as useState14 } from "react";
2518
+
2519
+ // src/modules/LoadingOsLogo/LoadingOsLogo.tsx
2520
+ import { FlexCol as FlexCol6 } from "@xylabs/react-flexbox";
2521
+ import { useState as useState13 } from "react";
2522
+
2523
+ // src/modules/LoadingOsLogo/img/index.ts
2524
+ import { default as default20 } from "./xyoOS-Icon-2Q4XCUPP.svg";
2525
+
2526
+ // src/modules/LoadingOsLogo/LoadingOsLogo.tsx
2527
+ import { jsx as jsx18 } from "react/jsx-runtime";
2528
+ var LoadingOsLogo = ({
2529
+ widthInPixels,
2530
+ busy,
2531
+ spinsPerSecond = 0.5,
2532
+ ...props
2533
+ }) => {
2534
+ const [imageLoaded, setImageLoaded] = useState13(false);
2535
+ if (!imageLoaded) {
2536
+ const img = new Image();
2537
+ img.addEventListener("load", () => setImageLoaded(true));
2538
+ img.src = default20;
2539
+ }
2540
+ return imageLoaded ? /* @__PURE__ */ jsx18(
2541
+ FlexCol6,
2542
+ {
2543
+ sx: {
2544
+ "@keyframes fadeOut": {
2545
+ "0%": { opacity: 1 },
2546
+ "100%": { opacity: 0.1 },
2547
+ "35%": { opacity: 1 }
2548
+ },
2549
+ "animation": busy ? "fadeOut linear" : void 0,
2550
+ "animationDuration": "1500ms",
2551
+ "animationFillMode": "both"
2552
+ },
2553
+ ...props,
2554
+ children: /* @__PURE__ */ jsx18(
2555
+ FlexCol6,
2556
+ {
2557
+ sx: {
2558
+ "@keyframes spin": {
2559
+ "0%": { transform: "rotate(360deg)" },
2560
+ "100%": { transform: "rotate(0deg)" }
2561
+ },
2562
+ "animation": busy ? `spin ${1 / spinsPerSecond}s linear infinite` : void 0,
2563
+ "animationDirection": "reverse"
2564
+ },
2565
+ ...props,
2566
+ children: /* @__PURE__ */ jsx18("img", { src: default20, height: widthInPixels ?? 22 })
2567
+ }
2568
+ )
2569
+ }
2570
+ ) : null;
2571
+ };
2572
+
2573
+ // src/modules/Dapp/modules/Window/Trail.tsx
2574
+ import { a, useTrail } from "@react-spring/web";
2575
+ import React8 from "react";
2576
+ import { jsx as jsx19 } from "react/jsx-runtime";
2577
+ var TextTrail = ({ open, children }) => {
2578
+ const items = React8.Children.toArray(children);
2579
+ const trail = useTrail(items.length, {
2580
+ config: {
2581
+ friction: 200,
2582
+ mass: 5,
2583
+ tension: 2e3
2584
+ },
2585
+ from: {
2586
+ height: "auto",
2587
+ opacity: 0,
2588
+ y: 20
2589
+ },
2590
+ height: "auto",
2591
+ opacity: open ? 1 : 0,
2592
+ y: open ? 0 : 60
2593
+ });
2594
+ return /* @__PURE__ */ jsx19("div", { children: trail.map(({ height, ...style }, index) => /* @__PURE__ */ jsx19(a.div, { style, children: /* @__PURE__ */ jsx19(a.div, { style: { height }, children: items[index] }) }, index)) });
2595
+ };
2596
+
2597
+ // src/modules/Dapp/modules/Window/LoadingFlexbox.tsx
2598
+ import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
2599
+ var DappLoadingFlexbox = ({
2600
+ minimize,
2601
+ open,
2602
+ name,
2603
+ ...props
2604
+ }) => {
2605
+ const [fadeIn, setFadeIn] = useState14(!open);
2606
+ const [trail, setTrail] = useState14(false);
2607
+ const skipLoadingScreen = useSkipLoadingScreen();
2608
+ useEffect15(() => {
2609
+ if (open) {
2610
+ if (skipLoadingScreen) {
2611
+ setFadeIn(false);
2612
+ return;
2613
+ }
2614
+ const fadeInTimeout = setTimeout(() => {
2615
+ setFadeIn(false);
2616
+ }, 2e3);
2617
+ let trailTimeout = setTimeout(() => {
2618
+ setTrail(true);
2619
+ trailTimeout = setTimeout(() => {
2620
+ setTrail(false);
2621
+ }, 4e3);
2622
+ }, 300);
2623
+ return () => {
2624
+ clearTimeout(fadeInTimeout);
2625
+ clearTimeout(trailTimeout);
2626
+ };
2627
+ }
2628
+ if (!minimize) {
2629
+ setFadeIn(true);
2630
+ }
2631
+ }, [minimize, open, skipLoadingScreen]);
2632
+ return /* @__PURE__ */ jsx20(Fade, { in: fadeIn, unmountOnExit: true, children: /* @__PURE__ */ jsxs10(StyledSplashContainer, { ...props, children: [
2633
+ /* @__PURE__ */ jsx20(LoadingOsLogo, { widthInPixels: 100, busy: true, position: "absolute" }),
2634
+ /* @__PURE__ */ jsxs10(TextTrail, { open: trail, flexDirection: "row", children: [
2635
+ /* @__PURE__ */ jsx20(
2636
+ Typography6,
2637
+ {
2638
+ textAlign: "center",
2639
+ sx: { fontSize: { md: "3em", xs: "2em" } },
2640
+ children: "Loading"
2641
+ }
2642
+ ),
2643
+ /* @__PURE__ */ jsx20(
2644
+ Typography6,
2645
+ {
2646
+ textAlign: "center",
2647
+ sx: { fontSize: { md: "3em", xs: "2em" } },
2648
+ children: name
2649
+ }
2650
+ ),
2651
+ /* @__PURE__ */ jsx20(
2652
+ Typography6,
2653
+ {
2654
+ textAlign: "center",
2655
+ sx: { fontSize: { md: "3em", xs: "2em" } },
2656
+ children: "dApp"
2657
+ }
2658
+ )
2659
+ ] })
2660
+ ] }) });
2661
+ };
2662
+ var StyledSplashContainer = styled2(FlexCol7, { name: "StyledSplashContainer" })(({ theme }) => {
2663
+ return {
2664
+ background: theme.palette.background.default,
2665
+ color: theme.palette.text.primary,
2666
+ gap: theme.spacing(1),
2667
+ height: "100%",
2668
+ left: 0,
2669
+ position: "absolute",
2670
+ top: 0,
2671
+ width: "100%",
2672
+ zIndex: 999
2673
+ };
2674
+ });
2675
+
2676
+ // src/modules/Dapp/modules/Window/menu/BottomNavigation.tsx
2677
+ import {
2678
+ BottomNavigation,
2679
+ BottomNavigationAction,
2680
+ Paper,
2681
+ styled as styled3
2682
+ } from "@mui/material";
2683
+ import { useColorSchemeEx } from "@xylabs/react-invertible-theme";
2684
+ import { useEffect as useEffect16, useState as useState15 } from "react";
2685
+ import { jsx as jsx21 } from "react/jsx-runtime";
2686
+ var DappBottomNavigation = ({
2687
+ activePath,
2688
+ menuConfig,
2689
+ menuItems,
2690
+ onPathChange,
2691
+ ...props
2692
+ }) => {
2693
+ const [activeIndex, setActiveIndex] = useState15(0);
2694
+ useEffect16(() => {
2695
+ if (menuConfig?.defaultPath && menuItems && activePath) {
2696
+ setActiveIndex(menuItems.findIndex((item) => activePath === item.path));
2697
+ }
2698
+ }, [activePath, menuConfig, menuItems]);
2699
+ return /* @__PURE__ */ jsx21(Paper, { elevation: 3, children: /* @__PURE__ */ jsx21(
2700
+ BottomNavigation,
2701
+ {
2702
+ value: activeIndex,
2703
+ onChange: (_, value) => {
2704
+ setActiveIndex(value);
2705
+ const to2 = menuItems?.[value].path;
2706
+ if (to2) onPathChange?.(to2);
2707
+ },
2708
+ showLabels: true,
2709
+ ...props,
2710
+ children: menuItems?.map(({ svgIcon: icon, primaryText }, index) => {
2711
+ return /* @__PURE__ */ jsx21(
2712
+ StyledBottomNavigationAction,
2713
+ {
2714
+ className: "bottom-nav-action",
2715
+ label: primaryText,
2716
+ icon: /* @__PURE__ */ jsx21(
2717
+ "span",
2718
+ {
2719
+ ref: (ref) => {
2720
+ if (ref) {
2721
+ ref.innerHTML = icon ?? "";
2722
+ }
2723
+ }
2724
+ }
2725
+ )
2726
+ },
2727
+ index
2728
+ );
2729
+ })
2730
+ }
2731
+ ) });
2732
+ };
2733
+ var StyledBottomNavigationAction = styled3(BottomNavigationAction, { name: "StyledBottomNavigationAction" })(({ theme }) => {
2734
+ const { darkMode } = useColorSchemeEx();
2735
+ return { "&.Mui-selected": { color: darkMode ? theme.palette.primary.main : theme.palette.secondary.main } };
2736
+ });
2737
+
2738
+ // src/modules/Dapp/modules/Window/menu/Drawer.tsx
2739
+ import { BugReport as BugReport2 } from "@mui/icons-material";
2740
+ import {
2741
+ Divider as Divider3,
2742
+ Drawer,
2743
+ IconButton as IconButton3,
2744
+ List,
2745
+ ListItem,
2746
+ ListItemButton,
2747
+ ListItemIcon,
2748
+ ListItemText,
2749
+ Stack,
2750
+ styled as styled4,
2751
+ Toolbar as Toolbar2,
2752
+ Tooltip as Tooltip3,
2753
+ Typography as Typography7,
2754
+ useTheme as useTheme6
2755
+ } from "@mui/material";
2756
+ import { RotationAnimation } from "@xylabs/react-animation";
2757
+ import {
2758
+ FlexCol as FlexCol8,
2759
+ FlexGrowRow as FlexGrowRow5,
2760
+ FlexRow as FlexRow7
2761
+ } from "@xylabs/react-flexbox";
2762
+ import { DarkModeIconButtonForColorScheme as DarkModeIconButtonForColorScheme2, useColorSchemeEx as useColorSchemeEx2 } from "@xylabs/react-invertible-theme";
2763
+ import { LinkEx as LinkEx2 } from "@xylabs/react-link";
2764
+ import { XyOsMonitor as XyOsMonitor3 } from "@xyo-network/os-runtime";
2765
+ import { useEffect as useEffect17, useState as useState16 } from "react";
2766
+ import XyoOSLogoBlack from "./xyoOS-Icon-Black-ACSS4SEQ.svg";
2767
+ import XyoOSLogoWhite from "./xyoOS-Icon-White-47MP66MD.svg";
2768
+
2769
+ // src/modules/Dapp/modules/Window/menu/SocialData.tsx
2770
+ import {
2771
+ Facebook,
2772
+ Instagram,
2773
+ LinkedIn,
2774
+ Reddit,
2775
+ StorefrontRounded,
2776
+ Telegram,
2777
+ X,
2778
+ YouTube
2779
+ } from "@mui/icons-material";
2780
+ import {
2781
+ FaDiscord
2782
+ } from "react-icons/fa";
2783
+ import { jsx as jsx22 } from "react/jsx-runtime";
2784
+ var socialLinksData = [
2785
+ {
2786
+ icon: /* @__PURE__ */ jsx22(Facebook, { style: { fontSize: "24px" } }),
2787
+ link: "https://www.facebook.com/OfficialXYO"
2788
+ },
2789
+ {
2790
+ icon: /* @__PURE__ */ jsx22(X, { style: { fontSize: "24px" } }),
2791
+ link: "https://twitter.com/OfficialXYO"
2792
+ },
2793
+ {
2794
+ icon: /* @__PURE__ */ jsx22(Instagram, { style: { fontSize: "24px" } }),
2795
+ link: "https://www.instagram.com/officialxyo/"
2796
+ },
2797
+ {
2798
+ icon: /* @__PURE__ */ jsx22(Telegram, { style: { fontSize: "24px" } }),
2799
+ link: "https://t.me/xyonetwork"
2800
+ },
2801
+ {
2802
+ icon: /* @__PURE__ */ jsx22(Reddit, { style: { fontSize: "24px" } }),
2803
+ link: "https://www.reddit.com/r/XYONetwork/"
2804
+ },
2805
+ {
2806
+ icon: /* @__PURE__ */ jsx22(YouTube, { style: { fontSize: "24px" } }),
2807
+ link: "https://www.youtube.com/channel/UCyZDqb9pgntVHJVt1pxXtsw"
2808
+ },
2809
+ {
2810
+ icon: /* @__PURE__ */ jsx22(LinkedIn, { style: { fontSize: "24px" } }),
2811
+ link: "https://www.linkedin.com/company/officialxyo/"
2812
+ },
2813
+ {
2814
+ icon: /* @__PURE__ */ jsx22(FaDiscord, { style: { fontSize: "24px" } }),
2815
+ link: "https://discord.gg/officialxyo"
2816
+ },
2817
+ {
2818
+ icon: /* @__PURE__ */ jsx22(StorefrontRounded, { style: { fontSize: "24px" } }),
2819
+ link: "https://shop.xyo.network"
2820
+ }
2821
+ ];
2822
+
2823
+ // src/modules/Dapp/modules/Window/menu/Drawer.tsx
2824
+ import { jsx as jsx23, jsxs as jsxs11 } from "react/jsx-runtime";
2825
+ var DappMenuDrawer = ({
2826
+ activePath,
2827
+ context,
2828
+ iconSvg,
2829
+ name,
2830
+ menuConfig,
2831
+ menuItems,
2832
+ onPathChange,
2833
+ version,
2834
+ ...props
2835
+ }) => {
2836
+ const [path, setPath] = useState16("");
2837
+ const { darkMode } = useColorSchemeEx2();
2838
+ const theme = useTheme6();
2839
+ const activeColor = darkMode ? theme.palette.primary.main : theme.palette.secondary.main;
2840
+ const logo = darkMode ? XyoOSLogoWhite : XyoOSLogoBlack;
2841
+ useEffect17(() => {
2842
+ if (menuConfig?.defaultPath && menuItems && activePath) {
2843
+ const newPath = menuItems.find((item) => activePath === item.path)?.path ?? "";
2844
+ setPath(newPath);
2845
+ }
2846
+ }, [activePath, menuConfig, menuItems]);
2847
+ const handleChange = (to2) => {
2848
+ XyOsMonitor3.trackEvent("Visit dApp Page", { Page: to2 });
2849
+ setPath(to2);
2850
+ onPathChange?.(to2);
2851
+ };
2852
+ const {
2853
+ closeDebug,
2854
+ debugOpen,
2855
+ openDebug
2856
+ } = useDebugClick();
2857
+ return /* @__PURE__ */ jsx23(
2858
+ Drawer,
2859
+ {
2860
+ variant: "permanent",
2861
+ anchor: "left",
2862
+ PaperProps: {
2863
+ sx: {
2864
+ background: "transparent",
2865
+ borderRight: "none",
2866
+ position: "static"
2867
+ }
2868
+ },
2869
+ sx: { borderRight: `solid ${darkMode ? theme.palette.grey[900] : theme.palette.grey[300]}`, maxWidth: "280px" },
2870
+ ...props,
2871
+ children: /* @__PURE__ */ jsxs11(FlexCol8, { alignItems: "stretch", justifyContent: "space-between", height: "100dvh", children: [
2872
+ /* @__PURE__ */ jsxs11(FlexCol8, { paddingY: 1, paddingX: 2, alignItems: "stretch", children: [
2873
+ /* @__PURE__ */ jsx23(Tooltip3, { title: version, children: /* @__PURE__ */ jsxs11(
2874
+ FlexGrowRow5,
2875
+ {
2876
+ marginBottom: 2,
2877
+ justifyContent: "flex-start",
2878
+ gap: 1,
2879
+ sx: { cursor: "pointer" },
2880
+ children: [
2881
+ iconSvg ? RenderHtml({ htmlString: iconSvg }) : null,
2882
+ /* @__PURE__ */ jsx23(Typography7, { noWrap: true, variant: "h5", letterSpacing: "-1px", fontWeight: "300", children: name })
2883
+ ]
2884
+ }
2885
+ ) }),
2886
+ /* @__PURE__ */ jsx23(DebugDialogWithNode, { closeDebug, debugOpen, context }),
2887
+ /* @__PURE__ */ jsx23(List, { sx: { p: 0 }, children: menuItems?.map(({
2888
+ svgIcon: icon,
2889
+ primaryText,
2890
+ path: pathFromPayload
2891
+ }) => {
2892
+ return /* @__PURE__ */ jsx23(
2893
+ ListItem,
2894
+ {
2895
+ disablePadding: true,
2896
+ sx: {
2897
+ // Note: setting color here lets it cascade down to both text and svg elements with fill="currentColor"
2898
+ // see - https://css-tricks.com/cascading-svg-fill-color/
2899
+ color: pathFromPayload === path ? activeColor : void 0
2900
+ },
2901
+ children: /* @__PURE__ */ jsxs11(ListItemButton, { onClick: () => handleChange(pathFromPayload), children: [
2902
+ /* @__PURE__ */ jsx23(ListItemIcon, { sx: { color: "inherit" }, children: /* @__PURE__ */ jsx23(
2903
+ StyledMenuIconWrapSpan,
2904
+ {
2905
+ ref: (ref) => {
2906
+ if (ref) {
2907
+ ref.innerHTML = icon ?? "";
2908
+ }
2909
+ }
2910
+ }
2911
+ ) }),
2912
+ /* @__PURE__ */ jsx23(ListItemText, { primary: primaryText })
2913
+ ] })
2914
+ },
2915
+ primaryText
2916
+ );
2917
+ }) })
2918
+ ] }),
2919
+ /* @__PURE__ */ jsxs11(FlexCol8, { children: [
2920
+ /* @__PURE__ */ jsx23(Divider3, { variant: "middle", flexItem: true }),
2921
+ /* @__PURE__ */ jsxs11(FlexCol8, { padding: 2, children: [
2922
+ /* @__PURE__ */ jsxs11(Toolbar2, { sx: { paddingX: 1.5 }, children: [
2923
+ /* @__PURE__ */ jsx23(Tooltip3, { title: "Debug Node View", children: /* @__PURE__ */ jsx23(IconButton3, { onClick: openDebug, children: /* @__PURE__ */ jsx23(BugReport2, { sx: { color: theme.palette.text.primary } }) }) }),
2924
+ /* @__PURE__ */ jsx23(Tooltip3, { title: "Toggle Light/Dark Mode", children: /* @__PURE__ */ jsx23("span", { children: /* @__PURE__ */ jsx23(DarkModeIconButtonForColorScheme2, { defaultLightModeColor: "warning" }) }) })
2925
+ ] }),
2926
+ /* @__PURE__ */ jsx23(FlexRow7, { flexWrap: "wrap", children: socialLinksData.map((social, index) => {
2927
+ return /* @__PURE__ */ jsx23(RotationAnimation, { rotation: 20, children: /* @__PURE__ */ jsx23(
2928
+ IconButton3,
2929
+ {
2930
+ sx: { color: theme.palette.text.primary },
2931
+ href: social.link,
2932
+ target: "_blank",
2933
+ children: social.icon
2934
+ }
2935
+ ) }, index);
2936
+ }) }),
2937
+ /* @__PURE__ */ jsxs11(FlexRow7, { padding: 1, justifyContent: "center", gap: 0.5, children: [
2938
+ /* @__PURE__ */ jsx23(Typography7, { variant: "body2", color: theme.palette.text.primary, children: "Powered By" }),
2939
+ /* @__PURE__ */ jsx23(
2940
+ "img",
2941
+ {
2942
+ style: { color: theme.palette.text.primary, fill: theme.palette.text.primary },
2943
+ src: logo,
2944
+ width: "auto",
2945
+ height: "20px"
2946
+ }
2947
+ )
2948
+ ] }),
2949
+ /* @__PURE__ */ jsx23(LinkEx2, { target: "_blank", href: "https://xylabs.com/", children: /* @__PURE__ */ jsx23(Typography7, { variant: "caption", children: "Copyright \xA9 2024 XY Labs, Inc." }) }),
2950
+ /* @__PURE__ */ jsxs11(Stack, { gap: 0.5, flexDirection: "row", children: [
2951
+ /* @__PURE__ */ jsx23(LinkEx2, { target: "_blank", href: "https://xylabs.com/privacy/", children: /* @__PURE__ */ jsx23(Typography7, { variant: "caption", children: "Privacy" }) }),
2952
+ " ",
2953
+ "\u2022",
2954
+ " ",
2955
+ /* @__PURE__ */ jsx23(LinkEx2, { target: "_blank", href: "https://xylabs.com/terms/", children: /* @__PURE__ */ jsx23(Typography7, { variant: "caption", children: "Terms" }) }),
2956
+ " ",
2957
+ "\u2022",
2958
+ " ",
2959
+ /* @__PURE__ */ jsx23(LinkEx2, { target: "_blank", href: "https://xyo.network/", children: /* @__PURE__ */ jsx23(Typography7, { variant: "caption", children: "XYO Website" }) })
2960
+ ] })
2961
+ ] })
2962
+ ] })
2963
+ ] })
2964
+ }
2965
+ );
2966
+ };
2967
+ var StyledMenuIconWrapSpan = styled4("span", { name: "StyledMenuIconWrapSpan" })(() => ({
2968
+ alignItems: "center",
2969
+ display: "inline-flex",
2970
+ flexDirection: "column"
2971
+ }));
2972
+
2973
+ // src/modules/Dapp/modules/Window/DappWindow.tsx
2974
+ import { Fragment as Fragment2, jsx as jsx24, jsxs as jsxs12 } from "react/jsx-runtime";
2975
+ var DappWindow = ({
2976
+ dappSet,
2977
+ xnsNodeUrl,
2978
+ xnsNetwork
2979
+ }) => {
2980
+ const {
2981
+ DappComponent,
2982
+ dapp,
2983
+ name,
2984
+ scrollable = true,
2985
+ version
2986
+ } = useDecomposeDappSet(dappSet);
2987
+ const {
2988
+ dappWallet,
2989
+ context,
2990
+ nodeCreateError
2991
+ } = useDappContextCreator(xnsNodeUrl, xnsNetwork, dapp);
2992
+ const { dappIntentType: intentType, intentPayload } = useDappIntentListener(name);
2993
+ const {
2994
+ active,
2995
+ minimized,
2996
+ open
2997
+ } = useDappState(intentType, context);
2998
+ const TypedDappComponent = useMemo12(() => DappComponent, []);
2999
+ const errors = useManageDappBasedOffRoute(intentPayload, name, context);
3000
+ useSyncOsRegisteredAccessInterfaces(context);
3001
+ const {
3002
+ activePath,
3003
+ error: menuError,
3004
+ menuConfig,
3005
+ menuItemsVisible,
3006
+ onPathChange
3007
+ } = useDappMenu(context, name);
3008
+ const resolvedError = nodeCreateError || menuError;
3009
+ return /* @__PURE__ */ jsxs12(Fragment2, { children: [
3010
+ active ? /* @__PURE__ */ jsx24(Helmet, { children: /* @__PURE__ */ jsxs12("title", { children: [
3011
+ activePath ? `${new NameTransforms4(activePath).deSlug()} | ` : "",
3012
+ " ",
3013
+ name,
3014
+ " ",
3015
+ "dApp"
3016
+ ] }) }) : null,
3017
+ /* @__PURE__ */ jsx24(ErrorBoundary, { children: /* @__PURE__ */ jsxs12(
3018
+ DappChrome,
3019
+ {
3020
+ appBar: /* @__PURE__ */ jsx24(Fragment2, { children: /* @__PURE__ */ jsx24(DappBar, { context, name, version, title: activePath ? new NameTransforms4(activePath).deSlug() : "" }) }),
3021
+ height: "100dvh",
3022
+ width: "100dvw",
3023
+ largeScreenMenu: /* @__PURE__ */ jsx24(
3024
+ DappMenuDrawer,
3025
+ {
3026
+ context,
3027
+ name,
3028
+ version,
3029
+ activePath,
3030
+ onPathChange,
3031
+ menuConfig,
3032
+ menuItems: menuItemsVisible
3033
+ }
3034
+ ),
3035
+ smallScreenMenu: /* @__PURE__ */ jsx24(
3036
+ DappBottomNavigation,
3037
+ {
3038
+ activePath,
3039
+ onPathChange,
3040
+ menuConfig,
3041
+ menuItems: menuItemsVisible,
3042
+ sx: { display: menuConfig ? "flex" : "none" }
3043
+ }
3044
+ ),
3045
+ splashScreen: resolvedError ? null : /* @__PURE__ */ jsx24(DappLoadingFlexbox, { minimize: minimized, name, open }),
3046
+ children: [
3047
+ resolvedError || errors?.length > 0 ? /* @__PURE__ */ jsxs12(FlexCol9, { padding: 2, children: [
3048
+ resolvedError ? /* @__PURE__ */ jsx24(ErrorRender3, { error: resolvedError, scope: "DappWindow" }) : null,
3049
+ errors.map((error, index) => /* @__PURE__ */ jsx24(ErrorRender3, { error, scope: "DappWindowErrors" }, index))
3050
+ ] }) : null,
3051
+ /* @__PURE__ */ jsx24(WalletProvider, { rootWallet: dappWallet, children: context === null ? null : /* @__PURE__ */ jsx24(XyOsUiContextProvider, { value: context, children: /* @__PURE__ */ jsx24(NodeProvider2, { node: context?.root, children: active ? /* @__PURE__ */ jsxs12(Fragment2, { children: [
3052
+ /* @__PURE__ */ jsx24(
3053
+ FlexCol9,
3054
+ {
3055
+ position: "absolute",
3056
+ top: 0,
3057
+ left: 0,
3058
+ right: 0,
3059
+ bottom: 0,
3060
+ alignItems: "stretch",
3061
+ justifyContent: "stretch",
3062
+ sx: { overflowY: scrollable ? "auto" : "hidden" },
3063
+ children: /* @__PURE__ */ jsx24(TypedDappComponent, { name })
3064
+ }
3065
+ ),
3066
+ /* @__PURE__ */ jsx24(DappAccessFlexbox, { context })
3067
+ ] }) : null }) }) })
3068
+ ]
3069
+ }
3070
+ ) })
3071
+ ] });
3072
+ };
3073
+
3074
+ // src/modules/Dapp/Container.tsx
3075
+ import { jsx as jsx25 } from "react/jsx-runtime";
3076
+ var DappContainer = ({
3077
+ dappSet,
3078
+ xnsNodeUrl,
3079
+ xnsNetwork
3080
+ }) => {
3081
+ const { dapp, dappIcon } = dappSet;
3082
+ return /* @__PURE__ */ jsx25(DappIconButton, { dappIcon, dappIconSvg: dapp.params.iconSvg, dappName: dapp?.config.name, children: /* @__PURE__ */ jsx25(DappWindow, { dappSet, xnsNodeUrl, xnsNetwork }) });
3083
+ };
3084
+
3085
+ // src/modules/Dapp/ContainerFlexbox.tsx
3086
+ import { Container as Container2 } from "@mui/material";
3087
+ import { FlexCol as FlexCol10 } from "@xylabs/react-flexbox";
3088
+ import { jsx as jsx26 } from "react/jsx-runtime";
3089
+ var ContainerFlexbox = ({
3090
+ children,
3091
+ containerProps,
3092
+ scrollable = true,
3093
+ ...props
3094
+ }) => {
3095
+ return /* @__PURE__ */ jsx26(
3096
+ FlexCol10,
3097
+ {
3098
+ id: "container-flexbox",
3099
+ alignItems: "center",
3100
+ justifyContent: "start",
3101
+ width: "100%",
3102
+ pt: 2,
3103
+ gap: 2,
3104
+ overflow: scrollable ? "auto" : "unset",
3105
+ ...props,
3106
+ children: /* @__PURE__ */ jsx26(Container2, { ...containerProps, children })
3107
+ }
3108
+ );
3109
+ };
3110
+
3111
+ // src/modules/Dapp/Page/Row.tsx
3112
+ import {
3113
+ Divider as Divider4,
3114
+ Fade as Fade2,
3115
+ styled as styled5
3116
+ } from "@mui/material";
3117
+ import { useMemo as useMemo13 } from "react";
3118
+
3119
+ // src/modules/Dapp/Page/DividerChip.tsx
3120
+ import { Chip as Chip2, CircularProgress } from "@mui/material";
3121
+ import { Fragment as Fragment3, jsx as jsx27 } from "react/jsx-runtime";
3122
+ var DividerChip = ({ registeredDapps, ...props }) => {
3123
+ return /* @__PURE__ */ jsx27(
3124
+ Chip2,
3125
+ {
3126
+ avatar: registeredDapps === void 0 ? /* @__PURE__ */ jsx27("span", { children: /* @__PURE__ */ jsx27(
3127
+ CircularProgress,
3128
+ {
3129
+ size: "small",
3130
+ sx: { display: "inline" }
3131
+ }
3132
+ ) }) : /* @__PURE__ */ jsx27(Fragment3, {}),
3133
+ label: `${registeredDapps?.length ? "" : "Loading "}Beta dApps`,
3134
+ size: "small",
3135
+ sx: { gap: 0.5 },
3136
+ ...props
3137
+ }
3138
+ );
3139
+ };
3140
+
3141
+ // src/modules/Dapp/Page/Row.tsx
3142
+ import { Fragment as Fragment4, jsx as jsx28, jsxs as jsxs13 } from "react/jsx-runtime";
3143
+ var DappsRow = ({
3144
+ chipLabel,
3145
+ installType,
3146
+ registeredDappsSet,
3147
+ xnsNetwork,
3148
+ xnsNodeUrl
3149
+ }) => {
3150
+ const filteredRegisteredDappSets = useMemo13(() => DappInstallTypeFilters[installType](registeredDappsSet), [installType, registeredDappsSet]);
3151
+ return /* @__PURE__ */ jsxs13(Fragment4, { children: [
3152
+ /* @__PURE__ */ jsx28(
3153
+ Divider4,
3154
+ {
3155
+ variant: "middle",
3156
+ sx: { marginY: 3 },
3157
+ flexItem: true,
3158
+ children: /* @__PURE__ */ jsx28(
3159
+ DividerChip,
3160
+ {
3161
+ label: `${filteredRegisteredDappSets === void 0 ? "Loading " : ""}${chipLabel}`,
3162
+ registeredDapps: filteredRegisteredDappSets
3163
+ }
3164
+ )
3165
+ }
3166
+ ),
3167
+ filteredRegisteredDappSets?.length ? /* @__PURE__ */ jsx28(Fade2, { in: !!filteredRegisteredDappSets?.length, timeout: 1e3, children: /* @__PURE__ */ jsx28(StyledGridContainer, { children: filteredRegisteredDappSets?.map(
3168
+ (dappSet, index) => /* @__PURE__ */ jsx28(DappContainer, { dappSet, xnsNodeUrl, xnsNetwork }, index)
3169
+ ) }) }) : null
3170
+ ] });
3171
+ };
3172
+ var StyledGridContainer = styled5("div", { name: "StyledGridContainer" })(({ theme }) => ({
3173
+ display: "grid",
3174
+ gridGap: theme.spacing(2),
3175
+ gridTemplateColumns: `repeat(auto-fit, ${theme.spacing(8)})`,
3176
+ justifyContent: "center",
3177
+ justifyItems: "center",
3178
+ paddingTop: theme.spacing(1),
3179
+ width: "100%"
3180
+ }));
3181
+
3182
+ // src/modules/network/components/LoadingIndicator.tsx
3183
+ import { SignalCellularAltOutlined } from "@mui/icons-material";
3184
+ import { Tooltip as Tooltip4, useTheme as useTheme7 } from "@mui/material";
3185
+ import { useColorSchemeEx as useColorSchemeEx3 } from "@xylabs/react-invertible-theme";
3186
+ import { useMemo as useMemo16 } from "react";
3187
+
3188
+ // src/modules/network/hooks/useOsNetwork.tsx
3189
+ import { OsPubSubNetworkReadyEvent } from "@xyo-network/os-runtime";
3190
+ import { useMemo as useMemo14 } from "react";
3191
+
3192
+ // src/modules/network/hooks/lib/createNetworkState.ts
3193
+ import { assertEx as assertEx8 } from "@xylabs/assert";
3194
+ var defaultNetworkState = {
3195
+ connected: false,
3196
+ error: void 0,
3197
+ networkReady: false
3198
+ };
3199
+ var createNetworkState = (stackReady) => {
3200
+ const { ready, stack } = stackReady ?? {};
3201
+ if (ready) {
3202
+ const foundStack = assertEx8(stack, () => "stack said it was ready but no stack found");
3203
+ return {
3204
+ connected: true,
3205
+ error: void 0,
3206
+ networkReady: true,
3207
+ stack: foundStack
3208
+ };
3209
+ } else {
3210
+ return defaultNetworkState;
3211
+ }
3212
+ };
3213
+
3214
+ // src/modules/network/hooks/useOsNetwork.tsx
3215
+ var useOsNetwork = () => {
3216
+ const context = useXyOsUiContext();
3217
+ const stackReady = useStackReady(OsPubSubNetworkReadyEvent, "osPubSubNetworkStack", context);
3218
+ const networkState = useMemo14(() => {
3219
+ return createNetworkState(stackReady);
3220
+ }, [context, stackReady]);
3221
+ return networkState;
3222
+ };
3223
+
3224
+ // src/modules/network/hooks/useXyoPublicNetwork.tsx
3225
+ import { OsXyoPublicNetworkReadyEvent } from "@xyo-network/os-runtime";
3226
+ import { useMemo as useMemo15 } from "react";
3227
+ var useXyoPublicNetwork = () => {
3228
+ const context = useXyOsUiContext();
3229
+ const stackReady = useStackReady(OsXyoPublicNetworkReadyEvent, "xyoPublicNetworkStack", context);
3230
+ const networkState = useMemo15(() => {
3231
+ return createNetworkState(stackReady);
3232
+ }, [context, stackReady]);
3233
+ return networkState;
3234
+ };
3235
+
3236
+ // src/modules/network/components/StyledLoadingIndicator.tsx
3237
+ import { styled as styled6 } from "@mui/material";
3238
+ var StyledNetworkLoadingIndicator = styled6("div", { name: "StyledNetworkLoadingIndicator" })(({ theme }) => ({
3239
+ "&": {
3240
+ "--Loader-color": "#fff",
3241
+ "--Loader-offset": theme.spacing(0.1667),
3242
+ "--Loader-size": theme.spacing(1.5),
3243
+ "--Loader-timing": "ease-in-out",
3244
+ "alignItems": "center",
3245
+ "display": "flex",
3246
+ "justifyContent": "center",
3247
+ "marginBottom": "calc(var(--Loader-size) / 2)",
3248
+ "marginTop": "calc(var(--Loader-size) / 2)",
3249
+ "minHeight": "var(--Loader-size)",
3250
+ "minWidth": "var(--Loader-size)",
3251
+ "position": "relative",
3252
+ "width": "100%"
3253
+ },
3254
+ "&:after": {
3255
+ animationName: "pulsB",
3256
+ boxShadow: "0 0 0 0 var(--Loader-color)",
3257
+ paddingBottom: "calc(100% - var(--Loader-offset) * 2)",
3258
+ width: "calc(100% - var(--Loader-offset) * 2)"
3259
+ },
3260
+ "&:before": {
3261
+ animationName: "pulsA",
3262
+ boxShadow: "inset 0 0 0 var(--Loader-offset) var(--Loader-color)",
3263
+ paddingBottom: "100%",
3264
+ width: "100%"
3265
+ },
3266
+ "&:before, &:after": {
3267
+ animationDuration: "1.8s",
3268
+ animationIterationCount: "infinite",
3269
+ animationTimingFunction: "var(--Loader-timing)",
3270
+ borderRadius: "50%",
3271
+ content: '""',
3272
+ filter: "drop-shadow(0 0 var(--Loader-offset)/2.25 rgba(var(--Loader-color), 0.75))",
3273
+ position: "absolute"
3274
+ },
3275
+ "@keyframes pulsA": {
3276
+ "0%": { boxShadow: "inset 0 0 0 var(--Loader-offset) var(--Loader-color)" },
3277
+ "50%, 100%": { boxShadow: "inset 0 0 0 0 var(--Loader-color)" }
3278
+ },
3279
+ "@keyframes pulsB": {
3280
+ "0%, 50%": { boxShadow: "0 0 0 0 var(--Loader-color)" },
3281
+ "100%": { boxShadow: "0 0 0 var(--Loader-offset) var(--Loader-color)" }
3282
+ }
3283
+ }));
3284
+
3285
+ // src/modules/network/components/LoadingIndicator.tsx
3286
+ import { jsx as jsx29 } from "react/jsx-runtime";
3287
+ var WaitingForNetwork = () => /* @__PURE__ */ jsx29(Tooltip4, { title: "Waiting for Network initialization", children: /* @__PURE__ */ jsx29(StyledNetworkLoadingIndicator, {}) });
3288
+ var NetworkLoadingIndicator = ({ highContrast }) => {
3289
+ const { darkMode } = useColorSchemeEx3();
3290
+ const theme = useTheme7();
3291
+ const { networkReady } = useOsNetwork();
3292
+ const highContrastSuccessColor = darkMode ? theme.palette.success.dark : theme.palette.success.main;
3293
+ const successColor = highContrast ? highContrastSuccessColor : theme.palette.success.main;
3294
+ const highContrastErrorColor = darkMode ? theme.palette.success.dark : theme.palette.error.main;
3295
+ const errorColor = highContrast ? highContrastErrorColor : theme.palette.error.main;
3296
+ const NetworkComponent = useMemo16(() => {
3297
+ if (networkReady) {
3298
+ const connectionReady = true;
3299
+ return connectionReady ? () => /* @__PURE__ */ jsx29(Tooltip4, { title: "Connected to Network", children: /* @__PURE__ */ jsx29(SignalCellularAltOutlined, { sx: { color: successColor } }) }) : () => /* @__PURE__ */ jsx29(Tooltip4, { title: "Error Connecting to Network", children: /* @__PURE__ */ jsx29(SignalCellularAltOutlined, { sx: { color: errorColor } }) });
3300
+ } else {
3301
+ return WaitingForNetwork;
3302
+ }
3303
+ }, [errorColor, networkReady, successColor]);
3304
+ return /* @__PURE__ */ jsx29(NetworkComponent, {});
3305
+ };
3306
+
3307
+ // src/modules/network/components/NetworkButton.tsx
3308
+ import { NotInterested } from "@mui/icons-material";
3309
+ import { Button as Button2 } from "@mui/material";
3310
+ import { Fragment as Fragment5, jsx as jsx30, jsxs as jsxs14 } from "react/jsx-runtime";
3311
+ var NetworkButton = ({
3312
+ disabled,
3313
+ startIcon,
3314
+ ...props
3315
+ }) => {
3316
+ const { networkReady } = useOsNetwork();
3317
+ return /* @__PURE__ */ jsx30(
3318
+ Button2,
3319
+ {
3320
+ disabled: disabled || !networkReady,
3321
+ startIcon: /* @__PURE__ */ jsxs14(Fragment5, { children: [
3322
+ startIcon,
3323
+ networkReady === false ? /* @__PURE__ */ jsx30(NotInterested, {}) : null
3324
+ ] }),
3325
+ ...props
3326
+ }
3327
+ );
3328
+ };
3329
+
3330
+ // src/modules/network/components/NetworkReady.tsx
3331
+ import { Typography as Typography8 } from "@mui/material";
3332
+ import { FlexCol as FlexCol11 } from "@xylabs/react-flexbox";
3333
+ import { Fragment as Fragment6, jsx as jsx31, jsxs as jsxs15 } from "react/jsx-runtime";
3334
+ var NetworkReadyFlexBox = ({
3335
+ children,
3336
+ skipCheck,
3337
+ ...props
3338
+ }) => {
3339
+ const { networkReady } = useOsNetwork();
3340
+ return /* @__PURE__ */ jsx31(Fragment6, { children: networkReady || skipCheck ? children : /* @__PURE__ */ jsxs15(FlexCol11, { height: "100%", ...props, children: [
3341
+ /* @__PURE__ */ jsx31(LoadingOsLogo, { widthInPixels: 100, busy: true }),
3342
+ /* @__PURE__ */ jsx31(Typography8, { fontFamily: "monospace", children: "Loading XYO Name Service..." })
3343
+ ] }) });
3344
+ };
3345
+
3346
+ // src/DappPage.tsx
3347
+ import { jsx as jsx32, jsxs as jsxs16 } from "react/jsx-runtime";
3348
+ var DappTitle = ({
3349
+ subtitle,
3350
+ title,
3351
+ ...props
3352
+ }) => {
3353
+ return title ? /* @__PURE__ */ jsxs16(FlexCol12, { alignItems: "flex-start", gap: 1, ...props, children: [
3354
+ /* @__PURE__ */ jsx32(Typography9, { variant: "h3", children: /* @__PURE__ */ jsx32("b", { children: title }) }),
3355
+ /* @__PURE__ */ jsx32(Typography9, { gutterBottom: true, variant: "subtitle2", children: subtitle })
3356
+ ] }) : null;
3357
+ };
3358
+ var InnerDappPage = ({
3359
+ noScroll,
3360
+ children,
3361
+ subtitle,
3362
+ title,
3363
+ sx,
3364
+ ...props
3365
+ }) => {
3366
+ return /* @__PURE__ */ jsxs16(
3367
+ FlexCol12,
3368
+ {
3369
+ id: "innerPage",
3370
+ sx: {
3371
+ marginX: { sm: 2 },
3372
+ marginY: 2,
3373
+ ...sx
3374
+ },
3375
+ gap: noScroll ? 0 : 2,
3376
+ alignItems: "stretch",
3377
+ justifyContent: "flex-start",
3378
+ ...props,
3379
+ children: [
3380
+ title ? /* @__PURE__ */ jsx32(DappTitle, { subtitle, title, marginX: 1 }) : null,
3381
+ children
3382
+ ]
3383
+ }
3384
+ );
3385
+ };
3386
+ var DappPage = ({
3387
+ checkNetwork,
3388
+ noScroll,
3389
+ subtitle,
3390
+ title,
3391
+ container,
3392
+ rollbar,
3393
+ ...props
3394
+ }) => {
3395
+ return /* @__PURE__ */ jsx32(
3396
+ ThrownErrorBoundary,
3397
+ {
3398
+ errorComponent: (error, boundaryName) => /* @__PURE__ */ jsx32(ErrorRenderWithSupportDefault, { errorContext: boundaryName, error, scope: "DappPage" }),
3399
+ rollbar,
3400
+ scope: "DappPage",
3401
+ children: /* @__PURE__ */ jsx32(NetworkReadyFlexBox, { skipCheck: !checkNetwork, children: container ? /* @__PURE__ */ jsx32(Container3, { disableGutters: true, maxWidth: container === true ? "md" : container, children: noScroll ? /* @__PURE__ */ jsx32(
3402
+ FlexCol12,
3403
+ {
3404
+ sx: {
3405
+ position: "absolute",
3406
+ top: 0,
3407
+ left: 0,
3408
+ right: 0,
3409
+ bottom: 0
3410
+ },
3411
+ children: /* @__PURE__ */ jsx32(InnerDappPage, { noScroll, title, subtitle, ...props, flexGrow: 1 })
3412
+ }
3413
+ ) : /* @__PURE__ */ jsx32(FlexCol12, { width: "100%", height: "100%", alignItems: "stretch", children: /* @__PURE__ */ jsx32(InnerDappPage, { noScroll, title, subtitle, ...props, flexGrow: 1 }) }) }) : noScroll ? /* @__PURE__ */ jsx32(
3414
+ InnerDappPage,
3415
+ {
3416
+ sx: {
3417
+ position: "absolute",
3418
+ top: 0,
3419
+ left: 0,
3420
+ right: 0,
3421
+ bottom: 0
3422
+ },
3423
+ noScroll,
3424
+ title,
3425
+ subtitle,
3426
+ ...props,
3427
+ flexGrow: 1
3428
+ }
3429
+ ) : /* @__PURE__ */ jsx32(InnerDappPage, { noScroll, title, subtitle, ...props, flexGrow: 1 }) })
3430
+ }
3431
+ );
3432
+ };
3433
+
3434
+ // src/components/Widgets/StackOfWidgets.tsx
3435
+ import {
3436
+ alpha as alpha6,
3437
+ Box as Box3,
3438
+ useTheme as useTheme9
3439
+ } from "@mui/material";
3440
+ import {
3441
+ animated as animated2,
3442
+ to as interpolate,
3443
+ useSprings
3444
+ } from "@react-spring/web";
3445
+ import { useState as useState17 } from "react";
3446
+ import { useDrag } from "react-use-gesture";
3447
+
3448
+ // src/components/Widgets/Types/BarGraph/HorizontalBarGraph.tsx
3449
+ import { Typography as Typography10 } from "@mui/material";
3450
+ import { FlexCol as FlexCol13, FlexGrowRow as FlexGrowRow6 } from "@xylabs/react-flexbox";
3451
+
3452
+ // src/components/Widgets/Types/BarGraph/StyledLinearProgress.tsx
3453
+ import {
3454
+ alpha as alpha4,
3455
+ LinearProgress,
3456
+ styled as styled7
3457
+ } from "@mui/material";
3458
+ var StyledLinearProgress = styled7(LinearProgress, { name: "StyledLinearProgress" })(({ theme }) => ({
3459
+ "& .MuiLinearProgress-bar": { borderRadius: theme.shape.borderRadius },
3460
+ "MozBoxSizing": "border-box",
3461
+ "WebkitBoxSizing": "border-box",
3462
+ "background": "transparent",
3463
+ "borderBottom": `1px solid ${alpha4(theme.palette.text.secondary, 0.3)}`,
3464
+ "boxSizing": "border-box",
3465
+ "height": theme.spacing(0.25)
3466
+ }));
3467
+
3468
+ // src/components/Widgets/Types/BarGraph/HorizontalBarGraph.tsx
3469
+ import { jsx as jsx33, jsxs as jsxs17 } from "react/jsx-runtime";
3470
+ var sampleData = [
3471
+ { name: "United States", value: 134 },
3472
+ { name: "South Africa", value: 400 },
3473
+ { name: "Canada", value: 382 },
3474
+ { name: "Philippines", value: 423 },
3475
+ { name: "Denmark", value: 123 },
3476
+ { name: "Greece", value: 321 },
3477
+ { name: "Japan", value: 421 }
3478
+ ];
3479
+ var HorizontalBarGraph = ({ items = sampleData, ...props }) => {
3480
+ const itemsSortedByValue = items.sort(function(a2, b) {
3481
+ const keyA = a2.value, keyB = b.value;
3482
+ if (keyA > keyB) return -1;
3483
+ if (keyA < keyB) return 1;
3484
+ return 0;
3485
+ });
3486
+ console.log(itemsSortedByValue);
3487
+ const topValue = itemsSortedByValue[0].value;
3488
+ return /* @__PURE__ */ jsx33(FlexCol13, { alignItems: "stretch", gap: 0.5, ...props, children: items.slice(0, 5).map((item, index) => /* @__PURE__ */ jsxs17(FlexCol13, { alignItems: "stretch", children: [
3489
+ /* @__PURE__ */ jsxs17(FlexGrowRow6, { justifyContent: "space-between", children: [
3490
+ /* @__PURE__ */ jsx33(Typography10, { variant: "caption", maxWidth: "50%", noWrap: true, children: item.name }),
3491
+ /* @__PURE__ */ jsx33(Typography10, { variant: "caption", maxWidth: "50%", children: item.value })
3492
+ ] }),
3493
+ /* @__PURE__ */ jsx33(StyledLinearProgress, { color: "primary", value: item.value / (topValue * 1.25) * 100, variant: "determinate" })
3494
+ ] }, index)) });
3495
+ };
3496
+
3497
+ // src/components/Widgets/Types/DataColumns/TwoColTwoStat.tsx
3498
+ import { Typography as Typography11, useTheme as useTheme8 } from "@mui/material";
3499
+ import { FlexCol as FlexCol14, FlexGrowRow as FlexGrowRow7 } from "@xylabs/react-flexbox";
3500
+ import { useEffect as useEffect18 } from "react";
3501
+ import { jsx as jsx34, jsxs as jsxs18 } from "react/jsx-runtime";
3502
+ var MAX_LENGTH = 2;
3503
+ var validateProps = (props) => {
3504
+ if (props.length > MAX_LENGTH) {
3505
+ throw new Error(`The length of items for the Two Column Two Stat widget should not exceed ${MAX_LENGTH}`);
3506
+ }
3507
+ };
3508
+ var TwoColTwoStat = ({ items, ...props }) => {
3509
+ const theme = useTheme8();
3510
+ useEffect18(() => {
3511
+ validateProps(items);
3512
+ }, [items]);
3513
+ return /* @__PURE__ */ jsx34(FlexGrowRow7, { gap: 2, ...props, children: items.map((item, index) => /* @__PURE__ */ jsxs18(FlexCol14, { flexGrow: 1, alignItems: "start", children: [
3514
+ /* @__PURE__ */ jsx34(Typography11, { variant: "h2", fontWeight: theme.typography.fontWeightMedium, children: item.rawInsightValue }),
3515
+ /* @__PURE__ */ jsx34(Typography11, { variant: "body2", children: item.subtitle })
3516
+ ] }, `stat-${index}-${item.unit}`)) });
3517
+ };
3518
+
3519
+ // src/components/Widgets/Types/Examples/BarGraph.tsx
3520
+ import { jsx as jsx35 } from "react/jsx-runtime";
3521
+ var ExampleBarGraphWidget = () => {
3522
+ return /* @__PURE__ */ jsx35(WidgetCard, { widgetContent: /* @__PURE__ */ jsx35(HorizontalBarGraph, {}), widgetName: "Friend Locations", timeOfData: 1715713478, widgetPath: "/profile" });
3523
+ };
3524
+
3525
+ // src/components/Widgets/Types/Tables/BooleanTable.tsx
3526
+ import { CircleRounded } from "@mui/icons-material";
3527
+ import {
3528
+ alpha as alpha5,
3529
+ Paper as Paper2,
3530
+ styled as styled8,
3531
+ TableRow,
3532
+ Typography as Typography12
3533
+ } from "@mui/material";
3534
+ import {
3535
+ FlexCol as FlexCol15,
3536
+ FlexGrowRow as FlexGrowRow8,
3537
+ FlexRow as FlexRow8
3538
+ } from "@xylabs/react-flexbox";
3539
+ import { jsx as jsx36, jsxs as jsxs19 } from "react/jsx-runtime";
3540
+ var sampleData2 = [
3541
+ { name: "@arietrouw", value: true },
3542
+ { name: "@officialxyo", value: false },
3543
+ { name: "0x187623121928634124", value: true },
3544
+ { name: "@coinwithus", value: true },
3545
+ { name: "0x871218376123894321", value: true }
3546
+ ];
3547
+ var StyledLightTableRow = styled8(Paper2, { name: "StyledLightTableRow" })(({ theme }) => ({
3548
+ backgroundColor: "transparent",
3549
+ padding: theme.spacing(0.75)
3550
+ }));
3551
+ var StyledTableColumnTitle = styled8(Typography12, { name: "StyledTableColumnTitle" })(({ theme }) => ({
3552
+ color: theme.palette.text.secondary,
3553
+ fontWeight: theme.typography.fontWeightBold,
3554
+ textTransform: "uppercase"
3555
+ }));
3556
+ var DefaultTrueOutput = styled8(CircleRounded, { name: "DefaultTrueOutput" })(({ theme }) => ({
3557
+ fill: theme.palette.success.main,
3558
+ fontSize: "10px"
3559
+ }));
3560
+ var DefaultFalseOutput = styled8(CircleRounded, { name: "DefaultFalseOutput" })(({ theme }) => ({
3561
+ fill: alpha5(theme.palette.text.disabled, 0.5),
3562
+ fontSize: "10px"
3563
+ }));
3564
+ var defaultTrueOutput = /* @__PURE__ */ jsx36(DefaultTrueOutput, {});
3565
+ var defaultFalseOutput = /* @__PURE__ */ jsx36(DefaultFalseOutput, {});
3566
+ var BooleanTable = ({
3567
+ items = sampleData2,
3568
+ tableHeaders,
3569
+ trueOutput = defaultTrueOutput,
3570
+ falseOutput = defaultFalseOutput,
3571
+ ...props
3572
+ }) => {
3573
+ return /* @__PURE__ */ jsxs19(FlexCol15, { alignItems: "stretch", ...props, children: [
3574
+ /* @__PURE__ */ jsx36(FlexRow8, { paddingBottom: 0.5, justifyContent: "space-between", children: tableHeaders.map((name) => /* @__PURE__ */ jsx36(StyledTableColumnTitle, { variant: "caption", children: name }, name)) }),
3575
+ /* @__PURE__ */ jsx36(FlexCol15, { alignItems: "stretch", gap: 0.25, children: items.slice(0, 4).map((item, index) => /* @__PURE__ */ jsx36(TableRow, { children: /* @__PURE__ */ jsxs19(FlexGrowRow8, { flexGrow: 1, justifyContent: "space-between", children: [
3576
+ /* @__PURE__ */ jsx36(Typography12, { variant: "caption", noWrap: true, maxWidth: "70%", children: item.name }),
3577
+ item.value ? trueOutput : falseOutput
3578
+ ] }) }, index)) })
3579
+ ] });
3580
+ };
3581
+
3582
+ // src/components/Widgets/Types/Examples/BooleanTable.tsx
3583
+ import { jsx as jsx37 } from "react/jsx-runtime";
3584
+ var ExampleBooleanTableWidget = () => {
3585
+ return /* @__PURE__ */ jsx37(
3586
+ WidgetCard,
3587
+ {
3588
+ widgetContent: /* @__PURE__ */ jsx37(
3589
+ BooleanTable,
3590
+ {
3591
+ items: [
3592
+ { name: "@arietrouw", value: true },
3593
+ { name: "@officialxyo", value: false },
3594
+ { name: "0x187623121928634124", value: true },
3595
+ { name: "@coinwithus", value: true },
3596
+ { name: "0x871218376123894321", value: true }
3597
+ ],
3598
+ tableHeaders: ["Id", "Online"]
3599
+ }
3600
+ ),
3601
+ widgetName: "Friends",
3602
+ timeOfData: 1715875797,
3603
+ widgetPath: "/profile"
3604
+ }
3605
+ );
3606
+ };
3607
+
3608
+ // src/components/Widgets/Types/Examples/TwoColTwoStat.tsx
3609
+ import { jsx as jsx38 } from "react/jsx-runtime";
3610
+ var ExampleTwoColTwoStatWidget = () => {
3611
+ return /* @__PURE__ */ jsx38(
3612
+ WidgetCard,
3613
+ {
3614
+ widgetContent: /* @__PURE__ */ jsx38(
3615
+ TwoColTwoStat,
3616
+ {
3617
+ items: [
3618
+ {
3619
+ rawInsightValue: 218,
3620
+ subtitle: "Inbound Access Requests",
3621
+ uiInsightValue: 218,
3622
+ unit: "requests"
3623
+ },
3624
+ {
3625
+ rawInsightValue: 18,
3626
+ subtitle: "Outbound Access Requests",
3627
+ uiInsightValue: 18,
3628
+ unit: "requests"
3629
+ }
3630
+ ]
3631
+ }
3632
+ ),
3633
+ widgetName: "Network Activity",
3634
+ timeOfData: 1642637397,
3635
+ widgetPath: "/network"
3636
+ }
3637
+ );
3638
+ };
3639
+
3640
+ // src/components/Widgets/StackOfWidgets.tsx
3641
+ import { Fragment as Fragment7, jsx as jsx39 } from "react/jsx-runtime";
3642
+ var cards = [
3643
+ /* @__PURE__ */ jsx39(ExampleBarGraphWidget, {}, "bar-graph"),
3644
+ /* @__PURE__ */ jsx39(ExampleBooleanTableWidget, {}, "boolean-table"),
3645
+ /* @__PURE__ */ jsx39(ExampleTwoColTwoStatWidget, {}, "two-column")
3646
+ ];
3647
+ var to = (i) => ({
3648
+ delay: i * 100,
3649
+ rot: -10 + Math.random() * 15,
3650
+ scale: 1,
3651
+ x: 0,
3652
+ y: i * -4
3653
+ });
3654
+ var from = (_i) => ({
3655
+ rot: 0,
3656
+ scale: 1.5,
3657
+ x: 0,
3658
+ y: -1e3
3659
+ });
3660
+ var trans = (r, s) => `perspective(1500px) rotateY(${r / 10}deg) scale(${s})`;
3661
+ function Deck() {
3662
+ const [gone] = useState17(() => /* @__PURE__ */ new Set());
3663
+ const theme = useTheme9();
3664
+ const [props, api] = useSprings(cards.length, (i) => ({
3665
+ ...to(i),
3666
+ from: from(i)
3667
+ }));
3668
+ const bind = useDrag(({
3669
+ args: [index],
3670
+ down,
3671
+ movement: [mx],
3672
+ direction: [xDir],
3673
+ velocity
3674
+ }) => {
3675
+ const trigger = velocity > 0.2;
3676
+ const dir = xDir < 0 ? -1 : 1;
3677
+ if (!down && trigger) gone.add(index);
3678
+ api.start((i) => {
3679
+ if (index !== i) return;
3680
+ const isGone = gone.has(index);
3681
+ const x = isGone ? (200 + window.innerWidth) * dir : down ? mx : 0;
3682
+ const rot = mx / 100 + (isGone ? dir * 10 * velocity : 0);
3683
+ const scale = down ? 1.1 : 1;
3684
+ return {
3685
+ config: {
3686
+ friction: 50,
3687
+ tension: down ? 800 : isGone ? 200 : 500
3688
+ },
3689
+ delay: void 0,
3690
+ rot,
3691
+ scale,
3692
+ x
3693
+ };
3694
+ });
3695
+ if (!down && gone.size === cards.length)
3696
+ setTimeout(() => {
3697
+ gone.clear();
3698
+ api.start((i) => to(i));
3699
+ }, 600);
3700
+ });
3701
+ return /* @__PURE__ */ jsx39(Fragment7, { children: props.map(({
3702
+ x,
3703
+ y,
3704
+ rot,
3705
+ scale
3706
+ }, i) => /* @__PURE__ */ jsx39(
3707
+ animated2.div,
3708
+ {
3709
+ style: {
3710
+ alignItems: "center",
3711
+ display: "flex",
3712
+ height: "300px",
3713
+ justifyContent: "center",
3714
+ position: "absolute",
3715
+ touchAction: "none",
3716
+ width: "300px",
3717
+ willChange: "transform",
3718
+ x,
3719
+ y
3720
+ },
3721
+ children: /* @__PURE__ */ jsx39(
3722
+ animated2.div,
3723
+ {
3724
+ ...bind(i),
3725
+ style: {
3726
+ // WebkitBackdropFilter: 'blur(10px)',
3727
+ // backdropFilter: 'blur(10px)',
3728
+ backgroundColor: alpha6(theme.palette.background.paper, 0.2),
3729
+ backgroundPosition: "center center",
3730
+ backgroundRepeat: "no-repeat",
3731
+ backgroundSize: "auto 85%",
3732
+ borderRadius: " 10px",
3733
+ boxShadow: theme.shadows[7],
3734
+ height: "85vh",
3735
+ maxHeight: "300px",
3736
+ maxWidth: "300px",
3737
+ transform: interpolate([rot, scale], trans),
3738
+ width: "45vh",
3739
+ willChange: "transform"
3740
+ },
3741
+ children: cards[i]
3742
+ }
3743
+ )
3744
+ },
3745
+ i
3746
+ )) });
3747
+ }
3748
+ var StackOfWidgets = () => {
3749
+ return /* @__PURE__ */ jsx39(
3750
+ Box3,
3751
+ {
3752
+ sx: {
3753
+ alignItems: "center",
3754
+ cursor: "pointer",
3755
+ display: "flex",
3756
+ height: "300px",
3757
+ justifyContent: "center",
3758
+ width: "300px"
3759
+ },
3760
+ children: /* @__PURE__ */ jsx39(Deck, {})
3761
+ }
3762
+ );
3763
+ };
3764
+
3765
+ // src/components/Widgets/WidgetCardExamples.tsx
3766
+ import { jsx as jsx40, jsxs as jsxs20 } from "react/jsx-runtime";
3767
+ var WidgetCardExamples = () => {
3768
+ const { darkMode } = useColorSchemeEx4();
3769
+ return /* @__PURE__ */ jsx40(
3770
+ DappPage,
3771
+ {
3772
+ sx: { backgroundImage: darkMode ? `url(${default18})` : `url(${default19})`, backgroundSize: "cover" },
3773
+ container: "xl",
3774
+ title: "Example Widget Cards",
3775
+ children: /* @__PURE__ */ jsxs20(Stack2, { gap: 2, flexDirection: "row", flexWrap: "wrap", children: [
3776
+ /* @__PURE__ */ jsx40(ExampleTwoColTwoStatWidget, {}),
3777
+ /* @__PURE__ */ jsx40(ExampleBarGraphWidget, {}),
3778
+ /* @__PURE__ */ jsx40(ExampleBooleanTableWidget, {}),
3779
+ /* @__PURE__ */ jsx40(StackOfWidgets, {})
3780
+ ] })
3781
+ }
3782
+ );
3783
+ };
3784
+
3785
+ // src/DappPathSwitcher.tsx
3786
+ import { animated as animated3, useTransition } from "@react-spring/web";
3787
+ import { ErrorRender as ErrorRender4 } from "@xyo-network/react-error";
3788
+ import { Fragment as Fragment8, jsx as jsx41 } from "react/jsx-runtime";
3789
+ var DappPathSwitcher = ({ activePath, pathToComponent }) => {
3790
+ const transitions = useTransition(activePath, {
3791
+ enter: { opacity: 1, transform: "translate3d(0, 0, 0)" },
3792
+ from: { opacity: 0, transform: "translate3d(100vw, 0, 0)" },
3793
+ leave: { opacity: 0, transform: "translate3d(0, 0, 0)" }
3794
+ });
3795
+ const possibleZIndex = pathToComponent?.findIndex((item) => item.path === activePath);
3796
+ const zIndex = possibleZIndex !== -1 && possibleZIndex !== void 0 ? possibleZIndex : 1;
3797
+ return /* @__PURE__ */ jsx41(Fragment8, { children: transitions((transitionProps, activePath2) => /* @__PURE__ */ jsx41(
3798
+ animated3.div,
3799
+ {
3800
+ style: {
3801
+ ...transitionProps,
3802
+ alignItems: "stretch",
3803
+ bottom: 0,
3804
+ display: "flex",
3805
+ flexDirection: "column",
3806
+ justifyContent: "stretch",
3807
+ left: 0,
3808
+ overflowX: "hidden",
3809
+ overflowY: "auto",
3810
+ position: "absolute",
3811
+ right: 0,
3812
+ top: 0,
3813
+ zIndex
3814
+ },
3815
+ children: (() => {
3816
+ const activeIndex = pathToComponent?.findIndex(({ path: componentPath }) => activePath2 === componentPath);
3817
+ const activeItem = pathToComponent && activeIndex !== -1 && activeIndex !== void 0 ? pathToComponent[activeIndex] : void 0;
3818
+ return activeItem ? activeItem.component : /* @__PURE__ */ jsx41(ErrorRender4, { error: new Error(`No component found for path: ${activePath2}`), scope: "DappPathSwitcher" });
3819
+ })()
3820
+ }
3821
+ )) });
3822
+ };
3823
+
3824
+ // src/dapps/shared/accounts/components/AnimatedComponents/GenericAnimations/ShiftAnimation.tsx
3825
+ import { animated as animated4, useSpring as useSpring2 } from "@react-spring/web";
3826
+ import { useEffect as useEffect19, useState as useState18 } from "react";
3827
+ import { jsx as jsx42 } from "react/jsx-runtime";
3828
+ var MovementData = {
3829
+ down: [
3830
+ {
3831
+ FromYMovement: 0,
3832
+ ToYMovement: -3
3833
+ },
3834
+ {
3835
+ FromYMovement: -3,
3836
+ ToYMovement: 0
3837
+ }
3838
+ ],
3839
+ jump: [
3840
+ {
3841
+ FromYMovement: 0,
3842
+ ToYMovement: -3
3843
+ },
3844
+ {
3845
+ FromYMovement: -3,
3846
+ ToYMovement: 0
3847
+ }
3848
+ ],
3849
+ left: [
3850
+ {
3851
+ FromXMovement: 0,
3852
+ ToXMovement: -3
3853
+ },
3854
+ {
3855
+ FromXMovement: -3,
3856
+ ToXMovement: 0
3857
+ }
3858
+ ],
3859
+ right: [
3860
+ {
3861
+ FromXMovement: 0,
3862
+ ToXMovement: -3
3863
+ },
3864
+ {
3865
+ FromXMovement: -3,
3866
+ ToXMovement: 0
3867
+ }
3868
+ ],
3869
+ up: [
3870
+ {
3871
+ FromYMovement: 0,
3872
+ ToYMovement: -3
3873
+ },
3874
+ {
3875
+ FromYMovement: -3,
3876
+ ToYMovement: 0
3877
+ }
3878
+ ],
3879
+ wiggle: [
3880
+ {
3881
+ FromXMovement: 0,
3882
+ ToXMovement: -3
3883
+ },
3884
+ {
3885
+ FromXMovement: -3,
3886
+ ToXMovement: 0
3887
+ }
3888
+ ]
3889
+ };
3890
+ var ShiftAnimation = ({
3891
+ startAnimation = false,
3892
+ animationDirection,
3893
+ children
3894
+ }) => {
3895
+ const [isShifted, setIsShifted] = useState18(startAnimation);
3896
+ const anim = useSpring2({
3897
+ backfaceVisibility: "hidden",
3898
+ config: {
3899
+ friction: 10,
3900
+ tension: 300
3901
+ },
3902
+ from: {
3903
+ x: startAnimation ? MovementData[animationDirection][1].FromXMovement : 0,
3904
+ y: startAnimation ? MovementData[animationDirection][1].FromYMovement : 0
3905
+ },
3906
+ reset: true,
3907
+ to: {
3908
+ x: startAnimation ? MovementData[animationDirection][0].FromXMovement : 0,
3909
+ y: startAnimation ? MovementData[animationDirection][0].FromYMovement : 0
3910
+ }
3911
+ });
3912
+ useEffect19(() => {
3913
+ if (!isShifted) {
3914
+ return;
3915
+ }
3916
+ const timeoutId = window.setTimeout(() => {
3917
+ setIsShifted(false);
3918
+ }, 5);
3919
+ return () => {
3920
+ window.clearTimeout(timeoutId);
3921
+ };
3922
+ }, [isShifted]);
3923
+ return /* @__PURE__ */ jsx42(animated4.div, { style: anim, children });
3924
+ };
3925
+
3926
+ // src/dapps/shared/accounts/components/AnimatedComponents/IconAnimations/TwoToneBulletPoint.tsx
3927
+ import { FiberManualRecordRounded } from "@mui/icons-material";
3928
+ import {
3929
+ alpha as alpha7,
3930
+ Box as Box4,
3931
+ useTheme as useTheme10
3932
+ } from "@mui/material";
3933
+ import { jsx as jsx43 } from "react/jsx-runtime";
3934
+ var TwoToneBulletPoint = (props) => {
3935
+ const theme = useTheme10();
3936
+ return /* @__PURE__ */ jsx43(Box4, { ...props, children: /* @__PURE__ */ jsx43(
3937
+ FiberManualRecordRounded,
3938
+ {
3939
+ fontSize: "small",
3940
+ sx: {
3941
+ "&:hover": { padding: 0.2 },
3942
+ "backgroundColor": alpha7(theme.palette.secondary.main, 0.2),
3943
+ "borderRadius": 2,
3944
+ "padding": 0.4
3945
+ },
3946
+ color: "primary"
3947
+ }
3948
+ ) });
3949
+ };
3950
+
3951
+ // src/dapps/shared/accounts/components/AnimatedComponents/IconAnimations/TwoToneBulletPointList.tsx
3952
+ import { FlexCol as FlexCol16, FlexGrowRow as FlexGrowRow9 } from "@xylabs/react-flexbox";
3953
+ import { jsx as jsx44, jsxs as jsxs21 } from "react/jsx-runtime";
3954
+ var TwoToneBulletPointList = ({ list }) => {
3955
+ return /* @__PURE__ */ jsx44(FlexCol16, { alignItems: "flex-start", gap: 1, children: list.map((item, index) => {
3956
+ return /* @__PURE__ */ jsxs21(FlexGrowRow9, { alignItems: "flex-start", justifyContent: "flex-start", gap: 1, children: [
3957
+ /* @__PURE__ */ jsx44(TwoToneBulletPoint, { marginTop: "4px" }),
3958
+ item
3959
+ ] }, index + "bulletPointList");
3960
+ }) });
3961
+ };
3962
+
3963
+ // src/dapps/shared/accounts/components/InputFields/CoinbaseEmail.tsx
3964
+ import { FormControl, TextField } from "@mui/material";
3965
+ import { LabeledTextFieldWrapper } from "@xyo-network/react-shared";
3966
+ import { useState as useState19 } from "react";
3967
+ import { jsx as jsx45 } from "react/jsx-runtime";
3968
+ var CoinbaseEmailInput = ({ existingEmail, ...props }) => {
3969
+ const [email, setEmail] = useState19(existingEmail);
3970
+ const [valid, setValid] = useState19();
3971
+ const handleBlur = (event) => {
3972
+ setValid(!!event.target.value);
3973
+ };
3974
+ const handleChange = (event) => {
3975
+ const emailFromEvent = event.target.value;
3976
+ setValid(!!emailFromEvent);
3977
+ setEmail(emailFromEvent);
3978
+ };
3979
+ return /* @__PURE__ */ jsx45(FormControl, { fullWidth: true, children: /* @__PURE__ */ jsx45(LabeledTextFieldWrapper, { label: "Primary Cryptowallet", children: /* @__PURE__ */ jsx45(
3980
+ TextField,
3981
+ {
3982
+ fullWidth: true,
3983
+ variant: "filled",
3984
+ error: valid === false,
3985
+ hiddenLabel: true,
3986
+ onBlur: handleBlur,
3987
+ value: email,
3988
+ onChange: handleChange,
3989
+ size: "small",
3990
+ ...props
3991
+ }
3992
+ ) }) });
3993
+ };
3994
+
3995
+ // src/dapps/shared/accounts/components/InputFields/PrimaryCryptowallet.tsx
3996
+ import { FormControl as FormControl2, TextField as TextField2 } from "@mui/material";
3997
+ import { LabeledTextFieldWrapper as LabeledTextFieldWrapper2 } from "@xyo-network/react-shared";
3998
+ import { useState as useState20 } from "react";
3999
+ import { jsx as jsx46 } from "react/jsx-runtime";
4000
+ var PrimaryCryptoWalletInput = ({ existingPrimaryCryptoWallet, ...props }) => {
4001
+ const [primaryWallet, setPrimaryWallet] = useState20(existingPrimaryCryptoWallet);
4002
+ const [valid, setValid] = useState20();
4003
+ const handleBlur = (event) => {
4004
+ setValid(!!event.target.value);
4005
+ };
4006
+ const handleChange = (event) => {
4007
+ const nameFromEvent = event.target.value;
4008
+ setValid(!!nameFromEvent);
4009
+ setPrimaryWallet(nameFromEvent);
4010
+ };
4011
+ return /* @__PURE__ */ jsx46(FormControl2, { fullWidth: true, children: /* @__PURE__ */ jsx46(LabeledTextFieldWrapper2, { label: "Primary Cryptowallet", children: /* @__PURE__ */ jsx46(
4012
+ TextField2,
4013
+ {
4014
+ fullWidth: true,
4015
+ variant: "filled",
4016
+ error: valid === false,
4017
+ hiddenLabel: true,
4018
+ onBlur: handleBlur,
4019
+ value: primaryWallet,
4020
+ onChange: handleChange,
4021
+ size: "small",
4022
+ required: true,
4023
+ ...props
4024
+ }
4025
+ ) }) });
4026
+ };
4027
+
4028
+ // src/dapps/shared/accounts/components/InputFields/SecondaryCryptowallet.tsx
4029
+ import { FormControl as FormControl3, TextField as TextField3 } from "@mui/material";
4030
+ import { LabeledTextFieldWrapper as LabeledTextFieldWrapper3 } from "@xyo-network/react-shared";
4031
+ import { useState as useState21 } from "react";
4032
+ import { jsx as jsx47 } from "react/jsx-runtime";
4033
+ var SecondaryCryptoWalletInput = ({ existingSecondaryCryptoWallet, ...props }) => {
4034
+ const [secondaryWallet, setSecondaryWallet] = useState21(existingSecondaryCryptoWallet);
4035
+ const [valid, setValid] = useState21();
4036
+ const handleBlur = (event) => {
4037
+ setValid(!!event.target.value);
4038
+ };
4039
+ const handleChange = (event) => {
4040
+ const walletFromEvent = event.target.value;
4041
+ setValid(!!walletFromEvent);
4042
+ setSecondaryWallet(walletFromEvent);
4043
+ };
4044
+ return /* @__PURE__ */ jsx47(FormControl3, { fullWidth: true, children: /* @__PURE__ */ jsx47(LabeledTextFieldWrapper3, { label: "Secondary Cryptowallet", children: /* @__PURE__ */ jsx47(
4045
+ TextField3,
4046
+ {
4047
+ variant: "filled",
4048
+ fullWidth: true,
4049
+ error: valid === false,
4050
+ hiddenLabel: true,
4051
+ onBlur: handleBlur,
4052
+ value: secondaryWallet,
4053
+ onChange: handleChange,
4054
+ size: "small",
4055
+ required: true,
4056
+ ...props
4057
+ }
4058
+ ) }) });
4059
+ };
4060
+
4061
+ // src/dapps/shared/accounts/components/PaymentMethods.tsx
4062
+ import { Grid } from "@mui/material";
4063
+ import { FormGroupCreditCardProvider } from "@xyo-network/react-form-credit-card";
4064
+
4065
+ // src/dapps/shared/accounts/components/AccountCard.tsx
4066
+ import {
4067
+ Card as Card3,
4068
+ CardContent as CardContent4,
4069
+ Divider as Divider5,
4070
+ Typography as Typography13
4071
+ } from "@mui/material";
4072
+ import { FlexGrowCol as FlexGrowCol4, FlexGrowRow as FlexGrowRow10 } from "@xylabs/react-flexbox";
4073
+ import { jsx as jsx48, jsxs as jsxs22 } from "react/jsx-runtime";
4074
+ var AccountCard = ({ items, ...props }) => {
4075
+ return /* @__PURE__ */ jsx48(Card3, { ...props, children: /* @__PURE__ */ jsx48(CardContent4, { children: /* @__PURE__ */ jsx48(FlexGrowCol4, { width: "100%", gap: 2, children: items.map((item, index) => {
4076
+ return /* @__PURE__ */ jsxs22(FlexGrowCol4, { gap: 2, width: "100%", alignItems: "stretch", children: [
4077
+ /* @__PURE__ */ jsxs22(
4078
+ FlexGrowRow10,
4079
+ {
4080
+ sx: {
4081
+ alignItems: "stretch",
4082
+ flexDirection: { md: "row", xs: "column" },
4083
+ justifyContent: "space-between"
4084
+ },
4085
+ gap: 2,
4086
+ children: [
4087
+ /* @__PURE__ */ jsxs22(
4088
+ FlexGrowCol4,
4089
+ {
4090
+ alignItems: "flex-start",
4091
+ width: "100%",
4092
+ sx: { maxWidth: { md: "40%", xs: "100%" } },
4093
+ children: [
4094
+ /* @__PURE__ */ jsx48(Typography13, { variant: "h5", gutterBottom: true, children: item.title }),
4095
+ /* @__PURE__ */ jsx48(Typography13, { variant: "body1", gutterBottom: true, children: item.desc })
4096
+ ]
4097
+ }
4098
+ ),
4099
+ item?.component
4100
+ ]
4101
+ }
4102
+ ),
4103
+ items.length === 1 || index === items.length - 1 ? null : /* @__PURE__ */ jsx48(Divider5, { flexItem: true })
4104
+ ] }, index);
4105
+ }) }) }) });
4106
+ };
4107
+
4108
+ // src/dapps/shared/accounts/components/PaymentMethods.tsx
4109
+ import { Fragment as Fragment9, jsx as jsx49 } from "react/jsx-runtime";
4110
+ var PaymentMethods = () => {
4111
+ return /* @__PURE__ */ jsx49(DappPage, { title: "Payment Methods", children: /* @__PURE__ */ jsx49(Grid, { container: true, spacing: 3, children: /* @__PURE__ */ jsx49(Grid, { item: true, xs: 12, children: /* @__PURE__ */ jsx49(
4112
+ AccountCard,
4113
+ {
4114
+ sx: { height: "100%" },
4115
+ items: [
4116
+ {
4117
+ // TODO - needs a default implementation
4118
+ component: /* @__PURE__ */ jsx49(FormGroupCreditCardProvider, { children: /* @__PURE__ */ jsx49(Fragment9, {}) }),
4119
+ desc: "Save a credit card to your node to complete credit payments seamlessly.",
4120
+ title: "Credit Card"
4121
+ },
4122
+ {
4123
+ component: /* @__PURE__ */ jsx49(CoinbaseEmailInput, {}),
4124
+ desc: "Use your Coinbase Account receive payments easily.",
4125
+ title: "Coinbase Email"
4126
+ },
4127
+ {
4128
+ component: /* @__PURE__ */ jsx49(PrimaryCryptoWalletInput, {}),
4129
+ desc: "This is the primary crypto wallet on your node.",
4130
+ title: "Primary Crypto Wallet"
4131
+ },
4132
+ {
4133
+ component: /* @__PURE__ */ jsx49(SecondaryCryptoWalletInput, {}),
4134
+ desc: "This is the secondary crypto wallet on your node.",
4135
+ title: "Secondary Crypto Wallet"
4136
+ }
4137
+ ]
4138
+ }
4139
+ ) }) }) });
4140
+ };
4141
+
4142
+ // src/dapps/shared/accounts/models/CreditCardInput.ts
4143
+ import { isPayloadOfSchemaTypeWithMeta } from "@xyo-network/payload-model";
4144
+ var CreditCardInputSchema = "network.xyo.credit.card.input";
4145
+ var isCreditCardInput = isPayloadOfSchemaTypeWithMeta(CreditCardInputSchema);
4146
+
4147
+ // src/dapps/shared/name-service/DomainIcon.tsx
4148
+ import { createSvgIcon } from "@mui/material";
4149
+ import { jsx as jsx50 } from "react/jsx-runtime";
4150
+ var XnsDomainIcon = createSvgIcon(
4151
+ /* @__PURE__ */ jsx50("svg", { id: "Layer_1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 400 400", children: /* @__PURE__ */ jsx50(
4152
+ "path",
4153
+ {
4154
+ fill: "currentColor",
4155
+ d: "M384.67,118.15c-10.22-25.59-24.44-47.14-42.66-64.65-18.21-17.5-39.36-30.79-63.45-39.86C254.48,4.58,228.67.04,201.11.04c-33.77,0-63.36,5.25-88.78,15.73-25.41,10.49-46.56,24.71-63.45,42.66-16.89,17.95-29.42,38.43-37.6,61.45C3.11,142.91-.62,166.94.08,192c.89,34.48,8.09,60.92,21.6,79.32,13.51,18.4,34.48,27.59,62.92,27.59,8.72,0,17.01-1.23,24.93-3.53v4.75c0,2.43,1.96,4.39,4.39,4.39h37.48c2.43,0,4.39-1.96,4.39-4.39v-115.59l76.94,117.99c.81,1.24,2.19,1.99,3.68,1.99h37.47c2.43,0,4.39-1.96,4.39-4.39V104.6c0-2.43-1.96-4.39-4.39-4.39h-37.47c-2.43,0-4.39,1.96-4.39,4.39v115.59l-76.94-117.99c-.81-1.24-2.19-1.99-3.68-1.99h-37.48c-2.43,0-4.39,1.96-4.39,4.39v135.87c-.62,1.06-1.28,2.06-2,2.99-5.33,6.93-13.24,10.39-23.73,10.39-9.24,0-16.4-2.62-21.46-7.86-5.06-5.24-8.62-12.4-10.66-21.46-2.04-9.06-3.24-19.46-3.6-31.19-.54-27.55,3.55-50.75,12.26-69.59,8.71-18.83,20.49-34.08,35.32-45.72,14.85-11.64,31.15-20.09,48.93-25.33,17.77-5.24,35.46-7.86,53.06-7.86,24.89,0,47.01,3.96,66.38,11.86,19.37,7.91,35.68,19.02,48.92,33.33,13.25,14.31,23.2,31.19,29.86,50.65,6.67,19.46,9.83,40.84,9.47,64.12-.7,23.11-4.89,43.9-12.53,62.39-7.64,18.49-18.31,34.31-32,47.46-13.69,13.15-29.86,23.19-48.52,30.13-18.66,6.93-39.1,10.4-61.32,10.4-12.44,0-24.83-1.38-37.19-4.13-8.79-1.96-17.06-4.49-24.81-7.57-5.09-2.02-10.82.46-12.7,5.61l-8.56,23.42c-1.79,4.91.65,10.33,5.49,12.31,11.06,4.53,22.55,8.02,34.45,10.49,15.02,3.11,30.26,4.66,45.73,4.66,28.97,0,55.63-4.8,79.98-14.4,24.36-9.59,45.51-23.15,63.46-40.66,17.95-17.5,31.81-38.08,41.59-61.72,9.77-23.64,14.66-49.32,14.66-77.05,0-33.06-5.11-62.39-15.33-87.98Z"
4156
+ }
4157
+ ) }),
4158
+ "XNSDomain"
4159
+ );
4160
+
4161
+ // src/dapps/shared/table/head/components/Head.tsx
4162
+ import { InfoOutlined } from "@mui/icons-material";
4163
+ import {
4164
+ TableCell,
4165
+ TableHead,
4166
+ Tooltip as Tooltip5
4167
+ } from "@mui/material";
4168
+
4169
+ // src/dapps/shared/table/head/hooks/useVisibleColumns.tsx
4170
+ import { useMediaQuery as useMediaQuery2 } from "@mui/material";
4171
+ import { useMemo as useMemo17 } from "react";
4172
+ var useVisibleColumns = (tableHeadCells) => {
4173
+ const isMedium = useMediaQuery2((theme) => theme.breakpoints.down("lg"));
4174
+ const VisibleTableCells = useMemo17(() => {
4175
+ return isMedium ? tableHeadCells.filter((cell) => cell.showOnMobile) : tableHeadCells;
4176
+ }, [isMedium, tableHeadCells]);
4177
+ return [VisibleTableCells, isMedium];
4178
+ };
4179
+
4180
+ // src/dapps/shared/table/head/components/StyledTableRowHeader.tsx
4181
+ import { styled as styled9, TableRow as TableRow2 } from "@mui/material";
4182
+ var StyledTableRowHeader = styled9(
4183
+ TableRow2,
4184
+ { name: "StyledTableRowHeader" }
4185
+ )(({ theme }) => ({ "& .MuiTableCell-root": { backgroundColor: theme.palette.background.paper } }));
4186
+
4187
+ // src/dapps/shared/table/head/components/Head.tsx
4188
+ import { jsx as jsx51, jsxs as jsxs23 } from "react/jsx-runtime";
4189
+ var TableHeadEx = ({ payloads, ...props }) => {
4190
+ const [VisibleTableCells] = useVisibleColumns(payloads);
4191
+ return /* @__PURE__ */ jsx51(TableHead, { ...props, children: /* @__PURE__ */ jsx51(StyledTableRowHeader, { children: VisibleTableCells.map((headCell) => /* @__PURE__ */ jsx51(
4192
+ TableCell,
4193
+ {
4194
+ align: headCell.align ?? "left",
4195
+ padding: headCell.disablePadding ? "none" : "normal",
4196
+ width: headCell.width ?? "auto",
4197
+ children: headCell.tooltip ? /* @__PURE__ */ jsxs23(
4198
+ "span",
4199
+ {
4200
+ style: {
4201
+ alignItems: "center",
4202
+ display: "inline-flex",
4203
+ gap: "4px"
4204
+ },
4205
+ children: [
4206
+ headCell.label,
4207
+ /* @__PURE__ */ jsx51(Tooltip5, { title: headCell.tooltip, children: /* @__PURE__ */ jsx51(InfoOutlined, { sx: { fontSize: "16px" } }) })
4208
+ ]
4209
+ }
4210
+ ) : headCell.label
4211
+ },
4212
+ headCell.id
4213
+ )) }) });
4214
+ };
4215
+
4216
+ // src/dapps/shared/table/head/Payload.ts
4217
+ import { isPayloadOfSchemaType } from "@xyo-network/payload-model";
4218
+
4219
+ // src/dapps/shared/table/head/Schema.ts
4220
+ var TableHeadCellSchema = "network.xyo.table.cell.head";
4221
+
4222
+ // src/dapps/shared/table/head/Payload.ts
4223
+ var isTableHeadCell = isPayloadOfSchemaType(TableHeadCellSchema);
4224
+
4225
+ // src/dapps/shared/table/NextIteratorFlexbox.tsx
4226
+ import { ArrowCircleLeftOutlined, ArrowCircleRightOutlined } from "@mui/icons-material";
4227
+ import { IconButton as IconButton4, LinearProgress as LinearProgress2 } from "@mui/material";
4228
+ import { FlexRow as FlexRow9 } from "@xylabs/react-flexbox";
4229
+ import { jsx as jsx52, jsxs as jsxs24 } from "react/jsx-runtime";
4230
+ var NextIteratorFlexbox = ({
4231
+ next: changePage,
4232
+ loading,
4233
+ ...props
4234
+ }) => {
4235
+ return /* @__PURE__ */ jsxs24(FlexRow9, { justifyContent: "space-between", gap: 2, ...props, children: [
4236
+ /* @__PURE__ */ jsx52(
4237
+ LinearProgress2,
4238
+ {
4239
+ sx: {
4240
+ display: "flex",
4241
+ flexGrow: 1,
4242
+ visibility: loading ? "visible" : "hidden"
4243
+ }
4244
+ }
4245
+ ),
4246
+ /* @__PURE__ */ jsxs24(FlexRow9, { children: [
4247
+ /* @__PURE__ */ jsx52(IconButton4, { onClick: () => {
4248
+ changePage("asc").catch(console.error);
4249
+ }, children: /* @__PURE__ */ jsx52(ArrowCircleLeftOutlined, {}) }),
4250
+ /* @__PURE__ */ jsx52(IconButton4, { onClick: () => {
4251
+ changePage("desc").catch(console.error);
4252
+ }, children: /* @__PURE__ */ jsx52(ArrowCircleRightOutlined, {}) })
4253
+ ] })
4254
+ ] });
4255
+ };
4256
+
4257
+ // src/settings/Theme/ThemeProvider.tsx
4258
+ import { InvertibleCssVarsProvider } from "@xylabs/react-invertible-theme";
4259
+ import { useMemo as useMemo18 } from "react";
4260
+
4261
+ // src/settings/Theme/ThemeCssVars.ts
4262
+ import {
4263
+ alpha as alpha8,
4264
+ darken,
4265
+ experimental_extendTheme as extendTheme,
4266
+ lighten
4267
+ } from "@mui/material";
4268
+ var defaultIconBackground = "#A060E0";
4269
+ var defaultIconBackgroundHover = "#bdade8";
4270
+ var DynamicIconBgGradientBuilder = {
4271
+ iconBgGradientBuilder: (baseColor) => `linear-gradient(148deg, ${baseColor} 0%, ${darken(baseColor, 0.3)} 100%);`,
4272
+ iconBgHoverGradientBuilder: (baseColor) => `linear-gradient(148deg, ${lighten(baseColor, 0.5)} 0%, ${lighten(baseColor, 0.2)} 100%);`
4273
+ };
4274
+ var StaticIconBgGradient = {
4275
+ iconGradient: `linear-gradient(148deg, ${defaultIconBackground} 0%, ${darken(defaultIconBackground, 0.35)} 100%);`,
4276
+ iconGradientHover: `linear-gradient(148deg, ${defaultIconBackgroundHover} 0%, ${darken(defaultIconBackgroundHover, 0.35)} 100%);`
4277
+ };
4278
+ var lightPalette = {
4279
+ background: {
4280
+ default: "#F4F4F4",
4281
+ paper: "#FFFFFF"
4282
+ },
4283
+ error: {
4284
+ dark: "#AA0E0E",
4285
+ light: "#F15555",
4286
+ main: "#D81111"
4287
+ },
4288
+ ...DynamicIconBgGradientBuilder,
4289
+ ...StaticIconBgGradient,
4290
+ primary: { main: "#100029" },
4291
+ secondary: { main: "#A060E0" },
4292
+ success: {
4293
+ dark: "#347f21",
4294
+ light: "#94dd80",
4295
+ main: "#62bc50"
4296
+ },
4297
+ text: {
4298
+ disabled: "#49454D",
4299
+ primary: "#1D1B1E",
4300
+ secondary: "#49454D"
4301
+ },
4302
+ warning: { main: "#ffc805" }
4303
+ };
4304
+ var darkPalette = {
4305
+ background: {
4306
+ default: "#121212",
4307
+ paper: "#1E1E1E"
4308
+ },
4309
+ error: { main: "#ffb4ab" },
4310
+ success: { main: "#94dd80" },
4311
+ ...DynamicIconBgGradientBuilder,
4312
+ ...StaticIconBgGradient,
4313
+ primary: { main: "#C9BFFA" },
4314
+ secondary: { main: "#C9C3DA" },
4315
+ text: {
4316
+ disabled: "#a5acdb",
4317
+ primary: "#F4F4F4",
4318
+ secondary: "#daddf2"
4319
+ }
4320
+ };
4321
+ var ThemeCssVars = extendTheme({
4322
+ colorSchemes: {
4323
+ dark: { palette: darkPalette },
4324
+ light: { palette: lightPalette }
4325
+ },
4326
+ components: {
4327
+ MuiAccordion: {
4328
+ styleOverrides: {
4329
+ root: {
4330
+ "&.Mui-expanded": { "&$expanded": { margin: "4px 0" } },
4331
+ "boxShadow": "none"
4332
+ }
4333
+ }
4334
+ },
4335
+ MuiAccordionSummary: { styleOverrides: { root: { boxShadow: "none" } } },
4336
+ MuiAppBar: {
4337
+ styleOverrides: {
4338
+ root: ({ theme }) => ({
4339
+ WebkitBackdropFilter: "blur(20px)",
4340
+ backdropFilter: "blur(20px)",
4341
+ backgroundColor: alpha8(theme.palette.background.paper, 0.2),
4342
+ boxShadow: "none",
4343
+ color: "#1D1B1E",
4344
+ [theme.getColorSchemeSelector("dark")]: { color: "#CBC4CE" }
4345
+ })
4346
+ }
4347
+ },
4348
+ MuiCard: {
4349
+ defaultProps: { elevation: 0 },
4350
+ styleOverrides: {
4351
+ root: ({ theme }) => ({
4352
+ WebkitBackdropFilter: "blur(20px)",
4353
+ backdropFilter: "blur(20px)",
4354
+ backgroundColor: alpha8(theme.palette.background.paper, 0.7),
4355
+ display: "flex",
4356
+ flexDirection: "column",
4357
+ justifyContent: "space-between"
4358
+ })
4359
+ }
4360
+ },
4361
+ MuiCardContent: {
4362
+ styleOverrides: {
4363
+ root: {
4364
+ // This is to get rid of the extra padding at the end of Card Content that misaligns padding when there's only 1 item
4365
+ "&:last-child": { paddingBottom: "16px" }
4366
+ }
4367
+ }
4368
+ },
4369
+ MuiCardHeader: {
4370
+ styleOverrides: {
4371
+ content: {
4372
+ display: "flex",
4373
+ flexDirection: "column",
4374
+ overflow: "hidden"
4375
+ }
4376
+ }
4377
+ },
4378
+ MuiChip: {
4379
+ styleOverrides: {
4380
+ root: {
4381
+ borderRadius: 4,
4382
+ fontWeight: 400
4383
+ }
4384
+ }
4385
+ },
4386
+ MuiContainer: { styleOverrides: { root: { maxWidth: "xl" } } },
4387
+ MuiFilledInput: {
4388
+ defaultProps: { disableUnderline: true },
4389
+ styleOverrides: {
4390
+ root: ({ theme }) => ({
4391
+ "&.Mui-error": { border: `${theme.palette.error.main} 1px solid` },
4392
+ "border": "transparent 1px solid",
4393
+ "borderRadius": theme.shape.borderRadius
4394
+ })
4395
+ }
4396
+ },
4397
+ MuiLink: {
4398
+ defaultProps: { underline: "none" },
4399
+ styleOverrides: { root: { "&:hover": { filter: "brightness(75%)" } } }
4400
+ },
4401
+ MuiPaper: { defaultProps: { elevation: 0 } },
4402
+ MuiTableCell: {
4403
+ styleOverrides: {
4404
+ body: {
4405
+ fontFamily: "monospace",
4406
+ whiteSpace: "nowrap"
4407
+ },
4408
+ head: {
4409
+ fontWeight: 700,
4410
+ whiteSpace: "nowrap"
4411
+ }
4412
+ }
4413
+ }
4414
+ },
4415
+ spacing: 12,
4416
+ typography: {
4417
+ allVariants: { fontFamily: ["Manrope", "san-serif"].join(",") },
4418
+ body1: {
4419
+ fontSize: "16px",
4420
+ fontWeight: 400
4421
+ },
4422
+ button: {
4423
+ fontSize: "1rem",
4424
+ fontWeight: 500,
4425
+ textTransform: "capitalize"
4426
+ },
4427
+ fontWeightBold: 700,
4428
+ fontWeightLight: 300,
4429
+ fontWeightMedium: 600,
4430
+ fontWeightRegular: 500,
4431
+ h1: { fontSize: "3.2rem" },
4432
+ h2: { fontSize: "2.7rem" },
4433
+ h3: { fontSize: "2.24rem" },
4434
+ h4: { fontSize: "2rem" },
4435
+ h5: { fontSize: "1.5rem" },
4436
+ h6: { fontSize: "1.2rem" },
4437
+ subtitle1: {
4438
+ fontWeight: 300,
4439
+ opacity: "50%",
4440
+ textTransform: "uppercase"
4441
+ },
4442
+ subtitle2: { opacity: "50%" }
4443
+ }
4444
+ });
4445
+
4446
+ // src/settings/Theme/ThemeProvider.tsx
4447
+ import { jsx as jsx53 } from "react/jsx-runtime";
4448
+ var AppOsThemeProvider = ({ children }) => {
4449
+ const initialValue = useMemo18(() => {
4450
+ const validValues = ["light", "dark"];
4451
+ const savedValue = localStorage.getItem("mui-mode");
4452
+ if (savedValue && validValues.includes(savedValue)) return savedValue;
4453
+ return "system";
4454
+ }, []);
4455
+ return /* @__PURE__ */ jsx53(InvertibleCssVarsProvider, { theme: ThemeCssVars, defaultMode: initialValue, children });
4456
+ };
4457
+
4458
+ // src/StyledBuilder.tsx
4459
+ import { styled as styled10 } from "@mui/material";
4460
+ var StyledDappIconBuilder = (DappIcon) => styled10(DappIcon, {
4461
+ name: "StyledDappIcon",
4462
+ shouldForwardProp: (key) => !["iconSize"].includes(key)
4463
+ })(({ iconSize, theme }) => ({
4464
+ color: theme.palette.text.primary,
4465
+ height: iconSize,
4466
+ width: iconSize
4467
+ }));
4468
+ export {
4469
+ AppOsThemeProvider,
4470
+ BridgeActivityHelper,
4471
+ BrowserLocator,
4472
+ CoinbaseEmailInput,
4473
+ ContainerFlexbox,
4474
+ CreditCardInputSchema,
4475
+ CustomerParams,
4476
+ DappAccessDialog,
4477
+ DappAccessFlexbox,
4478
+ DappAccessRequestResourceHooks,
4479
+ DappBar,
4480
+ DappBottomNavigation,
4481
+ DappChrome,
4482
+ DappChromeLarge,
4483
+ DappContainer,
4484
+ DappInstallTypeFilters,
4485
+ DappIntentResourceHooks,
4486
+ DappMenuDrawer,
4487
+ DappMenuResourceHooks,
4488
+ DappPage,
4489
+ DappPathSwitcher,
4490
+ DappTitle,
4491
+ DappWindow,
4492
+ DappsRow,
4493
+ DebugDialog,
4494
+ DebugDialogWithNode,
4495
+ DefaultComingSoon,
4496
+ EmptyDappBarForPadding,
4497
+ ErrorRenderWithSupport,
4498
+ ErrorRenderWithSupportDefault,
4499
+ GenericPayloadDivinerTags,
4500
+ LazyDebug,
4501
+ LoadingOsLogo,
4502
+ NameServiceRegistrationHooks,
4503
+ NetworkButton,
4504
+ NetworkLoadingIndicator,
4505
+ NetworkReadyFlexBox,
4506
+ NextIteratorFlexbox,
4507
+ OsPalettes,
4508
+ PaymentMethods,
4509
+ PrimaryCryptoWalletInput,
4510
+ RenderHtml,
4511
+ ResourceHooks,
4512
+ SecondaryCryptoWalletInput,
4513
+ ShiftAnimation,
4514
+ StyledDappIconBuilder,
4515
+ StyledGridContainer,
4516
+ TableHeadCellSchema,
4517
+ TableHeadEx,
4518
+ TwoToneBulletPoint,
4519
+ TwoToneBulletPointList,
4520
+ UpperWidgetTrayLayout,
4521
+ WidgetCaller,
4522
+ WidgetCard,
4523
+ WidgetCardExamples,
4524
+ XnsDomainIcon,
4525
+ XyOsBrowserMonitor,
4526
+ XyOsUi,
4527
+ XyOsUiContext,
4528
+ XyOsUiContextProvider,
4529
+ getApiDomain,
4530
+ getNodePaletteByNameCode,
4531
+ isCreditCardInput,
4532
+ isTableHeadCell,
4533
+ useAccountArchivist,
4534
+ useAddDappMenuItems,
4535
+ useBios,
4536
+ useBuildDappAccessRequestResource,
4537
+ useBuildDappMenuResource,
4538
+ useBuildIntentResource,
4539
+ useBuildNameServiceRegistrationsResource,
4540
+ useBuildNameServiceRegistrationsResourceViews,
4541
+ useCleanUpResource,
4542
+ useClearIntents,
4543
+ useDappAccessRequestResourceViews,
4544
+ useDappCaller,
4545
+ useDappContextCreator,
4546
+ useDappIntentCaller,
4547
+ useDappIntentListener,
4548
+ useDappIntentListener2,
4549
+ useDappMenu,
4550
+ useDappMenuCaller,
4551
+ useDappRegistrationResults,
4552
+ useDappRegistry,
4553
+ useDappSeedPhraseRepository,
4554
+ useDappState,
4555
+ useDebugClick,
4556
+ useDecomposeDappSet,
4557
+ useDetectCustomer,
4558
+ useDialogState,
4559
+ useExposedNode,
4560
+ useIntentResourceViews,
4561
+ useKernel,
4562
+ useManageDappBasedOffRoute,
4563
+ useManageDappInjectableParamsFromRoute,
4564
+ useManageDappIntentRequest,
4565
+ useManageDappPathFromRoute,
4566
+ useManageDappStateFromRoute,
4567
+ useMenuResourceViews,
4568
+ useNavigateIntent,
4569
+ useOnWindowResize,
4570
+ useOsNetwork,
4571
+ useOsSettingsCaller,
4572
+ usePhraseFile,
4573
+ useSendDappIntent,
4574
+ useSkipLoadingScreen,
4575
+ useStackReady,
4576
+ useSyncExternalPayloadStore,
4577
+ useSyncOsRegisteredAccessInterfaces,
4578
+ useTabs,
4579
+ useVisibleColumns,
4580
+ useWidgetDapps,
4581
+ useXyOsUiContext,
4582
+ useXyoPublicNetwork
4583
+ };
4584
+ //# sourceMappingURL=index.mjs.map