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

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 (341) 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/evm/actions/getViemAccount.d.ts +22 -0
  16. package/dist/evm/actions/getViemAccount.js +20 -0
  17. package/dist/evm/actions/getViemClient.d.ts +7659 -0
  18. package/dist/evm/actions/getViemClient.js +25 -0
  19. package/dist/evm/actions/index.d.ts +2 -0
  20. package/dist/evm/actions/index.js +3 -0
  21. package/dist/evm/hooks/index.d.ts +2 -0
  22. package/dist/evm/hooks/index.js +3 -0
  23. package/dist/evm/hooks/useViemAccount.d.ts +26 -0
  24. package/dist/evm/hooks/useViemAccount.js +32 -0
  25. package/dist/evm/hooks/useViemClient.d.ts +7663 -0
  26. package/dist/evm/hooks/useViemClient.js +30 -0
  27. package/dist/evm/index.d.ts +2 -0
  28. package/dist/evm/index.js +3 -0
  29. package/dist/index.d.ts +3 -5
  30. package/dist/index.js +4 -4
  31. package/dist/provider/ParaProvider.d.ts +1 -2
  32. package/dist/provider/ParaProvider.js +13 -106
  33. package/dist/solana/actions/getSolanaSigner.d.ts +8 -0
  34. package/dist/solana/actions/getSolanaSigner.js +15 -0
  35. package/dist/solana/actions/index.d.ts +1 -0
  36. package/dist/solana/actions/index.js +2 -0
  37. package/dist/solana/hooks/index.d.ts +1 -0
  38. package/dist/solana/hooks/index.js +2 -0
  39. package/dist/solana/hooks/useSolanaSigner.d.ts +12 -0
  40. package/dist/solana/hooks/useSolanaSigner.js +32 -0
  41. package/dist/solana/index.d.ts +2 -0
  42. package/dist/solana/index.js +3 -0
  43. package/package.json +19 -29
  44. package/styles.css/package.json +1 -1
  45. package/dist/cli/cli.mjs +0 -50
  46. package/dist/modal/ParaModal.d.ts +0 -2
  47. package/dist/modal/ParaModal.js +0 -301
  48. package/dist/modal/components/Account/Account.d.ts +0 -5
  49. package/dist/modal/components/Account/Account.js +0 -148
  50. package/dist/modal/components/Account/AccountProfile.d.ts +0 -1
  51. package/dist/modal/components/Account/AccountProfile.js +0 -168
  52. package/dist/modal/components/Account/AccountProfileLink.d.ts +0 -1
  53. package/dist/modal/components/Account/AccountProfileLink.js +0 -206
  54. package/dist/modal/components/Account/AccountProfileLinkOptions.d.ts +0 -1
  55. package/dist/modal/components/Account/AccountProfileLinkOptions.js +0 -111
  56. package/dist/modal/components/Account/AccountProfileUnlink.d.ts +0 -1
  57. package/dist/modal/components/Account/AccountProfileUnlink.js +0 -47
  58. package/dist/modal/components/AddFunds/AddFunds.d.ts +0 -1
  59. package/dist/modal/components/AddFunds/AddFunds.js +0 -69
  60. package/dist/modal/components/AddFunds/AddFundsAsset.d.ts +0 -1
  61. package/dist/modal/components/AddFunds/AddFundsAsset.js +0 -125
  62. package/dist/modal/components/AddFunds/AddFundsAwaiting.d.ts +0 -1
  63. package/dist/modal/components/AddFunds/AddFundsAwaiting.js +0 -78
  64. package/dist/modal/components/AddFunds/AddFundsContext.d.ts +0 -31
  65. package/dist/modal/components/AddFunds/AddFundsContext.js +0 -160
  66. package/dist/modal/components/AddFunds/AddFundsDone.d.ts +0 -6
  67. package/dist/modal/components/AddFunds/AddFundsDone.js +0 -49
  68. package/dist/modal/components/AddFunds/AddFundsProvider.d.ts +0 -1
  69. package/dist/modal/components/AddFunds/AddFundsProvider.js +0 -109
  70. package/dist/modal/components/AddFunds/AddFundsReceive.d.ts +0 -1
  71. package/dist/modal/components/AddFunds/AddFundsReceive.js +0 -83
  72. package/dist/modal/components/AddFunds/AddFundsSettings.d.ts +0 -1
  73. package/dist/modal/components/AddFunds/AddFundsSettings.js +0 -237
  74. package/dist/modal/components/AddFunds/MoonPayEmbed.d.ts +0 -2
  75. package/dist/modal/components/AddFunds/MoonPayEmbed.js +0 -7
  76. package/dist/modal/components/AddFunds/common.d.ts +0 -19
  77. package/dist/modal/components/AddFunds/common.js +0 -24
  78. package/dist/modal/components/AddFunds/index.d.ts +0 -3
  79. package/dist/modal/components/AddFunds/index.js +0 -4
  80. package/dist/modal/components/AuthInput/AuthInput.d.ts +0 -20
  81. package/dist/modal/components/AuthInput/AuthInput.js +0 -277
  82. package/dist/modal/components/AuthInput/hooks/useDropdownPosition.d.ts +0 -7
  83. package/dist/modal/components/AuthInput/hooks/useDropdownPosition.js +0 -33
  84. package/dist/modal/components/AuthInput/phoneMasks.d.ts +0 -247
  85. package/dist/modal/components/AuthInput/phoneMasks.js +0 -253
  86. package/dist/modal/components/AuthMainStep/AuthMainStep.d.ts +0 -9
  87. package/dist/modal/components/AuthMainStep/AuthMainStep.js +0 -50
  88. package/dist/modal/components/AuthMainStep/AuthMainStepContent.d.ts +0 -9
  89. package/dist/modal/components/AuthMainStep/AuthMainStepContent.js +0 -164
  90. package/dist/modal/components/AuthOptions/AuthOptions.d.ts +0 -9
  91. package/dist/modal/components/AuthOptions/AuthOptions.js +0 -85
  92. package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.d.ts +0 -1
  93. package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.js +0 -18
  94. package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.d.ts +0 -1
  95. package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.js +0 -10
  96. package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.d.ts +0 -1
  97. package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.js +0 -18
  98. package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.d.ts +0 -5
  99. package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.js +0 -49
  100. package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.d.ts +0 -1
  101. package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.js +0 -62
  102. package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.d.ts +0 -1
  103. package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +0 -48
  104. package/dist/modal/components/Body/AnimatedHeightWrapper.d.ts +0 -6
  105. package/dist/modal/components/Body/AnimatedHeightWrapper.js +0 -29
  106. package/dist/modal/components/Body/Body.d.ts +0 -11
  107. package/dist/modal/components/Body/Body.js +0 -350
  108. package/dist/modal/components/ChainSwitch/ChainSwitch.d.ts +0 -1
  109. package/dist/modal/components/ChainSwitch/ChainSwitch.js +0 -95
  110. package/dist/modal/components/ChainSwitch/config.d.ts +0 -7
  111. package/dist/modal/components/ChainSwitch/config.js +0 -17
  112. package/dist/modal/components/Controls/Controls.d.ts +0 -5
  113. package/dist/modal/components/Controls/Controls.js +0 -78
  114. package/dist/modal/components/Controls/Selects.d.ts +0 -2
  115. package/dist/modal/components/Controls/Selects.js +0 -173
  116. package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.d.ts +0 -1
  117. package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.js +0 -75
  118. package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.d.ts +0 -8
  119. package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.js +0 -175
  120. package/dist/modal/components/ExternalWalletStep/config.d.ts +0 -7
  121. package/dist/modal/components/ExternalWalletStep/config.js +0 -17
  122. package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.d.ts +0 -1
  123. package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.js +0 -39
  124. package/dist/modal/components/ExternalWallets/ExternalWallets.d.ts +0 -1
  125. package/dist/modal/components/ExternalWallets/ExternalWallets.js +0 -184
  126. package/dist/modal/components/Footer/Footer.d.ts +0 -1
  127. package/dist/modal/components/Footer/Footer.js +0 -95
  128. package/dist/modal/components/Header/Header.d.ts +0 -1
  129. package/dist/modal/components/Header/Header.js +0 -43
  130. package/dist/modal/components/Header/hooks/useStepTitle.d.ts +0 -3
  131. package/dist/modal/components/Header/hooks/useStepTitle.js +0 -61
  132. package/dist/modal/components/Hero/Hero.d.ts +0 -1
  133. package/dist/modal/components/Hero/Hero.js +0 -116
  134. package/dist/modal/components/IFrameStep/IFrameStep.d.ts +0 -1
  135. package/dist/modal/components/IFrameStep/IFrameStep.js +0 -59
  136. package/dist/modal/components/LoginDoneStep/LoginDoneStep.d.ts +0 -5
  137. package/dist/modal/components/LoginDoneStep/LoginDoneStep.js +0 -44
  138. package/dist/modal/components/ModalContent/ModalContent.d.ts +0 -10
  139. package/dist/modal/components/ModalContent/ModalContent.js +0 -88
  140. package/dist/modal/components/OAuth/FarcasterOAuthStep.d.ts +0 -3
  141. package/dist/modal/components/OAuth/FarcasterOAuthStep.js +0 -31
  142. package/dist/modal/components/OAuth/OAuth.d.ts +0 -6
  143. package/dist/modal/components/OAuth/OAuth.js +0 -79
  144. package/dist/modal/components/OAuth/TelegramOAuthStep.d.ts +0 -8
  145. package/dist/modal/components/OAuth/TelegramOAuthStep.js +0 -74
  146. package/dist/modal/components/OnRampComponents/AddingFunds.d.ts +0 -1
  147. package/dist/modal/components/OnRampComponents/AddingFunds.js +0 -23
  148. package/dist/modal/components/OnRampComponents/OnRampProviderButton.d.ts +0 -9
  149. package/dist/modal/components/OnRampComponents/OnRampProviderButton.js +0 -77
  150. package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.d.ts +0 -6
  151. package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.js +0 -107
  152. package/dist/modal/components/Setup2FAStep/Setup2FAStep.d.ts +0 -5
  153. package/dist/modal/components/Setup2FAStep/Setup2FAStep.js +0 -132
  154. package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.d.ts +0 -5
  155. package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.js +0 -27
  156. package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.d.ts +0 -12
  157. package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.js +0 -160
  158. package/dist/modal/components/Waiting/Waiting.d.ts +0 -6
  159. package/dist/modal/components/Waiting/Waiting.js +0 -17
  160. package/dist/modal/components/WalletCard/PartnerIcon.d.ts +0 -6
  161. package/dist/modal/components/WalletCard/PartnerIcon.js +0 -34
  162. package/dist/modal/components/WalletCard/WalletCard.d.ts +0 -18
  163. package/dist/modal/components/WalletCard/WalletCard.js +0 -128
  164. package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.d.ts +0 -6
  165. package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.js +0 -83
  166. package/dist/modal/components/common.d.ts +0 -59
  167. package/dist/modal/components/common.js +0 -261
  168. package/dist/modal/components/index.d.ts +0 -1
  169. package/dist/modal/components/index.js +0 -2
  170. package/dist/modal/constants/constants.d.ts +0 -40
  171. package/dist/modal/constants/constants.js +0 -142
  172. package/dist/modal/constants/defaults.d.ts +0 -5
  173. package/dist/modal/constants/defaults.js +0 -10
  174. package/dist/modal/constants/oAuthLogos.d.ts +0 -17
  175. package/dist/modal/constants/oAuthLogos.js +0 -158
  176. package/dist/modal/constants/walletTypeConfig.d.ts +0 -6
  177. package/dist/modal/constants/walletTypeConfig.js +0 -13
  178. package/dist/modal/hooks/useGoBack.d.ts +0 -1
  179. package/dist/modal/hooks/useGoBack.js +0 -43
  180. package/dist/modal/hooks/useTelegramLogin.d.ts +0 -12
  181. package/dist/modal/hooks/useTelegramLogin.js +0 -65
  182. package/dist/modal/index.d.ts +0 -8
  183. package/dist/modal/index.js +0 -29
  184. package/dist/modal/stores/index.d.ts +0 -1
  185. package/dist/modal/stores/index.js +0 -2
  186. package/dist/modal/stores/modal/actions.d.ts +0 -3
  187. package/dist/modal/stores/modal/actions.js +0 -135
  188. package/dist/modal/stores/modal/useModalStore.d.ts +0 -103
  189. package/dist/modal/stores/modal/useModalStore.js +0 -73
  190. package/dist/modal/types/commonTypes.d.ts +0 -6
  191. package/dist/modal/types/commonTypes.js +0 -1
  192. package/dist/modal/types/modalProps.d.ts +0 -129
  193. package/dist/modal/types/modalProps.js +0 -12
  194. package/dist/modal/utils/authInputHelpers.d.ts +0 -5
  195. package/dist/modal/utils/authInputHelpers.js +0 -41
  196. package/dist/modal/utils/authLayoutHelpers.d.ts +0 -3
  197. package/dist/modal/utils/authLayoutHelpers.js +0 -8
  198. package/dist/modal/utils/countryCodes.d.ts +0 -8
  199. package/dist/modal/utils/countryCodes.js +0 -45
  200. package/dist/modal/utils/getMailtoLink.d.ts +0 -1
  201. package/dist/modal/utils/getMailtoLink.js +0 -10
  202. package/dist/modal/utils/getTileButtonFlex.d.ts +0 -1
  203. package/dist/modal/utils/getTileButtonFlex.js +0 -20
  204. package/dist/modal/utils/getWalletDisplayName.d.ts +0 -5
  205. package/dist/modal/utils/getWalletDisplayName.js +0 -22
  206. package/dist/modal/utils/isPasskeySupported.d.ts +0 -1
  207. package/dist/modal/utils/isPasskeySupported.js +0 -15
  208. package/dist/modal/utils/openPopup.d.ts +0 -6
  209. package/dist/modal/utils/openPopup.js +0 -60
  210. package/dist/modal/utils/routeMobileExternalWallet.d.ts +0 -1
  211. package/dist/modal/utils/routeMobileExternalWallet.js +0 -31
  212. package/dist/modal/utils/steps.d.ts +0 -133
  213. package/dist/modal/utils/steps.js +0 -273
  214. package/dist/modal/utils/stringFormatters.d.ts +0 -5
  215. package/dist/modal/utils/stringFormatters.js +0 -19
  216. package/dist/modal/utils/validateOnRampConfig.d.ts +0 -5
  217. package/dist/modal/utils/validateOnRampConfig.js +0 -32
  218. package/dist/provider/actions/getEmbeddedAccount.d.ts +0 -26
  219. package/dist/provider/actions/getEmbeddedAccount.js +0 -52
  220. package/dist/provider/actions/getWallet.d.ts +0 -5
  221. package/dist/provider/actions/getWallet.js +0 -18
  222. package/dist/provider/actions/index.d.ts +0 -47
  223. package/dist/provider/actions/index.js +0 -79
  224. package/dist/provider/actions/utils.d.ts +0 -4
  225. package/dist/provider/actions/utils.js +0 -34
  226. package/dist/provider/components/CosmosWalletWrapper.d.ts +0 -11
  227. package/dist/provider/components/CosmosWalletWrapper.js +0 -43
  228. package/dist/provider/components/EvmWalletWrapper.d.ts +0 -12
  229. package/dist/provider/components/EvmWalletWrapper.js +0 -43
  230. package/dist/provider/components/ExternalWalletWrapper.d.ts +0 -8
  231. package/dist/provider/components/ExternalWalletWrapper.js +0 -140
  232. package/dist/provider/components/SolanaWalletWrapper.d.ts +0 -9
  233. package/dist/provider/components/SolanaWalletWrapper.js +0 -44
  234. package/dist/provider/external/getParaCosmosConnector.d.ts +0 -7
  235. package/dist/provider/external/getParaCosmosConnector.js +0 -19
  236. package/dist/provider/external/getParaCosmosLib.d.ts +0 -4
  237. package/dist/provider/external/getParaCosmosLib.js +0 -16
  238. package/dist/provider/external/getParaEvmConnector.d.ts +0 -7
  239. package/dist/provider/external/getParaEvmConnector.js +0 -19
  240. package/dist/provider/external/getParaEvmLib.d.ts +0 -4
  241. package/dist/provider/external/getParaEvmLib.js +0 -16
  242. package/dist/provider/external/getParaSolanaConnector.d.ts +0 -7
  243. package/dist/provider/external/getParaSolanaConnector.js +0 -19
  244. package/dist/provider/external/getParaSolanaLib.d.ts +0 -4
  245. package/dist/provider/external/getParaSolanaLib.js +0 -16
  246. package/dist/provider/external/stubs/CosmosExternalWalletContextStub.d.ts +0 -2
  247. package/dist/provider/external/stubs/CosmosExternalWalletContextStub.js +0 -8
  248. package/dist/provider/external/stubs/EvmExternalWalletContextStub.d.ts +0 -2
  249. package/dist/provider/external/stubs/EvmExternalWalletContextStub.js +0 -8
  250. package/dist/provider/external/stubs/SolanaExternalWalletContextStub.d.ts +0 -2
  251. package/dist/provider/external/stubs/SolanaExternalWalletContextStub.js +0 -8
  252. package/dist/provider/hooks/index.d.ts +0 -3
  253. package/dist/provider/hooks/index.js +0 -4
  254. package/dist/provider/hooks/mutations/core.d.ts +0 -27
  255. package/dist/provider/hooks/mutations/core.js +0 -66
  256. package/dist/provider/hooks/mutations/index.d.ts +0 -3
  257. package/dist/provider/hooks/mutations/index.js +0 -9
  258. package/dist/provider/hooks/mutations/useLinkAccount.d.ts +0 -9
  259. package/dist/provider/hooks/mutations/useLinkAccount.js +0 -18
  260. package/dist/provider/hooks/mutations/utils.d.ts +0 -12
  261. package/dist/provider/hooks/mutations/utils.js +0 -90
  262. package/dist/provider/hooks/queries/core.d.ts +0 -4
  263. package/dist/provider/hooks/queries/core.js +0 -16
  264. package/dist/provider/hooks/queries/index.d.ts +0 -4
  265. package/dist/provider/hooks/queries/index.js +0 -11
  266. package/dist/provider/hooks/queries/useAccount.d.ts +0 -90
  267. package/dist/provider/hooks/queries/useAccount.js +0 -135
  268. package/dist/provider/hooks/queries/useIsFullyLoggedIn.d.ts +0 -5
  269. package/dist/provider/hooks/queries/useIsFullyLoggedIn.js +0 -24
  270. package/dist/provider/hooks/queries/useWallet.d.ts +0 -5
  271. package/dist/provider/hooks/queries/useWallet.js +0 -26
  272. package/dist/provider/hooks/queries/useWalletBalance.d.ts +0 -6
  273. package/dist/provider/hooks/queries/useWalletBalance.js +0 -55
  274. package/dist/provider/hooks/queries/utils.d.ts +0 -7
  275. package/dist/provider/hooks/queries/utils.js +0 -25
  276. package/dist/provider/hooks/utils/index.d.ts +0 -3
  277. package/dist/provider/hooks/utils/index.js +0 -10
  278. package/dist/provider/hooks/utils/useAutoSessionKeepAlive.d.ts +0 -3
  279. package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +0 -74
  280. package/dist/provider/hooks/utils/useClient.d.ts +0 -5
  281. package/dist/provider/hooks/utils/useClient.js +0 -10
  282. package/dist/provider/hooks/utils/useEventListeners.d.ts +0 -2
  283. package/dist/provider/hooks/utils/useEventListeners.js +0 -157
  284. package/dist/provider/hooks/utils/useFormattedBiometricHints.d.ts +0 -4
  285. package/dist/provider/hooks/utils/useFormattedBiometricHints.js +0 -27
  286. package/dist/provider/hooks/utils/useInternalClient.d.ts +0 -5
  287. package/dist/provider/hooks/utils/useInternalClient.js +0 -10
  288. package/dist/provider/hooks/utils/useModal.d.ts +0 -11
  289. package/dist/provider/hooks/utils/useModal.js +0 -27
  290. package/dist/provider/hooks/utils/useWalletState.d.ts +0 -15
  291. package/dist/provider/hooks/utils/useWalletState.js +0 -48
  292. package/dist/provider/index.d.ts +0 -6
  293. package/dist/provider/index.js +0 -11
  294. package/dist/provider/providers/AccountLinkProvider.d.ts +0 -47
  295. package/dist/provider/providers/AccountLinkProvider.js +0 -452
  296. package/dist/provider/providers/AuthProvider.d.ts +0 -37
  297. package/dist/provider/providers/AuthProvider.js +0 -523
  298. package/dist/provider/providers/CosmosExternalWalletProvider.d.ts +0 -7
  299. package/dist/provider/providers/CosmosExternalWalletProvider.js +0 -66
  300. package/dist/provider/providers/EvmExternalWalletProvider.d.ts +0 -7
  301. package/dist/provider/providers/EvmExternalWalletProvider.js +0 -74
  302. package/dist/provider/providers/ExternalWalletProvider.d.ts +0 -59
  303. package/dist/provider/providers/ExternalWalletProvider.js +0 -596
  304. package/dist/provider/providers/SolanaExternalWalletProvider.d.ts +0 -7
  305. package/dist/provider/providers/SolanaExternalWalletProvider.js +0 -66
  306. package/dist/provider/stores/getters.d.ts +0 -4
  307. package/dist/provider/stores/getters.js +0 -13
  308. package/dist/provider/stores/setters.d.ts +0 -1
  309. package/dist/provider/stores/setters.js +0 -7
  310. package/dist/provider/stores/slices/analytics.d.ts +0 -3
  311. package/dist/provider/stores/slices/analytics.js +0 -9
  312. package/dist/provider/stores/slices/client.d.ts +0 -3
  313. package/dist/provider/stores/slices/client.js +0 -9
  314. package/dist/provider/stores/slices/config.d.ts +0 -3
  315. package/dist/provider/stores/slices/config.js +0 -9
  316. package/dist/provider/stores/slices/externalWallets.d.ts +0 -3
  317. package/dist/provider/stores/slices/externalWallets.js +0 -46
  318. package/dist/provider/stores/slices/index.d.ts +0 -5
  319. package/dist/provider/stores/slices/index.js +0 -6
  320. package/dist/provider/stores/slices/modal.d.ts +0 -3
  321. package/dist/provider/stores/slices/modal.js +0 -18
  322. package/dist/provider/stores/slices/wallet.d.ts +0 -3
  323. package/dist/provider/stores/slices/wallet.js +0 -13
  324. package/dist/provider/stores/types.d.ts +0 -76
  325. package/dist/provider/stores/types.js +0 -1
  326. package/dist/provider/stores/useStore.d.ts +0 -17
  327. package/dist/provider/stores/useStore.js +0 -34
  328. package/dist/provider/types/externalWalletProviders.d.ts +0 -12
  329. package/dist/provider/types/externalWalletProviders.js +0 -1
  330. package/dist/provider/types/provider.d.ts +0 -161
  331. package/dist/provider/types/provider.js +0 -1
  332. package/dist/provider/types/query.d.ts +0 -3
  333. package/dist/provider/types/query.js +0 -1
  334. package/dist/provider/types/utils.d.ts +0 -45
  335. package/dist/provider/types/utils.js +0 -1
  336. package/dist/provider/utils/constants.d.ts +0 -5
  337. package/dist/provider/utils/constants.js +0 -10
  338. package/dist/provider/utils/paraConfigTypeGuards.d.ts +0 -7
  339. package/dist/provider/utils/paraConfigTypeGuards.js +0 -13
  340. package/dist/provider/utils/renameMutations.d.ts +0 -5
  341. package/dist/provider/utils/renameMutations.js +0 -18
