@cedros/pay-react 1.1.22 → 1.1.24

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 (115) hide show
  1. package/dist/{AISettingsSection-p3iikbSw.mjs → AISettingsSection-Dw0ZlxMf.mjs} +2 -2
  2. package/dist/{AISettingsSection-BtOxEweU.js → AISettingsSection-IXS1Wt_1.js} +1 -1
  3. package/dist/{AutosaveIndicator-CWbb-VXf.mjs → AutosaveIndicator-BJsg_kFZ.mjs} +1 -1
  4. package/dist/{AutosaveIndicator-C-CH-obR.js → AutosaveIndicator-CY_YHM1D.js} +1 -1
  5. package/dist/{CedrosContext-D-lnoEkR.js → CedrosContext-7dwmEeUY.js} +2 -2
  6. package/dist/{CedrosContext-BE6P5PQ0.mjs → CedrosContext-DQUbL8yP.mjs} +105 -88
  7. package/dist/{CryptoButton-Dy-g3bR0.js → CryptoButton-C1AAOOfj.js} +1 -1
  8. package/dist/{CryptoButton-CksMkZjL.mjs → CryptoButton-D1BCZBk4.mjs} +51 -51
  9. package/dist/{FAQSection-DQpF7hVx.js → FAQSection-BmgmzDN5.js} +1 -1
  10. package/dist/{FAQSection-byh7zfqI.mjs → FAQSection-C78MnK4k.mjs} +1 -1
  11. package/dist/{MessagingSection-B6EHvjDw.js → MessagingSection-CWLZcg11.js} +1 -1
  12. package/dist/{MessagingSection-CK208brx.mjs → MessagingSection-De3t8bSI.mjs} +2 -2
  13. package/dist/OrdersSection-BKOxsZw0.js +1 -0
  14. package/dist/OrdersSection-_xKVzjSZ.mjs +233 -0
  15. package/dist/{PaymentSettingsSection-Cmmuhmd4.js → PaymentSettingsSection-BTEn9Dxb.js} +1 -1
  16. package/dist/{PaymentSettingsSection-B9H253x1.mjs → PaymentSettingsSection-KjU_dN_d.mjs} +1 -1
  17. package/dist/{SettingsSection-DDLMaEPo.mjs → SettingsSection-8QHZB59k.mjs} +1 -1
  18. package/dist/{SettingsSection-DrzGdvHH.js → SettingsSection-cKF0tLnS.js} +1 -1
  19. package/dist/SingleCategorySettings--LK0TZW0.mjs +1006 -0
  20. package/dist/SingleCategorySettings-CRXTMTo5.js +3 -0
  21. package/dist/{StorefrontSection-DTpZ_GgO.js → StorefrontSection-C9DzCmOf.js} +1 -1
  22. package/dist/{StorefrontSection-Dr2ciBVg.mjs → StorefrontSection-CeCpr8hn.mjs} +2 -2
  23. package/dist/{SubscriptionsSection-CU3Ce8r9.mjs → SubscriptionsSection-C2xk8ApF.mjs} +1 -1
  24. package/dist/{SubscriptionsSection-CYJpArJ8.js → SubscriptionsSection-Dn5SY6S_.js} +1 -1
  25. package/dist/Token22Section-DUUl59dZ.js +1 -0
  26. package/dist/Token22Section-HygkDNtL.mjs +1685 -0
  27. package/dist/{WalletManager-QcfgQmap.js → WalletManager-Bwk3rgr1.js} +1 -1
  28. package/dist/{WalletManager-D78miaJ2.mjs → WalletManager-CXvQ0Zu9.mjs} +1 -1
  29. package/dist/bn-Bv2sKQMU.mjs +1185 -0
  30. package/dist/bn-CHyy7EgJ.js +1 -0
  31. package/dist/configApi-Ch0Rr7TD.mjs +554 -0
  32. package/dist/configApi-CxEbCAgG.js +1 -0
  33. package/dist/crypto-only.js +1 -1
  34. package/dist/crypto-only.mjs +54 -52
  35. package/dist/{index-CufXF9Yd.mjs → index-BHF82XBB.mjs} +6687 -5866
  36. package/dist/index-OaWkrl0G.js +84 -0
  37. package/dist/index.js +1 -1
  38. package/dist/index.mjs +34 -32
  39. package/dist/pay-react_false-CPX8Vyp9.mjs +5 -0
  40. package/dist/pay-react_false-DaeIe3_l.js +1 -0
  41. package/dist/{sections-CR7NRsjq.js → sections-8e5Y3ukY.js} +1 -1
  42. package/dist/sections-C1rb9YRh.mjs +9 -0
  43. package/dist/src/components/CreditsBalance.d.ts +24 -0
  44. package/dist/src/components/CreditsBalance.d.ts.map +1 -0
  45. package/dist/src/components/admin/AssetClassesTab.d.ts +20 -0
  46. package/dist/src/components/admin/AssetClassesTab.d.ts.map +1 -0
  47. package/dist/src/components/admin/AssetRedemptionManager.d.ts +21 -0
  48. package/dist/src/components/admin/AssetRedemptionManager.d.ts.map +1 -0
  49. package/dist/src/components/admin/CedrosPayAdminDashboard.d.ts +1 -1
  50. package/dist/src/components/admin/CedrosPayAdminDashboard.d.ts.map +1 -1
  51. package/dist/src/components/admin/GiftCardComplianceTab.d.ts +3 -0
  52. package/dist/src/components/admin/GiftCardComplianceTab.d.ts.map +1 -0
  53. package/dist/src/components/admin/LiquidityPoolTab.d.ts +11 -0
  54. package/dist/src/components/admin/LiquidityPoolTab.d.ts.map +1 -0
  55. package/dist/src/components/admin/OrdersSection.d.ts +3 -0
  56. package/dist/src/components/admin/OrdersSection.d.ts.map +1 -0
  57. package/dist/src/components/admin/ProductsSection.d.ts.map +1 -1
  58. package/dist/src/components/admin/RedemptionFormBuilder.d.ts +25 -0
  59. package/dist/src/components/admin/RedemptionFormBuilder.d.ts.map +1 -0
  60. package/dist/src/components/admin/Token22Section.d.ts +3 -0
  61. package/dist/src/components/admin/Token22Section.d.ts.map +1 -0
  62. package/dist/src/components/admin/configApi.d.ts.map +1 -1
  63. package/dist/src/components/admin/index.d.ts +3 -0
  64. package/dist/src/components/admin/index.d.ts.map +1 -1
  65. package/dist/src/ecommerce/adapters/mock/mockAdapter.d.ts.map +1 -1
  66. package/dist/src/ecommerce/adapters/paywall/paywallAdapter.d.ts.map +1 -1
  67. package/dist/src/ecommerce/components/catalog/AssetBadge.d.ts +13 -0
  68. package/dist/src/ecommerce/components/catalog/AssetBadge.d.ts.map +1 -0
  69. package/dist/src/ecommerce/components/catalog/ProductCard.d.ts.map +1 -1
  70. package/dist/src/ecommerce/components/checkout/CheckoutForm.d.ts.map +1 -1
  71. package/dist/src/ecommerce/components/checkout/CheckoutReceipt.d.ts +9 -2
  72. package/dist/src/ecommerce/components/checkout/CheckoutReceipt.d.ts.map +1 -1
  73. package/dist/src/ecommerce/components/checkout/CheckoutSuccessPage.d.ts +7 -1
  74. package/dist/src/ecommerce/components/checkout/CheckoutSuccessPage.d.ts.map +1 -1
  75. package/dist/src/ecommerce/components/checkout/RedemptionForm.d.ts +22 -0
  76. package/dist/src/ecommerce/components/checkout/RedemptionForm.d.ts.map +1 -0
  77. package/dist/src/ecommerce/components/gift-cards/GiftCardRedemptionPage.d.ts +36 -0
  78. package/dist/src/ecommerce/components/gift-cards/GiftCardRedemptionPage.d.ts.map +1 -0
  79. package/dist/src/ecommerce/components/orders/OrderCard.d.ts.map +1 -1
  80. package/dist/src/ecommerce/components/orders/OrderDetails.d.ts +5 -1
  81. package/dist/src/ecommerce/components/orders/OrderDetails.d.ts.map +1 -1
  82. package/dist/src/ecommerce/index.d.ts +6 -0
  83. package/dist/src/ecommerce/index.d.ts.map +1 -1
  84. package/dist/src/ecommerce/state/checkout/checkoutSchema.d.ts +1 -0
  85. package/dist/src/ecommerce/state/checkout/checkoutSchema.d.ts.map +1 -1
  86. package/dist/src/ecommerce/state/checkout/useCheckout.d.ts.map +1 -1
  87. package/dist/src/ecommerce/templates/ProductTemplate.d.ts.map +1 -1
  88. package/dist/src/ecommerce/templates/PurchaseHistoryTemplate.d.ts +5 -1
  89. package/dist/src/ecommerce/templates/PurchaseHistoryTemplate.d.ts.map +1 -1
  90. package/dist/src/ecommerce/types.d.ts +20 -0
  91. package/dist/src/ecommerce/types.d.ts.map +1 -1
  92. package/dist/src/ecommerce/utils/cartItemMetadata.d.ts.map +1 -1
  93. package/dist/src/ecommerce/utils/safeHref.d.ts +9 -0
  94. package/dist/src/ecommerce/utils/safeHref.d.ts.map +1 -0
  95. package/dist/src/hooks/useCreditsBalance.d.ts +32 -0
  96. package/dist/src/hooks/useCreditsBalance.d.ts.map +1 -0
  97. package/dist/src/index.d.ts +4 -0
  98. package/dist/src/index.d.ts.map +1 -1
  99. package/dist/src/managers/CreditsManager.d.ts +15 -0
  100. package/dist/src/managers/CreditsManager.d.ts.map +1 -1
  101. package/dist/src/managers/MeteoraPoolManager.d.ts +86 -0
  102. package/dist/src/managers/MeteoraPoolManager.d.ts.map +1 -0
  103. package/dist/stripe-only.js +1 -1
  104. package/dist/stripe-only.mjs +2 -2
  105. package/dist/{styles-BWrLnaUW.js → styles-21F1-oqx.js} +1 -1
  106. package/dist/{styles--eKKnfdj.mjs → styles-Ag-7ZvAB.mjs} +46 -46
  107. package/dist/testing/index.js +1 -1
  108. package/dist/testing/index.mjs +1 -1
  109. package/dist/{walletPool-DShNjCQ6.mjs → walletPool-C_0P4mTw.mjs} +1 -1
  110. package/dist/{walletPool-BqNfOhB0.js → walletPool-Ddv33tej.js} +1 -1
  111. package/package.json +10 -1
  112. package/dist/SingleCategorySettings-BU98SRFV.mjs +0 -1418
  113. package/dist/SingleCategorySettings-DqcXe-q4.js +0 -3
  114. package/dist/index-IZ4WcMd7.js +0 -84
  115. package/dist/sections-Bc6ARlND.mjs +0 -8
