@burdenoff/microfe-store 2026.917.1 → 2026.918.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,36 +2,36 @@ import { useStore as e } from "../providers/StoreProvider.js";
2
2
  import { formatPriceForModel as t } from "../utils/index.js";
3
3
  import { useCallback as n, useEffect as r, useState as i } from "react";
4
4
  import { useNavigate as a } from "react-router";
5
- import { ArrowRight as o, Check as s, CheckCircle as c, ChevronDown as l, ChevronUp as u, Clock as d, ExternalLink as f, LayoutDashboard as p, MessageSquareWarning as m, PackageCheck as h, RefreshCw as g, Store as _, TrendingUp as v, Users as y, X as b, XCircle as x } from "lucide-react";
6
- import { graphqlFetch as S } from "@burdenoff/fe-libs/shared/graphql";
7
- import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
8
- import { GlassCard as E, IllustratedEmptyState as D } from "@burdenoff/fe-libs/ui";
5
+ import { ArrowRight as o, Check as s, CheckCircle as c, ChevronDown as l, ChevronUp as u, Clock as d, Container as f, ExternalLink as p, LayoutDashboard as m, MessageSquareWarning as h, PackageCheck as g, RefreshCw as _, Store as v, TrendingUp as y, Users as b, X as x, XCircle as S } from "lucide-react";
6
+ import { graphqlFetch as C } from "@burdenoff/fe-libs/shared/graphql";
7
+ import { Fragment as w, jsx as T, jsxs as E } from "react/jsx-runtime";
8
+ import { GlassCard as D, IllustratedEmptyState as O } from "@burdenoff/fe-libs/ui";
9
9
  //#region src/pages/AdminDashboardPage.tsx
