@b3dotfun/sdk 0.1.69 → 0.1.70-alpha.2

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 (538) hide show
  1. package/dist/cjs/anyspend/constants/rpc.d.ts +1 -1
  2. package/dist/cjs/anyspend/constants/rpc.js +1 -1
  3. package/dist/cjs/anyspend/react/components/AnySpend.d.ts +2 -0
  4. package/dist/cjs/anyspend/react/components/AnySpend.js +12 -4
  5. package/dist/cjs/anyspend/react/components/AnySpendBondKit.d.ts +1 -1
  6. package/dist/cjs/anyspend/react/components/AnySpendBondKit.js +2 -2
  7. package/dist/cjs/anyspend/react/components/AnySpendBuySpin.d.ts +2 -1
  8. package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +2 -2
  9. package/dist/cjs/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +5 -1
  10. package/dist/cjs/anyspend/react/components/AnySpendCollectorClubPurchase.js +2 -2
  11. package/dist/cjs/anyspend/react/components/AnySpendCustom.d.ts +2 -0
  12. package/dist/cjs/anyspend/react/components/AnySpendCustom.js +7 -3
  13. package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.d.ts +2 -0
  14. package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.js +21 -14
  15. package/dist/cjs/anyspend/react/components/AnySpendDeposit.d.ts +3 -1
  16. package/dist/cjs/anyspend/react/components/AnySpendDeposit.js +12 -6
  17. package/dist/cjs/anyspend/react/components/AnySpendDepositUpside.d.ts +2 -1
  18. package/dist/cjs/anyspend/react/components/AnySpendDepositUpside.js +2 -2
  19. package/dist/cjs/anyspend/react/components/AnySpendNFT.d.ts +3 -1
  20. package/dist/cjs/anyspend/react/components/AnySpendNFT.js +4 -4
  21. package/dist/cjs/anyspend/react/components/AnySpendStakeB3.d.ts +2 -1
  22. package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +3 -3
  23. package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +2 -1
  24. package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.js +3 -3
  25. package/dist/cjs/anyspend/react/components/AnySpendStakeUpside.d.ts +3 -1
  26. package/dist/cjs/anyspend/react/components/AnySpendStakeUpside.js +2 -2
  27. package/dist/cjs/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +2 -1
  28. package/dist/cjs/anyspend/react/components/AnySpendStakeUpsideExactIn.js +2 -2
  29. package/dist/cjs/anyspend/react/components/AnySpendWorkflowTrigger.d.ts +3 -1
  30. package/dist/cjs/anyspend/react/components/AnySpendWorkflowTrigger.js +2 -2
  31. package/dist/cjs/anyspend/react/components/AnyspendDepositHype.d.ts +2 -1
  32. package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +2 -2
  33. package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.d.ts +2 -1
  34. package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.js +2 -2
  35. package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckout.d.ts +5 -1
  36. package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckout.js +15 -6
  37. package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckoutTrigger.d.ts +3 -1
  38. package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckoutTrigger.js +2 -2
  39. package/dist/cjs/anyspend/react/components/checkout/CartItemRow.d.ts +2 -1
  40. package/dist/cjs/anyspend/react/components/checkout/CartSummary.d.ts +6 -4
  41. package/dist/cjs/anyspend/react/components/checkout/CartSummary.js +13 -11
  42. package/dist/cjs/anyspend/react/components/checkout/CheckoutCartPanel.d.ts +3 -1
  43. package/dist/cjs/anyspend/react/components/checkout/CheckoutCartPanel.js +5 -4
  44. package/dist/cjs/anyspend/react/components/checkout/CheckoutFormPanel.d.ts +3 -1
  45. package/dist/cjs/anyspend/react/components/checkout/CheckoutFormPanel.js +2 -2
  46. package/dist/cjs/anyspend/react/components/checkout/CheckoutPaymentPanel.d.ts +3 -1
  47. package/dist/cjs/anyspend/react/components/checkout/CheckoutPaymentPanel.js +15 -7
  48. package/dist/cjs/anyspend/react/components/checkout/CheckoutSuccess.d.ts +2 -1
  49. package/dist/cjs/anyspend/react/components/checkout/CheckoutSuccess.js +5 -3
  50. package/dist/cjs/anyspend/react/components/checkout/CryptoPayPanel.js +43 -23
  51. package/dist/cjs/anyspend/react/components/checkout/DiscountCodeInput.d.ts +3 -1
  52. package/dist/cjs/anyspend/react/components/checkout/DiscountCodeInput.js +3 -6
  53. package/dist/cjs/anyspend/react/components/checkout/FiatCheckoutPanel.js +1 -2
  54. package/dist/cjs/anyspend/react/components/checkout/KycGate.js +1 -2
  55. package/dist/cjs/anyspend/react/components/checkout/PriceSkeleton.d.ts +5 -0
  56. package/dist/cjs/anyspend/react/components/checkout/PriceSkeleton.js +9 -0
  57. package/dist/cjs/anyspend/react/components/checkout/ShippingSelector.d.ts +3 -1
  58. package/dist/cjs/anyspend/react/components/checkout/ShippingSelector.js +3 -2
  59. package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.d.ts +8 -0
  60. package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.js +10 -9
  61. package/dist/cjs/anyspend/react/components/common/InsufficientDepositPayment.js +2 -2
  62. package/dist/cjs/anyspend/react/components/common/OrderDetails.js +7 -2
  63. package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.js +2 -2
  64. package/dist/cjs/anyspend/react/components/common/OrderStatus.js +37 -6
  65. package/dist/cjs/anyspend/react/components/common/StepProgress.d.ts +2 -0
  66. package/dist/cjs/anyspend/react/components/common/StepProgress.js +7 -2
  67. package/dist/cjs/anyspend/react/components/common/TransferCryptoDetails.js +2 -2
  68. package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +4 -6
  69. package/dist/cjs/anyspend/react/hooks/useKycStatus.d.ts +3 -1
  70. package/dist/cjs/anyspend/react/hooks/useKycStatus.js +11 -7
  71. package/dist/cjs/anyspend/utils/chain.js +8 -7
  72. package/dist/cjs/app.shared.js +9 -7
  73. package/dist/cjs/global-account/better-auth-client.d.ts +1883 -0
  74. package/dist/cjs/global-account/better-auth-client.js +17 -0
  75. package/dist/cjs/global-account/bsmnt.d.ts +0 -1
  76. package/dist/cjs/global-account/bsmnt.js +0 -6
  77. package/dist/cjs/global-account/react/components/AvatarEditor/AvatarEditor.js +3 -1
  78. package/dist/cjs/global-account/react/components/B3DynamicModal.js +5 -2
  79. package/dist/cjs/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +3 -1
  80. package/dist/cjs/global-account/react/components/B3Provider/AuthenticationProvider.js +2 -1
  81. package/dist/cjs/global-account/react/components/B3Provider/B3ConfigProvider.d.ts +4 -1
  82. package/dist/cjs/global-account/react/components/B3Provider/B3ConfigProvider.js +2 -1
  83. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +11 -2
  84. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +10 -13
  85. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.js +6 -8
  86. package/dist/cjs/global-account/react/components/B3Provider/BetterAuthProvider.d.ts +16 -0
  87. package/dist/cjs/global-account/react/components/B3Provider/BetterAuthProvider.js +120 -0
  88. package/dist/cjs/global-account/react/components/B3Provider/LocalSDKProvider.d.ts +3 -1
  89. package/dist/cjs/global-account/react/components/B3Provider/LocalSDKProvider.js +3 -1
  90. package/dist/cjs/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.d.ts +3 -1
  91. package/dist/cjs/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.js +4 -2
  92. package/dist/cjs/global-account/react/components/LinkAccount/LinkedAccountItem.js +2 -1
  93. package/dist/cjs/global-account/react/components/ManageAccount/BottomNavigation.js +4 -2
  94. package/dist/cjs/global-account/react/components/ManageAccount/Header.js +36 -4
  95. package/dist/cjs/global-account/react/components/ManageAccount/HomeContent.js +4 -1
  96. package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.js +6 -0
  97. package/dist/cjs/global-account/react/components/ManageAccount/ProfileSection.js +17 -6
  98. package/dist/cjs/global-account/react/components/ManageAccount/SessionDurationContent.d.ts +5 -0
  99. package/dist/cjs/global-account/react/components/ManageAccount/SessionDurationContent.js +57 -0
  100. package/dist/cjs/global-account/react/components/ManageAccount/SettingsContent.js +14 -29
  101. package/dist/cjs/global-account/react/components/ManageAccount/SettingsProfileCard.js +27 -16
  102. package/dist/cjs/global-account/react/components/Send/Send.js +5 -2
  103. package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthResetPassword.d.ts +21 -0
  104. package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthResetPassword.js +68 -0
  105. package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthSignIn.d.ts +39 -0
  106. package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthSignIn.js +173 -0
  107. package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthVerifyEmail.d.ts +37 -0
  108. package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthVerifyEmail.js +85 -0
  109. package/dist/cjs/global-account/react/components/SignInWithB3/SignIn.js +14 -4
  110. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
  111. package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +14 -5
  112. package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.js +10 -1
  113. package/dist/cjs/global-account/react/components/SignInWithB3/components/PasswordInput.d.ts +10 -0
  114. package/dist/cjs/global-account/react/components/SignInWithB3/components/PasswordInput.js +10 -0
  115. package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.d.ts +8 -0
  116. package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.js +141 -0
  117. package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +96 -15
  118. package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +5 -3
  119. package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.js +20 -3
  120. package/dist/cjs/global-account/react/components/SingleUserSearchSelector/SingleUserSearchSelector.js +2 -1
  121. package/dist/cjs/global-account/react/components/Toast/ToastContext.d.ts +3 -0
  122. package/dist/cjs/global-account/react/components/Toast/ToastContext.js +30 -7
  123. package/dist/cjs/global-account/react/components/UserAvatar/UserAvatar.d.ts +18 -0
  124. package/dist/cjs/global-account/react/components/UserAvatar/UserAvatar.js +27 -0
  125. package/dist/cjs/global-account/react/components/custom/Button.d.ts +1 -1
  126. package/dist/cjs/global-account/react/components/index.d.ts +5 -0
  127. package/dist/cjs/global-account/react/components/index.js +12 -3
  128. package/dist/cjs/global-account/react/components/ui/button.d.ts +1 -1
  129. package/dist/cjs/global-account/react/hooks/index.d.ts +1 -0
  130. package/dist/cjs/global-account/react/hooks/index.js +5 -2
  131. package/dist/cjs/global-account/react/hooks/useAuth.js +26 -15
  132. package/dist/cjs/global-account/react/hooks/useAuthentication.js +23 -12
  133. package/dist/cjs/global-account/react/hooks/useAutoSelectWallet.d.ts +6 -3
  134. package/dist/cjs/global-account/react/hooks/useAutoSelectWallet.js +31 -3
  135. package/dist/cjs/global-account/react/hooks/useBetterAuth.d.ts +973 -0
  136. package/dist/cjs/global-account/react/hooks/useBetterAuth.js +158 -0
  137. package/dist/cjs/global-account/react/hooks/useConnect.d.ts +2 -2
  138. package/dist/cjs/global-account/react/hooks/useFirstEOA.d.ts +8 -8
  139. package/dist/cjs/global-account/react/hooks/useTWAuth.js +0 -1
  140. package/dist/cjs/global-account/react/stores/useModalStore.d.ts +42 -1
  141. package/dist/cjs/global-account/react/utils/createWagmiConfig.d.ts +4 -31
  142. package/dist/cjs/global-account/react/utils/createWagmiConfig.js +5 -24
  143. package/dist/cjs/global-account/react/utils/index.d.ts +0 -1
  144. package/dist/cjs/global-account/react/utils/index.js +0 -1
  145. package/dist/cjs/global-account/react/utils/profileDisplay.js +17 -18
  146. package/dist/cjs/shared/constants/chains/b3Chain.d.ts +7 -7
  147. package/dist/cjs/shared/constants/chains/b3Chain.js +4 -4
  148. package/dist/cjs/shared/constants/chains/b3Viem.d.ts +6 -0
  149. package/dist/cjs/shared/constants/chains/b3Viem.js +19 -0
  150. package/dist/cjs/shared/constants/chains/supported.d.ts +1 -1
  151. package/dist/cjs/shared/constants/index.d.ts +1 -0
  152. package/dist/cjs/shared/constants/index.js +2 -1
  153. package/dist/cjs/shared/generated/chain-networks.json +2 -2
  154. package/dist/cjs/shared/utils/chains.d.ts +1 -1
  155. package/dist/cjs/shared/utils/chains.js +2 -2
  156. package/dist/cjs/shared/utils/session-duration.d.ts +15 -0
  157. package/dist/cjs/shared/utils/session-duration.js +69 -0
  158. package/dist/cjs/wallet/react/components/ConnectWallet.d.ts +11 -0
  159. package/dist/cjs/wallet/react/components/ConnectWallet.js +467 -0
  160. package/dist/cjs/wallet/react/components/WalletProvider.d.ts +35 -0
  161. package/dist/cjs/wallet/react/components/WalletProvider.js +20 -0
  162. package/dist/cjs/wallet/react/hooks/useWalletDisconnect.d.ts +13 -0
  163. package/dist/cjs/wallet/react/hooks/useWalletDisconnect.js +22 -0
  164. package/dist/cjs/wallet/react/hooks/useWalletState.d.ts +31 -0
  165. package/dist/cjs/wallet/react/hooks/useWalletState.js +63 -0
  166. package/dist/cjs/wallet/react/index.d.ts +5 -0
  167. package/dist/cjs/wallet/react/index.js +16 -0
  168. package/dist/cjs/wallet/utils/createWalletConfig.d.ts +21 -0
  169. package/dist/cjs/wallet/utils/createWalletConfig.js +24 -0
  170. package/dist/esm/anyspend/constants/rpc.d.ts +1 -1
  171. package/dist/esm/anyspend/constants/rpc.js +1 -1
  172. package/dist/esm/anyspend/react/components/AnySpend.d.ts +2 -0
  173. package/dist/esm/anyspend/react/components/AnySpend.js +12 -4
  174. package/dist/esm/anyspend/react/components/AnySpendBondKit.d.ts +1 -1
  175. package/dist/esm/anyspend/react/components/AnySpendBondKit.js +2 -2
  176. package/dist/esm/anyspend/react/components/AnySpendBuySpin.d.ts +2 -1
  177. package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +2 -2
  178. package/dist/esm/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +5 -1
  179. package/dist/esm/anyspend/react/components/AnySpendCollectorClubPurchase.js +2 -2
  180. package/dist/esm/anyspend/react/components/AnySpendCustom.d.ts +2 -0
  181. package/dist/esm/anyspend/react/components/AnySpendCustom.js +7 -3
  182. package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.d.ts +2 -0
  183. package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +21 -14
  184. package/dist/esm/anyspend/react/components/AnySpendDeposit.d.ts +3 -1
  185. package/dist/esm/anyspend/react/components/AnySpendDeposit.js +13 -7
  186. package/dist/esm/anyspend/react/components/AnySpendDepositUpside.d.ts +2 -1
  187. package/dist/esm/anyspend/react/components/AnySpendDepositUpside.js +2 -2
  188. package/dist/esm/anyspend/react/components/AnySpendNFT.d.ts +3 -1
  189. package/dist/esm/anyspend/react/components/AnySpendNFT.js +4 -4
  190. package/dist/esm/anyspend/react/components/AnySpendStakeB3.d.ts +2 -1
  191. package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +4 -4
  192. package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +2 -1
  193. package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.js +4 -4
  194. package/dist/esm/anyspend/react/components/AnySpendStakeUpside.d.ts +3 -1
  195. package/dist/esm/anyspend/react/components/AnySpendStakeUpside.js +2 -2
  196. package/dist/esm/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +2 -1
  197. package/dist/esm/anyspend/react/components/AnySpendStakeUpsideExactIn.js +2 -2
  198. package/dist/esm/anyspend/react/components/AnySpendWorkflowTrigger.d.ts +3 -1
  199. package/dist/esm/anyspend/react/components/AnySpendWorkflowTrigger.js +2 -2
  200. package/dist/esm/anyspend/react/components/AnyspendDepositHype.d.ts +2 -1
  201. package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +2 -2
  202. package/dist/esm/anyspend/react/components/AnyspendSignatureMint.d.ts +2 -1
  203. package/dist/esm/anyspend/react/components/AnyspendSignatureMint.js +2 -2
  204. package/dist/esm/anyspend/react/components/checkout/AnySpendCheckout.d.ts +5 -1
  205. package/dist/esm/anyspend/react/components/checkout/AnySpendCheckout.js +15 -6
  206. package/dist/esm/anyspend/react/components/checkout/AnySpendCheckoutTrigger.d.ts +3 -1
  207. package/dist/esm/anyspend/react/components/checkout/AnySpendCheckoutTrigger.js +2 -2
  208. package/dist/esm/anyspend/react/components/checkout/CartItemRow.d.ts +2 -1
  209. package/dist/esm/anyspend/react/components/checkout/CartSummary.d.ts +6 -4
  210. package/dist/esm/anyspend/react/components/checkout/CartSummary.js +13 -11
  211. package/dist/esm/anyspend/react/components/checkout/CheckoutCartPanel.d.ts +3 -1
  212. package/dist/esm/anyspend/react/components/checkout/CheckoutCartPanel.js +5 -4
  213. package/dist/esm/anyspend/react/components/checkout/CheckoutFormPanel.d.ts +3 -1
  214. package/dist/esm/anyspend/react/components/checkout/CheckoutFormPanel.js +2 -2
  215. package/dist/esm/anyspend/react/components/checkout/CheckoutPaymentPanel.d.ts +3 -1
  216. package/dist/esm/anyspend/react/components/checkout/CheckoutPaymentPanel.js +16 -8
  217. package/dist/esm/anyspend/react/components/checkout/CheckoutSuccess.d.ts +2 -1
  218. package/dist/esm/anyspend/react/components/checkout/CheckoutSuccess.js +5 -3
  219. package/dist/esm/anyspend/react/components/checkout/CryptoPayPanel.js +44 -24
  220. package/dist/esm/anyspend/react/components/checkout/DiscountCodeInput.d.ts +3 -1
  221. package/dist/esm/anyspend/react/components/checkout/DiscountCodeInput.js +3 -6
  222. package/dist/esm/anyspend/react/components/checkout/FiatCheckoutPanel.js +2 -3
  223. package/dist/esm/anyspend/react/components/checkout/KycGate.js +2 -3
  224. package/dist/esm/anyspend/react/components/checkout/PriceSkeleton.d.ts +5 -0
  225. package/dist/esm/anyspend/react/components/checkout/PriceSkeleton.js +6 -0
  226. package/dist/esm/anyspend/react/components/checkout/ShippingSelector.d.ts +3 -1
  227. package/dist/esm/anyspend/react/components/checkout/ShippingSelector.js +3 -2
  228. package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.d.ts +8 -0
  229. package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.js +9 -8
  230. package/dist/esm/anyspend/react/components/common/InsufficientDepositPayment.js +2 -2
  231. package/dist/esm/anyspend/react/components/common/OrderDetails.js +8 -3
  232. package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.js +2 -2
  233. package/dist/esm/anyspend/react/components/common/OrderStatus.js +34 -3
  234. package/dist/esm/anyspend/react/components/common/StepProgress.d.ts +2 -0
  235. package/dist/esm/anyspend/react/components/common/StepProgress.js +4 -2
  236. package/dist/esm/anyspend/react/components/common/TransferCryptoDetails.js +2 -2
  237. package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +5 -7
  238. package/dist/esm/anyspend/react/hooks/useKycStatus.d.ts +3 -1
  239. package/dist/esm/anyspend/react/hooks/useKycStatus.js +9 -5
  240. package/dist/esm/anyspend/utils/chain.js +10 -9
  241. package/dist/esm/app.shared.js +9 -7
  242. package/dist/esm/global-account/better-auth-client.d.ts +1883 -0
  243. package/dist/esm/global-account/better-auth-client.js +13 -0
  244. package/dist/esm/global-account/bsmnt.d.ts +0 -1
  245. package/dist/esm/global-account/bsmnt.js +0 -5
  246. package/dist/esm/global-account/react/components/AvatarEditor/AvatarEditor.js +3 -1
  247. package/dist/esm/global-account/react/components/B3DynamicModal.js +5 -2
  248. package/dist/esm/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +3 -1
  249. package/dist/esm/global-account/react/components/B3Provider/AuthenticationProvider.js +2 -1
  250. package/dist/esm/global-account/react/components/B3Provider/B3ConfigProvider.d.ts +4 -1
  251. package/dist/esm/global-account/react/components/B3Provider/B3ConfigProvider.js +2 -1
  252. package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +11 -2
  253. package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +5 -8
  254. package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.js +4 -6
  255. package/dist/esm/global-account/react/components/B3Provider/BetterAuthProvider.d.ts +16 -0
  256. package/dist/esm/global-account/react/components/B3Provider/BetterAuthProvider.js +115 -0
  257. package/dist/esm/global-account/react/components/B3Provider/LocalSDKProvider.d.ts +3 -1
  258. package/dist/esm/global-account/react/components/B3Provider/LocalSDKProvider.js +3 -1
  259. package/dist/esm/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.d.ts +3 -1
  260. package/dist/esm/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.js +4 -2
  261. package/dist/esm/global-account/react/components/LinkAccount/LinkedAccountItem.js +2 -1
  262. package/dist/esm/global-account/react/components/ManageAccount/BottomNavigation.js +5 -3
  263. package/dist/esm/global-account/react/components/ManageAccount/Header.js +37 -5
  264. package/dist/esm/global-account/react/components/ManageAccount/HomeContent.js +4 -1
  265. package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.js +7 -1
  266. package/dist/esm/global-account/react/components/ManageAccount/ProfileSection.js +16 -8
  267. package/dist/esm/global-account/react/components/ManageAccount/SessionDurationContent.d.ts +5 -0
  268. package/dist/esm/global-account/react/components/ManageAccount/SessionDurationContent.js +52 -0
  269. package/dist/esm/global-account/react/components/ManageAccount/SettingsContent.js +16 -31
  270. package/dist/esm/global-account/react/components/ManageAccount/SettingsProfileCard.js +27 -16
  271. package/dist/esm/global-account/react/components/Send/Send.js +5 -2
  272. package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthResetPassword.d.ts +21 -0
  273. package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthResetPassword.js +65 -0
  274. package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthSignIn.d.ts +39 -0
  275. package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthSignIn.js +170 -0
  276. package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthVerifyEmail.d.ts +37 -0
  277. package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthVerifyEmail.js +82 -0
  278. package/dist/esm/global-account/react/components/SignInWithB3/SignIn.js +15 -5
  279. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
  280. package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +14 -5
  281. package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.js +11 -2
  282. package/dist/esm/global-account/react/components/SignInWithB3/components/PasswordInput.d.ts +10 -0
  283. package/dist/esm/global-account/react/components/SignInWithB3/components/PasswordInput.js +7 -0
  284. package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.d.ts +8 -0
  285. package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.js +138 -0
  286. package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +100 -19
  287. package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +5 -3
  288. package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.js +19 -2
  289. package/dist/esm/global-account/react/components/SingleUserSearchSelector/SingleUserSearchSelector.js +2 -1
  290. package/dist/esm/global-account/react/components/Toast/ToastContext.d.ts +3 -0
  291. package/dist/esm/global-account/react/components/Toast/ToastContext.js +30 -7
  292. package/dist/esm/global-account/react/components/UserAvatar/UserAvatar.d.ts +18 -0
  293. package/dist/esm/global-account/react/components/UserAvatar/UserAvatar.js +21 -0
  294. package/dist/esm/global-account/react/components/custom/Button.d.ts +1 -1
  295. package/dist/esm/global-account/react/components/index.d.ts +5 -0
  296. package/dist/esm/global-account/react/components/index.js +5 -0
  297. package/dist/esm/global-account/react/components/ui/button.d.ts +1 -1
  298. package/dist/esm/global-account/react/hooks/index.d.ts +1 -0
  299. package/dist/esm/global-account/react/hooks/index.js +1 -0
  300. package/dist/esm/global-account/react/hooks/useAuth.js +28 -17
  301. package/dist/esm/global-account/react/hooks/useAuthentication.js +24 -13
  302. package/dist/esm/global-account/react/hooks/useAutoSelectWallet.d.ts +6 -3
  303. package/dist/esm/global-account/react/hooks/useAutoSelectWallet.js +33 -5
  304. package/dist/esm/global-account/react/hooks/useBetterAuth.d.ts +973 -0
  305. package/dist/esm/global-account/react/hooks/useBetterAuth.js +150 -0
  306. package/dist/esm/global-account/react/hooks/useConnect.d.ts +2 -2
  307. package/dist/esm/global-account/react/hooks/useFirstEOA.d.ts +8 -8
  308. package/dist/esm/global-account/react/hooks/useTWAuth.js +0 -1
  309. package/dist/esm/global-account/react/stores/useModalStore.d.ts +42 -1
  310. package/dist/esm/global-account/react/utils/createWagmiConfig.d.ts +4 -31
  311. package/dist/esm/global-account/react/utils/createWagmiConfig.js +5 -23
  312. package/dist/esm/global-account/react/utils/index.d.ts +0 -1
  313. package/dist/esm/global-account/react/utils/index.js +0 -1
  314. package/dist/esm/global-account/react/utils/profileDisplay.js +17 -18
  315. package/dist/esm/shared/constants/chains/b3Chain.d.ts +7 -7
  316. package/dist/esm/shared/constants/chains/b3Chain.js +4 -4
  317. package/dist/esm/shared/constants/chains/b3Viem.d.ts +6 -0
  318. package/dist/esm/shared/constants/chains/b3Viem.js +16 -0
  319. package/dist/esm/shared/constants/chains/supported.d.ts +1 -1
  320. package/dist/esm/shared/constants/index.d.ts +1 -0
  321. package/dist/esm/shared/constants/index.js +1 -0
  322. package/dist/esm/shared/generated/chain-networks.json +2 -2
  323. package/dist/esm/shared/utils/chains.d.ts +1 -1
  324. package/dist/esm/shared/utils/chains.js +2 -2
  325. package/dist/esm/shared/utils/session-duration.d.ts +15 -0
  326. package/dist/esm/shared/utils/session-duration.js +64 -0
  327. package/dist/esm/wallet/react/components/ConnectWallet.d.ts +11 -0
  328. package/dist/esm/wallet/react/components/ConnectWallet.js +431 -0
  329. package/dist/esm/wallet/react/components/WalletProvider.d.ts +35 -0
  330. package/dist/esm/wallet/react/components/WalletProvider.js +17 -0
  331. package/dist/esm/wallet/react/hooks/useWalletDisconnect.d.ts +13 -0
  332. package/dist/esm/wallet/react/hooks/useWalletDisconnect.js +19 -0
  333. package/dist/esm/wallet/react/hooks/useWalletState.d.ts +31 -0
  334. package/dist/esm/wallet/react/hooks/useWalletState.js +60 -0
  335. package/dist/esm/wallet/react/index.d.ts +5 -0
  336. package/dist/esm/wallet/react/index.js +8 -0
  337. package/dist/esm/wallet/utils/createWalletConfig.d.ts +21 -0
  338. package/dist/esm/wallet/utils/createWalletConfig.js +21 -0
  339. package/dist/styles/index.css +1 -1
  340. package/dist/types/anyspend/constants/rpc.d.ts +1 -1
  341. package/dist/types/anyspend/react/components/AnySpend.d.ts +2 -0
  342. package/dist/types/anyspend/react/components/AnySpendBondKit.d.ts +1 -1
  343. package/dist/types/anyspend/react/components/AnySpendBuySpin.d.ts +2 -1
  344. package/dist/types/anyspend/react/components/AnySpendCollectorClubPurchase.d.ts +5 -1
  345. package/dist/types/anyspend/react/components/AnySpendCustom.d.ts +2 -0
  346. package/dist/types/anyspend/react/components/AnySpendCustomExactIn.d.ts +2 -0
  347. package/dist/types/anyspend/react/components/AnySpendDeposit.d.ts +3 -1
  348. package/dist/types/anyspend/react/components/AnySpendDepositUpside.d.ts +2 -1
  349. package/dist/types/anyspend/react/components/AnySpendNFT.d.ts +3 -1
  350. package/dist/types/anyspend/react/components/AnySpendStakeB3.d.ts +2 -1
  351. package/dist/types/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +2 -1
  352. package/dist/types/anyspend/react/components/AnySpendStakeUpside.d.ts +3 -1
  353. package/dist/types/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +2 -1
  354. package/dist/types/anyspend/react/components/AnySpendWorkflowTrigger.d.ts +3 -1
  355. package/dist/types/anyspend/react/components/AnyspendDepositHype.d.ts +2 -1
  356. package/dist/types/anyspend/react/components/AnyspendSignatureMint.d.ts +2 -1
  357. package/dist/types/anyspend/react/components/checkout/AnySpendCheckout.d.ts +5 -1
  358. package/dist/types/anyspend/react/components/checkout/AnySpendCheckoutTrigger.d.ts +3 -1
  359. package/dist/types/anyspend/react/components/checkout/CartItemRow.d.ts +2 -1
  360. package/dist/types/anyspend/react/components/checkout/CartSummary.d.ts +6 -4
  361. package/dist/types/anyspend/react/components/checkout/CheckoutCartPanel.d.ts +3 -1
  362. package/dist/types/anyspend/react/components/checkout/CheckoutFormPanel.d.ts +3 -1
  363. package/dist/types/anyspend/react/components/checkout/CheckoutPaymentPanel.d.ts +3 -1
  364. package/dist/types/anyspend/react/components/checkout/CheckoutSuccess.d.ts +2 -1
  365. package/dist/types/anyspend/react/components/checkout/DiscountCodeInput.d.ts +3 -1
  366. package/dist/types/anyspend/react/components/checkout/PriceSkeleton.d.ts +5 -0
  367. package/dist/types/anyspend/react/components/checkout/ShippingSelector.d.ts +3 -1
  368. package/dist/types/anyspend/react/components/common/CryptoPaymentMethod.d.ts +8 -0
  369. package/dist/types/anyspend/react/components/common/StepProgress.d.ts +2 -0
  370. package/dist/types/anyspend/react/hooks/useKycStatus.d.ts +3 -1
  371. package/dist/types/global-account/better-auth-client.d.ts +1883 -0
  372. package/dist/types/global-account/bsmnt.d.ts +0 -1
  373. package/dist/types/global-account/react/components/B3Provider/AuthenticationProvider.d.ts +3 -1
  374. package/dist/types/global-account/react/components/B3Provider/B3ConfigProvider.d.ts +4 -1
  375. package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +11 -2
  376. package/dist/types/global-account/react/components/B3Provider/BetterAuthProvider.d.ts +16 -0
  377. package/dist/types/global-account/react/components/B3Provider/LocalSDKProvider.d.ts +3 -1
  378. package/dist/types/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.d.ts +3 -1
  379. package/dist/types/global-account/react/components/ManageAccount/SessionDurationContent.d.ts +5 -0
  380. package/dist/types/global-account/react/components/SignInWithB3/BetterAuthResetPassword.d.ts +21 -0
  381. package/dist/types/global-account/react/components/SignInWithB3/BetterAuthSignIn.d.ts +39 -0
  382. package/dist/types/global-account/react/components/SignInWithB3/BetterAuthVerifyEmail.d.ts +37 -0
  383. package/dist/types/global-account/react/components/SignInWithB3/SignInWithB3Flow.d.ts +1 -1
  384. package/dist/types/global-account/react/components/SignInWithB3/components/PasswordInput.d.ts +10 -0
  385. package/dist/types/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.d.ts +8 -0
  386. package/dist/types/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +5 -3
  387. package/dist/types/global-account/react/components/Toast/ToastContext.d.ts +3 -0
  388. package/dist/types/global-account/react/components/UserAvatar/UserAvatar.d.ts +18 -0
  389. package/dist/types/global-account/react/components/custom/Button.d.ts +1 -1
  390. package/dist/types/global-account/react/components/index.d.ts +5 -0
  391. package/dist/types/global-account/react/components/ui/button.d.ts +1 -1
  392. package/dist/types/global-account/react/hooks/index.d.ts +1 -0
  393. package/dist/types/global-account/react/hooks/useAutoSelectWallet.d.ts +6 -3
  394. package/dist/types/global-account/react/hooks/useBetterAuth.d.ts +973 -0
  395. package/dist/types/global-account/react/hooks/useConnect.d.ts +2 -2
  396. package/dist/types/global-account/react/hooks/useFirstEOA.d.ts +8 -8
  397. package/dist/types/global-account/react/stores/useModalStore.d.ts +42 -1
  398. package/dist/types/global-account/react/utils/createWagmiConfig.d.ts +4 -31
  399. package/dist/types/global-account/react/utils/index.d.ts +0 -1
  400. package/dist/types/shared/constants/chains/b3Chain.d.ts +7 -7
  401. package/dist/types/shared/constants/chains/b3Viem.d.ts +6 -0
  402. package/dist/types/shared/constants/chains/supported.d.ts +1 -1
  403. package/dist/types/shared/constants/index.d.ts +1 -0
  404. package/dist/types/shared/utils/chains.d.ts +1 -1
  405. package/dist/types/shared/utils/session-duration.d.ts +15 -0
  406. package/dist/types/wallet/react/components/ConnectWallet.d.ts +11 -0
  407. package/dist/types/wallet/react/components/WalletProvider.d.ts +35 -0
  408. package/dist/types/wallet/react/hooks/useWalletDisconnect.d.ts +13 -0
  409. package/dist/types/wallet/react/hooks/useWalletState.d.ts +31 -0
  410. package/dist/types/wallet/react/index.d.ts +5 -0
  411. package/dist/types/wallet/utils/createWalletConfig.d.ts +21 -0
  412. package/package.json +15 -6
  413. package/src/anyspend/constants/rpc.ts +2 -1
  414. package/src/anyspend/react/components/AnySpend.tsx +24 -12
  415. package/src/anyspend/react/components/AnySpendBondKit.tsx +2 -0
  416. package/src/anyspend/react/components/AnySpendBuySpin.tsx +3 -0
  417. package/src/anyspend/react/components/AnySpendCollectorClubPurchase.tsx +6 -0
  418. package/src/anyspend/react/components/AnySpendCustom.tsx +12 -2
  419. package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +29 -14
  420. package/src/anyspend/react/components/AnySpendDeposit.tsx +51 -34
  421. package/src/anyspend/react/components/AnySpendDepositUpside.tsx +3 -0
  422. package/src/anyspend/react/components/AnySpendNFT.tsx +6 -2
  423. package/src/anyspend/react/components/AnySpendStakeB3.tsx +5 -2
  424. package/src/anyspend/react/components/AnySpendStakeB3ExactIn.tsx +5 -2
  425. package/src/anyspend/react/components/AnySpendStakeUpside.tsx +4 -0
  426. package/src/anyspend/react/components/AnySpendStakeUpsideExactIn.tsx +3 -0
  427. package/src/anyspend/react/components/AnySpendWorkflowTrigger.tsx +4 -0
  428. package/src/anyspend/react/components/AnyspendDepositHype.tsx +3 -0
  429. package/src/anyspend/react/components/AnyspendSignatureMint.tsx +3 -0
  430. package/src/anyspend/react/components/checkout/AnySpendCheckout.tsx +29 -5
  431. package/src/anyspend/react/components/checkout/AnySpendCheckoutTrigger.tsx +4 -0
  432. package/src/anyspend/react/components/checkout/CartItemRow.tsx +2 -1
  433. package/src/anyspend/react/components/checkout/CartSummary.tsx +24 -20
  434. package/src/anyspend/react/components/checkout/CheckoutCartPanel.tsx +12 -3
  435. package/src/anyspend/react/components/checkout/CheckoutFormPanel.tsx +5 -0
  436. package/src/anyspend/react/components/checkout/CheckoutPaymentPanel.tsx +99 -83
  437. package/src/anyspend/react/components/checkout/CheckoutSuccess.tsx +13 -3
  438. package/src/anyspend/react/components/checkout/CryptoPayPanel.tsx +45 -27
  439. package/src/anyspend/react/components/checkout/DiscountCodeInput.tsx +15 -5
  440. package/src/anyspend/react/components/checkout/FiatCheckoutPanel.tsx +9 -3
  441. package/src/anyspend/react/components/checkout/KycGate.tsx +8 -3
  442. package/src/anyspend/react/components/checkout/PriceSkeleton.tsx +19 -0
  443. package/src/anyspend/react/components/checkout/ShippingSelector.tsx +5 -1
  444. package/src/anyspend/react/components/common/CryptoPaymentMethod.tsx +10 -8
  445. package/src/anyspend/react/components/common/InsufficientDepositPayment.tsx +2 -2
  446. package/src/anyspend/react/components/common/OrderDetails.tsx +10 -2
  447. package/src/anyspend/react/components/common/OrderDetailsCollapsible.tsx +4 -4
  448. package/src/anyspend/react/components/common/OrderStatus.tsx +38 -3
  449. package/src/anyspend/react/components/common/StepProgress.tsx +15 -5
  450. package/src/anyspend/react/components/common/TransferCryptoDetails.tsx +2 -2
  451. package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +5 -7
  452. package/src/anyspend/react/hooks/useKycStatus.ts +8 -5
  453. package/src/anyspend/utils/chain.ts +9 -9
  454. package/src/app.shared.ts +9 -8
  455. package/src/global-account/better-auth-client.ts +17 -0
  456. package/src/global-account/bsmnt.ts +0 -6
  457. package/src/global-account/react/components/AvatarEditor/AvatarEditor.tsx +3 -1
  458. package/src/global-account/react/components/B3DynamicModal.tsx +5 -2
  459. package/src/global-account/react/components/B3Provider/AuthenticationProvider.tsx +4 -0
  460. package/src/global-account/react/components/B3Provider/B3ConfigProvider.tsx +6 -0
  461. package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +16 -21
  462. package/src/global-account/react/components/B3Provider/B3Provider.tsx +56 -37
  463. package/src/global-account/react/components/B3Provider/BetterAuthProvider.tsx +127 -0
  464. package/src/global-account/react/components/B3Provider/LocalSDKProvider.tsx +5 -0
  465. package/src/global-account/react/components/IPFSMediaRenderer/IPFSMediaRenderer.tsx +17 -10
  466. package/src/global-account/react/components/LinkAccount/LinkedAccountItem.tsx +2 -1
  467. package/src/global-account/react/components/ManageAccount/BottomNavigation.tsx +18 -14
  468. package/src/global-account/react/components/ManageAccount/Header.tsx +71 -4
  469. package/src/global-account/react/components/ManageAccount/HomeContent.tsx +25 -19
  470. package/src/global-account/react/components/ManageAccount/ManageAccount.tsx +13 -0
  471. package/src/global-account/react/components/ManageAccount/ProfileSection.tsx +40 -15
  472. package/src/global-account/react/components/ManageAccount/SessionDurationContent.tsx +107 -0
  473. package/src/global-account/react/components/ManageAccount/SettingsContent.tsx +35 -54
  474. package/src/global-account/react/components/ManageAccount/SettingsProfileCard.tsx +31 -22
  475. package/src/global-account/react/components/Send/Send.tsx +8 -5
  476. package/src/global-account/react/components/SignInWithB3/BetterAuthResetPassword.tsx +145 -0
  477. package/src/global-account/react/components/SignInWithB3/BetterAuthSignIn.tsx +446 -0
  478. package/src/global-account/react/components/SignInWithB3/BetterAuthVerifyEmail.tsx +155 -0
  479. package/src/global-account/react/components/SignInWithB3/SignIn.tsx +42 -13
  480. package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +20 -4
  481. package/src/global-account/react/components/SignInWithB3/components/AuthButton.tsx +21 -2
  482. package/src/global-account/react/components/SignInWithB3/components/PasswordInput.tsx +62 -0
  483. package/src/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.tsx +315 -0
  484. package/src/global-account/react/components/SignInWithB3/steps/LoginStepCustom.tsx +207 -54
  485. package/src/global-account/react/components/SignInWithB3/utils/signInUtils.ts +24 -4
  486. package/src/global-account/react/components/SingleUserSearchSelector/SingleUserSearchSelector.tsx +2 -1
  487. package/src/global-account/react/components/Toast/ToastContext.tsx +39 -7
  488. package/src/global-account/react/components/UserAvatar/UserAvatar.tsx +45 -0
  489. package/src/global-account/react/components/index.ts +11 -0
  490. package/src/global-account/react/hooks/index.ts +1 -0
  491. package/src/global-account/react/hooks/useAuth.ts +28 -17
  492. package/src/global-account/react/hooks/useAuthentication.ts +24 -13
  493. package/src/global-account/react/hooks/useAutoSelectWallet.ts +40 -6
  494. package/src/global-account/react/hooks/useBetterAuth.ts +192 -0
  495. package/src/global-account/react/hooks/useConnect.tsx +2 -2
  496. package/src/global-account/react/hooks/useTWAuth.tsx +0 -1
  497. package/src/global-account/react/stores/useModalStore.ts +43 -0
  498. package/src/global-account/react/utils/createWagmiConfig.tsx +6 -25
  499. package/src/global-account/react/utils/index.ts +0 -1
  500. package/src/global-account/react/utils/profileDisplay.ts +21 -19
  501. package/src/shared/constants/chains/b3Chain.ts +5 -5
  502. package/src/shared/constants/chains/b3Viem.ts +18 -0
  503. package/src/shared/constants/index.ts +2 -0
  504. package/src/shared/generated/chain-networks.json +2 -2
  505. package/src/shared/utils/chains.ts +3 -2
  506. package/src/shared/utils/session-duration.ts +64 -0
  507. package/src/types/torph.d.ts +4 -0
  508. package/src/wallet/__tests__/createWalletConfig.test.ts +39 -0
  509. package/src/wallet/react/components/ConnectWallet.tsx +665 -0
  510. package/src/wallet/react/components/WalletProvider.tsx +64 -0
  511. package/src/wallet/react/hooks/useWalletDisconnect.ts +22 -0
  512. package/src/wallet/react/hooks/useWalletState.ts +93 -0
  513. package/src/wallet/react/index.ts +10 -0
  514. package/src/wallet/utils/createWalletConfig.ts +39 -0
  515. package/dist/cjs/global-account/react/components/AvatarCreator/AvatarCreator.d.ts +0 -6
  516. package/dist/cjs/global-account/react/components/AvatarCreator/AvatarCreator.js +0 -54
  517. package/dist/cjs/global-account/react/components/ProfileAvatar.d.ts +0 -0
  518. package/dist/cjs/global-account/react/components/ProfileAvatar.js +0 -127
  519. package/dist/cjs/global-account/react/hooks/useRPMToken.d.ts +0 -7
  520. package/dist/cjs/global-account/react/hooks/useRPMToken.js +0 -11
  521. package/dist/cjs/global-account/react/utils/updateAvatar.d.ts +0 -4
  522. package/dist/cjs/global-account/react/utils/updateAvatar.js +0 -54
  523. package/dist/esm/global-account/react/components/AvatarCreator/AvatarCreator.d.ts +0 -6
  524. package/dist/esm/global-account/react/components/AvatarCreator/AvatarCreator.js +0 -51
  525. package/dist/esm/global-account/react/components/ProfileAvatar.d.ts +0 -0
  526. package/dist/esm/global-account/react/components/ProfileAvatar.js +0 -127
  527. package/dist/esm/global-account/react/hooks/useRPMToken.d.ts +0 -7
  528. package/dist/esm/global-account/react/hooks/useRPMToken.js +0 -8
  529. package/dist/esm/global-account/react/utils/updateAvatar.d.ts +0 -4
  530. package/dist/esm/global-account/react/utils/updateAvatar.js +0 -18
  531. package/dist/types/global-account/react/components/AvatarCreator/AvatarCreator.d.ts +0 -6
  532. package/dist/types/global-account/react/components/ProfileAvatar.d.ts +0 -0
  533. package/dist/types/global-account/react/hooks/useRPMToken.d.ts +0 -7
  534. package/dist/types/global-account/react/utils/updateAvatar.d.ts +0 -4
  535. package/src/global-account/react/components/AvatarCreator/AvatarCreator.tsx +0 -90
  536. package/src/global-account/react/components/ProfileAvatar.tsx +0 -138
  537. package/src/global-account/react/hooks/useRPMToken.ts +0 -17
  538. package/src/global-account/react/utils/updateAvatar.ts +0 -21
