@burdenoff/microfe-devportal 2026.1112.2 → 2026.1113.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 (31) hide show
  1. package/dist/devportal/components/AppCard.js +73 -70
  2. package/dist/devportal/components/AppCard.js.map +1 -1
  3. package/dist/devportal/components/ImageUploadField.js +82 -80
  4. package/dist/devportal/components/ImageUploadField.js.map +1 -1
  5. package/dist/devportal/components/StoreImage.d.ts +15 -0
  6. package/dist/devportal/components/StoreImage.js +30 -0
  7. package/dist/devportal/components/StoreImage.js.map +1 -0
  8. package/dist/devportal/components/index.d.ts +1 -0
  9. package/dist/devportal/components/index.js +17 -16
  10. package/dist/devportal/hooks/usePackageUpload.d.ts +46 -4
  11. package/dist/devportal/hooks/usePackageUpload.js +90 -36
  12. package/dist/devportal/hooks/usePackageUpload.js.map +1 -1
  13. package/dist/devportal/pages/AdminReviewPage.js +205 -202
  14. package/dist/devportal/pages/AdminReviewPage.js.map +1 -1
  15. package/dist/devportal/pages/ApplicationDetailPage.js +2 -2
  16. package/dist/devportal/pages/ApplicationDetailPage.js.map +1 -1
  17. package/dist/devportal/pages/ApplicationsPage.js +201 -199
  18. package/dist/devportal/pages/ApplicationsPage.js.map +1 -1
  19. package/dist/devportal/pages/CreatePhysicalItemPage.js +2 -2
  20. package/dist/devportal/pages/CreatePhysicalItemPage.js.map +1 -1
  21. package/dist/devportal/pages/EditPhysicalItemPage.js +312 -307
  22. package/dist/devportal/pages/EditPhysicalItemPage.js.map +1 -1
  23. package/dist/devportal/pages/ListingPreviewPage.js +175 -171
  24. package/dist/devportal/pages/ListingPreviewPage.js.map +1 -1
  25. package/dist/devportal/pages/SellerDashboardPage.js +118 -116
  26. package/dist/devportal/pages/SellerDashboardPage.js.map +1 -1
  27. package/dist/devportal/pages/SellerItemsPage.js +202 -199
  28. package/dist/devportal/pages/SellerItemsPage.js.map +1 -1
  29. package/dist/devportal/pages/StoreSubmissionPage.js +133 -131
  30. package/dist/devportal/pages/StoreSubmissionPage.js.map +1 -1
  31. package/package.json +1 -1
@@ -1,20 +1,21 @@
1
1
  import { PageLayout as e } from "../components/PageLayout.js";
2
2
  import { EmptyState as t } from "../components/EmptyState.js";
3
3
  import { useDevportal as n } from "../providers/DevportalProvider.js";
4
- import { PermissionGuard as r } from "../components/PermissionGuard.js";
5
4
  import "../components/index.js";
6
- import { resolveGlobalGraphqlEndpoint as i } from "../utils/graphqlEndpoint.js";
5
+ import { PermissionGuard as ee } from "../components/PermissionGuard.js";
6
+ import { resolveGlobalGraphqlEndpoint as r } from "../utils/graphqlEndpoint.js";
7
+ import { StoreImage as i } from "../components/StoreImage.js";
7
8
  import { useEffect as a, useMemo as o, useState as s } from "react";
8
- import { AlertCircle as c, Edit as l, Grid as u, List as ee, Loader2 as d, Package as f, Plus as p, Search as m, Tag as h } from "lucide-react";
9
- import { jsx as g, jsxs as _ } from "react/jsx-runtime";
10
- import { useI18n as v } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
11
- import { EmphasisPanel as y, GlassCard as b } from "@burdenoff/fe-libs/ui";
9
+ import { AlertCircle as c, Edit as l, Grid as u, List as d, Loader2 as f, Package as p, Plus as m, Search as h, Tag as g } from "lucide-react";
10
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
11
+ import { useI18n as te } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
12
+ import { EmphasisPanel as ne, GlassCard as y } from "@burdenoff/fe-libs/ui";
12
13
  // src/devportal/pages/SellerItemsPage.tsx
