@burdenoff/microfe-store 2026.626.1 → 2026.703.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.
@@ -2,9 +2,9 @@ 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 { ArrowLeft as a, Check as o, ChevronDown as s, ChevronUp as c, PackageCheck as l, RefreshCw as u, X as d } from "lucide-react";
5
- import { jsx as f, jsxs as p } from "react/jsx-runtime";
6
- import { useNavigate as m } from "react-router-dom";
7
- import { graphqlFetch as h } from "@burdenoff/fe-libs/shared/graphql";
5
+ import { graphqlFetch as f } from "@burdenoff/fe-libs/shared/graphql";
6
+ import { jsx as p, jsxs as m } from "react/jsx-runtime";
7
+ import { useNavigate as h } from "react-router-dom";
8
8
  import { IllustratedEmptyState as g, NextSteps as _, PagePurpose as v } from "@burdenoff/fe-libs/ui";
9
9
  //#region src/pages/AdminSubmissionsQueuePage.tsx
10
10
  var y = "\n query PendingReviewProducts($limit: Int, $offset: Int) {\n pendingReviewProducts(limit: $limit, offset: $offset) {\n totalCount\n products {\n id\n slug\n name\n type\n nature\n status\n pricingModel\n price\n currency\n description\n submittedAt\n submittedBy\n category\n icon\n publisher {\n id\n name\n email\n }\n }\n }\n }\n", b = "\n query AdminProducts($limit: Int, $offset: Int, $status: ProductStatus) {\n products(filter: { status: $status }, limit: $limit, offset: $offset) {\n id\n slug\n name\n type\n nature\n status\n pricingModel\n price\n currency\n description\n submittedAt\n submittedBy\n category\n icon\n publisher {\n id\n name\n email\n }\n }\n }\n", x = "\n mutation ApproveProduct($id: ID!, $notes: String) {\n approveProduct(id: $id, notes: $notes) {\n id\n status\n publishedAt\n }\n }\n", S = "\n mutation RejectProduct($id: ID!, $reason: String!) {\n rejectProduct(id: $id, reason: $reason) {\n id\n status\n rejectedReason\n }\n }\n", C = [
@@ -25,11 +25,11 @@ var y = "\n query PendingReviewProducts($limit: Int, $offset: Int) {\n pendi
25
25
  value: "ALL"
26
26
  }
