@burdenoff/microfe-store 2026.525.2 → 2026.527.1

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 (120) hide show
  1. package/dist/StoreAdminRoutes.js +10 -9
  2. package/dist/StoreAdminRoutes.js.map +1 -1
  3. package/dist/StoreRoutes.js +2 -1
  4. package/dist/StoreRoutes.js.map +1 -1
  5. package/dist/components/AccessDenied.js +23 -0
  6. package/dist/components/AccessDenied.js.map +1 -0
  7. package/dist/components/InstallAppModal.js +183 -129
  8. package/dist/components/InstallAppModal.js.map +1 -1
  9. package/dist/components/PermissionGuard.js +8 -0
  10. package/dist/components/PermissionGuard.js.map +1 -0
  11. package/dist/components/RouteGuards.js +7 -21
  12. package/dist/components/RouteGuards.js.map +1 -1
  13. package/dist/components/cart/CartDrawer.js +20 -14
  14. package/dist/components/cart/CartDrawer.js.map +1 -1
  15. package/dist/hooks/useStoreGraphQL.js +22 -20
  16. package/dist/hooks/useStoreGraphQL.js.map +1 -1
  17. package/dist/hooks/useStoreGraphQLWithContext.js.map +1 -1
  18. package/dist/hooks/useStorePermissions.js +4 -1
  19. package/dist/hooks/useStorePermissions.js.map +1 -1
  20. package/dist/index.js +4 -4
  21. package/dist/pages/AdminDashboardPage.js +182 -183
  22. package/dist/pages/AdminDashboardPage.js.map +1 -1
  23. package/dist/pages/AdminReviewModerationPage.js +7 -6
  24. package/dist/pages/AdminReviewModerationPage.js.map +1 -1
  25. package/dist/pages/AdminStoresPage.js +193 -185
  26. package/dist/pages/AdminStoresPage.js.map +1 -1
  27. package/dist/pages/AdminSubmissionsQueuePage.js +140 -142
  28. package/dist/pages/AdminSubmissionsQueuePage.js.map +1 -1
  29. package/dist/pages/AppDetailPage.js +6 -3
  30. package/dist/pages/AppDetailPage.js.map +1 -1
  31. package/dist/pages/AppSettingsPage.js +6 -3
  32. package/dist/pages/AppSettingsPage.js.map +1 -1
  33. package/dist/pages/CartPage.js +23 -15
  34. package/dist/pages/CartPage.js.map +1 -1
  35. package/dist/pages/InstalledAppsPage.js +26 -15
  36. package/dist/pages/InstalledAppsPage.js.map +1 -1
  37. package/dist/pages/MarketplaceHomePage.js +275 -247
  38. package/dist/pages/MarketplaceHomePage.js.map +1 -1
  39. package/dist/pages/MyLicensesPage.js +10 -8
  40. package/dist/pages/MyLicensesPage.js.map +1 -1
  41. package/dist/pages/OrderConfirmationPage.js +72 -75
  42. package/dist/pages/OrderConfirmationPage.js.map +1 -1
  43. package/dist/pages/OrdersPage.js +22 -20
  44. package/dist/pages/OrdersPage.js.map +1 -1
  45. package/dist/pages/ProductCategoryPage.js +3 -1
  46. package/dist/pages/ProductCategoryPage.js.map +1 -1
  47. package/dist/pages/ProductDetailPage.js +458 -443
  48. package/dist/pages/ProductDetailPage.js.map +1 -1
  49. package/dist/pages/ProductReviewsPage.js +4 -3
  50. package/dist/pages/ProductReviewsPage.js.map +1 -1
  51. package/dist/pages/PublisherDashboardPage.js +13 -7
  52. package/dist/pages/PublisherDashboardPage.js.map +1 -1
  53. package/dist/pages/PublisherRevenuePage.js +7 -5
  54. package/dist/pages/PublisherRevenuePage.js.map +1 -1
  55. package/dist/pages/PublisherSubmissionsPage.js +12 -7
  56. package/dist/pages/PublisherSubmissionsPage.js.map +1 -1
  57. package/dist/pages/PublisherSubmitPage.js +6 -0
  58. package/dist/pages/PublisherSubmitPage.js.map +1 -1
  59. package/dist/pages/SearchResultsPage.js +6 -3
  60. package/dist/pages/SearchResultsPage.js.map +1 -1
  61. package/dist/pages/StoresPage.js +73 -74
  62. package/dist/pages/StoresPage.js.map +1 -1
  63. package/dist/providers/StoreProvider.js +25 -25
  64. package/dist/providers/StoreProvider.js.map +1 -1
  65. package/dist/utils/index.js +29 -19
  66. package/dist/utils/index.js.map +1 -1
  67. package/package.json +1 -1
  68. package/dist/StoreAdminRoot.d.ts +0 -22
  69. package/dist/StoreAdminRoutes.d.ts +0 -9
  70. package/dist/StoreRoot.d.ts +0 -31
  71. package/dist/StoreRoutes.d.ts +0 -12
  72. package/dist/components/InstallAppModal.d.ts +0 -26
  73. package/dist/components/RouteGuards.d.ts +0 -17
  74. package/dist/components/cart/CartDrawer.d.ts +0 -35
  75. package/dist/components/index.d.ts +0 -9
  76. package/dist/components/index.js +0 -3
  77. package/dist/components/marketplace/ProductCard.d.ts +0 -18
  78. package/dist/components/marketplace/ProductCard.js +0 -2
  79. package/dist/dev/main.d.ts +0 -1
  80. package/dist/generated/global-operations.d.ts +0 -2012
  81. package/dist/generated/global-types.d.ts +0 -23526
  82. package/dist/generated/wspace-operations.d.ts +0 -1
  83. package/dist/generated/wspace-types.d.ts +0 -57850
  84. package/dist/hooks/index.d.ts +0 -12
  85. package/dist/hooks/useBackendCart.d.ts +0 -73
  86. package/dist/hooks/useCart.d.ts +0 -62
  87. package/dist/hooks/useInstallations.d.ts +0 -43
  88. package/dist/hooks/useOrders.d.ts +0 -40
  89. package/dist/hooks/useProductSearch.d.ts +0 -22
  90. package/dist/hooks/useStoreGraphQL.d.ts +0 -475
  91. package/dist/hooks/useStoreGraphQLWithContext.d.ts +0 -48
  92. package/dist/hooks/useStorePermissions.d.ts +0 -63
  93. package/dist/index.d.ts +0 -44
  94. package/dist/pages/AdminDashboardPage.d.ts +0 -3
  95. package/dist/pages/AdminReviewModerationPage.d.ts +0 -3
  96. package/dist/pages/AdminStoresPage.d.ts +0 -3
  97. package/dist/pages/AdminSubmissionsQueuePage.d.ts +0 -3
  98. package/dist/pages/AppDetailPage.d.ts +0 -3
  99. package/dist/pages/AppSettingsPage.d.ts +0 -3
  100. package/dist/pages/CartPage.d.ts +0 -8
  101. package/dist/pages/InstalledAppsPage.d.ts +0 -8
  102. package/dist/pages/MarketplaceHomePage.d.ts +0 -3
  103. package/dist/pages/MyLicensesPage.d.ts +0 -3
  104. package/dist/pages/OrderConfirmationPage.d.ts +0 -3
  105. package/dist/pages/OrdersPage.d.ts +0 -8
  106. package/dist/pages/ProductCategoryPage.d.ts +0 -3
  107. package/dist/pages/ProductDetailPage.d.ts +0 -8
  108. package/dist/pages/ProductReviewsPage.d.ts +0 -3
  109. package/dist/pages/PublisherDashboardPage.d.ts +0 -3
  110. package/dist/pages/PublisherRevenuePage.d.ts +0 -3
  111. package/dist/pages/PublisherSubmissionsPage.d.ts +0 -3
  112. package/dist/pages/PublisherSubmitPage.d.ts +0 -3
  113. package/dist/pages/SearchResultsPage.d.ts +0 -3
  114. package/dist/pages/StoresPage.d.ts +0 -3
  115. package/dist/providers/StoreProvider.d.ts +0 -38
  116. package/dist/store/storeStore.d.ts +0 -69
  117. package/dist/translations/en.d.ts +0 -518
  118. package/dist/types/index.d.ts +0 -575
  119. package/dist/utils/index.d.ts +0 -67
  120. package/dist/utils/nativeBridge.d.ts +0 -2