13
- var x = /* @__PURE__ */ new Set([
14
+ var re = /* @__PURE__ */ new Set([
14
15
  "APP",
15
16
  "NODE",
16
17
  "WORKFLOW"
17
- ]), S = {
18
+ ]), b = {
18
19
  MERCHANDISE: "Merchandise",
19
20
  HARDWARE: "Hardware",
20
21
  ACCESSORY: "Accessory",
@@ -23,7 +24,7 @@ var x = /* @__PURE__ */ new Set([
23
24
  APPAREL: "Apparel",
24
25
  COLLECTIBLE: "Collectible",
25
26
  CONSUMABLE: "Consumable"
26
- }, C = {
27
+ }, x = {
27
28
  PUBLISHED: {
28
29
  label: "Published",
29
30
  className: "text-status-success-text bg-status-success-bg-subtle"
@@ -44,7 +45,7 @@ var x = /* @__PURE__ */ new Set([
44
45
  label: "Inactive",
45
46
  className: "text-text-muted bg-bg-muted"
46
47
  }
47
- }, te = [
48
+ }, S = [
48
49
  {
49
50
  value: "",
50
51
  label: "All Status"
@@ -70,7 +71,7 @@ var x = /* @__PURE__ */ new Set([
70
71
  label: "Inactive"
71
72
  }
72
73
  ];
73
- function w(e, t) {
74
+ function C(e, t) {
74
75
  let n = t || "USD";
75
76
  return `${new Intl.NumberFormat("en-US", {
76
77
  style: "currency",
@@ -79,60 +80,60 @@ function w(e, t) {
79
80
  maximumFractionDigits: 2
80
81
  }).format(e)} ${n}`;
81
82
  }
82
- function T(e) {
83
- return S[e] ?? e.replace(/_/g, " ");
83
+ function w(e) {
84
+ return b[e] ?? e.replace(/_/g, " ");
84
85
  }
85
- var E = "\n query SellerMyPublisher {\n myPublisher {\n id\n }\n }\n", D = "\n query SellerItems($publisherId: String!) {\n products(filter: { publisherId: $publisherId, nature: PHYSICAL }, limit: 100, offset: 0) {\n id\n name\n slug\n type\n status\n price\n currency\n stockQuantity\n sku\n brand\n icon\n createdAt\n }\n }\n", O = () => {
86
- let { navigate: h, basePath: S, apiGatewayUrl: O, authToken: A } = n(), { t: j } = v(), M = (e, t) => {
87
- let n = j(e);
86
+ var T = "\n query SellerMyPublisher {\n myPublisher {\n id\n }\n }\n", E = "\n query SellerItems($publisherId: String!) {\n products(filter: { publisherId: $publisherId, nature: PHYSICAL }, limit: 100, offset: 0) {\n id\n name\n slug\n type\n status\n price\n currency\n stockQuantity\n sku\n brand\n icon\n createdAt\n }\n }\n", D = () => {
87
+ let { navigate: g, basePath: b, apiGatewayUrl: D, authToken: k } = n(), { t: A } = te(), j = (e, t) => {
88
+ let n = A(e);
88
89
  return n === e ? t : n;
89
- }, N = i(O), [P, F] = s(!0), [I, L] = s(!1), [R, z] = s(null), [B, V] = s([]), [H, U] = s(null), [W, G] = s(0), [K, q] = s("grid"), [J, ne] = s(""), [Y, re] = s(""), X = (e) => {
90
- h?.(`${S}${e}`);
90
+ }, M = r(D), [N, P] = s(!0), [F, I] = s(!1), [L, R] = s(null), [z, B] = s([]), [V, H] = s(null), [U, W] = s(0), [G, K] = s("grid"), [q, J] = s(""), [Y, ie] = s(""), X = (e) => {
91
+ g?.(`${b}${e}`);
91
92
  };
92
93
  a(() => {
93
94
  let e = !1;
94
- return F(!0), U(null), (async () => {
95
+ return P(!0), H(null), (async () => {
95
96
  try {
96
- let t = await fetch(N, {
97
+ let t = await fetch(M, {
97
98
  method: "POST",
98
99
  headers: {
99
100
  "Content-Type": "application/json",
100
- Authorization: `Bearer ${A ?? ""}`
101
+ Authorization: `Bearer ${k ?? ""}`
101
102
  },
102
- body: JSON.stringify({ query: E })
103
+ body: JSON.stringify({ query: T })
103
104
  });
104
105
  if (e) return;
105
106
  if (!t.ok) throw Error(`Request failed with status ${t.status}`);
106
107
  let n = await t.json();
107
108
  if (e) return;
108
109
  if (n.errors?.length) throw Error(n.errors[0]?.message ?? "Unknown GraphQL error");
109
- z(n.data?.myPublisher?.id ?? null);
110
+ R(n.data?.myPublisher?.id ?? null);
110
111
  } catch (t) {
111
- e || U(t instanceof Error ? t.message : "Failed to load publisher");
112
+ e || H(t instanceof Error ? t.message : "Failed to load publisher");
112
113
  } finally {
113
- e || F(!1);
114
+ e || P(!1);
114
115
  }
115
116
  })(), () => {
116
117
  e = !0;
117
118
  };
118
119
  }, [
119
- N,
120
- A,
121
- W
120
+ M,
121
+ k,
122
+ U
122
123
  ]), a(() => {
123
- if (!R) return;
124
+ if (!L) return;
124
125
  let e = !1;
125
- return L(!0), U(null), (async () => {
126
+ return I(!0), H(null), (async () => {
126
127
  try {
127
- let t = await fetch(N, {
128
+ let t = await fetch(M, {
128
129
  method: "POST",
129
130
  headers: {
130
131
  "Content-Type": "application/json",
131
- Authorization: `Bearer ${A ?? ""}`
132
+ Authorization: `Bearer ${k ?? ""}`
132
133
  },
133
134
  body: JSON.stringify({
134
- query: D,
135
- variables: { publisherId: R }
135
+ query: E,
136
+ variables: { publisherId: L }
136
137
  })
137
138
  });
138
139
  if (e) return;
@@ -140,30 +141,30 @@ var E = "\n query SellerMyPublisher {\n myPublisher {\n id\n }\n }\
140
141
  let n = await t.json();
141
142
  if (e) return;
142
143
  if (n.errors?.length) throw Error(n.errors[0]?.message ?? "Unknown GraphQL error");
143
- V((n.data?.products ?? []).map((e) => ({
144
+ B((n.data?.products ?? []).map((e) => ({
144
145
  ...e,
145
146
  status: e.status
146
147
  })));
147
148
  } catch (t) {
148
- e || U(t instanceof Error ? t.message : "Failed to load items");
149
+ e || H(t instanceof Error ? t.message : "Failed to load items");
149
150
  } finally {
150
- e || L(!1);
151
+ e || I(!1);
151
152
  }
152
153
  })(), () => {
153
154
  e = !0;
154
155
  };
155
156
  }, [
156
- R,
157
- N,
158
- A,
159
- W
157
+ L,
158
+ M,
159
+ k,
160
+ U
160
161
  ]);
161
- let Z = o(() => B.filter((e) => !x.has(e.type)), [B]), Q = o(() => Z.filter((e) => {
162
- let t = !J || e.name.toLowerCase().includes(J.toLowerCase()), n = !Y || e.status === Y;
162
+ let Z = o(() => z.filter((e) => !re.has(e.type)), [z]), Q = o(() => Z.filter((e) => {
163
+ let t = !q || e.name.toLowerCase().includes(q.toLowerCase()), n = !Y || e.status === Y;
163
164
  return t && n;
164
165
  }), [
165
166
  Z,
166
- J,
167
+ q,
167
168
  Y
168
169
  ]), $ = o(() => ({
169
170
  total: Z.length,
@@ -171,148 +172,148 @@ var E = "\n query SellerMyPublisher {\n myPublisher {\n id\n }\n }\
171
172
  pendingReview: Z.filter((e) => e.status === "PENDING_REVIEW").length,
172
173
  outOfStock: Z.filter((e) => e.stockQuantity === 0).length
173
174
  }), [Z]);
174
- if (P && B.length === 0 && !H) return /* @__PURE__ */ g(e, {
175
- title: M("devportal.myItems", "My Items"),
176
- description: M("devportal.manageYourPhysicalProductListings", "Manage your physical product listings."),
177
- children: /* @__PURE__ */ _("div", {
175
+ if (N && z.length === 0 && !V) return /* @__PURE__ */ _(e, {
176
+ title: j("devportal.myItems", "My Items"),
177
+ description: j("devportal.manageYourPhysicalProductListings", "Manage your physical product listings."),
178
+ children: /* @__PURE__ */ v("div", {
178
179
  className: "flex items-center justify-center py-12",
179
- children: [/* @__PURE__ */ g(d, { className: "h-8 w-8 animate-spin text-text-secondary" }), /* @__PURE__ */ g("span", {
180
+ children: [/* @__PURE__ */ _(f, { className: "h-8 w-8 animate-spin text-text-secondary" }), /* @__PURE__ */ _("span", {
180
181
  className: "ml-2 text-text-secondary",
181
- children: M("devportal.loadingItems", "Loading items...")
182
+ children: j("devportal.loadingItems", "Loading items...")
182
183
  })]
183
184
  })
184
185
  });
185
- if (H && B.length === 0) return /* @__PURE__ */ g(e, {
186
- title: M("devportal.myItems", "My Items"),
187
- description: M("devportal.manageYourPhysicalProductListings", "Manage your physical product listings."),
188
- children: /* @__PURE__ */ _("div", {
186
+ if (V && z.length === 0) return /* @__PURE__ */ _(e, {
187
+ title: j("devportal.myItems", "My Items"),
188
+ description: j("devportal.manageYourPhysicalProductListings", "Manage your physical product listings."),
189
+ children: /* @__PURE__ */ v("div", {
189
190
  className: "rounded-lg border border-status-error-border/50 bg-status-error-bg/10 p-6 text-center",
190
191
  children: [
191
- /* @__PURE__ */ g(c, { className: "mx-auto h-8 w-8 text-status-error-text" }),
192
- /* @__PURE__ */ g("h3", {
192
+ /* @__PURE__ */ _(c, { className: "mx-auto h-8 w-8 text-status-error-text" }),
193
+ /* @__PURE__ */ _("h3", {
193
194
  className: "mt-2 font-medium text-status-error-text",
194
- children: M("devportal.failedToLoadItems", "Failed to load items")
195
+ children: j("devportal.failedToLoadItems", "Failed to load items")
195
196
  }),
196
- /* @__PURE__ */ g("p", {
197
+ /* @__PURE__ */ _("p", {
197
198
  className: "mt-1 text-sm text-text-secondary",
198
- children: H
199
+ children: V
199
200
  }),
200
- /* @__PURE__ */ g("button", {
201
- onClick: () => G((e) => e + 1),
201
+ /* @__PURE__ */ _("button", {
202
+ onClick: () => W((e) => e + 1),
202
203
  className: "mt-4 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors",
203
- children: M("devportal.tryAgain", "Try Again")
204
+ children: j("devportal.tryAgain", "Try Again")
204
205
  })
205
206
  ]
206
207
  })
207
208
  });
208
- let ie = !!(J || Y);
209
- return /* @__PURE__ */ g(r, {
209
+ let ae = !!(q || Y);
210
+ return /* @__PURE__ */ _(ee, {
210
211
  authOnly: !0,
211
- children: /* @__PURE__ */ _(e, {
212
- title: M("devportal.myItems", "My Items"),
213
- description: M("devportal.manageYourPhysicalProductListings", "Manage your physical product listings."),
214
- actions: /* @__PURE__ */ _("button", {
212
+ children: /* @__PURE__ */ v(e, {
213
+ title: j("devportal.myItems", "My Items"),
214
+ description: j("devportal.manageYourPhysicalProductListings", "Manage your physical product listings."),
215
+ actions: /* @__PURE__ */ v("button", {
215
216
  onClick: () => X("/seller/items/new"),
216
217
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90 transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary",
217
- children: [/* @__PURE__ */ g(p, {
218
+ children: [/* @__PURE__ */ _(m, {
218
219
  size: 16,
219
220
  "aria-hidden": "true"
220
- }), M("devportal.listAnItem", "List an Item")]
221
+ }), j("devportal.listAnItem", "List an Item")]
221
222
  }),
222
223
  children: [
223
- /* @__PURE__ */ g(y, {
224
+ /* @__PURE__ */ _(ne, {
224
225
  className: "mb-4",
225
- children: /* @__PURE__ */ _("div", {
226
+ children: /* @__PURE__ */ v("div", {
226
227
  className: "grid grid-cols-2 gap-4 sm:grid-cols-4",
227
228
  children: [
228
- /* @__PURE__ */ _(b, {
229
+ /* @__PURE__ */ v(y, {
229
230
  treatment: "metric",
230
231
  className: "p-4",
231
- children: [/* @__PURE__ */ g("p", {
232
+ children: [/* @__PURE__ */ _("p", {
232
233
  className: "text-sm text-text-secondary",
233
- children: M("devportal.totalItems", "Total Items")
234
- }), /* @__PURE__ */ g("p", {
234
+ children: j("devportal.totalItems", "Total Items")
235
+ }), /* @__PURE__ */ _("p", {
235
236
  className: "mt-1 text-2xl font-semibold tabular-nums",
236
- children: I ? /* @__PURE__ */ g(d, { className: "h-5 w-5 animate-spin text-text-secondary" }) : $.total
237
+ children: F ? /* @__PURE__ */ _(f, { className: "h-5 w-5 animate-spin text-text-secondary" }) : $.total
237
238
  })]
238
239
  }),
239
- /* @__PURE__ */ _(b, {
240
+ /* @__PURE__ */ v(y, {
240
241
  treatment: "metric",
241
242
  className: "p-4",
242
- children: [/* @__PURE__ */ g("p", {
243
+ children: [/* @__PURE__ */ _("p", {
243
244
  className: "text-sm text-status-success-text",
244
- children: M("devportal.published", "Published")
245
- }), /* @__PURE__ */ g("p", {
245
+ children: j("devportal.published", "Published")
246
+ }), /* @__PURE__ */ _("p", {
246
247
  className: "mt-1 text-2xl font-semibold tabular-nums",
247
- children: I ? /* @__PURE__ */ g(d, { className: "h-5 w-5 animate-spin text-text-secondary" }) : $.published
248
+ children: F ? /* @__PURE__ */ _(f, { className: "h-5 w-5 animate-spin text-text-secondary" }) : $.published
248
249
  })]
249
250
  }),
250
- /* @__PURE__ */ _(b, {
251
+ /* @__PURE__ */ v(y, {
251
252
  treatment: "metric",
252
253
  className: "p-4",
253
- children: [/* @__PURE__ */ g("p", {
254
+ children: [/* @__PURE__ */ _("p", {
254
255
  className: "text-sm text-status-warning-text",
255
- children: M("devportal.pendingReview", "Pending Review")
256
- }), /* @__PURE__ */ g("p", {
256
+ children: j("devportal.pendingReview", "Pending Review")
257
+ }), /* @__PURE__ */ _("p", {
257
258
  className: "mt-1 text-2xl font-semibold tabular-nums",
258
- children: I ? /* @__PURE__ */ g(d, { className: "h-5 w-5 animate-spin text-text-secondary" }) : $.pendingReview
259
+ children: F ? /* @__PURE__ */ _(f, { className: "h-5 w-5 animate-spin text-text-secondary" }) : $.pendingReview
259
260
  })]
260
261
  }),
261
- /* @__PURE__ */ _(b, {
262
+ /* @__PURE__ */ v(y, {
262
263
  treatment: "metric",
263
264
  className: "p-4",
264
- children: [/* @__PURE__ */ g("p", {
265
+ children: [/* @__PURE__ */ _("p", {
265
266
  className: "text-sm text-status-error-text",
266
- children: M("devportal.outOfStock", "Out of Stock")
267
- }), /* @__PURE__ */ g("p", {
267
+ children: j("devportal.outOfStock", "Out of Stock")
268
+ }), /* @__PURE__ */ _("p", {
268
269
  className: "mt-1 text-2xl font-semibold tabular-nums",
269
- children: I ? /* @__PURE__ */ g(d, { className: "h-5 w-5 animate-spin text-text-secondary" }) : $.outOfStock
270
+ children: F ? /* @__PURE__ */ _(f, { className: "h-5 w-5 animate-spin text-text-secondary" }) : $.outOfStock
270
271
  })]
271
272
  })
272
273
  ]
273
274
  })
274
275
  }),
275
- /* @__PURE__ */ _("div", {
276
+ /* @__PURE__ */ v("div", {
276
277
  className: "flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",
277
- children: [/* @__PURE__ */ _("div", {
278
+ children: [/* @__PURE__ */ v("div", {
278
279
  className: "flex flex-1 items-center gap-3",
279
- children: [/* @__PURE__ */ _("div", {
280
+ children: [/* @__PURE__ */ v("div", {
280
281
  className: "relative flex-1 max-w-md",
281
- children: [/* @__PURE__ */ g(m, {
282
+ children: [/* @__PURE__ */ _(h, {
282
283
  size: 16,
283
284
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary"
284
- }), /* @__PURE__ */ g("input", {
285
+ }), /* @__PURE__ */ _("input", {
285
286
  type: "text",
286
- placeholder: M("devportal.searchItems", "Search items..."),
287
- value: J,
288
- onChange: (e) => ne(e.target.value),
287
+ placeholder: j("devportal.searchItems", "Search items..."),
288
+ value: q,
289
+ onChange: (e) => J(e.target.value),
289
290
  className: "w-full rounded-md border border-border-seam bg-bg-surface pl-9 pr-4 py-2 text-sm text-text-primary placeholder:text-text-muted focus:outline-none focus:ring-2 focus:ring-primary"
290
291
  })]
291
- }), /* @__PURE__ */ g("select", {
292
+ }), /* @__PURE__ */ _("select", {
292
293
  value: Y,
293
- onChange: (e) => re(e.target.value),
294
+ onChange: (e) => ie(e.target.value),
294
295
  className: "rounded-md border border-border-seam bg-bg-surface px-3 py-2 text-sm text-text-primary focus:outline-none focus:ring-2 focus:ring-primary scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
295
- children: te.map((e) => /* @__PURE__ */ g("option", {
296
+ children: S.map((e) => /* @__PURE__ */ _("option", {
296
297
  value: e.value,
297
298
  children: e.label
298
299
  }, e.value))
299
300
  })]
300
- }), /* @__PURE__ */ _("div", {
301
+ }), /* @__PURE__ */ v("div", {
301
302
  className: "flex items-center gap-1 rounded-md border border-border-seam p-1",
302
- children: [/* @__PURE__ */ g("button", {
303
- onClick: () => q("grid"),
304
- className: `rounded p-1.5 transition-colors ${K === "grid" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:bg-bg-sunken/50"}`,
305
- title: M("devportal.gridView", "Grid view"),
306
- children: /* @__PURE__ */ g(u, { size: 16 })
307
- }), /* @__PURE__ */ g("button", {
308
- onClick: () => q("list"),
309
- className: `rounded p-1.5 transition-colors ${K === "list" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:bg-bg-sunken/50"}`,
310
- title: M("devportal.listView", "List view"),
311
- children: /* @__PURE__ */ g(ee, { size: 16 })
303
+ children: [/* @__PURE__ */ _("button", {
304
+ onClick: () => K("grid"),
305
+ className: `rounded p-1.5 transition-colors ${G === "grid" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:bg-bg-sunken/50"}`,
306
+ title: j("devportal.gridView", "Grid view"),
307
+ children: /* @__PURE__ */ _(u, { size: 16 })
308
+ }), /* @__PURE__ */ _("button", {
309
+ onClick: () => K("list"),
310
+ className: `rounded p-1.5 transition-colors ${G === "list" ? "bg-bg-sunken text-text-primary" : "text-text-secondary hover:bg-bg-sunken/50"}`,
311
+ title: j("devportal.listView", "List view"),
312
+ children: /* @__PURE__ */ _(d, { size: 16 })
312
313
  })]
313
314
  })]
314
315
  }),
315
- Z.length > 0 && /* @__PURE__ */ _("p", {
316
+ Z.length > 0 && /* @__PURE__ */ v("p", {
316
317
  className: "text-sm text-text-secondary",
317
318
  children: [
318
319
  Q.length,
@@ -321,212 +322,214 @@ var E = "\n query SellerMyPublisher {\n myPublisher {\n id\n }\n }\
321
322
  " found"
322
323
  ]
323
324
  }),
324
- !R && !P ? /* @__PURE__ */ g(t, {
325
+ !L && !N ? /* @__PURE__ */ _(t, {
325
326
  illustration: "empty-generic",
326
- icon: /* @__PURE__ */ g(f, { size: 32 }),
327
- title: M("devportal.noPublisherProfileYet", "No publisher profile yet"),
328
- description: M("devportal.listAnItemToGetStarted", "List an item to get started. Your publisher profile will be created automatically."),
329
- action: /* @__PURE__ */ _("button", {
327
+ icon: /* @__PURE__ */ _(p, { size: 32 }),
328
+ title: j("devportal.noPublisherProfileYet", "No publisher profile yet"),
329
+ description: j("devportal.listAnItemToGetStarted", "List an item to get started. Your publisher profile will be created automatically."),
330
+ action: /* @__PURE__ */ v("button", {
330
331
  onClick: () => X("/seller/items/new"),
331
332
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
332
- children: [/* @__PURE__ */ g(p, { size: 16 }), M("devportal.listAnItem", "List an Item")]
333
+ children: [/* @__PURE__ */ _(m, { size: 16 }), j("devportal.listAnItem", "List an Item")]
333
334
  })
334
- }) : I ? /* @__PURE__ */ _("div", {
335
+ }) : F ? /* @__PURE__ */ v("div", {
335
336
  className: "flex items-center justify-center py-12",
336
- children: [/* @__PURE__ */ g(d, { className: "h-6 w-6 animate-spin text-text-secondary" }), /* @__PURE__ */ g("span", {
337
+ children: [/* @__PURE__ */ _(f, { className: "h-6 w-6 animate-spin text-text-secondary" }), /* @__PURE__ */ _("span", {
337
338
  className: "ml-2 text-text-secondary",
338
- children: M("devportal.loadingItems", "Loading items...")
339
+ children: j("devportal.loadingItems", "Loading items...")
339
340
  })]
340
- }) : Q.length > 0 ? K === "grid" ? /* @__PURE__ */ g("div", {
341
+ }) : Q.length > 0 ? G === "grid" ? /* @__PURE__ */ _("div", {
341
342
  className: "grid gap-4 grid-cols-1 sm:grid-cols-2 lg:grid-cols-3",
342
- children: Q.map((e) => /* @__PURE__ */ g(k, {
343
+ children: Q.map((e) => /* @__PURE__ */ _(O, {
343
344
  item: e,
344
345
  onEdit: () => X(`/seller/items/${e.id}`)
345
346
  }, e.id))
346
- }) : /* @__PURE__ */ g("div", {
347
+ }) : /* @__PURE__ */ _("div", {
347
348
  className: "overflow-x-auto rounded-lg border border-border-seam",
348
- children: /* @__PURE__ */ _("table", {
349
+ children: /* @__PURE__ */ v("table", {
349
350
  className: "w-full text-sm",
350
- children: [/* @__PURE__ */ g("thead", { children: /* @__PURE__ */ _("tr", {
351
+ children: [/* @__PURE__ */ _("thead", { children: /* @__PURE__ */ v("tr", {
351
352
  className: "border-b border-border-seam bg-bg-sunken",
352
353
  children: [
353
- /* @__PURE__ */ g("th", {
354
+ /* @__PURE__ */ _("th", {
354
355
  className: "px-4 py-3 text-left font-medium text-text-secondary",
355
356
  children: "Item"
356
357
  }),
357
- /* @__PURE__ */ g("th", {
358
+ /* @__PURE__ */ _("th", {
358
359
  className: "px-4 py-3 text-left font-medium text-text-secondary",
359
360
  children: "Type"
360
361
  }),
361
- /* @__PURE__ */ g("th", {
362
+ /* @__PURE__ */ _("th", {
362
363
  className: "px-4 py-3 text-left font-medium text-text-secondary",
363
364
  children: "Price"
364
365
  }),
365
- /* @__PURE__ */ g("th", {
366
+ /* @__PURE__ */ _("th", {
366
367
  className: "px-4 py-3 text-left font-medium text-text-secondary",
367
368
  children: "Stock"
368
369
  }),
369
- /* @__PURE__ */ g("th", {
370
+ /* @__PURE__ */ _("th", {
370
371
  className: "px-4 py-3 text-left font-medium text-text-secondary",
371
372
  children: "Status"
372
373
  }),
373
- /* @__PURE__ */ g("th", {
374
+ /* @__PURE__ */ _("th", {
374
375
  className: "px-4 py-3 text-right font-medium text-text-secondary",
375
376
  children: "Actions"
376
377
  })
377
378
  ]
378
- }) }), /* @__PURE__ */ g("tbody", { children: Q.map((e) => {
379
- let t = C[e.status] ?? C.DRAFT;
380
- return /* @__PURE__ */ _("tr", {
379
+ }) }), /* @__PURE__ */ _("tbody", { children: Q.map((e) => {
380
+ let t = x[e.status] ?? x.DRAFT;
381
+ return /* @__PURE__ */ v("tr", {
381
382
  className: "border-b border-border-subtle last:border-0 hover:bg-bg-sunken/50 transition-colors",
382
383
  children: [
383
- /* @__PURE__ */ g("td", {
384
+ /* @__PURE__ */ _("td", {
384
385
  className: "px-4 py-3",
385
- children: /* @__PURE__ */ _("div", {
386
+ children: /* @__PURE__ */ v("div", {
386
387
  className: "flex items-center gap-3",
387
- children: [e.icon ? /* @__PURE__ */ g("img", {
388
+ children: [/* @__PURE__ */ _(i, {
388
389
  src: e.icon,
389
390
  alt: e.name,
390
- className: "h-8 w-8 rounded-lg object-cover shrink-0"
391
- }) : /* @__PURE__ */ g("div", {
392
- className: "flex h-8 w-8 items-center justify-center rounded-lg bg-bg-sunken shrink-0",
393
- children: /* @__PURE__ */ g(f, {
394
- size: 14,
395
- className: "text-text-muted"
391
+ className: "h-8 w-8 rounded-lg object-cover shrink-0",
392
+ fallback: /* @__PURE__ */ _("div", {
393
+ className: "flex h-8 w-8 items-center justify-center rounded-lg bg-bg-sunken shrink-0",
394
+ children: /* @__PURE__ */ _(p, {
395
+ size: 14,
396
+ className: "text-text-muted"
397
+ })
396
398
  })
397
- }), /* @__PURE__ */ _("div", {
399
+ }), /* @__PURE__ */ v("div", {
398
400
  className: "min-w-0",
399
- children: [/* @__PURE__ */ g("p", {
401
+ children: [/* @__PURE__ */ _("p", {
400
402
  className: "font-medium text-text-primary truncate",
401
403
  children: e.name
402
- }), e.sku && /* @__PURE__ */ _("p", {
404
+ }), e.sku && /* @__PURE__ */ v("p", {
403
405
  className: "text-xs text-text-muted",
404
406
  children: ["SKU: ", e.sku]
405
407
  })]
406
408
  })]
407
409
  })
408
410
  }),
409
- /* @__PURE__ */ g("td", {
411
+ /* @__PURE__ */ _("td", {
410
412
  className: "px-4 py-3 text-text-secondary",
411
- children: T(e.type)
413
+ children: w(e.type)
412
414
  }),
413
- /* @__PURE__ */ g("td", {
415
+ /* @__PURE__ */ _("td", {
414
416
  className: "px-4 py-3 text-text-primary tabular-nums",
415
- children: w(e.price, e.currency)
417
+ children: C(e.price, e.currency)
416
418
  }),
417
- /* @__PURE__ */ g("td", {
419
+ /* @__PURE__ */ _("td", {
418
420
  className: "px-4 py-3",
419
- children: e.stockQuantity === 0 ? /* @__PURE__ */ g("span", {
421
+ children: e.stockQuantity === 0 ? /* @__PURE__ */ _("span", {
420
422
  className: "text-status-error-text",
421
423
  children: "Out of stock"
422
- }) : /* @__PURE__ */ g("span", {
424
+ }) : /* @__PURE__ */ _("span", {
423
425
  className: "text-text-primary tabular-nums",
424
426
  children: e.stockQuantity
425
427
  })
426
428
  }),
427
- /* @__PURE__ */ g("td", {
429
+ /* @__PURE__ */ _("td", {
428
430
  className: "px-4 py-3",
429
- children: /* @__PURE__ */ g("span", {
431
+ children: /* @__PURE__ */ _("span", {
430
432
  className: `rounded-full px-2.5 py-0.5 text-xs font-medium ${t.className}`,
431
433
  children: t.label
432
434
  })
433
435
  }),
434
- /* @__PURE__ */ g("td", {
436
+ /* @__PURE__ */ _("td", {
435
437
  className: "px-4 py-3 text-right",
436
- children: /* @__PURE__ */ _("button", {
438
+ children: /* @__PURE__ */ v("button", {
437
439
  onClick: () => X(`/seller/items/${e.id}`),
438
440
  className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors",
439
- children: [/* @__PURE__ */ g(l, { size: 12 }), M("devportal.edit", "Edit")]
441
+ children: [/* @__PURE__ */ _(l, { size: 12 }), j("devportal.edit", "Edit")]
440
442
  })
441
443
  })
442
444
  ]
443
445
  }, e.id);
444
446
  }) })]
445
447
  })
446
- }) : Z.length > 0 && ie ? /* @__PURE__ */ g(t, {
448
+ }) : Z.length > 0 && ae ? /* @__PURE__ */ _(t, {
447
449
  illustration: "empty-search",
448
- title: M("devportal.noItemsMatchYourSearch", "No items match your search"),
449
- description: M("devportal.tryAdjustingFilters", "Try adjusting your search or filters")
450
- }) : /* @__PURE__ */ g(t, {
450
+ title: j("devportal.noItemsMatchYourSearch", "No items match your search"),
451
+ description: j("devportal.tryAdjustingFilters", "Try adjusting your search or filters")
452
+ }) : /* @__PURE__ */ _(t, {
451
453
  illustration: "empty-data",
452
- icon: /* @__PURE__ */ g(f, { size: 32 }),
453
- title: M("devportal.noItemsYet", "No items yet"),
454
- description: M("devportal.addYourFirstPhysicalProduct", "Add your first physical product listing to start selling"),
455
- action: /* @__PURE__ */ _("button", {
454
+ icon: /* @__PURE__ */ _(p, { size: 32 }),
455
+ title: j("devportal.noItemsYet", "No items yet"),
456
+ description: j("devportal.addYourFirstPhysicalProduct", "Add your first physical product listing to start selling"),
457
+ action: /* @__PURE__ */ v("button", {
456
458
  onClick: () => X("/seller/items/new"),
457
459
  className: "inline-flex items-center gap-2 rounded-md bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:bg-action-primary-bg/90",
458
- children: [/* @__PURE__ */ g(p, { size: 16 }), M("devportal.listAnItem", "List an Item")]
460
+ children: [/* @__PURE__ */ _(m, { size: 16 }), j("devportal.listAnItem", "List an Item")]
459
461
  })
460
462
  })
461
463
  ]
462
464
  })
463
465
  });
464
- }, k = ({ item: e, onEdit: t }) => {
465
- let n = C[e.status] ?? C.DRAFT;
466
- return /* @__PURE__ */ _(b, {
466
+ }, O = ({ item: e, onEdit: t }) => {
467
+ let n = x[e.status] ?? x.DRAFT;
468
+ return /* @__PURE__ */ v(y, {
467
469
  treatment: "insight",
468
470
  className: "flex flex-col gap-3 p-4",
469
- children: [/* @__PURE__ */ _("div", {
471
+ children: [/* @__PURE__ */ v("div", {
470
472
  className: "flex items-start gap-3",
471
- children: [e.icon ? /* @__PURE__ */ g("img", {
473
+ children: [/* @__PURE__ */ _(i, {
472
474
  src: e.icon,
473
475
  alt: e.name,
474
- className: "h-20 w-20 rounded-xl object-cover shrink-0"
475
- }) : /* @__PURE__ */ g("div", {
476
- className: "flex h-20 w-20 items-center justify-center rounded-xl bg-bg-sunken shrink-0",
477
- children: /* @__PURE__ */ g(f, {
478
- size: 32,
479
- className: "text-text-muted"
476
+ className: "h-20 w-20 rounded-xl object-cover shrink-0",
477
+ fallback: /* @__PURE__ */ _("div", {
478
+ className: "flex h-20 w-20 items-center justify-center rounded-xl bg-bg-sunken shrink-0",
479
+ children: /* @__PURE__ */ _(p, {
480
+ size: 32,
481
+ className: "text-text-muted"
482
+ })
480
483
  })
481
- }), /* @__PURE__ */ _("div", {
484
+ }), /* @__PURE__ */ v("div", {
482
485
  className: "min-w-0 flex-1",
483
486
  children: [
484
- /* @__PURE__ */ g("p", {
487
+ /* @__PURE__ */ _("p", {
485
488
  className: "font-semibold text-text-primary truncate",
486
489
  children: e.name
487
490
  }),
488
- e.brand && /* @__PURE__ */ g("p", {
491
+ e.brand && /* @__PURE__ */ _("p", {
489
492
  className: "text-xs text-text-muted mt-0.5",
490
493
  children: e.brand
491
494
  }),
492
- /* @__PURE__ */ g("p", {
495
+ /* @__PURE__ */ _("p", {
493
496
  className: "text-sm text-text-secondary mt-1",
494
- children: w(e.price, e.currency)
497
+ children: C(e.price, e.currency)
495
498
  }),
496
- /* @__PURE__ */ _("div", {
499
+ /* @__PURE__ */ v("div", {
497
500
  className: "flex items-center gap-2 mt-2 flex-wrap",
498
- children: [/* @__PURE__ */ g("span", {
501
+ children: [/* @__PURE__ */ _("span", {
499
502
  className: `rounded-full px-2 py-0.5 text-xs font-medium ${n.className}`,
500
503
  children: n.label
501
- }), /* @__PURE__ */ g("span", {
504
+ }), /* @__PURE__ */ _("span", {
502
505
  className: "rounded-full px-2 py-0.5 text-xs font-medium bg-bg-muted text-text-secondary",
503
- children: T(e.type)
506
+ children: w(e.type)
504
507
  })]
505
508
  })
506
509
  ]
507
510
  })]
508
- }), /* @__PURE__ */ _("div", {
511
+ }), /* @__PURE__ */ v("div", {
509
512
  className: "flex items-center justify-between pt-2 border-t border-border-subtle",
510
- children: [/* @__PURE__ */ _("div", {
513
+ children: [/* @__PURE__ */ v("div", {
511
514
  className: "flex items-center gap-1.5 text-sm",
512
- children: [/* @__PURE__ */ g(h, {
515
+ children: [/* @__PURE__ */ _(g, {
513
516
  size: 12,
514
517
  className: "text-text-muted shrink-0"
515
- }), e.stockQuantity === 0 ? /* @__PURE__ */ g("span", {
518
+ }), e.stockQuantity === 0 ? /* @__PURE__ */ _("span", {
516
519
  className: "text-status-error-text",
517
520
  children: "Out of stock"
518
- }) : /* @__PURE__ */ _("span", {
521
+ }) : /* @__PURE__ */ v("span", {
519
522
  className: "text-text-secondary",
520
523
  children: [e.stockQuantity, " in stock"]
521
524
  })]
522
- }), /* @__PURE__ */ _("button", {
525
+ }), /* @__PURE__ */ v("button", {
523
526
  onClick: t,
524
527
  className: "inline-flex items-center gap-1.5 rounded-md border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors",
525
- children: [/* @__PURE__ */ g(l, { size: 12 }), "Edit"]
528
+ children: [/* @__PURE__ */ _(l, { size: 12 }), "Edit"]
526
529
  })]
527
530
  })]
528
531
  });
529
532
  };
530
- export { O as SellerItemsPage };
533
+ export { D as SellerItemsPage };
531
534
 
532
535
  //# sourceMappingURL=SellerItemsPage.js.map