@getpara/react-sdk 2.0.0-dev.3 → 2.0.0-dev.5

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 (344) hide show
  1. package/dist/cosmos/actions/getCosmjsAminoSigner.d.ts +8 -0
  2. package/dist/cosmos/actions/getCosmjsAminoSigner.js +16 -0
  3. package/dist/cosmos/actions/getCosmjsProtoSigner.d.ts +8 -0
  4. package/dist/cosmos/actions/getCosmjsProtoSigner.js +16 -0
  5. package/dist/cosmos/actions/index.d.ts +2 -0
  6. package/dist/cosmos/actions/index.js +3 -0
  7. package/dist/cosmos/hooks/index.d.ts +2 -0
  8. package/dist/cosmos/hooks/index.js +3 -0
  9. package/dist/cosmos/hooks/useCosmjsAminoSigner.d.ts +11 -0
  10. package/dist/cosmos/hooks/useCosmjsAminoSigner.js +37 -0
  11. package/dist/cosmos/hooks/useCosmjsProtoSigner.d.ts +11 -0
  12. package/dist/cosmos/hooks/useCosmjsProtoSigner.js +37 -0
  13. package/dist/cosmos/index.d.ts +2 -0
  14. package/dist/cosmos/index.js +3 -0
  15. package/dist/css/modal.css +14 -1
  16. package/dist/evm/actions/getViemAccount.d.ts +22 -0
  17. package/dist/evm/actions/getViemAccount.js +20 -0
  18. package/dist/evm/actions/getViemClient.d.ts +7659 -0
  19. package/dist/evm/actions/getViemClient.js +25 -0
  20. package/dist/evm/actions/index.d.ts +2 -0
  21. package/dist/evm/actions/index.js +3 -0
  22. package/dist/evm/hooks/index.d.ts +2 -0
  23. package/dist/evm/hooks/index.js +3 -0
  24. package/dist/evm/hooks/useViemAccount.d.ts +26 -0
  25. package/dist/evm/hooks/useViemAccount.js +32 -0
  26. package/dist/evm/hooks/useViemClient.d.ts +7663 -0
  27. package/dist/evm/hooks/useViemClient.js +30 -0
  28. package/dist/evm/index.d.ts +2 -0
  29. package/dist/evm/index.js +3 -0
  30. package/dist/index.d.ts +3 -5
  31. package/dist/index.js +4 -4
  32. package/dist/provider/ParaProvider.d.ts +1 -2
  33. package/dist/provider/ParaProvider.js +13 -106
  34. package/dist/public/PPMori-Regular.woff2 +0 -0
  35. package/dist/public/PPMori-SemiBold.woff2 +0 -0
  36. package/dist/solana/actions/getSolanaSigner.d.ts +8 -0
  37. package/dist/solana/actions/getSolanaSigner.js +15 -0
  38. package/dist/solana/actions/index.d.ts +1 -0
  39. package/dist/solana/actions/index.js +2 -0
  40. package/dist/solana/hooks/index.d.ts +1 -0
  41. package/dist/solana/hooks/index.js +2 -0
  42. package/dist/solana/hooks/useSolanaSigner.d.ts +12 -0
  43. package/dist/solana/hooks/useSolanaSigner.js +32 -0
  44. package/dist/solana/index.d.ts +2 -0
  45. package/dist/solana/index.js +3 -0
  46. package/package.json +19 -29
  47. package/styles.css/package.json +1 -1
  48. package/dist/cli/cli.mjs +0 -50
  49. package/dist/modal/ParaModal.d.ts +0 -2
  50. package/dist/modal/ParaModal.js +0 -301
  51. package/dist/modal/components/Account/Account.d.ts +0 -5
  52. package/dist/modal/components/Account/Account.js +0 -148
  53. package/dist/modal/components/Account/AccountProfile.d.ts +0 -1
  54. package/dist/modal/components/Account/AccountProfile.js +0 -168
  55. package/dist/modal/components/Account/AccountProfileLink.d.ts +0 -1
  56. package/dist/modal/components/Account/AccountProfileLink.js +0 -206
  57. package/dist/modal/components/Account/AccountProfileLinkOptions.d.ts +0 -1
  58. package/dist/modal/components/Account/AccountProfileLinkOptions.js +0 -111
  59. package/dist/modal/components/Account/AccountProfileUnlink.d.ts +0 -1
  60. package/dist/modal/components/Account/AccountProfileUnlink.js +0 -47
  61. package/dist/modal/components/AddFunds/AddFunds.d.ts +0 -1
  62. package/dist/modal/components/AddFunds/AddFunds.js +0 -69
  63. package/dist/modal/components/AddFunds/AddFundsAsset.d.ts +0 -1
  64. package/dist/modal/components/AddFunds/AddFundsAsset.js +0 -125
  65. package/dist/modal/components/AddFunds/AddFundsAwaiting.d.ts +0 -1
  66. package/dist/modal/components/AddFunds/AddFundsAwaiting.js +0 -78
  67. package/dist/modal/components/AddFunds/AddFundsContext.d.ts +0 -31
  68. package/dist/modal/components/AddFunds/AddFundsContext.js +0 -160
  69. package/dist/modal/components/AddFunds/AddFundsDone.d.ts +0 -6
  70. package/dist/modal/components/AddFunds/AddFundsDone.js +0 -49
  71. package/dist/modal/components/AddFunds/AddFundsProvider.d.ts +0 -1
  72. package/dist/modal/components/AddFunds/AddFundsProvider.js +0 -109
  73. package/dist/modal/components/AddFunds/AddFundsReceive.d.ts +0 -1
  74. package/dist/modal/components/AddFunds/AddFundsReceive.js +0 -83
  75. package/dist/modal/components/AddFunds/AddFundsSettings.d.ts +0 -1
  76. package/dist/modal/components/AddFunds/AddFundsSettings.js +0 -237
  77. package/dist/modal/components/AddFunds/MoonPayEmbed.d.ts +0 -2
  78. package/dist/modal/components/AddFunds/MoonPayEmbed.js +0 -7
  79. package/dist/modal/components/AddFunds/common.d.ts +0 -19
  80. package/dist/modal/components/AddFunds/common.js +0 -24
  81. package/dist/modal/components/AddFunds/index.d.ts +0 -3
  82. package/dist/modal/components/AddFunds/index.js +0 -4
  83. package/dist/modal/components/AuthInput/AuthInput.d.ts +0 -20
  84. package/dist/modal/components/AuthInput/AuthInput.js +0 -277
  85. package/dist/modal/components/AuthInput/hooks/useDropdownPosition.d.ts +0 -7
  86. package/dist/modal/components/AuthInput/hooks/useDropdownPosition.js +0 -33
  87. package/dist/modal/components/AuthInput/phoneMasks.d.ts +0 -247
  88. package/dist/modal/components/AuthInput/phoneMasks.js +0 -253
  89. package/dist/modal/components/AuthMainStep/AuthMainStep.d.ts +0 -9
  90. package/dist/modal/components/AuthMainStep/AuthMainStep.js +0 -50
  91. package/dist/modal/components/AuthMainStep/AuthMainStepContent.d.ts +0 -9
  92. package/dist/modal/components/AuthMainStep/AuthMainStepContent.js +0 -164
  93. package/dist/modal/components/AuthOptions/AuthOptions.d.ts +0 -9
  94. package/dist/modal/components/AuthOptions/AuthOptions.js +0 -85
  95. package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.d.ts +0 -1
  96. package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.js +0 -18
  97. package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.d.ts +0 -1
  98. package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.js +0 -10
  99. package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.d.ts +0 -1
  100. package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.js +0 -18
  101. package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.d.ts +0 -5
  102. package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.js +0 -49
  103. package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.d.ts +0 -1
  104. package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.js +0 -62
  105. package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.d.ts +0 -1
  106. package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +0 -48
  107. package/dist/modal/components/Body/AnimatedHeightWrapper.d.ts +0 -6
  108. package/dist/modal/components/Body/AnimatedHeightWrapper.js +0 -29
  109. package/dist/modal/components/Body/Body.d.ts +0 -11
  110. package/dist/modal/components/Body/Body.js +0 -350
  111. package/dist/modal/components/ChainSwitch/ChainSwitch.d.ts +0 -1
  112. package/dist/modal/components/ChainSwitch/ChainSwitch.js +0 -95
  113. package/dist/modal/components/ChainSwitch/config.d.ts +0 -7
  114. package/dist/modal/components/ChainSwitch/config.js +0 -17
  115. package/dist/modal/components/Controls/Controls.d.ts +0 -5
  116. package/dist/modal/components/Controls/Controls.js +0 -78
  117. package/dist/modal/components/Controls/Selects.d.ts +0 -2
  118. package/dist/modal/components/Controls/Selects.js +0 -173
  119. package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.d.ts +0 -1
  120. package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.js +0 -75
  121. package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.d.ts +0 -8
  122. package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.js +0 -175
  123. package/dist/modal/components/ExternalWalletStep/config.d.ts +0 -7
  124. package/dist/modal/components/ExternalWalletStep/config.js +0 -17
  125. package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.d.ts +0 -1
  126. package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.js +0 -39
  127. package/dist/modal/components/ExternalWallets/ExternalWallets.d.ts +0 -1
  128. package/dist/modal/components/ExternalWallets/ExternalWallets.js +0 -184
  129. package/dist/modal/components/Footer/Footer.d.ts +0 -1
  130. package/dist/modal/components/Footer/Footer.js +0 -95
  131. package/dist/modal/components/Header/Header.d.ts +0 -1
  132. package/dist/modal/components/Header/Header.js +0 -43
  133. package/dist/modal/components/Header/hooks/useStepTitle.d.ts +0 -3
  134. package/dist/modal/components/Header/hooks/useStepTitle.js +0 -61
  135. package/dist/modal/components/Hero/Hero.d.ts +0 -1
  136. package/dist/modal/components/Hero/Hero.js +0 -116
  137. package/dist/modal/components/IFrameStep/IFrameStep.d.ts +0 -1
  138. package/dist/modal/components/IFrameStep/IFrameStep.js +0 -59
  139. package/dist/modal/components/LoginDoneStep/LoginDoneStep.d.ts +0 -5
  140. package/dist/modal/components/LoginDoneStep/LoginDoneStep.js +0 -44
  141. package/dist/modal/components/ModalContent/ModalContent.d.ts +0 -10
  142. package/dist/modal/components/ModalContent/ModalContent.js +0 -88
  143. package/dist/modal/components/OAuth/FarcasterOAuthStep.d.ts +0 -3
  144. package/dist/modal/components/OAuth/FarcasterOAuthStep.js +0 -31
  145. package/dist/modal/components/OAuth/OAuth.d.ts +0 -6
  146. package/dist/modal/components/OAuth/OAuth.js +0 -79
  147. package/dist/modal/components/OAuth/TelegramOAuthStep.d.ts +0 -8
  148. package/dist/modal/components/OAuth/TelegramOAuthStep.js +0 -74
  149. package/dist/modal/components/OnRampComponents/AddingFunds.d.ts +0 -1
  150. package/dist/modal/components/OnRampComponents/AddingFunds.js +0 -23
  151. package/dist/modal/components/OnRampComponents/OnRampProviderButton.d.ts +0 -9
  152. package/dist/modal/components/OnRampComponents/OnRampProviderButton.js +0 -77
  153. package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.d.ts +0 -6
  154. package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.js +0 -107
  155. package/dist/modal/components/Setup2FAStep/Setup2FAStep.d.ts +0 -5
  156. package/dist/modal/components/Setup2FAStep/Setup2FAStep.js +0 -132
  157. package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.d.ts +0 -5
  158. package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.js +0 -27
  159. package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.d.ts +0 -12
  160. package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.js +0 -160
  161. package/dist/modal/components/Waiting/Waiting.d.ts +0 -6
  162. package/dist/modal/components/Waiting/Waiting.js +0 -17
  163. package/dist/modal/components/WalletCard/PartnerIcon.d.ts +0 -6
  164. package/dist/modal/components/WalletCard/PartnerIcon.js +0 -34
  165. package/dist/modal/components/WalletCard/WalletCard.d.ts +0 -18
  166. package/dist/modal/components/WalletCard/WalletCard.js +0 -128
  167. package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.d.ts +0 -6
  168. package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.js +0 -83
  169. package/dist/modal/components/common.d.ts +0 -59
  170. package/dist/modal/components/common.js +0 -261
  171. package/dist/modal/components/index.d.ts +0 -1
  172. package/dist/modal/components/index.js +0 -2
  173. package/dist/modal/constants/constants.d.ts +0 -40
  174. package/dist/modal/constants/constants.js +0 -142
  175. package/dist/modal/constants/defaults.d.ts +0 -5
  176. package/dist/modal/constants/defaults.js +0 -10
  177. package/dist/modal/constants/oAuthLogos.d.ts +0 -17
  178. package/dist/modal/constants/oAuthLogos.js +0 -158
  179. package/dist/modal/constants/walletTypeConfig.d.ts +0 -6
  180. package/dist/modal/constants/walletTypeConfig.js +0 -13
  181. package/dist/modal/hooks/useGoBack.d.ts +0 -1
  182. package/dist/modal/hooks/useGoBack.js +0 -43
  183. package/dist/modal/hooks/useTelegramLogin.d.ts +0 -12
  184. package/dist/modal/hooks/useTelegramLogin.js +0 -65
  185. package/dist/modal/index.d.ts +0 -8
  186. package/dist/modal/index.js +0 -29
  187. package/dist/modal/stores/index.d.ts +0 -1
  188. package/dist/modal/stores/index.js +0 -2
  189. package/dist/modal/stores/modal/actions.d.ts +0 -3
  190. package/dist/modal/stores/modal/actions.js +0 -135
  191. package/dist/modal/stores/modal/useModalStore.d.ts +0 -103
  192. package/dist/modal/stores/modal/useModalStore.js +0 -73
  193. package/dist/modal/types/commonTypes.d.ts +0 -6
  194. package/dist/modal/types/commonTypes.js +0 -1
  195. package/dist/modal/types/modalProps.d.ts +0 -129
  196. package/dist/modal/types/modalProps.js +0 -12
  197. package/dist/modal/utils/authInputHelpers.d.ts +0 -5
  198. package/dist/modal/utils/authInputHelpers.js +0 -41
  199. package/dist/modal/utils/authLayoutHelpers.d.ts +0 -3
  200. package/dist/modal/utils/authLayoutHelpers.js +0 -8
  201. package/dist/modal/utils/countryCodes.d.ts +0 -8
  202. package/dist/modal/utils/countryCodes.js +0 -45
  203. package/dist/modal/utils/getMailtoLink.d.ts +0 -1
  204. package/dist/modal/utils/getMailtoLink.js +0 -10
  205. package/dist/modal/utils/getTileButtonFlex.d.ts +0 -1
  206. package/dist/modal/utils/getTileButtonFlex.js +0 -20
  207. package/dist/modal/utils/getWalletDisplayName.d.ts +0 -5
  208. package/dist/modal/utils/getWalletDisplayName.js +0 -22
  209. package/dist/modal/utils/isPasskeySupported.d.ts +0 -1
  210. package/dist/modal/utils/isPasskeySupported.js +0 -15
  211. package/dist/modal/utils/openPopup.d.ts +0 -6
  212. package/dist/modal/utils/openPopup.js +0 -60
  213. package/dist/modal/utils/routeMobileExternalWallet.d.ts +0 -1
  214. package/dist/modal/utils/routeMobileExternalWallet.js +0 -31
  215. package/dist/modal/utils/steps.d.ts +0 -133
  216. package/dist/modal/utils/steps.js +0 -273
  217. package/dist/modal/utils/stringFormatters.d.ts +0 -5
  218. package/dist/modal/utils/stringFormatters.js +0 -19
  219. package/dist/modal/utils/validateOnRampConfig.d.ts +0 -5
  220. package/dist/modal/utils/validateOnRampConfig.js +0 -32
  221. package/dist/provider/actions/getEmbeddedAccount.d.ts +0 -26
  222. package/dist/provider/actions/getEmbeddedAccount.js +0 -52
  223. package/dist/provider/actions/getWallet.d.ts +0 -5
  224. package/dist/provider/actions/getWallet.js +0 -18
  225. package/dist/provider/actions/index.d.ts +0 -47
  226. package/dist/provider/actions/index.js +0 -79
  227. package/dist/provider/actions/utils.d.ts +0 -4
  228. package/dist/provider/actions/utils.js +0 -34
  229. package/dist/provider/components/CosmosWalletWrapper.d.ts +0 -11
  230. package/dist/provider/components/CosmosWalletWrapper.js +0 -43
  231. package/dist/provider/components/EvmWalletWrapper.d.ts +0 -12
  232. package/dist/provider/components/EvmWalletWrapper.js +0 -43
  233. package/dist/provider/components/ExternalWalletWrapper.d.ts +0 -8
  234. package/dist/provider/components/ExternalWalletWrapper.js +0 -140
  235. package/dist/provider/components/SolanaWalletWrapper.d.ts +0 -9
  236. package/dist/provider/components/SolanaWalletWrapper.js +0 -44
  237. package/dist/provider/external/getParaCosmosConnector.d.ts +0 -7
  238. package/dist/provider/external/getParaCosmosConnector.js +0 -19
  239. package/dist/provider/external/getParaCosmosLib.d.ts +0 -4
  240. package/dist/provider/external/getParaCosmosLib.js +0 -16
  241. package/dist/provider/external/getParaEvmConnector.d.ts +0 -7
  242. package/dist/provider/external/getParaEvmConnector.js +0 -19
  243. package/dist/provider/external/getParaEvmLib.d.ts +0 -4
  244. package/dist/provider/external/getParaEvmLib.js +0 -16
  245. package/dist/provider/external/getParaSolanaConnector.d.ts +0 -7
  246. package/dist/provider/external/getParaSolanaConnector.js +0 -19
  247. package/dist/provider/external/getParaSolanaLib.d.ts +0 -4
  248. package/dist/provider/external/getParaSolanaLib.js +0 -16
  249. package/dist/provider/external/stubs/CosmosExternalWalletContextStub.d.ts +0 -2
  250. package/dist/provider/external/stubs/CosmosExternalWalletContextStub.js +0 -8
  251. package/dist/provider/external/stubs/EvmExternalWalletContextStub.d.ts +0 -2
  252. package/dist/provider/external/stubs/EvmExternalWalletContextStub.js +0 -8
  253. package/dist/provider/external/stubs/SolanaExternalWalletContextStub.d.ts +0 -2
  254. package/dist/provider/external/stubs/SolanaExternalWalletContextStub.js +0 -8
  255. package/dist/provider/hooks/index.d.ts +0 -3
  256. package/dist/provider/hooks/index.js +0 -4
  257. package/dist/provider/hooks/mutations/core.d.ts +0 -27
  258. package/dist/provider/hooks/mutations/core.js +0 -66
  259. package/dist/provider/hooks/mutations/index.d.ts +0 -3
  260. package/dist/provider/hooks/mutations/index.js +0 -9
  261. package/dist/provider/hooks/mutations/useLinkAccount.d.ts +0 -9
  262. package/dist/provider/hooks/mutations/useLinkAccount.js +0 -18
  263. package/dist/provider/hooks/mutations/utils.d.ts +0 -12
  264. package/dist/provider/hooks/mutations/utils.js +0 -90
  265. package/dist/provider/hooks/queries/core.d.ts +0 -4
  266. package/dist/provider/hooks/queries/core.js +0 -16
  267. package/dist/provider/hooks/queries/index.d.ts +0 -4
  268. package/dist/provider/hooks/queries/index.js +0 -11
  269. package/dist/provider/hooks/queries/useAccount.d.ts +0 -90
  270. package/dist/provider/hooks/queries/useAccount.js +0 -135
  271. package/dist/provider/hooks/queries/useIsFullyLoggedIn.d.ts +0 -5
  272. package/dist/provider/hooks/queries/useIsFullyLoggedIn.js +0 -24
  273. package/dist/provider/hooks/queries/useWallet.d.ts +0 -5
  274. package/dist/provider/hooks/queries/useWallet.js +0 -26
  275. package/dist/provider/hooks/queries/useWalletBalance.d.ts +0 -6
  276. package/dist/provider/hooks/queries/useWalletBalance.js +0 -55
  277. package/dist/provider/hooks/queries/utils.d.ts +0 -7
  278. package/dist/provider/hooks/queries/utils.js +0 -25
  279. package/dist/provider/hooks/utils/index.d.ts +0 -3
  280. package/dist/provider/hooks/utils/index.js +0 -10
  281. package/dist/provider/hooks/utils/useAutoSessionKeepAlive.d.ts +0 -3
  282. package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +0 -74
  283. package/dist/provider/hooks/utils/useClient.d.ts +0 -5
  284. package/dist/provider/hooks/utils/useClient.js +0 -10
  285. package/dist/provider/hooks/utils/useEventListeners.d.ts +0 -2
  286. package/dist/provider/hooks/utils/useEventListeners.js +0 -157
  287. package/dist/provider/hooks/utils/useFormattedBiometricHints.d.ts +0 -4
  288. package/dist/provider/hooks/utils/useFormattedBiometricHints.js +0 -27
  289. package/dist/provider/hooks/utils/useInternalClient.d.ts +0 -5
  290. package/dist/provider/hooks/utils/useInternalClient.js +0 -10
  291. package/dist/provider/hooks/utils/useModal.d.ts +0 -11
  292. package/dist/provider/hooks/utils/useModal.js +0 -27
  293. package/dist/provider/hooks/utils/useWalletState.d.ts +0 -15
  294. package/dist/provider/hooks/utils/useWalletState.js +0 -48
  295. package/dist/provider/index.d.ts +0 -6
  296. package/dist/provider/index.js +0 -11
  297. package/dist/provider/providers/AccountLinkProvider.d.ts +0 -47
  298. package/dist/provider/providers/AccountLinkProvider.js +0 -452
  299. package/dist/provider/providers/AuthProvider.d.ts +0 -37
  300. package/dist/provider/providers/AuthProvider.js +0 -523
  301. package/dist/provider/providers/CosmosExternalWalletProvider.d.ts +0 -7
  302. package/dist/provider/providers/CosmosExternalWalletProvider.js +0 -66
  303. package/dist/provider/providers/EvmExternalWalletProvider.d.ts +0 -7
  304. package/dist/provider/providers/EvmExternalWalletProvider.js +0 -74
  305. package/dist/provider/providers/ExternalWalletProvider.d.ts +0 -59
  306. package/dist/provider/providers/ExternalWalletProvider.js +0 -596
  307. package/dist/provider/providers/SolanaExternalWalletProvider.d.ts +0 -7
  308. package/dist/provider/providers/SolanaExternalWalletProvider.js +0 -66
  309. package/dist/provider/stores/getters.d.ts +0 -4
  310. package/dist/provider/stores/getters.js +0 -13
  311. package/dist/provider/stores/setters.d.ts +0 -1
  312. package/dist/provider/stores/setters.js +0 -7
  313. package/dist/provider/stores/slices/analytics.d.ts +0 -3
  314. package/dist/provider/stores/slices/analytics.js +0 -9
  315. package/dist/provider/stores/slices/client.d.ts +0 -3
  316. package/dist/provider/stores/slices/client.js +0 -9
  317. package/dist/provider/stores/slices/config.d.ts +0 -3
  318. package/dist/provider/stores/slices/config.js +0 -9
  319. package/dist/provider/stores/slices/externalWallets.d.ts +0 -3
  320. package/dist/provider/stores/slices/externalWallets.js +0 -46
  321. package/dist/provider/stores/slices/index.d.ts +0 -5
  322. package/dist/provider/stores/slices/index.js +0 -6
  323. package/dist/provider/stores/slices/modal.d.ts +0 -3
  324. package/dist/provider/stores/slices/modal.js +0 -18
  325. package/dist/provider/stores/slices/wallet.d.ts +0 -3
  326. package/dist/provider/stores/slices/wallet.js +0 -13
  327. package/dist/provider/stores/types.d.ts +0 -76
  328. package/dist/provider/stores/types.js +0 -1
  329. package/dist/provider/stores/useStore.d.ts +0 -17
  330. package/dist/provider/stores/useStore.js +0 -34
  331. package/dist/provider/types/externalWalletProviders.d.ts +0 -12
  332. package/dist/provider/types/externalWalletProviders.js +0 -1
  333. package/dist/provider/types/provider.d.ts +0 -161
  334. package/dist/provider/types/provider.js +0 -1
  335. package/dist/provider/types/query.d.ts +0 -3
  336. package/dist/provider/types/query.js +0 -1
  337. package/dist/provider/types/utils.d.ts +0 -45
  338. package/dist/provider/types/utils.js +0 -1
  339. package/dist/provider/utils/constants.d.ts +0 -5
  340. package/dist/provider/utils/constants.js +0 -10
  341. package/dist/provider/utils/paraConfigTypeGuards.d.ts +0 -7
  342. package/dist/provider/utils/paraConfigTypeGuards.js +0 -13
  343. package/dist/provider/utils/renameMutations.d.ts +0 -5
  344. package/dist/provider/utils/renameMutations.js +0 -18
