@getpara/react-sdk-lite 2.11.0 → 2.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (311) hide show
  1. package/dist/css/modal.css +0 -3
  2. package/dist/index.d.ts +1 -0
  3. package/dist/modal/ParaModal.js +57 -98
  4. package/dist/modal/components/Body/Body.d.ts +1 -2
  5. package/dist/modal/components/Body/Body.js +119 -231
  6. package/dist/modal/components/Controls/ChainSelect.js +3 -4
  7. package/dist/modal/components/Controls/Controls.js +2 -4
  8. package/dist/modal/components/Footer/Footer.js +3 -12
  9. package/dist/modal/components/Header/Header.js +13 -14
  10. package/dist/modal/components/Header/hooks/useStepTitle.d.ts +1 -1
  11. package/dist/modal/components/Header/hooks/useStepTitle.js +88 -71
  12. package/dist/modal/components/ModalContent/ModalContent.d.ts +1 -1
  13. package/dist/modal/components/ModalContent/ModalContent.js +6 -14
  14. package/dist/modal/components/OnRampComponents/AddingFunds.js +2 -2
  15. package/dist/modal/components/WalletCard/WalletCard.js +9 -9
  16. package/dist/modal/components/WalletSelectOld/WalletSelectOld.js +13 -18
  17. package/dist/modal/components/common.d.ts +5 -0
  18. package/dist/modal/components/common.js +17 -10
  19. package/dist/modal/components/{Account → flows/account/Account}/Account.js +30 -27
  20. package/dist/modal/components/{Account/AccountHeader.d.ts → flows/account/Account/Header.d.ts} +1 -1
  21. package/dist/modal/components/{Account/AccountHeader.js → flows/account/Account/Header.js} +8 -8
  22. package/dist/modal/components/{Account/AccountWalletSelect.d.ts → flows/account/Account/WalletSelect.d.ts} +1 -1
  23. package/dist/modal/components/{Account/AccountWalletSelect.js → flows/account/Account/WalletSelect.js} +17 -22
  24. package/dist/modal/components/flows/account/AccountFlow/AccountFlow.d.ts +12 -0
  25. package/dist/modal/components/flows/account/AccountFlow/AccountFlow.js +126 -0
  26. package/dist/modal/components/flows/account/AccountProvider/AccountContext.d.ts +11 -0
  27. package/dist/modal/components/flows/account/AccountProvider/AccountContext.js +42 -0
  28. package/dist/modal/components/flows/account/AccountProvider/AccountProvider.d.ts +4 -0
  29. package/dist/modal/components/flows/account/AccountProvider/AccountProvider.js +110 -0
  30. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFunds.js +12 -12
  31. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsAsset.js +3 -3
  32. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsAwaiting.js +7 -8
  33. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsContext.d.ts +1 -1
  34. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsContext.js +11 -11
  35. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsDone.js +8 -9
  36. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsNetwork.js +2 -2
  37. package/dist/modal/components/flows/account/AddFunds/AddFundsProvider.d.ts +1 -0
  38. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsProvider.js +13 -12
  39. package/dist/modal/components/flows/account/AddFunds/AddFundsReceive.d.ts +1 -0
  40. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsReceive.js +10 -10
  41. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsSettings.js +10 -10
  42. package/dist/modal/components/{AddFunds → flows/account/AddFunds}/MoonPayEmbed.js +1 -1
  43. package/dist/modal/components/flows/account/AddFunds/utils.d.ts +3 -0
  44. package/dist/modal/components/flows/account/AddFunds/utils.js +16 -0
  45. package/dist/modal/components/{ChainSwitch → flows/account/ChainSwitch}/ChainSwitch.js +7 -10
  46. package/dist/modal/components/{ChainSwitch → flows/account/ChainSwitch}/config.js +1 -1
  47. package/dist/modal/components/{Account → flows/account/Profile}/AccountMonitorTx.js +13 -13
  48. package/dist/modal/components/flows/account/Profile/FarcasterLink.d.ts +2 -0
  49. package/dist/modal/components/{OAuth → flows/account/Profile}/FarcasterLink.js +6 -6
  50. package/dist/modal/components/{Account/AccountProfile.d.ts → flows/account/Profile/Profile.d.ts} +1 -1
  51. package/dist/modal/components/{Account/AccountProfile.js → flows/account/Profile/Profile.js} +20 -24
  52. package/dist/modal/components/{Account/AccountProfileEntry.js → flows/account/Profile/ProfileEntry.js} +13 -15
  53. package/dist/modal/components/flows/account/Profile/ProfileLink.d.ts +1 -0
  54. package/dist/modal/components/{Account/AccountProfileLink.js → flows/account/Profile/ProfileLink.js} +19 -34
  55. package/dist/modal/components/flows/account/Profile/ProfileLinkOptions.d.ts +1 -0
  56. package/dist/modal/components/{Account/AccountProfileLinkOptions.js → flows/account/Profile/ProfileLinkOptions.js} +11 -11
  57. package/dist/modal/components/flows/account/Profile/ProfileUnlink.d.ts +1 -0
  58. package/dist/modal/components/{Account/AccountProfileUnlink.js → flows/account/Profile/ProfileUnlink.js} +6 -6
  59. package/dist/modal/{hooks/useTelegramLogin.d.ts → components/flows/account/Profile/useTelegramLink.d.ts} +1 -5
  60. package/dist/modal/{hooks/useTelegramLogin.js → components/flows/account/Profile/useTelegramLink.js} +16 -23
  61. package/dist/modal/components/{Account/AccountSend → flows/account/Send}/AssetNetwork.js +1 -1
  62. package/dist/modal/components/flows/account/Send/SendAsset.d.ts +1 -0
  63. package/dist/modal/components/{Account/AccountSend/AccountSendAsset.js → flows/account/Send/SendAsset.js} +11 -12
  64. package/dist/modal/components/flows/account/Send/SendForm.d.ts +1 -0
  65. package/dist/modal/components/{Account/AccountSend/AccountSendForm.js → flows/account/Send/SendForm.js} +15 -16
  66. package/dist/modal/components/flows/account/Send/SendNetwork.d.ts +1 -0
  67. package/dist/modal/components/{Account/AccountSend/AccountSendNetwork.js → flows/account/Send/SendNetwork.js} +9 -10
  68. package/dist/modal/components/flows/account/Send/SendNoAssets.d.ts +1 -0
  69. package/dist/modal/components/{Account/AccountSend/AccountSendNoAssets.js → flows/account/Send/SendNoAssets.js} +8 -9
  70. package/dist/modal/components/{Account/AccountSend → flows/account/Send}/context.js +19 -6
  71. package/dist/modal/components/{Account/AccountSend → flows/account/Send}/index.js +11 -11
  72. package/dist/modal/components/flows/account/SwitchWallets/SwitchWallets.d.ts +1 -0
  73. package/dist/modal/components/{SwitchWalletsStep/SwitchWalletsStep.js → flows/account/SwitchWallets/SwitchWallets.js} +4 -4
  74. package/dist/modal/components/flows/account/Wallet/Wallet.d.ts +1 -0
  75. package/dist/modal/components/{Account/AccountWallet.js → flows/account/Wallet/Wallet.js} +12 -18
  76. package/dist/modal/components/flows/auth/AuthFlow/AuthFlow.d.ts +10 -0
  77. package/dist/modal/components/flows/auth/AuthFlow/AuthFlow.js +94 -0
  78. package/dist/modal/components/flows/auth/AuthMain/AuthMain.d.ts +9 -0
  79. package/dist/modal/components/{AuthMainStep/AuthMainStep.js → flows/auth/AuthMain/AuthMain.js} +10 -21
  80. package/dist/modal/components/flows/auth/AuthMain/AuthMainContent.d.ts +9 -0
  81. package/dist/modal/components/{AuthMainStep/AuthMainStepContent.js → flows/auth/AuthMain/AuthMainContent.js} +49 -24
  82. package/dist/modal/components/flows/auth/AwaitingAccountSetup/AwaitingAccountSetup.d.ts +1 -0
  83. package/dist/modal/components/flows/auth/AwaitingAccountSetup/AwaitingAccountSetup.js +31 -0
  84. package/dist/modal/components/flows/auth/AwaitingBiometrics/AwaitingBiometrics.d.ts +1 -0
  85. package/dist/modal/components/flows/auth/AwaitingBiometrics/AwaitingBiometrics.js +21 -0
  86. package/dist/modal/components/flows/auth/AwaitingOAuth/AwaitingOAuth.d.ts +1 -0
  87. package/dist/modal/components/{AwaitingOAuthStep/AwaitingOAuthStep.js → flows/auth/AwaitingOAuth/AwaitingOAuth.js} +4 -4
  88. package/dist/modal/components/flows/auth/AwaitingPassword/AwaitingPassword.d.ts +1 -0
  89. package/dist/modal/components/flows/auth/AwaitingPassword/AwaitingPassword.js +22 -0
  90. package/dist/modal/components/flows/auth/BiometricCreation/BiometricCreation.d.ts +1 -0
  91. package/dist/modal/components/{BiometricCreationStep/BiometricCreationStep.js → flows/auth/BiometricCreation/BiometricCreation.js} +25 -22
  92. package/dist/modal/components/flows/auth/BiometricLogin/BiometricLogin.d.ts +1 -0
  93. package/dist/modal/components/flows/auth/BiometricLogin/BiometricLogin.js +72 -0
  94. package/dist/modal/components/flows/auth/LoginDone/LoginDone.d.ts +5 -0
  95. package/dist/modal/components/{LoginDoneStep/LoginDoneStep.js → flows/auth/LoginDone/LoginDone.js} +9 -13
  96. package/dist/modal/components/{OAuth → flows/auth/OAuth}/OAuth.js +15 -23
  97. package/dist/modal/components/{RecoverySecretStep → flows/auth/RecoverySecretStep}/RecoverySecretStep.js +9 -11
  98. package/dist/modal/components/flows/auth/Setup2FA/Setup2FA.d.ts +5 -0
  99. package/dist/modal/components/{Setup2FAStep/Setup2FAStep.js → flows/auth/Setup2FA/Setup2FA.js} +42 -19
  100. package/dist/modal/components/flows/auth/Verification/Verification.d.ts +1 -0
  101. package/dist/modal/components/flows/auth/Verification/Verification.js +36 -0
  102. package/dist/modal/components/flows/auth/WalletCreationDone/WalletCreationDone.d.ts +6 -0
  103. package/dist/modal/components/{WalletCreationDoneStep/WalletCreationDoneStep.js → flows/auth/WalletCreationDone/WalletCreationDone.js} +19 -46
  104. package/dist/modal/components/{AuthOptions → shared}/AuthOptions.d.ts +2 -2
  105. package/dist/modal/components/{AuthOptions → shared}/AuthOptions.js +18 -15
  106. package/dist/modal/components/{ExternalWalletStep/ExternalWalletStep.d.ts → shared/ConnectExternalWallet/ConnectExternalWallet.d.ts} +1 -1
  107. package/dist/modal/components/{ExternalWalletStep/ExternalWalletStep.js → shared/ConnectExternalWallet/ConnectExternalWallet.js} +17 -37
  108. package/dist/modal/components/{ExternalWalletStep → shared/ConnectExternalWallet}/config.js +1 -1
  109. package/dist/modal/components/{AuthInput/AuthInput.d.ts → shared/EmailOrPhone/EmailOrPhoneInput.d.ts} +4 -4
  110. package/dist/modal/components/{AuthInput/AuthInput.js → shared/EmailOrPhone/EmailOrPhoneInput.js} +14 -10
  111. package/dist/modal/components/{AuthInput → shared/EmailOrPhone}/phoneMasks.js +1 -1
  112. package/dist/modal/components/{ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.d.ts → shared/ExternalWalletNetworkSelect.d.ts} +1 -1
  113. package/dist/modal/components/{ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.js → shared/ExternalWalletNetworkSelect.js} +9 -9
  114. package/dist/modal/components/{ExternalWallets → shared}/ExternalWallets.js +17 -12
  115. package/dist/modal/components/shared/IFrame.d.ts +1 -0
  116. package/dist/modal/components/shared/IFrame.js +87 -0
  117. package/dist/modal/components/{VerificationCodeStep/VerificationCodeStep.d.ts → shared/VerificationCode.d.ts} +3 -4
  118. package/dist/modal/components/{VerificationCodeStep/VerificationCodeStep.js → shared/VerificationCode.js} +4 -28
  119. package/dist/modal/components/shared/VerifyExternalWallet.d.ts +1 -0
  120. package/dist/modal/components/{ExternalWalletVerificationStep/ExternalWalletVerificationStep.js → shared/VerifyExternalWallet.js} +10 -17
  121. package/dist/modal/hooks/index.d.ts +1 -2
  122. package/dist/modal/hooks/index.js +1 -2
  123. package/dist/modal/hooks/useAuthView.d.ts +4 -0
  124. package/dist/modal/hooks/useAuthView.js +115 -0
  125. package/dist/modal/hooks/useCanbGoBack.d.ts +3 -0
  126. package/dist/modal/hooks/useCanbGoBack.js +47 -0
  127. package/dist/modal/{components/AuthInput/hooks → hooks}/useDropdownPosition.d.ts +1 -1
  128. package/dist/modal/hooks/useDropdownPosition.js +41 -0
  129. package/dist/modal/hooks/useGoBack.d.ts +4 -1
  130. package/dist/modal/hooks/useGoBack.js +60 -36
  131. package/dist/modal/hooks/useSendMutations.js +4 -5
  132. package/dist/modal/hooks/useTransactionMonitoring.js +8 -8
  133. package/dist/modal/index.d.ts +1 -2
  134. package/dist/modal/index.js +1 -3
  135. package/dist/modal/stores/index.d.ts +0 -1
  136. package/dist/modal/stores/index.js +0 -1
  137. package/dist/modal/types/modalProps.d.ts +18 -8
  138. package/dist/provider/ParaProviderMin.js +34 -38
  139. package/dist/provider/actions/getWallet.d.ts +1 -1
  140. package/dist/provider/actions/index.d.ts +43 -49
  141. package/dist/provider/actions/index.js +4 -0
  142. package/dist/provider/components/CosmosWalletWrapper.js +0 -3
  143. package/dist/provider/components/EvmWalletWrapper.js +0 -3
  144. package/dist/provider/components/ExternalWalletWrapper.js +8 -2
  145. package/dist/provider/hooks/mutations/index.d.ts +2 -0
  146. package/dist/provider/hooks/mutations/index.js +4 -0
  147. package/dist/provider/hooks/mutations/useAddAuthMethod.d.ts +7 -12
  148. package/dist/provider/hooks/mutations/useAuthenticateWithEmailOrPhone.d.ts +34 -0
  149. package/dist/provider/hooks/mutations/useAuthenticateWithEmailOrPhone.js +28 -0
  150. package/dist/provider/hooks/mutations/useAuthenticateWithOAuth.d.ts +34 -0
  151. package/dist/provider/hooks/mutations/useAuthenticateWithOAuth.js +28 -0
  152. package/dist/provider/hooks/mutations/useClaimPregenWallets.d.ts +7 -13
  153. package/dist/provider/hooks/mutations/useClaimPregenWallets.js +4 -1
  154. package/dist/provider/hooks/mutations/useCreateGuestWallets.d.ts +7 -6
  155. package/dist/provider/hooks/mutations/useCreateGuestWallets.js +6 -3
  156. package/dist/provider/hooks/mutations/useCreatePregenWallet.d.ts +7 -93
  157. package/dist/provider/hooks/mutations/useCreatePregenWallet.js +4 -1
  158. package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.d.ts +7 -15
  159. package/dist/provider/hooks/mutations/useCreateWallet.d.ts +7 -15
  160. package/dist/provider/hooks/mutations/useCreateWallet.js +4 -1
  161. package/dist/provider/hooks/mutations/useCreateWalletPerType.d.ts +7 -27
  162. package/dist/provider/hooks/mutations/useEnable2fa.d.ts +7 -12
  163. package/dist/provider/hooks/mutations/useExportPrivateKey.d.ts +2 -7
  164. package/dist/provider/hooks/mutations/useHasPregenWallet.d.ts +7 -13
  165. package/dist/provider/hooks/mutations/useIssueJwt.d.ts +7 -21
  166. package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +6 -7
  167. package/dist/provider/hooks/mutations/useKeepSessionAlive.js +2 -2
  168. package/dist/provider/hooks/mutations/useLoginExternalWallet.d.ts +7 -25
  169. package/dist/provider/hooks/mutations/useLoginExternalWallet.js +4 -1
  170. package/dist/provider/hooks/mutations/useLogout.d.ts +7 -12
  171. package/dist/provider/hooks/mutations/useResendVerificationCode.d.ts +7 -13
  172. package/dist/provider/hooks/mutations/useResendVerificationCode.js +4 -1
  173. package/dist/provider/hooks/mutations/useSetup2fa.d.ts +7 -7
  174. package/dist/provider/hooks/mutations/useSetup2fa.js +2 -2
  175. package/dist/provider/hooks/mutations/useSignMessage.d.ts +7 -31
  176. package/dist/provider/hooks/mutations/useSignTransaction.d.ts +7 -31
  177. package/dist/provider/hooks/mutations/useSignTransaction.js +4 -1
  178. package/dist/provider/hooks/mutations/useSignUpOrLogIn.d.ts +7 -19
  179. package/dist/provider/hooks/mutations/useSignUpOrLogIn.js +4 -1
  180. package/dist/provider/hooks/mutations/useSwitchWallets.d.ts +7 -30
  181. package/dist/provider/hooks/mutations/useSwitchWallets.js +4 -1
  182. package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.d.ts +7 -15
  183. package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.js +4 -1
  184. package/dist/provider/hooks/mutations/useVerify2fa.d.ts +7 -30
  185. package/dist/provider/hooks/mutations/useVerifyExternalWallet.d.ts +7 -19
  186. package/dist/provider/hooks/mutations/useVerifyExternalWallet.js +4 -1
  187. package/dist/provider/hooks/mutations/useVerifyFarcaster.d.ts +7 -31
  188. package/dist/provider/hooks/mutations/useVerifyFarcaster.js +4 -1
  189. package/dist/provider/hooks/mutations/useVerifyNewAccount.d.ts +7 -66
  190. package/dist/provider/hooks/mutations/useVerifyNewAccount.js +4 -1
  191. package/dist/provider/hooks/mutations/useVerifyOAuth.d.ts +7 -37
  192. package/dist/provider/hooks/mutations/useVerifyTelegram.d.ts +7 -22
  193. package/dist/provider/hooks/mutations/useWaitForLogin.d.ts +7 -30
  194. package/dist/provider/hooks/mutations/useWaitForLogin.js +4 -1
  195. package/dist/provider/hooks/mutations/useWaitForSignup.d.ts +7 -18
  196. package/dist/provider/hooks/mutations/useWaitForWalletCreation.d.ts +7 -27
  197. package/dist/provider/hooks/mutations/utils.js +1 -1
  198. package/dist/provider/hooks/queries/useIsFullyLoggedIn.d.ts +4 -1
  199. package/dist/provider/hooks/queries/useIsFullyLoggedIn.js +6 -1
  200. package/dist/provider/hooks/queries/useLinkedAccounts.d.ts +2 -4
  201. package/dist/provider/hooks/queries/useParaStatus.d.ts +0 -1
  202. package/dist/provider/hooks/queries/useParaStatus.js +0 -2
  203. package/dist/provider/hooks/queries/useWallet.d.ts +1 -1
  204. package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +1 -1
  205. package/dist/provider/hooks/utils/useEventListeners.js +0 -7
  206. package/dist/provider/hooks/utils/useFormattedBiometricHints.d.ts +1 -0
  207. package/dist/provider/hooks/utils/useFormattedBiometricHints.js +9 -5
  208. package/dist/provider/hooks/utils/useModal.d.ts +4 -3
  209. package/dist/provider/hooks/utils/useModal.js +17 -9
  210. package/dist/provider/hooks/utils/useWalletState.d.ts +3 -3
  211. package/dist/provider/hooks/utils/useWalletState.js +14 -6
  212. package/dist/provider/providers/AccountLinkProvider.js +21 -19
  213. package/dist/provider/providers/AuthProvider/AuthContext.d.ts +19 -0
  214. package/dist/provider/providers/AuthProvider/AuthContext.js +35 -0
  215. package/dist/provider/providers/AuthProvider/AuthProvider.d.ts +9 -0
  216. package/dist/provider/providers/AuthProvider/AuthProvider.js +261 -0
  217. package/dist/provider/providers/ExternalWalletProvider.d.ts +12 -4
  218. package/dist/provider/providers/ExternalWalletProvider.js +285 -283
  219. package/dist/provider/stores/getters.d.ts +1 -1
  220. package/dist/provider/stores/getters.js +5 -5
  221. package/dist/provider/stores/setters.js +2 -2
  222. package/dist/provider/stores/slices/accountFlow.d.ts +3 -0
  223. package/dist/provider/stores/slices/accountFlow.js +30 -0
  224. package/dist/provider/stores/slices/authFlow.d.ts +3 -0
  225. package/dist/provider/stores/slices/authFlow.js +63 -0
  226. package/dist/provider/stores/slices/externalWallets.js +10 -0
  227. package/dist/provider/stores/slices/index.d.ts +4 -0
  228. package/dist/provider/stores/slices/index.js +4 -0
  229. package/dist/provider/stores/slices/modal.js +8 -2
  230. package/dist/provider/stores/slices/onRamp.d.ts +3 -0
  231. package/dist/provider/stores/slices/onRamp.js +20 -0
  232. package/dist/provider/stores/slices/paraState.d.ts +3 -0
  233. package/dist/provider/stores/slices/paraState.js +9 -0
  234. package/dist/provider/stores/types.d.ts +117 -5
  235. package/dist/provider/stores/types.js +9 -0
  236. package/dist/provider/stores/useStore.d.ts +5 -3
  237. package/dist/provider/stores/useStore.js +15 -8
  238. package/package.json +8 -8
  239. package/dist/modal/components/Account/AccountProfileLink.d.ts +0 -1
  240. package/dist/modal/components/Account/AccountProfileLinkOptions.d.ts +0 -1
  241. package/dist/modal/components/Account/AccountProfileUnlink.d.ts +0 -1
  242. package/dist/modal/components/Account/AccountSend/AccountSendAsset.d.ts +0 -1
  243. package/dist/modal/components/Account/AccountSend/AccountSendForm.d.ts +0 -1
  244. package/dist/modal/components/Account/AccountSend/AccountSendNetwork.d.ts +0 -1
  245. package/dist/modal/components/Account/AccountSend/AccountSendNoAssets.d.ts +0 -1
  246. package/dist/modal/components/Account/AccountWallet.d.ts +0 -1
  247. package/dist/modal/components/AddFunds/AddFundsProvider.d.ts +0 -1
  248. package/dist/modal/components/AddFunds/AddFundsReceive.d.ts +0 -1
  249. package/dist/modal/components/AuthInput/hooks/useDropdownPosition.js +0 -33
  250. package/dist/modal/components/AuthMainStep/AuthMainStep.d.ts +0 -9
  251. package/dist/modal/components/AuthMainStep/AuthMainStepContent.d.ts +0 -9
  252. package/dist/modal/components/AwaitingAccountStep/AwaitingAccountStep.d.ts +0 -1
  253. package/dist/modal/components/AwaitingAccountStep/AwaitingAccountStep.js +0 -21
  254. package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.d.ts +0 -1
  255. package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.js +0 -18
  256. package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.d.ts +0 -1
  257. package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.d.ts +0 -1
  258. package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.js +0 -21
  259. package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.d.ts +0 -5
  260. package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.js +0 -24
  261. package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.d.ts +0 -1
  262. package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.d.ts +0 -1
  263. package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +0 -67
  264. package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.d.ts +0 -1
  265. package/dist/modal/components/Hero/Hero.d.ts +0 -1
  266. package/dist/modal/components/Hero/Hero.js +0 -118
  267. package/dist/modal/components/IFrameStep/IFrameStep.d.ts +0 -1
  268. package/dist/modal/components/IFrameStep/IFrameStep.js +0 -83
  269. package/dist/modal/components/LoginDoneStep/LoginDoneStep.d.ts +0 -5
  270. package/dist/modal/components/OAuth/FarcasterLink.d.ts +0 -2
  271. package/dist/modal/components/OAuth/FarcasterOAuthStep.d.ts +0 -1
  272. package/dist/modal/components/OAuth/FarcasterOAuthStep.js +0 -53
  273. package/dist/modal/components/OAuth/TelegramOAuthStep.d.ts +0 -8
  274. package/dist/modal/components/OAuth/TelegramOAuthStep.js +0 -91
  275. package/dist/modal/components/Setup2FAStep/Setup2FAStep.d.ts +0 -5
  276. package/dist/modal/components/SwitchWalletsStep/SwitchWalletsStep.d.ts +0 -1
  277. package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.d.ts +0 -5
  278. package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.js +0 -27
  279. package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.d.ts +0 -6
  280. package/dist/modal/hooks/useFarcasterLogin.d.ts +0 -9
  281. package/dist/modal/hooks/useFarcasterLogin.js +0 -77
  282. package/dist/modal/stores/modal/actions.d.ts +0 -3
  283. package/dist/modal/stores/modal/actions.js +0 -146
  284. package/dist/modal/stores/modal/useModalStore.d.ts +0 -119
  285. package/dist/modal/stores/modal/useModalStore.js +0 -80
  286. package/dist/modal/utils/steps.d.ts +0 -162
  287. package/dist/modal/utils/steps.js +0 -335
  288. package/dist/provider/providers/AuthProvider.d.ts +0 -43
  289. package/dist/provider/providers/AuthProvider.js +0 -777
  290. /package/dist/modal/components/{Account → flows/account/Account}/Account.d.ts +0 -0
  291. /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFunds.d.ts +0 -0
  292. /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsAsset.d.ts +0 -0
  293. /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsAwaiting.d.ts +0 -0
  294. /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsDone.d.ts +0 -0
  295. /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsNetwork.d.ts +0 -0
  296. /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/AddFundsSettings.d.ts +0 -0
  297. /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/MoonPayEmbed.d.ts +0 -0
  298. /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/index.d.ts +0 -0
  299. /package/dist/modal/components/{AddFunds → flows/account/AddFunds}/index.js +0 -0
  300. /package/dist/modal/components/{ChainSwitch → flows/account/ChainSwitch}/ChainSwitch.d.ts +0 -0
  301. /package/dist/modal/components/{ChainSwitch → flows/account/ChainSwitch}/config.d.ts +0 -0
  302. /package/dist/modal/components/{Account → flows/account/Profile}/AccountMonitorTx.d.ts +0 -0
  303. /package/dist/modal/components/{Account/AccountProfileEntry.d.ts → flows/account/Profile/ProfileEntry.d.ts} +0 -0
  304. /package/dist/modal/components/{Account/AccountSend → flows/account/Send}/AssetNetwork.d.ts +0 -0
  305. /package/dist/modal/components/{Account/AccountSend → flows/account/Send}/context.d.ts +0 -0
  306. /package/dist/modal/components/{Account/AccountSend → flows/account/Send}/index.d.ts +0 -0
  307. /package/dist/modal/components/{OAuth → flows/auth/OAuth}/OAuth.d.ts +0 -0
  308. /package/dist/modal/components/{RecoverySecretStep → flows/auth/RecoverySecretStep}/RecoverySecretStep.d.ts +0 -0
  309. /package/dist/modal/components/{ExternalWalletStep → shared/ConnectExternalWallet}/config.d.ts +0 -0
  310. /package/dist/modal/components/{AuthInput → shared/EmailOrPhone}/phoneMasks.d.ts +0 -0
  311. /package/dist/modal/components/{ExternalWallets → shared}/ExternalWallets.d.ts +0 -0