@@ -1,184 +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 { safeStyled } from "@getpara/react-common";
7
- import { StyledCpslTileButton } from "../common.js";
8
- import { CpslButton, CpslIcon, CpslInput, CpslText } from "@getpara/react-components";
9
- import { useModalStore } from "../../stores/index.js";
10
- import { ModalStep } from "../../utils/steps.js";
11
- import { useState } from "react";
12
- import { hasEmbeddedAuth } from "../../utils/authLayoutHelpers.js";
13
- import { useExternalWallets } from "../../../provider/providers/ExternalWalletProvider.js";
14
- import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
15
- const HAS_MORE_LENGTH = 3;
16
- const ExternalWallets = () => {
17
- const para = useInternalClient();
18
- const { wallets: allWallets, connectExternalWallet } = useExternalWallets();
19
- const setSelectedExternalWalletId = useModalStore((state) => state.setSelectedExternalWalletId);
20
- const setStep = useModalStore((state) => state.setStep);
21
- const showAll = useModalStore((state) => state.step === ModalStep.EX_WALLET_MORE);
22
- const authLayout = useModalStore((state) => state.authLayout);
23
- const [search, setSearch] = useState("");
24
- const dedupedWallets = Array.from(new Set(allWallets.map((wallet) => wallet.id))).map((id) => {
25
- return allWallets.find((wallet) => wallet.id === id);
26
- }).filter((wallet) => !para.isFarcasterMiniApp || wallet.internalId === "FARCASTER");
27
- const hasMore = dedupedWallets.length > HAS_MORE_LENGTH;
28
- const walletsToShow = showAll || !hasMore ? search ? dedupedWallets.filter((w) => w.name.toLowerCase().includes(search.toLowerCase())) : dedupedWallets : dedupedWallets.slice(0, HAS_MORE_LENGTH);
29
- const showMoreButton = !showAll && hasMore;
30
- const handleShowAll = () => {
31
- setStep(ModalStep.EX_WALLET_MORE);
32
- };
33
- const handleParaClick = () => {
34
- setStep(ModalStep.AUTH_MORE);
35
- };
36
- const handleWalletClick = (wallet) => () => {
37
- const shouldShowNetworkSelection = allWallets.filter((w) => w.id === wallet.id).length > 1;
38
- if (shouldShowNetworkSelection) {
39
- setSelectedExternalWalletId(wallet.internalId);
40
- setStep(ModalStep.EX_WALLET_NETWORK_SELECT);
41
- return;
42
- }
43
- setSelectedExternalWalletId(wallet.internalId);
44
- setStep(ModalStep.EX_WALLET_SELECTED);
45
- if (wallet.installed) {
46
- connectExternalWallet(wallet);
47
- } else if (wallet.isMobile) {
48
- connectExternalWallet(wallet, true);
49
- }
50
- };
51
- return /* @__PURE__ */ jsxs(Container, { $maxHeight: showAll, children: [
52
- showAll && /* @__PURE__ */ jsxs(Fragment, { children: [
53
- /* @__PURE__ */ jsx(SearchInputWrapper, { children: /* @__PURE__ */ jsx(
54
- SearchInput,
55
- {
56
- placeholder: "Search for your wallet",
57
- onCpslInput: (e) => __async(void 0, null, function* () {
58
- var _a;
59
- setSearch((_a = e.target.value) != null ? _a : "");
60
- }),
61
- value: search,
62
- style: { width: "100%" },
63
- children: /* @__PURE__ */ jsx(SearchIcon, { slot: "start", icon: "search" })
64
- }
65
- ) }),
66
- hasEmbeddedAuth(authLayout != null ? authLayout : []) && /* @__PURE__ */ jsx(CpslButton, { fullWidth: true, variant: "tertiary", onClick: handleParaClick, children: /* @__PURE__ */ jsxs(WalletButtonOuterContainer, { children: [
67
- /* @__PURE__ */ jsxs(WalletButtonInnerContainer, { children: [
68
- /* @__PURE__ */ jsx(CpslIcon, { slot: "start", icon: "paraIcon" }),
69
- /* @__PURE__ */ jsx(CpslText, { weight: "medium", children: "Para" })
70
- ] }),
71
- /* @__PURE__ */ jsx(Badge, { $show: true, $variant: "installed", children: /* @__PURE__ */ jsx(CpslText, { variant: "body2XS", weight: "medium", children: "Available" }) })
72
- ] }) })
73
- ] }),
74
- walletsToShow.map(
75
- (wallet) => showAll ? /* @__PURE__ */ jsx(CpslButton, { fullWidth: true, variant: "tertiary", onClick: handleWalletClick(wallet), children: /* @__PURE__ */ jsxs(WalletButtonOuterContainer, { children: [
76
- /* @__PURE__ */ jsxs(WalletButtonInnerContainer, { children: [
77
- /* @__PURE__ */ jsx(CpslIcon, { slot: "start", src: wallet.iconUrl }),
78
- /* @__PURE__ */ jsx(CpslText, { weight: "medium", children: wallet.name })
79
- ] }),
80
- /* @__PURE__ */ jsx(Badge, { $show: !!wallet.isMobile || !!wallet.installed, $variant: wallet.installed ? "installed" : "mobile", children: /* @__PURE__ */ jsx(CpslText, { variant: "body2XS", weight: "medium", children: wallet.installed ? "Installed" : "Mobile" }) })
81
- ] }) }, wallet.id) : /* @__PURE__ */ jsx(WalletTileButton, { src: wallet.iconUrl, onClick: handleWalletClick(wallet), children: /* @__PURE__ */ jsxs(TileButtonInnerContainer, { children: [
82
- wallet.installed && /* @__PURE__ */ jsx(InstalledIndicator, {}),
83
- /* @__PURE__ */ jsx(CpslText, { variant: "bodyXS", color: "secondary", weight: "medium", children: wallet.name })
84
- ] }) }, wallet.id)
85
- ),
86
- showMoreButton && /* @__PURE__ */ jsxs(CpslButton, { variant: "tertiary", fullWidth: true, onClick: handleShowAll, children: [
87
- /* @__PURE__ */ jsx(CpslIcon, { slot: "start", icon: "wallet" }),
88
- "More Wallets"
89
- ] }),
90
- showAll && /* @__PURE__ */ jsx(BlurContainer, {})
91
- ] });
92
- };
93
- const Container = safeStyled.div`
94
- position: relative;
95
- display: flex;
96
- justify-content: center;
97
- gap: 8px;
98
- flex-wrap: wrap;
99
-
100
- max-height: ${({ $maxHeight }) => $maxHeight ? "348px" : "none"};
101
- overflow-y: auto;
102
-
103
- &::-webkit-scrollbar {
104
- display: none;
105
- }
106
- -ms-overflow-style: none;
107
- scrollbar-width: none;
108
- `;
109
- const WalletTileButton = safeStyled(StyledCpslTileButton)`
110
- flex: 1;
111
- `;
112
- const WalletButtonOuterContainer = safeStyled.div`
113
- width: 100%;
114
- display: flex;
115
- align-items: center;
116
- gap: 8px;
117
- justify-content: space-between;
118
- `;
119
- const WalletButtonInnerContainer = safeStyled.div`
120
- display: flex;
121
- align-items: center;
122
- gap: 8px;
123
-
124
- cpsl-icon {
125
- --icon-color: var(--cpsl-color-contrast);
126
- }
127
- cpsl-text {
128
- &::part(text-element) {
129
- color: var(--cpsl-color-contrast);
130
- }
131
- }
132
- `;
133
- const Badge = safeStyled.div`
134
- visibility: ${({ $show }) => $show ? "visible" : "hidden"};
135
- padding: 2px 4px;
136
- border-radius: 4px;
137
- border: 1px solid;
138
- border-color: ${({ $variant }) => $variant === "installed" ? "var(--cpsl-color-utility-green)" : "var(--cpsl-color-text-primary)"};
139
- cpsl-text {
140
- &::part(text-element) {
141
- color: ${({ $variant }) => $variant === "installed" ? "var(--cpsl-color-utility-green)" : "var(--cpsl-color-text-primary)"};
142
- }
143
- }
144
- `;
145
- const InstalledIndicator = safeStyled.span`
146
- width: 8px;
147
- height: 8px;
148
- border-radius: 100%;
149
- background-color: var(--cpsl-color-utility-green);
150
- `;
151
- const TileButtonInnerContainer = safeStyled.div`
152
- display: flex;
153
- gap: 4px;
154
- align-items: center;
155
- `;
156
- const SearchIcon = safeStyled(CpslIcon)`
157
- --icon-color: var(--cpsl-color-contrast);
158
- `;
159
- const SearchInputWrapper = safeStyled.div`
160
- width: 100%;
161
- background-color: var(--cpsl-color-background-0);
162
-
163
- position: sticky;
164
- top: 0;
165
- padding-bottom: 4px;
166
- margin-bottom: -4px;
167
- `;
168
- const SearchInput = safeStyled(CpslInput)`
169
- width: 100%;
170
- --container-background-color: var(--cpsl-color-background-8);
171
- --input-background-color: var(--cpsl-color-background-8);
172
- `;
173
- const BlurContainer = safeStyled.div`
174
- position: sticky;
175
- height: 56px;
176
- width: 100%;
177
- bottom: 0;
178
-
179
- background: linear-gradient(0deg, var(--cpsl-color-background-0) 0%, rgba(234, 239, 211, 0) 100%);
180
- pointer-events: none;
181
- `;
182
- export {
183
- ExternalWallets
184
- };
@@ -1 +0,0 @@
1
- export declare const Footer: () => import("react/jsx-runtime").JSX.Element | null;
@@ -1,95 +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 { CpslButton, CpslIcon, CpslText } from "@getpara/react-components";
6
- import { useModalStore } from "../../stores/index.js";
7
- import { PARA_CONNECT, PARA_TERMS_AND_CONDITIONS } from "../../constants/constants.js";
8
- import { useMemo } from "react";
9
- import { getStepHasFooter } from "../../utils/steps.js";
10
- import { useAccount } from "../../../provider/index.js";
11
- const Footer = () => {
12
- const { embedded } = useAccount();
13
- const currentStep = useModalStore((state) => state.step);
14
- const accountFooter = (embedded == null ? void 0 : embedded.isConnected) && !embedded.isGuestMode;
15
- const showFooter = accountFooter || getStepHasFooter(currentStep);
16
- const Content = useMemo(() => {
17
- if (accountFooter) {
18
- return /* @__PURE__ */ jsxs(ConnectContainer, { children: [
19
- /* @__PURE__ */ jsxs(ConnectText, { variant: "bodyS", color: "secondary", weight: "medium", children: [
20
- "Access all your wallet\u2019s features at",
21
- " ",
22
- /* @__PURE__ */ jsx("a", { href: PARA_CONNECT, target: "blank", children: /* @__PURE__ */ jsx(ClickableText, { variant: "bodyS", weight: "medium", children: "Para Connect" }) })
23
- ] }),
24
- /* @__PURE__ */ jsx(CpslButton, { as: "a", href: PARA_CONNECT, target: "blank", variant: "ghost", children: /* @__PURE__ */ jsx(RightChevron, { icon: "chevronUp" }) })
25
- ] });
26
- }
27
- return /* @__PURE__ */ jsxs(Fragment, { children: [
28
- /* @__PURE__ */ jsxs(InlineText, { variant: "body2XS", color: "secondary", weight: "medium", children: [
29
- "By logging in you agree to our",
30
- " ",
31
- /* @__PURE__ */ jsx("a", { href: PARA_TERMS_AND_CONDITIONS, target: "blank", children: /* @__PURE__ */ jsx(ClickableText, { variant: "body2XS", weight: "medium", children: "Terms & Conditions" }) })
32
- ] }),
33
- /* @__PURE__ */ jsxs(PoweredByContainer, { children: [
34
- /* @__PURE__ */ jsx(InlineText, { variant: "bodyS", color: "secondary", weight: "medium", children: "Powered by" }),
35
- /* @__PURE__ */ jsx(ParaLogo, { icon: "para" })
36
- ] })
37
- ] });
38
- }, [embedded]);
39
- if (!showFooter) {
40
- return null;
41
- }
42
- return /* @__PURE__ */ jsx(FooterContainer, { slot: "footer", children: /* @__PURE__ */ jsx(FooterContentContainer, { children: Content }) });
43
- };
44
- const FooterContainer = safeStyled.div`
45
- display: flex;
46
- flex-direction: column;
47
- align-items: center;
48
- gap: 16px;
49
- padding: 8px 0px;
50
- `;
51
- const FooterContentContainer = safeStyled.div`
52
- display: flex;
53
- flex-direction: column;
54
- align-items: center;
55
- gap: 8px;
56
- `;
57
- const PoweredByContainer = safeStyled.div`
58
- display: flex;
59
- gap: 5px;
60
- align-items: center;
61
- justify-content: center;
62
- `;
63
- const ConnectContainer = safeStyled.div`
64
- display: flex;
65
- gap: 8px;
66
- align-items: center;
67
- justify-content: center;
68
- `;
69
- const RightChevron = safeStyled(CpslIcon)`
70
- transform: rotate(90deg);
71
-
72
- /* --icon-color: var(--cpsl-color-text-tertiary); */
73
- --height: 24px;
74
- --width: 24px;
75
- `;
76
- const InlineText = safeStyled(CpslText)`
77
- text-align: center;
78
- display: inline-block;
79
- `;
80
- const ConnectText = safeStyled(InlineText)`
81
- line-height: 20px;
82
- `;
83
- const ClickableText = safeStyled(InlineText)`
84
- cursor: pointer;
85
- display: inline-block;
86
- `;
87
- const ParaLogo = safeStyled(CpslIcon)`
88
- display: inline-block;
89
- --icon-color: var(--cpsl-color-text-secondary);
90
- --width: 49px;
91
- --height: auto;
92
- `;
93
- export {
94
- Footer
95
- };
@@ -1 +0,0 @@
1
- export declare const Header: () => import("react/jsx-runtime").JSX.Element;
@@ -1,43 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- import { jsx } from "react/jsx-runtime";
4
- import { safeStyled } from "@getpara/react-common";
5
- import { useStepTitle } from "./hooks/useStepTitle.js";
6
- import { CenteredText } from "../common.js";
7
- import { AnimatePresence, motion } from "framer-motion";
8
- import { useModalStore } from "../../stores/index.js";
9
- import { BODY_MOTION_VARIANTS, BODY_TRANSITION } from "../../constants/constants.js";
10
- const Header = () => {
11
- const { title } = useStepTitle();
12
- const stepDirection = useModalStore((state) => state.stepDirection);
13
- const currentStep = useModalStore((state) => state.step);
14
- return /* @__PURE__ */ jsx(AnimatePresence, { mode: "popLayout", initial: false, custom: stepDirection, children: /* @__PURE__ */ jsx(
15
- Container,
16
- {
17
- custom: stepDirection,
18
- variants: BODY_MOTION_VARIANTS,
19
- initial: "enter",
20
- animate: "center",
21
- exit: "exit",
22
- transition: BODY_TRANSITION,
23
- slot: "header",
24
- id: "header",
25
- children: /* @__PURE__ */ jsx(CenteredText, { weight: "semiBold", color: "secondary", children: title })
26
- },
27
- ["ADD_FUNDS_BUY", "ADD_FUNDS_RECEIVE", "ADD_FUNDS_WITHDRAW"].includes(currentStep) ? "ADD_FUNDS" : currentStep
28
- ) });
29
- };
30
- const Container = safeStyled(motion.div)`
31
- position: absolute;
32
- top: 16px;
33
- width: 100%;
34
- z-index: 2;
35
- display: flex;
36
- align-items: center;
37
- justify-content: space-between;
38
- gap: 8px;
39
- flex-wrap: wrap;
40
- `;
41
- export {
42
- Header
43
- };
@@ -1,3 +0,0 @@
1
- export declare const useStepTitle: () => {
2
- title: any;
3
- };
@@ -1,61 +0,0 @@
1
- "use client";
2
- import "../../../../chunk-MMUBH76A.js";
3
- import { useMemo } from "react";
4
- import { useModalStore } from "../../../stores/modal/useModalStore.js";
5
- import { ModalStep } from "../../../utils/steps.js";
6
- import { useExternalWallets } from "../../../../provider/providers/ExternalWalletProvider.js";
7
- import { useStore } from "../../../../provider/stores/useStore.js";
8
- import { useAccountLinking } from "../../../../provider/providers/AccountLinkProvider.js";
9
- const useStepTitle = () => {
10
- const hideWallets = useStore((state) => {
11
- var _a;
12
- return (_a = state.modalConfig) == null ? void 0 : _a.hideWallets;
13
- });
14
- const isLogin = useModalStore((state) => state.isLogin());
15
- const currentStep = useModalStore((state) => state.step);
16
- const { chainId } = useExternalWallets();
17
- const { isEnabled: isAccountLinkingEnabled } = useAccountLinking();
18
- const titles = useMemo(
19
- () => ({
20
- [ModalStep.AUTH_MAIN]: "",
21
- [ModalStep.AUTH_MORE]: "Sign Up or Log In",
22
- [ModalStep.AUTH_GUEST_SIGNUP]: "Complete Account Setup",
23
- [ModalStep.EX_WALLET_MORE]: "Connect Wallet",
24
- [ModalStep.VERIFICATIONS]: "Sign Up",
25
- [ModalStep.AWAITING_OAUTH]: isLogin ? "Login" : "Sign Up",
26
- [ModalStep.FARCASTER_OAUTH]: isLogin ? "Login" : "Sign Up",
27
- [ModalStep.BIOMETRIC_CREATION]: "Sign Up",
28
- [ModalStep.PASSWORD_CREATION]: "Sign Up",
29
- [ModalStep.AWAITING_BIOMETRIC_CREATION]: "Sign Up",
30
- [ModalStep.AWAITING_WALLET_CREATION]: isLogin ? "Login" : "Sign Up",
31
- [ModalStep.AWAITING_PASSWORD_CREATION]: "Sign Up",
32
- [ModalStep.WALLET_CREATION_DONE]: hideWallets ? "Account Created" : "Wallet Created",
33
- [ModalStep.SECRET]: isLogin ? "Login" : "Sign Up",
34
- [ModalStep.BIOMETRIC_LOGIN]: "Login",
35
- [ModalStep.EMBEDDED_PASSWORD_LOGIN]: "Login",
36
- [ModalStep.AWAITING_PASSWORD_LOGIN]: "Login",
37
- [ModalStep.AWAITING_BIOMETRIC_LOGIN]: "Login",
38
- [ModalStep.LOGIN_DONE]: "",
39
- [ModalStep.SETUP_2FA]: "2FA",
40
- [ModalStep.VERIFY_2FA]: "2FA",
41
- [ModalStep.TWO_FACTOR_DONE]: "2FA",
42
- [ModalStep.ADD_FUNDS_BUY]: "",
43
- [ModalStep.ADD_FUNDS_RECEIVE]: "",
44
- [ModalStep.ADD_FUNDS_WITHDRAW]: "",
45
- [ModalStep.ADD_FUNDS_AWAITING]: "",
46
- [ModalStep.ADD_FUNDS_SUCCESS]: "",
47
- [ModalStep.ADD_FUNDS_FAILURE]: "",
48
- [ModalStep.ACCOUNT_MAIN]: "",
49
- [ModalStep.CHAIN_SWITCH]: "",
50
- [ModalStep.ACCOUNT_PROFILE]: isAccountLinkingEnabled ? "Profile" : "Settings",
51
- [ModalStep.ACCOUNT_PROFILE_LIST]: "Link Account",
52
- [ModalStep.ACCOUNT_PROFILE_ADD]: "Link Account",
53
- [ModalStep.ACCOUNT_PROFILE_REMOVE]: "Unlink Account"
54
- }),
55
- [isLogin, chainId, hideWallets]
56
- );
57
- return { title: titles[currentStep] };
58
- };
59
- export {
60
- useStepTitle
61
- };
@@ -1 +0,0 @@
1
- export declare const Hero: () => import("react/jsx-runtime").JSX.Element;
@@ -1,116 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
- import { CpslHero, CpslIcon, CpslIdenticon } from "@getpara/react-components";
5
- import { safeStyled } from "@getpara/react-common";
6
- import { ModalStep } from "../../utils/steps.js";
7
- import { useModalStore } from "../../stores/index.js";
8
- import { NETWORK_NOT_SUPPORTED_ERROR } from "../../constants/constants.js";
9
- import { useEffect, useState } from "react";
10
- import { isMobile } from "@getpara/web-sdk";
11
- import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
12
- import { useExternalWallets } from "../../../provider/providers/ExternalWalletProvider.js";
13
- import { useWallet } from "../../../provider/index.js";
14
- const getStepConfig = ({
15
- externalWalletError
16
- }) => {
17
- var _a;
18
- return {
19
- [ModalStep.EX_WALLET_SELECTED]: {
20
- variant: "externalWalletConnection",
21
- topOffset: 40,
22
- spacerHeight: 158,
23
- hideFadeOut: true
24
- },
25
- [ModalStep.CHAIN_SWITCH]: {
26
- variant: ((_a = externalWalletError == null ? void 0 : externalWalletError[0]) == null ? void 0 : _a.toLowerCase()) === NETWORK_NOT_SUPPORTED_ERROR ? "failed" : "externalWalletConnection",
27
- topOffset: 20,
28
- spacerHeight: 158,
29
- hideFadeOut: true
30
- },
31
- [ModalStep.FARCASTER_OAUTH]: {
32
- variant: "externalWalletConnection",
33
- topOffset: 40,
34
- spacerHeight: 158,
35
- hideFadeOut: true
36
- }
37
- };
38
- };
39
- const Hero = () => {
40
- const para = useInternalClient();
41
- const { wallet: connector, walletDisplayHelpers, avatar } = useExternalWallets();
42
- const step = useModalStore((state) => state.step);
43
- const externalWalletError = useModalStore((state) => state.externalWalletError);
44
- const { data: activeWallet } = useWallet();
45
- const [currentStep, setCurrentStep] = useState(step);
46
- const stepConfig = getStepConfig({
47
- externalWalletError
48
- })[currentStep];
49
- useEffect(() => {
50
- const prevStepConfig = getStepConfig({
51
- externalWalletError
52
- })[currentStep];
53
- const newStepConfig = getStepConfig({
54
- externalWalletError
55
- })[step];
56
- const delay = newStepConfig && prevStepConfig ? 0 : newStepConfig && !prevStepConfig ? 0 : 200;
57
- setTimeout(() => {
58
- setCurrentStep(step);
59
- }, delay);
60
- }, [step]);
61
- const isExternalStep = currentStep === ModalStep.EX_WALLET_SELECTED;
62
- const isChainSwitchStep = currentStep === ModalStep.CHAIN_SWITCH;
63
- const isAccountStep = currentStep === ModalStep.ACCOUNT_MAIN;
64
- const isFarcasterStep = currentStep === ModalStep.FARCASTER_OAUTH;
65
- const { showExtension, isCosmosMobileWallet } = walletDisplayHelpers;
66
- const shouldHide = !stepConfig || !isMobile() && isExternalStep && !showExtension || !isMobile() && isChainSwitchStep && isCosmosMobileWallet || !isMobile() && isFarcasterStep;
67
- const { variant, topOffset, spacerHeight, hideFadeOut } = stepConfig != null ? stepConfig : {};
68
- return /* @__PURE__ */ jsxs(Fragment, { children: [
69
- /* @__PURE__ */ jsx(Container, { $top: -45 + (topOffset != null ? topOffset : 0), children: shouldHide ? null : /* @__PURE__ */ jsxs(StyledHero, { $isAccount: isAccountStep, hideFadeOut, variant, height: 480, withDefaultTheme: true, children: [
70
- (isExternalStep || isChainSwitchStep) && /* @__PURE__ */ jsx(WalletLogo, { slot: "connectionLeft", src: connector == null ? void 0 : connector.iconUrl }),
71
- isFarcasterStep && /* @__PURE__ */ jsx(WalletLogo, { slot: "connectionLeft", icon: "farcasterBrand" }),
72
- isAccountStep && (avatar ? /* @__PURE__ */ jsx(Avatar, { slot: "image", src: avatar }) : activeWallet ? /* @__PURE__ */ jsx(IconAvatar, { slot: "image", size: "100%", hash: para.getIdenticonHash(activeWallet.id, activeWallet.type) }) : null)
73
- ] }) }),
74
- !shouldHide && /* @__PURE__ */ jsx(Spacer, { $height: spacerHeight != null ? spacerHeight : 0 })
75
- ] });
76
- };
77
- const Container = safeStyled.div`
78
- display: flex;
79
- position: absolute;
80
- justify-content: center;
81
- align-items: center;
82
- width: 100%;
83
-
84
- top: ${({ $top }) => `${$top}px`};
85
- `;
86
- const Spacer = safeStyled.div`
87
- height: ${({ $height }) => `${$height}px`};
88
- `;
89
- const WalletLogo = safeStyled(CpslIcon)`
90
- --height: 60px;
91
- --width: 60px;
92
- `;
93
- const Avatar = safeStyled.img`
94
- width: 100%;
95
- height: 100%;
96
- object-fit: contain;
97
- `;
98
- const IconAvatar = safeStyled(CpslIdenticon)`
99
- border-radius: 1000px;
100
- `;
101
- const StyledHero = safeStyled(CpslHero)`
102
- ${({ $isAccount }) => $isAccount && `
103
- --ring-3-size: 560px;
104
- --ring-2-size: 402px;
105
- --ring-1-size: 228px;
106
- --ring-0-size: 104px;
107
-
108
- --default-theme-ring-3-opacity: 0.02;
109
- --default-theme-ring-2-opacity: 0.04;
110
- --default-theme-ring-1-opacity: 0.06;
111
- --default-theme-ring-0-opacity: 0.1;
112
- `}
113
- `;
114
- export {
115
- Hero
116
- };
@@ -1 +0,0 @@
1
- export declare const IFrameStep: () => import("react/jsx-runtime").JSX.Element;
@@ -1,59 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- import { useModalStore } from "../../stores/index.js";
5
- import { IFrameSteps } from "../../utils/steps.js";
6
- import { safeStyled } from "@getpara/react-common";
7
- import { SpinnerContainer } from "@getpara/react-common";
8
- import { CpslSpinner } from "@getpara/react-components";
9
- import { MOBILE_SIZE } from "../../constants/constants.js";
10
- import { useStore } from "../../../provider/stores/useStore.js";
11
- const IFrameStep = () => {
12
- const iFrameUrl = useModalStore((state) => state.iFrameUrl);
13
- const setIsReady = useModalStore((state) => state.setIsIFrameReady);
14
- const isReady = useModalStore((state) => state.isIFrameReady);
15
- const currentStep = useModalStore((state) => state.step);
16
- const embeddedModal = useStore((state) => {
17
- var _a;
18
- return (_a = state.modalConfig) == null ? void 0 : _a.embeddedModal;
19
- });
20
- return /* @__PURE__ */ jsxs(OuterContainer, { $isVisible: IFrameSteps.includes(currentStep), $embeddedModal: !!embeddedModal, children: [
21
- /* @__PURE__ */ jsx(Container, { $isReady: !!isReady, children: /* @__PURE__ */ jsx(
22
- "iframe",
23
- {
24
- src: iFrameUrl,
25
- onLoad: () => {
26
- setIsReady(true);
27
- }
28
- }
29
- ) }),
30
- !isReady && /* @__PURE__ */ jsx(SpinnerContainer, { style: { width: "100%", height: "100%", flex: 1 }, children: /* @__PURE__ */ jsx(CpslSpinner, { size: 100 }) })
31
- ] });
32
- };
33
- const OuterContainer = safeStyled.div`
34
- height: ${({ $isVisible }) => $isVisible ? "100%" : "0px"};
35
- width: ${({ $isVisible }) => $isVisible ? "100%" : "0px"};
36
- flex: ${({ $isVisible }) => $isVisible ? 1 : "auto"};
37
- padding: ${({ $embeddedModal, $isVisible }) => !$isVisible ? "0px" : $embeddedModal ? "12px 0px 0px" : "72px 72px 32px"};
38
- display: flex;
39
- align-items: center;
40
- justify-content: center;
41
-
42
- @media (max-width: ${MOBILE_SIZE}px) {
43
- padding: ${({ $embeddedModal, $isVisible }) => !$isVisible ? "0px" : $embeddedModal ? "12px 0px 0px" : "72px 16px 0px"};
44
- }
45
- `;
46
- const Container = safeStyled.div`
47
- height: 100%;
48
- width: 100%;
49
- display: ${({ $isReady }) => $isReady ? "block" : "none"};
50
-
51
- & > iframe {
52
- height: 360px;
53
- width: 100%;
54
- border: none;
55
- }
56
- `;
57
- export {
58
- IFrameStep
59
- };
@@ -1,5 +0,0 @@
1
- interface LoginDoneStep {
2
- onClose: () => void;
3
- }
4
- export declare const LoginDoneStep: ({ onClose }: LoginDoneStep) => import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1,44 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- import { useEffect } from "react";
5
- import { Heading, HeroIcon, StepContainer } from "../common.js";
6
- import { ExternalWalletCard, WalletCard, WalletCards } from "../WalletCard/WalletCard.js";
7
- import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
8
- import { useStore } from "../../../provider/stores/useStore.js";
9
- import { useModalStore } from "../../stores/index.js";
10
- import { ModalStep } from "../../utils/steps.js";
11
- const LoginDoneStep = ({ onClose }) => {
12
- var _a, _b;
13
- const para = useInternalClient();
14
- const bareModal = useStore((state) => {
15
- var _a2;
16
- return (_a2 = state.modalConfig) == null ? void 0 : _a2.bareModal;
17
- });
18
- const setStep = useModalStore((state) => state.setStep);
19
- const setFlow = useModalStore((state) => state.setFlow);
20
- const hideWallets = useStore((state) => {
21
- var _a2;
22
- return (_a2 = state.modalConfig) == null ? void 0 : _a2.hideWallets;
23
- });
24
- useEffect(() => {
25
- setTimeout(() => {
26
- if (bareModal) {
27
- setFlow("account");
28
- setStep(ModalStep.ACCOUNT_MAIN);
29
- } else {
30
- onClose();
31
- }
32
- }, 1600);
33
- }, []);
34
- return /* @__PURE__ */ jsxs(StepContainer, { children: [
35
- /* @__PURE__ */ jsx(HeroIcon, { icon: "checkCircleFilled" }),
36
- /* @__PURE__ */ jsx(Heading, { variant: "headingS", weight: "bold", children: "Connected" }),
37
- !hideWallets && /* @__PURE__ */ jsx(WalletCards, { children: para.externalWalletConnectionType === "CONNECTION_ONLY" || para.externalWalletConnectionType === "VERIFICATION" ? /* @__PURE__ */ jsx(ExternalWalletCard, { address: (_b = (_a = Object.values(para.externalWallets || {})[0]) == null ? void 0 : _a.address) != null ? _b : "" }) : para.currentWalletIdsArray.map(([id, type]) => {
38
- return /* @__PURE__ */ jsx(WalletCard, { id, type }, `${id}-${type}`);
39
- }) })
40
- ] });
41
- };
42
- export {
43
- LoginDoneStep
44
- };
@@ -1,10 +0,0 @@
1
- import { ParaModalProps } from '../../types/modalProps.js';
2
- type ModalContentProps = Omit<ParaModalProps, 'para' | 'isOpen' | 'theme' | 'branding' | 'onModalStepChange' | 'onExpandModalChange'>;
3
- export type ModalContentHandle = {
4
- /**
5
- * Trigger the modal close handler
6
- */
7
- handleModalClose: () => void;
8
- };
9
- export declare const ModalContent: import("react").ForwardRefExoticComponent<ModalContentProps & import("react").RefAttributes<ModalContentHandle>>;
10
- export {};