@@ -0,0 +1,233 @@
1
+ import { jsxs as i, jsx as e, Fragment as $ } from "react/jsx-runtime";
2
+ import { useState as r, useCallback as N, useEffect as U } from "react";
3
+ import { I as z, E as G, h as F, s as k } from "./index-BHF82XBB.mjs";
4
+ function J({ serverUrl: a, apiKey: s, pageSize: m = 20, authManager: l }) {
5
+ const [c, t] = r([]), [o, y] = r(0), [R, x] = r(!0), [S, C] = r(null), [h, w] = r(null), [D, v] = r(null), [E, b] = r([]), [O, L] = r(!1), [f, T] = r(""), g = N(async (n, d) => {
6
+ if (l?.isAuthenticated())
7
+ return l.fetchWithAuth(n, d);
8
+ const _ = { "Content-Type": "application/json" };
9
+ s && (_["X-API-Key"] = s);
10
+ const u = await fetch(`${a}${n}`, { ...d, headers: { ..._, ...d?.headers } });
11
+ if (!u.ok) {
12
+ const P = await u.text().catch(() => `HTTP ${u.status}`);
13
+ throw new Error(P);
14
+ }
15
+ return u.json();
16
+ }, [a, s, l]), p = N(async () => {
17
+ x(!0);
18
+ try {
19
+ C(null);
20
+ const n = new URLSearchParams({ limit: String(m) });
21
+ f && n.set("status", f);
22
+ const d = await g(
23
+ `/admin/orders?${n}`
24
+ );
25
+ t(d.orders), y(d.total);
26
+ } catch {
27
+ C("Failed to load orders");
28
+ } finally {
29
+ x(!1);
30
+ }
31
+ }, [g, m, f]);
32
+ U(() => {
33
+ p();
34
+ }, [p]);
35
+ const A = N(async (n) => {
36
+ L(!0);
37
+ try {
38
+ const [d, _] = await Promise.all([
39
+ g(`/admin/orders/${encodeURIComponent(n)}`),
40
+ g("/admin/gift-card-redemptions?limit=50").catch(() => [])
41
+ ]);
42
+ v(d), b(_.filter((u) => u.orderId === n));
43
+ } catch {
44
+ v(null), b([]);
45
+ } finally {
46
+ L(!1);
47
+ }
48
+ }, [g]), j = (n) => {
49
+ h === n ? (w(null), v(null), b([])) : (w(n), A(n));
50
+ }, B = (n, d) => d === "USD" || d === "usd" ? `$${(n / 100).toFixed(2)}` : `${n} ${d}`;
51
+ return /* @__PURE__ */ i("div", { className: "cedros-admin__section", children: [
52
+ /* @__PURE__ */ i("div", { className: "cedros-admin__section-header", children: [
53
+ /* @__PURE__ */ e("h2", { className: "cedros-admin__section-title", children: "Orders" }),
54
+ /* @__PURE__ */ i("div", { style: { display: "flex", gap: "0.5rem", alignItems: "center" }, children: [
55
+ /* @__PURE__ */ i(
56
+ "select",
57
+ {
58
+ className: "cedros-admin__input",
59
+ style: { width: "auto", minWidth: "120px" },
60
+ value: f,
61
+ onChange: (n) => T(n.target.value),
62
+ children: [
63
+ /* @__PURE__ */ e("option", { value: "", children: "All statuses" }),
64
+ /* @__PURE__ */ e("option", { value: "paid", children: "Paid" }),
65
+ /* @__PURE__ */ e("option", { value: "processing", children: "Processing" }),
66
+ /* @__PURE__ */ e("option", { value: "fulfilled", children: "Fulfilled" }),
67
+ /* @__PURE__ */ e("option", { value: "shipped", children: "Shipped" }),
68
+ /* @__PURE__ */ e("option", { value: "delivered", children: "Delivered" }),
69
+ /* @__PURE__ */ e("option", { value: "cancelled", children: "Cancelled" }),
70
+ /* @__PURE__ */ e("option", { value: "refunded", children: "Refunded" })
71
+ ]
72
+ }
73
+ ),
74
+ /* @__PURE__ */ i("button", { type: "button", className: "cedros-admin__button cedros-admin__button--secondary", onClick: p, children: [
75
+ z.refresh,
76
+ " Refresh"
77
+ ] })
78
+ ] })
79
+ ] }),
80
+ S ? /* @__PURE__ */ e(G, { message: S, onRetry: p }) : null,
81
+ R ? /* @__PURE__ */ e("div", { className: "cedros-admin__loading-text", children: "Loading orders..." }) : c.length === 0 ? /* @__PURE__ */ e("div", { className: "cedros-admin__empty", children: "No orders found." }) : /* @__PURE__ */ i($, { children: [
82
+ /* @__PURE__ */ i("div", { className: "cedros-admin__table-info", children: [
83
+ o,
84
+ " order",
85
+ o === 1 ? "" : "s",
86
+ " total"
87
+ ] }),
88
+ /* @__PURE__ */ i("table", { className: "cedros-admin__table", children: [
89
+ /* @__PURE__ */ e("thead", { children: /* @__PURE__ */ i("tr", { children: [
90
+ /* @__PURE__ */ e("th", { children: "Order" }),
91
+ /* @__PURE__ */ e("th", { children: "Status" }),
92
+ /* @__PURE__ */ e("th", { children: "Amount" }),
93
+ /* @__PURE__ */ e("th", { children: "Source" }),
94
+ /* @__PURE__ */ e("th", { children: "Customer" }),
95
+ /* @__PURE__ */ e("th", { children: "Date" })
96
+ ] }) }),
97
+ /* @__PURE__ */ e("tbody", { children: c.map((n) => /* @__PURE__ */ e(
98
+ H,
99
+ {
100
+ order: n,
101
+ expanded: h === n.id,
102
+ detail: h === n.id ? D : null,
103
+ redemptions: h === n.id ? E : [],
104
+ detailLoading: h === n.id && O,
105
+ onToggle: () => j(n.id),
106
+ formatAmount: B
107
+ },
108
+ n.id
109
+ )) })
110
+ ] })
111
+ ] })
112
+ ] });
113
+ }
114
+ function H({
115
+ order: a,
116
+ expanded: s,
117
+ detail: m,
118
+ redemptions: l,
119
+ detailLoading: c,
120
+ onToggle: t,
121
+ formatAmount: o
122
+ }) {
123
+ const y = a.metadata?.recipient_email || l.length > 0;
124
+ return /* @__PURE__ */ i($, { children: [
125
+ /* @__PURE__ */ i(
126
+ "tr",
127
+ {
128
+ onClick: t,
129
+ style: { cursor: "pointer" },
130
+ className: s ? "cedros-admin__table-row--active" : "",
131
+ children: [
132
+ /* @__PURE__ */ i("td", { children: [
133
+ /* @__PURE__ */ i("span", { className: "cedros-admin__mono", children: [
134
+ a.id.slice(0, 12),
135
+ "..."
136
+ ] }),
137
+ y ? /* @__PURE__ */ e("span", { className: "cedros-admin__badge cedros-admin__badge--info", style: { marginLeft: "0.5rem" }, children: "Gift Card" }) : null
138
+ ] }),
139
+ /* @__PURE__ */ e("td", { children: /* @__PURE__ */ e("span", { className: `cedros-admin__badge cedros-admin__badge--${I(a.status)}`, children: a.status }) }),
140
+ /* @__PURE__ */ e("td", { children: o(a.amount, a.amountAsset) }),
141
+ /* @__PURE__ */ e("td", { children: a.source }),
142
+ /* @__PURE__ */ e("td", { children: a.customerEmail || a.customerName || "—" }),
143
+ /* @__PURE__ */ e("td", { children: F(a.createdAt) })
144
+ ]
145
+ }
146
+ ),
147
+ s ? /* @__PURE__ */ e("tr", { children: /* @__PURE__ */ e("td", { colSpan: 6, style: { padding: 0 }, children: /* @__PURE__ */ e(
148
+ W,
149
+ {
150
+ detail: m,
151
+ redemptions: l,
152
+ loading: c,
153
+ formatAmount: o,
154
+ metadata: a.metadata
155
+ }
156
+ ) }) }) : null
157
+ ] });
158
+ }
159
+ function W({
160
+ detail: a,
161
+ redemptions: s,
162
+ loading: m,
163
+ formatAmount: l,
164
+ metadata: c
165
+ }) {
166
+ return m ? /* @__PURE__ */ e("div", { style: { padding: "1rem" }, className: "cedros-admin__loading-text", children: "Loading details..." }) : /* @__PURE__ */ i("div", { style: { padding: "1rem", background: "var(--cedros-admin-bg-muted, #f9fafb)" }, children: [
167
+ Object.keys(c).length > 0 ? /* @__PURE__ */ i("div", { style: { marginBottom: "1rem" }, children: [
168
+ /* @__PURE__ */ e("div", { className: "cedros-admin__label", children: "Order Metadata" }),
169
+ /* @__PURE__ */ e("div", { style: { display: "grid", gridTemplateColumns: "auto 1fr", gap: "0.25rem 1rem", fontSize: "0.8125rem" }, children: Object.entries(c).map(([t, o]) => /* @__PURE__ */ i("div", { style: { display: "contents" }, children: [
170
+ /* @__PURE__ */ e("span", { style: { fontWeight: 500, color: "var(--cedros-admin-text-muted)" }, children: t }),
171
+ /* @__PURE__ */ e("span", { children: o })
172
+ ] }, t)) })
173
+ ] }) : null,
174
+ s.length > 0 ? /* @__PURE__ */ i("div", { style: { marginBottom: "1rem" }, children: [
175
+ /* @__PURE__ */ e("div", { className: "cedros-admin__label", children: "Gift Card Fulfillment" }),
176
+ s.map((t) => /* @__PURE__ */ i("div", { style: { fontSize: "0.8125rem", padding: "0.5rem", border: "1px solid var(--cedros-admin-border)", borderRadius: "0.5rem", marginBottom: "0.5rem" }, children: [
177
+ /* @__PURE__ */ i("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center" }, children: [
178
+ /* @__PURE__ */ i("span", { children: [
179
+ "Face value: ",
180
+ l(t.faceValueCents, t.currency)
181
+ ] }),
182
+ /* @__PURE__ */ e("span", { className: `cedros-admin__badge cedros-admin__badge--${t.creditsIssued > 0 ? "success" : "warning"}`, children: t.creditsIssued > 0 ? "Credits issued" : "Pending" })
183
+ ] }),
184
+ /* @__PURE__ */ i("div", { style: { marginTop: "0.25rem", color: "var(--cedros-admin-text-muted)" }, children: [
185
+ "Recipient: ",
186
+ t.recipientUserId || "—",
187
+ t.tokenMinted ? /* @__PURE__ */ e("span", { className: "cedros-admin__badge cedros-admin__badge--info", style: { marginLeft: "0.5rem" }, children: "Token minted" }) : null
188
+ ] })
189
+ ] }, t.id))
190
+ ] }) : null,
191
+ a?.fulfillments && a.fulfillments.length > 0 ? /* @__PURE__ */ i("div", { style: { marginBottom: "1rem" }, children: [
192
+ /* @__PURE__ */ e("div", { className: "cedros-admin__label", children: "Fulfillments" }),
193
+ a.fulfillments.map((t) => /* @__PURE__ */ i("div", { style: { fontSize: "0.8125rem", marginBottom: "0.25rem" }, children: [
194
+ /* @__PURE__ */ e("span", { className: `cedros-admin__badge cedros-admin__badge--${I(t.status)}`, children: t.status }),
195
+ t.carrier ? /* @__PURE__ */ e("span", { style: { marginLeft: "0.5rem" }, children: t.carrier }) : null,
196
+ t.trackingNumber ? k(t.trackingUrl) ? /* @__PURE__ */ e("a", { href: k(t.trackingUrl), target: "_blank", rel: "noreferrer", style: { marginLeft: "0.5rem" }, children: t.trackingNumber }) : /* @__PURE__ */ e("span", { style: { marginLeft: "0.5rem" }, children: t.trackingNumber }) : null
197
+ ] }, t.id))
198
+ ] }) : null,
199
+ a?.history && a.history.length > 0 ? /* @__PURE__ */ i("div", { children: [
200
+ /* @__PURE__ */ e("div", { className: "cedros-admin__label", children: "Status History" }),
201
+ a.history.map((t) => /* @__PURE__ */ i("div", { style: { fontSize: "0.8125rem", marginBottom: "0.25rem" }, children: [
202
+ /* @__PURE__ */ e("span", { style: { color: "var(--cedros-admin-text-muted)" }, children: F(t.createdAt) }),
203
+ " ",
204
+ t.fromStatus,
205
+ " → ",
206
+ t.toStatus,
207
+ t.note ? /* @__PURE__ */ e("span", { style: { marginLeft: "0.5rem", fontStyle: "italic" }, children: t.note }) : null
208
+ ] }, t.id))
209
+ ] }) : null
210
+ ] });
211
+ }
212
+ function I(a) {
213
+ switch (a) {
214
+ case "paid":
215
+ case "fulfilled":
216
+ case "delivered":
217
+ case "success":
218
+ return "success";
219
+ case "processing":
220
+ case "shipped":
221
+ case "pending":
222
+ return "warning";
223
+ case "cancelled":
224
+ case "refunded":
225
+ case "failed":
226
+ return "error";
227
+ default:
228
+ return "default";
229
+ }
230
+ }
231
+ export {
232
+ J as OrdersSection
233
+ };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),p=require("./SingleCategorySettings-DqcXe-q4.js");function r({href:s,children:n}){return e.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"underline"},children:n})}const a=[{id:"stripe",label:"Stripe",category:"stripe",description:e.jsxs(e.Fragment,{children:["Configure your Stripe integration for card payments. Get your API keys from the"," ",e.jsx(r,{href:"https://dashboard.stripe.com/apikeys",children:"Stripe Dashboard"}),"."]})},{id:"crypto",label:"Crypto",category:"x402",description:e.jsxs(e.Fragment,{children:["Configure Solana wallet and token settings for crypto payments. Get a fast RPC endpoint from"," ",e.jsx(r,{href:"https://www.helius.dev",children:"Helius"})," or"," ",e.jsx(r,{href:"https://www.quicknode.com/chains/sol",children:"QuickNode"}),". Set up a payment address using"," ",e.jsx(r,{href:"https://phantom.app",children:"Phantom"})," or"," ",e.jsx(r,{href:"https://solflare.com",children:"Solflare"})," wallet."]})},{id:"credits",label:"Credits",category:"cedros_login",description:e.jsxs(e.Fragment,{children:["Configure Cedros Login integration for credits payments. See the"," ",e.jsx(r,{href:"https://docs.cedros.dev/credits",children:"Credits API documentation"}),"."]})}];function h({serverUrl:s,apiKey:n,authManager:c}){const[o,d]=l.useState("stripe"),i=a.find(t=>t.id===o);return e.jsxs("div",{className:"cedros-admin__payment-settings",children:[e.jsxs("div",{className:"cedros-admin__page-header",children:[e.jsx("h2",{className:"cedros-admin__page-title",children:"Payment Options"}),e.jsx("p",{className:"cedros-admin__page-description",children:"Configure payment methods including Stripe, crypto, and credits."})]}),e.jsx("div",{className:"cedros-admin__tabs cedros-admin__tabs--line",children:a.map(t=>e.jsx("button",{type:"button",className:`cedros-admin__tab ${o===t.id?"cedros-admin__tab--active":""}`,onClick:()=>d(t.id),children:t.label},t.id))}),e.jsx("div",{style:{marginTop:"1rem"},children:e.jsx(p.SingleCategorySettings,{serverUrl:s,apiKey:n,authManager:c,category:i.category,title:`${i.label} Settings`,description:i.description,showEnabledToggle:!0},i.category)})]})}exports.PaymentSettingsSection=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),p=require("./SingleCategorySettings-CRXTMTo5.js");function r({href:s,children:n}){return e.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"underline"},children:n})}const a=[{id:"stripe",label:"Stripe",category:"stripe",description:e.jsxs(e.Fragment,{children:["Configure your Stripe integration for card payments. Get your API keys from the"," ",e.jsx(r,{href:"https://dashboard.stripe.com/apikeys",children:"Stripe Dashboard"}),"."]})},{id:"crypto",label:"Crypto",category:"x402",description:e.jsxs(e.Fragment,{children:["Configure Solana wallet and token settings for crypto payments. Get a fast RPC endpoint from"," ",e.jsx(r,{href:"https://www.helius.dev",children:"Helius"})," or"," ",e.jsx(r,{href:"https://www.quicknode.com/chains/sol",children:"QuickNode"}),". Set up a payment address using"," ",e.jsx(r,{href:"https://phantom.app",children:"Phantom"})," or"," ",e.jsx(r,{href:"https://solflare.com",children:"Solflare"})," wallet."]})},{id:"credits",label:"Credits",category:"cedros_login",description:e.jsxs(e.Fragment,{children:["Configure Cedros Login integration for credits payments. See the"," ",e.jsx(r,{href:"https://docs.cedros.dev/credits",children:"Credits API documentation"}),"."]})}];function h({serverUrl:s,apiKey:n,authManager:c}){const[o,d]=l.useState("stripe"),i=a.find(t=>t.id===o);return e.jsxs("div",{className:"cedros-admin__payment-settings",children:[e.jsxs("div",{className:"cedros-admin__page-header",children:[e.jsx("h2",{className:"cedros-admin__page-title",children:"Payment Options"}),e.jsx("p",{className:"cedros-admin__page-description",children:"Configure payment methods including Stripe, crypto, and credits."})]}),e.jsx("div",{className:"cedros-admin__tabs cedros-admin__tabs--line",children:a.map(t=>e.jsx("button",{type:"button",className:`cedros-admin__tab ${o===t.id?"cedros-admin__tab--active":""}`,onClick:()=>d(t.id),children:t.label},t.id))}),e.jsx("div",{style:{marginTop:"1rem"},children:e.jsx(p.SingleCategorySettings,{serverUrl:s,apiKey:n,authManager:c,category:i.category,title:`${i.label} Settings`,description:i.description,showEnabledToggle:!0},i.category)})]})}exports.PaymentSettingsSection=h;
@@ -1,6 +1,6 @@
1
1
  import { jsxs as i, jsx as e, Fragment as s } from "react/jsx-runtime";
