@cedros/login-react 0.0.15 → 0.0.16

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 (125) hide show
  1. package/dist/{AuthenticationSettings-Dg6ATgOl.js → AuthenticationSettings-BipaLyGg.js} +19 -19
  2. package/dist/{AuthenticationSettings-Dg6ATgOl.js.map → AuthenticationSettings-BipaLyGg.js.map} +1 -1
  3. package/dist/{AuthenticationSettings-CjGGqbcS.cjs → AuthenticationSettings-Cb80XWPm.cjs} +1 -1
  4. package/dist/{AuthenticationSettings-CjGGqbcS.cjs.map → AuthenticationSettings-Cb80XWPm.cjs.map} +1 -1
  5. package/dist/{AuthenticationSettings-DGWktSVw.js → AuthenticationSettings-Cfn0No6U.js} +1 -1
  6. package/dist/{AuthenticationSettings-DGWktSVw.js.map → AuthenticationSettings-Cfn0No6U.js.map} +1 -1
  7. package/dist/{AuthenticationSettings-HhrUAmM6.cjs → AuthenticationSettings-Cu0S0Z7s.cjs} +1 -1
  8. package/dist/{AuthenticationSettings-HhrUAmM6.cjs.map → AuthenticationSettings-Cu0S0Z7s.cjs.map} +1 -1
  9. package/dist/{AutosaveStatus-DeViUyyI.js → AutosaveStatus-BKc7T2Tw.js} +323 -242
  10. package/dist/AutosaveStatus-BKc7T2Tw.js.map +1 -0
  11. package/dist/AutosaveStatus-BjLMt52a.cjs +1 -0
  12. package/dist/AutosaveStatus-BjLMt52a.cjs.map +1 -0
  13. package/dist/{CreditSystemSettings-DBr7QS59.js → CreditSystemSettings-CvcacgMM.js} +1 -1
  14. package/dist/{CreditSystemSettings-DBr7QS59.js.map → CreditSystemSettings-CvcacgMM.js.map} +1 -1
  15. package/dist/{CreditSystemSettings-CSlsQynZ.js → CreditSystemSettings-D13lZbIw.js} +1 -1
  16. package/dist/{CreditSystemSettings-CSlsQynZ.js.map → CreditSystemSettings-D13lZbIw.js.map} +1 -1
  17. package/dist/{CreditSystemSettings-CyFQbXMh.cjs → CreditSystemSettings-DO-dUcxN.cjs} +1 -1
  18. package/dist/{CreditSystemSettings-CyFQbXMh.cjs.map → CreditSystemSettings-DO-dUcxN.cjs.map} +1 -1
  19. package/dist/{CreditSystemSettings-BykhytcS.cjs → CreditSystemSettings-DV0VkPIe.cjs} +1 -1
  20. package/dist/{CreditSystemSettings-BykhytcS.cjs.map → CreditSystemSettings-DV0VkPIe.cjs.map} +1 -1
  21. package/dist/{EmailRegisterForm-Pvm3I8GP.cjs → EmailRegisterForm-DcpT5LU6.cjs} +1 -1
  22. package/dist/{EmailRegisterForm-Pvm3I8GP.cjs.map → EmailRegisterForm-DcpT5LU6.cjs.map} +1 -1
  23. package/dist/{EmailRegisterForm-nI0BOIxR.js → EmailRegisterForm-HMcnD3KA.js} +1 -1
  24. package/dist/{EmailRegisterForm-nI0BOIxR.js.map → EmailRegisterForm-HMcnD3KA.js.map} +1 -1
  25. package/dist/{EmailSettings-Bup2rCgU.cjs → EmailSettings-BkR7vlWL.cjs} +1 -1
  26. package/dist/{EmailSettings-Bup2rCgU.cjs.map → EmailSettings-BkR7vlWL.cjs.map} +1 -1
  27. package/dist/EmailSettings-CLMdw3rB.js +78 -0
  28. package/dist/EmailSettings-CLMdw3rB.js.map +1 -0
  29. package/dist/EmailSettings-Dq3mfUr2.cjs +1 -0
  30. package/dist/EmailSettings-Dq3mfUr2.cjs.map +1 -0
  31. package/dist/{EmailSettings-C04qdJCz.js → EmailSettings-ulEHtH2y.js} +1 -1
  32. package/dist/{EmailSettings-C04qdJCz.js.map → EmailSettings-ulEHtH2y.js.map} +1 -1
  33. package/dist/{EmbeddedWalletSettings-DYh884HP.js → EmbeddedWalletSettings-BTTV8Nqi.js} +46 -31
  34. package/dist/EmbeddedWalletSettings-BTTV8Nqi.js.map +1 -0
  35. package/dist/EmbeddedWalletSettings-C7H0E8Uz.cjs +1 -0
  36. package/dist/EmbeddedWalletSettings-C7H0E8Uz.cjs.map +1 -0
  37. package/dist/{EmbeddedWalletSettings-DDFQhQOw.js → EmbeddedWalletSettings-CLWh2TbV.js} +1 -1
  38. package/dist/{EmbeddedWalletSettings-DDFQhQOw.js.map → EmbeddedWalletSettings-CLWh2TbV.js.map} +1 -1
  39. package/dist/{EmbeddedWalletSettings-YX0Dk_b_.cjs → EmbeddedWalletSettings-DGmCVyex.cjs} +1 -1
  40. package/dist/{EmbeddedWalletSettings-YX0Dk_b_.cjs.map → EmbeddedWalletSettings-DGmCVyex.cjs.map} +1 -1
  41. package/dist/PermissionsSection-BPbE-hNx.cjs.map +1 -1
  42. package/dist/PermissionsSection-CighC1p6.js.map +1 -1
  43. package/dist/{ServerSettings-CInJe4jY.cjs → ServerSettings-CPAoiDtn.cjs} +1 -1
  44. package/dist/{ServerSettings-CInJe4jY.cjs.map → ServerSettings-CPAoiDtn.cjs.map} +1 -1
  45. package/dist/ServerSettings-Ch8MCmAY.js +91 -0
  46. package/dist/ServerSettings-Ch8MCmAY.js.map +1 -0
  47. package/dist/ServerSettings-CqDd59iM.cjs +1 -0
  48. package/dist/ServerSettings-CqDd59iM.cjs.map +1 -0
  49. package/dist/{ServerSettings-DVEtfDQo.js → ServerSettings-DooVeOet.js} +1 -1
  50. package/dist/{ServerSettings-DVEtfDQo.js.map → ServerSettings-DooVeOet.js.map} +1 -1
  51. package/dist/{WebhookSettings-DdbxNPZ9.js → WebhookSettings-B6mjH90_.js} +1 -1
  52. package/dist/{WebhookSettings-DdbxNPZ9.js.map → WebhookSettings-B6mjH90_.js.map} +1 -1
  53. package/dist/WebhookSettings-BG77iqJC.js +63 -0
  54. package/dist/WebhookSettings-BG77iqJC.js.map +1 -0
  55. package/dist/{WebhookSettings-BMeykdRP.cjs → WebhookSettings-BeiUAcKs.cjs} +1 -1
  56. package/dist/{WebhookSettings-BMeykdRP.cjs.map → WebhookSettings-BeiUAcKs.cjs.map} +1 -1
  57. package/dist/WebhookSettings-WMJ5zPjY.cjs +1 -0
  58. package/dist/WebhookSettings-WMJ5zPjY.cjs.map +1 -0
  59. package/dist/admin-only.cjs +1 -1
  60. package/dist/admin-only.d.ts +109 -14
  61. package/dist/admin-only.js +4 -3
  62. package/dist/email-only.cjs +1 -1
  63. package/dist/email-only.d.ts +56 -6
  64. package/dist/email-only.js +2 -2
  65. package/dist/google-only.cjs +1 -1
  66. package/dist/google-only.d.ts +56 -6
  67. package/dist/google-only.js +1 -1
  68. package/dist/index.cjs +13 -13
  69. package/dist/index.cjs.map +1 -1
  70. package/dist/index.d.ts +330 -34
  71. package/dist/index.js +2505 -3553
  72. package/dist/index.js.map +1 -1
  73. package/dist/login-react.css +1 -1
  74. package/dist/mobileWalletAdapter-Dp4yFxCm.cjs +1 -0
  75. package/dist/mobileWalletAdapter-Dp4yFxCm.cjs.map +1 -0
  76. package/dist/mobileWalletAdapter-coZRD4Yx.js +291 -0
  77. package/dist/mobileWalletAdapter-coZRD4Yx.js.map +1 -0
  78. package/dist/{plugin-CnbFRy5o.cjs → plugin-BgMAc6DA.cjs} +1 -1
  79. package/dist/{plugin-CnbFRy5o.cjs.map → plugin-BgMAc6DA.cjs.map} +1 -1
  80. package/dist/{plugin-CW_ycXye.js → plugin-Bhf9zaly.js} +82 -70
  81. package/dist/{plugin-CW_ycXye.js.map → plugin-Bhf9zaly.js.map} +1 -1
  82. package/dist/{shamir-L-s-Tp1Z.js → shamir-CDbZS8I1.js} +1 -1
  83. package/dist/{shamir-L-s-Tp1Z.js.map → shamir-CDbZS8I1.js.map} +1 -1
  84. package/dist/{shamir-4DyQMJCk.cjs → shamir-DAa54dMh.cjs} +1 -1
  85. package/dist/{shamir-4DyQMJCk.cjs.map → shamir-DAa54dMh.cjs.map} +1 -1
  86. package/dist/{silentWalletEnroll-DWt6Pr3B.js → silentWalletEnroll-CRHzr4Zy.js} +2 -2
  87. package/dist/{silentWalletEnroll-DWt6Pr3B.js.map → silentWalletEnroll-CRHzr4Zy.js.map} +1 -1
  88. package/dist/{silentWalletEnroll-BgTb4H5I.cjs → silentWalletEnroll-Dl_oFapH.cjs} +1 -1
  89. package/dist/{silentWalletEnroll-BgTb4H5I.cjs.map → silentWalletEnroll-Dl_oFapH.cjs.map} +1 -1
  90. package/dist/solana-only.cjs +1 -1
  91. package/dist/solana-only.d.ts +112 -6
  92. package/dist/solana-only.js +6 -5
  93. package/dist/{useAuth-C3dpk0po.js → useAuth-D1NSN6yY.js} +822 -777
  94. package/dist/useAuth-D1NSN6yY.js.map +1 -0
  95. package/dist/{useAuth-D3Pk_H3z.cjs → useAuth-dS_6wAMp.cjs} +1 -1
  96. package/dist/useAuth-dS_6wAMp.cjs.map +1 -0
  97. package/package.json +4 -1
  98. package/dist/AutosaveStatus-BDWxAg4U.cjs +0 -1
  99. package/dist/AutosaveStatus-BDWxAg4U.cjs.map +0 -1
  100. package/dist/AutosaveStatus-DeViUyyI.js.map +0 -1
  101. package/dist/EmailSettings-C0Ss6Cne.cjs +0 -1
  102. package/dist/EmailSettings-C0Ss6Cne.cjs.map +0 -1
  103. package/dist/EmailSettings-DAqH_xum.js +0 -17
  104. package/dist/EmailSettings-DAqH_xum.js.map +0 -1
  105. package/dist/EmbeddedWalletSettings-B0XkNuPR.cjs +0 -1
  106. package/dist/EmbeddedWalletSettings-B0XkNuPR.cjs.map +0 -1
  107. package/dist/EmbeddedWalletSettings-DYh884HP.js.map +0 -1
  108. package/dist/ServerSettings-CwnEI-PC.cjs +0 -1
  109. package/dist/ServerSettings-CwnEI-PC.cjs.map +0 -1
  110. package/dist/ServerSettings-DakhpYcO.js +0 -84
  111. package/dist/ServerSettings-DakhpYcO.js.map +0 -1
  112. package/dist/SettingsPageLayout-C6DWgyXS.cjs +0 -1
  113. package/dist/SettingsPageLayout-C6DWgyXS.cjs.map +0 -1
  114. package/dist/SettingsPageLayout-CLJI6hFQ.js +0 -50
  115. package/dist/SettingsPageLayout-CLJI6hFQ.js.map +0 -1
  116. package/dist/SolanaLoginButton-BjOxpE1C.cjs +0 -1
  117. package/dist/SolanaLoginButton-BjOxpE1C.cjs.map +0 -1
  118. package/dist/SolanaLoginButton-P22QjBaO.js +0 -262
  119. package/dist/SolanaLoginButton-P22QjBaO.js.map +0 -1
  120. package/dist/WebhookSettings-BNVooF0B.cjs +0 -1
  121. package/dist/WebhookSettings-BNVooF0B.cjs.map +0 -1
  122. package/dist/WebhookSettings-DXeDYhAe.js +0 -17
  123. package/dist/WebhookSettings-DXeDYhAe.js.map +0 -1
  124. package/dist/useAuth-C3dpk0po.js.map +0 -1
  125. package/dist/useAuth-D3Pk_H3z.cjs.map +0 -1