@@ -1,12 +1,13 @@
1
1
  import { useStore as e } from "../providers/StoreProvider.js";
2
- import { useEffect as t, useState as n } from "react";
3
- import { Check as r, CheckCircle as i, ChevronDown as a, ChevronUp as o, ExternalLink as s, LayoutDashboard as c, MessageSquareWarning as l, PackageCheck as u, RefreshCw as d, Store as f, Users as p, X as m, XCircle as h } from "lucide-react";
4
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
5
- import { useNavigate as v } from "react-router-dom";
6
- import { graphqlFetch as y } from "@burdenoff/fe-libs/shared/graphql";
2
+ import { formatPriceForModel as t } from "../utils/index.js";
3
+ import { useCallback as n, useEffect as r, useState as i } from "react";
4
+ import { Check as a, CheckCircle as o, ChevronDown as s, ChevronUp as c, ExternalLink as l, LayoutDashboard as u, MessageSquareWarning as d, PackageCheck as f, RefreshCw as p, Store as m, Users as h, X as g, XCircle as _ } from "lucide-react";
5
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
6
+ import { useNavigate as b } from "react-router-dom";
7
+ import { graphqlFetch as x } from "@burdenoff/fe-libs/shared/graphql";
7
8
  //#region src/pages/AdminDashboardPage.tsx