@@ -1,18 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- import { jsx } from "react/jsx-runtime";
4
- import { useModalStore } from "../../stores/index.js";
5
- import { Waiting } from "../Waiting/Waiting.js";
6
- const AwaitingBiometricsStep = () => {
7
- const isLogin = useModalStore((state) => state.isLogin());
8
- return /* @__PURE__ */ jsx(
9
- Waiting,
10
- {
11
- heading: isLogin ? "Waiting for Passkey" : "Creating Passkey",
12
- subheading: "Follow the prompts presented by your browser."
13
- }
14
- );
15
- };
16
- export {
17
- AwaitingBiometricsStep
18
- };
@@ -1 +0,0 @@
1
- export declare const AwaitingOAuthStep: () => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare const AwaitingPasswordStep: () => import("react/jsx-runtime").JSX.Element;
@@ -1,21 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- import { jsx } from "react/jsx-runtime";
4
- import { useModalStore } from "../../stores/index.js";
5
- import { Waiting } from "../Waiting/Waiting.js";
6
- const AwaitingPasswordStep = () => {
7
- const isLogin = useModalStore((state) => state.isLogin());
8
- const signupState = useModalStore((state) => state.getSignupState());
9
- const loginState = useModalStore((state) => state.getLoginState());
10
- const isPIN = !!(signupState == null ? void 0 : signupState.pinUrl) || !!(loginState == null ? void 0 : loginState.pinUrl);
11
- return /* @__PURE__ */ jsx(
12
- Waiting,
13
- {
14
- heading: isLogin ? `Waiting for ${isPIN ? "PIN" : "Password"}` : `Creating ${isPIN ? "PIN" : "Password"}`,
15
- subheading: "Follow the prompts presented by your browser."
16
- }
17
- );
18
- };
19
- export {
20
- AwaitingPasswordStep
21
- };
@@ -1,5 +0,0 @@
1
- type Props = {
2
- isGuestMode?: boolean;
3
- };
4
- export declare const AwaitingWalletCreationStep: ({ isGuestMode }: Props) => import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1,24 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- import { jsx } from "react/jsx-runtime";
4
- import { StepContainer } from "../common.js";
5
- import { Waiting } from "../Waiting/Waiting.js";
6
- import { useStore } from "../../../provider/stores/useStore.js";
7
- import { useAccount } from "../../../provider/index.js";
8
- const AwaitingWalletCreationStep = ({ isGuestMode = false }) => {
9
- const hideWallets = useStore((state) => {
10
- var _a;
11
- return (_a = state.modalConfig) == null ? void 0 : _a.hideWallets;
12
- });
13
- const { embedded } = useAccount();
14
- return /* @__PURE__ */ jsx(StepContainer, { $wide: true, children: /* @__PURE__ */ jsx(
15
- Waiting,
16
- {
17
- heading: isGuestMode ? "Creating Guest Account" : (embedded == null ? void 0 : embedded.isGuestMode) ? hideWallets ? "Linking Guest Account" : "Linking Guest Wallet" : hideWallets ? "Creating Your Account" : "Creating Your Wallet",
18
- subheading: "This should only take a couple of seconds."
19
- }
20
- ) });
21
- };
22
- export {
23
- AwaitingWalletCreationStep
24
- };
@@ -1 +0,0 @@
1
- export declare const BiometricCreationStep: () => import("react/jsx-runtime").JSX.Element | null;
@@ -1 +0,0 @@
1
- export declare const BiometricLoginStep: () => import("react/jsx-runtime").JSX.Element | null;
@@ -1,67 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
- import { CpslButton, CpslDivider, CpslIcon } from "@getpara/react-components";
5
- import { useModalStore } from "../../stores/index.js";
6
- import { Heading, StepContainer, InnerStepContainer } from "../common.js";
7
- import { safeStyled } from "@getpara/react-common";
8
- import { AuthMethod } from "@getpara/web-sdk";
9
- import { KnownDevices, UserIdentifier } from "@getpara/react-common";
10
- import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
11
- import { useAuthActions } from "../../../provider/providers/AuthProvider.js";
12
- const BiometricLoginStep = () => {
13
- var _a;
14
- const loginState = useModalStore((state) => state.getLoginState());
15
- const para = useInternalClient();
16
- const { biometricHints, presentLoginUi } = useAuthActions();
17
- if (!loginState) {
18
- return null;
19
- }
20
- const { passkeyUrl, pinUrl, passkeyKnownDeviceUrl, passwordUrl, isPasskeySupported } = loginState;
21
- const { isOnKnownDevice = false, formattedHints } = biometricHints || {};
22
- const isPasskey = !!passkeyUrl, isPassword = !!passwordUrl, isPIN = !!pinUrl, isNeither = !isPasskey && !isPassword, hasHints = (_a = formattedHints == null ? void 0 : formattedHints.length) != null ? _a : 0 > 0, isPasskeyOnKnownDevice = isPasskeySupported && isOnKnownDevice, isPasskeyUnavailable = hasHints && !isOnKnownDevice || !isPasskeySupported || isNeither, displayKnownDevices = isPasskeyUnavailable && !!biometricHints && (hasHints || !!passkeyKnownDeviceUrl), displayWelcomeBack = isPasskeyOnKnownDevice || isPassword || isPIN;
23
- return /* @__PURE__ */ jsxs(StepContainer, { $wide: true, children: [
24
- /* @__PURE__ */ jsxs(InnerStepContainer, { children: [
25
- displayWelcomeBack && /* @__PURE__ */ jsx(Heading, { children: "Welcome back," }),
26
- /* @__PURE__ */ jsx(UserIdentifier, { authInfo: para.authInfo })
27
- ] }),
28
- /* @__PURE__ */ jsxs(MainContainer, { children: [
29
- (isPassword || isPIN) && /* @__PURE__ */ jsxs(
30
- CpslButton,
31
- {
32
- fullWidth: true,
33
- onClick: () => presentLoginUi(isPIN ? AuthMethod.PIN : AuthMethod.PASSWORD, loginState),
34
- "data-testid": "para-login-password",
35
- children: [
36
- /* @__PURE__ */ jsx(CpslIcon, { slot: "start", icon: "passcode" }),
37
- isPIN && isPassword ? "Login" : isPIN ? "Login with PIN" : "Login with Password"
38
- ]
39
- }
40
- ),
41
- isPasskey && /* @__PURE__ */ jsxs(Fragment, { children: [
42
- displayKnownDevices && /* @__PURE__ */ jsxs(Fragment, { children: [
43
- /* @__PURE__ */ jsx(KnownDevices, { hints: biometricHints, link: passkeyKnownDeviceUrl, "data-testid": "para-known-devices" }),
44
- /* @__PURE__ */ jsx(CpslDivider, { children: "or" })
45
- ] }),
46
- /* @__PURE__ */ jsx(
47
- CpslButton,
48
- {
49
- fullWidth: true,
50
- onClick: () => presentLoginUi(AuthMethod.PASSKEY, loginState),
51
- "data-testid": "para-login-passkey",
52
- children: isPasskeyUnavailable ? "Continue anyway" : /* @__PURE__ */ jsxs(Fragment, { children: [
53
- /* @__PURE__ */ jsx(CpslIcon, { slot: "start", icon: "key" }),
54
- "Login with Passkey"
55
- ] })
56
- }
57
- )
58
- ] })
59
- ] })
60
- ] });
61
- };
62
- const MainContainer = safeStyled(InnerStepContainer)`
63
- gap: 16px;
64
- `;
65
- export {
66
- BiometricLoginStep
67
- };
@@ -1 +0,0 @@
1
- export declare const ExternalWalletVerificationStep: () => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare const Hero: () => import("react/jsx-runtime").JSX.Element;
@@ -1,118 +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, NETWORK_NOT_SUPPORTED_ERROR } from "@getpara/react-common";
6
- import { ModalStep } from "../../utils/steps.js";
7
- import { useModalStore } from "../../stores/index.js";
8
- import { useEffect, useState } from "react";
9
- import { isMobile } from "@getpara/web-sdk";
10
- import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
11
- import { useExternalWallets } from "../../../provider/providers/ExternalWalletProvider.js";
12
- import { useWallet } from "../../../provider/index.js";
13
- const getStepConfig = ({
14
- externalWalletError
15
- }) => {
16
- var _a;
17
- return {
18
- [ModalStep.EX_WALLET_SELECTED]: {
19
- variant: "externalWalletConnection",
20
- topOffset: 40,
21
- spacerHeight: 158,
22
- hideFadeOut: true
23
- },
24
- [ModalStep.CHAIN_SWITCH]: {
25
- variant: ((_a = externalWalletError == null ? void 0 : externalWalletError[0]) == null ? void 0 : _a.toLowerCase()) === NETWORK_NOT_SUPPORTED_ERROR ? "failed" : "externalWalletConnection",
26
- topOffset: 20,
27
- spacerHeight: 158,
28
- hideFadeOut: true
29
- },
30
- [ModalStep.FARCASTER_OAUTH]: {
31
- variant: "externalWalletConnection",
32
- topOffset: 40,
33
- spacerHeight: 158,
34
- hideFadeOut: true
35
- }
36
- };
37
- };
38
- const Hero = () => {
39
- const para = useInternalClient();
40
- const { wallet: connector, walletDisplayHelpers, avatar } = useExternalWallets();
41
- const step = useModalStore((state) => state.step);
42
- const externalWalletError = useModalStore((state) => state.externalWalletError);
43
- const { data: activeWallet } = useWallet();
44
- const [currentStep, setCurrentStep] = useState(step);
45
- const stepConfig = getStepConfig({
46
- externalWalletError
47
- })[currentStep];
48
- useEffect(() => {
49
- const prevStepConfig = getStepConfig({
50
- externalWalletError
51
- })[currentStep];
52
- const newStepConfig = getStepConfig({
53
- externalWalletError
54
- })[step];
55
- const delay = newStepConfig && prevStepConfig ? 0 : newStepConfig && !prevStepConfig ? 0 : 200;
56
- const timerId = setTimeout(() => {
57
- setCurrentStep(step);
58
- }, delay);
59
- return () => {
60
- clearTimeout(timerId);
61
- };
62
- }, [step]);
63
- const isExternalStep = currentStep === ModalStep.EX_WALLET_SELECTED;
64
- const isChainSwitchStep = currentStep === ModalStep.CHAIN_SWITCH;
65
- const isAccountStep = currentStep === ModalStep.ACCOUNT_MAIN;
66
- const isFarcasterStep = currentStep === ModalStep.FARCASTER_OAUTH;
67
- const { showExtension, isCosmosMobileWallet } = walletDisplayHelpers;
68
- const shouldHide = !stepConfig || !isMobile() && isExternalStep && !showExtension || !isMobile() && isChainSwitchStep && isCosmosMobileWallet || !isMobile() && isFarcasterStep;
69
- const { variant, topOffset, spacerHeight, hideFadeOut } = stepConfig != null ? stepConfig : {};
70
- return /* @__PURE__ */ jsxs(Fragment, { children: [
71
- /* @__PURE__ */ jsx(Container, { $top: -45 + (topOffset != null ? topOffset : 0), children: shouldHide ? null : /* @__PURE__ */ jsxs(StyledHero, { $isAccount: isAccountStep, hideFadeOut, variant, height: 480, withDefaultTheme: true, children: [
72
- (isExternalStep || isChainSwitchStep) && /* @__PURE__ */ jsx(WalletLogo, { slot: "connectionLeft", src: connector == null ? void 0 : connector.iconUrl }),
73
- isFarcasterStep && /* @__PURE__ */ jsx(WalletLogo, { slot: "connectionLeft", icon: "farcasterBrand" }),
74
- 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)
75
- ] }) }),
76
- !shouldHide && /* @__PURE__ */ jsx(Spacer, { $height: spacerHeight != null ? spacerHeight : 0 })
77
- ] });
78
- };
79
- const Container = safeStyled.div`
80
- display: flex;
81
- position: absolute;
82
- justify-content: center;
83
- align-items: center;
84
- width: 100%;
85
-
86
- top: ${({ $top }) => `${$top}px`};
87
- `;
88
- const Spacer = safeStyled.div`
89
- height: ${({ $height }) => `${$height}px`};
90
- `;
91
- const WalletLogo = safeStyled(CpslIcon)`
92
- --height: 60px;
93
- --width: 60px;
94
- `;
95
- const Avatar = safeStyled.img`
96
- width: 100%;
97
- height: 100%;
98
- object-fit: contain;
99
- `;
100
- const IconAvatar = safeStyled(CpslIdenticon)`
101
- border-radius: 1000px;
102
- `;
103
- const StyledHero = safeStyled(CpslHero)`
104
- ${({ $isAccount }) => $isAccount && `
105
- --ring-3-size: 560px;
106
- --ring-2-size: 402px;
107
- --ring-1-size: 228px;
108
- --ring-0-size: 104px;
109
-
110
- --default-theme-ring-3-opacity: 0.02;
111
- --default-theme-ring-2-opacity: 0.04;
112
- --default-theme-ring-1-opacity: 0.06;
113
- --default-theme-ring-0-opacity: 0.1;
114
- `}
115
- `;
116
- export {
117
- Hero
118
- };
@@ -1 +0,0 @@
1
- export declare const IFrameStep: () => import("react/jsx-runtime").JSX.Element;
@@ -1,83 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- import { useEffect, useState } from "react";
5
- import { useModalStore } from "../../stores/index.js";
6
- import { IFrameSteps } from "../../utils/steps.js";
7
- import { safeStyled } from "@getpara/react-common";
8
- import { SpinnerContainer, MOBILE_SIZE } from "@getpara/react-common";
9
- import { CpslSpinner } from "@getpara/react-components";
10
- import { useStore } from "../../../provider/stores/useStore.js";
11
- import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
12
- import { validatePortalOrigin } from "../../utils/validatePortalOrigin.js";
13
- const IFrameStep = () => {
14
- const iFrameUrl = useModalStore((state) => state.iFrameUrl);
15
- const setIsReady = useModalStore((state) => state.setIsIFrameReady);
16
- const isReady = useModalStore((state) => state.isIFrameReady);
17
- const currentStep = useModalStore((state) => state.step);
18
- const refs = useModalStore((state) => state.refs);
19
- const embeddedModal = useStore((state) => {
20
- var _a;
21
- return (_a = state.modalConfig) == null ? void 0 : _a.embeddedModal;
22
- });
23
- const para = useInternalClient();
24
- const [height, setHeight] = useState(0);
25
- useEffect(() => {
26
- if (!IFrameSteps.includes(currentStep)) {
27
- setHeight(0);
28
- }
29
- }, [currentStep]);
30
- useEffect(() => {
31
- const handleMessage = (event) => {
32
- if (!iFrameUrl) {
33
- return;
34
- }
35
- if (!validatePortalOrigin(event, para.ctx)) {
36
- return;
37
- }
38
- if (event.data) {
39
- if (event.data.type === "HEIGHT" && typeof event.data.height === "number") {
40
- setHeight(Math.max(event.data.height, 200));
41
- setIsReady(event.data.height > 0 ? true : false);
42
- }
43
- }
44
- };
45
- typeof window !== "undefined" && window.addEventListener("message", handleMessage);
46
- return () => {
47
- typeof window !== "undefined" && window.removeEventListener("message", handleMessage);
48
- };
49
- }, [setIsReady, iFrameUrl]);
50
- return /* @__PURE__ */ jsxs(OuterContainer, { $isVisible: IFrameSteps.includes(currentStep), $embeddedModal: !!embeddedModal, $isReady: !!isReady, children: [
51
- /* @__PURE__ */ jsx(Container, { $isReady: !!isReady, $height: height, children: /* @__PURE__ */ jsx("iframe", { src: iFrameUrl, ref: refs.iFrame, "data-testid": "para-portal-iframe" }) }),
52
- !isReady && /* @__PURE__ */ jsx(SpinnerContainer, { style: { width: "100%", height: "100%", flex: 1, position: "absolute" }, children: /* @__PURE__ */ jsx(CpslSpinner, { size: 100 }) })
53
- ] });
54
- };
55
- const OuterContainer = safeStyled.div`
56
- position: relative;
57
- height: ${({ $isVisible, $isReady }) => $isVisible ? $isReady ? "auto" : "200px" : "0px"};
58
- width: ${({ $isVisible }) => $isVisible ? "100%" : "0px"};
59
- flex: ${({ $isVisible }) => $isVisible ? 1 : "auto"};
60
- padding: 0px;
61
- display: flex;
62
- align-items: center;
63
- justify-content: center;
64
-
65
- @media (max-width: ${MOBILE_SIZE}px) {
66
- padding: ${({ $embeddedModal, $isVisible }) => !$isVisible ? "0px" : $embeddedModal ? "12px 0px 0px" : "0px"};
67
- }
68
- `;
69
- const Container = safeStyled.div`
70
- height: ${({ $height }) => $height}px;
71
- width: 100%;
72
- opacity: ${({ $isReady }) => $isReady ? 1 : 0};
73
-
74
- & > iframe {
75
- height: ${({ $height }) => $height}px;
76
- width: 100%;
77
- border: none;
78
- background: transparent;
79
- }
80
- `;
81
- export {
82
- IFrameStep
83
- };
@@ -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,2 +0,0 @@
1
- export declare function FarcasterConnectQR(): import("react/jsx-runtime").JSX.Element;
2
- export declare const FarcasterLink: () => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
1
- export declare function FarcasterOAuthStep(): import("react/jsx-runtime").JSX.Element;
@@ -1,53 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- import { CpslSpinner } from "@getpara/react-components";
5
- import { useFarcasterLogin } from "../../hooks/useFarcasterLogin.js";
6
- import { safeStyled } from "@getpara/react-common";
7
- import { useEffect, useState } from "react";
8
- import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
9
- import { validatePortalOrigin } from "../../utils/validatePortalOrigin.js";
10
- function FarcasterOAuthStep() {
11
- const { url, isLoaded, setIsLoaded } = useFarcasterLogin({
12
- isActive: true
13
- });
14
- const para = useInternalClient();
15
- const [height, setHeight] = useState(0);
16
- useEffect(() => {
17
- const handleMessage = (event) => {
18
- if (!url) {
19
- return;
20
- }
21
- if (!validatePortalOrigin(event, para.ctx)) {
22
- return;
23
- }
24
- if (event.data) {
25
- if (event.data.type === "HEIGHT") {
26
- setHeight(event.data.height);
27
- }
28
- }
29
- };
30
- typeof window !== "undefined" && window.addEventListener("message", handleMessage);
31
- return () => {
32
- typeof window !== "undefined" && window.removeEventListener("message", handleMessage);
33
- };
34
- }, [url]);
35
- return /* @__PURE__ */ jsxs(Container, { children: [
36
- url && /* @__PURE__ */ jsx(IFrame, { style: { display: isLoaded ? "block" : "none", height }, src: url, onLoad: () => setIsLoaded(true) }),
37
- (!url || !isLoaded) && /* @__PURE__ */ jsx(CpslSpinner, {})
38
- ] });
39
- }
40
- const Container = safeStyled.div`
41
- display: flex;
42
- flex-direction: column;
43
- align-items: center;
44
- justify-content: center;
45
- width: 100%;
46
- `;
47
- const IFrame = safeStyled.iframe`
48
- width: 100%;
49
- border: none;
50
- `;
51
- export {
52
- FarcasterOAuthStep
53
- };
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- export declare function TelegramOAuthStep(): import("react/jsx-runtime").JSX.Element;
3
- export declare function TelegramIFrame({ url, isLoaded, setIsLoaded, isVisible, }: {
4
- url?: string;
5
- isLoaded: boolean;
6
- setIsLoaded: React.Dispatch<React.SetStateAction<boolean>>;
7
- isVisible?: boolean;
8
- }): import("react/jsx-runtime").JSX.Element | null;
@@ -1,91 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- import { safeStyled } from "@getpara/react-common";
5
- import { CpslSpinner } from "@getpara/react-components";
6
- import { useTelegramLogin } from "../../hooks/useTelegramLogin.js";
7
- import { useEffect, useState } from "react";
8
- import { useAuthActions } from "../../../provider/providers/AuthProvider.js";
9
- import { useModalStore } from "../../stores/index.js";
10
- import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
11
- import { validatePortalOrigin } from "../../utils/validatePortalOrigin.js";
12
- function TelegramOAuthStep() {
13
- const { verifyTelegramStatus, verifyTelegram } = useAuthActions();
14
- const { url, isLoaded, setIsLoaded } = useTelegramLogin({
15
- isActive: true,
16
- status: verifyTelegramStatus,
17
- onSubmit: verifyTelegram,
18
- isLinking: false
19
- });
20
- const refs = useModalStore((state) => state.refs);
21
- const para = useInternalClient();
22
- const [height, setHeight] = useState(0);
23
- useEffect(() => {
24
- const handleMessage = (event) => {
25
- if (!url) {
26
- return;
27
- }
28
- if (!validatePortalOrigin(event, para.ctx)) {
29
- return;
30
- }
31
- if (event.data) {
32
- if (event.data.type === "HEIGHT") {
33
- setHeight(event.data.height);
34
- }
35
- }
36
- };
37
- typeof window !== "undefined" && window.addEventListener("message", handleMessage);
38
- return () => {
39
- typeof window !== "undefined" && window.removeEventListener("message", handleMessage);
40
- };
41
- }, [url]);
42
- return /* @__PURE__ */ jsxs(Container, { children: [
43
- url && /* @__PURE__ */ jsx(
44
- IFrame,
45
- {
46
- ref: refs.telegramIFrame,
47
- style: { display: isLoaded ? "block" : "none", height },
48
- src: url,
49
- onLoad: () => setIsLoaded(true)
50
- }
51
- ),
52
- (!url || !isLoaded) && /* @__PURE__ */ jsx(CpslSpinner, {})
53
- ] });
54
- }
55
- function TelegramIFrame({
56
- url,
57
- isLoaded,
58
- setIsLoaded,
59
- isVisible = false
60
- }) {
61
- const refs = useModalStore((state) => state.refs);
62
- if (!url) return null;
63
- return /* @__PURE__ */ jsxs(Container, { children: [
64
- url && /* @__PURE__ */ jsx(
65
- IFrame,
66
- {
67
- ref: refs.telegramIFrame,
68
- style: { display: isLoaded && isVisible ? "block" : "none" },
69
- src: url,
70
- onLoad: () => setIsLoaded(true)
71
- }
72
- ),
73
- (!url || !isLoaded) && /* @__PURE__ */ jsx(CpslSpinner, {})
74
- ] });
75
- }
76
- const Container = safeStyled.div`
77
- display: flex;
78
- flex-direction: column;
79
- align-items: center;
80
- justify-content: center;
81
- width: 100%;
82
- `;
83
- const IFrame = safeStyled.iframe`
84
- width: 100%;
85
- height: 52px;
86
- border: none;
87
- `;
88
- export {
89
- TelegramIFrame,
90
- TelegramOAuthStep
91
- };
@@ -1,5 +0,0 @@
1
- interface Setup2FAStepProps {
2
- onClose: () => void;
3
- }
4
- export declare const Setup2FAStep: ({ onClose }: Setup2FAStepProps) => import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1 +0,0 @@
1
- export declare const SwitchWalletsStep: () => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +0,0 @@
1
- interface TwoFactorDoneStepStep {
2
- onClose: () => void;
3
- }
4
- export declare const TwoFactorDoneStep: ({ onClose }: TwoFactorDoneStepStep) => import("react/jsx-runtime").JSX.Element;
5
- export {};
@@ -1,27 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- import { CpslButton, CpslText } from "@getpara/react-components";
5
- import { Heading, StepContainer, InnerStepContainer, HeroIcon } from "../common.js";
6
- import { useStore } from "../../../provider/stores/useStore.js";
7
- const TwoFactorDoneStep = ({ onClose }) => {
8
- const hideWallets = useStore((state) => {
9
- var _a;
10
- return (_a = state.modalConfig) == null ? void 0 : _a.hideWallets;
11
- });
12
- return /* @__PURE__ */ jsxs(StepContainer, { children: [
13
- /* @__PURE__ */ jsx(HeroIcon, { icon: "checkCircleFilled" }),
14
- /* @__PURE__ */ jsxs(InnerStepContainer, { children: [
15
- /* @__PURE__ */ jsx(Heading, { variant: "headingXS", children: "Success" }),
16
- /* @__PURE__ */ jsxs(CpslText, { variant: "bodyS", color: "secondary", weight: "medium", children: [
17
- "Your ",
18
- hideWallets ? "account" : "wallet",
19
- " is now protected by 2FA"
20
- ] })
21
- ] }),
22
- /* @__PURE__ */ jsx(CpslButton, { fullWidth: true, onClick: onClose, children: "Done" })
23
- ] });
24
- };
25
- export {
26
- TwoFactorDoneStep
27
- };
@@ -1,6 +0,0 @@
1
- interface WalletCreationDoneStepProps {
2
- twoFactorAuthEnabled?: boolean;
3
- onClose: () => void;
4
- }
5
- export declare const WalletCreationDoneStep: ({ twoFactorAuthEnabled, onClose }: WalletCreationDoneStepProps) => import("react/jsx-runtime").JSX.Element;
6
- export {};
@@ -1,9 +0,0 @@
1
- import { MutationStatus } from '@tanstack/react-query';
2
- export declare const useFarcasterLogin: ({ isActive, }?: {
3
- isActive?: boolean;
4
- }) => {
5
- url: string | undefined;
6
- isLoaded: boolean;
7
- setIsLoaded: import("react").Dispatch<import("react").SetStateAction<boolean>>;
8
- status: MutationStatus;
9
- };