@@ -1,77 +1,15 @@
1
- import { useState as k, useRef as T, useEffect as O, useCallback as d, useMemo as S } from "react";
2
- import { u as E } from "./useSystemSettings-DBlAMjFi.js";
3
1
  import { jsx as t, jsxs as u, Fragment as f } from "react/jsx-runtime";
4
- const U = 800, I = 2e3;
5
- function X() {
6
- const { settings: e, isLoading: l, error: a, fetchSettings: n, updateSettings: s } = E(), [i, p] = k({}), [r, o] = k("idle"), [c, m] = k(null), h = T(null), y = T(null), w = T({});
7
- O(() => () => {
8
- h.current && clearTimeout(h.current), y.current && clearTimeout(y.current);
9
- }, []);
10
- const N = d(async () => {
11
- const _ = { ...w.current };
12
- if (Object.keys(_).length === 0) {
13
- o("idle");
14
- return;
15
- }
16
- o("saving"), m(null);
17
- const v = Object.entries(_).map(([b, g]) => ({
18
- key: b,
19
- value: g
20
- }));
21
- try {
22
- await s(v), p((b) => {
23
- const g = { ...b };
24
- for (const C of Object.keys(_))
25
- delete g[C];
26
- return g;
27
- });
28
- for (const b of Object.keys(_))
29
- delete w.current[b];
30
- o("saved"), y.current && clearTimeout(y.current), y.current = setTimeout(() => {
31
- o("idle");
32
- }, I);
33
- } catch (b) {
34
- o("error"), m(b instanceof Error ? b.message : "Failed to save");
35
- }
36
- }, [s]), D = d(
37
- (_, v) => {
38
- p((b) => ({ ...b, [_]: v })), w.current[_] = v, m(null), o("pending"), h.current && clearTimeout(h.current), h.current = setTimeout(() => {
39
- N();
40
- }, U);
41
- },
42
- [N]
43
- ), A = d(
44
- (_) => {
45
- if (i[_] !== void 0) return i[_];
46
- for (const v of Object.values(e)) {
47
- const b = v.find((g) => g.key === _);
48
- if (b) return b.value;
49
- }
50
- return "";
51
- },
52
- [i, e]
53
- );
54
- return {
55
- settings: e,
56
- edits: i,
57
- isLoading: l,
58
- autosaveStatus: r,
59
- autosaveError: c,
60
- error: a,
61
- fetchSettings: n,
62
- handleChange: D,
63
- getEffectiveValue: A
64
- };
2
+ import { useMemo as T, useCallback as d, useState as w, useRef as S, useEffect as O } from "react";
3
+ import { u as E } from "./useSystemSettings-DBlAMjFi.js";
4
+ function I(e) {
5
+ const s = Math.floor(e / 86400), a = Math.floor(e % 86400 / 3600), r = Math.floor(e % 3600 / 60), l = e % 60;
6
+ return { days: s, hours: a, minutes: r, seconds: l };
65
7
  }
66
8
  function M(e) {
67
- const l = Math.floor(e / 86400), a = Math.floor(e % 86400 / 3600), n = Math.floor(e % 3600 / 60), s = e % 60;
68
- return { days: l, hours: a, minutes: n, seconds: s };
9
+ const { days: s, hours: a, minutes: r } = I(e), l = [];
10
+ return s > 0 && l.push(`${s}d`), a > 0 && l.push(`${a}h`), r > 0 && l.push(`${r}m`), l.length === 0 && l.push(`${e}s`), l.join(" ");
69
11
  }
70
- function R(e) {
71
- const { days: l, hours: a, minutes: n } = M(e), s = [];
72
- return l > 0 && s.push(`${l}d`), a > 0 && s.push(`${a}h`), n > 0 && s.push(`${n}m`), s.length === 0 && s.push(`${e}s`), s.join(" ");
73
- }
74
- const q = {
12
+ const R = {
75
13
  // ============= Authentication Providers =============
76
14
  // Email auth
77
15
  auth_email_enabled: {
@@ -96,47 +34,35 @@ const q = {
96
34
  auth_google_enabled: {
97
35
  key: "auth_google_enabled",
98
36
  label: "Enable Google Sign-In",
99
- description: "Allow users to authenticate with their Google account.",
37
+ description: 'Allow users to authenticate with their Google account. Configure at <a href="https://console.cloud.google.com/apis/credentials" target="_blank" rel="noopener">Google Cloud Console &gt; Credentials</a>.',
100
38
  inputType: "boolean"
101
39
  },
102
40
  auth_google_client_id: {
103
41
  key: "auth_google_client_id",
104
42
  label: "Google Client ID",
105
- description: "OAuth 2.0 client ID from Google Cloud Console.",
43
+ description: "OAuth 2.0 client ID from Google Cloud Console. Create a Web application credential and add your frontend URL to Authorized JavaScript origins.",
106
44
  inputType: "text"
107
45
  },
108
46
  // Apple OAuth
109
47
  auth_apple_enabled: {
110
48
  key: "auth_apple_enabled",
111
49
  label: "Enable Sign in with Apple",
112
- description: "Allow users to authenticate with their Apple ID.",
50
+ description: 'Allow users to authenticate with their Apple ID. Configure at <a href="https://developer.apple.com/account/resources/identifiers" target="_blank" rel="noopener">Apple Developer &gt; Identifiers</a>.',
113
51
  inputType: "boolean"
114
52
  },
115
53
  auth_apple_client_id: {
116
54
  key: "auth_apple_client_id",
117
55
  label: "Apple Services ID",
118
- description: "The Services ID configured in your Apple Developer account.",
119
- inputType: "text"
56
+ description: "Your Client ID (e.g. com.yourdomain.service). Create at Identifiers &gt; Services IDs, then enable Sign in with Apple and add your frontend URL as a Return URL (e.g. https://yourdomain.com).",
57
+ inputType: "text",
58
+ placeholder: "com.yourdomain.service"
120
59
  },
121
60
  auth_apple_team_id: {
122
61
  key: "auth_apple_team_id",
123
62
  label: "Apple Team ID",
124
- description: "Your Apple Developer Team ID.",
63
+ description: 'Identifies your developer account. Found at the top-right of <a href="https://developer.apple.com/account" target="_blank" rel="noopener">Apple Developer</a>.',
125
64
  inputType: "text"
126
65
  },
127
- auth_apple_key_id: {
128
- key: "auth_apple_key_id",
129
- label: "Apple Key ID",
130
- description: "The Key ID for your Sign in with Apple private key.",
131
- inputType: "text"
132
- },
133
- auth_apple_private_key: {
134
- key: "auth_apple_private_key",
135
- label: "Apple Private Key",
136
- description: "The private key file contents (PEM format) for Sign in with Apple.",
137
- inputType: "secret",
138
- multiline: !0
139
- },
140
66
  // Solana auth
141
67
  auth_solana_enabled: {
142
68
  key: "auth_solana_enabled",
@@ -241,12 +167,12 @@ const q = {
241
167
  wallet_recovery_mode: {
242
168
  key: "wallet_recovery_mode",
243
169
  label: "Recovery Mode",
244
- description: "How users can recover their wallet if they lose access.",
170
+ description: "Controls whether users can recover their embedded wallet seed. <b>Share C Only</b> lets users export a single key share (cannot reconstruct the full seed). <b>Full Seed</b> lets users export the complete seed phrase. <b>No Recovery</b> prevents any seed export — required when Private Deposits are enabled, because recoverable seeds would let users front-run privacy withdrawals.",
245
171
  inputType: "select",
246
172
  presets: [
247
173
  { label: "Share C Only (Recommended)", value: "share_c_only" },
248
174
  { label: "Full Seed Phrase", value: "full_seed" },
249
- { label: "No Recovery", value: "none" }
175
+ { label: "No Recovery (Required for Private Deposits)", value: "none" }
250
176
  ]
251
177
  },
252
178
  feature_credits: {
@@ -258,7 +184,7 @@ const q = {
258
184
  feature_user_withdrawals: {
259
185
  key: "feature_user_withdrawals",
260
186
  label: "User Withdrawals",
261
- description: "Allow users to withdraw SOL/SPL tokens from their embedded wallet to external addresses.",
187
+ description: "Allow users to initiate withdrawals from their embedded wallet to external addresses. This is separate from the automated privacy withdrawal worker, which moves funds from the privacy pool to the treasury.",
262
188
  inputType: "boolean"
263
189
  },
264
190
  // ============= Security Settings =============
@@ -320,7 +246,7 @@ const q = {
320
246
  email_provider: {
321
247
  key: "email_provider",
322
248
  label: "Email Provider",
323
- description: "Select your email service provider for automatic configuration.",
249
+ description: "Select a provider to auto-configure SMTP host, port, and TLS. Choose Custom SMTP to enter settings manually.",
324
250
  inputType: "select",
325
251
  presets: [
326
252
  { label: "Mailgun", value: "mailgun" },
@@ -334,13 +260,14 @@ const q = {
334
260
  email_smtp_host: {
335
261
  key: "email_smtp_host",
336
262
  label: "SMTP Host",
337
- description: "SMTP server hostname (e.g., smtp.sendgrid.net).",
338
- inputType: "text"
263
+ description: "SMTP server hostname. Auto-filled when selecting a provider above.",
264
+ inputType: "text",
265
+ placeholder: "smtp.example.com"
339
266
  },
340
267
  email_smtp_port: {
341
268
  key: "email_smtp_port",
342
269
  label: "SMTP Port",
343
- description: "SMTP server port. Common: 587 (TLS), 465 (SSL), 25 (unencrypted).",
270
+ description: "SMTP server port. Most providers use 587 (TLS).",
344
271
  inputType: "select",
345
272
  presets: [
346
273
  { label: "587 (TLS)", value: "587" },
@@ -351,32 +278,34 @@ const q = {
351
278
  email_smtp_user: {
352
279
  key: "email_smtp_user",
353
280
  label: "SMTP Username",
354
- description: "Username for SMTP authentication.",
281
+ description: 'Username for SMTP authentication. For SendGrid use "apikey", for Postmark use your server API token, for Mailgun use your full Mailgun SMTP login.',
355
282
  inputType: "text"
356
283
  },
357
284
  email_smtp_password: {
358
285
  key: "email_smtp_password",
359
286
  label: "API Key",
360
- description: "API key or password for your email provider.",
287
+ description: "API key or password for your email provider. For SendGrid this is your API key, for Postmark your server API token, for Mailgun your SMTP password.",
361
288
  inputType: "secret"
362
289
  },
363
290
  email_smtp_tls: {
364
291
  key: "email_smtp_tls",
365
292
  label: "Use TLS",
366
- description: "Enable TLS encryption for SMTP connections.",
293
+ description: "Enable TLS encryption for SMTP connections. Required by most providers.",
367
294
  inputType: "boolean"
368
295
  },
369
296
  email_from_address: {
370
297
  key: "email_from_address",
371
298
  label: "From Address",
372
- description: "Default sender email address (e.g., noreply@example.com).",
373
- inputType: "text"
299
+ description: "Sender email address for verification, password reset, and instant link emails. Must be verified with your provider.",
300
+ inputType: "text",
301
+ placeholder: "noreply@yourdomain.com"
374
302
  },
375
303
  email_from_name: {
376
304
  key: "email_from_name",
377
305
  label: "From Name",
378
- description: 'Default sender display name (e.g., "My App").',
379
- inputType: "text"
306
+ description: 'Display name shown in the "From" field of outbound emails.',
307
+ inputType: "text",
308
+ placeholder: "My App"
380
309
  },
381
310
  // ============= Webhook Settings =============
382
311
  webhook_enabled: {
@@ -429,6 +358,12 @@ const q = {
429
358
  description: "Trust X-Forwarded-For headers. Enable if behind a reverse proxy.",
430
359
  inputType: "boolean"
431
360
  },
361
+ feature_cedros_pay: {
362
+ key: "feature_cedros_pay",
363
+ label: "Cedros Pay Integration",
364
+ description: "Enable Cedros Pay integration. When enabled, shows the Integrations tab with API key configuration. Not needed for co-located deployments using JWT/JWKS inter-service auth.",
365
+ inputType: "boolean"
366
+ },
432
367
  server_cedros_pay_api_key: {
433
368
  key: "server_cedros_pay_api_key",
434
369
  label: "Cedros Pay API Key",
@@ -934,7 +869,89 @@ const q = {
934
869
  message: "Very small withdrawals may lose significant value to fees."
935
870
  }
936
871
  }
937
- }, L = [
872
+ }, X = {
873
+ // Auth providers (sorted alphabetically by subcategory)
874
+ "auth.apple": {
875
+ label: "Apple Sign-In",
876
+ description: "Configure Sign in with Apple OAuth integration.",
877
+ icon: ""
878
+ },
879
+ "auth.email": {
880
+ label: "Email Authentication",
881
+ description: "Configure email/password authentication settings.",
882
+ icon: ""
883
+ },
884
+ "auth.google": {
885
+ label: "Google Sign-In",
886
+ description: "Configure Google OAuth integration.",
887
+ icon: ""
888
+ },
889
+ "auth.solana": {
890
+ label: "Solana Wallet Auth",
891
+ description: "Configure Solana wallet signature authentication.",
892
+ icon: ""
893
+ },
894
+ "auth.webauthn": {
895
+ label: "WebAuthn / Passkeys",
896
+ description: "Configure FIDO2/WebAuthn passwordless authentication.",
897
+ icon: ""
898
+ },
899
+ "auth.instantlink": {
900
+ label: "Instant Link",
901
+ description: "Configure magic link passwordless authentication via email.",
902
+ icon: ""
903
+ },
904
+ "deposit.general": {
905
+ label: "General",
906
+ description: "Core deposit and credit system configuration.",
907
+ icon: ""
908
+ },
909
+ deposit: {
910
+ label: "Deposit Settings",
911
+ description: "Configure deposit tokens, fees, and related settings.",
912
+ icon: ""
913
+ },
914
+ email: {
915
+ label: "Email / SMTP",
916
+ description: "Configure outbound email delivery for verification, password reset, and notifications.",
917
+ icon: ""
918
+ },
919
+ features: {
920
+ label: "Feature Flags",
921
+ description: "Enable or disable major platform features.",
922
+ icon: ""
923
+ },
924
+ privacy: {
925
+ label: "Privacy Settings",
926
+ description: "Control the privacy period for deposits. Longer periods provide better timing privacy but delay fund availability.",
927
+ icon: ""
928
+ },
929
+ rate_limit: {
930
+ label: "Rate Limiting",
931
+ description: "Protect the system from abuse by limiting request rates. Balance security with user experience.",
932
+ icon: ""
933
+ },
934
+ security: {
935
+ label: "Security",
936
+ description: "Configure CORS, cookies, sessions, and JWT settings.",
937
+ icon: ""
938
+ },
939
+ server: {
940
+ label: "Server",
941
+ description: "Server infrastructure settings. Some may be overridden by environment variables.",
942
+ icon: ""
943
+ },
944
+ webhook: {
945
+ label: "Webhooks",
946
+ description: "Configure HTTP webhook notifications for auth events.",
947
+ icon: ""
948
+ },
949
+ withdrawal: {
950
+ label: "Withdrawal Worker",
951
+ description: "Configure how the automated withdrawal processor handles pending withdrawals. These settings affect throughput and privacy.",
952
+ icon: ""
953
+ }
954
+ }, C = [
938
955
  "SOL",
939
956
  "USDC",
940
957
  "USDT",
@@ -946,49 +963,49 @@ const q = {
946
963
  "BONK",
947
964
  "ORE"
948
965
  ];
949
- function x(e) {
950
- const l = e.split(/(<a\s[^>]*>.*?<\/a>)/g);
951
- return l.length === 1 ? e : l.map((a, n) => {
952
- const s = a.match(/^<a\s+href="([^"]+)"[^>]*>([^<]+)<\/a>$/);
953
- return s ? /* @__PURE__ */ t("a", { href: s[1], target: "_blank", rel: "noopener noreferrer", children: s[2] }, n) : a;
966
+ function P(e) {
967
+ const s = e.split(/(<a\s[^>]*>.*?<\/a>)/g);
968
+ return s.length === 1 ? e : s.map((a, r) => {
969
+ const l = a.match(/^<a\s+href="([^"]+)"[^>]*>([^<]+)<\/a>$/);
970
+ return l ? /* @__PURE__ */ t("a", { href: l[1], target: "_blank", rel: "noopener noreferrer", children: l[2] }, r) : a;
954
971
  });
955
972
  }
956
973
  function Q({
957
974
  settings: e,
958
- edits: l,
975
+ edits: s,
959
976
  onChange: a,
960
- externalWarnings: n
977
+ externalWarnings: r
961
978
  }) {
962
- return /* @__PURE__ */ t("div", { className: "cedros-settings-grid", children: e.map((s) => /* @__PURE__ */ t(
963
- F,
979
+ return /* @__PURE__ */ t("div", { className: "cedros-settings-grid", children: e.map((l) => /* @__PURE__ */ t(
980
+ U,
964
981
  {
965
- setting: s,
966
- editValue: l[s.key],
982
+ setting: l,
983
+ editValue: s[l.key],
967
984
  onChange: a,
968
- externalWarning: n?.[s.key]
985
+ externalWarning: r?.[l.key]
969
986
  },
970
- s.key
987
+ l.key
971
988
  )) });
972
989
  }
973
- function F({ setting: e, editValue: l, onChange: a, externalWarning: n }) {
974
- const s = q[e.key], i = l ?? e.value, p = l !== void 0 && l !== e.value, r = s?.inputType === "boolean", o = S(() => {
975
- if (n) return n;
976
- if (!s?.warningThreshold) return null;
990
+ function U({ setting: e, editValue: s, onChange: a, externalWarning: r }) {
991
+ const l = R[e.key], i = s ?? e.value, p = s !== void 0 && s !== e.value, n = l?.inputType === "boolean", o = T(() => {
992
+ if (r) return r;
993
+ if (!l?.warningThreshold) return null;
977
994
  const c = parseInt(i, 10);
978
995
  if (isNaN(c)) return null;
979
- const { above: m, below: h, message: y } = s.warningThreshold;
980
- return m !== void 0 && c > m || h !== void 0 && c < h ? y : null;
981
- }, [i, s?.warningThreshold, n]);
982
- return s ? /* @__PURE__ */ t(
996
+ const { above: m, below: y, message: _ } = l.warningThreshold;
997
+ return m !== void 0 && c > m || y !== void 0 && c < y ? _ : null;
998
+ }, [i, l?.warningThreshold, r]);
999
+ return l ? /* @__PURE__ */ t(
983
1000
  "div",
984
1001
  {
985
- className: `cedros-setting-row ${p ? "cedros-setting-row-changed" : ""} ${o ? "cedros-setting-row-warning" : ""} ${r ? "cedros-setting-row-toggle" : ""}`,
986
- children: r ? /* @__PURE__ */ u(f, { children: [
1002
+ className: `cedros-setting-row ${p ? "cedros-setting-row-changed" : ""} ${o ? "cedros-setting-row-warning" : ""} ${n ? "cedros-setting-row-toggle" : ""}`,
1003
+ children: n ? /* @__PURE__ */ u(f, { children: [
987
1004
  /* @__PURE__ */ u("div", { className: "cedros-setting-control cedros-setting-control-toggle", children: [
988
1005
  /* @__PURE__ */ t(
989
- P,
1006
+ x,
990
1007
  {
991
- meta: s,
1008
+ meta: l,
992
1009
  value: i,
993
1010
  onChange: (c) => a(e.key, c)
994
1011
  }
@@ -996,19 +1013,19 @@ function F({ setting: e, editValue: l, onChange: a, externalWarning: n }) {
996
1013
  o && /* @__PURE__ */ t("div", { className: "cedros-setting-warning", children: o })
997
1014
  ] }),
998
1015
  /* @__PURE__ */ u("div", { className: "cedros-setting-label", children: [
999
- /* @__PURE__ */ t("span", { className: "cedros-setting-name", children: s.label }),
1000
- /* @__PURE__ */ t("span", { className: "cedros-setting-description", children: x(s.description) })
1016
+ /* @__PURE__ */ t("span", { className: "cedros-setting-name", children: l.label }),
1017
+ /* @__PURE__ */ t("span", { className: "cedros-setting-description", children: P(l.description) })
1001
1018
  ] })
1002
1019
  ] }) : /* @__PURE__ */ u(f, { children: [
1003
1020
  /* @__PURE__ */ u("div", { className: "cedros-setting-label", children: [
1004
- /* @__PURE__ */ t("span", { className: "cedros-setting-name", children: s.label }),
1005
- /* @__PURE__ */ t("span", { className: "cedros-setting-description", children: x(s.description) })
1021
+ /* @__PURE__ */ t("span", { className: "cedros-setting-name", children: l.label }),
1022
+ /* @__PURE__ */ t("span", { className: "cedros-setting-description", children: P(l.description) })
1006
1023
  ] }),
1007
1024
  /* @__PURE__ */ u("div", { className: "cedros-setting-control", children: [
1008
1025
  /* @__PURE__ */ t(
1009
- P,
1026
+ x,
1010
1027
  {
1011
- meta: s,
1028
+ meta: l,
1012
1029
  value: i,
1013
1030
  onChange: (c) => a(e.key, c)
1014
1031
  }
@@ -1033,15 +1050,15 @@ function F({ setting: e, editValue: l, onChange: a, externalWarning: n }) {
1033
1050
  ) })
1034
1051
  ] });
1035
1052
  }
1036
- function P({ meta: e, value: l, onChange: a }) {
1053
+ function x({ meta: e, value: s, onChange: a }) {
1037
1054
  switch (e.inputType) {
1038
1055
  case "duration":
1039
- return /* @__PURE__ */ t($, { value: l, onChange: a, presets: e.presets, min: e.min });
1056
+ return /* @__PURE__ */ t(F, { value: s, onChange: a, presets: e.presets, min: e.min });
1040
1057
  case "percentage":
1041
1058
  return /* @__PURE__ */ t(
1042
- j,
1059
+ W,
1043
1060
  {
1044
- value: l,
1061
+ value: s,
1045
1062
  onChange: a,
1046
1063
  min: e.min ?? 1,
1047
1064
  max: e.max ?? 100,
@@ -1051,9 +1068,9 @@ function P({ meta: e, value: l, onChange: a }) {
1051
1068
  );
1052
1069
  case "select":
1053
1070
  return /* @__PURE__ */ t(
1054
- W,
1071
+ q,
1055
1072
  {
1056
- value: l,
1073
+ value: s,
1057
1074
  onChange: a,
1058
1075
  presets: e.presets ?? [],
1059
1076
  unit: e.unit
@@ -1061,9 +1078,9 @@ function P({ meta: e, value: l, onChange: a }) {
1061
1078
  );
1062
1079
  case "number":
1063
1080
  return /* @__PURE__ */ t(
1064
- H,
1081
+ $,
1065
1082
  {
1066
- value: l,
1083
+ value: s,
1067
1084
  onChange: a,
1068
1085
  min: e.min,
1069
1086
  max: e.max,
@@ -1071,48 +1088,48 @@ function P({ meta: e, value: l, onChange: a }) {
1071
1088
  }
1072
1089
  );
1073
1090
  case "tokenList":
1074
- return /* @__PURE__ */ t(V, { value: l, onChange: a });
1091
+ return /* @__PURE__ */ t(B, { value: s, onChange: a });
1075
1092
  case "text":
1076
1093
  return /* @__PURE__ */ t(
1077
1094
  "input",
1078
1095
  {
1079
1096
  type: "text",
1080
- value: l,
1081
- onChange: (n) => a(n.target.value),
1097
+ value: s,
1098
+ onChange: (r) => a(r.target.value),
1082
1099
  className: "cedros-setting-input",
1083
1100
  placeholder: e.label
1084
1101
  }
1085
1102
  );
1086
1103
  case "boolean":
1087
- return /* @__PURE__ */ t(B, { value: l, onChange: a });
1104
+ return /* @__PURE__ */ t(j, { value: s, onChange: a });
1088
1105
  case "secret":
1089
- return /* @__PURE__ */ t(J, { value: l, onChange: a, multiline: e.multiline });
1106
+ return /* @__PURE__ */ t(J, { value: s, onChange: a, multiline: e.multiline });
1090
1107
  case "tokenSymbolList":
1091
- return /* @__PURE__ */ t(G, { value: l, onChange: a });
1108
+ return /* @__PURE__ */ t(G, { value: s, onChange: a });
1092
1109
  default:
1093
1110
  return /* @__PURE__ */ t(
1094
1111
  "input",
1095
1112
  {
1096
1113
  type: "text",
1097
- value: l,
1098
- onChange: (n) => a(n.target.value),
1114
+ value: s,
1115
+ onChange: (r) => a(r.target.value),
1099
1116
  className: "cedros-setting-input"
1100
1117
  }
1101
1118
  );
1102
1119
  }
1103
1120
  }
1104
- function $({ value: e, onChange: l, presets: a, min: n = 0 }) {
1105
- const s = parseInt(e, 10) || 0, i = R(s), p = d(
1121
+ function F({ value: e, onChange: s, presets: a, min: r = 0 }) {
1122
+ const l = parseInt(e, 10) || 0, i = M(l), p = d(
1106
1123
  (o) => {
1107
- o.target.value && l(o.target.value);
1124
+ o.target.value && s(o.target.value);
1108
1125
  },
1109
- [l]
1110
- ), r = d(
1126
+ [s]
1127
+ ), n = d(
1111
1128
  (o) => {
1112
- const c = Math.max(n, parseInt(o.target.value, 10) || 0);
1113
- l(String(c));
1129
+ const c = Math.max(r, parseInt(o.target.value, 10) || 0);
1130
+ s(String(c));
1114
1131
  },
1115
- [l, n]
1132
+ [s, r]
1116
1133
  );
1117
1134
  return /* @__PURE__ */ u("div", { className: "cedros-duration-input", children: [
1118
1135
  a && a.length > 0 && /* @__PURE__ */ u(
@@ -1132,9 +1149,9 @@ function $({ value: e, onChange: l, presets: a, min: n = 0 }) {
1132
1149
  "input",
1133
1150
  {
1134
1151
  type: "number",
1135
- value: s,
1136
- onChange: r,
1137
- min: n,
1152
+ value: l,
1153
+ onChange: n,
1154
+ min: r,
1138
1155
  className: "cedros-setting-input cedros-setting-input-sm"
1139
1156
  }
1140
1157
  ),
@@ -1146,24 +1163,24 @@ function $({ value: e, onChange: l, presets: a, min: n = 0 }) {
1146
1163
  ] })
1147
1164
  ] });
1148
1165
  }
1149
- function j({
1166
+ function W({
1150
1167
  value: e,
1151
- onChange: l,
1168
+ onChange: s,
1152
1169
  min: a,
1153
- max: n,
1154
- step: s,
1170
+ max: r,
1171
+ step: l,
1155
1172
  presets: i
1156
1173
  }) {
1157
- const p = parseInt(e, 10) || a, r = d(
1174
+ const p = parseInt(e, 10) || a, n = d(
1158
1175
  (c) => {
1159
- l(c.target.value);
1176
+ s(c.target.value);
1160
1177
  },
1161
- [l]
1178
+ [s]
1162
1179
  ), o = d(
1163
1180
  (c) => {
1164
- l(c);
1181
+ s(c);
1165
1182
  },
1166
- [l]
1183
+ [s]
1167
1184
  );
1168
1185
  return /* @__PURE__ */ u("div", { className: "cedros-percentage-input", children: [
1169
1186
  /* @__PURE__ */ u("div", { className: "cedros-percentage-slider-row", children: [
@@ -1172,10 +1189,10 @@ function j({
1172
1189
  {
1173
1190
  type: "range",
1174
1191
  value: p,
1175
- onChange: r,
1192
+ onChange: n,
1176
1193
  min: a,
1177
- max: n,
1178
- step: s,
1194
+ max: r,
1195
+ step: l,
1179
1196
  className: "cedros-percentage-slider"
1180
1197
  }
1181
1198
  ),
@@ -1196,32 +1213,32 @@ function j({
1196
1213
  )) })
1197
1214
  ] });
1198
1215
  }
1199
- function W({ value: e, onChange: l, presets: a, unit: n }) {
1200
- const s = !a.some((r) => r.value === e), i = d(
1201
- (r) => {
1202
- r.target.value !== "__custom__" && l(r.target.value);
1216
+ function q({ value: e, onChange: s, presets: a, unit: r }) {
1217
+ const l = !a.some((n) => n.value === e), i = d(
1218
+ (n) => {
1219
+ n.target.value !== "__custom__" && s(n.target.value);
1203
1220
  },
1204
- [l]
1221
+ [s]
1205
1222
  ), p = d(
1206
- (r) => {
1207
- l(r.target.value);
1223
+ (n) => {
1224
+ s(n.target.value);
1208
1225
  },
1209
- [l]
1226
+ [s]
1210
1227
  );
1211
1228
  return /* @__PURE__ */ u("div", { className: "cedros-select-input", children: [
1212
1229
  /* @__PURE__ */ u(
1213
1230
  "select",
1214
1231
  {
1215
- value: s ? "__custom__" : e,
1232
+ value: l ? "__custom__" : e,
1216
1233
  onChange: i,
1217
1234
  className: "cedros-setting-select",
1218
1235
  children: [
1219
- a.map((r) => /* @__PURE__ */ t("option", { value: r.value, children: r.label }, r.value)),
1236
+ a.map((n) => /* @__PURE__ */ t("option", { value: n.value, children: n.label }, n.value)),
1220
1237
  /* @__PURE__ */ t("option", { value: "__custom__", children: "Custom..." })
1221
1238
  ]
1222
1239
  }
1223
1240
  ),
1224
- s && /* @__PURE__ */ u("div", { className: "cedros-select-custom", children: [
1241
+ l && /* @__PURE__ */ u("div", { className: "cedros-select-custom", children: [
1225
1242
  /* @__PURE__ */ t(
1226
1243
  "input",
1227
1244
  {
@@ -1231,16 +1248,16 @@ function W({ value: e, onChange: l, presets: a, unit: n }) {
1231
1248
  className: "cedros-setting-input cedros-setting-input-sm"
1232
1249
  }
1233
1250
  ),
1234
- n && /* @__PURE__ */ t("span", { className: "cedros-setting-unit", children: n })
1251
+ r && /* @__PURE__ */ t("span", { className: "cedros-setting-unit", children: r })
1235
1252
  ] })
1236
1253
  ] });
1237
1254
  }
1238
- function H({ value: e, onChange: l, min: a, max: n, unit: s }) {
1255
+ function $({ value: e, onChange: s, min: a, max: r, unit: l }) {
1239
1256
  const i = d(
1240
1257
  (p) => {
1241
- l(p.target.value);
1258
+ s(p.target.value);
1242
1259
  },
1243
- [l]
1260
+ [s]
1244
1261
  );
1245
1262
  return /* @__PURE__ */ u("div", { className: "cedros-number-input", children: [
1246
1263
  /* @__PURE__ */ t(
@@ -1250,17 +1267,17 @@ function H({ value: e, onChange: l, min: a, max: n, unit: s }) {
1250
1267
  value: e,
1251
1268
  onChange: i,
1252
1269
  min: a,
1253
- max: n,
1270
+ max: r,
1254
1271
  className: "cedros-setting-input"
1255
1272
  }
1256
1273
  ),
1257
- s && /* @__PURE__ */ t("span", { className: "cedros-setting-unit", children: s })
1274
+ l && /* @__PURE__ */ t("span", { className: "cedros-setting-unit", children: l })
1258
1275
  ] });
1259
1276
  }
1260
- function B({ value: e, onChange: l }) {
1261
- const a = e === "true", n = d(() => {
1262
- l(a ? "false" : "true");
1263
- }, [a, l]);
1277
+ function j({ value: e, onChange: s }) {
1278
+ const a = e === "true", r = d(() => {
1279
+ s(a ? "false" : "true");
1280
+ }, [a, s]);
1264
1281
  return /* @__PURE__ */ u(
1265
1282
  "button",
1266
1283
  {
@@ -1268,7 +1285,7 @@ function B({ value: e, onChange: l }) {
1268
1285
  role: "switch",
1269
1286
  "aria-checked": a,
1270
1287
  className: `cedros-toggle ${a ? "cedros-toggle-on" : "cedros-toggle-off"}`,
1271
- onClick: n,
1288
+ onClick: r,
1272
1289
  children: [
1273
1290
  /* @__PURE__ */ t("span", { className: "cedros-toggle-track", children: /* @__PURE__ */ t("span", { className: "cedros-toggle-thumb" }) }),
1274
1291
  /* @__PURE__ */ t("span", { className: "cedros-toggle-label", children: a ? "Enabled" : "Disabled" })
@@ -1276,18 +1293,18 @@ function B({ value: e, onChange: l }) {
1276
1293
  }
1277
1294
  );
1278
1295
  }
1279
- function J({ value: e, onChange: l, multiline: a }) {
1280
- const [n, s] = k(!1), [i, p] = k(!1), r = e && e.length > 0, o = d(() => {
1281
- s(!0), p(!0);
1296
+ function J({ value: e, onChange: s, multiline: a }) {
1297
+ const [r, l] = w(!1), [i, p] = w(!1), n = e && e.length > 0, o = d(() => {
1298
+ l(!0), p(!0);
1282
1299
  }, []), c = d(() => {
1283
- s(!1), p(!1);
1300
+ l(!1), p(!1);
1284
1301
  }, []), m = d(
1285
- (h) => {
1286
- l(h.target.value);
1302
+ (y) => {
1303
+ s(y.target.value);
1287
1304
  },
1288
- [l]
1305
+ [s]
1289
1306
  );
1290
- return !n && r ? /* @__PURE__ */ u("div", { className: "cedros-secret-input cedros-secret-input-masked", children: [
1307
+ return !r && n ? /* @__PURE__ */ u("div", { className: "cedros-secret-input cedros-secret-input-masked", children: [
1291
1308
  /* @__PURE__ */ t("span", { className: "cedros-secret-masked", children: "•".repeat(Math.min(e.length, 20)) }),
1292
1309
  /* @__PURE__ */ t("button", { type: "button", className: "cedros-secret-edit-btn", onClick: o, children: "Edit" })
1293
1310
  ] }) : /* @__PURE__ */ u("div", { className: "cedros-secret-input", children: [
@@ -1320,50 +1337,50 @@ function J({ value: e, onChange: l, multiline: a }) {
1320
1337
  children: i ? "Hide" : "Show"
1321
1338
  }
1322
1339
  ),
1323
- n && /* @__PURE__ */ t("button", { type: "button", className: "cedros-secret-done-btn", onClick: c, children: "Done" })
1340
+ r && /* @__PURE__ */ t("button", { type: "button", className: "cedros-secret-done-btn", onClick: c, children: "Done" })
1324
1341
  ] })
1325
1342
  ] });
1326
1343
  }
1327
- function V({ value: e, onChange: l }) {
1328
- const a = S(() => {
1344
+ function B({ value: e, onChange: s }) {
1345
+ const a = T(() => {
1329
1346
  try {
1330
1347
  return JSON.parse(e || "[]");
1331
1348
  } catch {
1332
1349
  return [];
1333
1350
  }
1334
- }, [e]), n = d(
1335
- (r) => {
1336
- l(JSON.stringify(r));
1351
+ }, [e]), r = d(
1352
+ (n) => {
1353
+ s(JSON.stringify(n));
1337
1354
  },
1338
- [l]
1339
- ), s = d(() => {
1340
- n([...a, { symbol: "", mint: "", decimals: 6 }]);
1341
- }, [a, n]), i = d(
1342
- (r, o, c) => {
1355
+ [s]
1356
+ ), l = d(() => {
1357
+ r([...a, { symbol: "", mint: "", decimals: 6 }]);
1358
+ }, [a, r]), i = d(
1359
+ (n, o, c) => {
1343
1360
  const m = [...a];
1344
- m[r] = { ...m[r], [o]: c }, n(m);
1361
+ m[n] = { ...m[n], [o]: c }, r(m);
1345
1362
  },
1346
- [a, n]
1363
+ [a, r]
1347
1364
  ), p = d(
1348
- (r) => {
1349
- n(a.filter((o, c) => c !== r));
1365
+ (n) => {
1366
+ r(a.filter((o, c) => c !== n));
1350
1367
  },
1351
- [a, n]
1368
+ [a, r]
1352
1369
  );
1353
1370
  return /* @__PURE__ */ u("div", { className: "cedros-token-list-input", children: [
1354
1371
  /* @__PURE__ */ u("div", { className: "cedros-token-presets", children: [
1355
1372
  /* @__PURE__ */ t("span", { className: "cedros-token-presets-label", children: "Built-in tokens:" }),
1356
- /* @__PURE__ */ t("div", { className: "cedros-token-presets-list", children: L.map((r) => /* @__PURE__ */ t("span", { className: "cedros-token-preset-chip", children: r }, r)) })
1373
+ /* @__PURE__ */ t("div", { className: "cedros-token-presets-list", children: C.map((n) => /* @__PURE__ */ t("span", { className: "cedros-token-preset-chip", children: n }, n)) })
1357
1374
  ] }),
1358
1375
  a.length === 0 && /* @__PURE__ */ t("p", { className: "cedros-token-list-empty", children: "No custom tokens added. Use the built-in tokens above or add your own." }),
1359
- a.map((r, o) => /* @__PURE__ */ u("div", { className: "cedros-token-row", children: [
1376
+ a.map((n, o) => /* @__PURE__ */ u("div", { className: "cedros-token-row", children: [
1360
1377
  /* @__PURE__ */ u("div", { className: "cedros-token-row-fields", children: [
1361
1378
  /* @__PURE__ */ t(
1362
1379
  "input",
1363
1380
  {
1364
1381
  type: "text",
1365
1382
  placeholder: "Symbol",
1366
- value: r.symbol,
1383
+ value: n.symbol,
1367
1384
  onChange: (c) => i(o, "symbol", c.target.value.toUpperCase()),
1368
1385
  className: "cedros-setting-input cedros-token-input-symbol",
1369
1386
  maxLength: 10
@@ -1374,7 +1391,7 @@ function V({ value: e, onChange: l }) {
1374
1391
  {
1375
1392
  type: "text",
1376
1393
  placeholder: "Mint address",
1377
- value: r.mint,
1394
+ value: n.mint,
1378
1395
  onChange: (c) => i(o, "mint", c.target.value),
1379
1396
  className: "cedros-setting-input cedros-token-input-mint"
1380
1397
  }
@@ -1384,7 +1401,7 @@ function V({ value: e, onChange: l }) {
1384
1401
  {
1385
1402
  type: "number",
1386
1403
  placeholder: "Decimals",
1387
- value: r.decimals,
1404
+ value: n.decimals,
1388
1405
  onChange: (c) => i(o, "decimals", parseInt(c.target.value, 10) || 0),
1389
1406
  className: "cedros-setting-input cedros-token-input-decimals",
1390
1407
  min: 0,
@@ -1396,7 +1413,7 @@ function V({ value: e, onChange: l }) {
1396
1413
  {
1397
1414
  type: "text",
1398
1415
  placeholder: "Logo URL (optional)",
1399
- value: r.logoUrl || "",
1416
+ value: n.logoUrl || "",
1400
1417
  onChange: (c) => i(o, "logoUrl", c.target.value || void 0),
1401
1418
  className: "cedros-setting-input cedros-token-input-logo"
1402
1419
  }
@@ -1413,35 +1430,35 @@ function V({ value: e, onChange: l }) {
1413
1430
  }
1414
1431
  )
1415
1432
  ] }, o)),
1416
- /* @__PURE__ */ t("button", { type: "button", className: "cedros-token-add-btn", onClick: s, children: "+ Add Token" })
1433
+ /* @__PURE__ */ t("button", { type: "button", className: "cedros-token-add-btn", onClick: l, children: "+ Add Token" })
1417
1434
  ] });
1418
1435
  }
1419
- function G({ value: e, onChange: l }) {
1420
- const a = S(() => e.split(",").map((i) => i.trim()).filter(Boolean), [e]), n = d(
1436
+ function G({ value: e, onChange: s }) {
1437
+ const a = T(() => e.split(",").map((i) => i.trim()).filter(Boolean), [e]), r = d(
1421
1438
  (i) => {
1422
1439
  if (!i || a.includes(i)) return;
1423
1440
  const p = [...a, i].join(", ");
1424
- l(p);
1441
+ s(p);
1425
1442
  },
1426
- [a, l]
1427
- ), s = d(
1443
+ [a, s]
1444
+ ), l = d(
1428
1445
  (i) => {
1429
- const p = a.filter((r) => r !== i).join(", ");
1430
- l(p);
1446
+ const p = a.filter((n) => n !== i).join(", ");
1447
+ s(p);
1431
1448
  },
1432
- [a, l]
1449
+ [a, s]
1433
1450
  );
1434
1451
  return /* @__PURE__ */ u("div", { className: "cedros-token-symbol-list-input", children: [
1435
1452
  /* @__PURE__ */ u("div", { className: "cedros-token-presets", children: [
1436
1453
  /* @__PURE__ */ t("span", { className: "cedros-token-presets-label", children: "Click to add:" }),
1437
- /* @__PURE__ */ t("div", { className: "cedros-token-presets-list", children: L.map((i) => {
1454
+ /* @__PURE__ */ t("div", { className: "cedros-token-presets-list", children: C.map((i) => {
1438
1455
  const p = a.includes(i);
1439
1456
  return /* @__PURE__ */ u(
1440
1457
  "button",
1441
1458
  {
1442
1459
  type: "button",
1443
1460
  className: `cedros-token-preset-chip ${p ? "cedros-token-preset-chip-selected" : ""}`,
1444
- onClick: () => p ? s(i) : n(i),
1461
+ onClick: () => p ? l(i) : r(i),
1445
1462
  title: p ? `Remove ${i}` : `Add ${i}`,
1446
1463
  children: [
1447
1464
  i,
@@ -1457,14 +1474,76 @@ function G({ value: e, onChange: l }) {
1457
1474
  {
1458
1475
  type: "text",
1459
1476
  value: e,
1460
- onChange: (i) => l(i.target.value),
1477
+ onChange: (i) => s(i.target.value),
1461
1478
  className: "cedros-setting-input",
1462
1479
  placeholder: "USDC, SOL, BONK..."
1463
1480
  }
1464
1481
  )
1465
1482
  ] });
1466
1483
  }
1467
- function Z({ status: e, error: l }) {
1484
+ const H = 800, V = 2e3;
1485
+ function Z() {
1486
+ const { settings: e, isLoading: s, error: a, fetchSettings: r, updateSettings: l } = E(), [i, p] = w({}), [n, o] = w("idle"), [c, m] = w(null), y = S(null), _ = S(null), k = S({});
1487
+ O(() => () => {
1488
+ y.current && clearTimeout(y.current), _.current && clearTimeout(_.current);
1489
+ }, []);
1490
+ const N = d(async () => {
1491
+ const h = { ...k.current };
1492
+ if (Object.keys(h).length === 0) {
1493
+ o("idle");
1494
+ return;
1495
+ }
1496
+ o("saving"), m(null);
1497
+ const v = Object.entries(h).map(([b, g]) => ({
1498
+ key: b,
1499
+ value: g
1500
+ }));
1501
+ try {
1502
+ await l(v), p((b) => {
1503
+ const g = { ...b };
1504
+ for (const D of Object.keys(h))
1505
+ delete g[D];
1506
+ return g;
1507
+ });
1508
+ for (const b of Object.keys(h))
1509
+ delete k.current[b];
1510
+ o("saved"), _.current && clearTimeout(_.current), _.current = setTimeout(() => {
1511
+ o("idle");
1512
+ }, V);
1513
+ } catch (b) {
1514
+ o("error"), m(b instanceof Error ? b.message : "Failed to save");
1515
+ }
1516
+ }, [l]), A = d(
1517
+ (h, v) => {
1518
+ p((b) => ({ ...b, [h]: v })), k.current[h] = v, m(null), o("pending"), y.current && clearTimeout(y.current), y.current = setTimeout(() => {
1519
+ N();
1520
+ }, H);
1521
+ },
1522
+ [N]
1523
+ ), L = d(
1524
+ (h) => {
1525
+ if (i[h] !== void 0) return i[h];
1526
+ for (const v of Object.values(e)) {
1527
+ const b = v.find((g) => g.key === h);
1528
+ if (b) return b.value;
1529
+ }
1530
+ return "";
1531
+ },
1532
+ [i, e]
1533
+ );
1534
+ return {
1535
+ settings: e,
1536
+ edits: i,
1537
+ isLoading: s,
1538
+ autosaveStatus: n,
1539
+ autosaveError: c,
1540
+ error: a,
1541
+ fetchSettings: r,
1542
+ handleChange: A,
1543
+ getEffectiveValue: L
1544
+ };
1545
+ }
1546
+ function ee({ status: e, error: s }) {
1468
1547
  return e === "idle" ? null : /* @__PURE__ */ u("div", { className: `cedros-autosave-status cedros-autosave-status--${e}`, children: [
1469
1548
  e === "pending" && /* @__PURE__ */ u(f, { children: [
1470
1549
  /* @__PURE__ */ t("span", { className: "cedros-autosave-dot" }),
@@ -1480,12 +1559,14 @@ function Z({ status: e, error: l }) {
1480
1559
  ] }),
1481
1560
  e === "error" && /* @__PURE__ */ u(f, { children: [
1482
1561
  /* @__PURE__ */ t("span", { className: "cedros-autosave-error-icon", children: "!" }),
1483
- /* @__PURE__ */ t("span", { children: l || "Save failed" })
1562
+ /* @__PURE__ */ t("span", { children: s || "Save failed" })
1484
1563
  ] })
1485
1564
  ] });
1486
1565
  }
1487
1566
  export {
1488
- Z as A,
1567
+ ee as A,
1568
+ X as C,
1489
1569
  Q as S,
1490
- X as u
1570
+ R as a,
1571
+ Z as u
1491
1572
  };