2
2
  import { useState as h } from "react";
3
- import { S as m } from "./SingleCategorySettings-BU98SRFV.mjs";
3
+ import { S as m } from "./SingleCategorySettings--LK0TZW0.mjs";
4
4
  function r({ href: o, children: a }) {
5
5
  return /* @__PURE__ */ e(
6
6
  "a",
@@ -1,6 +1,6 @@
1
1
  import { jsxs as n, jsx as i } from "react/jsx-runtime";
2
2
  import { useState as g } from "react";
3
- import { S as l } from "./SingleCategorySettings-BU98SRFV.mjs";
3
+ import { S as l } from "./SingleCategorySettings--LK0TZW0.mjs";
4
4
  const s = [
5
5
  {
6
6
  id: "logging",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("react"),g=require("./SingleCategorySettings-DqcXe-q4.js"),n=[{id:"logging",label:"Logging",category:"logging",description:"Configure log levels, format, and environment settings."},{id:"metrics",label:"Metrics",category:"metrics",description:"Configure metrics collection and API access for monitoring."},{id:"security",label:"Security",category:"security",description:"Configure CORS, rate limiting, and other security settings."}];function l({serverUrl:r,apiKey:c,authManager:o}){const[s,a]=d.useState("logging"),t=n.find(i=>i.id===s);return e.jsxs("div",{className:"cedros-admin__server-settings",children:[e.jsxs("div",{className:"cedros-admin__page-header",children:[e.jsx("h2",{className:"cedros-admin__page-title",children:"Store Server"}),e.jsx("p",{className:"cedros-admin__page-description",children:"Configure logging, metrics, and security settings."})]}),e.jsx("div",{className:"cedros-admin__tabs cedros-admin__tabs--line",children:n.map(i=>e.jsx("button",{type:"button",className:`cedros-admin__tab ${s===i.id?"cedros-admin__tab--active":""}`,onClick:()=>a(i.id),children:i.label},i.id))}),e.jsx("div",{style:{marginTop:"1rem"},children:e.jsx(g.SingleCategorySettings,{serverUrl:r,apiKey:c,authManager:o,category:t.category,title:`${t.label} Settings`,description:t.description},t.category)})]})}exports.SettingsSection=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("react"),g=require("./SingleCategorySettings-CRXTMTo5.js"),n=[{id:"logging",label:"Logging",category:"logging",description:"Configure log levels, format, and environment settings."},{id:"metrics",label:"Metrics",category:"metrics",description:"Configure metrics collection and API access for monitoring."},{id:"security",label:"Security",category:"security",description:"Configure CORS, rate limiting, and other security settings."}];function l({serverUrl:r,apiKey:c,authManager:o}){const[s,a]=d.useState("logging"),t=n.find(i=>i.id===s);return e.jsxs("div",{className:"cedros-admin__server-settings",children:[e.jsxs("div",{className:"cedros-admin__page-header",children:[e.jsx("h2",{className:"cedros-admin__page-title",children:"Store Server"}),e.jsx("p",{className:"cedros-admin__page-description",children:"Configure logging, metrics, and security settings."})]}),e.jsx("div",{className:"cedros-admin__tabs cedros-admin__tabs--line",children:n.map(i=>e.jsx("button",{type:"button",className:`cedros-admin__tab ${s===i.id?"cedros-admin__tab--active":""}`,onClick:()=>a(i.id),children:i.label},i.id))}),e.jsx("div",{style:{marginTop:"1rem"},children:e.jsx(g.SingleCategorySettings,{serverUrl:r,apiKey:c,authManager:o,category:t.category,title:`${t.label} Settings`,description:t.description},t.category)})]})}exports.SettingsSection=l;