@web3auth/modal 10.0.0-beta.0 → 10.0.0-beta.1

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 (256) hide show
  1. package/dist/lib.cjs/node_modules/style-inject/dist/style-inject.es.js +1 -1
  2. package/dist/lib.cjs/packages/modal/src/modalManager.js +186 -132
  3. package/dist/lib.cjs/packages/modal/src/react/Web3AuthProvider.js +2 -2
  4. package/dist/lib.cjs/packages/modal/src/react/context/Web3AuthInnerContext.js +26 -26
  5. package/dist/lib.cjs/packages/modal/src/react/hooks/useWeb3Auth.js +2 -2
  6. package/dist/lib.cjs/packages/modal/src/ui/components/BottomSheet/BottomSheet.js +60 -0
  7. package/dist/lib.cjs/packages/modal/src/ui/components/Button/Button.js +47 -22
  8. package/dist/lib.cjs/packages/modal/src/ui/components/Button/Button.type.js +8 -0
  9. package/dist/lib.cjs/packages/modal/src/ui/components/Button/ButtonSocial/ButtonSocial.js +53 -0
  10. package/dist/lib.cjs/packages/modal/src/ui/components/Button/ButtonWallet/ButtonWallet.js +68 -0
  11. package/dist/lib.cjs/packages/modal/src/ui/components/ConnectWallet/ConnectWallet.js +202 -0
  12. package/dist/lib.cjs/packages/modal/src/ui/components/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.js +62 -0
  13. package/dist/lib.cjs/packages/modal/src/ui/components/{ExternalWallet/ExternalWalletChainNamespace.js → ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.js} +28 -30
  14. package/dist/lib.cjs/packages/modal/src/ui/components/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.js +49 -0
  15. package/dist/lib.cjs/packages/modal/src/ui/components/ConnectWallet/ConnectWalletList/ConnectWalletList.js +140 -0
  16. package/dist/lib.cjs/packages/modal/src/ui/components/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.js +93 -0
  17. package/dist/lib.cjs/packages/modal/src/ui/components/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.js +55 -0
  18. package/dist/lib.cjs/packages/modal/src/ui/components/Embed/Embed.js +70 -0
  19. package/dist/lib.cjs/packages/modal/src/ui/components/Footer/Footer.js +53 -0
  20. package/dist/lib.cjs/packages/modal/src/ui/components/Image/Image.js +89 -0
  21. package/dist/lib.cjs/packages/modal/src/ui/components/Loader/Loader.js +151 -0
  22. package/dist/lib.cjs/packages/modal/src/ui/components/Login/Login.js +489 -0
  23. package/dist/lib.cjs/packages/modal/src/ui/components/Login/LoginOtp/LoginOtp.js +116 -0
  24. package/dist/lib.cjs/packages/modal/src/ui/components/Login/LoginPasswordLess/LoginPasswordLess.js +117 -0
  25. package/dist/lib.cjs/packages/modal/src/ui/components/LoginHint/LoginHint.js +52 -0
  26. package/dist/lib.cjs/packages/modal/src/ui/components/Modal/Modal.js +87 -0
  27. package/dist/lib.cjs/packages/modal/src/ui/components/Otp/Otp.js +190 -0
  28. package/dist/lib.cjs/packages/modal/src/ui/components/PulseLoader/PulseLoader.js +18 -0
  29. package/dist/lib.cjs/packages/modal/src/ui/components/Root/Root.js +452 -0
  30. package/dist/lib.cjs/packages/modal/src/ui/components/SocialLoginList/SocialLoginList.js +156 -0
  31. package/dist/lib.cjs/packages/modal/src/ui/components/Toast/Toast.js +70 -0
  32. package/dist/lib.cjs/packages/modal/src/ui/components/Widget/Widget.js +229 -0
  33. package/dist/lib.cjs/packages/modal/src/ui/config.js +12 -1
  34. package/dist/lib.cjs/packages/modal/src/ui/constants.js +18 -0
  35. package/dist/lib.cjs/packages/modal/src/ui/context/RootContext.js +20 -0
  36. package/dist/lib.cjs/packages/modal/src/ui/context/ThemeContext.js +2 -2
  37. package/dist/lib.cjs/packages/modal/src/ui/css/index.css.js +8 -0
  38. package/dist/lib.cjs/packages/modal/src/ui/handlers/AbstractHandler.js +117 -0
  39. package/dist/lib.cjs/packages/modal/src/ui/handlers/EmailPasswordlessHandler.js +54 -0
  40. package/dist/lib.cjs/packages/modal/src/ui/handlers/SmsPasswordlessHandler.js +57 -0
  41. package/dist/lib.cjs/packages/modal/src/ui/handlers/factory.js +19 -0
  42. package/dist/lib.cjs/packages/modal/src/ui/i18n/dutch.json.js +37 -2
  43. package/dist/lib.cjs/packages/modal/src/ui/i18n/english.json.js +37 -2
  44. package/dist/lib.cjs/packages/modal/src/ui/i18n/french.json.js +37 -2
  45. package/dist/lib.cjs/packages/modal/src/ui/i18n/german.json.js +37 -2
  46. package/dist/lib.cjs/packages/modal/src/ui/i18n/japanese.json.js +37 -2
  47. package/dist/lib.cjs/packages/modal/src/ui/i18n/korean.json.js +37 -2
  48. package/dist/lib.cjs/packages/modal/src/ui/i18n/mandarin.json.js +37 -2
  49. package/dist/lib.cjs/packages/modal/src/ui/i18n/portuguese.json.js +37 -2
  50. package/dist/lib.cjs/packages/modal/src/ui/i18n/spanish.json.js +37 -2
  51. package/dist/lib.cjs/packages/modal/src/ui/i18n/turkish.json.js +37 -2
  52. package/dist/lib.cjs/packages/modal/src/ui/interfaces.js +7 -10
  53. package/dist/lib.cjs/packages/modal/src/ui/loginModal.js +69 -44
  54. package/dist/lib.cjs/packages/modal/src/ui/utils.js +107 -1
  55. package/dist/lib.cjs/types/modalManager.d.ts +4 -1
  56. package/dist/lib.cjs/types/ui/components/BottomSheet/BottomSheet.d.ts +7 -0
  57. package/dist/lib.cjs/types/ui/components/BottomSheet/BottomSheet.type.d.ts +7 -0
  58. package/dist/lib.cjs/types/ui/components/BottomSheet/index.d.ts +2 -0
  59. package/dist/lib.cjs/types/ui/components/Button/Button.d.ts +2 -15
  60. package/dist/lib.cjs/types/ui/components/Button/Button.type.d.ts +12 -0
  61. package/dist/lib.cjs/types/ui/components/Button/ButtonSocial/ButtonSocial.d.ts +3 -0
  62. package/dist/lib.cjs/types/ui/components/Button/ButtonSocial/ButtonSocial.type.d.ts +14 -0
  63. package/dist/lib.cjs/types/ui/components/Button/ButtonSocial/index.d.ts +2 -0
  64. package/dist/lib.cjs/types/ui/components/Button/ButtonWallet/ButtonWallet.d.ts +3 -0
  65. package/dist/lib.cjs/types/ui/components/Button/ButtonWallet/ButtonWallet.type.d.ts +13 -0
  66. package/dist/lib.cjs/types/ui/components/Button/ButtonWallet/index.d.ts +2 -0
  67. package/dist/lib.cjs/types/ui/components/Button/index.d.ts +1 -0
  68. package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWallet.d.ts +3 -0
  69. package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWallet.type.d.ts +24 -0
  70. package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.d.ts +3 -0
  71. package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.type.d.ts +13 -0
  72. package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletChainFilter/index.d.ts +2 -0
  73. package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.d.ts +3 -0
  74. package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.type.d.ts +10 -0
  75. package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletChainNamespaceSelect/index.d.ts +2 -0
  76. package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.d.ts +3 -0
  77. package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.type.d.ts +6 -0
  78. package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletHeader/index.d.ts +2 -0
  79. package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletList/ConnectWalletList.d.ts +3 -0
  80. package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletList/ConnectWalletList.type.d.ts +19 -0
  81. package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletList/index.d.ts +2 -0
  82. package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.d.ts +3 -0
  83. package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.type.d.ts +9 -0
  84. package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletQrCode/index.d.ts +2 -0
  85. package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.d.ts +3 -0
  86. package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.type.d.ts +9 -0
  87. package/dist/lib.cjs/types/ui/components/ConnectWallet/ConnectWalletSearch/index.d.ts +2 -0
  88. package/dist/lib.cjs/types/ui/components/ConnectWallet/index.d.ts +2 -0
  89. package/dist/lib.cjs/types/ui/components/Embed/Embed.d.ts +8 -0
  90. package/dist/lib.cjs/types/ui/components/Embed/Embed.type.d.ts +12 -0
  91. package/dist/lib.cjs/types/ui/components/Embed/index.d.ts +2 -0
  92. package/dist/lib.cjs/types/ui/components/Footer/Footer.d.ts +7 -0
  93. package/dist/lib.cjs/types/ui/components/Footer/Footer.type.d.ts +4 -0
  94. package/dist/lib.cjs/types/ui/components/Footer/index.d.ts +2 -0
  95. package/dist/lib.cjs/types/ui/components/Image/Image.d.ts +7 -0
  96. package/dist/lib.cjs/types/ui/components/{Image.d.ts → Image/Image.type.d.ts} +2 -1
  97. package/dist/lib.cjs/types/ui/components/Image/index.d.ts +2 -0
  98. package/dist/lib.cjs/types/ui/components/Loader/Loader.d.ts +8 -0
  99. package/dist/lib.cjs/types/ui/components/Loader/Loader.type.d.ts +12 -0
  100. package/dist/lib.cjs/types/ui/components/Loader/index.d.ts +2 -0
  101. package/dist/lib.cjs/types/ui/components/Login/Login.d.ts +3 -0
  102. package/dist/lib.cjs/types/ui/components/Login/Login.type.d.ts +29 -0
  103. package/dist/lib.cjs/types/ui/components/Login/LoginOtp/LoginOtp.d.ts +8 -0
  104. package/dist/lib.cjs/types/ui/components/Login/LoginOtp/LoginOtp.type.d.ts +10 -0
  105. package/dist/lib.cjs/types/ui/components/Login/LoginOtp/index.d.ts +2 -0
  106. package/dist/lib.cjs/types/ui/components/Login/LoginPasswordLess/LoginPasswordLess.d.ts +3 -0
  107. package/dist/lib.cjs/types/ui/components/Login/LoginPasswordLess/LoginPasswordLess.type.d.ts +13 -0
  108. package/dist/lib.cjs/types/ui/components/Login/LoginPasswordLess/index.d.ts +2 -0
  109. package/dist/lib.cjs/types/ui/components/Login/index.d.ts +2 -0
  110. package/dist/lib.cjs/types/ui/components/LoginHint/LoginHint.d.ts +3 -0
  111. package/dist/lib.cjs/types/ui/components/LoginHint/LoginHint.type.d.ts +6 -0
  112. package/dist/lib.cjs/types/ui/components/LoginHint/index.d.ts +2 -0
  113. package/dist/lib.cjs/types/ui/components/Modal/Modal.d.ts +8 -0
  114. package/dist/lib.cjs/types/ui/components/Modal/Modal.type.d.ts +14 -0
  115. package/dist/lib.cjs/types/ui/components/Modal/index.d.ts +2 -0
  116. package/dist/lib.cjs/types/ui/components/Otp/Otp.d.ts +3 -0
  117. package/dist/lib.cjs/types/ui/components/Otp/Otp.type.d.ts +22 -0
  118. package/dist/lib.cjs/types/ui/components/Otp/index.d.ts +2 -0
  119. package/dist/lib.cjs/types/ui/components/PulseLoader/PulseLoader.d.ts +2 -0
  120. package/dist/lib.cjs/types/ui/components/PulseLoader/index.d.ts +1 -0
  121. package/dist/lib.cjs/types/ui/components/Root/Root.d.ts +3 -0
  122. package/dist/lib.cjs/types/ui/components/Root/Root.type.d.ts +27 -0
  123. package/dist/lib.cjs/types/ui/components/Root/index.d.ts +2 -0
  124. package/dist/lib.cjs/types/ui/components/SocialLoginList/SocialLoginList.d.ts +3 -0
  125. package/dist/lib.cjs/types/ui/components/SocialLoginList/SocialLoginList.type.d.ts +11 -0
  126. package/dist/lib.cjs/types/ui/components/SocialLoginList/index.d.ts +2 -0
  127. package/dist/lib.cjs/types/ui/components/Toast/Toast.d.ts +2 -0
  128. package/dist/lib.cjs/types/ui/components/Toast/index.d.ts +1 -0
  129. package/dist/lib.cjs/types/ui/components/Widget/Widget.d.ts +3 -0
  130. package/dist/lib.cjs/types/ui/components/{Modal.d.ts → Widget/Widget.type.d.ts} +4 -5
  131. package/dist/lib.cjs/types/ui/components/Widget/index.d.ts +1 -0
  132. package/dist/lib.cjs/types/ui/config.d.ts +4 -1
  133. package/dist/lib.cjs/types/ui/constants.d.ts +13 -0
  134. package/dist/lib.cjs/types/ui/context/RootContext.d.ts +18 -0
  135. package/dist/lib.cjs/types/ui/handlers/AbstractHandler.d.ts +20 -0
  136. package/dist/lib.cjs/types/ui/handlers/EmailPasswordlessHandler.d.ts +8 -0
  137. package/dist/lib.cjs/types/ui/handlers/SmsPasswordlessHandler.d.ts +9 -0
  138. package/dist/lib.cjs/types/ui/handlers/factory.d.ts +5 -0
  139. package/dist/lib.cjs/types/ui/interfaces.d.ts +115 -14
  140. package/dist/lib.cjs/types/ui/loginModal.d.ts +9 -7
  141. package/dist/lib.cjs/types/ui/utils.d.ts +17 -2
  142. package/dist/lib.esm/node_modules/style-inject/dist/style-inject.es.js +1 -1
  143. package/dist/lib.esm/packages/modal/src/modalManager.js +191 -138
  144. package/dist/lib.esm/packages/modal/src/ui/components/BottomSheet/BottomSheet.js +58 -0
  145. package/dist/lib.esm/packages/modal/src/ui/components/Button/Button.js +48 -24
  146. package/dist/lib.esm/packages/modal/src/ui/components/Button/Button.type.js +6 -0
  147. package/dist/lib.esm/packages/modal/src/ui/components/Button/ButtonSocial/ButtonSocial.js +51 -0
  148. package/dist/lib.esm/packages/modal/src/ui/components/Button/ButtonWallet/ButtonWallet.js +66 -0
  149. package/dist/lib.esm/packages/modal/src/ui/components/ConnectWallet/ConnectWallet.js +200 -0
  150. package/dist/lib.esm/packages/modal/src/ui/components/ConnectWallet/ConnectWalletChainFilter/ConnectWalletChainFilter.js +60 -0
  151. package/dist/lib.esm/packages/modal/src/ui/components/{ExternalWallet/ExternalWalletChainNamespace.js → ConnectWallet/ConnectWalletChainNamespaceSelect/ConnectWalletChainNamespaceSelect.js} +28 -31
  152. package/dist/lib.esm/packages/modal/src/ui/components/ConnectWallet/ConnectWalletHeader/ConnectWalletHeader.js +47 -0
  153. package/dist/lib.esm/packages/modal/src/ui/components/ConnectWallet/ConnectWalletList/ConnectWalletList.js +138 -0
  154. package/dist/lib.esm/packages/modal/src/ui/components/ConnectWallet/ConnectWalletQrCode/ConnectWalletQrCode.js +91 -0
  155. package/dist/lib.esm/packages/modal/src/ui/components/ConnectWallet/ConnectWalletSearch/ConnectWalletSearch.js +56 -0
  156. package/dist/lib.esm/packages/modal/src/ui/components/Embed/Embed.js +68 -0
  157. package/dist/lib.esm/packages/modal/src/ui/components/Footer/Footer.js +51 -0
  158. package/dist/lib.esm/packages/modal/src/ui/components/Image/Image.js +87 -0
  159. package/dist/lib.esm/packages/modal/src/ui/components/Loader/Loader.js +152 -0
  160. package/dist/lib.esm/packages/modal/src/ui/components/Login/Login.js +489 -0
  161. package/dist/lib.esm/packages/modal/src/ui/components/Login/LoginOtp/LoginOtp.js +115 -0
  162. package/dist/lib.esm/packages/modal/src/ui/components/Login/LoginPasswordLess/LoginPasswordLess.js +115 -0
  163. package/dist/lib.esm/packages/modal/src/ui/components/LoginHint/LoginHint.js +50 -0
  164. package/dist/lib.esm/packages/modal/src/ui/components/Modal/Modal.js +85 -0
  165. package/dist/lib.esm/packages/modal/src/ui/components/Otp/Otp.js +188 -0
  166. package/dist/lib.esm/packages/modal/src/ui/components/PulseLoader/PulseLoader.js +16 -0
  167. package/dist/lib.esm/packages/modal/src/ui/components/Root/Root.js +462 -0
  168. package/dist/lib.esm/packages/modal/src/ui/components/SocialLoginList/SocialLoginList.js +154 -0
  169. package/dist/lib.esm/packages/modal/src/ui/components/Toast/Toast.js +68 -0
  170. package/dist/lib.esm/packages/modal/src/ui/components/Widget/Widget.js +231 -0
  171. package/dist/lib.esm/packages/modal/src/ui/config.js +10 -3
  172. package/dist/lib.esm/packages/modal/src/ui/constants.js +13 -0
  173. package/dist/lib.esm/packages/modal/src/ui/context/RootContext.js +18 -0
  174. package/dist/lib.esm/packages/modal/src/ui/css/index.css.js +6 -0
  175. package/dist/lib.esm/packages/modal/src/ui/handlers/AbstractHandler.js +115 -0
  176. package/dist/lib.esm/packages/modal/src/ui/handlers/EmailPasswordlessHandler.js +52 -0
  177. package/dist/lib.esm/packages/modal/src/ui/handlers/SmsPasswordlessHandler.js +55 -0
  178. package/dist/lib.esm/packages/modal/src/ui/handlers/factory.js +17 -0
  179. package/dist/lib.esm/packages/modal/src/ui/i18n/dutch.json.js +37 -3
  180. package/dist/lib.esm/packages/modal/src/ui/i18n/english.json.js +37 -3
  181. package/dist/lib.esm/packages/modal/src/ui/i18n/french.json.js +37 -3
  182. package/dist/lib.esm/packages/modal/src/ui/i18n/german.json.js +37 -3
  183. package/dist/lib.esm/packages/modal/src/ui/i18n/japanese.json.js +37 -3
  184. package/dist/lib.esm/packages/modal/src/ui/i18n/korean.json.js +37 -3
  185. package/dist/lib.esm/packages/modal/src/ui/i18n/mandarin.json.js +37 -3
  186. package/dist/lib.esm/packages/modal/src/ui/i18n/portuguese.json.js +37 -3
  187. package/dist/lib.esm/packages/modal/src/ui/i18n/spanish.json.js +37 -3
  188. package/dist/lib.esm/packages/modal/src/ui/i18n/turkish.json.js +37 -3
  189. package/dist/lib.esm/packages/modal/src/ui/interfaces.js +8 -9
  190. package/dist/lib.esm/packages/modal/src/ui/loginModal.js +70 -45
  191. package/dist/lib.esm/packages/modal/src/ui/utils.js +105 -3
  192. package/dist/modal.umd.min.js +1 -1
  193. package/dist/modal.umd.min.js.LICENSE.txt +8 -8
  194. package/package.json +14 -11
  195. package/dist/lib.cjs/packages/modal/src/ui/assets/arrow-left-dark.svg.js +0 -7
  196. package/dist/lib.cjs/packages/modal/src/ui/assets/arrow-left-light.svg.js +0 -7
  197. package/dist/lib.cjs/packages/modal/src/ui/assets/x-dark.svg.js +0 -7
  198. package/dist/lib.cjs/packages/modal/src/ui/assets/x-light.svg.js +0 -7
  199. package/dist/lib.cjs/packages/modal/src/ui/components/AdapterLoader.js +0 -108
  200. package/dist/lib.cjs/packages/modal/src/ui/components/Button/styles.css.js +0 -8
  201. package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallet/ExternalWalletButton.js +0 -44
  202. package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallet/ExternalWalletConnect.js +0 -67
  203. package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallet/ExternalWalletDetails.js +0 -43
  204. package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallet/ExternalWalletHeader.js +0 -46
  205. package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallet/ExternalWalletInstall.js +0 -167
  206. package/dist/lib.cjs/packages/modal/src/ui/components/ExternalWallets.js +0 -279
  207. package/dist/lib.cjs/packages/modal/src/ui/components/Footer.js +0 -20
  208. package/dist/lib.cjs/packages/modal/src/ui/components/Header.js +0 -81
  209. package/dist/lib.cjs/packages/modal/src/ui/components/Icon.js +0 -73
  210. package/dist/lib.cjs/packages/modal/src/ui/components/Image.js +0 -51
  211. package/dist/lib.cjs/packages/modal/src/ui/components/Loader.js +0 -59
  212. package/dist/lib.cjs/packages/modal/src/ui/components/Modal.js +0 -278
  213. package/dist/lib.cjs/packages/modal/src/ui/components/SelfCustodyViaWeb3Auth.js +0 -30
  214. package/dist/lib.cjs/packages/modal/src/ui/components/SocialLoginPasswordless.js +0 -150
  215. package/dist/lib.cjs/packages/modal/src/ui/components/SocialLogins.js +0 -153
  216. package/dist/lib.cjs/packages/modal/src/ui/components/WalletConnect.js +0 -84
  217. package/dist/lib.cjs/packages/modal/src/ui/css/web3auth.css.js +0 -8
  218. package/dist/lib.cjs/types/ui/components/AdapterLoader.d.ts +0 -11
  219. package/dist/lib.cjs/types/ui/components/ExternalWallet/ExternalWalletButton.d.ts +0 -7
  220. package/dist/lib.cjs/types/ui/components/ExternalWallet/ExternalWalletChainNamespace.d.ts +0 -9
  221. package/dist/lib.cjs/types/ui/components/ExternalWallet/ExternalWalletConnect.d.ts +0 -9
  222. package/dist/lib.cjs/types/ui/components/ExternalWallet/ExternalWalletDetails.d.ts +0 -10
  223. package/dist/lib.cjs/types/ui/components/ExternalWallet/ExternalWalletHeader.d.ts +0 -8
  224. package/dist/lib.cjs/types/ui/components/ExternalWallet/ExternalWalletInstall.d.ts +0 -8
  225. package/dist/lib.cjs/types/ui/components/ExternalWallets.d.ts +0 -15
  226. package/dist/lib.cjs/types/ui/components/Footer.d.ts +0 -1
  227. package/dist/lib.cjs/types/ui/components/Header.d.ts +0 -8
  228. package/dist/lib.cjs/types/ui/components/Icon.d.ts +0 -9
  229. package/dist/lib.cjs/types/ui/components/Loader.d.ts +0 -10
  230. package/dist/lib.cjs/types/ui/components/SelfCustodyViaWeb3Auth.d.ts +0 -1
  231. package/dist/lib.cjs/types/ui/components/SocialLoginPasswordless.d.ts +0 -14
  232. package/dist/lib.cjs/types/ui/components/SocialLogins.d.ts +0 -10
  233. package/dist/lib.cjs/types/ui/components/WalletConnect.d.ts +0 -8
  234. package/dist/lib.esm/packages/modal/src/ui/assets/arrow-left-dark.svg.js +0 -5
  235. package/dist/lib.esm/packages/modal/src/ui/assets/arrow-left-light.svg.js +0 -5
  236. package/dist/lib.esm/packages/modal/src/ui/assets/x-dark.svg.js +0 -5
  237. package/dist/lib.esm/packages/modal/src/ui/assets/x-light.svg.js +0 -5
  238. package/dist/lib.esm/packages/modal/src/ui/components/AdapterLoader.js +0 -106
  239. package/dist/lib.esm/packages/modal/src/ui/components/Button/styles.css.js +0 -6
  240. package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallet/ExternalWalletButton.js +0 -42
  241. package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallet/ExternalWalletConnect.js +0 -65
  242. package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallet/ExternalWalletDetails.js +0 -44
  243. package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallet/ExternalWalletHeader.js +0 -44
  244. package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallet/ExternalWalletInstall.js +0 -165
  245. package/dist/lib.esm/packages/modal/src/ui/components/ExternalWallets.js +0 -281
  246. package/dist/lib.esm/packages/modal/src/ui/components/Footer.js +0 -18
  247. package/dist/lib.esm/packages/modal/src/ui/components/Header.js +0 -79
  248. package/dist/lib.esm/packages/modal/src/ui/components/Icon.js +0 -71
  249. package/dist/lib.esm/packages/modal/src/ui/components/Image.js +0 -49
  250. package/dist/lib.esm/packages/modal/src/ui/components/Loader.js +0 -57
  251. package/dist/lib.esm/packages/modal/src/ui/components/Modal.js +0 -277
  252. package/dist/lib.esm/packages/modal/src/ui/components/SelfCustodyViaWeb3Auth.js +0 -28
  253. package/dist/lib.esm/packages/modal/src/ui/components/SocialLoginPasswordless.js +0 -148
  254. package/dist/lib.esm/packages/modal/src/ui/components/SocialLogins.js +0 -152
  255. package/dist/lib.esm/packages/modal/src/ui/components/WalletConnect.js +0 -82
  256. package/dist/lib.esm/packages/modal/src/ui/css/web3auth.css.js +0 -6
