@cedros/login-react 0.0.46 → 0.0.48

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 (95) hide show
  1. package/README.md +32 -2
  2. package/dist/AdminWithdrawalHistory-CgYehfMH.js +948 -0
  3. package/dist/AdminWithdrawalHistory-CgYehfMH.js.map +1 -0
  4. package/dist/AdminWithdrawalHistory-zDUhPDNi.cjs +1 -0
  5. package/dist/AdminWithdrawalHistory-zDUhPDNi.cjs.map +1 -0
  6. package/dist/EmailRegisterForm-ByYQ43yL.cjs +1 -0
  7. package/dist/EmailRegisterForm-ByYQ43yL.cjs.map +1 -0
  8. package/dist/EmailRegisterForm-DMUcNQT-.js +781 -0
  9. package/dist/EmailRegisterForm-DMUcNQT-.js.map +1 -0
  10. package/dist/GoogleLoginButton-DEwtBp56.cjs +1 -0
  11. package/dist/GoogleLoginButton-DEwtBp56.cjs.map +1 -0
  12. package/dist/{GoogleLoginButton-C1WNu7W3.js → GoogleLoginButton-DwyxvhnL.js} +82 -80
  13. package/dist/GoogleLoginButton-DwyxvhnL.js.map +1 -0
  14. package/dist/{PermissionsSection-mm9hfp-u.js → PermissionsSection-0oNHPZzL.js} +383 -415
  15. package/dist/PermissionsSection-0oNHPZzL.js.map +1 -0
  16. package/dist/PermissionsSection-CZsJuxo4.cjs +1 -0
  17. package/dist/PermissionsSection-CZsJuxo4.cjs.map +1 -0
  18. package/dist/SolanaLoginButton-2504p6cr.cjs +1 -0
  19. package/dist/SolanaLoginButton-2504p6cr.cjs.map +1 -0
  20. package/dist/SolanaLoginButton-C7Kc_m6n.js +234 -0
  21. package/dist/SolanaLoginButton-C7Kc_m6n.js.map +1 -0
  22. package/dist/{TeamSection-Km7EwLWD.cjs → TeamSection-DN8PEHH3.cjs} +1 -1
  23. package/dist/{TeamSection-Km7EwLWD.cjs.map → TeamSection-DN8PEHH3.cjs.map} +1 -1
  24. package/dist/{TeamSection-C_eODdLU.js → TeamSection-gUyP4YDM.js} +1 -1
  25. package/dist/{TeamSection-C_eODdLU.js.map → TeamSection-gUyP4YDM.js.map} +1 -1
  26. package/dist/{UsersSection-C1Tt0ePx.cjs → UsersSection-8wLuD0fr.cjs} +1 -1
  27. package/dist/{UsersSection-C1Tt0ePx.cjs.map → UsersSection-8wLuD0fr.cjs.map} +1 -1
  28. package/dist/{UsersSection-Ct_E-MBF.js → UsersSection-CnsFrG-6.js} +1 -1
  29. package/dist/{UsersSection-Ct_E-MBF.js.map → UsersSection-CnsFrG-6.js.map} +1 -1
  30. package/dist/{WithdrawalsSection-BN-FjTEV.js → WithdrawalsSection-BCG_-DAP.js} +1 -1
  31. package/dist/{WithdrawalsSection-BN-FjTEV.js.map → WithdrawalsSection-BCG_-DAP.js.map} +1 -1
  32. package/dist/{WithdrawalsSection-BhuCwFat.cjs → WithdrawalsSection-DKpL2mt8.cjs} +1 -1
  33. package/dist/{WithdrawalsSection-BhuCwFat.cjs.map → WithdrawalsSection-DKpL2mt8.cjs.map} +1 -1
  34. package/dist/admin-only.cjs +1 -1
  35. package/dist/admin-only.js +1 -1
  36. package/dist/email-only.cjs +1 -1
  37. package/dist/email-only.d.ts +10 -2
  38. package/dist/email-only.js +2 -2
  39. package/dist/google-only.cjs +1 -1
  40. package/dist/google-only.d.ts +7 -2
  41. package/dist/google-only.js +2 -2
  42. package/dist/index.cjs +12 -12
  43. package/dist/index.cjs.map +1 -1
  44. package/dist/index.d.ts +182 -11
  45. package/dist/index.js +5000 -4409
  46. package/dist/index.js.map +1 -1
  47. package/dist/login-react.css +1 -1
  48. package/dist/{plugin-Ci67QMGG.cjs → plugin-C7dru1t-.cjs} +1 -1
  49. package/dist/{plugin-Ci67QMGG.cjs.map → plugin-C7dru1t-.cjs.map} +1 -1
  50. package/dist/{plugin-Cm8Q6O4-.js → plugin-DivbaxSZ.js} +1 -1
  51. package/dist/{plugin-Cm8Q6O4-.js.map → plugin-DivbaxSZ.js.map} +1 -1
  52. package/dist/solana-only.cjs +1 -1
  53. package/dist/solana-only.d.ts +6 -1
  54. package/dist/solana-only.js +2 -2
  55. package/dist/useAuth-2vgrAH-M.cjs +1 -0
  56. package/dist/useAuth-2vgrAH-M.cjs.map +1 -0
  57. package/dist/{useAuth-l-itM5am.js → useAuth-CNflw856.js} +465 -469
  58. package/dist/useAuth-CNflw856.js.map +1 -0
  59. package/dist/useServerFeatures-9_aNPaa6.cjs +1 -0
  60. package/dist/useServerFeatures-9_aNPaa6.cjs.map +1 -0
  61. package/dist/useServerFeatures-DSkYdan-.js +82 -0
  62. package/dist/useServerFeatures-DSkYdan-.js.map +1 -0
  63. package/dist/{useUsersStatsSummary-BGeh3RnI.js → useUsersStatsSummary-B4_RBEYy.js} +504 -442
  64. package/dist/useUsersStatsSummary-B4_RBEYy.js.map +1 -0
  65. package/dist/useUsersStatsSummary-CHRMrlk4.cjs +1 -0
  66. package/dist/useUsersStatsSummary-CHRMrlk4.cjs.map +1 -0
  67. package/package.json +1 -1
  68. package/dist/AdminWithdrawalHistory-B2EY2ZmH.cjs +0 -1
  69. package/dist/AdminWithdrawalHistory-B2EY2ZmH.cjs.map +0 -1
  70. package/dist/AdminWithdrawalHistory-C76bkbjX.js +0 -916
  71. package/dist/AdminWithdrawalHistory-C76bkbjX.js.map +0 -1
  72. package/dist/EmailRegisterForm-p2X5QP58.js +0 -750
  73. package/dist/EmailRegisterForm-p2X5QP58.js.map +0 -1
  74. package/dist/EmailRegisterForm-xFb6MaVA.cjs +0 -1
  75. package/dist/EmailRegisterForm-xFb6MaVA.cjs.map +0 -1
  76. package/dist/GoogleLoginButton-2zNTIKMm.cjs +0 -1
  77. package/dist/GoogleLoginButton-2zNTIKMm.cjs.map +0 -1
  78. package/dist/GoogleLoginButton-C1WNu7W3.js.map +0 -1
  79. package/dist/PermissionsSection-4zcE9Zs9.cjs +0 -1
  80. package/dist/PermissionsSection-4zcE9Zs9.cjs.map +0 -1
  81. package/dist/PermissionsSection-mm9hfp-u.js.map +0 -1
  82. package/dist/SolanaLoginButton-CqdzSSeJ.cjs +0 -1
  83. package/dist/SolanaLoginButton-CqdzSSeJ.cjs.map +0 -1
  84. package/dist/SolanaLoginButton-CyeX35eU.js +0 -232
  85. package/dist/SolanaLoginButton-CyeX35eU.js.map +0 -1
  86. package/dist/sanitization-Bo_tn-L2.cjs +0 -1
  87. package/dist/sanitization-Bo_tn-L2.cjs.map +0 -1
  88. package/dist/sanitization-CQ-H1MSg.js +0 -39
  89. package/dist/sanitization-CQ-H1MSg.js.map +0 -1
  90. package/dist/useAuth-B1yS_YiD.cjs +0 -1
  91. package/dist/useAuth-B1yS_YiD.cjs.map +0 -1
  92. package/dist/useAuth-l-itM5am.js.map +0 -1
  93. package/dist/useUsersStatsSummary-BGeh3RnI.js.map +0 -1
  94. package/dist/useUsersStatsSummary-DnsYtFGX.cjs +0 -1
  95. package/dist/useUsersStatsSummary-DnsYtFGX.cjs.map +0 -1
