@cedros/login-react 0.0.12 → 0.0.13

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 (428) hide show
  1. package/README.md +68 -0
  2. package/dist/AdminDepositList-Cx0xRwES.js +305 -0
  3. package/dist/AdminDepositList-Cx0xRwES.js.map +1 -0
  4. package/dist/AdminDepositList-UEcyRZkA.cjs +1 -0
  5. package/dist/AdminDepositList-UEcyRZkA.cjs.map +1 -0
  6. package/dist/AdminUserDetail-BzEIdNJh.cjs +1 -0
  7. package/dist/AdminUserDetail-BzEIdNJh.cjs.map +1 -0
  8. package/dist/AdminUserDetail-DHFDzY8B.js +1195 -0
  9. package/dist/AdminUserDetail-DHFDzY8B.js.map +1 -0
  10. package/dist/AdminWithdrawalHistory-0yxtMh6q.cjs +1 -0
  11. package/dist/AdminWithdrawalHistory-0yxtMh6q.cjs.map +1 -0
  12. package/dist/AdminWithdrawalHistory-BGjfrIe3.js +904 -0
  13. package/dist/AdminWithdrawalHistory-BGjfrIe3.js.map +1 -0
  14. package/dist/AuthenticationSettings-5Vi7Ib_A.cjs +1 -0
  15. package/dist/AuthenticationSettings-5Vi7Ib_A.cjs.map +1 -0
  16. package/dist/AuthenticationSettings-BPAh1my6.cjs +1 -0
  17. package/dist/AuthenticationSettings-BPAh1my6.cjs.map +1 -0
  18. package/dist/AuthenticationSettings-CJg8CJY9.js +9 -0
  19. package/dist/AuthenticationSettings-CJg8CJY9.js.map +1 -0
  20. package/dist/AuthenticationSettings-CR_i6TTS.js +495 -0
  21. package/dist/AuthenticationSettings-CR_i6TTS.js.map +1 -0
  22. package/dist/AutosaveStatus-CYkC2aI_.cjs +1 -0
  23. package/dist/AutosaveStatus-CYkC2aI_.cjs.map +1 -0
  24. package/dist/AutosaveStatus-N4uNS6-2.js +1497 -0
  25. package/dist/AutosaveStatus-N4uNS6-2.js.map +1 -0
  26. package/dist/CreditSystemSettings-BnAOK_tT.cjs +1 -0
  27. package/dist/CreditSystemSettings-BnAOK_tT.cjs.map +1 -0
  28. package/dist/CreditSystemSettings-CIf_SfJq.js +210 -0
  29. package/dist/CreditSystemSettings-CIf_SfJq.js.map +1 -0
  30. package/dist/CreditSystemSettings-CePYGgev.js +9 -0
  31. package/dist/CreditSystemSettings-CePYGgev.js.map +1 -0
  32. package/dist/CreditSystemSettings-Ck5WIMp3.cjs +1 -0
  33. package/dist/CreditSystemSettings-Ck5WIMp3.cjs.map +1 -0
  34. package/dist/{DepositsSection-0Hqr0yDm.js → DepositsSection-DA89uR9A.js} +5 -5
  35. package/dist/{DepositsSection-0Hqr0yDm.js.map → DepositsSection-DA89uR9A.js.map} +1 -1
  36. package/dist/DepositsSection-i6XdhLNs.cjs +1 -0
  37. package/dist/{DepositsSection-CGKCzM-H.cjs.map → DepositsSection-i6XdhLNs.cjs.map} +1 -1
  38. package/dist/EmailRegisterForm-BrDL3BZy.js +927 -0
  39. package/dist/EmailRegisterForm-BrDL3BZy.js.map +1 -0
  40. package/dist/EmailRegisterForm-CxktR-4J.cjs +1 -0
  41. package/dist/EmailRegisterForm-CxktR-4J.cjs.map +1 -0
  42. package/dist/EmailSettings-B8xwgd6_.cjs +1 -0
  43. package/dist/EmailSettings-B8xwgd6_.cjs.map +1 -0
  44. package/dist/{AuthenticationSettings-BSoIQ58T.js → EmailSettings-Bna7Z53E.js} +3 -3
  45. package/dist/EmailSettings-Bna7Z53E.js.map +1 -0
  46. package/dist/EmailSettings-DZywTTRq.cjs +1 -0
  47. package/dist/EmailSettings-DZywTTRq.cjs.map +1 -0
  48. package/dist/EmailSettings-DbMDfVaM.js +17 -0
  49. package/dist/EmailSettings-DbMDfVaM.js.map +1 -0
  50. package/dist/{EmbeddedWalletSettings-iVf_3pn3.js → EmbeddedWalletSettings-ANbhj3Lt.js} +3 -3
  51. package/dist/EmbeddedWalletSettings-ANbhj3Lt.js.map +1 -0
  52. package/dist/EmbeddedWalletSettings-BEztqO19.js +79 -0
  53. package/dist/EmbeddedWalletSettings-BEztqO19.js.map +1 -0
  54. package/dist/EmbeddedWalletSettings-D6M7pwgk.cjs +1 -0
  55. package/dist/EmbeddedWalletSettings-D6M7pwgk.cjs.map +1 -0
  56. package/dist/EmbeddedWalletSettings-DivEPn39.cjs +1 -0
  57. package/dist/EmbeddedWalletSettings-DivEPn39.cjs.map +1 -0
  58. package/dist/ErrorMessage-CHbYbVi2.cjs +1 -0
  59. package/dist/ErrorMessage-CHbYbVi2.cjs.map +1 -0
  60. package/dist/ErrorMessage-CcEK0pYO.js +64 -0
  61. package/dist/ErrorMessage-CcEK0pYO.js.map +1 -0
  62. package/dist/{GoogleLoginButton-BzHr545L.js → GoogleLoginButton-B3uRMJ_n.js} +4 -3
  63. package/dist/{GoogleLoginButton-BzHr545L.js.map → GoogleLoginButton-B3uRMJ_n.js.map} +1 -1
  64. package/dist/GoogleLoginButton-BydKswn4.cjs +1 -0
  65. package/dist/{GoogleLoginButton-DoAdOqb3.cjs.map → GoogleLoginButton-BydKswn4.cjs.map} +1 -1
  66. package/dist/LoadingSpinner-6vml-zwr.js +79 -0
  67. package/dist/LoadingSpinner-6vml-zwr.js.map +1 -0
  68. package/dist/LoadingSpinner-d6sSxgQN.cjs +1 -0
  69. package/dist/LoadingSpinner-d6sSxgQN.cjs.map +1 -0
  70. package/dist/PermissionsSection-BGaj_sI7.js +1026 -0
  71. package/dist/PermissionsSection-BGaj_sI7.js.map +1 -0
  72. package/dist/PermissionsSection-CKXXDfqi.cjs +1 -0
  73. package/dist/PermissionsSection-CKXXDfqi.cjs.map +1 -0
  74. package/dist/ServerSettings-B2RKhJtZ.js +84 -0
  75. package/dist/ServerSettings-B2RKhJtZ.js.map +1 -0
  76. package/dist/ServerSettings-BZXlm1BX.cjs +1 -0
  77. package/dist/ServerSettings-BZXlm1BX.cjs.map +1 -0
  78. package/dist/{ServerSettings-C_osdbiX.js → ServerSettings-Bqm4-bt2.js} +3 -3
  79. package/dist/ServerSettings-Bqm4-bt2.js.map +1 -0
  80. package/dist/ServerSettings-DZUKo6By.cjs +1 -0
  81. package/dist/ServerSettings-DZUKo6By.cjs.map +1 -0
  82. package/dist/SettingsPageLayout-COSYLMu7.cjs +1 -0
  83. package/dist/SettingsPageLayout-COSYLMu7.cjs.map +1 -0
  84. package/dist/SettingsPageLayout-DpgNEkuu.js +50 -0
  85. package/dist/SettingsPageLayout-DpgNEkuu.js.map +1 -0
  86. package/dist/{SolanaLoginButton-C-CfZxAZ.js → SolanaLoginButton-C_u9OppS.js} +5 -4
  87. package/dist/{SolanaLoginButton-C-CfZxAZ.js.map → SolanaLoginButton-C_u9OppS.js.map} +1 -1
  88. package/dist/SolanaLoginButton-fAW7kRUu.cjs +1 -0
  89. package/dist/{SolanaLoginButton-CPzms0kf.cjs.map → SolanaLoginButton-fAW7kRUu.cjs.map} +1 -1
  90. package/dist/StatsBar-BX-hHtTq.js +66 -0
  91. package/dist/StatsBar-BX-hHtTq.js.map +1 -0
  92. package/dist/StatsBar-DTUZCwDD.cjs +1 -0
  93. package/dist/StatsBar-DTUZCwDD.cjs.map +1 -0
  94. package/dist/{TeamSection-Bjt72upx.js → TeamSection-CvrCoa9D.js} +27 -26
  95. package/dist/TeamSection-CvrCoa9D.js.map +1 -0
  96. package/dist/TeamSection-DlUD5kp5.cjs +1 -0
  97. package/dist/TeamSection-DlUD5kp5.cjs.map +1 -0
  98. package/dist/UsersSection-C2U8Tb7V.cjs +1 -0
  99. package/dist/{UsersSection-DU86czWP.cjs.map → UsersSection-C2U8Tb7V.cjs.map} +1 -1
  100. package/dist/{UsersSection-hAcyfSZk.js → UsersSection-Dbh9PTSA.js} +17 -15
  101. package/dist/{UsersSection-hAcyfSZk.js.map → UsersSection-Dbh9PTSA.js.map} +1 -1
  102. package/dist/WebhookSettings-BT5q6AZ8.js +17 -0
  103. package/dist/WebhookSettings-BT5q6AZ8.js.map +1 -0
  104. package/dist/WebhookSettings-BWl_wsvg.cjs +1 -0
  105. package/dist/WebhookSettings-BWl_wsvg.cjs.map +1 -0
  106. package/dist/WebhookSettings-DXNH5bal.cjs +1 -0
  107. package/dist/WebhookSettings-DXNH5bal.cjs.map +1 -0
  108. package/dist/{WebhookSettings-IyhyTFes.js → WebhookSettings-bUg2u_p0.js} +4 -4
  109. package/dist/WebhookSettings-bUg2u_p0.js.map +1 -0
  110. package/dist/WithdrawalsSection-BL_LOUq8.cjs +1 -0
  111. package/dist/{WithdrawalsSection-iZJBuZ7O.cjs.map → WithdrawalsSection-BL_LOUq8.cjs.map} +1 -1
  112. package/dist/WithdrawalsSection-CN-lLnqX.js +20 -0
  113. package/dist/{WithdrawalsSection-B1415d-G.js.map → WithdrawalsSection-CN-lLnqX.js.map} +1 -1
  114. package/dist/admin-only.cjs +1 -0
  115. package/dist/admin-only.cjs.map +1 -0
  116. package/dist/{admin/types.d.ts → admin-only.d.ts} +228 -167
  117. package/dist/admin-only.js +8 -0
  118. package/dist/admin-only.js.map +1 -0
  119. package/dist/apiClient-B2JxVPlH.js +216 -0
  120. package/dist/apiClient-B2JxVPlH.js.map +1 -0
  121. package/dist/apiClient-CTTKhsYb.cjs +1 -0
  122. package/dist/apiClient-CTTKhsYb.cjs.map +1 -0
  123. package/dist/assets/argon2Worker-Bi5TuQvD.js.map +1 -1
  124. package/dist/email-only.cjs +1 -1
  125. package/dist/email-only.d.ts +634 -16
  126. package/dist/email-only.js +16 -13
  127. package/dist/email-only.js.map +1 -1
  128. package/dist/google-only.cjs +1 -1
  129. package/dist/google-only.d.ts +543 -13
  130. package/dist/google-only.js +11 -8
  131. package/dist/google-only.js.map +1 -1
  132. package/dist/index.cjs +2061 -1
  133. package/dist/index.cjs.map +1 -1
  134. package/dist/index.d.ts +5007 -144
  135. package/dist/index.js +13507 -116
  136. package/dist/index.js.map +1 -1
  137. package/dist/login-react.css +1 -1
  138. package/dist/plugin-5qRh-YhX.js +596 -0
  139. package/dist/plugin-5qRh-YhX.js.map +1 -0
  140. package/dist/plugin-BtYBW6JY.cjs +1 -0
  141. package/dist/plugin-BtYBW6JY.cjs.map +1 -0
  142. package/dist/sanitization-Bo_tn-L2.cjs +1 -0
  143. package/dist/sanitization-Bo_tn-L2.cjs.map +1 -0
  144. package/dist/sanitization-CQ-H1MSg.js +39 -0
  145. package/dist/sanitization-CQ-H1MSg.js.map +1 -0
  146. package/dist/shamir-AeLLfw0p.cjs +1 -0
  147. package/dist/shamir-AeLLfw0p.cjs.map +1 -0
  148. package/dist/{solanaKeypair-BlXol3nh.js → shamir-B0wConeK.js} +765 -757
  149. package/dist/shamir-B0wConeK.js.map +1 -0
  150. package/dist/silentWalletEnroll-B8pgdKZO.cjs +1 -0
  151. package/dist/silentWalletEnroll-B8pgdKZO.cjs.map +1 -0
  152. package/dist/silentWalletEnroll-DR2kPw7W.js +41 -0
  153. package/dist/silentWalletEnroll-DR2kPw7W.js.map +1 -0
  154. package/dist/solana-only.cjs +1 -1
  155. package/dist/solana-only.d.ts +594 -13
  156. package/dist/solana-only.js +12 -9
  157. package/dist/solana-only.js.map +1 -1
  158. package/dist/style.d.ts +1 -0
  159. package/dist/useAdminDeposits-BDY5KJ0-.js +151 -0
  160. package/dist/useAdminDeposits-BDY5KJ0-.js.map +1 -0
  161. package/dist/useAdminDeposits-Dvx3_UUE.cjs +1 -0
  162. package/dist/useAdminDeposits-Dvx3_UUE.cjs.map +1 -0
  163. package/dist/{ErrorMessage-DU2VBb85.js → useAuth-Bge6KaWN.js} +954 -1226
  164. package/dist/useAuth-Bge6KaWN.js.map +1 -0
  165. package/dist/useAuth-DhIDTLRd.cjs +1 -0
  166. package/dist/useAuth-DhIDTLRd.cjs.map +1 -0
  167. package/dist/useOrgs-Be3KH4ib.js +215 -0
  168. package/dist/useOrgs-Be3KH4ib.js.map +1 -0
  169. package/dist/useOrgs-CVbacmaQ.cjs +1 -0
  170. package/dist/useOrgs-CVbacmaQ.cjs.map +1 -0
  171. package/dist/useSystemSettings-D9Cr7ZTl.cjs +1 -0
  172. package/dist/useSystemSettings-D9Cr7ZTl.cjs.map +1 -0
  173. package/dist/useSystemSettings-DN5YqfNq.js +97 -0
  174. package/dist/useSystemSettings-DN5YqfNq.js.map +1 -0
  175. package/dist/{validation-BebL7hMF.js → validation-B8kMV3BL.js} +1 -1
  176. package/dist/{validation-BebL7hMF.js.map → validation-B8kMV3BL.js.map} +1 -1
  177. package/dist/{validation-BeXIfuHB.cjs → validation-BuGQrA-K.cjs} +1 -1
  178. package/dist/{validation-BeXIfuHB.cjs.map → validation-BuGQrA-K.cjs.map} +1 -1
  179. package/package.json +11 -1
  180. package/dist/AuthenticationSettings-BSoIQ58T.js.map +0 -1
  181. package/dist/AuthenticationSettings-CNmWEPFV.cjs +0 -1
  182. package/dist/AuthenticationSettings-CNmWEPFV.cjs.map +0 -1
  183. package/dist/CreditSystemSettings-BYxoFwaP.js +0 -9
  184. package/dist/CreditSystemSettings-BYxoFwaP.js.map +0 -1
  185. package/dist/CreditSystemSettings-D2fLorNx.cjs +0 -1
  186. package/dist/CreditSystemSettings-D2fLorNx.cjs.map +0 -1
  187. package/dist/DepositsSection-CGKCzM-H.cjs +0 -1
  188. package/dist/EmailRegisterForm-C0PStlj5.js +0 -961
  189. package/dist/EmailRegisterForm-C0PStlj5.js.map +0 -1
  190. package/dist/EmailRegisterForm-DaPLGws2.cjs +0 -1
  191. package/dist/EmailRegisterForm-DaPLGws2.cjs.map +0 -1
  192. package/dist/EmailSettings-CiLDwzNb.cjs +0 -1
  193. package/dist/EmailSettings-CiLDwzNb.cjs.map +0 -1
  194. package/dist/EmailSettings-DTjpO65J.js +0 -9
  195. package/dist/EmailSettings-DTjpO65J.js.map +0 -1
  196. package/dist/EmbeddedWalletSettings-CX7sYiPy.cjs +0 -1
  197. package/dist/EmbeddedWalletSettings-CX7sYiPy.cjs.map +0 -1
  198. package/dist/EmbeddedWalletSettings-iVf_3pn3.js.map +0 -1
  199. package/dist/ErrorMessage-BXHiYibN.cjs +0 -1
  200. package/dist/ErrorMessage-BXHiYibN.cjs.map +0 -1
  201. package/dist/ErrorMessage-DU2VBb85.js.map +0 -1
  202. package/dist/GoogleLoginButton-DoAdOqb3.cjs +0 -1
  203. package/dist/ServerSettings-C_osdbiX.js.map +0 -1
  204. package/dist/ServerSettings-HqSb_VDj.cjs +0 -1
  205. package/dist/ServerSettings-HqSb_VDj.cjs.map +0 -1
  206. package/dist/SolanaLoginButton-CPzms0kf.cjs +0 -1
  207. package/dist/TeamSection-Bjt72upx.js.map +0 -1
  208. package/dist/TeamSection-DZeWHkLd.cjs +0 -1
  209. package/dist/TeamSection-DZeWHkLd.cjs.map +0 -1
  210. package/dist/UsersSection-DU86czWP.cjs +0 -1
  211. package/dist/WebhookSettings-Br9bakAL.cjs +0 -1
  212. package/dist/WebhookSettings-Br9bakAL.cjs.map +0 -1
  213. package/dist/WebhookSettings-IyhyTFes.js.map +0 -1
  214. package/dist/WithdrawalsSection-B1415d-G.js +0 -20
  215. package/dist/WithdrawalsSection-iZJBuZ7O.cjs +0 -1
  216. package/dist/admin/AdminShell.d.ts +0 -38
  217. package/dist/admin/icons.d.ts +0 -2
  218. package/dist/admin/index.d.ts +0 -10
  219. package/dist/admin/plugin.d.ts +0 -3
  220. package/dist/admin/sections/AuthenticationSettings.d.ts +0 -3
  221. package/dist/admin/sections/CreditSystemSettings.d.ts +0 -3
  222. package/dist/admin/sections/DepositsSection.d.ts +0 -3
  223. package/dist/admin/sections/EmailSettings.d.ts +0 -3
  224. package/dist/admin/sections/EmbeddedWalletSettings.d.ts +0 -3
  225. package/dist/admin/sections/FeatureSettings.d.ts +0 -3
  226. package/dist/admin/sections/InvitesSection.d.ts +0 -3
  227. package/dist/admin/sections/MembersSection.d.ts +0 -3
  228. package/dist/admin/sections/ServerSettings.d.ts +0 -3
  229. package/dist/admin/sections/SettingsSections.d.ts +0 -7
  230. package/dist/admin/sections/TeamSection.d.ts +0 -3
  231. package/dist/admin/sections/UsersSection.d.ts +0 -3
  232. package/dist/admin/sections/WebhookSettings.d.ts +0 -3
  233. package/dist/admin/sections/WithdrawalsSection.d.ts +0 -3
  234. package/dist/components/LoginButton.d.ts +0 -23
  235. package/dist/components/LoginForm.d.ts +0 -9
  236. package/dist/components/LoginModal.d.ts +0 -9
  237. package/dist/components/admin/AdminUserDetail.d.ts +0 -23
  238. package/dist/components/admin/AdminUserList.d.ts +0 -21
  239. package/dist/components/admin/CedrosAdminDashboard.d.ts +0 -52
  240. package/dist/components/admin/PermissionsSection.d.ts +0 -7
  241. package/dist/components/admin/ProfileDropdown.d.ts +0 -34
  242. package/dist/components/admin/SetupWizard.d.ts +0 -30
  243. package/dist/components/admin/StatsBar.d.ts +0 -17
  244. package/dist/components/admin/SystemSettings.d.ts +0 -19
  245. package/dist/components/admin/settings/AuthenticationSettings.d.ts +0 -4
  246. package/dist/components/admin/settings/AutosaveStatus.d.ts +0 -6
  247. package/dist/components/admin/settings/CreditSystemSettings.d.ts +0 -6
  248. package/dist/components/admin/settings/EmailSettings.d.ts +0 -4
  249. package/dist/components/admin/settings/EmbeddedWalletSettings.d.ts +0 -4
  250. package/dist/components/admin/settings/FeatureSettings.d.ts +0 -4
  251. package/dist/components/admin/settings/MessagingSettings.d.ts +0 -4
  252. package/dist/components/admin/settings/SecuritySettings.d.ts +0 -4
  253. package/dist/components/admin/settings/ServerSettings.d.ts +0 -4
  254. package/dist/components/admin/settings/SettingsPageLayout.d.ts +0 -16
  255. package/dist/components/admin/settings/SsoProvidersSettings.d.ts +0 -4
  256. package/dist/components/admin/settings/WebhookSettings.d.ts +0 -4
  257. package/dist/components/admin/settings/index.d.ts +0 -31
  258. package/dist/components/admin/settings/settingsInputs.d.ts +0 -79
  259. package/dist/components/admin/settings/settingsMetadata.d.ts +0 -18
  260. package/dist/components/apple/AppleLoginButton.d.ts +0 -29
  261. package/dist/components/deposit/CreditBalance.d.ts +0 -19
  262. package/dist/components/deposit/DepositFlow.d.ts +0 -118
  263. package/dist/components/deposit/FeeConfigDisplay.d.ts +0 -15
  264. package/dist/components/deposit/History.d.ts +0 -21
  265. package/dist/components/deposit/TieredAmountSlider.d.ts +0 -19
  266. package/dist/components/deposit/TokenSelector.d.ts +0 -23
  267. package/dist/components/deposit/admin/AdminDepositList.d.ts +0 -21
  268. package/dist/components/deposit/admin/AdminDepositStats.d.ts +0 -15
  269. package/dist/components/deposit/admin/AdminPrivacyPeriodDeposits.d.ts +0 -19
  270. package/dist/components/deposit/admin/AdminWithdrawalHistory.d.ts +0 -19
  271. package/dist/components/deposit/admin/AdminWithdrawalQueue.d.ts +0 -23
  272. package/dist/components/deposit/admin/AdminWithdrawalStats.d.ts +0 -10
  273. package/dist/components/deposit/admin/FeatureDisabledMessage.d.ts +0 -15
  274. package/dist/components/deposit/admin/PrivacySystemStatus.d.ts +0 -15
  275. package/dist/components/deposit/admin/featureDisabled.d.ts +0 -14
  276. package/dist/components/deposit/admin/index.d.ts +0 -22
  277. package/dist/components/deposit/index.d.ts +0 -12
  278. package/dist/components/deposit/tierUtils.d.ts +0 -8
  279. package/dist/components/deposit/tokens.d.ts +0 -19
  280. package/dist/components/email/EmailLoginForm.d.ts +0 -11
  281. package/dist/components/email/EmailRegisterForm.d.ts +0 -14
  282. package/dist/components/email/ForgotPasswordForm.d.ts +0 -17
  283. package/dist/components/email/PasswordInput.d.ts +0 -14
  284. package/dist/components/email/ResetPasswordForm.d.ts +0 -22
  285. package/dist/components/google/GoogleLoginButton.d.ts +0 -12
  286. package/dist/components/invites/InviteForm.d.ts +0 -38
  287. package/dist/components/invites/InviteList.d.ts +0 -40
  288. package/dist/components/members/MemberList.d.ts +0 -47
  289. package/dist/components/org/CreateOrgForm.d.ts +0 -7
  290. package/dist/components/org/OrgAvatar.d.ts +0 -7
  291. package/dist/components/org/OrgListView.d.ts +0 -9
  292. package/dist/components/org/OrgSelector.d.ts +0 -52
  293. package/dist/components/org/OrgSwitcher.d.ts +0 -47
  294. package/dist/components/org/icons.d.ts +0 -8
  295. package/dist/components/profile/UserProfileSettings.d.ts +0 -35
  296. package/dist/components/profile/index.d.ts +0 -2
  297. package/dist/components/sessions/SessionList.d.ts +0 -33
  298. package/dist/components/shared/ErrorBoundary.d.ts +0 -38
  299. package/dist/components/shared/ErrorMessage.d.ts +0 -14
  300. package/dist/components/shared/LoadingSpinner.d.ts +0 -16
  301. package/dist/components/solana/SolanaLoginButton.d.ts +0 -49
  302. package/dist/components/templates/FullPageLayout.d.ts +0 -40
  303. package/dist/components/templates/SplitPageLayout.d.ts +0 -44
  304. package/dist/components/templates/index.d.ts +0 -4
  305. package/dist/components/totp/OtpInput.d.ts +0 -32
  306. package/dist/components/totp/QrCode.d.ts +0 -21
  307. package/dist/components/totp/TotpSettings.d.ts +0 -38
  308. package/dist/components/totp/TotpSetup.d.ts +0 -23
  309. package/dist/components/totp/TotpVerify.d.ts +0 -25
  310. package/dist/components/totp/index.d.ts +0 -10
  311. package/dist/components/wallet/CapabilityWarning.d.ts +0 -11
  312. package/dist/components/wallet/PasskeyPrompt.d.ts +0 -34
  313. package/dist/components/wallet/RecoveryPhraseDisplay.d.ts +0 -18
  314. package/dist/components/wallet/RecoveryPhraseInput.d.ts +0 -21
  315. package/dist/components/wallet/WalletAddressRow.d.ts +0 -10
  316. package/dist/components/wallet/WalletEnrollment.d.ts +0 -15
  317. package/dist/components/wallet/WalletManager.d.ts +0 -9
  318. package/dist/components/wallet/WalletRecovery.d.ts +0 -19
  319. package/dist/components/wallet/WalletStatus.d.ts +0 -28
  320. package/dist/components/wallet/WalletUnlock.d.ts +0 -23
  321. package/dist/components/wallet/index.d.ts +0 -23
  322. package/dist/components/webauthn/PasskeyLoginButton.d.ts +0 -8
  323. package/dist/context/CedrosLoginContext.d.ts +0 -24
  324. package/dist/context/CedrosLoginProvider.d.ts +0 -17
  325. package/dist/context/EmbeddedWalletExposure.d.ts +0 -19
  326. package/dist/context/useCedrosLogin.d.ts +0 -12
  327. package/dist/crypto/aesGcm.d.ts +0 -89
  328. package/dist/crypto/argon2.d.ts +0 -65
  329. package/dist/crypto/argon2Worker.d.ts +0 -1
  330. package/dist/crypto/argon2WorkerClient.d.ts +0 -28
  331. package/dist/crypto/bip39.d.ts +0 -106
  332. package/dist/crypto/capabilities.d.ts +0 -35
  333. package/dist/crypto/entropy.d.ts +0 -56
  334. package/dist/crypto/hkdf.d.ts +0 -38
  335. package/dist/crypto/index.d.ts +0 -30
  336. package/dist/crypto/secureWipe.d.ts +0 -71
  337. package/dist/crypto/shamir.d.ts +0 -52
  338. package/dist/crypto/solanaKeypair.d.ts +0 -63
  339. package/dist/crypto/types.d.ts +0 -134
  340. package/dist/crypto/webauthnPrf.d.ts +0 -108
  341. package/dist/hooks/useAdminDeposits.d.ts +0 -10
  342. package/dist/hooks/useAdminUsers.d.ts +0 -28
  343. package/dist/hooks/useAppleAuth.d.ts +0 -52
  344. package/dist/hooks/useAuth.d.ts +0 -34
  345. package/dist/hooks/useAuthSession.d.ts +0 -19
  346. package/dist/hooks/useAuthorize.d.ts +0 -62
  347. package/dist/hooks/useCredits.d.ts +0 -11
  348. package/dist/hooks/useDashboardPermissions.d.ts +0 -45
  349. package/dist/hooks/useDeposit.d.ts +0 -16
  350. package/dist/hooks/useEmailAuth.d.ts +0 -60
  351. package/dist/hooks/useGoogleAuth.d.ts +0 -67
  352. package/dist/hooks/useInstantLink.d.ts +0 -42
  353. package/dist/hooks/useInvites.d.ts +0 -57
  354. package/dist/hooks/useMembers.d.ts +0 -52
  355. package/dist/hooks/useOrgs.d.ts +0 -49
  356. package/dist/hooks/usePasswordReset.d.ts +0 -32
  357. package/dist/hooks/usePendingRecovery.d.ts +0 -34
  358. package/dist/hooks/useProfile.d.ts +0 -35
  359. package/dist/hooks/useRateLimiter.d.ts +0 -58
  360. package/dist/hooks/useServerFeatures.d.ts +0 -55
  361. package/dist/hooks/useSessions.d.ts +0 -45
  362. package/dist/hooks/useSettingsAutosave.d.ts +0 -29
  363. package/dist/hooks/useSetup.d.ts +0 -25
  364. package/dist/hooks/useSolanaAuth.d.ts +0 -30
  365. package/dist/hooks/useSsoProviders.d.ts +0 -52
  366. package/dist/hooks/useSystemSettings.d.ts +0 -47
  367. package/dist/hooks/useThemeManager.d.ts +0 -11
  368. package/dist/hooks/useTotp.d.ts +0 -52
  369. package/dist/hooks/useTotpVerify.d.ts +0 -38
  370. package/dist/hooks/useTransactionSigning.d.ts +0 -45
  371. package/dist/hooks/useWallet.d.ts +0 -10
  372. package/dist/hooks/useWalletDiscovery.d.ts +0 -24
  373. package/dist/hooks/useWalletEnrollment.d.ts +0 -9
  374. package/dist/hooks/useWalletMaterial.d.ts +0 -10
  375. package/dist/hooks/useWalletRecovery.d.ts +0 -9
  376. package/dist/hooks/useWalletSigning.d.ts +0 -31
  377. package/dist/hooks/useWebAuthn.d.ts +0 -25
  378. package/dist/i18n/I18nProvider.d.ts +0 -16
  379. package/dist/i18n/context.d.ts +0 -6
  380. package/dist/i18n/index.d.ts +0 -5
  381. package/dist/i18n/translations.d.ts +0 -66
  382. package/dist/i18n/useI18n.d.ts +0 -9
  383. package/dist/index-ZS9AwAal.cjs +0 -2061
  384. package/dist/index-ZS9AwAal.cjs.map +0 -1
  385. package/dist/index-dgg5tlO7.js +0 -19650
  386. package/dist/index-dgg5tlO7.js.map +0 -1
  387. package/dist/silentWalletEnroll-C3JRAD9_.js +0 -42
  388. package/dist/silentWalletEnroll-C3JRAD9_.js.map +0 -1
  389. package/dist/silentWalletEnroll-DRYQAQfg.cjs +0 -1
  390. package/dist/silentWalletEnroll-DRYQAQfg.cjs.map +0 -1
  391. package/dist/solanaKeypair-BlXol3nh.js.map +0 -1
  392. package/dist/solanaKeypair-C-lIR1JY.cjs +0 -1
  393. package/dist/solanaKeypair-C-lIR1JY.cjs.map +0 -1
  394. package/dist/types/adminUser.d.ts +0 -168
  395. package/dist/types/auth.d.ts +0 -122
  396. package/dist/types/config.d.ts +0 -266
  397. package/dist/types/deposit.d.ts +0 -490
  398. package/dist/types/index.d.ts +0 -13
  399. package/dist/types/invite.d.ts +0 -71
  400. package/dist/types/member.d.ts +0 -45
  401. package/dist/types/org.d.ts +0 -133
  402. package/dist/types/profile.d.ts +0 -56
  403. package/dist/types/session.d.ts +0 -28
  404. package/dist/types/setup.d.ts +0 -47
  405. package/dist/types/systemSettings.d.ts +0 -85
  406. package/dist/types/totp.d.ts +0 -52
  407. package/dist/types/wallet.d.ts +0 -309
  408. package/dist/utils/adminUserApi.d.ts +0 -60
  409. package/dist/utils/apiClient.d.ts +0 -78
  410. package/dist/utils/cryptoShim.d.ts +0 -17
  411. package/dist/utils/csrf.d.ts +0 -1
  412. package/dist/utils/deviceDetection.d.ts +0 -17
  413. package/dist/utils/embeddedWallet.d.ts +0 -75
  414. package/dist/utils/inviteApi.d.ts +0 -31
  415. package/dist/utils/memberApi.d.ts +0 -23
  416. package/dist/utils/orgApi.d.ts +0 -36
  417. package/dist/utils/profileApi.d.ts +0 -26
  418. package/dist/utils/sanitization.d.ts +0 -66
  419. package/dist/utils/sessionApi.d.ts +0 -16
  420. package/dist/utils/setupApi.d.ts +0 -21
  421. package/dist/utils/silentWalletEnroll.d.ts +0 -41
  422. package/dist/utils/systemSettingsApi.d.ts +0 -18
  423. package/dist/utils/tabSync.d.ts +0 -46
  424. package/dist/utils/tokenManager.d.ts +0 -107
  425. package/dist/utils/unlockCredential.d.ts +0 -5
  426. package/dist/utils/validation.d.ts +0 -48
  427. package/dist/utils/walletDetection.d.ts +0 -23
  428. package/dist/utils/webauthnJson.d.ts +0 -21