27
27
  ], w = () => {
28
- let w = m(), { authToken: T, basePath: E } = e(), [D, O] = i([]), [k, A] = i(0), [j, M] = i(!1), [N, P] = i(null), [F, I] = i(null), [L, R] = i("PENDING_REVIEW"), [z, B] = i(null), [V, H] = i(""), [U, W] = i(null), G = n(async (e) => {
28
+ let w = h(), { authToken: T, basePath: E } = e(), [D, O] = i([]), [k, A] = i(0), [j, M] = i(!1), [N, P] = i(null), [F, I] = i(null), [L, R] = i("PENDING_REVIEW"), [z, B] = i(null), [V, H] = i(""), [U, W] = i(null), G = n(async (e) => {
29
29
  M(!0), P(null);
30
30
  try {
31
31
  if (e === "PENDING_REVIEW") {
32
- let e = await h({
32
+ let e = await f({
33
33
  gateway: "global",
34
34
  query: y,
35
35
  variables: {
@@ -41,7 +41,7 @@ var y = "\n query PendingReviewProducts($limit: Int, $offset: Int) {\n pendi
41
41
  if (e.errors?.length) throw Error(e.errors[0]?.message ?? "Failed to load pending products");
42
42
  O(e.data?.pendingReviewProducts.products ?? []), A(e.data?.pendingReviewProducts.totalCount ?? 0);
43
43
  } else {
44
- let t = await h({
44
+ let t = await f({
45
45
  gateway: "global",
46
46
  query: b,
47
47
  variables: {
@@ -67,7 +67,7 @@ var y = "\n query PendingReviewProducts($limit: Int, $offset: Int) {\n pendi
67
67
  let K = async (e) => {
68
68
  I(e), P(null);
69
69
  try {
70
- let t = await h({
70
+ let t = await f({
71
71
  gateway: "global",
72
72
  query: x,
73
73
  variables: {
@@ -90,7 +90,7 @@ var y = "\n query PendingReviewProducts($limit: Int, $offset: Int) {\n pendi
90
90
  }
91
91
  I(e), P(null);
92
92
  try {
93
- let t = await h({
93
+ let t = await f({
94
94
  gateway: "global",
95
95
  query: S,
96
96
  variables: {
@@ -107,45 +107,45 @@ var y = "\n query PendingReviewProducts($limit: Int, $offset: Int) {\n pendi
107
107
  I(null);
108
108
  }
109
109
  };
110
- return /* @__PURE__ */ p("div", {
110
+ return /* @__PURE__ */ m("div", {
111
111
  className: "min-h-screen bg-surface-default",
112
- children: [/* @__PURE__ */ f("header", {
112
+ children: [/* @__PURE__ */ p("header", {
113
113
  className: "border-b border-border-seam bg-surface-raised",
114
- children: /* @__PURE__ */ p("div", {
114
+ children: /* @__PURE__ */ m("div", {
115
115
  className: "mx-auto max-w-7xl px-6 py-4",
116
- children: [/* @__PURE__ */ p("div", {
116
+ children: [/* @__PURE__ */ m("div", {
117
117
  className: "flex items-center justify-between",
118
- children: [/* @__PURE__ */ p("div", {
118
+ children: [/* @__PURE__ */ m("div", {
119
119
  className: "flex items-center gap-3",
120
- children: [/* @__PURE__ */ p("button", {
120
+ children: [/* @__PURE__ */ m("button", {
121
121
  type: "button",
122
122
  onClick: () => w(`${E}/dashboard`),
123
123
  className: "inline-flex items-center gap-2 rounded-md px-3 py-1.5 text-sm text-text-secondary hover:bg-surface-hover hover:text-text-primary",
124
- children: [/* @__PURE__ */ f(a, { className: "size-4" }), "Back"]
125
- }), /* @__PURE__ */ p("div", {
124
+ children: [/* @__PURE__ */ p(a, { className: "size-4" }), "Back"]
125
+ }), /* @__PURE__ */ m("div", {
126
126
  className: "flex items-center gap-2",
127
127
  children: [
128
- /* @__PURE__ */ f(l, { className: "size-5 text-text-primary" }),
129
- /* @__PURE__ */ f("h1", {
128
+ /* @__PURE__ */ p(l, { className: "size-5 text-text-primary" }),
129
+ /* @__PURE__ */ p("h1", {
130
130
  className: "text-xl font-semibold text-text-primary",
131
131
  children: "Submission queue"
132
132
  }),
133
- /* @__PURE__ */ f("span", {
133
+ /* @__PURE__ */ p("span", {
134
134
  className: "rounded-full bg-surface-accent-muted px-2 py-0.5 text-xs font-medium text-text-accent",
135
135
  children: k
136
136
  })
137
137
  ]
138
138
  })]
139
- }), /* @__PURE__ */ p("button", {
139
+ }), /* @__PURE__ */ m("button", {
140
140
  type: "button",
141
141
  onClick: () => void G(L),
142
142
  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",
143
143
  disabled: j,
144
- children: [/* @__PURE__ */ f(u, { className: `size-4 ${j ? "animate-spin" : ""}` }), "Refresh"]
144
+ children: [/* @__PURE__ */ p(u, { className: `size-4 ${j ? "animate-spin" : ""}` }), "Refresh"]
145
145
  })]
146
- }), /* @__PURE__ */ f("div", {
146
+ }), /* @__PURE__ */ p("div", {
147
147
  className: "mt-4 flex gap-2",
148
- children: C.map((e) => /* @__PURE__ */ f("button", {
148
+ children: C.map((e) => /* @__PURE__ */ p("button", {
149
149
  type: "button",
150
150
  onClick: () => R(e.value),
151
151
  className: `rounded-full px-3 py-1 text-xs font-medium transition-colors ${L === e.value ? "bg-surface-accent text-text-on-accent" : "bg-surface-muted text-text-secondary hover:bg-surface-hover"}`,
@@ -153,14 +153,14 @@ var y = "\n query PendingReviewProducts($limit: Int, $offset: Int) {\n pendi
153
153
  }, e.value))
154
154
  })]
155
155
  })
156
- }), /* @__PURE__ */ p("main", {
156
+ }), /* @__PURE__ */ m("main", {
157
157
  className: "mx-auto max-w-7xl p-6",
158
158
  children: [
159
- /* @__PURE__ */ f(v, {
159
+ /* @__PURE__ */ p(v, {
160
160
  className: "mb-4",
161
161
  children: "This is the marketplace gatekeeper. Every product a publisher submits lands here for review before customers can see it — open each one to inspect its details, pricing and publisher, then approve it to go live or reject it with a clear reason the publisher will read. Keeping this queue empty means new apps reach customers quickly."
162
162
  }),
163
- /* @__PURE__ */ f(_, {
163
+ /* @__PURE__ */ p(_, {
164
164
  storageKey: "store-admin-submissions",
165
165
  steps: [
166
166
  {
@@ -182,143 +182,143 @@ var y = "\n query PendingReviewProducts($limit: Int, $offset: Int) {\n pendi
182
182
  }
183
183
  ]
184
184
  }),
185
- N && /* @__PURE__ */ f("div", {
185
+ N && /* @__PURE__ */ p("div", {
186
186
  role: "alert",
187
187
  className: "mb-4 rounded-md border border-border-danger bg-surface-danger-muted px-4 py-3 text-sm text-text-danger",
188
188
  children: N
189
189
  }),
190
- j && D.length === 0 ? /* @__PURE__ */ f("output", {
190
+ j && D.length === 0 ? /* @__PURE__ */ p("output", {
191
191
  className: "block py-16 text-center text-text-secondary",
192
192
  children: "Loading submissions…"
193
- }) : D.length === 0 ? /* @__PURE__ */ f(g, {
193
+ }) : D.length === 0 ? /* @__PURE__ */ p(g, {
194
194
  illustration: L === "PENDING_REVIEW" ? "empty-notifications" : "empty-data",
195
195
  title: L === "PENDING_REVIEW" ? "Queue is clear" : "No products match this filter",
196
196
  description: L === "PENDING_REVIEW" ? "There are no submissions awaiting review right now. New submissions will appear here as publishers send them in." : "Nothing matches the current status filter. Switch filters above to see products in other states."
197
- }) : /* @__PURE__ */ f("ul", {
197
+ }) : /* @__PURE__ */ p("ul", {
198
198
  className: "space-y-3",
199
- children: D.map((e) => /* @__PURE__ */ p("li", {
199
+ children: D.map((e) => /* @__PURE__ */ m("li", {
200
200
  className: "overflow-hidden rounded-lg border border-border-seam bg-surface-raised transition-[box-shadow,border-color] hover:border-border-strong hover:shadow-[var(--shadow-pop)]",
201
201
  children: [
202
- /* @__PURE__ */ p("div", {
202
+ /* @__PURE__ */ m("div", {
203
203
  className: "flex items-start gap-4 p-4",
204
204
  children: [
205
- e.icon ? /* @__PURE__ */ f("img", {
205
+ e.icon ? /* @__PURE__ */ p("img", {
206
206
  src: e.icon,
207
207
  alt: "",
208
208
  className: "size-14 flex-shrink-0 rounded-md object-cover"
209
- }) : /* @__PURE__ */ f("div", {
209
+ }) : /* @__PURE__ */ p("div", {
210
210
  className: "flex size-14 flex-shrink-0 items-center justify-center rounded-md bg-surface-muted text-xs text-text-secondary",
211
211
  children: e.type
212
212
  }),
213
- /* @__PURE__ */ p("div", {
213
+ /* @__PURE__ */ m("div", {
214
214
  className: "min-w-0 flex-1",
215
215
  children: [
216
- /* @__PURE__ */ p("div", {
216
+ /* @__PURE__ */ m("div", {
217
217
  className: "flex items-center gap-2",
218
218
  children: [
219
- /* @__PURE__ */ f("h3", {
219
+ /* @__PURE__ */ p("h3", {
220
220
  className: "truncate text-base font-semibold text-text-primary",
221
221
  children: e.name
222
222
  }),
223
- /* @__PURE__ */ f("span", {
223
+ /* @__PURE__ */ p("span", {
224
224
  className: "rounded-full bg-surface-accent-muted px-2 py-0.5 text-xs font-medium text-text-accent",
225
225
  children: e.type
226
226
  }),
227
- /* @__PURE__ */ f("span", {
227
+ /* @__PURE__ */ p("span", {
228
228
  className: "rounded-full bg-surface-muted px-2 py-0.5 text-xs font-medium text-text-secondary",
229
229
  children: e.nature
230
230
  })
231
231
  ]
232
232
  }),
233
- /* @__PURE__ */ f("div", {
233
+ /* @__PURE__ */ p("div", {
234
234
  className: "mt-0.5 text-xs text-text-tertiary",
235
235
  children: e.slug
236
236
  }),
237
- /* @__PURE__ */ p("div", {
237
+ /* @__PURE__ */ m("div", {
238
238
  className: "mt-1 flex items-center gap-3 text-xs text-text-secondary",
239
239
  children: [
240
- /* @__PURE__ */ p("span", { children: ["Publisher: ", e.publisher?.name ?? "Unknown"] }),
241
- /* @__PURE__ */ p("span", { children: ["Price: ", t(e.price, e.currency, e.pricingModel)] }),
242
- e.submittedAt && /* @__PURE__ */ p("span", { children: ["Submitted ", new Date(e.submittedAt).toLocaleString()] })
240
+ /* @__PURE__ */ m("span", { children: ["Publisher: ", e.publisher?.name ?? "Unknown"] }),
241
+ /* @__PURE__ */ m("span", { children: ["Price: ", t(e.price, e.currency, e.pricingModel)] }),
242
+ e.submittedAt && /* @__PURE__ */ m("span", { children: ["Submitted ", new Date(e.submittedAt).toLocaleString()] })
243
243
  ]
244
244
  }),
245
- e.description && /* @__PURE__ */ f("p", {
245
+ e.description && /* @__PURE__ */ p("p", {
246
246
  className: "mt-2 line-clamp-2 text-sm text-text-secondary",
247
247
  children: e.description
248
248
  })
249
249
  ]
250
250
  }),
251
- /* @__PURE__ */ p("div", {
251
+ /* @__PURE__ */ m("div", {
252
252
  className: "flex flex-shrink-0 flex-col gap-2",
253
253
  children: [
254
- /* @__PURE__ */ p("button", {
254
+ /* @__PURE__ */ m("button", {
255
255
  type: "button",
256
256
  onClick: () => W(U === e.id ? null : e.id),
257
257
  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",
258
- children: [U === e.id ? /* @__PURE__ */ f(c, { className: "size-3.5" }) : /* @__PURE__ */ f(s, { className: "size-3.5" }), "Details"]
258
+ children: [U === e.id ? /* @__PURE__ */ p(c, { className: "size-3.5" }) : /* @__PURE__ */ p(s, { className: "size-3.5" }), "Details"]
259
259
  }),
260
- /* @__PURE__ */ p("button", {
260
+ /* @__PURE__ */ m("button", {
261
261
  type: "button",
262
262
  onClick: () => void K(e.id),
263
263
  disabled: F === e.id,
264
264
  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",
265
- children: [/* @__PURE__ */ f(o, { className: "size-3.5" }), "Approve"]
265
+ children: [/* @__PURE__ */ p(o, { className: "size-3.5" }), "Approve"]
266
266
  }),
267
- /* @__PURE__ */ p("button", {
267
+ /* @__PURE__ */ m("button", {
268
268
  type: "button",
269
269
  onClick: () => {
270
270
  B(e.id), H("");
271
271
  },
272
272
  disabled: F === e.id,
273
273
  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",
274
- children: [/* @__PURE__ */ f(d, { className: "size-3.5" }), "Reject"]
274
+ children: [/* @__PURE__ */ p(d, { className: "size-3.5" }), "Reject"]
275
275
  })
276
276
  ]
277
277
  })
278
278
  ]
279
279
  }),
280
- U === e.id && /* @__PURE__ */ f("div", {
280
+ U === e.id && /* @__PURE__ */ p("div", {
281
281
  className: "border-t border-border-seam bg-surface-muted p-4",
282
- children: /* @__PURE__ */ p("dl", {
282
+ children: /* @__PURE__ */ m("dl", {
283
283
  className: "grid grid-cols-2 gap-x-6 gap-y-3 text-xs sm:grid-cols-3",
284
284
  children: [
285
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
285
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
286
286
  className: "font-medium text-text-secondary",
287
287
  children: "Slug"
288
- }), /* @__PURE__ */ f("dd", {
288
+ }), /* @__PURE__ */ p("dd", {
289
289
  className: "mt-0.5 font-mono text-text-primary",
290
290
  children: e.slug
291
291
  })] }),
292
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
292
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
293
293
  className: "font-medium text-text-secondary",
294
294
  children: "Type"
295
- }), /* @__PURE__ */ f("dd", {
295
+ }), /* @__PURE__ */ p("dd", {
296
296
  className: "mt-0.5 text-text-primary",
297
297
  children: e.type
298
298
  })] }),
299
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
299
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
300
300
  className: "font-medium text-text-secondary",
301
301
  children: "Nature"
302
- }), /* @__PURE__ */ f("dd", {
302
+ }), /* @__PURE__ */ p("dd", {
303
303
  className: "mt-0.5 text-text-primary",
304
304
  children: e.nature
305
305
  })] }),
306
- e.category && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
306
+ e.category && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
307
307
  className: "font-medium text-text-secondary",
308
308
  children: "Category"
309
- }), /* @__PURE__ */ f("dd", {
309
+ }), /* @__PURE__ */ p("dd", {
310
310
  className: "mt-0.5 text-text-primary",
311
311
  children: e.category
312
312
  })] }),
313
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
313
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
314
314
  className: "font-medium text-text-secondary",
315
315
  children: "Pricing"
316
- }), /* @__PURE__ */ p("dd", {
316
+ }), /* @__PURE__ */ m("dd", {
317
317
  className: "mt-0.5 text-text-primary",
318
318
  children: [
319
319
  t(e.price, e.currency, e.pricingModel),
320
320
  " ",
321
- /* @__PURE__ */ p("span", {
321
+ /* @__PURE__ */ m("span", {
322
322
  className: "text-text-tertiary",
323
323
  children: [
324
324
  "(",
@@ -328,36 +328,36 @@ var y = "\n query PendingReviewProducts($limit: Int, $offset: Int) {\n pendi
328
328
  })
329
329
  ]
330
330
  })] }),
331
- /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
331
+ /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
332
332
  className: "font-medium text-text-secondary",
333
333
  children: "Publisher"
334
- }), /* @__PURE__ */ p("dd", {
334
+ }), /* @__PURE__ */ m("dd", {
335
335
  className: "mt-0.5 text-text-primary",
336
- children: [e.publisher?.name ?? "—", e.publisher?.email && /* @__PURE__ */ f("span", {
336
+ children: [e.publisher?.name ?? "—", e.publisher?.email && /* @__PURE__ */ p("span", {
337
337
  className: "block text-text-tertiary",
338
338
  children: e.publisher.email
339
339
  })]
340
340
  })] }),
341
- e.submittedBy && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
341
+ e.submittedBy && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
342
342
  className: "font-medium text-text-secondary",
343
343
  children: "Submitted by"
344
- }), /* @__PURE__ */ f("dd", {
344
+ }), /* @__PURE__ */ p("dd", {
345
345
  className: "mt-0.5 font-mono text-text-primary",
346
346
  children: e.submittedBy
347
347
  })] }),
348
- e.submittedAt && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("dt", {
348
+ e.submittedAt && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("dt", {
349
349
  className: "font-medium text-text-secondary",
350
350
  children: "Submitted at"
351
- }), /* @__PURE__ */ f("dd", {
351
+ }), /* @__PURE__ */ p("dd", {
352
352
  className: "mt-0.5 text-text-primary",
353
353
  children: new Date(e.submittedAt).toLocaleString()
354
354
  })] }),
355
- e.description && /* @__PURE__ */ p("div", {
355
+ e.description && /* @__PURE__ */ m("div", {
356
356
  className: "col-span-2 sm:col-span-3",
357
- children: [/* @__PURE__ */ f("dt", {
357
+ children: [/* @__PURE__ */ p("dt", {
358
358
  className: "font-medium text-text-secondary",
359
359
  children: "Description"
360
- }), /* @__PURE__ */ f("dd", {
360
+ }), /* @__PURE__ */ p("dd", {
361
361
  className: "mt-0.5 whitespace-pre-wrap text-text-primary",
362
362
  children: e.description
363
363
  })]
@@ -365,15 +365,15 @@ var y = "\n query PendingReviewProducts($limit: Int, $offset: Int) {\n pendi
365
365
  ]
366
366
  })
367
367
  }),
368
- z === e.id && /* @__PURE__ */ p("div", {
368
+ z === e.id && /* @__PURE__ */ m("div", {
369
369
  className: "border-t border-border-seam bg-surface-muted px-4 py-3",
370
370
  children: [
371
- /* @__PURE__ */ f("label", {
371
+ /* @__PURE__ */ p("label", {
372
372
  htmlFor: `reject-reason-${e.id}`,
373
373
  className: "block text-xs font-medium text-text-secondary",
374
374
  children: "Rejection reason (required)"
375
375
  }),
376
- /* @__PURE__ */ f("textarea", {
376
+ /* @__PURE__ */ p("textarea", {
377
377
  id: `reject-reason-${e.id}`,
378
378
  "aria-label": "Rejection reason",
379
379
  value: V,
@@ -384,16 +384,16 @@ var y = "\n query PendingReviewProducts($limit: Int, $offset: Int) {\n pendi
384
384
  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-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
385
385
  placeholder: "Explain why this submission is being rejected…"
386
386
  }),
387
- /* @__PURE__ */ p("div", {
387
+ /* @__PURE__ */ m("div", {
388
388
  className: "mt-2 flex justify-end gap-2",
389
- children: [/* @__PURE__ */ f("button", {
389
+ children: [/* @__PURE__ */ p("button", {
390
390
  type: "button",
391
391
  onClick: () => {
392
392
  B(null), H("");
393
393
  },
394
394
  className: "rounded-md border border-border-default bg-surface-default px-3 py-1 text-xs text-text-primary hover:bg-surface-hover",
395
395
  children: "Cancel"
396
- }), /* @__PURE__ */ f("button", {
396
+ }), /* @__PURE__ */ p("button", {
397
397
  type: "button",
398
398
  onClick: () => void q(e.id),
399
399
  disabled: !V.trim() || F === e.id,
@@ -3,20 +3,20 @@ import { formatPrice as t } from "../utils/index.js";
3
3
  import { nativeCopyText as n, nativeImpact as r, nativeNotify as i } from "../utils/nativeBridge.js";
4
4
  import { useEffect as a, useState as o } from "react";
5
5
  import { ArrowRight as s, CheckCircle2 as c, Copy as l, Download as u, KeyRound as d, Receipt as f } from "lucide-react";
6
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
7
- import { useNavigate as h, useParams as g } from "react-router-dom";
8
- import { graphqlFetch as _ } from "@burdenoff/fe-libs/shared/graphql";
6
+ import { graphqlFetch as p } from "@burdenoff/fe-libs/shared/graphql";
7
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
8
+ import { useNavigate as g, useParams as _ } from "react-router-dom";
9
9
  import { EmphasisPanel as v, NextSteps as y } from "@burdenoff/fe-libs/ui";
10
10
  //#region src/pages/OrderConfirmationPage.tsx
11
11
  var b = "\n query OrderConfirmation($id: ID!) {\n getStoreOrder(id: $id) {\n id\n status\n total\n currency\n purchasedAt\n lineItems\n context\n }\n myEntitlements {\n id\n productId\n licenseKey\n expiresAt\n features\n product {\n id\n name\n slug\n icon\n manifest\n }\n }\n }\n", x = () => {
12
- let x = h(), { basePath: S, authToken: C } = e(), { orderId: w } = g(), [T, E] = o(null), [D, O] = o([]), [k, A] = o(!0), [j, M] = o(null), [N, P] = o(null);
12
+ let x = g(), { basePath: S, authToken: C } = e(), { orderId: w } = _(), [T, E] = o(null), [D, O] = o([]), [k, A] = o(!0), [j, M] = o(null), [N, P] = o(null);
13
13
  a(() => {
14
14
  if (!w) return;
15
15
  let e = !1;
16
16
  return (async () => {
17
17
  A(!0), M(null);
18
18
  try {
19
- let t = await _({
19
+ let t = await p({
20
20
  gateway: "global",
21
21
  query: b,
22
22
  variables: { id: w },
@@ -48,18 +48,18 @@ var b = "\n query OrderConfirmation($id: ID!) {\n getStoreOrder(id: $id) {\n
48
48
  let n = new URLSearchParams();
49
49
  n.set("install", e), t && n.set("licenseKey", t), window.location.href = `/vibecontrols/agents?${n.toString()}`;
50
50
  };
51
- return /* @__PURE__ */ m("main", {
51
+ return /* @__PURE__ */ h("main", {
52
52
  className: "mx-auto max-w-3xl p-6",
53
53
  children: [
54
- /* @__PURE__ */ m(v, {
54
+ /* @__PURE__ */ h(v, {
55
55
  className: "rounded-2xl p-6 text-center",
56
56
  children: [
57
- /* @__PURE__ */ p(c, { className: "mx-auto size-12 text-status-success-text" }),
58
- /* @__PURE__ */ p("h1", {
57
+ /* @__PURE__ */ m(c, { className: "mx-auto size-12 text-status-success-text" }),
58
+ /* @__PURE__ */ m("h1", {
59
59
  className: "mt-3 text-2xl font-bold text-text-primary",
60
60
  children: "Order placed successfully"
61
61
  }),
62
- T && /* @__PURE__ */ m("p", {
62
+ T && /* @__PURE__ */ h("p", {
63
63
  className: "mt-1 text-sm tabular-nums text-text-secondary",
64
64
  children: [
65
65
  "Total: ",
@@ -67,93 +67,93 @@ var b = "\n query OrderConfirmation($id: ID!) {\n getStoreOrder(id: $id) {\n
67
67
  T.purchasedAt && ` • ${new Date(T.purchasedAt).toLocaleString()}`
68
68
  ]
69
69
  }),
70
- w && /* @__PURE__ */ m("div", {
70
+ w && /* @__PURE__ */ h("div", {
71
71
  className: "mx-auto mt-4 max-w-sm rounded-lg border border-border-seam bg-surface-default px-4 py-2 text-left",
72
- children: [/* @__PURE__ */ p("p", {
72
+ children: [/* @__PURE__ */ m("p", {
73
73
  className: "text-xs uppercase tracking-wide text-text-tertiary",
74
74
  children: "Order ID"
75
- }), /* @__PURE__ */ p("p", {
75
+ }), /* @__PURE__ */ m("p", {
76
76
  className: "mt-0.5 break-all font-mono text-xs text-text-primary",
77
77
  children: w
78
78
  })]
79
79
  })
80
80
  ]
81
81
  }),
82
- j && /* @__PURE__ */ p("div", {
82
+ j && /* @__PURE__ */ m("div", {
83
83
  role: "alert",
84
84
  className: "mt-4 rounded-md border border-border-danger bg-surface-danger-muted px-4 py-3 text-sm text-text-danger",
85
85
  children: j
86
86
  }),
87
- k ? /* @__PURE__ */ p("output", {
87
+ k ? /* @__PURE__ */ m("output", {
88
88
  className: "mt-6 block py-12 text-center text-text-secondary",
89
89
  children: "Loading licenses…"
90
- }) : D.length > 0 ? /* @__PURE__ */ m("div", {
90
+ }) : D.length > 0 ? /* @__PURE__ */ h("div", {
91
91
  className: "mt-6",
92
- children: [/* @__PURE__ */ m("h2", {
92
+ children: [/* @__PURE__ */ h("h2", {
93
93
  className: "mb-3 flex items-center gap-2 text-sm font-semibold text-text-primary",
94
94
  children: [
95
- /* @__PURE__ */ p(d, { className: "size-4" }),
95
+ /* @__PURE__ */ m(d, { className: "size-4" }),
96
96
  "Your licenses (",
97
97
  D.length,
98
98
  ")"
99
99
  ]
100
- }), /* @__PURE__ */ p("ul", {
100
+ }), /* @__PURE__ */ m("ul", {
101
101
  className: "space-y-3",
102
- children: D.map((e) => /* @__PURE__ */ p("li", {
102
+ children: D.map((e) => /* @__PURE__ */ m("li", {
103
103
  className: "rounded-lg border border-border-seam bg-surface-raised p-4 transition-[box-shadow,border-color] hover:border-border-strong hover:shadow-[var(--shadow-pop)]",
104
- children: /* @__PURE__ */ m("div", {
104
+ children: /* @__PURE__ */ h("div", {
105
105
  className: "flex items-start gap-3",
106
106
  children: [
107
- e.product?.icon ? /* @__PURE__ */ p("img", {
107
+ e.product?.icon ? /* @__PURE__ */ m("img", {
108
108
  src: e.product.icon,
109
109
  alt: "",
110
110
  className: "size-12 flex-shrink-0 rounded-md object-cover"
111
- }) : /* @__PURE__ */ p("div", {
111
+ }) : /* @__PURE__ */ m("div", {
112
112
  className: "flex size-12 flex-shrink-0 items-center justify-center rounded-md bg-surface-muted text-xs text-text-secondary",
113
113
  children: e.product?.name.slice(0, 2).toUpperCase() ?? "?"
114
114
  }),
115
- /* @__PURE__ */ m("div", {
115
+ /* @__PURE__ */ h("div", {
116
116
  className: "min-w-0 flex-1",
117
117
  children: [
118
- /* @__PURE__ */ p("h3", {
118
+ /* @__PURE__ */ m("h3", {
119
119
  className: "text-base font-semibold text-text-primary",
120
120
  children: e.product?.name ?? "Unknown product"
121
121
  }),
122
- e.expiresAt && /* @__PURE__ */ m("p", {
122
+ e.expiresAt && /* @__PURE__ */ h("p", {
123
123
  className: "text-xs text-text-secondary",
124
124
  children: ["Expires: ", new Date(e.expiresAt).toLocaleDateString()]
125
125
  }),
126
- e.licenseKey && /* @__PURE__ */ m("div", {
126
+ e.licenseKey && /* @__PURE__ */ h("div", {
127
127
  className: "mt-2 flex items-center gap-2",
128
- children: [/* @__PURE__ */ p("code", {
128
+ children: [/* @__PURE__ */ m("code", {
129
129
  className: "flex-1 truncate rounded bg-surface-muted px-2 py-1 font-mono text-[11px] text-text-primary",
130
130
  children: e.licenseKey
131
- }), /* @__PURE__ */ p("button", {
131
+ }), /* @__PURE__ */ m("button", {
132
132
  type: "button",
133
133
  onClick: () => void F(e.licenseKey),
134
134
  className: "rounded-md border border-border-default bg-surface-default p-1 text-text-primary hover:bg-surface-hover",
135
135
  title: "Copy license key",
136
- children: /* @__PURE__ */ p(l, { className: "size-3.5" })
136
+ children: /* @__PURE__ */ m(l, { className: "size-3.5" })
137
137
  })]
138
138
  }),
139
- N === e.licenseKey && /* @__PURE__ */ p("p", {
139
+ N === e.licenseKey && /* @__PURE__ */ m("p", {
140
140
  className: "mt-1 text-xs text-status-success-text",
141
141
  children: "Copied to clipboard"
142
142
  })
143
143
  ]
144
144
  }),
145
- /* @__PURE__ */ m("button", {
145
+ /* @__PURE__ */ h("button", {
146
146
  type: "button",
147
147
  onClick: () => I(e.productId, e.licenseKey),
148
148
  className: "inline-flex items-center gap-1 rounded-md bg-action-primary-bg px-3 py-1.5 text-xs font-semibold text-action-primary-text hover:opacity-90",
149
- children: [/* @__PURE__ */ p(u, { className: "size-3.5" }), "Install to workspace"]
149
+ children: [/* @__PURE__ */ m(u, { className: "size-3.5" }), "Install to workspace"]
150
150
  })
151
151
  ]
152
152
  })
153
153
  }, e.id))
154
154
  })]
155
155
  }) : null,
156
- !k && /* @__PURE__ */ p(y, {
156
+ !k && /* @__PURE__ */ m(y, {
157
157
  className: "mt-6",
158
158
  storageKey: "store-order-confirmation",
159
159
  title: "What's next?",
@@ -162,7 +162,7 @@ var b = "\n query OrderConfirmation($id: ID!) {\n getStoreOrder(id: $id) {\n
162
162
  id: "install",
163
163
  label: "Install what you bought",
164
164
  description: "Add each purchased app to a workspace using its license.",
165
- icon: /* @__PURE__ */ p(u, { className: "size-4" }),
165
+ icon: /* @__PURE__ */ m(u, { className: "size-4" }),
166
166
  onClick: () => {
167
167
  let e = D[0];
168
168
  e && I(e.productId, e.licenseKey);
@@ -173,30 +173,30 @@ var b = "\n query OrderConfirmation($id: ID!) {\n getStoreOrder(id: $id) {\n
173
173
  id: "orders",
174
174
  label: "Keep this receipt",
175
175
  description: "Find this order any time under My Orders.",
176
- icon: /* @__PURE__ */ p(f, { className: "size-4" }),
176
+ icon: /* @__PURE__ */ m(f, { className: "size-4" }),
177
177
  onClick: () => x(`${S}/orders`)
178
178
  },
179
179
  {
180
180
  id: "shop",
181
181
  label: "Discover more",
182
182
  description: "Browse the marketplace for more apps and tools.",
183
- icon: /* @__PURE__ */ p(s, { className: "size-4" }),
183
+ icon: /* @__PURE__ */ m(s, { className: "size-4" }),
184
184
  onClick: () => x(`${S}/marketplace`)
185
185
  }
186
186
  ]
187
187
  }),
188
- /* @__PURE__ */ m("div", {
188
+ /* @__PURE__ */ h("div", {
189
189
  className: "mt-6 flex flex-col gap-2 sm:flex-row sm:justify-center",
190
- children: [/* @__PURE__ */ m("button", {
190
+ children: [/* @__PURE__ */ h("button", {
191
191
  type: "button",
192
192
  onClick: () => x(`${S}/orders`),
193
193
  className: "cursor-pointer inline-flex items-center justify-center gap-2 rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-semibold text-action-primary-text",
194
- children: [/* @__PURE__ */ p(f, { className: "size-4" }), "View My Orders"]
195
- }), /* @__PURE__ */ m("button", {
194
+ children: [/* @__PURE__ */ m(f, { className: "size-4" }), "View My Orders"]
195
+ }), /* @__PURE__ */ h("button", {
196
196
  type: "button",
197
197
  onClick: () => x(`${S}/marketplace`),
198
198
  className: "cursor-pointer inline-flex items-center justify-center gap-2 rounded-lg border border-border-default px-4 py-2 text-sm font-semibold text-text-primary hover:bg-surface-hover",
199
- children: ["Continue Shopping", /* @__PURE__ */ p(s, { className: "size-4" })]
199
+ children: ["Continue Shopping", /* @__PURE__ */ m(s, { className: "size-4" })]
200
200
  })]
201
201
  })
202
202
  ]