@@ -0,0 +1,12 @@
1
+ import type { JSX } from "react";
2
+ import { BorderRadiusType } from "../../interfaces";
3
+ export interface EmbedProps {
4
+ children: JSX.Element[] | JSX.Element;
5
+ padding?: boolean;
6
+ shadow?: boolean;
7
+ border?: boolean;
8
+ showCloseIcon?: boolean;
9
+ open?: boolean;
10
+ onClose?: () => void;
11
+ borderRadius?: BorderRadiusType;
12
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from "./Embed";
2
+ export type { EmbedProps } from "./Embed.type";
@@ -0,0 +1,7 @@
1
+ import { FooterProps } from "./Footer.type";
2
+ /**
3
+ * Footer component
4
+ * @returns Footer component
5
+ */
6
+ declare function Footer({ privacyPolicy, termsOfService }: FooterProps): import("react/jsx-runtime").JSX.Element;
7
+ export default Footer;
@@ -0,0 +1,4 @@
1
+ export interface FooterProps {
2
+ privacyPolicy?: string;
3
+ termsOfService?: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from "./Footer";
2
+ export type { FooterProps } from "./Footer.type";
@@ -0,0 +1,7 @@
1
+ import { ImageProps } from "./Image.type";
2
+ /**
3
+ * Image component
4
+ * @param props - ImageProps
5
+ * @returns Image component
6
+ */
7
+ export default function Image(props: ImageProps): import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,8 @@
1
1
  export interface ImageProps {
2
+ id?: string;
2
3
  hoverImageId?: string;
3
4
  imageId: string;
5
+ imageData?: string;
4
6
  isButton?: boolean;
5
7
  height?: string;
6
8
  width?: string;
@@ -9,4 +11,3 @@ export interface ImageProps {
9
11
  darkImageId?: string;
10
12
  darkHoverImageId?: string;
11
13
  }
12
- export default function Image(props: ImageProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Image";
2
+ export type { ImageProps } from "./Image.type";
@@ -0,0 +1,8 @@
1
+ import { LoaderProps } from "./Loader.type";
2
+ /**
3
+ * Loader component
4
+ * @param props - LoaderProps
5
+ * @returns Loader component
6
+ */
7
+ declare function Loader(props: LoaderProps): import("react/jsx-runtime").JSX.Element;
8
+ export default Loader;
@@ -0,0 +1,12 @@
1
+ import type { ModalStatusType } from "../../interfaces";
2
+ export interface LoaderProps {
3
+ message?: string;
4
+ appLogo?: string;
5
+ connector: string;
6
+ connectorName: string;
7
+ modalStatus: ModalStatusType;
8
+ onClose: () => void;
9
+ }
10
+ export type ConnectingStatusType = Pick<LoaderProps, "connectorName" | "appLogo" | "connector">;
11
+ export type ConnectedStatusType = Pick<LoaderProps, "message">;
12
+ export type ErroredStatusType = Pick<LoaderProps, "message">;
@@ -0,0 +1,2 @@
1
+ export { default } from "./Loader";
2
+ export type { LoaderProps } from "./Loader.type";
@@ -0,0 +1,3 @@
1
+ import { LoginProps } from "./Login.type";
2
+ declare function Login(props: LoginProps): import("react/jsx-runtime").JSX.Element;
3
+ export default Login;
@@ -0,0 +1,29 @@
1
+ import { WEB3AUTH_NETWORK_TYPE } from "@web3auth/no-modal";
2
+ import type { ButtonRadiusType, ExternalButton, ExternalWalletEventType, LogoAlignmentType, SocialLoginEventType, SocialLoginsConfig } from "../../interfaces";
3
+ export interface LoginProps {
4
+ web3authClientId: string;
5
+ web3authNetwork: WEB3AUTH_NETWORK_TYPE;
6
+ isModalVisible: boolean;
7
+ isDark: boolean;
8
+ appLogo?: string;
9
+ appName?: string;
10
+ showPasswordLessInput: boolean;
11
+ showExternalWalletButton: boolean;
12
+ showExternalWalletCount: boolean;
13
+ showInstalledExternalWallets: boolean;
14
+ socialLoginsConfig: SocialLoginsConfig;
15
+ installedExternalWalletConfig: ExternalButton[];
16
+ areSocialLoginsVisible: boolean;
17
+ isEmailPrimary: boolean;
18
+ isExternalPrimary: boolean;
19
+ isEmailPasswordLessLoginVisible: boolean;
20
+ isSmsPasswordLessLoginVisible: boolean;
21
+ totalExternalWallets: number;
22
+ logoAlignment?: LogoAlignmentType;
23
+ buttonRadius?: ButtonRadiusType;
24
+ enableMainSocialLoginButton?: boolean;
25
+ handleExternalWalletBtnClick?: (flag: boolean) => void;
26
+ handleSocialLoginClick: (params: SocialLoginEventType) => void;
27
+ handleExternalWalletClick: (params: ExternalWalletEventType) => void;
28
+ handleSocialLoginHeight: () => void;
29
+ }
@@ -0,0 +1,8 @@
1
+ import { LoginOtpProps } from "./LoginOtp.type";
2
+ /**
3
+ * LoginOtp component
4
+ * @param props - LoginOtpProps
5
+ * @returns LoginOtp component
6
+ */
7
+ declare function LoginOtp(props: LoginOtpProps): import("react/jsx-runtime").JSX.Element;
8
+ export default LoginOtp;
@@ -0,0 +1,10 @@
1
+ import { type AUTH_CONNECTION_TYPE } from "@web3auth/auth";
2
+ export interface LoginOtpProps {
3
+ otpLoading: boolean;
4
+ authConnection: AUTH_CONNECTION_TYPE;
5
+ loginHint?: string;
6
+ errorMessage: string;
7
+ setShowOtpFlow: (showOtpFlow: boolean) => void;
8
+ handleOtpComplete: (otp: string) => void;
9
+ }
10
+ export type OtpInputProps = Pick<LoginOtpProps, "otpLoading" | "loginHint" | "setShowOtpFlow" | "handleOtpComplete" | "authConnection" | "errorMessage">;
@@ -0,0 +1,2 @@
1
+ export { default } from "./LoginOtp";
2
+ export type { LoginOtpProps, OtpInputProps } from "./LoginOtp.type";
@@ -0,0 +1,3 @@
1
+ import { LoginPasswordLessProps } from "./LoginPasswordLess.type";
2
+ declare function LoginPasswordLess(props: LoginPasswordLessProps): import("react/jsx-runtime").JSX.Element;
3
+ export default LoginPasswordLess;
@@ -0,0 +1,13 @@
1
+ import { ButtonRadiusType } from "../../../interfaces";
2
+ export interface LoginPasswordLessProps {
3
+ isModalVisible: boolean;
4
+ isPasswordLessCtaClicked: boolean;
5
+ isPasswordLessLoading: boolean;
6
+ title: string;
7
+ placeholder: string;
8
+ errorMessage: string;
9
+ isDark: boolean;
10
+ buttonRadius?: ButtonRadiusType;
11
+ handleFormSubmit: (loginHint: string) => void;
12
+ setIsPasswordLessCtaClicked: (isPasswordLessCtaClicked: boolean) => void;
13
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from "./LoginPasswordLess";
2
+ export type { LoginPasswordLessProps } from "./LoginPasswordLess.type";
@@ -0,0 +1,2 @@
1
+ export { default } from "./Login";
2
+ export { type LoginProps } from "./Login.type";
@@ -0,0 +1,3 @@
1
+ import { LoginHintProps } from "./LoginHint.type";
2
+ declare const LoginHint: ({ children, content, isDark, hideHint }: LoginHintProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default LoginHint;
@@ -0,0 +1,6 @@
1
+ export interface LoginHintProps {
2
+ children: React.ReactNode;
3
+ content: string;
4
+ isDark?: boolean;
5
+ hideHint?: boolean;
6
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from "./LoginHint";
2
+ export type { LoginHintProps } from "./LoginHint.type";
@@ -0,0 +1,8 @@
1
+ import { ModalProps } from "./Modal.type";
2
+ /**
3
+ * Modal component
4
+ * @param props - ModalProps
5
+ * @returns Modal component
6
+ */
7
+ declare function Modal(props: ModalProps): import("react/jsx-runtime").JSX.Element;
8
+ export default Modal;
@@ -0,0 +1,14 @@
1
+ import { JSX } from "react";
2
+ import { BorderRadiusType } from "../../interfaces";
3
+ export type ModalPlacement = "center" | "top-center" | "bottom-center" | "left" | "right";
4
+ export interface ModalProps {
5
+ children: JSX.Element[] | JSX.Element;
6
+ open: boolean;
7
+ placement?: ModalPlacement;
8
+ padding?: boolean;
9
+ shadow?: boolean;
10
+ border?: boolean;
11
+ showCloseIcon?: boolean;
12
+ onClose?: () => void;
13
+ borderRadius?: BorderRadiusType;
14
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from "./Modal";
2
+ export type { ModalProps } from "./Modal.type";
@@ -0,0 +1,3 @@
1
+ import { OtpProps } from "./Otp.type";
2
+ declare const OtpInput: import("react").ForwardRefExoticComponent<OtpProps & import("react").RefAttributes<HTMLDivElement>>;
3
+ export default OtpInput;
@@ -0,0 +1,22 @@
1
+ import { InputHTMLAttributes } from "react";
2
+ export type OtpClassesType = "root" | "inputContainer" | "ctaContainer" | "resendBtnText" | "timerText" | "input" | "success" | "error" | "disabled" | "helperText";
3
+ export interface OtpProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChange" | "placeholder"> {
4
+ length: number;
5
+ loading?: boolean;
6
+ resendTimer?: number;
7
+ error?: boolean;
8
+ success?: boolean;
9
+ disabled?: boolean;
10
+ onComplete: (otp: string) => void;
11
+ onChange?: (otp: string) => void;
12
+ onResendTimer?: () => void;
13
+ resendBtnText?: string;
14
+ classes?: Partial<Record<OtpClassesType, string>>;
15
+ helperText?: string;
16
+ showCta?: boolean;
17
+ showTimer?: boolean;
18
+ autoFocus?: boolean;
19
+ autoComplete?: HTMLInputElement["autocomplete"];
20
+ placeholder?: string | string[];
21
+ type?: "text" | "number" | "password";
22
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from "./Otp";
2
+ export type { OtpClassesType, OtpProps } from "./Otp.type";
@@ -0,0 +1,2 @@
1
+ declare const PulseLoader: () => import("react/jsx-runtime").JSX.Element;
2
+ export default PulseLoader;
@@ -0,0 +1 @@
1
+ export { default } from "./PulseLoader";
@@ -0,0 +1,3 @@
1
+ import { RootProps } from "./Root.type";
2
+ declare function Root(props: RootProps): import("react/jsx-runtime").JSX.Element;
3
+ export default Root;
@@ -0,0 +1,27 @@
1
+ import type { ChainNamespaceType, WalletRegistry } from "@web3auth/no-modal";
2
+ import { ModalState, SocialLoginEventType, SocialLoginsConfig, UIConfig } from "../../interfaces";
3
+ export interface RootProps {
4
+ appLogo?: string;
5
+ appName?: string;
6
+ chainNamespaces: ChainNamespaceType[];
7
+ walletRegistry?: WalletRegistry;
8
+ showPasswordLessInput: boolean;
9
+ showExternalWalletButton: boolean;
10
+ socialLoginsConfig: SocialLoginsConfig;
11
+ areSocialLoginsVisible: boolean;
12
+ isEmailPrimary: boolean;
13
+ isExternalPrimary: boolean;
14
+ showExternalWalletPage: boolean;
15
+ modalState: ModalState;
16
+ isEmailPasswordLessLoginVisible: boolean;
17
+ isSmsPasswordLessLoginVisible: boolean;
18
+ uiConfig: UIConfig;
19
+ handleSocialLoginClick: (params: SocialLoginEventType) => void;
20
+ handleExternalWalletBtnClick?: (flag: boolean) => void;
21
+ preHandleExternalWalletClick: (params: {
22
+ connector: string;
23
+ chainNamespace?: ChainNamespaceType;
24
+ }) => void;
25
+ setModalState: (state: ModalState) => void;
26
+ onCloseLoader: () => void;
27
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from "./Root";
2
+ export type { RootProps } from "./Root.type";
@@ -0,0 +1,3 @@
1
+ import { SocialLoginListProps } from "./SocialLoginList.type";
2
+ declare function SocialLoginList(props: SocialLoginListProps): import("react/jsx-runtime").JSX.Element;
3
+ export default SocialLoginList;
@@ -0,0 +1,11 @@
1
+ import { ButtonRadiusType, rowType, SocialLoginEventType, SocialLoginsConfig } from "../../interfaces";
2
+ export interface SocialLoginListProps {
3
+ isDark: boolean;
4
+ visibleRow: rowType[];
5
+ canShowMore: boolean;
6
+ socialLoginsConfig: SocialLoginsConfig;
7
+ otherRow?: rowType[];
8
+ handleSocialLoginClick: (params: SocialLoginEventType) => void;
9
+ handleExpandSocialLogins: () => void;
10
+ buttonRadius?: ButtonRadiusType;
11
+ }
@@ -0,0 +1,2 @@
1
+ export { default } from "./SocialLoginList";
2
+ export type { SocialLoginListProps } from "./SocialLoginList.type";
@@ -0,0 +1,2 @@
1
+ declare const Toast: () => import("react/jsx-runtime").JSX.Element;
2
+ export default Toast;
@@ -0,0 +1 @@
1
+ export { default } from "./Toast";
@@ -0,0 +1,3 @@
1
+ import { WidgetProps } from "./Widget.type";
2
+ declare function Widget(props: WidgetProps): import("react/jsx-runtime").JSX.Element;
3
+ export default Widget;
@@ -1,7 +1,7 @@
1
- import { type SafeEventEmitter } from "@web3auth/auth";
1
+ import { SafeEventEmitter } from "@web3auth/auth";
2
2
  import { ChainNamespaceType, WalletRegistry } from "@web3auth/no-modal";
3
- import { ExternalWalletEventType, SocialLoginEventType, StateEmitterEvents } from "../interfaces";
4
- interface ModalProps {
3
+ import { ExternalWalletEventType, SocialLoginEventType, StateEmitterEvents, UIConfig } from "../../interfaces";
4
+ export interface WidgetProps {
5
5
  stateListener: SafeEventEmitter<StateEmitterEvents>;
6
6
  appLogo?: string;
7
7
  appName?: string;
@@ -11,6 +11,5 @@ interface ModalProps {
11
11
  handleExternalWalletClick: (params: ExternalWalletEventType) => void;
12
12
  handleShowExternalWallets: (externalWalletsInitialized: boolean) => void;
13
13
  closeModal: () => void;
14
+ uiConfig: UIConfig;
14
15
  }
15
- export default function Modal(props: ModalProps): import("react/jsx-runtime").JSX.Element;
16
- export {};
@@ -0,0 +1 @@
1
+ export { default } from "./Widget";
@@ -1,4 +1,7 @@
1
- import { AUTH_CONNECTION_TYPE } from "@web3auth/auth";
1
+ import { AUTH_CONNECTION_TYPE, BUILD_ENV_TYPE } from "@web3auth/auth";
2
2
  export declare function capitalizeFirstLetter(string: string): string;
3
+ export declare const restrictedLoginMethods: Set<AUTH_CONNECTION_TYPE>;
3
4
  export declare const AUTH_PROVIDERS: ("google" | "telegram" | "facebook" | "reddit" | "discord" | "twitch" | "apple" | "github" | "linkedin" | "twitter" | "weibo" | "line" | "email_passwordless" | "sms_passwordless" | "kakao" | "wechat" | "farcaster" | "custom" | "passkeys" | "authenticator")[];
4
5
  export declare const AUTH_PROVIDERS_NAMES: Record<AUTH_CONNECTION_TYPE, string>;
6
+ export declare const PASSWORDLESS_BUILD_ENV_MAP: Record<BUILD_ENV_TYPE, string>;
7
+ export declare const CAPTCHA_SITE_KEY = "d5f0c15c-eeda-4f9c-934a-d8e0348e83b2";
@@ -0,0 +1,13 @@
1
+ export declare const PAGES: {
2
+ LOGIN: string;
3
+ SHOW_SOCIAL_LOGINS: string;
4
+ CONNECT_WALLET: string;
5
+ SELECTED_WALLET: string;
6
+ };
7
+ export declare const CONNECT_WALLET_PAGES: {
8
+ CONNECT_WALLET: string;
9
+ SELECTED_WALLET: string;
10
+ };
11
+ export declare const DEFAULT_LOGO_LIGHT = "https://images.web3auth.io/web3auth-logo-w.svg";
12
+ export declare const DEFAULT_LOGO_DARK = "https://images.web3auth.io/web3auth-logo-w-light.svg";
13
+ export declare const WALLET_CONNECT_LOGO = "https://images.web3auth.io/login-wallet-connect.svg";
@@ -0,0 +1,18 @@
1
+ import { Dispatch, SetStateAction } from "react";
2
+ import { ExternalButton, ToastType } from "../interfaces";
3
+ export type BodyState = {
4
+ showWalletDetails?: boolean;
5
+ showMultiChainSelector?: boolean;
6
+ walletDetails?: ExternalButton;
7
+ };
8
+ export type ToastState = {
9
+ message: string;
10
+ type: ToastType;
11
+ };
12
+ export type RootContextType = {
13
+ bodyState: BodyState;
14
+ setBodyState: Dispatch<SetStateAction<BodyState>>;
15
+ toast: ToastState;
16
+ setToast: Dispatch<SetStateAction<ToastState>>;
17
+ };
18
+ export declare const RootContext: import("react").Context<RootContextType>;
@@ -0,0 +1,20 @@
1
+ import { CodeInitiateRequestBodyParams, CodeVerifyRequestBodyParams, IStartResponse, IVerifyResponse, PasswordlessHandlerParams, WhiteLabelParams } from "../interfaces";
2
+ export declare abstract class PasswordlessHandler {
3
+ readonly authBaseApiUrl: string;
4
+ passwordlessParams: PasswordlessHandlerParams;
5
+ trackingIdentifier?: string;
6
+ constructor(params: PasswordlessHandlerParams);
7
+ get name(): string;
8
+ get connection(): "email" | "sms";
9
+ get trackingId(): string | undefined;
10
+ get sessionStorageAvailable(): boolean;
11
+ get whiteLabelParams(): WhiteLabelParams;
12
+ set trackingId(value: string | undefined);
13
+ protected start(params: CodeInitiateRequestBodyParams): Promise<IStartResponse>;
14
+ protected verify(params: CodeVerifyRequestBodyParams): Promise<IVerifyResponse>;
15
+ private handleError;
16
+ abstract sendVerificationCode(params?: {
17
+ captchaToken: string;
18
+ }): Promise<IStartResponse>;
19
+ abstract verifyCode(code: string): Promise<IVerifyResponse>;
20
+ }
@@ -0,0 +1,8 @@
1
+ import { PasswordlessHandlerParams } from "../interfaces";
2
+ import { PasswordlessHandler } from "./AbstractHandler";
3
+ export default class EmailPasswordlessHandler extends PasswordlessHandler {
4
+ mailSent: boolean;
5
+ constructor(params: PasswordlessHandlerParams);
6
+ sendVerificationCode(): Promise<import("..").IStartResponse>;
7
+ verifyCode(code: string): Promise<import("..").IVerifyResponse>;
8
+ }
@@ -0,0 +1,9 @@
1
+ import { PasswordlessHandlerParams } from "../interfaces";
2
+ import { PasswordlessHandler } from "./AbstractHandler";
3
+ export default class SmsPasswordlessHandler extends PasswordlessHandler {
4
+ constructor(params: PasswordlessHandlerParams);
5
+ sendVerificationCode(params?: {
6
+ captchaToken: string;
7
+ }): Promise<import("..").IStartResponse>;
8
+ verifyCode(code: string): Promise<import("..").IVerifyResponse>;
9
+ }
@@ -0,0 +1,5 @@
1
+ import { AUTH_CONNECTION_TYPE } from "@web3auth/auth";
2
+ import type { PasswordlessHandlerParams } from "../interfaces";
3
+ import EmailPasswordlessHandler from "./EmailPasswordlessHandler";
4
+ import SmsPasswordlessHandler from "./SmsPasswordlessHandler";
5
+ export declare const createPasswordlessHandler: (authConnection: AUTH_CONNECTION_TYPE, params: PasswordlessHandlerParams) => EmailPasswordlessHandler | SmsPasswordlessHandler;
@@ -1,6 +1,10 @@
1
- import type { SafeEventEmitter } from "@web3auth/auth";
2
- import { type AuthLoginParams, type BaseConnectorConfig, type ChainNamespaceType, type LoginMethodConfig, type UIConfig as CoreUIConfig, type WALLET_CONNECTOR_TYPE, type WalletRegistry, type WalletRegistryItem, type Web3AuthNoModalEvents } from "@web3auth/no-modal";
3
- export interface UIConfig extends CoreUIConfig {
1
+ import type { AUTH_CONNECTION_TYPE, EMAIL_FLOW_TYPE, ExtraLoginOptions, LANGUAGES, SafeEventEmitter, THEME_MODE_TYPE, WEB3AUTH_NETWORK_TYPE } from "@web3auth/auth";
2
+ import { type AuthLoginParams, type BaseConnectorConfig, type ChainNamespaceType, type LoginMethodConfig, type LoginModalConfig, type UIConfig as CoreUIConfig, type WALLET_CONNECTOR_TYPE, type WalletRegistry, type WalletRegistryItem, type Web3AuthNoModalEvents } from "@web3auth/no-modal";
3
+ export interface UIConfig extends CoreUIConfig, LoginModalConfig {
4
+ /**
5
+ * ID of the element to embed the widget into
6
+ */
7
+ targetId?: string;
4
8
  /**
5
9
  * order of how login methods are shown
6
10
  *
@@ -40,12 +44,26 @@ export type ModalLoginParams = Pick<AuthLoginParams, "authConnection" | "authCon
40
44
  export interface LoginModalProps extends UIConfig {
41
45
  chainNamespaces: ChainNamespaceType[];
42
46
  walletRegistry: WalletRegistry;
47
+ web3authClientId: string;
48
+ web3authNetwork: WEB3AUTH_NETWORK_TYPE;
49
+ }
50
+ export interface LoginModalCallbacks {
51
+ onInitExternalWallets: (params: {
52
+ externalWalletsInitialized: boolean;
53
+ }) => Promise<void>;
54
+ onSocialLogin: (params: {
55
+ connector: WALLET_CONNECTOR_TYPE;
56
+ loginParams: ModalLoginParams;
57
+ }) => Promise<void>;
58
+ onExternalWalletLogin: (params: {
59
+ connector: WALLET_CONNECTOR_TYPE;
60
+ loginParams: {
61
+ chainNamespace: ChainNamespaceType;
62
+ };
63
+ }) => Promise<void>;
64
+ onModalVisibility: (visibility: boolean) => Promise<void>;
43
65
  }
44
66
  export declare const LOGIN_MODAL_EVENTS: {
45
- readonly INIT_EXTERNAL_WALLETS: "INIT_EXTERNAL_WALLETS";
46
- readonly EXTERNAL_WALLET_LOGIN: "EXTERNAL_WALLET_LOGIN";
47
- readonly SOCIAL_LOGIN: "SOCIAL_LOGIN";
48
- readonly DISCONNECT: "DISCONNECT";
49
67
  readonly MODAL_VISIBILITY: "MODAL_VISIBILITY";
50
68
  };
51
69
  export type SocialLoginsConfig = {
@@ -55,10 +73,10 @@ export type SocialLoginsConfig = {
55
73
  uiConfig: Omit<UIConfig, "connectorListener">;
56
74
  };
57
75
  export declare const MODAL_STATUS: {
58
- INITIALIZED: string;
59
- CONNECTED: string;
60
- CONNECTING: string;
61
- ERRORED: string;
76
+ readonly INITIALIZED: "initialized";
77
+ readonly CONNECTED: "connected";
78
+ readonly CONNECTING: "connecting";
79
+ readonly ERRORED: "errored";
62
80
  };
63
81
  export type ModalStatusType = (typeof MODAL_STATUS)[keyof typeof MODAL_STATUS];
64
82
  export interface ModalState {
@@ -75,6 +93,9 @@ export interface ModalState {
75
93
  detailedLoaderConnector: string;
76
94
  detailedLoaderConnectorName: string;
77
95
  showExternalWalletsOnly: boolean;
96
+ currentPage?: string;
97
+ web3authClientId: string;
98
+ web3authNetwork: WEB3AUTH_NETWORK_TYPE;
78
99
  }
79
100
  export type SocialLoginEventType = {
80
101
  connector: string;
@@ -84,9 +105,6 @@ export type ExternalWalletEventType = {
84
105
  connector: string;
85
106
  chainNamespace?: ChainNamespaceType;
86
107
  };
87
- export declare const DEFAULT_LOGO_LIGHT = "https://images.web3auth.io/web3auth-logo-w.svg";
88
- export declare const DEFAULT_LOGO_DARK = "https://images.web3auth.io/web3auth-logo-w-light.svg";
89
- export declare const WALLET_CONNECT_LOGO = "https://images.web3auth.io/login-wallet-connect.svg";
90
108
  export type StateEmitterEvents = {
91
109
  STATE_UPDATED: (state: Partial<ModalState>) => void;
92
110
  MOUNTED: () => void;
@@ -95,6 +113,7 @@ export type ExternalButton = {
95
113
  name: string;
96
114
  displayName?: string;
97
115
  href?: string;
116
+ icon?: string;
98
117
  hasInjectedWallet: boolean;
99
118
  hasWalletConnect: boolean;
100
119
  hasInstallLinks: boolean;
@@ -102,3 +121,85 @@ export type ExternalButton = {
102
121
  imgExtension?: string;
103
122
  chainNamespaces?: ChainNamespaceType[];
104
123
  };
124
+ export type os = "iOS" | "Android";
125
+ export type platform = "mobile" | "desktop" | "tablet";
126
+ export type browser = "chrome" | "firefox" | "edge" | "safari" | "brave";
127
+ export type mobileOs = "ios" | "android";
128
+ export type rowType = {
129
+ method: string;
130
+ isDark: boolean;
131
+ isPrimaryBtn: boolean;
132
+ name: string;
133
+ connector: SocialLoginsConfig["connector"];
134
+ loginParams: {
135
+ authConnection: AUTH_CONNECTION_TYPE;
136
+ name: string;
137
+ login_hint: string;
138
+ authConnectionId?: string;
139
+ groupedAuthConnectionId?: string;
140
+ extraLoginOptions?: ExtraLoginOptions;
141
+ };
142
+ order: number;
143
+ isMainOption: boolean;
144
+ };
145
+ export type PasswordlessHandlerParams = {
146
+ authConnection: AUTH_CONNECTION_TYPE;
147
+ web3authClientId: string;
148
+ loginHint: string;
149
+ network: string;
150
+ uiConfig?: Omit<UIConfig, "connectorListener">;
151
+ };
152
+ export interface WhiteLabelParams {
153
+ name?: string;
154
+ url?: string;
155
+ language?: keyof typeof LANGUAGES;
156
+ theme?: Record<string, string>;
157
+ logo?: string;
158
+ mode?: THEME_MODE_TYPE;
159
+ }
160
+ export interface CodeInitiateRequestBodyParams {
161
+ client_id: string;
162
+ connection: "email" | "sms";
163
+ login_hint: string;
164
+ web3auth_client_id: string;
165
+ tracking_id?: string;
166
+ whitelabel?: WhiteLabelParams;
167
+ version?: string;
168
+ network?: string;
169
+ flow_type?: EMAIL_FLOW_TYPE;
170
+ captcha_token?: string;
171
+ }
172
+ export interface CodeVerifyRequestBodyParams {
173
+ client_id: string;
174
+ login_hint: string;
175
+ code: string;
176
+ connection: "email" | "sms";
177
+ tracking_id: string;
178
+ version?: string;
179
+ network?: string;
180
+ flow_type?: EMAIL_FLOW_TYPE;
181
+ }
182
+ export type IStartResponse = {
183
+ success?: boolean;
184
+ error?: string;
185
+ data?: {
186
+ trackingId: string;
187
+ };
188
+ };
189
+ export type IVerifyResponse = {
190
+ success?: boolean;
191
+ error?: string;
192
+ data?: {
193
+ id_token: string;
194
+ };
195
+ };
196
+ export type LogoAlignmentType = UIConfig["logoAlignment"];
197
+ export type BorderRadiusType = UIConfig["borderRadiusType"];
198
+ export type ButtonRadiusType = UIConfig["buttonRadiusType"];
199
+ export declare enum TOAST_TYPE {
200
+ SUCCESS = "success",
201
+ ERROR = "error",
202
+ WARNING = "warning",
203
+ INFO = "info"
204
+ }
205
+ export type ToastType = (typeof TOAST_TYPE)[keyof typeof TOAST_TYPE];