@@ -1,13 +1,543 @@
1
- /**
2
- * @cedros/login-react/google-only
3
- *
4
- * Bundle with only Google OAuth authentication (~25KB).
5
- */
6
- export { CedrosLoginProvider } from './context/CedrosLoginProvider';
7
- export { useCedrosLogin } from './context/useCedrosLogin';
8
- export { GoogleLoginButton } from './components/google/GoogleLoginButton';
9
- export { LoadingSpinner } from './components/shared/LoadingSpinner';
10
- export { ErrorMessage } from './components/shared/ErrorMessage';
11
- export { useAuth } from './hooks/useAuth';
12
- export { useGoogleAuth } from './hooks/useGoogleAuth';
13
- export type { AuthMethod, AuthUser, TokenPair, AuthError, AuthErrorCode, AuthResponse, AuthState, SessionStorage, ThemeMode, FeatureFlags, SessionConfig, AuthCallbacks, ThemeOverrides, CedrosLoginConfig, } from './types';
1
+ import { CSSProperties } from 'react';
2
+ import { JSX } from 'react/jsx-runtime';
3
+ import { NamedExoticComponent } from 'react';
4
+ import { ReactNode } from 'react';
5
+
6
+ /**
7
+ * Authentication callbacks
8
+ */
9
+ export declare interface AuthCallbacks {
10
+ /** Called after successful login */
11
+ onLoginSuccess?: (user: AuthUser, method: AuthMethod) => void;
12
+ /** Called when login fails */
13
+ onLoginError?: (error: AuthError) => void;
14
+ /** Called after logout */
15
+ onLogout?: () => void;
16
+ /** Called when session expires */
17
+ onSessionExpired?: () => void;
18
+ }
19
+
20
+ /**
21
+ * Authentication error response
22
+ */
23
+ export declare interface AuthError {
24
+ code: AuthErrorCode;
25
+ message: string;
26
+ details?: Record<string, unknown>;
27
+ }
28
+
29
+ /**
30
+ * Standard error codes
31
+ */
32
+ export declare type AuthErrorCode = 'INVALID_CREDENTIALS' | 'ACCOUNT_LOCKED' | 'EMAIL_EXISTS' | 'WALLET_EXISTS' | 'INVALID_TOKEN' | 'TOKEN_EXPIRED' | 'INVALID_SIGNATURE' | 'INVALID_PUBLIC_KEY' | 'CHALLENGE_EXPIRED' | 'VALIDATION_ERROR' | 'RATE_LIMITED' | 'NOT_FOUND' | 'FORBIDDEN' | 'UNAUTHORIZED' | 'STEP_UP_REQUIRED' | 'TOTP_REQUIRED' | 'INVALID_TOTP_CODE' | 'SERVICE_UNAVAILABLE' | 'SERVER_ERROR' | 'NETWORK_ERROR' | 'UNKNOWN_ERROR';
33
+
34
+ /**
35
+ * Authentication method used for login/registration
36
+ * TYPE-01: Must match backend AuthMethod enum in server/src/models/mod.rs
37
+ */
38
+ export declare type AuthMethod = 'email' | 'google' | 'apple' | 'solana' | 'webauthn' | 'sso';
39
+
40
+ /**
41
+ * Authentication response from server
42
+ */
43
+ export declare interface AuthResponse {
44
+ user: AuthUser;
45
+ tokens?: TokenPair;
46
+ isNewUser: boolean;
47
+ callbackData?: Record<string, unknown>;
48
+ }
49
+
50
+ /**
51
+ * Authentication state
52
+ */
53
+ export declare type AuthState = 'idle' | 'loading' | 'authenticated' | 'unauthenticated' | 'error';
54
+
55
+ /**
56
+ * Auth state context — changes only on login/logout/token refresh.
57
+ *
58
+ * Subscribing to this context alone avoids re-renders from UI state
59
+ * changes (modal open/close, error display).
60
+ */
61
+ declare interface AuthStateContextValue {
62
+ config: CedrosLoginConfig;
63
+ user: AuthUser | null;
64
+ authState: AuthState;
65
+ logout: () => Promise<void>;
66
+ refreshUser: () => Promise<void>;
67
+ _internal?: CedrosLoginInternalAPI;
68
+ }
69
+
70
+ /**
71
+ * UI state context — changes on modal/error state changes.
72
+ *
73
+ * Subscribing to this context alone avoids re-renders from auth state
74
+ * changes (login, token refresh).
75
+ */
76
+ declare interface AuthUIContextValue {
77
+ error: AuthError | null;
78
+ isModalOpen: boolean;
79
+ openModal: () => void;
80
+ closeModal: () => void;
81
+ }
82
+
83
+ /**
84
+ * Authenticated user information
85
+ */
86
+ export declare interface AuthUser {
87
+ id: string;
88
+ email?: string;
89
+ name?: string;
90
+ picture?: string;
91
+ walletAddress?: string;
92
+ authMethods: AuthMethod[];
93
+ emailVerified: boolean;
94
+ /** Whether TOTP 2FA is enabled for this user */
95
+ totpEnabled?: boolean;
96
+ createdAt: string;
97
+ updatedAt: string;
98
+ }
99
+
100
+ /**
101
+ * Full configuration for CedrosLoginProvider
102
+ */
103
+ export declare interface CedrosLoginConfig {
104
+ /** Auth server base URL */
105
+ serverUrl: string;
106
+ /** App name for Solana message: "Login to {appName}". Default: window.location.hostname */
107
+ appName?: string;
108
+ /** Google OAuth client ID. Required if Google auth enabled */
109
+ googleClientId?: string;
110
+ /** Apple Sign In client ID (Services ID). Required if Apple auth enabled */
111
+ appleClientId?: string;
112
+ /** Solana configuration options */
113
+ solana?: SolanaConfig;
114
+ /** Enable/disable auth methods */
115
+ features?: FeatureFlags;
116
+ /** Form behavior configuration (forgot password, terms, email opt-in) */
117
+ forms?: FormConfig;
118
+ /** TOTP/2FA configuration (app-based authenticator) */
119
+ totp?: TotpConfig;
120
+ /** Embedded wallet configuration */
121
+ wallet?: WalletConfig;
122
+ /** Session/token configuration */
123
+ session?: SessionConfig;
124
+ /** Authentication event callbacks */
125
+ callbacks?: AuthCallbacks;
126
+ /** Theme mode. Default: 'auto' */
127
+ theme?: ThemeMode;
128
+ /** CSS variable overrides for custom theming */
129
+ themeOverrides?: ThemeOverrides;
130
+ /** API request timeout in ms. Default: 10000 */
131
+ requestTimeout?: number;
132
+ /** Retry attempts on transient errors. Default: 2 */
133
+ retryAttempts?: number;
134
+ }
135
+
136
+ /**
137
+ * Combined context value (backward-compatible with existing consumers)
138
+ */
139
+ declare interface CedrosLoginContextValue extends AuthStateContextValue, AuthUIContextValue {
140
+ }
141
+
142
+ /**
143
+ * Internal helpers for auth hooks (not part of public API)
144
+ */
145
+ declare interface CedrosLoginInternalAPI {
146
+ handleLoginSuccess: (user: AuthUser, tokens?: TokenPair) => void;
147
+ getAccessToken: () => string | null;
148
+ }
149
+
150
+ /**
151
+ * Provider component that wraps your app and provides authentication context.
152
+ *
153
+ * @example
154
+ * ```tsx
155
+ * <CedrosLoginProvider config={{ serverUrl: 'https://api.example.com' }}>
156
+ * <App />
157
+ * </CedrosLoginProvider>
158
+ * ```
159
+ */
160
+ export declare function CedrosLoginProvider({ config, children }: CedrosLoginProviderProps): JSX.Element;
161
+
162
+ declare interface CedrosLoginProviderProps {
163
+ config: CedrosLoginConfig;
164
+ children: ReactNode;
165
+ }
166
+
167
+ /**
168
+ * UI-08: Standardized error prop type for display components.
169
+ *
170
+ * Use this type for component props that display errors to users.
171
+ * Components should handle both AuthError objects and plain strings:
172
+ * - AuthError: structured error from API with code and message
173
+ * - string: simple error message for form validation or local errors
174
+ * - null: no error state
175
+ *
176
+ * @example
177
+ * ```tsx
178
+ * interface MyFormProps {
179
+ * error?: DisplayError;
180
+ * }
181
+ *
182
+ * // In component:
183
+ * const message = typeof error === 'string' ? error : error?.message;
184
+ * ```
185
+ */
186
+ declare type DisplayError = AuthError | string | null;
187
+
188
+ /**
189
+ * Email marketing opt-in checkbox configuration
190
+ */
191
+ declare interface EmailOptInConfig {
192
+ /** Whether to show the checkbox. @default false */
193
+ show?: boolean;
194
+ /** Default checked state. @default false */
195
+ defaultChecked?: boolean;
196
+ /** Custom label text. @default "Send me updates and news" */
197
+ label?: string;
198
+ }
199
+
200
+ /**
201
+ * Error message display component with accessibility support.
202
+ * Announces errors to screen readers and optionally focuses the message.
203
+ * Wrapped with React.memo to prevent unnecessary re-renders.
204
+ */
205
+ export declare const ErrorMessage: NamedExoticComponent<ErrorMessageProps>;
206
+
207
+ declare interface ErrorMessageProps {
208
+ error: DisplayError;
209
+ className?: string;
210
+ onDismiss?: () => void;
211
+ /** If true, focus the error message when it appears (for accessibility) */
212
+ autoFocus?: boolean;
213
+ }
214
+
215
+ /**
216
+ * Feature flags to enable/disable auth methods
217
+ */
218
+ export declare interface FeatureFlags {
219
+ /** Enable email/password auth. Default: true */
220
+ email?: boolean;
221
+ /** Enable Google OAuth. Default: true (requires googleClientId) */
222
+ google?: boolean;
223
+ /** Enable Apple Sign In. Default: true (requires appleClientId) */
224
+ apple?: boolean;
225
+ /** Enable Solana wallet sign-in. Default: true */
226
+ solana?: boolean;
227
+ /** Enable WebAuthn passkeys (server-managed). Default: true */
228
+ webauthn?: boolean;
229
+ /** Enable embedded wallet auto-enrollment on registration. Default: true */
230
+ walletEnrollment?: boolean;
231
+ }
232
+
233
+ /**
234
+ * Forgot password behavior configuration
235
+ */
236
+ declare interface ForgotPasswordConfig {
237
+ /**
238
+ * Mode for handling "forgot password" clicks.
239
+ * - 'reset': Shows ForgotPasswordForm (traditional reset flow)
240
+ * - 'instantLink': Sends an instant link for passwordless sign-in
241
+ * @default 'reset'
242
+ */
243
+ mode?: 'reset' | 'instantLink';
244
+ }
245
+
246
+ /**
247
+ * Form behavior configuration
248
+ */
249
+ declare interface FormConfig {
250
+ /** Forgot password behavior on sign in form */
251
+ forgotPassword?: ForgotPasswordConfig;
252
+ /** Terms of service checkbox on register form */
253
+ termsOfService?: TermsOfServiceConfig;
254
+ /** Email marketing opt-in checkbox on register form */
255
+ emailOptIn?: EmailOptInConfig;
256
+ }
257
+
258
+ /**
259
+ * Google OAuth login button
260
+ */
261
+ export declare function GoogleLoginButton({ onSuccess, onError, className, variant, size, disabled, }: GoogleLoginButtonProps): JSX.Element;
262
+
263
+ declare interface GoogleLoginButtonProps {
264
+ onSuccess?: () => void;
265
+ onError?: (error: Error) => void;
266
+ className?: string;
267
+ variant?: 'default' | 'outline';
268
+ size?: 'sm' | 'md' | 'lg';
269
+ disabled?: boolean;
270
+ }
271
+
272
+ /**
273
+ * Accessible loading spinner component.
274
+ * Announces loading state to screen readers when announce prop is true.
275
+ * Wrapped with React.memo to prevent unnecessary re-renders.
276
+ */
277
+ export declare const LoadingSpinner: NamedExoticComponent<LoadingSpinnerProps>;
278
+
279
+ declare interface LoadingSpinnerProps {
280
+ size?: 'sm' | 'md' | 'lg' | 'xl';
281
+ className?: string;
282
+ style?: CSSProperties;
283
+ /** Custom label for screen readers (default: "Loading") */
284
+ label?: string;
285
+ /** If true, announce the loading state to screen readers */
286
+ announce?: boolean;
287
+ }
288
+
289
+ /**
290
+ * Session handling configuration
291
+ *
292
+ * @security For best security, use the default `cookie` storage with `autoRefresh: true`.
293
+ * Avoid `localStorage` in production unless absolutely necessary.
294
+ */
295
+ export declare interface SessionConfig {
296
+ /**
297
+ * Where to store tokens. Default: 'cookie'
298
+ *
299
+ * @security `cookie` is strongly recommended for production use.
300
+ * See {@link SessionStorage} for security implications of each option.
301
+ */
302
+ storage?: SessionStorage;
303
+ /** Auto-refresh tokens before expiry. Default: true */
304
+ autoRefresh?: boolean;
305
+ /** Sync auth state across browser tabs. Default: true */
306
+ syncTabs?: boolean;
307
+ /** Storage key for tokens when using web storage. Default: 'cedros_tokens' */
308
+ persistKey?: string;
309
+ /**
310
+ * Explicitly allow web storage for tokens.
311
+ *
312
+ * @security This is intentionally opt-in because `localStorage` and
313
+ * `sessionStorage` are vulnerable to XSS token theft.
314
+ *
315
+ * If you enable this, also implement a strict CSP and audit any third-party scripts.
316
+ */
317
+ allowWebStorage?: boolean;
318
+ }
319
+
320
+ /**
321
+ * Session storage mode
322
+ *
323
+ * **Security considerations:**
324
+ * - `cookie`: **Recommended.** HttpOnly cookies managed by server. Immune to XSS.
325
+ * - `memory`: Secure but lost on page refresh. Good for high-security applications.
326
+ * - `localStorage`: **Use with caution.** Tokens are accessible to any JavaScript
327
+ * on the page, making them vulnerable to XSS attacks. Only use when cookie-based
328
+ * auth is not possible (e.g., cross-origin scenarios without proper CORS).
329
+ */
330
+ export declare type SessionStorage = 'cookie' | 'memory' | 'localStorage' | 'sessionStorage';
331
+
332
+ /**
333
+ * Solana configuration options
334
+ */
335
+ declare interface SolanaConfig {
336
+ /** Solana network to connect to. Default: 'mainnet-beta' */
337
+ network?: SolanaNetwork;
338
+ /** Auto-reconnect wallet on page load. Default: false */
339
+ autoConnect?: boolean;
340
+ }
341
+
342
+ /**
343
+ * Solana network configuration
344
+ */
345
+ declare type SolanaNetwork = 'mainnet-beta' | 'devnet';
346
+
347
+ /**
348
+ * Terms of service checkbox configuration
349
+ */
350
+ declare interface TermsOfServiceConfig {
351
+ /** Whether to show the checkbox. @default false */
352
+ show?: boolean;
353
+ /** Whether agreement is required to register. @default true (when shown) */
354
+ required?: boolean;
355
+ /** Default checked state. @default false */
356
+ defaultChecked?: boolean;
357
+ /** URL to terms of service page */
358
+ url?: string;
359
+ /** Custom label text. @default "I agree to the Terms of Service" */
360
+ label?: string;
361
+ }
362
+
363
+ /**
364
+ * Theme mode
365
+ */
366
+ export declare type ThemeMode = 'light' | 'dark' | 'auto';
367
+
368
+ /**
369
+ * CSS variable theme overrides
370
+ */
371
+ export declare interface ThemeOverrides {
372
+ '--cedros-primary'?: string;
373
+ '--cedros-primary-foreground'?: string;
374
+ '--cedros-background'?: string;
375
+ '--cedros-foreground'?: string;
376
+ '--cedros-muted'?: string;
377
+ '--cedros-muted-foreground'?: string;
378
+ '--cedros-border'?: string;
379
+ '--cedros-input'?: string;
380
+ '--cedros-ring'?: string;
381
+ '--cedros-radius'?: string;
382
+ '--cedros-destructive'?: string;
383
+ '--cedros-destructive-foreground'?: string;
384
+ [key: string]: string | undefined;
385
+ }
386
+
387
+ /**
388
+ * JWT token pair returned from authentication
389
+ */
390
+ export declare interface TokenPair {
391
+ accessToken: string;
392
+ refreshToken: string;
393
+ expiresIn: number;
394
+ }
395
+
396
+ /**
397
+ * Two-factor authentication (TOTP) configuration
398
+ *
399
+ * Admin-level settings for app-based 2FA using authenticator apps.
400
+ */
401
+ declare interface TotpConfig {
402
+ /**
403
+ * Whether TOTP 2FA is enabled for the application.
404
+ * @default false
405
+ */
406
+ enabled?: boolean;
407
+ /**
408
+ * Whether TOTP 2FA is required for all users.
409
+ * If false, users can optionally enable it for their account.
410
+ * @default false
411
+ */
412
+ required?: boolean;
413
+ /**
414
+ * Issuer name shown in authenticator apps.
415
+ * @default appName or hostname
416
+ */
417
+ issuer?: string;
418
+ }
419
+
420
+ /**
421
+ * Main authentication hook providing user state and actions.
422
+ *
423
+ * @example
424
+ * ```tsx
425
+ * function MyComponent() {
426
+ * const { user, isAuthenticated, logout, openLoginModal } = useAuth();
427
+ *
428
+ * if (!isAuthenticated) {
429
+ * return <button onClick={openLoginModal}>Login</button>;
430
+ * }
431
+ *
432
+ * return (
433
+ * <div>
434
+ * <p>Welcome, {user?.name}</p>
435
+ * <button onClick={logout}>Logout</button>
436
+ * </div>
437
+ * );
438
+ * }
439
+ * ```
440
+ */
441
+ export declare function useAuth(): UseAuthReturn;
442
+
443
+ declare interface UseAuthReturn {
444
+ user: AuthUser | null;
445
+ authState: AuthState;
446
+ error: AuthError | null;
447
+ isAuthenticated: boolean;
448
+ isLoading: boolean;
449
+ logout: () => Promise<void>;
450
+ refreshUser: () => Promise<void>;
451
+ openLoginModal: () => void;
452
+ closeLoginModal: () => void;
453
+ }
454
+
455
+ /**
456
+ * Hook to access the full Cedros Login context.
457
+ * Must be used within a CedrosLoginProvider.
458
+ *
459
+ * For better performance, prefer `useAuthState()` or `useAuthUI()` when you
460
+ * only need a subset of the context. This hook re-renders on any change.
461
+ */
462
+ export declare function useCedrosLogin(): CedrosLoginContextValue;
463
+
464
+ /**
465
+ * Hook for Google OAuth authentication.
466
+ *
467
+ * @example
468
+ * ```tsx
469
+ * function GoogleButton() {
470
+ * const { signIn, isLoading, isInitialized, error } = useGoogleAuth();
471
+ *
472
+ * return (
473
+ * <button onClick={signIn} disabled={!isInitialized || isLoading}>
474
+ * {isLoading ? 'Signing in...' : 'Sign in with Google'}
475
+ * </button>
476
+ * );
477
+ * }
478
+ * ```
479
+ */
480
+ export declare function useGoogleAuth(): UseGoogleAuthReturn;
481
+
482
+ declare interface UseGoogleAuthReturn {
483
+ signIn: () => Promise<AuthResponse>;
484
+ isLoading: boolean;
485
+ isInitialized: boolean;
486
+ error: AuthError | null;
487
+ clearError: () => void;
488
+ }
489
+
490
+ /**
491
+ * Embedded wallet configuration
492
+ *
493
+ * Controls whether the embedded wallet is advertised to other Cedros modules
494
+ * (like cedros-pay) running in the same application.
495
+ */
496
+ declare interface WalletConfig {
497
+ /**
498
+ * Expose embedded wallet availability via window global.
499
+ *
500
+ * When enabled, sets `window.__CEDROS_EMBEDDED_WALLET__` with:
501
+ * - `available`: boolean - whether user has enrolled SSS wallet
502
+ * - `publicKey`: string | null - Solana public key if available
503
+ *
504
+ * This allows other modules (e.g., cedros-pay) to detect embedded wallet
505
+ * and offer crypto payment options to users without browser wallet extensions.
506
+ *
507
+ * @security The signing function is NOT exposed on window. Signing must go
508
+ * through React context (useTransactionSigning hook) to prevent unauthorized
509
+ * access by arbitrary scripts.
510
+ *
511
+ * @default false
512
+ */
513
+ exposeAvailability?: boolean;
514
+ /**
515
+ * Whether to include the user's wallet public key in the window global.
516
+ *
517
+ * @security This is a privacy tradeoff: exposing a stable identifier on `window`
518
+ * makes it available to any script on the page.
519
+ *
520
+ * If you only need to know whether an embedded wallet exists, keep this `false`.
521
+ *
522
+ * @default false
523
+ */
524
+ exposePublicKey?: boolean;
525
+ /**
526
+ * SEC-004: Allowed domains for WebAuthn RP ID validation.
527
+ *
528
+ * In production, passkey operations will be rejected if the current hostname
529
+ * is not in this list. This prevents passkey registration on malicious domains
530
+ * that might be serving the app.
531
+ *
532
+ * @security Without this, an attacker could phish users to a lookalike domain
533
+ * and get them to register passkeys that only work on the malicious domain.
534
+ * While this doesn't compromise real credentials, it can be used in social
535
+ * engineering attacks.
536
+ *
537
+ * @example ['myapp.com', 'app.myapp.com']
538
+ * @default [] (localhost/127.0.0.1 always allowed for development)
539
+ */
540
+ allowedRpDomains?: string[];
541
+ }
542
+
543
+ export { }
@@ -1,11 +1,14 @@
1
- import { C as e, E as r, L as a, a as u, u as g } from "./ErrorMessage-DU2VBb85.js";
2
- import { G as i, u as t } from "./GoogleLoginButton-BzHr545L.js";
1
+ import { C as e, u as s } from "./useAuth-Bge6KaWN.js";
2
+ import { u as t } from "./apiClient-B2JxVPlH.js";
3
+ import { G as g, u as n } from "./GoogleLoginButton-B3uRMJ_n.js";
4
+ import { L as p } from "./LoadingSpinner-6vml-zwr.js";
5
+ import { E as m } from "./ErrorMessage-CcEK0pYO.js";
3
6
  export {
4
7
  e as CedrosLoginProvider,
5
- r as ErrorMessage,
6
- i as GoogleLoginButton,
7
- a as LoadingSpinner,
8
- u as useAuth,
9
- g as useCedrosLogin,
10
- t as useGoogleAuth
8
+ m as ErrorMessage,
9
+ g as GoogleLoginButton,
10
+ p as LoadingSpinner,
11
+ s as useAuth,
12
+ t as useCedrosLogin,
13
+ n as useGoogleAuth
11
14
  };
@@ -1 +1 @@
1
- {"version":3,"file":"google-only.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
1
+ {"version":3,"file":"google-only.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}