10
- var O = "\n query AdminDashboardData {\n recentPending: pendingReviewProducts(limit: 5) {\n totalCount\n products {\n id\n slug\n name\n type\n nature\n category\n icon\n price\n currency\n pricingModel\n description\n submittedAt\n submittedBy\n productId\n publisher {\n name\n email\n }\n }\n }\n stores {\n id\n }\n recentPublished: products(filter: { status: PUBLISHED }, limit: 5) {\n id\n slug\n name\n icon\n type\n status\n publishedAt\n reviewedBy\n }\n recentRejected: products(filter: { status: REJECTED }, limit: 5) {\n id\n slug\n name\n icon\n type\n status\n reviewedAt\n rejectedReason\n }\n }\n", k = "\n mutation ApproveProduct($id: ID!) {\n approveProduct(id: $id) {\n id\n status\n }\n }\n", A = "\n mutation RejectProduct($id: ID!, $reason: String!) {\n rejectProduct(id: $id, reason: $reason) {\n id\n status\n }\n }\n", j = {
10
+ var k = "\n query AdminDashboardData {\n recentPending: pendingReviewProducts(limit: 5) {\n totalCount\n products {\n id\n slug\n name\n type\n nature\n category\n icon\n price\n currency\n pricingModel\n description\n submittedAt\n submittedBy\n productId\n publisher {\n name\n email\n }\n }\n }\n stores {\n id\n }\n recentPublished: products(filter: { status: PUBLISHED }, limit: 5) {\n id\n slug\n name\n icon\n type\n status\n publishedAt\n reviewedBy\n }\n recentRejected: products(filter: { status: REJECTED }, limit: 5) {\n id\n slug\n name\n icon\n type\n status\n reviewedAt\n rejectedReason\n }\n }\n", A = "\n mutation ApproveProduct($id: ID!) {\n approveProduct(id: $id) {\n id\n status\n }\n }\n", j = "\n mutation RejectProduct($id: ID!, $reason: String!) {\n rejectProduct(id: $id, reason: $reason) {\n id\n status\n }\n }\n", M = {
11
11
  NODE: "bg-[var(--color-status-info-bg-subtle)] text-[var(--color-status-info-text)]",
12
12
  WORKFLOW: "bg-[var(--color-status-warning-bg-subtle)] text-[var(--color-status-warning-text)]",
13
13
  INTEGRATION: "bg-[var(--color-status-success-bg-subtle)] text-[var(--color-status-success-text)]",
14
14
  VIBEMODULE: "bg-[var(--color-surface-accent-muted)] text-[var(--color-text-accent)]"
15
15
  };
16
- function M(e) {
17
- return e ? j[e] ?? "bg-[var(--color-surface-muted)] text-[var(--color-text-secondary)]" : "bg-[var(--color-surface-muted)] text-[var(--color-text-secondary)]";
18
- }
19
16
  function N(e) {
17
+ return e ? M[e] ?? "bg-[var(--color-surface-muted)] text-[var(--color-text-secondary)]" : "bg-[var(--color-surface-muted)] text-[var(--color-text-secondary)]";
18
+ }
19
+ function P(e) {
20
20
  return e ? new Date(e).toLocaleDateString(void 0, {
21
21
  month: "short",
22
22
  day: "numeric",
23
23
  year: "numeric"
24
24
  }) : "—";
25
25
  }
26
- function P(e) {
26
+ function F(e) {
27
27
  if (!e) return "—";
28
28
  let t = Date.now() - new Date(e).getTime(), n = Math.floor(t / 6e4);
29
29
  if (n < 60) return `${n}m ago`;
30
30
  let r = Math.floor(n / 60);
31
31
  return r < 24 ? `${r}h ago` : `${Math.floor(r / 24)}d ago`;
32
32
  }
33
- var F = () => {
34
- let j = a(), { authToken: F, basePath: I } = e(), [L, R] = i({
33
+ var I = () => {
34
+ let M = a(), { authToken: I, basePath: L } = e(), [R, z] = i({
35
35
  pendingCount: 0,
36
36
  totalStores: 0,
37
37
  recentPending: [],
@@ -39,20 +39,20 @@ var F = () => {
39
39
  recentRejected: [],
40
40
  loading: !0,
41
41
  error: null
42
- }), [z, B] = i(null), [V, H] = i(null), [U, W] = i(""), [G, K] = i(null), [q, J] = i(null), Y = n(async () => {
43
- R((e) => ({
42
+ }), [B, V] = i(null), [H, U] = i(null), [W, G] = i(""), [K, q] = i(null), [J, Y] = i(null), X = n(async () => {
43
+ z((e) => ({
44
44
  ...e,
45
45
  loading: !0,
46
46
  error: null
47
47
  }));
48
48
  try {
49
- let e = await S({
49
+ let e = await C({
50
50
  gateway: "global",
51
- query: O,
52
- authToken: F || void 0
51
+ query: k,
52
+ authToken: I || void 0
53
53
  });
54
54
  if (e.errors?.length) throw Error(e.errors[0]?.message ?? "Failed to load dashboard");
55
- R({
55
+ z({
56
56
  pendingCount: e.data?.recentPending.totalCount ?? 0,
57
57
  totalStores: e.data?.stores.length ?? 0,
58
58
  recentPending: e.data?.recentPending.products ?? [],
@@ -62,68 +62,68 @@ var F = () => {
62
62
  error: null
63
63
  });
64
64
  } catch (e) {
65
- R((t) => ({
65
+ z((t) => ({
66
66
  ...t,
67
67
  loading: !1,
68
68
  error: e instanceof Error ? e.message : "Failed to load dashboard"
69
69
  }));
70
70
  }
71
- }, [F]);
71
+ }, [I]);
72
72
  r(() => {
73
- Y();
74
- }, [Y]);
75
- let X = async (e) => {
76
- B(e), K(null);
73
+ X();
74
+ }, [X]);
75
+ let Z = async (e) => {
76
+ V(e), q(null);
77
77
  try {
78
- let t = await S({
78
+ let t = await C({
79
79
  gateway: "global",
80
- query: k,
80
+ query: A,
81
81
  variables: { id: e },
82
- authToken: F || void 0
82
+ authToken: I || void 0
83
83
  });
84
84
  if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Approval failed");
85
- await Y();
85
+ await X();
86
86
  } catch (e) {
87
- K(e instanceof Error ? e.message : "Approval failed");
87
+ q(e instanceof Error ? e.message : "Approval failed");
88
88
  } finally {
89
- B(null);
89
+ V(null);
90
90
  }
91
- }, Z = async (e) => {
92
- if (U.trim()) {
93
- B(e), K(null);
91
+ }, Q = async (e) => {
92
+ if (W.trim()) {
93
+ V(e), q(null);
94
94
  try {
95
- let t = await S({
95
+ let t = await C({
96
96
  gateway: "global",
97
- query: A,
97
+ query: j,
98
98
  variables: {
99
99
  id: e,
100
- reason: U.trim()
100
+ reason: W.trim()
101
101
  },
102
- authToken: F || void 0
102
+ authToken: I || void 0
103
103
  });
104
104
  if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Rejection failed");
105
- H(null), W(""), await Y();
105
+ U(null), G(""), await X();
106
106
  } catch (e) {
107
- K(e instanceof Error ? e.message : "Rejection failed");
107
+ q(e instanceof Error ? e.message : "Rejection failed");
108
108
  } finally {
109
- B(null);
109
+ V(null);
110
110
  }
111
111
  }
112
- }, Q = [
112
+ }, $ = [
113
113
  {
114
114
  label: "Pending review",
115
- value: L.pendingCount,
116
- icon: h,
117
- href: `${I}/submissions`,
118
- accent: L.pendingCount > 0 ? "border-[var(--color-status-warning-text)]/30 bg-[var(--color-status-warning-bg-subtle)]/20" : "",
119
- valueClass: L.pendingCount > 0 ? "text-[var(--color-status-warning-text)]" : "text-[var(--color-text-primary)]",
115
+ value: R.pendingCount,
116
+ icon: g,
117
+ href: `${L}/submissions`,
118
+ accent: R.pendingCount > 0 ? "border-[var(--color-status-warning-text)]/30 bg-[var(--color-status-warning-bg-subtle)]/20" : "",
119
+ valueClass: R.pendingCount > 0 ? "text-[var(--color-status-warning-text)]" : "text-[var(--color-text-primary)]",
120
120
  cta: "Review queue"
121
121
  },
122
122
  {
123
123
  label: "Stores in registry",
124
- value: L.totalStores,
125
- icon: _,
126
- href: `${I}/stores`,
124
+ value: R.totalStores,
125
+ icon: v,
126
+ href: `${L}/stores`,
127
127
  accent: "",
128
128
  valueClass: "text-[var(--color-text-primary)]",
129
129
  cta: "Manage stores"
@@ -131,8 +131,8 @@ var F = () => {
131
131
  {
132
132
  label: "Review moderation",
133
133
  value: "—",
134
- icon: m,
135
- href: `${I}/reviews`,
134
+ icon: h,
135
+ href: `${L}/reviews`,
136
136
  accent: "",
137
137
  valueClass: "text-[var(--color-text-primary)]",
138
138
  cta: "Moderate reviews"
@@ -140,196 +140,205 @@ var F = () => {
140
140
  {
141
141
  label: "Publishers",
142
142
  value: "—",
143
- icon: y,
144
- href: `${I}/dashboard`,
143
+ icon: b,
144
+ href: `${L}/dashboard`,
145
145
  accent: "",
146
146
  valueClass: "text-[var(--color-text-primary)]",
147
147
  cta: "View publishers"
148
+ },
149
+ {
150
+ label: "Sandbox build checks",
151
+ value: "—",
152
+ icon: f,
153
+ href: `${L}/sandbox-builds`,
154
+ accent: "",
155
+ valueClass: "text-[var(--color-text-primary)]",
156
+ cta: "View build log"
148
157
  }
149
158
  ];
150
- return /* @__PURE__ */ T("div", {
159
+ return /* @__PURE__ */ E("div", {
151
160
  className: "min-h-screen bg-[var(--color-surface-default)]",
152
- children: [/* @__PURE__ */ w("header", {
161
+ children: [/* @__PURE__ */ T("header", {
153
162
  className: "sticky top-0 z-10 border-b border-[var(--color-border-seam)] bg-[var(--color-surface-raised)] shadow-[var(--shadow-elevation-1)]",
154
- children: /* @__PURE__ */ w("div", {
163
+ children: /* @__PURE__ */ T("div", {
155
164
  className: "mx-auto max-w-6xl px-6 py-4",
156
- children: /* @__PURE__ */ T("div", {
165
+ children: /* @__PURE__ */ E("div", {
157
166
  className: "flex items-center justify-between",
158
- children: [/* @__PURE__ */ T("div", {
167
+ children: [/* @__PURE__ */ E("div", {
159
168
  className: "flex items-center gap-2.5",
160
- children: [/* @__PURE__ */ w(p, { className: "size-5 text-[var(--color-text-primary)]" }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("h1", {
169
+ children: [/* @__PURE__ */ T(m, { className: "size-5 text-[var(--color-text-primary)]" }), /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("h1", {
161
170
  className: "text-lg font-semibold text-[var(--color-text-primary)]",
162
171
  children: "Store Admin Dashboard"
163
- }), /* @__PURE__ */ w("p", {
172
+ }), /* @__PURE__ */ T("p", {
164
173
  className: "text-xs text-[var(--color-text-secondary)]",
165
174
  children: "Marketplace control room — submissions, registry, moderation"
166
175
  })] })]
167
- }), /* @__PURE__ */ T("button", {
176
+ }), /* @__PURE__ */ E("button", {
168
177
  type: "button",
169
- onClick: () => void Y(),
170
- disabled: L.loading,
178
+ onClick: () => void X(),
179
+ disabled: R.loading,
171
180
  className: "inline-flex items-center gap-2 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-sm text-[var(--color-text-primary)] hover:bg-[var(--color-surface-hover)] transition-colors disabled:opacity-50",
172
- children: [/* @__PURE__ */ w(g, { className: `size-4 ${L.loading ? "animate-spin" : ""}` }), "Refresh"]
181
+ children: [/* @__PURE__ */ T(_, { className: `size-4 ${R.loading ? "animate-spin" : ""}` }), "Refresh"]
173
182
  })]
174
183
  })
175
184
  })
176
- }), /* @__PURE__ */ T("main", {
185
+ }), /* @__PURE__ */ E("main", {
177
186
  className: "mx-auto max-w-6xl space-y-8 p-6",
178
187
  children: [
179
- L.error && /* @__PURE__ */ w("div", {
188
+ R.error && /* @__PURE__ */ T("div", {
180
189
  role: "alert",
181
190
  className: "rounded-lg border border-[var(--color-border-danger)] bg-[var(--color-surface-danger-muted)] px-4 py-3 text-sm text-[var(--color-text-danger)]",
182
- children: L.error
191
+ children: R.error
183
192
  }),
184
- /* @__PURE__ */ w("section", { children: /* @__PURE__ */ w("div", {
193
+ /* @__PURE__ */ T("section", { children: /* @__PURE__ */ T("div", {
185
194
  className: "grid grid-cols-2 gap-4 lg:grid-cols-4",
186
- children: Q.map((e) => {
195
+ children: $.map((e) => {
187
196
  let t = e.icon;
188
- return /* @__PURE__ */ T("button", {
197
+ return /* @__PURE__ */ E("button", {
189
198
  type: "button",
190
- onClick: () => j(e.href),
199
+ onClick: () => M(e.href),
191
200
  className: `group relative overflow-hidden rounded-xl border border-[var(--color-border-seam)] bg-[var(--color-surface-raised)] p-5 text-left shadow-[var(--shadow-elevation-1)] transition-all hover:border-[var(--color-border-strong)] hover:shadow-[var(--shadow-elevation-2)] ${e.accent}`,
192
- children: [/* @__PURE__ */ T("div", {
201
+ children: [/* @__PURE__ */ E("div", {
193
202
  className: "flex items-start justify-between gap-2",
194
- children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("p", {
203
+ children: [/* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("p", {
195
204
  className: "text-xs font-medium text-[var(--color-text-secondary)] uppercase tracking-wide",
196
205
  children: e.label
197
- }), /* @__PURE__ */ w("p", {
206
+ }), /* @__PURE__ */ T("p", {
198
207
  className: `mt-2 text-3xl font-bold tabular-nums ${e.valueClass}`,
199
- children: L.loading ? /* @__PURE__ */ w("span", { className: "inline-block w-8 animate-pulse rounded bg-[var(--color-surface-muted)] h-8" }) : e.value
200
- })] }), /* @__PURE__ */ w("div", {
208
+ children: R.loading ? /* @__PURE__ */ T("span", { className: "inline-block w-8 animate-pulse rounded bg-[var(--color-surface-muted)] h-8" }) : e.value
209
+ })] }), /* @__PURE__ */ T("div", {
201
210
  className: "rounded-lg bg-[var(--color-surface-muted)] p-2",
202
- children: /* @__PURE__ */ w(t, { className: "size-5 text-[var(--color-text-secondary)]" })
211
+ children: /* @__PURE__ */ T(t, { className: "size-5 text-[var(--color-text-secondary)]" })
203
212
  })]
204
- }), /* @__PURE__ */ T("div", {
213
+ }), /* @__PURE__ */ E("div", {
205
214
  className: "mt-3 flex items-center gap-1 text-xs font-medium text-[var(--color-text-accent)] group-hover:underline",
206
- children: [e.cta, /* @__PURE__ */ w(o, { className: "size-3" })]
215
+ children: [e.cta, /* @__PURE__ */ T(o, { className: "size-3" })]
207
216
  })]
208
217
  }, e.label);
209
218
  })
210
219
  }) }),
211
- /* @__PURE__ */ T("section", { children: [
212
- /* @__PURE__ */ T("div", {
220
+ /* @__PURE__ */ E("section", { children: [
221
+ /* @__PURE__ */ E("div", {
213
222
  className: "mb-4 flex items-center justify-between",
214
- children: [/* @__PURE__ */ T("div", {
223
+ children: [/* @__PURE__ */ E("div", {
215
224
  className: "flex items-center gap-2",
216
- children: [/* @__PURE__ */ w("h2", {
225
+ children: [/* @__PURE__ */ T("h2", {
217
226
  className: "text-base font-semibold text-[var(--color-text-primary)]",
218
227
  children: "Pending Submissions"
219
- }), L.pendingCount > 0 && /* @__PURE__ */ T("span", {
228
+ }), R.pendingCount > 0 && /* @__PURE__ */ E("span", {
220
229
  className: "rounded-full bg-[var(--color-status-warning-bg-subtle)] px-2 py-0.5 text-xs font-semibold text-[var(--color-status-warning-text)]",
221
- children: [L.pendingCount, " waiting"]
230
+ children: [R.pendingCount, " waiting"]
222
231
  })]
223
- }), /* @__PURE__ */ T("button", {
232
+ }), /* @__PURE__ */ E("button", {
224
233
  type: "button",
225
- onClick: () => j(`${I}/submissions`),
234
+ onClick: () => M(`${L}/submissions`),
226
235
  className: "inline-flex items-center gap-1.5 rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1.5 text-xs font-medium text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] hover:text-[var(--color-text-primary)] transition-colors",
227
- children: ["View all", /* @__PURE__ */ w(f, { className: "size-3.5" })]
236
+ children: ["View all", /* @__PURE__ */ T(p, { className: "size-3.5" })]
228
237
  })]
229
238
  }),
230
- G && /* @__PURE__ */ w("div", {
239
+ K && /* @__PURE__ */ T("div", {
231
240
  role: "alert",
232
241
  className: "mb-3 rounded-lg border border-[var(--color-border-danger)] bg-[var(--color-surface-danger-muted)] px-4 py-2.5 text-sm text-[var(--color-text-danger)]",
233
- children: G
242
+ children: K
234
243
  }),
235
- L.loading ? /* @__PURE__ */ w("div", {
244
+ R.loading ? /* @__PURE__ */ T("div", {
236
245
  className: "space-y-3",
237
246
  children: [
238
247
  1,
239
248
  2,
240
249
  3
241
- ].map((e) => /* @__PURE__ */ w("div", { className: "h-20 animate-pulse rounded-xl bg-[var(--color-surface-muted)]" }, e))
242
- }) : L.recentPending.length === 0 ? /* @__PURE__ */ w(D, {
250
+ ].map((e) => /* @__PURE__ */ T("div", { className: "h-20 animate-pulse rounded-xl bg-[var(--color-surface-muted)]" }, e))
251
+ }) : R.recentPending.length === 0 ? /* @__PURE__ */ T(O, {
243
252
  illustration: "empty-notifications",
244
253
  title: "All caught up",
245
254
  description: "No submissions awaiting review. New products will appear here as publishers send them in."
246
- }) : /* @__PURE__ */ w("div", {
255
+ }) : /* @__PURE__ */ T("div", {
247
256
  className: "overflow-hidden rounded-xl border border-[var(--color-border-seam)] bg-[var(--color-surface-raised)] shadow-[var(--shadow-elevation-1)]",
248
- children: /* @__PURE__ */ w("ul", {
257
+ children: /* @__PURE__ */ T("ul", {
249
258
  className: "divide-y divide-[var(--color-border-seam)]",
250
- children: L.recentPending.map((e) => /* @__PURE__ */ T("li", {
259
+ children: R.recentPending.map((e) => /* @__PURE__ */ E("li", {
251
260
  className: "overflow-hidden",
252
261
  children: [
253
- /* @__PURE__ */ T("div", {
262
+ /* @__PURE__ */ E("div", {
254
263
  className: "flex items-center gap-4 px-5 py-4",
255
264
  children: [
256
- e.icon ? /* @__PURE__ */ w("img", {
265
+ e.icon ? /* @__PURE__ */ T("img", {
257
266
  src: e.icon,
258
267
  alt: "",
259
268
  className: "size-10 shrink-0 rounded-lg object-cover"
260
- }) : /* @__PURE__ */ w("div", {
269
+ }) : /* @__PURE__ */ T("div", {
261
270
  className: "flex size-10 shrink-0 items-center justify-center rounded-lg bg-[var(--color-surface-muted)] text-xs font-bold text-[var(--color-text-muted)] uppercase",
262
271
  children: e.type.slice(0, 2)
263
272
  }),
264
- /* @__PURE__ */ T("div", {
273
+ /* @__PURE__ */ E("div", {
265
274
  className: "min-w-0 flex-1",
266
- children: [/* @__PURE__ */ T("div", {
275
+ children: [/* @__PURE__ */ E("div", {
267
276
  className: "flex items-center gap-2 flex-wrap",
268
- children: [/* @__PURE__ */ w("p", {
277
+ children: [/* @__PURE__ */ T("p", {
269
278
  className: "font-medium text-[var(--color-text-primary)] truncate",
270
279
  children: e.name
271
- }), /* @__PURE__ */ w("span", {
272
- className: `shrink-0 rounded-full px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide ${M(e.type)}`,
280
+ }), /* @__PURE__ */ T("span", {
281
+ className: `shrink-0 rounded-full px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide ${N(e.type)}`,
273
282
  children: e.type
274
283
  })]
275
- }), /* @__PURE__ */ T("div", {
284
+ }), /* @__PURE__ */ E("div", {
276
285
  className: "mt-0.5 flex items-center gap-3 flex-wrap text-xs text-[var(--color-text-secondary)]",
277
286
  children: [
278
- /* @__PURE__ */ w("span", { children: e.publisher?.name ?? "Unknown publisher" }),
279
- /* @__PURE__ */ w("span", { children: "·" }),
280
- /* @__PURE__ */ w("span", { children: t(e.price, e.currency, e.pricingModel) }),
281
- e.submittedAt && /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("span", { children: "·" }), /* @__PURE__ */ T("span", {
287
+ /* @__PURE__ */ T("span", { children: e.publisher?.name ?? "Unknown publisher" }),
288
+ /* @__PURE__ */ T("span", { children: "·" }),
289
+ /* @__PURE__ */ T("span", { children: t(e.price, e.currency, e.pricingModel) }),
290
+ e.submittedAt && /* @__PURE__ */ E(w, { children: [/* @__PURE__ */ T("span", { children: "·" }), /* @__PURE__ */ E("span", {
282
291
  className: "flex items-center gap-1",
283
- children: [/* @__PURE__ */ w(d, { className: "size-3" }), P(e.submittedAt)]
292
+ children: [/* @__PURE__ */ T(d, { className: "size-3" }), F(e.submittedAt)]
284
293
  })] })
285
294
  ]
286
295
  })]
287
296
  }),
288
- /* @__PURE__ */ T("div", {
297
+ /* @__PURE__ */ E("div", {
289
298
  className: "shrink-0 flex items-center gap-2",
290
299
  children: [
291
- /* @__PURE__ */ T("button", {
300
+ /* @__PURE__ */ E("button", {
292
301
  type: "button",
293
- onClick: () => J(q === e.id ? null : e.id),
302
+ onClick: () => Y(J === e.id ? null : e.id),
294
303
  className: "inline-flex items-center gap-1 rounded-md border border-[var(--color-border-default)] px-2.5 py-1.5 text-xs text-[var(--color-text-secondary)] hover:bg-[var(--color-surface-hover)] transition-colors",
295
- children: [q === e.id ? /* @__PURE__ */ w(u, { className: "size-3.5" }) : /* @__PURE__ */ w(l, { className: "size-3.5" }), "Details"]
304
+ children: [J === e.id ? /* @__PURE__ */ T(u, { className: "size-3.5" }) : /* @__PURE__ */ T(l, { className: "size-3.5" }), "Details"]
296
305
  }),
297
- /* @__PURE__ */ T("button", {
306
+ /* @__PURE__ */ E("button", {
298
307
  type: "button",
299
- onClick: () => void X(e.id),
300
- disabled: z === e.id,
308
+ onClick: () => void Z(e.id),
309
+ disabled: B === e.id,
301
310
  className: "inline-flex items-center gap-1 rounded-md bg-[var(--color-surface-success)] px-3 py-1.5 text-xs font-semibold text-[var(--color-text-on-success)] hover:opacity-90 disabled:opacity-50 transition-opacity",
302
- children: [/* @__PURE__ */ w(s, { className: "size-3.5" }), "Approve"]
311
+ children: [/* @__PURE__ */ T(s, { className: "size-3.5" }), "Approve"]
303
312
  }),
304
- /* @__PURE__ */ T("button", {
313
+ /* @__PURE__ */ E("button", {
305
314
  type: "button",
306
315
  onClick: () => {
307
- H(e.id), W(""), K(null);
316
+ U(e.id), G(""), q(null);
308
317
  },
309
- disabled: z === e.id,
318
+ disabled: B === e.id,
310
319
  className: "inline-flex items-center gap-1 rounded-md border border-[var(--color-border-danger)] bg-[var(--color-surface-danger-muted)] px-3 py-1.5 text-xs font-semibold text-[var(--color-text-danger)] hover:bg-[var(--color-surface-danger)] hover:text-[var(--color-text-on-danger)] disabled:opacity-50 transition-colors",
311
- children: [/* @__PURE__ */ w(b, { className: "size-3.5" }), "Reject"]
320
+ children: [/* @__PURE__ */ T(x, { className: "size-3.5" }), "Reject"]
312
321
  })
313
322
  ]
314
323
  })
315
324
  ]
316
325
  }),
317
- q === e.id && /* @__PURE__ */ w("div", {
326
+ J === e.id && /* @__PURE__ */ T("div", {
318
327
  className: "border-t border-[var(--color-border-seam)] bg-[var(--color-surface-muted)] px-5 py-4",
319
- children: /* @__PURE__ */ T("dl", {
328
+ children: /* @__PURE__ */ E("dl", {
320
329
  className: "grid grid-cols-2 gap-x-8 gap-y-3 text-xs sm:grid-cols-3",
321
330
  children: [
322
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
331
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("dt", {
323
332
  className: "font-medium text-[var(--color-text-secondary)]",
324
333
  children: "Slug"
325
- }), /* @__PURE__ */ w("dd", {
334
+ }), /* @__PURE__ */ T("dd", {
326
335
  className: "mt-0.5 font-mono text-[var(--color-text-primary)]",
327
336
  children: e.slug
328
337
  })] }),
329
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
338
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("dt", {
330
339
  className: "font-medium text-[var(--color-text-secondary)]",
331
340
  children: "Type"
332
- }), /* @__PURE__ */ T("dd", {
341
+ }), /* @__PURE__ */ E("dd", {
333
342
  className: "mt-0.5 text-[var(--color-text-primary)]",
334
343
  children: [
335
344
  e.type,
@@ -337,22 +346,22 @@ var F = () => {
337
346
  e.nature ?? "—"
338
347
  ]
339
348
  })] }),
340
- e.category && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
349
+ e.category && /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("dt", {
341
350
  className: "font-medium text-[var(--color-text-secondary)]",
342
351
  children: "Category"
343
- }), /* @__PURE__ */ w("dd", {
352
+ }), /* @__PURE__ */ T("dd", {
344
353
  className: "mt-0.5 text-[var(--color-text-primary)]",
345
354
  children: e.category
346
355
  })] }),
347
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
356
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("dt", {
348
357
  className: "font-medium text-[var(--color-text-secondary)]",
349
358
  children: "Pricing"
350
- }), /* @__PURE__ */ T("dd", {
359
+ }), /* @__PURE__ */ E("dd", {
351
360
  className: "mt-0.5 text-[var(--color-text-primary)]",
352
361
  children: [
353
362
  t(e.price, e.currency, e.pricingModel),
354
363
  " ",
355
- /* @__PURE__ */ T("span", {
364
+ /* @__PURE__ */ E("span", {
356
365
  className: "text-[var(--color-text-muted)]",
357
366
  children: [
358
367
  "(",
@@ -362,22 +371,22 @@ var F = () => {
362
371
  })
363
372
  ]
364
373
  })] }),
365
- /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
374
+ /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("dt", {
366
375
  className: "font-medium text-[var(--color-text-secondary)]",
367
376
  children: "Publisher"
368
- }), /* @__PURE__ */ T("dd", {
377
+ }), /* @__PURE__ */ E("dd", {
369
378
  className: "mt-0.5 text-[var(--color-text-primary)]",
370
- children: [e.publisher?.name ?? "—", e.publisher?.email && /* @__PURE__ */ w("span", {
379
+ children: [e.publisher?.name ?? "—", e.publisher?.email && /* @__PURE__ */ T("span", {
371
380
  className: "block text-[var(--color-text-muted)]",
372
381
  children: e.publisher.email
373
382
  })]
374
383
  })] }),
375
- e.productId && /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
384
+ e.productId && /* @__PURE__ */ E("div", { children: [/* @__PURE__ */ T("dt", {
376
385
  className: "font-medium text-[var(--color-text-secondary)]",
377
386
  children: "Devportal app"
378
- }), /* @__PURE__ */ w("dd", {
387
+ }), /* @__PURE__ */ T("dd", {
379
388
  className: "mt-0.5",
380
- children: /* @__PURE__ */ T("a", {
389
+ children: /* @__PURE__ */ E("a", {
381
390
  href: `/devportal/apps/${e.productId}`,
382
391
  target: "_blank",
383
392
  rel: "noreferrer",
@@ -385,16 +394,16 @@ var F = () => {
385
394
  children: [
386
395
  e.productId.slice(0, 16),
387
396
  "…",
388
- /* @__PURE__ */ w(f, { className: "size-3" })
397
+ /* @__PURE__ */ T(p, { className: "size-3" })
389
398
  ]
390
399
  })
391
400
  })] }),
392
- e.description && /* @__PURE__ */ T("div", {
401
+ e.description && /* @__PURE__ */ E("div", {
393
402
  className: "col-span-2 sm:col-span-3",
394
- children: [/* @__PURE__ */ w("dt", {
403
+ children: [/* @__PURE__ */ T("dt", {
395
404
  className: "font-medium text-[var(--color-text-secondary)]",
396
405
  children: "Description"
397
- }), /* @__PURE__ */ w("dd", {
406
+ }), /* @__PURE__ */ T("dd", {
398
407
  className: "mt-0.5 text-[var(--color-text-primary)]",
399
408
  children: e.description
400
409
  })]
@@ -402,35 +411,35 @@ var F = () => {
402
411
  ]
403
412
  })
404
413
  }),
405
- V === e.id && /* @__PURE__ */ T("div", {
414
+ H === e.id && /* @__PURE__ */ E("div", {
406
415
  className: "border-t border-[var(--color-border-seam)] bg-[var(--color-surface-danger-muted)]/30 px-5 py-4",
407
416
  children: [
408
- /* @__PURE__ */ w("p", {
417
+ /* @__PURE__ */ T("p", {
409
418
  className: "mb-2 text-xs font-semibold text-[var(--color-text-danger)]",
410
419
  children: "Provide a rejection reason (the publisher will see this)"
411
420
  }),
412
- /* @__PURE__ */ w("textarea", {
421
+ /* @__PURE__ */ T("textarea", {
413
422
  id: `reject-reason-${e.id}`,
414
423
  "aria-label": "Rejection reason",
415
- value: U,
416
- onChange: (e) => W(e.target.value),
424
+ value: W,
425
+ onChange: (e) => G(e.target.value),
417
426
  rows: 2,
418
427
  className: "w-full rounded-lg border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-2 text-sm text-[var(--color-text-primary)] focus:border-[var(--color-border-accent)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] resize-none",
419
428
  placeholder: "Explain why this submission is being rejected…"
420
429
  }),
421
- /* @__PURE__ */ T("div", {
430
+ /* @__PURE__ */ E("div", {
422
431
  className: "mt-2 flex justify-end gap-2",
423
- children: [/* @__PURE__ */ w("button", {
432
+ children: [/* @__PURE__ */ T("button", {
424
433
  type: "button",
425
434
  onClick: () => {
426
- H(null), W("");
435
+ U(null), G("");
427
436
  },
428
437
  className: "rounded-md border border-[var(--color-border-default)] bg-[var(--color-surface-default)] px-3 py-1 text-xs font-medium text-[var(--color-text-primary)] hover:bg-[var(--color-surface-hover)] transition-colors",
429
438
  children: "Cancel"
430
- }), /* @__PURE__ */ w("button", {
439
+ }), /* @__PURE__ */ T("button", {
431
440
  type: "button",
432
- onClick: () => void Z(e.id),
433
- disabled: !U.trim() || z === e.id,
441
+ onClick: () => void Q(e.id),
442
+ disabled: !W.trim() || B === e.id,
434
443
  className: "rounded-md bg-[var(--color-surface-danger)] px-3 py-1 text-xs font-semibold text-[var(--color-text-on-danger)] hover:opacity-90 disabled:opacity-50 transition-opacity",
435
444
  children: "Submit rejection"
436
445
  })]
@@ -442,121 +451,121 @@ var F = () => {
442
451
  })
443
452
  })
444
453
  ] }),
445
- /* @__PURE__ */ T("section", { children: [/* @__PURE__ */ T("div", {
454
+ /* @__PURE__ */ E("section", { children: [/* @__PURE__ */ E("div", {
446
455
  className: "mb-4 flex items-center gap-2",
447
- children: [/* @__PURE__ */ w(v, { className: "size-4 text-[var(--color-text-secondary)]" }), /* @__PURE__ */ w("h2", {
456
+ children: [/* @__PURE__ */ T(y, { className: "size-4 text-[var(--color-text-secondary)]" }), /* @__PURE__ */ T("h2", {
448
457
  className: "text-base font-semibold text-[var(--color-text-primary)]",
449
458
  children: "Recent Activity"
450
459
  })]
451
- }), /* @__PURE__ */ T("div", {
460
+ }), /* @__PURE__ */ E("div", {
452
461
  className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
453
- children: [/* @__PURE__ */ T(E, {
462
+ children: [/* @__PURE__ */ E(D, {
454
463
  className: "overflow-hidden p-0",
455
- children: [/* @__PURE__ */ T("div", {
464
+ children: [/* @__PURE__ */ E("div", {
456
465
  className: "flex items-center gap-2.5 border-b border-[var(--color-border-seam)] px-4 py-3",
457
466
  children: [
458
- /* @__PURE__ */ w("div", {
467
+ /* @__PURE__ */ T("div", {
459
468
  className: "flex size-7 items-center justify-center rounded-md bg-[var(--color-status-success-bg-subtle)]",
460
- children: /* @__PURE__ */ w(c, { className: "size-4 text-[var(--color-status-success-text)]" })
469
+ children: /* @__PURE__ */ T(c, { className: "size-4 text-[var(--color-status-success-text)]" })
461
470
  }),
462
- /* @__PURE__ */ w("h3", {
471
+ /* @__PURE__ */ T("h3", {
463
472
  className: "text-sm font-semibold text-[var(--color-text-primary)]",
464
473
  children: "Recently Approved"
465
474
  }),
466
- /* @__PURE__ */ w("span", {
475
+ /* @__PURE__ */ T("span", {
467
476
  className: "ml-auto text-xs text-[var(--color-text-muted)]",
468
477
  children: "Last 5"
469
478
  })
470
479
  ]
471
- }), L.loading ? /* @__PURE__ */ w("div", {
480
+ }), R.loading ? /* @__PURE__ */ T("div", {
472
481
  className: "space-y-3 p-4",
473
482
  children: [
474
483
  1,
475
484
  2,
476
485
  3
477
- ].map((e) => /* @__PURE__ */ w("div", { className: "h-10 animate-pulse rounded-lg bg-[var(--color-surface-muted)]" }, e))
478
- }) : L.recentPublished.length === 0 ? /* @__PURE__ */ w("p", {
486
+ ].map((e) => /* @__PURE__ */ T("div", { className: "h-10 animate-pulse rounded-lg bg-[var(--color-surface-muted)]" }, e))
487
+ }) : R.recentPublished.length === 0 ? /* @__PURE__ */ T("p", {
479
488
  className: "px-4 py-8 text-center text-sm text-[var(--color-text-muted)]",
480
489
  children: "No approved products yet."
481
- }) : /* @__PURE__ */ w("ul", {
490
+ }) : /* @__PURE__ */ T("ul", {
482
491
  className: "divide-y divide-[var(--color-border-seam)]",
483
- children: L.recentPublished.map((e) => /* @__PURE__ */ T("li", {
492
+ children: R.recentPublished.map((e) => /* @__PURE__ */ E("li", {
484
493
  className: "flex items-center gap-3 px-4 py-3",
485
494
  children: [
486
- e.icon ? /* @__PURE__ */ w("img", {
495
+ e.icon ? /* @__PURE__ */ T("img", {
487
496
  src: e.icon,
488
497
  alt: "",
489
498
  className: "size-8 shrink-0 rounded-lg object-cover"
490
- }) : /* @__PURE__ */ w("div", {
499
+ }) : /* @__PURE__ */ T("div", {
491
500
  className: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-[var(--color-surface-muted)] text-xs font-bold text-[var(--color-text-muted)] uppercase",
492
501
  children: (e.type ?? "?").slice(0, 2)
493
502
  }),
494
- /* @__PURE__ */ T("div", {
503
+ /* @__PURE__ */ E("div", {
495
504
  className: "min-w-0 flex-1",
496
- children: [/* @__PURE__ */ w("p", {
505
+ children: [/* @__PURE__ */ T("p", {
497
506
  className: "truncate text-sm font-medium text-[var(--color-text-primary)]",
498
507
  children: e.name
499
- }), /* @__PURE__ */ T("p", {
508
+ }), /* @__PURE__ */ E("p", {
500
509
  className: "text-xs text-[var(--color-text-secondary)]",
501
- children: [e.reviewedBy ? `by ${e.reviewedBy} · ` : "", N(e.publishedAt)]
510
+ children: [e.reviewedBy ? `by ${e.reviewedBy} · ` : "", P(e.publishedAt)]
502
511
  })]
503
512
  }),
504
- /* @__PURE__ */ w("span", {
513
+ /* @__PURE__ */ T("span", {
505
514
  className: "shrink-0 rounded-full bg-[var(--color-status-success-bg-subtle)] px-2.5 py-1 text-xs font-medium text-[var(--color-status-success-text)]",
506
515
  children: "Published"
507
516
  })
508
517
  ]
509
518
  }, e.id))
510
519
  })]
511
- }), /* @__PURE__ */ T(E, {
520
+ }), /* @__PURE__ */ E(D, {
512
521
  className: "overflow-hidden p-0",
513
- children: [/* @__PURE__ */ T("div", {
522
+ children: [/* @__PURE__ */ E("div", {
514
523
  className: "flex items-center gap-2.5 border-b border-[var(--color-border-seam)] px-4 py-3",
515
524
  children: [
516
- /* @__PURE__ */ w("div", {
525
+ /* @__PURE__ */ T("div", {
517
526
  className: "flex size-7 items-center justify-center rounded-md bg-[var(--color-status-error-bg-subtle)]",
518
- children: /* @__PURE__ */ w(x, { className: "size-4 text-[var(--color-status-error-text)]" })
527
+ children: /* @__PURE__ */ T(S, { className: "size-4 text-[var(--color-status-error-text)]" })
519
528
  }),
520
- /* @__PURE__ */ w("h3", {
529
+ /* @__PURE__ */ T("h3", {
521
530
  className: "text-sm font-semibold text-[var(--color-text-primary)]",
522
531
  children: "Recently Rejected"
523
532
  }),
524
- /* @__PURE__ */ w("span", {
533
+ /* @__PURE__ */ T("span", {
525
534
  className: "ml-auto text-xs text-[var(--color-text-muted)]",
526
535
  children: "Last 5"
527
536
  })
528
537
  ]
529
- }), L.loading ? /* @__PURE__ */ w("div", {
538
+ }), R.loading ? /* @__PURE__ */ T("div", {
530
539
  className: "space-y-3 p-4",
531
540
  children: [
532
541
  1,
533
542
  2,
534
543
  3
535
- ].map((e) => /* @__PURE__ */ w("div", { className: "h-10 animate-pulse rounded-lg bg-[var(--color-surface-muted)]" }, e))
536
- }) : L.recentRejected.length === 0 ? /* @__PURE__ */ w("p", {
544
+ ].map((e) => /* @__PURE__ */ T("div", { className: "h-10 animate-pulse rounded-lg bg-[var(--color-surface-muted)]" }, e))
545
+ }) : R.recentRejected.length === 0 ? /* @__PURE__ */ T("p", {
537
546
  className: "px-4 py-8 text-center text-sm text-[var(--color-text-muted)]",
538
547
  children: "No rejected products yet."
539
- }) : /* @__PURE__ */ w("ul", {
548
+ }) : /* @__PURE__ */ T("ul", {
540
549
  className: "divide-y divide-[var(--color-border-seam)]",
541
- children: L.recentRejected.map((e) => /* @__PURE__ */ T("li", {
550
+ children: R.recentRejected.map((e) => /* @__PURE__ */ E("li", {
542
551
  className: "flex items-center gap-3 px-4 py-3",
543
552
  children: [
544
- e.icon ? /* @__PURE__ */ w("img", {
553
+ e.icon ? /* @__PURE__ */ T("img", {
545
554
  src: e.icon,
546
555
  alt: "",
547
556
  className: "size-8 shrink-0 rounded-lg object-cover"
548
- }) : /* @__PURE__ */ w("div", {
557
+ }) : /* @__PURE__ */ T("div", {
549
558
  className: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-[var(--color-surface-muted)] text-xs font-bold text-[var(--color-text-muted)] uppercase",
550
559
  children: (e.type ?? "?").slice(0, 2)
551
560
  }),
552
- /* @__PURE__ */ T("div", {
561
+ /* @__PURE__ */ E("div", {
553
562
  className: "min-w-0 flex-1",
554
563
  children: [
555
- /* @__PURE__ */ w("p", {
564
+ /* @__PURE__ */ T("p", {
556
565
  className: "truncate text-sm font-medium text-[var(--color-text-primary)]",
557
566
  children: e.name
558
567
  }),
559
- e.rejectedReason && /* @__PURE__ */ T("p", {
568
+ e.rejectedReason && /* @__PURE__ */ E("p", {
560
569
  className: "truncate text-xs text-[var(--color-text-muted)]",
561
570
  title: e.rejectedReason,
562
571
  children: [
@@ -565,13 +574,13 @@ var F = () => {
565
574
  "\""
566
575
  ]
567
576
  }),
568
- /* @__PURE__ */ w("p", {
577
+ /* @__PURE__ */ T("p", {
569
578
  className: "text-xs text-[var(--color-text-secondary)]",
570
- children: N(e.reviewedAt)
579
+ children: P(e.reviewedAt)
571
580
  })
572
581
  ]
573
582
  }),
574
- /* @__PURE__ */ w("span", {
583
+ /* @__PURE__ */ T("span", {
575
584
  className: "shrink-0 rounded-full bg-[var(--color-status-error-bg-subtle)] px-2.5 py-1 text-xs font-medium text-[var(--color-status-error-text)]",
576
585
  children: "Rejected"
577
586
  })
@@ -585,6 +594,6 @@ var F = () => {
585
594
  });
586
595
  };
587
596
  //#endregion
588
- export { F as AdminDashboardPage };
597
+ export { I as AdminDashboardPage };
589
598
 
590
599
  //# sourceMappingURL=AdminDashboardPage.js.map