@@ -0,0 +1,446 @@
1
+ import { Button, Input, Loading, useAuthStore } from "@b3dotfun/sdk/global-account/react";
2
+ import { debugB3React } from "@b3dotfun/sdk/shared/utils/debug";
3
+ import { useState } from "react";
4
+ import {
5
+ EmailVerificationRequiredError,
6
+ type BetterAuthSocialProvider,
7
+ useBetterAuth,
8
+ } from "../../hooks/useBetterAuth";
9
+ import { PasswordInput } from "./components/PasswordInput";
10
+ import { strategyIcons, strategyLabels } from "./utils/signInUtils";
11
+
12
+ const debug = debugB3React("BetterAuthSignIn");
13
+ const EMAIL_REGEX = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
14
+
15
+ type SocialProviderConfig = { id: BetterAuthSocialProvider; label: string };
16
+
17
+ const DEFAULT_SOCIAL_PROVIDERS: SocialProviderConfig[] = [
18
+ { id: "google", label: "Google" },
19
+ { id: "github", label: "GitHub" },
20
+ { id: "discord", label: "Discord" },
21
+ { id: "microsoft", label: "Microsoft" },
22
+ { id: "slack", label: "Slack" },
23
+ ];
24
+
25
+ export interface BetterAuthSignInProps {
26
+ /** Title displayed above the form. Default: "Welcome back" for sign-in, "Create an account" for sign-up */
27
+ title?: string;
28
+ /** Subtitle displayed below the title */
29
+ subtitle?: string;
30
+ /** Which social providers to show. Defaults to all. Pass empty array to hide. */
31
+ socialProviders?: BetterAuthSocialProvider[];
32
+ /** Show email/password form. Default: true */
33
+ showEmail?: boolean;
34
+ /** URL to redirect to after password reset link is clicked. Token is appended as ?token=... */
35
+ passwordResetRedirectTo?: string;
36
+ /**
37
+ * URL Better Auth redirects to after server-side email verification. Render
38
+ * `BetterAuthVerifyEmail` at this route so the user gets a confirmation page.
39
+ */
40
+ verifyEmailRedirectTo?: string;
41
+ /** Called after successful authentication */
42
+ onSuccess?: () => void;
43
+ /** Called on authentication error */
44
+ onError?: (error: Error) => void;
45
+ /** Optional class name for the root container */
46
+ className?: string;
47
+ }
48
+
49
+ /**
50
+ * Standalone inline sign-in component for Better Auth.
51
+ *
52
+ * Renders directly — no modal, no button wrapper. Designed for full-page
53
+ * sign-in layouts (e.g., B3OS web with branding on the left, form on the right).
54
+ *
55
+ * Usage:
56
+ * ```tsx
57
+ * <BetterAuthSignIn
58
+ * socialProviders={["google", "github"]}
59
+ * onSuccess={() => router.push("/dashboard")}
60
+ * />
61
+ * ```
62
+ */
63
+ export function BetterAuthSignIn({
64
+ title,
65
+ subtitle = "Enter your credentials to access your account",
66
+ socialProviders = DEFAULT_SOCIAL_PROVIDERS.map(p => p.id),
67
+ showEmail = true,
68
+ passwordResetRedirectTo,
69
+ verifyEmailRedirectTo,
70
+ onSuccess,
71
+ onError,
72
+ className,
73
+ }: BetterAuthSignInProps) {
74
+ const { signInWithEmail, signUpWithEmail, signInWithSocial, requestPasswordReset } = useBetterAuth();
75
+ const isAuthenticated = useAuthStore(state => state.isAuthenticated);
76
+ const isAuthenticating = useAuthStore(state => state.isAuthenticating);
77
+ const hasStartedConnecting = useAuthStore(state => state.hasStartedConnecting);
78
+
79
+ const [mode, setMode] = useState<"sign-in" | "sign-up" | "forgot-password">("sign-in");
80
+ const [email, setEmail] = useState("");
81
+ const [password, setPassword] = useState("");
82
+ const [name, setName] = useState("");
83
+ const [isLoading, setIsLoading] = useState(false);
84
+ const [loadingProvider, setLoadingProvider] = useState<string | null>(null);
85
+ const [error, setError] = useState<string | null>(null);
86
+ const [resetEmailSent, setResetEmailSent] = useState(false);
87
+ const [verificationSent, setVerificationSent] = useState(false);
88
+
89
+ const resolvedTitle =
90
+ title ||
91
+ (mode === "forgot-password" ? "Reset password" : mode === "sign-in" ? "Welcome back" : "Create an account");
92
+
93
+ const resolvedSubtitle =
94
+ mode === "forgot-password"
95
+ ? resetEmailSent
96
+ ? "We've sent a password reset link to your email"
97
+ : "Enter your email and we'll send you a reset link"
98
+ : subtitle || "Enter your credentials to access your account";
99
+
100
+ const handleForgotPassword = async () => {
101
+ const normalizedEmail = email.trim().toLowerCase();
102
+
103
+ if (!EMAIL_REGEX.test(normalizedEmail)) {
104
+ setError("Please enter a valid email address");
105
+ return;
106
+ }
107
+
108
+ try {
109
+ setIsLoading(true);
110
+ setError(null);
111
+ await requestPasswordReset(normalizedEmail, passwordResetRedirectTo);
112
+ setResetEmailSent(true);
113
+ } catch (err) {
114
+ const message = err instanceof Error ? err.message : "Failed to send reset email";
115
+ setError(message);
116
+ } finally {
117
+ setIsLoading(false);
118
+ }
119
+ };
120
+
121
+ const providers: SocialProviderConfig[] = socialProviders
122
+ .map(id => DEFAULT_SOCIAL_PROVIDERS.find(p => p.id === id))
123
+ .filter((p): p is SocialProviderConfig => !!p);
124
+
125
+ // Show loading during session restore (before any user interaction) to prevent
126
+ // the login form from flashing briefly after OAuth redirect.
127
+ if (isAuthenticating && !hasStartedConnecting) {
128
+ return (
129
+ <div className={`flex w-full max-w-[400px] items-center justify-center px-6 py-20 ${className || ""}`}>
130
+ <Loading variant="primary" size="lg" />
131
+ </div>
132
+ );
133
+ }
134
+
135
+ if (isAuthenticated) {
136
+ return null;
137
+ }
138
+
139
+ const handleEmailSubmit = async () => {
140
+ const normalizedEmail = email.trim().toLowerCase();
141
+
142
+ if (!EMAIL_REGEX.test(normalizedEmail)) {
143
+ setError("Please enter a valid email address");
144
+ return;
145
+ }
146
+
147
+ if (!password) {
148
+ setError("Please enter a password");
149
+ return;
150
+ }
151
+
152
+ if (mode === "sign-up" && !name.trim()) {
153
+ setError("Please enter your name");
154
+ return;
155
+ }
156
+
157
+ try {
158
+ setIsLoading(true);
159
+ setError(null);
160
+
161
+ if (mode === "sign-up") {
162
+ await signUpWithEmail(normalizedEmail, password, name.trim(), verifyEmailRedirectTo);
163
+ } else {
164
+ await signInWithEmail(normalizedEmail, password);
165
+ }
166
+
167
+ debug("Auth successful");
168
+ onSuccess?.();
169
+ } catch (err) {
170
+ if (err instanceof EmailVerificationRequiredError) {
171
+ setVerificationSent(true);
172
+ setError(null);
173
+ } else {
174
+ const message = err instanceof Error ? err.message : "Authentication failed";
175
+ setError(message);
176
+ onError?.(err as Error);
177
+ }
178
+ debug("Auth failed", err);
179
+ } finally {
180
+ setPassword("");
181
+ setIsLoading(false);
182
+ }
183
+ };
184
+
185
+ const handleSocialSignIn = async (provider: BetterAuthSocialProvider) => {
186
+ try {
187
+ setIsLoading(true);
188
+ setLoadingProvider(provider);
189
+ setError(null);
190
+ await signInWithSocial(provider);
191
+ } catch (err) {
192
+ const message = err instanceof Error ? err.message : `Sign in failed`;
193
+ setError(message);
194
+ onError?.(err as Error);
195
+ setIsLoading(false);
196
+ setLoadingProvider(null);
197
+ }
198
+ };
199
+
200
+ if (verificationSent) {
201
+ return (
202
+ <div className={`w-full max-w-[400px] px-6 ${className || ""}`}>
203
+ <div className="flex flex-col items-center gap-6 text-center">
204
+ <div className="flex h-14 w-14 shrink-0 items-center justify-center rounded-full bg-green-100">
205
+ <svg
206
+ className="h-7 w-7 shrink-0 text-green-600"
207
+ fill="none"
208
+ viewBox="0 0 24 24"
209
+ stroke="currentColor"
210
+ width={28}
211
+ height={28}
212
+ >
213
+ <path
214
+ strokeLinecap="round"
215
+ strokeLinejoin="round"
216
+ strokeWidth={2}
217
+ d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
218
+ />
219
+ </svg>
220
+ </div>
221
+ <h2 className="text-[22px] font-semibold text-gray-900 dark:text-gray-100">Check your email</h2>
222
+ <p className="text-[15px] text-gray-500 dark:text-gray-400">
223
+ We sent a verification link to <span className="font-medium text-gray-700 dark:text-gray-200">{email}</span>
224
+ . Click the link to verify your account, then come back and sign in.
225
+ </p>
226
+ <button
227
+ onClick={() => {
228
+ setVerificationSent(false);
229
+ setMode("sign-in");
230
+ setPassword("");
231
+ }}
232
+ className="text-[14px] font-medium text-blue-600 hover:text-blue-500 dark:text-blue-400"
233
+ >
234
+ Back to sign in
235
+ </button>
236
+ </div>
237
+ </div>
238
+ );
239
+ }
240
+
241
+ return (
242
+ <div className={`w-full max-w-[400px] px-6 ${className || ""}`}>
243
+ {/* Header */}
244
+ <div className="mb-10 text-center">
245
+ <h1 className="text-[28px] font-semibold tracking-tight text-gray-900 dark:text-gray-100">{resolvedTitle}</h1>
246
+ <p className="mt-3 text-[15px] text-gray-500 dark:text-gray-400">{resolvedSubtitle}</p>
247
+ </div>
248
+
249
+ {/* Forgot password view */}
250
+ {mode === "forgot-password" && (
251
+ <div className="space-y-5">
252
+ {resetEmailSent ? (
253
+ <div className="space-y-4 text-center">
254
+ <div className="mx-auto flex h-12 w-12 items-center justify-center rounded-full bg-green-100">
255
+ <svg className="h-6 w-6 text-green-600" fill="none" viewBox="0 0 24 24" stroke="currentColor">
256
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M5 13l4 4L19 7" />
257
+ </svg>
258
+ </div>
259
+ <p className="text-[15px] text-gray-600 dark:text-gray-300">Check your email for a reset link.</p>
260
+ </div>
261
+ ) : (
262
+ <>
263
+ <div>
264
+ <label className="mb-2 block text-xs font-medium uppercase tracking-wide text-gray-700 dark:text-gray-300">
265
+ Email
266
+ </label>
267
+ <Input
268
+ type="email"
269
+ placeholder="name@company.com"
270
+ value={email}
271
+ onChange={e => setEmail(e.target.value)}
272
+ disabled={isLoading}
273
+ onKeyDown={e => {
274
+ if (e.key === "Enter") handleForgotPassword();
275
+ }}
276
+ className="h-11 px-4 text-[15px]"
277
+ />
278
+ </div>
279
+
280
+ {error && <p className="text-sm text-red-500">{error}</p>}
281
+
282
+ <Button
283
+ onClick={handleForgotPassword}
284
+ disabled={isLoading}
285
+ className="h-11 w-full bg-gray-900 text-[15px] font-medium text-white hover:bg-gray-800 dark:bg-white dark:text-gray-900 dark:hover:bg-gray-100"
286
+ >
287
+ {isLoading ? "Sending..." : "Send reset link"}
288
+ </Button>
289
+ </>
290
+ )}
291
+
292
+ <p className="mt-8 text-center text-[14px] text-gray-500 dark:text-gray-400">
293
+ <button
294
+ onClick={() => {
295
+ setMode("sign-in");
296
+ setError(null);
297
+ setResetEmailSent(false);
298
+ }}
299
+ className="font-medium text-blue-600 hover:text-blue-500 dark:text-blue-400"
300
+ >
301
+ Back to sign in
302
+ </button>
303
+ </p>
304
+ </div>
305
+ )}
306
+
307
+ {/* Email/Password form */}
308
+ {showEmail && mode !== "forgot-password" && (
309
+ <div className="space-y-5">
310
+ {mode === "sign-up" && (
311
+ <div>
312
+ <label className="mb-2 block text-xs font-medium uppercase tracking-wide text-gray-700 dark:text-gray-300">
313
+ Name
314
+ </label>
315
+ <Input
316
+ type="text"
317
+ placeholder="Your name"
318
+ value={name}
319
+ onChange={e => setName(e.target.value)}
320
+ disabled={isLoading}
321
+ className="h-11 px-4 text-[15px]"
322
+ />
323
+ </div>
324
+ )}
325
+
326
+ <div>
327
+ <label className="mb-2 block text-xs font-medium uppercase tracking-wide text-gray-700 dark:text-gray-300">
328
+ Email
329
+ </label>
330
+ <Input
331
+ type="email"
332
+ placeholder="name@company.com"
333
+ value={email}
334
+ onChange={e => setEmail(e.target.value)}
335
+ disabled={isLoading}
336
+ className="h-11 px-4 text-[15px]"
337
+ />
338
+ </div>
339
+
340
+ <div>
341
+ <div className="mb-2 flex items-center justify-between">
342
+ <label className="block text-xs font-medium uppercase tracking-wide text-gray-700 dark:text-gray-300">
343
+ Password
344
+ </label>
345
+ {mode === "sign-in" && (
346
+ <button
347
+ type="button"
348
+ onClick={() => {
349
+ setMode("forgot-password");
350
+ setError(null);
351
+ }}
352
+ className="text-xs font-medium text-blue-600 hover:text-blue-500 dark:text-blue-400"
353
+ >
354
+ Forgot password?
355
+ </button>
356
+ )}
357
+ </div>
358
+ <PasswordInput
359
+ key={mode}
360
+ value={password}
361
+ onChange={e => setPassword(e.target.value)}
362
+ disabled={isLoading}
363
+ onKeyDown={e => {
364
+ if (e.key === "Enter") handleEmailSubmit();
365
+ }}
366
+ className="h-11 px-4 pr-11 text-[15px]"
367
+ />
368
+ </div>
369
+
370
+ {error && <p className="text-sm text-red-500">{error}</p>}
371
+
372
+ <Button
373
+ onClick={handleEmailSubmit}
374
+ disabled={isLoading}
375
+ className="h-11 w-full bg-gray-900 text-[15px] font-medium text-white hover:bg-gray-800 dark:bg-white dark:text-gray-900 dark:hover:bg-gray-100"
376
+ >
377
+ {isLoading ? "Loading..." : mode === "sign-in" ? "Sign in" : "Sign up"}
378
+ </Button>
379
+ </div>
380
+ )}
381
+
382
+ {/* Social providers */}
383
+ {providers.length > 0 && mode !== "forgot-password" && (
384
+ <>
385
+ {showEmail && (
386
+ <div className="my-8 flex items-center gap-4">
387
+ <div className="h-px flex-1 bg-gray-200 dark:bg-gray-700" />
388
+ <span className="text-xs text-gray-400">Or continue with</span>
389
+ <div className="h-px flex-1 bg-gray-200 dark:bg-gray-700" />
390
+ </div>
391
+ )}
392
+
393
+ <div className="space-y-4">
394
+ {providers.map(provider => {
395
+ const icon = strategyIcons[provider.id];
396
+ const label = strategyLabels[provider.id] || provider.label;
397
+
398
+ const isProviderLoading = loadingProvider === provider.id;
399
+
400
+ return (
401
+ <button
402
+ key={provider.id}
403
+ onClick={() => handleSocialSignIn(provider.id)}
404
+ disabled={isLoading}
405
+ style={{ paddingTop: "12px", paddingBottom: "12px" }}
406
+ className="flex w-full items-center justify-center gap-3 rounded-lg border border-gray-200 bg-white px-4 text-[14px] font-medium text-gray-700 transition-colors hover:bg-gray-50 disabled:opacity-50 dark:border-gray-700 dark:bg-gray-800 dark:text-gray-200 dark:hover:bg-gray-700"
407
+ >
408
+ {isProviderLoading ? (
409
+ <svg className="h-5 w-5 animate-spin text-gray-400" viewBox="0 0 24 24" fill="none">
410
+ <circle className="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" strokeWidth="4" />
411
+ <path
412
+ className="opacity-75"
413
+ fill="currentColor"
414
+ d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"
415
+ />
416
+ </svg>
417
+ ) : (
418
+ icon && <img src={icon} alt="" className="h-5 w-5" />
419
+ )}
420
+ <span>{isProviderLoading ? "Redirecting..." : label}</span>
421
+ </button>
422
+ );
423
+ })}
424
+ </div>
425
+ </>
426
+ )}
427
+
428
+ {/* Toggle sign-in / sign-up */}
429
+ {showEmail && mode !== "forgot-password" && (
430
+ <p className="mt-8 text-center text-[14px] text-gray-500 dark:text-gray-400">
431
+ {mode === "sign-in" ? "Don't have an account? " : "Already have an account? "}
432
+ <button
433
+ onClick={() => {
434
+ setMode(mode === "sign-in" ? "sign-up" : "sign-in");
435
+ setError(null);
436
+ }}
437
+ disabled={isLoading}
438
+ className="font-medium text-blue-600 hover:text-blue-500 dark:text-blue-400"
439
+ >
440
+ {mode === "sign-in" ? "Sign up" : "Sign in"}
441
+ </button>
442
+ </p>
443
+ )}
444
+ </div>
445
+ );
446
+ }
@@ -0,0 +1,155 @@
1
+ import { Button } from "@b3dotfun/sdk/global-account/react";
2
+ import { debugB3React } from "@b3dotfun/sdk/shared/utils/debug";
3
+
4
+ const debug = debugB3React("BetterAuthVerifyEmail");
5
+
6
+ export type BetterAuthVerifyEmailState = "success" | "expired" | "invalid" | "already-verified" | "error";
7
+
8
+ export interface BetterAuthVerifyEmailProps {
9
+ /**
10
+ * Error code from the callback URL's `?error=` query param. Pass `null` /
11
+ * `undefined` when the user landed here cleanly (successful verification).
12
+ * Better Auth appends this param when server-side verification fails.
13
+ */
14
+ errorCode?: string | null;
15
+ /** Called when the user clicks the "Go to sign in" button. */
16
+ onGoToSignIn?: () => void;
17
+ /** Fallback href used when `onGoToSignIn` is not provided. Defaults to "/login". */
18
+ signInHref?: string;
19
+ /** Optional override for the success headline. */
20
+ successTitle?: string;
21
+ /** Optional override for the success body text. */
22
+ successMessage?: string;
23
+ /** Optional class name for the root container. */
24
+ className?: string;
25
+ }
26
+
27
+ function classifyError(code: string | null | undefined): BetterAuthVerifyEmailState {
28
+ if (!code) return "success";
29
+ const normalized = code.toLowerCase();
30
+
31
+ // Exact matches for Better Auth's documented verification error codes.
32
+ if (normalized === "expired_token") return "expired";
33
+ if (normalized === "invalid_token") return "invalid";
34
+ if (normalized === "already_verified" || normalized === "email_already_verified") return "already-verified";
35
+
36
+ // Loose fallbacks for close variants. Order matters — check "already" before
37
+ // "verified" so `email_already_verified` maps to already-verified, not invalid.
38
+ if (normalized.includes("expired")) return "expired";
39
+ if (normalized.includes("already")) return "already-verified";
40
+ if (normalized.includes("invalid")) return "invalid";
41
+ return "error";
42
+ }
43
+
44
+ const COPY: Record<BetterAuthVerifyEmailState, { title: string; message: string }> = {
45
+ success: {
46
+ title: "Email verified",
47
+ message: "Your email is confirmed. You can now sign in to your account.",
48
+ },
49
+ expired: {
50
+ title: "Link expired",
51
+ message: "This verification link has expired. Request a new one from the sign-in page.",
52
+ },
53
+ invalid: {
54
+ title: "Invalid link",
55
+ message: "This verification link is invalid or has already been used. Try signing in or request a new link.",
56
+ },
57
+ "already-verified": {
58
+ title: "Already verified",
59
+ message: "Your email was already confirmed. You can sign in now.",
60
+ },
61
+ error: {
62
+ title: "Verification failed",
63
+ message: "We couldn't verify your email. Request a new link from the sign-in page.",
64
+ },
65
+ };
66
+
67
+ /**
68
+ * Standalone email-verification confirmation page. Render on the route you
69
+ * set as `callbackURL` when calling `betterAuthClient.sendVerificationEmail`
70
+ * (or the `verifyCallbackURL` arg on `useBetterAuth().signUpWithEmail`).
71
+ *
72
+ * Better Auth verifies the token server-side before redirecting here. This
73
+ * component only displays the outcome based on the `?error=` query param.
74
+ *
75
+ * Usage:
76
+ * ```tsx
77
+ * const error = new URLSearchParams(window.location.search).get("error");
78
+ * <BetterAuthVerifyEmail
79
+ * errorCode={error}
80
+ * onGoToSignIn={() => router.push("/login")}
81
+ * />
82
+ * ```
83
+ */
84
+ export function BetterAuthVerifyEmail({
85
+ errorCode,
86
+ onGoToSignIn,
87
+ signInHref = "/login",
88
+ successTitle,
89
+ successMessage,
90
+ className,
91
+ }: BetterAuthVerifyEmailProps) {
92
+ const state = classifyError(errorCode);
93
+ const isSuccess = state === "success" || state === "already-verified";
94
+ const copy = COPY[state];
95
+ const title = isSuccess && successTitle ? successTitle : copy.title;
96
+ const message = isSuccess && successMessage ? successMessage : copy.message;
97
+
98
+ debug("Rendering verify-email state", { state, errorCode });
99
+
100
+ const handleClick = () => {
101
+ if (onGoToSignIn) {
102
+ onGoToSignIn();
103
+ return;
104
+ }
105
+ if (typeof window !== "undefined") {
106
+ window.location.href = signInHref;
107
+ }
108
+ };
109
+
110
+ return (
111
+ <div className={`w-full max-w-[400px] px-6 ${className || ""}`}>
112
+ <div className="space-y-6 text-center">
113
+ <div
114
+ className={`mx-auto flex h-12 w-12 items-center justify-center rounded-full ${
115
+ isSuccess ? "bg-green-100" : "bg-red-100"
116
+ }`}
117
+ >
118
+ {isSuccess ? (
119
+ <svg
120
+ className="h-6 w-6 text-green-600"
121
+ fill="none"
122
+ viewBox="0 0 24 24"
123
+ stroke="currentColor"
124
+ aria-hidden="true"
125
+ >
126
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M5 13l4 4L19 7" />
127
+ </svg>
128
+ ) : (
129
+ <svg
130
+ className="h-6 w-6 text-red-600"
131
+ fill="none"
132
+ viewBox="0 0 24 24"
133
+ stroke="currentColor"
134
+ aria-hidden="true"
135
+ >
136
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
137
+ </svg>
138
+ )}
139
+ </div>
140
+
141
+ <div>
142
+ <h1 className="text-[28px] font-semibold tracking-tight text-gray-900 dark:text-gray-100">{title}</h1>
143
+ <p className="mt-3 text-[15px] text-gray-500 dark:text-gray-400">{message}</p>
144
+ </div>
145
+
146
+ <Button
147
+ onClick={handleClick}
148
+ className="h-11 w-full bg-gray-900 text-[15px] font-medium text-white hover:bg-gray-800 dark:bg-white dark:text-gray-900 dark:hover:bg-gray-100"
149
+ >
150
+ {isSuccess ? "Go to sign in" : "Back to sign in"}
151
+ </Button>
152
+ </div>
153
+ </div>
154
+ );
155
+ }