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