8
- var b = "\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 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 status\n publishedAt\n reviewedBy\n }\n recentRejected: products(filter: { status: REJECTED }, limit: 5) {\n id\n slug\n name\n icon\n status\n reviewedAt\n rejectedReason\n }\n }\n", x = "\n mutation ApproveProduct($id: ID!) {\n approveProduct(id: $id) {\n id\n status\n }\n }\n", S = "\n mutation RejectProduct($id: ID!, $reason: String!) {\n rejectProduct(id: $id, reason: $reason) {\n id\n status\n }\n }\n", C = () => {
9
- let C = v(), { authToken: w, basePath: T } = e(), [E, D] = n({
9
+ var S = "\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 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 status\n publishedAt\n reviewedBy\n }\n recentRejected: products(filter: { status: REJECTED }, limit: 5) {\n id\n slug\n name\n icon\n status\n reviewedAt\n rejectedReason\n }\n }\n", C = "\n mutation ApproveProduct($id: ID!) {\n approveProduct(id: $id) {\n id\n status\n }\n }\n", w = "\n mutation RejectProduct($id: ID!, $reason: String!) {\n rejectProduct(id: $id, reason: $reason) {\n id\n status\n }\n }\n", T = () => {
10
+ let T = b(), { authToken: E, basePath: D } = e(), [O, k] = i({
10
11
  pendingCount: 0,
11
12
  totalStores: 0,
12
13
  recentPending: [],
@@ -14,20 +15,20 @@ var b = "\n query AdminDashboardData {\n recentPending: pendingReviewProduct
14
15
  recentRejected: [],
15
16
  loading: !0,
16
17
  error: null
17
- }), [O, k] = n(null), [A, j] = n(null), [M, N] = n(""), [P, F] = n(null), [I, L] = n(null), R = async () => {
18
- D((e) => ({
18
+ }), [A, j] = i(null), [M, N] = i(null), [P, F] = i(""), [I, L] = i(null), [R, z] = i(null), B = n(async () => {
19
+ k((e) => ({
19
20
  ...e,
20
21
  loading: !0,
21
22
  error: null
22
23
  }));
23
24
  try {
24
- let e = await y({
25
+ let e = await x({
25
26
  gateway: "global",
26
- query: b,
27
- authToken: w || void 0
27
+ query: S,
28
+ authToken: E || void 0
28
29
  });
29
30
  if (e.errors?.length) throw Error(e.errors[0]?.message ?? "Failed to load dashboard");
30
- D({
31
+ k({
31
32
  pendingCount: e.data?.recentPending.totalCount ?? 0,
32
33
  totalStores: e.data?.stores.length ?? 0,
33
34
  recentPending: e.data?.recentPending.products ?? [],
@@ -37,270 +38,267 @@ var b = "\n query AdminDashboardData {\n recentPending: pendingReviewProduct
37
38
  error: null
38
39
  });
39
40
  } catch (e) {
40
- D((t) => ({
41
+ k((t) => ({
41
42
  ...t,
42
43
  loading: !1,
43
44
  error: e instanceof Error ? e.message : "Failed to load dashboard"
44
45
  }));
45
46
  }
46
- };
47
- t(() => {
48
- R();
49
- }, [w]);
50
- let z = async (e) => {
51
- k(e), F(null);
47
+ }, [E]);
48
+ r(() => {
49
+ B();
50
+ }, [B]);
51
+ let V = async (e) => {
52
+ j(e), L(null);
52
53
  try {
53
- let t = await y({
54
+ let t = await x({
54
55
  gateway: "global",
55
- query: x,
56
+ query: C,
56
57
  variables: { id: e },
57
- authToken: w || void 0
58
+ authToken: E || void 0
58
59
  });
59
60
  if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Approval failed");
60
- await R();
61
+ await B();
61
62
  } catch (e) {
62
- F(e instanceof Error ? e.message : "Approval failed");
63
+ L(e instanceof Error ? e.message : "Approval failed");
63
64
  } finally {
64
- k(null);
65
+ j(null);
65
66
  }
66
- }, B = async (e) => {
67
- if (M.trim()) {
68
- k(e), F(null);
67
+ }, H = async (e) => {
68
+ if (P.trim()) {
69
+ j(e), L(null);
69
70
  try {
70
- let t = await y({
71
+ let t = await x({
71
72
  gateway: "global",
72
- query: S,
73
+ query: w,
73
74
  variables: {
74
75
  id: e,
75
- reason: M.trim()
76
+ reason: P.trim()
76
77
  },
77
- authToken: w || void 0
78
+ authToken: E || void 0
78
79
  });
79
80
  if (t.errors?.length) throw Error(t.errors[0]?.message ?? "Rejection failed");
80
- j(null), N(""), await R();
81
+ N(null), F(""), await B();
81
82
  } catch (e) {
82
- F(e instanceof Error ? e.message : "Rejection failed");
83
+ L(e instanceof Error ? e.message : "Rejection failed");
83
84
  } finally {
84
- k(null);
85
+ j(null);
85
86
  }
86
87
  }
87
- }, V = (e, t, n) => n === "FREE" ? "Free" : new Intl.NumberFormat(void 0, {
88
- style: "currency",
89
- currency: t || "USD"
90
- }).format(e), H = (e) => e ? new Date(e).toLocaleDateString(void 0, {
88
+ }, U = (e) => e ? new Date(e).toLocaleDateString(void 0, {
91
89
  month: "short",
92
90
  day: "numeric",
93
91
  year: "numeric"
94
- }) : "—", U = [
92
+ }) : "—", W = [
95
93
  {
96
94
  label: "Pending submissions",
97
- value: E.pendingCount,
98
- icon: u,
99
- href: `${T}/submissions`
95
+ value: O.pendingCount,
96
+ icon: f,
97
+ href: `${D}/submissions`
100
98
  },
101
99
  {
102
100
  label: "Stores in registry",
103
- value: E.totalStores,
104
- icon: f,
105
- href: `${T}/stores`
101
+ value: O.totalStores,
102
+ icon: m,
103
+ href: `${D}/stores`
106
104
  },
107
105
  {
108
106
  label: "Review queue",
109
107
  value: "—",
110
- icon: l,
111
- href: `${T}/reviews`
108
+ icon: d,
109
+ href: `${D}/reviews`
112
110
  },
113
111
  {
114
112
  label: "Publishers",
115
113
  value: "—",
116
- icon: p,
117
- href: `${T}/dashboard`
114
+ icon: h,
115
+ href: `${D}/dashboard`
118
116
  }
119
117
  ];
120
- return /* @__PURE__ */ _("div", {
118
+ return /* @__PURE__ */ y("div", {
121
119
  className: "min-h-screen bg-surface-default",
122
- children: [/* @__PURE__ */ g("header", {
120
+ children: [/* @__PURE__ */ v("header", {
123
121
  className: "border-b border-border-default bg-surface-raised",
124
- children: /* @__PURE__ */ _("div", {
122
+ children: /* @__PURE__ */ y("div", {
125
123
  className: "mx-auto max-w-7xl px-6 py-4",
126
- children: [/* @__PURE__ */ _("div", {
124
+ children: [/* @__PURE__ */ y("div", {
127
125
  className: "flex items-center justify-between",
128
- children: [/* @__PURE__ */ _("div", {
126
+ children: [/* @__PURE__ */ y("div", {
129
127
  className: "flex items-center gap-2",
130
- children: [/* @__PURE__ */ g(c, { className: "h-5 w-5 text-text-primary" }), /* @__PURE__ */ g("h1", {
128
+ children: [/* @__PURE__ */ v(u, { className: "size-5 text-text-primary" }), /* @__PURE__ */ v("h1", {
131
129
  className: "text-xl font-semibold text-text-primary",
132
130
  children: "Store admin dashboard"
133
131
  })]
134
- }), /* @__PURE__ */ _("button", {
132
+ }), /* @__PURE__ */ y("button", {
135
133
  type: "button",
136
- onClick: () => void R(),
137
- disabled: E.loading,
134
+ onClick: () => void B(),
135
+ disabled: O.loading,
138
136
  className: "inline-flex items-center gap-2 rounded-md border border-border-default bg-surface-default px-3 py-1.5 text-sm text-text-primary hover:bg-surface-hover disabled:opacity-60",
139
- children: [/* @__PURE__ */ g(d, { className: `h-4 w-4 ${E.loading ? "animate-spin" : ""}` }), "Refresh"]
137
+ children: [/* @__PURE__ */ v(p, { className: `size-4 ${O.loading ? "animate-spin" : ""}` }), "Refresh"]
140
138
  })]
141
- }), /* @__PURE__ */ g("p", {
139
+ }), /* @__PURE__ */ v("p", {
142
140
  className: "mt-1 text-sm text-text-secondary",
143
141
  children: "Manage store submissions, multi-store registry, and review moderation."
144
142
  })]
145
143
  })
146
- }), /* @__PURE__ */ _("main", {
147
- className: "mx-auto max-w-7xl space-y-6 px-6 py-6",
144
+ }), /* @__PURE__ */ y("main", {
145
+ className: "mx-auto max-w-7xl space-y-6 p-6",
148
146
  children: [
149
- E.error && /* @__PURE__ */ g("div", {
147
+ O.error && /* @__PURE__ */ v("div", {
150
148
  role: "alert",
151
149
  className: "rounded-md border border-border-danger bg-surface-danger-muted px-4 py-3 text-sm text-text-danger",
152
- children: E.error
150
+ children: O.error
153
151
  }),
154
- /* @__PURE__ */ g("div", {
152
+ /* @__PURE__ */ v("div", {
155
153
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-4",
156
- children: U.map((e) => {
154
+ children: W.map((e) => {
157
155
  let t = e.icon;
158
- return /* @__PURE__ */ _("button", {
156
+ return /* @__PURE__ */ y("button", {
159
157
  type: "button",
160
- onClick: () => C(e.href),
158
+ onClick: () => T(e.href),
161
159
  className: "rounded-lg border border-border-default bg-surface-raised p-4 text-left transition-colors hover:bg-surface-hover",
162
- children: [/* @__PURE__ */ _("div", {
160
+ children: [/* @__PURE__ */ y("div", {
163
161
  className: "flex items-center justify-between",
164
- children: [/* @__PURE__ */ g("span", {
162
+ children: [/* @__PURE__ */ v("span", {
165
163
  className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
166
164
  children: e.label
167
- }), /* @__PURE__ */ g(t, { className: "h-4 w-4 text-text-tertiary" })]
168
- }), /* @__PURE__ */ g("div", {
165
+ }), /* @__PURE__ */ v(t, { className: "size-4 text-text-tertiary" })]
166
+ }), /* @__PURE__ */ v("div", {
169
167
  className: "mt-2 text-3xl font-semibold text-text-primary",
170
- children: E.loading ? "…" : e.value
168
+ children: O.loading ? "…" : e.value
171
169
  })]
172
170
  }, e.label);
173
171
  })
174
172
  }),
175
- /* @__PURE__ */ _("section", { children: [
176
- /* @__PURE__ */ _("div", {
173
+ /* @__PURE__ */ y("section", { children: [
174
+ /* @__PURE__ */ y("div", {
177
175
  className: "mb-3 flex items-center justify-between",
178
- children: [/* @__PURE__ */ g("h2", {
176
+ children: [/* @__PURE__ */ v("h2", {
179
177
  className: "text-sm font-semibold text-text-primary",
180
178
  children: "Recent Submissions"
181
- }), /* @__PURE__ */ _("button", {
179
+ }), /* @__PURE__ */ y("button", {
182
180
  type: "button",
183
- onClick: () => C(`${T}/submissions`),
181
+ onClick: () => T(`${D}/submissions`),
184
182
  className: "inline-flex items-center gap-1 text-xs text-text-accent hover:underline",
185
- children: ["View all", /* @__PURE__ */ g(s, { className: "h-3 w-3" })]
183
+ children: ["View all", /* @__PURE__ */ v(l, { className: "size-3" })]
186
184
  })]
187
185
  }),
188
- P && /* @__PURE__ */ g("div", {
186
+ I && /* @__PURE__ */ v("div", {
189
187
  role: "alert",
190
188
  className: "mb-3 rounded-md border border-border-danger bg-surface-danger-muted px-4 py-2 text-sm text-text-danger",
191
- children: P
189
+ children: I
192
190
  }),
193
- E.loading ? /* @__PURE__ */ g("div", {
191
+ O.loading ? /* @__PURE__ */ v("div", {
194
192
  className: "rounded-lg border border-border-default bg-surface-raised py-10 text-center text-sm text-text-secondary",
195
193
  children: "Loading…"
196
- }) : E.recentPending.length === 0 ? /* @__PURE__ */ g("div", {
194
+ }) : O.recentPending.length === 0 ? /* @__PURE__ */ v("div", {
197
195
  className: "rounded-lg border border-border-default bg-surface-raised py-10 text-center text-sm text-text-secondary",
198
196
  children: "No pending submissions."
199
- }) : /* @__PURE__ */ g("ul", {
197
+ }) : /* @__PURE__ */ v("ul", {
200
198
  className: "space-y-2",
201
- children: E.recentPending.map((e) => /* @__PURE__ */ _("li", {
199
+ children: O.recentPending.map((e) => /* @__PURE__ */ y("li", {
202
200
  className: "overflow-hidden rounded-lg border border-border-default bg-surface-raised",
203
201
  children: [
204
- /* @__PURE__ */ _("div", {
202
+ /* @__PURE__ */ y("div", {
205
203
  className: "flex items-center gap-3 px-4 py-3",
206
204
  children: [
207
- e.icon ? /* @__PURE__ */ g("img", {
205
+ e.icon ? /* @__PURE__ */ v("img", {
208
206
  src: e.icon,
209
207
  alt: "",
210
- className: "h-10 w-10 flex-shrink-0 rounded-md object-cover"
211
- }) : /* @__PURE__ */ g("div", {
212
- className: "flex h-10 w-10 flex-shrink-0 items-center justify-center rounded-md bg-surface-muted text-xs text-text-secondary",
208
+ className: "size-10 flex-shrink-0 rounded-md object-cover"
209
+ }) : /* @__PURE__ */ v("div", {
210
+ className: "flex size-10 flex-shrink-0 items-center justify-center rounded-md bg-surface-muted text-xs text-text-secondary",
213
211
  children: e.type.slice(0, 2)
214
212
  }),
215
- /* @__PURE__ */ _("div", {
213
+ /* @__PURE__ */ y("div", {
216
214
  className: "min-w-0 flex-1",
217
- children: [/* @__PURE__ */ g("p", {
215
+ children: [/* @__PURE__ */ v("p", {
218
216
  className: "truncate text-sm font-medium text-text-primary",
219
217
  children: e.name
220
- }), /* @__PURE__ */ _("p", {
218
+ }), /* @__PURE__ */ y("p", {
221
219
  className: "text-xs text-text-secondary",
222
220
  children: [
223
221
  e.publisher?.name ?? "Unknown publisher",
224
222
  " ·",
225
223
  " ",
226
- V(e.price, e.currency, e.pricingModel),
224
+ t(e.price, e.currency, e.pricingModel),
227
225
  " ·",
228
226
  " ",
229
- H(e.submittedAt)
227
+ U(e.submittedAt)
230
228
  ]
231
229
  })]
232
230
  }),
233
- /* @__PURE__ */ _("div", {
231
+ /* @__PURE__ */ y("div", {
234
232
  className: "flex flex-shrink-0 items-center gap-2",
235
233
  children: [
236
- /* @__PURE__ */ _("button", {
234
+ /* @__PURE__ */ y("button", {
237
235
  type: "button",
238
- onClick: () => L(I === e.id ? null : e.id),
236
+ onClick: () => z(R === e.id ? null : e.id),
239
237
  className: "inline-flex items-center gap-1 rounded-md border border-border-default px-3 py-1.5 text-xs text-text-secondary hover:bg-surface-hover",
240
- children: [I === e.id ? /* @__PURE__ */ g(o, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ g(a, { className: "h-3.5 w-3.5" }), "Details"]
238
+ children: [R === e.id ? /* @__PURE__ */ v(c, { className: "size-3.5" }) : /* @__PURE__ */ v(s, { className: "size-3.5" }), "Details"]
241
239
  }),
242
- /* @__PURE__ */ _("button", {
240
+ /* @__PURE__ */ y("button", {
243
241
  type: "button",
244
- onClick: () => void z(e.id),
245
- disabled: O === e.id,
242
+ onClick: () => void V(e.id),
243
+ disabled: A === e.id,
246
244
  className: "inline-flex items-center gap-1 rounded-md bg-surface-success px-3 py-1.5 text-xs font-medium text-text-on-success hover:bg-surface-success-hover disabled:opacity-60",
247
- children: [/* @__PURE__ */ g(r, { className: "h-3.5 w-3.5" }), "Approve"]
245
+ children: [/* @__PURE__ */ v(a, { className: "size-3.5" }), "Approve"]
248
246
  }),
249
- /* @__PURE__ */ _("button", {
247
+ /* @__PURE__ */ y("button", {
250
248
  type: "button",
251
249
  onClick: () => {
252
- j(e.id), N(""), F(null);
250
+ N(e.id), F(""), L(null);
253
251
  },
254
- disabled: O === e.id,
252
+ disabled: A === e.id,
255
253
  className: "inline-flex items-center gap-1 rounded-md border border-border-danger bg-surface-danger-muted px-3 py-1.5 text-xs font-medium text-text-danger hover:bg-surface-danger hover:text-text-on-danger disabled:opacity-60",
256
- children: [/* @__PURE__ */ g(m, { className: "h-3.5 w-3.5" }), "Reject"]
254
+ children: [/* @__PURE__ */ v(g, { className: "size-3.5" }), "Reject"]
257
255
  })
258
256
  ]
259
257
  })
260
258
  ]
261
259
  }),
262
- I === e.id && /* @__PURE__ */ g("div", {
263
- className: "border-t border-border-default bg-surface-muted px-4 py-4",
264
- children: /* @__PURE__ */ _("dl", {
260
+ R === e.id && /* @__PURE__ */ v("div", {
261
+ className: "border-t border-border-default bg-surface-muted p-4",
262
+ children: /* @__PURE__ */ y("dl", {
265
263
  className: "grid grid-cols-2 gap-x-6 gap-y-3 text-xs sm:grid-cols-3",
266
264
  children: [
267
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("dt", {
265
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
268
266
  className: "font-medium text-text-secondary",
269
267
  children: "Slug"
270
- }), /* @__PURE__ */ g("dd", {
268
+ }), /* @__PURE__ */ v("dd", {
271
269
  className: "mt-0.5 font-mono text-text-primary",
272
270
  children: e.slug
273
271
  })] }),
274
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("dt", {
272
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
275
273
  className: "font-medium text-text-secondary",
276
274
  children: "Type"
277
- }), /* @__PURE__ */ g("dd", {
275
+ }), /* @__PURE__ */ v("dd", {
278
276
  className: "mt-0.5 text-text-primary",
279
277
  children: e.type
280
278
  })] }),
281
- e.nature && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("dt", {
279
+ e.nature && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
282
280
  className: "font-medium text-text-secondary",
283
281
  children: "Nature"
284
- }), /* @__PURE__ */ g("dd", {
282
+ }), /* @__PURE__ */ v("dd", {
285
283
  className: "mt-0.5 text-text-primary",
286
284
  children: e.nature
287
285
  })] }),
288
- e.category && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("dt", {
286
+ e.category && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
289
287
  className: "font-medium text-text-secondary",
290
288
  children: "Category"
291
- }), /* @__PURE__ */ g("dd", {
289
+ }), /* @__PURE__ */ v("dd", {
292
290
  className: "mt-0.5 text-text-primary",
293
291
  children: e.category
294
292
  })] }),
295
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("dt", {
293
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
296
294
  className: "font-medium text-text-secondary",
297
295
  children: "Pricing"
298
- }), /* @__PURE__ */ _("dd", {
296
+ }), /* @__PURE__ */ y("dd", {
299
297
  className: "mt-0.5 text-text-primary",
300
298
  children: [
301
- V(e.price, e.currency, e.pricingModel),
299
+ t(e.price, e.currency, e.pricingModel),
302
300
  " ",
303
- /* @__PURE__ */ _("span", {
301
+ /* @__PURE__ */ y("span", {
304
302
  className: "text-text-tertiary",
305
303
  children: [
306
304
  "(",
@@ -310,36 +308,36 @@ var b = "\n query AdminDashboardData {\n recentPending: pendingReviewProduct
310
308
  })
311
309
  ]
312
310
  })] }),
313
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("dt", {
311
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
314
312
  className: "font-medium text-text-secondary",
315
313
  children: "Publisher"
316
- }), /* @__PURE__ */ _("dd", {
314
+ }), /* @__PURE__ */ y("dd", {
317
315
  className: "mt-0.5 text-text-primary",
318
- children: [e.publisher?.name ?? "—", e.publisher?.email && /* @__PURE__ */ g("span", {
316
+ children: [e.publisher?.name ?? "—", e.publisher?.email && /* @__PURE__ */ v("span", {
319
317
  className: "block text-text-tertiary",
320
318
  children: e.publisher.email
321
319
  })]
322
320
  })] }),
323
- e.submittedBy && /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("dt", {
321
+ e.submittedBy && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
324
322
  className: "font-medium text-text-secondary",
325
323
  children: "Submitted by"
326
- }), /* @__PURE__ */ g("dd", {
324
+ }), /* @__PURE__ */ v("dd", {
327
325
  className: "mt-0.5 font-mono text-text-primary",
328
326
  children: e.submittedBy
329
327
  })] }),
330
- /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("dt", {
328
+ /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("dt", {
331
329
  className: "font-medium text-text-secondary",
332
330
  children: "Submitted at"
333
- }), /* @__PURE__ */ g("dd", {
331
+ }), /* @__PURE__ */ v("dd", {
334
332
  className: "mt-0.5 text-text-primary",
335
- children: H(e.submittedAt)
333
+ children: U(e.submittedAt)
336
334
  })] }),
337
- e.description && /* @__PURE__ */ _("div", {
335
+ e.description && /* @__PURE__ */ y("div", {
338
336
  className: "col-span-2 sm:col-span-3",
339
- children: [/* @__PURE__ */ g("dt", {
337
+ children: [/* @__PURE__ */ v("dt", {
340
338
  className: "font-medium text-text-secondary",
341
339
  children: "Description"
342
- }), /* @__PURE__ */ g("dd", {
340
+ }), /* @__PURE__ */ v("dd", {
343
341
  className: "mt-0.5 text-text-primary",
344
342
  children: e.description
345
343
  })]
@@ -347,35 +345,36 @@ var b = "\n query AdminDashboardData {\n recentPending: pendingReviewProduct
347
345
  ]
348
346
  })
349
347
  }),
350
- A === e.id && /* @__PURE__ */ _("div", {
348
+ M === e.id && /* @__PURE__ */ y("div", {
351
349
  className: "border-t border-border-default bg-surface-muted px-4 py-3",
352
350
  children: [
353
- /* @__PURE__ */ g("label", {
351
+ /* @__PURE__ */ v("label", {
354
352
  htmlFor: `reject-reason-${e.id}`,
355
353
  className: "block text-xs font-medium text-text-secondary",
356
354
  children: "Rejection reason (required)"
357
355
  }),
358
- /* @__PURE__ */ g("textarea", {
356
+ /* @__PURE__ */ v("textarea", {
359
357
  id: `reject-reason-${e.id}`,
360
- value: M,
361
- onChange: (e) => N(e.target.value),
358
+ "aria-label": "Rejection reason",
359
+ value: P,
360
+ onChange: (e) => F(e.target.value),
362
361
  rows: 2,
363
362
  className: "mt-1 w-full rounded-md border border-border-default bg-surface-default px-3 py-2 text-sm text-text-primary focus:border-border-accent focus:outline-none",
364
363
  placeholder: "Explain why this submission is being rejected…"
365
364
  }),
366
- /* @__PURE__ */ _("div", {
365
+ /* @__PURE__ */ y("div", {
367
366
  className: "mt-2 flex justify-end gap-2",
368
- children: [/* @__PURE__ */ g("button", {
367
+ children: [/* @__PURE__ */ v("button", {
369
368
  type: "button",
370
369
  onClick: () => {
371
- j(null), N("");
370
+ N(null), F("");
372
371
  },
373
372
  className: "rounded-md border border-border-default bg-surface-default px-3 py-1 text-xs text-text-primary hover:bg-surface-hover",
374
373
  children: "Cancel"
375
- }), /* @__PURE__ */ g("button", {
374
+ }), /* @__PURE__ */ v("button", {
376
375
  type: "button",
377
- onClick: () => void B(e.id),
378
- disabled: !M.trim() || O === e.id,
376
+ onClick: () => void H(e.id),
377
+ disabled: !P.trim() || A === e.id,
379
378
  className: "rounded-md bg-surface-danger px-3 py-1 text-xs font-medium text-text-on-danger hover:bg-surface-danger-hover disabled:opacity-60",
380
379
  children: "Submit rejection"
381
380
  })]
@@ -386,93 +385,93 @@ var b = "\n query AdminDashboardData {\n recentPending: pendingReviewProduct
386
385
  }, e.id))
387
386
  })
388
387
  ] }),
389
- /* @__PURE__ */ _("section", { children: [/* @__PURE__ */ g("h2", {
388
+ /* @__PURE__ */ y("section", { children: [/* @__PURE__ */ v("h2", {
390
389
  className: "mb-3 text-sm font-semibold text-text-primary",
391
390
  children: "Recent Activity"
392
- }), /* @__PURE__ */ _("div", {
391
+ }), /* @__PURE__ */ y("div", {
393
392
  className: "grid grid-cols-1 gap-4 lg:grid-cols-2",
394
- children: [/* @__PURE__ */ _("div", {
393
+ children: [/* @__PURE__ */ y("div", {
395
394
  className: "rounded-lg border border-border-default bg-surface-raised",
396
- children: [/* @__PURE__ */ _("div", {
395
+ children: [/* @__PURE__ */ y("div", {
397
396
  className: "flex items-center gap-2 border-b border-border-default px-4 py-3",
398
- children: [/* @__PURE__ */ g(i, { className: "h-4 w-4 text-text-success" }), /* @__PURE__ */ g("h3", {
397
+ children: [/* @__PURE__ */ v(o, { className: "size-4 text-text-success" }), /* @__PURE__ */ v("h3", {
399
398
  className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
400
399
  children: "Recently Approved"
401
400
  })]
402
- }), E.loading ? /* @__PURE__ */ g("p", {
401
+ }), O.loading ? /* @__PURE__ */ v("p", {
403
402
  className: "px-4 py-6 text-center text-sm text-text-secondary",
404
403
  children: "Loading…"
405
- }) : E.recentPublished.length === 0 ? /* @__PURE__ */ g("p", {
404
+ }) : O.recentPublished.length === 0 ? /* @__PURE__ */ v("p", {
406
405
  className: "px-4 py-6 text-center text-sm text-text-secondary",
407
406
  children: "No approved products yet."
408
- }) : /* @__PURE__ */ g("ul", {
407
+ }) : /* @__PURE__ */ v("ul", {
409
408
  className: "divide-y divide-border-default",
410
- children: E.recentPublished.map((e) => /* @__PURE__ */ _("li", {
409
+ children: O.recentPublished.map((e) => /* @__PURE__ */ y("li", {
411
410
  className: "flex items-center gap-3 px-4 py-3",
412
411
  children: [
413
- e.icon ? /* @__PURE__ */ g("img", {
412
+ e.icon ? /* @__PURE__ */ v("img", {
414
413
  src: e.icon,
415
414
  alt: "",
416
- className: "h-8 w-8 flex-shrink-0 rounded-md object-cover"
417
- }) : /* @__PURE__ */ g("div", {
418
- className: "flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md bg-surface-muted text-xs text-text-secondary",
419
- children: ""
415
+ className: "size-8 flex-shrink-0 rounded-md object-cover"
416
+ }) : /* @__PURE__ */ v("div", {
417
+ className: "flex size-8 flex-shrink-0 items-center justify-center rounded-md bg-surface-muted text-xs text-text-secondary",
418
+ children: "?"
420
419
  }),
421
- /* @__PURE__ */ _("div", {
420
+ /* @__PURE__ */ y("div", {
422
421
  className: "min-w-0 flex-1",
423
- children: [/* @__PURE__ */ g("p", {
422
+ children: [/* @__PURE__ */ v("p", {
424
423
  className: "truncate text-sm font-medium text-text-primary",
425
424
  children: e.name
426
- }), /* @__PURE__ */ _("p", {
425
+ }), /* @__PURE__ */ y("p", {
427
426
  className: "text-xs text-text-secondary",
428
- children: [e.reviewedBy ? `by ${e.reviewedBy} · ` : "", H(e.publishedAt)]
427
+ children: [e.reviewedBy ? `by ${e.reviewedBy} · ` : "", U(e.publishedAt)]
429
428
  })]
430
429
  }),
431
- /* @__PURE__ */ g("span", {
430
+ /* @__PURE__ */ v("span", {
432
431
  className: "flex-shrink-0 rounded-full bg-surface-success-muted px-2 py-0.5 text-xs font-medium text-text-success",
433
432
  children: "Published"
434
433
  })
435
434
  ]
436
435
  }, e.id))
437
436
  })]
438
- }), /* @__PURE__ */ _("div", {
437
+ }), /* @__PURE__ */ y("div", {
439
438
  className: "rounded-lg border border-border-default bg-surface-raised",
440
- children: [/* @__PURE__ */ _("div", {
439
+ children: [/* @__PURE__ */ y("div", {
441
440
  className: "flex items-center gap-2 border-b border-border-default px-4 py-3",
442
- children: [/* @__PURE__ */ g(h, { className: "h-4 w-4 text-text-danger" }), /* @__PURE__ */ g("h3", {
441
+ children: [/* @__PURE__ */ v(_, { className: "size-4 text-text-danger" }), /* @__PURE__ */ v("h3", {
443
442
  className: "text-xs font-semibold uppercase tracking-wide text-text-secondary",
444
443
  children: "Recently Rejected"
445
444
  })]
446
- }), E.loading ? /* @__PURE__ */ g("p", {
445
+ }), O.loading ? /* @__PURE__ */ v("p", {
447
446
  className: "px-4 py-6 text-center text-sm text-text-secondary",
448
447
  children: "Loading…"
449
- }) : E.recentRejected.length === 0 ? /* @__PURE__ */ g("p", {
448
+ }) : O.recentRejected.length === 0 ? /* @__PURE__ */ v("p", {
450
449
  className: "px-4 py-6 text-center text-sm text-text-secondary",
451
450
  children: "No rejected products yet."
452
- }) : /* @__PURE__ */ g("ul", {
451
+ }) : /* @__PURE__ */ v("ul", {
453
452
  className: "divide-y divide-border-default",
454
- children: E.recentRejected.map((e) => /* @__PURE__ */ _("li", {
453
+ children: O.recentRejected.map((e) => /* @__PURE__ */ y("li", {
455
454
  className: "flex items-center gap-3 px-4 py-3",
456
455
  children: [
457
- e.icon ? /* @__PURE__ */ g("img", {
456
+ e.icon ? /* @__PURE__ */ v("img", {
458
457
  src: e.icon,
459
458
  alt: "",
460
- className: "h-8 w-8 flex-shrink-0 rounded-md object-cover"
461
- }) : /* @__PURE__ */ g("div", {
462
- className: "flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-md bg-surface-muted text-xs text-text-secondary",
463
- children: ""
459
+ className: "size-8 flex-shrink-0 rounded-md object-cover"
460
+ }) : /* @__PURE__ */ v("div", {
461
+ className: "flex size-8 flex-shrink-0 items-center justify-center rounded-md bg-surface-muted text-xs text-text-secondary",
462
+ children: "?"
464
463
  }),
465
- /* @__PURE__ */ _("div", {
464
+ /* @__PURE__ */ y("div", {
466
465
  className: "min-w-0 flex-1",
467
- children: [/* @__PURE__ */ g("p", {
466
+ children: [/* @__PURE__ */ v("p", {
468
467
  className: "truncate text-sm font-medium text-text-primary",
469
468
  children: e.name
470
- }), /* @__PURE__ */ _("p", {
469
+ }), /* @__PURE__ */ y("p", {
471
470
  className: "truncate text-xs text-text-secondary",
472
- children: [e.rejectedReason ? `"${e.rejectedReason}" · ` : "", H(e.reviewedAt)]
471
+ children: [e.rejectedReason ? `"${e.rejectedReason}" · ` : "", U(e.reviewedAt)]
473
472
  })]
474
473
  }),
475
- /* @__PURE__ */ g("span", {
474
+ /* @__PURE__ */ v("span", {
476
475
  className: "flex-shrink-0 rounded-full bg-surface-danger-muted px-2 py-0.5 text-xs font-medium text-text-danger",
477
476
  children: "Rejected"
478
477
  })
@@ -486,6 +485,6 @@ var b = "\n query AdminDashboardData {\n recentPending: pendingReviewProduct
486
485
  });
487
486
  };
488
487
  //#endregion
489
- export { C as AdminDashboardPage };
488
+ export { T as AdminDashboardPage };
490
489
 
491
490
  //# sourceMappingURL=AdminDashboardPage.js.map