@@ -1,350 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
- import { safeStyled } from "@getpara/react-common";
5
- import { IFrameSteps, ModalStep } from "../../utils/steps.js";
6
- import { CpslAlert, CpslIcon } from "@getpara/react-components";
7
- import { VerificationCodeStep } from "../VerificationCodeStep/VerificationCodeStep.js";
8
- import { useModalStore } from "../../stores/index.js";
9
- import { BiometricLoginStep } from "../BiometricLoginStep/BiometricLoginStep.js";
10
- import { Setup2FAStep } from "../Setup2FAStep/Setup2FAStep.js";
11
- import { LoginDoneStep } from "../LoginDoneStep/LoginDoneStep.js";
12
- import { EnabledFlow } from "@getpara/web-sdk";
13
- import { AwaitingBiometricsStep } from "../AwaitingBiometricsStep/AwaitingBiometricsStep.js";
14
- import { AwaitingWalletCreationStep } from "../AwaitingWalletCreationStep/AwaitingWalletCreationStep.js";
15
- import { WalletCreationDoneStep } from "../WalletCreationDoneStep/WalletCreationDoneStep.js";
16
- import { RecoverySecretStep } from "../RecoverySecretStep/RecoverySecretStep.js";
17
- import { TwoFactorDoneStep } from "../TwoFactorDoneStep/TwoFactorDoneStep.js";
18
- import { BiometricCreationStep } from "../BiometricCreationStep/BiometricCreationStep.js";
19
- import { AwaitingOAuthStep } from "../AwaitingOAuthStep/AwaitingOAuthStep.js";
20
- import { AddFundsAwaiting, AddFundsDone, AddFunds } from "../AddFunds/index.js";
21
- import FarcasterOAuthStep from "../OAuth/FarcasterOAuthStep.js";
22
- import { Header } from "../Header/Header.js";
23
- import { AuthMainStep } from "../AuthMainStep/AuthMainStep.js";
24
- import { BODY_MOTION_VARIANTS, BODY_TRANSITION, MOBILE_SIZE } from "../../constants/constants.js";
25
- import { Account } from "../Account/Account.js";
26
- import { AuthOptions } from "../AuthOptions/AuthOptions.js";
27
- import { ExternalWallets } from "../ExternalWallets/ExternalWallets.js";
28
- import { ExternalWalletStep } from "../ExternalWalletStep/ExternalWalletStep.js";
29
- import { Hero } from "../Hero/Hero.js";
30
- import { AnimatedHeightWrapper } from "./AnimatedHeightWrapper.js";
31
- import { ChainSwitch } from "../ChainSwitch/ChainSwitch.js";
32
- import { motion, AnimatePresence } from "framer-motion";
33
- import { Controls } from "../Controls/Controls.js";
34
- import { useEffect, useState } from "react";
35
- import { TelegramOAuthStep } from "../OAuth/TelegramOAuthStep.js";
36
- import { AwaitingPasswordStep } from "../AwaitingPasswordStep/AwaitingPasswordStep.js";
37
- import { IFrameStep } from "../IFrameStep/IFrameStep.js";
38
- import { useStore } from "../../../provider/stores/useStore.js";
39
- import { ExternalWalletVerificationStep } from "../ExternalWalletVerificationStep/ExternalWalletVerificationStep.js";
40
- import { NetworkSpeedBanner } from "@getpara/react-common";
41
- import { AccountProfile } from "../Account/AccountProfile.js";
42
- import { AccountProfileLinkOptions } from "../Account/AccountProfileLinkOptions.js";
43
- import { AccountProfileLink } from "../Account/AccountProfileLink.js";
44
- import { AccountProfileUnlink } from "../Account/AccountProfileUnlink.js";
45
- import { ExternalWalletNetworkSelectStep } from "../ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.js";
46
- const MIN_HEIGHT = {
47
- [ModalStep.ADD_FUNDS_AWAITING]: "680px"
48
- };
49
- const PADDING_TOP = {
50
- [ModalStep.TELEGRAM_OAUTH]: "36px"
51
- };
52
- const PADDING_BOTTOM = {
53
- [ModalStep.TELEGRAM_OAUTH]: "16px"
54
- };
55
- const PADDING_X = {
56
- [ModalStep.ACCOUNT_PROFILE]: "32px"
57
- };
58
- const Body = ({
59
- oAuthMethods,
60
- twoFactorAuthEnabled,
61
- disableEmailLogin,
62
- disablePhoneLogin,
63
- isGuestModeEnabled = false,
64
- onClose
65
- }) => {
66
- const currentStep = useModalStore((state) => state.step);
67
- const onRampConfig = useModalStore((state) => state.onRampConfig);
68
- const stepDirection = useModalStore((state) => state.stepDirection);
69
- const setStepDirection = useModalStore((state) => state.setStepDirection);
70
- const accountAddFundTab = useModalStore((state) => state.accountAddFundTab);
71
- const setAccountAddFundTab = useModalStore((state) => state.setAccountAddFundTab);
72
- const embeddedModal = useStore((state) => {
73
- var _a;
74
- return (_a = state.modalConfig) == null ? void 0 : _a.embeddedModal;
75
- });
76
- const appName = useStore((state) => state.appName);
77
- const [isTestModeAlert, setIsTestModeAlert] = useState(onRampConfig == null ? void 0 : onRampConfig.testMode);
78
- const Content = () => {
79
- switch (currentStep) {
80
- case ModalStep.AUTH_MAIN: {
81
- return /* @__PURE__ */ jsx(
82
- AuthMainStep,
83
- {
84
- oAuthMethods,
85
- disableEmailLogin,
86
- disablePhoneLogin,
87
- isGuestModeEnabled
88
- }
89
- );
90
- }
91
- case ModalStep.EX_WALLET_MORE: {
92
- return /* @__PURE__ */ jsx(ExternalWallets, {});
93
- }
94
- case ModalStep.AWAITING_GUEST_WALLET_CREATION: {
95
- return /* @__PURE__ */ jsx(AwaitingWalletCreationStep, { isGuestMode: true });
96
- }
97
- case ModalStep.AUTH_MORE:
98
- case ModalStep.AUTH_GUEST_SIGNUP: {
99
- return /* @__PURE__ */ jsx(
100
- AuthOptions,
101
- {
102
- oAuthMethods,
103
- disableEmailLogin,
104
- disablePhoneLogin,
105
- isGuestModeEnabled
106
- }
107
- );
108
- }
109
- case ModalStep.VERIFICATIONS: {
110
- return /* @__PURE__ */ jsx(VerificationCodeStep, {});
111
- }
112
- case ModalStep.EXTERNAL_WALLET_VERIFICATION: {
113
- return /* @__PURE__ */ jsx(ExternalWalletVerificationStep, {});
114
- }
115
- case ModalStep.BIOMETRIC_LOGIN: {
116
- return /* @__PURE__ */ jsx(BiometricLoginStep, {});
117
- }
118
- case ModalStep.SETUP_2FA:
119
- case ModalStep.VERIFY_2FA: {
120
- return /* @__PURE__ */ jsx(Setup2FAStep, { onClose });
121
- }
122
- case ModalStep.LOGIN_DONE: {
123
- return /* @__PURE__ */ jsx(LoginDoneStep, { onClose });
124
- }
125
- case ModalStep.AWAITING_BIOMETRIC_LOGIN:
126
- case ModalStep.AWAITING_BIOMETRIC_CREATION: {
127
- return /* @__PURE__ */ jsx(AwaitingBiometricsStep, {});
128
- }
129
- case ModalStep.AWAITING_PASSWORD_LOGIN:
130
- case ModalStep.AWAITING_PASSWORD_CREATION: {
131
- return /* @__PURE__ */ jsx(AwaitingPasswordStep, {});
132
- }
133
- case ModalStep.AWAITING_WALLET_CREATION: {
134
- return /* @__PURE__ */ jsx(AwaitingWalletCreationStep, {});
135
- }
136
- case ModalStep.WALLET_CREATION_DONE: {
137
- return /* @__PURE__ */ jsx(WalletCreationDoneStep, { twoFactorAuthEnabled, onClose });
138
- }
139
- case ModalStep.SECRET: {
140
- return /* @__PURE__ */ jsx(RecoverySecretStep, {});
141
- }
142
- case ModalStep.TWO_FACTOR_DONE: {
143
- return /* @__PURE__ */ jsx(TwoFactorDoneStep, { onClose });
144
- }
145
- case ModalStep.BIOMETRIC_CREATION: {
146
- return /* @__PURE__ */ jsx(BiometricCreationStep, {});
147
- }
148
- case ModalStep.AWAITING_OAUTH: {
149
- return /* @__PURE__ */ jsx(AwaitingOAuthStep, {});
150
- }
151
- case ModalStep.FARCASTER_OAUTH: {
152
- return /* @__PURE__ */ jsx(FarcasterOAuthStep, {});
153
- }
154
- case ModalStep.TELEGRAM_OAUTH: {
155
- return /* @__PURE__ */ jsx(TelegramOAuthStep, {});
156
- }
157
- case ModalStep.ADD_FUNDS_BUY:
158
- case ModalStep.ADD_FUNDS_RECEIVE:
159
- case ModalStep.ADD_FUNDS_WITHDRAW: {
160
- return /* @__PURE__ */ jsx(AddFunds, { "data-testid": "add-funds" });
161
- }
162
- case ModalStep.ADD_FUNDS_AWAITING: {
163
- return /* @__PURE__ */ jsx(AddFundsAwaiting, {});
164
- }
165
- case ModalStep.ADD_FUNDS_SUCCESS: {
166
- return /* @__PURE__ */ jsx(AddFundsDone, { isSuccess: true, onClose });
167
- }
168
- case ModalStep.ADD_FUNDS_FAILURE: {
169
- return /* @__PURE__ */ jsx(AddFundsDone, { onClose });
170
- }
171
- case ModalStep.ACCOUNT_MAIN: {
172
- return /* @__PURE__ */ jsx(Account, { onClose });
173
- }
174
- case ModalStep.ACCOUNT_PROFILE: {
175
- return /* @__PURE__ */ jsx(AccountProfile, {});
176
- }
177
- case ModalStep.ACCOUNT_PROFILE_LIST: {
178
- return /* @__PURE__ */ jsx(AccountProfileLinkOptions, {});
179
- }
180
- case ModalStep.ACCOUNT_PROFILE_ADD: {
181
- return /* @__PURE__ */ jsx(AccountProfileLink, {});
182
- }
183
- case ModalStep.ACCOUNT_PROFILE_REMOVE: {
184
- return /* @__PURE__ */ jsx(AccountProfileUnlink, {});
185
- }
186
- case ModalStep.EX_WALLET_SELECTED: {
187
- return /* @__PURE__ */ jsx(ExternalWalletStep, {});
188
- }
189
- case ModalStep.CHAIN_SWITCH: {
190
- return /* @__PURE__ */ jsx(ChainSwitch, {});
191
- }
192
- case ModalStep.EX_WALLET_NETWORK_SELECT: {
193
- return /* @__PURE__ */ jsx(ExternalWalletNetworkSelectStep, {});
194
- }
195
- default: {
196
- if (IFrameSteps.includes(currentStep)) {
197
- return null;
198
- }
199
- }
200
- }
201
- };
202
- useEffect(() => {
203
- if (!isTestModeAlert && (onRampConfig == null ? void 0 : onRampConfig.testMode)) {
204
- setIsTestModeAlert(true);
205
- }
206
- }, [onRampConfig == null ? void 0 : onRampConfig.testMode]);
207
- useEffect(() => {
208
- switch (currentStep) {
209
- case ModalStep.ADD_FUNDS_BUY:
210
- setAccountAddFundTab(EnabledFlow.BUY);
211
- break;
212
- case ModalStep.ADD_FUNDS_RECEIVE:
213
- setAccountAddFundTab(EnabledFlow.RECEIVE);
214
- break;
215
- case ModalStep.ADD_FUNDS_WITHDRAW:
216
- setAccountAddFundTab(EnabledFlow.WITHDRAW);
217
- break;
218
- default:
219
- break;
220
- }
221
- }, [currentStep]);
222
- return /* @__PURE__ */ jsxs(Container, { slot: "body", "data-testid": "modal-content", children: [
223
- !embeddedModal && /* @__PURE__ */ jsxs(Fragment, { children: [
224
- /* @__PURE__ */ jsx(Controls, { onClose }),
225
- /* @__PURE__ */ jsx(Header, {})
226
- ] }),
227
- /* @__PURE__ */ jsxs(AnimatedWrapper, { children: [
228
- /* @__PURE__ */ jsx(
229
- AnimatePresence,
230
- {
231
- mode: "popLayout",
232
- initial: false,
233
- onExitComplete: () => {
234
- setStepDirection(1);
235
- },
236
- custom: stepDirection,
237
- children: /* @__PURE__ */ jsxs(
238
- BodyContainer,
239
- {
240
- custom: stepDirection,
241
- variants: BODY_MOTION_VARIANTS,
242
- initial: "enter",
243
- animate: "center",
244
- exit: "exit",
245
- transition: BODY_TRANSITION,
246
- children: [
247
- /* @__PURE__ */ jsx(Hero, {}),
248
- /* @__PURE__ */ jsxs(
249
- InnerContainer,
250
- {
251
- $embeddedModal: !!embeddedModal,
252
- $step: currentStep,
253
- $isIFrameStep: IFrameSteps.includes(currentStep),
254
- children: [
255
- /* @__PURE__ */ jsx(NetworkSpeedBanner, { fontSize: "12px", iconSize: "16px" }),
256
- Content(),
257
- (onRampConfig == null ? void 0 : onRampConfig.testMode) && [
258
- ModalStep.ADD_FUNDS_BUY,
259
- ModalStep.ADD_FUNDS_WITHDRAW,
260
- ModalStep.ADD_FUNDS_AWAITING,
261
- ModalStep.ADD_FUNDS_FAILURE,
262
- ModalStep.ADD_FUNDS_SUCCESS
263
- ].includes(currentStep) && isTestModeAlert && accountAddFundTab !== EnabledFlow.RECEIVE && /* @__PURE__ */ jsx(TestModeAlert, { children: /* @__PURE__ */ jsxs("div", { style: { fontSize: "14px" }, children: [
264
- "This Para Modal is configured to run on-ramp services in ",
265
- /* @__PURE__ */ jsx("b", { children: "test mode" }),
266
- " only, for development purposes. If you are a user of ",
267
- appName,
268
- ", please contact support.",
269
- /* @__PURE__ */ jsx(CloseButton, { onClick: () => setIsTestModeAlert(false), children: /* @__PURE__ */ jsx(CloseX, { icon: "x" }) })
270
- ] }) })
271
- ]
272
- }
273
- )
274
- ]
275
- },
276
- ["ADD_FUNDS_BUY", "ADD_FUNDS_RECEIVE", "ADD_FUNDS_WITHDRAW"].includes(currentStep) ? "ADD_FUNDS" : currentStep
277
- )
278
- }
279
- ),
280
- /* @__PURE__ */ jsx(IFrameStep, {})
281
- ] })
282
- ] });
283
- };
284
- const Container = safeStyled.div`
285
- position: relative;
286
- `;
287
- const AnimatedWrapper = safeStyled(AnimatedHeightWrapper)`
288
- margin-top: -16px;
289
- `;
290
- const BodyContainer = safeStyled(motion.div)`
291
- position: relative;
292
- display: flex;
293
- flex-direction: column;
294
- gap: 24px;
295
- will-change: auto !important;
296
- `;
297
- const InnerContainer = safeStyled.div`
298
- z-index: 1;
299
- flex: 1;
300
- display: flex;
301
- flex-direction: column;
302
- justify-content: flex-start;
303
- gap: 24px;
304
- padding: ${({ $embeddedModal, $step, $isIFrameStep }) => {
305
- var _a, _b, _c;
306
- return $isIFrameStep ? "0px" : $embeddedModal ? "12px 0px 0px" : `${(_a = PADDING_TOP[$step]) != null ? _a : "72px"} ${(_b = PADDING_X[$step]) != null ? _b : "72px"} ${(_c = PADDING_BOTTOM[$step]) != null ? _c : "32px"}`;
307
- }};
308
- min-height: ${({ $step }) => {
309
- var _a;
310
- return (_a = MIN_HEIGHT[$step]) != null ? _a : "auto";
311
- }};
312
- height: ${({ $step }) => {
313
- var _a;
314
- return (_a = MIN_HEIGHT[$step]) != null ? _a : "auto";
315
- }};
316
-
317
- @media (max-width: ${MOBILE_SIZE}px) {
318
- padding: ${({ $embeddedModal, $step, $isIFrameStep }) => {
319
- var _a;
320
- return $isIFrameStep ? "0px" : $embeddedModal ? "12px 0px 0px" : `${(_a = PADDING_TOP[$step]) != null ? _a : "72px"} 16px 0px`;
321
- }};
322
- }
323
-
324
- cpsl-auth-modal.force-mobile-media & {
325
- padding: 72px 16px 0px;
326
- }
327
- `;
328
- const TestModeAlert = safeStyled(CpslAlert)`
329
- --container-padding-end: 40px;
330
- position: absolute;
331
- bottom: 16px;
332
- left: 16px;
333
- right: 16px;
334
- z-index: 1000;
335
- `;
336
- const CloseButton = safeStyled.button`
337
- background-color: transparent;
338
- border: none;
339
- padding: 4px;
340
- cursor: pointer;
341
- position: absolute;
342
- top: 0;
343
- right: 0;
344
- `;
345
- const CloseX = safeStyled(CpslIcon)`
346
- --icon-color: var(--cpsl-color-foreground-0);
347
- `;
348
- export {
349
- Body
350
- };
@@ -1 +0,0 @@
1
- export declare const ChainSwitch: () => import("react/jsx-runtime").JSX.Element | null;
@@ -1,95 +0,0 @@
1
- "use client";
2
- import {
3
- __async
4
- } from "../../../chunk-MMUBH76A.js";
5
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
- import { CpslButton, CpslIcon, CpslQrCode, CpslSpinner, CpslText } from "@getpara/react-components";
7
- import { CenteredText, InnerStepContainer, QRContainer, StepContainer } from "../common.js";
8
- import { useEffect, useMemo } from "react";
9
- import { useModalStore } from "../../stores/index.js";
10
- import { safeStyled } from "@getpara/react-common";
11
- import { useCopyToClipboard } from "@getpara/react-common";
12
- import { ModalStep } from "../../utils/steps.js";
13
- import { routeMobileExternalWallet } from "../../utils/routeMobileExternalWallet.js";
14
- import { NETWORK_NOT_SUPPORTED_ERROR } from "../../constants/constants.js";
15
- import { useExternalWallets } from "../../../provider/providers/ExternalWalletProvider.js";
16
- const ChainSwitch = () => {
17
- const [isCopied, copy] = useCopyToClipboard();
18
- const externalWalletError = useModalStore((state) => state.externalWalletError);
19
- const setStep = useModalStore((state) => state.setStep);
20
- const setStepDirection = useModalStore((state) => state.setStepDirection);
21
- const { switchChain, wallet, qrUri, chainIdSwitchingTo, walletDisplayHelpers } = useExternalWallets();
22
- useEffect(() => {
23
- if ((wallet == null ? void 0 : wallet.type) === "COSMOS") {
24
- routeMobileExternalWallet(qrUri);
25
- }
26
- }, [qrUri, wallet]);
27
- useEffect(() => {
28
- if (!wallet) {
29
- setStepDirection(-1);
30
- setStep(ModalStep.ACCOUNT_MAIN);
31
- }
32
- }, [wallet]);
33
- const handleTryAgainClick = () => __async(void 0, null, function* () {
34
- if (chainIdSwitchingTo) {
35
- yield switchChain(chainIdSwitchingTo);
36
- }
37
- });
38
- const handleCopy = () => {
39
- if (qrUri) {
40
- copy(qrUri);
41
- }
42
- };
43
- const Content = useMemo(() => {
44
- var _a;
45
- if (!wallet) {
46
- return null;
47
- }
48
- const { isCosmosMobileWallet } = walletDisplayHelpers;
49
- if (isCosmosMobileWallet) {
50
- return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(InnerStepContainer, { children: [
51
- /* @__PURE__ */ jsx(CpslText, { weight: "semiBold", children: "Scan with your mobile device to switch networks" }),
52
- /* @__PURE__ */ jsx(QRContainer, { children: !qrUri ? /* @__PURE__ */ jsx(CpslSpinner, { size: 100 }) : /* @__PURE__ */ jsx(CpslQrCode, { url: qrUri, imageSrc: wallet.iconUrl }) }),
53
- /* @__PURE__ */ jsxs(CpslButton, { size: "small", variant: "ghost", onClick: handleCopy, children: [
54
- /* @__PURE__ */ jsx(CpslIcon, { slot: "start", icon: isCopied ? "check" : "copy" }),
55
- isCopied ? "Copied" : "Copy Link"
56
- ] })
57
- ] }) });
58
- }
59
- return /* @__PURE__ */ jsxs(InnerStepContainer, { children: [
60
- !(externalWalletError == null ? void 0 : externalWalletError.length) ? /* @__PURE__ */ jsx(CenteredText, { color: "contrast", weight: "semiBold", children: `Confirm the request to change networks in your ${wallet.name} wallet.` }) : /* @__PURE__ */ jsxs(Fragment, { children: [
61
- /* @__PURE__ */ jsxs(ErrorContainer, { children: [
62
- /* @__PURE__ */ jsx(ErrorIcon, { icon: "alertCircle" }),
63
- /* @__PURE__ */ jsx(CenteredText, { weight: "semiBold", color: "error", children: externalWalletError[0] })
64
- ] }),
65
- externalWalletError[1] && /* @__PURE__ */ jsx(CenteredText, { color: "secondary", weight: "medium", children: externalWalletError[1] })
66
- ] }),
67
- ((_a = externalWalletError == null ? void 0 : externalWalletError[0]) == null ? void 0 : _a.toLowerCase()) !== NETWORK_NOT_SUPPORTED_ERROR && /* @__PURE__ */ jsxs(CpslButton, { variant: "secondary", onClick: handleTryAgainClick, children: [
68
- /* @__PURE__ */ jsx(CpslIcon, { slot: "start", icon: "refresh" }),
69
- "Try Again"
70
- ] })
71
- ] });
72
- }, [wallet, walletDisplayHelpers, externalWalletError, qrUri]);
73
- if (!wallet) {
74
- return null;
75
- }
76
- return /* @__PURE__ */ jsx(Container, { children: Content });
77
- };
78
- const Container = safeStyled(StepContainer)`
79
- flex: 1;
80
- justify-content: space-between;
81
- `;
82
- const ErrorContainer = safeStyled.div`
83
- display: flex;
84
- align-items: center;
85
- justify-content: center;
86
- gap: 4px;
87
- `;
88
- const ErrorIcon = safeStyled(CpslIcon)`
89
- --height: 16px;
90
- --width: 16px;
91
- --icon-color: var(--cpsl-color-text-error);
92
- `;
93
- export {
94
- ChainSwitch
95
- };
@@ -1,7 +0,0 @@
1
- import { Tab } from '../../types/commonTypes.js';
2
- export declare enum TabValue {
3
- extension = "extension",
4
- mobile = "mobile",
5
- web = "web"
6
- }
7
- export declare const TABS: Record<'extension' | 'mobile' | 'web', Tab<TabValue>>;
@@ -1,17 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- var TabValue = /* @__PURE__ */ ((TabValue2) => {
4
- TabValue2["extension"] = "extension";
5
- TabValue2["mobile"] = "mobile";
6
- TabValue2["web"] = "web";
7
- return TabValue2;
8
- })(TabValue || {});
9
- const TABS = {
10
- extension: { label: "Extension", value: "extension" /* extension */, icon: "puzzlePiece" },
11
- mobile: { label: "Mobile", value: "mobile" /* mobile */, icon: "phone" },
12
- web: { label: "Web", value: "web" /* web */, icon: "globe" }
13
- };
14
- export {
15
- TABS,
16
- TabValue
17
- };
@@ -1,5 +0,0 @@
1
- interface ControlsProps {
2
- onClose: () => void;
3
- }
4
- export declare const Controls: ({ onClose }: ControlsProps) => import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1,78 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
- import { CpslIcon } from "@getpara/react-components";
5
- import { safeStyled } from "@getpara/react-common";
6
- import { useModalStore } from "../../stores/index.js";
7
- import { useGoBack } from "../../hooks/useGoBack.js";
8
- import { AccountSelect, ChainSelect } from "./Selects.js";
9
- import { ModalStep } from "../../utils/steps.js";
10
- import { HeaderButton } from "@getpara/react-common";
11
- import { useStore } from "../../../provider/stores/useStore.js";
12
- import { useAccount } from "../../../provider/index.js";
13
- const Controls = ({ onClose }) => {
14
- const bareModal = useStore((state) => {
15
- var _a;
16
- return (_a = state.modalConfig) == null ? void 0 : _a.bareModal;
17
- });
18
- const hasPreviousStep = useModalStore((state) => state.hasPreviousStep());
19
- const step = useModalStore((state) => state.step);
20
- const goBack = useGoBack();
21
- const { isConnected } = useAccount();
22
- const shouldShowSelects = [
23
- ModalStep.ACCOUNT_MAIN,
24
- ModalStep.CHAIN_SWITCH,
25
- ModalStep.ADD_FUNDS_BUY,
26
- ModalStep.ADD_FUNDS_RECEIVE,
27
- ModalStep.ADD_FUNDS_WITHDRAW
28
- ].includes(step);
29
- const handleBackClick = () => {
30
- goBack();
31
- };
32
- return /* @__PURE__ */ jsxs(Container, { children: [
33
- /* @__PURE__ */ jsx(
34
- BackButton,
35
- {
36
- variant: "ghost",
37
- style: {
38
- visibility: hasPreviousStep ? "visible" : "hidden"
39
- },
40
- onClick: handleBackClick,
41
- children: /* @__PURE__ */ jsx(CpslIcon, { icon: "arrow" })
42
- }
43
- ),
44
- /* @__PURE__ */ jsx(MiddleContainer, { children: shouldShowSelects && isConnected && /* @__PURE__ */ jsxs(Fragment, { children: [
45
- /* @__PURE__ */ jsx(ChainSelect, {}),
46
- /* @__PURE__ */ jsx(AccountSelect, {})
47
- ] }) }),
48
- /* @__PURE__ */ jsx(CloseButton, { bareModal, variant: "ghost", onClick: onClose, children: /* @__PURE__ */ jsx(CpslIcon, { icon: "close" }) })
49
- ] });
50
- };
51
- const Container = safeStyled.div`
52
- position: absolute;
53
- width: 100%;
54
- top: 16px;
55
-
56
- z-index: 3;
57
- display: flex;
58
- align-items: center;
59
- justify-content: space-between;
60
- gap: 8px;
61
- `;
62
- const MiddleContainer = safeStyled.div`
63
- flex: 1;
64
- display: flex;
65
- align-items: center;
66
- justify-content: center;
67
- gap: 4px;
68
- `;
69
- const CloseButton = safeStyled(HeaderButton)`
70
- transform: rotate(180deg);
71
- visibility: ${({ bareModal }) => bareModal ? "hidden" : "visible"};
72
- `;
73
- const BackButton = safeStyled(HeaderButton)`
74
- transform: rotate(180deg);
75
- `;
76
- export {
77
- Controls
78
- };
@@ -1,2 +0,0 @@
1
- export declare const ChainSelect: () => import("react/jsx-runtime").JSX.Element | null;
2
- export declare const AccountSelect: () => import("react/jsx-runtime").JSX.Element;