package/README.md CHANGED
@@ -204,7 +204,8 @@ function AuthStatus() {
204
204
 
205
205
  | Component | Description |
206
206
  |-----------|-------------|
207
- | `CedrosAdminDashboard` | Complete standalone admin panel with sidebar navigation and all sections |
207
+ | `CedrosAdminDashboard` | Complete standalone admin panel with sidebar navigation and all sections. **Auto-detects first run and shows SetupWizard.** |
208
+ | `SetupWizard` | First-run setup wizard — creates the first admin account (email, password, name, org). Shown automatically by `CedrosAdminDashboard` when no admin exists. |
208
209
  | `AdminShell` | Plugin host for combining multiple admin dashboards (cedros-login + cedros-pay) |
209
210
  | `AdminPanel` | Legacy admin dashboard with tabs for members, invites, sessions, system settings |
210
211
  | `SystemSettings` | System settings editor (privacy, withdrawal, rate limits) - system admin only |
@@ -1367,7 +1368,9 @@ function AdminStatsWidget() {
1367
1368
 
1368
1369
  ### Admin Dashboard
1369
1370
 
1370
- The `CedrosAdminDashboard` is a complete, ready-to-use admin panel with sidebar navigation:
1371
+ The `CedrosAdminDashboard` is a complete, ready-to-use admin panel with sidebar navigation.
1372
+
1373
+ **First-run setup is automatic** — when no admin user exists, the dashboard shows a WordPress-style setup wizard instead of the normal admin interface. The wizard prompts for email, password, name, and organization name to create the first admin account. Once created, it reloads into the full dashboard. No env vars or SQL needed.
1371
1374
 
1372
1375
  ```tsx
1373
1376
  import { CedrosAdminDashboard } from '@cedros/login-react';
@@ -1385,16 +1388,43 @@ function AdminPage() {
1385
1388
  }
1386
1389
  ```
1387
1390
 
1391
+ If you need custom setup flow control, use the `SetupWizard` component directly:
1392
+
1393
+ ```tsx
1394
+ import { SetupWizard, useSetup, CedrosAdminDashboard } from '@cedros/login-react';
1395
+
1396
+ function AdminApp() {
1397
+ const { status, isLoading, checkStatus } = useSetup();
1398
+
1399
+ useEffect(() => { checkStatus(); }, [checkStatus]);
1400
+
1401
+ if (isLoading) return <div>Loading...</div>;
1402
+ if (status?.needsSetup) {
1403
+ return <SetupWizard onComplete={() => window.location.reload()} />;
1404
+ }
1405
+ return <CedrosAdminDashboard />;
1406
+ }
1407
+ ```
1408
+
1388
1409
  **Available sections:**
1389
1410
  - `users` - User management with stats (system admin only)
1390
1411
  - `team` - Organization members and pending invites
1412
+ - `referrals` - Referral analytics and payout management
1391
1413
  - `deposits` - Browse all deposits with status filtering
1392
1414
  - `withdrawals` - Process company withdrawal queue
1415
+ - `compliance` - Token gate rule management
1416
+ - `accreditation-queue` - Review accredited investor submissions
1417
+ - `sanctions` - Sanctions screening stats and refresh
1418
+ - `signup-gating` - Access code management and signup stats
1393
1419
  - `settings-auth` - Authentication settings (OAuth, passkeys, etc.)
1394
1420
  - `settings-messaging` - Email/SMTP and webhook configuration
1395
1421
  - `settings-wallet` - User wallet settings
1396
1422
  - `settings-credits` - Credit system and treasury configuration
1423
+ - `settings-compliance` - KYC, accreditation, sanctions, token gating settings
1424
+ - `settings-referrals` - Referral reward configuration
1425
+ - `settings-signup` - Signup volume limits and access code settings
1397
1426
  - `settings-server` - Auth server settings
1427
+ - `settings-images` - Image storage (S3) settings
1398
1428
 
1399
1429
  ### Unified Admin Dashboard (Plugin System)
1400
1430